@takazudo/zfb-adapter-cloudflare 0.1.0-next.25 → 0.1.0-next.27
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 +7 -12
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +8 -10
- package/dist/build.js.map +1 -1
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
// no TypeScript loader required) so there is a single source of truth.
|
|
16
16
|
// invariant: no runtime npm deps — see SECURITY-DEPS.md
|
|
17
17
|
|
|
18
|
-
import { copyFile, mkdir, writeFile } from "node:fs/promises";
|
|
19
18
|
import { realpathSync } from "node:fs";
|
|
20
|
-
import {
|
|
19
|
+
import { resolve } from "node:path";
|
|
21
20
|
import { fileURLToPath } from "node:url";
|
|
22
21
|
|
|
23
22
|
// ---------------------------------------------------------------------------
|
|
@@ -27,18 +26,14 @@ import { fileURLToPath } from "node:url";
|
|
|
27
26
|
import { WORKER_WRAPPER_SOURCE } from "../src/worker-wrapper.mjs";
|
|
28
27
|
export { WORKER_WRAPPER_SOURCE };
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
await mkdir(outdirAbs, { recursive: true });
|
|
35
|
-
const innerBundlePath = join(outdirAbs, "_zfb_inner.mjs");
|
|
36
|
-
await copyFile(inputAbs, innerBundlePath);
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// emitWorker — shared implementation, no runtime npm deps.
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
await writeFile(workerPath, WORKER_WRAPPER_SOURCE, "utf8");
|
|
33
|
+
import { emitWorker as _emitWorker } from "../src/emit-worker.mjs";
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
export async function emitWorker({ inputBundlePath, outdir }) {
|
|
36
|
+
return _emitWorker({ inputBundlePath, outdir, workerWrapperSource: WORKER_WRAPPER_SOURCE });
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
// ---------------------------------------------------------------------------
|
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAA2B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAMlF"}
|
package/dist/build.js
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
// @ts-expect-error worker-wrapper.mjs has no declaration file; the export
|
|
11
11
|
// shape is narrowed explicitly below.
|
|
12
12
|
import { WORKER_WRAPPER_SOURCE as _wrapper } from "./worker-wrapper.mjs";
|
|
13
|
+
// @ts-expect-error emit-worker.mjs has no declaration file; the export
|
|
14
|
+
// shape is narrowed via EmitWorkerInput/EmitWorkerOutput below.
|
|
15
|
+
import { emitWorker as _emitWorker } from "./emit-worker.mjs";
|
|
13
16
|
/**
|
|
14
17
|
* The wrapper source written to `_worker.js`. Imported from the single
|
|
15
18
|
* canonical `.mjs` file so `src/build.ts` and `bin/cli.mjs` always stay
|
|
@@ -35,15 +38,10 @@ export const WORKER_WRAPPER_SOURCE = _wrapper;
|
|
|
35
38
|
* runtime — it is just `node:fs` glue.
|
|
36
39
|
*/
|
|
37
40
|
export async function emitWorker(input) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const innerBundlePath = join(outdir, "_zfb_inner.mjs");
|
|
44
|
-
await copyFile(inputBundle, innerBundlePath);
|
|
45
|
-
const workerPath = join(outdir, "_worker.js");
|
|
46
|
-
await writeFile(workerPath, WORKER_WRAPPER_SOURCE, "utf8");
|
|
47
|
-
return { workerPath, innerBundlePath };
|
|
41
|
+
return _emitWorker({
|
|
42
|
+
inputBundlePath: input.inputBundlePath,
|
|
43
|
+
outdir: input.outdir,
|
|
44
|
+
workerWrapperSource: WORKER_WRAPPER_SOURCE,
|
|
45
|
+
});
|
|
48
46
|
}
|
|
49
47
|
//# sourceMappingURL=build.js.map
|
package/dist/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,0EAA0E;AAC1E,kEAAkE;AAClE,sEAAsE;AACtE,+DAA+D;AAC/D,EAAE;AACF,yEAAyE;AACzE,mEAAmE;AAEnE,0EAA0E;AAC1E,sCAAsC;AACtC,OAAO,EAAE,qBAAqB,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,0EAA0E;AAC1E,kEAAkE;AAClE,sEAAsE;AACtE,+DAA+D;AAC/D,EAAE;AACF,yEAAyE;AACzE,mEAAmE;AAEnE,0EAA0E;AAC1E,sCAAsC;AACtC,OAAO,EAAE,qBAAqB,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,uEAAuE;AACvE,gEAAgE;AAChE,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAW,QAAkB,CAAC;AA+BhE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,KAAsB;IACrD,OAAO,WAAW,CAAC;QACjB,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,mBAAmB,EAAE,qBAAqB;KAC3C,CAA8B,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zfb-adapter-cloudflare",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.27",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Rust-built static-site engine for Astro and Next.js users — millisecond rebuilds, single binary. Cloudflare Pages adapter.",
|