@causa/workspace-google 0.9.0 → 0.9.2

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 (80) hide show
  1. package/dist/backfilling/bigquery.d.ts +1 -1
  2. package/dist/backfilling/bigquery.js +2 -0
  3. package/dist/backfilling/pubsub.d.ts +1 -1
  4. package/dist/backfilling/pubsub.js +3 -1
  5. package/dist/cli/google-app-check.d.ts +1 -1
  6. package/dist/cli/google-firebase-storage.d.ts +1 -1
  7. package/dist/cli/google-firestore.d.ts +1 -1
  8. package/dist/cli/google-identity-platform.d.ts +1 -1
  9. package/dist/cli/google.d.ts +1 -1
  10. package/dist/code-generation/google-spanner-renderer.d.ts +1 -1
  11. package/dist/configurations/index.d.ts +1 -1
  12. package/dist/configurations/utils.js +1 -0
  13. package/dist/emulators/firebase-storage.js +1 -0
  14. package/dist/emulators/firestore.js +1 -0
  15. package/dist/emulators/identity-platform.js +1 -0
  16. package/dist/emulators/pubsub.js +1 -0
  17. package/dist/emulators/spanner.js +1 -0
  18. package/dist/firebase/rules.js +1 -0
  19. package/dist/functions/emulator/start-firebase-storage.d.ts +1 -1
  20. package/dist/functions/emulator/start-firebase-storage.js +1 -0
  21. package/dist/functions/emulator/start-firestore.d.ts +1 -1
  22. package/dist/functions/emulator/start-firestore.js +1 -0
  23. package/dist/functions/emulator/start-identity-platform.d.ts +1 -1
  24. package/dist/functions/emulator/start-identity-platform.js +1 -0
  25. package/dist/functions/emulator/start-pubsub.d.ts +1 -1
  26. package/dist/functions/emulator/start-pubsub.js +1 -0
  27. package/dist/functions/emulator/start-spanner.d.ts +1 -1
  28. package/dist/functions/emulator/start-spanner.js +2 -1
  29. package/dist/functions/emulator/stop-firebase-storage.js +1 -0
  30. package/dist/functions/emulator/stop-firestore.js +1 -0
  31. package/dist/functions/emulator/stop-identity-platform.js +1 -0
  32. package/dist/functions/emulator/stop-pubsub.js +1 -0
  33. package/dist/functions/emulator/stop-spanner.js +1 -0
  34. package/dist/functions/event-topic/broker-create-topic-pubsub.js +1 -0
  35. package/dist/functions/event-topic/broker-create-trigger-cloud-run.js +1 -0
  36. package/dist/functions/event-topic/broker-delete-topic-pubsub.js +1 -0
  37. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-invoker-role.js +1 -0
  38. package/dist/functions/event-topic/broker-delete-trigger-resource-pubsub-subscription.js +1 -0
  39. package/dist/functions/event-topic/broker-delete-trigger-resource-service-account.js +1 -0
  40. package/dist/functions/event-topic/broker-get-topic-id-pubsub.js +1 -0
  41. package/dist/functions/event-topic/broker-publish-events-google.js +1 -0
  42. package/dist/functions/google-app-check/generate-token.js +1 -1
  43. package/dist/functions/google-firebase-storage/merge-rules.d.ts +2 -2
  44. package/dist/functions/google-firebase-storage/merge-rules.js +1 -1
  45. package/dist/functions/google-firestore/merge-rules.d.ts +2 -2
  46. package/dist/functions/google-firestore/merge-rules.js +1 -1
  47. package/dist/functions/google-identity-platform/generate-custom-token.js +1 -1
  48. package/dist/functions/google-identity-platform/generate-token.js +1 -1
  49. package/dist/functions/google-pubsub/write-topics.d.ts +2 -2
  50. package/dist/functions/google-pubsub/write-topics.js +1 -1
  51. package/dist/functions/google-services/enable.d.ts +2 -2
  52. package/dist/functions/google-services/enable.js +1 -1
  53. package/dist/functions/google-spanner/list-databases.js +1 -1
  54. package/dist/functions/google-spanner/write-databases.d.ts +2 -2
  55. package/dist/functions/google-spanner/write-databases.js +1 -1
  56. package/dist/functions/index.d.ts +1 -1
  57. package/dist/functions/project/get-artefact-destination-cloud-functions.js +1 -0
  58. package/dist/functions/project/get-artefact-destination-cloud-run.js +1 -0
  59. package/dist/functions/project/push-artefact-cloud-functions.js +1 -0
  60. package/dist/functions/secret/fetch-access-token.js +1 -1
  61. package/dist/functions/secret/fetch-secret-manager.js +1 -1
  62. package/dist/functions/typescript/get-decorator-renderer-google-spanner.js +2 -1
  63. package/dist/index.d.ts +1 -1
  64. package/dist/services/bigquery.js +1 -0
  65. package/dist/services/cloud-run-pubsub-trigger.js +1 -0
  66. package/dist/services/firebase-app.d.ts +2 -2
  67. package/dist/services/firebase-app.js +3 -1
  68. package/dist/services/firebase-emulator.d.ts +1 -1
  69. package/dist/services/firebase-emulator.js +2 -1
  70. package/dist/services/gcloud-emulator.d.ts +1 -1
  71. package/dist/services/gcloud-emulator.js +1 -0
  72. package/dist/services/google-apis.d.ts +1 -1
  73. package/dist/services/google-apis.js +3 -1
  74. package/dist/services/google-apis.types.js +1 -1
  75. package/dist/services/iam.js +2 -0
  76. package/dist/services/index.d.ts +2 -1
  77. package/dist/services/pubsub.js +2 -0
  78. package/dist/services/secret-manager.js +1 -0
  79. package/dist/services/storage.js +1 -1
  80. package/package.json +33 -32
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { BackfillEvent, BackfillEventsSource } from '@causa/workspace-core';
2
+ import type { BackfillEvent, BackfillEventsSource } from '@causa/workspace-core';
3
3
  /**
4
4
  * An events source that reads events from a BigQuery table.
5
5
  */
@@ -1,3 +1,5 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
2
+ import { BigQuery, Job } from '@google-cloud/bigquery';
1
3
  import { BigQueryService } from '../services/index.js';
2
4
  /**
3
5
  * The number of rows (events) in a single batch.
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { BackfillEvent, BackfillEventPublisher } from '@causa/workspace-core';
2
+ import { type BackfillEvent, BackfillEventPublisher } from '@causa/workspace-core';
3
3
  /**
4
4
  * A publisher that publishes events to backfill to a Pub/Sub topic.
5
5
  */
@@ -1,4 +1,6 @@
1
- import { BackfillEventPublisher } from '@causa/workspace-core';
1
+ import { WorkspaceContext } from '@causa/workspace';
2
+ import { BackfillEventPublisher, } from '@causa/workspace-core';
3
+ import { FlowControlledPublisher } from '@google-cloud/pubsub/build/src/publisher/flow-publisher.js';
2
4
  import { PubSubService } from '../services/index.js';
3
5
  /**
4
6
  * Options when publishing events in batches to Pub/Sub.
@@ -1,4 +1,4 @@
1
- import { ParentCliCommandDefinition } from '@causa/cli';
1
+ import type { ParentCliCommandDefinition } from '@causa/cli';
2
2
  /**
3
3
  * The parent `google appCheck` command.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ParentCliCommandDefinition } from '@causa/cli';
1
+ import type { ParentCliCommandDefinition } from '@causa/cli';
2
2
  /**
3
3
  * The parent `google firebaseStorage` command.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ParentCliCommandDefinition } from '@causa/cli';
1
+ import type { ParentCliCommandDefinition } from '@causa/cli';
2
2
  /**
3
3
  * The parent `google firestore` command.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ParentCliCommandDefinition } from '@causa/cli';
1
+ import type { ParentCliCommandDefinition } from '@causa/cli';
2
2
  /**
3
3
  * The parent `google identityPlatform` command.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ParentCliCommandDefinition } from '@causa/cli';
1
+ import type { ParentCliCommandDefinition } from '@causa/cli';
2
2
  /**
3
3
  * The parent `google` command.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ClassContext, ClassPropertyContext, TypeScriptDecorator, TypeScriptDecoratorsRenderer } from '@causa/workspace-typescript';
1
+ import { type ClassContext, type ClassPropertyContext, type TypeScriptDecorator, TypeScriptDecoratorsRenderer } from '@causa/workspace-typescript';
2
2
  /**
3
3
  * A {@link TypeScriptDecoratorsRenderer} that adds Google Spanner decorators from the Causa Google runtime.
4
4
  *
@@ -1,2 +1,2 @@
1
- export { GoogleConfiguration } from './google.js';
1
+ export type { GoogleConfiguration } from './google.js';
2
2
  export * from './utils.js';
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  /**
2
3
  * Gets or formats the ID of the local GCP project.
3
4
  * For some emulators to work correctly, the ID must start with `demo-`.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  /**
2
3
  * The name of the Firebase Storage emulator.
3
4
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  /**
2
3
  * The name of the Firestore emulator.
3
4
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  /**
2
3
  * The name of the Identity Platform emulator.
3
4
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  /**
2
3
  * The name of the Pub/Sub emulator.
3
4
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  /**
2
3
  * The name of the Spanner emulator.
3
4
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { mkdir, readFile, writeFile } from 'fs/promises';
2
3
  import { globby } from 'globby';
3
4
  import { dirname, join } from 'path';
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { EmulatorStart, EmulatorStartResult } from '@causa/workspace-core';
2
+ import { EmulatorStart, type EmulatorStartResult } from '@causa/workspace-core';
3
3
  /**
4
4
  * Implements {@link EmulatorStart} for the Firebase Storage container.
5
5
  * This first merges the Firebase Storage security rules into a single file, and uses this file to configure the
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EmulatorStart } from '@causa/workspace-core';
2
3
  import { fileURLToPath } from 'url';
3
4
  import { FIREBASE_CONTAINER_STORAGE_RULES_FILE, FIREBASE_STORAGE_EMULATOR_NAME, FIREBASE_STORAGE_PORT, getFirebaseStorageContainerName, } from '../../emulators/index.js';
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { EmulatorStart, EmulatorStartResult } from '@causa/workspace-core';
2
+ import { EmulatorStart, type EmulatorStartResult } from '@causa/workspace-core';
3
3
  /**
4
4
  * Implements {@link EmulatorStart} for the Firestore emulator.
5
5
  * This first merges the Firestore security rules into a single file, and uses this file to configure the emulator.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EmulatorStart } from '@causa/workspace-core';
2
3
  import { FIRESTORE_CONTAINER_RULES_FILE, FIRESTORE_EMULATOR_NAME, FIRESTORE_PORT, getFirestoreContainerName, } from '../../emulators/index.js';
3
4
  import { GcloudEmulatorService } from '../../services/index.js';
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { EmulatorStart, EmulatorStartResult } from '@causa/workspace-core';
2
+ import { EmulatorStart, type EmulatorStartResult } from '@causa/workspace-core';
3
3
  /**
4
4
  * Implements {@link EmulatorStart} for the Identity Platform emulator.
5
5
  * This actually runs the "legacy" Firebase Auth emulator, which is the same service before it was re-branded.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EmulatorStart } from '@causa/workspace-core';
2
3
  import { fileURLToPath } from 'url';
3
4
  import { FIREBASE_AUTH_PORT, IDENTITY_PLATFORM_EMULATOR_NAME, getIdentityPlatformContainerName, } from '../../emulators/index.js';
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { EmulatorStart, EmulatorStartResult } from '@causa/workspace-core';
2
+ import { EmulatorStart, type EmulatorStartResult } from '@causa/workspace-core';
3
3
  /**
4
4
  * Implements {@link EmulatorStart} for the Pub/Sub emulator.
5
5
  * This first starts the Pub/Sub emulator, and then creates the topics defined in the workspace (if the workspace is
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EmulatorStart, EventTopicList, } from '@causa/workspace-core';
2
3
  import { PubSub } from '@google-cloud/pubsub';
3
4
  import { getLocalGcpProject } from '../../configurations/utils.js';
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { EmulatorStart, EmulatorStartResult } from '@causa/workspace-core';
2
+ import { EmulatorStart, type EmulatorStartResult } from '@causa/workspace-core';
3
3
  /**
4
4
  * Implements {@link EmulatorStart} for the Spanner emulator.
5
5
  * This starts the emulator, creates a local instance, and creates the databases using the DDLs found in the workspace.
@@ -1,5 +1,6 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, EmulatorStart, } from '@causa/workspace-core';
2
- import { Spanner } from '@google-cloud/spanner';
3
+ import { Instance, Spanner } from '@google-cloud/spanner';
3
4
  // The Spanner client depends on `google-gax` rather than `@grpc/grpc-js` directly. By ensuring `google-gax` is kept in
4
5
  // sync with the version required by Spanner, and importing `grpc` from `google-gax`, the correct `grpc.credentials`
5
6
  // version can be loaded.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, EmulatorStop } from '@causa/workspace-core';
2
3
  import { FIREBASE_STORAGE_EMULATOR_NAME, getFirebaseStorageContainerName, } from '../../emulators/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, EmulatorStop } from '@causa/workspace-core';
2
3
  import { FIRESTORE_EMULATOR_NAME, getFirestoreContainerName, } from '../../emulators/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, EmulatorStop } from '@causa/workspace-core';
2
3
  import { IDENTITY_PLATFORM_EMULATOR_NAME, getIdentityPlatformContainerName, } from '../../emulators/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, EmulatorStop } from '@causa/workspace-core';
2
3
  import { PUBSUB_EMULATOR_NAME, getPubSubContainerName, } from '../../emulators/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, EmulatorStop } from '@causa/workspace-core';
2
3
  import { SPANNER_EMULATOR_NAME, getSpannerContainerName, } from '../../emulators/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerCreateTopic, } from '@causa/workspace-core';
2
3
  import { PubSubService } from '../../services/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerCreateTrigger, } from '@causa/workspace-core';
2
3
  import { CloudRunPubSubTriggerService } from '../../services/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerDeleteTopic, } from '@causa/workspace-core';
2
3
  import { grpc } from 'google-gax';
3
4
  import { PubSubService } from '../../services/index.js';
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerDeleteTriggerResource, } from '@causa/workspace-core';
2
3
  import { CloudRunService } from '../../services/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerDeleteTriggerResource, } from '@causa/workspace-core';
2
3
  import { grpc } from 'google-gax';
3
4
  import { PubSubService } from '../../services/index.js';
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerDeleteTriggerResource, } from '@causa/workspace-core';
2
3
  import { IamService } from '../../services/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerGetTopicId, } from '@causa/workspace-core';
2
3
  /**
3
4
  * Implements {@link EventTopicBrokerGetTopicId} for Pub/Sub.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicBrokerPublishEvents, JsonFilesEventSource, } from '@causa/workspace-core';
2
3
  import { BigQueryEventsSource, PubSubBackfillEventPublisher, } from '../../backfilling/index.js';
3
4
  /**
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { CliCommand, CliOption } from '@causa/cli';
11
- import { WorkspaceFunction } from '@causa/workspace';
11
+ import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
12
12
  import { AllowMissing } from '@causa/workspace/validation';
13
13
  import { IsString } from 'class-validator';
14
14
  import { getAppCheck } from 'firebase-admin/app-check';
@@ -1,6 +1,6 @@
1
1
  import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
- import { InfrastructureProcessor } from '@causa/workspace-core';
3
- import { GoogleConfiguration } from '../../configurations/index.js';
2
+ import type { InfrastructureProcessor } from '@causa/workspace-core';
3
+ import type { GoogleConfiguration } from '../../configurations/index.js';
4
4
  /**
5
5
  * The return value of {@link GoogleFirebaseStorageMergeRules}.
6
6
  */
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { CliCommand } from '@causa/cli';
11
- import { WorkspaceFunction } from '@causa/workspace';
11
+ import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
12
12
  import { AllowMissing } from '@causa/workspace/validation';
13
13
  import { IsBoolean } from 'class-validator';
14
14
  import { firebaseStorageCommandDefinition } from '../../cli/index.js';
@@ -1,6 +1,6 @@
1
1
  import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
- import { InfrastructureProcessor } from '@causa/workspace-core';
3
- import { GoogleConfiguration } from '../../configurations/index.js';
2
+ import type { InfrastructureProcessor } from '@causa/workspace-core';
3
+ import type { GoogleConfiguration } from '../../configurations/index.js';
4
4
  /**
5
5
  * The return value of {@link GoogleFirestoreMergeRules}.
6
6
  */
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { CliCommand } from '@causa/cli';
11
- import { WorkspaceFunction } from '@causa/workspace';
11
+ import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
12
12
  import { AllowMissing } from '@causa/workspace/validation';
13
13
  import { IsBoolean } from 'class-validator';
14
14
  import { firestoreCommandDefinition } from '../../cli/index.js';
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { WorkspaceFunction } from '@causa/workspace';
10
+ import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
11
11
  import { AllowMissing } from '@causa/workspace/validation';
12
12
  import { IsObject, IsString } from 'class-validator';
13
13
  import { getAuth } from 'firebase-admin/auth';
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { CliArgument, CliCommand, CliOption } from '@causa/cli';
11
- import { WorkspaceFunction } from '@causa/workspace';
11
+ import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
12
12
  import { AllowMissing } from '@causa/workspace/validation';
13
13
  import { Transform } from 'class-transformer';
14
14
  import { IsObject, IsString } from 'class-validator';
@@ -1,5 +1,5 @@
1
- import { ProcessorResult, WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
- import { InfrastructureProcessor } from '@causa/workspace-core';
1
+ import { type ProcessorResult, WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
+ import { type InfrastructureProcessor } from '@causa/workspace-core';
3
3
  /**
4
4
  * A function that uses {@link EventTopicList} to find all the topics in the workspace, and writes their configurations
5
5
  * to a directory.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { WorkspaceFunction, } from '@causa/workspace';
10
+ import { WorkspaceContext, WorkspaceFunction, } from '@causa/workspace';
11
11
  import { EventTopicList, } from '@causa/workspace-core';
12
12
  import { CAUSA_FOLDER } from '@causa/workspace/initialization';
13
13
  import { AllowMissing } from '@causa/workspace/validation';
@@ -1,6 +1,6 @@
1
1
  import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
- import { InfrastructureProcessor } from '@causa/workspace-core';
3
- import { GoogleConfiguration } from '../../configurations/index.js';
2
+ import type { InfrastructureProcessor } from '@causa/workspace-core';
3
+ import type { GoogleConfiguration } from '../../configurations/index.js';
4
4
  /**
5
5
  * The return value of {@link GoogleServicesEnable}.
6
6
  */
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { CliCommand } from '@causa/cli';
11
- import { WorkspaceFunction } from '@causa/workspace';
11
+ import { WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
12
12
  import { AllowMissing } from '@causa/workspace/validation';
13
13
  import { ServiceUsageClient } from '@google-cloud/service-usage';
14
14
  import { IsBoolean } from 'class-validator';
@@ -1,4 +1,4 @@
1
- import { WorkspaceFunction, listFilesAndFormat, } from '@causa/workspace';
1
+ import { WorkspaceContext, WorkspaceFunction, listFilesAndFormat, } from '@causa/workspace';
2
2
  import { readFile } from 'fs/promises';
3
3
  /**
4
4
  * The default format used to infer the ID / name of the database from the format parts.
@@ -1,5 +1,5 @@
1
- import { ProcessorResult, WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
- import { InfrastructureProcessor } from '@causa/workspace-core';
1
+ import { type ProcessorResult, WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
2
+ import type { InfrastructureProcessor } from '@causa/workspace-core';
3
3
  /**
4
4
  * A function that uses {@link GoogleSpannerListDatabases} to find all the Spanner databases in the workspace, and
5
5
  * writes their configurations to a directory.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { WorkspaceFunction, } from '@causa/workspace';
10
+ import { WorkspaceContext, WorkspaceFunction, } from '@causa/workspace';
11
11
  import { CAUSA_FOLDER } from '@causa/workspace/initialization';
12
12
  import { AllowMissing } from '@causa/workspace/validation';
13
13
  import { IsBoolean } from 'class-validator';
@@ -1,2 +1,2 @@
1
- import { ModuleRegistrationContext } from '@causa/workspace';
1
+ import type { ModuleRegistrationContext } from '@causa/workspace';
2
2
  export declare function registerFunctions(context: ModuleRegistrationContext): void;
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { ProjectGetArtefactDestination, } from '@causa/workspace-core';
2
3
  /**
3
4
  * Implements the {@link ProjectGetArtefactDestination} function for Cloud Functions projects.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { ProjectGetArtefactDestination, } from '@causa/workspace-core';
2
3
  /**
3
4
  * Implements the {@link ProjectGetArtefactDestination} function for Cloud Run services.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { ArtefactAlreadyExistsError, ProjectPushArtefact, } from '@causa/workspace-core';
2
3
  import { rm } from 'fs/promises';
3
4
  import { CloudStorageService } from '../../services/index.js';
@@ -1,4 +1,4 @@
1
- import { SecretFetch } from '@causa/workspace';
1
+ import { SecretFetch, WorkspaceContext } from '@causa/workspace';
2
2
  import { GoogleApisService } from '../../services/index.js';
3
3
  /**
4
4
  * An error thrown when the auth client does not return a token.
@@ -1,4 +1,4 @@
1
- import { InvalidSecretDefinitionError, SecretFetch, } from '@causa/workspace';
1
+ import { InvalidSecretDefinitionError, SecretFetch, WorkspaceContext, } from '@causa/workspace';
2
2
  import { GoogleSecretManagerService } from '../../services/index.js';
3
3
  /**
4
4
  * The regular expression used to match the (Secret Manager) secret ID/name, and possibly its version and project.
@@ -1,4 +1,5 @@
1
- import { TypeScriptGetDecoratorRenderer, } from '@causa/workspace-typescript';
1
+ import { WorkspaceContext } from '@causa/workspace';
2
+ import { TypeScriptDecoratorsRenderer, TypeScriptGetDecoratorRenderer, } from '@causa/workspace-typescript';
2
3
  import { GoogleSpannerRenderer } from '../../code-generation/index.js';
3
4
  /**
4
5
  * Implements {@link TypeScriptGetDecoratorRenderer} for the {@link GoogleSpannerRenderer}.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ModuleRegistrationFunction } from '@causa/workspace';
1
+ import type { ModuleRegistrationFunction } from '@causa/workspace';
2
2
  export * from './configurations/index.js';
3
3
  export * from './services/index.js';
4
4
  declare const registerModule: ModuleRegistrationFunction;
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { BigQuery } from '@google-cloud/bigquery';
2
3
  /**
3
4
  * A service that provides access to BigQuery.
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { EventTopicTriggerCreationError } from '@causa/workspace-core';
2
3
  import { Subscription } from '@google-cloud/pubsub';
3
4
  import { randomBytes } from 'crypto';
@@ -1,6 +1,6 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { App as FirebaseAdminApp } from 'firebase-admin/app';
3
- import { FirebaseApp } from 'firebase/app';
2
+ import { type App as FirebaseAdminApp } from 'firebase-admin/app';
3
+ import { type FirebaseApp } from 'firebase/app';
4
4
  /**
5
5
  * The types (platforms) of Firebase apps.
6
6
  * Apps are split by type and cannot be listed globally.
@@ -1,7 +1,9 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { ApiKeysClient } from '@google-cloud/apikeys';
2
3
  import { IAMCredentialsClient } from '@google-cloud/iam-credentials';
3
4
  import { initializeApp as initializeAdminApp, } from 'firebase-admin/app';
4
5
  import { initializeApp } from 'firebase/app';
6
+ import { firebase_v1beta1 } from 'googleapis';
5
7
  import * as uuid from 'uuid';
6
8
  import { FirebaseAdminServiceAccountNotFoundError, FirebaseApiKeyNotFoundError, NoFirebaseAppFoundError, } from './firebase-app.errors.js';
7
9
  import { GoogleApisService } from './google-apis.js';
@@ -262,7 +264,7 @@ export class FirebaseAppService {
262
264
  parent: `projects/${this.projectId}`,
263
265
  pageSize: 1,
264
266
  });
265
- return apps ? apps[0]?.appId ?? null : null;
267
+ return apps ? (apps[0]?.appId ?? null) : null;
266
268
  }
267
269
  /**
268
270
  * The promise resolving to one of the Firebase App IDs available in the GCP project.
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core';
2
+ import { type DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core';
3
3
  /**
4
4
  * Options when starting a Firebase emulator.
5
5
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, } from '@causa/workspace-core';
2
3
  import { getLocalGcpProject, } from '../configurations/index.js';
3
4
  /**
@@ -42,7 +43,7 @@ export class FirebaseEmulatorService {
42
43
  * @param options Options when starting the Docker container and waiting for it to be available.
43
44
  */
44
45
  async start(containerName, firebaseConfFile, publish, options = {}) {
45
- await this.dockerEmulatorService.start(`${FIREBASE_TOOLS_IMAGE}:${this.firebaseToolsVersion}-node-18-alpine`, containerName, publish, {
46
+ await this.dockerEmulatorService.start(`${FIREBASE_TOOLS_IMAGE}:${this.firebaseToolsVersion}-node-22-slim`, containerName, publish, {
46
47
  ...options,
47
48
  mounts: [
48
49
  ...(options.mounts ?? []),
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { DockerContainerMount, DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core';
2
+ import { type DockerContainerMount, type DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core';
3
3
  /**
4
4
  * Options when specifying an availability endpoint when starting an emulator.
5
5
  */
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { DockerEmulatorService, } from '@causa/workspace-core';
2
3
  import { getLocalGcpProject, } from '../configurations/index.js';
3
4
  /**
@@ -1,7 +1,7 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
2
  import { AuthClient } from 'google-auth-library';
3
3
  import { GoogleApis } from 'googleapis';
4
- import { ApiClient, OptionsOfApiClient } from './google-apis.types.js';
4
+ import type { ApiClient, OptionsOfApiClient } from './google-apis.types.js';
5
5
  /**
6
6
  * A service that exposes the lowest level of Google API clients, from `googleapis`.
7
7
  * Those might be needed in last resort, when no higher level client exists for an API.
@@ -1,4 +1,6 @@
1
- import { google } from 'googleapis';
1
+ import { WorkspaceContext } from '@causa/workspace';
2
+ import { AuthClient } from 'google-auth-library';
3
+ import { GoogleApis, google } from 'googleapis';
2
4
  /**
3
5
  * A service that exposes the lowest level of Google API clients, from `googleapis`.
4
6
  * Those might be needed in last resort, when no higher level client exists for an API.
@@ -1,4 +1,4 @@
1
1
  // This file is used to return nice TypeScript types when creating clients to Google APIs using the `GoogleApisService`.
2
2
  // Unfortunately the TypeScript type utilities do not handle function overloading completely, which is why this file
3
3
  // defines types for up to 12 overloads manually.
4
- export {};
4
+ import { GoogleApis } from 'googleapis';
@@ -1,3 +1,5 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
2
+ import { iam_v1 } from 'googleapis';
1
3
  import { GoogleApisService } from './google-apis.js';
2
4
  /**
3
5
  * A service for interacting with the IAM API.
@@ -2,7 +2,8 @@ export { BigQueryService } from './bigquery.js';
2
2
  export { CloudRunPubSubTriggerService } from './cloud-run-pubsub-trigger.js';
3
3
  export { CloudRunService } from './cloud-run.js';
4
4
  export * from './firebase-app.errors.js';
5
- export { FirebaseAppService, FirebaseAppType } from './firebase-app.js';
5
+ export { FirebaseAppService } from './firebase-app.js';
6
+ export type { FirebaseAppType } from './firebase-app.js';
6
7
  export { FirebaseEmulatorService } from './firebase-emulator.js';
7
8
  export { GcloudEmulatorService } from './gcloud-emulator.js';
8
9
  export { GoogleApisService } from './google-apis.js';
@@ -1,4 +1,6 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { PubSub } from '@google-cloud/pubsub';
3
+ import { iam_v1 } from 'googleapis';
2
4
  import { ResourceManagerService } from './resource-manager.js';
3
5
  /**
4
6
  * A service for managing Pub/Sub resources
@@ -1,3 +1,4 @@
1
+ import { WorkspaceContext } from '@causa/workspace';
1
2
  import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
2
3
  /**
3
4
  * A service exposing a client to the Google Secret Manager.
@@ -1,4 +1,4 @@
1
- import { Storage } from '@google-cloud/storage';
1
+ import { File, Storage } from '@google-cloud/storage';
2
2
  import { InvalidCloudStorageUriError } from './storage.errors.js';
3
3
  /**
4
4
  * A service for interacting with Google Cloud Storage.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causa/workspace-google",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "The Causa workspace module providing many functionalities related to GCP and its services.",
5
5
  "repository": "github:causa-io/workspace-module-google",
6
6
  "license": "ISC",
@@ -29,46 +29,47 @@
29
29
  "test:cov": "npm run test -- --coverage"
30
30
  },
31
31
  "dependencies": {
32
- "@causa/cli": ">= 0.5.0 < 1.0.0",
33
- "@causa/workspace": ">= 0.15.0 < 1.0.0",
34
- "@causa/workspace-core": ">= 0.21.0 < 1.0.0",
35
- "@causa/workspace-typescript": ">= 0.9.0 < 1.0.0",
36
- "@google-cloud/apikeys": "^1.3.0",
37
- "@google-cloud/bigquery": "^7.7.0",
32
+ "@causa/cli": ">= 0.6.1 < 1.0.0",
33
+ "@causa/workspace": ">= 0.16.1 < 1.0.0",
34
+ "@causa/workspace-core": ">= 0.22.2 < 1.0.0",
35
+ "@causa/workspace-typescript": ">= 0.10.1 < 1.0.0",
36
+ "@google-cloud/apikeys": "^1.3.1",
37
+ "@google-cloud/bigquery": "^7.9.2",
38
38
  "@google-cloud/iam-credentials": "^3.3.0",
39
- "@google-cloud/pubsub": "^4.4.0",
40
- "@google-cloud/resource-manager": "^5.3.0",
41
- "@google-cloud/run": "^1.3.0",
39
+ "@google-cloud/pubsub": "^4.10.0",
40
+ "@google-cloud/resource-manager": "^5.3.1",
41
+ "@google-cloud/run": "^1.5.1",
42
42
  "@google-cloud/secret-manager": "^5.6.0",
43
- "@google-cloud/service-usage": "^3.4.0",
44
- "@google-cloud/spanner": "7.8.0",
45
- "@google-cloud/storage": "^7.11.1",
43
+ "@google-cloud/service-usage": "^3.4.1",
44
+ "@google-cloud/spanner": "7.19.1",
45
+ "@google-cloud/storage": "^7.15.2",
46
46
  "class-validator": "^0.14.1",
47
- "firebase": "^10.12.1",
48
- "firebase-admin": "^12.1.1",
49
- "globby": "^14.0.1",
50
- "google-auth-library": "^9.10.0",
51
- "google-gax": "4.3.3",
52
- "googleapis": "^137.1.0",
53
- "pino": "^9.1.0",
54
- "quicktype-core": "^23.0.168",
55
- "uuid": "^9.0.1"
47
+ "firebase": "^11.4.0",
48
+ "firebase-admin": "^13.2.0",
49
+ "globby": "^14.1.0",
50
+ "google-auth-library": "^9.15.1",
51
+ "google-gax": "4.4.1",
52
+ "googleapis": "^146.0.0",
53
+ "pino": "^9.6.0",
54
+ "quicktype-core": "^23.0.171",
55
+ "uuid": "^11.1.0"
56
56
  },
57
57
  "devDependencies": {
58
+ "@swc/core": "^1.11.10",
59
+ "@swc/jest": "^0.2.37",
58
60
  "@tsconfig/node20": "^20.1.4",
59
- "@types/jest": "^29.5.12",
60
- "@types/node": "^18.19.33",
61
- "@types/uuid": "^9.0.8",
62
- "@typescript-eslint/eslint-plugin": "^7.10.0",
61
+ "@types/jest": "^29.5.14",
62
+ "@types/node": "^18.19.80",
63
+ "@types/uuid": "^10.0.0",
63
64
  "copyfiles": "^2.4.1",
64
- "eslint": "^8.57.0",
65
- "eslint-config-prettier": "^9.1.0",
66
- "eslint-plugin-prettier": "^5.1.3",
65
+ "eslint": "^9.22.0",
66
+ "eslint-config-prettier": "^10.1.1",
67
+ "eslint-plugin-prettier": "^5.2.3",
67
68
  "jest": "^29.7.0",
68
69
  "jest-extended": "^4.0.2",
69
- "rimraf": "^5.0.7",
70
- "ts-jest": "^29.1.3",
70
+ "rimraf": "^6.0.1",
71
71
  "ts-node": "^10.9.2",
72
- "typescript": "^5.4.5"
72
+ "typescript": "^5.8.2",
73
+ "typescript-eslint": "^8.26.1"
73
74
  }
74
75
  }