@o-lang/olang 1.0.10 → 1.0.11
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/cli.js +12 -0
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -68,6 +68,8 @@ async function builtInMathResolver(action, context) {
|
|
|
68
68
|
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
|
+
// Add resolver metadata so workflow policy recognizes it
|
|
72
|
+
builtInMathResolver.resolverName = 'builtInMathResolver';
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* Resolver chaining with verbose + context logging
|
|
@@ -164,7 +166,17 @@ program
|
|
|
164
166
|
const content = fs.readFileSync(file, 'utf8');
|
|
165
167
|
const workflow = parse(content);
|
|
166
168
|
|
|
169
|
+
if (!workflow || typeof workflow !== 'object') {
|
|
170
|
+
console.error('❌ Error: Parsed workflow is invalid or empty');
|
|
171
|
+
process.exit(1);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (options.verbose) {
|
|
175
|
+
console.log('📄 Parsed Workflow:', JSON.stringify(workflow, null, 2));
|
|
176
|
+
}
|
|
177
|
+
|
|
167
178
|
const resolver = loadResolverChain(options.resolver, options.verbose);
|
|
179
|
+
|
|
168
180
|
const result = await execute(workflow, options.input, resolver, options.verbose);
|
|
169
181
|
|
|
170
182
|
console.log('\n=== Workflow Result ===');
|
package/package.json
CHANGED