@powerlines/plugin-cloudflare 0.2.31 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -9
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +32 -10
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/plugin.d.cts +13 -9
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +13 -9
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/worker-module.cjs +0 -0
- package/dist/types/worker-module.d.cts +21 -0
- package/dist/types/worker-module.d.cts.map +1 -0
- package/dist/types/worker-module.d.mts +21 -0
- package/dist/types/worker-module.d.mts.map +1 -0
- package/dist/types/worker-module.mjs +1 -0
- package/package.json +22 -8
package/dist/index.cjs
CHANGED
|
@@ -38,12 +38,15 @@ function plugin(options = {}) {
|
|
|
38
38
|
order: "pre",
|
|
39
39
|
async handler() {
|
|
40
40
|
const _self$ = this;
|
|
41
|
-
this.workers = await Promise.all(this.entry.map(async (entry) => {
|
|
42
|
-
if (!entry.input) throw new Error(`Cloudflare Worker entry "${entry.
|
|
41
|
+
this.workers = await Promise.all(this.entry.map(async (entry, i, arr) => {
|
|
42
|
+
if (!entry.input) throw new Error(`Cloudflare Worker entry "${entry.file}" is missing an input file.`);
|
|
43
43
|
const workerModule = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolveModule)(this, entry.input);
|
|
44
|
-
if (!workerModule?.default) throw new Error(`Cloudflare Worker entry "${entry.
|
|
44
|
+
if (!workerModule?.default) throw new Error(`Cloudflare Worker entry "${entry.file}" 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".`);
|
|
45
45
|
return {
|
|
46
|
-
|
|
46
|
+
metadata: {
|
|
47
|
+
name: workerModule.metadata?.name || (0, _stryke_path.replaceExtension)(entry.input.file || entry.file) || arr.length > 1 ? `${this.config.name}-${i}` : this.config.name,
|
|
48
|
+
entry
|
|
49
|
+
},
|
|
47
50
|
fetch: (0, _stryke_type_checks_is_function.isFunction)(workerModule.default.fetch),
|
|
48
51
|
tail: (0, _stryke_type_checks_is_function.isFunction)(workerModule.default.tail),
|
|
49
52
|
trace: (0, _stryke_type_checks_is_function.isFunction)(workerModule.default.trace),
|
|
@@ -70,11 +73,30 @@ function plugin(options = {}) {
|
|
|
70
73
|
else throw new Error("Unable to determine the Cloudflare API token. Please set the `CLOUDFLARE_API_TOKEN` environment variable.");
|
|
71
74
|
}
|
|
72
75
|
await this.pulumi.setConfig("cloudflare:apiToken", { value: apiToken });
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const zone = await _pulumi_cloudflare.getZone({ filter: {
|
|
77
|
+
account: { id: this.config.cloudflare.accountId },
|
|
78
|
+
name: this.config.cloudflare.domain
|
|
79
|
+
} });
|
|
80
|
+
const workerScripts = [];
|
|
81
|
+
const workerRoutes = [];
|
|
82
|
+
for (const worker of this.workers) {
|
|
83
|
+
const workerScript = new _pulumi_cloudflare.WorkersScript(`${this.config.organization ? `${this.config.organization}.` : ""}${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) === (0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) : `${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name)}.${(0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name)}`}.worker-script`, {
|
|
84
|
+
accountId: this.config.cloudflare.accountId,
|
|
85
|
+
scriptName: worker.metadata.name,
|
|
86
|
+
contentFile: (0, _stryke_path.joinPaths)(this.config.output.outputPath, "index.js")
|
|
87
|
+
});
|
|
88
|
+
workerScripts.push(workerScript);
|
|
89
|
+
const workerRoute = new _pulumi_cloudflare.WorkersRoute(`${this.config.organization ? `${this.config.organization}.` : ""}${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) === (0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name) : `${(0, _stryke_string_format_kebab_case.kebabCase)(this.config.name)}-${(0, _stryke_string_format_kebab_case.kebabCase)(worker.metadata.name)}`}.worker-route`, {
|
|
90
|
+
zoneId: zone.id,
|
|
91
|
+
pattern: `hello-world.${this.config.cloudflare.domain}`,
|
|
92
|
+
script: workerScript.scriptName
|
|
93
|
+
});
|
|
94
|
+
workerRoutes.push(workerRoute);
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
workerScripts,
|
|
98
|
+
workerRoutes
|
|
99
|
+
};
|
|
78
100
|
}
|
|
79
101
|
}];
|
|
80
102
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CloudflareBuiltin, CloudflareBuiltinProps, __ΩCloudflareBuiltinProps } from "./components/cloudflare-builtin.cjs";
|
|
2
2
|
import { CloudflareEnvBuiltin, CloudflareEnvBuiltinProps, __ΩCloudflareEnvBuiltinProps } from "./components/env-builtin.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { WorkerModule, WorkerModuleMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata } from "./types/worker-module.cjs";
|
|
4
|
+
import { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata } from "./types/plugin.cjs";
|
|
4
5
|
import { WorkerEntry, WorkerEntryProps, __ΩWorkerEntryProps } from "./components/worker-entry.cjs";
|
|
5
6
|
import { Plugin } from "powerlines";
|
|
6
7
|
|
|
@@ -15,5 +16,5 @@ declare module "powerlines" {
|
|
|
15
16
|
*/
|
|
16
17
|
declare function plugin<TContext extends CloudflarePluginContext = CloudflarePluginContext>(options?: CloudflarePluginOptions): Plugin<TContext>[];
|
|
17
18
|
//#endregion
|
|
18
|
-
export { CloudflareBuiltin, CloudflareBuiltinProps, CloudflareEnvBuiltin, CloudflareEnvBuiltinProps, CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, WorkerEntry, WorkerEntryProps, __ΩCloudflareBuiltinProps, __ΩCloudflareEnvBuiltinProps, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩWorkerEntryProps, plugin as default, plugin };
|
|
19
|
+
export { CloudflareBuiltin, CloudflareBuiltinProps, CloudflareEnvBuiltin, CloudflareEnvBuiltinProps, CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, WorkerEntry, WorkerEntryProps, WorkerModule, WorkerModuleMetadata, __ΩCloudflareBuiltinProps, __ΩCloudflareEnvBuiltinProps, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata, __ΩWorkerEntryProps, __ΩWorkerModule, __ΩWorkerModuleMetadata, plugin as default, plugin };
|
|
19
20
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;YA0CY,MAAA;IACR,UAAA,GAAa,uBAAA;EAAA;AAAA;;AAJY;;iBAWb,MAAA,kBACG,uBAAA,GAA0B,uBAAA,CAAA,CAC3C,OAAA,GAAS,uBAAA,GAgJJ,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CloudflareBuiltin, CloudflareBuiltinProps, __ΩCloudflareBuiltinProps } from "./components/cloudflare-builtin.mjs";
|
|
2
2
|
import { CloudflareEnvBuiltin, CloudflareEnvBuiltinProps, __ΩCloudflareEnvBuiltinProps } from "./components/env-builtin.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { WorkerModule, WorkerModuleMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata } from "./types/worker-module.mjs";
|
|
4
|
+
import { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata } from "./types/plugin.mjs";
|
|
4
5
|
import { WorkerEntry, WorkerEntryProps, __ΩWorkerEntryProps } from "./components/worker-entry.mjs";
|
|
5
6
|
import { Plugin } from "powerlines";
|
|
6
7
|
|
|
@@ -15,5 +16,5 @@ declare module "powerlines" {
|
|
|
15
16
|
*/
|
|
16
17
|
declare function plugin<TContext extends CloudflarePluginContext = CloudflarePluginContext>(options?: CloudflarePluginOptions): Plugin<TContext>[];
|
|
17
18
|
//#endregion
|
|
18
|
-
export { CloudflareBuiltin, CloudflareBuiltinProps, CloudflareEnvBuiltin, CloudflareEnvBuiltinProps, CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, WorkerEntry, WorkerEntryProps, __ΩCloudflareBuiltinProps, __ΩCloudflareEnvBuiltinProps, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩWorkerEntryProps, plugin as default, plugin };
|
|
19
|
+
export { CloudflareBuiltin, CloudflareBuiltinProps, CloudflareEnvBuiltin, CloudflareEnvBuiltinProps, CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, WorkerEntry, WorkerEntryProps, WorkerModule, WorkerModuleMetadata, __ΩCloudflareBuiltinProps, __ΩCloudflareEnvBuiltinProps, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata, __ΩWorkerEntryProps, __ΩWorkerModule, __ΩWorkerModuleMetadata, plugin as default, plugin };
|
|
19
20
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;YA0CY,MAAA;IACR,UAAA,GAAa,uBAAA;EAAA;AAAA;;AAJY;;iBAWb,MAAA,kBACG,uBAAA,GAA0B,uBAAA,CAAA,CAC3C,OAAA,GAAS,uBAAA,GAgJJ,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { render } from "@powerlines/plugin-alloy/render";
|
|
|
8
8
|
import { readEnvTypeReflection } from "@powerlines/plugin-env/helpers";
|
|
9
9
|
import { resolveModule } from "@powerlines/plugin-esbuild/helpers/resolve";
|
|
10
10
|
import * as pulumiCloudflare from "@pulumi/cloudflare";
|
|
11
|
-
import { joinPaths } from "@stryke/path";
|
|
11
|
+
import { joinPaths, replaceExtension } from "@stryke/path";
|
|
12
12
|
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
13
13
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
14
14
|
import defu from "defu";
|
|
@@ -34,12 +34,15 @@ function plugin(options = {}) {
|
|
|
34
34
|
order: "pre",
|
|
35
35
|
async handler() {
|
|
36
36
|
const _self$ = this;
|
|
37
|
-
this.workers = await Promise.all(this.entry.map(async (entry) => {
|
|
38
|
-
if (!entry.input) throw new Error(`Cloudflare Worker entry "${entry.
|
|
37
|
+
this.workers = await Promise.all(this.entry.map(async (entry, i, arr) => {
|
|
38
|
+
if (!entry.input) throw new Error(`Cloudflare Worker entry "${entry.file}" is missing an input file.`);
|
|
39
39
|
const workerModule = await resolveModule(this, entry.input);
|
|
40
|
-
if (!workerModule?.default) throw new Error(`Cloudflare Worker entry "${entry.
|
|
40
|
+
if (!workerModule?.default) throw new Error(`Cloudflare Worker entry "${entry.file}" 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".`);
|
|
41
41
|
return {
|
|
42
|
-
|
|
42
|
+
metadata: {
|
|
43
|
+
name: workerModule.metadata?.name || replaceExtension(entry.input.file || entry.file) || arr.length > 1 ? `${this.config.name}-${i}` : this.config.name,
|
|
44
|
+
entry
|
|
45
|
+
},
|
|
43
46
|
fetch: isFunction(workerModule.default.fetch),
|
|
44
47
|
tail: isFunction(workerModule.default.tail),
|
|
45
48
|
trace: isFunction(workerModule.default.trace),
|
|
@@ -66,11 +69,30 @@ function plugin(options = {}) {
|
|
|
66
69
|
else throw new Error("Unable to determine the Cloudflare API token. Please set the `CLOUDFLARE_API_TOKEN` environment variable.");
|
|
67
70
|
}
|
|
68
71
|
await this.pulumi.setConfig("cloudflare:apiToken", { value: apiToken });
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
const zone = await pulumiCloudflare.getZone({ filter: {
|
|
73
|
+
account: { id: this.config.cloudflare.accountId },
|
|
74
|
+
name: this.config.cloudflare.domain
|
|
75
|
+
} });
|
|
76
|
+
const workerScripts = [];
|
|
77
|
+
const workerRoutes = [];
|
|
78
|
+
for (const worker of this.workers) {
|
|
79
|
+
const workerScript = new pulumiCloudflare.WorkersScript(`${this.config.organization ? `${this.config.organization}.` : ""}${kebabCase(this.config.name) === kebabCase(worker.metadata.name) ? kebabCase(this.config.name) : `${kebabCase(this.config.name)}.${kebabCase(worker.metadata.name)}`}.worker-script`, {
|
|
80
|
+
accountId: this.config.cloudflare.accountId,
|
|
81
|
+
scriptName: worker.metadata.name,
|
|
82
|
+
contentFile: joinPaths(this.config.output.outputPath, "index.js")
|
|
83
|
+
});
|
|
84
|
+
workerScripts.push(workerScript);
|
|
85
|
+
const workerRoute = new pulumiCloudflare.WorkersRoute(`${this.config.organization ? `${this.config.organization}.` : ""}${kebabCase(this.config.name) === kebabCase(worker.metadata.name) ? kebabCase(this.config.name) : `${kebabCase(this.config.name)}-${kebabCase(worker.metadata.name)}`}.worker-route`, {
|
|
86
|
+
zoneId: zone.id,
|
|
87
|
+
pattern: `hello-world.${this.config.cloudflare.domain}`,
|
|
88
|
+
script: workerScript.scriptName
|
|
89
|
+
});
|
|
90
|
+
workerRoutes.push(workerRoute);
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
workerScripts,
|
|
94
|
+
workerRoutes
|
|
95
|
+
};
|
|
74
96
|
}
|
|
75
97
|
}];
|
|
76
98
|
}
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 {
|
|
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 { 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, replaceExtension } 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 CloudflareWorkerEntryModule\n} from \"./types/plugin\";\nimport { WorkerModule } from \"./types/worker-module\";\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, i, arr) => {\n if (!entry.input) {\n throw new Error(\n `Cloudflare Worker entry \"${entry.file}\" is missing an input file.`\n );\n }\n\n const workerModule = await resolveModule<WorkerModule>(\n this,\n entry.input\n );\n if (!workerModule?.default) {\n throw new Error(\n `Cloudflare Worker entry \"${\n entry.file\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 metadata: {\n name:\n workerModule.metadata?.name ||\n replaceExtension(entry.input.file || entry.file) ||\n arr.length > 1\n ? `${this.config.name}-${i}`\n : this.config.name,\n entry\n },\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 } satisfies CloudflareWorkerEntryModule;\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 zone = await pulumiCloudflare.getZone({\n filter: {\n account: { id: this.config.cloudflare.accountId },\n name: this.config.cloudflare.domain\n }\n });\n\n const workerScripts = [] as pulumiCloudflare.WorkersScript[];\n const workerRoutes = [] as pulumiCloudflare.WorkersRoute[];\n for (const worker of this.workers) {\n const workerScript = new pulumiCloudflare.WorkersScript(\n `${this.config.organization ? `${this.config.organization}.` : \"\"}${\n kebabCase(this.config.name) === kebabCase(worker.metadata.name)\n ? kebabCase(this.config.name)\n : `${kebabCase(this.config.name)}.${kebabCase(\n worker.metadata.name\n )}`\n }.worker-script`,\n {\n accountId: this.config.cloudflare.accountId,\n scriptName: worker.metadata.name,\n contentFile: joinPaths(this.config.output.outputPath, \"index.js\")\n }\n );\n workerScripts.push(workerScript);\n\n const workerRoute = new pulumiCloudflare.WorkersRoute(\n `${this.config.organization ? `${this.config.organization}.` : \"\"}${\n kebabCase(this.config.name) === kebabCase(worker.metadata.name)\n ? kebabCase(this.config.name)\n : `${kebabCase(this.config.name)}-${kebabCase(\n worker.metadata.name\n )}`\n }.worker-route`,\n {\n zoneId: zone.id,\n pattern: `hello-world.${this.config.cloudflare.domain}`,\n script: workerScript.scriptName\n }\n );\n workerRoutes.push(workerRoute);\n }\n\n return {\n workerScripts,\n workerRoutes\n };\n }\n }\n ] as Plugin<TContext>[];\n}\n\nexport default plugin;\n"],"mappings":"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"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { WorkerModule, WorkerModuleMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata } from "./worker-module.cjs";
|
|
2
|
+
import { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata } from "./plugin.cjs";
|
|
3
|
+
export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, WorkerModule, WorkerModuleMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { WorkerModule, WorkerModuleMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata } from "./worker-module.mjs";
|
|
2
|
+
import { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata } from "./plugin.mjs";
|
|
3
|
+
export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, WorkerModule, WorkerModuleMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WorkerModuleMetadata } from "./worker-module.cjs";
|
|
1
2
|
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
2
3
|
import { EnvPluginContext, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env";
|
|
3
4
|
import { PulumiPluginContext, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
|
|
@@ -27,13 +28,6 @@ interface CloudflarePluginOptions {
|
|
|
27
28
|
* The domain to use for the Cloudflare deployed resources.
|
|
28
29
|
*/
|
|
29
30
|
domain?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
|
|
32
|
-
*
|
|
33
|
-
* @remarks
|
|
34
|
-
* If no value is provided, the {@link Config.name} configuration value will be used.
|
|
35
|
-
*/
|
|
36
|
-
scriptName?: string;
|
|
37
31
|
}
|
|
38
32
|
type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & {
|
|
39
33
|
/**
|
|
@@ -47,8 +41,17 @@ type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginReso
|
|
|
47
41
|
*/
|
|
48
42
|
cloudflare: Required<CloudflarePluginOptions>;
|
|
49
43
|
};
|
|
50
|
-
|
|
44
|
+
interface CloudflareWorkerMetadata extends Required<WorkerModuleMetadata> {
|
|
45
|
+
/**
|
|
46
|
+
* The resolved entry definition for the Worker module, including the original entry definition and the resolved file path to the module.
|
|
47
|
+
*/
|
|
51
48
|
entry: ResolvedEntryTypeDefinition;
|
|
49
|
+
}
|
|
50
|
+
type CloudflareWorkerEntryModule = Record<keyof ExportedHandler, boolean> & {
|
|
51
|
+
/**
|
|
52
|
+
* 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.
|
|
53
|
+
*/
|
|
54
|
+
metadata: CloudflareWorkerMetadata;
|
|
52
55
|
};
|
|
53
56
|
type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & {
|
|
54
57
|
workers: CloudflareWorkerEntryModule[];
|
|
@@ -56,8 +59,9 @@ type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedCon
|
|
|
56
59
|
declare type __ΩCloudflarePluginOptions = any[];
|
|
57
60
|
declare type __ΩCloudflarePluginUserConfig = any[];
|
|
58
61
|
declare type __ΩCloudflarePluginResolvedConfig = any[];
|
|
62
|
+
declare type __ΩCloudflareWorkerMetadata = any[];
|
|
59
63
|
declare type __ΩCloudflareWorkerEntryModule = any[];
|
|
60
64
|
declare type __ΩCloudflarePluginContext = any[];
|
|
61
65
|
//#endregion
|
|
62
|
-
export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule };
|
|
66
|
+
export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata };
|
|
63
67
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;UAgCiB,uBAAA;;AAAjB;;;;;;;EASE,SAAA;EAeM;AAGR;;;;;;;EARE,QAAA;EAQuC;;;EAHvC,MAAA;AAAA;AAAA,KAGU,0BAAA,GAA6B,mBAAA,GACvC,sBAAA;EAOU;;;EAHR,UAAA,GAAa,uBAAA;AAAA;AAAA,KAGL,8BAAA,GAAiC,uBAAA,GAC3C,0BAAA;EAIc;;;EAAZ,UAAA,EAAY,QAAA,CAAS,uBAAA;AAAA;AAAA,UAGR,wBAAA,SAAiC,QAAA,CAAS,oBAAA;EAH3C;;;EAOd,KAAA,EAAO,2BAAA;AAAA;AAAA,KAGG,2BAAA,GAA8B,MAAA,OAClC,eAAA;;;;EAMN,QAAA,EAAU,wBAAA;AAAA;AAAA,KAGA,uBAAA,yBACc,8BAAA,GACtB,8BAAA,IACA,aAAA,CAAc,eAAA,IAChB,gBAAA,CAAiB,eAAA,IACjB,mBAAA,CAAoB,eAAA;EAClB,OAAA,EAAS,2BAAA;AAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WorkerModuleMetadata } from "./worker-module.mjs";
|
|
1
2
|
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
2
3
|
import { EnvPluginContext, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env";
|
|
3
4
|
import { PulumiPluginContext, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
|
|
@@ -27,13 +28,6 @@ interface CloudflarePluginOptions {
|
|
|
27
28
|
* The domain to use for the Cloudflare deployed resources.
|
|
28
29
|
*/
|
|
29
30
|
domain?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The name of the Cloudflare Worker script to deploy - used in URLs and route configuration.
|
|
32
|
-
*
|
|
33
|
-
* @remarks
|
|
34
|
-
* If no value is provided, the {@link Config.name} configuration value will be used.
|
|
35
|
-
*/
|
|
36
|
-
scriptName?: string;
|
|
37
31
|
}
|
|
38
32
|
type CloudflarePluginUserConfig = EnvPluginUserConfig & PulumiPluginUserConfig & {
|
|
39
33
|
/**
|
|
@@ -47,8 +41,17 @@ type CloudflarePluginResolvedConfig = EnvPluginResolvedConfig & PulumiPluginReso
|
|
|
47
41
|
*/
|
|
48
42
|
cloudflare: Required<CloudflarePluginOptions>;
|
|
49
43
|
};
|
|
50
|
-
|
|
44
|
+
interface CloudflareWorkerMetadata extends Required<WorkerModuleMetadata> {
|
|
45
|
+
/**
|
|
46
|
+
* The resolved entry definition for the Worker module, including the original entry definition and the resolved file path to the module.
|
|
47
|
+
*/
|
|
51
48
|
entry: ResolvedEntryTypeDefinition;
|
|
49
|
+
}
|
|
50
|
+
type CloudflareWorkerEntryModule = Record<keyof ExportedHandler, boolean> & {
|
|
51
|
+
/**
|
|
52
|
+
* 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.
|
|
53
|
+
*/
|
|
54
|
+
metadata: CloudflareWorkerMetadata;
|
|
52
55
|
};
|
|
53
56
|
type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedConfig = CloudflarePluginResolvedConfig> = PluginContext<TResolvedConfig> & EnvPluginContext<TResolvedConfig> & PulumiPluginContext<TResolvedConfig> & {
|
|
54
57
|
workers: CloudflareWorkerEntryModule[];
|
|
@@ -56,8 +59,9 @@ type CloudflarePluginContext<TResolvedConfig extends CloudflarePluginResolvedCon
|
|
|
56
59
|
declare type __ΩCloudflarePluginOptions = any[];
|
|
57
60
|
declare type __ΩCloudflarePluginUserConfig = any[];
|
|
58
61
|
declare type __ΩCloudflarePluginResolvedConfig = any[];
|
|
62
|
+
declare type __ΩCloudflareWorkerMetadata = any[];
|
|
59
63
|
declare type __ΩCloudflareWorkerEntryModule = any[];
|
|
60
64
|
declare type __ΩCloudflarePluginContext = any[];
|
|
61
65
|
//#endregion
|
|
62
|
-
export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule };
|
|
66
|
+
export { CloudflarePluginContext, CloudflarePluginOptions, CloudflarePluginResolvedConfig, CloudflarePluginUserConfig, CloudflareWorkerEntryModule, CloudflareWorkerMetadata, __ΩCloudflarePluginContext, __ΩCloudflarePluginOptions, __ΩCloudflarePluginResolvedConfig, __ΩCloudflarePluginUserConfig, __ΩCloudflareWorkerEntryModule, __ΩCloudflareWorkerMetadata };
|
|
63
67
|
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;UAgCiB,uBAAA;;AAAjB;;;;;;;EASE,SAAA;EAeM;AAGR;;;;;;;EARE,QAAA;EAQuC;;;EAHvC,MAAA;AAAA;AAAA,KAGU,0BAAA,GAA6B,mBAAA,GACvC,sBAAA;EAOU;;;EAHR,UAAA,GAAa,uBAAA;AAAA;AAAA,KAGL,8BAAA,GAAiC,uBAAA,GAC3C,0BAAA;EAIc;;;EAAZ,UAAA,EAAY,QAAA,CAAS,uBAAA;AAAA;AAAA,UAGR,wBAAA,SAAiC,QAAA,CAAS,oBAAA;EAH3C;;;EAOd,KAAA,EAAO,2BAAA;AAAA;AAAA,KAGG,2BAAA,GAA8B,MAAA,OAClC,eAAA;;;;EAMN,QAAA,EAAU,wBAAA;AAAA;AAAA,KAGA,uBAAA,yBACc,8BAAA,GACtB,8BAAA,IACA,aAAA,CAAc,eAAA,IAChB,gBAAA,CAAiB,eAAA,IACjB,mBAAA,CAAoB,eAAA;EAClB,OAAA,EAAS,2BAAA;AAAA;AAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
2
|
+
|
|
3
|
+
//#region src/types/worker-module.d.ts
|
|
4
|
+
interface WorkerModuleMetadata {
|
|
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
|
+
interface WorkerModule {
|
|
14
|
+
metadata?: WorkerModuleMetadata;
|
|
15
|
+
default: ExportedHandler;
|
|
16
|
+
}
|
|
17
|
+
declare type __ΩWorkerModuleMetadata = any[];
|
|
18
|
+
declare type __ΩWorkerModule = any[];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { WorkerModule, WorkerModuleMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata };
|
|
21
|
+
//# sourceMappingURL=worker-module.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-module.d.cts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":";;;UAoBiB,oBAAA;;AAAjB;;;;;EAOE,IAAA;AAAA;AAAA,UAGe,YAAA;EACf,QAAA,GAAW,oBAAA;EACX,OAAA,EAAS,eAAA;AAAA;AAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExportedHandler } from "@cloudflare/workers-types";
|
|
2
|
+
|
|
3
|
+
//#region src/types/worker-module.d.ts
|
|
4
|
+
interface WorkerModuleMetadata {
|
|
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
|
+
interface WorkerModule {
|
|
14
|
+
metadata?: WorkerModuleMetadata;
|
|
15
|
+
default: ExportedHandler;
|
|
16
|
+
}
|
|
17
|
+
declare type __ΩWorkerModuleMetadata = any[];
|
|
18
|
+
declare type __ΩWorkerModule = any[];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { WorkerModule, WorkerModuleMetadata, __ΩWorkerModule, __ΩWorkerModuleMetadata };
|
|
21
|
+
//# sourceMappingURL=worker-module.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-module.d.mts","names":[],"sources":["../../src/types/worker-module.ts"],"mappings":";;;UAoBiB,oBAAA;;AAAjB;;;;;EAOE,IAAA;AAAA;AAAA,UAGe,YAAA;EACf,QAAA,GAAW,oBAAA;EACX,OAAA,EAAS,eAAA;AAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-cloudflare",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin that provides integration with Cloudflare services.",
|
|
6
6
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -138,6 +138,20 @@
|
|
|
138
138
|
"types": "./dist/types/plugin.d.mts",
|
|
139
139
|
"default": "./dist/types/plugin.mjs"
|
|
140
140
|
}
|
|
141
|
+
},
|
|
142
|
+
"./types/worker-module": {
|
|
143
|
+
"require": {
|
|
144
|
+
"types": "./dist/types/worker-module.d.cts",
|
|
145
|
+
"default": "./dist/types/worker-module.cjs"
|
|
146
|
+
},
|
|
147
|
+
"import": {
|
|
148
|
+
"types": "./dist/types/worker-module.d.mts",
|
|
149
|
+
"default": "./dist/types/worker-module.mjs"
|
|
150
|
+
},
|
|
151
|
+
"default": {
|
|
152
|
+
"types": "./dist/types/worker-module.d.mts",
|
|
153
|
+
"default": "./dist/types/worker-module.mjs"
|
|
154
|
+
}
|
|
141
155
|
}
|
|
142
156
|
},
|
|
143
157
|
"main": "./dist/index.cjs",
|
|
@@ -148,24 +162,24 @@
|
|
|
148
162
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
149
163
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
150
164
|
"@cloudflare/workers-types": "^4.20260313.1",
|
|
151
|
-
"@powerlines/plugin-env": "^0.16.
|
|
152
|
-
"@powerlines/plugin-pulumi": "^0.5.
|
|
165
|
+
"@powerlines/plugin-env": "^0.16.72",
|
|
166
|
+
"@powerlines/plugin-pulumi": "^0.5.32",
|
|
153
167
|
"@pulumi/cloudflare": "^6.13.0",
|
|
154
|
-
"@pulumi/pulumi": "^3.
|
|
168
|
+
"@pulumi/pulumi": "^3.226.0",
|
|
155
169
|
"@storm-software/config-tools": "1.189.28",
|
|
156
170
|
"@stryke/hash": "^0.13.11",
|
|
157
171
|
"@stryke/path": "^0.27.0",
|
|
158
172
|
"@stryke/string-format": "^0.17.4",
|
|
159
173
|
"@stryke/type-checks": "^0.5.39",
|
|
160
174
|
"defu": "^6.1.4",
|
|
161
|
-
"powerlines": "^0.41.
|
|
175
|
+
"powerlines": "^0.41.16"
|
|
162
176
|
},
|
|
163
177
|
"devDependencies": {
|
|
164
178
|
"@cloudflare/workers-types": "^4.20260313.1",
|
|
165
|
-
"@powerlines/plugin-alloy": "^0.25.
|
|
166
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
179
|
+
"@powerlines/plugin-alloy": "^0.25.37",
|
|
180
|
+
"@powerlines/plugin-plugin": "^0.12.302",
|
|
167
181
|
"@types/node": "^25.5.0"
|
|
168
182
|
},
|
|
169
183
|
"publishConfig": { "access": "public" },
|
|
170
|
-
"gitHead": "
|
|
184
|
+
"gitHead": "8ec4099f9a0e88d76e36c20562958c28c12fdca0"
|
|
171
185
|
}
|