@causa/workspace-google 0.18.0-beta.2 → 0.18.0-beta.4

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 (50) hide show
  1. package/README.md +4 -0
  2. package/dist/configurations/generated.d.ts +92 -0
  3. package/dist/configurations/generated.js +172 -0
  4. package/dist/configurations/schemas/google.yaml +96 -0
  5. package/dist/emulators/firebase-storage.d.ts +9 -1
  6. package/dist/emulators/firebase-storage.js +13 -1
  7. package/dist/emulators/firestore.d.ts +9 -1
  8. package/dist/emulators/firestore.js +13 -1
  9. package/dist/emulators/identity-platform.d.ts +9 -1
  10. package/dist/emulators/identity-platform.js +13 -1
  11. package/dist/emulators/pubsub.d.ts +9 -1
  12. package/dist/emulators/pubsub.js +13 -1
  13. package/dist/emulators/spanner.d.ts +18 -2
  14. package/dist/emulators/spanner.js +26 -2
  15. package/dist/functions/emulator/start-firebase-storage.js +4 -3
  16. package/dist/functions/emulator/start-firestore.js +5 -10
  17. package/dist/functions/emulator/start-identity-platform.js +4 -7
  18. package/dist/functions/emulator/start-pubsub.call.js +10 -9
  19. package/dist/functions/emulator/start-spanner.call.js +14 -13
  20. package/dist/functions/event-topic/broker-create-trigger-cloud-run.call.js +12 -4
  21. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-service.call.d.ts +2 -0
  22. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-service.call.js +5 -0
  23. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-service.d.ts +10 -0
  24. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-service.js +19 -0
  25. package/dist/functions/event-topic/broker-delete-trigger-resource-pubsub-subscription.js +2 -1
  26. package/dist/functions/event-topic/broker-publish-events-google.call.js +26 -12
  27. package/dist/functions/event-topic/broker-wait-for-processing-pubsub.call.d.ts +2 -0
  28. package/dist/functions/event-topic/broker-wait-for-processing-pubsub.call.js +119 -0
  29. package/dist/functions/event-topic/broker-wait-for-processing-pubsub.d.ts +16 -0
  30. package/dist/functions/event-topic/broker-wait-for-processing-pubsub.js +23 -0
  31. package/dist/functions/event-topic/index.d.ts +2 -0
  32. package/dist/functions/event-topic/index.js +2 -0
  33. package/dist/functions/index.js +2 -2
  34. package/dist/services/cloud-monitoring.d.ts +44 -0
  35. package/dist/services/cloud-monitoring.js +61 -0
  36. package/dist/services/cloud-run-pubsub-trigger.d.ts +22 -1
  37. package/dist/services/cloud-run-pubsub-trigger.js +44 -5
  38. package/dist/services/cloud-run.d.ts +56 -1
  39. package/dist/services/cloud-run.js +71 -1
  40. package/dist/services/cloud-run.utils.d.ts +10 -0
  41. package/dist/services/cloud-run.utils.js +12 -0
  42. package/dist/services/google-apis.d.ts +7 -3
  43. package/dist/services/google-apis.js +1 -2
  44. package/dist/services/index.d.ts +3 -2
  45. package/dist/services/index.js +3 -2
  46. package/dist/services/pubsub.d.ts +1 -0
  47. package/dist/services/pubsub.js +1 -0
  48. package/dist/services/pubsub.utils.d.ts +9 -0
  49. package/dist/services/pubsub.utils.js +11 -0
  50. package/package.json +14 -14
package/README.md CHANGED
@@ -62,6 +62,10 @@ Backfilling is supported when `google.pubSub` is set as the `events.broker`. Tem
62
62
 
63
63
  When no source is specified, the default is to fetch events to backfill from the BigQuery dataset configured in `google.pubSub.bigQueryStorage`. A custom BigQuery table can also be set as source using the `bq://<projectId>.<datasetId>.<tableId>` format. It should have the `data` and `attributes` columns.
64
64
 
65
+ The Pub/Sub publish options used when backfilling can be tuned through `google.pubSub.backfillPublishOptions`, which exposes the `maxOutstandingBytes`, `maxOutstandingMessages`, `maxBytes`, `maxMessages`, and `maxMilliseconds` fields.
66
+
67
+ By default, project-scoped triggers send backfill events to the live Cloud Run service. Setting `google.cloudRun.eventBackfillServiceCloneConfig` instead deploys a temporary copy of the service for each trigger, isolating the backfill load (in particular its scaling, and therefore the load on backing resources such as databases) from production. The copy reuses the live service's revision template, restricts its ingress to internal traffic, and applies the `minInstanceCount`, `maxInstanceCount`, and `requestConcurrency` overrides from the configuration (unset fields are inherited from the live service). The copy is deleted as part of the backfill cleanup.
68
+
65
69
  ### Querying
66
70
 
67
71
  This module implements the `DatabaseQueryRecords`, `ServiceContainerQueryLogs`, and `EventTopicQueryEvents` workspace functions, which expose read-only access to data stored in or emitted by deployed services:
@@ -37,6 +37,29 @@ export declare class GoogleCloudFunctions {
37
37
  readonly artefactStorage?: GoogleCloudFunctionsArtefactStorage;
38
38
  [property: string]: any;
39
39
  }
40
+ /**
41
+ * When set, project-scoped backfill triggers do not send events to the live Cloud Run service. Instead, a
42
+ * temporary copy of the service is deployed for each trigger, isolating the backfill load (in particular its
43
+ * scaling) from production. The copy is deleted once the backfill is cleaned up. Ingress is always
44
+ * restricted to internal traffic for the copy. The properties of this object override the scaling settings
45
+ * of the copied service. Unset properties are inherited from the live service.
46
+ */
47
+ export declare class GoogleCloudRunEventBackfillServiceCloneConfig {
48
+ constructor(init: GoogleCloudRunEventBackfillServiceCloneConfig);
49
+ /**
50
+ * The maximum number of instances for the temporary service copy.
51
+ */
52
+ readonly maxInstanceCount?: number;
53
+ /**
54
+ * The minimum number of instances for the temporary service copy.
55
+ */
56
+ readonly minInstanceCount?: number;
57
+ /**
58
+ * The maximum number of concurrent requests per instance for the temporary service copy.
59
+ */
60
+ readonly requestConcurrency?: number;
61
+ [property: string]: any;
62
+ }
40
63
  /**
41
64
  * The type of allowed ingress that can reach the container.
42
65
  * See https://cloud.google.com/run/docs/securing/ingress#settings for more details.
@@ -67,6 +90,14 @@ export declare class GoogleCloudRun {
67
90
  * The Docker repository where Cloud Run containers should be uploaded.
68
91
  */
69
92
  readonly dockerRepository?: string;
93
+ /**
94
+ * When set, project-scoped backfill triggers do not send events to the live Cloud Run service. Instead, a
95
+ * temporary copy of the service is deployed for each trigger, isolating the backfill load (in particular its
96
+ * scaling) from production. The copy is deleted once the backfill is cleaned up. Ingress is always
97
+ * restricted to internal traffic for the copy. The properties of this object override the scaling settings
98
+ * of the copied service. Unset properties are inherited from the live service.
99
+ */
100
+ readonly eventBackfillServiceCloneConfig?: GoogleCloudRunEventBackfillServiceCloneConfig;
70
101
  /**
71
102
  * For `serviceContainer` projects deployed on Cloud Run, the name of the Cloud Run service that receives
72
103
  * events during a backfill targeting a project-scoped trigger. Defaults to the project's name
@@ -173,6 +204,11 @@ export declare class GoogleFirebaseStorageEmulator {
173
204
  * The name of the local Docker container running the emulator.
174
205
  */
175
206
  readonly containerName?: string;
207
+ /**
208
+ * The host port to which the Firebase Storage emulator is bound.
209
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9199`.
210
+ */
211
+ readonly port?: number;
176
212
  [property: string]: any;
177
213
  }
178
214
  /**
@@ -203,6 +239,11 @@ export declare class GoogleFirestoreEmulator {
203
239
  * The name of the local Docker container running the emulator.
204
240
  */
205
241
  readonly containerName?: string;
242
+ /**
243
+ * The host port to which the Firestore emulator is bound.
244
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `8080`.
245
+ */
246
+ readonly port?: number;
206
247
  [property: string]: any;
207
248
  }
208
249
  /**
@@ -245,6 +286,11 @@ export declare class GoogleIdentityPlatformEmulator {
245
286
  * The name of the local Docker container running the emulator.
246
287
  */
247
288
  readonly containerName?: string;
289
+ /**
290
+ * The host port to which the Identity Platform (Firebase Auth) emulator is bound.
291
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9099`.
292
+ */
293
+ readonly port?: number;
248
294
  [property: string]: any;
249
295
  }
250
296
  /**
@@ -269,6 +315,33 @@ export declare class GoogleLoadBalancing {
269
315
  readonly customRequestHeaders?: string[];
270
316
  [property: string]: any;
271
317
  }
318
+ /**
319
+ * Options when publishing events in batches to Pub/Sub during a backfill.
320
+ */
321
+ export declare class GooglePubSubBackfillPublishOptions {
322
+ constructor(init: GooglePubSubBackfillPublishOptions);
323
+ /**
324
+ * The maximum number of bytes to buffer before publishing a batch.
325
+ */
326
+ readonly maxBytes?: number;
327
+ /**
328
+ * The maximum number of messages to buffer before publishing a batch.
329
+ */
330
+ readonly maxMessages?: number;
331
+ /**
332
+ * The maximum duration to wait, in milliseconds, before publishing a batch.
333
+ */
334
+ readonly maxMilliseconds?: number;
335
+ /**
336
+ * The maximum number of bytes allowed in outstanding (in-flight) publish requests before applying flow control.
337
+ */
338
+ readonly maxOutstandingBytes?: number;
339
+ /**
340
+ * The maximum number of outstanding (in-flight) messages allowed before applying flow control.
341
+ */
342
+ readonly maxOutstandingMessages?: number;
343
+ [property: string]: any;
344
+ }
272
345
  /**
273
346
  * Configuration for the storage of Pub/Sub events in BigQuery.
274
347
  */
@@ -294,6 +367,11 @@ export declare class GooglePubSubEmulator {
294
367
  * The name of the local Docker container running the emulator.
295
368
  */
296
369
  readonly containerName?: string;
370
+ /**
371
+ * The host port to which the Pub/Sub emulator is bound.
372
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `8085`.
373
+ */
374
+ readonly port?: number;
297
375
  [property: string]: any;
298
376
  }
299
377
  /**
@@ -301,6 +379,10 @@ export declare class GooglePubSubEmulator {
301
379
  */
302
380
  export declare class GooglePubSub {
303
381
  constructor(init: GooglePubSub);
382
+ /**
383
+ * Options when publishing events in batches to Pub/Sub during a backfill.
384
+ */
385
+ readonly backfillPublishOptions?: GooglePubSubBackfillPublishOptions;
304
386
  /**
305
387
  * Configuration for the storage of Pub/Sub events in BigQuery.
306
388
  */
@@ -393,6 +475,16 @@ export declare class GoogleSpannerEmulator {
393
475
  * The name of the local Docker container running the emulator.
394
476
  */
395
477
  readonly containerName?: string;
478
+ /**
479
+ * The host port to which the Spanner emulator gRPC API is bound.
480
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9010`.
481
+ */
482
+ readonly grpcPort?: number;
483
+ /**
484
+ * The host port to which the Spanner emulator HTTP API is bound.
485
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9020`.
486
+ */
487
+ readonly httpPort?: number;
396
488
  /**
397
489
  * The name of the Spanner instance that will automatically be created in the emulator.
398
490
  */
@@ -76,6 +76,45 @@ __decorate([
76
76
  AllowMissing(),
77
77
  __metadata("design:type", GoogleCloudFunctionsArtefactStorage)
78
78
  ], GoogleCloudFunctions.prototype, "artefactStorage", void 0);
79
+ /**
80
+ * When set, project-scoped backfill triggers do not send events to the live Cloud Run service. Instead, a
81
+ * temporary copy of the service is deployed for each trigger, isolating the backfill load (in particular its
82
+ * scaling) from production. The copy is deleted once the backfill is cleaned up. Ingress is always
83
+ * restricted to internal traffic for the copy. The properties of this object override the scaling settings
84
+ * of the copied service. Unset properties are inherited from the live service.
85
+ */
86
+ export class GoogleCloudRunEventBackfillServiceCloneConfig {
87
+ constructor(init) {
88
+ Object.assign(this, init);
89
+ }
90
+ /**
91
+ * The maximum number of instances for the temporary service copy.
92
+ */
93
+ maxInstanceCount;
94
+ /**
95
+ * The minimum number of instances for the temporary service copy.
96
+ */
97
+ minInstanceCount;
98
+ /**
99
+ * The maximum number of concurrent requests per instance for the temporary service copy.
100
+ */
101
+ requestConcurrency;
102
+ }
103
+ __decorate([
104
+ AllowMissing(),
105
+ IsNumber(),
106
+ __metadata("design:type", Number)
107
+ ], GoogleCloudRunEventBackfillServiceCloneConfig.prototype, "maxInstanceCount", void 0);
108
+ __decorate([
109
+ AllowMissing(),
110
+ IsNumber(),
111
+ __metadata("design:type", Number)
112
+ ], GoogleCloudRunEventBackfillServiceCloneConfig.prototype, "minInstanceCount", void 0);
113
+ __decorate([
114
+ AllowMissing(),
115
+ IsNumber(),
116
+ __metadata("design:type", Number)
117
+ ], GoogleCloudRunEventBackfillServiceCloneConfig.prototype, "requestConcurrency", void 0);
79
118
  /**
80
119
  * The type of allowed ingress that can reach the container.
81
120
  * See https://cloud.google.com/run/docs/securing/ingress#settings for more details.
@@ -110,6 +149,14 @@ export class GoogleCloudRun {
110
149
  * The Docker repository where Cloud Run containers should be uploaded.
111
150
  */
112
151
  dockerRepository;
152
+ /**
153
+ * When set, project-scoped backfill triggers do not send events to the live Cloud Run service. Instead, a
154
+ * temporary copy of the service is deployed for each trigger, isolating the backfill load (in particular its
155
+ * scaling) from production. The copy is deleted once the backfill is cleaned up. Ingress is always
156
+ * restricted to internal traffic for the copy. The properties of this object override the scaling settings
157
+ * of the copied service. Unset properties are inherited from the live service.
158
+ */
159
+ eventBackfillServiceCloneConfig;
113
160
  /**
114
161
  * For `serviceContainer` projects deployed on Cloud Run, the name of the Cloud Run service that receives
115
162
  * events during a backfill targeting a project-scoped trigger. Defaults to the project's name
@@ -162,6 +209,10 @@ __decorate([
162
209
  IsString(),
163
210
  __metadata("design:type", String)
164
211
  ], GoogleCloudRun.prototype, "dockerRepository", void 0);
212
+ __decorate([
213
+ AllowMissing(),
214
+ __metadata("design:type", GoogleCloudRunEventBackfillServiceCloneConfig)
215
+ ], GoogleCloudRun.prototype, "eventBackfillServiceCloneConfig", void 0);
165
216
  __decorate([
166
217
  AllowMissing(),
167
218
  IsString(),
@@ -301,12 +352,22 @@ export class GoogleFirebaseStorageEmulator {
301
352
  * The name of the local Docker container running the emulator.
302
353
  */
303
354
  containerName;
355
+ /**
356
+ * The host port to which the Firebase Storage emulator is bound.
357
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9199`.
358
+ */
359
+ port;
304
360
  }
305
361
  __decorate([
306
362
  AllowMissing(),
307
363
  IsString(),
308
364
  __metadata("design:type", String)
309
365
  ], GoogleFirebaseStorageEmulator.prototype, "containerName", void 0);
366
+ __decorate([
367
+ AllowMissing(),
368
+ IsNumber(),
369
+ __metadata("design:type", Number)
370
+ ], GoogleFirebaseStorageEmulator.prototype, "port", void 0);
310
371
  /**
311
372
  * Configuration for the Firebase Storage service.
312
373
  */
@@ -353,12 +414,22 @@ export class GoogleFirestoreEmulator {
353
414
  * The name of the local Docker container running the emulator.
354
415
  */
355
416
  containerName;
417
+ /**
418
+ * The host port to which the Firestore emulator is bound.
419
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `8080`.
420
+ */
421
+ port;
356
422
  }
357
423
  __decorate([
358
424
  AllowMissing(),
359
425
  IsString(),
360
426
  __metadata("design:type", String)
361
427
  ], GoogleFirestoreEmulator.prototype, "containerName", void 0);
428
+ __decorate([
429
+ AllowMissing(),
430
+ IsNumber(),
431
+ __metadata("design:type", Number)
432
+ ], GoogleFirestoreEmulator.prototype, "port", void 0);
362
433
  /**
363
434
  * Configuration for the Firestore service.
364
435
  */
@@ -423,12 +494,22 @@ export class GoogleIdentityPlatformEmulator {
423
494
  * The name of the local Docker container running the emulator.
424
495
  */
425
496
  containerName;
497
+ /**
498
+ * The host port to which the Identity Platform (Firebase Auth) emulator is bound.
499
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9099`.
500
+ */
501
+ port;
426
502
  }
427
503
  __decorate([
428
504
  AllowMissing(),
429
505
  IsString(),
430
506
  __metadata("design:type", String)
431
507
  ], GoogleIdentityPlatformEmulator.prototype, "containerName", void 0);
508
+ __decorate([
509
+ AllowMissing(),
510
+ IsNumber(),
511
+ __metadata("design:type", Number)
512
+ ], GoogleIdentityPlatformEmulator.prototype, "port", void 0);
432
513
  /**
433
514
  * Configuration for the Identity Platform (formerly Firebase Auth) service.
434
515
  */
@@ -463,6 +544,59 @@ __decorate([
463
544
  IsString({ each: true }),
464
545
  __metadata("design:type", Array)
465
546
  ], GoogleLoadBalancing.prototype, "customRequestHeaders", void 0);
547
+ /**
548
+ * Options when publishing events in batches to Pub/Sub during a backfill.
549
+ */
550
+ export class GooglePubSubBackfillPublishOptions {
551
+ constructor(init) {
552
+ Object.assign(this, init);
553
+ }
554
+ /**
555
+ * The maximum number of bytes to buffer before publishing a batch.
556
+ */
557
+ maxBytes;
558
+ /**
559
+ * The maximum number of messages to buffer before publishing a batch.
560
+ */
561
+ maxMessages;
562
+ /**
563
+ * The maximum duration to wait, in milliseconds, before publishing a batch.
564
+ */
565
+ maxMilliseconds;
566
+ /**
567
+ * The maximum number of bytes allowed in outstanding (in-flight) publish requests before applying flow control.
568
+ */
569
+ maxOutstandingBytes;
570
+ /**
571
+ * The maximum number of outstanding (in-flight) messages allowed before applying flow control.
572
+ */
573
+ maxOutstandingMessages;
574
+ }
575
+ __decorate([
576
+ AllowMissing(),
577
+ IsNumber(),
578
+ __metadata("design:type", Number)
579
+ ], GooglePubSubBackfillPublishOptions.prototype, "maxBytes", void 0);
580
+ __decorate([
581
+ AllowMissing(),
582
+ IsNumber(),
583
+ __metadata("design:type", Number)
584
+ ], GooglePubSubBackfillPublishOptions.prototype, "maxMessages", void 0);
585
+ __decorate([
586
+ AllowMissing(),
587
+ IsNumber(),
588
+ __metadata("design:type", Number)
589
+ ], GooglePubSubBackfillPublishOptions.prototype, "maxMilliseconds", void 0);
590
+ __decorate([
591
+ AllowMissing(),
592
+ IsNumber(),
593
+ __metadata("design:type", Number)
594
+ ], GooglePubSubBackfillPublishOptions.prototype, "maxOutstandingBytes", void 0);
595
+ __decorate([
596
+ AllowMissing(),
597
+ IsNumber(),
598
+ __metadata("design:type", Number)
599
+ ], GooglePubSubBackfillPublishOptions.prototype, "maxOutstandingMessages", void 0);
466
600
  /**
467
601
  * Configuration for the storage of Pub/Sub events in BigQuery.
468
602
  */
@@ -501,12 +635,22 @@ export class GooglePubSubEmulator {
501
635
  * The name of the local Docker container running the emulator.
502
636
  */
503
637
  containerName;
638
+ /**
639
+ * The host port to which the Pub/Sub emulator is bound.
640
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `8085`.
641
+ */
642
+ port;
504
643
  }
505
644
  __decorate([
506
645
  AllowMissing(),
507
646
  IsString(),
508
647
  __metadata("design:type", String)
509
648
  ], GooglePubSubEmulator.prototype, "containerName", void 0);
649
+ __decorate([
650
+ AllowMissing(),
651
+ IsNumber(),
652
+ __metadata("design:type", Number)
653
+ ], GooglePubSubEmulator.prototype, "port", void 0);
510
654
  /**
511
655
  * Configuration for the Pub/Sub service.
512
656
  */
@@ -514,6 +658,10 @@ export class GooglePubSub {
514
658
  constructor(init) {
515
659
  Object.assign(this, init);
516
660
  }
661
+ /**
662
+ * Options when publishing events in batches to Pub/Sub during a backfill.
663
+ */
664
+ backfillPublishOptions;
517
665
  /**
518
666
  * Configuration for the storage of Pub/Sub events in BigQuery.
519
667
  */
@@ -535,6 +683,10 @@ export class GooglePubSub {
535
683
  */
536
684
  topicConfigurationsDirectory;
537
685
  }
686
+ __decorate([
687
+ AllowMissing(),
688
+ __metadata("design:type", GooglePubSubBackfillPublishOptions)
689
+ ], GooglePubSub.prototype, "backfillPublishOptions", void 0);
538
690
  __decorate([
539
691
  AllowMissing(),
540
692
  __metadata("design:type", GooglePubSubBigQueryStorage)
@@ -684,6 +836,16 @@ export class GoogleSpannerEmulator {
684
836
  * The name of the local Docker container running the emulator.
685
837
  */
686
838
  containerName;
839
+ /**
840
+ * The host port to which the Spanner emulator gRPC API is bound.
841
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9010`.
842
+ */
843
+ grpcPort;
844
+ /**
845
+ * The host port to which the Spanner emulator HTTP API is bound.
846
+ * Override this to run several workspaces in parallel on the same machine. Defaults to `9020`.
847
+ */
848
+ httpPort;
687
849
  /**
688
850
  * The name of the Spanner instance that will automatically be created in the emulator.
689
851
  */
@@ -698,6 +860,16 @@ __decorate([
698
860
  IsString(),
699
861
  __metadata("design:type", String)
700
862
  ], GoogleSpannerEmulator.prototype, "containerName", void 0);
863
+ __decorate([
864
+ AllowMissing(),
865
+ IsNumber(),
866
+ __metadata("design:type", Number)
867
+ ], GoogleSpannerEmulator.prototype, "grpcPort", void 0);
868
+ __decorate([
869
+ AllowMissing(),
870
+ IsNumber(),
871
+ __metadata("design:type", Number)
872
+ ], GoogleSpannerEmulator.prototype, "httpPort", void 0);
701
873
  __decorate([
702
874
  AllowMissing(),
703
875
  IsString(),
@@ -125,6 +125,13 @@ properties:
125
125
  containerName:
126
126
  type: string
127
127
  description: The name of the local Docker container running the emulator.
128
+ port:
129
+ type: number
130
+ description: >-
131
+ The host port to which the Firebase Storage emulator is bound.
132
+
133
+ Override this to run several workspaces in parallel on the
134
+ same machine. Defaults to `9199`.
128
135
  securityRuleFiles:
129
136
  type: array
130
137
  items:
@@ -149,6 +156,14 @@ properties:
149
156
  containerName:
150
157
  type: string
151
158
  description: The name of the local Docker container running the emulator.
159
+ port:
160
+ type: number
161
+ description: >-
162
+ The host port to which the Identity Platform (Firebase Auth)
163
+ emulator is bound.
164
+
165
+ Override this to run several workspaces in parallel on the
166
+ same machine. Defaults to `9099`.
152
167
  firestore:
153
168
  title: GoogleFirestore
154
169
  type: object
@@ -162,6 +177,13 @@ properties:
162
177
  containerName:
163
178
  type: string
164
179
  description: The name of the local Docker container running the emulator.
180
+ port:
181
+ type: number
182
+ description: >-
183
+ The host port to which the Firestore emulator is bound.
184
+
185
+ Override this to run several workspaces in parallel on the
186
+ same machine. Defaults to `8080`.
165
187
  securityRuleFiles:
166
188
  type: array
167
189
  items:
@@ -185,6 +207,13 @@ properties:
185
207
  containerName:
186
208
  type: string
187
209
  description: The name of the local Docker container running the emulator.
210
+ port:
211
+ type: number
212
+ description: >-
213
+ The host port to which the Pub/Sub emulator is bound.
214
+
215
+ Override this to run several workspaces in parallel on the
216
+ same machine. Defaults to `8085`.
188
217
  topicConfigurationsDirectory:
189
218
  type: string
190
219
  description: The directory where the topic configuration files are written by
@@ -213,6 +242,30 @@ properties:
213
242
 
214
243
  See https://cloud.google.com/bigquery/docs/locations for more
215
244
  details.
245
+ backfillPublishOptions:
246
+ title: GooglePubSubBackfillPublishOptions
247
+ type: object
248
+ description: Options when publishing events in batches to Pub/Sub during a
249
+ backfill.
250
+ properties:
251
+ maxOutstandingBytes:
252
+ type: number
253
+ description: The maximum number of bytes allowed in outstanding (in-flight)
254
+ publish requests before applying flow control.
255
+ maxOutstandingMessages:
256
+ type: number
257
+ description: The maximum number of outstanding (in-flight) messages allowed
258
+ before applying flow control.
259
+ maxBytes:
260
+ type: number
261
+ description: The maximum number of bytes to buffer before publishing a batch.
262
+ maxMessages:
263
+ type: number
264
+ description: The maximum number of messages to buffer before publishing a batch.
265
+ maxMilliseconds:
266
+ type: number
267
+ description: The maximum duration to wait, in milliseconds, before publishing a
268
+ batch.
216
269
  spanner:
217
270
  title: GoogleSpanner
218
271
  type: object
@@ -233,6 +286,20 @@ properties:
233
286
  type: string
234
287
  description: The name of the Spanner instance that will automatically be created
235
288
  in the emulator.
289
+ grpcPort:
290
+ type: number
291
+ description: >-
292
+ The host port to which the Spanner emulator gRPC API is bound.
293
+
294
+ Override this to run several workspaces in parallel on the
295
+ same machine. Defaults to `9010`.
296
+ httpPort:
297
+ type: number
298
+ description: >-
299
+ The host port to which the Spanner emulator HTTP API is bound.
300
+
301
+ Override this to run several workspaces in parallel on the
302
+ same machine. Defaults to `9020`.
236
303
  instance:
237
304
  title: GoogleSpannerInstance
238
305
  type: object
@@ -346,6 +413,35 @@ properties:
346
413
  Defaults to the project's name
347
414
 
348
415
  (`project.name`) when unset.
416
+ eventBackfillServiceCloneConfig:
417
+ title: GoogleCloudRunEventBackfillServiceCloneConfig
418
+ type: object
419
+ description: >-
420
+ When set, project-scoped backfill triggers do not send events to
421
+ the live Cloud Run service. Instead, a
422
+
423
+ temporary copy of the service is deployed for each trigger,
424
+ isolating the backfill load (in particular its
425
+
426
+ scaling) from production. The copy is deleted once the backfill is
427
+ cleaned up. Ingress is always
428
+
429
+ restricted to internal traffic for the copy. The properties of
430
+ this object override the scaling settings
431
+
432
+ of the copied service. Unset properties are inherited from the
433
+ live service.
434
+ properties:
435
+ minInstanceCount:
436
+ type: number
437
+ description: The minimum number of instances for the temporary service copy.
438
+ maxInstanceCount:
439
+ type: number
440
+ description: The maximum number of instances for the temporary service copy.
441
+ requestConcurrency:
442
+ type: number
443
+ description: The maximum number of concurrent requests per instance for the
444
+ temporary service copy.
349
445
  secretEnvironmentVariables:
350
446
  type: object
351
447
  description: >-
@@ -11,9 +11,17 @@ export declare const FIREBASE_STORAGE_EMULATOR_NAME = "google.firebaseStorage";
11
11
  */
12
12
  export declare function getFirebaseStorageContainerName(context: WorkspaceContext): string;
13
13
  /**
14
- * The exposed port for Firebase Storage.
14
+ * The default exposed host port for Firebase Storage.
15
15
  */
16
16
  export declare const FIREBASE_STORAGE_PORT = 9199;
17
+ /**
18
+ * Returns the host port to which the Firebase Storage emulator should be bound.
19
+ * Reads `google.firebaseStorage.emulator.port`, falling back to {@link FIREBASE_STORAGE_PORT}.
20
+ *
21
+ * @param context The {@link WorkspaceContext}.
22
+ * @returns The host port for the Firebase Storage emulator.
23
+ */
24
+ export declare function getFirebaseStorageEmulatorPort(context: WorkspaceContext): number;
17
25
  /**
18
26
  * The location of the Firebase Storage security rules file within the container.
19
27
  */
@@ -19,9 +19,21 @@ export function getFirebaseStorageContainerName(context) {
19
19
  return `${workspaceName}-firebase-storage`;
20
20
  }
21
21
  /**
22
- * The exposed port for Firebase Storage.
22
+ * The default exposed host port for Firebase Storage.
23
23
  */
24
24
  export const FIREBASE_STORAGE_PORT = 9199;
25
+ /**
26
+ * Returns the host port to which the Firebase Storage emulator should be bound.
27
+ * Reads `google.firebaseStorage.emulator.port`, falling back to {@link FIREBASE_STORAGE_PORT}.
28
+ *
29
+ * @param context The {@link WorkspaceContext}.
30
+ * @returns The host port for the Firebase Storage emulator.
31
+ */
32
+ export function getFirebaseStorageEmulatorPort(context) {
33
+ return (context
34
+ .asConfiguration()
35
+ .get('google.firebaseStorage.emulator.port') ?? FIREBASE_STORAGE_PORT);
36
+ }
25
37
  /**
26
38
  * The location of the Firebase Storage security rules file within the container.
27
39
  */
@@ -15,6 +15,14 @@ export declare function getFirestoreContainerName(context: WorkspaceContext): st
15
15
  */
16
16
  export declare const FIRESTORE_CONTAINER_RULES_FILE = "/firestore.rules";
17
17
  /**
18
- * The port on which the Firestore emulator listens.
18
+ * The default host port on which the Firestore emulator listens.
19
19
  */
20
20
  export declare const FIRESTORE_PORT = 8080;
21
+ /**
22
+ * Returns the host port to which the Firestore emulator should be bound.
23
+ * Reads `google.firestore.emulator.port`, falling back to {@link FIRESTORE_PORT}.
24
+ *
25
+ * @param context The {@link WorkspaceContext}.
26
+ * @returns The host port for the Firestore emulator.
27
+ */
28
+ export declare function getFirestoreEmulatorPort(context: WorkspaceContext): number;
@@ -23,6 +23,18 @@ export function getFirestoreContainerName(context) {
23
23
  */
24
24
  export const FIRESTORE_CONTAINER_RULES_FILE = '/firestore.rules';
25
25
  /**
26
- * The port on which the Firestore emulator listens.
26
+ * The default host port on which the Firestore emulator listens.
27
27
  */
28
28
  export const FIRESTORE_PORT = 8080;
29
+ /**
30
+ * Returns the host port to which the Firestore emulator should be bound.
31
+ * Reads `google.firestore.emulator.port`, falling back to {@link FIRESTORE_PORT}.
32
+ *
33
+ * @param context The {@link WorkspaceContext}.
34
+ * @returns The host port for the Firestore emulator.
35
+ */
36
+ export function getFirestoreEmulatorPort(context) {
37
+ return (context
38
+ .asConfiguration()
39
+ .get('google.firestore.emulator.port') ?? FIRESTORE_PORT);
40
+ }
@@ -11,6 +11,14 @@ export declare const IDENTITY_PLATFORM_EMULATOR_NAME = "google.identityPlatform"
11
11
  */
12
12
  export declare function getIdentityPlatformContainerName(context: WorkspaceContext): string;
13
13
  /**
14
- * The port on which the Firebase Auth emulator is listening.
14
+ * The default host port on which the Firebase Auth emulator is listening.
15
15
  */
16
16
  export declare const FIREBASE_AUTH_PORT = 9099;
17
+ /**
18
+ * Returns the host port to which the Identity Platform (Firebase Auth) emulator should be bound.
19
+ * Reads `google.identityPlatform.emulator.port`, falling back to {@link FIREBASE_AUTH_PORT}.
20
+ *
21
+ * @param context The {@link WorkspaceContext}.
22
+ * @returns The host port for the Identity Platform emulator.
23
+ */
24
+ export declare function getIdentityPlatformEmulatorPort(context: WorkspaceContext): number;