@codemation/host 0.0.18 → 0.0.19
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/CHANGELOG.md +13 -0
- package/dist/{AppConfigFactory-Co4STjwt.d.ts → AppConfigFactory-CaeFn4e9.d.ts} +3 -3
- package/dist/{AppContainerFactory-z9aUDFiJ.js → AppContainerFactory-iVVEyHli.js} +10 -49
- package/dist/AppContainerFactory-iVVEyHli.js.map +1 -0
- package/dist/{CodemationConfig-COs4GcOE.d.ts → CodemationConfig--9jFRY-f.d.ts} +2 -2
- package/dist/{CodemationConfigNormalizer-B7w1JA_2.d.ts → CodemationConfigNormalizer-GV9M0JnA.d.ts} +2 -2
- package/dist/{CodemationConsumerConfigLoader-OlXKw-us.d.ts → CodemationConsumerConfigLoader-CMUTDn8g.d.ts} +2 -2
- package/dist/{CodemationPluginListMerger-_ZIiOQxB.d.ts → CodemationPluginListMerger-HKzQ5LMM.d.ts} +5 -5
- package/dist/{CredentialServices-D3VTczpC.d.ts → CredentialServices-5WS6gdqW.d.ts} +3 -3
- package/dist/{PublicFrontendBootstrapFactory-CE4oGogq.d.ts → PublicFrontendBootstrapFactory-DIbPtB7-.d.ts} +2 -2
- package/dist/consumer.d.ts +4 -4
- package/dist/credentials.d.ts +3 -3
- package/dist/devServerSidecar.d.ts +1 -1
- package/dist/{index-DbYzycTC.d.ts → index-BYbzmUwS.d.ts} +10 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +2 -2
- package/dist/nextServer.d.ts +7 -7
- package/dist/nextServer.js +1 -1
- package/dist/{persistenceServer-Cr-zCuEr.d.ts → persistenceServer-D3dthjEX.d.ts} +2 -2
- package/dist/persistenceServer.d.ts +5 -5
- package/dist/{server-B6k53aZj.d.ts → server-Cm3qiXA1.d.ts} +5 -5
- package/dist/{server-DDVXr7BN.js → server-CvlA-UY1.js} +2 -2
- package/dist/{server-DDVXr7BN.js.map → server-CvlA-UY1.js.map} +1 -1
- package/dist/server.d.ts +8 -8
- package/dist/server.js +2 -2
- package/package.json +5 -5
- package/src/application/commands/ReplayWorkflowNodeCommandHandler.ts +4 -37
- package/src/application/commands/StartWorkflowRunCommandHandler.ts +5 -62
- package/dist/AppContainerFactory-z9aUDFiJ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @codemation/host
|
|
2
2
|
|
|
3
|
+
## 0.0.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#26](https://github.com/MadeRelevant/codemation/pull/26) [`405c854`](https://github.com/MadeRelevant/codemation/commit/405c8541961f41dcba653f352691a821b0470ca0) Thanks [@cblokland90](https://github.com/cblokland90)! - Fix manual trigger reruns and current-state resume behavior.
|
|
8
|
+
|
|
9
|
+
Current-state execution now treats empty upstream outputs like the live queue planner, so untaken branches stay dead on resume. Manual downstream runs can also synthesize trigger test items through core intent handling instead of relying on host-specific trigger logic.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`405c854`](https://github.com/MadeRelevant/codemation/commit/405c8541961f41dcba653f352691a821b0470ca0)]:
|
|
12
|
+
- @codemation/core@0.0.19
|
|
13
|
+
- @codemation/core-nodes@0.0.19
|
|
14
|
+
- @codemation/eventbus-redis@0.0.19
|
|
15
|
+
|
|
3
16
|
## 0.0.18
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as AppPersistenceConfig, g as AppConfig } from "./CodemationConfig-
|
|
2
|
-
import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-
|
|
1
|
+
import { _ as AppPersistenceConfig, g as AppConfig } from "./CodemationConfig--9jFRY-f.js";
|
|
2
|
+
import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-GV9M0JnA.js";
|
|
3
3
|
import { AnyNull, AnyNullClass, DbNull, DbNullClass, Decimal, JsonNull, JsonNullClass, NullTypes as NullTypes$1, ObjectEnumValue, PrismaClientInitializationError, PrismaClientKnownRequestError, PrismaClientRustPanicError, PrismaClientUnknownRequestError, PrismaClientValidationError, RawValue, Sql, Value, empty, isAnyNull, isDbNull, isJsonNull, isObjectEnumValue, join, raw, sql as sqltag } from "@prisma/client-runtime-utils";
|
|
4
4
|
|
|
5
5
|
//#region src/infrastructure/persistence/generated/prisma-client/runtime/client.d.ts
|
|
@@ -22015,4 +22015,4 @@ declare class AppConfigFactory {
|
|
|
22015
22015
|
}
|
|
22016
22016
|
//#endregion
|
|
22017
22017
|
export { PrismaMigrationDeployer as n, PrismaClient as r, AppConfigFactory as t };
|
|
22018
|
-
//# sourceMappingURL=AppConfigFactory-
|
|
22018
|
+
//# sourceMappingURL=AppConfigFactory-CaeFn4e9.d.ts.map
|
|
@@ -887,12 +887,7 @@ let ReplayWorkflowNodeCommandHandler = class ReplayWorkflowNodeCommandHandler$1
|
|
|
887
887
|
if (!workflow) throw new ApplicationRequestError(404, "Unknown workflow for run");
|
|
888
888
|
const decodedNodeId = decodeURIComponent(command.nodeId);
|
|
889
889
|
const mode = command.body.mode ?? state.executionOptions?.mode ?? "manual";
|
|
890
|
-
const requestedItems =
|
|
891
|
-
workflow,
|
|
892
|
-
nodeId: decodedNodeId,
|
|
893
|
-
items: command.body.items,
|
|
894
|
-
synthesizeTriggerItems: command.body.synthesizeTriggerItems
|
|
895
|
-
});
|
|
890
|
+
const requestedItems = this.resolveRequestedItems(command.body.items);
|
|
896
891
|
const mutableStateBase = this.cloneMutableState(state.mutableState) ?? { nodesById: {} };
|
|
897
892
|
const mutableState = requestedItems ? { nodesById: {
|
|
898
893
|
...mutableStateBase.nodesById,
|
|
@@ -913,6 +908,7 @@ let ReplayWorkflowNodeCommandHandler = class ReplayWorkflowNodeCommandHandler$1
|
|
|
913
908
|
nodeId: decodedNodeId,
|
|
914
909
|
currentState: this.cloneRunCurrentState(state, mutableState),
|
|
915
910
|
items: requestedItems,
|
|
911
|
+
synthesizeTriggerItems: command.body.synthesizeTriggerItems,
|
|
916
912
|
executionOptions,
|
|
917
913
|
workflowSnapshot: this.cloneWorkflowSnapshot(state.workflowSnapshot),
|
|
918
914
|
mutableState
|
|
@@ -950,18 +946,8 @@ let ReplayWorkflowNodeCommandHandler = class ReplayWorkflowNodeCommandHandler$1
|
|
|
950
946
|
mutableState
|
|
951
947
|
};
|
|
952
948
|
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
if (!this.shouldSynthesizeTriggerItems(args.workflow, args.nodeId, args.synthesizeTriggerItems, normalizedItems)) return normalizedItems;
|
|
956
|
-
return await this.engine.createTriggerTestItems({
|
|
957
|
-
workflow: args.workflow,
|
|
958
|
-
nodeId: args.nodeId
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
shouldSynthesizeTriggerItems(workflow, nodeId, synthesizeTriggerItems, normalizedItems) {
|
|
962
|
-
if (synthesizeTriggerItems) return true;
|
|
963
|
-
if (normalizedItems && normalizedItems.length > 0) return false;
|
|
964
|
-
return workflow.nodes.find((node) => node.id === nodeId)?.kind === "trigger";
|
|
949
|
+
resolveRequestedItems(items) {
|
|
950
|
+
return items == null ? void 0 : this.itemsInputNormalizer.normalize(items);
|
|
965
951
|
}
|
|
966
952
|
};
|
|
967
953
|
ReplayWorkflowNodeCommandHandler = __decorate([
|
|
@@ -1205,11 +1191,7 @@ let StartWorkflowRunCommandHandler = class StartWorkflowRunCommandHandler$1 exte
|
|
|
1205
1191
|
} : void 0;
|
|
1206
1192
|
const legacyStartNodeId = body.startAt;
|
|
1207
1193
|
const clearFromNodeId = body.clearFromNodeId;
|
|
1208
|
-
const requestedItems =
|
|
1209
|
-
workflow,
|
|
1210
|
-
body,
|
|
1211
|
-
clearFromNodeId
|
|
1212
|
-
});
|
|
1194
|
+
const requestedItems = this.resolveRequestedItems(body);
|
|
1213
1195
|
const items = this.resolveRunRequestItems(workflow, legacyStartNodeId, requestedItems);
|
|
1214
1196
|
const currentState = this.createCurrentState({
|
|
1215
1197
|
workflowId: body.workflowId,
|
|
@@ -1222,6 +1204,7 @@ let StartWorkflowRunCommandHandler = class StartWorkflowRunCommandHandler$1 exte
|
|
|
1222
1204
|
nodeId: legacyStartNodeId,
|
|
1223
1205
|
currentState,
|
|
1224
1206
|
items: requestedItems,
|
|
1207
|
+
synthesizeTriggerItems: body.synthesizeTriggerItems,
|
|
1225
1208
|
executionOptions,
|
|
1226
1209
|
workflowSnapshot: sourceState?.workflowSnapshot,
|
|
1227
1210
|
mutableState: this.cloneMutableState(currentState.mutableState)
|
|
@@ -1229,6 +1212,7 @@ let StartWorkflowRunCommandHandler = class StartWorkflowRunCommandHandler$1 exte
|
|
|
1229
1212
|
workflow,
|
|
1230
1213
|
startAt: legacyStartNodeId && !body.sourceRunId && !body.stopAt ? legacyStartNodeId : void 0,
|
|
1231
1214
|
items,
|
|
1215
|
+
synthesizeTriggerItems: body.synthesizeTriggerItems,
|
|
1232
1216
|
executionOptions,
|
|
1233
1217
|
workflowSnapshot: sourceState?.workflowSnapshot,
|
|
1234
1218
|
mutableState: this.cloneMutableState(currentState.mutableState),
|
|
@@ -1266,36 +1250,13 @@ let StartWorkflowRunCommandHandler = class StartWorkflowRunCommandHandler$1 exte
|
|
|
1266
1250
|
if (items !== void 0) return items;
|
|
1267
1251
|
return this.isTriggerStart(workflow, startAt) ? [] : [{ json: {} }];
|
|
1268
1252
|
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
const normalizedItems = args.body.items == null ? void 0 : this.itemsInputNormalizer.normalize(args.body.items);
|
|
1272
|
-
if (!this.shouldSynthesizeTriggerItems(args.body, triggerNodeId, normalizedItems)) return normalizedItems;
|
|
1273
|
-
return await this.engine.createTriggerTestItems({
|
|
1274
|
-
workflow: args.workflow,
|
|
1275
|
-
nodeId: triggerNodeId
|
|
1276
|
-
});
|
|
1253
|
+
resolveRequestedItems(body) {
|
|
1254
|
+
return body.items == null ? void 0 : this.itemsInputNormalizer.normalize(body.items);
|
|
1277
1255
|
}
|
|
1278
1256
|
isTriggerStart(workflow, startAt) {
|
|
1279
1257
|
const resolvedStartAt = startAt ?? workflow.nodes.find((node) => node.kind === "trigger")?.id ?? workflow.nodes[0]?.id;
|
|
1280
1258
|
return (resolvedStartAt ? workflow.nodes.find((node) => node.id === resolvedStartAt) : void 0)?.kind === "trigger";
|
|
1281
1259
|
}
|
|
1282
|
-
resolveTriggerTestNodeId(args) {
|
|
1283
|
-
const stopAtNodeId = args.body.stopAt;
|
|
1284
|
-
if (stopAtNodeId && this.isTriggerNode(args.workflow, stopAtNodeId)) return stopAtNodeId;
|
|
1285
|
-
if (!args.body.sourceRunId && !args.clearFromNodeId && !stopAtNodeId) {
|
|
1286
|
-
if (args.body.currentState && !args.body.synthesizeTriggerItems) return;
|
|
1287
|
-
return args.workflow.nodes.find((node) => node.kind === "trigger")?.id;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
shouldSynthesizeTriggerItems(body, triggerNodeId, normalizedItems) {
|
|
1291
|
-
if (!triggerNodeId) return false;
|
|
1292
|
-
if (body.synthesizeTriggerItems) return true;
|
|
1293
|
-
if (normalizedItems && normalizedItems.length > 0) return false;
|
|
1294
|
-
return body.stopAt === triggerNodeId;
|
|
1295
|
-
}
|
|
1296
|
-
isTriggerNode(workflow, nodeId) {
|
|
1297
|
-
return workflow.nodes.find((node) => node.id === nodeId)?.kind === "trigger";
|
|
1298
|
-
}
|
|
1299
1260
|
cloneMutableState(mutableState) {
|
|
1300
1261
|
if (!mutableState) return;
|
|
1301
1262
|
return JSON.parse(JSON.stringify(mutableState));
|
|
@@ -5830,4 +5791,4 @@ var AppContainerFactory = class AppContainerFactory {
|
|
|
5830
5791
|
|
|
5831
5792
|
//#endregion
|
|
5832
5793
|
export { GetWorkflowDetailQuery as C, ListUserAccountsQuery as E, GetWorkflowSummariesQuery as S, UpsertLocalBootstrapUserCommand as T, CodemationFrontendAuthSnapshotFactory as _, AppContainerLifecycle as a, WorkflowDefinitionMapper as b, RequestToWebhookItemMapper as c, CredentialHttpRouteHandler as d, CodemationHonoApiApp as f, FrontendAppConfigFactory as g, InternalAuthBootstrapFactory as h, DatabaseMigrations as i, RunHttpRouteHandler as l, PublicFrontendBootstrapFactory as m, WorkerRuntime as n, WorkflowHttpRouteHandler as o, BinaryHttpRouteHandler as p, FrontendRuntime as r, WebhookHttpRouteHandler as s, AppContainerFactory as t, OAuth2HttpRouteHandler as u, WorkflowWebsocketServer as v, RunBinaryAttachmentLookupService as w, WorkflowPolicyUiPresentationFactory as x, ApiPaths as y };
|
|
5833
|
-
//# sourceMappingURL=AppContainerFactory-
|
|
5794
|
+
//# sourceMappingURL=AppContainerFactory-iVVEyHli.js.map
|