@netlify/agent-runner-cli 1.132.0-shutdown.5 → 1.132.0-shutdown.6
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/dist/bin-local.js +32 -32
- package/dist/bin.js +33 -33
- package/dist/index.js +30 -30
- package/dist/scripts/scaffold.js +3 -3
- package/package.json +3 -2
package/dist/scripts/scaffold.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{spawnSync as w}from"child_process";import{existsSync as I,readdirSync as A,readFileSync as N,statSync as E,writeFileSync as x,mkdirSync as F}from"fs";import{createRequire as v}from"module";import i from"path";import e from"process";var L=".axis-scaffold-skip-install",S=v(import.meta.url);function
|
|
2
|
-
\u2026 (truncated)`:r})}catch{}}return n}function O(t,n=4){let s=[];function o(r,a){if(a>n)return;let f;try{f=A(r).sort()}catch{return}for(let m of f){if(
|
|
1
|
+
import{spawnSync as w}from"child_process";import{existsSync as I,readdirSync as A,readFileSync as N,statSync as E,writeFileSync as x,mkdirSync as F}from"fs";import{createRequire as v}from"module";import i from"path";import e from"process";var L=".axis-scaffold-skip-install",S=v(import.meta.url);function b(){let t=S("@netlify/ts-cli/package.json"),n=i.dirname(S.resolve("@netlify/ts-cli/package.json"));return i.join(n,t.bin)}function C(t){let n=t.slice(2),s=n[0];(!s||s.startsWith("--"))&&(console.error("Usage: scaffold.js <template-id> [--package-manager npm|pnpm|yarn]"),e.exit(1));let o=n.indexOf("--package-manager"),r=o!==-1?n[o+1]??"":"";return{templateId:s,packageManager:r}}var $=new Set(["node_modules",".git",".netlify",".claude",".next","dist","build",".cache"]),T=["package.json","app.config.ts","app.config.js","vite.config.ts","vite.config.js","next.config.ts","next.config.js","next.config.mjs","remix.config.js","nuxt.config.ts","app/routes/__root.tsx","app/routes/__root.jsx","app/root.tsx","app/root.jsx","src/main.tsx","src/main.ts","src/App.tsx","app/layout.tsx","pages/_app.tsx"],D=4,j=1e4;function M(t){let n=[];for(let s of T){if(n.length>=D)break;let o=i.join(t,s);try{if(!I(o))continue;let r=N(o,"utf8");n.push({filePath:s,content:r.length>j?r.slice(0,j)+`
|
|
2
|
+
\u2026 (truncated)`:r})}catch{}}return n}function O(t,n=4){let s=[];function o(r,a){if(a>n)return;let f;try{f=A(r).sort()}catch{return}for(let m of f){if($.has(m))continue;let p=i.join(r,m),y=i.relative(t,p),h;try{h=E(p).isDirectory()}catch{continue}h?(s.push(y+"/"),o(p,a+1)):s.push(y)}}return o(t,0),s.join(`
|
|
3
3
|
`)}function P(t){let n=O(t),s=M(t),o=a=>i.extname(a).slice(1)||"text";return["## File tree\n\n```\n"+n+"\n```",...s.map(({filePath:a,content:f})=>`## ${a}
|
|
4
4
|
|
|
5
5
|
\`\`\`${o(a)}
|
|
6
6
|
${f}
|
|
7
7
|
\`\`\``)].join(`
|
|
8
8
|
|
|
9
|
-
`)}var{templateId:l,packageManager:g}
|
|
9
|
+
`)}var{templateId:l,packageManager:g}=C(e.argv),K=b(),B=e.env.NVM_BIN?`${e.env.NVM_BIN}/node`:"node",d=[K,"--target-dir","./","--no-git","--json","--add-ons",l];g&&d.push("--package-manager",g);var k=e.env.AXIS_WORKSPACE,R=k!==void 0&&I(i.join(k,L));(e.env.NETLIFY_SCAFFOLD_NO_INSTALL==="1"||R)&&d.push("--no-install");var c=w(B,d,{stdio:["inherit","pipe","inherit"],encoding:"utf8"});c.status!==0&&(c.stdout&&e.stdout.write(c.stdout),e.exit(c.status??1));var u;try{u=JSON.parse(c.stdout)?.starter?.framework}catch{c.stdout&&e.stdout.write(c.stdout)}var Y={template:l,packageManager:g},_=u?` (${u})`:"";try{F(i.join(e.cwd(),".netlify"),{recursive:!0}),x(i.join(e.cwd(),".netlify","scaffold-result.json"),JSON.stringify(Y));let t=P(e.cwd());x(i.join(e.cwd(),".netlify","scaffold-tree.md"),t),console.log(`\u2713 Scaffolded "${l}" template${_}.
|
|
10
10
|
Bootstrap context written to .netlify/scaffold-tree.md \u2014 read that file now.
|
|
11
11
|
It contains the complete file tree and the contents of key project files.
|
|
12
12
|
Do not run ls, find, or read any other files before starting \u2014 everything you need is in that file.`)}catch{console.log(`\u2713 Scaffolded "${l}" template${_}.`)}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/agent-runner-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.132.0-shutdown.
|
|
4
|
+
"version": "1.132.0-shutdown.6",
|
|
5
5
|
"description": "CLI tool for running Netlify agents",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@commitlint/cli": "^20.0.0",
|
|
59
59
|
"@commitlint/config-conventional": "^20.0.0",
|
|
60
60
|
"@eslint/compat": "^2.0.0",
|
|
61
|
-
"@eslint/js": "^
|
|
61
|
+
"@eslint/js": "^10.0.1",
|
|
62
62
|
"@netlify/axis": "^1.17.0",
|
|
63
63
|
"@netlify/eslint-config-node": "^7.0.1",
|
|
64
64
|
"@types/node": "^24.5.0",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"@typescript-eslint/parser": "^8.0.0",
|
|
67
67
|
"@vitest/coverage-v8": "^4.1.5",
|
|
68
68
|
"@vitest/eslint-plugin": "^1.6.6",
|
|
69
|
+
"eslint": "^10.5.0",
|
|
69
70
|
"eslint-config-prettier": "^10.1.8",
|
|
70
71
|
"eslint-plugin-n": "^17.0.0",
|
|
71
72
|
"husky": "^9.0.0",
|