@generalintelligence/cofounder 0.1.1-preview.36791641105 → 0.1.1-preview.37061456731

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/README.md CHANGED
@@ -56,7 +56,7 @@ This package runs `cofounder` and connects to https://api.superoptimizers.cofoun
56
56
 
57
57
  Update with `npm install -g @generalintelligence/cofounder@latest`.
58
58
 
59
- Supported: macOS x64/ARM64, Linux glibc x64/ARM64, and Alpine Linux musl x64. You don't need Bun. Keep npm optional dependencies enabled; reinstall if the platform package is missing.
59
+ Supported: macOS ARM64 (Apple Silicon; Intel Macs are not supported), Linux glibc x64/ARM64, and Alpine Linux musl x64. You don't need Bun. Keep npm optional dependencies enabled; reinstall if the platform package is missing.
60
60
 
61
61
  ## Documentation
62
62
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const{spawnSync:W}=require("node:child_process"),{readFileSync:$,statSync:X,unlinkSync:Y,writeFileSync:K}=require("node:fs"),{homedir:A}=require("node:os"),{dirname:R,join:L}=require("node:path"),Z=require.resolve("../package.json"),U=R(Z),{name:M,optionalDependencies:N,cofounder:x}=require(Z),J=process.platform==="linux"&&!process.report.getReport().header.glibcVersionRuntime,_=`${process.platform}-${process.arch}${J?"-musl":""}`,G=`${M}-${_}`;function O(q){process.stderr.write(`${x.command}: ${q}
3
- `);process.exit(1)}if(!Object.hasOwn(N,G))O(`unsupported platform ${_}. Supported targets: ${Object.keys(N).map((q)=>q.slice(M.length+1)).join(", ")}`);let Q;try{Q=require.resolve(`${G}/bin/cofounder`)}catch{O(`missing ${G}@${N[G]}. Reinstall ${M} with npm optional dependencies enabled.`)}const H={...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||L(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=W(Q,process.argv.slice(2),{stdio:"inherit",env:H});if(z.error)O(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 T=L(H.COFOUNDER_CONFIG_DIR,"updates.json"),I=L(H.COFOUNDER_CONFIG_DIR,"updates.last-check"),B=`${I}.lock`;try{if(JSON.parse($(T,"utf8")).automatic!==!0)return;if(Date.now()-X(I).mtimeMs<86400000)return}catch(C){if(C.code!=="ENOENT"||C.path===T)return}let V=!1;try{try{K(B,"",{flag:"wx",mode:384})}catch(E){if(E.code!=="EEXIST"||Date.now()-X(B).mtimeMs<300000)return;Y(B);K(B,"",{flag:"wx",mode:384})}V=!0;K(I,"",{mode:384});const C=W(Q,["upgrade","--apply","--json"],{env:H,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}.
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
4
  `)}else process.stderr.write(`${x.command}: automatic update failed. Run ${x.command} upgrade --apply to retry.
5
- `)}catch{}finally{if(V)try{Y(B)}catch{}}}
5
+ `)}catch{}finally{if(W)try{Z(B)}catch{}}}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.1-preview.36791641105",
2
+ "version": "0.1.1-preview.37061456731",
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.36791641105",
21
- "source_sha": "3e1f359955918a399980e4a309eb13f6bd67beba",
22
- "native_manifest_sha256": "ce35a3476a4876e5a4bf9b1a099c59c83cba9c3433c4c99ad1b75d16b6199a1d",
20
+ "package_version": "0.1.1-preview.37061456731",
21
+ "source_sha": "2a197a0cdcd3a50d8bcddda17872052628f79359",
22
+ "native_manifest_sha256": "04bb312070426c51a1b2023842ae9f76db4e00ffc3157be130961a6e446c8987",
23
23
  "installation": "npm"
24
24
  },
25
25
  "name": "@generalintelligence/cofounder",
@@ -39,10 +39,9 @@
39
39
  "vercel": "59.19.0"
40
40
  },
41
41
  "optionalDependencies": {
42
- "@generalintelligence/cofounder-darwin-arm64": "0.1.1-preview.36791641105",
43
- "@generalintelligence/cofounder-darwin-x64": "0.1.1-preview.36791641105",
44
- "@generalintelligence/cofounder-linux-x64": "0.1.1-preview.36791641105",
45
- "@generalintelligence/cofounder-linux-arm64": "0.1.1-preview.36791641105",
46
- "@generalintelligence/cofounder-linux-x64-musl": "0.1.1-preview.36791641105"
42
+ "@generalintelligence/cofounder-darwin-arm64": "0.1.1-preview.37061456731",
43
+ "@generalintelligence/cofounder-linux-x64": "0.1.1-preview.37061456731",
44
+ "@generalintelligence/cofounder-linux-arm64": "0.1.1-preview.37061456731",
45
+ "@generalintelligence/cofounder-linux-x64-musl": "0.1.1-preview.37061456731"
47
46
  }
48
47
  }