@intuned/runtime-dev 1.0.6-cli.8.0.4 → 1.0.6-cli.8.0.5
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.
|
@@ -13,14 +13,15 @@ _dotenv.default.config({
|
|
|
13
13
|
path: `.env`
|
|
14
14
|
});
|
|
15
15
|
_commander.program.name("intuned-run").description("Run an Intuned API with parameters").argument("<api-name>", "Name of the API to run").option("-p, --parameters-file <file>", "JSON file containing API parameters").option("-o, --output-file <file>", "File to write the API output to").action(async (apiName, options) => {
|
|
16
|
-
const inputData = await (0, _utils.loadParameters)(options.parametersFile);
|
|
17
16
|
try {
|
|
17
|
+
const inputData = await (0, _utils.loadParameters)(options.parametersFile);
|
|
18
|
+
const outputFileId = options.outputFile;
|
|
18
19
|
const result = await (0, _asyncLocalStorage.runWithContext)({
|
|
19
20
|
runEnvironment: _enums.RunEnvironment.IDE,
|
|
20
21
|
extendedPayloads: [],
|
|
21
22
|
runId: (0, _nanoid.nanoid)()
|
|
22
23
|
}, () => (0, _utils.runApiViaCLI)(apiName, inputData, {
|
|
23
|
-
outputFileId
|
|
24
|
+
outputFileId
|
|
24
25
|
}));
|
|
25
26
|
if (!result) {
|
|
26
27
|
console.log(_chalk.default.yellow("No result returned from the API"));
|
|
@@ -30,7 +31,6 @@ _commander.program.name("intuned-run").description("Run an Intuned API with para
|
|
|
30
31
|
console.log(_chalk.default.green(`✓ API executed successfully`));
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
const outputFileId = options.outputFile;
|
|
34
34
|
await (0, _utils.writeResultToFile)(outputFileId, result);
|
|
35
35
|
process.exit(0);
|
|
36
36
|
} catch (error) {
|