@powerlines/plugin-cloudflare 0.2.23 → 0.2.24

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.
@@ -1,6 +1,7 @@
1
1
  import { Show, code, computed, splitProps } from "@alloy-js/core";
2
2
  import defu from "defu";
3
3
  import { Spacing } from "@powerlines/plugin-alloy/core/components";
4
+ import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
4
5
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts";
5
6
  import { EntryFile } from "@powerlines/plugin-alloy/typescript/components/entry-file";
6
7
  import { murmurhash } from "@stryke/hash";
@@ -20,138 +21,155 @@ function WorkerEntry(props) {
20
21
  ]);
21
22
  const context = usePowerlines();
22
23
  const entryPath = computed(() => `./${replaceExtension(relativePath(context.entryPath, worker.entry.input?.file || worker.entry.file))}`);
23
- return <EntryFile path={`worker-${murmurhash(worker.entry, { maxLength: 8 })}-entry.ts`} {...rest} imports={defu({
24
- "@cloudflare/workers-types": [
25
- {
26
- name: "Request",
27
- type: true
28
- },
29
- {
30
- name: "Response",
31
- type: true
32
- },
33
- {
34
- name: "ExecutionContext",
35
- type: true
36
- },
37
- {
38
- name: "IncomingRequestCfProperties",
39
- type: true
40
- },
41
- {
42
- name: "ScheduledController",
43
- type: true
44
- },
45
- {
46
- name: "ForwardableEmailMessage",
47
- type: true
48
- },
49
- {
50
- name: "MessageBatch",
51
- type: true
52
- },
53
- {
54
- name: "TailStream",
55
- type: true
56
- },
57
- {
58
- name: "TraceItem",
59
- type: true
60
- },
61
- {
62
- name: "TailStream.TailEvent",
63
- type: true
64
- },
65
- {
66
- name: "TailStream.Onset",
67
- type: true
68
- },
69
- {
70
- name: "TailStream.TailEventHandlerType",
71
- type: true
72
- }
73
- ],
74
- [entryPath.value]: "worker"
75
- }, imports ?? {})} builtinImports={defu({ cloudflare: [
76
- "withFetchContext",
77
- "withTailContext",
78
- "withTraceContext",
79
- "withTailStreamContext",
80
- "withScheduledContext",
81
- "withTestContext",
82
- "withEmailContext",
83
- "withQueueContext"
84
- ] }, builtinImports ?? {})}>
85
- {code`export default { `}
86
- <hbr />
87
- <Show when={worker.fetch}>
88
- {code` async fetch(request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: CloudflareBindings, ctx: ExecutionContext): Promise<Response> {
24
+ return /* @__PURE__ */ jsxs(EntryFile, {
25
+ path: `worker-${murmurhash(worker.entry, { maxLength: 8 })}-entry.ts`,
26
+ ...rest,
27
+ imports: defu({
28
+ "@cloudflare/workers-types": [
29
+ {
30
+ name: "Request",
31
+ type: true
32
+ },
33
+ {
34
+ name: "Response",
35
+ type: true
36
+ },
37
+ {
38
+ name: "ExecutionContext",
39
+ type: true
40
+ },
41
+ {
42
+ name: "IncomingRequestCfProperties",
43
+ type: true
44
+ },
45
+ {
46
+ name: "ScheduledController",
47
+ type: true
48
+ },
49
+ {
50
+ name: "ForwardableEmailMessage",
51
+ type: true
52
+ },
53
+ {
54
+ name: "MessageBatch",
55
+ type: true
56
+ },
57
+ {
58
+ name: "TailStream",
59
+ type: true
60
+ },
61
+ {
62
+ name: "TraceItem",
63
+ type: true
64
+ },
65
+ {
66
+ name: "TailStream.TailEvent",
67
+ type: true
68
+ },
69
+ {
70
+ name: "TailStream.Onset",
71
+ type: true
72
+ },
73
+ {
74
+ name: "TailStream.TailEventHandlerType",
75
+ type: true
76
+ }
77
+ ],
78
+ [entryPath.value]: "worker"
79
+ }, imports ?? {}),
80
+ builtinImports: defu({ cloudflare: [
81
+ "withFetchContext",
82
+ "withTailContext",
83
+ "withTraceContext",
84
+ "withTailStreamContext",
85
+ "withScheduledContext",
86
+ "withTestContext",
87
+ "withEmailContext",
88
+ "withQueueContext"
89
+ ] }, builtinImports ?? {}),
90
+ children: [
91
+ code`export default { `,
92
+ /* @__PURE__ */ jsx("hbr", {}),
93
+ /* @__PURE__ */ jsx(Show, {
94
+ when: worker.fetch,
95
+ children: code` async fetch(request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: CloudflareBindings, ctx: ExecutionContext): Promise<Response> {
89
96
  return await withFetchContext({ request, env, ctx }, async (context) => {
90
97
  return worker.fetch(context.request, context.env, context.ctx);
91
98
  });
92
- }, `}
93
- </Show>
94
- <hbr />
95
- <Show when={worker.tail}>
96
- {code` async tail(events: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
99
+ }, `
100
+ }),
101
+ /* @__PURE__ */ jsx("hbr", {}),
102
+ /* @__PURE__ */ jsx(Show, {
103
+ when: worker.tail,
104
+ children: code` async tail(events: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
97
105
  return withTailContext({ events, env, ctx }, async (context) => {
98
106
  return worker.tail(context.events, context.env, context.ctx);
99
107
  });
100
- }, `}
101
- </Show>
102
- <hbr />
103
- <Show when={worker.trace}>
104
- {code` async trace(traces: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
108
+ }, `
109
+ }),
110
+ /* @__PURE__ */ jsx("hbr", {}),
111
+ /* @__PURE__ */ jsx(Show, {
112
+ when: worker.trace,
113
+ children: code` async trace(traces: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
105
114
  return withTraceContext({ traces, env, ctx }, async (context) => {
106
115
  return worker.trace(context.traces, context.env, context.ctx);
107
116
  });
108
- }, `}
109
- </Show>
110
- <hbr />
111
- <Show when={worker.tailStream}>
112
- {code` async tailStream(event: TailStream.TailEvent<TailStream.Onset>, env: CloudflareBindings, ctx: ExecutionContext): Promise<ReadableStream> {
117
+ }, `
118
+ }),
119
+ /* @__PURE__ */ jsx("hbr", {}),
120
+ /* @__PURE__ */ jsx(Show, {
121
+ when: worker.tailStream,
122
+ children: code` async tailStream(event: TailStream.TailEvent<TailStream.Onset>, env: CloudflareBindings, ctx: ExecutionContext): Promise<ReadableStream> {
113
123
  return await withTailStreamContext({ event, env, ctx }, async (context) => {
114
124
  return await worker.tailStream(context.event, context.env, context.ctx);
115
125
  });
116
- }, `}
117
- </Show>
118
- <hbr />
119
- <Show when={worker.scheduled}>
120
- {code` async scheduled(controller: ScheduledController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
126
+ }, `
127
+ }),
128
+ /* @__PURE__ */ jsx("hbr", {}),
129
+ /* @__PURE__ */ jsx(Show, {
130
+ when: worker.scheduled,
131
+ children: code` async scheduled(controller: ScheduledController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
121
132
  return withScheduledContext({ controller, env, ctx }, async (context) => {
122
133
  return worker.scheduled(context.controller, context.env, context.ctx);
123
134
  });
124
- }, `}
125
- </Show>
126
- <hbr />
127
- <Show when={worker.test}>
128
- {code` async test(controller: TestController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
135
+ }, `
136
+ }),
137
+ /* @__PURE__ */ jsx("hbr", {}),
138
+ /* @__PURE__ */ jsx(Show, {
139
+ when: worker.test,
140
+ children: code` async test(controller: TestController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
129
141
  return withTestContext({ controller, env, ctx }, async (context) => {
130
142
  return worker.test(context.controller, context.env, context.ctx);
131
143
  });
132
- }, `}
133
- </Show>
134
- <hbr />
135
- <Show when={worker.email}>
136
- {code` async email(message: ForwardableEmailMessage, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
144
+ }, `
145
+ }),
146
+ /* @__PURE__ */ jsx("hbr", {}),
147
+ /* @__PURE__ */ jsx(Show, {
148
+ when: worker.email,
149
+ children: code` async email(message: ForwardableEmailMessage, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
137
150
  return withEmailContext({ message, env, ctx }, async (context) => {
138
151
  return worker.email(context.message, context.env, context.ctx);
139
152
  });
140
- }, `}
141
- </Show>
142
- <hbr />
143
- <Show when={worker.queue}>
144
- {code` async queue(batch: MessageBatch, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
153
+ }, `
154
+ }),
155
+ /* @__PURE__ */ jsx("hbr", {}),
156
+ /* @__PURE__ */ jsx(Show, {
157
+ when: worker.queue,
158
+ children: code` async queue(batch: MessageBatch, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {
145
159
  return withQueueContext({ batch, env, ctx }, async (context) => {
146
160
  return worker.queue(context.batch, context.env, context.ctx);
147
161
  });
148
- }, `}
149
- </Show>
150
- <hbr />
151
- {code` } satisfies ExportedHandler<CloudflareBindings>; `}
152
- <Spacing />
153
- <Show when={Boolean(children)}>{children}</Show>
154
- </EntryFile>;
162
+ }, `
163
+ }),
164
+ /* @__PURE__ */ jsx("hbr", {}),
165
+ code` } satisfies ExportedHandler<CloudflareBindings>; `,
166
+ /* @__PURE__ */ jsx(Spacing, {}),
167
+ /* @__PURE__ */ jsx(Show, {
168
+ when: Boolean(children),
169
+ children
170
+ })
171
+ ]
172
+ });
155
173
  }
156
174
 
157
175
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"worker-entry.mjs","names":[],"sources":["../../src/components/worker-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Show, splitProps } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts\";\nimport {\n EntryFile,\n EntryFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { relativePath } from \"@stryke/path/find\";\nimport { replaceExtension } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { CloudflarePluginContext, CloudflareWorkerEntryModule } from \"../types\";\n\nexport type WorkerEntryProps = Partial<EntryFileProps> &\n Omit<EntryFileProps, \"path\"> & {\n worker: CloudflareWorkerEntryModule;\n };\n\n/**\n * 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.\n */\nexport function WorkerEntry(props: WorkerEntryProps) {\n const [{ worker, children, imports, builtinImports }, rest] = splitProps(\n props,\n [\"worker\", \"children\", \"imports\", \"builtinImports\"]\n );\n\n const context = usePowerlines<CloudflarePluginContext>();\n const entryPath = computed(\n () =>\n `./${replaceExtension(\n relativePath(\n context.entryPath,\n worker.entry.input?.file || worker.entry.file\n )\n )}`\n );\n\n return (\n <EntryFile\n path={`worker-${murmurhash(worker.entry, {\n maxLength: 8\n })}-entry.ts`}\n {...rest}\n imports={defu(\n {\n \"@cloudflare/workers-types\": [\n { name: \"Request\", type: true },\n { name: \"Response\", type: true },\n { name: \"ExecutionContext\", type: true },\n { name: \"IncomingRequestCfProperties\", type: true },\n { name: \"ScheduledController\", type: true },\n { name: \"ForwardableEmailMessage\", type: true },\n { name: \"MessageBatch\", type: true },\n { name: \"TailStream\", type: true },\n { name: \"TraceItem\", type: true },\n { name: \"TailStream.TailEvent\", type: true },\n { name: \"TailStream.Onset\", type: true },\n { name: \"TailStream.TailEventHandlerType\", type: true }\n ],\n [entryPath.value]: \"worker\"\n },\n imports ?? {}\n )}\n builtinImports={defu(\n {\n cloudflare: [\n \"withFetchContext\",\n \"withTailContext\",\n \"withTraceContext\",\n \"withTailStreamContext\",\n \"withScheduledContext\",\n \"withTestContext\",\n \"withEmailContext\",\n \"withQueueContext\"\n ]\n },\n builtinImports ?? {}\n )}>\n {code`export default { `}\n <hbr />\n <Show when={worker.fetch}>\n {code` async fetch(request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: CloudflareBindings, ctx: ExecutionContext): Promise<Response> {\n return await withFetchContext({ request, env, ctx }, async (context) => {\n return worker.fetch(context.request, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.tail}>\n {code` async tail(events: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withTailContext({ events, env, ctx }, async (context) => {\n return worker.tail(context.events, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.trace}>\n {code` async trace(traces: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withTraceContext({ traces, env, ctx }, async (context) => {\n return worker.trace(context.traces, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.tailStream}>\n {code` async tailStream(event: TailStream.TailEvent<TailStream.Onset>, env: CloudflareBindings, ctx: ExecutionContext): Promise<ReadableStream> {\n return await withTailStreamContext({ event, env, ctx }, async (context) => {\n return await worker.tailStream(context.event, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.scheduled}>\n {code` async scheduled(controller: ScheduledController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withScheduledContext({ controller, env, ctx }, async (context) => {\n return worker.scheduled(context.controller, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.test}>\n {code` async test(controller: TestController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withTestContext({ controller, env, ctx }, async (context) => {\n return worker.test(context.controller, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.email}>\n {code` async email(message: ForwardableEmailMessage, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withEmailContext({ message, env, ctx }, async (context) => {\n return worker.email(context.message, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.queue}>\n {code` async queue(batch: MessageBatch, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withQueueContext({ batch, env, ctx }, async (context) => {\n return worker.queue(context.batch, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n {code` } satisfies ExportedHandler<CloudflareBindings>; `}\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </EntryFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAuCA,SAAgB,YAAY,OAAyB;CACnD,MAAM,CAAC,EAAE,QAAQ,UAAU,SAAS,kBAAkB,QAAQ,WAC5D,OACA;EAAC;EAAU;EAAY;EAAW;EAAiB,CACpD;CAED,MAAM,UAAU,eAAwC;CACxD,MAAM,YAAY,eAEd,KAAK,iBACH,aACE,QAAQ,WACR,OAAO,MAAM,OAAO,QAAQ,OAAO,MAAM,KAC1C,CACF,GACJ;AAED,QACE,CAAC,UACC,MAAM,UAAU,WAAW,OAAO,OAAO,EACvC,WAAW,GACZ,CAAC,CAAC,gBACC,MACJ,SAAS,KACP;EACE,6BAA6B;GAC3B;IAAE,MAAM;IAAW,MAAM;IAAM;GAC/B;IAAE,MAAM;IAAY,MAAM;IAAM;GAChC;IAAE,MAAM;IAAoB,MAAM;IAAM;GACxC;IAAE,MAAM;IAA+B,MAAM;IAAM;GACnD;IAAE,MAAM;IAAuB,MAAM;IAAM;GAC3C;IAAE,MAAM;IAA2B,MAAM;IAAM;GAC/C;IAAE,MAAM;IAAgB,MAAM;IAAM;GACpC;IAAE,MAAM;IAAc,MAAM;IAAM;GAClC;IAAE,MAAM;IAAa,MAAM;IAAM;GACjC;IAAE,MAAM;IAAwB,MAAM;IAAM;GAC5C;IAAE,MAAM;IAAoB,MAAM;IAAM;GACxC;IAAE,MAAM;IAAmC,MAAM;IAAM;GACxD;GACA,UAAU,QAAQ;EACpB,EACD,WAAW,EAAE,CACd,EACD,gBAAgB,KACd,EACE,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EACF,EACD,kBAAkB,EAAE,CACrB,EAAE;OACF,IAAI,oBAAoB;MACzB,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,OAAO;SACvB,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,MAAM;SACtB,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,OAAO;SACvB,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,YAAY;SAC5B,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,WAAW;SAC3B,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,MAAM;SACtB,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,OAAO;SACvB,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;MACP,CAAC,KAAK,MAAM,OAAO,OAAO;SACvB,IAAI;;;;WAIF;MACL,EAAE,KAAK;MACP,CAAC,MAAM;OACN,IAAI,qDAAqD;MAC1D,CAAC,UAAU;MACX,CAAC,KAAK,MAAM,QAAQ,SAAS,GAAG,SAAS,EAAE,KAAK;IAClD,EAAE"}
1
+ {"version":3,"file":"worker-entry.mjs","names":[],"sources":["../../src/components/worker-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Show, splitProps } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts\";\nimport {\n EntryFile,\n EntryFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { relativePath } from \"@stryke/path/find\";\nimport { replaceExtension } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { CloudflarePluginContext, CloudflareWorkerEntryModule } from \"../types\";\n\nexport type WorkerEntryProps = Partial<EntryFileProps> &\n Omit<EntryFileProps, \"path\"> & {\n worker: CloudflareWorkerEntryModule;\n };\n\n/**\n * 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.\n */\nexport function WorkerEntry(props: WorkerEntryProps) {\n const [{ worker, children, imports, builtinImports }, rest] = splitProps(\n props,\n [\"worker\", \"children\", \"imports\", \"builtinImports\"]\n );\n\n const context = usePowerlines<CloudflarePluginContext>();\n const entryPath = computed(\n () =>\n `./${replaceExtension(\n relativePath(\n context.entryPath,\n worker.entry.input?.file || worker.entry.file\n )\n )}`\n );\n\n return (\n <EntryFile\n path={`worker-${murmurhash(worker.entry, {\n maxLength: 8\n })}-entry.ts`}\n {...rest}\n imports={defu(\n {\n \"@cloudflare/workers-types\": [\n { name: \"Request\", type: true },\n { name: \"Response\", type: true },\n { name: \"ExecutionContext\", type: true },\n { name: \"IncomingRequestCfProperties\", type: true },\n { name: \"ScheduledController\", type: true },\n { name: \"ForwardableEmailMessage\", type: true },\n { name: \"MessageBatch\", type: true },\n { name: \"TailStream\", type: true },\n { name: \"TraceItem\", type: true },\n { name: \"TailStream.TailEvent\", type: true },\n { name: \"TailStream.Onset\", type: true },\n { name: \"TailStream.TailEventHandlerType\", type: true }\n ],\n [entryPath.value]: \"worker\"\n },\n imports ?? {}\n )}\n builtinImports={defu(\n {\n cloudflare: [\n \"withFetchContext\",\n \"withTailContext\",\n \"withTraceContext\",\n \"withTailStreamContext\",\n \"withScheduledContext\",\n \"withTestContext\",\n \"withEmailContext\",\n \"withQueueContext\"\n ]\n },\n builtinImports ?? {}\n )}>\n {code`export default { `}\n <hbr />\n <Show when={worker.fetch}>\n {code` async fetch(request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: CloudflareBindings, ctx: ExecutionContext): Promise<Response> {\n return await withFetchContext({ request, env, ctx }, async (context) => {\n return worker.fetch(context.request, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.tail}>\n {code` async tail(events: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withTailContext({ events, env, ctx }, async (context) => {\n return worker.tail(context.events, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.trace}>\n {code` async trace(traces: TraceItem[], env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withTraceContext({ traces, env, ctx }, async (context) => {\n return worker.trace(context.traces, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.tailStream}>\n {code` async tailStream(event: TailStream.TailEvent<TailStream.Onset>, env: CloudflareBindings, ctx: ExecutionContext): Promise<ReadableStream> {\n return await withTailStreamContext({ event, env, ctx }, async (context) => {\n return await worker.tailStream(context.event, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.scheduled}>\n {code` async scheduled(controller: ScheduledController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withScheduledContext({ controller, env, ctx }, async (context) => {\n return worker.scheduled(context.controller, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.test}>\n {code` async test(controller: TestController, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withTestContext({ controller, env, ctx }, async (context) => {\n return worker.test(context.controller, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.email}>\n {code` async email(message: ForwardableEmailMessage, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withEmailContext({ message, env, ctx }, async (context) => {\n return worker.email(context.message, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n <Show when={worker.queue}>\n {code` async queue(batch: MessageBatch, env: CloudflareBindings, ctx: ExecutionContext): Promise<void> {\n return withQueueContext({ batch, env, ctx }, async (context) => {\n return worker.queue(context.batch, context.env, context.ctx);\n });\n }, `}\n </Show>\n <hbr />\n {code` } satisfies ExportedHandler<CloudflareBindings>; `}\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </EntryFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAuCA,SAAgB,YAAY,OAAyB;CACnD,MAAM,CAAC,EAAE,QAAQ,UAAU,SAAS,kBAAkB,QAAQ,WAC5D,OACA;EAAC;EAAU;EAAY;EAAW;EAAiB,CACpD;CAED,MAAM,UAAU,eAAwC;CACxD,MAAM,YAAY,eAEd,KAAK,iBACH,aACE,QAAQ,WACR,OAAO,MAAM,OAAO,QAAQ,OAAO,MAAM,KAC1C,CACF,GACJ;AAED,QACE,qBAAC,WAAD;EACE,MAAM,UAAU,WAAW,OAAO,OAAO,EACvC,WAAW,GACZ,CAAC,CAAC;EACH,GAAI;EACJ,SAAS,KACP;GACE,6BAA6B;IAC3B;KAAE,MAAM;KAAW,MAAM;KAAM;IAC/B;KAAE,MAAM;KAAY,MAAM;KAAM;IAChC;KAAE,MAAM;KAAoB,MAAM;KAAM;IACxC;KAAE,MAAM;KAA+B,MAAM;KAAM;IACnD;KAAE,MAAM;KAAuB,MAAM;KAAM;IAC3C;KAAE,MAAM;KAA2B,MAAM;KAAM;IAC/C;KAAE,MAAM;KAAgB,MAAM;KAAM;IACpC;KAAE,MAAM;KAAc,MAAM;KAAM;IAClC;KAAE,MAAM;KAAa,MAAM;KAAM;IACjC;KAAE,MAAM;KAAwB,MAAM;KAAM;IAC5C;KAAE,MAAM;KAAoB,MAAM;KAAM;IACxC;KAAE,MAAM;KAAmC,MAAM;KAAM;IACxD;IACA,UAAU,QAAQ;GACpB,EACD,WAAW,EAAE,CACd;EACD,gBAAgB,KACd,EACE,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,EACF,EACD,kBAAkB,EAAE,CACrB;YAvCH;GAwCG,IAAI;GACL,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACP,oBAAC,MAAD;IAAM,MAAM,OAAO;cAChB,IAAI;;;;;IAKA;GACP,oBAAC,OAAD,EAAO;GACN,IAAI;GACL,oBAAC,SAAD,EAAW;GACX,oBAAC,MAAD;IAAM,MAAM,QAAQ,SAAS;IAAG;IAAgB;GACtC"}
package/dist/index.cjs CHANGED
@@ -15,6 +15,7 @@ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case
15
15
  let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
16
16
  let defu = require("defu");
17
17
  defu = require_runtime.__toESM(defu);
18
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
18
19
 
19
20
  //#region src/index.tsx
20
21
  /**
@@ -31,10 +32,7 @@ function plugin(options = {}) {
31
32
  },
32
33
  async prepare() {
33
34
  const result = await (0, _powerlines_plugin_env_helpers.readEnvTypeReflection)(this, "env");
34
- return (0, _powerlines_plugin_alloy_render.render)(this, <>
35
- <require_components_cloudflare_builtin.CloudflareBuiltin />
36
- <require_components_env_builtin.CloudflareEnvBuiltin reflection={result} />
37
- </>);
35
+ return (0, _powerlines_plugin_alloy_render.render)(this, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_components_cloudflare_builtin.CloudflareBuiltin, {}), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_components_env_builtin.CloudflareEnvBuiltin, { reflection: result })] }));
38
36
  },
39
37
  build: {
40
38
  order: "pre",
@@ -55,9 +53,10 @@ function plugin(options = {}) {
55
53
  queue: (0, _stryke_type_checks_is_function.isFunction)(workerModule.default.queue)
56
54
  };
57
55
  }));
58
- return (0, _powerlines_plugin_alloy_render.render)(this, <_alloy_js_core.For each={this.workers}>
59
- {(worker) => <require_components_worker_entry.WorkerEntry worker={worker} />}
60
- </_alloy_js_core.For>);
56
+ return (0, _powerlines_plugin_alloy_render.render)(this, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
57
+ each: this.workers,
58
+ children: (worker) => /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_components_worker_entry.WorkerEntry, { worker })
59
+ }));
61
60
  }
62
61
  },
63
62
  async deployPulumi() {
package/dist/index.mjs CHANGED
@@ -11,6 +11,7 @@ import { joinPaths } from "@stryke/path";
11
11
  import { kebabCase } from "@stryke/string-format/kebab-case";
12
12
  import { isFunction } from "@stryke/type-checks/is-function";
13
13
  import defu from "defu";
14
+ import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
14
15
 
15
16
  //#region src/index.tsx
16
17
  /**
@@ -27,10 +28,7 @@ function plugin(options = {}) {
27
28
  },
28
29
  async prepare() {
29
30
  const result = await readEnvTypeReflection(this, "env");
30
- return render(this, <>
31
- <CloudflareBuiltin />
32
- <CloudflareEnvBuiltin reflection={result} />
33
- </>);
31
+ return render(this, /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CloudflareBuiltin, {}), /* @__PURE__ */ jsx(CloudflareEnvBuiltin, { reflection: result })] }));
34
32
  },
35
33
  build: {
36
34
  order: "pre",
@@ -51,9 +49,10 @@ function plugin(options = {}) {
51
49
  queue: isFunction(workerModule.default.queue)
52
50
  };
53
51
  }));
54
- return render(this, <For each={this.workers}>
55
- {(worker) => <WorkerEntry worker={worker} />}
56
- </For>);
52
+ return render(this, /* @__PURE__ */ jsx(For, {
53
+ each: this.workers,
54
+ children: (worker) => /* @__PURE__ */ jsx(WorkerEntry, { worker })
55
+ }));
57
56
  }
58
57
  },
59
58
  async deployPulumi() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { For } from \"@alloy-js/core\";\nimport { ExportedHandler } from \"@cloudflare/workers-types\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { readEnvTypeReflection } from \"@powerlines/plugin-env/helpers\";\nimport { resolveModule } from \"@powerlines/plugin-esbuild/helpers/resolve\";\nimport * as pulumiCloudflare from \"@pulumi/cloudflare\";\nimport { joinPaths } from \"@stryke/path\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { CloudflareEnvBuiltin } from \"./components\";\nimport { CloudflareBuiltin } from \"./components/cloudflare-builtin\";\nimport { WorkerEntry } from \"./components/worker-entry\";\nimport {\n CloudflarePluginContext,\n CloudflarePluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./components\";\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n cloudflare?: CloudflarePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport function plugin<\n TContext extends CloudflarePluginContext = CloudflarePluginContext\n>(options: CloudflarePluginOptions = {}) {\n return [\n {\n name: \"cloudflare\",\n config() {\n return {\n cloudflare: defu(options, {})\n };\n },\n configResolved() {\n this.devDependencies[\"@cloudflare/workers-types\"] = \"^4.20240616.0\";\n },\n async prepare() {\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <>\n <CloudflareBuiltin />\n <CloudflareEnvBuiltin reflection={result} />\n </>\n );\n },\n build: {\n order: \"pre\",\n async handler() {\n this.workers = await Promise.all(\n this.entry.map(async entry => {\n if (!entry.input) {\n throw new Error(\n `Cloudflare Worker entry \"${entry.name}\" is missing an input file.`\n );\n }\n\n const workerModule = await resolveModule<{\n default: ExportedHandler;\n }>(this, entry.input);\n if (!workerModule?.default) {\n throw new Error(\n `Cloudflare Worker entry \"${\n entry.name\n }\" does not export a default handler. The Powerlines Cloudflare plugin expects each Worker entry module to export a default object matching the \\`ExportedHandler\\` interface from \"@cloudflare/workers-types\".`\n );\n }\n\n return {\n entry,\n fetch: isFunction(workerModule.default.fetch),\n tail: isFunction(workerModule.default.tail),\n trace: isFunction(workerModule.default.trace),\n tailStream: isFunction(workerModule.default.tailStream),\n scheduled: isFunction(workerModule.default.scheduled),\n test: isFunction(workerModule.default.test),\n email: isFunction(workerModule.default.email),\n queue: isFunction(workerModule.default.queue)\n };\n })\n );\n\n return render(\n this,\n <For each={this.workers}>\n {worker => <WorkerEntry worker={worker} />}\n </For>\n );\n }\n },\n async deployPulumi() {\n let apiToken = process.env.CLOUDFLARE_API_TOKEN;\n if (!apiToken) {\n apiToken = this.config.cloudflare.apiToken;\n if (apiToken) {\n this.warn(\n \"If possible, please use the `CLOUDFLARE_API_TOKEN` environment variable instead of using the `apiToken` option directly. The `apiToken` option will work; however, this is a less secure method of configuration.\"\n );\n } else {\n throw new Error(\n \"Unable to determine the Cloudflare API token. Please set the `CLOUDFLARE_API_TOKEN` environment variable.\"\n );\n }\n }\n\n await this.pulumi.setConfig(\"cloudflare:apiToken\", {\n value: apiToken\n });\n\n const worker = new pulumiCloudflare.WorkersScript(\n `${kebabCase(this.config.name)}-worker`,\n {\n accountId: this.config.cloudflare.accountId,\n scriptName:\n this.config.cloudflare.scriptName || kebabCase(this.config.name),\n contentFile: joinPaths(this.config.output.outputPath, \"index.js\")\n }\n );\n\n return {\n worker\n };\n }\n }\n ] as Plugin<TContext>[];\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiDA,SAAgB,OAEd,UAAmC,EAAE,EAAE;AACvC,QAAO,CACL;EACE,MAAM;EACN,SAAS;AACP,UAAO,EACL,YAAY,KAAK,SAAS,EAAE,CAAC,EAC9B;;EAEH,iBAAiB;AACf,QAAK,gBAAgB,+BAA+B;;EAEtD,MAAM,UAAU;GACd,MAAM,SAAS,MAAM,sBAAsB,MAAM,MAAM;AAEvD,UAAO,OACL,MACA,EAAE;YACA,CAAC,oBAAoB;YACrB,CAAC,qBAAqB,YAAY,UAAU;UAC9C,IACD;;EAEH,OAAO;GACL,OAAO;GACP,MAAM,UAAU;AACd,SAAK,UAAU,MAAM,QAAQ,IAC3B,KAAK,MAAM,IAAI,OAAM,UAAS;AAC5B,SAAI,CAAC,MAAM,MACT,OAAM,IAAI,MACR,4BAA4B,MAAM,KAAK,6BACxC;KAGH,MAAM,eAAe,MAAM,cAExB,MAAM,MAAM,MAAM;AACrB,SAAI,CAAC,cAAc,QACjB,OAAM,IAAI,MACR,4BACE,MAAM,KACP,gNACF;AAGH,YAAO;MACL;MACA,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC7C,MAAM,WAAW,aAAa,QAAQ,KAAK;MAC3C,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC7C,YAAY,WAAW,aAAa,QAAQ,WAAW;MACvD,WAAW,WAAW,aAAa,QAAQ,UAAU;MACrD,MAAM,WAAW,aAAa,QAAQ,KAAK;MAC3C,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC7C,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC9C;MACD,CACH;AAED,WAAO,OACL,MACA,CAAC,IAAI,MAAM,KAAK,SAAS;gBACtB,WAAU,CAAC,YAAY,QAAQ,WAAW;YAC7C,EAAE,KACH;;GAEJ;EACD,MAAM,eAAe;GACnB,IAAI,WAAW,QAAQ,IAAI;AAC3B,OAAI,CAAC,UAAU;AACb,eAAW,KAAK,OAAO,WAAW;AAClC,QAAI,SACF,MAAK,KACH,oNACD;QAED,OAAM,IAAI,MACR,4GACD;;AAIL,SAAM,KAAK,OAAO,UAAU,uBAAuB,EACjD,OAAO,UACR,CAAC;AAYF,UAAO,EACL,QAXa,IAAI,iBAAiB,cAClC,GAAG,UAAU,KAAK,OAAO,KAAK,CAAC,UAC/B;IACE,WAAW,KAAK,OAAO,WAAW;IAClC,YACE,KAAK,OAAO,WAAW,cAAc,UAAU,KAAK,OAAO,KAAK;IAClE,aAAa,UAAU,KAAK,OAAO,OAAO,YAAY,WAAW;IAClE,CACF,EAIA;;EAEJ,CACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { For } from \"@alloy-js/core\";\nimport { ExportedHandler } from \"@cloudflare/workers-types\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { readEnvTypeReflection } from \"@powerlines/plugin-env/helpers\";\nimport { resolveModule } from \"@powerlines/plugin-esbuild/helpers/resolve\";\nimport * as pulumiCloudflare from \"@pulumi/cloudflare\";\nimport { joinPaths } from \"@stryke/path\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { CloudflareEnvBuiltin } from \"./components\";\nimport { CloudflareBuiltin } from \"./components/cloudflare-builtin\";\nimport { WorkerEntry } from \"./components/worker-entry\";\nimport {\n CloudflarePluginContext,\n CloudflarePluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./components\";\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n cloudflare?: CloudflarePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport function plugin<\n TContext extends CloudflarePluginContext = CloudflarePluginContext\n>(options: CloudflarePluginOptions = {}) {\n return [\n {\n name: \"cloudflare\",\n config() {\n return {\n cloudflare: defu(options, {})\n };\n },\n configResolved() {\n this.devDependencies[\"@cloudflare/workers-types\"] = \"^4.20240616.0\";\n },\n async prepare() {\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <>\n <CloudflareBuiltin />\n <CloudflareEnvBuiltin reflection={result} />\n </>\n );\n },\n build: {\n order: \"pre\",\n async handler() {\n this.workers = await Promise.all(\n this.entry.map(async entry => {\n if (!entry.input) {\n throw new Error(\n `Cloudflare Worker entry \"${entry.name}\" is missing an input file.`\n );\n }\n\n const workerModule = await resolveModule<{\n default: ExportedHandler;\n }>(this, entry.input);\n if (!workerModule?.default) {\n throw new Error(\n `Cloudflare Worker entry \"${\n entry.name\n }\" does not export a default handler. The Powerlines Cloudflare plugin expects each Worker entry module to export a default object matching the \\`ExportedHandler\\` interface from \"@cloudflare/workers-types\".`\n );\n }\n\n return {\n entry,\n fetch: isFunction(workerModule.default.fetch),\n tail: isFunction(workerModule.default.tail),\n trace: isFunction(workerModule.default.trace),\n tailStream: isFunction(workerModule.default.tailStream),\n scheduled: isFunction(workerModule.default.scheduled),\n test: isFunction(workerModule.default.test),\n email: isFunction(workerModule.default.email),\n queue: isFunction(workerModule.default.queue)\n };\n })\n );\n\n return render(\n this,\n <For each={this.workers}>\n {worker => <WorkerEntry worker={worker} />}\n </For>\n );\n }\n },\n async deployPulumi() {\n let apiToken = process.env.CLOUDFLARE_API_TOKEN;\n if (!apiToken) {\n apiToken = this.config.cloudflare.apiToken;\n if (apiToken) {\n this.warn(\n \"If possible, please use the `CLOUDFLARE_API_TOKEN` environment variable instead of using the `apiToken` option directly. The `apiToken` option will work; however, this is a less secure method of configuration.\"\n );\n } else {\n throw new Error(\n \"Unable to determine the Cloudflare API token. Please set the `CLOUDFLARE_API_TOKEN` environment variable.\"\n );\n }\n }\n\n await this.pulumi.setConfig(\"cloudflare:apiToken\", {\n value: apiToken\n });\n\n const worker = new pulumiCloudflare.WorkersScript(\n `${kebabCase(this.config.name)}-worker`,\n {\n accountId: this.config.cloudflare.accountId,\n scriptName:\n this.config.cloudflare.scriptName || kebabCase(this.config.name),\n contentFile: joinPaths(this.config.output.outputPath, \"index.js\")\n }\n );\n\n return {\n worker\n };\n }\n }\n ] as Plugin<TContext>[];\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiDA,SAAgB,OAEd,UAAmC,EAAE,EAAE;AACvC,QAAO,CACL;EACE,MAAM;EACN,SAAS;AACP,UAAO,EACL,YAAY,KAAK,SAAS,EAAE,CAAC,EAC9B;;EAEH,iBAAiB;AACf,QAAK,gBAAgB,+BAA+B;;EAEtD,MAAM,UAAU;GACd,MAAM,SAAS,MAAM,sBAAsB,MAAM,MAAM;AAEvD,UAAO,OACL,MACA,4CACE,oBAAC,mBAAD,EAAqB,GACrB,oBAAC,sBAAD,EAAsB,YAAY,QAAU,EAC3C,IACJ;;EAEH,OAAO;GACL,OAAO;GACP,MAAM,UAAU;AACd,SAAK,UAAU,MAAM,QAAQ,IAC3B,KAAK,MAAM,IAAI,OAAM,UAAS;AAC5B,SAAI,CAAC,MAAM,MACT,OAAM,IAAI,MACR,4BAA4B,MAAM,KAAK,6BACxC;KAGH,MAAM,eAAe,MAAM,cAExB,MAAM,MAAM,MAAM;AACrB,SAAI,CAAC,cAAc,QACjB,OAAM,IAAI,MACR,4BACE,MAAM,KACP,gNACF;AAGH,YAAO;MACL;MACA,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC7C,MAAM,WAAW,aAAa,QAAQ,KAAK;MAC3C,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC7C,YAAY,WAAW,aAAa,QAAQ,WAAW;MACvD,WAAW,WAAW,aAAa,QAAQ,UAAU;MACrD,MAAM,WAAW,aAAa,QAAQ,KAAK;MAC3C,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC7C,OAAO,WAAW,aAAa,QAAQ,MAAM;MAC9C;MACD,CACH;AAED,WAAO,OACL,MACA,oBAAC,KAAD;KAAK,MAAM,KAAK;gBACb,WAAU,oBAAC,aAAD,EAAqB,QAAU;KACtC,EACP;;GAEJ;EACD,MAAM,eAAe;GACnB,IAAI,WAAW,QAAQ,IAAI;AAC3B,OAAI,CAAC,UAAU;AACb,eAAW,KAAK,OAAO,WAAW;AAClC,QAAI,SACF,MAAK,KACH,oNACD;QAED,OAAM,IAAI,MACR,4GACD;;AAIL,SAAM,KAAK,OAAO,UAAU,uBAAuB,EACjD,OAAO,UACR,CAAC;AAYF,UAAO,EACL,QAXa,IAAI,iBAAiB,cAClC,GAAG,UAAU,KAAK,OAAO,KAAK,CAAC,UAC/B;IACE,WAAW,KAAK,OAAO,WAAW;IAClC,YACE,KAAK,OAAO,WAAW,cAAc,UAAU,KAAK,OAAO,KAAK;IAClE,aAAa,UAAU,KAAK,OAAO,OAAO,YAAY,WAAW;IAClE,CACF,EAIA;;EAEJ,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-cloudflare",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin that provides integration with Cloudflare services.",
6
6
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
@@ -148,8 +148,8 @@
148
148
  "@alloy-js/core": "0.23.0-dev.8",
149
149
  "@alloy-js/typescript": "0.23.0-dev.4",
150
150
  "@cloudflare/workers-types": "^4.20260312.1",
151
- "@powerlines/plugin-env": "^0.16.63",
152
- "@powerlines/plugin-pulumi": "^0.5.25",
151
+ "@powerlines/plugin-env": "^0.16.64",
152
+ "@powerlines/plugin-pulumi": "^0.5.26",
153
153
  "@pulumi/cloudflare": "^6.13.0",
154
154
  "@pulumi/pulumi": "^3.225.1",
155
155
  "@storm-software/config-tools": "1.189.28",
@@ -158,14 +158,14 @@
158
158
  "@stryke/string-format": "^0.17.3",
159
159
  "@stryke/type-checks": "^0.5.38",
160
160
  "defu": "^6.1.4",
161
- "powerlines": "^0.41.9"
161
+ "powerlines": "^0.41.10"
162
162
  },
163
163
  "devDependencies": {
164
164
  "@cloudflare/workers-types": "^4.20260312.1",
165
- "@powerlines/plugin-alloy": "^0.25.28",
166
- "@powerlines/plugin-plugin": "^0.12.295",
165
+ "@powerlines/plugin-alloy": "^0.25.29",
166
+ "@powerlines/plugin-plugin": "^0.12.296",
167
167
  "@types/node": "^25.5.0"
168
168
  },
169
169
  "publishConfig": { "access": "public" },
170
- "gitHead": "74a26c533ea4d67ba1b3e297256309c2e23f6e62"
170
+ "gitHead": "8ab1d6e9a7ab44ee184b19c58d6de2c4c101ec01"
171
171
  }