@causa/workspace-google 0.12.2 → 0.13.0-rc.1

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 (92) hide show
  1. package/dist/backfilling/bigquery.d.ts +1 -1
  2. package/dist/backfilling/pubsub.d.ts +1 -1
  3. package/dist/backfilling/pubsub.js +1 -1
  4. package/dist/code-generation/google-firestore-renderer.d.ts +1 -1
  5. package/dist/code-generation/google-firestore-renderer.js +7 -8
  6. package/dist/code-generation/google-spanner-renderer.d.ts +1 -1
  7. package/dist/code-generation/google-spanner-renderer.js +5 -6
  8. package/dist/code-generation/utils.d.ts +2 -2
  9. package/dist/code-generation/utils.js +1 -1
  10. package/dist/configurations/generated.d.ts +725 -0
  11. package/dist/configurations/generated.js +1311 -0
  12. package/dist/configurations/index.d.ts +1 -1
  13. package/dist/configurations/index.js +1 -0
  14. package/dist/configurations/schemas/google.yaml +466 -0
  15. package/dist/configurations/schemas/service-container-cloud-run.yaml +197 -0
  16. package/dist/functions/causa/index.d.ts +1 -0
  17. package/dist/functions/causa/index.js +1 -0
  18. package/dist/functions/causa/list-schemas.d.ts +9 -0
  19. package/dist/functions/causa/list-schemas.js +23 -0
  20. package/dist/functions/emulator/start-firebase-storage.js +1 -1
  21. package/dist/functions/emulator/start-firestore.js +1 -1
  22. package/dist/functions/emulator/start-identity-platform.js +1 -1
  23. package/dist/functions/emulator/start-pubsub.call.d.ts +4 -0
  24. package/dist/functions/emulator/start-pubsub.call.js +57 -0
  25. package/dist/functions/emulator/start-pubsub.d.ts +0 -22
  26. package/dist/functions/emulator/start-pubsub.js +4 -75
  27. package/dist/functions/emulator/start-spanner.call.d.ts +4 -0
  28. package/dist/functions/emulator/start-spanner.call.js +92 -0
  29. package/dist/functions/emulator/start-spanner.d.ts +0 -38
  30. package/dist/functions/emulator/start-spanner.js +4 -124
  31. package/dist/functions/emulator/stop-firebase-storage.js +2 -1
  32. package/dist/functions/emulator/stop-firestore.js +2 -1
  33. package/dist/functions/emulator/stop-identity-platform.js +2 -1
  34. package/dist/functions/emulator/stop-pubsub.js +2 -1
  35. package/dist/functions/emulator/stop-spanner.js +2 -1
  36. package/dist/functions/event-topic/broker-create-topic-pubsub.call.d.ts +3 -0
  37. package/dist/functions/event-topic/broker-create-topic-pubsub.call.js +15 -0
  38. package/dist/functions/event-topic/broker-create-topic-pubsub.js +2 -14
  39. package/dist/functions/event-topic/broker-create-trigger-cloud-run.call.d.ts +3 -0
  40. package/dist/functions/event-topic/broker-create-trigger-cloud-run.call.js +24 -0
  41. package/dist/functions/event-topic/broker-create-trigger-cloud-run.js +2 -19
  42. package/dist/functions/event-topic/broker-delete-topic-pubsub.call.d.ts +3 -0
  43. package/dist/functions/event-topic/broker-delete-topic-pubsub.call.js +15 -0
  44. package/dist/functions/event-topic/broker-delete-topic-pubsub.js +2 -14
  45. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-invoker-role.call.d.ts +3 -0
  46. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-invoker-role.call.js +16 -0
  47. package/dist/functions/event-topic/broker-delete-trigger-resource-cloud-run-invoker-role.js +2 -11
  48. package/dist/functions/event-topic/broker-delete-trigger-resource-pubsub-subscription.call.d.ts +3 -0
  49. package/dist/functions/event-topic/broker-delete-trigger-resource-pubsub-subscription.call.js +16 -0
  50. package/dist/functions/event-topic/broker-delete-trigger-resource-pubsub-subscription.js +2 -18
  51. package/dist/functions/event-topic/broker-delete-trigger-resource-service-account.call.d.ts +3 -0
  52. package/dist/functions/event-topic/broker-delete-trigger-resource-service-account.call.js +15 -0
  53. package/dist/functions/event-topic/broker-delete-trigger-resource-service-account.js +2 -14
  54. package/dist/functions/event-topic/broker-publish-events-google.call.d.ts +3 -0
  55. package/dist/functions/event-topic/broker-publish-events-google.call.js +29 -0
  56. package/dist/functions/event-topic/broker-publish-events-google.d.ts +0 -7
  57. package/dist/functions/event-topic/broker-publish-events-google.js +3 -34
  58. package/dist/functions/google-app-check/generate-token.call.d.ts +3 -0
  59. package/dist/functions/google-app-check/generate-token.call.js +17 -0
  60. package/dist/functions/google-app-check/generate-token.js +2 -16
  61. package/dist/functions/google-identity-platform/generate-custom-token.call.d.ts +3 -0
  62. package/dist/functions/google-identity-platform/generate-custom-token.call.js +8 -0
  63. package/dist/functions/google-identity-platform/generate-custom-token.js +2 -7
  64. package/dist/functions/google-identity-platform/generate-token.call.d.ts +3 -0
  65. package/dist/functions/google-identity-platform/generate-token.call.js +13 -0
  66. package/dist/functions/google-identity-platform/generate-token.js +2 -12
  67. package/dist/functions/google-services/enable.call.d.ts +7 -0
  68. package/dist/functions/google-services/enable.call.js +35 -0
  69. package/dist/functions/google-services/enable.js +2 -34
  70. package/dist/functions/index.js +2 -1
  71. package/dist/functions/project/push-artefact-cloud-functions.call.d.ts +3 -0
  72. package/dist/functions/project/push-artefact-cloud-functions.call.js +19 -0
  73. package/dist/functions/project/push-artefact-cloud-functions.js +3 -18
  74. package/dist/functions/secret/fetch-access-token.call.d.ts +3 -0
  75. package/dist/functions/secret/fetch-access-token.call.js +10 -0
  76. package/dist/functions/secret/fetch-access-token.js +2 -8
  77. package/dist/functions/secret/fetch-secret-manager.call.d.ts +3 -0
  78. package/dist/functions/secret/fetch-secret-manager.call.js +32 -0
  79. package/dist/functions/secret/fetch-secret-manager.js +2 -29
  80. package/dist/functions/typescript/get-decorator-renderer-google-firestore.d.ts +3 -3
  81. package/dist/functions/typescript/get-decorator-renderer-google-firestore.js +4 -4
  82. package/dist/functions/typescript/get-decorator-renderer-google-spanner.d.ts +3 -3
  83. package/dist/functions/typescript/get-decorator-renderer-google-spanner.js +4 -4
  84. package/dist/index.d.ts +1 -2
  85. package/dist/index.js +1 -2
  86. package/dist/services/firebase-emulator.d.ts +1 -1
  87. package/dist/services/firebase-emulator.js +1 -1
  88. package/dist/services/gcloud-emulator.d.ts +1 -1
  89. package/dist/services/gcloud-emulator.js +1 -1
  90. package/package.json +14 -11
  91. package/dist/configurations/google.d.ts +0 -305
  92. package/dist/configurations/google.js +0 -1
@@ -1,7 +1,5 @@
1
- import { WorkspaceContext } from '@causa/workspace';
2
- import { ArtefactAlreadyExistsError, ProjectPushArtefact, } from '@causa/workspace-core';
3
- import { rm } from 'fs/promises';
4
- import { CloudStorageService } from '../../services/index.js';
1
+ import { callDeferred, WorkspaceContext } from '@causa/workspace';
2
+ import { ProjectPushArtefact, } from '@causa/workspace-core';
5
3
  /**
6
4
  * Implements the {@link ProjectPushArtefact} function for Cloud Functions projects.
7
5
  * This copies the local archive of the Cloud Functions project to the Google Cloud Storage URI set in
@@ -9,20 +7,7 @@ import { CloudStorageService } from '../../services/index.js';
9
7
  */
10
8
  export class ProjectPushArtefactForCloudFunctions extends ProjectPushArtefact {
11
9
  async _call(context) {
12
- context.logger.info(`🚚 Pushing Cloud Functions archive to Cloud Storage.`);
13
- const storageService = context.service(CloudStorageService);
14
- const destination = storageService.getFileFromGsUri(this.destination);
15
- if (!this.overwrite) {
16
- const [exists] = await destination.exists();
17
- if (exists) {
18
- throw new ArtefactAlreadyExistsError(this.destination);
19
- }
20
- }
21
- await destination.bucket.upload(this.artefact, { destination });
22
- context.logger.info(`🚚 Successfully pushed archive to '${this.destination}'.`);
23
- context.logger.debug(`🔥 Removing local artefact '${this.artefact}'.`);
24
- await rm(this.artefact);
25
- return this.destination;
10
+ return await callDeferred(this, context, import.meta.url);
26
11
  }
27
12
  _supports(context) {
28
13
  const conf = context.asConfiguration();
@@ -0,0 +1,3 @@
1
+ import type { WorkspaceContext } from '@causa/workspace';
2
+ import { type SecretFetchForGoogleAccessToken } from './fetch-access-token.js';
3
+ export default function call(this: SecretFetchForGoogleAccessToken, context: WorkspaceContext): Promise<string>;
@@ -0,0 +1,10 @@
1
+ import { GoogleApisService } from '../../services/google-apis.js';
2
+ import { AuthClientResponseError, } from './fetch-access-token.js';
3
+ export default async function call(context) {
4
+ const authClient = await context.service(GoogleApisService).getAuthClient();
5
+ const { token } = await authClient.getAccessToken();
6
+ if (!token) {
7
+ throw new AuthClientResponseError();
8
+ }
9
+ return token;
10
+ }
@@ -1,5 +1,4 @@
1
- import { SecretFetch, WorkspaceContext } from '@causa/workspace';
2
- import { GoogleApisService } from '../../services/index.js';
1
+ import { callDeferred, SecretFetch, WorkspaceContext } from '@causa/workspace';
3
2
  /**
4
3
  * An error thrown when the auth client does not return a token.
5
4
  */
@@ -17,12 +16,7 @@ export class AuthClientResponseError extends Error {
17
16
  */
18
17
  export class SecretFetchForGoogleAccessToken extends SecretFetch {
19
18
  async _call(context) {
20
- const authClient = await context.service(GoogleApisService).getAuthClient();
21
- const { token } = await authClient.getAccessToken();
22
- if (!token) {
23
- throw new AuthClientResponseError();
24
- }
25
- return token;
19
+ return await callDeferred(this, context, import.meta.url);
26
20
  }
27
21
  _supports() {
28
22
  return this.backend === 'google.accessToken';
@@ -0,0 +1,3 @@
1
+ import { type WorkspaceContext } from '@causa/workspace';
2
+ import { type SecretFetchForGoogleSecretManager } from './fetch-secret-manager.js';
3
+ export default function call(this: SecretFetchForGoogleSecretManager, context: WorkspaceContext): Promise<string>;
@@ -0,0 +1,32 @@
1
+ import { InvalidSecretDefinitionError, } from '@causa/workspace';
2
+ import { GoogleSecretManagerService } from '../../services/secret-manager.js';
3
+ import { UndefinedDefaultGcpProjectError, UnexpectedSecretValueError, } from './fetch-secret-manager.js';
4
+ /**
5
+ * The regular expression used to match the (Secret Manager) secret ID/name, and possibly its version and project.
6
+ * [projects/<projectId>/secrets]<secretName>[/versions/<version>]
7
+ */
8
+ const SECRET_ID_REGEX = /^(?:projects\/(?<projectId>[\w-]+)\/secrets\/)?(?<secretName>[\w-]+)(?:\/versions\/(?<version>(\d+|latest)))?$/;
9
+ export default async function call(context) {
10
+ const id = this.configuration.id;
11
+ if (!id) {
12
+ throw new InvalidSecretDefinitionError(`Missing 'id' field that should reference the secret.`);
13
+ }
14
+ const match = id.match(SECRET_ID_REGEX);
15
+ const secretName = match?.groups?.secretName;
16
+ if (!secretName) {
17
+ throw new InvalidSecretDefinitionError(`Failed to parse secret reference '${id}'.`);
18
+ }
19
+ const { client, defaultProject } = context.service(GoogleSecretManagerService);
20
+ const project = match?.groups?.projectId ?? defaultProject;
21
+ const version = match?.groups?.version ?? 'latest';
22
+ if (!project) {
23
+ throw new UndefinedDefaultGcpProjectError();
24
+ }
25
+ const name = client.secretVersionPath(project, secretName, version);
26
+ const [value] = await client.accessSecretVersion({ name });
27
+ const bufferData = value.payload?.data;
28
+ if (!bufferData || typeof bufferData !== 'object') {
29
+ throw new UnexpectedSecretValueError();
30
+ }
31
+ return bufferData.toString();
32
+ }
@@ -1,10 +1,4 @@
1
- import { InvalidSecretDefinitionError, SecretFetch, WorkspaceContext, } from '@causa/workspace';
2
- import { GoogleSecretManagerService } from '../../services/index.js';
3
- /**
4
- * The regular expression used to match the (Secret Manager) secret ID/name, and possibly its version and project.
5
- * [projects/<projectId>/secrets]<secretName>[/versions/<version>]
6
- */
7
- const SECRET_ID_REGEX = /^(?:projects\/(?<projectId>[\w-]+)\/secrets\/)?(?<secretName>[\w-]+)(?:\/versions\/(?<version>(\d+|latest)))?$/;
1
+ import { callDeferred, SecretFetch, WorkspaceContext } from '@causa/workspace';
8
2
  /**
9
3
  * An error thrown when the default GCP project is needed to look up a secret but it has not been defined.
10
4
  */
@@ -39,28 +33,7 @@ export class UnexpectedSecretValueError extends Error {
39
33
  */
40
34
  export class SecretFetchForGoogleSecretManager extends SecretFetch {
41
35
  async _call(context) {
42
- const id = this.configuration.id;
43
- if (!id) {
44
- throw new InvalidSecretDefinitionError(`Missing 'id' field that should reference the secret.`);
45
- }
46
- const match = id.match(SECRET_ID_REGEX);
47
- const secretName = match?.groups?.secretName;
48
- if (!secretName) {
49
- throw new InvalidSecretDefinitionError(`Failed to parse secret reference '${id}'.`);
50
- }
51
- const { client, defaultProject } = context.service(GoogleSecretManagerService);
52
- const project = match?.groups?.projectId ?? defaultProject;
53
- const version = match?.groups?.version ?? 'latest';
54
- if (!project) {
55
- throw new UndefinedDefaultGcpProjectError();
56
- }
57
- const name = client.secretVersionPath(project, secretName, version);
58
- const [value] = await client.accessSecretVersion({ name });
59
- const bufferData = value.payload?.data;
60
- if (!bufferData || typeof bufferData !== 'object') {
61
- throw new UnexpectedSecretValueError();
62
- }
63
- return bufferData.toString();
36
+ return await callDeferred(this, context, import.meta.url);
64
37
  }
65
38
  _supports() {
66
39
  return this.backend === 'google.secretManager';
@@ -1,9 +1,9 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { TypeScriptGetDecoratorRenderer, TypeScriptWithDecoratorsRenderer } from '@causa/workspace-typescript';
2
+ import { TypeScriptGetDecoratorRenderer, type TypeScriptWithDecoratorsRendererType } from '@causa/workspace-typescript';
3
3
  /**
4
- * Implements {@link TypeScriptGetDecoratorRenderer} for the {@link GoogleFirestoreRenderer}.
4
+ * Implements {@link TypeScriptGetDecoratorRenderer} for the `GoogleFirestoreRenderer`.
5
5
  */
6
6
  export declare class TypeScriptGetDecoratorRendererForGoogleFirestore extends TypeScriptGetDecoratorRenderer {
7
- _call(): new (...args: any[]) => TypeScriptWithDecoratorsRenderer;
7
+ _call(): Promise<TypeScriptWithDecoratorsRendererType>;
8
8
  _supports(context: WorkspaceContext): boolean;
9
9
  }
@@ -1,11 +1,11 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { TypeScriptGetDecoratorRenderer, TypeScriptWithDecoratorsRenderer, } from '@causa/workspace-typescript';
3
- import { GoogleFirestoreRenderer } from '../../code-generation/index.js';
2
+ import { TypeScriptGetDecoratorRenderer, } from '@causa/workspace-typescript';
4
3
  /**
5
- * Implements {@link TypeScriptGetDecoratorRenderer} for the {@link GoogleFirestoreRenderer}.
4
+ * Implements {@link TypeScriptGetDecoratorRenderer} for the `GoogleFirestoreRenderer`.
6
5
  */
7
6
  export class TypeScriptGetDecoratorRendererForGoogleFirestore extends TypeScriptGetDecoratorRenderer {
8
- _call() {
7
+ async _call() {
8
+ const { GoogleFirestoreRenderer } = await import('../../code-generation/index.js');
9
9
  return GoogleFirestoreRenderer;
10
10
  }
11
11
  _supports(context) {
@@ -1,9 +1,9 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { TypeScriptGetDecoratorRenderer, TypeScriptWithDecoratorsRenderer } from '@causa/workspace-typescript';
2
+ import { TypeScriptGetDecoratorRenderer, type TypeScriptWithDecoratorsRendererType } from '@causa/workspace-typescript';
3
3
  /**
4
- * Implements {@link TypeScriptGetDecoratorRenderer} for the {@link GoogleSpannerRenderer}.
4
+ * Implements {@link TypeScriptGetDecoratorRenderer} for the `GoogleSpannerRenderer`.
5
5
  */
6
6
  export declare class TypeScriptGetDecoratorRendererForGoogleSpanner extends TypeScriptGetDecoratorRenderer {
7
- _call(): new (...args: any[]) => TypeScriptWithDecoratorsRenderer;
7
+ _call(): Promise<TypeScriptWithDecoratorsRendererType>;
8
8
  _supports(context: WorkspaceContext): boolean;
9
9
  }
@@ -1,11 +1,11 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { TypeScriptGetDecoratorRenderer, TypeScriptWithDecoratorsRenderer, } from '@causa/workspace-typescript';
3
- import { GoogleSpannerRenderer } from '../../code-generation/index.js';
2
+ import { TypeScriptGetDecoratorRenderer, } from '@causa/workspace-typescript';
4
3
  /**
5
- * Implements {@link TypeScriptGetDecoratorRenderer} for the {@link GoogleSpannerRenderer}.
4
+ * Implements {@link TypeScriptGetDecoratorRenderer} for the `GoogleSpannerRenderer`.
6
5
  */
7
6
  export class TypeScriptGetDecoratorRendererForGoogleSpanner extends TypeScriptGetDecoratorRenderer {
8
- _call() {
7
+ async _call() {
8
+ const { GoogleSpannerRenderer } = await import('../../code-generation/index.js');
9
9
  return GoogleSpannerRenderer;
10
10
  }
11
11
  _supports(context) {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { ModuleRegistrationFunction } from '@causa/workspace';
2
- export * from './configurations/index.js';
3
- export * from './services/index.js';
4
2
  declare const registerModule: ModuleRegistrationFunction;
3
+ export * from './configurations/index.js';
5
4
  export default registerModule;
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { registerFunctions } from './functions/index.js';
2
- export * from './configurations/index.js';
3
- export * from './services/index.js';
4
2
  const registerModule = async (context) => {
5
3
  registerFunctions(context);
6
4
  };
5
+ export * from './configurations/index.js';
7
6
  export default registerModule;
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { type DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core';
2
+ import { type DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core/services';
3
3
  /**
4
4
  * Options when starting a Firebase emulator.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { DockerEmulatorService, } from '@causa/workspace-core';
2
+ import { DockerEmulatorService, } from '@causa/workspace-core/services';
3
3
  import { getLocalGcpProject, } from '../configurations/index.js';
4
4
  /**
5
5
  * The Docker image providing the `firebase` CLI.
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { type DockerContainerMount, type DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core';
2
+ import { type DockerContainerMount, type DockerContainerPublish, DockerEmulatorService } from '@causa/workspace-core/services';
3
3
  /**
4
4
  * Options when specifying an availability endpoint when starting an emulator.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceContext } from '@causa/workspace';
2
- import { DockerEmulatorService, } from '@causa/workspace-core';
2
+ import { DockerEmulatorService, } from '@causa/workspace-core/services';
3
3
  import { getLocalGcpProject, } from '../configurations/index.js';
4
4
  /**
5
5
  * The URI for the Dockerized `gcloud` command, provided by Google.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causa/workspace-google",
3
- "version": "0.12.2",
3
+ "version": "0.13.0-rc.1",
4
4
  "description": "The Causa workspace module providing many functionalities related to GCP and its services.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,8 @@
14
14
  "main": "dist/index.js",
15
15
  "types": "dist/index.d.ts",
16
16
  "exports": {
17
- ".": "./dist/index.js"
17
+ ".": "./dist/index.js",
18
+ "./services": "./dist/services/index.js"
18
19
  },
19
20
  "files": [
20
21
  "dist/",
@@ -25,17 +26,19 @@
25
26
  "scripts": {
26
27
  "prebuild": "rimraf ./dist",
27
28
  "build": "tsc -p tsconfig.build.json",
28
- "postbuild": "copyfiles -u 1 src/**/assets/**/* dist/",
29
+ "postbuild": "copyfiles -u 1 src/**/assets/**/* dist/ && node transform-schemas.mjs",
29
30
  "format": "prettier --write \"src/**/*.ts\"",
30
31
  "lint": "eslint \"src/**/*.ts\"",
31
32
  "test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings=ExperimentalWarning\" jest",
32
- "test:cov": "npm run test -- --coverage"
33
+ "test:cov": "npm run test -- --coverage",
34
+ "typecheck": "tsc --noEmit",
35
+ "generateConfigurationSchemas": "cs model genCode && perl -pi -e 's|\\@causa/runtime|\\@causa/workspace/validation|g' src/configurations/generated.ts"
33
36
  },
34
37
  "dependencies": {
35
- "@causa/cli": ">= 0.6.4 < 1.0.0",
36
- "@causa/workspace": ">= 0.19.2 < 1.0.0",
37
- "@causa/workspace-core": ">= 0.26.0 < 1.0.0",
38
- "@causa/workspace-typescript": ">= 0.16.0 < 1.0.0",
38
+ "@causa/cli": ">= 0.6.5 < 1.0.0",
39
+ "@causa/workspace": ">= 0.22.0 < 1.0.0",
40
+ "@causa/workspace-core": ">= 0.27.0-rc.1 < 1.0.0",
41
+ "@causa/workspace-typescript": ">= 0.17.0-rc.1 < 1.0.0",
39
42
  "@google-cloud/apikeys": "^2.2.1",
40
43
  "@google-cloud/bigquery": "^8.1.1",
41
44
  "@google-cloud/iam-credentials": "^4.2.1",
@@ -54,7 +57,7 @@
54
57
  "google-gax": "5.0.6",
55
58
  "googleapis": "^171.4.0",
56
59
  "micromatch": "^4.0.8",
57
- "pino": "^10.3.0",
60
+ "pino": "^10.3.1",
58
61
  "quicktype-core": "^23.2.6"
59
62
  },
60
63
  "devDependencies": {
@@ -63,7 +66,7 @@
63
66
  "@tsconfig/node20": "^20.1.9",
64
67
  "@types/jest": "^30.0.0",
65
68
  "@types/micromatch": "^4.0.10",
66
- "@types/node": "^22.19.9",
69
+ "@types/node": "^22.19.10",
67
70
  "copyfiles": "^2.4.1",
68
71
  "eslint": "^9.39.2",
69
72
  "eslint-config-prettier": "^10.1.8",
@@ -73,6 +76,6 @@
73
76
  "rimraf": "^6.1.2",
74
77
  "ts-node": "^10.9.2",
75
78
  "typescript": "^5.9.3",
76
- "typescript-eslint": "^8.54.0"
79
+ "typescript-eslint": "^8.55.0"
77
80
  }
78
81
  }
@@ -1,305 +0,0 @@
1
- /**
2
- * The schema for Google / GCP configuration.
3
- */
4
- export type GoogleConfiguration = {
5
- /**
6
- * Configuration for everything Google / GCP-related.
7
- */
8
- readonly google?: {
9
- /**
10
- * The ID of the default GCP project used when performing operations.
11
- */
12
- readonly project?: string;
13
- /**
14
- * The GCP region in which resource should be created and managed.
15
- */
16
- readonly region?: string;
17
- /**
18
- * The ID of a local GCP project (which does not exist on GCP).
19
- * This is for example used by emulators. It should usually start with `demo-` to be compatible with some emulators.
20
- */
21
- readonly localProject?: string;
22
- /**
23
- * The list of GCP services on which the project depends.
24
- * This is useful to automatically enable those services in the GCP project.
25
- */
26
- readonly services?: string[];
27
- /**
28
- * Configuration for the `gcloud` command.
29
- * This applies to Dockerized calls to `gcloud` using the official `gcloud` Docker image.
30
- */
31
- readonly gcloud?: {
32
- /**
33
- * The version of the `gcloud` command.
34
- */
35
- readonly version?: string;
36
- };
37
- /**
38
- * Configuration for the Firebase project.
39
- */
40
- readonly firebase?: {
41
- /**
42
- * An existing service account that can be used to sign Identity Platform custom token.
43
- * Generating custom tokens by signing them using end-user credentials does not work with Identity Platform.
44
- * A good choice is usually the service account automatically created by Firebase:
45
- * `firebase-adminsdk-<random ID>@<GCP project>.iam.gserviceaccount.com`
46
- * If this is not set and is needed by an operation, an attempt will be made to find this service account in the
47
- * current `google.project`.
48
- */
49
- readonly adminServiceAccount?: string;
50
- /**
51
- * The Firebase API key used by clients. Used to perform requests to Firebase as an end user.
52
- * This can be found in the GCP or Firebase Console.
53
- * If this is not set and is needed by an operation, an attempt will be made to find the key automatically using
54
- * the API.
55
- */
56
- readonly apiKey?: string;
57
- /**
58
- * The Firebase app ID used by clients.
59
- * This can be found in the Firebase Console. Each platform (Android, iOS, Web) has its own app ID.
60
- * If this is not set and is needed by an operation, an attempt will be made to find the first eligible app ID
61
- * using the Firebase API.
62
- */
63
- readonly appId?: string;
64
- /**
65
- * The domain name for the project.
66
- * If not set, this default to `<GCP project>.firebaseapp.com`.
67
- */
68
- readonly authDomain?: string;
69
- /**
70
- * Configuration for Firebase tools (the CLI).
71
- * This applies to Dockerized calls to the `firebase` CLI.
72
- */
73
- readonly tools?: {
74
- /**
75
- * The version of the CLI to use.
76
- */
77
- readonly version?: string;
78
- };
79
- };
80
- /**
81
- * Configuration for the Secret Manager service.
82
- */
83
- readonly secretManager?: {
84
- /**
85
- * The ID of the default GCP project referenced when fetching secrets.
86
- */
87
- readonly project?: string;
88
- };
89
- /**
90
- * Configuration for the Firebase Storage service.
91
- */
92
- readonly firebaseStorage?: {
93
- /**
94
- * Configuration for the emulator.
95
- */
96
- readonly emulator?: {
97
- /**
98
- * The name of the local Docker container running the emulator.
99
- */
100
- readonly containerName?: string;
101
- };
102
- /**
103
- * A list of glob patterns to find files in the workspace defining Firebase Storage security rules.
104
- */
105
- readonly securityRuleFiles?: string[];
106
- /**
107
- * The file path, relative to the workspace root, where the merged security rules file is written.
108
- */
109
- readonly securityRuleFile?: string;
110
- };
111
- /**
112
- * Configuration for the Identity Platform (formerly Firebase Auth) service.
113
- */
114
- readonly identityPlatform?: {
115
- /**
116
- * Configuration for the emulator.
117
- */
118
- readonly emulator?: {
119
- /**
120
- * The name of the local Docker container running the emulator.
121
- */
122
- readonly containerName?: string;
123
- };
124
- };
125
- /**
126
- * Configuration for the Firestore service.
127
- */
128
- readonly firestore?: {
129
- /**
130
- * Configuration for the emulator.
131
- */
132
- readonly emulator?: {
133
- /**
134
- * The name of the local Docker container running the emulator.
135
- */
136
- readonly containerName?: string;
137
- };
138
- /**
139
- * A list of glob patterns to find files in the workspace defining Firestore security rules.
140
- */
141
- readonly securityRuleFiles?: string[];
142
- /**
143
- * The file path, relative to the workspace root, where the merged security rules file is written.
144
- */
145
- readonly securityRuleFile?: string;
146
- };
147
- /**
148
- * Configuration for the Pub/Sub service.
149
- */
150
- readonly pubSub?: {
151
- /**
152
- * Configuration for the emulator.
153
- */
154
- readonly emulator?: {
155
- /**
156
- * The name of the local Docker container running the emulator.
157
- */
158
- readonly containerName?: string;
159
- };
160
- /**
161
- * The directory where the topic configuration files are written by the `GooglePubSubWriteTopics` processor.
162
- */
163
- readonly topicConfigurationsDirectory?: string;
164
- /**
165
- * Configuration for the storage of Pub/Sub events in BigQuery.
166
- */
167
- readonly bigQueryStorage?: {
168
- /**
169
- * The ID of the BigQuery dataset where raw Pub/Sub events should be stored.
170
- */
171
- readonly rawEventsDatasetId?: string;
172
- /**
173
- * The BigQuery location for the datasets.
174
- * See https://cloud.google.com/bigquery/docs/locations for more details.
175
- */
176
- readonly location?: string;
177
- };
178
- };
179
- /**
180
- * Configuration for the Spanner service.
181
- */
182
- readonly spanner?: {
183
- /**
184
- * Configuration for the emulator.
185
- */
186
- readonly emulator?: {
187
- /**
188
- * The name of the local Docker container running the emulator.
189
- */
190
- readonly containerName?: string;
191
- /**
192
- * The version of the Spanner emulator Docker image to use.
193
- */
194
- readonly version?: string;
195
- /**
196
- * The name of the Spanner instance that will automatically be created in the emulator.
197
- */
198
- readonly instanceName?: string;
199
- };
200
- /**
201
- * Configuration for the Spanner instance.
202
- */
203
- readonly instance?: {
204
- /**
205
- * The name of the Spanner instance.
206
- */
207
- readonly name?: string;
208
- /**
209
- * The instance geographic configuration.
210
- * See https://cloud.google.com/spanner/docs/instance-configurations for more details.
211
- */
212
- readonly configuration?: string;
213
- /**
214
- * The compute capacity of the instance.
215
- * See https://cloud.google.com/spanner/docs/compute-capacity for more details.
216
- */
217
- readonly processingUnits?: number;
218
- };
219
- /**
220
- * Defines how DDLs are found for the Spanner databases in the workspace.
221
- */
222
- readonly ddls?: {
223
- /**
224
- * The format string using groups from the regular expression used to make the database names.
225
- */
226
- readonly format?: string;
227
- /**
228
- * A list of glob patterns used to find SQL files containing DDL statements for the Spanner databases.
229
- */
230
- readonly globs?: string[];
231
- /**
232
- * The regular expression used to extract groups from the SQL file paths.
233
- */
234
- readonly regularExpression?: string;
235
- };
236
- /**
237
- * The directory where the database configuration files are written by the `GoogleSpannerWriteDatabases`
238
- * processor.
239
- */
240
- readonly databaseConfigurationsDirectory?: string;
241
- };
242
- /**
243
- * Configuration for Cloud Functions.
244
- */
245
- readonly cloudFunctions?: {
246
- /**
247
- * The Cloud Storage configuration where Cloud Functions archives should be uploaded.
248
- */
249
- readonly artefactStorage?: {
250
- /**
251
- * The name of the Cloud Storage bucket.
252
- */
253
- readonly bucket?: string;
254
- /**
255
- * An optional prefix within the Cloud Storage bucket.
256
- */
257
- readonly prefix?: string;
258
- };
259
- };
260
- /**
261
- * Configuration for Cloud Run containers.
262
- */
263
- readonly cloudRun?: {
264
- /**
265
- * The Docker repository where Cloud Run containers should be uploaded.
266
- */
267
- readonly dockerRepository?: string;
268
- /**
269
- * The location where Cloud Run services should be deployed.
270
- */
271
- readonly location?: string;
272
- /**
273
- * A map where keys are the name of environment variables, and values are secret versions IDs (e.g.
274
- * `projects/my-project/secrets/my-secret/versions/1`).
275
- */
276
- readonly secretEnvironmentVariables?: Record<string, string>;
277
- /**
278
- * Whether the container is running between requests and can perform background operations.
279
- */
280
- readonly cpuAlwaysAllocated?: boolean;
281
- /**
282
- * The max duration the instance is allowed for responding to a request, in seconds.
283
- */
284
- readonly timeout?: number;
285
- /**
286
- * The maximum allowed in-flight (concurrent) requests per container.
287
- */
288
- readonly requestConcurrency?: number;
289
- /**
290
- * The type of allowed ingress that can reach the container.
291
- * See https://cloud.google.com/run/docs/securing/ingress#settings for more details.
292
- */
293
- readonly ingress?: 'all' | 'internal' | 'internal-and-cloud-load-balancing';
294
- /**
295
- * The name of the VPC access connector through which egress traffic should be routed.
296
- */
297
- readonly vpcAccessConnector?: string;
298
- /**
299
- * The setting for egress traffic that goes through the VPC access connector.
300
- * See https://cloud.google.com/run/docs/configuring/connecting-vpc#manage for more details.
301
- */
302
- readonly vpcAccessConnectorEgressSettings?: 'all-traffic' | 'private-ranges-only';
303
- };
304
- };
305
- };
@@ -1 +0,0 @@
1
- export {};