bod-cli 0.8.1 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +14 -4
- package/package.json +2 -5
- package/src/cli.ts +2 -1
- package/dist/cli.js +0 -20605
|
@@ -27,9 +27,6 @@ jobs:
|
|
|
27
27
|
- name: Install dependencies
|
|
28
28
|
run: bun install --frozen-lockfile
|
|
29
29
|
|
|
30
|
-
- name: Build
|
|
31
|
-
run: bun run build
|
|
32
|
-
|
|
33
30
|
- name: Configure Git
|
|
34
31
|
run: |
|
|
35
32
|
git config user.name "GitHub Actions Bot"
|
|
@@ -42,10 +39,23 @@ jobs:
|
|
|
42
39
|
git add package.json
|
|
43
40
|
git commit -m "chore: release v${VERSION} [skip ci]"
|
|
44
41
|
|
|
42
|
+
- name: Pull NPM_TOKEN from bodify secrets store
|
|
43
|
+
# The npm token is NOT a per-repo secret — a repo-scoped NPM_TOKEN goes stale silently and every
|
|
44
|
+
# publish then dies on a 404. Pull the canonical token from bodify at publish time, so rotating it
|
|
45
|
+
# in ONE place fixes every repo. Only GitHub secret needed: BODIFY_API_KEY.
|
|
46
|
+
env:
|
|
47
|
+
BODIFY_API_KEY: ${{ secrets.BODIFY_API_KEY }}
|
|
48
|
+
run: |
|
|
49
|
+
TOKEN=$(curl -fsS -H "Authorization: Bearer $BODIFY_API_KEY" \
|
|
50
|
+
"https://bodify.bod.ee/api/apps/9ddba0fb-03bc-4490-8577-5e094b5b6792/env/NPM_TOKEN?environment=prod" \
|
|
51
|
+
| jq -r '.value')
|
|
52
|
+
[ -n "$TOKEN" ] && [ "$TOKEN" != "null" ] || { echo "::error::could not fetch NPM_TOKEN from bodify"; exit 1; }
|
|
53
|
+
echo "::add-mask::$TOKEN"
|
|
54
|
+
echo "NODE_AUTH_TOKEN=$TOKEN" >> "$GITHUB_ENV"
|
|
45
55
|
- name: Publish to npm
|
|
46
56
|
run: npm publish --access public
|
|
47
57
|
env:
|
|
48
|
-
NODE_AUTH_TOKEN: ${{
|
|
58
|
+
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }}
|
|
49
59
|
|
|
50
60
|
- name: Push tag
|
|
51
61
|
run: |
|
package/package.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bod-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"bod": "./
|
|
7
|
-
},
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "bun build src/cli.ts --outdir dist --target node --format esm"
|
|
6
|
+
"bod": "./src/cli.ts"
|
|
10
7
|
},
|
|
11
8
|
"dependencies": {
|
|
12
9
|
"@inquirer/prompts": "^7.0.0",
|
package/src/cli.ts
CHANGED
|
@@ -16,6 +16,7 @@ import serveCmd from './commands/serve'
|
|
|
16
16
|
import sshCmd from './commands/ssh'
|
|
17
17
|
import publishCmd from './commands/publish'
|
|
18
18
|
import dbCmd from './commands/db'
|
|
19
|
+
import pkg from '../package.json' with { type: 'json' }
|
|
19
20
|
|
|
20
21
|
// Parse --instance / --local / -l early so it's set before citty dispatches subcommands.
|
|
21
22
|
// Supports both `--instance=NAME` and `--instance NAME` forms.
|
|
@@ -53,7 +54,7 @@ const subCommands = {
|
|
|
53
54
|
const main = defineCommand({
|
|
54
55
|
meta: {
|
|
55
56
|
name: 'bod',
|
|
56
|
-
version:
|
|
57
|
+
version: pkg.version,
|
|
57
58
|
description: 'Unified CLI for the Bod product family',
|
|
58
59
|
},
|
|
59
60
|
args: {
|