@powerlines/plugin-cloudflare 0.6.55 → 0.6.57

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 (71) hide show
  1. package/package.json +8 -8
  2. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  3. package/dist/components/cloudflare-builtin.cjs +0 -917
  4. package/dist/components/cloudflare-builtin.d.cts +0 -12
  5. package/dist/components/cloudflare-builtin.d.cts.map +0 -1
  6. package/dist/components/cloudflare-builtin.d.mts +0 -12
  7. package/dist/components/cloudflare-builtin.d.mts.map +0 -1
  8. package/dist/components/cloudflare-builtin.mjs +0 -915
  9. package/dist/components/cloudflare-builtin.mjs.map +0 -1
  10. package/dist/components/env-builtin.cjs +0 -32
  11. package/dist/components/env-builtin.d.cts +0 -12
  12. package/dist/components/env-builtin.d.cts.map +0 -1
  13. package/dist/components/env-builtin.d.mts +0 -12
  14. package/dist/components/env-builtin.d.mts.map +0 -1
  15. package/dist/components/env-builtin.mjs +0 -30
  16. package/dist/components/env-builtin.mjs.map +0 -1
  17. package/dist/components/index.cjs +0 -8
  18. package/dist/components/index.d.cts +0 -4
  19. package/dist/components/index.d.mts +0 -4
  20. package/dist/components/index.mjs +0 -5
  21. package/dist/components/worker-entry.cjs +0 -203
  22. package/dist/components/worker-entry.d.cts +0 -15
  23. package/dist/components/worker-entry.d.cts.map +0 -1
  24. package/dist/components/worker-entry.d.mts +0 -15
  25. package/dist/components/worker-entry.d.mts.map +0 -1
  26. package/dist/components/worker-entry.mjs +0 -201
  27. package/dist/components/worker-entry.mjs.map +0 -1
  28. package/dist/helpers/constants.cjs +0 -7
  29. package/dist/helpers/constants.d.cts +0 -5
  30. package/dist/helpers/constants.d.cts.map +0 -1
  31. package/dist/helpers/constants.d.mts +0 -5
  32. package/dist/helpers/constants.d.mts.map +0 -1
  33. package/dist/helpers/constants.mjs +0 -6
  34. package/dist/helpers/constants.mjs.map +0 -1
  35. package/dist/helpers/wrangler.cjs +0 -21
  36. package/dist/helpers/wrangler.d.cts +0 -36
  37. package/dist/helpers/wrangler.d.cts.map +0 -1
  38. package/dist/helpers/wrangler.d.mts +0 -36
  39. package/dist/helpers/wrangler.d.mts.map +0 -1
  40. package/dist/helpers/wrangler.mjs +0 -20
  41. package/dist/helpers/wrangler.mjs.map +0 -1
  42. package/dist/index.cjs +0 -190
  43. package/dist/index.d.cts +0 -21
  44. package/dist/index.d.cts.map +0 -1
  45. package/dist/index.d.mts +0 -21
  46. package/dist/index.d.mts.map +0 -1
  47. package/dist/index.mjs +0 -181
  48. package/dist/index.mjs.map +0 -1
  49. package/dist/types/index.cjs +0 -9
  50. package/dist/types/index.d.cts +0 -4
  51. package/dist/types/index.d.mts +0 -4
  52. package/dist/types/index.mjs +0 -3
  53. package/dist/types/plugin.cjs +0 -0
  54. package/dist/types/plugin.d.cts +0 -91
  55. package/dist/types/plugin.d.cts.map +0 -1
  56. package/dist/types/plugin.d.mts +0 -91
  57. package/dist/types/plugin.d.mts.map +0 -1
  58. package/dist/types/plugin.mjs +0 -1
  59. package/dist/types/worker-module.cjs +0 -0
  60. package/dist/types/worker-module.d.cts +0 -42
  61. package/dist/types/worker-module.d.cts.map +0 -1
  62. package/dist/types/worker-module.d.mts +0 -42
  63. package/dist/types/worker-module.d.mts.map +0 -1
  64. package/dist/types/worker-module.mjs +0 -1
  65. package/dist/types/wrangler.cjs +0 -172
  66. package/dist/types/wrangler.d.cts +0 -40
  67. package/dist/types/wrangler.d.cts.map +0 -1
  68. package/dist/types/wrangler.d.mts +0 -40
  69. package/dist/types/wrangler.d.mts.map +0 -1
  70. package/dist/types/wrangler.mjs +0 -163
  71. package/dist/types/wrangler.mjs.map +0 -1
@@ -1,172 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let node_assert = require("node:assert");
4
- node_assert = require_runtime.__toESM(node_assert, 1);
5
- let node_path = require("node:path");
6
- node_path = require_runtime.__toESM(node_path, 1);
7
- let zod = require("zod");
8
- zod = require_runtime.__toESM(zod, 1);
9
-
10
- //#region src/types/wrangler.ts
11
- const LiteralSchema = zod.union([
12
- zod.string(),
13
- zod.number(),
14
- zod.boolean(),
15
- zod.null()
16
- ]);
17
- const JsonSchema = zod.lazy(() => zod.union([
18
- LiteralSchema,
19
- zod.array(JsonSchema),
20
- zod.record(zod.string(), JsonSchema)
21
- ]));
22
- let rootPath;
23
- async function parseWithRootPath(newRootPath, schema, payload, ctx) {
24
- rootPath = newRootPath;
25
- try {
26
- return await schema._zod.parse(payload, ctx);
27
- } finally {
28
- rootPath = void 0;
29
- }
30
- }
31
- const PathSchema = zod.string().transform((p) => {
32
- (0, node_assert.default)(rootPath !== void 0, "Expected `PathSchema` to be parsed within `parseWithRootPath()`");
33
- return node_path.default.resolve(rootPath, p);
34
- });
35
- function isCyclic(value, seen = /* @__PURE__ */ new Set()) {
36
- if (typeof value !== "object" || value === null) return false;
37
- for (const child of Object.values(value)) {
38
- if (seen.has(child)) return true;
39
- seen.add(child);
40
- if (isCyclic(child, seen)) return true;
41
- seen.delete(child);
42
- }
43
- return false;
44
- }
45
- /**
46
- * This is the static type definition for the configuration object.
47
- *
48
- * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
49
- * and optionally augment with arguments passed directly to wrangler.
50
- *
51
- * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
52
- *
53
- * @remarks
54
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
55
- * in the top level config and should not appear in any environments.
56
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
57
- * - All top level fields in config and environments are optional in the Wrangler configuration file.
58
- */
59
- const defaultWranglerConfig = {
60
- configPath: void 0,
61
- userConfigPath: void 0,
62
- topLevelName: void 0,
63
- definedEnvironments: void 0,
64
- targetEnvironment: void 0,
65
- pages_build_output_dir: void 0,
66
- send_metrics: void 0,
67
- dev: {
68
- ip: process.platform === "win32" ? "127.0.0.1" : "localhost",
69
- port: void 0,
70
- inspector_port: void 0,
71
- inspector_ip: void 0,
72
- local_protocol: "http",
73
- upstream_protocol: "http",
74
- host: void 0,
75
- enable_containers: true,
76
- container_engine: void 0,
77
- generate_types: false
78
- },
79
- /** INHERITABLE ENVIRONMENT FIELDS */
80
- name: void 0,
81
- compatibility_date: void 0,
82
- compatibility_flags: [],
83
- limits: void 0,
84
- placement: void 0,
85
- /** NON-INHERITABLE ENVIRONMENT FIELDS */
86
- vars: {},
87
- durable_objects: { bindings: [] },
88
- kv_namespaces: [],
89
- queues: {
90
- producers: [],
91
- consumers: []
92
- },
93
- r2_buckets: [],
94
- d1_databases: [],
95
- vectorize: [],
96
- hyperdrive: [],
97
- workflows: [],
98
- secrets_store_secrets: [],
99
- services: [],
100
- analytics_engine_datasets: [],
101
- ai: void 0,
102
- images: void 0,
103
- stream: void 0,
104
- media: void 0,
105
- version_metadata: void 0,
106
- unsafe_hello_world: [],
107
- ratelimits: [],
108
- worker_loaders: [],
109
- legacy_env: true,
110
- site: void 0,
111
- wasm_modules: void 0,
112
- text_blobs: void 0,
113
- data_blobs: void 0,
114
- keep_vars: void 0,
115
- alias: void 0,
116
- /** INHERITABLE ENVIRONMENT FIELDS */
117
- account_id: void 0,
118
- main: void 0,
119
- find_additional_modules: void 0,
120
- preserve_file_names: void 0,
121
- base_dir: void 0,
122
- workers_dev: void 0,
123
- preview_urls: void 0,
124
- route: void 0,
125
- routes: void 0,
126
- tsconfig: void 0,
127
- jsx_factory: "React.createElement",
128
- jsx_fragment: "React.Fragment",
129
- migrations: [],
130
- triggers: { crons: void 0 },
131
- rules: [],
132
- build: {
133
- command: void 0,
134
- watch_dir: "./src",
135
- cwd: void 0
136
- },
137
- no_bundle: void 0,
138
- minify: void 0,
139
- keep_names: void 0,
140
- dispatch_namespaces: [],
141
- first_party_worker: void 0,
142
- logfwdr: { bindings: [] },
143
- logpush: void 0,
144
- upload_source_maps: void 0,
145
- assets: void 0,
146
- observability: { enabled: true },
147
- cache: void 0,
148
- /** The default here is undefined so that we can delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable. */
149
- compliance_region: void 0,
150
- python_modules: { exclude: ["**/*.pyc"] },
151
- /** NON-INHERITABLE ENVIRONMENT FIELDS */
152
- define: {},
153
- cloudchamber: {},
154
- containers: void 0,
155
- send_email: [],
156
- browser: void 0,
157
- unsafe: {},
158
- mtls_certificates: [],
159
- tail_consumers: void 0,
160
- streaming_tail_consumers: void 0,
161
- pipelines: [],
162
- vpc_services: [],
163
- ai_search_namespaces: []
164
- };
165
-
166
- //#endregion
167
- exports.JsonSchema = JsonSchema;
168
- exports.LiteralSchema = LiteralSchema;
169
- exports.PathSchema = PathSchema;
170
- exports.defaultWranglerConfig = defaultWranglerConfig;
171
- exports.isCyclic = isCyclic;
172
- exports.parseWithRootPath = parseWithRootPath;
@@ -1,40 +0,0 @@
1
- import { Unstable_Config, Unstable_RawConfig } from "wrangler";
2
- import * as z from "zod";
3
- import * as z4 from "zod/v4/core";
4
-
5
- //#region src/types/wrangler.d.ts
6
- type OptionalZodTypeOf<T extends z4.$ZodType | undefined> = T extends z4.$ZodType ? z4.infer<T> : undefined;
7
- declare const LiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
8
- type Literal = z.infer<typeof LiteralSchema>;
9
- type Json = Literal | {
10
- [key: string]: Json;
11
- } | Json[];
12
- declare const JsonSchema: z.ZodType<Json>;
13
- declare function parseWithRootPath<Z extends z4.$ZodType>(newRootPath: string, schema: Z, payload: z4.ParsePayload<any>, ctx: z.core.ParseContextInternal): Promise<z.core.ParsePayload<unknown>>;
14
- declare const PathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
15
- declare function isCyclic(value: unknown, seen?: Set<unknown>): boolean;
16
- type WranglerUserConfig = Unstable_RawConfig;
17
- /**
18
- * This is the static type definition for the configuration object.
19
- *
20
- * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
21
- * and optionally augment with arguments passed directly to wrangler.
22
- *
23
- * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
24
- *
25
- * @remarks
26
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
27
- * in the top level config and should not appear in any environments.
28
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
29
- * - All top level fields in config and environments are optional in the Wrangler configuration file.
30
- */
31
- type WranglerResolvedConfig = Unstable_Config;
32
- declare const defaultWranglerConfig: WranglerResolvedConfig;
33
- declare type __ΩOptionalZodTypeOf = any[];
34
- declare type __ΩLiteral = any[];
35
- declare type __ΩJson = any[];
36
- declare type __ΩWranglerUserConfig = any[];
37
- declare type __ΩWranglerResolvedConfig = any[];
38
- //#endregion
39
- export { Json, JsonSchema, Literal, LiteralSchema, OptionalZodTypeOf, PathSchema, WranglerResolvedConfig, WranglerUserConfig, __ΩJson, __ΩLiteral, __ΩOptionalZodTypeOf, __ΩWranglerResolvedConfig, __ΩWranglerUserConfig, defaultWranglerConfig, isCyclic, parseWithRootPath };
40
- //# sourceMappingURL=wrangler.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrangler.d.cts","names":[],"sources":["../../src/types/wrangler.ts"],"mappings":";;;;;KAyBY,iBAAA,WAA4B,EAAA,CAAG,QAAA,gBACzC,CAAA,SAAU,EAAA,CAAG,QAAA,GAAW,EAAA,CAAG,KAAA,CAAM,CAAA;AAAA,cAGtB,aAAA,EAAa,CAAA,CAAA,QAAA,WAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,UAAA,EAAA,CAAA,CAAA,OAAA;AAAA,KAMd,OAAA,GAAU,CAAA,CAAE,KAAA,QAAa,aAAA;AAAA,KACzB,IAAA,GAAO,OAAA;EAAA,CAAa,GAAA,WAAc,IAAA;AAAA,IAAS,IAAA;AAAA,cAC1C,UAAA,EAAY,CAAA,CAAE,OAAA,CAAQ,IAAA;AAAA,iBASb,iBAAA,WAA4B,EAAA,CAAG,QAAA,CAAA,CACnD,WAAA,UACA,MAAA,EAAQ,CAAA,EACR,OAAA,EAAS,EAAA,CAAG,YAAA,OACZ,GAAA,EAAK,CAAA,CAAE,IAAA,CAAK,oBAAA,GAAoB,OAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA;AAAA,cASrB,UAAA,EAAU,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,YAAA;AAAA,iBAQP,QAAA,CAAS,KAAA,WAAgB,IAAA,GAAI,GAAA;AAAA,KAWjC,kBAAA,GAAqB,kBAAA;;;;;;;;;;;;;AAjDjC;;KAkEY,sBAAA,GAAyB,eAAA;AAAA,cAExB,qBAAA,EAAuB,sBAAA;AAAA"}
@@ -1,40 +0,0 @@
1
- import { Unstable_Config, Unstable_RawConfig } from "wrangler";
2
- import * as z from "zod";
3
- import * as z4 from "zod/v4/core";
4
-
5
- //#region src/types/wrangler.d.ts
6
- type OptionalZodTypeOf<T extends z4.$ZodType | undefined> = T extends z4.$ZodType ? z4.infer<T> : undefined;
7
- declare const LiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
8
- type Literal = z.infer<typeof LiteralSchema>;
9
- type Json = Literal | {
10
- [key: string]: Json;
11
- } | Json[];
12
- declare const JsonSchema: z.ZodType<Json>;
13
- declare function parseWithRootPath<Z extends z4.$ZodType>(newRootPath: string, schema: Z, payload: z4.ParsePayload<any>, ctx: z.core.ParseContextInternal): Promise<z.core.ParsePayload<unknown>>;
14
- declare const PathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
15
- declare function isCyclic(value: unknown, seen?: Set<unknown>): boolean;
16
- type WranglerUserConfig = Unstable_RawConfig;
17
- /**
18
- * This is the static type definition for the configuration object.
19
- *
20
- * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
21
- * and optionally augment with arguments passed directly to wrangler.
22
- *
23
- * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
24
- *
25
- * @remarks
26
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
27
- * in the top level config and should not appear in any environments.
28
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
29
- * - All top level fields in config and environments are optional in the Wrangler configuration file.
30
- */
31
- type WranglerResolvedConfig = Unstable_Config;
32
- declare const defaultWranglerConfig: WranglerResolvedConfig;
33
- declare type __ΩOptionalZodTypeOf = any[];
34
- declare type __ΩLiteral = any[];
35
- declare type __ΩJson = any[];
36
- declare type __ΩWranglerUserConfig = any[];
37
- declare type __ΩWranglerResolvedConfig = any[];
38
- //#endregion
39
- export { Json, JsonSchema, Literal, LiteralSchema, OptionalZodTypeOf, PathSchema, WranglerResolvedConfig, WranglerUserConfig, __ΩJson, __ΩLiteral, __ΩOptionalZodTypeOf, __ΩWranglerResolvedConfig, __ΩWranglerUserConfig, defaultWranglerConfig, isCyclic, parseWithRootPath };
40
- //# sourceMappingURL=wrangler.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrangler.d.mts","names":[],"sources":["../../src/types/wrangler.ts"],"mappings":";;;;;KAyBY,iBAAA,WAA4B,EAAA,CAAG,QAAA,gBACzC,CAAA,SAAU,EAAA,CAAG,QAAA,GAAW,EAAA,CAAG,KAAA,CAAM,CAAA;AAAA,cAGtB,aAAA,EAAa,CAAA,CAAA,QAAA,WAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,UAAA,EAAA,CAAA,CAAA,OAAA;AAAA,KAMd,OAAA,GAAU,CAAA,CAAE,KAAA,QAAa,aAAA;AAAA,KACzB,IAAA,GAAO,OAAA;EAAA,CAAa,GAAA,WAAc,IAAA;AAAA,IAAS,IAAA;AAAA,cAC1C,UAAA,EAAY,CAAA,CAAE,OAAA,CAAQ,IAAA;AAAA,iBASb,iBAAA,WAA4B,EAAA,CAAG,QAAA,CAAA,CACnD,WAAA,UACA,MAAA,EAAQ,CAAA,EACR,OAAA,EAAS,EAAA,CAAG,YAAA,OACZ,GAAA,EAAK,CAAA,CAAE,IAAA,CAAK,oBAAA,GAAoB,OAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA;AAAA,cASrB,UAAA,EAAU,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,YAAA;AAAA,iBAQP,QAAA,CAAS,KAAA,WAAgB,IAAA,GAAI,GAAA;AAAA,KAWjC,kBAAA,GAAqB,kBAAA;;;;;;;;;;;;;AAjDjC;;KAkEY,sBAAA,GAAyB,eAAA;AAAA,cAExB,qBAAA,EAAuB,sBAAA;AAAA"}
@@ -1,163 +0,0 @@
1
- import assert from "node:assert";
2
- import path from "node:path";
3
- import * as z from "zod";
4
-
5
- //#region src/types/wrangler.ts
6
- const LiteralSchema = z.union([
7
- z.string(),
8
- z.number(),
9
- z.boolean(),
10
- z.null()
11
- ]);
12
- const JsonSchema = z.lazy(() => z.union([
13
- LiteralSchema,
14
- z.array(JsonSchema),
15
- z.record(z.string(), JsonSchema)
16
- ]));
17
- let rootPath;
18
- async function parseWithRootPath(newRootPath, schema, payload, ctx) {
19
- rootPath = newRootPath;
20
- try {
21
- return await schema._zod.parse(payload, ctx);
22
- } finally {
23
- rootPath = void 0;
24
- }
25
- }
26
- const PathSchema = z.string().transform((p) => {
27
- assert(rootPath !== void 0, "Expected `PathSchema` to be parsed within `parseWithRootPath()`");
28
- return path.resolve(rootPath, p);
29
- });
30
- function isCyclic(value, seen = /* @__PURE__ */ new Set()) {
31
- if (typeof value !== "object" || value === null) return false;
32
- for (const child of Object.values(value)) {
33
- if (seen.has(child)) return true;
34
- seen.add(child);
35
- if (isCyclic(child, seen)) return true;
36
- seen.delete(child);
37
- }
38
- return false;
39
- }
40
- /**
41
- * This is the static type definition for the configuration object.
42
- *
43
- * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
44
- * and optionally augment with arguments passed directly to wrangler.
45
- *
46
- * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
47
- *
48
- * @remarks
49
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
50
- * in the top level config and should not appear in any environments.
51
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
52
- * - All top level fields in config and environments are optional in the Wrangler configuration file.
53
- */
54
- const defaultWranglerConfig = {
55
- configPath: void 0,
56
- userConfigPath: void 0,
57
- topLevelName: void 0,
58
- definedEnvironments: void 0,
59
- targetEnvironment: void 0,
60
- pages_build_output_dir: void 0,
61
- send_metrics: void 0,
62
- dev: {
63
- ip: process.platform === "win32" ? "127.0.0.1" : "localhost",
64
- port: void 0,
65
- inspector_port: void 0,
66
- inspector_ip: void 0,
67
- local_protocol: "http",
68
- upstream_protocol: "http",
69
- host: void 0,
70
- enable_containers: true,
71
- container_engine: void 0,
72
- generate_types: false
73
- },
74
- /** INHERITABLE ENVIRONMENT FIELDS */
75
- name: void 0,
76
- compatibility_date: void 0,
77
- compatibility_flags: [],
78
- limits: void 0,
79
- placement: void 0,
80
- /** NON-INHERITABLE ENVIRONMENT FIELDS */
81
- vars: {},
82
- durable_objects: { bindings: [] },
83
- kv_namespaces: [],
84
- queues: {
85
- producers: [],
86
- consumers: []
87
- },
88
- r2_buckets: [],
89
- d1_databases: [],
90
- vectorize: [],
91
- hyperdrive: [],
92
- workflows: [],
93
- secrets_store_secrets: [],
94
- services: [],
95
- analytics_engine_datasets: [],
96
- ai: void 0,
97
- images: void 0,
98
- stream: void 0,
99
- media: void 0,
100
- version_metadata: void 0,
101
- unsafe_hello_world: [],
102
- ratelimits: [],
103
- worker_loaders: [],
104
- legacy_env: true,
105
- site: void 0,
106
- wasm_modules: void 0,
107
- text_blobs: void 0,
108
- data_blobs: void 0,
109
- keep_vars: void 0,
110
- alias: void 0,
111
- /** INHERITABLE ENVIRONMENT FIELDS */
112
- account_id: void 0,
113
- main: void 0,
114
- find_additional_modules: void 0,
115
- preserve_file_names: void 0,
116
- base_dir: void 0,
117
- workers_dev: void 0,
118
- preview_urls: void 0,
119
- route: void 0,
120
- routes: void 0,
121
- tsconfig: void 0,
122
- jsx_factory: "React.createElement",
123
- jsx_fragment: "React.Fragment",
124
- migrations: [],
125
- triggers: { crons: void 0 },
126
- rules: [],
127
- build: {
128
- command: void 0,
129
- watch_dir: "./src",
130
- cwd: void 0
131
- },
132
- no_bundle: void 0,
133
- minify: void 0,
134
- keep_names: void 0,
135
- dispatch_namespaces: [],
136
- first_party_worker: void 0,
137
- logfwdr: { bindings: [] },
138
- logpush: void 0,
139
- upload_source_maps: void 0,
140
- assets: void 0,
141
- observability: { enabled: true },
142
- cache: void 0,
143
- /** The default here is undefined so that we can delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable. */
144
- compliance_region: void 0,
145
- python_modules: { exclude: ["**/*.pyc"] },
146
- /** NON-INHERITABLE ENVIRONMENT FIELDS */
147
- define: {},
148
- cloudchamber: {},
149
- containers: void 0,
150
- send_email: [],
151
- browser: void 0,
152
- unsafe: {},
153
- mtls_certificates: [],
154
- tail_consumers: void 0,
155
- streaming_tail_consumers: void 0,
156
- pipelines: [],
157
- vpc_services: [],
158
- ai_search_namespaces: []
159
- };
160
-
161
- //#endregion
162
- export { JsonSchema, LiteralSchema, PathSchema, defaultWranglerConfig, isCyclic, parseWithRootPath };
163
- //# sourceMappingURL=wrangler.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrangler.mjs","names":[],"sources":["../../src/types/wrangler.ts"],"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 assert from \"node:assert\";\nimport path from \"node:path\";\n\nimport type { Unstable_Config, Unstable_RawConfig } from \"wrangler\";\nimport * as z from \"zod\";\nimport * as z4 from \"zod/v4/core\";\n\nexport type OptionalZodTypeOf<T extends z4.$ZodType | undefined> =\n T extends z4.$ZodType ? z4.infer<T> : undefined;\n\n// https://github.com/colinhacks/zod/blob/59768246aa57133184b2cf3f7c2a1ba5c3ab08c3/README.md?plain=1#L1302-L1317\nexport const LiteralSchema = z.union([\n z.string(),\n z.number(),\n z.boolean(),\n z.null()\n]);\nexport type Literal = z.infer<typeof LiteralSchema>;\nexport type Json = Literal | { [key: string]: Json } | Json[];\nexport const JsonSchema: z.ZodType<Json> = z.lazy(() =>\n z.union([\n LiteralSchema,\n z.array(JsonSchema),\n z.record(z.string(), JsonSchema)\n ])\n);\n\nlet rootPath: string | undefined;\nexport async function parseWithRootPath<Z extends z4.$ZodType>(\n newRootPath: string,\n schema: Z,\n payload: z4.ParsePayload<any>,\n ctx: z.core.ParseContextInternal\n) {\n rootPath = newRootPath;\n try {\n return await schema._zod.parse(payload, ctx);\n } finally {\n rootPath = undefined;\n }\n}\nexport const PathSchema = z.string().transform(p => {\n assert(\n rootPath !== undefined,\n \"Expected `PathSchema` to be parsed within `parseWithRootPath()`\"\n );\n return path.resolve(rootPath, p);\n});\n\nexport function isCyclic(value: unknown, seen = new Set<unknown>()) {\n if (typeof value !== \"object\" || value === null) return false;\n for (const child of Object.values(value)) {\n if (seen.has(child)) return true;\n seen.add(child);\n if (isCyclic(child, seen)) return true;\n seen.delete(child);\n }\n return false;\n}\n\nexport type WranglerUserConfig = Unstable_RawConfig;\n\n/**\n * This is the static type definition for the configuration object.\n *\n * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,\n * and optionally augment with arguments passed directly to wrangler.\n *\n * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration\n *\n * @remarks\n * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear\n * in the top level config and should not appear in any environments.\n * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects\n * - All top level fields in config and environments are optional in the Wrangler configuration file.\n */\n\nexport type WranglerResolvedConfig = Unstable_Config;\n\nexport const defaultWranglerConfig: WranglerResolvedConfig = {\n /* COMPUTED_FIELDS */\n configPath: undefined,\n userConfigPath: undefined,\n topLevelName: undefined,\n definedEnvironments: undefined,\n targetEnvironment: undefined,\n\n /*= =================================================== */\n /* Fields supported by both Workers & Pages */\n /*= =================================================== */\n /* TOP-LEVEL ONLY FIELDS */\n pages_build_output_dir: undefined,\n send_metrics: undefined,\n dev: {\n ip: process.platform === \"win32\" ? \"127.0.0.1\" : \"localhost\",\n port: undefined, // the default of 8787 is set at runtime\n inspector_port: undefined, // the default of 9229 is set at runtime\n inspector_ip: undefined, // the default of 127.0.0.1 is set at runtime\n local_protocol: \"http\",\n upstream_protocol: \"http\",\n host: undefined,\n // Note this one is also workers only\n enable_containers: true,\n container_engine: undefined,\n generate_types: false\n },\n\n /** INHERITABLE ENVIRONMENT FIELDS */\n name: undefined,\n compatibility_date: undefined,\n compatibility_flags: [],\n limits: undefined,\n placement: undefined,\n\n /** NON-INHERITABLE ENVIRONMENT FIELDS */\n vars: {},\n durable_objects: { bindings: [] },\n kv_namespaces: [],\n queues: {\n producers: [],\n consumers: [] // WORKERS SUPPORT ONLY!!\n },\n r2_buckets: [],\n d1_databases: [],\n vectorize: [],\n hyperdrive: [],\n workflows: [],\n secrets_store_secrets: [],\n services: [],\n analytics_engine_datasets: [],\n ai: undefined,\n images: undefined,\n stream: undefined,\n media: undefined,\n version_metadata: undefined,\n unsafe_hello_world: [],\n ratelimits: [],\n worker_loaders: [],\n\n /*= =================================================== */\n /* Fields supported by Workers only */\n /*= =================================================== */\n /* TOP-LEVEL ONLY FIELDS */\n legacy_env: true,\n site: undefined,\n wasm_modules: undefined,\n text_blobs: undefined,\n data_blobs: undefined,\n keep_vars: undefined,\n alias: undefined,\n\n /** INHERITABLE ENVIRONMENT FIELDS */\n account_id: undefined,\n main: undefined,\n find_additional_modules: undefined,\n preserve_file_names: undefined,\n base_dir: undefined,\n workers_dev: undefined,\n preview_urls: undefined,\n route: undefined,\n routes: undefined,\n tsconfig: undefined,\n jsx_factory: \"React.createElement\",\n jsx_fragment: \"React.Fragment\",\n migrations: [],\n triggers: {\n crons: undefined\n },\n rules: [],\n build: { command: undefined, watch_dir: \"./src\", cwd: undefined },\n no_bundle: undefined,\n minify: undefined,\n keep_names: undefined,\n dispatch_namespaces: [],\n first_party_worker: undefined,\n logfwdr: { bindings: [] },\n logpush: undefined,\n upload_source_maps: undefined,\n assets: undefined,\n observability: { enabled: true },\n cache: undefined,\n /** The default here is undefined so that we can delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable. */\n compliance_region: undefined,\n python_modules: { exclude: [\"**/*.pyc\"] },\n\n /** NON-INHERITABLE ENVIRONMENT FIELDS */\n define: {},\n cloudchamber: {},\n containers: undefined,\n send_email: [],\n browser: undefined,\n unsafe: {},\n mtls_certificates: [],\n tail_consumers: undefined,\n streaming_tail_consumers: undefined,\n pipelines: [],\n vpc_services: [],\n ai_search_namespaces: []\n} as unknown as WranglerResolvedConfig;\n"],"mappings":";;;;;AAuBA,MAAY,gBAAgB,EAAA,MAAK;CAAA,EAAA,QAAA;CAAA,EAAA,QAAA;CAAA,EAAA,SAAA;CAAA,EAAA,MAAA;CAAA,CAAA;;;;;;AAEjC,IAAA;AACA,eAAgB,kBAAwB,aAAS,QAAA,SAAA,KAAA;;AAE/C,KAAC;SACI,MAAM,OAAA,KAAgB,MAAE,SAAM,IAAA;WACzB;AACR,aAAQ;;;AAGZ,MAAE,aAAA,EAAA,QAAA,CAAA,WAAA,MAAA;AACF,QAAO,aAAe,QAAQ,kEAAqB;AACnD,QAAO,KAAK,QAAO,UAAa,EAAA;EAChC;AACA,SAAU,SAAA,OAAA,uBAAA,IAAA,KAAA,EAAA;AACR,KAAE,OAAA,UAAa,YAAA,UAAA,KAAA,QAAA;AACf,MAAI,MAAM,SAAU,OAAC,OAAA,MAAA,EAAA;AACnB,MAAE,KAAO,IAAE,MAAQ,CAAE,QAAA;AACtB,OAAA,IAAA,MAAA;AACF,MAAA,SAAA,OAAA,KAAA,CAAA,QAAA;;;AAGD,QAAO;;;;;;;;;;;;;;;;AAkBP,MAAa,wBAAqB;;CAGlC,gBAAgB;CACd,cAAW;CACX,qBAAoB;CACpB,mBAAe;CAKf,wBAAY;CACd,cAAA;;EAEA,IAAO,QAAK,aAAA,UAAqB,cAAkB;;EAGhD,gBAAY;EAEZ,cAAc;EAEhB,gBAAA;EACE,mBAAoB;EACtB,MAAA;EAEG,mBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;EACjB;;;CAGH,oBAAY;;CAEZ,QAAO;CACL,WAAG;;CAEH,MAAA,EAAA;CACA,iBAAc,EACd,UAAA,EAAA,EACA;;CAEA,QAAQ;EACN,WAAM,EAAO;EACb,WAAW,EAAE;EACd;CACD,YAAA,EAAA;CACA,cAAc,EAAA;CACd,WAAK,EAAA;CACL,YAAM,EAAQ;CACd,WAAQ,EAAA;CACR,uBAAkB,EAAA;CAClB,UAAE,EAAA;CACF,2BAAwB,EAAA;CACxB,IAAE;CACF,QAAQ;CACR,QAAK;CACL,OAAE;CACF,kBAAkB;CAClB,oBAAkB,EAAA;CAClB,YAAC,EAAA;;CAMD,YAAQ;CACR,MAAA;;CAEA,YAAQ;CACR,YAAQ;CACR,WAAA;CACA,OAAA;;CAEA,YAAY;CACZ,MAAE;CACF,yBAAC;CACD,qBAAc;CACd,UAAA;CACA,aAAa;CACb,cAAc;CACd,OAAA;CACA,QAAA;CACA,UAAU;CACV,aAAA;CACA,cAAa;CACb,YAAQ,EAAA;CACR,UAAQ,EACR,OAAO,QACP;CACA,OAAA,EAAA;CACA,OAAA;EACA,SAAA;;EAEE,KAAK;EACN;CACD,WAAW;CACX,QAAO;CACP,YAAY;CACZ,qBAAe,EAAA;CACf,oBAAc;CACd,SAAA,EACA,UAAY,EAAA,EACZ;CACA,SAAO;;CAEP,QAAI;CACJ,eAAY,EACZ,SAAM,MACN;CACA,OAAA;;CAEA,mBAAa;CACb,gBAAc,EACd,SAAO,CAAA,WAAS,EAChB;;CAEA,QAAA,EAAA;CACA,cAAc,EAAC;CACf,YAAY;CACZ,YAAU,EAAA;CACV,SAAS;CACT,QAAC,EAAA;CACD,mBAAS,EAAA;CACT,gBAAgB;CAChB,0BAAoB;CACpB,WAAQ,EAAA;CACR,cAAY,EAAA;CACZ,sBAAsB,EAAC;CACxB"}