@powerlines/plugin-cloudflare 0.5.19 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +1 -1
  2. package/dist/components/worker-entry.cjs +2 -2
  3. package/dist/components/worker-entry.mjs +2 -2
  4. package/dist/components/worker-entry.mjs.map +1 -1
  5. package/dist/helpers/constants.cjs +7 -0
  6. package/dist/helpers/constants.d.cts +5 -0
  7. package/dist/helpers/constants.d.cts.map +1 -0
  8. package/dist/helpers/constants.d.mts +5 -0
  9. package/dist/helpers/constants.d.mts.map +1 -0
  10. package/dist/helpers/constants.mjs +6 -0
  11. package/dist/helpers/constants.mjs.map +1 -0
  12. package/dist/helpers/wrangler.cjs +21 -0
  13. package/dist/helpers/wrangler.d.cts +36 -0
  14. package/dist/helpers/wrangler.d.cts.map +1 -0
  15. package/dist/helpers/wrangler.d.mts +36 -0
  16. package/dist/helpers/wrangler.d.mts.map +1 -0
  17. package/dist/helpers/wrangler.mjs +20 -0
  18. package/dist/helpers/wrangler.mjs.map +1 -0
  19. package/dist/index.cjs +22 -6
  20. package/dist/index.d.cts +2 -1
  21. package/dist/index.d.cts.map +1 -1
  22. package/dist/index.d.mts +2 -1
  23. package/dist/index.d.mts.map +1 -1
  24. package/dist/index.mjs +21 -5
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/types/index.cjs +9 -0
  27. package/dist/types/index.d.cts +2 -1
  28. package/dist/types/index.d.mts +2 -1
  29. package/dist/types/index.mjs +3 -1
  30. package/dist/types/plugin.d.cts +12 -1
  31. package/dist/types/plugin.d.cts.map +1 -1
  32. package/dist/types/plugin.d.mts +12 -1
  33. package/dist/types/plugin.d.mts.map +1 -1
  34. package/dist/types/worker-module.d.cts +9 -2
  35. package/dist/types/worker-module.d.cts.map +1 -1
  36. package/dist/types/worker-module.d.mts +9 -2
  37. package/dist/types/worker-module.d.mts.map +1 -1
  38. package/dist/types/wrangler.cjs +152 -0
  39. package/dist/types/wrangler.d.cts +40 -0
  40. package/dist/types/wrangler.d.cts.map +1 -0
  41. package/dist/types/wrangler.d.mts +40 -0
  42. package/dist/types/wrangler.d.mts.map +1 -0
  43. package/dist/types/wrangler.mjs +143 -0
  44. package/dist/types/wrangler.mjs.map +1 -0
  45. package/package.json +67 -19
  46. package/dist/_virtual/_rolldown/runtime.mjs +0 -3
  47. package/dist/node_modules/.pnpm/@cloudflare_unenv-preset@2.16.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.cjs +0 -370
  48. package/dist/node_modules/.pnpm/@cloudflare_unenv-preset@2.16.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs +0 -367
  49. package/dist/node_modules/.pnpm/@cloudflare_unenv-preset@2.16.0_unenv@2.0.0-rc.24/node_modules/@cloudflare/unenv-preset/dist/index.mjs.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-cloudflare",
3
- "version": "0.5.19",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin that provides integration with Cloudflare services.",
6
6
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
@@ -110,6 +110,34 @@
110
110
  "default": "./dist/components/worker-entry.mjs"
111
111
  }
112
112
  },
113
+ "./helpers/constants": {
114
+ "require": {
115
+ "types": "./dist/helpers/constants.d.cts",
116
+ "default": "./dist/helpers/constants.cjs"
117
+ },
118
+ "import": {
119
+ "types": "./dist/helpers/constants.d.mts",
120
+ "default": "./dist/helpers/constants.mjs"
121
+ },
122
+ "default": {
123
+ "types": "./dist/helpers/constants.d.mts",
124
+ "default": "./dist/helpers/constants.mjs"
125
+ }
126
+ },
127
+ "./helpers/wrangler": {
128
+ "require": {
129
+ "types": "./dist/helpers/wrangler.d.cts",
130
+ "default": "./dist/helpers/wrangler.cjs"
131
+ },
132
+ "import": {
133
+ "types": "./dist/helpers/wrangler.d.mts",
134
+ "default": "./dist/helpers/wrangler.mjs"
135
+ },
136
+ "default": {
137
+ "types": "./dist/helpers/wrangler.d.mts",
138
+ "default": "./dist/helpers/wrangler.mjs"
139
+ }
140
+ },
113
141
  "./package.json": "./package.json",
114
142
  "./types": {
115
143
  "require": {
@@ -152,39 +180,59 @@
152
180
  "types": "./dist/types/worker-module.d.mts",
153
181
  "default": "./dist/types/worker-module.mjs"
154
182
  }
183
+ },
184
+ "./types/wrangler": {
185
+ "require": {
186
+ "types": "./dist/types/wrangler.d.cts",
187
+ "default": "./dist/types/wrangler.cjs"
188
+ },
189
+ "import": {
190
+ "types": "./dist/types/wrangler.d.mts",
191
+ "default": "./dist/types/wrangler.mjs"
192
+ },
193
+ "default": {
194
+ "types": "./dist/types/wrangler.d.mts",
195
+ "default": "./dist/types/wrangler.mjs"
196
+ }
155
197
  }
156
198
  },
157
199
  "main": "./dist/index.cjs",
158
200
  "module": "./dist/index.mjs",
159
201
  "types": "./dist/index.d.cts",
160
202
  "files": ["dist/**/*"],
203
+ "peerDependencies": {
204
+ "@cloudflare/unenv-preset": ">=2.16.0",
205
+ "@cloudflare/workers-types": ">=4.20240909.0",
206
+ "wrangler": ">=4.77.0",
207
+ "zod": "^3.25.0 || ^4.0.0"
208
+ },
161
209
  "dependencies": {
162
210
  "@alloy-js/core": "0.23.0-dev.8",
163
211
  "@alloy-js/typescript": "0.23.0-dev.4",
164
- "@cloudflare/workers-types": "^4.20260317.1",
165
- "@powerlines/plugin-env": "^0.16.99",
166
- "@powerlines/plugin-pulumi": "^0.6.18",
167
- "@powerlines/plugin-unenv": "^0.1.366",
212
+ "@powerlines/plugin-env": "^0.16.101",
213
+ "@powerlines/plugin-pulumi": "^0.6.20",
214
+ "@powerlines/plugin-unenv": "^0.1.368",
168
215
  "@pulumi/cloudflare": "^6.13.0",
169
- "@pulumi/pulumi": "^3.227.0",
170
- "@storm-software/config-tools": "^1.189.46",
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",
216
+ "@pulumi/pulumi": "^3.228.0",
217
+ "@storm-software/config-tools": "^1.189.57",
218
+ "@stryke/hash": "^0.13.17",
219
+ "@stryke/helpers": "^0.10.7",
220
+ "@stryke/path": "^0.27.3",
221
+ "@stryke/string-format": "^0.17.7",
222
+ "@stryke/type-checks": "^0.6.0",
223
+ "@stryke/types": "^0.11.2",
177
224
  "defu": "^6.1.4",
178
- "powerlines": "^0.42.18"
225
+ "powerlines": "^0.42.20"
179
226
  },
180
227
  "devDependencies": {
181
228
  "@cloudflare/unenv-preset": "^2.16.0",
182
229
  "@cloudflare/workers-types": "^4.20260317.1",
183
- "@powerlines/plugin-alloy": "^0.25.64",
184
- "@powerlines/plugin-plugin": "^0.12.328",
185
- "@types/node": "^25.5.0"
230
+ "@powerlines/plugin-alloy": "^0.25.66",
231
+ "@powerlines/plugin-plugin": "^0.12.330",
232
+ "@types/node": "^25.5.0",
233
+ "wrangler": "^4.77.0",
234
+ "zod": "^4.3.6"
186
235
  },
187
236
  "publishConfig": { "access": "public" },
188
- "inlinedDependencies": { "@cloudflare/unenv-preset": "2.16.0" },
189
- "gitHead": "016be94e1a1c1967aaacab611fde6cd1c8e14e28"
237
+ "gitHead": "c0cb55f77d02626e594888d7c34bca5f0fb8b337"
190
238
  }
@@ -1,3 +0,0 @@
1
- import "node:module";
2
-
3
- export { };
@@ -1,370 +0,0 @@
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.16.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.16.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({ compatibilityDate, compatibilityFlags }) {
272
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_repl_module");
273
- return (compatibilityFlags.includes("enable_nodejs_repl_module") || compatibilityDate >= "2026-03-17") && !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({ compatibilityDate, compatibilityFlags }) {
307
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_v8_module");
308
- return (compatibilityFlags.includes("enable_nodejs_v8_module") || compatibilityDate >= "2026-03-17") && !disabledByFlag ? {
309
- nativeModules: ["v8"],
310
- hybridModules: []
311
- } : {
312
- nativeModules: [],
313
- hybridModules: []
314
- };
315
- }
316
- function getTtyOverrides({ compatibilityDate, compatibilityFlags }) {
317
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_tty_module");
318
- return (compatibilityFlags.includes("enable_nodejs_tty_module") || compatibilityDate >= "2026-03-17") && !disabledByFlag ? {
319
- nativeModules: ["tty"],
320
- hybridModules: []
321
- } : {
322
- nativeModules: [],
323
- hybridModules: []
324
- };
325
- }
326
- function getChildProcessOverrides({ compatibilityDate, compatibilityFlags }) {
327
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_child_process_module");
328
- return (compatibilityFlags.includes("enable_nodejs_child_process_module") || compatibilityDate >= "2026-03-17") && !disabledByFlag ? {
329
- nativeModules: ["child_process"],
330
- hybridModules: []
331
- } : {
332
- nativeModules: [],
333
- hybridModules: []
334
- };
335
- }
336
- function getWorkerThreadsOverrides({ compatibilityDate, compatibilityFlags }) {
337
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_worker_threads_module");
338
- return (compatibilityFlags.includes("enable_nodejs_worker_threads_module") || compatibilityDate >= "2026-03-17") && !disabledByFlag ? {
339
- nativeModules: ["worker_threads"],
340
- hybridModules: []
341
- } : {
342
- nativeModules: [],
343
- hybridModules: []
344
- };
345
- }
346
- function getReadlineOverrides({ compatibilityDate, compatibilityFlags }) {
347
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_readline_module");
348
- return (compatibilityFlags.includes("enable_nodejs_readline_module") || compatibilityDate >= "2026-03-17") && !disabledByFlag ? {
349
- nativeModules: ["readline", "readline/promises"],
350
- hybridModules: []
351
- } : {
352
- nativeModules: [],
353
- hybridModules: []
354
- };
355
- }
356
- function getPerfHooksOverrides({ compatibilityDate, compatibilityFlags }) {
357
- const disabledByFlag = compatibilityFlags.includes("disable_nodejs_perf_hooks_module");
358
- return (compatibilityFlags.includes("enable_nodejs_perf_hooks_module") || compatibilityDate >= "2026-03-17") && !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;