@mat3ra/wode 2026.11.3-0 → 2026.11.17-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.
@@ -138,6 +138,10 @@ class ExecutionUnit extends BaseUnit_1.default {
138
138
  setDefaultInput({ reusePersistedInput = true } = {}) {
139
139
  const driverTemplates = new standata_1.ApplicationRegistry().getInput(this.application, this.flavor);
140
140
  const persistedItems = reusePersistedInput ? this.matchPersistedInput(driverTemplates) : [];
141
+ // `matchPersistedInput` returns rows of `this.input` itself, so identity is the match.
142
+ const addedItems = reusePersistedInput
143
+ ? this.input.filter((item) => !persistedItems.includes(item) && this.isPersistedInputItemCompatible(item))
144
+ : [];
141
145
  this.inputInstances = driverTemplates.map((driverTemplate, index) => {
142
146
  const persistedItem = persistedItems[index];
143
147
  if (persistedItem && this.isPersistedInputItemCompatible(persistedItem)) {
@@ -145,6 +149,7 @@ class ExecutionUnit extends BaseUnit_1.default {
145
149
  }
146
150
  return ExecutionUnitInput_1.default.createFromTemplate(driverTemplate);
147
151
  });
152
+ this.inputInstances.push(...addedItems.map((item) => new ExecutionUnitInput_1.default(item)));
148
153
  this.input = this.inputInstances.map((input) => input.toJSON());
149
154
  }
150
155
  render(externalContext, convergence) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/wode",
3
- "version": "2026.11.3-0",
3
+ "version": "2026.11.17-0",
4
4
  "description": "WOrkflow DEfinitions",
5
5
  "scripts": {
6
6
  "test": "mocha --recursive --bail --require ts-node/register 'tests/js/**/*.ts'",
@@ -205,6 +205,13 @@ class ExecutionUnit extends BaseUnit<Schema> implements Schema {
205
205
  setDefaultInput({ reusePersistedInput = true }: { reusePersistedInput?: boolean } = {}) {
206
206
  const driverTemplates = new ApplicationRegistry().getInput(this.application, this.flavor);
207
207
  const persistedItems = reusePersistedInput ? this.matchPersistedInput(driverTemplates) : [];
208
+ // `matchPersistedInput` returns rows of `this.input` itself, so identity is the match.
209
+ const addedItems = reusePersistedInput
210
+ ? this.input.filter(
211
+ (item) =>
212
+ !persistedItems.includes(item) && this.isPersistedInputItemCompatible(item),
213
+ )
214
+ : [];
208
215
 
209
216
  this.inputInstances = driverTemplates.map((driverTemplate, index) => {
210
217
  const persistedItem = persistedItems[index];
@@ -215,6 +222,7 @@ class ExecutionUnit extends BaseUnit<Schema> implements Schema {
215
222
 
216
223
  return ExecutionUnitInput.createFromTemplate(driverTemplate);
217
224
  });
225
+ this.inputInstances.push(...addedItems.map((item) => new ExecutionUnitInput(item)));
218
226
 
219
227
  this.input = this.inputInstances.map((input) => input.toJSON());
220
228
  }