@causa/workspace-google 0.13.0-rc.2 → 0.14.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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ISC License
2
2
 
3
- Copyright (c) 2023 Causa
3
+ Copyright (c) 2026 Causa
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
@@ -1,3 +1,16 @@
1
+ export declare class Events {
2
+ constructor(init: Events);
3
+ readonly broker?: string;
4
+ [property: string]: any;
5
+ }
6
+ /**
7
+ * Google-specific refinement of the events configuration.
8
+ */
9
+ export declare class GoogleEventsConfiguration {
10
+ constructor(init: GoogleEventsConfiguration);
11
+ readonly events?: Events;
12
+ [property: string]: any;
13
+ }
1
14
  /**
2
15
  * The Cloud Storage configuration where Cloud Functions archives should be uploaded.
3
16
  */
@@ -552,6 +565,67 @@ export declare class GoogleConfiguration {
552
565
  readonly google?: Google;
553
566
  [property: string]: any;
554
567
  }
568
+ /**
569
+ * Merges all Firebase Storage security rules from the workspace.
570
+ * Sets the `google.firebaseStorage.securityRuleFile` configuration value.
571
+ */
572
+ export declare class GoogleProcessor {
573
+ constructor(init: GoogleProcessor);
574
+ readonly name: string;
575
+ [property: string]: any;
576
+ }
577
+ export declare class Infrastructure {
578
+ constructor(init: Infrastructure);
579
+ readonly processors?: GoogleProcessor[];
580
+ [property: string]: any;
581
+ }
582
+ /**
583
+ * Google-specific refinement of the infrastructure configuration with known processors.
584
+ */
585
+ export declare class GoogleInfrastructureConfiguration {
586
+ constructor(init: GoogleInfrastructureConfiguration);
587
+ readonly infrastructure?: Infrastructure;
588
+ [property: string]: any;
589
+ }
590
+ export declare class Secrets {
591
+ constructor(init: Secrets);
592
+ readonly defaultBackend?: string;
593
+ [property: string]: any;
594
+ }
595
+ export declare class Causa {
596
+ constructor(init: Causa);
597
+ readonly secrets?: Secrets;
598
+ [property: string]: any;
599
+ }
600
+ export declare class Secret {
601
+ constructor(init: Secret);
602
+ readonly backend?: string;
603
+ [property: string]: any;
604
+ }
605
+ /**
606
+ * Google-specific refinement of the secrets configuration.
607
+ */
608
+ export declare class GoogleSecretsConfiguration {
609
+ constructor(init: GoogleSecretsConfiguration);
610
+ readonly causa?: Causa;
611
+ readonly secrets?: {
612
+ [key: string]: Secret;
613
+ };
614
+ [property: string]: any;
615
+ }
616
+ export declare class ServerlessFunctions {
617
+ constructor(init: ServerlessFunctions);
618
+ readonly platform?: string;
619
+ [property: string]: any;
620
+ }
621
+ /**
622
+ * Google-specific refinement of the serverless functions configuration.
623
+ */
624
+ export declare class GoogleServerlessFunctionsConfiguration {
625
+ constructor(init: GoogleServerlessFunctionsConfiguration);
626
+ readonly serverlessFunctions?: ServerlessFunctions;
627
+ [property: string]: any;
628
+ }
555
629
  export declare class Outputs {
556
630
  constructor(init: Outputs);
557
631
  /**
@@ -723,6 +797,7 @@ export declare class ServiceContainerGoogleTrigger {
723
797
  export declare class ServiceContainer {
724
798
  constructor(init: ServiceContainer);
725
799
  readonly outputs?: Outputs;
800
+ readonly platform?: string;
726
801
  /**
727
802
  * A map of triggers that call the service's endpoints when they occur.
728
803
  */
@@ -10,6 +10,30 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  import { AllowMissing } from '@causa/workspace/validation';
12
12
  import { IsArray, IsBoolean, IsIn, IsNumber, IsObject, IsString, } from 'class-validator';
13
+ export class Events {
14
+ constructor(init) {
15
+ Object.assign(this, init);
16
+ }
17
+ broker;
18
+ }
19
+ __decorate([
20
+ AllowMissing(),
21
+ IsString(),
22
+ __metadata("design:type", String)
23
+ ], Events.prototype, "broker", void 0);
24
+ /**
25
+ * Google-specific refinement of the events configuration.
26
+ */
27
+ export class GoogleEventsConfiguration {
28
+ constructor(init) {
29
+ Object.assign(this, init);
30
+ }
31
+ events;
32
+ }
33
+ __decorate([
34
+ AllowMissing(),
35
+ __metadata("design:type", Events)
36
+ ], GoogleEventsConfiguration.prototype, "events", void 0);
13
37
  /**
14
38
  * The Cloud Storage configuration where Cloud Functions archives should be uploaded.
15
39
  */
@@ -990,6 +1014,119 @@ __decorate([
990
1014
  AllowMissing(),
991
1015
  __metadata("design:type", Google)
992
1016
  ], GoogleConfiguration.prototype, "google", void 0);
1017
+ /**
1018
+ * Merges all Firebase Storage security rules from the workspace.
1019
+ * Sets the `google.firebaseStorage.securityRuleFile` configuration value.
1020
+ */
1021
+ export class GoogleProcessor {
1022
+ constructor(init) {
1023
+ Object.assign(this, init);
1024
+ }
1025
+ name;
1026
+ }
1027
+ __decorate([
1028
+ IsString(),
1029
+ __metadata("design:type", String)
1030
+ ], GoogleProcessor.prototype, "name", void 0);
1031
+ export class Infrastructure {
1032
+ constructor(init) {
1033
+ Object.assign(this, init);
1034
+ }
1035
+ processors;
1036
+ }
1037
+ __decorate([
1038
+ AllowMissing(),
1039
+ IsArray(),
1040
+ __metadata("design:type", Array)
1041
+ ], Infrastructure.prototype, "processors", void 0);
1042
+ /**
1043
+ * Google-specific refinement of the infrastructure configuration with known processors.
1044
+ */
1045
+ export class GoogleInfrastructureConfiguration {
1046
+ constructor(init) {
1047
+ Object.assign(this, init);
1048
+ }
1049
+ infrastructure;
1050
+ }
1051
+ __decorate([
1052
+ AllowMissing(),
1053
+ __metadata("design:type", Infrastructure)
1054
+ ], GoogleInfrastructureConfiguration.prototype, "infrastructure", void 0);
1055
+ export class Secrets {
1056
+ constructor(init) {
1057
+ Object.assign(this, init);
1058
+ }
1059
+ defaultBackend;
1060
+ }
1061
+ __decorate([
1062
+ AllowMissing(),
1063
+ IsString(),
1064
+ __metadata("design:type", String)
1065
+ ], Secrets.prototype, "defaultBackend", void 0);
1066
+ export class Causa {
1067
+ constructor(init) {
1068
+ Object.assign(this, init);
1069
+ }
1070
+ secrets;
1071
+ }
1072
+ __decorate([
1073
+ AllowMissing(),
1074
+ __metadata("design:type", Secrets)
1075
+ ], Causa.prototype, "secrets", void 0);
1076
+ export class Secret {
1077
+ constructor(init) {
1078
+ Object.assign(this, init);
1079
+ }
1080
+ backend;
1081
+ }
1082
+ __decorate([
1083
+ AllowMissing(),
1084
+ IsString(),
1085
+ __metadata("design:type", String)
1086
+ ], Secret.prototype, "backend", void 0);
1087
+ /**
1088
+ * Google-specific refinement of the secrets configuration.
1089
+ */
1090
+ export class GoogleSecretsConfiguration {
1091
+ constructor(init) {
1092
+ Object.assign(this, init);
1093
+ }
1094
+ causa;
1095
+ secrets;
1096
+ }
1097
+ __decorate([
1098
+ AllowMissing(),
1099
+ __metadata("design:type", Causa)
1100
+ ], GoogleSecretsConfiguration.prototype, "causa", void 0);
1101
+ __decorate([
1102
+ AllowMissing(),
1103
+ IsObject(),
1104
+ __metadata("design:type", Object)
1105
+ ], GoogleSecretsConfiguration.prototype, "secrets", void 0);
1106
+ export class ServerlessFunctions {
1107
+ constructor(init) {
1108
+ Object.assign(this, init);
1109
+ }
1110
+ platform;
1111
+ }
1112
+ __decorate([
1113
+ AllowMissing(),
1114
+ IsString(),
1115
+ __metadata("design:type", String)
1116
+ ], ServerlessFunctions.prototype, "platform", void 0);
1117
+ /**
1118
+ * Google-specific refinement of the serverless functions configuration.
1119
+ */
1120
+ export class GoogleServerlessFunctionsConfiguration {
1121
+ constructor(init) {
1122
+ Object.assign(this, init);
1123
+ }
1124
+ serverlessFunctions;
1125
+ }
1126
+ __decorate([
1127
+ AllowMissing(),
1128
+ __metadata("design:type", ServerlessFunctions)
1129
+ ], GoogleServerlessFunctionsConfiguration.prototype, "serverlessFunctions", void 0);
993
1130
  export class Outputs {
994
1131
  constructor(init) {
995
1132
  Object.assign(this, init);
@@ -1318,6 +1455,7 @@ export class ServiceContainer {
1318
1455
  Object.assign(this, init);
1319
1456
  }
1320
1457
  outputs;
1458
+ platform;
1321
1459
  /**
1322
1460
  * A map of triggers that call the service's endpoints when they occur.
1323
1461
  */
@@ -1327,6 +1465,11 @@ __decorate([
1327
1465
  AllowMissing(),
1328
1466
  __metadata("design:type", Outputs)
1329
1467
  ], ServiceContainer.prototype, "outputs", void 0);
1468
+ __decorate([
1469
+ AllowMissing(),
1470
+ IsString(),
1471
+ __metadata("design:type", String)
1472
+ ], ServiceContainer.prototype, "platform", void 0);
1330
1473
  __decorate([
1331
1474
  AllowMissing(),
1332
1475
  IsObject(),
@@ -0,0 +1,15 @@
1
+ title: GoogleEventsConfiguration
2
+ type: object
3
+ description: Google-specific refinement of the events configuration.
4
+ properties:
5
+ events:
6
+ type: object
7
+ properties:
8
+ broker:
9
+ anyOf:
10
+ - type: string
11
+ - title: GooglePubSubBroker
12
+ type: string
13
+ enum:
14
+ - google.pubSub
15
+ description: Google Pub/Sub message broker.
@@ -0,0 +1,87 @@
1
+ title: GoogleInfrastructureConfiguration
2
+ type: object
3
+ description: >-
4
+ Google-specific refinement of the infrastructure configuration with known
5
+ processors.
6
+ properties:
7
+ infrastructure:
8
+ type: object
9
+ properties:
10
+ processors:
11
+ type: array
12
+ items:
13
+ anyOf:
14
+ - type: object
15
+ properties:
16
+ name:
17
+ type: string
18
+ required:
19
+ - name
20
+ - title: GoogleServicesEnableProcessor
21
+ type: object
22
+ description: >-
23
+ Enables GCP services defined in the `google.services`
24
+ configuration.
25
+ properties:
26
+ name:
27
+ type: string
28
+ enum:
29
+ - GoogleServicesEnable
30
+ required:
31
+ - name
32
+ - title: GooglePubSubWriteTopicsProcessor
33
+ type: object
34
+ description: >-
35
+ Writes Pub/Sub topic configurations to JSON files.
36
+
37
+ Sets the `google.pubSub.topicConfigurationsDirectory`
38
+ configuration value.
39
+ properties:
40
+ name:
41
+ type: string
42
+ enum:
43
+ - GooglePubSubWriteTopics
44
+ required:
45
+ - name
46
+ - title: GoogleSpannerWriteDatabasesProcessor
47
+ type: object
48
+ description: >-
49
+ Writes Spanner database configurations to JSON files.
50
+
51
+ Sets the `google.spanner.databaseConfigurationsDirectory`
52
+ configuration value.
53
+ properties:
54
+ name:
55
+ type: string
56
+ enum:
57
+ - GoogleSpannerWriteDatabases
58
+ required:
59
+ - name
60
+ - title: GoogleFirestoreMergeRulesProcessor
61
+ type: object
62
+ description: >-
63
+ Merges all Firestore security rules from the workspace.
64
+
65
+ Sets the `google.firestore.securityRuleFile` configuration
66
+ value.
67
+ properties:
68
+ name:
69
+ type: string
70
+ enum:
71
+ - GoogleFirestoreMergeRules
72
+ required:
73
+ - name
74
+ - title: GoogleFirebaseStorageMergeRulesProcessor
75
+ type: object
76
+ description: >-
77
+ Merges all Firebase Storage security rules from the workspace.
78
+
79
+ Sets the `google.firebaseStorage.securityRuleFile` configuration
80
+ value.
81
+ properties:
82
+ name:
83
+ type: string
84
+ enum:
85
+ - GoogleFirebaseStorageMergeRules
86
+ required:
87
+ - name
@@ -0,0 +1,59 @@
1
+ title: GoogleSecretsConfiguration
2
+ type: object
3
+ description: Google-specific refinement of the secrets configuration.
4
+ properties:
5
+ causa:
6
+ type: object
7
+ properties:
8
+ secrets:
9
+ type: object
10
+ properties:
11
+ defaultBackend:
12
+ anyOf:
13
+ - type: string
14
+ - title: GoogleSecretManagerBackend
15
+ type: string
16
+ enum:
17
+ - google.secretManager
18
+ description: Google Secret Manager backend.
19
+ secrets:
20
+ type: object
21
+ additionalProperties:
22
+ anyOf:
23
+ - type: object
24
+ properties:
25
+ backend:
26
+ type: string
27
+ - title: GoogleSecretManagerSecretConfiguration
28
+ type: object
29
+ description: A secret stored in Google Secret Manager.
30
+ properties:
31
+ backend:
32
+ type: string
33
+ enum:
34
+ - google.secretManager
35
+ id:
36
+ type: string
37
+ description: >-
38
+ The reference to the secret in Google Secret Manager.
39
+
40
+ Supported formats: `<secret-name>`,
41
+ `projects/<project>/secrets/<secret-name>`,
42
+ `projects/<project>/secrets/<secret-name>/versions/<version>`.
43
+
44
+ If the project is not specified, `google.secretManager.project`
45
+ or `google.project` will be used.
46
+
47
+ If the version is not specified, `latest` will be used.
48
+ - title: GoogleAccessTokenSecretConfiguration
49
+ type: object
50
+ description: >-
51
+ A secret that returns a Google access token for the current user or
52
+ service account.
53
+
54
+ This backend does not require any additional configuration.
55
+ properties:
56
+ backend:
57
+ type: string
58
+ enum:
59
+ - google.accessToken
@@ -0,0 +1,15 @@
1
+ title: GoogleServerlessFunctionsConfiguration
2
+ type: object
3
+ description: Google-specific refinement of the serverless functions configuration.
4
+ properties:
5
+ serverlessFunctions:
6
+ type: object
7
+ properties:
8
+ platform:
9
+ anyOf:
10
+ - type: string
11
+ - title: GoogleCloudFunctionsPlatform
12
+ type: string
13
+ enum:
14
+ - google.cloudFunctions
15
+ description: Google Cloud Functions platform.
@@ -5,6 +5,14 @@ properties:
5
5
  serviceContainer:
6
6
  type: object
7
7
  properties:
8
+ platform:
9
+ anyOf:
10
+ - type: string
11
+ - title: GoogleCloudRunPlatform
12
+ type: string
13
+ enum:
14
+ - google.cloudRun
15
+ description: Google Cloud Run platform.
8
16
  triggers:
9
17
  type: object
10
18
  description: A map of triggers that call the service's endpoints when they occur.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causa/workspace-google",
3
- "version": "0.13.0-rc.2",
3
+ "version": "0.14.0",
4
4
  "description": "The Causa workspace module providing many functionalities related to GCP and its services.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,8 +37,8 @@
37
37
  "dependencies": {
38
38
  "@causa/cli": ">= 0.6.5 < 1.0.0",
39
39
  "@causa/workspace": ">= 0.22.1 < 1.0.0",
40
- "@causa/workspace-core": ">= 0.27.0-rc.2 < 1.0.0",
41
- "@causa/workspace-typescript": ">= 0.17.0-rc.2 < 1.0.0",
40
+ "@causa/workspace-core": ">= 0.27.0 < 1.0.0",
41
+ "@causa/workspace-typescript": ">= 0.17.0 < 1.0.0",
42
42
  "@google-cloud/apikeys": "^2.2.1",
43
43
  "@google-cloud/bigquery": "^8.1.1",
44
44
  "@google-cloud/iam-credentials": "^4.2.1",
@@ -66,7 +66,7 @@
66
66
  "@tsconfig/node20": "^20.1.9",
67
67
  "@types/jest": "^30.0.0",
68
68
  "@types/micromatch": "^4.0.10",
69
- "@types/node": "^22.19.11",
69
+ "@types/node": "^20.19.33",
70
70
  "copyfiles": "^2.4.1",
71
71
  "eslint": "^9.39.2",
72
72
  "eslint-config-prettier": "^10.1.8",
@@ -74,7 +74,6 @@
74
74
  "jest": "^30.2.0",
75
75
  "jest-extended": "^7.0.0",
76
76
  "rimraf": "^6.1.2",
77
- "ts-node": "^10.9.2",
78
77
  "typescript": "^5.9.3",
79
78
  "typescript-eslint": "^8.55.0"
80
79
  }