mirror of
https://github.com/CharlesWiltgen/Axiom.git
synced 2026-09-20 19:58:20 +08:00
refactor: migrate build scripts from Deno to Node 24
Node 24 has stable TypeScript stripping (no flags needed), eliminating the need for Deno as a separate runtime. All scripts now use #!/usr/bin/env node. - Add .mise.toml pinning Node 24 - Replace regex frontmatter parser with gray-matter in build-codex.ts - Replace Deno.exit/Deno.args with process equivalents in pre-deploy.ts - Update package.json scripts from deno run to node - Remove Deno prerequisite from codex-install docs
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
[tools]
|
||||
node = "24"
|
||||
@@ -19,7 +19,7 @@ The Codex plugin includes 164 specialized skills covering:
|
||||
## Prerequisites
|
||||
|
||||
- **Codex CLI** or Codex web app
|
||||
- **Deno** — required to build the plugin. Check with `deno --version` or install from [deno.com](https://deno.com)
|
||||
- **Node.js 24+** — required to build the plugin. Check with `node --version`
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -119,14 +119,6 @@ The Codex plugin includes the same skill content as the Claude Code plugin, with
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### `deno: command not found`
|
||||
|
||||
Install Deno from [deno.com](https://deno.com):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://deno.land/install.sh | sh
|
||||
```
|
||||
|
||||
### `axiom-codex/` directory not found
|
||||
|
||||
Run the build step first:
|
||||
|
||||
Generated
+119
@@ -9,6 +9,7 @@
|
||||
"version": "0.1.3",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"gray-matter": "^4.0.3",
|
||||
"mermaid": "^11.12.2",
|
||||
"vitepress": "2.0.0-alpha.15",
|
||||
"vitepress-plugin-mermaid": "^2.0.17"
|
||||
@@ -1728,6 +1729,16 @@
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/birpc": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/birpc/-/birpc-2.8.0.tgz",
|
||||
@@ -2514,6 +2525,20 @@
|
||||
"@esbuild/win32-x64": "0.25.12"
|
||||
}
|
||||
},
|
||||
"node_modules/esprima": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"bin": {
|
||||
"esparse": "bin/esparse.js",
|
||||
"esvalidate": "bin/esvalidate.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/estree-walker": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||
@@ -2521,6 +2546,19 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/extend-shallow": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||
"integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-extendable": "^0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
@@ -2564,6 +2602,22 @@
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/gray-matter": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz",
|
||||
"integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"js-yaml": "^3.13.1",
|
||||
"kind-of": "^6.0.2",
|
||||
"section-matter": "^1.0.0",
|
||||
"strip-bom-string": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/hachure-fill": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz",
|
||||
@@ -2657,6 +2711,16 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extendable": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
|
||||
"integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-what": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/is-what/-/is-what-5.5.0.tgz",
|
||||
@@ -2670,6 +2734,20 @@
|
||||
"url": "https://github.com/sponsors/mesqueeb"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "3.14.2",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
|
||||
"integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/katex": {
|
||||
"version": "0.16.27",
|
||||
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.27.tgz",
|
||||
@@ -2703,6 +2781,16 @@
|
||||
"integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/kind-of": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
|
||||
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/langium": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz",
|
||||
@@ -3210,6 +3298,20 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/section-matter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
|
||||
"integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"extend-shallow": "^2.0.1",
|
||||
"kind-of": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/shiki": {
|
||||
"version": "3.17.1",
|
||||
"resolved": "https://registry.npmjs.org/shiki/-/shiki-3.17.1.tgz",
|
||||
@@ -3258,6 +3360,13 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/stringify-entities": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
|
||||
@@ -3273,6 +3382,16 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-bom-string": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz",
|
||||
"integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stylis": {
|
||||
"version": "4.3.6",
|
||||
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz",
|
||||
|
||||
+5
-4
@@ -7,12 +7,13 @@
|
||||
"docs:dev": "vitepress dev docs",
|
||||
"docs:build": "vitepress build docs",
|
||||
"docs:preview": "vitepress preview docs",
|
||||
"test": "deno run --allow-read --allow-run --allow-env scripts/pre-deploy.ts --static",
|
||||
"test:full": "deno run --allow-read --allow-run --allow-env scripts/pre-deploy.ts",
|
||||
"predeploy": "deno run --allow-read --allow-run --allow-env scripts/pre-deploy.ts",
|
||||
"build:codex": "deno run --allow-read --allow-write scripts/build-codex.ts"
|
||||
"test": "node scripts/pre-deploy.ts --static",
|
||||
"test:full": "node scripts/pre-deploy.ts",
|
||||
"predeploy": "node scripts/pre-deploy.ts",
|
||||
"build:codex": "node scripts/build-codex.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gray-matter": "^4.0.3",
|
||||
"mermaid": "^11.12.2",
|
||||
"vitepress": "2.0.0-alpha.15",
|
||||
"vitepress-plugin-mermaid": "^2.0.17"
|
||||
|
||||
+5
-10
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env -S deno run --allow-read --allow-write
|
||||
#!/usr/bin/env node
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import matter from 'gray-matter';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const root = path.dirname(path.dirname(__filename));
|
||||
@@ -46,16 +47,10 @@ if (fs.existsSync(OUTPUT_DIR)) {
|
||||
fs.mkdirSync(OUTPUT_SKILLS, { recursive: true });
|
||||
fs.mkdirSync(OUTPUT_MANIFEST, { recursive: true });
|
||||
|
||||
// Parse SKILL.md frontmatter (name, description) without external dependencies
|
||||
// Parse SKILL.md frontmatter via gray-matter (shared with axiom-mcp)
|
||||
function parseFrontmatter(content: string): Record<string, string> {
|
||||
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
||||
if (!match) return {};
|
||||
const fields: Record<string, string> = {};
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
const m = line.match(/^(\w+):\s*(.+)/);
|
||||
if (m) fields[m[1]] = m[2];
|
||||
}
|
||||
return fields;
|
||||
const { data } = matter(content);
|
||||
return data as Record<string, string>;
|
||||
}
|
||||
|
||||
// Known casing for iOS/Apple terms
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env -S deno run --allow-read --allow-run --allow-env
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Axiom Pre-Deploy Validation Suite
|
||||
@@ -504,7 +504,7 @@ if (totalErrors > 0) {
|
||||
console.log(
|
||||
`\n✗ Phase 1 FAILED with ${totalErrors} error(s). Fix before deploying.`,
|
||||
);
|
||||
Deno.exit(1);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log("\n✓ Phase 1 PASSED — static validation clean\n");
|
||||
@@ -513,9 +513,9 @@ console.log("\n✓ Phase 1 PASSED — static validation clean\n");
|
||||
|
||||
heading("Phase 2: Build Validation");
|
||||
|
||||
if (Deno.args.includes("--static")) {
|
||||
if (process.argv.slice(2).includes("--static")) {
|
||||
console.log(" ⊘ Skipped (--static flag)");
|
||||
Deno.exit(0);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
heading("12. MCP Server Tests");
|
||||
@@ -535,7 +535,7 @@ try {
|
||||
`MCP server tests failed${summary ? ":\n " + summary.join("\n ") : ""}`,
|
||||
);
|
||||
console.log("\n✗ Phase 2 FAILED. Fix MCP tests before deploying.");
|
||||
Deno.exit(1);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
heading("13. MCP Bundle Build");
|
||||
@@ -567,7 +567,7 @@ try {
|
||||
`MCP bundle build failed: ${err.stderr?.toString()?.slice(0, 200) || "unknown error"}`,
|
||||
);
|
||||
console.log("\n✗ Phase 2 FAILED. Fix MCP bundle before deploying.");
|
||||
Deno.exit(1);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
heading("14. VitePress Build");
|
||||
@@ -587,7 +587,7 @@ try {
|
||||
`VitePress build failed${deadLinks ? ":\n " + deadLinks.slice(0, 5).join("\n ") : ""}`,
|
||||
);
|
||||
console.log("\n✗ Phase 2 FAILED. Fix VitePress build before deploying.");
|
||||
Deno.exit(1);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// ── Final Summary ──
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run
|
||||
#!/usr/bin/env node
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
Reference in New Issue
Block a user