@chatbotkit/cli 1.18.2 → 1.19.0

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/cjs/env.cjs CHANGED
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRUNAS_USERID = exports.getSECRET = void 0;
3
+ exports.getSECRET = getSECRET;
4
+ exports.getRUNAS_USERID = getRUNAS_USERID;
4
5
  function getSECRET() {
5
6
  if (!process.env.CHATBOTKIT_API_SECRET) {
6
7
  throw new Error('CHATBOTKIT_API_SECRET is not set');
7
8
  }
8
9
  return process.env.CHATBOTKIT_API_SECRET;
9
10
  }
10
- exports.getSECRET = getSECRET;
11
11
  function getRUNAS_USERID() {
12
12
  return process.env.CHATBOTKIT_API_RUNAS_USERID;
13
13
  }
14
- exports.getRUNAS_USERID = getRUNAS_USERID;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = cbk;
3
4
  const tslib_1 = require("tslib");
4
5
  const index_js_1 = tslib_1.__importDefault(require("./command/api/index.cjs"));
5
6
  const index_js_2 = tslib_1.__importDefault(require("./command/chat/index.cjs"));
@@ -13,4 +14,3 @@ async function cbk(argv = process.argv) {
13
14
  program.addCommand(index_js_3.default);
14
15
  program.parse(argv);
15
16
  }
16
- exports.default = cbk;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prompt = exports.confirm = void 0;
3
+ exports.confirm = confirm;
4
+ exports.prompt = prompt;
4
5
  const tslib_1 = require("tslib");
5
6
  const readline_1 = tslib_1.__importDefault(require("readline"));
6
7
  async function confirm(question) {
@@ -15,7 +16,6 @@ async function confirm(question) {
15
16
  });
16
17
  });
17
18
  }
18
- exports.confirm = confirm;
19
19
  async function prompt(question) {
20
20
  const rl = readline_1.default.createInterface({
21
21
  input: process.stdin,
@@ -28,4 +28,3 @@ async function prompt(question) {
28
28
  });
29
29
  });
30
30
  }
31
- exports.prompt = prompt;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.printError = exports.print = exports.CommandError = exports.config = void 0;
3
+ exports.CommandError = exports.config = void 0;
4
+ exports.print = print;
5
+ exports.printError = printError;
4
6
  const tslib_1 = require("tslib");
5
7
  const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
6
8
  const util_1 = tslib_1.__importDefault(require("util"));
@@ -30,7 +32,6 @@ function print(input) {
30
32
  }
31
33
  }
32
34
  }
33
- exports.print = print;
34
35
  function printError(error) {
35
36
  if (error instanceof CommandError) {
36
37
  console.error(error.message);
@@ -39,4 +40,3 @@ function printError(error) {
39
40
  console.error(error);
40
41
  }
41
42
  }
42
- exports.printError = printError;
@@ -1,7 +1,7 @@
1
1
  export function print(input: any): void;
2
2
  export function printError(error: any): void;
3
3
  export namespace config {
4
- let output: 'yaml' | 'json' | 'jsonl';
4
+ let output: "yaml" | "json" | "jsonl";
5
5
  }
6
6
  export class CommandError extends Error {
7
7
  }
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getArrayBackedObject = exports.ArrayBackedObject = exports.Solution = exports.SitemapIntegrationResource = exports.WidgetIntegrationResource = exports.SkillsetResource = exports.DatasetResource = exports.BotResource = exports.Resource = exports.SolutionConfigSchema = exports.ResourceConfigSchema = exports.SitemapIntegrationResourceConfigSchema = exports.WidgetIntegrationResourceConfigSchema = exports.SkillsetResourceConfigSchema = exports.DatasetResourceConfigSchema = exports.BotResourceConfigSchema = exports.BasicResourceConfigSchema = exports.replaceEnvVars = exports.getSolutionFileNameAndPath = exports.getSolutionFilePath = exports.getSolutionFileName = exports.getSolutionFolderPath = void 0;
3
+ exports.ArrayBackedObject = exports.Solution = exports.SitemapIntegrationResource = exports.WidgetIntegrationResource = exports.SkillsetResource = exports.DatasetResource = exports.BotResource = exports.Resource = exports.SolutionConfigSchema = exports.ResourceConfigSchema = exports.SitemapIntegrationResourceConfigSchema = exports.WidgetIntegrationResourceConfigSchema = exports.SkillsetResourceConfigSchema = exports.DatasetResourceConfigSchema = exports.BotResourceConfigSchema = exports.BasicResourceConfigSchema = void 0;
4
+ exports.getSolutionFolderPath = getSolutionFolderPath;
5
+ exports.getSolutionFileName = getSolutionFileName;
6
+ exports.getSolutionFilePath = getSolutionFilePath;
7
+ exports.getSolutionFileNameAndPath = getSolutionFileNameAndPath;
8
+ exports.replaceEnvVars = replaceEnvVars;
9
+ exports.getArrayBackedObject = getArrayBackedObject;
4
10
  const tslib_1 = require("tslib");
5
11
  const env_js_1 = require("../env.cjs");
6
12
  const output_js_1 = require("../output.cjs");
@@ -12,24 +18,20 @@ function getSolutionFolderPath() {
12
18
  const folderPath = node_path_1.default.join('.chatbotkit', 'solutions');
13
19
  return folderPath;
14
20
  }
15
- exports.getSolutionFolderPath = getSolutionFolderPath;
16
21
  function getSolutionFileName(name) {
17
22
  const fileName = name.toLowerCase().replace(/\W/g, '_').replace(/_+/g, '_') + '.json';
18
23
  return fileName;
19
24
  }
20
- exports.getSolutionFileName = getSolutionFileName;
21
25
  function getSolutionFilePath(name) {
22
26
  const fileName = getSolutionFileName(name);
23
27
  const filePath = node_path_1.default.join(getSolutionFolderPath(), fileName);
24
28
  return filePath;
25
29
  }
26
- exports.getSolutionFilePath = getSolutionFilePath;
27
30
  function getSolutionFileNameAndPath(name) {
28
31
  const fileName = getSolutionFileName(name);
29
32
  const filePath = getSolutionFilePath(name);
30
33
  return { fileName, filePath };
31
34
  }
32
- exports.getSolutionFileNameAndPath = getSolutionFileNameAndPath;
33
35
  function replaceEnvVars(value) {
34
36
  if (!value) {
35
37
  return value;
@@ -51,7 +53,6 @@ function replaceEnvVars(value) {
51
53
  }
52
54
  return value;
53
55
  }
54
- exports.replaceEnvVars = replaceEnvVars;
55
56
  exports.BasicResourceConfigSchema = zod_1.z.object({
56
57
  type: zod_1.z.string(),
57
58
  slug: zod_1.z.string().optional(),
@@ -322,4 +323,3 @@ exports.ArrayBackedObject = ArrayBackedObject;
322
323
  function getArrayBackedObject(array) {
323
324
  return new ArrayBackedObject(array);
324
325
  }
325
- exports.getArrayBackedObject = getArrayBackedObject;