@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.
- package/dist/backfilling/bigquery.d.ts +1 -1
- package/dist/backfilling/bigquery.js +2 -0
- package/dist/backfilling/pubsub.d.ts +1 -1
- package/dist/backfilling/pubsub.js +3 -1
- package/dist/cli/google-app-check.d.ts +1 -1
- package/dist/cli/google-firebase-storage.d.ts +1 -1
- package/dist/cli/google-firestore.d.ts +1 -1
- package/dist/cli/google-identity-platform.d.ts +1 -1
- package/dist/cli/google.d.ts +1 -1
- package/dist/code-generation/google-spanner-renderer.d.ts +1 -1
- package/dist/configurations/index.d.ts +1 -1
- package/dist/configurations/utils.js +1 -0
- package/dist/emulators/firebase-storage.js +1 -0
- package/dist/emulators/firestore.js +1 -0
- package/dist/emulators/identity-platform.js +1 -0
- package/dist/emulators/pubsub.js +1 -0
- package/dist/emulators/spanner.js +1 -0
- package/dist/firebase/rules.js +1 -0
- package/dist/functions/emulator/start-firebase-storage.d.ts +1 -1
- package/dist/functions/emulator/start-firebase-storage.js +1 -0
- package/dist/functions/emulator/start-firestore.d.ts +1 -1
- package/dist/functions/emulator/start-firestore.js +1 -0
- package/dist/functions/emulator/start-identity-platform.d.ts +1 -1
- package/dist/functions/emulator/start-identity-platform.js +1 -0
- package/dist/functions/emulator/start-pubsub.d.ts +1 -1
- package/dist/functions/emulator/start-pubsub.js +1 -0
- package/dist/functions/emulator/start-spanner.d.ts +1 -1
- package/dist/functions/emulator/start-spanner.js +2 -1
- package/dist/functions/emulator/stop-firebase-storage.js +1 -0
- package/dist/functions/emulator/stop-firestore.js +1 -0
- package/dist/functions/emulator/stop-identity-platform.js +1 -0
- package/dist/functions/emulator/stop-pubsub.js +1 -0
- package/dist/functions/emulator/stop-spanner.js +1 -0
- package/dist/functions/event-topic/broker-create-topic-pubsub.js +1 -0
- package/dist/functions/event-topic/broker-create-trigger-cloud-run.js +1 -0
- package/dist/functions/event-topic/broker-delete-topic-pubsub.js +1 -0
- package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-invoker-role.js +1 -0
- package/dist/functions/event-topic/broker-delete-trigger-resource-pubsub-subscription.js +1 -0
- package/dist/functions/event-topic/broker-delete-trigger-resource-service-account.js +1 -0
- package/dist/functions/event-topic/broker-get-topic-id-pubsub.js +1 -0
- package/dist/functions/event-topic/broker-publish-events-google.js +1 -0
- package/dist/functions/google-app-check/generate-token.js +1 -1
- package/dist/functions/google-firebase-storage/merge-rules.d.ts +2 -2
- package/dist/functions/google-firebase-storage/merge-rules.js +1 -1
- package/dist/functions/google-firestore/merge-rules.d.ts +2 -2
- package/dist/functions/google-firestore/merge-rules.js +1 -1
- package/dist/functions/google-identity-platform/generate-custom-token.js +1 -1
- package/dist/functions/google-identity-platform/generate-token.js +1 -1
- package/dist/functions/google-pubsub/write-topics.d.ts +2 -2
- package/dist/functions/google-pubsub/write-topics.js +1 -1
- package/dist/functions/google-services/enable.d.ts +2 -2
- package/dist/functions/google-services/enable.js +1 -1
- package/dist/functions/google-spanner/list-databases.js +1 -1
- package/dist/functions/google-spanner/write-databases.d.ts +2 -2
- package/dist/functions/google-spanner/write-databases.js +1 -1
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/project/get-artefact-destination-cloud-functions.js +1 -0
- package/dist/functions/project/get-artefact-destination-cloud-run.js +1 -0
- package/dist/functions/project/push-artefact-cloud-functions.js +1 -0
- package/dist/functions/secret/fetch-access-token.js +1 -1
- package/dist/functions/secret/fetch-secret-manager.js +1 -1
- package/dist/functions/typescript/get-decorator-renderer-google-spanner.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/services/bigquery.js +1 -0
- package/dist/services/cloud-run-pubsub-trigger.js +1 -0
- package/dist/services/firebase-app.d.ts +2 -2
- package/dist/services/firebase-app.js +3 -1
- package/dist/services/firebase-emulator.d.ts +1 -1
- package/dist/services/firebase-emulator.js +2 -1
- package/dist/services/gcloud-emulator.d.ts +1 -1
- package/dist/services/gcloud-emulator.js +1 -0
- package/dist/services/google-apis.d.ts +1 -1
- package/dist/services/google-apis.js +3 -1
- package/dist/services/google-apis.types.js +1 -1
- package/dist/services/iam.js +2 -0
- package/dist/services/index.d.ts +2 -1
- package/dist/services/pubsub.js +2 -0
- package/dist/services/secret-manager.js +1 -0
- package/dist/services/storage.js +1 -1
- 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,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 {
|
|
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.
|
package/dist/cli/google.d.ts
CHANGED
|
@@ -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';
|
package/dist/emulators/pubsub.js
CHANGED
package/dist/firebase/rules.js
CHANGED
|
@@ -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,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.
|
|
@@ -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,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 {
|
|
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,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-
|
|
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,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 {
|
|
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
|
-
|
|
4
|
+
import { GoogleApis } from 'googleapis';
|
package/dist/services/iam.js
CHANGED
package/dist/services/index.d.ts
CHANGED
|
@@ -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
|
|
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';
|
package/dist/services/pubsub.js
CHANGED
package/dist/services/storage.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@causa/workspace-google",
|
|
3
|
-
"version": "0.9.
|
|
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.
|
|
33
|
-
"@causa/workspace": ">= 0.
|
|
34
|
-
"@causa/workspace-core": ">= 0.
|
|
35
|
-
"@causa/workspace-typescript": ">= 0.
|
|
36
|
-
"@google-cloud/apikeys": "^1.3.
|
|
37
|
-
"@google-cloud/bigquery": "^7.
|
|
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.
|
|
40
|
-
"@google-cloud/resource-manager": "^5.3.
|
|
41
|
-
"@google-cloud/run": "^1.
|
|
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.
|
|
44
|
-
"@google-cloud/spanner": "7.
|
|
45
|
-
"@google-cloud/storage": "^7.
|
|
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": "^
|
|
48
|
-
"firebase-admin": "^
|
|
49
|
-
"globby": "^14.0
|
|
50
|
-
"google-auth-library": "^9.
|
|
51
|
-
"google-gax": "4.
|
|
52
|
-
"googleapis": "^
|
|
53
|
-
"pino": "^9.
|
|
54
|
-
"quicktype-core": "^23.0.
|
|
55
|
-
"uuid": "^
|
|
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.
|
|
60
|
-
"@types/node": "^18.19.
|
|
61
|
-
"@types/uuid": "^
|
|
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": "^
|
|
65
|
-
"eslint-config-prettier": "^
|
|
66
|
-
"eslint-plugin-prettier": "^5.
|
|
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": "^
|
|
70
|
-
"ts-jest": "^29.1.3",
|
|
70
|
+
"rimraf": "^6.0.1",
|
|
71
71
|
"ts-node": "^10.9.2",
|
|
72
|
-
"typescript": "^5.
|
|
72
|
+
"typescript": "^5.8.2",
|
|
73
|
+
"typescript-eslint": "^8.26.1"
|
|
73
74
|
}
|
|
74
75
|
}
|