@cadenza.io/service 2.17.7 → 2.17.9
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/dist/browser/index.js +200 -33
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +200 -33
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.js +224 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +224 -56
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -5631,10 +5631,29 @@ function buildActorRegistrationData(actor) {
|
|
|
5631
5631
|
version: 1
|
|
5632
5632
|
};
|
|
5633
5633
|
}
|
|
5634
|
+
function resolveSyncServiceName(task) {
|
|
5635
|
+
const taskServiceName = typeof task?.serviceName === "string" ? task.serviceName.trim() : "";
|
|
5636
|
+
const registryServiceName = typeof CadenzaService.serviceRegistry.serviceName === "string" ? CadenzaService.serviceRegistry.serviceName.trim() : "";
|
|
5637
|
+
return taskServiceName || registryServiceName || void 0;
|
|
5638
|
+
}
|
|
5639
|
+
function buildIntentRegistryData(intent) {
|
|
5640
|
+
const name = String(intent?.name ?? "").trim();
|
|
5641
|
+
if (!name) {
|
|
5642
|
+
return null;
|
|
5643
|
+
}
|
|
5644
|
+
return {
|
|
5645
|
+
name,
|
|
5646
|
+
description: typeof intent?.description === "string" ? intent.description : "",
|
|
5647
|
+
input: intent?.input && typeof intent.input === "object" ? intent.input : { type: "object" },
|
|
5648
|
+
output: intent?.output && typeof intent.output === "object" ? intent.output : { type: "object" },
|
|
5649
|
+
isMeta: isMetaIntentName(name)
|
|
5650
|
+
};
|
|
5651
|
+
}
|
|
5634
5652
|
var GraphSyncController = class _GraphSyncController {
|
|
5635
5653
|
constructor() {
|
|
5636
5654
|
this.registeredActors = /* @__PURE__ */ new Set();
|
|
5637
5655
|
this.registeredActorTaskMaps = /* @__PURE__ */ new Set();
|
|
5656
|
+
this.registeredIntentDefinitions = /* @__PURE__ */ new Set();
|
|
5638
5657
|
this.isCadenzaDBReady = false;
|
|
5639
5658
|
}
|
|
5640
5659
|
static get instance() {
|
|
@@ -5642,11 +5661,27 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5642
5661
|
return this._instance;
|
|
5643
5662
|
}
|
|
5644
5663
|
init() {
|
|
5664
|
+
const insertIntentRegistryTask = this.isCadenzaDBReady ? CadenzaService.createCadenzaDBInsertTask(
|
|
5665
|
+
"intent_registry",
|
|
5666
|
+
{
|
|
5667
|
+
onConflict: {
|
|
5668
|
+
target: ["name"],
|
|
5669
|
+
action: {
|
|
5670
|
+
do: "nothing"
|
|
5671
|
+
}
|
|
5672
|
+
}
|
|
5673
|
+
},
|
|
5674
|
+
{ concurrency: 30 }
|
|
5675
|
+
) : CadenzaService.get("dbInsertIntentRegistry");
|
|
5645
5676
|
this.splitRoutinesTask = CadenzaService.createMetaTask(
|
|
5646
5677
|
"Split routines for registration",
|
|
5647
5678
|
async function* (ctx, emit) {
|
|
5648
5679
|
const { routines } = ctx;
|
|
5649
5680
|
if (!routines) return;
|
|
5681
|
+
const serviceName = resolveSyncServiceName();
|
|
5682
|
+
if (!serviceName) {
|
|
5683
|
+
return;
|
|
5684
|
+
}
|
|
5650
5685
|
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
5651
5686
|
delayMs: 2e3
|
|
5652
5687
|
});
|
|
@@ -5657,7 +5692,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5657
5692
|
name: routine.name,
|
|
5658
5693
|
version: routine.version,
|
|
5659
5694
|
description: routine.description,
|
|
5660
|
-
serviceName
|
|
5695
|
+
serviceName,
|
|
5661
5696
|
isMeta: routine.isMeta
|
|
5662
5697
|
},
|
|
5663
5698
|
__routineName: routine.name
|
|
@@ -5699,6 +5734,10 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5699
5734
|
function* (ctx) {
|
|
5700
5735
|
const { routines } = ctx;
|
|
5701
5736
|
if (!routines) return;
|
|
5737
|
+
const serviceName = resolveSyncServiceName();
|
|
5738
|
+
if (!serviceName) {
|
|
5739
|
+
return;
|
|
5740
|
+
}
|
|
5702
5741
|
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
5703
5742
|
delayMs: 3e3
|
|
5704
5743
|
});
|
|
@@ -5718,7 +5757,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5718
5757
|
taskVersion: nextTask.version,
|
|
5719
5758
|
routineName: routine.name,
|
|
5720
5759
|
routineVersion: routine.version,
|
|
5721
|
-
serviceName
|
|
5760
|
+
serviceName
|
|
5722
5761
|
},
|
|
5723
5762
|
__routineName: routine.name,
|
|
5724
5763
|
__taskName: nextTask.name
|
|
@@ -5821,6 +5860,10 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5821
5860
|
delayMs: 3e3
|
|
5822
5861
|
});
|
|
5823
5862
|
const tasks = ctx.tasks;
|
|
5863
|
+
const serviceName = resolveSyncServiceName();
|
|
5864
|
+
if (!serviceName) {
|
|
5865
|
+
return;
|
|
5866
|
+
}
|
|
5824
5867
|
for (const task of tasks) {
|
|
5825
5868
|
if (task.registered) continue;
|
|
5826
5869
|
const { __functionString, __getTagCallback } = task.export();
|
|
@@ -5850,7 +5893,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5850
5893
|
retryDelay: task.retryDelay,
|
|
5851
5894
|
retryDelayMax: task.retryDelayMax,
|
|
5852
5895
|
retryDelayFactor: task.retryDelayFactor,
|
|
5853
|
-
service_name:
|
|
5896
|
+
service_name: serviceName,
|
|
5854
5897
|
signals: {
|
|
5855
5898
|
emits: Array.from(task.emitsSignals),
|
|
5856
5899
|
signalsToEmitAfter: Array.from(task.signalsToEmitAfter),
|
|
@@ -5898,11 +5941,15 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5898
5941
|
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
5899
5942
|
delayMs: 3e3
|
|
5900
5943
|
});
|
|
5944
|
+
const serviceName = resolveSyncServiceName();
|
|
5945
|
+
if (!serviceName) {
|
|
5946
|
+
return;
|
|
5947
|
+
}
|
|
5901
5948
|
const actors = ctx.actors ?? [];
|
|
5902
5949
|
for (const actor of actors) {
|
|
5903
5950
|
const data = {
|
|
5904
5951
|
...buildActorRegistrationData(actor),
|
|
5905
|
-
service_name:
|
|
5952
|
+
service_name: serviceName
|
|
5906
5953
|
};
|
|
5907
5954
|
if (!data.name) {
|
|
5908
5955
|
continue;
|
|
@@ -5958,7 +6005,11 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5958
6005
|
if (!metadata?.actorName) {
|
|
5959
6006
|
return;
|
|
5960
6007
|
}
|
|
5961
|
-
const
|
|
6008
|
+
const serviceName = resolveSyncServiceName(task);
|
|
6009
|
+
if (!serviceName) {
|
|
6010
|
+
return;
|
|
6011
|
+
}
|
|
6012
|
+
const registrationKey = `${metadata.actorName}|${task.name}|${task.version}|${serviceName}`;
|
|
5962
6013
|
if (this.registeredActorTaskMaps.has(registrationKey)) {
|
|
5963
6014
|
return;
|
|
5964
6015
|
}
|
|
@@ -5968,7 +6019,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
5968
6019
|
actor_version: 1,
|
|
5969
6020
|
task_name: task.name,
|
|
5970
6021
|
task_version: task.version,
|
|
5971
|
-
service_name:
|
|
6022
|
+
service_name: serviceName,
|
|
5972
6023
|
mode: metadata.mode,
|
|
5973
6024
|
description: task.description ?? metadata.actorDescription ?? "",
|
|
5974
6025
|
is_meta: metadata.actorKind === "meta" || task.isMeta === true
|
|
@@ -6023,6 +6074,10 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6023
6074
|
function* (ctx) {
|
|
6024
6075
|
const task = ctx.task;
|
|
6025
6076
|
if (task.hidden || !task.register) return;
|
|
6077
|
+
const serviceName = resolveSyncServiceName(task);
|
|
6078
|
+
if (!serviceName) {
|
|
6079
|
+
return;
|
|
6080
|
+
}
|
|
6026
6081
|
for (const signal of task.observedSignals) {
|
|
6027
6082
|
const _signal = signal.split(":")[0];
|
|
6028
6083
|
if (task.registeredSignals.has(signal)) continue;
|
|
@@ -6033,7 +6088,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6033
6088
|
isGlobal,
|
|
6034
6089
|
taskName: task.name,
|
|
6035
6090
|
taskVersion: task.version,
|
|
6036
|
-
serviceName
|
|
6091
|
+
serviceName
|
|
6037
6092
|
},
|
|
6038
6093
|
__taskName: task.name,
|
|
6039
6094
|
__signal: signal
|
|
@@ -6059,6 +6114,46 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6059
6114
|
{ concurrency: 30 }
|
|
6060
6115
|
) : CadenzaService.get("dbInsertSignalToTaskMap"))?.then(registerSignalTask)
|
|
6061
6116
|
);
|
|
6117
|
+
this.splitIntentsTask = CadenzaService.createMetaTask(
|
|
6118
|
+
"Split intents for registration",
|
|
6119
|
+
function* (ctx) {
|
|
6120
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
6121
|
+
delayMs: 3e3
|
|
6122
|
+
});
|
|
6123
|
+
const intents = Array.isArray(ctx.intents) ? ctx.intents : Array.from(CadenzaService.inquiryBroker.intents.values());
|
|
6124
|
+
for (const intent of intents) {
|
|
6125
|
+
const intentData = buildIntentRegistryData(intent);
|
|
6126
|
+
if (!intentData) {
|
|
6127
|
+
continue;
|
|
6128
|
+
}
|
|
6129
|
+
if (this.registeredIntentDefinitions.has(intentData.name)) {
|
|
6130
|
+
continue;
|
|
6131
|
+
}
|
|
6132
|
+
yield {
|
|
6133
|
+
data: intentData,
|
|
6134
|
+
__intentName: intentData.name
|
|
6135
|
+
};
|
|
6136
|
+
}
|
|
6137
|
+
}.bind(this)
|
|
6138
|
+
).then(
|
|
6139
|
+
insertIntentRegistryTask?.then(
|
|
6140
|
+
CadenzaService.createMetaTask("Record intent definition registration", (ctx) => {
|
|
6141
|
+
if (!ctx.__syncing) {
|
|
6142
|
+
return;
|
|
6143
|
+
}
|
|
6144
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
6145
|
+
delayMs: 3e3
|
|
6146
|
+
});
|
|
6147
|
+
this.registeredIntentDefinitions.add(ctx.__intentName);
|
|
6148
|
+
return true;
|
|
6149
|
+
}).then(
|
|
6150
|
+
CadenzaService.createUniqueMetaTask(
|
|
6151
|
+
"Gather intent registration",
|
|
6152
|
+
() => true
|
|
6153
|
+
).emits("meta.sync_controller.synced_intents")
|
|
6154
|
+
)
|
|
6155
|
+
)
|
|
6156
|
+
);
|
|
6062
6157
|
const registerIntentTask = CadenzaService.createMetaTask(
|
|
6063
6158
|
"Record intent registration",
|
|
6064
6159
|
(ctx) => {
|
|
@@ -6078,6 +6173,10 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6078
6173
|
function* (ctx) {
|
|
6079
6174
|
const task = ctx.task;
|
|
6080
6175
|
if (task.hidden || !task.register) return;
|
|
6176
|
+
const serviceName = resolveSyncServiceName(task);
|
|
6177
|
+
if (!serviceName) {
|
|
6178
|
+
return;
|
|
6179
|
+
}
|
|
6081
6180
|
task.__registeredIntents = task.__registeredIntents ?? /* @__PURE__ */ new Set();
|
|
6082
6181
|
task.__invalidMetaIntentWarnings = task.__invalidMetaIntentWarnings ?? /* @__PURE__ */ new Set();
|
|
6083
6182
|
for (const intent of task.handlesIntents) {
|
|
@@ -6097,36 +6196,75 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6097
6196
|
}
|
|
6098
6197
|
continue;
|
|
6099
6198
|
}
|
|
6199
|
+
const intentDefinition = buildIntentRegistryData(CadenzaService.inquiryBroker.intents.get(intent)) ?? buildIntentRegistryData({ name: intent });
|
|
6200
|
+
if (!intentDefinition) {
|
|
6201
|
+
continue;
|
|
6202
|
+
}
|
|
6100
6203
|
yield {
|
|
6101
6204
|
data: {
|
|
6102
6205
|
intentName: intent,
|
|
6103
6206
|
taskName: task.name,
|
|
6104
6207
|
taskVersion: task.version,
|
|
6105
|
-
serviceName
|
|
6208
|
+
serviceName
|
|
6106
6209
|
},
|
|
6107
6210
|
__taskName: task.name,
|
|
6108
|
-
__intent: intent
|
|
6211
|
+
__intent: intent,
|
|
6212
|
+
__intentDefinition: intentDefinition,
|
|
6213
|
+
__intentMapData: {
|
|
6214
|
+
intentName: intent,
|
|
6215
|
+
taskName: task.name,
|
|
6216
|
+
taskVersion: task.version,
|
|
6217
|
+
serviceName
|
|
6218
|
+
}
|
|
6109
6219
|
};
|
|
6110
6220
|
}
|
|
6111
6221
|
}
|
|
6112
6222
|
).then(
|
|
6113
|
-
|
|
6114
|
-
"
|
|
6115
|
-
{
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
"intent_name",
|
|
6119
|
-
"task_name",
|
|
6120
|
-
"task_version",
|
|
6121
|
-
"service_name"
|
|
6122
|
-
],
|
|
6123
|
-
action: {
|
|
6124
|
-
do: "nothing"
|
|
6125
|
-
}
|
|
6223
|
+
CadenzaService.createMetaTask(
|
|
6224
|
+
"Prepare intent definition for intent-to-task map",
|
|
6225
|
+
(ctx) => {
|
|
6226
|
+
if (!ctx.__intentDefinition || !ctx.__intentMapData) {
|
|
6227
|
+
return false;
|
|
6126
6228
|
}
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6229
|
+
return {
|
|
6230
|
+
...ctx,
|
|
6231
|
+
data: ctx.__intentDefinition
|
|
6232
|
+
};
|
|
6233
|
+
}
|
|
6234
|
+
).then(
|
|
6235
|
+
insertIntentRegistryTask?.then(
|
|
6236
|
+
CadenzaService.createMetaTask(
|
|
6237
|
+
"Restore intent-to-task map payload",
|
|
6238
|
+
(ctx) => {
|
|
6239
|
+
if (!ctx.__intentMapData) {
|
|
6240
|
+
return false;
|
|
6241
|
+
}
|
|
6242
|
+
return {
|
|
6243
|
+
...ctx,
|
|
6244
|
+
data: ctx.__intentMapData
|
|
6245
|
+
};
|
|
6246
|
+
}
|
|
6247
|
+
).then(
|
|
6248
|
+
(this.isCadenzaDBReady ? CadenzaService.createCadenzaDBInsertTask(
|
|
6249
|
+
"intent_to_task_map",
|
|
6250
|
+
{
|
|
6251
|
+
onConflict: {
|
|
6252
|
+
target: [
|
|
6253
|
+
"intent_name",
|
|
6254
|
+
"task_name",
|
|
6255
|
+
"task_version",
|
|
6256
|
+
"service_name"
|
|
6257
|
+
],
|
|
6258
|
+
action: {
|
|
6259
|
+
do: "nothing"
|
|
6260
|
+
}
|
|
6261
|
+
}
|
|
6262
|
+
},
|
|
6263
|
+
{ concurrency: 30 }
|
|
6264
|
+
) : CadenzaService.get("dbInsertIntentToTaskMap"))?.then(registerIntentTask)
|
|
6265
|
+
)
|
|
6266
|
+
)
|
|
6267
|
+
)
|
|
6130
6268
|
);
|
|
6131
6269
|
this.registerTaskMapTask = CadenzaService.createMetaTask(
|
|
6132
6270
|
"Register task map to DB",
|
|
@@ -6136,18 +6274,26 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6136
6274
|
delayMs: 3e3
|
|
6137
6275
|
});
|
|
6138
6276
|
if (task.hidden || !task.register) return;
|
|
6277
|
+
const predecessorServiceName = resolveSyncServiceName(task);
|
|
6278
|
+
if (!predecessorServiceName) {
|
|
6279
|
+
return;
|
|
6280
|
+
}
|
|
6139
6281
|
for (const t of task.nextTasks) {
|
|
6140
6282
|
if (task.taskMapRegistration.has(t.name) || t.hidden || !t.register) {
|
|
6141
6283
|
continue;
|
|
6142
6284
|
}
|
|
6285
|
+
const serviceName = resolveSyncServiceName(t);
|
|
6286
|
+
if (!serviceName) {
|
|
6287
|
+
continue;
|
|
6288
|
+
}
|
|
6143
6289
|
yield {
|
|
6144
6290
|
data: {
|
|
6145
6291
|
taskName: t.name,
|
|
6146
6292
|
taskVersion: t.version,
|
|
6147
6293
|
predecessorTaskName: task.name,
|
|
6148
6294
|
predecessorTaskVersion: task.version,
|
|
6149
|
-
serviceName
|
|
6150
|
-
predecessorServiceName
|
|
6295
|
+
serviceName,
|
|
6296
|
+
predecessorServiceName
|
|
6151
6297
|
},
|
|
6152
6298
|
__taskName: task.name,
|
|
6153
6299
|
__nextTaskName: t.name
|
|
@@ -6194,14 +6340,19 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6194
6340
|
if (task.hidden || !task.register) return;
|
|
6195
6341
|
if (task.isDeputy && !task.signalName) {
|
|
6196
6342
|
if (task.registeredDeputyMap) return;
|
|
6343
|
+
const serviceName = resolveSyncServiceName(task);
|
|
6344
|
+
const predecessorServiceName = resolveSyncServiceName();
|
|
6345
|
+
if (!serviceName || !predecessorServiceName) {
|
|
6346
|
+
return;
|
|
6347
|
+
}
|
|
6197
6348
|
return {
|
|
6198
6349
|
data: {
|
|
6199
6350
|
task_name: task.remoteRoutineName,
|
|
6200
6351
|
task_version: 1,
|
|
6201
|
-
service_name:
|
|
6352
|
+
service_name: serviceName,
|
|
6202
6353
|
predecessor_task_name: task.name,
|
|
6203
6354
|
predecessor_task_version: task.version,
|
|
6204
|
-
predecessor_service_name:
|
|
6355
|
+
predecessor_service_name: predecessorServiceName
|
|
6205
6356
|
},
|
|
6206
6357
|
__taskName: task.name
|
|
6207
6358
|
};
|
|
@@ -6246,6 +6397,12 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6246
6397
|
"meta.service_registry.initial_sync_complete"
|
|
6247
6398
|
).then(this.splitSignalsTask);
|
|
6248
6399
|
CadenzaService.registry.getAllTasks.clone().doOn("meta.sync_controller.synced_signals").then(this.splitTasksForRegistration);
|
|
6400
|
+
CadenzaService.createMetaTask("Get all intents", (ctx) => {
|
|
6401
|
+
return {
|
|
6402
|
+
...ctx,
|
|
6403
|
+
intents: Array.from(CadenzaService.inquiryBroker.intents.values())
|
|
6404
|
+
};
|
|
6405
|
+
}).doOn("meta.sync_controller.synced_tasks").then(this.splitIntentsTask);
|
|
6249
6406
|
CadenzaService.registry.getAllRoutines.clone().doOn("meta.sync_controller.synced_tasks").then(this.splitRoutinesTask);
|
|
6250
6407
|
CadenzaService.createMetaTask("Get all actors", (ctx) => {
|
|
6251
6408
|
return {
|
|
@@ -6256,9 +6413,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6256
6413
|
CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks").then(
|
|
6257
6414
|
this.registerTaskMapTask,
|
|
6258
6415
|
this.registerSignalToTaskMapTask,
|
|
6259
|
-
this.registerIntentToTaskMapTask,
|
|
6260
6416
|
this.registerDeputyRelationshipTask
|
|
6261
6417
|
);
|
|
6418
|
+
CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_intents").then(this.registerIntentToTaskMapTask);
|
|
6262
6419
|
CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_actors").then(this.registerActorTaskMapTask);
|
|
6263
6420
|
CadenzaService.registry.getAllRoutines.clone().doOn("meta.sync_controller.synced_routines").then(this.splitTasksInRoutines);
|
|
6264
6421
|
CadenzaService.createMetaTask("Finish sync", (ctx, emit) => {
|
|
@@ -6325,6 +6482,15 @@ function readConfiguredPort(value) {
|
|
|
6325
6482
|
function buildBootstrapUrl(protocol, address, port) {
|
|
6326
6483
|
return `${protocol}://${address}:${port}`;
|
|
6327
6484
|
}
|
|
6485
|
+
function readExplicitPortFromOrigin(raw) {
|
|
6486
|
+
const match = raw.match(
|
|
6487
|
+
/^[a-z]+:\/\/(?:\[[^\]]+\]|[^\/?#:]+):(\d+)(?:\/)?$/i
|
|
6488
|
+
);
|
|
6489
|
+
if (!match?.[1]) {
|
|
6490
|
+
return void 0;
|
|
6491
|
+
}
|
|
6492
|
+
return readConfiguredPort(match[1]);
|
|
6493
|
+
}
|
|
6328
6494
|
function resolveInjectedBootstrapUrl(injectedGlobalKey) {
|
|
6329
6495
|
if (typeof globalThis === "undefined") {
|
|
6330
6496
|
return void 0;
|
|
@@ -6414,7 +6580,8 @@ function resolveBootstrapEndpoint(options) {
|
|
|
6414
6580
|
"Bootstrap URL must be an origin without a path component."
|
|
6415
6581
|
);
|
|
6416
6582
|
}
|
|
6417
|
-
const
|
|
6583
|
+
const explicitPort = readExplicitPortFromOrigin(raw);
|
|
6584
|
+
const port2 = explicitPort ?? (parsed2.port ? readConfiguredPort(parsed2.port) : fallbackPort);
|
|
6418
6585
|
if (!port2) {
|
|
6419
6586
|
throw new Error(
|
|
6420
6587
|
"Bootstrap URL must include a port or CADENZA_DB_PORT must be provided."
|
|
@@ -6508,9 +6675,9 @@ var CadenzaService = class {
|
|
|
6508
6675
|
static normalizeDeclaredTransports(transports, serviceId) {
|
|
6509
6676
|
return (transports ?? []).map((transport) => normalizeServiceTransportConfig(transport)).filter(
|
|
6510
6677
|
(transport) => !!transport
|
|
6511
|
-
).map((transport
|
|
6678
|
+
).map((transport) => ({
|
|
6512
6679
|
...transport,
|
|
6513
|
-
uuid:
|
|
6680
|
+
uuid: uuid3()
|
|
6514
6681
|
}));
|
|
6515
6682
|
}
|
|
6516
6683
|
static createBootstrapTransport(serviceInstanceId, role, endpoint) {
|