@causa/workspace-google 0.9.2 → 0.9.3

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.
@@ -109,6 +109,7 @@ export class CloudRunPubSubTriggerService {
109
109
  }
110
110
  this.invokerBindingIds.add(invokerBindingId);
111
111
  this.logger.info(`🛂 Granting invoker IAM role to backfilling service account '${pubSubServiceAccount}' for Cloud Run service '${serviceId}'.`);
112
+ // This may fail due to eventual consistency during service account creation.
112
113
  await this.cloudRunService.addInvokerBinding(serviceId, pubSubServiceAccount);
113
114
  return invokerBindingId;
114
115
  }
@@ -39,6 +39,7 @@ export class CloudRunService {
39
39
  const members = [`serviceAccount:${serviceAccountEmail}`];
40
40
  const binding = { role: INVOKER_ROLE, members };
41
41
  policy.bindings = [...(policy.bindings ?? []), binding];
42
+ // This may fail due to eventual consistency during service account creation.
42
43
  await this.servicesClient.setIamPolicy({
43
44
  resource: serviceId,
44
45
  policy,
@@ -19,11 +19,11 @@ export class PubSubService {
19
19
  */
20
20
  projectId;
21
21
  constructor(context) {
22
- this.pubSub = new PubSub();
23
22
  this.resourceManagerService = context.service(ResourceManagerService);
24
23
  this.projectId = context
25
24
  .asConfiguration()
26
25
  .getOrThrow('google.project');
26
+ this.pubSub = new PubSub({ projectId: this.projectId });
27
27
  }
28
28
  /**
29
29
  * The cached promise that resolves to the GCP service account used by Pub/Sub.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causa/workspace-google",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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",
@@ -31,45 +31,45 @@
31
31
  "dependencies": {
32
32
  "@causa/cli": ">= 0.6.1 < 1.0.0",
33
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
- "@google-cloud/iam-credentials": "^3.3.0",
39
- "@google-cloud/pubsub": "^4.10.0",
40
- "@google-cloud/resource-manager": "^5.3.1",
41
- "@google-cloud/run": "^1.5.1",
42
- "@google-cloud/secret-manager": "^5.6.0",
43
- "@google-cloud/service-usage": "^3.4.1",
44
- "@google-cloud/spanner": "7.19.1",
45
- "@google-cloud/storage": "^7.15.2",
46
- "class-validator": "^0.14.1",
47
- "firebase": "^11.4.0",
48
- "firebase-admin": "^13.2.0",
34
+ "@causa/workspace-core": ">= 0.22.3 < 1.0.0",
35
+ "@causa/workspace-typescript": ">= 0.10.2 < 1.0.0",
36
+ "@google-cloud/apikeys": "^2.1.0",
37
+ "@google-cloud/bigquery": "^8.0.0",
38
+ "@google-cloud/iam-credentials": "^4.0.1",
39
+ "@google-cloud/pubsub": "^5.0.0",
40
+ "@google-cloud/resource-manager": "^6.0.1",
41
+ "@google-cloud/run": "^2.0.1",
42
+ "@google-cloud/secret-manager": "^6.0.1",
43
+ "@google-cloud/service-usage": "^4.1.0",
44
+ "@google-cloud/spanner": "7.21.0",
45
+ "@google-cloud/storage": "^7.16.0",
46
+ "class-validator": "^0.14.2",
47
+ "firebase": "^11.7.1",
48
+ "firebase-admin": "^13.3.0",
49
49
  "globby": "^14.1.0",
50
50
  "google-auth-library": "^9.15.1",
51
51
  "google-gax": "4.4.1",
52
- "googleapis": "^146.0.0",
52
+ "googleapis": "^148.0.0",
53
53
  "pino": "^9.6.0",
54
- "quicktype-core": "^23.0.171",
54
+ "quicktype-core": "^23.1.4",
55
55
  "uuid": "^11.1.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@swc/core": "^1.11.10",
59
- "@swc/jest": "^0.2.37",
60
- "@tsconfig/node20": "^20.1.4",
58
+ "@swc/core": "^1.11.24",
59
+ "@swc/jest": "^0.2.38",
60
+ "@tsconfig/node20": "^20.1.5",
61
61
  "@types/jest": "^29.5.14",
62
- "@types/node": "^18.19.80",
62
+ "@types/node": "^18.19.100",
63
63
  "@types/uuid": "^10.0.0",
64
64
  "copyfiles": "^2.4.1",
65
- "eslint": "^9.22.0",
66
- "eslint-config-prettier": "^10.1.1",
67
- "eslint-plugin-prettier": "^5.2.3",
65
+ "eslint": "^9.26.0",
66
+ "eslint-config-prettier": "^10.1.5",
67
+ "eslint-plugin-prettier": "^5.4.0",
68
68
  "jest": "^29.7.0",
69
69
  "jest-extended": "^4.0.2",
70
70
  "rimraf": "^6.0.1",
71
71
  "ts-node": "^10.9.2",
72
- "typescript": "^5.8.2",
73
- "typescript-eslint": "^8.26.1"
72
+ "typescript": "^5.8.3",
73
+ "typescript-eslint": "^8.32.0"
74
74
  }
75
75
  }