@cynodia/axiom-core 0.14.0-alpha.3 → 0.14.0-alpha.4
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/server-ir.js +6 -2
- package/package.json +1 -1
package/dist/server-ir.js
CHANGED
|
@@ -142,7 +142,9 @@ export function usesMigrationVocabulary(ir) {
|
|
|
142
142
|
* declares no workflow compiles to the byte-identical v1–v7 document it always did.
|
|
143
143
|
*/
|
|
144
144
|
export function usesWorkflowVocabulary(ir) {
|
|
145
|
-
|
|
145
|
+
// Total over a tampered IR: only a non-empty **array** counts (a string has a `.length`
|
|
146
|
+
// but is not workflow vocabulary); a malformed present value is refused at admission.
|
|
147
|
+
return Array.isArray(ir.workflows) && ir.workflows.length > 0;
|
|
146
148
|
}
|
|
147
149
|
/**
|
|
148
150
|
* Whether a document uses 0.10's semantic data-access vocabulary — a `QueryDef`, a
|
|
@@ -211,7 +213,9 @@ export function serverIRExpressions(ir) {
|
|
|
211
213
|
for (const migration of ir.migrations ?? []) {
|
|
212
214
|
found.push(...migrationExpressions(migration));
|
|
213
215
|
}
|
|
214
|
-
|
|
216
|
+
// Total over a hand-tampered IR: a `workflows` that is not an array contributes nothing
|
|
217
|
+
// here and is refused structurally at admission (spec14pt5). Never iterate a non-array.
|
|
218
|
+
for (const workflow of Array.isArray(ir.workflows) ? ir.workflows : []) {
|
|
215
219
|
found.push(...workflowExpressions(workflow));
|
|
216
220
|
}
|
|
217
221
|
return found;
|