@botpress/cli 4.17.0 → 4.17.1
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
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@4.17.
|
|
2
|
+
> @botpress/cli@4.17.1 build /home/runner/work/botpress/botpress/packages/cli
|
|
3
3
|
> pnpm run bundle && pnpm run template:gen
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cli@4.17.
|
|
6
|
+
> @botpress/cli@4.17.1 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
7
7
|
> ts-node -T build.ts
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/cli@4.17.
|
|
10
|
+
> @botpress/cli@4.17.1 template:gen /home/runner/work/botpress/botpress/packages/cli
|
|
11
11
|
> pnpm -r --stream -F @bp-templates/* exec bp gen
|
|
12
12
|
|
|
13
|
-
🤖 Botpress CLI v4.17.
|
|
14
|
-
🤖 Botpress CLI v4.17.
|
|
15
|
-
🤖 Botpress CLI v4.17.
|
|
16
|
-
🤖 Botpress CLI v4.17.
|
|
17
|
-
○ Generating typings for integration
|
|
13
|
+
🤖 Botpress CLI v4.17.1
|
|
14
|
+
🤖 Botpress CLI v4.17.1
|
|
15
|
+
🤖 Botpress CLI v4.17.1
|
|
16
|
+
🤖 Botpress CLI v4.17.1
|
|
17
|
+
○ Generating typings for integration hello-world...
|
|
18
|
+
○ Generating typings for plugin empty-plugin...
|
|
18
19
|
✓ Typings available at .botpress
|
|
19
20
|
|
|
20
|
-
○ Generating typings for integration hello-world...
|
|
21
|
-
○ Generating typings for bot...
|
|
22
21
|
✓ Typings available at .botpress
|
|
23
22
|
|
|
24
|
-
○ Generating typings for
|
|
23
|
+
○ Generating typings for bot...
|
|
25
24
|
✓ Typings available at .botpress
|
|
26
25
|
|
|
26
|
+
○ Generating typings for integration empty-integration...
|
|
27
27
|
✓ Typings available at .botpress
|
|
28
28
|
|
|
29
|
-
🤖 Botpress CLI v4.17.
|
|
29
|
+
🤖 Botpress CLI v4.17.1
|
|
30
30
|
○ Generating typings for integration webhook-message...
|
|
31
31
|
✓ Typings available at .botpress
|
|
32
32
|
|
|
@@ -41,26 +41,27 @@ class ActiveProfileCommand extends import_global_command.GlobalCommand {
|
|
|
41
41
|
async run() {
|
|
42
42
|
let activeProfileName = await this.globalCache.get("activeProfile");
|
|
43
43
|
if (!activeProfileName) {
|
|
44
|
-
this.logger.
|
|
44
|
+
this.logger.debug(`No active profile set, defaulting to ${consts.defaultProfileName}`);
|
|
45
45
|
activeProfileName = consts.defaultProfileName;
|
|
46
46
|
await this.globalCache.set("activeProfile", activeProfileName);
|
|
47
47
|
}
|
|
48
48
|
const profile = await this.readProfileFromFS(activeProfileName);
|
|
49
|
+
const profileEntry = { name: activeProfileName, ...profile };
|
|
49
50
|
this.logger.log("Active profile:");
|
|
50
|
-
this.logger.json(
|
|
51
|
+
this.logger.json(profileEntry);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
class ListProfilesCommand extends import_global_command.GlobalCommand {
|
|
54
55
|
async run() {
|
|
55
56
|
const profiles = await this.readProfilesFromFS();
|
|
56
|
-
|
|
57
|
+
const profileEntries = Object.entries(profiles).map(([name, profile]) => ({ name, ...profile }));
|
|
58
|
+
if (!profileEntries.length) {
|
|
57
59
|
this.logger.log("No profiles found");
|
|
58
60
|
return;
|
|
59
61
|
}
|
|
60
62
|
const activeProfileName = await this.globalCache.get("activeProfile");
|
|
61
|
-
const profileNames = Object.keys(profiles);
|
|
62
63
|
this.logger.log(`Active profile: '${import_chalk.default.bold(activeProfileName)}'`);
|
|
63
|
-
this.logger.json(
|
|
64
|
+
this.logger.json(profileEntries);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
class UseProfileCommand extends import_global_command.GlobalCommand {
|
|
@@ -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\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.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,aAAwB;AACxB,aAAwB;AAExB,4BAA+D;
|
|
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\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 const profileEntry: ProfileEntry = { name: activeProfileName, ...profile }\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 this.logger.log(`Active profile: '${chalk.bold(activeProfileName)}'`)\n this.logger.json(profileEntries)\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.entries(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\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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