@botpress/cli 7.0.1 → 7.0.2
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 +12 -12
- package/dist/code-generation/strings.d.ts +1 -1
- package/dist/command-definitions.d.ts +426 -426
- package/dist/command-implementations/index.d.ts +470 -470
- package/dist/config.d.ts +295 -295
- package/dist/index.d.ts +460 -460
- package/dist/linter/ruleset-tests/common.d.ts +1 -1
- package/dist/project-templates.d.ts +15 -15
- package/dist/tables/schemas.d.ts +18 -18
- package/dist/utils/case-utils.d.ts +6 -6
- package/dist/utils/path-utils.d.ts +1 -1
- package/dist/utils/prompt-utils.js +7 -1
- package/dist/utils/prompt-utils.js.map +2 -2
- package/dist/utils/type-utils.d.ts +1 -1
- package/dist/utils/url-utils.d.ts +1 -1
- package/package.json +6 -6
- package/templates/empty-bot/package.json +3 -3
- package/templates/empty-bot/tsconfig.json +3 -2
- package/templates/empty-integration/package.json +3 -3
- package/templates/empty-integration/tsconfig.json +3 -2
- package/templates/empty-plugin/package.json +2 -2
- package/templates/empty-plugin/tsconfig.json +3 -2
- package/templates/hello-world/package.json +3 -3
- package/templates/hello-world/tsconfig.json +3 -2
- package/templates/webhook-message/package.json +3 -3
- package/templates/webhook-message/tsconfig.json +3 -2
- package/tsconfig.build.json +1 -1
- package/tsconfig.ts-node.json +6 -0
- package/eslint.config.mjs +0 -14
|
@@ -5,4 +5,4 @@ export type RecursivePartial<T> = {
|
|
|
5
5
|
export type Ruleset = {
|
|
6
6
|
rules: Record<string, Readonly<RuleDefinition>>;
|
|
7
7
|
};
|
|
8
|
-
export declare const createDescribeRule: <TDefinition>() => <TRuleset extends Ruleset>(ruleset: TRuleset) => <TPartialDefinition extends RecursivePartial<TDefinition>>(ruleName: Extract<keyof (typeof ruleset)[
|
|
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>;
|
|
@@ -10,31 +10,31 @@ export declare namespace ProjectTemplates {
|
|
|
10
10
|
type ProjectType = 'bot' | 'plugin' | 'integration';
|
|
11
11
|
const templates: {
|
|
12
12
|
readonly bot: readonly [{
|
|
13
|
-
readonly fullName:
|
|
14
|
-
readonly identifier:
|
|
15
|
-
readonly defaultProjectName:
|
|
13
|
+
readonly fullName: 'Empty Bot';
|
|
14
|
+
readonly identifier: 'empty';
|
|
15
|
+
readonly defaultProjectName: 'empty-bot';
|
|
16
16
|
readonly absolutePath: utils.path.AbsolutePath;
|
|
17
17
|
}];
|
|
18
18
|
readonly plugin: readonly [{
|
|
19
|
-
readonly fullName:
|
|
20
|
-
readonly identifier:
|
|
21
|
-
readonly defaultProjectName:
|
|
19
|
+
readonly fullName: 'Empty Plugin';
|
|
20
|
+
readonly identifier: 'empty';
|
|
21
|
+
readonly defaultProjectName: 'empty-plugin';
|
|
22
22
|
readonly absolutePath: utils.path.AbsolutePath;
|
|
23
23
|
}];
|
|
24
24
|
readonly integration: readonly [{
|
|
25
|
-
readonly fullName:
|
|
26
|
-
readonly identifier:
|
|
27
|
-
readonly defaultProjectName:
|
|
25
|
+
readonly fullName: 'Empty Integration';
|
|
26
|
+
readonly identifier: 'empty';
|
|
27
|
+
readonly defaultProjectName: 'empty-integration';
|
|
28
28
|
readonly absolutePath: utils.path.AbsolutePath;
|
|
29
29
|
}, {
|
|
30
|
-
readonly fullName:
|
|
31
|
-
readonly identifier:
|
|
32
|
-
readonly defaultProjectName:
|
|
30
|
+
readonly fullName: 'Hello World';
|
|
31
|
+
readonly identifier: 'hello-world';
|
|
32
|
+
readonly defaultProjectName: 'hello-world';
|
|
33
33
|
readonly absolutePath: utils.path.AbsolutePath;
|
|
34
34
|
}, {
|
|
35
|
-
readonly fullName:
|
|
36
|
-
readonly identifier:
|
|
37
|
-
readonly defaultProjectName:
|
|
35
|
+
readonly fullName: 'Webhook Message';
|
|
36
|
+
readonly identifier: 'webhook-message';
|
|
37
|
+
readonly defaultProjectName: 'webhook-message';
|
|
38
38
|
readonly absolutePath: utils.path.AbsolutePath;
|
|
39
39
|
}];
|
|
40
40
|
};
|
package/dist/tables/schemas.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import * as sdk from '@botpress/sdk';
|
|
2
2
|
export declare const columnSchema: sdk.z.ZodDiscriminatedUnion<"type", [sdk.z.ZodObject<{
|
|
3
|
-
type: sdk.z.ZodLiteral<"string">;
|
|
4
|
-
format: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
5
|
-
pattern: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
6
|
-
enum: sdk.z.ZodOptional<sdk.z.ZodArray<sdk.z.ZodString, "many">>;
|
|
7
|
-
minLength: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
8
|
-
maxLength: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
9
3
|
'x-zui': sdk.z.ZodOptional<sdk.z.ZodObject<{
|
|
10
4
|
index: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
11
5
|
typings: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
@@ -28,10 +22,13 @@ export declare const columnSchema: sdk.z.ZodDiscriminatedUnion<"type", [sdk.z.Zo
|
|
|
28
22
|
nullable: sdk.z.ZodOptional<sdk.z.ZodBoolean>;
|
|
29
23
|
description: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
30
24
|
default: sdk.z.ZodOptional<sdk.z.ZodAny>;
|
|
25
|
+
type: sdk.z.ZodLiteral<"string">;
|
|
26
|
+
format: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
27
|
+
pattern: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
28
|
+
enum: sdk.z.ZodOptional<sdk.z.ZodArray<sdk.z.ZodString, "many">>;
|
|
29
|
+
minLength: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
30
|
+
maxLength: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
31
31
|
}, "strip">, sdk.z.ZodObject<{
|
|
32
|
-
type: sdk.z.ZodLiteral<"number">;
|
|
33
|
-
minimum: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
34
|
-
maximum: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
35
32
|
'x-zui': sdk.z.ZodOptional<sdk.z.ZodObject<{
|
|
36
33
|
index: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
37
34
|
typings: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
@@ -54,8 +51,10 @@ export declare const columnSchema: sdk.z.ZodDiscriminatedUnion<"type", [sdk.z.Zo
|
|
|
54
51
|
nullable: sdk.z.ZodOptional<sdk.z.ZodBoolean>;
|
|
55
52
|
description: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
56
53
|
default: sdk.z.ZodOptional<sdk.z.ZodAny>;
|
|
54
|
+
type: sdk.z.ZodLiteral<"number">;
|
|
55
|
+
minimum: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
56
|
+
maximum: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
57
57
|
}, "strip">, sdk.z.ZodObject<{
|
|
58
|
-
type: sdk.z.ZodLiteral<"boolean">;
|
|
59
58
|
'x-zui': sdk.z.ZodOptional<sdk.z.ZodObject<{
|
|
60
59
|
index: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
61
60
|
typings: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
@@ -78,11 +77,8 @@ export declare const columnSchema: sdk.z.ZodDiscriminatedUnion<"type", [sdk.z.Zo
|
|
|
78
77
|
nullable: sdk.z.ZodOptional<sdk.z.ZodBoolean>;
|
|
79
78
|
description: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
80
79
|
default: sdk.z.ZodOptional<sdk.z.ZodAny>;
|
|
80
|
+
type: sdk.z.ZodLiteral<"boolean">;
|
|
81
81
|
}, "strip">, sdk.z.ZodObject<{
|
|
82
|
-
type: sdk.z.ZodLiteral<"object">;
|
|
83
|
-
properties: sdk.z.ZodOptional<sdk.z.ZodRecord<sdk.z.ZodString, sdk.z.ZodObject<{}, "passthrough">>>;
|
|
84
|
-
required: sdk.z.ZodOptional<sdk.z.ZodArray<sdk.z.ZodString, "many">>;
|
|
85
|
-
additionalProperties: sdk.z.ZodOptional<sdk.z.ZodUnion<[sdk.z.ZodBoolean, sdk.z.ZodObject<{}, "passthrough">]>>;
|
|
86
82
|
'x-zui': sdk.z.ZodOptional<sdk.z.ZodObject<{
|
|
87
83
|
index: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
88
84
|
typings: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
@@ -105,11 +101,11 @@ export declare const columnSchema: sdk.z.ZodDiscriminatedUnion<"type", [sdk.z.Zo
|
|
|
105
101
|
nullable: sdk.z.ZodOptional<sdk.z.ZodBoolean>;
|
|
106
102
|
description: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
107
103
|
default: sdk.z.ZodOptional<sdk.z.ZodAny>;
|
|
104
|
+
type: sdk.z.ZodLiteral<"object">;
|
|
105
|
+
properties: sdk.z.ZodOptional<sdk.z.ZodRecord<sdk.z.ZodString, sdk.z.ZodObject<{}, "passthrough">>>;
|
|
106
|
+
required: sdk.z.ZodOptional<sdk.z.ZodArray<sdk.z.ZodString, "many">>;
|
|
107
|
+
additionalProperties: sdk.z.ZodOptional<sdk.z.ZodUnion<[sdk.z.ZodBoolean, sdk.z.ZodObject<{}, "passthrough">]>>;
|
|
108
108
|
}, "passthrough">, sdk.z.ZodObject<{
|
|
109
|
-
type: sdk.z.ZodLiteral<"array">;
|
|
110
|
-
items: sdk.z.ZodOptional<sdk.z.ZodObject<{}, "passthrough">>;
|
|
111
|
-
minItems: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
112
|
-
maxItems: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
113
109
|
'x-zui': sdk.z.ZodOptional<sdk.z.ZodObject<{
|
|
114
110
|
index: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
115
111
|
typings: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
@@ -132,6 +128,10 @@ export declare const columnSchema: sdk.z.ZodDiscriminatedUnion<"type", [sdk.z.Zo
|
|
|
132
128
|
nullable: sdk.z.ZodOptional<sdk.z.ZodBoolean>;
|
|
133
129
|
description: sdk.z.ZodOptional<sdk.z.ZodString>;
|
|
134
130
|
default: sdk.z.ZodOptional<sdk.z.ZodAny>;
|
|
131
|
+
type: sdk.z.ZodLiteral<"array">;
|
|
132
|
+
items: sdk.z.ZodOptional<sdk.z.ZodObject<{}, "passthrough">>;
|
|
133
|
+
minItems: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
134
|
+
maxItems: sdk.z.ZodOptional<sdk.z.ZodNumber>;
|
|
135
135
|
}, "passthrough">, sdk.z.ZodObject<{
|
|
136
136
|
type: sdk.z.ZodLiteral<"null">;
|
|
137
137
|
}, "strip">]>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const to: {
|
|
2
|
-
|
|
2
|
+
camelCase: (text: string) => string;
|
|
3
3
|
kebabCase: (text: string) => string;
|
|
4
|
-
|
|
4
|
+
pascalCase: (text: string) => string;
|
|
5
5
|
screamingSnakeCase: (text: string) => string;
|
|
6
|
-
|
|
6
|
+
snakeCase: (text: string) => string;
|
|
7
7
|
};
|
|
8
8
|
export declare const is: {
|
|
9
|
-
|
|
9
|
+
camelCase: (text: string) => boolean;
|
|
10
10
|
kebabCase: (text: string) => boolean;
|
|
11
|
-
|
|
11
|
+
pascalCase: (text: string) => boolean;
|
|
12
12
|
screamingSnakeCase: (text: string) => boolean;
|
|
13
|
-
|
|
13
|
+
snakeCase: (text: string) => boolean;
|
|
14
14
|
};
|
|
@@ -31,5 +31,5 @@ export declare const relativePathFrom: (rootdir: AbsolutePath, target: string) =
|
|
|
31
31
|
export declare class PathStore<P extends string> {
|
|
32
32
|
readonly abs: Record<P, AbsolutePath>;
|
|
33
33
|
constructor(abs: Record<P, AbsolutePath>);
|
|
34
|
-
rel(from: Extract<P, `${string}Dir`>): Record<P, AbsolutePath> extends infer T extends object ? { [P_1 in keyof T]:
|
|
34
|
+
rel(from: Extract<P, `${string}Dir`>): Record<P, AbsolutePath> extends infer T extends object ? { [P_1 in keyof T]: TResult; } : never;
|
|
35
35
|
}
|
|
@@ -80,7 +80,13 @@ class CLIPrompt {
|
|
|
80
80
|
initial: opts?.initial?.value,
|
|
81
81
|
choices: transformedChoices
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
if (prompted === void 0) {
|
|
84
|
+
return void 0;
|
|
85
|
+
}
|
|
86
|
+
if (isNumber && prompted === Symbol.for("0")) {
|
|
87
|
+
return opts?.choices?.find((c) => c.value === 0)?.value;
|
|
88
|
+
}
|
|
89
|
+
return prompted;
|
|
84
90
|
}
|
|
85
91
|
async text(message, opts = {}) {
|
|
86
92
|
if (this._props.confirm) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/prompt-utils.ts"],
|
|
4
|
-
"sourcesContent": ["import prompts from 'prompts'\nimport type { Logger } from '../logger'\n\nexport type CLIPromptsProps = {\n confirm: boolean\n}\n\ntype ChoiceValueType = string | number\n\nexport type CLIPromptsChoice<V extends ChoiceValueType> = {\n title: string\n value: V\n}\n\ntype PasswordOptions = Partial<{\n default: string | undefined\n initial: string\n}>\ntype SelectOptions<V extends ChoiceValueType> = Partial<{\n default: V | undefined\n initial: CLIPromptsChoice<V>\n choices: CLIPromptsChoice<V>[]\n}>\ntype TextOptions = Partial<{\n default: string | undefined\n initial: string\n}>\n\nexport class CLIPrompt {\n public constructor(\n private _props: CLIPromptsProps,\n private _logger: Logger\n ) {}\n\n public async confirm(message: string): Promise<boolean> {\n if (this._props.confirm) {\n this._logger.debug(`Confirming automatically (non-interactive mode): ${message}`)\n return true\n }\n\n const { confirm } = await this._prompts({\n type: 'confirm',\n name: 'confirm',\n message,\n initial: false,\n })\n\n if (!confirm) {\n return false\n }\n return true\n }\n\n public async password(message: string, opts: PasswordOptions = {}): Promise<string | undefined> {\n if (this._props.confirm) {\n this._logger.debug(`Return default (non-interactive mode): ${message}`)\n return opts?.default\n }\n\n const { prompted } = await this._prompts({\n type: 'password',\n name: 'prompted',\n message,\n initial: opts?.initial,\n })\n\n return prompted ? prompted : undefined\n }\n\n public async select<V extends ChoiceValueType = string>(\n message: string,\n opts: SelectOptions<V> = {}\n ): Promise<V | undefined> {\n if (this._props.confirm) {\n this._logger.debug(`Return default (non-interactive mode): ${message}`)\n return opts?.default\n }\n\n // NOTE: whilst Prompts supports string, number, date and boolean values for\n // choices, it behaves unexpectedly when the value is a number and is\n // equal to 0. To work around this, we convert the value to a symbol\n // if it is 0, and then convert it back to a number if it was 0.\n\n const isNumber = typeof opts?.choices?.[0]?.value === 'number'\n const transformedChoices = isNumber\n ? opts?.choices?.map((c) => ({ ...c, value: c.value === 0 ? Symbol.for('0') : c.value }))\n : opts?.choices\n\n const { prompted } = await this._prompts({\n type: 'autocomplete',\n name: 'prompted',\n message,\n initial: opts?.initial?.value,\n choices: transformedChoices as prompts.PromptObject['choices'],\n })\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AA4Bb,MAAM,UAAU;AAAA,EACd,YACG,QACA,SACR;AAFQ;AACA;AAAA,EACP;AAAA,EAEH,MAAa,QAAQ,SAAmC;AACtD,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,oDAAoD,OAAO,EAAE;AAChF,aAAO;AAAA,IACT;AAEA,UAAM,EAAE,QAAQ,IAAI,MAAM,KAAK,SAAS;AAAA,MACtC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS;AAAA,IACX,CAAC;AAED,QAAI,CAAC,SAAS;AACZ,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAa,SAAS,SAAiB,OAAwB,CAAC,GAAgC;AAC9F,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,0CAA0C,OAAO,EAAE;AACtE,aAAO,MAAM;AAAA,IACf;AAEA,UAAM,EAAE,SAAS,IAAI,MAAM,KAAK,SAAS;AAAA,MACvC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS,MAAM;AAAA,IACjB,CAAC;AAED,WAAO,WAAW,WAAW;AAAA,EAC/B;AAAA,EAEA,MAAa,OACX,SACA,OAAyB,CAAC,GACF;AACxB,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,0CAA0C,OAAO,EAAE;AACtE,aAAO,MAAM;AAAA,IACf;AAOA,UAAM,WAAW,OAAO,MAAM,UAAU,CAAC,GAAG,UAAU;AACtD,UAAM,qBAAqB,WACvB,MAAM,SAAS,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,EAAE,UAAU,IAAI,OAAO,IAAI,GAAG,IAAI,EAAE,MAAM,EAAE,IACtF,MAAM;AAEV,UAAM,EAAE,SAAS,IAAI,MAAM,KAAK,SAAS;AAAA,MACvC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS,MAAM,SAAS;AAAA,MACxB,SAAS;AAAA,IACX,CAAC;AAED,
|
|
4
|
+
"sourcesContent": ["import prompts from 'prompts'\nimport type { Logger } from '../logger'\n\nexport type CLIPromptsProps = {\n confirm: boolean\n}\n\ntype ChoiceValueType = string | number\n\nexport type CLIPromptsChoice<V extends ChoiceValueType> = {\n title: string\n value: V\n}\n\ntype PasswordOptions = Partial<{\n default: string | undefined\n initial: string\n}>\ntype SelectOptions<V extends ChoiceValueType> = Partial<{\n default: V | undefined\n initial: CLIPromptsChoice<V>\n choices: CLIPromptsChoice<V>[]\n}>\ntype TextOptions = Partial<{\n default: string | undefined\n initial: string\n}>\n\nexport class CLIPrompt {\n public constructor(\n private _props: CLIPromptsProps,\n private _logger: Logger\n ) {}\n\n public async confirm(message: string): Promise<boolean> {\n if (this._props.confirm) {\n this._logger.debug(`Confirming automatically (non-interactive mode): ${message}`)\n return true\n }\n\n const { confirm } = await this._prompts({\n type: 'confirm',\n name: 'confirm',\n message,\n initial: false,\n })\n\n if (!confirm) {\n return false\n }\n return true\n }\n\n public async password(message: string, opts: PasswordOptions = {}): Promise<string | undefined> {\n if (this._props.confirm) {\n this._logger.debug(`Return default (non-interactive mode): ${message}`)\n return opts?.default\n }\n\n const { prompted } = await this._prompts({\n type: 'password',\n name: 'prompted',\n message,\n initial: opts?.initial,\n })\n\n return prompted ? prompted : undefined\n }\n\n public async select<V extends ChoiceValueType = string>(\n message: string,\n opts: SelectOptions<V> = {}\n ): Promise<V | undefined> {\n if (this._props.confirm) {\n this._logger.debug(`Return default (non-interactive mode): ${message}`)\n return opts?.default\n }\n\n // NOTE: whilst Prompts supports string, number, date and boolean values for\n // choices, it behaves unexpectedly when the value is a number and is\n // equal to 0. To work around this, we convert the value to a symbol\n // if it is 0, and then convert it back to a number if it was 0.\n\n const isNumber = typeof opts?.choices?.[0]?.value === 'number'\n const transformedChoices = isNumber\n ? opts?.choices?.map((c) => ({ ...c, value: c.value === 0 ? Symbol.for('0') : c.value }))\n : opts?.choices\n\n const { prompted } = await this._prompts({\n type: 'autocomplete',\n name: 'prompted',\n message,\n initial: opts?.initial?.value,\n choices: transformedChoices as prompts.PromptObject['choices'],\n })\n\n if (prompted === undefined) {\n return undefined\n }\n if (isNumber && prompted === Symbol.for('0')) {\n return opts?.choices?.find((c) => c.value === 0)?.value\n }\n return prompted\n }\n\n public async text(message: string, opts: TextOptions = {}): Promise<string | undefined> {\n if (this._props.confirm) {\n this._logger.debug(`Return default (non-interactive mode): ${message}`)\n return opts?.default\n }\n\n const { prompted } = await this._prompts({\n type: 'text',\n name: 'prompted',\n message,\n initial: opts?.initial,\n })\n\n return prompted ? prompted : undefined\n }\n\n private _prompts = (...args: Parameters<typeof prompts>): ReturnType<typeof prompts> => {\n this._logger.cleanup()\n return prompts(...args)\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AA4Bb,MAAM,UAAU;AAAA,EACd,YACG,QACA,SACR;AAFQ;AACA;AAAA,EACP;AAAA,EAEH,MAAa,QAAQ,SAAmC;AACtD,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,oDAAoD,OAAO,EAAE;AAChF,aAAO;AAAA,IACT;AAEA,UAAM,EAAE,QAAQ,IAAI,MAAM,KAAK,SAAS;AAAA,MACtC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS;AAAA,IACX,CAAC;AAED,QAAI,CAAC,SAAS;AACZ,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAa,SAAS,SAAiB,OAAwB,CAAC,GAAgC;AAC9F,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,0CAA0C,OAAO,EAAE;AACtE,aAAO,MAAM;AAAA,IACf;AAEA,UAAM,EAAE,SAAS,IAAI,MAAM,KAAK,SAAS;AAAA,MACvC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS,MAAM;AAAA,IACjB,CAAC;AAED,WAAO,WAAW,WAAW;AAAA,EAC/B;AAAA,EAEA,MAAa,OACX,SACA,OAAyB,CAAC,GACF;AACxB,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,0CAA0C,OAAO,EAAE;AACtE,aAAO,MAAM;AAAA,IACf;AAOA,UAAM,WAAW,OAAO,MAAM,UAAU,CAAC,GAAG,UAAU;AACtD,UAAM,qBAAqB,WACvB,MAAM,SAAS,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,EAAE,UAAU,IAAI,OAAO,IAAI,GAAG,IAAI,EAAE,MAAM,EAAE,IACtF,MAAM;AAEV,UAAM,EAAE,SAAS,IAAI,MAAM,KAAK,SAAS;AAAA,MACvC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS,MAAM,SAAS;AAAA,MACxB,SAAS;AAAA,IACX,CAAC;AAED,QAAI,aAAa,QAAW;AAC1B,aAAO;AAAA,IACT;AACA,QAAI,YAAY,aAAa,OAAO,IAAI,GAAG,GAAG;AAC5C,aAAO,MAAM,SAAS,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG;AAAA,IACpD;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAa,KAAK,SAAiB,OAAoB,CAAC,GAAgC;AACtF,QAAI,KAAK,OAAO,SAAS;AACvB,WAAK,QAAQ,MAAM,0CAA0C,OAAO,EAAE;AACtE,aAAO,MAAM;AAAA,IACf;AAEA,UAAM,EAAE,SAAS,IAAI,MAAM,KAAK,SAAS;AAAA,MACvC,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA,SAAS,MAAM;AAAA,IACjB,CAAC;AAED,WAAO,WAAW,WAAW;AAAA,EAC/B;AAAA,EAEQ,WAAW,IAAI,SAAiE;AACtF,SAAK,QAAQ,QAAQ;AACrB,eAAO,eAAAA,SAAQ,GAAG,IAAI;AAAA,EACxB;AACF;",
|
|
6
6
|
"names": ["prompts"]
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ export type AssertTrue<_T extends true> = true;
|
|
|
10
10
|
export type AssertAll<_T extends true[]> = true;
|
|
11
11
|
export type IsExtend<X, Y> = X extends Y ? true : false;
|
|
12
12
|
export type IsEquivalent<X, Y> = IsExtend<X, Y> extends true ? IsExtend<Y, X> : false;
|
|
13
|
-
export type IsIdentical<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
|
|
13
|
+
export type IsIdentical<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => (T extends Y ? 1 : 2) ? true : false;
|
|
14
14
|
export type IsEqual<X, Y> = IsIdentical<Normalize<X>, Normalize<Y>>;
|
|
15
15
|
type NormalizeObject<T extends object> = T extends infer O ? {
|
|
16
16
|
[K in keyof O]: Normalize<O[K]>;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/cli",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run build:types && pnpm run bundle && pnpm run template:gen",
|
|
7
|
-
"dev": "ts-node -T src/cli.ts",
|
|
7
|
+
"dev": "ts-node -T -P tsconfig.ts-node.json src/cli.ts",
|
|
8
8
|
"start": "node dist/cli.js",
|
|
9
9
|
"check:type": "tsc --noEmit",
|
|
10
|
-
"bundle": "ts-node -T build.ts",
|
|
10
|
+
"bundle": "ts-node -T -P tsconfig.ts-node.json build.ts",
|
|
11
11
|
"build:types": "tsc -p ./tsconfig.build.json",
|
|
12
12
|
"template:gen": "pnpm -r --stream -F @bp-templates/* exec bp gen",
|
|
13
|
-
"test:e2e": "ts-node -T ./e2e",
|
|
13
|
+
"test:e2e": "ts-node -T -P tsconfig.ts-node.json ./e2e",
|
|
14
14
|
"test": "vitest --run"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@apidevtools/json-schema-ref-parser": "^11.7.0",
|
|
29
29
|
"@botpress/chat": "1.1.0",
|
|
30
|
-
"@botpress/client": "2.
|
|
31
|
-
"@botpress/sdk": "7.0.
|
|
30
|
+
"@botpress/client": "2.2.0",
|
|
31
|
+
"@botpress/sdk": "7.0.3",
|
|
32
32
|
"@bpinternal/const": "^0.1.0",
|
|
33
33
|
"@bpinternal/tunnel": "^0.1.1",
|
|
34
34
|
"@bpinternal/verel": "^0.2.0",
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
},
|
|
6
6
|
"private": true,
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@botpress/client": "2.
|
|
9
|
-
"@botpress/sdk": "7.0.
|
|
8
|
+
"@botpress/client": "2.2.0",
|
|
9
|
+
"@botpress/sdk": "7.0.3"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/node": "^22.16.4",
|
|
13
|
-
"typescript": "^
|
|
13
|
+
"typescript": "^6.0.0"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"lib": ["es2022"],
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "preserve",
|
|
5
5
|
"strict": true,
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"moduleResolution": "
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
10
|
"allowUnusedLabels": false,
|
|
11
11
|
"allowUnreachableCode": false,
|
|
12
12
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"paths": { "*": ["./*"] },
|
|
19
19
|
"outDir": "dist",
|
|
20
20
|
"checkJs": false,
|
|
21
|
+
"types": ["node"],
|
|
21
22
|
"exactOptionalPropertyTypes": false,
|
|
22
23
|
"resolveJsonModule": true,
|
|
23
24
|
"noPropertyAccessFromIndexSignature": false,
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
},
|
|
7
7
|
"private": true,
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@botpress/client": "2.
|
|
10
|
-
"@botpress/sdk": "7.0.
|
|
9
|
+
"@botpress/client": "2.2.0",
|
|
10
|
+
"@botpress/sdk": "7.0.3"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/node": "^22.16.4",
|
|
14
|
-
"typescript": "^
|
|
14
|
+
"typescript": "^6.0.0"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"lib": ["es2022"],
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "preserve",
|
|
5
5
|
"strict": true,
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"moduleResolution": "
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
10
|
"allowUnusedLabels": false,
|
|
11
11
|
"allowUnreachableCode": false,
|
|
12
12
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"paths": { "*": ["./*"] },
|
|
19
19
|
"outDir": "dist",
|
|
20
20
|
"checkJs": false,
|
|
21
|
+
"types": ["node"],
|
|
21
22
|
"exactOptionalPropertyTypes": false,
|
|
22
23
|
"resolveJsonModule": true,
|
|
23
24
|
"noPropertyAccessFromIndexSignature": false,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"lib": ["es2022"],
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "preserve",
|
|
5
5
|
"strict": true,
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"moduleResolution": "
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
10
|
"allowUnusedLabels": false,
|
|
11
11
|
"allowUnreachableCode": false,
|
|
12
12
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"paths": { "*": ["./*"] },
|
|
19
19
|
"outDir": "dist",
|
|
20
20
|
"checkJs": false,
|
|
21
|
+
"types": ["node"],
|
|
21
22
|
"exactOptionalPropertyTypes": false,
|
|
22
23
|
"resolveJsonModule": true,
|
|
23
24
|
"noPropertyAccessFromIndexSignature": false,
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
},
|
|
7
7
|
"private": true,
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@botpress/client": "2.
|
|
10
|
-
"@botpress/sdk": "7.0.
|
|
9
|
+
"@botpress/client": "2.2.0",
|
|
10
|
+
"@botpress/sdk": "7.0.3"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/node": "^22.16.4",
|
|
14
|
-
"typescript": "^
|
|
14
|
+
"typescript": "^6.0.0"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"lib": ["es2022"],
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "preserve",
|
|
5
5
|
"strict": true,
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"moduleResolution": "
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
10
|
"allowUnusedLabels": false,
|
|
11
11
|
"allowUnreachableCode": false,
|
|
12
12
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"paths": { "*": ["./*"] },
|
|
19
19
|
"outDir": "dist",
|
|
20
20
|
"checkJs": false,
|
|
21
|
+
"types": ["node"],
|
|
21
22
|
"exactOptionalPropertyTypes": false,
|
|
22
23
|
"resolveJsonModule": true,
|
|
23
24
|
"noPropertyAccessFromIndexSignature": false,
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
},
|
|
7
7
|
"private": true,
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@botpress/client": "2.
|
|
10
|
-
"@botpress/sdk": "7.0.
|
|
9
|
+
"@botpress/client": "2.2.0",
|
|
10
|
+
"@botpress/sdk": "7.0.3",
|
|
11
11
|
"axios": "^1.6.8"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/node": "^22.16.4",
|
|
15
|
-
"typescript": "^
|
|
15
|
+
"typescript": "^6.0.0"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"lib": ["es2022"],
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "preserve",
|
|
5
5
|
"strict": true,
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"moduleResolution": "
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
10
|
"allowUnusedLabels": false,
|
|
11
11
|
"allowUnreachableCode": false,
|
|
12
12
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"paths": { "*": ["./*"] },
|
|
19
19
|
"outDir": "dist",
|
|
20
20
|
"checkJs": false,
|
|
21
|
+
"types": ["node"],
|
|
21
22
|
"exactOptionalPropertyTypes": false,
|
|
22
23
|
"resolveJsonModule": true,
|
|
23
24
|
"noPropertyAccessFromIndexSignature": false,
|
package/tsconfig.build.json
CHANGED
package/eslint.config.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import rootConfig from '../../eslint.config.mjs'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
...rootConfig,
|
|
5
|
-
{
|
|
6
|
-
ignores: ['templates/**/*', 'e2e/fixtures/**/*'],
|
|
7
|
-
languageOptions: {
|
|
8
|
-
parserOptions: {
|
|
9
|
-
project: ['./tsconfig.json'],
|
|
10
|
-
tsconfigRootDir: import.meta.dirname,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
]
|