@electroplix/adapter 0.1.2 → 0.1.4
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/bin/cli.mjs
CHANGED
|
@@ -81,7 +81,9 @@ async function run() {
|
|
|
81
81
|
logger.success(` next@${v}`);
|
|
82
82
|
}
|
|
83
83
|
logger.info('');
|
|
84
|
-
|
|
84
|
+
const latestStable = STABLE_NEXT_VERSIONS[STABLE_NEXT_VERSIONS.length - 1];
|
|
85
|
+
const installCmd = info.packageManager === 'npm' ? 'npm install' : info.packageManager + ' add';
|
|
86
|
+
logger.info(`Run: ${installCmd} next@${latestStable}`);
|
|
85
87
|
process.exit(1);
|
|
86
88
|
}
|
|
87
89
|
|
package/dist/index.esm.js
CHANGED
|
@@ -16,7 +16,7 @@ function _extends() {
|
|
|
16
16
|
* Stable Next.js versions verified after CVE patches.
|
|
17
17
|
* Only these patch versions are considered safe/supported.
|
|
18
18
|
*/
|
|
19
|
-
const STABLE_NEXT_VERSIONS = ['15.
|
|
19
|
+
const STABLE_NEXT_VERSIONS = ['15.2.8', '15.3.8', '15.4.10', '15.5.9'];
|
|
20
20
|
/**
|
|
21
21
|
* Detect the package manager used by the project.
|
|
22
22
|
*/
|
|
@@ -351,29 +351,72 @@ function writeConfigFiles(root, projectName, overwrite = false) {
|
|
|
351
351
|
* app to Cloudflare Workers via OpenNext.
|
|
352
352
|
*/
|
|
353
353
|
function deployWorkflowContent(pm) {
|
|
354
|
+
/* ── Per-PM setup steps ─────────────────────────────────────────── */
|
|
355
|
+
const setupSteps = (() => {
|
|
356
|
+
switch (pm) {
|
|
357
|
+
case 'bun':
|
|
358
|
+
return `
|
|
359
|
+
- name: Setup Bun
|
|
360
|
+
uses: oven-sh/setup-bun@v2
|
|
361
|
+
|
|
362
|
+
- name: Setup Node.js
|
|
363
|
+
uses: actions/setup-node@v4
|
|
364
|
+
with:
|
|
365
|
+
node-version: 22`;
|
|
366
|
+
case 'pnpm':
|
|
367
|
+
return `
|
|
368
|
+
- name: Setup pnpm
|
|
369
|
+
uses: pnpm/action-setup@v4
|
|
370
|
+
with:
|
|
371
|
+
run_install: false
|
|
372
|
+
|
|
373
|
+
- name: Setup Node.js
|
|
374
|
+
uses: actions/setup-node@v4
|
|
375
|
+
with:
|
|
376
|
+
node-version: 22
|
|
377
|
+
cache: pnpm`;
|
|
378
|
+
case 'yarn':
|
|
379
|
+
return `
|
|
380
|
+
- name: Enable Corepack (Yarn)
|
|
381
|
+
run: corepack enable
|
|
382
|
+
|
|
383
|
+
- name: Setup Node.js
|
|
384
|
+
uses: actions/setup-node@v4
|
|
385
|
+
with:
|
|
386
|
+
node-version: 22
|
|
387
|
+
cache: yarn`;
|
|
388
|
+
default:
|
|
389
|
+
// npm
|
|
390
|
+
return `
|
|
391
|
+
- name: Setup Node.js
|
|
392
|
+
uses: actions/setup-node@v4
|
|
393
|
+
with:
|
|
394
|
+
node-version: 22
|
|
395
|
+
cache: npm`;
|
|
396
|
+
}
|
|
397
|
+
})();
|
|
398
|
+
|
|
399
|
+
/* ── Install command ────────────────────────────────────────────── */
|
|
354
400
|
const installCmd = (() => {
|
|
355
401
|
switch (pm) {
|
|
356
402
|
case 'pnpm':
|
|
357
403
|
return 'pnpm install --frozen-lockfile';
|
|
358
404
|
case 'yarn':
|
|
359
|
-
return 'yarn install --
|
|
405
|
+
return 'yarn install --immutable';
|
|
360
406
|
case 'bun':
|
|
361
407
|
return 'bun install --frozen-lockfile';
|
|
362
408
|
default:
|
|
363
409
|
return 'npm ci';
|
|
364
410
|
}
|
|
365
411
|
})();
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
uses: pnpm/action-setup@v4
|
|
369
|
-
with:
|
|
370
|
-
run_install: false` : '';
|
|
412
|
+
|
|
413
|
+
/* ── Deploy command ─────────────────────────────────────────────── */
|
|
371
414
|
const deployCmd = (() => {
|
|
372
415
|
switch (pm) {
|
|
373
416
|
case 'pnpm':
|
|
374
417
|
return 'pnpm exec opennextjs-cloudflare build && pnpm exec wrangler deploy';
|
|
375
418
|
case 'yarn':
|
|
376
|
-
return 'yarn opennextjs-cloudflare build && yarn wrangler deploy';
|
|
419
|
+
return 'yarn dlx opennextjs-cloudflare build && yarn dlx wrangler deploy';
|
|
377
420
|
case 'bun':
|
|
378
421
|
return 'bunx opennextjs-cloudflare build && bunx wrangler deploy';
|
|
379
422
|
default:
|
|
@@ -390,7 +433,7 @@ name: Deploy to Cloudflare Workers
|
|
|
390
433
|
|
|
391
434
|
on:
|
|
392
435
|
push:
|
|
393
|
-
branches:
|
|
436
|
+
branches: main
|
|
394
437
|
workflow_dispatch:
|
|
395
438
|
|
|
396
439
|
concurrency:
|
|
@@ -410,12 +453,7 @@ jobs:
|
|
|
410
453
|
steps:
|
|
411
454
|
- name: Checkout
|
|
412
455
|
uses: actions/checkout@v4
|
|
413
|
-
${
|
|
414
|
-
- name: Setup Node.js
|
|
415
|
-
uses: actions/setup-node@v4
|
|
416
|
-
with:
|
|
417
|
-
node-version: 22
|
|
418
|
-
cache: '${pm === 'bun' ? 'bun' : pm}'
|
|
456
|
+
${setupSteps}
|
|
419
457
|
|
|
420
458
|
- name: Install dependencies
|
|
421
459
|
run: ${installCmd}
|
package/dist/src/lib/detect.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';
|
|
|
3
3
|
* Stable Next.js versions verified after CVE patches.
|
|
4
4
|
* Only these patch versions are considered safe/supported.
|
|
5
5
|
*/
|
|
6
|
-
export declare const STABLE_NEXT_VERSIONS: readonly ["15.
|
|
6
|
+
export declare const STABLE_NEXT_VERSIONS: readonly ["15.2.8", "15.3.8", "15.4.10", "15.5.9"];
|
|
7
7
|
export interface ProjectInfo {
|
|
8
8
|
/** Absolute path to the project root */
|
|
9
9
|
root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/detect.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/detect.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,oDAKvB,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,uCAAuC;IACvC,cAAc,EAAE,OAAO,CAAC;IACxB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,0DAA0D;IAC1D,WAAW,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAKjE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAQxE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmBvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAIhG;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAI/D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,CAUlG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-actions.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/github-actions.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"github-actions.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/github-actions.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAqHhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,UAAQ,GAAG,OAAO,CAa/F"}
|