diff --git a/packages/cli/cli/build.dev.cjs b/packages/cli/cli/build.dev.cjs index e5be61c974a..dd3d7c3fc5c 100644 --- a/packages/cli/cli/build.dev.cjs +++ b/packages/cli/cli/build.dev.cjs @@ -39,7 +39,7 @@ async function main() { version: process.argv[2] || packageJson.version, repository: packageJson.repository, files: ["cli.cjs"], - bin: { fern: "cli.cjs" } + bin: { "fern-dev": "cli.cjs" } }, undefined, 2 diff --git a/packages/cli/cli/build.prod.cjs b/packages/cli/cli/build.prod.cjs index 176c66b7cef..444ac35cd4a 100644 --- a/packages/cli/cli/build.prod.cjs +++ b/packages/cli/cli/build.prod.cjs @@ -9,7 +9,7 @@ async function main() { await tsup.build({ entry: ['src/cli.ts'], format: ['cjs'], - minify: false, + minify: true, outDir: 'dist/prod', env: { AUTH0_DOMAIN: "fern-prod.us.auth0.com", diff --git a/packages/cli/cli/src/cli.ts b/packages/cli/cli/src/cli.ts index fa3d9481344..ada6c64898f 100644 --- a/packages/cli/cli/src/cli.ts +++ b/packages/cli/cli/src/cli.ts @@ -1,3 +1,5 @@ +#!/usr/bin/env node + import { fernConfigJson, generatorsYml, diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index 37270f4f2ab..a0d3e6b2415 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,3 +1,10 @@ +- changelogEntry: + - summary: | + Add `#!/usr/bin/env node` to the CLI to prevent runtime errors. + type: internal + irVersion: 53 + version: 0.45.0-rc8 + - changelogEntry: - summary: | Stop minifying the CLI to prevent javascript runtime errors.