@generalintelligence/cofounder 0.1.1-preview.37952875349 → 0.1.1-preview.38068735955

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const{spawnSync:X}=require("node:child_process"),{readFileSync:$,statSync:Y,unlinkSync:Z,writeFileSync:L}=require("node:fs"),{homedir:A}=require("node:os"),{dirname:R,join:M}=require("node:path"),_=require.resolve("../package.json"),U=R(_),{name:N,optionalDependencies:O,cofounder:x}=require(_),J=process.platform==="linux"&&!process.report.getReport().header.glibcVersionRuntime,Q=`${process.platform}-${process.arch}${J?"-musl":""}`,G=`${N}-${Q}`;function H(q){process.stderr.write(`${x.command}: ${q}
3
- `);process.exit(1)}if(Q==="darwin-x64")H("Cofounder CLI supports macOS on Apple Silicon only. Intel Macs are not supported.");if(!Object.hasOwn(O,G))H(`unsupported platform ${Q}. Supported targets: ${Object.keys(O).map((q)=>q.slice(N.length+1)).join(", ")}`);let T;try{T=require.resolve(`${G}/bin/cofounder`)}catch{H(`missing ${G}@${O[G]}. Reinstall ${N} with npm optional dependencies enabled.`)}const I={...process.env,COFOUNDER_CLI_NPM_ROOT:U,COFOUNDER_CLI_COMMAND:x.command,COFOUNDER_CLI_PACKAGE_VERSION:x.package_version,COFOUNDER_CONFIG_DIR:process.env.COFOUNDER_CONFIG_DIR||M(A(),x.config_directory),COFOUNDER_API_URL:process.env.COFOUNDER_API_URL||process.env.COFOUNDER_API_BASE_URL||x.api_url,COFOUNDER_APP_URL:process.env.COFOUNDER_APP_URL||x.app_url},z=X(T,process.argv.slice(2),{stdio:"inherit",env:I});if(z.error)H(z.error.message);if(z.signal)process.kill(process.pid,z.signal);if(z.status===0)b();process.exit(z.status??1);function b(){const q=process.argv.slice(2);if(q.length===0||!process.stdin.isTTY||!process.stdout.isTTY||process.env.CI||q.includes("--json")||q.includes("--help")||q.includes("-h")||q.includes("--version")||q.includes("-V")||q.includes("upgrade"))return;const V=M(I.COFOUNDER_CONFIG_DIR,"updates.json"),K=M(I.COFOUNDER_CONFIG_DIR,"updates.last-check"),B=`${K}.lock`;try{if(JSON.parse($(V,"utf8")).automatic!==!0)return;if(Date.now()-Y(K).mtimeMs<86400000)return}catch(C){if(C.code!=="ENOENT"||C.path===V)return}let W=!1;try{try{L(B,"",{flag:"wx",mode:384})}catch(E){if(E.code!=="EEXIST"||Date.now()-Y(B).mtimeMs<300000)return;Z(B);L(B,"",{flag:"wx",mode:384})}W=!0;L(K,"",{mode:384});const C=X(T,["upgrade","--apply","--json"],{env:I,encoding:"utf8",timeout:135000,maxBuffer:1048576});if(C.status===0){const E=JSON.parse(C.stdout);if(E.updated)process.stderr.write(`${x.command} updated to ${E.version}.
4
- `)}else process.stderr.write(`${x.command}: automatic update failed. Run ${x.command} upgrade --apply to retry.
5
- `)}catch{}finally{if(W)try{Z(B)}catch{}}}
2
+ const{spawnSync:g}=require("node:child_process"),{readFileSync:D,statSync:C,unlinkSync:N,writeFileSync:d}=require("node:fs"),{homedir:E}=require("node:os"),{dirname:I,join:u}=require("node:path"),h=require.resolve("../package.json"),y=I(h),{name:l,optionalDependencies:O,cofounder:s}=require(h),F=process.platform==="linux"&&!process.report.getReport().header.glibcVersionRuntime,m=`${process.platform}-${process.arch}${F?"-musl":""}`,c=`${l}-${m}`;function i(e){process.stderr.write(`${s.command}: ${e}
3
+ `);process.exit(1)}if(m==="darwin-x64")i("Cofounder CLI supports macOS on Apple Silicon only. Intel Macs are not supported.");if(!Object.hasOwn(O,c))i(`unsupported platform ${m}. Supported targets: ${Object.keys(O).map((e)=>e.slice(l.length+1)).join(", ")}`);let f;try{f=require.resolve(`${c}/bin/cofounder`)}catch{i(`missing ${c}@${O[c]}. Reinstall ${l} with npm optional dependencies enabled.`)}const a={...process.env,COFOUNDER_CLI_NPM_ROOT:y,COFOUNDER_CLI_COMMAND:s.command,COFOUNDER_CLI_PACKAGE_VERSION:s.package_version,COFOUNDER_CONFIG_DIR:process.env.COFOUNDER_CONFIG_DIR||u(E(),s.config_directory),COFOUNDER_API_URL:process.env.COFOUNDER_API_URL||process.env.COFOUNDER_API_BASE_URL||s.api_url,COFOUNDER_APP_URL:process.env.COFOUNDER_APP_URL||s.app_url},r=g(f,process.argv.slice(2),{stdio:"inherit",env:a});if(r.error)i(r.error.message);if(r.signal)process.kill(process.pid,r.signal);if(r.status===0)U();process.exit(r.status??1);function U(){const e=process.argv.slice(2);if(e.length===0||!process.stdin.isTTY||!process.stdout.isTTY||process.env.CI||e.includes("--json")||e.includes("--help")||e.includes("-h")||e.includes("--version")||e.includes("-V")||e.includes("upgrade"))return;const _=u(a.COFOUNDER_CONFIG_DIR,"updates.json"),p=u(a.COFOUNDER_CONFIG_DIR,"updates.last-check"),o=`${p}.lock`;try{if(JSON.parse(D(_,"utf8")).automatic!==!0)return;if(Date.now()-C(p).mtimeMs<86400000)return}catch(t){if(t.code!=="ENOENT"||t.path===_)return}let R=!1;try{try{d(o,"",{flag:"wx",mode:384})}catch(n){if(n.code!=="EEXIST"||Date.now()-C(o).mtimeMs<300000)return;N(o);d(o,"",{flag:"wx",mode:384})}R=!0;d(p,"",{mode:384});const t=g(f,["upgrade","--apply","--json"],{env:a,encoding:"utf8",timeout:135000,maxBuffer:1048576});if(t.status===0){const n=JSON.parse(t.stdout);if(n.updated)process.stderr.write(`${s.command} updated to ${n.version}.
4
+ `)}else process.stderr.write(`${s.command}: automatic update failed. Run ${s.command} upgrade --apply to retry.
5
+ `)}catch{}finally{if(R)try{N(o)}catch{}}}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.1-preview.37952875349",
2
+ "version": "0.1.1-preview.38068735955",
3
3
  "license": "SEE LICENSE IN LICENSE",
4
4
  "repository": {
5
5
  "type": "git",
@@ -17,9 +17,9 @@
17
17
  "app_url": "https://app.cofounder.co",
18
18
  "config_directory": ".cofounder",
19
19
  "package_name": "@generalintelligence/cofounder",
20
- "package_version": "0.1.1-preview.37952875349",
21
- "source_sha": "2f9488dd3d5321f6431f4ad637b0e81009feadbf",
22
- "native_manifest_sha256": "72eaeb39aeb61e21e37e3375758f8913d8e0ac88726947b4520f83f6a18b2ff4",
20
+ "package_version": "0.1.1-preview.38068735955",
21
+ "source_sha": "53f73ad440aad0be23fb1b4647de776de2d089b5",
22
+ "native_manifest_sha256": "4321c3ad181b45eafecd9b600472aa89c928b74d808ec4b463eaf1c3b19c4789",
23
23
  "installation": "npm"
24
24
  },
25
25
  "name": "@generalintelligence/cofounder",
@@ -39,9 +39,9 @@
39
39
  "vercel": "59.19.0"
40
40
  },
41
41
  "optionalDependencies": {
42
- "@generalintelligence/cofounder-darwin-arm64": "0.1.1-preview.37952875349",
43
- "@generalintelligence/cofounder-linux-x64": "0.1.1-preview.37952875349",
44
- "@generalintelligence/cofounder-linux-arm64": "0.1.1-preview.37952875349",
45
- "@generalintelligence/cofounder-linux-x64-musl": "0.1.1-preview.37952875349"
42
+ "@generalintelligence/cofounder-darwin-arm64": "0.1.1-preview.38068735955",
43
+ "@generalintelligence/cofounder-linux-x64": "0.1.1-preview.38068735955",
44
+ "@generalintelligence/cofounder-linux-arm64": "0.1.1-preview.38068735955",
45
+ "@generalintelligence/cofounder-linux-x64-musl": "0.1.1-preview.38068735955"
46
46
  }
47
47
  }