@powerlines/plugin-cloudflare 0.6.315 → 0.6.317

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 (65) hide show
  1. package/dist/cloudflare-builtin-lvchn8aN.d.cts +10 -0
  2. package/dist/cloudflare-builtin-lvchn8aN.d.cts.map +1 -0
  3. package/dist/cloudflare-builtin-lvchn8aN.d.mts +10 -0
  4. package/dist/cloudflare-builtin-lvchn8aN.d.mts.map +1 -0
  5. package/dist/components/cloudflare-builtin.cjs +2 -2
  6. package/dist/components/cloudflare-builtin.d.cts +2 -10
  7. package/dist/components/cloudflare-builtin.d.mts +2 -10
  8. package/dist/components/env-builtin.cjs +2 -2
  9. package/dist/components/env-builtin.d.cts +2 -10
  10. package/dist/components/env-builtin.d.mts +2 -10
  11. package/dist/components/index.d.cts +3 -3
  12. package/dist/components/index.d.mts +3 -3
  13. package/dist/components/worker-entry.cjs +2 -2
  14. package/dist/components/worker-entry.d.cts +2 -14
  15. package/dist/components/worker-entry.d.mts +2 -14
  16. package/dist/env-builtin-DBC3IzNC.d.cts +10 -0
  17. package/dist/env-builtin-DBC3IzNC.d.cts.map +1 -0
  18. package/dist/env-builtin-DBC3IzNC.d.mts +10 -0
  19. package/dist/env-builtin-DBC3IzNC.d.mts.map +1 -0
  20. package/dist/index-CzSH-wX5.d.mts +3 -0
  21. package/dist/index-DKQw89Z9.d.cts +3 -0
  22. package/dist/index.cjs +5 -5
  23. package/dist/index.d.cts +7 -7
  24. package/dist/index.d.mts +7 -7
  25. package/dist/plugin-DHHBrJ0X.d.cts +84 -0
  26. package/dist/plugin-DHHBrJ0X.d.cts.map +1 -0
  27. package/dist/plugin-QOCaPGt-.d.mts +84 -0
  28. package/dist/plugin-QOCaPGt-.d.mts.map +1 -0
  29. package/dist/{_virtual/_rolldown/runtime.cjs → rolldown-runtime-C24Yb2bl.cjs} +6 -1
  30. package/dist/types/index.cjs +2 -0
  31. package/dist/types/index.d.cts +4 -3
  32. package/dist/types/index.d.mts +4 -3
  33. package/dist/types/index.mjs +2 -0
  34. package/dist/types/plugin.d.cts +2 -84
  35. package/dist/types/plugin.d.mts +2 -84
  36. package/dist/types/worker-module.d.cts +2 -39
  37. package/dist/types/worker-module.d.mts +2 -39
  38. package/dist/types/wrangler.cjs +4 -4
  39. package/dist/types/wrangler.d.cts +2 -34
  40. package/dist/types/wrangler.d.mts +2 -34
  41. package/dist/worker-entry-CReS1fQZ.d.mts +14 -0
  42. package/dist/worker-entry-CReS1fQZ.d.mts.map +1 -0
  43. package/dist/worker-entry-CiarlLKk.d.cts +14 -0
  44. package/dist/worker-entry-CiarlLKk.d.cts.map +1 -0
  45. package/dist/worker-module-CfGxF7da.d.cts +39 -0
  46. package/dist/worker-module-CfGxF7da.d.cts.map +1 -0
  47. package/dist/worker-module-DVjaixwZ.d.mts +39 -0
  48. package/dist/worker-module-DVjaixwZ.d.mts.map +1 -0
  49. package/dist/wrangler-DuuHql6r.d.cts +34 -0
  50. package/dist/wrangler-DuuHql6r.d.cts.map +1 -0
  51. package/dist/wrangler-DuuHql6r.d.mts +34 -0
  52. package/dist/wrangler-DuuHql6r.d.mts.map +1 -0
  53. package/package.json +9 -9
  54. package/dist/components/cloudflare-builtin.d.cts.map +0 -1
  55. package/dist/components/cloudflare-builtin.d.mts.map +0 -1
  56. package/dist/components/env-builtin.d.cts.map +0 -1
  57. package/dist/components/env-builtin.d.mts.map +0 -1
  58. package/dist/components/worker-entry.d.cts.map +0 -1
  59. package/dist/components/worker-entry.d.mts.map +0 -1
  60. package/dist/types/plugin.d.cts.map +0 -1
  61. package/dist/types/plugin.d.mts.map +0 -1
  62. package/dist/types/worker-module.d.cts.map +0 -1
  63. package/dist/types/worker-module.d.mts.map +0 -1
  64. package/dist/types/wrangler.d.cts.map +0 -1
  65. package/dist/types/wrangler.d.mts.map +0 -1
@@ -1,84 +1,2 @@
1
- import { WranglerResolvedConfig } from "./wrangler.mjs";
2
- import { WorkerModuleMetadata } from "./worker-module.mjs";
3
- import { PulumiPluginContext, PulumiPluginOptions, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
4
- import { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig } from "@powerlines/plugin-unenv";
5
- import { ExportedHandler } from "@cloudflare/workers-types";
6
- import { EnvPluginContext, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env";
7
- import { RequiredKeys } from "@stryke/types/base";
8
- import { PluginContext, ResolvedEntryFileReference } from "powerlines";
9
- //#region src/types/plugin.d.ts
10
- interface CloudflarePluginOptions {
11
- /**
12
- * The Cloudflare account ID to use for the plugin.
13
- *
14
- * @remarks
15
- * This is required for certain features of the plugin, such as deploying a Cloudflare Worker entry module. This option can also be set via the `CLOUDFLARE_ACCOUNT_ID` environment variable. If both are provided, the value from the plugin options will take precedence.
16
- *
17
- * @see https://developers.cloudflare.com/fundamentals/account/find-account-and-zone-ids/
18
- */
19
- accountId?: string;
20
- /**
21
- * The Cloudflare API token to use for the plugin.
22
- *
23
- * @remarks
24
- * This option can also be set via the `CLOUDFLARE_API_TOKEN` environment variable. If both are provided, the value from the plugin options will take precedence.
25
- *
26
- * @see https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
27
- */
28
- apiToken?: string;
29
- /**
30
- * A path to the Wrangler configuration file (either `.toml` or `.jsonc`) to use as the base configuration for the plugin.
31
- *
32
- * @remarks
33
- * This is required for certain features of the plugin, such as deploying a Cloudflare Worker entry module. If not provided, the plugin will look for a Wrangler configuration file in the project root directory with the default name `wrangler.toml`. You can also specify a custom path to the Wrangler configuration file using this option.
34
- */
35
- configPath?: string;
36
- /**
37
- * The domain to use for the Cloudflare deployed resources.
38
- */
39
- domain?: string;
40
- /**
41
- * The [unenv](https://unjs.dev/packages/unenv) plugin configuration options.
42
- *
43
- * @remarks
44
- * 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.
45
- */
46
- unenv?: UnenvPluginOptions;
47
- /**
48
- * The configuration options for Pulumi.
49
- */
50
- pulumi?: PulumiPluginOptions;
51
- }
52
- type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & UnenvPluginUserConfig & {
53
- /**
54
- * Options for the Cloudflare plugin.
55
- */
56
- cloudflare?: Omit<CloudflarePluginOptions, "unenv" | "pulumi">;
57
- };
58
- type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginResolvedConfig & UnenvPluginResolvedConfig & {
59
- /**
60
- * Options for the Cloudflare plugin.
61
- */
62
- cloudflare: Required<Omit<CloudflarePluginOptions, "unenv" | "pulumi">>;
63
- };
64
- type CloudflareWorkerMetadata = RequiredKeys<WorkerModuleMetadata, "name" | "pattern"> & {
65
- /**
66
- * The resolved entry definition for the Worker module, including the original entry definition and the resolved file path to the module.
67
- */
68
- entry: ResolvedEntryFileReference;
69
- };
70
- type CloudflareWorkerEntryModule = Record<keyof ExportedHandler, boolean> & {
71
- /**
72
- * 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.
73
- */
74
- metadata: CloudflareWorkerMetadata;
75
- };
76
- type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & UnenvPluginContext<TResolvedConfig> & {
77
- cloudflare: {
78
- wrangler?: WranglerResolvedConfig;
79
- workers: CloudflareWorkerEntryModule[];
80
- };
81
- };
82
- //#endregion
83
- export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata };
84
- //# sourceMappingURL=plugin.d.mts.map
1
+ import { a as CloudflareWorkerEntryModule, i as CloudflarePluginUserConfig, n as CloudflarePluginOptions, o as CloudflareWorkerMetadata, r as CloudflarePluginResolvedConfig, t as CloudflarePluginContext } from "../plugin-QOCaPGt-.mjs";
2
+ export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata };
@@ -1,39 +1,2 @@
1
- import { WranglerUserConfig } from "./wrangler.cjs";
2
- import { ExportedHandler } from "@cloudflare/workers-types";
3
- //#region src/types/worker-module.d.ts
4
- type WorkerModuleMetadata = Partial<Omit<WranglerUserConfig, "account_id" | "name">> & {
5
- /**
6
- * The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
7
- *
8
- * @remarks
9
- * If no value is provided, the {@link Config.name} configuration value will be used.
10
- */
11
- name?: string;
12
- /**
13
- * A path to the Wrangler configuration file (either `.toml` or `.jsonc`) to use as the base configuration for the plugin.
14
- *
15
- * @remarks
16
- * This is required for certain features of the plugin, such as deploying a Cloudflare Worker entry module. If not provided, the plugin will look for a Wrangler configuration file in the project root directory with the default name `wrangler.toml`. You can also specify a custom path to the Wrangler configuration file using this option.
17
- */
18
- configPath?: string;
19
- /**
20
- * A routing pattern to associate with the deployed Worker script.
21
- *
22
- * @remarks
23
- * 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}`).
24
- *
25
- * @example
26
- * ```typescript
27
- * // Example pattern for: "worker-script.my-example-domain.com"
28
- * pattern: "worker-script.{domain}"
29
- * ```
30
- */
31
- pattern?: string;
32
- };
33
- interface WorkerModule {
34
- metadata?: WorkerModuleMetadata;
35
- default: ExportedHandler;
36
- }
37
- //#endregion
38
- export { WorkerModule, WorkerModuleMetadata };
39
- //# sourceMappingURL=worker-module.d.cts.map
1
+ import { n as WorkerModuleMetadata, t as WorkerModule } from "../worker-module-CfGxF7da.cjs";
2
+ export { WorkerModule, WorkerModuleMetadata };
@@ -1,39 +1,2 @@
1
- import { WranglerUserConfig } from "./wrangler.mjs";
2
- import { ExportedHandler } from "@cloudflare/workers-types";
3
- //#region src/types/worker-module.d.ts
4
- type WorkerModuleMetadata = Partial<Omit<WranglerUserConfig, "account_id" | "name">> & {
5
- /**
6
- * The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
7
- *
8
- * @remarks
9
- * If no value is provided, the {@link Config.name} configuration value will be used.
10
- */
11
- name?: string;
12
- /**
13
- * A path to the Wrangler configuration file (either `.toml` or `.jsonc`) to use as the base configuration for the plugin.
14
- *
15
- * @remarks
16
- * This is required for certain features of the plugin, such as deploying a Cloudflare Worker entry module. If not provided, the plugin will look for a Wrangler configuration file in the project root directory with the default name `wrangler.toml`. You can also specify a custom path to the Wrangler configuration file using this option.
17
- */
18
- configPath?: string;
19
- /**
20
- * A routing pattern to associate with the deployed Worker script.
21
- *
22
- * @remarks
23
- * 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}`).
24
- *
25
- * @example
26
- * ```typescript
27
- * // Example pattern for: "worker-script.my-example-domain.com"
28
- * pattern: "worker-script.{domain}"
29
- * ```
30
- */
31
- pattern?: string;
32
- };
33
- interface WorkerModule {
34
- metadata?: WorkerModuleMetadata;
35
- default: ExportedHandler;
36
- }
37
- //#endregion
38
- export { WorkerModule, WorkerModuleMetadata };
39
- //# sourceMappingURL=worker-module.d.mts.map
1
+ import { n as WorkerModuleMetadata, t as WorkerModule } from "../worker-module-DVjaixwZ.mjs";
2
+ export { WorkerModule, WorkerModuleMetadata };
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
+ const require_rolldown_runtime = require('../rolldown-runtime-C24Yb2bl.cjs');
3
3
  let node_assert = require("node:assert");
4
- node_assert = require_runtime.__toESM(node_assert, 1);
4
+ node_assert = require_rolldown_runtime.__toESM(node_assert, 1);
5
5
  let node_path = require("node:path");
6
- node_path = require_runtime.__toESM(node_path, 1);
6
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
7
7
  let zod = require("zod");
8
- zod = require_runtime.__toESM(zod, 1);
8
+ zod = require_rolldown_runtime.__toESM(zod, 1);
9
9
 
10
10
  //#region src/types/wrangler.ts
11
11
  const LiteralSchema = zod.union([
@@ -1,34 +1,2 @@
1
- import { Unstable_Config, Unstable_RawConfig } from "wrangler";
2
- import * as z from "zod";
3
- import * as z4 from "zod/v4/core";
4
- //#region src/types/wrangler.d.ts
5
- type OptionalZodTypeOf<T extends z4.$ZodType | undefined> = T extends z4.$ZodType ? z4.infer<T> : undefined;
6
- declare const LiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
7
- type Literal = z.infer<typeof LiteralSchema>;
8
- type Json = Literal | {
9
- [key: string]: Json;
10
- } | Json[];
11
- declare const JsonSchema: z.ZodType<Json>;
12
- declare function parseWithRootPath<Z extends z4.$ZodType>(newRootPath: string, schema: Z, payload: z4.ParsePayload<any>, ctx: z.core.ParseContextInternal): Promise<z.core.ParsePayload<unknown>>;
13
- declare const PathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
14
- declare function isCyclic(value: unknown, seen?: Set<unknown>): boolean;
15
- type WranglerUserConfig = Unstable_RawConfig;
16
- /**
17
- * This is the static type definition for the configuration object.
18
- *
19
- * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
20
- * and optionally augment with arguments passed directly to wrangler.
21
- *
22
- * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
23
- *
24
- * @remarks
25
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26
- * in the top level config and should not appear in any environments.
27
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
28
- * - All top level fields in config and environments are optional in the Wrangler configuration file.
29
- */
30
- type WranglerResolvedConfig = Unstable_Config;
31
- declare const defaultWranglerConfig: WranglerResolvedConfig;
32
- //#endregion
33
- export { Json, JsonSchema, Literal, LiteralSchema, OptionalZodTypeOf, PathSchema, WranglerResolvedConfig, WranglerUserConfig, defaultWranglerConfig, isCyclic, parseWithRootPath };
34
- //# sourceMappingURL=wrangler.d.cts.map
1
+ import { a as OptionalZodTypeOf, c as WranglerUserConfig, d as parseWithRootPath, i as LiteralSchema, l as defaultWranglerConfig, n as JsonSchema, o as PathSchema, r as Literal, s as WranglerResolvedConfig, t as Json, u as isCyclic } from "../wrangler-DuuHql6r.cjs";
2
+ export { Json, JsonSchema, Literal, LiteralSchema, OptionalZodTypeOf, PathSchema, WranglerResolvedConfig, WranglerUserConfig, defaultWranglerConfig, isCyclic, parseWithRootPath };
@@ -1,34 +1,2 @@
1
- import { Unstable_Config, Unstable_RawConfig } from "wrangler";
2
- import * as z from "zod";
3
- import * as z4 from "zod/v4/core";
4
- //#region src/types/wrangler.d.ts
5
- type OptionalZodTypeOf<T extends z4.$ZodType | undefined> = T extends z4.$ZodType ? z4.infer<T> : undefined;
6
- declare const LiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
7
- type Literal = z.infer<typeof LiteralSchema>;
8
- type Json = Literal | {
9
- [key: string]: Json;
10
- } | Json[];
11
- declare const JsonSchema: z.ZodType<Json>;
12
- declare function parseWithRootPath<Z extends z4.$ZodType>(newRootPath: string, schema: Z, payload: z4.ParsePayload<any>, ctx: z.core.ParseContextInternal): Promise<z.core.ParsePayload<unknown>>;
13
- declare const PathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
14
- declare function isCyclic(value: unknown, seen?: Set<unknown>): boolean;
15
- type WranglerUserConfig = Unstable_RawConfig;
16
- /**
17
- * This is the static type definition for the configuration object.
18
- *
19
- * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
20
- * and optionally augment with arguments passed directly to wrangler.
21
- *
22
- * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
23
- *
24
- * @remarks
25
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26
- * in the top level config and should not appear in any environments.
27
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
28
- * - All top level fields in config and environments are optional in the Wrangler configuration file.
29
- */
30
- type WranglerResolvedConfig = Unstable_Config;
31
- declare const defaultWranglerConfig: WranglerResolvedConfig;
32
- //#endregion
33
- export { Json, JsonSchema, Literal, LiteralSchema, OptionalZodTypeOf, PathSchema, WranglerResolvedConfig, WranglerUserConfig, defaultWranglerConfig, isCyclic, parseWithRootPath };
34
- //# sourceMappingURL=wrangler.d.mts.map
1
+ import { a as OptionalZodTypeOf, c as WranglerUserConfig, d as parseWithRootPath, i as LiteralSchema, l as defaultWranglerConfig, n as JsonSchema, o as PathSchema, r as Literal, s as WranglerResolvedConfig, t as Json, u as isCyclic } from "../wrangler-DuuHql6r.mjs";
2
+ export { Json, JsonSchema, Literal, LiteralSchema, OptionalZodTypeOf, PathSchema, WranglerResolvedConfig, WranglerUserConfig, defaultWranglerConfig, isCyclic, parseWithRootPath };
@@ -0,0 +1,14 @@
1
+ import { a as CloudflareWorkerEntryModule } from "./plugin-QOCaPGt-.mjs";
2
+ import "./index-CzSH-wX5.mjs";
3
+ import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
4
+ //#region src/components/worker-entry.d.ts
5
+ type WorkerEntryProps = Partial<EntryFileProps> & Omit<EntryFileProps, "path"> & {
6
+ worker: CloudflareWorkerEntryModule;
7
+ };
8
+ /**
9
+ * Generates a [Cloudflare Worker](https://developers.cloudflare.com/workers/runtime-apis/handlers/) entry module for the Powerlines project, providing a runtime context and utilities for integrating with Cloudflare services. This module defines a `CloudflareContext` interface, an `AsyncLocalStorage` instance for managing the context, and helper functions for retrieving and running code within the context. The generated module is designed to be used as a built-in file within the Powerlines environment, allowing developers to easily access Cloudflare-specific functionality in their applications.
10
+ */
11
+ declare function WorkerEntry(props: WorkerEntryProps): import("@alloy-js/core").Children;
12
+ //#endregion
13
+ export { WorkerEntryProps as n, WorkerEntry as t };
14
+ //# sourceMappingURL=worker-entry-CReS1fQZ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-entry-CReS1fQZ.d.mts","names":[],"sources":["../src/components/worker-entry.tsx"],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { a as CloudflareWorkerEntryModule } from "./plugin-DHHBrJ0X.cjs";
2
+ import "./index-DKQw89Z9.cjs";
3
+ import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
4
+ //#region src/components/worker-entry.d.ts
5
+ type WorkerEntryProps = Partial<EntryFileProps> & Omit<EntryFileProps, "path"> & {
6
+ worker: CloudflareWorkerEntryModule;
7
+ };
8
+ /**
9
+ * Generates a [Cloudflare Worker](https://developers.cloudflare.com/workers/runtime-apis/handlers/) entry module for the Powerlines project, providing a runtime context and utilities for integrating with Cloudflare services. This module defines a `CloudflareContext` interface, an `AsyncLocalStorage` instance for managing the context, and helper functions for retrieving and running code within the context. The generated module is designed to be used as a built-in file within the Powerlines environment, allowing developers to easily access Cloudflare-specific functionality in their applications.
10
+ */
11
+ declare function WorkerEntry(props: WorkerEntryProps): import("@alloy-js/core").Children;
12
+ //#endregion
13
+ export { WorkerEntryProps as n, WorkerEntry as t };
14
+ //# sourceMappingURL=worker-entry-CiarlLKk.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-entry-CiarlLKk.d.cts","names":[],"sources":["../src/components/worker-entry.tsx"],"mappings":";;;;KA+BY,mBAAmB,QAAQ,kBACrC,KAAK;EACH,QAAQ;;;;;iBAMI,YAAY,OAAO,4CAAgB"}
@@ -0,0 +1,39 @@
1
+ import { c as WranglerUserConfig } from "./wrangler-DuuHql6r.cjs";
2
+ import { ExportedHandler } from "@cloudflare/workers-types";
3
+ //#region src/types/worker-module.d.ts
4
+ type WorkerModuleMetadata = Partial<Omit<WranglerUserConfig, "account_id" | "name">> & {
5
+ /**
6
+ * The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
7
+ *
8
+ * @remarks
9
+ * If no value is provided, the {@link Config.name} configuration value will be used.
10
+ */
11
+ name?: string;
12
+ /**
13
+ * A path to the Wrangler configuration file (either `.toml` or `.jsonc`) to use as the base configuration for the plugin.
14
+ *
15
+ * @remarks
16
+ * This is required for certain features of the plugin, such as deploying a Cloudflare Worker entry module. If not provided, the plugin will look for a Wrangler configuration file in the project root directory with the default name `wrangler.toml`. You can also specify a custom path to the Wrangler configuration file using this option.
17
+ */
18
+ configPath?: string;
19
+ /**
20
+ * A routing pattern to associate with the deployed Worker script.
21
+ *
22
+ * @remarks
23
+ * 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}`).
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Example pattern for: "worker-script.my-example-domain.com"
28
+ * pattern: "worker-script.{domain}"
29
+ * ```
30
+ */
31
+ pattern?: string;
32
+ };
33
+ interface WorkerModule {
34
+ metadata?: WorkerModuleMetadata;
35
+ default: ExportedHandler;
36
+ }
37
+ //#endregion
38
+ export { WorkerModuleMetadata as n, WorkerModule as t };
39
+ //# sourceMappingURL=worker-module-CfGxF7da.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-module-CfGxF7da.d.cts","names":[],"sources":["../src/types/worker-module.ts"],"mappings":";;;KAqBY,uBAAuB,QACjC,KAAK;;;;;;;EAQL;;;;;;;EAQA;;;;;;;;;;;;;EAcA;;UAGe;EACf,WAAW;EACX,SAAS"}
@@ -0,0 +1,39 @@
1
+ import { c as WranglerUserConfig } from "./wrangler-DuuHql6r.mjs";
2
+ import { ExportedHandler } from "@cloudflare/workers-types";
3
+ //#region src/types/worker-module.d.ts
4
+ type WorkerModuleMetadata = Partial<Omit<WranglerUserConfig, "account_id" | "name">> & {
5
+ /**
6
+ * The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
7
+ *
8
+ * @remarks
9
+ * If no value is provided, the {@link Config.name} configuration value will be used.
10
+ */
11
+ name?: string;
12
+ /**
13
+ * A path to the Wrangler configuration file (either `.toml` or `.jsonc`) to use as the base configuration for the plugin.
14
+ *
15
+ * @remarks
16
+ * This is required for certain features of the plugin, such as deploying a Cloudflare Worker entry module. If not provided, the plugin will look for a Wrangler configuration file in the project root directory with the default name `wrangler.toml`. You can also specify a custom path to the Wrangler configuration file using this option.
17
+ */
18
+ configPath?: string;
19
+ /**
20
+ * A routing pattern to associate with the deployed Worker script.
21
+ *
22
+ * @remarks
23
+ * 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}`).
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Example pattern for: "worker-script.my-example-domain.com"
28
+ * pattern: "worker-script.{domain}"
29
+ * ```
30
+ */
31
+ pattern?: string;
32
+ };
33
+ interface WorkerModule {
34
+ metadata?: WorkerModuleMetadata;
35
+ default: ExportedHandler;
36
+ }
37
+ //#endregion
38
+ export { WorkerModuleMetadata as n, WorkerModule as t };
39
+ //# sourceMappingURL=worker-module-DVjaixwZ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-module-DVjaixwZ.d.mts","names":[],"sources":["../src/types/worker-module.ts"],"mappings":""}
@@ -0,0 +1,34 @@
1
+ import { Unstable_Config, Unstable_RawConfig } from "wrangler";
2
+ import * as z from "zod";
3
+ import * as z4 from "zod/v4/core";
4
+ //#region src/types/wrangler.d.ts
5
+ type OptionalZodTypeOf<T extends z4.$ZodType | undefined> = T extends z4.$ZodType ? z4.infer<T> : undefined;
6
+ declare const LiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
7
+ type Literal = z.infer<typeof LiteralSchema>;
8
+ type Json = Literal | {
9
+ [key: string]: Json;
10
+ } | Json[];
11
+ declare const JsonSchema: z.ZodType<Json>;
12
+ declare function parseWithRootPath<Z extends z4.$ZodType>(newRootPath: string, schema: Z, payload: z4.ParsePayload<any>, ctx: z.core.ParseContextInternal): Promise<z.core.ParsePayload<unknown>>;
13
+ declare const PathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
14
+ declare function isCyclic(value: unknown, seen?: Set<unknown>): boolean;
15
+ type WranglerUserConfig = Unstable_RawConfig;
16
+ /**
17
+ * This is the static type definition for the configuration object.
18
+ *
19
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
20
+ * and optionally augment with arguments passed directly to wrangler.
21
+ *
22
+ * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
23
+ *
24
+ * @remarks
25
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26
+ * in the top level config and should not appear in any environments.
27
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
28
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
29
+ */
30
+ type WranglerResolvedConfig = Unstable_Config;
31
+ declare const defaultWranglerConfig: WranglerResolvedConfig;
32
+ //#endregion
33
+ export { OptionalZodTypeOf as a, WranglerUserConfig as c, parseWithRootPath as d, LiteralSchema as i, defaultWranglerConfig as l, JsonSchema as n, PathSchema as o, Literal as r, WranglerResolvedConfig as s, Json as t, isCyclic as u };
34
+ //# sourceMappingURL=wrangler-DuuHql6r.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrangler-DuuHql6r.d.cts","names":[],"sources":["../src/types/wrangler.ts"],"mappings":";;;;KAyBY,kBAAkB,UAAU,GAAG,wBACzC,UAAU,GAAG,WAAW,GAAG,MAAM;cAGtB,eAAa,EAAA,mBAAA,EAAA,WAAA,EAAA,WAAA,EAAA,YAAA,EAAA;KAMd,UAAU,EAAE,aAAa;KACzB,OAAO;GAAa,cAAc;IAAS;cAC1C,YAAY,EAAE,QAAQ;iBASb,kBAAkB,UAAU,GAAG,UACnD,qBACA,QAAQ,GACR,SAAS,GAAG,mBACZ,KAAK,EAAE,KAAK,uBAAoB,QAAA,EAAA,KAAA;cASrB,YAAU,EAAA,QAAA,EAAA,WAAA,EAAA;iBAQP,SAAS,gBAAgB,OAAI;KAWjC,qBAAqB;;;;;;;;;;;;;;;KAiBrB,yBAAyB;cAExB,uBAAuB"}
@@ -0,0 +1,34 @@
1
+ import { Unstable_Config, Unstable_RawConfig } from "wrangler";
2
+ import * as z from "zod";
3
+ import * as z4 from "zod/v4/core";
4
+ //#region src/types/wrangler.d.ts
5
+ type OptionalZodTypeOf<T extends z4.$ZodType | undefined> = T extends z4.$ZodType ? z4.infer<T> : undefined;
6
+ declare const LiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
7
+ type Literal = z.infer<typeof LiteralSchema>;
8
+ type Json = Literal | {
9
+ [key: string]: Json;
10
+ } | Json[];
11
+ declare const JsonSchema: z.ZodType<Json>;
12
+ declare function parseWithRootPath<Z extends z4.$ZodType>(newRootPath: string, schema: Z, payload: z4.ParsePayload<any>, ctx: z.core.ParseContextInternal): Promise<z.core.ParsePayload<unknown>>;
13
+ declare const PathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
14
+ declare function isCyclic(value: unknown, seen?: Set<unknown>): boolean;
15
+ type WranglerUserConfig = Unstable_RawConfig;
16
+ /**
17
+ * This is the static type definition for the configuration object.
18
+ *
19
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
20
+ * and optionally augment with arguments passed directly to wrangler.
21
+ *
22
+ * For more information about the configuration object, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
23
+ *
24
+ * @remarks
25
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26
+ * in the top level config and should not appear in any environments.
27
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
28
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
29
+ */
30
+ type WranglerResolvedConfig = Unstable_Config;
31
+ declare const defaultWranglerConfig: WranglerResolvedConfig;
32
+ //#endregion
33
+ export { OptionalZodTypeOf as a, WranglerUserConfig as c, parseWithRootPath as d, LiteralSchema as i, defaultWranglerConfig as l, JsonSchema as n, PathSchema as o, Literal as r, WranglerResolvedConfig as s, Json as t, isCyclic as u };
34
+ //# sourceMappingURL=wrangler-DuuHql6r.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrangler-DuuHql6r.d.mts","names":[],"sources":["../src/types/wrangler.ts"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-cloudflare",
3
- "version": "0.6.315",
3
+ "version": "0.6.317",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin that provides integration with Cloudflare services.",
6
6
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
@@ -209,10 +209,10 @@
209
209
  "dependencies": {
210
210
  "@alloy-js/core": "^0.24.1",
211
211
  "@alloy-js/typescript": "^0.24.0",
212
- "@power-plant/alloy-js": "^0.0.85",
213
- "@powerlines/plugin-env": "^0.16.416",
214
- "@powerlines/plugin-pulumi": "^0.6.310",
215
- "@powerlines/plugin-unenv": "^0.1.658",
212
+ "@power-plant/alloy-js": "^0.0.86",
213
+ "@powerlines/plugin-env": "^0.16.418",
214
+ "@powerlines/plugin-pulumi": "^0.6.312",
215
+ "@powerlines/plugin-unenv": "^0.1.660",
216
216
  "@pulumi/cloudflare": "^6.19.0",
217
217
  "@pulumi/pulumi": "^3.256.0",
218
218
  "@storm-software/config-tools": "^1.190.133",
@@ -223,17 +223,17 @@
223
223
  "@stryke/type-checks": "^0.6.41",
224
224
  "@stryke/types": "^0.12.36",
225
225
  "defu": "^6.1.7",
226
- "powerlines": "^0.47.208"
226
+ "powerlines": "^0.47.209"
227
227
  },
228
228
  "devDependencies": {
229
229
  "@cloudflare/unenv-preset": "^2.16.1",
230
230
  "@cloudflare/workers-types": "^4.20260702.1",
231
- "@powerlines/plugin-alloy": "^0.26.305",
232
- "@powerlines/plugin-plugin": "^0.12.620",
231
+ "@powerlines/plugin-alloy": "^0.26.307",
232
+ "@powerlines/plugin-plugin": "^0.12.622",
233
233
  "@types/node": "^25.9.5",
234
234
  "wrangler": "^4.120.1",
235
235
  "zod": "^4.4.3"
236
236
  },
237
237
  "publishConfig": { "access": "public" },
238
- "gitHead": "7f9a0df69c7021d02c29a0d0c0626465686566fa"
238
+ "gitHead": "88974b224a5cdb97dbd377373c9ed7f8a8780324"
239
239
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudflare-builtin.d.cts","names":[],"sources":["../../src/components/cloudflare-builtin.tsx"],"mappings":";;KAoCY,yBAAyB,QAAQ,oBAC3C,KAAK;;;;iBAKS,kBAAkB,OAAO,kDAAsB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudflare-builtin.d.mts","names":[],"sources":["../../src/components/cloudflare-builtin.tsx"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;KA0BY,4BAA4B,KAAK;;;;iBAK7B,qBAAqB,OAAO,qDAAyB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-entry.d.cts","names":[],"sources":["../../src/components/worker-entry.tsx"],"mappings":";;;;KA+BY,mBAAmB,QAAQ,kBACrC,KAAK;EACH,QAAQ;;;;;iBAMI,YAAY,OAAO,4CAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-entry.d.mts","names":[],"sources":["../../src/components/worker-entry.tsx"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;UAyCiB;;;;;;;;;EASf;;;;;;;;;EAUA;;;;;;;EAQA;;;;EAKA;;;;;;;EAQA,QAAQ;;;;EAKR,SAAS;;KAGC,6BAA6B,sBACvC,yBACA;;;;EAIE,aAAa,KAAK;;KAGV,iCAAiC,0BAC3C,6BACA;;;;EAIE,YAAY,SAAS,KAAK;;KAGlB,2BAA2B,aACrC;;;;EAMA,OAAO;;KAGG,8BAA8B,aAClC;;;;EAMN,UAAU;;KAGA,wBACV,wBAAwB,iCACtB,kCACA,cAAc,mBAChB,iBAAiB,mBACjB,oBAAoB,mBACpB,mBAAmB;EACjB;IACE,WAAW;IACX,SAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-module.d.cts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":";;;KAqBY,uBAAuB,QACjC,KAAK;;;;;;;EAQL;;;;;;;EAQA;;;;;;;;;;;;;EAcA;;UAGe;EACf,WAAW;EACX,SAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-module.d.mts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrangler.d.cts","names":[],"sources":["../../src/types/wrangler.ts"],"mappings":";;;;KAyBY,kBAAkB,UAAU,GAAG,wBACzC,UAAU,GAAG,WAAW,GAAG,MAAM;cAGtB,eAAa,EAAA,mBAAA,EAAA,WAAA,EAAA,WAAA,EAAA,YAAA,EAAA;KAMd,UAAU,EAAE,aAAa;KACzB,OAAO;GAAa,cAAc;IAAS;cAC1C,YAAY,EAAE,QAAQ;iBASb,kBAAkB,UAAU,GAAG,UACnD,qBACA,QAAQ,GACR,SAAS,GAAG,mBACZ,KAAK,EAAE,KAAK,uBAAoB,QAAA,EAAA,KAAA;cASrB,YAAU,EAAA,QAAA,EAAA,WAAA,EAAA;iBAQP,SAAS,gBAAgB,OAAI;KAWjC,qBAAqB;;;;;;;;;;;;;;;KAiBrB,yBAAyB;cAExB,uBAAuB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrangler.d.mts","names":[],"sources":["../../src/types/wrangler.ts"],"mappings":""}