@botpress/cli 4.17.14 → 4.17.15
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/.turbo/turbo-build.log +16 -12
- package/bin.js +1 -1
- package/dist/api/bot-body.d.ts +5 -0
- package/dist/api/client.d.ts +50 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/integration-body.d.ts +5 -0
- package/dist/api/interface-body.d.ts +7 -0
- package/dist/api/paging.d.ts +9 -0
- package/dist/api/plugin-body.d.ts +5 -0
- package/dist/api/retry.d.ts +2 -0
- package/dist/api/types.d.ts +62 -0
- package/dist/chat/index.d.ts +25 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +7 -0
- package/dist/code-generation/bot-implementation/bot-implementation.d.ts +8 -0
- package/dist/code-generation/bot-implementation/bot-plugins/index.d.ts +7 -0
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.d.ts +13 -0
- package/dist/code-generation/bot-implementation/bot-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/bot-implementation/bot-typings/events-module.d.ts +10 -0
- package/dist/code-generation/bot-implementation/bot-typings/index.d.ts +7 -0
- package/dist/code-generation/bot-implementation/bot-typings/states-module.d.ts +17 -0
- package/dist/code-generation/bot-implementation/bot-typings/tables-module.d.ts +10 -0
- package/dist/code-generation/bot-implementation/bot-typings/workflows-module.d.ts +27 -0
- package/dist/code-generation/bot-implementation/index.d.ts +3 -0
- package/dist/code-generation/consts.d.ts +5 -0
- package/dist/code-generation/generators.d.ts +10 -0
- package/dist/code-generation/index.d.ts +8 -0
- package/dist/code-generation/integration-implementation/index.d.ts +3 -0
- package/dist/code-generation/integration-implementation/integration-implementation.d.ts +7 -0
- package/dist/code-generation/integration-implementation/integration-secret.d.ts +8 -0
- package/dist/code-generation/integration-implementation/integration-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/integration-implementation/integration-typings/channels-module.d.ts +5 -0
- package/dist/code-generation/integration-implementation/integration-typings/configuration-module.d.ts +7 -0
- package/dist/code-generation/integration-implementation/integration-typings/configurations-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/entities-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/events-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/index.d.ts +8 -0
- package/dist/code-generation/integration-implementation/integration-typings/states-module.d.ts +17 -0
- package/dist/code-generation/integration-package/index.d.ts +2 -0
- package/dist/code-generation/integration-package/integration-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/integration-package/integration-package-definition/channels-module.d.ts +5 -0
- package/dist/code-generation/integration-package/integration-package-definition/configuration-module.d.ts +7 -0
- package/dist/code-generation/integration-package/integration-package-definition/configurations-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/entities-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/index.d.ts +8 -0
- package/dist/code-generation/integration-package/integration-package-definition/interfaces-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/states-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/typings.d.ts +10 -0
- package/dist/code-generation/interface-implementation/index.d.ts +4 -0
- package/dist/code-generation/interface-implementation/integration-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/interface-implementation/integration-typings/channels-module.d.ts +5 -0
- package/dist/code-generation/interface-implementation/integration-typings/entities-module.d.ts +10 -0
- package/dist/code-generation/interface-implementation/integration-typings/events-module.d.ts +10 -0
- package/dist/code-generation/interface-implementation/integration-typings/index.d.ts +8 -0
- package/dist/code-generation/interface-package/index.d.ts +2 -0
- package/dist/code-generation/interface-package/interface-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/interface-package/interface-package-definition/channels-module.d.ts +5 -0
- package/dist/code-generation/interface-package/interface-package-definition/entities-module.d.ts +10 -0
- package/dist/code-generation/interface-package/interface-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/interface-package/interface-package-definition/index.d.ts +8 -0
- package/dist/code-generation/interface-package/interface-package-definition/typings.d.ts +7 -0
- package/dist/code-generation/module.d.ts +49 -0
- package/dist/code-generation/plugin-implementation/index.d.ts +3 -0
- package/dist/code-generation/plugin-implementation/plugin-implementation.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/events-module.d.ts +10 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/index.d.ts +8 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/states-module.d.ts +17 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/tables-module.d.ts +10 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/workflows-module.d.ts +27 -0
- package/dist/code-generation/plugin-package/index.d.ts +2 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.d.ts +7 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/index.d.ts +8 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/interfaces-module.d.ts +7 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/recurring-events-module.d.ts +5 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/states-module.d.ts +10 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/typings.d.ts +7 -0
- package/dist/code-generation/strings.d.ts +4 -0
- package/dist/code-generation/typings.d.ts +162 -0
- package/dist/code-generation/typings.test.d.ts +1 -0
- package/dist/command-definitions.d.ts +1480 -0
- package/dist/command-implementations/add-command.d.ts +15 -0
- package/dist/command-implementations/base-command.d.ts +13 -0
- package/dist/command-implementations/bot-commands.d.ts +20 -0
- package/dist/command-implementations/build-command.d.ts +9 -0
- package/dist/command-implementations/bundle-command.d.ts +10 -0
- package/dist/command-implementations/chat-command.d.ts +13 -0
- package/dist/command-implementations/deploy-command.d.ts +18 -0
- package/dist/command-implementations/dev-command.d.ts +21 -0
- package/dist/command-implementations/gen-command.d.ts +11 -0
- package/dist/command-implementations/global-command.d.ts +57 -0
- package/dist/command-implementations/index.d.ts +1534 -0
- package/dist/command-implementations/init-command.d.ts +17 -0
- package/dist/command-implementations/integration-commands.d.ts +15 -0
- package/dist/command-implementations/interface-commands.d.ts +14 -0
- package/dist/command-implementations/lint-command.d.ts +15 -0
- package/dist/command-implementations/login-command.d.ts +6 -0
- package/dist/command-implementations/logout-command.d.ts +6 -0
- package/dist/command-implementations/plugin-commands.d.ts +14 -0
- package/dist/command-implementations/profile-commands.d.ts +14 -0
- package/dist/command-implementations/project-command.d.ts +67 -0
- package/dist/command-implementations/read-command.d.ts +10 -0
- package/dist/command-implementations/serve-command.d.ts +6 -0
- package/dist/command-tree.d.ts +39 -0
- package/dist/config.d.ts +1441 -0
- package/dist/consts.d.ts +41 -0
- package/dist/errors.d.ts +56 -0
- package/dist/index.d.ts +1524 -0
- package/dist/index.js +50 -25
- package/dist/index.js.map +3 -3
- package/dist/init.d.ts +1 -0
- package/dist/linter/base-linter.d.ts +21 -0
- package/dist/linter/base-linter.test.d.ts +1 -0
- package/dist/linter/bot-linter.d.ts +5 -0
- package/dist/linter/integration-linter.d.ts +7 -0
- package/dist/linter/interface-linter.d.ts +5 -0
- package/dist/linter/ruleset-tests/bot.ruleset.test.d.ts +1 -0
- package/dist/linter/ruleset-tests/common.d.ts +9 -0
- package/dist/linter/ruleset-tests/integration.ruleset.test.d.ts +1 -0
- package/dist/linter/ruleset-tests/interface.ruleset.test.d.ts +1 -0
- package/dist/linter/rulesets/bot.ruleset.d.ts +165 -0
- package/dist/linter/rulesets/integration.ruleset.d.ts +390 -0
- package/dist/linter/rulesets/interface.ruleset.d.ts +141 -0
- package/dist/linter/spectral-functions.d.ts +11 -0
- package/dist/logger/base-logger.d.ts +43 -0
- package/dist/logger/index.d.ts +22 -0
- package/dist/logger/logger.test.d.ts +1 -0
- package/dist/package-ref.d.ts +22 -0
- package/dist/package-ref.test.d.ts +1 -0
- package/dist/project-templates.d.ts +42 -0
- package/dist/register-yargs.d.ts +4 -0
- package/dist/root.d.ts +7 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/validate-bot.d.ts +2 -0
- package/dist/sdk/validate-bot.test.d.ts +1 -0
- package/dist/sdk/validate-integration.d.ts +2 -0
- package/dist/tables/index.d.ts +1 -0
- package/dist/tables/schemas.d.ts +1259 -0
- package/dist/tables/tables-publisher.d.ts +22 -0
- package/dist/typings.d.ts +27 -0
- package/dist/utils/attribute-utils.d.ts +10 -0
- package/dist/utils/cache-utils.d.ts +14 -0
- package/dist/utils/case-utils.d.ts +14 -0
- package/dist/utils/case-utils.test.d.ts +1 -0
- package/dist/utils/concurrency-utils.d.ts +1 -0
- package/dist/utils/concurrency-utils.test.d.ts +1 -0
- package/dist/utils/esbuild-utils.d.ts +29 -0
- package/dist/utils/event-emitter.d.ts +7 -0
- package/dist/utils/file-watcher.d.ts +17 -0
- package/dist/utils/guard-utils.d.ts +4 -0
- package/dist/utils/id-utils.d.ts +2 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/object-utils.d.ts +1 -0
- package/dist/utils/path-utils.d.ts +28 -0
- package/dist/utils/path-utils.test.d.ts +1 -0
- package/dist/utils/pkgjson-utils.d.ts +17 -0
- package/dist/utils/promise-utils.d.ts +2 -0
- package/dist/utils/promise-utils.test.d.ts +1 -0
- package/dist/utils/prompt-utils.d.ts +33 -0
- package/dist/utils/record-utils.d.ts +8 -0
- package/dist/utils/record-utils.test.d.ts +1 -0
- package/dist/utils/require-utils.d.ts +2 -0
- package/dist/utils/require-utils.test.d.ts +1 -0
- package/dist/utils/schema-utils.d.ts +13 -0
- package/dist/utils/schema-utils.test.d.ts +1 -0
- package/dist/utils/semver-utils.d.ts +8 -0
- package/dist/utils/string-utils.d.ts +2 -0
- package/dist/utils/template-utils.d.ts +1 -0
- package/dist/utils/tunnel-utils.d.ts +49 -0
- package/dist/utils/type-utils.d.ts +19 -0
- package/dist/utils/url-utils.d.ts +19 -0
- package/dist/worker/child-entrypoint.d.ts +1 -0
- package/dist/worker/child-wrapper.d.ts +18 -0
- package/dist/worker/config.d.ts +28 -0
- package/dist/worker/index.d.ts +2 -0
- package/dist/worker/is-child.d.ts +14 -0
- package/dist/worker/worker-state.d.ts +30 -0
- package/dist/worker/worker.d.ts +20 -0
- package/package.json +6 -4
- package/tsconfig.build.json +14 -0
package/dist/index.js
CHANGED
|
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
8
12
|
var __copyProps = (to, from, except, desc) => {
|
|
9
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -21,31 +25,52 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var index_exports = {};
|
|
30
|
+
__export(index_exports, {
|
|
31
|
+
default: () => index_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
34
|
var import_command_implementations = __toESM(require("./command-implementations"));
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
var index_default = {
|
|
36
|
+
login: import_command_implementations.default.login,
|
|
37
|
+
logout: import_command_implementations.default.logout,
|
|
38
|
+
bots: {
|
|
39
|
+
create: import_command_implementations.default.bots.subcommands.create,
|
|
40
|
+
get: import_command_implementations.default.bots.subcommands.get,
|
|
41
|
+
delete: import_command_implementations.default.bots.subcommands.delete,
|
|
42
|
+
list: import_command_implementations.default.bots.subcommands.list
|
|
43
|
+
},
|
|
44
|
+
integrations: {
|
|
45
|
+
get: import_command_implementations.default.integrations.subcommands.get,
|
|
46
|
+
list: import_command_implementations.default.integrations.subcommands.list,
|
|
47
|
+
delete: import_command_implementations.default.integrations.subcommands.delete
|
|
48
|
+
},
|
|
49
|
+
interfaces: {
|
|
50
|
+
get: import_command_implementations.default.interfaces.subcommands.get,
|
|
51
|
+
list: import_command_implementations.default.interfaces.subcommands.list,
|
|
52
|
+
delete: import_command_implementations.default.interfaces.subcommands.delete
|
|
53
|
+
},
|
|
54
|
+
plugins: {
|
|
55
|
+
get: import_command_implementations.default.plugins.subcommands.get,
|
|
56
|
+
list: import_command_implementations.default.plugins.subcommands.list,
|
|
57
|
+
delete: import_command_implementations.default.plugins.subcommands.delete
|
|
58
|
+
},
|
|
59
|
+
init: import_command_implementations.default.init,
|
|
60
|
+
generate: import_command_implementations.default.generate,
|
|
61
|
+
bundle: import_command_implementations.default.bundle,
|
|
62
|
+
build: import_command_implementations.default.build,
|
|
63
|
+
read: import_command_implementations.default.read,
|
|
64
|
+
serve: import_command_implementations.default.serve,
|
|
65
|
+
deploy: import_command_implementations.default.deploy,
|
|
66
|
+
add: import_command_implementations.default.add,
|
|
67
|
+
dev: import_command_implementations.default.dev,
|
|
68
|
+
lint: import_command_implementations.default.lint,
|
|
69
|
+
chat: import_command_implementations.default.chat,
|
|
70
|
+
profiles: {
|
|
71
|
+
list: import_command_implementations.default.profiles.subcommands.list,
|
|
72
|
+
active: import_command_implementations.default.profiles.subcommands.active,
|
|
73
|
+
use: import_command_implementations.default.profiles.subcommands.use
|
|
74
|
+
}
|
|
45
75
|
};
|
|
46
|
-
process.on("uncaughtException", (thrown) => onError(thrown));
|
|
47
|
-
process.on("unhandledRejection", (thrown) => onError(thrown));
|
|
48
|
-
const commands = tree.zipTree(import_command_definitions.default, import_command_implementations.default);
|
|
49
|
-
(0, import_register_yargs.registerYargs)(import_yargs_extra.default, commands);
|
|
50
|
-
void import_yargs_extra.default.version().scriptName("bp").demandCommand(1, "You didn't provide any command. Use the --help flag to see the list of available commands.").recommendCommands().strict().help().fail(yargsFail).parse();
|
|
51
76
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import commandDefinitions from './command-definitions'\nimport commandImplementations from './command-implementations'\nimport { DefinitionSubTree, DefinitionTree, DefinitionTreeNode } from './command-tree'\nimport type * as typings from './typings'\n\ntype CommandHandlersNode<D extends DefinitionTreeNode = DefinitionTreeNode> = D extends DefinitionSubTree\n ? CommandHandlers<D['subcommands']>\n : D extends typings.CommandDefinition\n ? typings.CommandImplementation<D>\n : never\n\ntype CommandHandlers<D extends DefinitionTree = DefinitionTree> = {\n [K in keyof D]: CommandHandlersNode<D[K]>\n}\n\nexport default {\n login: commandImplementations.login,\n logout: commandImplementations.logout,\n bots: {\n create: commandImplementations.bots.subcommands.create,\n get: commandImplementations.bots.subcommands.get,\n delete: commandImplementations.bots.subcommands.delete,\n list: commandImplementations.bots.subcommands.list,\n },\n integrations: {\n get: commandImplementations.integrations.subcommands.get,\n list: commandImplementations.integrations.subcommands.list,\n delete: commandImplementations.integrations.subcommands.delete,\n },\n interfaces: {\n get: commandImplementations.interfaces.subcommands.get,\n list: commandImplementations.interfaces.subcommands.list,\n delete: commandImplementations.interfaces.subcommands.delete,\n },\n plugins: {\n get: commandImplementations.plugins.subcommands.get,\n list: commandImplementations.plugins.subcommands.list,\n delete: commandImplementations.plugins.subcommands.delete,\n },\n init: commandImplementations.init,\n generate: commandImplementations.generate,\n bundle: commandImplementations.bundle,\n build: commandImplementations.build,\n read: commandImplementations.read,\n serve: commandImplementations.serve,\n deploy: commandImplementations.deploy,\n add: commandImplementations.add,\n dev: commandImplementations.dev,\n lint: commandImplementations.lint,\n chat: commandImplementations.chat,\n profiles: {\n list: commandImplementations.profiles.subcommands.list,\n active: commandImplementations.profiles.subcommands.active,\n use: commandImplementations.profiles.subcommands.use,\n },\n} satisfies CommandHandlers<typeof commandDefinitions>\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qCAAmC;AAcnC,IAAO,gBAAQ;AAAA,EACb,OAAO,+BAAAA,QAAuB;AAAA,EAC9B,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,MAAM;AAAA,IACJ,QAAQ,+BAAAA,QAAuB,KAAK,YAAY;AAAA,IAChD,KAAK,+BAAAA,QAAuB,KAAK,YAAY;AAAA,IAC7C,QAAQ,+BAAAA,QAAuB,KAAK,YAAY;AAAA,IAChD,MAAM,+BAAAA,QAAuB,KAAK,YAAY;AAAA,EAChD;AAAA,EACA,cAAc;AAAA,IACZ,KAAK,+BAAAA,QAAuB,aAAa,YAAY;AAAA,IACrD,MAAM,+BAAAA,QAAuB,aAAa,YAAY;AAAA,IACtD,QAAQ,+BAAAA,QAAuB,aAAa,YAAY;AAAA,EAC1D;AAAA,EACA,YAAY;AAAA,IACV,KAAK,+BAAAA,QAAuB,WAAW,YAAY;AAAA,IACnD,MAAM,+BAAAA,QAAuB,WAAW,YAAY;AAAA,IACpD,QAAQ,+BAAAA,QAAuB,WAAW,YAAY;AAAA,EACxD;AAAA,EACA,SAAS;AAAA,IACP,KAAK,+BAAAA,QAAuB,QAAQ,YAAY;AAAA,IAChD,MAAM,+BAAAA,QAAuB,QAAQ,YAAY;AAAA,IACjD,QAAQ,+BAAAA,QAAuB,QAAQ,YAAY;AAAA,EACrD;AAAA,EACA,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,UAAU,+BAAAA,QAAuB;AAAA,EACjC,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,OAAO,+BAAAA,QAAuB;AAAA,EAC9B,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,OAAO,+BAAAA,QAAuB;AAAA,EAC9B,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,KAAK,+BAAAA,QAAuB;AAAA,EAC5B,KAAK,+BAAAA,QAAuB;AAAA,EAC5B,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,UAAU;AAAA,IACR,MAAM,+BAAAA,QAAuB,SAAS,YAAY;AAAA,IAClD,QAAQ,+BAAAA,QAAuB,SAAS,YAAY;AAAA,IACpD,KAAK,+BAAAA,QAAuB,SAAS,YAAY;AAAA,EACnD;AACF;",
|
|
6
|
+
"names": ["commandImplementations"]
|
|
7
7
|
}
|
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type RulesetDefinition } from '@stoplight/spectral-core';
|
|
2
|
+
import { type Logger } from '../logger';
|
|
3
|
+
type ProblemSeverity = 0 | 1 | 2 | 3;
|
|
4
|
+
export declare abstract class BaseLinter<TDefinition> {
|
|
5
|
+
private readonly _spectral;
|
|
6
|
+
private readonly _spectralDocument;
|
|
7
|
+
private _results;
|
|
8
|
+
protected constructor(definition: TDefinition, ruleset: RulesetDefinition);
|
|
9
|
+
lint(): Promise<void>;
|
|
10
|
+
logResults(logger: Logger): void;
|
|
11
|
+
getSortedResults(): {
|
|
12
|
+
message: string;
|
|
13
|
+
path: string;
|
|
14
|
+
severity: ProblemSeverity;
|
|
15
|
+
}[];
|
|
16
|
+
hasErrors(): boolean;
|
|
17
|
+
private _getResults;
|
|
18
|
+
private _simplifyPath;
|
|
19
|
+
private _logResultMessage;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { CreateIntegrationRequestBody } from '../api';
|
|
3
|
+
import { BaseLinter } from './base-linter';
|
|
4
|
+
export type AggregateIntegrationBody = Omit<CreateIntegrationRequestBody, 'secrets'> & Pick<sdk.IntegrationDefinitionProps, 'secrets'>;
|
|
5
|
+
export declare class IntegrationLinter extends BaseLinter<AggregateIntegrationBody> {
|
|
6
|
+
constructor(definition: AggregateIntegrationBody);
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ISpectralDiagnostic, type RuleDefinition } from '@stoplight/spectral-core';
|
|
2
|
+
export type RecursivePartial<T> = {
|
|
3
|
+
[P in Extract<keyof T, string>]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
|
4
|
+
};
|
|
5
|
+
type Ruleset = {
|
|
6
|
+
rules: Record<string, Readonly<RuleDefinition>>;
|
|
7
|
+
};
|
|
8
|
+
export declare const createDescribeRule: <TDefinition>() => <TRuleset extends Ruleset>(ruleset: TRuleset) => <TPartialDefinition extends RecursivePartial<TDefinition>>(ruleName: Extract<keyof (typeof ruleset)["rules"], string>, fn: (lint: (definition: TPartialDefinition) => Promise<ISpectralDiagnostic[]>) => void) => import("vitest").SuiteCollector<object>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export declare const BOT_RULESET: {
|
|
2
|
+
extends: never[];
|
|
3
|
+
rules: {
|
|
4
|
+
'event-outputparams-should-have-title': {
|
|
5
|
+
description: string;
|
|
6
|
+
message: string;
|
|
7
|
+
severity: "warn";
|
|
8
|
+
given: string;
|
|
9
|
+
then: {
|
|
10
|
+
field: string;
|
|
11
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
12
|
+
message: string;
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
'event-outputparams-must-have-description': {
|
|
17
|
+
description: string;
|
|
18
|
+
message: string;
|
|
19
|
+
severity: "error";
|
|
20
|
+
given: string;
|
|
21
|
+
then: {
|
|
22
|
+
field: string;
|
|
23
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
24
|
+
message: string;
|
|
25
|
+
}[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
'configuration-fields-must-have-a-title': {
|
|
29
|
+
description: string;
|
|
30
|
+
message: string;
|
|
31
|
+
severity: "error";
|
|
32
|
+
given: string;
|
|
33
|
+
then: {
|
|
34
|
+
field: string;
|
|
35
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
36
|
+
message: string;
|
|
37
|
+
}[];
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
'configuration-fields-must-have-a-description': {
|
|
41
|
+
description: string;
|
|
42
|
+
message: string;
|
|
43
|
+
severity: "error";
|
|
44
|
+
given: string;
|
|
45
|
+
then: {
|
|
46
|
+
field: string;
|
|
47
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
48
|
+
message: string;
|
|
49
|
+
}[];
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
'user-tags-should-have-a-title': {
|
|
53
|
+
description: string;
|
|
54
|
+
message: string;
|
|
55
|
+
severity: "warn";
|
|
56
|
+
given: string;
|
|
57
|
+
then: {
|
|
58
|
+
field: string;
|
|
59
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
60
|
+
message: string;
|
|
61
|
+
}[];
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
'user-tags-must-have-a-description': {
|
|
65
|
+
description: string;
|
|
66
|
+
message: string;
|
|
67
|
+
severity: "error";
|
|
68
|
+
given: string;
|
|
69
|
+
then: {
|
|
70
|
+
field: string;
|
|
71
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
72
|
+
message: string;
|
|
73
|
+
}[];
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
'conversation-tags-should-have-a-title': {
|
|
77
|
+
description: string;
|
|
78
|
+
message: string;
|
|
79
|
+
severity: "warn";
|
|
80
|
+
given: string;
|
|
81
|
+
then: {
|
|
82
|
+
field: string;
|
|
83
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
84
|
+
message: string;
|
|
85
|
+
}[];
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
'conversation-tags-must-have-a-description': {
|
|
89
|
+
description: string;
|
|
90
|
+
message: string;
|
|
91
|
+
severity: "error";
|
|
92
|
+
given: string;
|
|
93
|
+
then: {
|
|
94
|
+
field: string;
|
|
95
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
96
|
+
message: string;
|
|
97
|
+
}[];
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
'message-tags-should-have-a-title': {
|
|
101
|
+
description: string;
|
|
102
|
+
message: string;
|
|
103
|
+
severity: "warn";
|
|
104
|
+
given: string;
|
|
105
|
+
then: {
|
|
106
|
+
field: string;
|
|
107
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
108
|
+
message: string;
|
|
109
|
+
}[];
|
|
110
|
+
}[];
|
|
111
|
+
};
|
|
112
|
+
'message-tags-must-have-a-description': {
|
|
113
|
+
description: string;
|
|
114
|
+
message: string;
|
|
115
|
+
severity: "error";
|
|
116
|
+
given: string;
|
|
117
|
+
then: {
|
|
118
|
+
field: string;
|
|
119
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
120
|
+
message: string;
|
|
121
|
+
}[];
|
|
122
|
+
}[];
|
|
123
|
+
};
|
|
124
|
+
'legacy-zui-title-should-be-removed': {
|
|
125
|
+
description: string;
|
|
126
|
+
severity: "error";
|
|
127
|
+
given: string;
|
|
128
|
+
then: {
|
|
129
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
130
|
+
}[];
|
|
131
|
+
};
|
|
132
|
+
'legacy-zui-examples-should-be-removed': {
|
|
133
|
+
description: string;
|
|
134
|
+
severity: "hint";
|
|
135
|
+
given: string;
|
|
136
|
+
then: {
|
|
137
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
138
|
+
}[];
|
|
139
|
+
};
|
|
140
|
+
'state-fields-should-have-title': {
|
|
141
|
+
description: string;
|
|
142
|
+
message: string;
|
|
143
|
+
severity: "warn";
|
|
144
|
+
given: string;
|
|
145
|
+
then: {
|
|
146
|
+
field: string;
|
|
147
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
148
|
+
message: string;
|
|
149
|
+
}[];
|
|
150
|
+
}[];
|
|
151
|
+
};
|
|
152
|
+
'state-fields-must-have-description': {
|
|
153
|
+
description: string;
|
|
154
|
+
message: string;
|
|
155
|
+
severity: "error";
|
|
156
|
+
given: string;
|
|
157
|
+
then: {
|
|
158
|
+
field: string;
|
|
159
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
160
|
+
message: string;
|
|
161
|
+
}[];
|
|
162
|
+
}[];
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|