@mat3ra/wode 2026.7.29-0 → 2026.7.29-1

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.
@@ -33,14 +33,24 @@ class ExecutionUnitInput extends entity_1.InMemoryEntity {
33
33
  try {
34
34
  const rendered = nunjucks_1.default.compile(this.template.content, env).render(renderingContext);
35
35
  this.rendered = rendered || this.template.content;
36
- return this;
37
36
  }
38
37
  catch (error) {
38
+ // Can happen transiently right after switching to a multi-material workflow (e.g.
39
+ // interface left/right units keyed by MATERIAL_INDEX "1"/"2"), before the job's
40
+ // materials have been updated to match: `input.perMaterial[MATERIAL_INDEX]` is
41
+ // undefined until enough materials are assigned. This throwing used to propagate out
42
+ // of `ExecutionUnit.render()` and up through the JOB_WORKFLOW_SYNC/JOB_UPDATE
43
+ // reducers, aborting the whole dispatch - so the workflow selection itself silently
44
+ // never applied to the job (job-designer's `onSelectWorkflowsSubmit` just logs the
45
+ // rejected promise). Fall back to the raw template so the reducer can complete;
46
+ // render() runs again on the next job/material update and renders correctly once
47
+ // materials line up.
39
48
  console.error("Error rendering template", this.template.content);
40
49
  console.error("Rendering context: ", JSON.stringify(renderingContext));
41
50
  console.error("Error", error);
42
- throw error;
51
+ this.rendered = this.template.content;
43
52
  }
53
+ return this;
44
54
  }
45
55
  }
46
56
  (0, ExecutionUnitInputSchemaMixin_1.executionUnitInputSchemaMixin)(ExecutionUnitInput.prototype);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/wode",
3
- "version": "2026.7.29-0",
3
+ "version": "2026.7.29-1",
4
4
  "description": "WOrkflow DEfinitions",
5
5
  "scripts": {
6
6
  "test": "mocha --recursive --bail --require ts-node/register 'tests/js/**/*.ts'",
@@ -55,14 +55,24 @@ class ExecutionUnitInput extends InMemoryEntity implements Schema {
55
55
  const rendered = nunjucks.compile(this.template.content, env).render(renderingContext);
56
56
 
57
57
  this.rendered = rendered || this.template.content;
58
-
59
- return this;
60
58
  } catch (error) {
59
+ // Can happen transiently right after switching to a multi-material workflow (e.g.
60
+ // interface left/right units keyed by MATERIAL_INDEX "1"/"2"), before the job's
61
+ // materials have been updated to match: `input.perMaterial[MATERIAL_INDEX]` is
62
+ // undefined until enough materials are assigned. This throwing used to propagate out
63
+ // of `ExecutionUnit.render()` and up through the JOB_WORKFLOW_SYNC/JOB_UPDATE
64
+ // reducers, aborting the whole dispatch - so the workflow selection itself silently
65
+ // never applied to the job (job-designer's `onSelectWorkflowsSubmit` just logs the
66
+ // rejected promise). Fall back to the raw template so the reducer can complete;
67
+ // render() runs again on the next job/material update and renders correctly once
68
+ // materials line up.
61
69
  console.error("Error rendering template", this.template.content);
62
70
  console.error("Rendering context: ", JSON.stringify(renderingContext));
63
71
  console.error("Error", error);
64
- throw error;
72
+ this.rendered = this.template.content;
65
73
  }
74
+
75
+ return this;
66
76
  }
67
77
  }
68
78