@stacksjs/desktop-build 0.75.518 → 0.75.520

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.
@@ -4,5 +4,5 @@ ${result.logs.map(String).join(`
4
4
  `)}function flag(name){const prefix=`--${name}=`;for(let i=0;i<process.argv.length;i++){const arg=process.argv[i];if(arg===`--${name}`){const next=process.argv[i+1];return next&&!next.startsWith("--")?next:true}if(arg.startsWith(prefix))return arg.slice(prefix.length)}return}function seconds(name){const value=flag(name);if(value===undefined||value===true)return;const parsed=Number(value);if(!Number.isFinite(parsed)||parsed<0)throw new Error(`--${name} must be a non-negative number of seconds`);return parsed*1000}const frameworkRoot=resolve(PROBE_RESULTS_DIR,"../../../../../../..");export async function run(){const browser=flag("browser");const record=flag("record")!==undefined;const out=flag("out");const cpu=flag("cpu-load");const instances=flag("instances");if(record){const rel=relative(frameworkRoot,process.cwd());if(rel.startsWith("..")||!existsSync(join(frameworkRoot,"storage/framework/core/buddy")))throw new Error("--record writes into the Stacks framework repository; run it from that checkout, or use --out <file>.")}const page={};const idle=seconds("idle");const load=seconds("load");const window=seconds("interaction-window");if(idle!==undefined)page.idleMs=idle;if(load!==undefined)page.loadMs=load;if(window!==undefined)page.interactionWindowMs=window;if(typeof cpu==="string")page.cpuLoadMsPerFrame=Number(cpu);if(typeof instances==="string")page.instances=Number(instances);let open=typeof browser==="string"?browser:true;if(flag("no-open")!==undefined)open=false;const craftBin=flag("craft-bin");const result=await runProbe({mode:browser===undefined?"craft":"browser",open,craftBin:typeof craftBin==="string"?craftBin:undefined,timeoutMs:seconds("timeout"),page});console.log(`
5
5
  ${summarize(result)}
6
6
  `);const json=`${JSON.stringify(result,null,2)}
7
- `;if(record){mkdirSync(PROBE_RESULTS_DIR,{recursive:true});const path=join(PROBE_RESULTS_DIR,probeRecordFileName(result));writeFileSync(path,json);console.log(`Recorded ${relative(process.cwd(),path)}. Run \`buddy docs:capabilities\` to publish it.`)}if(typeof out==="string"){writeFileSync(out,json);console.log(`Wrote ${out}`)}if(!record&&typeof out!=="string")console.log(json)}if(require.main==require.module){try{await run()}catch(error){process.stderr.write(`${error instanceof Error?error.message:String(error)}
7
+ `;if(record){mkdirSync(PROBE_RESULTS_DIR,{recursive:true});const path=join(PROBE_RESULTS_DIR,probeRecordFileName(result));writeFileSync(path,json);console.log(`Recorded ${relative(process.cwd(),path)}. Run \`buddy docs:capabilities\` to publish it.`)}if(typeof out==="string"){writeFileSync(out,json);console.log(`Wrote ${out}`)}if(!record&&typeof out!=="string")console.log(json)}if(import.meta.main){try{await run()}catch(error){process.stderr.write(`${error instanceof Error?error.message:String(error)}
8
8
  `);process.exit(1)}}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/desktop-build",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.518",
5
+ "version": "0.75.520",
6
6
  "description": "Build and launch Craft desktop applications for Stacks",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -73,15 +73,15 @@
73
73
  "prepublishOnly": "bun run build"
74
74
  },
75
75
  "dependencies": {
76
- "@stacksjs/config": "0.75.518",
77
- "@stacksjs/router": "0.75.518",
78
- "@stacksjs/server": "0.75.518",
76
+ "@stacksjs/config": "0.75.520",
77
+ "@stacksjs/router": "0.75.520",
78
+ "@stacksjs/server": "0.75.520",
79
79
  "craft-native": ">=0.0.443"
80
80
  },
81
81
  "peerDependencies": {
82
- "@stacksjs/config": "0.75.518",
83
- "@stacksjs/router": "0.75.518",
84
- "@stacksjs/server": "0.75.518"
82
+ "@stacksjs/config": "0.75.520",
83
+ "@stacksjs/router": "0.75.520",
84
+ "@stacksjs/server": "0.75.520"
85
85
  },
86
86
  "peerDependenciesMeta": {
87
87
  "@stacksjs/config": {
@@ -95,7 +95,7 @@
95
95
  }
96
96
  },
97
97
  "devDependencies": {
98
- "@stacksjs/build": "0.75.518",
98
+ "@stacksjs/build": "0.75.520",
99
99
  "better-dx": "^0.2.24"
100
100
  }
101
101
  }