@botpress/cli 6.0.0 → 6.1.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/.turbo/turbo-build.log +12 -12
- package/dist/command-definitions.d.ts +43 -0
- package/dist/command-definitions.js +4 -0
- package/dist/command-definitions.js.map +2 -2
- package/dist/command-implementations/index.d.ts +45 -0
- package/dist/command-implementations/index.js +2 -1
- package/dist/command-implementations/index.js.map +2 -2
- package/dist/command-implementations/profile-commands.d.ts +4 -0
- package/dist/command-implementations/profile-commands.js +31 -1
- package/dist/command-implementations/profile-commands.js.map +2 -2
- package/dist/config.d.ts +40 -0
- package/dist/config.js +12 -1
- package/dist/config.js.map +2 -2
- package/dist/index.d.ts +45 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +2 -2
- package/package.json +3 -3
- package/templates/empty-bot/package.json +2 -2
- package/templates/empty-integration/package.json +2 -2
- package/templates/empty-plugin/package.json +1 -1
- package/templates/hello-world/package.json +2 -2
- package/templates/webhook-message/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@6.
|
|
2
|
+
> @botpress/cli@6.1.0 build /home/runner/work/botpress/botpress/packages/cli
|
|
3
3
|
> pnpm run build:types && pnpm run bundle && pnpm run template:gen
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cli@6.
|
|
6
|
+
> @botpress/cli@6.1.0 build:types /home/runner/work/botpress/botpress/packages/cli
|
|
7
7
|
> tsc -p ./tsconfig.build.json
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/cli@6.
|
|
10
|
+
> @botpress/cli@6.1.0 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
11
11
|
> ts-node -T build.ts
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
> @botpress/cli@6.
|
|
14
|
+
> @botpress/cli@6.1.0 template:gen /home/runner/work/botpress/botpress/packages/cli
|
|
15
15
|
> pnpm -r --stream -F @bp-templates/* exec bp gen
|
|
16
16
|
|
|
17
|
-
🤖 Botpress CLI v6.
|
|
17
|
+
🤖 Botpress CLI v6.1.0
|
|
18
18
|
● Checking if cli is up to date
|
|
19
|
-
🤖 Botpress CLI v6.
|
|
20
|
-
🤖 Botpress CLI v6.0.0
|
|
19
|
+
🤖 Botpress CLI v6.1.0
|
|
21
20
|
● Checking if cli is up to date
|
|
21
|
+
🤖 Botpress CLI v6.1.0
|
|
22
22
|
● Checking if cli is up to date
|
|
23
|
-
🤖 Botpress CLI v6.
|
|
23
|
+
🤖 Botpress CLI v6.1.0
|
|
24
24
|
● Checking if cli is up to date
|
|
25
25
|
● Checking if sdk is up to date
|
|
26
26
|
● Checking if sdk is up to date
|
|
27
27
|
● Checking if sdk is up to date
|
|
28
28
|
● Checking if sdk is up to date
|
|
29
29
|
○ Generating typings for integration empty-integration...
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
○ Generating typings for integration hello-world...
|
|
32
31
|
○ Generating typings for bot...
|
|
33
32
|
✓ Typings available at .botpress
|
|
34
33
|
|
|
35
34
|
○ Generating typings for plugin empty-plugin...
|
|
36
35
|
✓ Typings available at .botpress
|
|
37
36
|
|
|
38
|
-
○ Generating typings for integration hello-world...
|
|
39
37
|
✓ Typings available at .botpress
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
✓ Typings available at .botpress
|
|
40
|
+
|
|
41
|
+
🤖 Botpress CLI v6.1.0
|
|
42
42
|
● Checking if cli is up to date
|
|
43
43
|
● Checking if sdk is up to date
|
|
44
44
|
○ Generating typings for integration webhook-message...
|
|
@@ -1558,6 +1558,49 @@ declare const _default: {
|
|
|
1558
1558
|
};
|
|
1559
1559
|
};
|
|
1560
1560
|
};
|
|
1561
|
+
get: {
|
|
1562
|
+
description: string;
|
|
1563
|
+
schema: {
|
|
1564
|
+
profileToGet: {
|
|
1565
|
+
type: "string";
|
|
1566
|
+
description: string;
|
|
1567
|
+
positional: true;
|
|
1568
|
+
idx: number;
|
|
1569
|
+
};
|
|
1570
|
+
displayToken: {
|
|
1571
|
+
type: "boolean";
|
|
1572
|
+
description: string;
|
|
1573
|
+
default: boolean;
|
|
1574
|
+
};
|
|
1575
|
+
verbose: {
|
|
1576
|
+
type: "boolean";
|
|
1577
|
+
description: string;
|
|
1578
|
+
alias: string;
|
|
1579
|
+
default: boolean;
|
|
1580
|
+
};
|
|
1581
|
+
confirm: {
|
|
1582
|
+
type: "boolean";
|
|
1583
|
+
description: string;
|
|
1584
|
+
alias: string;
|
|
1585
|
+
default: boolean;
|
|
1586
|
+
};
|
|
1587
|
+
json: {
|
|
1588
|
+
type: "boolean";
|
|
1589
|
+
description: string;
|
|
1590
|
+
default: boolean;
|
|
1591
|
+
};
|
|
1592
|
+
botpressHome: {
|
|
1593
|
+
type: "string";
|
|
1594
|
+
description: string;
|
|
1595
|
+
default: string;
|
|
1596
|
+
};
|
|
1597
|
+
profile: {
|
|
1598
|
+
type: "string";
|
|
1599
|
+
description: string;
|
|
1600
|
+
alias: string;
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
};
|
|
1561
1604
|
};
|
|
1562
1605
|
};
|
|
1563
1606
|
};
|
|
@@ -99,6 +99,10 @@ var command_definitions_default = {
|
|
|
99
99
|
use: {
|
|
100
100
|
description: "Set the current profile",
|
|
101
101
|
schema: config.schemas.useProfile
|
|
102
|
+
},
|
|
103
|
+
get: {
|
|
104
|
+
description: "Get a specific profile by name",
|
|
105
|
+
schema: config.schemas.getProfile
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/command-definitions.ts"],
|
|
4
|
-
"sourcesContent": ["import type { DefinitionTree } from './command-tree'\nimport * as config from './config'\n\nexport default {\n login: { description: 'Login to Botpress Cloud', schema: config.schemas.login },\n logout: { description: 'Logout of Botpress Cloud', schema: config.schemas.logout },\n bots: {\n description: 'Bot related commands',\n subcommands: {\n create: { description: 'Create new bot', schema: config.schemas.createBot, alias: 'new' },\n get: { description: 'Get bot', schema: config.schemas.getBot },\n delete: { description: 'Delete bot', schema: config.schemas.deleteBot, alias: 'rm' },\n list: { description: 'List bots', schema: config.schemas.listBots, alias: 'ls' },\n },\n },\n integrations: {\n description: 'Integration related commands',\n subcommands: {\n get: { description: 'Get integration', schema: config.schemas.getIntegration },\n delete: { description: 'Delete integration', schema: config.schemas.deleteIntegration, alias: 'rm' },\n list: { description: 'List integrations', schema: config.schemas.listIntegrations, alias: 'ls' },\n },\n },\n interfaces: {\n description: 'Interface related commands',\n subcommands: {\n get: { description: 'Get interface', schema: config.schemas.getInterface },\n delete: { description: 'Delete interface', schema: config.schemas.deleteInterface, alias: 'rm' },\n list: { description: 'List interfaces', schema: config.schemas.listInterfaces, alias: 'ls' },\n },\n },\n plugins: {\n description: 'Plugin related commands',\n subcommands: {\n get: { description: 'Get plugin', schema: config.schemas.getPlugin },\n delete: { description: 'Delete plugin', schema: config.schemas.deletePlugin, alias: 'rm' },\n list: { description: 'List plugins', schema: config.schemas.listPlugins, alias: 'ls' },\n },\n },\n init: { description: 'Initialize a new project', schema: config.schemas.init },\n generate: { description: 'Generate typings for intellisense', schema: config.schemas.generate, alias: 'gen' },\n bundle: { description: 'Bundle a botpress project', schema: config.schemas.bundle },\n build: { description: 'Generate typings and bundle a botpress project', schema: config.schemas.build },\n read: { description: 'Read and parse an integration definition', schema: config.schemas.read },\n serve: { description: 'Serve your project locally', schema: config.schemas.serve },\n deploy: { description: 'Deploy your project to the cloud', schema: config.schemas.deploy },\n add: {\n description: 'Install a package; could be an integration or an interface',\n schema: config.schemas.add,\n alias: ['i', 'install'],\n },\n remove: {\n description: \"Remove a package from your project's dependencies\",\n schema: config.schemas.remove,\n alias: 'rm',\n },\n dev: { description: 'Run your project in dev mode', schema: config.schemas.dev },\n lint: { description: 'EXPERIMENTAL: Lint an integration definition', schema: config.schemas.lint },\n chat: { description: 'EXPERIMENTAL: Chat with a bot directly from the CLI', schema: config.schemas.chat },\n profiles: {\n description: 'Commands for using CLI profiles',\n subcommands: {\n list: { description: 'List all available profiles', schema: config.schemas.listProfiles, alias: 'ls' },\n active: {\n description: 'Get the profile properties you are currently using',\n schema: config.schemas.activeProfile,\n },\n use: {\n description: 'Set the current profile',\n schema: config.schemas.useProfile,\n },\n },\n },\n} satisfies DefinitionTree\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AAExB,IAAO,8BAAQ;AAAA,EACb,OAAO,EAAE,aAAa,2BAA2B,QAAQ,OAAO,QAAQ,MAAM;AAAA,EAC9E,QAAQ,EAAE,aAAa,4BAA4B,QAAQ,OAAO,QAAQ,OAAO;AAAA,EACjF,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,MACX,QAAQ,EAAE,aAAa,kBAAkB,QAAQ,OAAO,QAAQ,WAAW,OAAO,MAAM;AAAA,MACxF,KAAK,EAAE,aAAa,WAAW,QAAQ,OAAO,QAAQ,OAAO;AAAA,MAC7D,QAAQ,EAAE,aAAa,cAAc,QAAQ,OAAO,QAAQ,WAAW,OAAO,KAAK;AAAA,MACnF,MAAM,EAAE,aAAa,aAAa,QAAQ,OAAO,QAAQ,UAAU,OAAO,KAAK;AAAA,IACjF;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,MACX,KAAK,EAAE,aAAa,mBAAmB,QAAQ,OAAO,QAAQ,eAAe;AAAA,MAC7E,QAAQ,EAAE,aAAa,sBAAsB,QAAQ,OAAO,QAAQ,mBAAmB,OAAO,KAAK;AAAA,MACnG,MAAM,EAAE,aAAa,qBAAqB,QAAQ,OAAO,QAAQ,kBAAkB,OAAO,KAAK;AAAA,IACjG;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AA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T;AAAA,EACA,KAAK,EAAE,aAAa,gCAAgC,QAAQ,OAAO,QAAQ,IAAI;AAAA,EAC/E,MAAM,EAAE,aAAa,gDAAgD,QAAQ,OAAO,QAAQ,KAAK;AAAA,EACjG,MAAM,EAAE,aAAa,uDAAuD,QAAQ,OAAO,QAAQ,KAAK;AAAA,EACxG,UAAU;AAAA,IACR,aAAa;AAAA,IACb,aAAa;AAAA,MACX,MAAM,EAAE,aAAa,+BAA+B,QAAQ,OAAO,QAAQ,cAAc,OAAO,KAAK;AAAA,MACrG,QAAQ;AAAA,QACN,aAAa;AAAA,QACb,QAAQ,OAAO,QAAQ;AAAA,MACzB;AAAA,MACA,KAAK;AAAA,QACH,aAAa;AAAA,QACb,QAAQ,OAAO,QAAQ;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AACF;",
|
|
4
|
+
"sourcesContent": ["import type { DefinitionTree } from './command-tree'\nimport * as config from './config'\n\nexport default {\n login: { description: 'Login to Botpress Cloud', schema: config.schemas.login },\n logout: { description: 'Logout of Botpress Cloud', schema: config.schemas.logout },\n bots: {\n description: 'Bot related commands',\n subcommands: {\n create: { description: 'Create new bot', schema: config.schemas.createBot, alias: 'new' },\n get: { description: 'Get bot', schema: config.schemas.getBot },\n delete: { description: 'Delete bot', schema: config.schemas.deleteBot, alias: 'rm' },\n list: { description: 'List bots', schema: config.schemas.listBots, alias: 'ls' },\n },\n },\n integrations: {\n description: 'Integration related commands',\n subcommands: {\n get: { description: 'Get integration', schema: config.schemas.getIntegration },\n delete: { description: 'Delete integration', schema: config.schemas.deleteIntegration, alias: 'rm' },\n list: { description: 'List integrations', schema: config.schemas.listIntegrations, alias: 'ls' },\n },\n },\n interfaces: {\n description: 'Interface related commands',\n subcommands: {\n get: { description: 'Get interface', schema: config.schemas.getInterface },\n delete: { description: 'Delete interface', schema: config.schemas.deleteInterface, alias: 'rm' },\n list: { description: 'List interfaces', schema: config.schemas.listInterfaces, alias: 'ls' },\n },\n },\n plugins: {\n description: 'Plugin related commands',\n subcommands: {\n get: { description: 'Get plugin', schema: config.schemas.getPlugin },\n delete: { description: 'Delete plugin', schema: config.schemas.deletePlugin, alias: 'rm' },\n list: { description: 'List plugins', schema: config.schemas.listPlugins, alias: 'ls' },\n },\n },\n init: { description: 'Initialize a new project', schema: config.schemas.init },\n generate: { description: 'Generate typings for intellisense', schema: config.schemas.generate, alias: 'gen' },\n bundle: { description: 'Bundle a botpress project', schema: config.schemas.bundle },\n build: { description: 'Generate typings and bundle a botpress project', schema: config.schemas.build },\n read: { description: 'Read and parse an integration definition', schema: config.schemas.read },\n serve: { description: 'Serve your project locally', schema: config.schemas.serve },\n deploy: { description: 'Deploy your project to the cloud', schema: config.schemas.deploy },\n add: {\n description: 'Install a package; could be an integration or an interface',\n schema: config.schemas.add,\n alias: ['i', 'install'],\n },\n remove: {\n description: \"Remove a package from your project's dependencies\",\n schema: config.schemas.remove,\n alias: 'rm',\n },\n dev: { description: 'Run your project in dev mode', schema: config.schemas.dev },\n lint: { description: 'EXPERIMENTAL: Lint an integration definition', schema: config.schemas.lint },\n chat: { description: 'EXPERIMENTAL: Chat with a bot directly from the CLI', schema: config.schemas.chat },\n profiles: {\n description: 'Commands for using CLI profiles',\n subcommands: {\n list: { description: 'List all available profiles', schema: config.schemas.listProfiles, alias: 'ls' },\n active: {\n description: 'Get the profile properties you are currently using',\n schema: config.schemas.activeProfile,\n },\n use: {\n description: 'Set the current profile',\n schema: config.schemas.useProfile,\n },\n get: {\n description: 'Get a specific profile by name',\n schema: config.schemas.getProfile,\n },\n },\n },\n} satisfies DefinitionTree\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AAExB,IAAO,8BAAQ;AAAA,EACb,OAAO,EAAE,aAAa,2BAA2B,QAAQ,OAAO,QAAQ,MAAM;AAAA,EAC9E,QAAQ,EAAE,aAAa,4BAA4B,QAAQ,OAAO,QAAQ,OAAO;AAAA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AAO,QAAQ;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1614,6 +1614,51 @@ declare const _default: {
|
|
|
1614
1614
|
}>) => Promise<{
|
|
1615
1615
|
exitCode: number;
|
|
1616
1616
|
}>;
|
|
1617
|
+
get: (argv: CommandArgv<{
|
|
1618
|
+
description: string;
|
|
1619
|
+
schema: {
|
|
1620
|
+
profileToGet: {
|
|
1621
|
+
type: "string";
|
|
1622
|
+
description: string;
|
|
1623
|
+
positional: true;
|
|
1624
|
+
idx: number;
|
|
1625
|
+
};
|
|
1626
|
+
displayToken: {
|
|
1627
|
+
type: "boolean";
|
|
1628
|
+
description: string;
|
|
1629
|
+
default: boolean;
|
|
1630
|
+
};
|
|
1631
|
+
verbose: {
|
|
1632
|
+
type: "boolean";
|
|
1633
|
+
description: string;
|
|
1634
|
+
alias: string;
|
|
1635
|
+
default: boolean;
|
|
1636
|
+
};
|
|
1637
|
+
confirm: {
|
|
1638
|
+
type: "boolean";
|
|
1639
|
+
description: string;
|
|
1640
|
+
alias: string;
|
|
1641
|
+
default: boolean;
|
|
1642
|
+
};
|
|
1643
|
+
json: {
|
|
1644
|
+
type: "boolean";
|
|
1645
|
+
description: string;
|
|
1646
|
+
default: boolean;
|
|
1647
|
+
};
|
|
1648
|
+
botpressHome: {
|
|
1649
|
+
type: "string";
|
|
1650
|
+
description: string;
|
|
1651
|
+
default: string;
|
|
1652
|
+
};
|
|
1653
|
+
profile: {
|
|
1654
|
+
type: "string";
|
|
1655
|
+
description: string;
|
|
1656
|
+
alias: string;
|
|
1657
|
+
};
|
|
1658
|
+
};
|
|
1659
|
+
}>) => Promise<{
|
|
1660
|
+
exitCode: number;
|
|
1661
|
+
}>;
|
|
1617
1662
|
};
|
|
1618
1663
|
};
|
|
1619
1664
|
};
|
|
@@ -106,7 +106,8 @@ var command_implementations_default = {
|
|
|
106
106
|
subcommands: {
|
|
107
107
|
list: getHandler(profiles.ListProfilesCommand),
|
|
108
108
|
active: getHandler(profiles.ActiveProfileCommand),
|
|
109
|
-
use: getHandler(profiles.UseProfileCommand)
|
|
109
|
+
use: getHandler(profiles.UseProfileCommand),
|
|
110
|
+
get: getHandler(profiles.GetProfileCommand)
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/command-implementations/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { ApiClient } from '../api/client'\nimport type commandDefinitions from '../command-definitions'\nimport type { ImplementationTree } from '../command-tree'\nimport { Logger } from '../logger'\nimport type { CommandArgv } from '../typings'\nimport * as utils from '../utils'\nimport { AddCommand } from './add-command'\nimport type { BaseCommand } from './base-command'\nimport * as bots from './bot-commands'\nimport { BuildCommand } from './build-command'\nimport { BundleCommand } from './bundle-command'\nimport { ChatCommand } from './chat-command'\nimport { DeployCommand } from './deploy-command'\nimport { DevCommand } from './dev-command'\nimport { GenerateCommand } from './gen-command'\nimport type { GlobalCommand, GlobalCommandDefinition } from './global-command'\nimport { InitCommand } from './init-command'\nimport * as integrations from './integration-commands'\nimport * as interfaces from './interface-commands'\nimport { LintCommand } from './lint-command'\nimport { LoginCommand } from './login-command'\nimport { LogoutCommand } from './logout-command'\nimport * as plugins from './plugin-commands'\nimport * as profiles from './profile-commands'\nimport { ReadCommand } from './read-command'\nimport { RemoveCommand } from './remove-command'\nimport { ServeCommand } from './serve-command'\n\ntype GlobalCtor<C extends GlobalCommandDefinition> = new (\n ...args: ConstructorParameters<typeof GlobalCommand<C>>\n) => BaseCommand<C>\n\nconst getHandler =\n <C extends GlobalCommandDefinition>(cls: GlobalCtor<C>) =>\n async (argv: CommandArgv<C>) => {\n const logger = new Logger(argv)\n const prompt = new utils.prompt.CLIPrompt(argv, logger)\n return new cls(ApiClient, prompt, logger, argv).handler()\n }\n\nexport default {\n login: getHandler(LoginCommand),\n logout: getHandler(LogoutCommand),\n bots: {\n subcommands: {\n create: getHandler(bots.CreateBotCommand),\n get: getHandler(bots.GetBotCommand),\n delete: getHandler(bots.DeleteBotCommand),\n list: getHandler(bots.ListBotsCommand),\n },\n },\n integrations: {\n subcommands: {\n get: getHandler(integrations.GetIntegrationCommand),\n list: getHandler(integrations.ListIntegrationsCommand),\n delete: getHandler(integrations.DeleteIntegrationCommand),\n },\n },\n interfaces: {\n subcommands: {\n get: getHandler(interfaces.GetInterfaceCommand),\n list: getHandler(interfaces.ListInterfacesCommand),\n delete: getHandler(interfaces.DeleteInterfaceCommand),\n },\n },\n plugins: {\n subcommands: {\n get: getHandler(plugins.GetPluginCommand),\n list: getHandler(plugins.ListPluginsCommand),\n delete: getHandler(plugins.DeletePluginCommand),\n },\n },\n init: getHandler(InitCommand),\n generate: getHandler(GenerateCommand),\n bundle: getHandler(BundleCommand),\n build: getHandler(BuildCommand),\n read: getHandler(ReadCommand),\n serve: getHandler(ServeCommand),\n deploy: getHandler(DeployCommand),\n add: getHandler(AddCommand),\n remove: getHandler(RemoveCommand),\n dev: getHandler(DevCommand),\n lint: getHandler(LintCommand),\n chat: getHandler(ChatCommand),\n profiles: {\n subcommands: {\n list: getHandler(profiles.ListProfilesCommand),\n active: getHandler(profiles.ActiveProfileCommand),\n use: getHandler(profiles.UseProfileCommand),\n },\n },\n} satisfies ImplementationTree<typeof commandDefinitions>\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAG1B,oBAAuB;AAEvB,YAAuB;AACvB,yBAA2B;AAE3B,WAAsB;AACtB,2BAA6B;AAC7B,4BAA8B;AAC9B,0BAA4B;AAC5B,4BAA8B;AAC9B,yBAA2B;AAC3B,yBAAgC;AAEhC,0BAA4B;AAC5B,mBAA8B;AAC9B,iBAA4B;AAC5B,0BAA4B;AAC5B,2BAA6B;AAC7B,4BAA8B;AAC9B,cAAyB;AACz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WAAW,+BAAW;AAAA,EAC5B,OAAO,WAAW,iCAAY;AAAA,EAC9B,QAAQ,WAAW,mCAAa;AAAA,EAChC,KAAK,WAAW,6BAAU;AAAA,EAC1B,QAAQ,WAAW,mCAAa;AAAA,EAChC,KAAK,WAAW,6BAAU;AAAA,EAC1B,MAAM,WAAW,+BAAW;AAAA,EAC5B,MAAM,WAAW,+BAAW;AAAA,EAC5B,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM,WAAW,SAAS,mBAAmB;AAAA,MAC7C,QAAQ,WAAW,SAAS,oBAAoB;AAAA,MAChD,KAAK,WAAW,SAAS,iBAAiB;AAAA,IAC5C;AAAA,EACF;AACF;",
|
|
4
|
+
"sourcesContent": ["import { ApiClient } from '../api/client'\nimport type commandDefinitions from '../command-definitions'\nimport type { ImplementationTree } from '../command-tree'\nimport { Logger } from '../logger'\nimport type { CommandArgv } from '../typings'\nimport * as utils from '../utils'\nimport { AddCommand } from './add-command'\nimport type { BaseCommand } from './base-command'\nimport * as bots from './bot-commands'\nimport { BuildCommand } from './build-command'\nimport { BundleCommand } from './bundle-command'\nimport { ChatCommand } from './chat-command'\nimport { DeployCommand } from './deploy-command'\nimport { DevCommand } from './dev-command'\nimport { GenerateCommand } from './gen-command'\nimport type { GlobalCommand, GlobalCommandDefinition } from './global-command'\nimport { InitCommand } from './init-command'\nimport * as integrations from './integration-commands'\nimport * as interfaces from './interface-commands'\nimport { LintCommand } from './lint-command'\nimport { LoginCommand } from './login-command'\nimport { LogoutCommand } from './logout-command'\nimport * as plugins from './plugin-commands'\nimport * as profiles from './profile-commands'\nimport { ReadCommand } from './read-command'\nimport { RemoveCommand } from './remove-command'\nimport { ServeCommand } from './serve-command'\n\ntype GlobalCtor<C extends GlobalCommandDefinition> = new (\n ...args: ConstructorParameters<typeof GlobalCommand<C>>\n) => BaseCommand<C>\n\nconst getHandler =\n <C extends GlobalCommandDefinition>(cls: GlobalCtor<C>) =>\n async (argv: CommandArgv<C>) => {\n const logger = new Logger(argv)\n const prompt = new utils.prompt.CLIPrompt(argv, logger)\n return new cls(ApiClient, prompt, logger, argv).handler()\n }\n\nexport default {\n login: getHandler(LoginCommand),\n logout: getHandler(LogoutCommand),\n bots: {\n subcommands: {\n create: getHandler(bots.CreateBotCommand),\n get: getHandler(bots.GetBotCommand),\n delete: getHandler(bots.DeleteBotCommand),\n list: getHandler(bots.ListBotsCommand),\n },\n },\n integrations: {\n subcommands: {\n get: getHandler(integrations.GetIntegrationCommand),\n list: getHandler(integrations.ListIntegrationsCommand),\n delete: getHandler(integrations.DeleteIntegrationCommand),\n },\n },\n interfaces: {\n subcommands: {\n get: getHandler(interfaces.GetInterfaceCommand),\n list: getHandler(interfaces.ListInterfacesCommand),\n delete: getHandler(interfaces.DeleteInterfaceCommand),\n },\n },\n plugins: {\n subcommands: {\n get: getHandler(plugins.GetPluginCommand),\n list: getHandler(plugins.ListPluginsCommand),\n delete: getHandler(plugins.DeletePluginCommand),\n },\n },\n init: getHandler(InitCommand),\n generate: getHandler(GenerateCommand),\n bundle: getHandler(BundleCommand),\n build: getHandler(BuildCommand),\n read: getHandler(ReadCommand),\n serve: getHandler(ServeCommand),\n deploy: getHandler(DeployCommand),\n add: getHandler(AddCommand),\n remove: getHandler(RemoveCommand),\n dev: getHandler(DevCommand),\n lint: getHandler(LintCommand),\n chat: getHandler(ChatCommand),\n profiles: {\n subcommands: {\n list: getHandler(profiles.ListProfilesCommand),\n active: getHandler(profiles.ActiveProfileCommand),\n use: getHandler(profiles.UseProfileCommand),\n get: getHandler(profiles.GetProfileCommand),\n },\n },\n} satisfies ImplementationTree<typeof commandDefinitions>\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAG1B,oBAAuB;AAEvB,YAAuB;AACvB,yBAA2B;AAE3B,WAAsB;AACtB,2BAA6B;AAC7B,4BAA8B;AAC9B,0BAA4B;AAC5B,4BAA8B;A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A,EACA,MAAM,WAAW,+BAAW;AAAA,EAC5B,UAAU,WAAW,kCAAe;AAAA,EACpC,QAAQ,WAAW,mCAAa;AAAA,EAChC,OAAO,WAAW,iCAAY;AAAA,EAC9B,MAAM,WAAW,+BAAW;AAAA,EAC5B,OAAO,WAAW,iCAAY;AAAA,EAC9B,QAAQ,WAAW,mCAAa;AAAA,EAChC,KAAK,WAAW,6BAAU;AAAA,EAC1B,QAAQ,WAAW,mCAAa;AAAA,EAChC,KAAK,WAAW,6BAAU;AAAA,EAC1B,MAAM,WAAW,+BAAW;AAAA,EAC5B,MAAM,WAAW,+BAAW;AAAA,EAC5B,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM,WAAW,SAAS,mBAAmB;AAAA,MAC7C,QAAQ,WAAW,SAAS,oBAAoB;AAAA,MAChD,KAAK,WAAW,SAAS,iBAAiB;AAAA,MAC1C,KAAK,WAAW,SAAS,iBAAiB;AAAA,IAC5C;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,3 +12,7 @@ export type UseProfileCommandDefinition = typeof commandDefinitions.profiles.sub
|
|
|
12
12
|
export declare class UseProfileCommand extends GlobalCommand<UseProfileCommandDefinition> {
|
|
13
13
|
run(): Promise<void>;
|
|
14
14
|
}
|
|
15
|
+
export type GetProfileCommandDefinition = typeof commandDefinitions.profiles.subcommands.get;
|
|
16
|
+
export declare class GetProfileCommand extends GlobalCommand<GetProfileCommandDefinition> {
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var profile_commands_exports = {};
|
|
30
30
|
__export(profile_commands_exports, {
|
|
31
31
|
ActiveProfileCommand: () => ActiveProfileCommand,
|
|
32
|
+
GetProfileCommand: () => GetProfileCommand,
|
|
32
33
|
ListProfilesCommand: () => ListProfilesCommand,
|
|
33
34
|
UseProfileCommand: () => UseProfileCommand
|
|
34
35
|
});
|
|
@@ -78,7 +79,7 @@ class UseProfileCommand extends import_global_command.GlobalCommand {
|
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
81
|
const profiles = await this.readProfilesFromFS();
|
|
81
|
-
const choices = Object.
|
|
82
|
+
const choices = Object.keys(profiles).map((profileName) => ({
|
|
82
83
|
title: profileName,
|
|
83
84
|
description: "",
|
|
84
85
|
value: profileName
|
|
@@ -95,6 +96,34 @@ class UseProfileCommand extends import_global_command.GlobalCommand {
|
|
|
95
96
|
logSuccess(selectedProfile);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
99
|
+
class GetProfileCommand extends import_global_command.GlobalCommand {
|
|
100
|
+
async run() {
|
|
101
|
+
const logResult = (profileEntry) => {
|
|
102
|
+
const profile2 = _shouldOmitToken(this.argv) ? _stripProfileToken(profileEntry) : profileEntry;
|
|
103
|
+
this.logger.log("Profile:");
|
|
104
|
+
this.logger.json(profile2);
|
|
105
|
+
};
|
|
106
|
+
if (this.argv.profileToGet) {
|
|
107
|
+
const profile2 = await this.readProfileFromFS(this.argv.profileToGet);
|
|
108
|
+
logResult({ name: this.argv.profileToGet, ...profile2 });
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const profiles = await this.readProfilesFromFS();
|
|
112
|
+
const choices = Object.keys(profiles).map((profileName) => ({
|
|
113
|
+
title: profileName,
|
|
114
|
+
description: "",
|
|
115
|
+
value: profileName
|
|
116
|
+
}));
|
|
117
|
+
const selectedProfile = await this.prompt.select("Select the profile you want to get.", { choices });
|
|
118
|
+
if (!selectedProfile) {
|
|
119
|
+
this.logger.log("No profile selected, aborting.");
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const profile = profiles[selectedProfile];
|
|
123
|
+
if (!profile) throw new errors.BotpressCLIError("The selected profile could not be read");
|
|
124
|
+
logResult({ name: selectedProfile, ...profile });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
98
127
|
const _updateGlobalCache = async (props) => {
|
|
99
128
|
await props.globalCache.set("activeProfile", props.profileName);
|
|
100
129
|
await props.globalCache.set("apiUrl", props.profile.apiUrl);
|
|
@@ -110,6 +139,7 @@ const _shouldOmitToken = (argv) => !argv.displayToken;
|
|
|
110
139
|
// Annotate the CommonJS export names for ESM import in node:
|
|
111
140
|
0 && (module.exports = {
|
|
112
141
|
ActiveProfileCommand,
|
|
142
|
+
GetProfileCommand,
|
|
113
143
|
ListProfilesCommand,
|
|
114
144
|
UseProfileCommand
|
|
115
145
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/command-implementations/profile-commands.ts"],
|
|
4
|
-
"sourcesContent": ["import chalk from 'chalk'\nimport type commandDefinitions from '../command-definitions'\nimport * as consts from '../consts'\nimport * as errors from '../errors'\nimport * as utils from '../utils'\nimport { GlobalCache, GlobalCommand, ProfileCredentials } from './global-command'\n\ntype ProfileEntry = ProfileCredentials & {\n name: string\n}\n\ntype ProfileEntryWithoutToken = Omit<ProfileEntry, 'token'>\n\nexport type ActiveProfileCommandDefinition = typeof commandDefinitions.profiles.subcommands.active\nexport class ActiveProfileCommand extends GlobalCommand<ActiveProfileCommandDefinition> {\n public async run(): Promise<void> {\n let activeProfileName = await this.globalCache.get('activeProfile')\n\n if (!activeProfileName) {\n this.logger.debug(`No active profile set, defaulting to ${consts.defaultProfileName}`)\n activeProfileName = consts.defaultProfileName\n await this.globalCache.set('activeProfile', activeProfileName)\n }\n\n const profile = await this.readProfileFromFS(activeProfileName)\n let profileEntry: ProfileEntry | ProfileEntryWithoutToken = { name: activeProfileName, ...profile }\n if (_shouldOmitToken(this.argv)) profileEntry = _stripProfileToken(profileEntry)\n\n this.logger.log('Active profile:')\n this.logger.json(profileEntry)\n }\n}\n\nexport type ListProfilesCommandDefinition = typeof commandDefinitions.profiles.subcommands.list\nexport class ListProfilesCommand extends GlobalCommand<ListProfilesCommandDefinition> {\n public async run(): Promise<void> {\n const profiles = await this.readProfilesFromFS()\n const profileEntries: ProfileEntry[] = Object.entries(profiles).map(([name, profile]) => ({ name, ...profile }))\n if (!profileEntries.length) {\n this.logger.log('No profiles found')\n return\n }\n const activeProfileName = await this.globalCache.get('activeProfile')\n const activeProfileMsg = `Active profile: '${chalk.bold(chalk.cyanBright(activeProfileName))}'`\n\n this.logger.log(activeProfileMsg)\n this.logger.json(!_shouldOmitToken(this.argv) ? profileEntries : profileEntries.map(_stripProfileToken))\n this.logger.log(activeProfileMsg)\n }\n}\n\nexport type UseProfileCommandDefinition = typeof commandDefinitions.profiles.subcommands.use\nexport class UseProfileCommand extends GlobalCommand<UseProfileCommandDefinition> {\n public async run(): Promise<void> {\n const logSuccess = (profileName: string) => this.logger.success(`Now using profile \"${profileName}\"`)\n\n if (this.argv.profileToUse) {\n const profile = await this.readProfileFromFS(this.argv.profileToUse)\n await this.globalCache.set('activeProfile', this.argv.profileToUse)\n await _updateGlobalCache({ globalCache: this.globalCache, profileName: this.argv.profileToUse, profile })\n logSuccess(this.argv.profileToUse)\n return\n }\n const profiles = await this.readProfilesFromFS()\n const choices = Object.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,aAAwB;AACxB,aAAwB;AAExB,4BAA+D;AASxD,MAAM,6BAA6B,oCAA8C;AAAA,EACtF,MAAa,MAAqB;AAChC,QAAI,oBAAoB,MAAM,KAAK,YAAY,IAAI,eAAe;AAElE,QAAI,CAAC,mBAAmB;AACtB,WAAK,OAAO,MAAM,wCAAwC,OAAO,kBAAkB,EAAE;AACrF,0BAAoB,OAAO;AAC3B,YAAM,KAAK,YAAY,IAAI,iBAAiB,iBAAiB;AAAA,IAC/D;AAEA,UAAM,UAAU,MAAM,KAAK,kBAAkB,iBAAiB;AAC9D,QAAI,eAAwD,EAAE,MAAM,mBAAmB,GAAG,QAAQ;AAClG,QAAI,iBAAi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'chalk'\nimport type commandDefinitions from '../command-definitions'\nimport * as consts from '../consts'\nimport * as errors from '../errors'\nimport * as utils from '../utils'\nimport { GlobalCache, GlobalCommand, ProfileCredentials } from './global-command'\n\ntype ProfileEntry = ProfileCredentials & {\n name: string\n}\n\ntype ProfileEntryWithoutToken = Omit<ProfileEntry, 'token'>\n\nexport type ActiveProfileCommandDefinition = typeof commandDefinitions.profiles.subcommands.active\nexport class ActiveProfileCommand extends GlobalCommand<ActiveProfileCommandDefinition> {\n public async run(): Promise<void> {\n let activeProfileName = await this.globalCache.get('activeProfile')\n\n if (!activeProfileName) {\n this.logger.debug(`No active profile set, defaulting to ${consts.defaultProfileName}`)\n activeProfileName = consts.defaultProfileName\n await this.globalCache.set('activeProfile', activeProfileName)\n }\n\n const profile = await this.readProfileFromFS(activeProfileName)\n let profileEntry: ProfileEntry | ProfileEntryWithoutToken = { name: activeProfileName, ...profile }\n if (_shouldOmitToken(this.argv)) profileEntry = _stripProfileToken(profileEntry)\n\n this.logger.log('Active profile:')\n this.logger.json(profileEntry)\n }\n}\n\nexport type ListProfilesCommandDefinition = typeof commandDefinitions.profiles.subcommands.list\nexport class ListProfilesCommand extends GlobalCommand<ListProfilesCommandDefinition> {\n public async run(): Promise<void> {\n const profiles = await this.readProfilesFromFS()\n const profileEntries: ProfileEntry[] = Object.entries(profiles).map(([name, profile]) => ({ name, ...profile }))\n if (!profileEntries.length) {\n this.logger.log('No profiles found')\n return\n }\n const activeProfileName = await this.globalCache.get('activeProfile')\n const activeProfileMsg = `Active profile: '${chalk.bold(chalk.cyanBright(activeProfileName))}'`\n\n this.logger.log(activeProfileMsg)\n this.logger.json(!_shouldOmitToken(this.argv) ? profileEntries : profileEntries.map(_stripProfileToken))\n this.logger.log(activeProfileMsg)\n }\n}\n\nexport type UseProfileCommandDefinition = typeof commandDefinitions.profiles.subcommands.use\nexport class UseProfileCommand extends GlobalCommand<UseProfileCommandDefinition> {\n public async run(): Promise<void> {\n const logSuccess = (profileName: string) => this.logger.success(`Now using profile \"${profileName}\"`)\n\n if (this.argv.profileToUse) {\n const profile = await this.readProfileFromFS(this.argv.profileToUse)\n await this.globalCache.set('activeProfile', this.argv.profileToUse)\n await _updateGlobalCache({ globalCache: this.globalCache, profileName: this.argv.profileToUse, profile })\n logSuccess(this.argv.profileToUse)\n return\n }\n const profiles = await this.readProfilesFromFS()\n const choices = Object.keys(profiles).map((profileName) => ({\n title: profileName,\n description: '',\n value: profileName,\n }))\n const selectedProfile = await this.prompt.select('Select the profile you want to use.', { choices })\n\n if (!selectedProfile) {\n this.logger.log('No profile selected, aborting.')\n return\n }\n\n const profile = profiles[selectedProfile]\n if (!profile) throw new errors.BotpressCLIError('The selected profile could not be read')\n await this.globalCache.set('activeProfile', selectedProfile)\n await _updateGlobalCache({ globalCache: this.globalCache, profileName: selectedProfile, profile })\n logSuccess(selectedProfile)\n }\n}\n\nexport type GetProfileCommandDefinition = typeof commandDefinitions.profiles.subcommands.get\nexport class GetProfileCommand extends GlobalCommand<GetProfileCommandDefinition> {\n public async run(): Promise<void> {\n const logResult = (profileEntry: ProfileEntry) => {\n const profile = _shouldOmitToken(this.argv) ? _stripProfileToken(profileEntry) : profileEntry\n this.logger.log('Profile:')\n this.logger.json(profile)\n }\n\n if (this.argv.profileToGet) {\n const profile = await this.readProfileFromFS(this.argv.profileToGet)\n logResult({ name: this.argv.profileToGet, ...profile })\n return\n }\n\n const profiles = await this.readProfilesFromFS()\n const choices = Object.keys(profiles).map((profileName) => ({\n title: profileName,\n description: '',\n value: profileName,\n }))\n const selectedProfile = await this.prompt.select('Select the profile you want to get.', { choices })\n\n if (!selectedProfile) {\n this.logger.log('No profile selected, aborting.')\n return\n }\n\n const profile = profiles[selectedProfile]\n if (!profile) throw new errors.BotpressCLIError('The selected profile could not be read')\n logResult({ name: selectedProfile, ...profile })\n }\n}\n\nconst _updateGlobalCache = async (props: {\n globalCache: utils.cache.FSKeyValueCache<GlobalCache>\n profileName: string\n profile: ProfileCredentials\n}): Promise<void> => {\n await props.globalCache.set('activeProfile', props.profileName)\n await props.globalCache.set('apiUrl', props.profile.apiUrl)\n await props.globalCache.set('token', props.profile.token)\n await props.globalCache.set('workspaceId', props.profile.workspaceId)\n}\n\nconst _stripProfileToken = (profile: ProfileEntry | ProfileEntryWithoutToken): ProfileEntryWithoutToken => ({\n name: profile.name,\n apiUrl: profile.apiUrl,\n workspaceId: profile.workspaceId,\n})\n\nconst _shouldOmitToken = (argv: { displayToken: boolean }) => !argv.displayToken\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,aAAwB;AACxB,aAAwB;AAExB,4BAA+D;AASxD,MAAM,6BAA6B,oCAA8C;AAAA,EACtF,MAAa,MAAqB;AAChC,QAAI,oBAAoB,MAAM,KAAK,YAAY,IAAI,eAAe;AAElE,QAAI,CAAC,mBAAmB;AACtB,WAAK,OAAO,MAAM,wCAAwC,OAAO,kBAAkB,EAAE;AACrF,0BAAoB,OAAO;AAC3B,YAAM,KAAK,YAAY,IAAI,iBAAiB,iBAAiB;AAAA,IAC/D;AAEA,UAAM,UAAU,MAAM,KAAK,kBAAkB,iBAAiB;AAC9D,QAAI,eAAwD,EAAE,MAAM,mBAAmB,GAAG,QAAQ;AAClG,QAAI,iBAAiB,KAAK,IAAI,EAAG,gBAAe,mBAAmB,YAAY;AAE/E,SAAK,OAAO,IAAI,iBAAiB;AACjC,SAAK,OAAO,KAAK,YAAY;AAAA,EAC/B;AACF;AAGO,MAAM,4BAA4B,oCAA6C;AAAA,EACpF,MAAa,MAAqB;AAChC,UAAM,WAAW,MAAM,KAAK,mBAAmB;AAC/C,UAAM,iBAAiC,OAAO,QAAQ,QAAQ,EAAE,IAAI,CAAC,CAAC,MAAM,OAAO,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE;AAC/G,QAAI,CAAC,eAAe,QAAQ;AAC1B,WAAK,O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AM,qBAAqB,CAAC,aAAgF;AAAA,EAC1G,MAAM,QAAQ;AAAA,EACd,QAAQ,QAAQ;AAAA,EAChB,aAAa,QAAQ;AACvB;AAEA,MAAM,mBAAmB,CAAC,SAAoC,CAAC,KAAK;",
|
|
6
6
|
"names": ["chalk", "profile"]
|
|
7
7
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -1517,4 +1517,44 @@ export declare const schemas: {
|
|
|
1517
1517
|
alias: string;
|
|
1518
1518
|
};
|
|
1519
1519
|
};
|
|
1520
|
+
readonly getProfile: {
|
|
1521
|
+
profileToGet: {
|
|
1522
|
+
type: "string";
|
|
1523
|
+
description: string;
|
|
1524
|
+
positional: true;
|
|
1525
|
+
idx: number;
|
|
1526
|
+
};
|
|
1527
|
+
displayToken: {
|
|
1528
|
+
type: "boolean";
|
|
1529
|
+
description: string;
|
|
1530
|
+
default: boolean;
|
|
1531
|
+
};
|
|
1532
|
+
verbose: {
|
|
1533
|
+
type: "boolean";
|
|
1534
|
+
description: string;
|
|
1535
|
+
alias: string;
|
|
1536
|
+
default: boolean;
|
|
1537
|
+
};
|
|
1538
|
+
confirm: {
|
|
1539
|
+
type: "boolean";
|
|
1540
|
+
description: string;
|
|
1541
|
+
alias: string;
|
|
1542
|
+
default: boolean;
|
|
1543
|
+
};
|
|
1544
|
+
json: {
|
|
1545
|
+
type: "boolean";
|
|
1546
|
+
description: string;
|
|
1547
|
+
default: boolean;
|
|
1548
|
+
};
|
|
1549
|
+
botpressHome: {
|
|
1550
|
+
type: "string";
|
|
1551
|
+
description: string;
|
|
1552
|
+
default: string;
|
|
1553
|
+
};
|
|
1554
|
+
profile: {
|
|
1555
|
+
type: "string";
|
|
1556
|
+
description: string;
|
|
1557
|
+
alias: string;
|
|
1558
|
+
};
|
|
1559
|
+
};
|
|
1520
1560
|
};
|
package/dist/config.js
CHANGED
|
@@ -372,6 +372,16 @@ const useProfileSchema = {
|
|
|
372
372
|
idx: 0
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
|
+
const getProfileSchema = {
|
|
376
|
+
...globalSchema,
|
|
377
|
+
profileToGet: {
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json",
|
|
380
|
+
positional: true,
|
|
381
|
+
idx: 0
|
|
382
|
+
},
|
|
383
|
+
displayToken: { type: "boolean", description: "Display the token in the bp profile", default: false }
|
|
384
|
+
};
|
|
375
385
|
const schemas = {
|
|
376
386
|
global: globalSchema,
|
|
377
387
|
project: projectSchema,
|
|
@@ -406,7 +416,8 @@ const schemas = {
|
|
|
406
416
|
chat: chatSchema,
|
|
407
417
|
listProfiles: listProfilesSchema,
|
|
408
418
|
activeProfile: activeProfileSchema,
|
|
409
|
-
useProfile: useProfileSchema
|
|
419
|
+
useProfile: useProfileSchema,
|
|
420
|
+
getProfile: getProfileSchema
|
|
410
421
|
};
|
|
411
422
|
// Annotate the CommonJS export names for ESM import in node:
|
|
412
423
|
0 && (module.exports = {
|
package/dist/config.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/config.ts"],
|
|
4
|
-
"sourcesContent": ["import * as consts from './consts'\nimport { ProjectTemplates } from './project-templates'\nimport type { CommandOption, CommandSchema } from './typings'\n\n// command options\n\nconst port = {\n type: 'number',\n description: 'The port to use',\n} satisfies CommandOption\n\nconst workDir = {\n type: 'string',\n description: 'The path to the project',\n default: consts.defaultWorkDir,\n} satisfies CommandOption\n\nconst noBuild = {\n type: 'boolean',\n description: 'Skip the build step',\n default: false,\n} satisfies CommandOption\n\nconst dryRun = {\n type: 'boolean',\n description: 'Ask the API not to perform the actual operation',\n default: false,\n} as const satisfies CommandOption\n\nconst apiUrl = {\n type: 'string',\n description: 'The URL of the Botpress server',\n} satisfies CommandOption\n\nconst token = {\n type: 'string',\n description: 'You Personal Access Token ',\n} satisfies CommandOption\n\nconst workspaceId = {\n type: 'string',\n description: 'The Workspace Id to deploy to',\n} satisfies CommandOption\n\nconst secrets = {\n type: 'string',\n description: 'Values for the integration secrets',\n array: true,\n default: [],\n} satisfies CommandOption\n\nconst botRef = {\n type: 'string',\n description: 'The bot ID. Bot Name is not supported.',\n demandOption: true,\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst packageRef = {\n type: 'string',\n description:\n 'The package ID or name with optional version. The package can be either an integration or an interface. Ex: teams, teams@0.2.0, llm@5.1.0',\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst integrationRef = {\n ...packageRef,\n demandOption: true,\n description: 'The integration ID or name with optional version. Ex: teams or teams@0.2.0',\n} satisfies CommandOption\n\nconst interfaceRef = {\n ...packageRef,\n demandOption: true,\n description: 'The interface ID or name and version. Ex: llm@5.1.0',\n} satisfies CommandOption\n\nconst pluginRef = {\n ...packageRef,\n demandOption: true,\n description: 'The plugin ID or name and version. Ex: knowledge@0.0.1',\n} satisfies CommandOption\n\nconst sourceMap = { type: 'boolean', description: 'Generate sourcemaps', default: false } satisfies CommandOption\n\nconst minify = { type: 'boolean', description: 'Minify the bundled code', default: true } satisfies CommandOption\n\nconst dev = {\n type: 'boolean',\n description: 'List only dev bots / dev integrations',\n default: false,\n} satisfies CommandOption\n\n// base schemas\n\nconst globalSchema = {\n verbose: {\n type: 'boolean',\n description: 'Enable verbose logging',\n alias: 'v',\n default: false,\n },\n confirm: {\n type: 'boolean',\n description: 'Confirm all prompts',\n alias: 'y',\n default: false,\n },\n json: {\n type: 'boolean',\n description: 'Prevent logging anything else than raw json in stdout. Useful for piping output to other tools',\n default: false,\n },\n botpressHome: {\n type: 'string',\n description: 'The path to the Botpress home directory',\n default: consts.defaultBotpressHome,\n },\n profile: {\n type: 'string',\n description: 'The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json',\n alias: 'p',\n },\n} satisfies CommandSchema\n\nconst projectSchema = {\n ...globalSchema,\n workDir,\n} satisfies CommandSchema\n\nconst credentialsSchema = {\n apiUrl,\n workspaceId,\n token,\n} satisfies CommandSchema\n\nconst secretsSchema = {\n secrets,\n} satisfies CommandSchema\n\n// command schemas\n\nconst generateSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst bundleSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst buildSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst readSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst serveSchema = {\n ...projectSchema,\n ...secretsSchema,\n port,\n} satisfies CommandSchema\n\nconst deploySchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n botId: { type: 'string', description: 'The bot ID to deploy. Only used when deploying a bot' },\n noBuild,\n dryRun,\n createNewBot: { type: 'boolean', description: 'Create a new bot when deploying. Only used when deploying a bot' },\n sourceMap,\n minify,\n visibility: {\n type: 'string',\n choices: ['public', 'private', 'unlisted'] as const,\n description:\n 'The visibility of the project. By default, projects are always private. Unlisted visibility is only supported for integrations and plugins.',\n default: 'private',\n },\n public: {\n type: 'boolean',\n description: 'DEPRECATED: Please use \"--visibility public\" instead.',\n default: false,\n deprecated: true,\n } satisfies CommandOption,\n allowDeprecated: {\n type: 'boolean',\n description: 'Allow deprecated features in the project',\n default: false,\n },\n} as const satisfies CommandSchema\n\nconst devSchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n sourceMap,\n minify,\n port,\n tunnelUrl: {\n type: 'string',\n description: 'The tunnel HTTP URL to use',\n default: consts.defaultTunnelUrl,\n },\n tunnelId: {\n type: 'string',\n description: 'The tunnel ID to use. The ID will be generated if not specified',\n },\n noSecretCaching: {\n type: 'boolean',\n description: 'Do not save the secrets locally',\n default: false,\n alias: 'nsc',\n },\n} satisfies CommandSchema\n\nconst addSchema = {\n ...globalSchema,\n ...credentialsSchema,\n packageRef,\n installPath: {\n type: 'string',\n description: 'The path where to install the package',\n default: consts.defaultInstallPath,\n },\n useDev: {\n type: 'boolean',\n description: 'If a dev version of the package is found, use it',\n default: false,\n },\n alias: {\n type: 'string',\n description: 'The alias to install the package with',\n },\n} satisfies CommandSchema\n\nconst removeSchema = {\n ...globalSchema,\n ...credentialsSchema,\n workDir,\n alias: { idx: 0, positional: true, type: 'string', description: 'The alias of the package to uninstall' },\n} satisfies CommandSchema\n\nconst loginSchema = {\n ...globalSchema,\n token,\n workspaceId,\n apiUrl: { ...apiUrl, default: consts.defaultBotpressApiUrl },\n} satisfies CommandSchema\n\nconst logoutSchema = {\n ...globalSchema,\n} satisfies CommandSchema\n\nconst createBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name of the bot to create' },\n ifNotExists: {\n type: 'boolean',\n description: 'Do not create if a bot with the same name already exists',\n default: false,\n },\n} satisfies CommandSchema\n\nconst getBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst deleteBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst listBotsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n dev,\n} satisfies CommandSchema\n\nconst getIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst listIntegrationsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name filter when listing integrations' },\n versionNumber: { type: 'string', description: 'The version filter when listing integrations' },\n owned: { type: 'boolean', description: 'List only owned integrations' },\n public: { type: 'boolean', description: 'List only public integrations' },\n limit: { type: 'number', description: 'Limit the number of integrations returned' },\n dev,\n} satisfies CommandSchema\n\nconst deleteIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst getInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst listInterfacesSchema = {\n ...globalSchema,\n ...credentialsSchema,\n} satisfies CommandSchema\n\nconst deleteInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst getPluginSchema = {\n ...globalSchema,\n ...credentialsSchema,\n pluginRef,\n} satisfies CommandSchema\n\nconst listPluginsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name filter when listing plugins' },\n versionNumber: { type: 'string', description: 'The version filter when listing plugins' },\n} satisfies CommandSchema\n\nconst deletePluginSchema = {\n ...globalSchema,\n ...credentialsSchema,\n pluginRef,\n} satisfies CommandSchema\n\nconst initSchema = {\n ...globalSchema,\n workDir,\n type: { type: 'string', choices: ['bot', 'integration', 'plugin'] as const },\n template: {\n type: 'string',\n choices: ProjectTemplates.getAllChoices(),\n description: 'The template to use',\n },\n name: { type: 'string', description: 'The name of the project' },\n} satisfies CommandSchema\n\nconst lintSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst chatSchema = {\n ...globalSchema,\n ...credentialsSchema,\n chatApiUrl: {\n type: 'string',\n description: 'The URL of the chat server',\n },\n botId: {\n type: 'string',\n positional: true,\n idx: 0,\n description: 'The bot ID to chat with',\n },\n} satisfies CommandSchema\n\nconst listProfilesSchema = {\n ...globalSchema,\n displayToken: { type: 'boolean', description: 'Display the token in each of the bp profiles', default: false },\n} satisfies CommandSchema\n\nconst activeProfileSchema = {\n ...globalSchema,\n displayToken: { type: 'boolean', description: 'Display the token in the bp profile', default: false },\n} satisfies CommandSchema\n\nconst useProfileSchema = {\n ...globalSchema,\n profileToUse: {\n type: 'string',\n description: 'The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json',\n positional: true,\n idx: 0,\n },\n} satisfies CommandSchema\n\n// exports\n\nexport const schemas = {\n global: globalSchema,\n project: projectSchema,\n credentials: credentialsSchema,\n secrets: secretsSchema,\n login: loginSchema,\n logout: logoutSchema,\n createBot: createBotSchema,\n getBot: getBotSchema,\n deleteBot: deleteBotSchema,\n listBots: listBotsSchema,\n getIntegration: getIntegrationSchema,\n listIntegrations: listIntegrationsSchema,\n deleteIntegration: deleteIntegrationSchema,\n getInterface: getInterfaceSchema,\n listInterfaces: listInterfacesSchema,\n deleteInterface: deleteInterfaceSchema,\n getPlugin: getPluginSchema,\n listPlugins: listPluginsSchema,\n deletePlugin: deletePluginSchema,\n init: initSchema,\n generate: generateSchema,\n bundle: bundleSchema,\n build: buildSchema,\n read: readSchema,\n serve: serveSchema,\n deploy: deploySchema,\n add: addSchema,\n remove: removeSchema,\n dev: devSchema,\n lint: lintSchema,\n chat: chatSchema,\n listProfiles: listProfilesSchema,\n activeProfile: activeProfileSchema,\n useProfile: useProfileSchema,\n} as const\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AACxB,+BAAiC;AAKjC,MAAM,OAAO;AAAA,EACX,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS,OAAO;AAClB;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,QAAQ;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,cAAc;AAAA,EAClB,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS,CAAC;AACZ;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,KAAK;AACP;AAEA,MAAM,aAAa;AAAA,EACjB,MAAM;AAAA,EACN,aACE;AAAA,EACF,YAAY;AA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A,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,KAAK;AAAA,EACP;AACF;AAIO,MAAM,UAAU;AAAA,EACrB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,cAAc;AAAA,EACd,eAAe;AAAA,EACf,YAAY;AACd;",
|
|
4
|
+
"sourcesContent": ["import * as consts from './consts'\nimport { ProjectTemplates } from './project-templates'\nimport type { CommandOption, CommandSchema } from './typings'\n\n// command options\n\nconst port = {\n type: 'number',\n description: 'The port to use',\n} satisfies CommandOption\n\nconst workDir = {\n type: 'string',\n description: 'The path to the project',\n default: consts.defaultWorkDir,\n} satisfies CommandOption\n\nconst noBuild = {\n type: 'boolean',\n description: 'Skip the build step',\n default: false,\n} satisfies CommandOption\n\nconst dryRun = {\n type: 'boolean',\n description: 'Ask the API not to perform the actual operation',\n default: false,\n} as const satisfies CommandOption\n\nconst apiUrl = {\n type: 'string',\n description: 'The URL of the Botpress server',\n} satisfies CommandOption\n\nconst token = {\n type: 'string',\n description: 'You Personal Access Token ',\n} satisfies CommandOption\n\nconst workspaceId = {\n type: 'string',\n description: 'The Workspace Id to deploy to',\n} satisfies CommandOption\n\nconst secrets = {\n type: 'string',\n description: 'Values for the integration secrets',\n array: true,\n default: [],\n} satisfies CommandOption\n\nconst botRef = {\n type: 'string',\n description: 'The bot ID. Bot Name is not supported.',\n demandOption: true,\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst packageRef = {\n type: 'string',\n description:\n 'The package ID or name with optional version. The package can be either an integration or an interface. Ex: teams, teams@0.2.0, llm@5.1.0',\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst integrationRef = {\n ...packageRef,\n demandOption: true,\n description: 'The integration ID or name with optional version. Ex: teams or teams@0.2.0',\n} satisfies CommandOption\n\nconst interfaceRef = {\n ...packageRef,\n demandOption: true,\n description: 'The interface ID or name and version. Ex: llm@5.1.0',\n} satisfies CommandOption\n\nconst pluginRef = {\n ...packageRef,\n demandOption: true,\n description: 'The plugin ID or name and version. Ex: knowledge@0.0.1',\n} satisfies CommandOption\n\nconst sourceMap = { type: 'boolean', description: 'Generate sourcemaps', default: false } satisfies CommandOption\n\nconst minify = { type: 'boolean', description: 'Minify the bundled code', default: true } satisfies CommandOption\n\nconst dev = {\n type: 'boolean',\n description: 'List only dev bots / dev integrations',\n default: false,\n} satisfies CommandOption\n\n// base schemas\n\nconst globalSchema = {\n verbose: {\n type: 'boolean',\n description: 'Enable verbose logging',\n alias: 'v',\n default: false,\n },\n confirm: {\n type: 'boolean',\n description: 'Confirm all prompts',\n alias: 'y',\n default: false,\n },\n json: {\n type: 'boolean',\n description: 'Prevent logging anything else than raw json in stdout. Useful for piping output to other tools',\n default: false,\n },\n botpressHome: {\n type: 'string',\n description: 'The path to the Botpress home directory',\n default: consts.defaultBotpressHome,\n },\n profile: {\n type: 'string',\n description: 'The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json',\n alias: 'p',\n },\n} satisfies CommandSchema\n\nconst projectSchema = {\n ...globalSchema,\n workDir,\n} satisfies CommandSchema\n\nconst credentialsSchema = {\n apiUrl,\n workspaceId,\n token,\n} satisfies CommandSchema\n\nconst secretsSchema = {\n secrets,\n} satisfies CommandSchema\n\n// command schemas\n\nconst generateSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst bundleSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst buildSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst readSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst serveSchema = {\n ...projectSchema,\n ...secretsSchema,\n port,\n} satisfies CommandSchema\n\nconst deploySchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n botId: { type: 'string', description: 'The bot ID to deploy. Only used when deploying a bot' },\n noBuild,\n dryRun,\n createNewBot: { type: 'boolean', description: 'Create a new bot when deploying. Only used when deploying a bot' },\n sourceMap,\n minify,\n visibility: {\n type: 'string',\n choices: ['public', 'private', 'unlisted'] as const,\n description:\n 'The visibility of the project. By default, projects are always private. Unlisted visibility is only supported for integrations and plugins.',\n default: 'private',\n },\n public: {\n type: 'boolean',\n description: 'DEPRECATED: Please use \"--visibility public\" instead.',\n default: false,\n deprecated: true,\n } satisfies CommandOption,\n allowDeprecated: {\n type: 'boolean',\n description: 'Allow deprecated features in the project',\n default: false,\n },\n} as const satisfies CommandSchema\n\nconst devSchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n sourceMap,\n minify,\n port,\n tunnelUrl: {\n type: 'string',\n description: 'The tunnel HTTP URL to use',\n default: consts.defaultTunnelUrl,\n },\n tunnelId: {\n type: 'string',\n description: 'The tunnel ID to use. The ID will be generated if not specified',\n },\n noSecretCaching: {\n type: 'boolean',\n description: 'Do not save the secrets locally',\n default: false,\n alias: 'nsc',\n },\n} satisfies CommandSchema\n\nconst addSchema = {\n ...globalSchema,\n ...credentialsSchema,\n packageRef,\n installPath: {\n type: 'string',\n description: 'The path where to install the package',\n default: consts.defaultInstallPath,\n },\n useDev: {\n type: 'boolean',\n description: 'If a dev version of the package is found, use it',\n default: false,\n },\n alias: {\n type: 'string',\n description: 'The alias to install the package with',\n },\n} satisfies CommandSchema\n\nconst removeSchema = {\n ...globalSchema,\n ...credentialsSchema,\n workDir,\n alias: { idx: 0, positional: true, type: 'string', description: 'The alias of the package to uninstall' },\n} satisfies CommandSchema\n\nconst loginSchema = {\n ...globalSchema,\n token,\n workspaceId,\n apiUrl: { ...apiUrl, default: consts.defaultBotpressApiUrl },\n} satisfies CommandSchema\n\nconst logoutSchema = {\n ...globalSchema,\n} satisfies CommandSchema\n\nconst createBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name of the bot to create' },\n ifNotExists: {\n type: 'boolean',\n description: 'Do not create if a bot with the same name already exists',\n default: false,\n },\n} satisfies CommandSchema\n\nconst getBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst deleteBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst listBotsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n dev,\n} satisfies CommandSchema\n\nconst getIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst listIntegrationsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name filter when listing integrations' },\n versionNumber: { type: 'string', description: 'The version filter when listing integrations' },\n owned: { type: 'boolean', description: 'List only owned integrations' },\n public: { type: 'boolean', description: 'List only public integrations' },\n limit: { type: 'number', description: 'Limit the number of integrations returned' },\n dev,\n} satisfies CommandSchema\n\nconst deleteIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst getInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst listInterfacesSchema = {\n ...globalSchema,\n ...credentialsSchema,\n} satisfies CommandSchema\n\nconst deleteInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst getPluginSchema = {\n ...globalSchema,\n ...credentialsSchema,\n pluginRef,\n} satisfies CommandSchema\n\nconst listPluginsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name filter when listing plugins' },\n versionNumber: { type: 'string', description: 'The version filter when listing plugins' },\n} satisfies CommandSchema\n\nconst deletePluginSchema = {\n ...globalSchema,\n ...credentialsSchema,\n pluginRef,\n} satisfies CommandSchema\n\nconst initSchema = {\n ...globalSchema,\n workDir,\n type: { type: 'string', choices: ['bot', 'integration', 'plugin'] as const },\n template: {\n type: 'string',\n choices: ProjectTemplates.getAllChoices(),\n description: 'The template to use',\n },\n name: { type: 'string', description: 'The name of the project' },\n} satisfies CommandSchema\n\nconst lintSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst chatSchema = {\n ...globalSchema,\n ...credentialsSchema,\n chatApiUrl: {\n type: 'string',\n description: 'The URL of the chat server',\n },\n botId: {\n type: 'string',\n positional: true,\n idx: 0,\n description: 'The bot ID to chat with',\n },\n} satisfies CommandSchema\n\nconst listProfilesSchema = {\n ...globalSchema,\n displayToken: { type: 'boolean', description: 'Display the token in each of the bp profiles', default: false },\n} satisfies CommandSchema\n\nconst activeProfileSchema = {\n ...globalSchema,\n displayToken: { type: 'boolean', description: 'Display the token in the bp profile', default: false },\n} satisfies CommandSchema\n\nconst useProfileSchema = {\n ...globalSchema,\n profileToUse: {\n type: 'string',\n description: 'The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json',\n positional: true,\n idx: 0,\n },\n} satisfies CommandSchema\n\nconst getProfileSchema = {\n ...globalSchema,\n profileToGet: {\n type: 'string',\n description: 'The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json',\n positional: true,\n idx: 0,\n },\n displayToken: { type: 'boolean', description: 'Display the token in the bp profile', default: false },\n} satisfies CommandSchema\n\n// exports\n\nexport const schemas = {\n global: globalSchema,\n project: projectSchema,\n credentials: credentialsSchema,\n secrets: secretsSchema,\n login: loginSchema,\n logout: logoutSchema,\n createBot: createBotSchema,\n getBot: getBotSchema,\n deleteBot: deleteBotSchema,\n listBots: listBotsSchema,\n getIntegration: getIntegrationSchema,\n listIntegrations: listIntegrationsSchema,\n deleteIntegration: deleteIntegrationSchema,\n getInterface: getInterfaceSchema,\n listInterfaces: listInterfacesSchema,\n deleteInterface: deleteInterfaceSchema,\n getPlugin: getPluginSchema,\n listPlugins: listPluginsSchema,\n deletePlugin: deletePluginSchema,\n init: initSchema,\n generate: generateSchema,\n bundle: bundleSchema,\n build: buildSchema,\n read: readSchema,\n serve: serveSchema,\n deploy: deploySchema,\n add: addSchema,\n remove: removeSchema,\n dev: devSchema,\n lint: lintSchema,\n chat: chatSchema,\n listProfiles: listProfilesSchema,\n activeProfile: activeProfileSchema,\n useProfile: useProfileSchema,\n getProfile: getProfileSchema,\n} as const\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AACxB,+BAAiC;AAKjC,MAAM,OAAO;AAAA,EACX,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS,OAAO;AAClB;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,QAAQ;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,cAAc;AAAA,EAClB,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,a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
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1605,6 +1605,51 @@ declare const _default: {
|
|
|
1605
1605
|
}>) => Promise<{
|
|
1606
1606
|
exitCode: number;
|
|
1607
1607
|
}>;
|
|
1608
|
+
get: (argv: typings.CommandArgv<{
|
|
1609
|
+
description: string;
|
|
1610
|
+
schema: {
|
|
1611
|
+
profileToGet: {
|
|
1612
|
+
type: "string";
|
|
1613
|
+
description: string;
|
|
1614
|
+
positional: true;
|
|
1615
|
+
idx: number;
|
|
1616
|
+
};
|
|
1617
|
+
displayToken: {
|
|
1618
|
+
type: "boolean";
|
|
1619
|
+
description: string;
|
|
1620
|
+
default: boolean;
|
|
1621
|
+
};
|
|
1622
|
+
verbose: {
|
|
1623
|
+
type: "boolean";
|
|
1624
|
+
description: string;
|
|
1625
|
+
alias: string;
|
|
1626
|
+
default: boolean;
|
|
1627
|
+
};
|
|
1628
|
+
confirm: {
|
|
1629
|
+
type: "boolean";
|
|
1630
|
+
description: string;
|
|
1631
|
+
alias: string;
|
|
1632
|
+
default: boolean;
|
|
1633
|
+
};
|
|
1634
|
+
json: {
|
|
1635
|
+
type: "boolean";
|
|
1636
|
+
description: string;
|
|
1637
|
+
default: boolean;
|
|
1638
|
+
};
|
|
1639
|
+
botpressHome: {
|
|
1640
|
+
type: "string";
|
|
1641
|
+
description: string;
|
|
1642
|
+
default: string;
|
|
1643
|
+
};
|
|
1644
|
+
profile: {
|
|
1645
|
+
type: "string";
|
|
1646
|
+
description: string;
|
|
1647
|
+
alias: string;
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1650
|
+
}>) => Promise<{
|
|
1651
|
+
exitCode: number;
|
|
1652
|
+
}>;
|
|
1608
1653
|
};
|
|
1609
1654
|
};
|
|
1610
1655
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -71,7 +71,8 @@ var index_default = {
|
|
|
71
71
|
profiles: {
|
|
72
72
|
list: import_command_implementations.default.profiles.subcommands.list,
|
|
73
73
|
active: import_command_implementations.default.profiles.subcommands.active,
|
|
74
|
-
use: import_command_implementations.default.profiles.subcommands.use
|
|
74
|
+
use: import_command_implementations.default.profiles.subcommands.use,
|
|
75
|
+
get: import_command_implementations.default.profiles.subcommands.get
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
78
|
//# 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 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 remove: commandImplementations.remove,\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,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,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;",
|
|
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 remove: commandImplementations.remove,\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 get: commandImplementations.profiles.subcommands.get,\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,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,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,IACjD,KAAK,+BAAAA,QAAuB,SAAS,YAAY;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": ["commandImplementations"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run build:types && pnpm run bundle && pnpm run template:gen",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@apidevtools/json-schema-ref-parser": "^11.7.0",
|
|
29
29
|
"@botpress/chat": "0.5.5",
|
|
30
|
-
"@botpress/client": "1.
|
|
31
|
-
"@botpress/sdk": "6.
|
|
30
|
+
"@botpress/client": "1.37.0",
|
|
31
|
+
"@botpress/sdk": "6.1.0",
|
|
32
32
|
"@bpinternal/const": "^0.1.0",
|
|
33
33
|
"@bpinternal/tunnel": "^0.1.1",
|
|
34
34
|
"@bpinternal/verel": "^0.2.0",
|