@botpress/cli 2.0.3 → 2.0.4
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/e2e/tests/install-interfaces.ts +1 -0
- package/e2e/tests/install-package.ts +1 -0
- package/package.json +1 -1
- package/.turbo/turbo-build.log +0 -22
- package/dist/api/bot-body.js +0 -89
- package/dist/api/bot-body.js.map +0 -7
- package/dist/api/client.js +0 -162
- package/dist/api/client.js.map +0 -7
- package/dist/api/find-previous-version.js +0 -66
- package/dist/api/find-previous-version.js.map +0 -7
- package/dist/api/find-previous-version.test.js +0 -76
- package/dist/api/find-previous-version.test.js.map +0 -7
- package/dist/api/index.js +0 -23
- package/dist/api/index.js.map +0 -7
- package/dist/api/integration-body.js +0 -146
- package/dist/api/integration-body.js.map +0 -7
- package/dist/api/interface-body.js +0 -95
- package/dist/api/interface-body.js.map +0 -7
- package/dist/api/paging.js +0 -42
- package/dist/api/paging.js.map +0 -7
- package/dist/api/plugin-body.js +0 -84
- package/dist/api/plugin-body.js.map +0 -7
- package/dist/api/types.js +0 -17
- package/dist/api/types.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-implementation.js +0 -116
- package/dist/code-generation/bot-implementation/bot-implementation.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-plugins/index.js +0 -80
- package/dist/code-generation/bot-implementation/bot-plugins/index.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js +0 -129
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-typings/actions-module.js +0 -88
- package/dist/code-generation/bot-implementation/bot-typings/actions-module.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-typings/events-module.js +0 -63
- package/dist/code-generation/bot-implementation/bot-typings/events-module.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-typings/index.js +0 -109
- package/dist/code-generation/bot-implementation/bot-typings/index.js.map +0 -7
- package/dist/code-generation/bot-implementation/bot-typings/states-module.js +0 -64
- package/dist/code-generation/bot-implementation/bot-typings/states-module.js.map +0 -7
- package/dist/code-generation/bot-implementation/index.js +0 -66
- package/dist/code-generation/bot-implementation/index.js.map +0 -7
- package/dist/code-generation/consts.js +0 -45
- package/dist/code-generation/consts.js.map +0 -7
- package/dist/code-generation/generators.js +0 -81
- package/dist/code-generation/generators.js.map +0 -7
- package/dist/code-generation/index.js +0 -49
- package/dist/code-generation/index.js.map +0 -7
- package/dist/code-generation/integration-implementation/index.js +0 -70
- package/dist/code-generation/integration-implementation/index.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-implementation.js +0 -114
- package/dist/code-generation/integration-implementation/integration-implementation.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-secret.js +0 -78
- package/dist/code-generation/integration-implementation/integration-secret.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/actions-module.js +0 -88
- package/dist/code-generation/integration-implementation/integration-typings/actions-module.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/channels-module.js +0 -107
- package/dist/code-generation/integration-implementation/integration-typings/channels-module.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/configuration-module.js +0 -62
- package/dist/code-generation/integration-implementation/integration-typings/configuration-module.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/configurations-module.js +0 -70
- package/dist/code-generation/integration-implementation/integration-typings/configurations-module.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/entities-module.js +0 -63
- package/dist/code-generation/integration-implementation/integration-typings/entities-module.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/events-module.js +0 -63
- package/dist/code-generation/integration-implementation/integration-typings/events-module.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/index.js +0 -128
- package/dist/code-generation/integration-implementation/integration-typings/index.js.map +0 -7
- package/dist/code-generation/integration-implementation/integration-typings/states-module.js +0 -64
- package/dist/code-generation/integration-implementation/integration-typings/states-module.js.map +0 -7
- package/dist/code-generation/integration-package/index.js +0 -94
- package/dist/code-generation/integration-package/index.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/actions-module.js +0 -88
- package/dist/code-generation/integration-package/integration-package-definition/actions-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/channels-module.js +0 -107
- package/dist/code-generation/integration-package/integration-package-definition/channels-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/configuration-module.js +0 -63
- package/dist/code-generation/integration-package/integration-package-definition/configuration-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/configurations-module.js +0 -70
- package/dist/code-generation/integration-package/integration-package-definition/configurations-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/entities-module.js +0 -63
- package/dist/code-generation/integration-package/integration-package-definition/entities-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/events-module.js +0 -66
- package/dist/code-generation/integration-package/integration-package-definition/events-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/index.js +0 -140
- package/dist/code-generation/integration-package/integration-package-definition/index.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/states-module.js +0 -66
- package/dist/code-generation/integration-package/integration-package-definition/states-module.js.map +0 -7
- package/dist/code-generation/integration-package/integration-package-definition/typings.js +0 -17
- package/dist/code-generation/integration-package/integration-package-definition/typings.js.map +0 -7
- package/dist/code-generation/interface-implementation/index.js +0 -29
- package/dist/code-generation/interface-implementation/index.js.map +0 -7
- package/dist/code-generation/interface-implementation/integration-typings/actions-module.js +0 -88
- package/dist/code-generation/interface-implementation/integration-typings/actions-module.js.map +0 -7
- package/dist/code-generation/interface-implementation/integration-typings/channels-module.js +0 -107
- package/dist/code-generation/interface-implementation/integration-typings/channels-module.js.map +0 -7
- package/dist/code-generation/interface-implementation/integration-typings/entities-module.js +0 -63
- package/dist/code-generation/interface-implementation/integration-typings/entities-module.js.map +0 -7
- package/dist/code-generation/interface-implementation/integration-typings/events-module.js +0 -63
- package/dist/code-generation/interface-implementation/integration-typings/events-module.js.map +0 -7
- package/dist/code-generation/interface-implementation/integration-typings/index.js +0 -121
- package/dist/code-generation/interface-implementation/integration-typings/index.js.map +0 -7
- package/dist/code-generation/interface-package/index.js +0 -94
- package/dist/code-generation/interface-package/index.js.map +0 -7
- package/dist/code-generation/interface-package/interface-package-definition/actions-module.js +0 -88
- package/dist/code-generation/interface-package/interface-package-definition/actions-module.js.map +0 -7
- package/dist/code-generation/interface-package/interface-package-definition/channels-module.js +0 -98
- package/dist/code-generation/interface-package/interface-package-definition/channels-module.js.map +0 -7
- package/dist/code-generation/interface-package/interface-package-definition/entities-module.js +0 -63
- package/dist/code-generation/interface-package/interface-package-definition/entities-module.js.map +0 -7
- package/dist/code-generation/interface-package/interface-package-definition/events-module.js +0 -66
- package/dist/code-generation/interface-package/interface-package-definition/events-module.js.map +0 -7
- package/dist/code-generation/interface-package/interface-package-definition/index.js +0 -104
- package/dist/code-generation/interface-package/interface-package-definition/index.js.map +0 -7
- package/dist/code-generation/interface-package/interface-package-definition/typings.js +0 -17
- package/dist/code-generation/interface-package/interface-package-definition/typings.js.map +0 -7
- package/dist/code-generation/module.js +0 -183
- package/dist/code-generation/module.js.map +0 -7
- package/dist/code-generation/plugin-implementation/index.js +0 -60
- package/dist/code-generation/plugin-implementation/index.js.map +0 -7
- package/dist/code-generation/plugin-implementation/plugin-implementation.js +0 -90
- package/dist/code-generation/plugin-implementation/plugin-implementation.js.map +0 -7
- package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.js +0 -88
- package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.js.map +0 -7
- package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.js +0 -61
- package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.js.map +0 -7
- package/dist/code-generation/plugin-implementation/plugin-typings/events-module.js +0 -63
- package/dist/code-generation/plugin-implementation/plugin-typings/events-module.js.map +0 -7
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js +0 -150
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js.map +0 -7
- package/dist/code-generation/plugin-implementation/plugin-typings/states-module.js +0 -64
- package/dist/code-generation/plugin-implementation/plugin-typings/states-module.js.map +0 -7
- package/dist/code-generation/plugin-package/index.js +0 -151
- package/dist/code-generation/plugin-package/index.js.map +0 -7
- package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.js +0 -88
- package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.js.map +0 -7
- package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.js +0 -56
- package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.js.map +0 -7
- package/dist/code-generation/plugin-package/plugin-package-definition/events-module.js +0 -66
- package/dist/code-generation/plugin-package/plugin-package-definition/events-module.js.map +0 -7
- package/dist/code-generation/plugin-package/plugin-package-definition/index.js +0 -107
- package/dist/code-generation/plugin-package/plugin-package-definition/index.js.map +0 -7
- package/dist/code-generation/plugin-package/plugin-package-definition/states-module.js +0 -66
- package/dist/code-generation/plugin-package/plugin-package-definition/states-module.js.map +0 -7
- package/dist/code-generation/plugin-package/plugin-package-definition/typings.js +0 -17
- package/dist/code-generation/plugin-package/plugin-package-definition/typings.js.map +0 -7
- package/dist/code-generation/strings.js +0 -115
- package/dist/code-generation/strings.js.map +0 -7
- package/dist/code-generation/typings.js +0 -17
- package/dist/code-generation/typings.js.map +0 -7
- package/dist/command-definitions.js +0 -84
- package/dist/command-definitions.js.map +0 -7
- package/dist/command-implementations/add-command.js +0 -249
- package/dist/command-implementations/add-command.js.map +0 -7
- package/dist/command-implementations/base-command.js +0 -69
- package/dist/command-implementations/base-command.js.map +0 -7
- package/dist/command-implementations/bot-commands.js +0 -117
- package/dist/command-implementations/bot-commands.js.map +0 -7
- package/dist/command-implementations/build-command.js +0 -53
- package/dist/command-implementations/build-command.js.map +0 -7
- package/dist/command-implementations/bundle-command.js +0 -87
- package/dist/command-implementations/bundle-command.js.map +0 -7
- package/dist/command-implementations/deploy-command.js +0 -481
- package/dist/command-implementations/deploy-command.js.map +0 -7
- package/dist/command-implementations/dev-command.js +0 -345
- package/dist/command-implementations/dev-command.js.map +0 -7
- package/dist/command-implementations/gen-command.js +0 -110
- package/dist/command-implementations/gen-command.js.map +0 -7
- package/dist/command-implementations/global-command.js +0 -137
- package/dist/command-implementations/global-command.js.map +0 -7
- package/dist/command-implementations/index.js +0 -103
- package/dist/command-implementations/index.js.map +0 -7
- package/dist/command-implementations/init-command.js +0 -162
- package/dist/command-implementations/init-command.js.map +0 -7
- package/dist/command-implementations/integration-commands.js +0 -130
- package/dist/command-implementations/integration-commands.js.map +0 -7
- package/dist/command-implementations/interface-commands.js +0 -110
- package/dist/command-implementations/interface-commands.js.map +0 -7
- package/dist/command-implementations/lint-command.js +0 -151
- package/dist/command-implementations/lint-command.js.map +0 -7
- package/dist/command-implementations/login-command.js +0 -82
- package/dist/command-implementations/login-command.js.map +0 -7
- package/dist/command-implementations/logout-command.js +0 -35
- package/dist/command-implementations/logout-command.js.map +0 -7
- package/dist/command-implementations/plugin-commands.js +0 -111
- package/dist/command-implementations/plugin-commands.js.map +0 -7
- package/dist/command-implementations/project-command.js +0 -383
- package/dist/command-implementations/project-command.js.map +0 -7
- package/dist/command-implementations/read-command.js +0 -70
- package/dist/command-implementations/read-command.js.map +0 -7
- package/dist/command-implementations/serve-command.js +0 -68
- package/dist/command-implementations/serve-command.js.map +0 -7
- package/dist/command-tree.js +0 -60
- package/dist/command-tree.js.map +0 -7
- package/dist/config.js +0 -332
- package/dist/config.js.map +0 -7
- package/dist/consts.js +0 -124
- package/dist/consts.js.map +0 -7
- package/dist/errors.js +0 -202
- package/dist/errors.js.map +0 -7
- package/dist/index.js +0 -51
- package/dist/index.js.map +0 -7
- package/dist/init.js +0 -50
- package/dist/init.js.map +0 -7
- package/dist/linter/base-linter.js +0 -75
- package/dist/linter/base-linter.js.map +0 -7
- package/dist/linter/base-linter.test.js +0 -187
- package/dist/linter/base-linter.test.js.map +0 -7
- package/dist/linter/bot-linter.js +0 -35
- package/dist/linter/bot-linter.js.map +0 -7
- package/dist/linter/integration-linter.js +0 -35
- package/dist/linter/integration-linter.js.map +0 -7
- package/dist/linter/interface-linter.js +0 -35
- package/dist/linter/interface-linter.js.map +0 -7
- package/dist/linter/ruleset-tests/bot.ruleset.test.js +0 -358
- package/dist/linter/ruleset-tests/bot.ruleset.test.js.map +0 -7
- package/dist/linter/ruleset-tests/common.js +0 -37
- package/dist/linter/ruleset-tests/common.js.map +0 -7
- package/dist/linter/ruleset-tests/integration.ruleset.test.js +0 -887
- package/dist/linter/ruleset-tests/integration.ruleset.test.js.map +0 -7
- package/dist/linter/ruleset-tests/interface.ruleset.test.js +0 -383
- package/dist/linter/ruleset-tests/interface.ruleset.test.js.map +0 -7
- package/dist/linter/rulesets/bot.ruleset.js +0 -191
- package/dist/linter/rulesets/bot.ruleset.js.map +0 -7
- package/dist/linter/rulesets/integration.ruleset.js +0 -378
- package/dist/linter/rulesets/integration.ruleset.js.map +0 -7
- package/dist/linter/rulesets/interface.ruleset.js +0 -157
- package/dist/linter/rulesets/interface.ruleset.js.map +0 -7
- package/dist/linter/spectral-functions.js +0 -36
- package/dist/linter/spectral-functions.js.map +0 -7
- package/dist/logger/base-logger.js +0 -170
- package/dist/logger/base-logger.js.map +0 -7
- package/dist/logger/index.js +0 -86
- package/dist/logger/index.js.map +0 -7
- package/dist/package-ref.js +0 -107
- package/dist/package-ref.js.map +0 -7
- package/dist/package-ref.test.js +0 -109
- package/dist/package-ref.test.js.map +0 -7
- package/dist/register-yargs.js +0 -91
- package/dist/register-yargs.js.map +0 -7
- package/dist/root.js +0 -41
- package/dist/root.js.map +0 -7
- package/dist/sdk/index.js +0 -22
- package/dist/sdk/index.js.map +0 -7
- package/dist/sdk/resolve-bot-interfaces.js +0 -43
- package/dist/sdk/resolve-bot-interfaces.js.map +0 -7
- package/dist/sdk/resolve-integration-interfaces.js +0 -161
- package/dist/sdk/resolve-integration-interfaces.js.map +0 -7
- package/dist/sdk/validate-bot.js +0 -88
- package/dist/sdk/validate-bot.js.map +0 -7
- package/dist/sdk/validate-integration.js +0 -72
- package/dist/sdk/validate-integration.js.map +0 -7
- package/dist/typings.js +0 -17
- package/dist/typings.js.map +0 -7
- package/dist/utils/cache-utils.js +0 -104
- package/dist/utils/cache-utils.js.map +0 -7
- package/dist/utils/case-utils.js +0 -84
- package/dist/utils/case-utils.js.map +0 -7
- package/dist/utils/case-utils.test.js +0 -75
- package/dist/utils/case-utils.test.js.map +0 -7
- package/dist/utils/esbuild-utils.js +0 -92
- package/dist/utils/esbuild-utils.js.map +0 -7
- package/dist/utils/event-emitter.js +0 -63
- package/dist/utils/event-emitter.js.map +0 -7
- package/dist/utils/file-watcher.js +0 -73
- package/dist/utils/file-watcher.js.map +0 -7
- package/dist/utils/guard-utils.js +0 -32
- package/dist/utils/guard-utils.js.map +0 -7
- package/dist/utils/id-utils.js +0 -59
- package/dist/utils/id-utils.js.map +0 -7
- package/dist/utils/index.js +0 -99
- package/dist/utils/index.js.map +0 -7
- package/dist/utils/object-utils.js +0 -32
- package/dist/utils/object-utils.js.map +0 -7
- package/dist/utils/path-utils.js +0 -106
- package/dist/utils/path-utils.js.map +0 -7
- package/dist/utils/path-utils.test.js +0 -72
- package/dist/utils/path-utils.test.js.map +0 -7
- package/dist/utils/pkgjson-utils.js +0 -57
- package/dist/utils/pkgjson-utils.js.map +0 -7
- package/dist/utils/promise-utils.js +0 -33
- package/dist/utils/promise-utils.js.map +0 -7
- package/dist/utils/promise-utils.test.js +0 -14
- package/dist/utils/promise-utils.test.js.map +0 -7
- package/dist/utils/prompt-utils.js +0 -105
- package/dist/utils/prompt-utils.js.map +0 -7
- package/dist/utils/record-utils.js +0 -118
- package/dist/utils/record-utils.js.map +0 -7
- package/dist/utils/record-utils.test.js +0 -38
- package/dist/utils/record-utils.test.js.map +0 -7
- package/dist/utils/require-utils.js +0 -90
- package/dist/utils/require-utils.js.map +0 -7
- package/dist/utils/require-utils.test.js +0 -54
- package/dist/utils/require-utils.test.js.map +0 -7
- package/dist/utils/schema-utils.js +0 -64
- package/dist/utils/schema-utils.js.map +0 -7
- package/dist/utils/schema-utils.test.js +0 -50
- package/dist/utils/schema-utils.test.js.map +0 -7
- package/dist/utils/semver-utils.js +0 -45
- package/dist/utils/semver-utils.js.map +0 -7
- package/dist/utils/string-utils.js +0 -42
- package/dist/utils/string-utils.js.map +0 -7
- package/dist/utils/template-utils.js +0 -51
- package/dist/utils/template-utils.js.map +0 -7
- package/dist/utils/tunnel-utils.js +0 -129
- package/dist/utils/tunnel-utils.js.map +0 -7
- package/dist/utils/type-utils.js +0 -17
- package/dist/utils/type-utils.js.map +0 -7
- package/dist/utils/url-utils.js +0 -67
- package/dist/utils/url-utils.js.map +0 -7
- package/dist/worker/child-entrypoint.js +0 -58
- package/dist/worker/child-entrypoint.js.map +0 -7
- package/dist/worker/child-wrapper.js +0 -119
- package/dist/worker/child-wrapper.js.map +0 -7
- package/dist/worker/config.js +0 -44
- package/dist/worker/config.js.map +0 -7
- package/dist/worker/index.js +0 -32
- package/dist/worker/index.js.map +0 -7
- package/dist/worker/is-child.js +0 -55
- package/dist/worker/is-child.js.map +0 -7
- package/dist/worker/worker-state.js +0 -71
- package/dist/worker/worker-state.js.map +0 -7
- package/dist/worker/worker.js +0 -91
- package/dist/worker/worker.js.map +0 -7
- package/templates/empty-bot/.botpress/implementation/index.ts +0 -50
- package/templates/empty-bot/.botpress/implementation/plugins/index.ts +0 -11
- package/templates/empty-bot/.botpress/implementation/typings/actions/index.ts +0 -6
- package/templates/empty-bot/.botpress/implementation/typings/events/index.ts +0 -6
- package/templates/empty-bot/.botpress/implementation/typings/index.ts +0 -20
- package/templates/empty-bot/.botpress/implementation/typings/integrations/index.ts +0 -6
- package/templates/empty-bot/.botpress/implementation/typings/states/index.ts +0 -6
- package/templates/empty-bot/.botpress/index.ts +0 -5
- package/templates/empty-integration/.botpress/implementation/index.ts +0 -57
- package/templates/empty-integration/.botpress/implementation/typings/actions/index.ts +0 -6
- package/templates/empty-integration/.botpress/implementation/typings/channels/index.ts +0 -6
- package/templates/empty-integration/.botpress/implementation/typings/configuration/index.ts +0 -2
- package/templates/empty-integration/.botpress/implementation/typings/configurations/index.ts +0 -6
- package/templates/empty-integration/.botpress/implementation/typings/entities/index.ts +0 -6
- package/templates/empty-integration/.botpress/implementation/typings/events/index.ts +0 -6
- package/templates/empty-integration/.botpress/implementation/typings/index.ts +0 -31
- package/templates/empty-integration/.botpress/implementation/typings/states/index.ts +0 -6
- package/templates/empty-integration/.botpress/index.ts +0 -2
- package/templates/empty-integration/.botpress/secrets/index.ts +0 -6
- package/templates/empty-plugin/.botpress/implementation/index.ts +0 -35
- package/templates/empty-plugin/.botpress/implementation/typings/actions/index.ts +0 -6
- package/templates/empty-plugin/.botpress/implementation/typings/configuration/index.ts +0 -2
- package/templates/empty-plugin/.botpress/implementation/typings/events/index.ts +0 -6
- package/templates/empty-plugin/.botpress/implementation/typings/index.ts +0 -26
- package/templates/empty-plugin/.botpress/implementation/typings/integrations/index.ts +0 -6
- package/templates/empty-plugin/.botpress/implementation/typings/interfaces/index.ts +0 -6
- package/templates/empty-plugin/.botpress/implementation/typings/states/index.ts +0 -6
- package/templates/empty-plugin/.botpress/index.ts +0 -1
- package/templates/hello-world/.botpress/implementation/index.ts +0 -57
- package/templates/hello-world/.botpress/implementation/typings/actions/helloWorld/index.ts +0 -12
- package/templates/hello-world/.botpress/implementation/typings/actions/helloWorld/input.ts +0 -5
- package/templates/hello-world/.botpress/implementation/typings/actions/helloWorld/output.ts +0 -5
- package/templates/hello-world/.botpress/implementation/typings/actions/index.ts +0 -9
- package/templates/hello-world/.botpress/implementation/typings/channels/index.ts +0 -6
- package/templates/hello-world/.botpress/implementation/typings/configuration/index.ts +0 -2
- package/templates/hello-world/.botpress/implementation/typings/configurations/index.ts +0 -6
- package/templates/hello-world/.botpress/implementation/typings/entities/index.ts +0 -6
- package/templates/hello-world/.botpress/implementation/typings/events/index.ts +0 -6
- package/templates/hello-world/.botpress/implementation/typings/index.ts +0 -31
- package/templates/hello-world/.botpress/implementation/typings/states/index.ts +0 -6
- package/templates/hello-world/.botpress/index.ts +0 -2
- package/templates/hello-world/.botpress/secrets/index.ts +0 -6
- package/templates/webhook-message/.botpress/implementation/index.ts +0 -57
- package/templates/webhook-message/.botpress/implementation/typings/actions/index.ts +0 -6
- package/templates/webhook-message/.botpress/implementation/typings/channels/index.ts +0 -9
- package/templates/webhook-message/.botpress/implementation/typings/channels/webhook/index.ts +0 -12
- package/templates/webhook-message/.botpress/implementation/typings/channels/webhook/messages/index.ts +0 -9
- package/templates/webhook-message/.botpress/implementation/typings/channels/webhook/messages/text.ts +0 -5
- package/templates/webhook-message/.botpress/implementation/typings/configuration/index.ts +0 -8
- package/templates/webhook-message/.botpress/implementation/typings/configurations/index.ts +0 -6
- package/templates/webhook-message/.botpress/implementation/typings/entities/index.ts +0 -6
- package/templates/webhook-message/.botpress/implementation/typings/events/index.ts +0 -6
- package/templates/webhook-message/.botpress/implementation/typings/index.ts +0 -31
- package/templates/webhook-message/.botpress/implementation/typings/states/index.ts +0 -6
- package/templates/webhook-message/.botpress/index.ts +0 -2
- package/templates/webhook-message/.botpress/secrets/index.ts +0 -6
package/dist/command-tree.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var command_tree_exports = {};
|
|
20
|
-
__export(command_tree_exports, {
|
|
21
|
-
guards: () => guards,
|
|
22
|
-
zipTree: () => zipTree
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(command_tree_exports);
|
|
25
|
-
const guards = {
|
|
26
|
-
definition: {
|
|
27
|
-
isDef: (x) => "schema" in x,
|
|
28
|
-
isSubTree: (x) => "subcommands" in x
|
|
29
|
-
},
|
|
30
|
-
implementation: {
|
|
31
|
-
isImpl: (x) => typeof x === "function",
|
|
32
|
-
isSubTree: (x) => typeof x === "object"
|
|
33
|
-
},
|
|
34
|
-
command: {
|
|
35
|
-
isLeaf: (x) => "handler" in x,
|
|
36
|
-
isSubTree: (x) => "subcommands" in x
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const zipTree = (defTree, implTree) => {
|
|
40
|
-
const tree = {};
|
|
41
|
-
for (const key in defTree) {
|
|
42
|
-
const def = defTree[key];
|
|
43
|
-
const impl = implTree[key];
|
|
44
|
-
if (guards.definition.isDef(def) && guards.implementation.isImpl(impl)) {
|
|
45
|
-
tree[key] = { ...def, handler: impl };
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
if (guards.definition.isSubTree(def) && guards.implementation.isSubTree(impl)) {
|
|
49
|
-
tree[key] = { ...def, subcommands: zipTree(def.subcommands, impl.subcommands) };
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return tree;
|
|
54
|
-
};
|
|
55
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
-
0 && (module.exports = {
|
|
57
|
-
guards,
|
|
58
|
-
zipTree
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=command-tree.js.map
|
package/dist/command-tree.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/command-tree.ts"],
|
|
4
|
-
"sourcesContent": ["import type * as typings from './typings'\n\nexport type DefinitionSubTree = {\n description: string\n subcommands: DefinitionTree\n}\n\nexport type DefinitionTree = {\n [key: string]: DefinitionTreeNode\n}\n\nexport type DefinitionTreeNode = typings.CommandDefinition | DefinitionSubTree\n\nexport type ImplementationSubTree<D extends DefinitionSubTree = DefinitionSubTree> = {\n subcommands: ImplementationTree<D['subcommands']>\n}\n\nexport type ImplementationTreeNode<N extends DefinitionTreeNode = DefinitionTreeNode> =\n N extends typings.CommandDefinition\n ? typings.CommandImplementation<N>\n : N extends DefinitionSubTree\n ? ImplementationSubTree<N>\n : never\n\nexport type ImplementationTree<D extends DefinitionTree = DefinitionTree> = {\n [K in keyof D]: ImplementationTreeNode<D[K]>\n}\n\nexport type CommandSubTree<D extends DefinitionSubTree = DefinitionSubTree> = {\n description: string\n subcommands: CommandTree<D['subcommands']>\n}\n\nexport type CommandTreeNode<N extends DefinitionTreeNode = DefinitionTreeNode> = N extends typings.CommandDefinition\n ? typings.CommandLeaf<N>\n : N extends DefinitionSubTree\n ? CommandSubTree<N>\n : never\n\nexport type CommandTree<D extends DefinitionTree = DefinitionTree> = {\n [K in keyof D]: CommandTreeNode<D[K]>\n}\n\nexport const guards = {\n definition: {\n isDef: (x: DefinitionTreeNode): x is typings.CommandDefinition => 'schema' in x,\n isSubTree: (x: DefinitionTreeNode): x is DefinitionSubTree => 'subcommands' in x,\n },\n implementation: {\n isImpl: (x: ImplementationTreeNode): x is typings.CommandImplementation => typeof x === 'function',\n isSubTree: (x: ImplementationTreeNode): x is ImplementationSubTree => typeof x === 'object',\n },\n command: {\n isLeaf: (x: CommandTreeNode): x is typings.CommandLeaf => 'handler' in x,\n isSubTree: (x: CommandTreeNode): x is CommandSubTree => 'subcommands' in x,\n },\n}\n\nexport const zipTree = <T extends DefinitionTree>(defTree: T, implTree: ImplementationTree<T>): CommandTree<T> => {\n const tree = {} as CommandTree<T>\n\n for (const key in defTree) {\n const def = defTree[key]!\n const impl = implTree[key]!\n\n if (guards.definition.isDef(def) && guards.implementation.isImpl(impl)) {\n tree[key] = { ...def, handler: impl } as CommandTreeNode<typeof def>\n continue\n }\n\n if (guards.definition.isSubTree(def) && guards.implementation.isSubTree(impl)) {\n tree[key] = { ...def, subcommands: zipTree(def.subcommands, impl.subcommands) } as CommandTreeNode<typeof def>\n continue\n }\n }\n\n return tree\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CO,MAAM,SAAS;AAAA,EACpB,YAAY;AAAA,IACV,OAAO,CAAC,MAA0D,YAAY;AAAA,IAC9E,WAAW,CAAC,MAAkD,iBAAiB;AAAA,EACjF;AAAA,EACA,gBAAgB;AAAA,IACd,QAAQ,CAAC,MAAkE,OAAO,MAAM;AAAA,IACxF,WAAW,CAAC,MAA0D,OAAO,MAAM;AAAA,EACrF;AAAA,EACA,SAAS;AAAA,IACP,QAAQ,CAAC,MAAiD,aAAa;AAAA,IACvE,WAAW,CAAC,MAA4C,iBAAiB;AAAA,EAC3E;AACF;AAEO,MAAM,UAAU,CAA2B,SAAY,aAAoD;AAChH,QAAM,OAAO,CAAC;AAEd,aAAW,OAAO,SAAS;AACzB,UAAM,MAAM,QAAQ,GAAG;AACvB,UAAM,OAAO,SAAS,GAAG;AAEzB,QAAI,OAAO,WAAW,MAAM,GAAG,KAAK,OAAO,eAAe,OAAO,IAAI,GAAG;AACtE,WAAK,GAAG,IAAI,EAAE,GAAG,KAAK,SAAS,KAAK;AACpC;AAAA,IACF;AAEA,QAAI,OAAO,WAAW,UAAU,GAAG,KAAK,OAAO,eAAe,UAAU,IAAI,GAAG;AAC7E,WAAK,GAAG,IAAI,EAAE,GAAG,KAAK,aAAa,QAAQ,IAAI,aAAa,KAAK,WAAW,EAAE;AAC9E;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/config.js
DELETED
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var config_exports = {};
|
|
30
|
-
__export(config_exports, {
|
|
31
|
-
schemas: () => schemas
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(config_exports);
|
|
34
|
-
var consts = __toESM(require("./consts"));
|
|
35
|
-
const port = {
|
|
36
|
-
type: "number",
|
|
37
|
-
description: "The port to use"
|
|
38
|
-
};
|
|
39
|
-
const workDir = {
|
|
40
|
-
type: "string",
|
|
41
|
-
description: "The path to the project",
|
|
42
|
-
default: consts.defaultWorkDir
|
|
43
|
-
};
|
|
44
|
-
const noBuild = {
|
|
45
|
-
type: "boolean",
|
|
46
|
-
description: "Skip the build step",
|
|
47
|
-
default: false
|
|
48
|
-
};
|
|
49
|
-
const apiUrl = {
|
|
50
|
-
type: "string",
|
|
51
|
-
description: "The URL of the Botpress server"
|
|
52
|
-
};
|
|
53
|
-
const token = {
|
|
54
|
-
type: "string",
|
|
55
|
-
description: "You Personal Access Token "
|
|
56
|
-
};
|
|
57
|
-
const workspaceId = {
|
|
58
|
-
type: "string",
|
|
59
|
-
description: "The Workspace Id to deploy to"
|
|
60
|
-
};
|
|
61
|
-
const secrets = {
|
|
62
|
-
type: "string",
|
|
63
|
-
description: "Values for the integration secrets",
|
|
64
|
-
array: true,
|
|
65
|
-
default: []
|
|
66
|
-
};
|
|
67
|
-
const botRef = {
|
|
68
|
-
type: "string",
|
|
69
|
-
description: "The bot ID. Bot Name is not supported.",
|
|
70
|
-
demandOption: true,
|
|
71
|
-
positional: true,
|
|
72
|
-
idx: 0
|
|
73
|
-
};
|
|
74
|
-
const packageType = {
|
|
75
|
-
type: "string",
|
|
76
|
-
description: "Either an integration or an interface; helps disambiguate the package type in case both an integration and an interface have the same reference.",
|
|
77
|
-
choices: ["integration", "interface", "plugin"]
|
|
78
|
-
};
|
|
79
|
-
const packageRef = {
|
|
80
|
-
type: "string",
|
|
81
|
-
description: "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",
|
|
82
|
-
positional: true,
|
|
83
|
-
idx: 0
|
|
84
|
-
};
|
|
85
|
-
const integrationRef = {
|
|
86
|
-
...packageRef,
|
|
87
|
-
demandOption: true,
|
|
88
|
-
description: "The integration ID or name with optional version. Ex: teams or teams@0.2.0"
|
|
89
|
-
};
|
|
90
|
-
const interfaceRef = {
|
|
91
|
-
...packageRef,
|
|
92
|
-
demandOption: true,
|
|
93
|
-
description: "The interface ID or name and version. Ex: llm@5.1.0"
|
|
94
|
-
};
|
|
95
|
-
const pluginRef = {
|
|
96
|
-
...packageRef,
|
|
97
|
-
demandOption: true,
|
|
98
|
-
description: "The plugin ID or name and version. Ex: knowledge@0.0.1"
|
|
99
|
-
};
|
|
100
|
-
const sourceMap = { type: "boolean", description: "Generate sourcemaps", default: false };
|
|
101
|
-
const minify = { type: "boolean", description: "Minify the bundled code", default: true };
|
|
102
|
-
const dev = {
|
|
103
|
-
type: "boolean",
|
|
104
|
-
description: "List only dev bots / dev integrations",
|
|
105
|
-
default: false
|
|
106
|
-
};
|
|
107
|
-
const isPublic = {
|
|
108
|
-
type: "boolean",
|
|
109
|
-
description: "Weither or not to deploy the integration publicly",
|
|
110
|
-
default: false
|
|
111
|
-
};
|
|
112
|
-
const globalSchema = {
|
|
113
|
-
verbose: {
|
|
114
|
-
type: "boolean",
|
|
115
|
-
description: "Enable verbose logging",
|
|
116
|
-
alias: "v",
|
|
117
|
-
default: false
|
|
118
|
-
},
|
|
119
|
-
confirm: {
|
|
120
|
-
type: "boolean",
|
|
121
|
-
description: "Confirm all prompts",
|
|
122
|
-
alias: "y",
|
|
123
|
-
default: false
|
|
124
|
-
},
|
|
125
|
-
json: {
|
|
126
|
-
type: "boolean",
|
|
127
|
-
description: "Prevent logging anything else than raw json in stdout. Useful for piping output to other tools",
|
|
128
|
-
default: false
|
|
129
|
-
},
|
|
130
|
-
botpressHome: {
|
|
131
|
-
type: "string",
|
|
132
|
-
description: "The path to the Botpress home directory",
|
|
133
|
-
default: consts.defaultBotpressHome
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const projectSchema = {
|
|
137
|
-
...globalSchema,
|
|
138
|
-
workDir
|
|
139
|
-
};
|
|
140
|
-
const credentialsSchema = {
|
|
141
|
-
apiUrl,
|
|
142
|
-
workspaceId,
|
|
143
|
-
token
|
|
144
|
-
};
|
|
145
|
-
const secretsSchema = {
|
|
146
|
-
secrets
|
|
147
|
-
};
|
|
148
|
-
const generateSchema = {
|
|
149
|
-
...projectSchema
|
|
150
|
-
};
|
|
151
|
-
const bundleSchema = {
|
|
152
|
-
...projectSchema,
|
|
153
|
-
sourceMap,
|
|
154
|
-
minify
|
|
155
|
-
};
|
|
156
|
-
const buildSchema = {
|
|
157
|
-
...projectSchema,
|
|
158
|
-
sourceMap,
|
|
159
|
-
minify
|
|
160
|
-
};
|
|
161
|
-
const readSchema = {
|
|
162
|
-
...projectSchema
|
|
163
|
-
};
|
|
164
|
-
const serveSchema = {
|
|
165
|
-
...projectSchema,
|
|
166
|
-
...secretsSchema,
|
|
167
|
-
port
|
|
168
|
-
};
|
|
169
|
-
const deploySchema = {
|
|
170
|
-
...projectSchema,
|
|
171
|
-
...credentialsSchema,
|
|
172
|
-
...secretsSchema,
|
|
173
|
-
botId: { type: "string", description: "The bot ID to deploy. Only used when deploying a bot" },
|
|
174
|
-
noBuild,
|
|
175
|
-
createNewBot: { type: "boolean", description: "Create a new bot when deploying. Only used when deploying a bot" },
|
|
176
|
-
sourceMap,
|
|
177
|
-
minify,
|
|
178
|
-
public: isPublic,
|
|
179
|
-
allowDeprecated: {
|
|
180
|
-
type: "boolean",
|
|
181
|
-
description: "Allow deprecated features in the project",
|
|
182
|
-
default: false
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
const devSchema = {
|
|
186
|
-
...projectSchema,
|
|
187
|
-
...credentialsSchema,
|
|
188
|
-
...secretsSchema,
|
|
189
|
-
sourceMap,
|
|
190
|
-
minify,
|
|
191
|
-
port,
|
|
192
|
-
tunnelUrl: {
|
|
193
|
-
type: "string",
|
|
194
|
-
description: "The tunnel HTTP URL to use",
|
|
195
|
-
default: consts.defaultTunnelUrl
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
const addSchema = {
|
|
199
|
-
...globalSchema,
|
|
200
|
-
...credentialsSchema,
|
|
201
|
-
packageRef,
|
|
202
|
-
packageType,
|
|
203
|
-
installPath: {
|
|
204
|
-
type: "string",
|
|
205
|
-
description: "The path where to install the package",
|
|
206
|
-
default: consts.defaultInstallPath
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
const loginSchema = {
|
|
210
|
-
...globalSchema,
|
|
211
|
-
token,
|
|
212
|
-
workspaceId,
|
|
213
|
-
apiUrl: { ...apiUrl, default: consts.defaultBotpressApiUrl }
|
|
214
|
-
};
|
|
215
|
-
const logoutSchema = {
|
|
216
|
-
...globalSchema
|
|
217
|
-
};
|
|
218
|
-
const createBotSchema = {
|
|
219
|
-
...globalSchema,
|
|
220
|
-
...credentialsSchema,
|
|
221
|
-
name: { type: "string", description: "The name of the bot to create" },
|
|
222
|
-
ifNotExists: {
|
|
223
|
-
type: "boolean",
|
|
224
|
-
description: "Do not create if a bot with the same name already exists",
|
|
225
|
-
default: false
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
const getBotSchema = {
|
|
229
|
-
...globalSchema,
|
|
230
|
-
...credentialsSchema,
|
|
231
|
-
botRef
|
|
232
|
-
};
|
|
233
|
-
const deleteBotSchema = {
|
|
234
|
-
...globalSchema,
|
|
235
|
-
...credentialsSchema,
|
|
236
|
-
botRef
|
|
237
|
-
};
|
|
238
|
-
const listBotsSchema = {
|
|
239
|
-
...globalSchema,
|
|
240
|
-
...credentialsSchema,
|
|
241
|
-
dev
|
|
242
|
-
};
|
|
243
|
-
const getIntegrationSchema = {
|
|
244
|
-
...globalSchema,
|
|
245
|
-
...credentialsSchema,
|
|
246
|
-
integrationRef
|
|
247
|
-
};
|
|
248
|
-
const listIntegrationsSchema = {
|
|
249
|
-
...globalSchema,
|
|
250
|
-
...credentialsSchema,
|
|
251
|
-
name: { type: "string", description: "The name filter when listing integrations" },
|
|
252
|
-
versionNumber: { type: "string", description: "The version filter when listing integrations" },
|
|
253
|
-
dev
|
|
254
|
-
};
|
|
255
|
-
const deleteIntegrationSchema = {
|
|
256
|
-
...globalSchema,
|
|
257
|
-
...credentialsSchema,
|
|
258
|
-
integrationRef
|
|
259
|
-
};
|
|
260
|
-
const getInterfaceSchema = {
|
|
261
|
-
...globalSchema,
|
|
262
|
-
...credentialsSchema,
|
|
263
|
-
interfaceRef
|
|
264
|
-
};
|
|
265
|
-
const listInterfacesSchema = {
|
|
266
|
-
...globalSchema,
|
|
267
|
-
...credentialsSchema
|
|
268
|
-
};
|
|
269
|
-
const deleteInterfaceSchema = {
|
|
270
|
-
...globalSchema,
|
|
271
|
-
...credentialsSchema,
|
|
272
|
-
interfaceRef
|
|
273
|
-
};
|
|
274
|
-
const getPluginSchema = {
|
|
275
|
-
...globalSchema,
|
|
276
|
-
...credentialsSchema,
|
|
277
|
-
pluginRef
|
|
278
|
-
};
|
|
279
|
-
const listPluginsSchema = {
|
|
280
|
-
...globalSchema,
|
|
281
|
-
...credentialsSchema
|
|
282
|
-
};
|
|
283
|
-
const deletePluginSchema = {
|
|
284
|
-
...globalSchema,
|
|
285
|
-
...credentialsSchema,
|
|
286
|
-
pluginRef
|
|
287
|
-
};
|
|
288
|
-
const initSchema = {
|
|
289
|
-
...globalSchema,
|
|
290
|
-
workDir,
|
|
291
|
-
type: { type: "string", choices: ["bot", "integration", "plugin"] },
|
|
292
|
-
name: { type: "string", description: "The name of the project" }
|
|
293
|
-
};
|
|
294
|
-
const lintSchema = {
|
|
295
|
-
...projectSchema
|
|
296
|
-
};
|
|
297
|
-
const schemas = {
|
|
298
|
-
global: globalSchema,
|
|
299
|
-
project: projectSchema,
|
|
300
|
-
credentials: credentialsSchema,
|
|
301
|
-
secrets: secretsSchema,
|
|
302
|
-
login: loginSchema,
|
|
303
|
-
logout: logoutSchema,
|
|
304
|
-
createBot: createBotSchema,
|
|
305
|
-
getBot: getBotSchema,
|
|
306
|
-
deleteBot: deleteBotSchema,
|
|
307
|
-
listBots: listBotsSchema,
|
|
308
|
-
getIntegration: getIntegrationSchema,
|
|
309
|
-
listIntegrations: listIntegrationsSchema,
|
|
310
|
-
deleteIntegration: deleteIntegrationSchema,
|
|
311
|
-
getInterface: getInterfaceSchema,
|
|
312
|
-
listInterfaces: listInterfacesSchema,
|
|
313
|
-
deleteInterface: deleteInterfaceSchema,
|
|
314
|
-
getPlugin: getPluginSchema,
|
|
315
|
-
listPlugins: listPluginsSchema,
|
|
316
|
-
deletePlugin: deletePluginSchema,
|
|
317
|
-
init: initSchema,
|
|
318
|
-
generate: generateSchema,
|
|
319
|
-
bundle: bundleSchema,
|
|
320
|
-
build: buildSchema,
|
|
321
|
-
read: readSchema,
|
|
322
|
-
serve: serveSchema,
|
|
323
|
-
deploy: deploySchema,
|
|
324
|
-
add: addSchema,
|
|
325
|
-
dev: devSchema,
|
|
326
|
-
lint: lintSchema
|
|
327
|
-
};
|
|
328
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
329
|
-
0 && (module.exports = {
|
|
330
|
-
schemas
|
|
331
|
-
});
|
|
332
|
-
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/config.ts"],
|
|
4
|
-
"sourcesContent": ["import * as consts from './consts'\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 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\nconst isPublic = {\n type: 'boolean',\n description: 'Weither or not to deploy the integration publicly',\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} 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 createNewBot: { type: 'boolean', description: 'Create a new bot when deploying. Only used when deploying a bot' },\n sourceMap,\n minify,\n public: isPublic,\n allowDeprecated: {\n type: 'boolean',\n description: 'Allow deprecated features in the project',\n default: false,\n },\n} 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} 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} 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 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} 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 name: { type: 'string', description: 'The name of the project' },\n} satisfies CommandSchema\n\nconst lintSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\n// exports\n\nexport const schemas = {\n global: globalSchema,\n project: projectSchema,\n credentials: credentialsSchema,\n secrets: secretsSchema,\n\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} as const\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAKxB,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;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,cAAc;AAAA,EAClB,MAAM;AAAA,EACN,aACE;AAAA,EACF,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AAA,EAET,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,KAAK;AAAA,EACL,MAAM;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/consts.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var consts_exports = {};
|
|
30
|
-
__export(consts_exports, {
|
|
31
|
-
cliRootDir: () => cliRootDir,
|
|
32
|
-
defaultBotpressApiUrl: () => defaultBotpressApiUrl,
|
|
33
|
-
defaultBotpressAppUrl: () => defaultBotpressAppUrl,
|
|
34
|
-
defaultBotpressHome: () => defaultBotpressHome,
|
|
35
|
-
defaultInstallPath: () => defaultInstallPath,
|
|
36
|
-
defaultTunnelUrl: () => defaultTunnelUrl,
|
|
37
|
-
defaultWorkDir: () => defaultWorkDir,
|
|
38
|
-
distDirName: () => distDirName,
|
|
39
|
-
emptyBotDirName: () => emptyBotDirName,
|
|
40
|
-
emptyIntegrationDirName: () => emptyIntegrationDirName,
|
|
41
|
-
emptyPluginDirName: () => emptyPluginDirName,
|
|
42
|
-
fromCliRootDir: () => fromCliRootDir,
|
|
43
|
-
fromHomeDir: () => fromHomeDir,
|
|
44
|
-
fromOutDir: () => fromOutDir,
|
|
45
|
-
fromWorkDir: () => fromWorkDir,
|
|
46
|
-
helloWorldIntegrationDirName: () => helloWorldIntegrationDirName,
|
|
47
|
-
installDirName: () => installDirName,
|
|
48
|
-
outDirName: () => outDirName,
|
|
49
|
-
webhookMessageIntegrationDirName: () => webhookMessageIntegrationDirName
|
|
50
|
-
});
|
|
51
|
-
module.exports = __toCommonJS(consts_exports);
|
|
52
|
-
var import_os = __toESM(require("os"));
|
|
53
|
-
var import_path = __toESM(require("path"));
|
|
54
|
-
var import_root = require("./root");
|
|
55
|
-
const defaultBotpressHome = import_path.default.join(import_os.default.homedir(), ".botpress");
|
|
56
|
-
const defaultWorkDir = process.cwd();
|
|
57
|
-
const defaultInstallPath = process.cwd();
|
|
58
|
-
const defaultBotpressApiUrl = "https://api.botpress.cloud";
|
|
59
|
-
const defaultBotpressAppUrl = "https://app.botpress.cloud";
|
|
60
|
-
const defaultTunnelUrl = "https://tunnel.botpress.cloud";
|
|
61
|
-
const cliRootDir = import_root.CLI_ROOT_DIR;
|
|
62
|
-
const emptyBotDirName = "empty-bot";
|
|
63
|
-
const emptyPluginDirName = "empty-plugin";
|
|
64
|
-
const emptyIntegrationDirName = "empty-integration";
|
|
65
|
-
const helloWorldIntegrationDirName = "hello-world";
|
|
66
|
-
const webhookMessageIntegrationDirName = "webhook-message";
|
|
67
|
-
const installDirName = "bp_modules";
|
|
68
|
-
const outDirName = ".botpress";
|
|
69
|
-
const distDirName = "dist";
|
|
70
|
-
const fromCliRootDir = {
|
|
71
|
-
emptyBotTemplate: import_path.default.join("templates", emptyBotDirName),
|
|
72
|
-
emptyPluginTemplate: import_path.default.join("templates", emptyPluginDirName),
|
|
73
|
-
emptyIntegrationTemplate: import_path.default.join("templates", emptyIntegrationDirName),
|
|
74
|
-
helloWorldIntegrationTemplate: import_path.default.join("templates", helloWorldIntegrationDirName),
|
|
75
|
-
webhookMessageIntegrationTemplate: import_path.default.join("templates", webhookMessageIntegrationDirName)
|
|
76
|
-
};
|
|
77
|
-
const fromHomeDir = {
|
|
78
|
-
globalCacheFile: "global.cache.json"
|
|
79
|
-
};
|
|
80
|
-
const fromOutDir = {
|
|
81
|
-
distDir: distDirName,
|
|
82
|
-
outFile: import_path.default.join(distDirName, "index.js"),
|
|
83
|
-
implementationDir: "implementation",
|
|
84
|
-
pluginsDir: "plugins",
|
|
85
|
-
secretsDir: "secrets",
|
|
86
|
-
projectCacheFile: "project.cache.json"
|
|
87
|
-
};
|
|
88
|
-
const fromWorkDir = {
|
|
89
|
-
integrationDefinition: "integration.definition.ts",
|
|
90
|
-
interfaceDefinition: "interface.definition.ts",
|
|
91
|
-
botDefinition: "bot.definition.ts",
|
|
92
|
-
pluginDefinition: "plugin.definition.ts",
|
|
93
|
-
entryPoint: import_path.default.join("src", "index.ts"),
|
|
94
|
-
outDir: outDirName,
|
|
95
|
-
distDir: import_path.default.join(outDirName, fromOutDir.distDir),
|
|
96
|
-
outFile: import_path.default.join(outDirName, fromOutDir.outFile),
|
|
97
|
-
implementationDir: import_path.default.join(outDirName, fromOutDir.implementationDir),
|
|
98
|
-
pluginsDir: import_path.default.join(outDirName, fromOutDir.pluginsDir),
|
|
99
|
-
secretsDir: import_path.default.join(outDirName, fromOutDir.secretsDir),
|
|
100
|
-
projectCacheFile: import_path.default.join(outDirName, fromOutDir.projectCacheFile)
|
|
101
|
-
};
|
|
102
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
-
0 && (module.exports = {
|
|
104
|
-
cliRootDir,
|
|
105
|
-
defaultBotpressApiUrl,
|
|
106
|
-
defaultBotpressAppUrl,
|
|
107
|
-
defaultBotpressHome,
|
|
108
|
-
defaultInstallPath,
|
|
109
|
-
defaultTunnelUrl,
|
|
110
|
-
defaultWorkDir,
|
|
111
|
-
distDirName,
|
|
112
|
-
emptyBotDirName,
|
|
113
|
-
emptyIntegrationDirName,
|
|
114
|
-
emptyPluginDirName,
|
|
115
|
-
fromCliRootDir,
|
|
116
|
-
fromHomeDir,
|
|
117
|
-
fromOutDir,
|
|
118
|
-
fromWorkDir,
|
|
119
|
-
helloWorldIntegrationDirName,
|
|
120
|
-
installDirName,
|
|
121
|
-
outDirName,
|
|
122
|
-
webhookMessageIntegrationDirName
|
|
123
|
-
});
|
|
124
|
-
//# sourceMappingURL=consts.js.map
|
package/dist/consts.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/consts.ts"],
|
|
4
|
-
"sourcesContent": ["import os from 'os'\nimport pathlib from 'path'\nimport { CLI_ROOT_DIR } from './root'\n\n// configurable\n\nexport const defaultBotpressHome = pathlib.join(os.homedir(), '.botpress')\nexport const defaultWorkDir = process.cwd()\nexport const defaultInstallPath = process.cwd()\nexport const defaultBotpressApiUrl = 'https://api.botpress.cloud'\nexport const defaultBotpressAppUrl = 'https://app.botpress.cloud'\nexport const defaultTunnelUrl = 'https://tunnel.botpress.cloud'\n\n// not configurable\n\nexport const cliRootDir = CLI_ROOT_DIR\nexport const emptyBotDirName = 'empty-bot'\nexport const emptyPluginDirName = 'empty-plugin'\nexport const emptyIntegrationDirName = 'empty-integration'\nexport const helloWorldIntegrationDirName = 'hello-world'\nexport const webhookMessageIntegrationDirName = 'webhook-message'\nexport const installDirName = 'bp_modules'\nexport const outDirName = '.botpress'\nexport const distDirName = 'dist'\n\nexport const fromCliRootDir = {\n emptyBotTemplate: pathlib.join('templates', emptyBotDirName),\n emptyPluginTemplate: pathlib.join('templates', emptyPluginDirName),\n emptyIntegrationTemplate: pathlib.join('templates', emptyIntegrationDirName),\n helloWorldIntegrationTemplate: pathlib.join('templates', helloWorldIntegrationDirName),\n webhookMessageIntegrationTemplate: pathlib.join('templates', webhookMessageIntegrationDirName),\n}\n\nexport const fromHomeDir = {\n globalCacheFile: 'global.cache.json',\n}\n\nexport const fromOutDir = {\n distDir: distDirName,\n outFile: pathlib.join(distDirName, 'index.js'),\n implementationDir: 'implementation',\n pluginsDir: 'plugins',\n secretsDir: 'secrets',\n projectCacheFile: 'project.cache.json',\n}\n\nexport const fromWorkDir = {\n integrationDefinition: 'integration.definition.ts',\n interfaceDefinition: 'interface.definition.ts',\n botDefinition: 'bot.definition.ts',\n pluginDefinition: 'plugin.definition.ts',\n entryPoint: pathlib.join('src', 'index.ts'),\n outDir: outDirName,\n distDir: pathlib.join(outDirName, fromOutDir.distDir),\n outFile: pathlib.join(outDirName, fromOutDir.outFile),\n implementationDir: pathlib.join(outDirName, fromOutDir.implementationDir),\n pluginsDir: pathlib.join(outDirName, fromOutDir.pluginsDir),\n secretsDir: pathlib.join(outDirName, fromOutDir.secretsDir),\n projectCacheFile: pathlib.join(outDirName, fromOutDir.projectCacheFile),\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAe;AACf,kBAAoB;AACpB,kBAA6B;AAItB,MAAM,sBAAsB,YAAAA,QAAQ,KAAK,UAAAC,QAAG,QAAQ,GAAG,WAAW;AAClE,MAAM,iBAAiB,QAAQ,IAAI;AACnC,MAAM,qBAAqB,QAAQ,IAAI;AACvC,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AAIzB,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,0BAA0B;AAChC,MAAM,+BAA+B;AACrC,MAAM,mCAAmC;AACzC,MAAM,iBAAiB;AACvB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,iBAAiB;AAAA,EAC5B,kBAAkB,YAAAD,QAAQ,KAAK,aAAa,eAAe;AAAA,EAC3D,qBAAqB,YAAAA,QAAQ,KAAK,aAAa,kBAAkB;AAAA,EACjE,0BAA0B,YAAAA,QAAQ,KAAK,aAAa,uBAAuB;AAAA,EAC3E,+BAA+B,YAAAA,QAAQ,KAAK,aAAa,4BAA4B;AAAA,EACrF,mCAAmC,YAAAA,QAAQ,KAAK,aAAa,gCAAgC;AAC/F;AAEO,MAAM,cAAc;AAAA,EACzB,iBAAiB;AACnB;AAEO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,SAAS,YAAAA,QAAQ,KAAK,aAAa,UAAU;AAAA,EAC7C,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,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