Skip to content

Commit

Permalink
chore(cli): update cli with shebang to run safely
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Oct 20, 2024
1 parent bd7bfe0 commit 2aa5fee
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/cli/build.dev.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/cli/build.prod.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env node

import {
fernConfigJson,
generatorsYml,
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 2aa5fee

Please sign in to comment.