dcl-ops-lib 9.5.1 → 9.6.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/cloudflare.d.ts CHANGED
@@ -1,9 +1,21 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as cloudflare from "@pulumi/cloudflare";
3
+ export type ServiceBindingConfig = {
4
+ /** Global variable name in the calling Worker (e.g. "AB_CDN_REWRITER"). */
5
+ name: string;
6
+ /** Bound worker's deployed script name. Pass the `worker.name` Output
7
+ * returned by another `deployWorker(...)` call so Pulumi tracks the
8
+ * dependency edge automatically — the Cloudflare API rejects bindings
9
+ * that point at a script that doesn't exist yet. */
10
+ service: pulumi.Input<string>;
11
+ /** Cloudflare environment slot. Omit to use Cloudflare's default ("production"). */
12
+ environment?: pulumi.Input<string>;
13
+ };
3
14
  export type DeployWorkerConfig = {
4
15
  jsWorkerFileName: string;
5
16
  routes: pulumi.Input<string>[];
6
17
  env?: Record<string, pulumi.Input<string>>;
18
+ serviceBindings?: ServiceBindingConfig[];
7
19
  overrides?: cloudflare.WorkerScriptArgs;
8
20
  };
9
21
  export type SetRecordConfig = {
package/cloudflare.js CHANGED
@@ -34,6 +34,7 @@ async function deployWorker(workerName, config) {
34
34
  name: `${workerName}-${domain_1.publicTLD}`,
35
35
  content,
36
36
  plainTextBindings,
37
+ serviceBindings: config.serviceBindings,
37
38
  accountId: getAccountId(),
38
39
  ...(config.overrides || {}),
39
40
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "9.5.1",
3
+ "version": "9.6.0",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "test": "tsc -p tsconfig.test.json && ENVIRONMENT=dev node bin-test/rateLimiting.test.js",