@causa/runtime-google 0.35.2 → 0.35.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.
@@ -15,5 +15,5 @@ export type SpannerOutboxTransaction = SpannerTransaction<OutboxEventTransaction
15
15
  export declare class SpannerOutboxTransactionRunner extends OutboxTransactionRunner<SpannerOutboxTransaction> {
16
16
  readonly entityManager: SpannerEntityManager;
17
17
  constructor(entityManager: SpannerEntityManager, outboxEventType: Type<OutboxEvent>, sender: SpannerOutboxSender, logger: Logger);
18
- protected runStateTransaction<RT>(eventTransaction: OutboxEventTransaction, runFn: (transaction: SpannerOutboxTransaction) => Promise<RT>): Promise<RT>;
18
+ protected runStateTransaction<RT>(eventTransactionFactory: () => OutboxEventTransaction, runFn: (transaction: SpannerOutboxTransaction) => Promise<RT>): Promise<RT>;
19
19
  }
@@ -15,9 +15,10 @@ export class SpannerOutboxTransactionRunner extends OutboxTransactionRunner {
15
15
  super(outboxEventType, sender, logger);
16
16
  this.entityManager = entityManager;
17
17
  }
18
- async runStateTransaction(eventTransaction, runFn) {
18
+ async runStateTransaction(eventTransactionFactory, runFn) {
19
19
  return await this.entityManager.transaction(async (dbTransaction) => {
20
20
  const stateTransaction = new SpannerStateTransaction(this.entityManager, dbTransaction);
21
+ const eventTransaction = eventTransactionFactory();
21
22
  const transaction = new SpannerTransaction(stateTransaction, eventTransaction);
22
23
  try {
23
24
  return await runFn(transaction);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causa/runtime-google",
3
- "version": "0.35.2",
3
+ "version": "0.35.3",
4
4
  "description": "An extension to the Causa runtime SDK (`@causa/runtime`), providing Google-specific features.",
5
5
  "repository": "github:causa-io/runtime-typescript-google",
6
6
  "license": "ISC",
@@ -29,15 +29,15 @@
29
29
  "test:cov": "npm run test -- --coverage"
30
30
  },
31
31
  "dependencies": {
32
- "@causa/runtime": ">= 0.24.2 < 1.0.0",
32
+ "@causa/runtime": ">= 0.25.0 < 1.0.0",
33
33
  "@google-cloud/precise-date": "^4.0.0",
34
34
  "@google-cloud/pubsub": "^4.9.0",
35
35
  "@google-cloud/spanner": "^7.16.0",
36
36
  "@google-cloud/tasks": "^5.5.1",
37
37
  "@grpc/grpc-js": "^1.12.3",
38
- "@nestjs/common": "^10.4.12",
38
+ "@nestjs/common": "^10.4.13",
39
39
  "@nestjs/config": "^3.3.0",
40
- "@nestjs/core": "^10.4.12",
40
+ "@nestjs/core": "^10.4.13",
41
41
  "@nestjs/passport": "^10.0.3",
42
42
  "@nestjs/terminus": "^10.2.3",
43
43
  "class-transformer": "^0.5.1",
@@ -50,8 +50,8 @@
50
50
  "reflect-metadata": "^0.2.2"
51
51
  },
52
52
  "devDependencies": {
53
- "@nestjs/testing": "^10.4.12",
54
- "@swc/core": "^1.9.3",
53
+ "@nestjs/testing": "^10.4.13",
54
+ "@swc/core": "^1.10.0",
55
55
  "@swc/jest": "^0.2.37",
56
56
  "@tsconfig/node22": "^22.0.0",
57
57
  "@types/jest": "^29.5.14",
@@ -60,7 +60,7 @@
60
60
  "@types/passport-http-bearer": "^1.0.41",
61
61
  "@types/supertest": "^6.0.2",
62
62
  "@types/uuid": "^10.0.0",
63
- "dotenv": "^16.4.6",
63
+ "dotenv": "^16.4.7",
64
64
  "eslint": "^9.16.0",
65
65
  "eslint-config-prettier": "^9.1.0",
66
66
  "eslint-plugin-prettier": "^5.2.1",