@powerlines/plugin-cloudflare 0.3.4 → 0.4.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.
- package/dist/index.cjs +26 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +25 -9
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@cloudflare_unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.cjs +370 -0
- package/dist/node_modules/.pnpm/@cloudflare_unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs +367 -0
- package/dist/node_modules/.pnpm/@cloudflare_unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs.map +1 -0
- package/dist/types/plugin.d.cts +16 -7
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +16 -7
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/worker-module.d.cts +16 -2
- package/dist/types/worker-module.d.cts.map +1 -1
- package/dist/types/worker-module.d.mts +16 -2
- package/dist/types/worker-module.d.mts.map +1 -1
- package/package.json +19 -14
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_index = require('./node_modules/.pnpm/@cloudflare_unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.cjs');
|
|
3
4
|
const require_components_cloudflare_builtin = require('./components/cloudflare-builtin.cjs');
|
|
4
5
|
const require_components_env_builtin = require('./components/env-builtin.cjs');
|
|
5
6
|
const require_components_worker_entry = require('./components/worker-entry.cjs');
|
|
@@ -9,8 +10,11 @@ let _alloy_js_core = require("@alloy-js/core");
|
|
|
9
10
|
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
10
11
|
let _powerlines_plugin_env_helpers = require("@powerlines/plugin-env/helpers");
|
|
11
12
|
let _powerlines_plugin_esbuild_helpers_resolve = require("@powerlines/plugin-esbuild/helpers/resolve");
|
|
13
|
+
let _powerlines_plugin_unenv = require("@powerlines/plugin-unenv");
|
|
14
|
+
_powerlines_plugin_unenv = require_runtime.__toESM(_powerlines_plugin_unenv);
|
|
12
15
|
let _pulumi_cloudflare = require("@pulumi/cloudflare");
|
|
13
16
|
_pulumi_cloudflare = require_runtime.__toESM(_pulumi_cloudflare);
|
|
17
|
+
let _stryke_helpers_omit = require("@stryke/helpers/omit");
|
|
14
18
|
let _stryke_path = require("@stryke/path");
|
|
15
19
|
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
16
20
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
@@ -22,10 +26,17 @@ defu = require_runtime.__toESM(defu);
|
|
|
22
26
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
23
27
|
*/
|
|
24
28
|
function plugin(options = {}) {
|
|
25
|
-
return [{
|
|
29
|
+
return [(0, _powerlines_plugin_unenv.default)(options.unenv), {
|
|
26
30
|
name: "cloudflare",
|
|
27
31
|
config() {
|
|
28
|
-
return {
|
|
32
|
+
return {
|
|
33
|
+
cloudflare: (0, defu.default)((0, _stryke_helpers_omit.omit)(options, ["unenv"]), {}),
|
|
34
|
+
resolve: { skipNodeModulesBundle: false },
|
|
35
|
+
unenv: { presets: [require_index.getCloudflarePreset({
|
|
36
|
+
compatibilityDate: this.config.compatibilityDate?.toString(),
|
|
37
|
+
compatibilityFlags: ["nodejs_als"]
|
|
38
|
+
})] }
|
|
39
|
+
};
|
|
29
40
|
},
|
|
30
41
|
configResolved() {
|
|
31
42
|
this.devDependencies["@cloudflare/workers-types"] = "^4.20240616.0";
|
|
@@ -42,9 +53,11 @@ function plugin(options = {}) {
|
|
|
42
53
|
if (!entry.input) throw new Error(`Cloudflare Worker entry "${entry.file}" is missing an input file.`);
|
|
43
54
|
const workerModule = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolveModule)(this, entry.input);
|
|
44
55
|
if (!workerModule?.default) throw new Error(`Cloudflare Worker entry "${entry.file}" does not export a default handler. The Powerlines Cloudflare plugin expects each Worker entry module to export a default object matching the \`ExportedHandler\` interface from "@cloudflare/workers-types".`);
|
|
56
|
+
const name = workerModule.metadata?.name || (0, _stryke_path.replaceExtension)(entry.input.file || entry.file) || arr.length > 1 ? `${this.config.name}-${i}` : this.config.name;
|
|
45
57
|
return {
|
|
46
58
|
metadata: {
|
|
47
|
-
name
|
|
59
|
+
name,
|
|
60
|
+
pattern: `${name}.{domain}`,
|
|
48
61
|
entry
|
|
49
62
|
},
|
|
50
63
|
fetch: (0, _stryke_type_checks_is_function.isFunction)(workerModule.default.fetch),
|
|
@@ -80,17 +93,21 @@ function plugin(options = {}) {
|
|
|
80
93
|
const workerScripts = [];
|
|
81
94
|
const workerRoutes = [];
|
|
82
95
|
for (const worker of this.workers) {
|
|
83
|
-
const workerScript = new _pulumi_cloudflare.WorkersScript(`${this.config.organization ? `${this.config.organization}.` : ""}${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) === (0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) : `${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name)}.${(0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name)}`}.worker-script`, {
|
|
96
|
+
const workerScript = new _pulumi_cloudflare.WorkersScript(`${this.config.organization ? `${this.config.organization}.` : ""}${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) === (0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) : `${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name)}.${(0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name)}`}.${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.mode)}.worker-script`, (0, defu.default)({
|
|
84
97
|
accountId: this.config.cloudflare.accountId,
|
|
85
98
|
scriptName: worker.metadata.name,
|
|
86
|
-
contentFile: (0, _stryke_path.joinPaths)(this.config.output.
|
|
87
|
-
|
|
99
|
+
contentFile: (0, _stryke_path.joinPaths)(this.config.output.publishPath, "index.js"),
|
|
100
|
+
module: true
|
|
101
|
+
}, worker.metadata, {
|
|
102
|
+
compatibilityDate: this.config.compatibilityDate?.cloudflare?.toString(),
|
|
103
|
+
compatibilityFlags: ["nodejs_als"]
|
|
104
|
+
}));
|
|
88
105
|
workerScripts.push(workerScript);
|
|
89
|
-
const workerRoute = new _pulumi_cloudflare.WorkersRoute(`${this.config.organization ? `${this.config.organization}.` : ""}${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) === (0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) : `${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name)}-${(0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name)}`}.worker-route`, {
|
|
106
|
+
const workerRoute = new _pulumi_cloudflare.WorkersRoute(`${this.config.organization ? `${this.config.organization}.` : ""}${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) === (0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) : `${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name)}-${(0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name)}`}.${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.mode)}.worker-route`, (0, defu.default)({
|
|
90
107
|
zoneId: zone.id,
|
|
91
|
-
pattern:
|
|
108
|
+
pattern: worker.metadata.pattern.replace("{domain}", this.config.cloudflare.domain),
|
|
92
109
|
script: workerScript.scriptName
|
|
93
|
-
});
|
|
110
|
+
}, worker.metadata));
|
|
94
111
|
workerRoutes.push(workerRoute);
|
|
95
112
|
}
|
|
96
113
|
return {
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;YA6CY,MAAA;IACR,UAAA,GAAa,uBAAA;EAAA;AAAA;;AAJY;;iBAWb,MAAA,kBACG,uBAAA,GAA0B,uBAAA,CAAA,CAC3C,OAAA,GAAS,uBAAA,GAkLJ,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;YA6CY,MAAA;IACR,UAAA,GAAa,uBAAA;EAAA;AAAA;;AAJY;;iBAWb,MAAA,kBACG,uBAAA,GAA0B,uBAAA,CAAA,CAC3C,OAAA,GAAS,uBAAA,GAkLJ,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getCloudflarePreset } from "./node_modules/.pnpm/@cloudflare_unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs";
|
|
1
2
|
import { CloudflareBuiltin } from "./components/cloudflare-builtin.mjs";
|
|
2
3
|
import { CloudflareEnvBuiltin } from "./components/env-builtin.mjs";
|
|
3
4
|
import { WorkerEntry } from "./components/worker-entry.mjs";
|
|
@@ -7,7 +8,9 @@ import { For } from "@alloy-js/core";
|
|
|
7
8
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
8
9
|
import { readEnvTypeReflection } from "@powerlines/plugin-env/helpers";
|
|
9
10
|
import { resolveModule } from "@powerlines/plugin-esbuild/helpers/resolve";
|
|
11
|
+
import unenv from "@powerlines/plugin-unenv";
|
|
10
12
|
import * as pulumiCloudflare from "@pulumi/cloudflare";
|
|
13
|
+
import { omit } from "@stryke/helpers/omit";
|
|
11
14
|
import { joinPaths, replaceExtension } from "@stryke/path";
|
|
12
15
|
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
13
16
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
@@ -18,10 +21,17 @@ import defu from "defu";
|
|
|
18
21
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
19
22
|
*/
|
|
20
23
|
function plugin(options = {}) {
|
|
21
|
-
return [{
|
|
24
|
+
return [unenv(options.unenv), {
|
|
22
25
|
name: "cloudflare",
|
|
23
26
|
config() {
|
|
24
|
-
return {
|
|
27
|
+
return {
|
|
28
|
+
cloudflare: defu(omit(options, ["unenv"]), {}),
|
|
29
|
+
resolve: { skipNodeModulesBundle: false },
|
|
30
|
+
unenv: { presets: [getCloudflarePreset({
|
|
31
|
+
compatibilityDate: this.config.compatibilityDate?.toString(),
|
|
32
|
+
compatibilityFlags: ["nodejs_als"]
|
|
33
|
+
})] }
|
|
34
|
+
};
|
|
25
35
|
},
|
|
26
36
|
configResolved() {
|
|
27
37
|
this.devDependencies["@cloudflare/workers-types"] = "^4.20240616.0";
|
|
@@ -38,9 +48,11 @@ function plugin(options = {}) {
|
|
|
38
48
|
if (!entry.input) throw new Error(`Cloudflare Worker entry "${entry.file}" is missing an input file.`);
|
|
39
49
|
const workerModule = await resolveModule(this, entry.input);
|
|
40
50
|
if (!workerModule?.default) throw new Error(`Cloudflare Worker entry "${entry.file}" does not export a default handler. The Powerlines Cloudflare plugin expects each Worker entry module to export a default object matching the \`ExportedHandler\` interface from "@cloudflare/workers-types".`);
|
|
51
|
+
const name = workerModule.metadata?.name || replaceExtension(entry.input.file || entry.file) || arr.length > 1 ? `${this.config.name}-${i}` : this.config.name;
|
|
41
52
|
return {
|
|
42
53
|
metadata: {
|
|
43
|
-
name
|
|
54
|
+
name,
|
|
55
|
+
pattern: `${name}.{domain}`,
|
|
44
56
|
entry
|
|
45
57
|
},
|
|
46
58
|
fetch: isFunction(workerModule.default.fetch),
|
|
@@ -76,17 +88,21 @@ function plugin(options = {}) {
|
|
|
76
88
|
const workerScripts = [];
|
|
77
89
|
const workerRoutes = [];
|
|
78
90
|
for (const worker of this.workers) {
|
|
79
|
-
const workerScript = new pulumiCloudflare.WorkersScript(`${this.config.organization ? `${this.config.organization}.` : ""}${kebabCase(this.config.name) === kebabCase(worker.metadata.name) ? kebabCase(this.config.name) : `${kebabCase(this.config.name)}.${kebabCase(worker.metadata.name)}`}.worker-script`, {
|
|
91
|
+
const workerScript = new pulumiCloudflare.WorkersScript(`${this.config.organization ? `${this.config.organization}.` : ""}${kebabCase(this.config.name) === kebabCase(worker.metadata.name) ? kebabCase(this.config.name) : `${kebabCase(this.config.name)}.${kebabCase(worker.metadata.name)}`}.${kebabCase(this.config.mode)}.worker-script`, defu({
|
|
80
92
|
accountId: this.config.cloudflare.accountId,
|
|
81
93
|
scriptName: worker.metadata.name,
|
|
82
|
-
contentFile: joinPaths(this.config.output.
|
|
83
|
-
|
|
94
|
+
contentFile: joinPaths(this.config.output.publishPath, "index.js"),
|
|
95
|
+
module: true
|
|
96
|
+
}, worker.metadata, {
|
|
97
|
+
compatibilityDate: this.config.compatibilityDate?.cloudflare?.toString(),
|
|
98
|
+
compatibilityFlags: ["nodejs_als"]
|
|
99
|
+
}));
|
|
84
100
|
workerScripts.push(workerScript);
|
|
85
|
-
const workerRoute = new pulumiCloudflare.WorkersRoute(`${this.config.organization ? `${this.config.organization}.` : ""}${kebabCase(this.config.name) === kebabCase(worker.metadata.name) ? kebabCase(this.config.name) : `${kebabCase(this.config.name)}-${kebabCase(worker.metadata.name)}`}.worker-route`, {
|
|
101
|
+
const workerRoute = new pulumiCloudflare.WorkersRoute(`${this.config.organization ? `${this.config.organization}.` : ""}${kebabCase(this.config.name) === kebabCase(worker.metadata.name) ? kebabCase(this.config.name) : `${kebabCase(this.config.name)}-${kebabCase(worker.metadata.name)}`}.${kebabCase(this.config.mode)}.worker-route`, defu({
|
|
86
102
|
zoneId: zone.id,
|
|
87
|
-
pattern:
|
|
103
|
+
pattern: worker.metadata.pattern.replace("{domain}", this.config.cloudflare.domain),
|
|
88
104
|
script: workerScript.scriptName
|
|
89
|
-
});
|
|
105
|
+
}, worker.metadata));
|
|
90
106
|
workerRoutes.push(workerRoute);
|
|
91
107
|
}
|
|
92
108
|
return {
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { For } from \"@alloy-js/core\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { readEnvTypeReflection } from \"@powerlines/plugin-env/helpers\";\nimport { resolveModule } from \"@powerlines/plugin-esbuild/helpers/resolve\";\nimport * as pulumiCloudflare from \"@pulumi/cloudflare\";\nimport { joinPaths, replaceExtension } from \"@stryke/path\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { CloudflareEnvBuiltin } from \"./components\";\nimport { CloudflareBuiltin } from \"./components/cloudflare-builtin\";\nimport { WorkerEntry } from \"./components/worker-entry\";\nimport {\n CloudflarePluginContext,\n CloudflarePluginOptions,\n CloudflareWorkerEntryModule\n} from \"./types/plugin\";\nimport { WorkerModule } from \"./types/worker-module\";\n\nexport * from \"./components\";\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n cloudflare?: CloudflarePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport function plugin<\n TContext extends CloudflarePluginContext = CloudflarePluginContext\n>(options: CloudflarePluginOptions = {}) {\n return [\n {\n name: \"cloudflare\",\n config() {\n return {\n cloudflare: defu(options, {})\n };\n },\n configResolved() {\n this.devDependencies[\"@cloudflare/workers-types\"] = \"^4.20240616.0\";\n },\n async prepare() {\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <>\n <CloudflareBuiltin />\n <CloudflareEnvBuiltin reflection={result} />\n </>\n );\n },\n build: {\n order: \"pre\",\n async handler() {\n this.workers = await Promise.all(\n this.entry.map(async (entry, i, arr) => {\n if (!entry.input) {\n throw new Error(\n `Cloudflare Worker entry \"${entry.file}\" is missing an input file.`\n );\n }\n\n const workerModule = await resolveModule<WorkerModule>(\n this,\n entry.input\n );\n if (!workerModule?.default) {\n throw new Error(\n `Cloudflare Worker entry \"${\n entry.file\n }\" does not export a default handler. The Powerlines Cloudflare plugin expects each Worker entry module to export a default object matching the \\`ExportedHandler\\` interface from \"@cloudflare/workers-types\".`\n );\n }\n\n return {\n metadata: {\n name:\n workerModule.metadata?.name ||\n replaceExtension(entry.input.file || entry.file) ||\n arr.length > 1\n ? `${this.config.name}-${i}`\n : this.config.name,\n entry\n },\n fetch: isFunction(workerModule.default.fetch),\n tail: isFunction(workerModule.default.tail),\n trace: isFunction(workerModule.default.trace),\n tailStream: isFunction(workerModule.default.tailStream),\n scheduled: isFunction(workerModule.default.scheduled),\n test: isFunction(workerModule.default.test),\n email: isFunction(workerModule.default.email),\n queue: isFunction(workerModule.default.queue)\n } satisfies CloudflareWorkerEntryModule;\n })\n );\n\n return render(\n this,\n <For each={this.workers}>\n {worker => <WorkerEntry worker={worker} />}\n </For>\n );\n }\n },\n async deployPulumi() {\n let apiToken = process.env.CLOUDFLARE_API_TOKEN;\n if (!apiToken) {\n apiToken = this.config.cloudflare.apiToken;\n if (apiToken) {\n this.warn(\n \"If possible, please use the `CLOUDFLARE_API_TOKEN` environment variable instead of using the `apiToken` option directly. The `apiToken` option will work; however, this is a less secure method of configuration.\"\n );\n } else {\n throw new Error(\n \"Unable to determine the Cloudflare API token. Please set the `CLOUDFLARE_API_TOKEN` environment variable.\"\n );\n }\n }\n\n await this.pulumi.setConfig(\"cloudflare:apiToken\", {\n value: apiToken\n });\n\n const zone = await pulumiCloudflare.getZone({\n filter: {\n account: { id: this.config.cloudflare.accountId },\n name: this.config.cloudflare.domain\n }\n });\n\n const workerScripts = [] as pulumiCloudflare.WorkersScript[];\n const workerRoutes = [] as pulumiCloudflare.WorkersRoute[];\n for (const worker of this.workers) {\n const workerScript = new pulumiCloudflare.WorkersScript(\n `${this.config.organization ? `${this.config.organization}.` : \"\"}${\n kebabCase(this.config.name) === kebabCase(worker.metadata.name)\n ? kebabCase(this.config.name)\n : `${kebabCase(this.config.name)}.${kebabCase(\n worker.metadata.name\n )}`\n }.worker-script`,\n {\n accountId: this.config.cloudflare.accountId,\n scriptName: worker.metadata.name,\n contentFile: joinPaths(this.config.output.outputPath, \"index.js\")\n }\n );\n workerScripts.push(workerScript);\n\n const workerRoute = new pulumiCloudflare.WorkersRoute(\n `${this.config.organization ? `${this.config.organization}.` : \"\"}${\n kebabCase(this.config.name) === kebabCase(worker.metadata.name)\n ? kebabCase(this.config.name)\n : `${kebabCase(this.config.name)}-${kebabCase(\n worker.metadata.name\n )}`\n }.worker-route`,\n {\n zoneId: zone.id,\n pattern: `hello-world.${this.config.cloudflare.domain}`,\n script: workerScript.scriptName\n }\n );\n workerRoutes.push(workerRoute);\n }\n\n return {\n workerScripts,\n workerRoutes\n };\n }\n }\n ] as Plugin<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,YAAY;;AAEhC,UAAM;IACJ;IACA;IACD;;EAEJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { For } from \"@alloy-js/core\";\nimport { getCloudflarePreset } from \"@cloudflare/unenv-preset\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { readEnvTypeReflection } from \"@powerlines/plugin-env/helpers\";\nimport { resolveModule } from \"@powerlines/plugin-esbuild/helpers/resolve\";\nimport unenv from \"@powerlines/plugin-unenv\";\nimport * as pulumiCloudflare from \"@pulumi/cloudflare\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths, replaceExtension } from \"@stryke/path\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { CloudflareEnvBuiltin } from \"./components\";\nimport { CloudflareBuiltin } from \"./components/cloudflare-builtin\";\nimport { WorkerEntry } from \"./components/worker-entry\";\nimport {\n CloudflarePluginContext,\n CloudflarePluginOptions,\n CloudflareWorkerEntryModule\n} from \"./types/plugin\";\nimport { WorkerModule } from \"./types/worker-module\";\n\nexport * from \"./components\";\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n cloudflare?: CloudflarePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport function plugin<\n TContext extends CloudflarePluginContext = CloudflarePluginContext\n>(options: CloudflarePluginOptions = {}) {\n return [\n unenv(options.unenv),\n {\n name: \"cloudflare\",\n config() {\n return {\n cloudflare: defu(omit(options, [\"unenv\"]), {}),\n resolve: {\n skipNodeModulesBundle: false\n },\n unenv: {\n presets: [\n // eslint-disable-next-line ts/no-unsafe-call\n getCloudflarePreset({\n compatibilityDate: this.config.compatibilityDate?.toString(),\n compatibilityFlags: [\"nodejs_als\"]\n })\n ]\n }\n };\n },\n configResolved() {\n this.devDependencies[\"@cloudflare/workers-types\"] = \"^4.20240616.0\";\n },\n async prepare() {\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <>\n <CloudflareBuiltin />\n <CloudflareEnvBuiltin reflection={result} />\n </>\n );\n },\n build: {\n order: \"pre\",\n async handler() {\n this.workers = await Promise.all(\n this.entry.map(async (entry, i, arr) => {\n if (!entry.input) {\n throw new Error(\n `Cloudflare Worker entry \"${entry.file}\" is missing an input file.`\n );\n }\n\n const workerModule = await resolveModule<WorkerModule>(\n this,\n entry.input\n );\n if (!workerModule?.default) {\n throw new Error(\n `Cloudflare Worker entry \"${\n entry.file\n }\" does not export a default handler. The Powerlines Cloudflare plugin expects each Worker entry module to export a default object matching the \\`ExportedHandler\\` interface from \"@cloudflare/workers-types\".`\n );\n }\n\n const name =\n workerModule.metadata?.name ||\n replaceExtension(entry.input.file || entry.file) ||\n arr.length > 1\n ? `${this.config.name}-${i}`\n : this.config.name;\n\n return {\n metadata: {\n name,\n pattern: `${name}.{domain}`,\n entry\n },\n fetch: isFunction(workerModule.default.fetch),\n tail: isFunction(workerModule.default.tail),\n trace: isFunction(workerModule.default.trace),\n tailStream: isFunction(workerModule.default.tailStream),\n scheduled: isFunction(workerModule.default.scheduled),\n test: isFunction(workerModule.default.test),\n email: isFunction(workerModule.default.email),\n queue: isFunction(workerModule.default.queue)\n } satisfies CloudflareWorkerEntryModule;\n })\n );\n\n return render(\n this,\n <For each={this.workers}>\n {worker => <WorkerEntry worker={worker} />}\n </For>\n );\n }\n },\n async deployPulumi() {\n let apiToken = process.env.CLOUDFLARE_API_TOKEN;\n if (!apiToken) {\n apiToken = this.config.cloudflare.apiToken;\n if (apiToken) {\n this.warn(\n \"If possible, please use the `CLOUDFLARE_API_TOKEN` environment variable instead of using the `apiToken` option directly. The `apiToken` option will work; however, this is a less secure method of configuration.\"\n );\n } else {\n throw new Error(\n \"Unable to determine the Cloudflare API token. Please set the `CLOUDFLARE_API_TOKEN` environment variable.\"\n );\n }\n }\n\n await this.pulumi.setConfig(\"cloudflare:apiToken\", {\n value: apiToken\n });\n\n const zone = await pulumiCloudflare.getZone({\n filter: {\n account: { id: this.config.cloudflare.accountId },\n name: this.config.cloudflare.domain\n }\n });\n\n const workerScripts = [] as pulumiCloudflare.WorkersScript[];\n const workerRoutes = [] as pulumiCloudflare.WorkersRoute[];\n for (const worker of this.workers) {\n const workerScript = new pulumiCloudflare.WorkersScript(\n `${this.config.organization ? `${this.config.organization}.` : \"\"}${\n kebabCase(this.config.name) === kebabCase(worker.metadata.name)\n ? kebabCase(this.config.name)\n : `${kebabCase(this.config.name)}.${kebabCase(\n worker.metadata.name\n )}`\n }.${kebabCase(this.config.mode)}.worker-script`,\n defu(\n {\n accountId: this.config.cloudflare.accountId,\n scriptName: worker.metadata.name,\n contentFile: joinPaths(\n this.config.output.publishPath,\n \"index.js\"\n ),\n module: true\n },\n worker.metadata,\n {\n compatibilityDate:\n this.config.compatibilityDate?.cloudflare?.toString() as string,\n compatibilityFlags: [\"nodejs_als\"]\n }\n ) as pulumiCloudflare.WorkersScriptArgs\n );\n workerScripts.push(workerScript);\n\n const workerRoute = new pulumiCloudflare.WorkersRoute(\n `${this.config.organization ? `${this.config.organization}.` : \"\"}${\n kebabCase(this.config.name) === kebabCase(worker.metadata.name)\n ? kebabCase(this.config.name)\n : `${kebabCase(this.config.name)}-${kebabCase(\n worker.metadata.name\n )}`\n }.${kebabCase(this.config.mode)}.worker-route`,\n defu(\n {\n zoneId: zone.id,\n pattern: worker.metadata.pattern.replace(\n \"{domain}\",\n this.config.cloudflare.domain\n ),\n script: workerScript.scriptName\n },\n worker.metadata\n )\n );\n workerRoutes.push(workerRoute);\n }\n\n return {\n workerScripts,\n workerRoutes\n };\n }\n }\n ] as Plugin<TContext>[];\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAA,OAAA,UAAA,EAAA,EAAA;;EAEE,MAAA;EACE,SAAC;AACH,UAAA;IACK,YAAS,KAAM,KAAA,SAAA,CAAA,QAAA,CAAA,EAAA,EAAA,CAAA;IACpB,SAAS,EACD,uBAAC,OACF;IACL,OAAM,EACN,SAAA,CAEE,oBAAS;KACP,mBAAO,KAAA,OAAA,mBAAA,UAAA;KACL,oBAAsB,CAAA,aAAW;KACjC,CAAA,CAAA,EACD;IACF;;EAEH,iBAAiB;AACf,QAAK,gBAAa,+BAA+B;;EAEnD,MAAM,UAAM;GACV,MAAM,SAAI,MAAA,sBAAiC,MAAA,MAAA;AAC3C,UAAO,OAAE,MAAA,CAAA,gBAAA,mBAAA,EAAA,CAAA,EAAA,gBAAA,sBAAA,EACP,YAAI,QACL,CAAC,CAAC,CAAC;;EAEN,OAAG;GACD,OAAA;GACA,MAAM,UAAC;IACN,MAAA,SAAA;AACD,SAAM,UAAU,MAAA,QAAA,IAAA,KAAA,MAAA,IAAA,OAAA,OAAA,GAAA,QAAA;AACd,SAAM,CAAA,MAAO;KAGX,MAAI,eAAA,MAAA,cAAA,MAAA,MAAA,MAAA;AACJ,SAAC,CAAA,cAAA,QACC,OAAC,IAAA,MAAA,4BAAmB,MAAA,KAAA,gNAAA;KAEtB,MAAE,OAAA,aAAA,UAAA,QAAA,iBAAA,MAAA,MAAA,QAAA,MAAA,KAAA,IAAA,IAAA,SAAA,IAAA,GAAA,KAAA,OAAA,KAAA,GAAA,MAAA,KAAA,OAAA;AACH,YAAA;MACF,UAAA;OACM;OACC,SAAM,GAAA,KAAA;OACN;OACJ;MACE,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AO;KACR,EAAE,OAAA,UAAA;KACH,mBAAA,KAAA,OAAA,mBAAA,YAAA,UAAA;KACD,oBAAA,CAAA,aAAA;KACD,CAAA,CAAqB;AACnB,kBAAc,KAAC,aAAY;IAC3B,MAAK,cAAU,IAAA,iBAAA,aAAA,GAAA,KAAA,OAAA,eAAA,GAAA,KAAA,OAAA,aAAA,KAAA,KAAA,UAAA,KAAA,OAAA,KAAA,KAAA,UAAA,OAAA,SAAA,KAAA,GAAA,UAAA,KAAA,OAAA,KAAA,GAAA,GAAA,UAAA,KAAA,OAAA,KAAA,CAAA,GAAA,UAAA,OAAA,SAAA,KAAA,GAAA,GAAA,UAAA,KAAA,OAAA,KAAA,CAAA,gBAAA,KAAA;KACb,QAAQ,KAAG;KACX,SAAI,OAAU,SAAA,QAAA,QAAA,YAAA,KAAA,OAAA,WAAA,OAAA;KACd,QAAO,aAAI;KACZ,EAAE,OAAO,SAAS,CAAC;AACpB,iBAAK,KAAA,YAAA;;AAEP,UAAM;IACJ;IACA;IACD"}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
const require_runtime = require('../../../../../../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let node_url = require("node:url");
|
|
3
|
+
node_url = require_runtime.__toESM(node_url);
|
|
4
|
+
let node_path = require("node:path");
|
|
5
|
+
node_path = require_runtime.__toESM(node_path);
|
|
6
|
+
let node_module = require("node:module");
|
|
7
|
+
node_module = require_runtime.__toESM(node_module);
|
|
8
|
+
|
|
9
|
+
//#region ../../node_modules/.pnpm/@cloudflare+unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs
|
|
10
|
+
const __filename$1 = node_url.default.fileURLToPath(require("url").pathToFileURL(__filename).href);
|
|
11
|
+
node_path.default.dirname(__filename$1);
|
|
12
|
+
node_module.default.createRequire(require("url").pathToFileURL(__filename).href);
|
|
13
|
+
const version = "2.15.0";
|
|
14
|
+
const defaultNativeModules = [
|
|
15
|
+
"_stream_duplex",
|
|
16
|
+
"_stream_passthrough",
|
|
17
|
+
"_stream_readable",
|
|
18
|
+
"_stream_transform",
|
|
19
|
+
"_stream_writable",
|
|
20
|
+
"_tls_common",
|
|
21
|
+
"_tls_wrap",
|
|
22
|
+
"assert",
|
|
23
|
+
"assert/strict",
|
|
24
|
+
"async_hooks",
|
|
25
|
+
"buffer",
|
|
26
|
+
"constants",
|
|
27
|
+
"crypto",
|
|
28
|
+
"diagnostics_channel",
|
|
29
|
+
"dns",
|
|
30
|
+
"dns/promises",
|
|
31
|
+
"events",
|
|
32
|
+
"net",
|
|
33
|
+
"path",
|
|
34
|
+
"path/posix",
|
|
35
|
+
"path/win32",
|
|
36
|
+
"querystring",
|
|
37
|
+
"module",
|
|
38
|
+
"stream",
|
|
39
|
+
"stream/consumers",
|
|
40
|
+
"stream/promises",
|
|
41
|
+
"stream/web",
|
|
42
|
+
"string_decoder",
|
|
43
|
+
"sys",
|
|
44
|
+
"timers",
|
|
45
|
+
"timers/promises",
|
|
46
|
+
"tls",
|
|
47
|
+
"url",
|
|
48
|
+
"util",
|
|
49
|
+
"util/types",
|
|
50
|
+
"zlib"
|
|
51
|
+
];
|
|
52
|
+
function getCloudflarePreset({ compatibilityDate = "2024-09-03", compatibilityFlags = [] }) {
|
|
53
|
+
const compat = {
|
|
54
|
+
compatibilityDate,
|
|
55
|
+
compatibilityFlags
|
|
56
|
+
};
|
|
57
|
+
const overrides = [
|
|
58
|
+
getHttpOverrides(compat),
|
|
59
|
+
getHttp2Overrides(compat),
|
|
60
|
+
getOsOverrides(compat),
|
|
61
|
+
getFsOverrides(compat),
|
|
62
|
+
getPunycodeOverrides(compat),
|
|
63
|
+
getClusterOverrides(compat),
|
|
64
|
+
getTraceEventsOverrides(compat),
|
|
65
|
+
getDomainOverrides(compat),
|
|
66
|
+
getWasiOverrides(compat),
|
|
67
|
+
getConsoleOverrides(compat),
|
|
68
|
+
getVmOverrides(compat),
|
|
69
|
+
getInspectorOverrides(compat),
|
|
70
|
+
getSqliteOverrides(compat),
|
|
71
|
+
getDgramOverrides(compat),
|
|
72
|
+
getStreamWrapOverrides(compat),
|
|
73
|
+
getReplOverrides(compat),
|
|
74
|
+
getProcessOverrides(compat),
|
|
75
|
+
getV8Overrides(compat),
|
|
76
|
+
getTtyOverrides(compat),
|
|
77
|
+
getChildProcessOverrides(compat),
|
|
78
|
+
getWorkerThreadsOverrides(compat),
|
|
79
|
+
getReadlineOverrides(compat),
|
|
80
|
+
getPerfHooksOverrides(compat)
|
|
81
|
+
];
|
|
82
|
+
const nativeModules = [...defaultNativeModules, ...overrides.flatMap((o) => o.nativeModules)];
|
|
83
|
+
const hybridModules = overrides.flatMap((o) => o.hybridModules);
|
|
84
|
+
const injects = Object.assign({}, ...overrides.map((o) => o.inject ?? {}));
|
|
85
|
+
const polyfills = overrides.flatMap((o) => o.polyfills ?? []);
|
|
86
|
+
return {
|
|
87
|
+
meta: {
|
|
88
|
+
name: "unenv:cloudflare",
|
|
89
|
+
version,
|
|
90
|
+
url: __filename$1
|
|
91
|
+
},
|
|
92
|
+
alias: {
|
|
93
|
+
...Object.fromEntries(nativeModules.flatMap((p) => [[p, p], [`node:${p}`, `node:${p}`]])),
|
|
94
|
+
...Object.fromEntries(hybridModules.flatMap((m) => [[m, `@cloudflare/unenv-preset/node/${m}`], [`node:${m}`, `@cloudflare/unenv-preset/node/${m}`]]))
|
|
95
|
+
},
|
|
96
|
+
inject: {
|
|
97
|
+
Buffer: false,
|
|
98
|
+
global: false,
|
|
99
|
+
clearImmediate: false,
|
|
100
|
+
setImmediate: false,
|
|
101
|
+
...injects
|
|
102
|
+
},
|
|
103
|
+
polyfill: polyfills,
|
|
104
|
+
external: nativeModules.flatMap((p) => [p, `node:${p}`])
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function getHttpOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
108
|
+
const httpDisabledByFlag = compatibilityFlags.includes("disable_nodejs_http_modules");
|
|
109
|
+
if (!((compatibilityFlags.includes("enable_nodejs_http_modules") || compatibilityDate >= "2025-08-15") && !httpDisabledByFlag)) return {
|
|
110
|
+
nativeModules: [],
|
|
111
|
+
hybridModules: []
|
|
112
|
+
};
|
|
113
|
+
const httpServerEnabledByFlag = compatibilityFlags.includes("enable_nodejs_http_server_modules");
|
|
114
|
+
const httpServerDisabledByFlag = compatibilityFlags.includes("disable_nodejs_http_server_modules");
|
|
115
|
+
return {
|
|
116
|
+
nativeModules: [
|
|
117
|
+
"_http_agent",
|
|
118
|
+
"_http_client",
|
|
119
|
+
"_http_common",
|
|
120
|
+
"_http_incoming",
|
|
121
|
+
"_http_outgoing",
|
|
122
|
+
...(httpServerEnabledByFlag || compatibilityDate >= "2025-09-01") && !httpServerDisabledByFlag ? ["_http_server"] : [],
|
|
123
|
+
"http",
|
|
124
|
+
"https"
|
|
125
|
+
],
|
|
126
|
+
hybridModules: []
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function getHttp2Overrides({ compatibilityDate, compatibilityFlags }) {
|
|
130
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_http2_module");
|
|
131
|
+
return (compatibilityFlags.includes("enable_nodejs_http2_module") || compatibilityDate >= "2025-09-01") && !disabledByFlag ? {
|
|
132
|
+
nativeModules: ["http2"],
|
|
133
|
+
hybridModules: []
|
|
134
|
+
} : {
|
|
135
|
+
nativeModules: [],
|
|
136
|
+
hybridModules: []
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function getOsOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
140
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_os_module");
|
|
141
|
+
return (compatibilityFlags.includes("enable_nodejs_os_module") || compatibilityDate >= "2025-09-15") && !disabledByFlag ? {
|
|
142
|
+
nativeModules: ["os"],
|
|
143
|
+
hybridModules: []
|
|
144
|
+
} : {
|
|
145
|
+
nativeModules: [],
|
|
146
|
+
hybridModules: []
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function getFsOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
150
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_fs_module");
|
|
151
|
+
return (compatibilityFlags.includes("enable_nodejs_fs_module") || compatibilityDate >= "2025-09-15") && !disabledByFlag ? {
|
|
152
|
+
nativeModules: ["fs/promises", "fs"],
|
|
153
|
+
hybridModules: []
|
|
154
|
+
} : {
|
|
155
|
+
nativeModules: [],
|
|
156
|
+
hybridModules: []
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function getPunycodeOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
160
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_punycode_module");
|
|
161
|
+
return (compatibilityFlags.includes("enable_nodejs_punycode_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
162
|
+
nativeModules: ["punycode"],
|
|
163
|
+
hybridModules: []
|
|
164
|
+
} : {
|
|
165
|
+
nativeModules: [],
|
|
166
|
+
hybridModules: []
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function getClusterOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
170
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_cluster_module");
|
|
171
|
+
return (compatibilityFlags.includes("enable_nodejs_cluster_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
172
|
+
nativeModules: ["cluster"],
|
|
173
|
+
hybridModules: []
|
|
174
|
+
} : {
|
|
175
|
+
nativeModules: [],
|
|
176
|
+
hybridModules: []
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function getTraceEventsOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
180
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_trace_events_module");
|
|
181
|
+
return (compatibilityFlags.includes("enable_nodejs_trace_events_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
182
|
+
nativeModules: ["trace_events"],
|
|
183
|
+
hybridModules: []
|
|
184
|
+
} : {
|
|
185
|
+
nativeModules: [],
|
|
186
|
+
hybridModules: []
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function getDomainOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
190
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_domain_module");
|
|
191
|
+
return (compatibilityFlags.includes("enable_nodejs_domain_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
192
|
+
nativeModules: ["domain"],
|
|
193
|
+
hybridModules: []
|
|
194
|
+
} : {
|
|
195
|
+
nativeModules: [],
|
|
196
|
+
hybridModules: []
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function getWasiOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
200
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_wasi_module");
|
|
201
|
+
return (compatibilityFlags.includes("enable_nodejs_wasi_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
202
|
+
nativeModules: ["wasi"],
|
|
203
|
+
hybridModules: []
|
|
204
|
+
} : {
|
|
205
|
+
nativeModules: [],
|
|
206
|
+
hybridModules: []
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function getConsoleOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
210
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_console_module");
|
|
211
|
+
return (compatibilityFlags.includes("enable_nodejs_console_module") || compatibilityDate >= "2025-09-21") && !disabledByFlag ? {
|
|
212
|
+
nativeModules: ["console"],
|
|
213
|
+
hybridModules: [],
|
|
214
|
+
inject: {}
|
|
215
|
+
} : {
|
|
216
|
+
nativeModules: [],
|
|
217
|
+
hybridModules: ["console"],
|
|
218
|
+
inject: { console: "@cloudflare/unenv-preset/node/console" }
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
function getVmOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
222
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_vm_module");
|
|
223
|
+
return (compatibilityFlags.includes("enable_nodejs_vm_module") || compatibilityDate >= "2025-10-01") && !disabledByFlag ? {
|
|
224
|
+
nativeModules: ["vm"],
|
|
225
|
+
hybridModules: []
|
|
226
|
+
} : {
|
|
227
|
+
nativeModules: [],
|
|
228
|
+
hybridModules: []
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
function getInspectorOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
232
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_inspector_module");
|
|
233
|
+
return (compatibilityFlags.includes("enable_nodejs_inspector_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
234
|
+
nativeModules: ["inspector/promises", "inspector"],
|
|
235
|
+
hybridModules: []
|
|
236
|
+
} : {
|
|
237
|
+
nativeModules: [],
|
|
238
|
+
hybridModules: []
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function getSqliteOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
242
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_sqlite_module");
|
|
243
|
+
return (compatibilityFlags.includes("enable_nodejs_sqlite_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
244
|
+
nativeModules: ["sqlite"],
|
|
245
|
+
hybridModules: []
|
|
246
|
+
} : {
|
|
247
|
+
nativeModules: [],
|
|
248
|
+
hybridModules: []
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function getDgramOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
252
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_dgram_module");
|
|
253
|
+
return (compatibilityFlags.includes("enable_nodejs_dgram_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
254
|
+
nativeModules: ["dgram"],
|
|
255
|
+
hybridModules: []
|
|
256
|
+
} : {
|
|
257
|
+
nativeModules: [],
|
|
258
|
+
hybridModules: []
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
function getStreamWrapOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
262
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_stream_wrap_module");
|
|
263
|
+
return (compatibilityFlags.includes("enable_nodejs_stream_wrap_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
264
|
+
nativeModules: ["_stream_wrap"],
|
|
265
|
+
hybridModules: []
|
|
266
|
+
} : {
|
|
267
|
+
nativeModules: [],
|
|
268
|
+
hybridModules: []
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function getReplOverrides({ compatibilityFlags }) {
|
|
272
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_repl_module");
|
|
273
|
+
return compatibilityFlags.includes("enable_nodejs_repl_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
274
|
+
nativeModules: ["repl"],
|
|
275
|
+
hybridModules: []
|
|
276
|
+
} : {
|
|
277
|
+
nativeModules: [],
|
|
278
|
+
hybridModules: []
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function getProcessOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
282
|
+
const disabledV2ByFlag = compatibilityFlags.includes("disable_nodejs_process_v2");
|
|
283
|
+
const enabledV2ByFlag = compatibilityFlags.includes("enable_nodejs_process_v2");
|
|
284
|
+
const enabledV2ByDate = compatibilityDate >= "2025-09-15";
|
|
285
|
+
return hasFetchIterableFixes({
|
|
286
|
+
compatibilityDate,
|
|
287
|
+
compatibilityFlags
|
|
288
|
+
}) && (enabledV2ByFlag || enabledV2ByDate) && !disabledV2ByFlag ? {
|
|
289
|
+
nativeModules: ["process"],
|
|
290
|
+
hybridModules: [],
|
|
291
|
+
inject: { process: false }
|
|
292
|
+
} : {
|
|
293
|
+
nativeModules: [],
|
|
294
|
+
hybridModules: ["process"],
|
|
295
|
+
inject: { process: "@cloudflare/unenv-preset/node/process" }
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function hasFetchIterableFixes({ compatibilityDate, compatibilityFlags }) {
|
|
299
|
+
const supportEnabledByFlag = compatibilityFlags.includes("fetch_iterable_type_support");
|
|
300
|
+
const supportDisabledByFlag = compatibilityFlags.includes("no_fetch_iterable_type_support");
|
|
301
|
+
if (!((compatibilityDate >= "2026-02-19" || supportEnabledByFlag) && !supportDisabledByFlag)) return false;
|
|
302
|
+
const adjustmentEnabledByFlag = compatibilityFlags.includes("fetch_iterable_type_support_override_adjustment");
|
|
303
|
+
const adjustmentDisabledByFlag = compatibilityFlags.includes("no_fetch_iterable_type_support_override_adjustment");
|
|
304
|
+
return (adjustmentEnabledByFlag || compatibilityDate >= "2026-01-15") && !adjustmentDisabledByFlag;
|
|
305
|
+
}
|
|
306
|
+
function getV8Overrides({ compatibilityFlags }) {
|
|
307
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_v8_module");
|
|
308
|
+
return compatibilityFlags.includes("enable_nodejs_v8_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
309
|
+
nativeModules: ["v8"],
|
|
310
|
+
hybridModules: []
|
|
311
|
+
} : {
|
|
312
|
+
nativeModules: [],
|
|
313
|
+
hybridModules: []
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function getTtyOverrides({ compatibilityFlags }) {
|
|
317
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_tty_module");
|
|
318
|
+
return compatibilityFlags.includes("enable_nodejs_tty_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
319
|
+
nativeModules: ["tty"],
|
|
320
|
+
hybridModules: []
|
|
321
|
+
} : {
|
|
322
|
+
nativeModules: [],
|
|
323
|
+
hybridModules: []
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function getChildProcessOverrides({ compatibilityFlags }) {
|
|
327
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_child_process_module");
|
|
328
|
+
return compatibilityFlags.includes("enable_nodejs_child_process_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
329
|
+
nativeModules: ["child_process"],
|
|
330
|
+
hybridModules: []
|
|
331
|
+
} : {
|
|
332
|
+
nativeModules: [],
|
|
333
|
+
hybridModules: []
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function getWorkerThreadsOverrides({ compatibilityFlags }) {
|
|
337
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_worker_threads_module");
|
|
338
|
+
return compatibilityFlags.includes("enable_nodejs_worker_threads_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
339
|
+
nativeModules: ["worker_threads"],
|
|
340
|
+
hybridModules: []
|
|
341
|
+
} : {
|
|
342
|
+
nativeModules: [],
|
|
343
|
+
hybridModules: []
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function getReadlineOverrides({ compatibilityFlags }) {
|
|
347
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_readline_module");
|
|
348
|
+
return compatibilityFlags.includes("enable_nodejs_readline_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
349
|
+
nativeModules: ["readline", "readline/promises"],
|
|
350
|
+
hybridModules: []
|
|
351
|
+
} : {
|
|
352
|
+
nativeModules: [],
|
|
353
|
+
hybridModules: []
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
function getPerfHooksOverrides({ compatibilityFlags }) {
|
|
357
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_perf_hooks_module");
|
|
358
|
+
return compatibilityFlags.includes("enable_nodejs_perf_hooks_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
359
|
+
nativeModules: ["perf_hooks"],
|
|
360
|
+
hybridModules: []
|
|
361
|
+
} : {
|
|
362
|
+
nativeModules: [],
|
|
363
|
+
hybridModules: [],
|
|
364
|
+
polyfills: ["@cloudflare/unenv-preset/polyfill/performance"]
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
const cloudflare = getCloudflarePreset({});
|
|
368
|
+
|
|
369
|
+
//#endregion
|
|
370
|
+
exports.getCloudflarePreset = getCloudflarePreset;
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import __cjs_mod__ from "node:module";
|
|
2
|
+
import __cjs_url__ from "node:url";
|
|
3
|
+
import __cjs_path__ from "node:path";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/@cloudflare+unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs
|
|
6
|
+
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
7
|
+
__cjs_path__.dirname(__filename);
|
|
8
|
+
__cjs_mod__.createRequire(import.meta.url);
|
|
9
|
+
const version = "2.15.0";
|
|
10
|
+
const defaultNativeModules = [
|
|
11
|
+
"_stream_duplex",
|
|
12
|
+
"_stream_passthrough",
|
|
13
|
+
"_stream_readable",
|
|
14
|
+
"_stream_transform",
|
|
15
|
+
"_stream_writable",
|
|
16
|
+
"_tls_common",
|
|
17
|
+
"_tls_wrap",
|
|
18
|
+
"assert",
|
|
19
|
+
"assert/strict",
|
|
20
|
+
"async_hooks",
|
|
21
|
+
"buffer",
|
|
22
|
+
"constants",
|
|
23
|
+
"crypto",
|
|
24
|
+
"diagnostics_channel",
|
|
25
|
+
"dns",
|
|
26
|
+
"dns/promises",
|
|
27
|
+
"events",
|
|
28
|
+
"net",
|
|
29
|
+
"path",
|
|
30
|
+
"path/posix",
|
|
31
|
+
"path/win32",
|
|
32
|
+
"querystring",
|
|
33
|
+
"module",
|
|
34
|
+
"stream",
|
|
35
|
+
"stream/consumers",
|
|
36
|
+
"stream/promises",
|
|
37
|
+
"stream/web",
|
|
38
|
+
"string_decoder",
|
|
39
|
+
"sys",
|
|
40
|
+
"timers",
|
|
41
|
+
"timers/promises",
|
|
42
|
+
"tls",
|
|
43
|
+
"url",
|
|
44
|
+
"util",
|
|
45
|
+
"util/types",
|
|
46
|
+
"zlib"
|
|
47
|
+
];
|
|
48
|
+
function getCloudflarePreset({ compatibilityDate = "2024-09-03", compatibilityFlags = [] }) {
|
|
49
|
+
const compat = {
|
|
50
|
+
compatibilityDate,
|
|
51
|
+
compatibilityFlags
|
|
52
|
+
};
|
|
53
|
+
const overrides = [
|
|
54
|
+
getHttpOverrides(compat),
|
|
55
|
+
getHttp2Overrides(compat),
|
|
56
|
+
getOsOverrides(compat),
|
|
57
|
+
getFsOverrides(compat),
|
|
58
|
+
getPunycodeOverrides(compat),
|
|
59
|
+
getClusterOverrides(compat),
|
|
60
|
+
getTraceEventsOverrides(compat),
|
|
61
|
+
getDomainOverrides(compat),
|
|
62
|
+
getWasiOverrides(compat),
|
|
63
|
+
getConsoleOverrides(compat),
|
|
64
|
+
getVmOverrides(compat),
|
|
65
|
+
getInspectorOverrides(compat),
|
|
66
|
+
getSqliteOverrides(compat),
|
|
67
|
+
getDgramOverrides(compat),
|
|
68
|
+
getStreamWrapOverrides(compat),
|
|
69
|
+
getReplOverrides(compat),
|
|
70
|
+
getProcessOverrides(compat),
|
|
71
|
+
getV8Overrides(compat),
|
|
72
|
+
getTtyOverrides(compat),
|
|
73
|
+
getChildProcessOverrides(compat),
|
|
74
|
+
getWorkerThreadsOverrides(compat),
|
|
75
|
+
getReadlineOverrides(compat),
|
|
76
|
+
getPerfHooksOverrides(compat)
|
|
77
|
+
];
|
|
78
|
+
const nativeModules = [...defaultNativeModules, ...overrides.flatMap((o) => o.nativeModules)];
|
|
79
|
+
const hybridModules = overrides.flatMap((o) => o.hybridModules);
|
|
80
|
+
const injects = Object.assign({}, ...overrides.map((o) => o.inject ?? {}));
|
|
81
|
+
const polyfills = overrides.flatMap((o) => o.polyfills ?? []);
|
|
82
|
+
return {
|
|
83
|
+
meta: {
|
|
84
|
+
name: "unenv:cloudflare",
|
|
85
|
+
version,
|
|
86
|
+
url: __filename
|
|
87
|
+
},
|
|
88
|
+
alias: {
|
|
89
|
+
...Object.fromEntries(nativeModules.flatMap((p) => [[p, p], [`node:${p}`, `node:${p}`]])),
|
|
90
|
+
...Object.fromEntries(hybridModules.flatMap((m) => [[m, `@cloudflare/unenv-preset/node/${m}`], [`node:${m}`, `@cloudflare/unenv-preset/node/${m}`]]))
|
|
91
|
+
},
|
|
92
|
+
inject: {
|
|
93
|
+
Buffer: false,
|
|
94
|
+
global: false,
|
|
95
|
+
clearImmediate: false,
|
|
96
|
+
setImmediate: false,
|
|
97
|
+
...injects
|
|
98
|
+
},
|
|
99
|
+
polyfill: polyfills,
|
|
100
|
+
external: nativeModules.flatMap((p) => [p, `node:${p}`])
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function getHttpOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
104
|
+
const httpDisabledByFlag = compatibilityFlags.includes("disable_nodejs_http_modules");
|
|
105
|
+
if (!((compatibilityFlags.includes("enable_nodejs_http_modules") || compatibilityDate >= "2025-08-15") && !httpDisabledByFlag)) return {
|
|
106
|
+
nativeModules: [],
|
|
107
|
+
hybridModules: []
|
|
108
|
+
};
|
|
109
|
+
const httpServerEnabledByFlag = compatibilityFlags.includes("enable_nodejs_http_server_modules");
|
|
110
|
+
const httpServerDisabledByFlag = compatibilityFlags.includes("disable_nodejs_http_server_modules");
|
|
111
|
+
return {
|
|
112
|
+
nativeModules: [
|
|
113
|
+
"_http_agent",
|
|
114
|
+
"_http_client",
|
|
115
|
+
"_http_common",
|
|
116
|
+
"_http_incoming",
|
|
117
|
+
"_http_outgoing",
|
|
118
|
+
...(httpServerEnabledByFlag || compatibilityDate >= "2025-09-01") && !httpServerDisabledByFlag ? ["_http_server"] : [],
|
|
119
|
+
"http",
|
|
120
|
+
"https"
|
|
121
|
+
],
|
|
122
|
+
hybridModules: []
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function getHttp2Overrides({ compatibilityDate, compatibilityFlags }) {
|
|
126
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_http2_module");
|
|
127
|
+
return (compatibilityFlags.includes("enable_nodejs_http2_module") || compatibilityDate >= "2025-09-01") && !disabledByFlag ? {
|
|
128
|
+
nativeModules: ["http2"],
|
|
129
|
+
hybridModules: []
|
|
130
|
+
} : {
|
|
131
|
+
nativeModules: [],
|
|
132
|
+
hybridModules: []
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function getOsOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
136
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_os_module");
|
|
137
|
+
return (compatibilityFlags.includes("enable_nodejs_os_module") || compatibilityDate >= "2025-09-15") && !disabledByFlag ? {
|
|
138
|
+
nativeModules: ["os"],
|
|
139
|
+
hybridModules: []
|
|
140
|
+
} : {
|
|
141
|
+
nativeModules: [],
|
|
142
|
+
hybridModules: []
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function getFsOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
146
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_fs_module");
|
|
147
|
+
return (compatibilityFlags.includes("enable_nodejs_fs_module") || compatibilityDate >= "2025-09-15") && !disabledByFlag ? {
|
|
148
|
+
nativeModules: ["fs/promises", "fs"],
|
|
149
|
+
hybridModules: []
|
|
150
|
+
} : {
|
|
151
|
+
nativeModules: [],
|
|
152
|
+
hybridModules: []
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function getPunycodeOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
156
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_punycode_module");
|
|
157
|
+
return (compatibilityFlags.includes("enable_nodejs_punycode_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
158
|
+
nativeModules: ["punycode"],
|
|
159
|
+
hybridModules: []
|
|
160
|
+
} : {
|
|
161
|
+
nativeModules: [],
|
|
162
|
+
hybridModules: []
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function getClusterOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
166
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_cluster_module");
|
|
167
|
+
return (compatibilityFlags.includes("enable_nodejs_cluster_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
168
|
+
nativeModules: ["cluster"],
|
|
169
|
+
hybridModules: []
|
|
170
|
+
} : {
|
|
171
|
+
nativeModules: [],
|
|
172
|
+
hybridModules: []
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function getTraceEventsOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
176
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_trace_events_module");
|
|
177
|
+
return (compatibilityFlags.includes("enable_nodejs_trace_events_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
178
|
+
nativeModules: ["trace_events"],
|
|
179
|
+
hybridModules: []
|
|
180
|
+
} : {
|
|
181
|
+
nativeModules: [],
|
|
182
|
+
hybridModules: []
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function getDomainOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
186
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_domain_module");
|
|
187
|
+
return (compatibilityFlags.includes("enable_nodejs_domain_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
188
|
+
nativeModules: ["domain"],
|
|
189
|
+
hybridModules: []
|
|
190
|
+
} : {
|
|
191
|
+
nativeModules: [],
|
|
192
|
+
hybridModules: []
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function getWasiOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
196
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_wasi_module");
|
|
197
|
+
return (compatibilityFlags.includes("enable_nodejs_wasi_module") || compatibilityDate >= "2025-12-04") && !disabledByFlag ? {
|
|
198
|
+
nativeModules: ["wasi"],
|
|
199
|
+
hybridModules: []
|
|
200
|
+
} : {
|
|
201
|
+
nativeModules: [],
|
|
202
|
+
hybridModules: []
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function getConsoleOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
206
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_console_module");
|
|
207
|
+
return (compatibilityFlags.includes("enable_nodejs_console_module") || compatibilityDate >= "2025-09-21") && !disabledByFlag ? {
|
|
208
|
+
nativeModules: ["console"],
|
|
209
|
+
hybridModules: [],
|
|
210
|
+
inject: {}
|
|
211
|
+
} : {
|
|
212
|
+
nativeModules: [],
|
|
213
|
+
hybridModules: ["console"],
|
|
214
|
+
inject: { console: "@cloudflare/unenv-preset/node/console" }
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function getVmOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
218
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_vm_module");
|
|
219
|
+
return (compatibilityFlags.includes("enable_nodejs_vm_module") || compatibilityDate >= "2025-10-01") && !disabledByFlag ? {
|
|
220
|
+
nativeModules: ["vm"],
|
|
221
|
+
hybridModules: []
|
|
222
|
+
} : {
|
|
223
|
+
nativeModules: [],
|
|
224
|
+
hybridModules: []
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function getInspectorOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
228
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_inspector_module");
|
|
229
|
+
return (compatibilityFlags.includes("enable_nodejs_inspector_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
230
|
+
nativeModules: ["inspector/promises", "inspector"],
|
|
231
|
+
hybridModules: []
|
|
232
|
+
} : {
|
|
233
|
+
nativeModules: [],
|
|
234
|
+
hybridModules: []
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function getSqliteOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
238
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_sqlite_module");
|
|
239
|
+
return (compatibilityFlags.includes("enable_nodejs_sqlite_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
240
|
+
nativeModules: ["sqlite"],
|
|
241
|
+
hybridModules: []
|
|
242
|
+
} : {
|
|
243
|
+
nativeModules: [],
|
|
244
|
+
hybridModules: []
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function getDgramOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
248
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_dgram_module");
|
|
249
|
+
return (compatibilityFlags.includes("enable_nodejs_dgram_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
250
|
+
nativeModules: ["dgram"],
|
|
251
|
+
hybridModules: []
|
|
252
|
+
} : {
|
|
253
|
+
nativeModules: [],
|
|
254
|
+
hybridModules: []
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function getStreamWrapOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
258
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_stream_wrap_module");
|
|
259
|
+
return (compatibilityFlags.includes("enable_nodejs_stream_wrap_module") || compatibilityDate >= "2026-01-29") && !disabledByFlag ? {
|
|
260
|
+
nativeModules: ["_stream_wrap"],
|
|
261
|
+
hybridModules: []
|
|
262
|
+
} : {
|
|
263
|
+
nativeModules: [],
|
|
264
|
+
hybridModules: []
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
function getReplOverrides({ compatibilityFlags }) {
|
|
268
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_repl_module");
|
|
269
|
+
return compatibilityFlags.includes("enable_nodejs_repl_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
270
|
+
nativeModules: ["repl"],
|
|
271
|
+
hybridModules: []
|
|
272
|
+
} : {
|
|
273
|
+
nativeModules: [],
|
|
274
|
+
hybridModules: []
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function getProcessOverrides({ compatibilityDate, compatibilityFlags }) {
|
|
278
|
+
const disabledV2ByFlag = compatibilityFlags.includes("disable_nodejs_process_v2");
|
|
279
|
+
const enabledV2ByFlag = compatibilityFlags.includes("enable_nodejs_process_v2");
|
|
280
|
+
const enabledV2ByDate = compatibilityDate >= "2025-09-15";
|
|
281
|
+
return hasFetchIterableFixes({
|
|
282
|
+
compatibilityDate,
|
|
283
|
+
compatibilityFlags
|
|
284
|
+
}) && (enabledV2ByFlag || enabledV2ByDate) && !disabledV2ByFlag ? {
|
|
285
|
+
nativeModules: ["process"],
|
|
286
|
+
hybridModules: [],
|
|
287
|
+
inject: { process: false }
|
|
288
|
+
} : {
|
|
289
|
+
nativeModules: [],
|
|
290
|
+
hybridModules: ["process"],
|
|
291
|
+
inject: { process: "@cloudflare/unenv-preset/node/process" }
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
function hasFetchIterableFixes({ compatibilityDate, compatibilityFlags }) {
|
|
295
|
+
const supportEnabledByFlag = compatibilityFlags.includes("fetch_iterable_type_support");
|
|
296
|
+
const supportDisabledByFlag = compatibilityFlags.includes("no_fetch_iterable_type_support");
|
|
297
|
+
if (!((compatibilityDate >= "2026-02-19" || supportEnabledByFlag) && !supportDisabledByFlag)) return false;
|
|
298
|
+
const adjustmentEnabledByFlag = compatibilityFlags.includes("fetch_iterable_type_support_override_adjustment");
|
|
299
|
+
const adjustmentDisabledByFlag = compatibilityFlags.includes("no_fetch_iterable_type_support_override_adjustment");
|
|
300
|
+
return (adjustmentEnabledByFlag || compatibilityDate >= "2026-01-15") && !adjustmentDisabledByFlag;
|
|
301
|
+
}
|
|
302
|
+
function getV8Overrides({ compatibilityFlags }) {
|
|
303
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_v8_module");
|
|
304
|
+
return compatibilityFlags.includes("enable_nodejs_v8_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
305
|
+
nativeModules: ["v8"],
|
|
306
|
+
hybridModules: []
|
|
307
|
+
} : {
|
|
308
|
+
nativeModules: [],
|
|
309
|
+
hybridModules: []
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
function getTtyOverrides({ compatibilityFlags }) {
|
|
313
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_tty_module");
|
|
314
|
+
return compatibilityFlags.includes("enable_nodejs_tty_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
315
|
+
nativeModules: ["tty"],
|
|
316
|
+
hybridModules: []
|
|
317
|
+
} : {
|
|
318
|
+
nativeModules: [],
|
|
319
|
+
hybridModules: []
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function getChildProcessOverrides({ compatibilityFlags }) {
|
|
323
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_child_process_module");
|
|
324
|
+
return compatibilityFlags.includes("enable_nodejs_child_process_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
325
|
+
nativeModules: ["child_process"],
|
|
326
|
+
hybridModules: []
|
|
327
|
+
} : {
|
|
328
|
+
nativeModules: [],
|
|
329
|
+
hybridModules: []
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function getWorkerThreadsOverrides({ compatibilityFlags }) {
|
|
333
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_worker_threads_module");
|
|
334
|
+
return compatibilityFlags.includes("enable_nodejs_worker_threads_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
335
|
+
nativeModules: ["worker_threads"],
|
|
336
|
+
hybridModules: []
|
|
337
|
+
} : {
|
|
338
|
+
nativeModules: [],
|
|
339
|
+
hybridModules: []
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function getReadlineOverrides({ compatibilityFlags }) {
|
|
343
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_readline_module");
|
|
344
|
+
return compatibilityFlags.includes("enable_nodejs_readline_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
345
|
+
nativeModules: ["readline", "readline/promises"],
|
|
346
|
+
hybridModules: []
|
|
347
|
+
} : {
|
|
348
|
+
nativeModules: [],
|
|
349
|
+
hybridModules: []
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function getPerfHooksOverrides({ compatibilityFlags }) {
|
|
353
|
+
const disabledByFlag = compatibilityFlags.includes("disable_nodejs_perf_hooks_module");
|
|
354
|
+
return compatibilityFlags.includes("enable_nodejs_perf_hooks_module") && compatibilityFlags.includes("experimental") && !disabledByFlag ? {
|
|
355
|
+
nativeModules: ["perf_hooks"],
|
|
356
|
+
hybridModules: []
|
|
357
|
+
} : {
|
|
358
|
+
nativeModules: [],
|
|
359
|
+
hybridModules: [],
|
|
360
|
+
polyfills: ["@cloudflare/unenv-preset/polyfill/performance"]
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
const cloudflare = getCloudflarePreset({});
|
|
364
|
+
|
|
365
|
+
//#endregion
|
|
366
|
+
export { getCloudflarePreset };
|
|
367
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@cloudflare+unenv-preset@2.15.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs"],"sourcesContent":["\n\n// -- Unbuild CommonJS Shims --\nimport __cjs_url__ from 'url';\nimport __cjs_path__ from 'path';\nimport __cjs_mod__ from 'module';\nconst __filename = __cjs_url__.fileURLToPath(import.meta.url);\nconst __dirname = __cjs_path__.dirname(__filename);\nconst require = __cjs_mod__.createRequire(import.meta.url);\nconst version = \"2.15.0\";\n\nconst defaultNativeModules = [\n \"_stream_duplex\",\n \"_stream_passthrough\",\n \"_stream_readable\",\n \"_stream_transform\",\n \"_stream_writable\",\n \"_tls_common\",\n \"_tls_wrap\",\n \"assert\",\n \"assert/strict\",\n \"async_hooks\",\n \"buffer\",\n \"constants\",\n \"crypto\",\n \"diagnostics_channel\",\n \"dns\",\n \"dns/promises\",\n \"events\",\n \"net\",\n \"path\",\n \"path/posix\",\n \"path/win32\",\n \"querystring\",\n \"module\",\n \"stream\",\n \"stream/consumers\",\n \"stream/promises\",\n \"stream/web\",\n \"string_decoder\",\n \"sys\",\n \"timers\",\n \"timers/promises\",\n \"tls\",\n \"url\",\n \"util\",\n \"util/types\",\n \"zlib\"\n];\nfunction getCloudflarePreset({\n compatibilityDate = \"2024-09-03\",\n compatibilityFlags = []\n}) {\n const compat = {\n compatibilityDate,\n compatibilityFlags\n };\n const overrides = [\n getHttpOverrides(compat),\n getHttp2Overrides(compat),\n getOsOverrides(compat),\n getFsOverrides(compat),\n getPunycodeOverrides(compat),\n getClusterOverrides(compat),\n getTraceEventsOverrides(compat),\n getDomainOverrides(compat),\n getWasiOverrides(compat),\n getConsoleOverrides(compat),\n getVmOverrides(compat),\n getInspectorOverrides(compat),\n getSqliteOverrides(compat),\n getDgramOverrides(compat),\n getStreamWrapOverrides(compat),\n getReplOverrides(compat),\n getProcessOverrides(compat),\n getV8Overrides(compat),\n getTtyOverrides(compat),\n getChildProcessOverrides(compat),\n getWorkerThreadsOverrides(compat),\n getReadlineOverrides(compat),\n getPerfHooksOverrides(compat)\n ];\n const nativeModules = [\n ...defaultNativeModules,\n ...overrides.flatMap((o) => o.nativeModules)\n ];\n const hybridModules = overrides.flatMap((o) => o.hybridModules);\n const injects = Object.assign({}, ...overrides.map((o) => o.inject ?? {}));\n const polyfills = overrides.flatMap((o) => o.polyfills ?? []);\n return {\n meta: {\n name: \"unenv:cloudflare\",\n version,\n url: __filename\n },\n alias: {\n // Alias each native module (and its `node:...` equivalent) to itself to ensure we override any polyfills from the base unenv presets.\n ...Object.fromEntries(\n nativeModules.flatMap((p) => [\n [p, p],\n [`node:${p}`, `node:${p}`]\n ])\n ),\n // Alias each hybrid module (and its `node:...` equivalent) to its unenv polyfill implementation.\n ...Object.fromEntries(\n hybridModules.flatMap((m) => [\n [m, `@cloudflare/unenv-preset/node/${m}`],\n [`node:${m}`, `@cloudflare/unenv-preset/node/${m}`]\n ])\n )\n },\n inject: {\n // Do not inject globals implemented natively by workerd. Setting the value to `false` ensures that any base preset inject is not used.\n Buffer: false,\n global: false,\n clearImmediate: false,\n setImmediate: false,\n // Inject globals provided by unenv for the current compat date and flags.\n ...injects\n },\n polyfill: polyfills,\n external: nativeModules.flatMap((p) => [p, `node:${p}`])\n };\n}\nfunction getHttpOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const httpDisabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_http_modules\"\n );\n const httpEnabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_http_modules\"\n );\n const httpEnabledByDate = compatibilityDate >= \"2025-08-15\";\n const httpEnabled = (httpEnabledByFlag || httpEnabledByDate) && !httpDisabledByFlag;\n if (!httpEnabled) {\n return { nativeModules: [], hybridModules: [] };\n }\n const httpServerEnabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_http_server_modules\"\n );\n const httpServerDisabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_http_server_modules\"\n );\n const httpServerEnabledByDate = compatibilityDate >= \"2025-09-01\";\n const httpServerEnabled = (httpServerEnabledByFlag || httpServerEnabledByDate) && !httpServerDisabledByFlag;\n return {\n nativeModules: [\n \"_http_agent\",\n \"_http_client\",\n \"_http_common\",\n \"_http_incoming\",\n \"_http_outgoing\",\n // `_http_server` can only be imported when the server flag is set\n // See https://github.com/cloudflare/workerd/blob/56efc04/src/workerd/api/node/node.h#L102-L106\n ...httpServerEnabled ? [\"_http_server\"] : [],\n \"http\",\n \"https\"\n ],\n hybridModules: []\n };\n}\nfunction getHttp2Overrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_http2_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_http2_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-09-01\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"http2\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getOsOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_os_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_os_module\");\n const enabledByDate = compatibilityDate >= \"2025-09-15\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"os\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getFsOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_fs_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_fs_module\");\n const enabledByDate = compatibilityDate >= \"2025-09-15\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"fs/promises\", \"fs\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getPunycodeOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_punycode_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_punycode_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-12-04\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"punycode\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getClusterOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_cluster_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_cluster_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-12-04\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"cluster\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getTraceEventsOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_trace_events_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_trace_events_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-12-04\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"trace_events\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getDomainOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_domain_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_domain_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-12-04\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"domain\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getWasiOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_wasi_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_wasi_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-12-04\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"wasi\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getConsoleOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_console_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_console_module\"\n );\n const enabledByDate = compatibilityDate >= \"2025-09-21\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"console\"],\n hybridModules: [],\n inject: {}\n } : {\n nativeModules: [],\n hybridModules: [\"console\"],\n inject: { console: \"@cloudflare/unenv-preset/node/console\" }\n };\n}\nfunction getVmOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_vm_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_vm_module\");\n const enabledByDate = compatibilityDate >= \"2025-10-01\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"vm\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getInspectorOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_inspector_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_inspector_module\"\n );\n const enabledByDate = compatibilityDate >= \"2026-01-29\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"inspector/promises\", \"inspector\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getSqliteOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_sqlite_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_sqlite_module\"\n );\n const enabledByDate = compatibilityDate >= \"2026-01-29\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"sqlite\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getDgramOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_dgram_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_dgram_module\"\n );\n const enabledByDate = compatibilityDate >= \"2026-01-29\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"dgram\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getStreamWrapOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_stream_wrap_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\n \"enable_nodejs_stream_wrap_module\"\n );\n const enabledByDate = compatibilityDate >= \"2026-01-29\";\n const enabled = (enabledByFlag || enabledByDate) && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"_stream_wrap\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getReplOverrides({ compatibilityFlags }) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_repl_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_repl_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"repl\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getProcessOverrides({\n compatibilityDate,\n compatibilityFlags\n}) {\n const disabledV2ByFlag = compatibilityFlags.includes(\n \"disable_nodejs_process_v2\"\n );\n const enabledV2ByFlag = compatibilityFlags.includes(\n \"enable_nodejs_process_v2\"\n );\n const enabledV2ByDate = compatibilityDate >= \"2025-09-15\";\n const hasFixes = hasFetchIterableFixes({\n compatibilityDate,\n compatibilityFlags\n });\n const useV2 = hasFixes && (enabledV2ByFlag || enabledV2ByDate) && !disabledV2ByFlag;\n return useV2 ? {\n nativeModules: [\"process\"],\n hybridModules: [],\n // We can use the native global, return `false` to drop the unenv default\n inject: { process: false }\n } : {\n nativeModules: [],\n hybridModules: [\"process\"],\n // Use the module default export as the global `process`\n inject: { process: \"@cloudflare/unenv-preset/node/process\" }\n };\n}\nfunction hasFetchIterableFixes({\n compatibilityDate,\n compatibilityFlags\n}) {\n const supportEnabledByFlag = compatibilityFlags.includes(\n \"fetch_iterable_type_support\"\n );\n const supportDisabledByFlag = compatibilityFlags.includes(\n \"no_fetch_iterable_type_support\"\n );\n const supportEnabledByDate = compatibilityDate >= \"2026-02-19\";\n const supportEnabled = (supportEnabledByDate || supportEnabledByFlag) && !supportDisabledByFlag;\n if (!supportEnabled) {\n return false;\n }\n const adjustmentEnabledByFlag = compatibilityFlags.includes(\n \"fetch_iterable_type_support_override_adjustment\"\n );\n const adjustmentDisabledByFlag = compatibilityFlags.includes(\n \"no_fetch_iterable_type_support_override_adjustment\"\n );\n const adjustmentImpliedBySupport = compatibilityDate >= \"2026-01-15\";\n const adjustmentEnabled = (adjustmentEnabledByFlag || adjustmentImpliedBySupport) && !adjustmentDisabledByFlag;\n return adjustmentEnabled;\n}\nfunction getV8Overrides({ compatibilityFlags }) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_v8_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_v8_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"v8\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getTtyOverrides({ compatibilityFlags }) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_tty_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_tty_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"tty\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getChildProcessOverrides({\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_child_process_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_child_process_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"child_process\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getWorkerThreadsOverrides({\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_worker_threads_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_worker_threads_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"worker_threads\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getReadlineOverrides({ compatibilityFlags }) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_readline_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_readline_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"readline\", \"readline/promises\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: []\n };\n}\nfunction getPerfHooksOverrides({\n compatibilityFlags\n}) {\n const disabledByFlag = compatibilityFlags.includes(\n \"disable_nodejs_perf_hooks_module\"\n );\n const enabledByFlag = compatibilityFlags.includes(\"enable_nodejs_perf_hooks_module\") && compatibilityFlags.includes(\"experimental\");\n const enabled = enabledByFlag && !disabledByFlag;\n return enabled ? {\n nativeModules: [\"perf_hooks\"],\n hybridModules: []\n } : {\n nativeModules: [],\n hybridModules: [],\n polyfills: [\"@cloudflare/unenv-preset/polyfill/performance\"]\n };\n}\n\nconst nonPrefixedNodeModules = [\n \"_http_agent\",\n \"_http_client\",\n \"_http_common\",\n \"_http_incoming\",\n \"_http_outgoing\",\n \"_http_server\",\n \"_stream_duplex\",\n \"_stream_passthrough\",\n \"_stream_readable\",\n \"_stream_transform\",\n \"_stream_wrap\",\n \"_stream_writable\",\n \"_tls_common\",\n \"_tls_wrap\",\n \"assert\",\n \"assert/strict\",\n \"async_hooks\",\n \"buffer\",\n \"child_process\",\n \"cluster\",\n \"console\",\n \"constants\",\n \"crypto\",\n \"dgram\",\n \"diagnostics_channel\",\n \"dns\",\n \"dns/promises\",\n \"domain\",\n \"events\",\n \"fs\",\n \"fs/promises\",\n \"http\",\n \"http2\",\n \"https\",\n \"inspector\",\n \"inspector/promises\",\n \"module\",\n \"net\",\n \"os\",\n \"path\",\n \"path/posix\",\n \"path/win32\",\n \"perf_hooks\",\n \"process\",\n \"punycode\",\n \"querystring\",\n \"readline\",\n \"readline/promises\",\n \"repl\",\n \"stream\",\n \"stream/consumers\",\n \"stream/promises\",\n \"stream/web\",\n \"string_decoder\",\n \"sys\",\n \"timers\",\n \"timers/promises\",\n \"tls\",\n \"trace_events\",\n \"tty\",\n \"url\",\n \"util\",\n \"util/types\",\n \"v8\",\n \"vm\",\n \"wasi\",\n \"worker_threads\",\n \"zlib\"\n];\nconst cloudflare = getCloudflarePreset({});\n\nexport { cloudflare, getCloudflarePreset, nonPrefixedNodeModules };\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAMA,MAAM,aAAa,YAAY,cAAc,OAAO,KAAK,IAAI;AAC3C,aAAa,QAAQ,WAAW;AAClC,YAAY,cAAc,OAAO,KAAK,IAAI;AAC1D,MAAM,UAAU;AAEhB,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AACD,SAAS,oBAAoB,EAC3B,oBAAoB,cACpB,qBAAqB,EAAE,IACtB;CACD,MAAM,SAAS;EACb;EACA;EACD;CACD,MAAM,YAAY;EAChB,iBAAiB,OAAO;EACxB,kBAAkB,OAAO;EACzB,eAAe,OAAO;EACtB,eAAe,OAAO;EACtB,qBAAqB,OAAO;EAC5B,oBAAoB,OAAO;EAC3B,wBAAwB,OAAO;EAC/B,mBAAmB,OAAO;EAC1B,iBAAiB,OAAO;EACxB,o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G;EACF,eAAe,EAAE;EACjB,eAAe,EAAE;EACjB,WAAW,CAAC,gDAAgD;EAC7D;;AAyEH,MAAM,aAAa,oBAAoB,EAAE,CAAC"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -2,6 +2,8 @@ import { WorkerModuleMetadata } from "./worker-module.cjs";
|
|
|
2
2
|
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
3
3
|
import { EnvPluginContext, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env";
|
|
4
4
|
import { PulumiPluginContext, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
|
|
5
|
+
import { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig } from "@powerlines/plugin-unenv";
|
|
6
|
+
import { RequiredKeys } from "@stryke/types/base";
|
|
5
7
|
import { PluginContext, ResolvedEntryTypeDefinition } from "powerlines";
|
|
6
8
|
|
|
7
9
|
//#region src/types/plugin.d.ts
|
|
@@ -28,32 +30,39 @@ interface CloudflarePluginOptions {
|
|
|
28
30
|
* The domain to use for the Cloudflare deployed resources.
|
|
29
31
|
*/
|
|
30
32
|
domain?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The [unenv](https://unjs.dev/packages/unenv) plugin configuration options.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* The plugin will automatically include the Cloudflare preset for unenv, which provides compatibility with Cloudflare Workers runtimes. You can customize the unenv configuration by providing options here, but the Cloudflare preset will always be included.
|
|
38
|
+
*/
|
|
39
|
+
unenv?: UnenvPluginOptions;
|
|
31
40
|
}
|
|
32
|
-
type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & {
|
|
41
|
+
type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & UnenvPluginUserConfig & {
|
|
33
42
|
/**
|
|
34
43
|
* Options for the Cloudflare plugin.
|
|
35
44
|
*/
|
|
36
|
-
cloudflare?: CloudflarePluginOptions
|
|
45
|
+
cloudflare?: Omit<CloudflarePluginOptions, "unenv">;
|
|
37
46
|
};
|
|
38
|
-
type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginResolvedConfig & {
|
|
47
|
+
type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginResolvedConfig & UnenvPluginResolvedConfig & {
|
|
39
48
|
/**
|
|
40
49
|
* Options for the Cloudflare plugin.
|
|
41
50
|
*/
|
|
42
|
-
cloudflare: Required<CloudflarePluginOptions
|
|
51
|
+
cloudflare: Required<Omit<CloudflarePluginOptions, "unenv">>;
|
|
43
52
|
};
|
|
44
|
-
|
|
53
|
+
type CloudflareWorkerMetadata = RequiredKeys<WorkerModuleMetadata, "name" | "pattern"> & {
|
|
45
54
|
/**
|
|
46
55
|
* The resolved entry definition for the Worker module, including the original entry definition and the resolved file path to the module.
|
|
47
56
|
*/
|
|
48
57
|
entry: ResolvedEntryTypeDefinition;
|
|
49
|
-
}
|
|
58
|
+
};
|
|
50
59
|
type CloudflareWorkerEntryModule = Record<keyof ExportedHandler, boolean> & {
|
|
51
60
|
/**
|
|
52
61
|
* The metadata for the Worker module, including the name of the Cloudflare Worker script to deploy. If no name is provided, the plugin will use the `name` configuration value from the plugin configuration as the default name for the Worker script.
|
|
53
62
|
*/
|
|
54
63
|
metadata: CloudflareWorkerMetadata;
|
|
55
64
|
};
|
|
56
|
-
type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & {
|
|
65
|
+
type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & UnenvPluginContext<TResolvedConfig> & {
|
|
57
66
|
workers: CloudflareWorkerEntryModule[];
|
|
58
67
|
};
|
|
59
68
|
declare type __ΩCloudflarePluginOptions = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;UAuCiB,uBAAA;;AAAjB;;;;;;;EASE,SAAA;EAuBQ;;;AAGV;;;;;EAhBE,QAAA;EAsBoB;;;EAjBpB,MAAA;EAWuC;;;;;;EAHvC,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,0BAAA,GAA6B,mBAAA,GACvC,sBAAA,GACA,qBAAA;EAOwC;;;EAHtC,UAAA,GAAa,IAAA,CAAK,uBAAA;AAAA;AAAA,KAGV,8BAAA,GAAiC,uBAAA,GAC3C,0BAAA,GACA,yBAAA;EAIuB;;;EAArB,UAAA,EAAY,QAAA,CAAS,IAAA,CAAK,uBAAA;AAAA;AAAA,KAGlB,wBAAA,GAA2B,YAAA,CACrC,oBAAA;EARA;;;EAcA,KAAA,EAAO,2BAAA;AAAA;AAAA,KAGG,2BAAA,GAA8B,MAAA,OAClC,eAAA;EAd6C;AAGrD;;EAiBE,QAAA,EAAU,wBAAA;AAAA;AAAA,KAGA,uBAAA,yBACc,8BAAA,GACtB,8BAAA,IACA,aAAA,CAAc,eAAA,IAChB,gBAAA,CAAiB,eAAA,IACjB,mBAAA,CAAoB,eAAA,IACpB,kBAAA,CAAmB,eAAA;EACjB,OAAA,EAAS,2BAAA;AAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { WorkerModuleMetadata } from "./worker-module.mjs";
|
|
2
|
+
import { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig } from "@powerlines/plugin-unenv";
|
|
2
3
|
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
3
4
|
import { EnvPluginContext, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env";
|
|
4
5
|
import { PulumiPluginContext, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
|
|
6
|
+
import { RequiredKeys } from "@stryke/types/base";
|
|
5
7
|
import { PluginContext, ResolvedEntryTypeDefinition } from "powerlines";
|
|
6
8
|
|
|
7
9
|
//#region src/types/plugin.d.ts
|
|
@@ -28,32 +30,39 @@ interface CloudflarePluginOptions {
|
|
|
28
30
|
* The domain to use for the Cloudflare deployed resources.
|
|
29
31
|
*/
|
|
30
32
|
domain?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The [unenv](https://unjs.dev/packages/unenv) plugin configuration options.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* The plugin will automatically include the Cloudflare preset for unenv, which provides compatibility with Cloudflare Workers runtimes. You can customize the unenv configuration by providing options here, but the Cloudflare preset will always be included.
|
|
38
|
+
*/
|
|
39
|
+
unenv?: UnenvPluginOptions;
|
|
31
40
|
}
|
|
32
|
-
type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & {
|
|
41
|
+
type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & UnenvPluginUserConfig & {
|
|
33
42
|
/**
|
|
34
43
|
* Options for the Cloudflare plugin.
|
|
35
44
|
*/
|
|
36
|
-
cloudflare?: CloudflarePluginOptions
|
|
45
|
+
cloudflare?: Omit<CloudflarePluginOptions, "unenv">;
|
|
37
46
|
};
|
|
38
|
-
type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginResolvedConfig & {
|
|
47
|
+
type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginResolvedConfig & UnenvPluginResolvedConfig & {
|
|
39
48
|
/**
|
|
40
49
|
* Options for the Cloudflare plugin.
|
|
41
50
|
*/
|
|
42
|
-
cloudflare: Required<CloudflarePluginOptions
|
|
51
|
+
cloudflare: Required<Omit<CloudflarePluginOptions, "unenv">>;
|
|
43
52
|
};
|
|
44
|
-
|
|
53
|
+
type CloudflareWorkerMetadata = RequiredKeys<WorkerModuleMetadata, "name" | "pattern"> & {
|
|
45
54
|
/**
|
|
46
55
|
* The resolved entry definition for the Worker module, including the original entry definition and the resolved file path to the module.
|
|
47
56
|
*/
|
|
48
57
|
entry: ResolvedEntryTypeDefinition;
|
|
49
|
-
}
|
|
58
|
+
};
|
|
50
59
|
type CloudflareWorkerEntryModule = Record<keyof ExportedHandler, boolean> & {
|
|
51
60
|
/**
|
|
52
61
|
* The metadata for the Worker module, including the name of the Cloudflare Worker script to deploy. If no name is provided, the plugin will use the `name` configuration value from the plugin configuration as the default name for the Worker script.
|
|
53
62
|
*/
|
|
54
63
|
metadata: CloudflareWorkerMetadata;
|
|
55
64
|
};
|
|
56
|
-
type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & {
|
|
65
|
+
type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & UnenvPluginContext<TResolvedConfig> & {
|
|
57
66
|
workers: CloudflareWorkerEntryModule[];
|
|
58
67
|
};
|
|
59
68
|
declare type __ΩCloudflarePluginOptions = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;UAuCiB,uBAAA;;AAAjB;;;;;;;EASE,SAAA;EAuBQ;;;AAGV;;;;;EAhBE,QAAA;EAsBoB;;;EAjBpB,MAAA;EAWuC;;;;;;EAHvC,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,0BAAA,GAA6B,mBAAA,GACvC,sBAAA,GACA,qBAAA;EAOwC;;;EAHtC,UAAA,GAAa,IAAA,CAAK,uBAAA;AAAA;AAAA,KAGV,8BAAA,GAAiC,uBAAA,GAC3C,0BAAA,GACA,yBAAA;EAIuB;;;EAArB,UAAA,EAAY,QAAA,CAAS,IAAA,CAAK,uBAAA;AAAA;AAAA,KAGlB,wBAAA,GAA2B,YAAA,CACrC,oBAAA;EARA;;;EAcA,KAAA,EAAO,2BAAA;AAAA;AAAA,KAGG,2BAAA,GAA8B,MAAA,OAClC,eAAA;EAd6C;AAGrD;;EAiBE,QAAA,EAAU,wBAAA;AAAA;AAAA,KAGA,uBAAA,yBACc,8BAAA,GACtB,8BAAA,IACA,aAAA,CAAc,eAAA,IAChB,gBAAA,CAAiB,eAAA,IACjB,mBAAA,CAAoB,eAAA,IACpB,kBAAA,CAAmB,eAAA;EACjB,OAAA,EAAS,2BAAA;AAAA;AAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
2
|
+
import { WorkersRouteArgs, WorkersScriptArgs } from "@pulumi/cloudflare";
|
|
2
3
|
|
|
3
4
|
//#region src/types/worker-module.d.ts
|
|
4
|
-
|
|
5
|
+
type WorkerModuleMetadata = Partial<Omit<WorkersScriptArgs, "accountId" | "scriptName" | "contentFile" | "entry">> & Partial<Omit<WorkersRouteArgs, "zoneId" | "script" | "pattern" | "entry">> & {
|
|
5
6
|
/**
|
|
6
7
|
* The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
|
|
7
8
|
*
|
|
@@ -9,7 +10,20 @@ interface WorkerModuleMetadata {
|
|
|
9
10
|
* If no value is provided, the {@link Config.name} configuration value will be used.
|
|
10
11
|
*/
|
|
11
12
|
name?: string;
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A routing pattern to associate with the deployed Worker script.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* This is required for the Worker script to be accessible via a public URL. The plugin will replace the string `{domain}` in the pattern with the value of the `domain` configuration option, if provided. If no pattern is provided, a default pattern will be generated based on the script name and plugin mode (e.g. `https://{scriptName}.{mode}.worker-script.{domain}`).
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // Example pattern for: "worker-script.my-example-domain.com"
|
|
22
|
+
* pattern: "worker-script.{domain}"
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
pattern?: string;
|
|
26
|
+
};
|
|
13
27
|
interface WorkerModule {
|
|
14
28
|
metadata?: WorkerModuleMetadata;
|
|
15
29
|
default: ExportedHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-module.d.cts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-module.d.cts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAA,CACjC,IAAA,CAAK,iBAAA,2DAEL,OAAA,CAAQ,IAAA,CAAK,gBAAA;;AAHf;;;;;EAUI,IAAA;EAPW;;;;;;;;;;;;EAqBX,OAAA;AAAA;AAAA,UAGa,YAAA;EACf,QAAA,GAAW,oBAAA;EACX,OAAA,EAAS,eAAA;AAAA;AAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { WorkersRouteArgs, WorkersScriptArgs } from "@pulumi/cloudflare";
|
|
1
2
|
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
2
3
|
|
|
3
4
|
//#region src/types/worker-module.d.ts
|
|
4
|
-
|
|
5
|
+
type WorkerModuleMetadata = Partial<Omit<WorkersScriptArgs, "accountId" | "scriptName" | "contentFile" | "entry">> & Partial<Omit<WorkersRouteArgs, "zoneId" | "script" | "pattern" | "entry">> & {
|
|
5
6
|
/**
|
|
6
7
|
* The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
|
|
7
8
|
*
|
|
@@ -9,7 +10,20 @@ interface WorkerModuleMetadata {
|
|
|
9
10
|
* If no value is provided, the {@link Config.name} configuration value will be used.
|
|
10
11
|
*/
|
|
11
12
|
name?: string;
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A routing pattern to associate with the deployed Worker script.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* This is required for the Worker script to be accessible via a public URL. The plugin will replace the string `{domain}` in the pattern with the value of the `domain` configuration option, if provided. If no pattern is provided, a default pattern will be generated based on the script name and plugin mode (e.g. `https://{scriptName}.{mode}.worker-script.{domain}`).
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // Example pattern for: "worker-script.my-example-domain.com"
|
|
22
|
+
* pattern: "worker-script.{domain}"
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
pattern?: string;
|
|
26
|
+
};
|
|
13
27
|
interface WorkerModule {
|
|
14
28
|
metadata?: WorkerModuleMetadata;
|
|
15
29
|
default: ExportedHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-module.d.mts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-module.d.mts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAA,CACjC,IAAA,CAAK,iBAAA,2DAEL,OAAA,CAAQ,IAAA,CAAK,gBAAA;;AAHf;;;;;EAUI,IAAA;EAPW;;;;;;;;;;;;EAqBX,OAAA;AAAA;AAAA,UAGa,YAAA;EACf,QAAA,GAAW,oBAAA;EACX,OAAA,EAAS,eAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-cloudflare",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin that provides integration with Cloudflare services.",
|
|
6
6
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -161,25 +161,30 @@
|
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
163
163
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
164
|
-
"@cloudflare/workers-types": "^4.
|
|
165
|
-
"@powerlines/plugin-env": "^0.16.
|
|
166
|
-
"@powerlines/plugin-pulumi": "^0.5.
|
|
164
|
+
"@cloudflare/workers-types": "^4.20260317.1",
|
|
165
|
+
"@powerlines/plugin-env": "^0.16.79",
|
|
166
|
+
"@powerlines/plugin-pulumi": "^0.5.39",
|
|
167
|
+
"@powerlines/plugin-unenv": "^0.1.347",
|
|
167
168
|
"@pulumi/cloudflare": "^6.13.0",
|
|
168
169
|
"@pulumi/pulumi": "^3.226.0",
|
|
169
|
-
"@storm-software/config-tools": "^1.189.
|
|
170
|
-
"@stryke/hash": "^0.13.
|
|
171
|
-
"@stryke/
|
|
172
|
-
"@stryke/
|
|
173
|
-
"@stryke/
|
|
170
|
+
"@storm-software/config-tools": "^1.189.39",
|
|
171
|
+
"@stryke/hash": "^0.13.16",
|
|
172
|
+
"@stryke/helpers": "^0.10.6",
|
|
173
|
+
"@stryke/path": "^0.27.2",
|
|
174
|
+
"@stryke/string-format": "^0.17.6",
|
|
175
|
+
"@stryke/type-checks": "^0.5.41",
|
|
176
|
+
"@stryke/types": "^0.11.1",
|
|
174
177
|
"defu": "^6.1.4",
|
|
175
|
-
"powerlines": "^0.41.
|
|
178
|
+
"powerlines": "^0.41.23"
|
|
176
179
|
},
|
|
177
180
|
"devDependencies": {
|
|
178
|
-
"@cloudflare/
|
|
179
|
-
"@
|
|
180
|
-
"@powerlines/plugin-
|
|
181
|
+
"@cloudflare/unenv-preset": "^2.15.0",
|
|
182
|
+
"@cloudflare/workers-types": "^4.20260317.1",
|
|
183
|
+
"@powerlines/plugin-alloy": "^0.25.44",
|
|
184
|
+
"@powerlines/plugin-plugin": "^0.12.309",
|
|
181
185
|
"@types/node": "^25.5.0"
|
|
182
186
|
},
|
|
183
187
|
"publishConfig": { "access": "public" },
|
|
184
|
-
"
|
|
188
|
+
"inlinedDependencies": { "@cloudflare/unenv-preset": "2.15.0" },
|
|
189
|
+
"gitHead": "c6ab4089999ed8b1f08214f9358d527de33dfa5e"
|
|
185
190
|
}
|