@onlineapps/service-wrapper 2.1.71 → 2.1.73

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/service-wrapper",
3
- "version": "2.1.71",
3
+ "version": "2.1.73",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -25,16 +25,16 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@onlineapps/conn-base-cache": "1.0.8",
28
- "@onlineapps/conn-base-monitoring": "1.0.7",
29
- "@onlineapps/conn-infra-error-handler": "1.0.6",
28
+ "@onlineapps/conn-base-monitoring": "1.0.8",
29
+ "@onlineapps/conn-infra-error-handler": "1.0.7",
30
30
  "@onlineapps/conn-infra-mq": "1.1.57",
31
- "@onlineapps/conn-orch-api-mapper": "1.0.25",
32
- "@onlineapps/conn-orch-cookbook": "2.0.16",
33
- "@onlineapps/conn-orch-orchestrator": "1.0.78",
31
+ "@onlineapps/conn-orch-api-mapper": "1.0.26",
32
+ "@onlineapps/conn-orch-cookbook": "2.0.17",
33
+ "@onlineapps/conn-orch-orchestrator": "1.0.80",
34
34
  "@onlineapps/conn-orch-registry": "1.1.34",
35
35
  "@onlineapps/conn-orch-validator": "2.0.23",
36
- "@onlineapps/monitoring-core": "1.0.17",
37
- "@onlineapps/service-common": "1.0.12",
36
+ "@onlineapps/monitoring-core": "1.0.18",
37
+ "@onlineapps/service-common": "1.0.13",
38
38
  "@onlineapps/runtime-config": "1.0.2"
39
39
  },
40
40
  "devDependencies": {
@@ -1365,9 +1365,21 @@ class ServiceWrapper {
1365
1365
  }
1366
1366
 
1367
1367
  // Normalize message format: Gateway sends workflowId, orchestrator expects workflow_id
1368
- // V2 format uses step_id, V1 used id - support both for backwards compatibility during migration
1369
- const firstStep = message.cookbook?.steps?.[0];
1370
- const firstStepId = firstStep?.step_id || firstStep?.id;
1368
+ // STRICT: V2.1 only. Steps must use step_id (no legacy "id").
1369
+ const steps = message.cookbook?.steps;
1370
+ if (Array.isArray(steps)) {
1371
+ for (const s of steps) {
1372
+ if (s && typeof s === 'object' && s.id && !s.step_id) {
1373
+ throw new Error(
1374
+ '[ServiceWrapper] Deprecated cookbook format - Step uses "id" instead of "step_id". Fix: migrate to V2.1 (step_id).'
1375
+ );
1376
+ }
1377
+ if (!s?.step_id) {
1378
+ throw new Error('[ServiceWrapper] Invalid cookbook - Each step must have step_id (V2.1).');
1379
+ }
1380
+ }
1381
+ }
1382
+ const firstStepId = Array.isArray(steps) && steps.length > 0 ? steps[0].step_id : undefined;
1371
1383
  const normalizedMessage = {
1372
1384
  ...message,
1373
1385
  workflow_id: message.workflow_id || message.workflowId,
@@ -1582,7 +1594,7 @@ class ServiceWrapper {
1582
1594
  }
1583
1595
 
1584
1596
  // Build service URL for validation (HTTP calls to running server)
1585
- // Fail-fast: do not guess hostnames (no localhost defaults). Service URL must be explicit in ServiceConfig.
1597
+ // Fail-fast: do not guess hostnames (no topology defaults). Service URL must be explicit in ServiceConfig.
1586
1598
  const serviceUrl = this.config.service?.url;
1587
1599
  if (!serviceUrl) {
1588
1600
  throw new Error('[ServiceWrapper] Missing configuration - config.service.url is required for validation (set SERVICE_URL in conn-config/config.json placeholder)');