@nexushub/client 0.8.1 → 0.8.2

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +1 -1
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -303,7 +303,7 @@ export async function GET(request: NextRequest) {
303
303
  return NextResponse.json({ message: err.message }, { status: 500 });
304
304
  }
305
305
  }
306
- `;await w.default.ensureDir(T),await w.default.writeFile(I,O),console.log(E(" - Self-Healed: Regenerated missing Next.js revalidation route."))}}}let x=m.cloudflareProjectName||m.subdomain||"",A=S.default.resolve(process.cwd(),"wrangler.json");try{if(!h&&!w.default.existsSync(A)){let B={name:x,main:".open-next/worker.js",compatibility_date:"2026-06-25",compatibility_flags:["nodejs_compat","enable_weak_ref"],assets:{directory:".open-next/assets"},r2_buckets:[{binding:"NEXT_INC_CACHE_R2_BUCKET",bucket_name:`${x}-cache-r2`}],vars:{NEXT_PUBLIC_NEXUS_ID:o,NEXT_PUBLIC_NEXUS_KEY:t,NEXT_PUBLIC_NEXUS_API_URL:i}};await w.default.writeJson(A,B,{spaces:2})}if(h){let B=Q("[2/4] Building static production artifacts...").start();try{(0,Ge.execSync)(`${a} run build`,{stdio:"pipe",env:{...process.env,NODE_ENV:"production",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),B.succeed(X("Build complete"))}catch(v){B.fail(Z("Build failed")),v.stderr&&console.log(R.red(`
306
+ `;await w.default.ensureDir(T),await w.default.writeFile(I,O),console.log(E(" - Self-Healed: Regenerated missing Next.js revalidation route."))}}}let x=m.cloudflareProjectName||m.subdomain||"",A=S.default.resolve(process.cwd(),"wrangler.json");try{if(!h&&!w.default.existsSync(A)){let B={name:x,main:".open-next/worker.js",compatibility_date:"2026-06-25",compatibility_flags:["nodejs_compat"],assets:{directory:".open-next/assets"},r2_buckets:[{binding:"NEXT_INC_CACHE_R2_BUCKET",bucket_name:`${x}-cache-r2`}],vars:{NEXT_PUBLIC_NEXUS_ID:o,NEXT_PUBLIC_NEXUS_KEY:t,NEXT_PUBLIC_NEXUS_API_URL:i}};await w.default.writeJson(A,B,{spaces:2})}if(h){let B=Q("[2/4] Building static production artifacts...").start();try{(0,Ge.execSync)(`${a} run build`,{stdio:"pipe",env:{...process.env,NODE_ENV:"production",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),B.succeed(X("Build complete"))}catch(v){B.fail(Z("Build failed")),v.stderr&&console.log(R.red(`
307
307
  ${v.stderr.toString()}`)),process.exit(1)}}else{let B=Q("[2/4] Compiling and adapting Next.js for the Edge...").start();try{(0,Ge.execSync)(`${l} opennextjs-cloudflare build`,{stdio:"pipe",env:{...process.env,NODE_ENV:"production",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),B.succeed(X("Edge adaptation and compilation complete"))}catch(v){B.fail(Z("Edge adaptation failed. Did you run 'npx nexus init'?")),v.stderr&&console.log(R.red(`
308
308
  ${v.stderr.toString()}`)),process.exit(1)}}let C=Q("[3/4] Securing edge deployment token...").start(),y,T;try{let B=await fe(`${i}/devops/projects/${o}/deploy/token`,t,{method:"POST",timeout:6e4});y=B.token,T=B.accountId,C.succeed(R.gray("Token issued (15min validity)"))}catch(B){C.fail(Z("Token request failed: "+B.message)),process.exit(1)}let I=Q("[4/4] Deploying live to NexusHub Global Edge...").start();try{let B=require.resolve("wrangler/package.json"),v=await w.default.readJson(B),D=typeof v.bin=="string"?v.bin:v.bin?.wrangler||"bin/wrangler.js",W=S.default.resolve(S.default.dirname(B),D);(0,Ge.execSync)(`node ${W} deploy`,{stdio:"pipe",env:{...process.env,CLOUDFLARE_API_TOKEN:y,CLOUDFLARE_ACCOUNT_ID:T,WRANGLER_OUTPUT_FILE_PATH:"/dev/null",NO_COLOR:"1",CI:"true",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),I.succeed(X("Edge deployment complete"))}catch(B){I.fail(Z("Edge transfer failed")),B.stderr&&console.error(E(`
309
309
  --- Edge Logs ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexushub/client",
3
3
  "private": false,
4
- "version": "0.8.1",
4
+ "version": "0.8.2",
5
5
  "description": "The God-Tier NexusHub SDK",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",