@stepci/runner
Advanced tools
Comparing version 1.11.8 to 1.11.9
@@ -59,2 +59,3 @@ "use strict"; | ||
const files_1 = require("./utils/files"); | ||
const schema_1 = require("./utils/schema"); | ||
const templateDelimiters = ['${{', '}}']; | ||
@@ -64,3 +65,7 @@ // Run from test file | ||
const workflow = js_yaml_1.default.load(yamlString); | ||
const dereffed = await json_schema_ref_parser_1.default.dereference(workflow); | ||
const dereffed = await json_schema_ref_parser_1.default.dereference(workflow, { | ||
dereference: { | ||
circular: 'ignore' | ||
} | ||
}); | ||
return run(dereffed, options); | ||
@@ -88,2 +93,5 @@ } | ||
} | ||
if (workflow.components?.schemas) { | ||
(0, schema_1.addCustomSchemas)(schemaValidator, workflow.components.schemas); | ||
} | ||
if (workflow.config) { | ||
@@ -94,4 +102,5 @@ workflow.config = (0, liquidless_1.renderObject)(workflow.config, { env, secrets: options?.secrets }, { delimiters: templateDelimiters }); | ||
for (const workflowPath of workflow.include) { | ||
const includedFile = await json_schema_ref_parser_1.default.dereference(node_path_1.default.join(node_path_1.default.dirname(options?.path || __dirname), workflowPath)); | ||
workflow.tests = { ...workflow.tests, ...includedFile.tests }; | ||
const testFile = await fs_1.default.promises.readFile(node_path_1.default.join(node_path_1.default.dirname(options?.path || __dirname), workflowPath)); | ||
const test = js_yaml_1.default.load(testFile.toString()); | ||
workflow.tests = { ...workflow.tests, ...test.tests }; | ||
} | ||
@@ -98,0 +107,0 @@ } |
@@ -27,3 +27,7 @@ "use strict"; | ||
const workflow = js_yaml_1.default.load(testFile.toString()); | ||
const dereffed = await json_schema_ref_parser_1.default.dereference(workflow); | ||
const dereffed = await json_schema_ref_parser_1.default.dereference(workflow, { | ||
dereference: { | ||
circular: 'ignore' | ||
} | ||
}); | ||
return loadTest(dereffed, { ...options, path }); | ||
@@ -30,0 +34,0 @@ } |
{ | ||
"name": "@stepci/runner", | ||
"version": "1.11.8", | ||
"version": "1.11.9", | ||
"description": "Step CI Runner", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
132418
36
2742
5