dcl-ops-lib 9.5.0 → 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
  });
@@ -214,7 +214,7 @@ async function createFargateTask(serviceName, dockerImage, dockerListeningPort,
214
214
  securityGroups: [taskSecurityGroup.id, ...securityGroups],
215
215
  containerInfo: {
216
216
  name: serviceName,
217
- secrets: [],
217
+ secrets,
218
218
  environment,
219
219
  essential,
220
220
  image: dockerImage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "9.5.0",
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",