@intuned/runtime-dev 1.0.6-cli.8.1.2 → 1.0.6-cli.8.1.3

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.
@@ -239,10 +239,10 @@ const validateIntunedProject = async () => {
239
239
  }
240
240
  }
241
241
  }, {
242
- name: "intuned.json",
242
+ name: "Intuned.json",
243
243
  check: async () => {
244
244
  try {
245
- const intunedJsonPath = path.join(currentDirectoryToDeploy, "intuned.json");
245
+ const intunedJsonPath = path.join(currentDirectoryToDeploy, "Intuned.json");
246
246
  await fs.exists(intunedJsonPath);
247
247
  return {
248
248
  isValid: true
@@ -14,6 +14,9 @@ _dotenv.default.config({
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
16
  try {
17
+ if (!apiName) {
18
+ throw new Error("API name is required, please provide it");
19
+ }
17
20
  const inputData = await (0, _utils.loadParameters)(options.parametersFile);
18
21
  const outputFileId = options.outputFile;
19
22
  const result = await (0, _asyncLocalStorage.runWithContext)({
@@ -29,13 +32,16 @@ _commander.program.name("intuned-run").description("Run an Intuned API with para
29
32
  }
30
33
  if (!options.outputFile) {
31
34
  console.log(_chalk.default.green(`✓ API executed successfully`));
35
+ console.log(_chalk.default.green("Result:"));
36
+ console.log(_chalk.default.white(JSON.stringify(result, null, 2)));
32
37
  return;
33
38
  }
34
39
  await (0, _utils.writeResultToFile)(outputFileId, result);
35
- process.exit(0);
36
40
  } catch (error) {
37
41
  console.error(_chalk.default.red(`\nError: ${error.message}`));
38
42
  process.exit(1);
43
+ } finally {
44
+ process.exit(0);
39
45
  }
40
46
  });
41
47
  _commander.program.parse(process.argv);
@@ -22,7 +22,7 @@ async function getAuthCredentials(options) {
22
22
  };
23
23
  }
24
24
  async function getSettingIntunedJSON(key) {
25
- const intunedJsonPath = _path.default.join(process.cwd(), "intuned.json");
25
+ const intunedJsonPath = _path.default.join(process.cwd(), "Intuned.json");
26
26
  const intunedJson = await fs.readJSON(intunedJsonPath);
27
27
  if (intunedJson && intunedJson[key]) {
28
28
  return intunedJson[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.0.6-cli.8.1.2",
3
+ "version": "1.0.6-cli.8.1.3",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",