@botpress/cli 4.27.4 → 5.0.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 +13 -13
- package/dist/code-generation/bot-implementation/bot-implementation.js +2 -3
- package/dist/code-generation/bot-implementation/bot-implementation.js.map +2 -2
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js +2 -2
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js.map +2 -2
- package/dist/code-generation/plugin-implementation/plugin-implementation.js +2 -3
- package/dist/code-generation/plugin-implementation/plugin-implementation.js.map +2 -2
- package/dist/code-generation/plugin-implementation/plugin-typings/conversation-module.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/conversation-module.js +63 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/conversation-module.js.map +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js +32 -2
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js.map +2 -2
- package/dist/code-generation/plugin-implementation/plugin-typings/message-module.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/message-module.js +63 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/message-module.js.map +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/user-module.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/user-module.js +63 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/user-module.js.map +7 -0
- package/dist/command-definitions.d.ts +57 -5
- package/dist/command-definitions.js +10 -1
- package/dist/command-definitions.js.map +2 -2
- package/dist/command-implementations/add-command.d.ts +2 -0
- package/dist/command-implementations/add-command.js +52 -25
- package/dist/command-implementations/add-command.js.map +2 -2
- package/dist/command-implementations/index.d.ts +59 -5
- package/dist/command-implementations/index.js +2 -0
- package/dist/command-implementations/index.js.map +2 -2
- package/dist/command-implementations/project-command.d.ts +1 -0
- package/dist/command-implementations/project-command.js +62 -29
- package/dist/command-implementations/project-command.js.map +2 -2
- package/dist/command-implementations/remove-command.d.ts +10 -0
- package/dist/command-implementations/remove-command.js +95 -0
- package/dist/command-implementations/remove-command.js.map +7 -0
- package/dist/config.d.ts +52 -5
- package/dist/config.js +8 -7
- package/dist/config.js.map +2 -2
- package/dist/index.d.ts +59 -5
- package/dist/index.js +1 -0
- package/dist/index.js.map +2 -2
- package/dist/register-yargs.js +8 -1
- package/dist/register-yargs.js.map +2 -2
- package/dist/typings.d.ts +1 -1
- package/dist/typings.js.map +1 -1
- package/dist/utils/pkgjson-utils.d.ts +2 -0
- package/dist/utils/pkgjson-utils.js +7 -2
- package/dist/utils/pkgjson-utils.js.map +2 -2
- package/package.json +2 -2
- package/templates/empty-bot/package.json +1 -1
- package/templates/empty-integration/package.json +1 -1
- package/templates/empty-plugin/package.json +1 -1
- package/templates/hello-world/package.json +1 -1
- package/templates/webhook-message/package.json +1 -1
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 packageType = {\n type: 'string',\n description:\n 'Either an integration or an interface; helps disambiguate the package type in case both an integration and an interface have the same reference.',\n choices: ['integration', 'interface', 'plugin'] as const,\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} satisfies CommandSchema\n\nconst addSchema = {\n ...globalSchema,\n ...credentialsSchema,\n packageRef,\n packageType,\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 of the dependency you want to install',\n },\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} satisfies CommandSchema\n\nconst activeProfileSchema = {\n ...globalSchema,\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 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,
|
|
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} 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} satisfies CommandSchema\n\nconst activeProfileSchema = {\n ...globalSchema,\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;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,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1188,11 +1188,6 @@ declare const _default: {
|
|
|
1188
1188
|
positional: true;
|
|
1189
1189
|
idx: number;
|
|
1190
1190
|
};
|
|
1191
|
-
packageType: {
|
|
1192
|
-
type: "string";
|
|
1193
|
-
description: string;
|
|
1194
|
-
choices: readonly ["integration", "interface", "plugin"];
|
|
1195
|
-
};
|
|
1196
1191
|
installPath: {
|
|
1197
1192
|
type: "string";
|
|
1198
1193
|
description: string;
|
|
@@ -1247,6 +1242,65 @@ declare const _default: {
|
|
|
1247
1242
|
alias: string;
|
|
1248
1243
|
};
|
|
1249
1244
|
};
|
|
1245
|
+
alias: string[];
|
|
1246
|
+
}>) => Promise<{
|
|
1247
|
+
exitCode: number;
|
|
1248
|
+
}>;
|
|
1249
|
+
remove: (argv: typings.CommandArgv<{
|
|
1250
|
+
description: string;
|
|
1251
|
+
schema: {
|
|
1252
|
+
workDir: {
|
|
1253
|
+
type: "string";
|
|
1254
|
+
description: string;
|
|
1255
|
+
default: string;
|
|
1256
|
+
};
|
|
1257
|
+
alias: {
|
|
1258
|
+
idx: number;
|
|
1259
|
+
positional: true;
|
|
1260
|
+
type: "string";
|
|
1261
|
+
description: string;
|
|
1262
|
+
};
|
|
1263
|
+
apiUrl: {
|
|
1264
|
+
type: "string";
|
|
1265
|
+
description: string;
|
|
1266
|
+
};
|
|
1267
|
+
workspaceId: {
|
|
1268
|
+
type: "string";
|
|
1269
|
+
description: string;
|
|
1270
|
+
};
|
|
1271
|
+
token: {
|
|
1272
|
+
type: "string";
|
|
1273
|
+
description: string;
|
|
1274
|
+
};
|
|
1275
|
+
verbose: {
|
|
1276
|
+
type: "boolean";
|
|
1277
|
+
description: string;
|
|
1278
|
+
alias: string;
|
|
1279
|
+
default: boolean;
|
|
1280
|
+
};
|
|
1281
|
+
confirm: {
|
|
1282
|
+
type: "boolean";
|
|
1283
|
+
description: string;
|
|
1284
|
+
alias: string;
|
|
1285
|
+
default: boolean;
|
|
1286
|
+
};
|
|
1287
|
+
json: {
|
|
1288
|
+
type: "boolean";
|
|
1289
|
+
description: string;
|
|
1290
|
+
default: boolean;
|
|
1291
|
+
};
|
|
1292
|
+
botpressHome: {
|
|
1293
|
+
type: "string";
|
|
1294
|
+
description: string;
|
|
1295
|
+
default: string;
|
|
1296
|
+
};
|
|
1297
|
+
profile: {
|
|
1298
|
+
type: "string";
|
|
1299
|
+
description: string;
|
|
1300
|
+
alias: string;
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
alias: string;
|
|
1250
1304
|
}>) => Promise<{
|
|
1251
1305
|
exitCode: number;
|
|
1252
1306
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,7 @@ var index_default = {
|
|
|
64
64
|
serve: import_command_implementations.default.serve,
|
|
65
65
|
deploy: import_command_implementations.default.deploy,
|
|
66
66
|
add: import_command_implementations.default.add,
|
|
67
|
+
remove: import_command_implementations.default.remove,
|
|
67
68
|
dev: import_command_implementations.default.dev,
|
|
68
69
|
lint: import_command_implementations.default.lint,
|
|
69
70
|
chat: import_command_implementations.default.chat,
|
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 dev: commandImplementations.dev,\n lint: commandImplementations.lint,\n chat: commandImplementations.chat,\n profiles: {\n list: commandImplementations.profiles.subcommands.list,\n active: commandImplementations.profiles.subcommands.active,\n use: commandImplementations.profiles.subcommands.use,\n },\n} satisfies CommandHandlers<typeof commandDefinitions>\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qCAAmC;AAcnC,IAAO,gBAAQ;AAAA,EACb,OAAO,+BAAAA,QAAuB;AAAA,EAC9B,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,MAAM;AAAA,IACJ,QAAQ,+BAAAA,QAAuB,KAAK,YAAY;AAAA,IAChD,KAAK,+BAAAA,QAAuB,KAAK,YAAY;AAAA,IAC7C,QAAQ,+BAAAA,QAAuB,KAAK,YAAY;AAAA,IAChD,MAAM,+BAAAA,QAAuB,KAAK,YAAY;AAAA,EAChD;AAAA,EACA,cAAc;AAAA,IACZ,KAAK,+BAAAA,QAAuB,aAAa,YAAY;AAAA,IACrD,MAAM,+BAAAA,QAAuB,aAAa,YAAY;AAAA,IACtD,QAAQ,+BAAAA,QAAuB,aAAa,YAAY;AAAA,EAC1D;AAAA,EACA,YAAY;AAAA,IACV,KAAK,+BAAAA,QAAuB,WAAW,YAAY;AAAA,IACnD,MAAM,+BAAAA,QAAuB,WAAW,YAAY;AAAA,IACpD,QAAQ,+BAAAA,QAAuB,WAAW,YAAY;AAAA,EACxD;AAAA,EACA,SAAS;AAAA,IACP,KAAK,+BAAAA,QAAuB,QAAQ,YAAY;AAAA,IAChD,MAAM,+BAAAA,QAAuB,QAAQ,YAAY;AAAA,IACjD,QAAQ,+BAAAA,QAAuB,QAAQ,YAAY;AAAA,EACrD;AAAA,EACA,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,UAAU,+BAAAA,QAAuB;AAAA,EACjC,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,OAAO,+BAAAA,QAAuB;AAAA,EAC9B,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,OAAO,+BAAAA,QAAuB;AAAA,EAC9B,QAAQ,+BAAAA,QAAuB;AAAA,EAC/B,KAAK,+BAAAA,QAAuB;AAAA,EAC5B,KAAK,+BAAAA,QAAuB;AAAA,EAC5B,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,MAAM,+BAAAA,QAAuB;AAAA,EAC7B,UAAU;AAAA,IACR,MAAM,+BAAAA,QAAuB,SAAS,YAAY;AAAA,IAClD,QAAQ,+BAAAA,QAAuB,SAAS,YAAY;AAAA,IACpD,KAAK,+BAAAA,QAAuB,SAAS,YAAY;AAAA,EACnD;AACF;",
|
|
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;",
|
|
6
6
|
"names": ["commandImplementations"]
|
|
7
7
|
}
|
package/dist/register-yargs.js
CHANGED
|
@@ -49,7 +49,14 @@ const registerYargs = (yargz, commands) => {
|
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
51
|
const { schema, description, alias } = command;
|
|
52
|
-
|
|
52
|
+
let aliases;
|
|
53
|
+
if (Array.isArray(alias)) {
|
|
54
|
+
aliases = [cmdName, ...alias];
|
|
55
|
+
} else if (alias) {
|
|
56
|
+
aliases = [cmdName, alias];
|
|
57
|
+
} else {
|
|
58
|
+
aliases = [cmdName];
|
|
59
|
+
}
|
|
53
60
|
const options = Object.entries(schema);
|
|
54
61
|
let positionals = options.filter(
|
|
55
62
|
(value) => !!value[1].positional
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/register-yargs.ts"],
|
|
4
|
-
"sourcesContent": ["import yargs, { YargsArgv, YargsConfig, cleanupConfig, parseEnv } from '@bpinternal/yargs-extra'\nimport _ from 'lodash'\nimport * as tree from './command-tree'\nimport type * as typings from './typings'\n\nexport type YargsInstance = typeof yargs\n\nconst parseArguments = <S extends typings.CommandSchema>(schema: S, argv: YargsArgv<S>): YargsConfig<S> => {\n const yargsEnv = parseEnv(schema, 'BP')\n return cleanupConfig(schema, { ...argv, ...yargsEnv })\n}\n\nexport const registerYargs = (yargz: YargsInstance, commands: tree.CommandTree) => {\n for (const cmdName in commands) {\n const command = commands[cmdName] as tree.CommandTreeNode\n\n if (tree.guards.command.isSubTree(command)) {\n yargz.command(cmdName, command.description ?? cmdName, (y) => {\n registerYargs(y, command.subcommands)\n return y\n })\n continue\n }\n\n const { schema, description, alias } = command\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAuE;AACvE,oBAAc;AACd,WAAsB;AAKtB,MAAM,iBAAiB,CAAkC,QAAW,SAAuC;AACzG,QAAM,eAAW,6BAAS,QAAQ,IAAI;AACtC,aAAO,kCAAc,QAAQ,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;AACvD;AAEO,MAAM,gBAAgB,CAAC,OAAsB,aAA+B;AACjF,aAAW,WAAW,UAAU;AAC9B,UAAM,UAAU,SAAS,OAAO;AAEhC,QAAI,KAAK,OAAO,QAAQ,UAAU,OAAO,GAAG;AAC1C,YAAM,QAAQ,SAAS,QAAQ,eAAe,SAAS,CAAC,MAAM;AAC5D,sBAAc,GAAG,QAAQ,WAAW;AACpC,eAAO;AAAA,MACT,CAAC;AACD;AAAA,IACF;AAEA,UAAM,EAAE,QAAQ,aAAa,MAAM,IAAI;AACvC,
|
|
4
|
+
"sourcesContent": ["import yargs, { YargsArgv, YargsConfig, cleanupConfig, parseEnv } from '@bpinternal/yargs-extra'\nimport _ from 'lodash'\nimport * as tree from './command-tree'\nimport type * as typings from './typings'\n\nexport type YargsInstance = typeof yargs\n\nconst parseArguments = <S extends typings.CommandSchema>(schema: S, argv: YargsArgv<S>): YargsConfig<S> => {\n const yargsEnv = parseEnv(schema, 'BP')\n return cleanupConfig(schema, { ...argv, ...yargsEnv })\n}\n\nexport const registerYargs = (yargz: YargsInstance, commands: tree.CommandTree) => {\n for (const cmdName in commands) {\n const command = commands[cmdName] as tree.CommandTreeNode\n\n if (tree.guards.command.isSubTree(command)) {\n yargz.command(cmdName, command.description ?? cmdName, (y) => {\n registerYargs(y, command.subcommands)\n return y\n })\n continue\n }\n\n const { schema, description, alias } = command\n let aliases: string[]\n if (Array.isArray(alias)) {\n aliases = [cmdName, ...alias]\n } else if (alias) {\n aliases = [cmdName, alias]\n } else {\n aliases = [cmdName]\n }\n\n const options = Object.entries(schema)\n let positionals = options.filter(\n (value): value is [string, typings.CommandPositionalOption] => !!value[1].positional\n )\n\n let usage = aliases\n if (positionals.length) {\n positionals = _.sortBy(positionals, ([, option]) => option.idx)\n const positionalArgs = positionals.map(([optName, option]) =>\n option.demandOption ? `<${optName}>` : `[${optName}]`\n )\n const positionalStr = positionalArgs.join(' ')\n usage = aliases.map((optAlias) => `${optAlias} ${positionalStr}`)\n }\n\n yargz.command(\n usage,\n description ?? cmdName,\n (y) => {\n for (const [key, option] of Object.entries(schema)) {\n if (option.positional) {\n y = y.positional(key, option)\n } else {\n y = y.option(key, option)\n }\n }\n return y\n },\n async (argv) => {\n const parsed = parseArguments(schema, argv)\n const { exitCode } = await command.handler({ ...parsed })\n process.exit(exitCode)\n }\n )\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAuE;AACvE,oBAAc;AACd,WAAsB;AAKtB,MAAM,iBAAiB,CAAkC,QAAW,SAAuC;AACzG,QAAM,eAAW,6BAAS,QAAQ,IAAI;AACtC,aAAO,kCAAc,QAAQ,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;AACvD;AAEO,MAAM,gBAAgB,CAAC,OAAsB,aAA+B;AACjF,aAAW,WAAW,UAAU;AAC9B,UAAM,UAAU,SAAS,OAAO;AAEhC,QAAI,KAAK,OAAO,QAAQ,UAAU,OAAO,GAAG;AAC1C,YAA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,SAAS,IAAI,MAAM,QAAQ,QAAQ,EAAE,GAAG,OAAO,CAAC;AACxD,gBAAQ,KAAK,QAAQ;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["_"]
|
|
7
7
|
}
|
package/dist/typings.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type CommandArgv<C extends CommandDefinition = CommandDefinition> = Yargs
|
|
|
17
17
|
export type CommandDefinition<S extends CommandSchema = CommandSchema> = {
|
|
18
18
|
schema: S;
|
|
19
19
|
description?: string;
|
|
20
|
-
alias?: string;
|
|
20
|
+
alias?: string | string[];
|
|
21
21
|
};
|
|
22
22
|
export type CommandImplementation<C extends CommandDefinition = CommandDefinition> = (argv: CommandArgv<C>) => Promise<{
|
|
23
23
|
exitCode: number;
|
package/dist/typings.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/typings.ts"],
|
|
4
|
-
"sourcesContent": ["import type { default as yargs, YargsConfig, YargsSchema } from '@bpinternal/yargs-extra'\n\nexport type CommandPositionalOption = yargs.PositionalOptions & { positional: true; idx: number }\nexport type CommandNamedOption = YargsSchema[string] & { positional?: false }\nexport type CommandOption = CommandPositionalOption | CommandNamedOption\nexport type CommandSchema = Record<string, CommandOption>\n\nexport type CommandArgv<C extends CommandDefinition = CommandDefinition> = YargsConfig<C['schema']> & {\n /**\n * Ignored: fixes weird typing issue\n */\n _?: string\n}\n\nexport type CommandDefinition<S extends CommandSchema = CommandSchema> = {\n schema: S\n description?: string\n alias?: string\n}\n\nexport type CommandImplementation<C extends CommandDefinition = CommandDefinition> = (\n argv: CommandArgv<C>\n) => Promise<{ exitCode: number }>\n\nexport type CommandLeaf<C extends CommandDefinition = CommandDefinition> = C & {\n handler: CommandImplementation<C>\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type { default as yargs, YargsConfig, YargsSchema } from '@bpinternal/yargs-extra'\n\nexport type CommandPositionalOption = yargs.PositionalOptions & { positional: true; idx: number }\nexport type CommandNamedOption = YargsSchema[string] & { positional?: false }\nexport type CommandOption = CommandPositionalOption | CommandNamedOption\nexport type CommandSchema = Record<string, CommandOption>\n\nexport type CommandArgv<C extends CommandDefinition = CommandDefinition> = YargsConfig<C['schema']> & {\n /**\n * Ignored: fixes weird typing issue\n */\n _?: string\n}\n\nexport type CommandDefinition<S extends CommandSchema = CommandSchema> = {\n schema: S\n description?: string\n alias?: string | string[]\n}\n\nexport type CommandImplementation<C extends CommandDefinition = CommandDefinition> = (\n argv: CommandArgv<C>\n) => Promise<{ exitCode: number }>\n\nexport type CommandLeaf<C extends CommandDefinition = CommandDefinition> = C & {\n handler: CommandImplementation<C>\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,6 +12,8 @@ export type PackageJson = {
|
|
|
12
12
|
} & {
|
|
13
13
|
[key: string]: JSON;
|
|
14
14
|
};
|
|
15
|
+
export declare const PKGJSON_FILE_NAME = "package.json";
|
|
16
|
+
export declare const BP_DEPENDENCIES_KEY = "bpDependencies";
|
|
15
17
|
export declare const readPackageJson: (path: string) => Promise<PackageJson | undefined>;
|
|
16
18
|
export type ReadPackageJsonResult = {
|
|
17
19
|
success: true;
|
|
@@ -28,6 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var pkgjson_utils_exports = {};
|
|
30
30
|
__export(pkgjson_utils_exports, {
|
|
31
|
+
BP_DEPENDENCIES_KEY: () => BP_DEPENDENCIES_KEY,
|
|
32
|
+
PKGJSON_FILE_NAME: () => PKGJSON_FILE_NAME,
|
|
31
33
|
findDependency: () => findDependency,
|
|
32
34
|
readPackageJson: () => readPackageJson,
|
|
33
35
|
safeReadPackageJson: () => safeReadPackageJson,
|
|
@@ -37,7 +39,8 @@ module.exports = __toCommonJS(pkgjson_utils_exports);
|
|
|
37
39
|
var import_fs = __toESM(require("fs"));
|
|
38
40
|
var import_path = __toESM(require("path"));
|
|
39
41
|
var json = __toESM(require("./json-utils"));
|
|
40
|
-
const
|
|
42
|
+
const PKGJSON_FILE_NAME = "package.json";
|
|
43
|
+
const BP_DEPENDENCIES_KEY = "bpDependencies";
|
|
41
44
|
const readPackageJson = async (path) => {
|
|
42
45
|
const filePath = _resolveFilePath(path);
|
|
43
46
|
if (!import_fs.default.existsSync(filePath)) {
|
|
@@ -72,10 +75,12 @@ const writePackageJson = async (path, pkgJson) => {
|
|
|
72
75
|
await import_fs.default.promises.writeFile(filePath, JSON.stringify(pkgJson, null, 2));
|
|
73
76
|
};
|
|
74
77
|
function _resolveFilePath(path) {
|
|
75
|
-
return import_path.default.basename(path) ===
|
|
78
|
+
return import_path.default.basename(path) === PKGJSON_FILE_NAME ? path : import_path.default.join(path, PKGJSON_FILE_NAME);
|
|
76
79
|
}
|
|
77
80
|
// Annotate the CommonJS export names for ESM import in node:
|
|
78
81
|
0 && (module.exports = {
|
|
82
|
+
BP_DEPENDENCIES_KEY,
|
|
83
|
+
PKGJSON_FILE_NAME,
|
|
79
84
|
findDependency,
|
|
80
85
|
readPackageJson,
|
|
81
86
|
safeReadPackageJson,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/pkgjson-utils.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from 'fs'\nimport pathlib from 'path'\nimport * as json from './json-utils'\n\ntype JSON = string | number | boolean | null | JSON[] | { [key: string]: JSON }\n\nexport type PackageJson = {\n name: string\n version?: string\n description?: string\n scripts?: Record<string, string>\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n} & {\n [key: string]: JSON\n}\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAe;AACf,kBAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["import fs from 'fs'\nimport pathlib from 'path'\nimport * as json from './json-utils'\n\ntype JSON = string | number | boolean | null | JSON[] | { [key: string]: JSON }\n\nexport type PackageJson = {\n name: string\n version?: string\n description?: string\n scripts?: Record<string, string>\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n} & {\n [key: string]: JSON\n}\n\nexport const PKGJSON_FILE_NAME = 'package.json'\nexport const BP_DEPENDENCIES_KEY = 'bpDependencies'\n\nexport const readPackageJson = async (path: string): Promise<PackageJson | undefined> => {\n const filePath = _resolveFilePath(path)\n if (!fs.existsSync(filePath)) {\n return undefined\n }\n\n const strContent: string = await fs.promises.readFile(filePath, 'utf8')\n const parseResult = json.safeParseJson(strContent)\n if (!parseResult.success) {\n throw new Error(`Failed to parse JSON at ${filePath}: ${parseResult.error.message}`)\n }\n\n return parseResult.data as PackageJson\n}\n\nexport type ReadPackageJsonResult =\n | {\n success: true\n pkgJson?: PackageJson\n }\n | {\n success: false\n error: Error\n }\n\nexport const safeReadPackageJson = async (path: string): Promise<ReadPackageJsonResult> => {\n try {\n const pkgJson = await readPackageJson(path)\n if (!pkgJson) {\n return { success: true }\n }\n return { success: true, pkgJson }\n } catch (thrown) {\n const error = thrown instanceof Error ? thrown : new Error(String(thrown))\n return { success: false, error }\n }\n}\n\nexport const findDependency = (pkgJson: PackageJson, name: string): string | undefined => {\n const { dependencies, devDependencies, peerDependencies } = pkgJson\n const allDependencies = { ...(dependencies ?? {}), ...(devDependencies ?? {}), ...(peerDependencies ?? {}) }\n return allDependencies[name]\n}\n\nexport const writePackageJson = async (path: string, pkgJson: PackageJson) => {\n const filePath = _resolveFilePath(path)\n await fs.promises.writeFile(filePath, JSON.stringify(pkgJson, null, 2))\n}\n\nfunction _resolveFilePath(path: string)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mB,OAAO,MAAc,YAAyB;AAC5E,QAAM,WAAW,iBAAiB,IAAI;AACtC,QAAM,UAAAA,QAAG,SAAS,UAAU,UAAU,KAAK,UAAU,SAAS,MAAM,CAAC,CAAC;AACxE;AAEA,SAAS,iBAAiB,MAAc;AACtC,SAAO,YAAAC,QAAQ,SAAS,IAAI,MAAM,oBAAoB,OAAO,YAAAA,QAAQ,KAAK,MAAM,iBAAiB;AACnG;",
|
|
6
6
|
"names": ["fs", "pathlib"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run build:types && pnpm run bundle && pnpm run template:gen",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@apidevtools/json-schema-ref-parser": "^11.7.0",
|
|
28
28
|
"@botpress/chat": "0.5.4",
|
|
29
29
|
"@botpress/client": "1.27.2",
|
|
30
|
-
"@botpress/sdk": "
|
|
30
|
+
"@botpress/sdk": "5.0.0",
|
|
31
31
|
"@bpinternal/const": "^0.1.0",
|
|
32
32
|
"@bpinternal/tunnel": "^0.1.1",
|
|
33
33
|
"@bpinternal/verel": "^0.2.0",
|