{"_id":"@aardbol-actions/action-io-generator","name":"@aardbol-actions/action-io-generator","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@aardbol-actions/action-io-generator","version":"2.0.0","description":"Automatically generate enums for your JavaScript action's inputs and outputs","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/aardbol/common.git"},"bin":{"action-io-generator":"bin.js"},"author":{"name":"Red Hat"},"license":"MIT","bugs":{"url":"https://github.com/aardbol/common/issues"},"homepage":"https://github.com/aardbol/common#readme","scripts":{"compile":"tsc -p .","bundle":"npx webpack --mode=production && cp -v bin.js dist/","clean":"rm -rf out/ dist/","lint":"eslint . --max-warnings=0","test":"vitest run","package":"npm run clean && npm run compile && npm run bundle && cp -v package*.json README.md LICENSE bin.js dist/","publish-dry":"npm run package && npm publish dist/ --access=public --dry-run","do-publish":"npm run package && npm publish dist/ --access=public"},"devDependencies":{"@aardbol-actions/tsconfig":"^2.0.0","@aardbol-actions/webpack-config":"^1.1.0","@eslint/js":"^10.0.1","@types/js-yaml":"^4.0.9","@types/minimist":"^1.2.5","@types/node":"^26.0.1","@types/terser-webpack-plugin":"^5.2.0","eslint":"^10.6.0","terser-webpack-plugin":"^5.6.1","ts-loader":"^9.5.1","ts-node":"^10.9.2","typescript":"^6.0.3","typescript-eslint":"^8.62.0","vitest":"^4.1.9","webpack":"^5.98.0","webpack-cli":"^7.1.0"},"dependencies":{"js-yaml":"^4.1.0","minimist":"^1.2.5"},"gitHead":"c25558ce20a7640e0f6744aad13a5dce7ff517a5","_id":"@aardbol-actions/action-io-generator@2.0.0","_nodeVersion":"24.16.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-30MULGxdH9l/YIBW9KmAZZpDgIuc8rSRBkL9suwYmoG4KRwaIYRZAWpG8/4ikNYoNYMWCRkjgMoflbqbgSZj3Q==","shasum":"8d822d20de1b78f9aecf10ee8c3eb6c5570efaa9","tarball":"https://registry.npmjs.org/@aardbol-actions/action-io-generator/-/action-io-generator-2.0.0.tgz","fileCount":6,"unpackedSize":279495,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDjFtelkqwLm43hD6LEfjmlk5D/k4ArGp2gmv3KkNFSBAIgMDPHfOEh0QZvZyK+qo9Exn400CRFYUriedVa6mJM6n0="}]},"_npmUser":{"name":"aardbol","email":"l@aardbol.dev"},"directories":{},"maintainers":[{"name":"aardbol","email":"l@aardbol.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/action-io-generator_2.0.0_1782731575980_0.7677606900893874"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-29T11:12:55.767Z","2.0.0":"2026-06-29T11:12:56.129Z","modified":"2026-06-29T11:12:56.322Z"},"maintainers":[{"name":"aardbol","email":"l@aardbol.dev"}],"description":"Automatically generate enums for your JavaScript action's inputs and outputs","homepage":"https://github.com/aardbol/common#readme","repository":{"type":"git","url":"git+ssh://git@github.com/aardbol/common.git"},"author":{"name":"Red Hat"},"bugs":{"url":"https://github.com/aardbol/common/issues"},"license":"MIT","readme":"## GitHub Action Input-Output Generator\n\n[![action-io-generator CI](https://github.com/aardbol/common/actions/workflows/ci-action-io-generator.yml/badge.svg)](https://github.com/aardbol/common/actions/workflows/ci-action-io-generator.yml)\n\n[![npm badge](https://img.shields.io/npm/v/@aardbol-actions/action-io-generator)](https://www.npmjs.com/package/@aardbol-actions/action-io-generator)\n[![Tag](https://img.shields.io/github/v/tag/aardbol/common)](https://github.com/aardbol/common/tags)\n[![License](https://img.shields.io/github/license/aardbol/common)](./LICENSE)\n\nThis is a utility to generate JavaScript/TypeScript enums from an `action.yml` file. It can be invoked as a command-line tool or programmatically.\n\nBy using this tool, you can reduce duplication and the errors that come with it by allowing the `action.yml` to work as the single source of truth for your action's inputs and outputs. This reduces the maintainence required to add, edit, and remove inputs or outputs, and ensures everything is named correctly.\n\n## Install\n\n```bash\n$ npm i -D @aardbol-actions/action-io-generator\n```\n\n## Usage\n```bash\n$ npx action-io-generator --actionYml ./action.yml --outFile ./src/generated/inputs-outputs.ts\nLoading action file from ./action.yml\nFound 8 inputs and 0 outputs.\nOutputting input and output enums to src/generated/inputs-outputs.ts\n```\n\n## Example\n\nThe [`test/generator.test.ts`](./test/generator.test.ts) test demonstrates the generator against a sample `action.yml` using Vitest.\n\n```yaml\ninputs:\n  foo:\n    required: true\n    description: This is the foo input.\n    default: foo-default\n```\n\nbecomes:\n\n```js\nexport enum Inputs {\n    /**\n     * This is the foo input.\n     * Required: true\n     * Default: \"foo-default\"\n     */\n    FOO = \"foo\",\n}\n```\n\n## Options\nThe only required option is `-o / --outFile`. For example, `npx action-io-generator -o generated/inputs-outputs.ts`.\n\n| Short | Long | Default | Description |\n| ----  | ---- | ------- | ----------- |\n| `-o`  | `--outFile` | **None** | JS/TS file to write out enums to. The directory must exist. If the file exists, it is overwritten. |\n| `-a`  | `--actionYml` | `./action.yml` | Path to `action.yml` to process into enums. |\n| `-s`  | `--silent` | `false` | Produce no output, except errors to stderr. |\n| `-w`  | `--watch` | `false` | Keep running after generating once, and re-run the generator each time the `actionYml` is edited. |\n","readmeFilename":"README.md","_rev":"1-d17f9ae38a881d1ab17f10b75deb6058"}