@causa/workspace-google 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/configurations/google.d.ts +72 -0
- package/dist/functions/emulator-start-spanner.js +2 -2
- package/dist/functions/google-pubsub-write-topics.d.ts +22 -0
- package/dist/functions/google-pubsub-write-topics.js +80 -0
- package/dist/functions/google-spanner-write-databases.d.ts +22 -0
- package/dist/functions/google-spanner-write-databases.js +73 -0
- package/dist/functions/index.js +3 -1
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -114,3 +114,11 @@ The Google module provides several infrastructure processors, which can be used
|
|
|
114
114
|
[GoogleServicesEnable](./src/functions/google-services-enable.ts) is the same underlying function as the `cs google enableServices` command. It enables GCP services before preparing or deploying the infrastructure.
|
|
115
115
|
|
|
116
116
|
Although infrastructure as code tools usually expose this feature as well (e.g. the [`google_project_service`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_project_service) Terraform resource), it might be more convenient to enable all the required services before running those tools. It avoids having to define dependencies between the services and all the actual resources being deployed.
|
|
117
|
+
|
|
118
|
+
### `GoogleSpannerWriteDatabases`
|
|
119
|
+
|
|
120
|
+
[GoogleSpannerWriteDatabases](./src/functions/google-spanner-write-databases.ts) writes a configuration file for each Spanner database, such that it can be picked up by the Causa Spanner Terraform module. This allows automatic setup of Spanner databases and their DDLs.
|
|
121
|
+
|
|
122
|
+
### `GooglePubSubWriteTopics`
|
|
123
|
+
|
|
124
|
+
[GooglePubSubWriteTopics](./src/functions/google-pubsub-write-topics.ts) writes a configuration file for each event topic, such that it can be picked up by the Causa Pub/Sub Terraform module. This allows automatic setup of Pub/Sub topics, and optionally of the corresponding BigQuery tables.
|
|
@@ -153,6 +153,19 @@ export type GoogleConfiguration = {
|
|
|
153
153
|
*/
|
|
154
154
|
readonly containerName?: string;
|
|
155
155
|
};
|
|
156
|
+
/**
|
|
157
|
+
* The directory where the topic configuration files are written by the `GooglePubSubWriteTopics` processor.
|
|
158
|
+
*/
|
|
159
|
+
readonly topicConfigurationsDirectory?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Configuration for the storage of Pub/Sub events in BigQuery.
|
|
162
|
+
*/
|
|
163
|
+
readonly bigQueryStorage?: {
|
|
164
|
+
/**
|
|
165
|
+
* The ID of the BigQuery dataset where raw Pub/Sub events should be stored.
|
|
166
|
+
*/
|
|
167
|
+
readonly rawEventsDatasetId?: string;
|
|
168
|
+
};
|
|
156
169
|
};
|
|
157
170
|
/**
|
|
158
171
|
* Configuration for the Spanner service.
|
|
@@ -175,6 +188,25 @@ export type GoogleConfiguration = {
|
|
|
175
188
|
*/
|
|
176
189
|
readonly instanceName?: string;
|
|
177
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* Configuration for the Spanner instance.
|
|
193
|
+
*/
|
|
194
|
+
readonly instance?: {
|
|
195
|
+
/**
|
|
196
|
+
* The name of the Spanner instance.
|
|
197
|
+
*/
|
|
198
|
+
readonly name?: string;
|
|
199
|
+
/**
|
|
200
|
+
* The instance geographic configuration.
|
|
201
|
+
* See https://cloud.google.com/spanner/docs/instance-configurations for more details.
|
|
202
|
+
*/
|
|
203
|
+
readonly configuration?: string;
|
|
204
|
+
/**
|
|
205
|
+
* The compute capacity of the instance.
|
|
206
|
+
* See https://cloud.google.com/spanner/docs/compute-capacity for more details.
|
|
207
|
+
*/
|
|
208
|
+
readonly processingUnits?: number;
|
|
209
|
+
};
|
|
178
210
|
/**
|
|
179
211
|
* Defines how DDLs are found for the Spanner databases in the workspace.
|
|
180
212
|
*/
|
|
@@ -192,6 +224,11 @@ export type GoogleConfiguration = {
|
|
|
192
224
|
*/
|
|
193
225
|
readonly regularExpression?: string;
|
|
194
226
|
};
|
|
227
|
+
/**
|
|
228
|
+
* The directory where the database configuration files are written by the `GoogleSpannerWriteDatabases`
|
|
229
|
+
* processor.
|
|
230
|
+
*/
|
|
231
|
+
readonly databaseConfigurationsDirectory?: string;
|
|
195
232
|
};
|
|
196
233
|
/**
|
|
197
234
|
* Configuration for Cloud Functions.
|
|
@@ -210,6 +247,41 @@ export type GoogleConfiguration = {
|
|
|
210
247
|
* The Docker repository where Cloud Run containers should be uploaded.
|
|
211
248
|
*/
|
|
212
249
|
readonly dockerRepository?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The location where Cloud Run services should be deployed.
|
|
252
|
+
*/
|
|
253
|
+
readonly location?: string;
|
|
254
|
+
/**
|
|
255
|
+
* A map where keys are the name of environment variables, and values are secret versions IDs (e.g.
|
|
256
|
+
* `projects/my-project/secrets/my-secret/versions/1`).
|
|
257
|
+
*/
|
|
258
|
+
readonly secretEnvironmentVariables?: Record<string, string>;
|
|
259
|
+
/**
|
|
260
|
+
* Whether the container is running between requests and can perform background operations.
|
|
261
|
+
*/
|
|
262
|
+
readonly cpuAlwaysAllocated?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* The max duration the instance is allowed for responding to a request, in seconds.
|
|
265
|
+
*/
|
|
266
|
+
readonly timeout?: number;
|
|
267
|
+
/**
|
|
268
|
+
* The maximum allowed in-flight (concurrent) requests per container.
|
|
269
|
+
*/
|
|
270
|
+
readonly requestConcurrency?: number;
|
|
271
|
+
/**
|
|
272
|
+
* The type of allowed ingress that can reach the container.
|
|
273
|
+
* See https://cloud.google.com/run/docs/securing/ingress#settings for more details.
|
|
274
|
+
*/
|
|
275
|
+
readonly ingress?: 'all' | 'internal' | 'internal-and-cloud-load-balancing';
|
|
276
|
+
/**
|
|
277
|
+
* The name of the VPC access connector through which egress traffic should be routed.
|
|
278
|
+
*/
|
|
279
|
+
readonly vpcAccessConnector?: string;
|
|
280
|
+
/**
|
|
281
|
+
* The setting for egress traffic that goes through the VPC access connector.
|
|
282
|
+
* See https://cloud.google.com/run/docs/configuring/connecting-vpc#manage for more details.
|
|
283
|
+
*/
|
|
284
|
+
readonly vpcAccessConnectorEgressSettings?: 'all-traffic' | 'private-ranges-only';
|
|
213
285
|
};
|
|
214
286
|
};
|
|
215
287
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DockerEmulatorService, EmulatorStart, } from '@causa/workspace-core';
|
|
2
2
|
import { Spanner } from '@google-cloud/spanner';
|
|
3
|
-
import {
|
|
3
|
+
import { credentials } from '@grpc/grpc-js';
|
|
4
4
|
import { getLocalGcpProject, } from '../configurations/index.js';
|
|
5
5
|
import { SPANNER_EMULATOR_NAME, SPANNER_GRPC_PORT, SPANNER_HTTP_PORT, SPANNER_IMAGE, getSpannerContainerName, } from '../emulators/index.js';
|
|
6
6
|
import { GoogleSpannerListDatabases } from './google-spanner-list-databases.js';
|
|
@@ -75,7 +75,7 @@ export class EmulatorStartForSpanner extends EmulatorStart {
|
|
|
75
75
|
servicePath: '127.0.0.1',
|
|
76
76
|
port: SPANNER_GRPC_PORT,
|
|
77
77
|
projectId: getLocalGcpProject(context),
|
|
78
|
-
sslCreds:
|
|
78
|
+
sslCreds: credentials.createInsecure(),
|
|
79
79
|
});
|
|
80
80
|
const [instance, operation] = await spanner.createInstance(instanceName, {
|
|
81
81
|
config: 'emulator-config',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProcessorResult, WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
|
|
2
|
+
import { InfrastructureProcessor } from '@causa/workspace-core';
|
|
3
|
+
/**
|
|
4
|
+
* A function that uses {@link EventTopicList} to find all the topics in the workspace, and writes their configurations
|
|
5
|
+
* to a directory.
|
|
6
|
+
* The `google.pubSub.topicConfigurationsDirectory` configuration can be used to specify the output location of the
|
|
7
|
+
* topic configurations.
|
|
8
|
+
* This function returns a partial configuration, such that it can be used as a processor.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GooglePubSubWriteTopics extends WorkspaceFunction<Promise<ProcessorResult>> implements InfrastructureProcessor {
|
|
11
|
+
readonly tearDown?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the path to the directory where Pub/Sub topic configurations should be written.
|
|
14
|
+
* It is either fetched from the workspace configuration, or the default value is used.
|
|
15
|
+
*
|
|
16
|
+
* @param context The {@link WorkspaceContext}.
|
|
17
|
+
* @returns The path to the directory where topic configurations should be written.
|
|
18
|
+
*/
|
|
19
|
+
private getConfigurationsDirectory;
|
|
20
|
+
_call(context: WorkspaceContext): Promise<ProcessorResult>;
|
|
21
|
+
_supports(): boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { WorkspaceFunction, } from '@causa/workspace';
|
|
11
|
+
import { EventTopicList, } from '@causa/workspace-core';
|
|
12
|
+
import { CAUSA_FOLDER } from '@causa/workspace/initialization';
|
|
13
|
+
import { AllowMissing } from '@causa/workspace/validation';
|
|
14
|
+
import { IsBoolean } from 'class-validator';
|
|
15
|
+
import { mkdir, rm, writeFile } from 'fs/promises';
|
|
16
|
+
import { join } from 'path';
|
|
17
|
+
/**
|
|
18
|
+
* The default directory where Pub/Sub topic configurations are written, relative to the workspace root.
|
|
19
|
+
*/
|
|
20
|
+
const DEFAULT_TOPIC_CONFIGURATIONS_DIRECTORY = join(CAUSA_FOLDER, 'pubsub-topics');
|
|
21
|
+
/**
|
|
22
|
+
* A function that uses {@link EventTopicList} to find all the topics in the workspace, and writes their configurations
|
|
23
|
+
* to a directory.
|
|
24
|
+
* The `google.pubSub.topicConfigurationsDirectory` configuration can be used to specify the output location of the
|
|
25
|
+
* topic configurations.
|
|
26
|
+
* This function returns a partial configuration, such that it can be used as a processor.
|
|
27
|
+
*/
|
|
28
|
+
export class GooglePubSubWriteTopics extends WorkspaceFunction {
|
|
29
|
+
tearDown;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the path to the directory where Pub/Sub topic configurations should be written.
|
|
32
|
+
* It is either fetched from the workspace configuration, or the default value is used.
|
|
33
|
+
*
|
|
34
|
+
* @param context The {@link WorkspaceContext}.
|
|
35
|
+
* @returns The path to the directory where topic configurations should be written.
|
|
36
|
+
*/
|
|
37
|
+
getConfigurationsDirectory(context) {
|
|
38
|
+
return (context
|
|
39
|
+
.asConfiguration()
|
|
40
|
+
.get('google.pubSub.topicConfigurationsDirectory') ??
|
|
41
|
+
DEFAULT_TOPIC_CONFIGURATIONS_DIRECTORY);
|
|
42
|
+
}
|
|
43
|
+
async _call(context) {
|
|
44
|
+
const topicConfigurationsDirectory = this.getConfigurationsDirectory(context);
|
|
45
|
+
const absoluteDir = join(context.rootPath, topicConfigurationsDirectory);
|
|
46
|
+
await rm(absoluteDir, { recursive: true, force: true });
|
|
47
|
+
if (this.tearDown) {
|
|
48
|
+
context.logger.debug(`📫 Tore down Pub/Sub topic configurations directory '${absoluteDir}'.`);
|
|
49
|
+
return { configuration: {} };
|
|
50
|
+
}
|
|
51
|
+
context.logger.info('️📫 Listing and writing Pub/Sub topic configurations.');
|
|
52
|
+
const topics = await context.call(EventTopicList, {});
|
|
53
|
+
context.logger.debug(`📫 Writing configurations for Pub/Sub topics: ${topics
|
|
54
|
+
.map((d) => `'${d.id}'`)
|
|
55
|
+
.join(', ')}.`);
|
|
56
|
+
await mkdir(absoluteDir, { recursive: true });
|
|
57
|
+
await Promise.all(topics.map(async (topic) => {
|
|
58
|
+
const topicConfiguration = {
|
|
59
|
+
...topic,
|
|
60
|
+
bigQueryTableName: topic.id.replace(/[-\.]/g, '_'),
|
|
61
|
+
};
|
|
62
|
+
const topicFile = join(absoluteDir, `${topic.id}.json`);
|
|
63
|
+
await writeFile(topicFile, JSON.stringify(topicConfiguration));
|
|
64
|
+
}));
|
|
65
|
+
context.logger.debug(`️📫 Wrote Pub/Sub topic configurations in '${absoluteDir}'.`);
|
|
66
|
+
return {
|
|
67
|
+
configuration: {
|
|
68
|
+
google: { pubSub: { topicConfigurationsDirectory } },
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
_supports() {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
__decorate([
|
|
77
|
+
IsBoolean(),
|
|
78
|
+
AllowMissing(),
|
|
79
|
+
__metadata("design:type", Boolean)
|
|
80
|
+
], GooglePubSubWriteTopics.prototype, "tearDown", void 0);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProcessorResult, WorkspaceContext, WorkspaceFunction } from '@causa/workspace';
|
|
2
|
+
import { InfrastructureProcessor } from '@causa/workspace-core';
|
|
3
|
+
/**
|
|
4
|
+
* A function that uses {@link GoogleSpannerListDatabases} to find all the Spanner databases in the workspace, and
|
|
5
|
+
* writes their configurations to a directory.
|
|
6
|
+
* The `google.spanner.databaseConfigurationsDirectory` configuration can be used to specify the output location of the
|
|
7
|
+
* database configurations.
|
|
8
|
+
* This function returns a partial configuration, such that it can be used as a processor.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GoogleSpannerWriteDatabases extends WorkspaceFunction<Promise<ProcessorResult>> implements InfrastructureProcessor {
|
|
11
|
+
readonly tearDown?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the path to the directory where Spanner databases configurations should be written.
|
|
14
|
+
* It is either fetched from the workspace configuration, or the default value is used.
|
|
15
|
+
*
|
|
16
|
+
* @param context The {@link WorkspaceContext}.
|
|
17
|
+
* @returns The path to the directory where database configurations should be written.
|
|
18
|
+
*/
|
|
19
|
+
private getConfigurationsDirectory;
|
|
20
|
+
_call(context: WorkspaceContext): Promise<ProcessorResult>;
|
|
21
|
+
_supports(): boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { WorkspaceFunction, } from '@causa/workspace';
|
|
11
|
+
import { CAUSA_FOLDER } from '@causa/workspace/initialization';
|
|
12
|
+
import { AllowMissing } from '@causa/workspace/validation';
|
|
13
|
+
import { IsBoolean } from 'class-validator';
|
|
14
|
+
import { mkdir, rm, writeFile } from 'fs/promises';
|
|
15
|
+
import { join } from 'path';
|
|
16
|
+
import { GoogleSpannerListDatabases } from './google-spanner-list-databases.js';
|
|
17
|
+
/**
|
|
18
|
+
* The default directory where Spanner database configurations are written, relative to the workspace root.
|
|
19
|
+
*/
|
|
20
|
+
const DEFAULT_DATABASE_CONFIGURATIONS_DIRECTORY = join(CAUSA_FOLDER, 'spanner-databases');
|
|
21
|
+
/**
|
|
22
|
+
* A function that uses {@link GoogleSpannerListDatabases} to find all the Spanner databases in the workspace, and
|
|
23
|
+
* writes their configurations to a directory.
|
|
24
|
+
* The `google.spanner.databaseConfigurationsDirectory` configuration can be used to specify the output location of the
|
|
25
|
+
* database configurations.
|
|
26
|
+
* This function returns a partial configuration, such that it can be used as a processor.
|
|
27
|
+
*/
|
|
28
|
+
export class GoogleSpannerWriteDatabases extends WorkspaceFunction {
|
|
29
|
+
tearDown;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the path to the directory where Spanner databases configurations should be written.
|
|
32
|
+
* It is either fetched from the workspace configuration, or the default value is used.
|
|
33
|
+
*
|
|
34
|
+
* @param context The {@link WorkspaceContext}.
|
|
35
|
+
* @returns The path to the directory where database configurations should be written.
|
|
36
|
+
*/
|
|
37
|
+
getConfigurationsDirectory(context) {
|
|
38
|
+
return (context
|
|
39
|
+
.asConfiguration()
|
|
40
|
+
.get('google.spanner.databaseConfigurationsDirectory') ??
|
|
41
|
+
DEFAULT_DATABASE_CONFIGURATIONS_DIRECTORY);
|
|
42
|
+
}
|
|
43
|
+
async _call(context) {
|
|
44
|
+
const databaseConfigurationsDirectory = this.getConfigurationsDirectory(context);
|
|
45
|
+
const absoluteDir = join(context.rootPath, databaseConfigurationsDirectory);
|
|
46
|
+
await rm(absoluteDir, { recursive: true, force: true });
|
|
47
|
+
if (this.tearDown) {
|
|
48
|
+
context.logger.debug(`️🗃️ Tore down Spanner database configurations directory '${absoluteDir}'.`);
|
|
49
|
+
return { configuration: {} };
|
|
50
|
+
}
|
|
51
|
+
context.logger.info('🗃️ Listing and writing Spanner database configurations.');
|
|
52
|
+
const databases = await context.call(GoogleSpannerListDatabases, {});
|
|
53
|
+
await mkdir(absoluteDir, { recursive: true });
|
|
54
|
+
context.logger.debug(`🗃️ Writing configurations for Spanner databases: ${databases
|
|
55
|
+
.map((d) => `'${d.id}'`)
|
|
56
|
+
.join(', ')}.`);
|
|
57
|
+
await Promise.all(databases.map((database) => writeFile(join(absoluteDir, `${database.id}.json`), JSON.stringify(database))));
|
|
58
|
+
context.logger.debug(`🗃️ Wrote Spanner database configurations in '${absoluteDir}'.`);
|
|
59
|
+
return {
|
|
60
|
+
configuration: {
|
|
61
|
+
google: { spanner: { databaseConfigurationsDirectory } },
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
_supports() {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
__decorate([
|
|
70
|
+
IsBoolean(),
|
|
71
|
+
AllowMissing(),
|
|
72
|
+
__metadata("design:type", Boolean)
|
|
73
|
+
], GoogleSpannerWriteDatabases.prototype, "tearDown", void 0);
|
package/dist/functions/index.js
CHANGED
|
@@ -13,12 +13,14 @@ import { GoogleFirebaseStorageMergeRules } from './google-firebase-storage-merge
|
|
|
13
13
|
import { GoogleFirestoreMergeRules } from './google-firestore-merge-rules.js';
|
|
14
14
|
import { GoogleIdentityPlatformGenerateCustomToken } from './google-identity-platform-generate-custom-token.js';
|
|
15
15
|
import { GoogleIdentityPlatformGenerateToken } from './google-identity-platform-generate-token.js';
|
|
16
|
+
import { GooglePubSubWriteTopics } from './google-pubsub-write-topics.js';
|
|
16
17
|
import { GoogleServicesEnable } from './google-services-enable.js';
|
|
17
18
|
import { GoogleSpannerListDatabases } from './google-spanner-list-databases.js';
|
|
19
|
+
import { GoogleSpannerWriteDatabases } from './google-spanner-write-databases.js';
|
|
18
20
|
import { ProjectGetArtefactDestinationForCloudFunctions } from './project-get-artefact-destination-cloud-functions.js';
|
|
19
21
|
import { ProjectGetArtefactDestinationForCloudRun } from './project-get-artefact-destination-cloud-run.js';
|
|
20
22
|
import { ProjectPushArtefactForCloudFunctions } from './project-push-artefact-cloud-functions.js';
|
|
21
23
|
import { SecretFetchForGoogleSecretManager } from './secret-fetch-secret-manager.js';
|
|
22
24
|
export function registerFunctions(context) {
|
|
23
|
-
context.registerFunctionImplementations(EmulatorStartForFirebaseStorage, EmulatorStartForFirestore, EmulatorStartForIdentityPlatform, EmulatorStartForPubSub, EmulatorStartForSpanner, EmulatorStopForFirebaseStorage, EmulatorStopForFirestore, EmulatorStopForIdentityPlatform, EmulatorStopForPubSub, EmulatorStopForSpanner, GoogleAppCheckGenerateToken, GoogleFirebaseStorageMergeRules, GoogleFirestoreMergeRules, GoogleIdentityPlatformGenerateCustomToken, GoogleIdentityPlatformGenerateToken, GoogleServicesEnable, GoogleSpannerListDatabases, ProjectGetArtefactDestinationForCloudFunctions, ProjectGetArtefactDestinationForCloudRun, ProjectPushArtefactForCloudFunctions, SecretFetchForGoogleSecretManager);
|
|
25
|
+
context.registerFunctionImplementations(EmulatorStartForFirebaseStorage, EmulatorStartForFirestore, EmulatorStartForIdentityPlatform, EmulatorStartForPubSub, EmulatorStartForSpanner, EmulatorStopForFirebaseStorage, EmulatorStopForFirestore, EmulatorStopForIdentityPlatform, EmulatorStopForPubSub, EmulatorStopForSpanner, GoogleAppCheckGenerateToken, GoogleFirebaseStorageMergeRules, GoogleFirestoreMergeRules, GoogleIdentityPlatformGenerateCustomToken, GoogleIdentityPlatformGenerateToken, GooglePubSubWriteTopics, GoogleServicesEnable, GoogleSpannerListDatabases, GoogleSpannerWriteDatabases, ProjectGetArtefactDestinationForCloudFunctions, ProjectGetArtefactDestinationForCloudRun, ProjectPushArtefactForCloudFunctions, SecretFetchForGoogleSecretManager);
|
|
24
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@causa/workspace-google",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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",
|
|
@@ -30,38 +30,38 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@causa/cli": ">= 0.4.0 < 1.0.0",
|
|
33
|
-
"@causa/workspace": ">= 0.
|
|
34
|
-
"@causa/workspace-core": ">= 0.
|
|
33
|
+
"@causa/workspace": ">= 0.12.0 < 1.0.0",
|
|
34
|
+
"@causa/workspace-core": ">= 0.8.0 < 1.0.0",
|
|
35
35
|
"@google-cloud/apikeys": "^0.2.2",
|
|
36
36
|
"@google-cloud/iam-credentials": "^2.0.4",
|
|
37
|
-
"@google-cloud/pubsub": "^3.7.
|
|
37
|
+
"@google-cloud/pubsub": "^3.7.3",
|
|
38
38
|
"@google-cloud/secret-manager": "^4.2.2",
|
|
39
39
|
"@google-cloud/service-usage": "^2.2.2",
|
|
40
|
-
"@google-cloud/spanner": "^6.
|
|
41
|
-
"@google-cloud/storage": "^6.
|
|
40
|
+
"@google-cloud/spanner": "^6.14.0",
|
|
41
|
+
"@google-cloud/storage": "^6.12.0",
|
|
42
|
+
"@grpc/grpc-js": "^1.8.20",
|
|
42
43
|
"class-validator": "^0.14.0",
|
|
43
|
-
"firebase": "^
|
|
44
|
-
"firebase-admin": "^11.
|
|
45
|
-
"globby": "^13.
|
|
46
|
-
"
|
|
47
|
-
"googleapis": "^118.0.0",
|
|
44
|
+
"firebase": "^10.1.0",
|
|
45
|
+
"firebase-admin": "^11.10.1",
|
|
46
|
+
"globby": "^13.2.2",
|
|
47
|
+
"googleapis": "^123.0.0",
|
|
48
48
|
"uuid": "^9.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@tsconfig/node18": "^2.0
|
|
52
|
-
"@types/jest": "^29.5.
|
|
53
|
-
"@types/node": "^18.
|
|
51
|
+
"@tsconfig/node18": "^18.2.0",
|
|
52
|
+
"@types/jest": "^29.5.3",
|
|
53
|
+
"@types/node": "^18.17.1",
|
|
54
54
|
"@types/uuid": "^9.0.2",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
|
56
56
|
"copyfiles": "^2.4.1",
|
|
57
|
-
"eslint": "^8.
|
|
57
|
+
"eslint": "^8.45.0",
|
|
58
58
|
"eslint-config-prettier": "^8.8.0",
|
|
59
|
-
"eslint-plugin-prettier": "^
|
|
60
|
-
"jest": "^29.
|
|
59
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
60
|
+
"jest": "^29.6.1",
|
|
61
61
|
"jest-extended": "^4.0.0",
|
|
62
62
|
"rimraf": "^5.0.1",
|
|
63
|
-
"ts-jest": "^29.1.
|
|
63
|
+
"ts-jest": "^29.1.1",
|
|
64
64
|
"ts-node": "^10.9.1",
|
|
65
|
-
"typescript": "^5.1.
|
|
65
|
+
"typescript": "^5.1.6"
|
|
66
66
|
}
|
|
67
67
|
}
|