@shipfox/api-definitions 6.0.0 → 7.1.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/api-definitions",
3
3
  "license": "MIT",
4
- "version": "6.0.0",
4
+ "version": "7.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.8.3",
32
32
  "zod": "^4.4.3",
33
33
  "@shipfox/api-agent-dto": "6.0.0",
34
- "@shipfox/api-auth-context": "6.0.0",
34
+ "@shipfox/api-auth-context": "7.1.0",
35
35
  "@shipfox/api-definitions-dto": "6.0.0",
36
36
  "@shipfox/api-integration-core-dto": "6.0.0",
37
37
  "@shipfox/api-projects-dto": "6.0.0",
@@ -40,34 +40,16 @@
40
40
  "@shipfox/expression": "1.1.3",
41
41
  "@shipfox/inter-module": "0.2.0",
42
42
  "@shipfox/node-drizzle": "0.3.2",
43
- "@shipfox/node-fastify": "0.2.4",
44
- "@shipfox/node-module": "0.4.0",
45
- "@shipfox/node-opentelemetry": "0.5.2",
43
+ "@shipfox/node-fastify": "0.3.0",
44
+ "@shipfox/node-error-monitoring": "0.2.0",
45
+ "@shipfox/node-module": "0.5.0",
46
+ "@shipfox/node-opentelemetry": "0.6.0",
46
47
  "@shipfox/node-outbox": "0.2.4",
47
48
  "@shipfox/node-postgres": "0.4.2",
48
- "@shipfox/node-temporal": "0.3.2",
49
+ "@shipfox/node-temporal": "0.4.0",
49
50
  "@shipfox/runner-labels": "0.1.1",
50
51
  "@shipfox/workflow-document": "2.1.1"
51
52
  },
52
- "devDependencies": {
53
- "@temporalio/client": "1.18.1",
54
- "@temporalio/testing": "1.18.1",
55
- "@temporalio/worker": "1.18.1",
56
- "@types/js-yaml": "^4.0.9",
57
- "@types/pg": "^8.15.5",
58
- "drizzle-kit": "^0.31.10",
59
- "fastify": "^5.3.3",
60
- "fastify-type-provider-zod": "^6.0.0",
61
- "fishery": "^2.4.0",
62
- "@shipfox/api-integration-core": "6.0.0",
63
- "@shipfox/biome": "1.8.2",
64
- "@shipfox/depcruise": "1.0.2",
65
- "@shipfox/regex": "0.2.2",
66
- "@shipfox/swc": "1.2.6",
67
- "@shipfox/ts-config": "1.3.8",
68
- "@shipfox/typescript": "1.1.7",
69
- "@shipfox/vitest": "1.2.3"
70
- },
71
53
  "scripts": {
72
54
  "build": "shipfox-swc && shipfox-temporal-bundle dist/temporal/workflows/index.js",
73
55
  "check": "shipfox-biome-check",
@@ -1,6 +1,7 @@
1
1
  import type {IntegrationSourceControlService} from '@shipfox/api-integration-core';
2
2
  import {integrationsInterModuleContract} from '@shipfox/api-integration-core-dto';
3
3
  import {createInterModuleKnownError} from '@shipfox/inter-module';
4
+ import {isErrorReported} from '@shipfox/node-error-monitoring';
4
5
  import {ApplicationFailure} from '@temporalio/common';
5
6
  import {sql} from 'drizzle-orm';
6
7
  import {db, definitionSyncStates} from '#db/index.js';
@@ -141,6 +142,8 @@ describe('definition sync activities', () => {
141
142
  type: 'unknown',
142
143
  message: 'temporary outage',
143
144
  });
145
+ const error = await result.catch((error: unknown) => error);
146
+ expect(isErrorReported(error)).toBe(false);
144
147
  });
145
148
 
146
149
  it('preserves retryable provider error codes for workflow-level failure persistence', async () => {
@@ -170,6 +173,8 @@ describe('definition sync activities', () => {
170
173
  type: 'provider-timeout',
171
174
  message: 'integrations.resolveSourceRepository: provider-failure',
172
175
  });
176
+ const error = await result.catch((error: unknown) => error);
177
+ expect(isErrorReported(error)).toBe(true);
173
178
  });
174
179
  });
175
180
 
@@ -1,4 +1,5 @@
1
1
  import type {IntegrationsModuleClient} from '@shipfox/api-integration-core-dto';
2
+ import {markErrorReported} from '@shipfox/node-error-monitoring';
2
3
  import {Context} from '@temporalio/activity';
3
4
  import {ApplicationFailure} from '@temporalio/common';
4
5
  import type {DefinitionSyncErrorCode} from '#core/entities/sync-state.js';
@@ -183,9 +184,10 @@ async function runWithPermanentTranslation<T>(operation: () => Promise<T>): Prom
183
184
  throw error;
184
185
  }
185
186
  const failure = classifySyncFailure(error);
186
- if (!failure.retryable) {
187
- throw ApplicationFailure.nonRetryable(failure.message, failure.code);
188
- }
189
- throw ApplicationFailure.retryable(failure.message, failure.code);
187
+ const translatedError = failure.retryable
188
+ ? ApplicationFailure.retryable(failure.message, failure.code)
189
+ : ApplicationFailure.nonRetryable(failure.message, failure.code);
190
+ if (failure.code !== 'unknown') markErrorReported(translatedError);
191
+ throw translatedError;
190
192
  }
191
193
  }