Skip to content

Commit 92088d1

Browse files
author
tuanductran
committed
fix(ci): invoke workspace CLIs from dist
1 parent de4059d commit 92088d1

5 files changed

Lines changed: 27 additions & 23 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ nextdns-skills/
9999

100100
The two CLI packages declare their package-manager `bin` metadata directly as `./dist/cli.mjs`; no
101101
checked-in `bin/` directory or wrapper is required. The pack step grants execute permission to the
102-
CLI artifact and pnpm creates its `.bin` shim from the package metadata.
102+
CLI artifact and pnpm creates its `.bin` shim from the package metadata. Repository automation invokes
103+
`node dist/cli.mjs` (or the root package's direct `packages/*/dist/cli.mjs` path) instead of relying on a
104+
self-referential workspace bin shim during fresh CI installs.
103105

104106
The shared `nextdns-markdown` package owns unified/remark parsing, YAML normalization, MDAST
105107
traversal helpers, and Valibot frontmatter validation. The two CLI packages consume it rather than

CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ nextdns-skills/
8383

8484
The two CLI packages declare their package-manager `bin` metadata directly as `./dist/cli.mjs`; no
8585
checked-in `bin/` directory or wrapper is required. The pack step grants execute permission to the
86-
CLI artifact and pnpm creates its `.bin` shim from the package metadata.
86+
CLI artifact and pnpm creates its `.bin` shim from the package metadata. Repository automation invokes
87+
`node dist/cli.mjs` (or the root package's direct `packages/*/dist/cli.mjs` path) instead of relying on a
88+
self-referential workspace bin shim during fresh CI installs.
8789

8890
The shared `nextdns-markdown` package owns unified/remark parsing, YAML normalization, MDAST
8991
traversal helpers, and Valibot frontmatter validation. The two CLI packages consume it rather than

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
"build:frontend": "turbo run build-frontend",
4242
"build:integrations": "turbo run build-integrations",
4343
"build:skills": "turbo run build-all",
44-
"build:check": "nextdns-skills-build build --all --check",
44+
"build:check": "node packages/nextdns-skills-build/dist/cli.mjs build --all --check",
4545
"build:ui": "turbo run build-ui",
4646
"check-duplicates": "turbo run check-duplicates",
4747
"check-tags": "turbo run check-tags",
48-
"audit": "nextdns-skills-scripts audit",
48+
"audit": "node packages/nextdns-scripts/dist/cli.mjs audit",
4949
"dev": "turbo run dev",
5050
"format": "vp fmt",
5151
"format:check": "vp fmt --check",

packages/nextdns-scripts/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
},
2525
"scripts": {
2626
"build": "vp pack",
27-
"check-duplicates": "nextdns-skills-scripts check-duplicates",
28-
"check-tags": "nextdns-skills-scripts check-tags",
29-
"audit": "nextdns-skills-scripts audit",
27+
"check-duplicates": "node dist/cli.mjs check-duplicates",
28+
"check-tags": "node dist/cli.mjs check-tags",
29+
"audit": "node dist/cli.mjs audit",
3030
"dev": "vp pack --watch",
31-
"generate-stats": "nextdns-skills-scripts generate-stats",
31+
"generate-stats": "node dist/cli.mjs generate-stats",
3232
"prepublishOnly": "pnpm build",
3333
"test": "vp test run",
3434
"test:coverage": "vp test run --coverage",
3535
"test:watch": "vp test",
3636
"types:check": "tsc --noEmit",
37-
"update-counts": "nextdns-skills-scripts update-counts",
38-
"validate-rules": "nextdns-skills-scripts validate-rules"
37+
"update-counts": "node dist/cli.mjs update-counts",
38+
"validate-rules": "node dist/cli.mjs validate-rules"
3939
},
4040
"dependencies": {
4141
"nextdns-markdown": "workspace:*",

packages/nextdns-skills-build/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@
2525
},
2626
"scripts": {
2727
"build": "vp pack",
28-
"build-agents": "nextdns-skills-build build",
29-
"build-all": "nextdns-skills-build build --all",
30-
"build-check": "nextdns-skills-build build --all --check",
31-
"build-api": "nextdns-skills-build build --skill=nextdns-api",
32-
"build-cli": "nextdns-skills-build build --skill=nextdns-cli",
33-
"build-frontend": "nextdns-skills-build build --skill=nextdns-frontend",
34-
"build-integrations": "nextdns-skills-build build --skill=integrations",
35-
"build-ui": "nextdns-skills-build build --skill=nextdns-ui",
28+
"build-agents": "node dist/cli.mjs build",
29+
"build-all": "node dist/cli.mjs build --all",
30+
"build-check": "node dist/cli.mjs build --all --check",
31+
"build-api": "node dist/cli.mjs build --skill=nextdns-api",
32+
"build-cli": "node dist/cli.mjs build --skill=nextdns-cli",
33+
"build-frontend": "node dist/cli.mjs build --skill=nextdns-frontend",
34+
"build-integrations": "node dist/cli.mjs build --skill=integrations",
35+
"build-ui": "node dist/cli.mjs build --skill=nextdns-ui",
3636
"dev": "vp pack --watch",
37-
"export": "nextdns-skills-build export",
38-
"extract-tests": "nextdns-skills-build extract-tests",
39-
"migrate": "nextdns-skills-build migrate",
37+
"export": "node dist/cli.mjs export",
38+
"extract-tests": "node dist/cli.mjs extract-tests",
39+
"migrate": "node dist/cli.mjs migrate",
4040
"prepublishOnly": "pnpm build",
41-
"search": "nextdns-skills-build search",
41+
"search": "node dist/cli.mjs search",
4242
"test": "vp test run",
4343
"test:coverage": "vp test run --coverage",
4444
"test:watch": "vp test",
4545
"types:check": "tsc --noEmit",
46-
"validate": "nextdns-skills-build validate"
46+
"validate": "node dist/cli.mjs validate"
4747
},
4848
"dependencies": {
4949
"nextdns-markdown": "workspace:*",

0 commit comments

Comments
 (0)