@cadenza.io/service 1.27.1 → 1.27.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.
- package/dist/index.js +24 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3620,7 +3620,7 @@ var DatabaseController = class _DatabaseController {
|
|
|
3620
3620
|
if (typeof value === "object" && value !== null && "subOperation" in value) {
|
|
3621
3621
|
const subOp = value;
|
|
3622
3622
|
const subResult = await this.executeSubOperation(subOp);
|
|
3623
|
-
resolved[key] = subResult[subOp.return || "
|
|
3623
|
+
resolved[key] = subResult[subOp.return || "uuid"] ?? subResult;
|
|
3624
3624
|
} else if (typeof value === "string" && ["increment", "decrement", "set"].includes(value)) {
|
|
3625
3625
|
resolved[key] = { __effect: value };
|
|
3626
3626
|
} else if (typeof value === "object") {
|
|
@@ -3649,12 +3649,17 @@ var DatabaseController = class _DatabaseController {
|
|
|
3649
3649
|
const resolvedData = await this.resolveNestedData(op.data, op.table);
|
|
3650
3650
|
const sql = `INSERT INTO ${op.table} (${Object.keys(resolvedData).join(", ")}) VALUES (${Object.values(
|
|
3651
3651
|
resolvedData
|
|
3652
|
-
).map((_, i) => `$${i + 1}`).join(
|
|
3653
|
-
", "
|
|
3654
|
-
)}) ON CONFLICT DO NOTHING RETURNING ${op.return === "uuid" ? "uuid" : "*"}`;
|
|
3652
|
+
).map((_, i) => `$${i + 1}`).join(", ")}) ON CONFLICT DO NOTHING RETURNING ${op.return ?? "*"}`;
|
|
3655
3653
|
result = await client.query(sql, Object.values(resolvedData));
|
|
3654
|
+
console.log(
|
|
3655
|
+
"sub operation",
|
|
3656
|
+
sql,
|
|
3657
|
+
Object.values(resolvedData),
|
|
3658
|
+
result.rows,
|
|
3659
|
+
op.return
|
|
3660
|
+
);
|
|
3656
3661
|
result = result.rows[0];
|
|
3657
|
-
if (!result
|
|
3662
|
+
if (!result) {
|
|
3658
3663
|
result = resolvedData.uuid ? { uuid: resolvedData.uuid } : void 0;
|
|
3659
3664
|
}
|
|
3660
3665
|
} else if (op.subOperation === "query") {
|
|
@@ -3976,9 +3981,22 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
3976
3981
|
_signal = signal.split(".").slice(1).join(".");
|
|
3977
3982
|
}
|
|
3978
3983
|
if (task.registeredSignals.has(_signal)) continue;
|
|
3984
|
+
const { isMeta, sourceServiceName, domain, action } = decomposeSignalName(_signal);
|
|
3979
3985
|
yield {
|
|
3980
3986
|
data: {
|
|
3981
|
-
signalName:
|
|
3987
|
+
signalName: {
|
|
3988
|
+
subOperation: "insert",
|
|
3989
|
+
table: "signal_registry",
|
|
3990
|
+
data: {
|
|
3991
|
+
name: _signal,
|
|
3992
|
+
service_name: CadenzaService.serviceRegistry.serviceName,
|
|
3993
|
+
is_meta: isMeta,
|
|
3994
|
+
source_service_name: sourceServiceName,
|
|
3995
|
+
domain,
|
|
3996
|
+
action
|
|
3997
|
+
},
|
|
3998
|
+
return: "name"
|
|
3999
|
+
},
|
|
3982
4000
|
taskName: task.name,
|
|
3983
4001
|
taskVersion: task.version,
|
|
3984
4002
|
taskServiceName: CadenzaService.serviceRegistry.serviceName,
|