@nexushub/client 0.8.6 → 0.8.7
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/cli.cjs +5 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -288,13 +288,17 @@ export async function GET(request: NextRequest) {
|
|
|
288
288
|
`))}catch(x){j.fail(Z(x.message)),process.exit(1)}return}let h=oc(),C=m.cloudflareProjectName||m.subdomain||"",P=E.default.resolve(process.cwd(),"wrangler.json"),A=E.default.resolve(process.cwd(),"wrangler.toml"),y=E.default.resolve(process.cwd(),"open-next.config.ts"),T=Q("[2/4] Securing edge deployment token and database bindings...").start(),I,O,$;try{let j=await de(`${i}/devops/projects/${o}/deploy/token`,t,{method:"POST",timeout:6e4});I=j.token,O=j.accountId,$=j.d1DatabaseId,T.succeed(S.gray("Token issued (15min validity)"))}catch(j){T.fail(Z("Token request failed: "+j.message)),process.exit(1)}try{if(!h){w.default.existsSync(P)&&await w.default.remove(P),w.default.existsSync(A)&&await w.default.remove(A);let N=[];$&&N.push({binding:"NEXT_TAG_CACHE_D1",database_id:$,database_name:`${C.toLowerCase().trim()}-tag-cache`});let ee={name:C,main:".open-next/worker.js",compatibility_date:"2026-06-25",compatibility_flags:["nodejs_compat"],assets:{directory:".open-next/assets",binding:"ASSETS"},r2_buckets:[{binding:"NEXT_INC_CACHE_R2_BUCKET",bucket_name:`${C}-cache-r2`}],d1_databases:N,vars:{NEXT_PUBLIC_NEXUS_ID:o,NEXT_PUBLIC_NEXUS_KEY:t,NEXT_PUBLIC_NEXUS_API_URL:i,REVALIDATE_WEBHOOK_SECRET:t}};await w.default.writeJson(P,ee,{spaces:2})}if(!h&&u.id==="nextjs"&&(w.default.existsSync(y)&&await w.default.remove(y),await w.default.writeFile(y,`import { defineCloudflareConfig } from "@opennextjs/cloudflare";
|
|
289
289
|
import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";
|
|
290
290
|
import d1NextTagCache from "@opennextjs/cloudflare/overrides/tag-cache/d1-next-tag-cache";
|
|
291
|
+
import memoryQueue from "@opennextjs/cloudflare/overrides/queue/memory-queue";
|
|
291
292
|
|
|
292
293
|
export default defineCloudflareConfig({
|
|
293
294
|
incrementalCache: r2IncrementalCache,
|
|
294
295
|
tagCache: d1NextTagCache,
|
|
296
|
+
// \u{1F680} RESOLVED: Bind the Memory Queue to prevent "Dummy Queue is not implemented" crashes
|
|
297
|
+
// on standard Free-Tier Cloudflare accounts. No DOs or migrations required!
|
|
298
|
+
queue: memoryQueue,
|
|
295
299
|
enableCacheInterception: true,
|
|
296
300
|
});
|
|
297
|
-
`),console.log(R(" - Auto-injected: open-next.config.ts (D1 Tag Cache enabled)"))),h){let N=Q("[3/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"}}),N.succeed(X("Build complete"))}catch(ee){N.fail(Z("Build failed")),ee.stderr&&console.log(S.red(`
|
|
301
|
+
`),console.log(R(" - Auto-injected: open-next.config.ts (D1 Tag Cache + Memory Queue enabled)"))),h){let N=Q("[3/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"}}),N.succeed(X("Build complete"))}catch(ee){N.fail(Z("Build failed")),ee.stderr&&console.log(S.red(`
|
|
298
302
|
${ee.stderr.toString()}`)),process.exit(1)}}else{let N=Q("[3/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"}}),N.succeed(X("Edge adaptation and compilation complete"))}catch(ee){N.fail(Z("Edge adaptation failed. Did you run 'npx nexus init'?")),ee.stderr&&console.log(S.red(`
|
|
299
303
|
${ee.stderr.toString()}`)),process.exit(1)}}let j=Q("[4/4] Deploying live to NexusHub Global Edge...").start();try{let N=require.resolve("wrangler/package.json"),ee=await w.default.readJson(N),Ve=typeof ee.bin=="string"?ee.bin:ee.bin?.wrangler||"bin/wrangler.js",ye=E.default.resolve(E.default.dirname(N),Ve);(0,Ge.execSync)(`node ${ye} deploy`,{stdio:"pipe",env:{...process.env,CLOUDFLARE_API_TOKEN:I,CLOUDFLARE_ACCOUNT_ID:O,WRANGLER_OUTPUT_FILE_PATH:"/dev/null",NO_COLOR:"1",CI:"true",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),j.succeed(X("Edge deployment complete"))}catch(N){j.fail(Z("Edge transfer failed")),N.stderr&&console.error(R(`
|
|
300
304
|
--- Edge Logs ---
|