<commit_before># Contributing

This doc has some guidelines on how to generate and contribute to this library.

## Generate the Library

The contents of this module are generated from the JSON Schemas defined in the source of truth repo:

https://github.com/googleapis/google-cloudevents

To generate this library, follow these steps:

- Install `qt` globally from https://github.com/googleapis/google-cloudevents/tree/master/tools/quicktype-wrapper
- Clone the source repo: `git clone <EMAIL>:googleapis/google-cloudevents.git`
- Clone this language repo: `git clone <EMAIL>:googleapis/google-cloudevents-nodejs.git --depth 1`
- In the root of this Node repo, run the following:
  - ```sh
    qt \
    --in=$PWD/../google-cloudevents/proto \
    --out=$PWD \
    --l=typescript
    ```
  - This generates a `google/` folder.
- Run: `cp -r google/events/cloud . && rm -rf google/`
  - This simplifies the output directory structure of our Google Event schemas.
- Run: `npm run postgen`
  - This polishes the generated Quicktype output in TypeScript.
- Run: `npm run build`
  - This compiles the TypeScript source.
- Your package should be ready to publish.

---

If at any point you want to restart the generation process, just delete `google/` and `cloud/` folders.

## Publish to npm

This module is automatically published by [Release Please](https://github.com/googleapis/release-please) when merging a generated release PR.
This PR is created from a GitHub Action that detects changes to the `master` branch.

Sometimes publishing does not work. To publish manually, Googlers can run the following commands:

```sh
npm run build
npm login --registry https://wombat-dressing-room.appspot.com
npm publish --registry https://wombat-dressing-room.appspot.com
```

### Conventional Commit Requirement<commit_msg>docs: fix gen script (#44)<commit_after># Contributing

This doc has some guidelines on how to generate and contribute to this library.

## Generate the Library

The contents of this module are generated from the JSON Schemas defined in the source of truth repo:

https://github.com/googleapis/google-cloudevents

To generate this library, follow these steps:

- Install `qt` globally from https://github.com/googleapis/google-cloudevents/tree/master/tools/quicktype-wrapper
- Clone the source repo: `git clone <EMAIL>:googleapis/google-cloudevents.git`
- Clone this language repo: `git clone <EMAIL>:googleapis/google-cloudevents-nodejs.git --depth 1`
- In the root of this Node repo, run the following:
  - ```sh
    qt \
    --in=$(dirname $PWD)/google-cloudevents/proto \
    --out=$PWD \
    --l=typescript
    ```
  - This generates a `google/` folder.
- Run: `cp -r google/events/cloud . && rm -rf google/`
  - This simplifies the output directory structure of our Google Event schemas.
- Run: `npm run postgen`
  - This polishes the generated Quicktype output in TypeScript.
- Run: `npm run build`
  - This compiles the TypeScript source.
- Your package should be ready to publish.

---

If at any point you want to restart the generation process, just delete `google/` and `cloud/` folders.

## Publish to npm

This module is automatically published by [Release Please](https://github.com/googleapis/release-please) when merging a generated release PR.
This PR is created from a GitHub Action that detects changes to the `master` branch.

Sometimes publishing does not work. To publish manually, Googlers can run the following commands:

```sh
npm run build
npm login --registry https://wombat-dressing-room.appspot.com
npm publish --registry https://wombat-dressing-room.appspot.com
```

### Conventional Commit Requirement
{'fraction_non_alphanumeric': 0.09766803840877915, 'fraction_numerical': 0.0010973936899862826, 'mean_word_length': 3.8548601864181093, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5966607', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1021, 'n_words': 424}