@cloudflare/workers-utils 0.43.0 → 0.45.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 (32) hide show
  1. package/dist/browser.d.mts +2399 -3
  2. package/dist/browser.mjs +482 -2
  3. package/dist/{chunk-C6O4ION7.mjs → chunk-2Q77CKVU.mjs} +3 -1
  4. package/dist/{chunk-Z62CVNHJ.mjs → chunk-6G6FCMPX.mjs} +4 -1
  5. package/dist/{chunk-FLRJ77A6.mjs → chunk-AUSY7DKT.mjs} +6 -3
  6. package/dist/{chunk-IYSONYTF.mjs → chunk-FR75DWDU.mjs} +7 -5
  7. package/dist/{chunk-MCNIGVAF.mjs → chunk-M3RITKR3.mjs} +4 -1
  8. package/dist/{chunk-53IMCORZ.mjs → chunk-MIA26B4M.mjs} +3 -1
  9. package/dist/{chunk-34VZWBGB.mjs → chunk-MV2OJK3L.mjs} +4 -2
  10. package/dist/{chunk-WO2IAW6M.mjs → chunk-OWPFSLY6.mjs} +4 -1
  11. package/dist/{chunk-OWXQB7GP.mjs → chunk-PWC7WAOU.mjs} +4 -1
  12. package/dist/{chunk-3IYLA2JH.mjs → chunk-QSRIB43D.mjs} +5 -2
  13. package/dist/{chunk-Q72B4Q5Z.mjs → chunk-U6NEESU5.mjs} +6 -3
  14. package/dist/compatibility-date.mjs +5 -2
  15. package/dist/{compliance-DzwHmPKm.d.mts → compliance-CADarBwY.d.mts} +589 -514
  16. package/dist/compliance.d.mts +1 -1
  17. package/dist/compliance.mjs +10 -7
  18. package/dist/docker-path.mjs +6 -3
  19. package/dist/errors.mjs +5 -2
  20. package/dist/fs-helpers.mjs +5 -2
  21. package/dist/global-wrangler-config-path.mjs +6 -3
  22. package/dist/index.d.mts +48 -9
  23. package/dist/index.mjs +716 -37
  24. package/dist/local-env.mjs +4 -1
  25. package/dist/metafile-esm.json +1 -1
  26. package/dist/{open-PBXRGS4R.mjs → open-PCXX3ZDZ.mjs} +3 -1
  27. package/dist/prometheus-metrics.mjs +5 -2
  28. package/dist/test-helpers/index.d.mts +1 -1
  29. package/dist/test-helpers/index.mjs +8 -5
  30. package/dist/zod-format.mjs +5 -2
  31. package/package.json +4 -4
  32. package/dist/chunk-DKSA7K25.mjs +0 -468
package/dist/browser.mjs CHANGED
@@ -1,2 +1,482 @@
1
- export { constructWranglerConfig } from './chunk-DKSA7K25.mjs';
2
- import './chunk-Q72B4Q5Z.mjs';
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/default-compat-date.ts
5
+ var DEFAULT_COMPAT_DATE = "2026-09-30";
6
+
7
+ // src/assert-never.ts
8
+ function assertNever(_value) {
9
+ }
10
+ __name(assertNever, "assertNever");
11
+
12
+ // src/map-worker-metadata-bindings.ts
13
+ function mapWorkerMetadataBindings(bindings) {
14
+ return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
15
+ switch (binding.type) {
16
+ case "plain_text":
17
+ {
18
+ configObj.vars = {
19
+ ...configObj.vars ?? {},
20
+ [binding.name]: binding.text
21
+ };
22
+ }
23
+ break;
24
+ case "json":
25
+ {
26
+ configObj.vars = {
27
+ ...configObj.vars ?? {},
28
+ [binding.name]: binding.json
29
+ };
30
+ }
31
+ break;
32
+ case "kv_namespace":
33
+ {
34
+ configObj.kv_namespaces = [
35
+ ...configObj.kv_namespaces ?? [],
36
+ { id: binding.namespace_id, binding: binding.name }
37
+ ];
38
+ }
39
+ break;
40
+ case "durable_object_namespace":
41
+ {
42
+ configObj.durable_objects = {
43
+ bindings: [
44
+ ...configObj.durable_objects?.bindings ?? [],
45
+ {
46
+ name: binding.name,
47
+ class_name: binding.class_name,
48
+ script_name: binding.script_name,
49
+ environment: binding.environment
50
+ }
51
+ ]
52
+ };
53
+ }
54
+ break;
55
+ case "d1":
56
+ {
57
+ configObj.d1_databases = [
58
+ ...configObj.d1_databases ?? [],
59
+ {
60
+ binding: binding.name,
61
+ database_id: binding.id
62
+ }
63
+ ];
64
+ }
65
+ break;
66
+ case "browser":
67
+ {
68
+ configObj.browser = {
69
+ binding: binding.name
70
+ };
71
+ }
72
+ break;
73
+ case "analytics":
74
+ {
75
+ configObj.analytics = {
76
+ binding: binding.name
77
+ };
78
+ }
79
+ break;
80
+ case "ai":
81
+ {
82
+ configObj.ai = {
83
+ binding: binding.name
84
+ };
85
+ }
86
+ break;
87
+ case "images":
88
+ {
89
+ configObj.images = {
90
+ binding: binding.name
91
+ };
92
+ }
93
+ break;
94
+ case "stream":
95
+ {
96
+ configObj.stream = {
97
+ binding: binding.name
98
+ };
99
+ }
100
+ break;
101
+ case "media":
102
+ {
103
+ configObj.media = {
104
+ binding: binding.name
105
+ };
106
+ }
107
+ break;
108
+ case "r2_bucket":
109
+ {
110
+ configObj.r2_buckets = [
111
+ ...configObj.r2_buckets ?? [],
112
+ {
113
+ binding: binding.name,
114
+ bucket_name: binding.bucket_name,
115
+ jurisdiction: binding.jurisdiction
116
+ }
117
+ ];
118
+ }
119
+ break;
120
+ case "secrets_store_secret":
121
+ {
122
+ configObj.secrets_store_secrets = [
123
+ ...configObj.secrets_store_secrets ?? [],
124
+ {
125
+ binding: binding.name,
126
+ store_id: binding.store_id,
127
+ secret_name: binding.secret_name
128
+ }
129
+ ];
130
+ }
131
+ break;
132
+ case "artifacts":
133
+ {
134
+ configObj.artifacts = [
135
+ ...configObj.artifacts ?? [],
136
+ {
137
+ binding: binding.name,
138
+ namespace: binding.namespace
139
+ }
140
+ ];
141
+ }
142
+ break;
143
+ case "unsafe_hello_world": {
144
+ configObj.unsafe_hello_world = [
145
+ ...configObj.unsafe_hello_world ?? [],
146
+ {
147
+ binding: binding.name,
148
+ enable_timer: binding.enable_timer
149
+ }
150
+ ];
151
+ break;
152
+ }
153
+ case "flagship": {
154
+ configObj.flagship = [
155
+ ...configObj.flagship ?? [],
156
+ {
157
+ binding: binding.name,
158
+ app_id: binding.app_id
159
+ }
160
+ ];
161
+ break;
162
+ }
163
+ case "service":
164
+ {
165
+ configObj.services = [
166
+ ...configObj.services ?? [],
167
+ {
168
+ binding: binding.name,
169
+ service: binding.service,
170
+ environment: binding.environment,
171
+ entrypoint: binding.entrypoint
172
+ }
173
+ ];
174
+ }
175
+ break;
176
+ case "analytics_engine":
177
+ {
178
+ configObj.analytics_engine_datasets = [
179
+ ...configObj.analytics_engine_datasets ?? [],
180
+ { binding: binding.name, dataset: binding.dataset }
181
+ ];
182
+ }
183
+ break;
184
+ case "dispatch_namespace":
185
+ {
186
+ configObj.dispatch_namespaces = [
187
+ ...configObj.dispatch_namespaces ?? [],
188
+ {
189
+ binding: binding.name,
190
+ namespace: binding.namespace,
191
+ ...binding.outbound && {
192
+ outbound: {
193
+ service: binding.outbound.worker.service,
194
+ environment: binding.outbound.worker.environment,
195
+ parameters: binding.outbound.params?.map((p) => p.name) ?? []
196
+ }
197
+ }
198
+ }
199
+ ];
200
+ }
201
+ break;
202
+ case "logfwdr":
203
+ {
204
+ configObj.logfwdr = {
205
+ bindings: [
206
+ ...configObj.logfwdr?.bindings ?? [],
207
+ { name: binding.name, destination: binding.destination }
208
+ ]
209
+ };
210
+ }
211
+ break;
212
+ case "wasm_module":
213
+ {
214
+ configObj.wasm_modules = {
215
+ ...configObj.wasm_modules ?? {},
216
+ [binding.name]: binding.part
217
+ };
218
+ }
219
+ break;
220
+ case "text_blob":
221
+ {
222
+ configObj.text_blobs = {
223
+ ...configObj.text_blobs ?? {},
224
+ [binding.name]: binding.part
225
+ };
226
+ }
227
+ break;
228
+ case "data_blob":
229
+ {
230
+ configObj.data_blobs = {
231
+ ...configObj.data_blobs ?? {},
232
+ [binding.name]: binding.part
233
+ };
234
+ }
235
+ break;
236
+ case "secret_text":
237
+ break;
238
+ case "version_metadata": {
239
+ {
240
+ configObj.version_metadata = {
241
+ binding: binding.name
242
+ };
243
+ }
244
+ break;
245
+ }
246
+ case "send_email": {
247
+ configObj.send_email = [
248
+ ...configObj.send_email ?? [],
249
+ {
250
+ name: binding.name,
251
+ destination_address: binding.destination_address,
252
+ allowed_destination_addresses: binding.allowed_destination_addresses,
253
+ allowed_sender_addresses: binding.allowed_sender_addresses
254
+ }
255
+ ];
256
+ break;
257
+ }
258
+ case "queue":
259
+ configObj.queues ??= { producers: [] };
260
+ configObj.queues.producers = [
261
+ ...configObj.queues.producers ?? [],
262
+ {
263
+ binding: binding.name,
264
+ queue: binding.queue_name,
265
+ delivery_delay: binding.delivery_delay
266
+ }
267
+ ];
268
+ break;
269
+ case "vectorize":
270
+ configObj.vectorize = [
271
+ ...configObj.vectorize ?? [],
272
+ {
273
+ binding: binding.name,
274
+ index_name: binding.index_name
275
+ }
276
+ ];
277
+ break;
278
+ case "ai_search_namespace":
279
+ configObj.ai_search_namespaces = [
280
+ ...configObj.ai_search_namespaces ?? [],
281
+ {
282
+ binding: binding.name,
283
+ namespace: binding.namespace
284
+ }
285
+ ];
286
+ break;
287
+ case "ai_search":
288
+ configObj.ai_search = [
289
+ ...configObj.ai_search ?? [],
290
+ {
291
+ binding: binding.name,
292
+ instance_name: binding.instance_name
293
+ }
294
+ ];
295
+ break;
296
+ case "agent_memory": {
297
+ configObj.agent_memory = [
298
+ ...configObj.agent_memory ?? [],
299
+ {
300
+ binding: binding.name,
301
+ namespace: binding.namespace
302
+ }
303
+ ];
304
+ break;
305
+ }
306
+ case "hyperdrive":
307
+ configObj.hyperdrive = [
308
+ ...configObj.hyperdrive ?? [],
309
+ {
310
+ binding: binding.name,
311
+ id: binding.id
312
+ }
313
+ ];
314
+ break;
315
+ case "mtls_certificate":
316
+ configObj.mtls_certificates = [
317
+ ...configObj.mtls_certificates ?? [],
318
+ {
319
+ binding: binding.name,
320
+ certificate_id: binding.certificate_id
321
+ }
322
+ ];
323
+ break;
324
+ case "pipelines":
325
+ configObj.pipelines = [
326
+ ...configObj.pipelines ?? [],
327
+ {
328
+ binding: binding.name,
329
+ // NOTE: stream is the primary field, but we also support pipeline for backward compatibility
330
+ ...binding.stream && { stream: binding.stream },
331
+ ...binding.pipeline && { pipeline: binding.pipeline }
332
+ }
333
+ ];
334
+ break;
335
+ case "k2":
336
+ configObj.k2 = [
337
+ ...configObj.k2 ?? [],
338
+ { binding: binding.name, stream: binding.stream }
339
+ ];
340
+ break;
341
+ case "assets":
342
+ configObj.assets = {
343
+ binding: binding.name
344
+ // Note: we currently don't get all the assets information from the
345
+ // API, so here we are only able to set the name of the binding
346
+ // hopefully in the future we can properly fully support the binding
347
+ };
348
+ break;
349
+ case "inherit":
350
+ configObj.unsafe = {
351
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
352
+ metadata: configObj.unsafe?.metadata ?? void 0
353
+ };
354
+ break;
355
+ case "workflow":
356
+ {
357
+ configObj.workflows = [
358
+ ...configObj.workflows ?? [],
359
+ {
360
+ binding: binding.name,
361
+ name: binding.workflow_name,
362
+ class_name: binding.class_name,
363
+ script_name: binding.script_name
364
+ }
365
+ ];
366
+ }
367
+ break;
368
+ case "worker_loader":
369
+ {
370
+ configObj.worker_loaders = [
371
+ ...configObj.worker_loaders ?? [],
372
+ {
373
+ binding: binding.name
374
+ }
375
+ ];
376
+ }
377
+ break;
378
+ case "ratelimit":
379
+ {
380
+ configObj.ratelimits = [
381
+ ...configObj.ratelimits ?? [],
382
+ {
383
+ name: binding.name,
384
+ namespace_id: binding.namespace_id,
385
+ simple: {
386
+ limit: binding.simple.limit,
387
+ period: binding.simple.period
388
+ }
389
+ }
390
+ ];
391
+ }
392
+ break;
393
+ case "vpc_service":
394
+ {
395
+ configObj.vpc_services = [
396
+ ...configObj.vpc_services ?? [],
397
+ {
398
+ binding: binding.name,
399
+ service_id: binding.service_id
400
+ }
401
+ ];
402
+ }
403
+ break;
404
+ case "vpc_network":
405
+ {
406
+ if (binding.tunnel_id !== void 0) {
407
+ configObj.vpc_networks = [
408
+ ...configObj.vpc_networks ?? [],
409
+ { binding: binding.name, tunnel_id: binding.tunnel_id }
410
+ ];
411
+ } else if (binding.network_id !== void 0) {
412
+ configObj.vpc_networks = [
413
+ ...configObj.vpc_networks ?? [],
414
+ { binding: binding.name, network_id: binding.network_id }
415
+ ];
416
+ }
417
+ }
418
+ break;
419
+ default: {
420
+ configObj.unsafe = {
421
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
422
+ metadata: configObj.unsafe?.metadata ?? void 0
423
+ };
424
+ }
425
+ }
426
+ return configObj;
427
+ }, {});
428
+ }
429
+ __name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
430
+
431
+ // src/construct-wrangler-config.ts
432
+ function constructWranglerConfig(config) {
433
+ const mappedBindings = mapWorkerMetadataBindings(config.bindings);
434
+ const durableObjectClassNames = config.bindings.filter(
435
+ (binding) => binding.type === "durable_object_namespace" && binding.script_name === config.name
436
+ ).map(
437
+ (durableObject) => durableObject.class_name
438
+ );
439
+ const allRoutes = [
440
+ ...config.routes.map((r) => ({
441
+ pattern: r.pattern,
442
+ zone_name: r.zone_name
443
+ })),
444
+ ...config.domains.map((c) => ({
445
+ pattern: c.hostname,
446
+ zone_name: c.zone_name,
447
+ custom_domain: true,
448
+ enabled: c.enabled,
449
+ previews_enabled: c.previews_enabled
450
+ }))
451
+ ];
452
+ return {
453
+ name: config.name,
454
+ main: config.entrypoint,
455
+ workers_dev: config.subdomain.enabled,
456
+ preview_urls: config.subdomain.previews_enabled,
457
+ compatibility_date: config.compatibility_date ?? DEFAULT_COMPAT_DATE,
458
+ compatibility_flags: config.compatibility_flags,
459
+ ...allRoutes.length ? { routes: allRoutes } : {},
460
+ placement: config.placement?.mode === "smart" ? { mode: "smart" } : void 0,
461
+ limits: config.limits,
462
+ ...durableObjectClassNames.length && config.migration_tag ? {
463
+ migrations: [
464
+ {
465
+ tag: config.migration_tag,
466
+ new_classes: durableObjectClassNames
467
+ }
468
+ ]
469
+ } : {},
470
+ ...config.schedules.length ? {
471
+ triggers: {
472
+ crons: config.schedules.map((scheduled) => scheduled.cron)
473
+ }
474
+ } : {},
475
+ tail_consumers: config.tail_consumers ?? void 0,
476
+ observability: config.observability,
477
+ ...mappedBindings
478
+ };
479
+ }
480
+ __name(constructWranglerConfig, "constructWranglerConfig");
481
+
482
+ export { constructWranglerConfig };
@@ -1,6 +1,8 @@
1
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { __name } from './chunk-U6NEESU5.mjs';
2
3
  import assert from 'node:assert';
3
4
 
5
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
4
6
  function isCompatDate(str) {
5
7
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
6
8
  }
@@ -1,4 +1,7 @@
1
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { __name } from './chunk-U6NEESU5.mjs';
3
+
4
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
2
5
 
3
6
  // src/prometheus-metrics.ts
4
7
  var MetricsRegistry = class {
@@ -1,9 +1,12 @@
1
- import { esm_default } from './chunk-MCNIGVAF.mjs';
2
- import { UserError } from './chunk-WO2IAW6M.mjs';
3
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { esm_default } from './chunk-M3RITKR3.mjs';
3
+ import { UserError } from './chunk-OWPFSLY6.mjs';
4
+ import { __name } from './chunk-U6NEESU5.mjs';
4
5
  import { readFileSync as readFileSync$1, statSync, existsSync } from 'node:fs';
5
6
  import path, { resolve, isAbsolute, dirname, join } from 'node:path';
6
7
 
8
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
9
+
7
10
  // src/config/exports.ts
8
11
  function hasKnownExportType(entry) {
9
12
  const type = entry?.type;
@@ -1,10 +1,12 @@
1
- import { dedent } from './chunk-MCNIGVAF.mjs';
2
- import { getEnvironmentVariableFactory, getBooleanEnvironmentVariableFactory } from './chunk-3IYLA2JH.mjs';
3
- import { UserError } from './chunk-WO2IAW6M.mjs';
4
- import { getGlobalConfigPath } from './chunk-34VZWBGB.mjs';
5
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { dedent } from './chunk-M3RITKR3.mjs';
3
+ import { getEnvironmentVariableFactory, getBooleanEnvironmentVariableFactory } from './chunk-QSRIB43D.mjs';
4
+ import { UserError } from './chunk-OWPFSLY6.mjs';
5
+ import { getGlobalConfigPath } from './chunk-MV2OJK3L.mjs';
6
+ import { __name } from './chunk-U6NEESU5.mjs';
6
7
  import path from 'node:path';
7
8
 
9
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
8
10
  var getC3CommandFromEnv = getEnvironmentVariableFactory({
9
11
  variableName: "WRANGLER_C3_COMMAND",
10
12
  defaultValue: /* @__PURE__ */ __name(() => "create cloudflare", "defaultValue")
@@ -1,4 +1,7 @@
1
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { __name } from './chunk-U6NEESU5.mjs';
3
+
4
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
2
5
 
3
6
  // ../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/esm/index.js
4
7
  function dedent(templ) {
@@ -1,6 +1,8 @@
1
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { __name } from './chunk-U6NEESU5.mjs';
2
3
  import fs from 'node:fs';
3
4
 
5
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
4
6
  function isDirectory(path) {
5
7
  return fs.statSync(path, { throwIfNoEntry: false })?.isDirectory() ?? false;
6
8
  }
@@ -1,8 +1,10 @@
1
- import { isDirectory } from './chunk-53IMCORZ.mjs';
2
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { isDirectory } from './chunk-MIA26B4M.mjs';
3
+ import { __name } from './chunk-U6NEESU5.mjs';
3
4
  import os from 'node:os';
4
5
  import path from 'node:path';
5
6
 
7
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
6
8
  function isWindows() {
7
9
  return /^win/i.test(process.platform);
8
10
  }
@@ -1,4 +1,7 @@
1
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { __name } from './chunk-U6NEESU5.mjs';
3
+
4
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
2
5
 
3
6
  // src/errors.ts
4
7
  var UserError = class extends Error {
@@ -1,4 +1,7 @@
1
- import { __export, __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { __export, __name } from './chunk-U6NEESU5.mjs';
3
+
4
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
2
5
 
3
6
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
4
7
  var external_exports = {};
@@ -1,5 +1,8 @@
1
- import { UserError } from './chunk-WO2IAW6M.mjs';
2
- import { __name } from './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ import { UserError } from './chunk-OWPFSLY6.mjs';
3
+ import { __name } from './chunk-U6NEESU5.mjs';
4
+
5
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
3
6
 
4
7
  // src/environment-variables/factory.ts
5
8
  function getBooleanEnvironmentVariableFactory(options) {
@@ -1,3 +1,6 @@
1
+ import { createRequire } from 'node:module';
2
+
3
+ const require$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
1
4
  var __create = Object.create;
2
5
  var __defProp = Object.defineProperty;
3
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -5,10 +8,10 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
8
  var __getProtoOf = Object.getPrototypeOf;
6
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
10
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ var __require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, {
12
+ get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b]
10
13
  }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
14
+ if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
12
15
  throw Error('Dynamic require of "' + x + '" is not supported');
13
16
  });
14
17
  var __commonJS = (cb, mod) => function __require2() {
@@ -1,2 +1,5 @@
1
- export { NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags } from './chunk-C6O4ION7.mjs';
2
- import './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ export { NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags } from './chunk-2Q77CKVU.mjs';
3
+ import './chunk-U6NEESU5.mjs';
4
+
5
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));