Skip to content

Commit

Permalink
fix: attempt to expose a bin cli to run using bunx
Browse files Browse the repository at this point in the history
  • Loading branch information
El-Fitz committed Aug 23, 2024
1 parent 966f73c commit 03eb4ae
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
with:
node-version: 22
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn run tsc
- run: yarn run tsc -p tsconfig.json
- run: yarn run tsc -p tsconfig.bin.json

publish-gpr:
needs: build
Expand All @@ -37,7 +38,8 @@ jobs:
node-version: 22
registry-url: https://npm.pkg.github.com/
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn run tsc
- run: yarn run tsc -p tsconfig.json
- run: yarn run tsc -p tsconfig.bin.json
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -53,7 +55,8 @@ jobs:
registry-url: "https://registry.npmjs.org"
scope: "@csbnlu"
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn run tsc
- run: yarn run tsc -p tsconfig.json
- run: yarn run tsc -p tsconfig.bin.json
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
run: bun install
- name: "Run script with Bun"
shell: bash
run: bunx @csbnlu/jawks-private-keys-provisioner@0.0.8
run: bunx @csbnlu/jawks-private-keys-provisioner@0.0.9
env:
ACCESS_TOKEN_SECRET_ARN: ${{ inputs.accessTokenSecretARN }}
REFRESH_TOKEN_SECRET_ARN: ${{ inputs.refreshTokenSecretARN }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@csbnlu/jawks-private-keys-provisioner",
"version": "0.0.8",
"version": "0.0.9",
"devDependencies": {
"@types/aws-lambda": "^8.10.143",
"@types/node": "^22.5.0",
Expand All @@ -20,7 +20,7 @@
"/dist"
],
"bin": {
"provision": "./src/provision-private-keys.ts"
"jawks-private-keys-provisioner": "dist/bin/provision-private-keys.mts"
},
"license": "AGPL-3.0-or-later"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Bindings } from "./private-keys-provisioner/index.js";
import { Bindings } from "../private-keys-provisioner/index.js";
import { z } from "zod";

interface EnvironmentConfig {
Expand Down
19 changes: 19 additions & 0 deletions tsconfig.bin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"outDir": "dist",
"target": "ES2022",
"declaration": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"noImplicitAny": true,
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strict": true,
"declarationMap": true
},
"files": [
"src/bin/provision-private-keys.mts"
]
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
"strict": true,
"declarationMap": true
},
"files": ["src/index.ts"]
"files": [
"src/index.ts"
]
}

0 comments on commit 03eb4ae

Please sign in to comment.