@botpress/cli 2.0.2 → 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 +3 -3
- package/templates/empty-bot/package.json +2 -2
- package/templates/empty-integration/package.json +2 -2
- package/templates/empty-plugin/package.json +1 -1
- package/templates/hello-world/package.json +2 -2
- package/templates/webhook-message/package.json +2 -2
- package/.turbo/turbo-build.log +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/code-generation/integration-implementation/integration-typings/actions-module.js
DELETED
|
@@ -1,88 +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 actions_module_exports = {};
|
|
30
|
-
__export(actions_module_exports, {
|
|
31
|
-
ActionInputModule: () => ActionInputModule,
|
|
32
|
-
ActionModule: () => ActionModule,
|
|
33
|
-
ActionOutputModule: () => ActionOutputModule,
|
|
34
|
-
ActionsModule: () => ActionsModule
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(actions_module_exports);
|
|
37
|
-
var import_generators = require("../../generators");
|
|
38
|
-
var import_module = require("../../module");
|
|
39
|
-
var strings = __toESM(require("../../strings"));
|
|
40
|
-
class ActionInputModule extends import_module.Module {
|
|
41
|
-
constructor(_input) {
|
|
42
|
-
const name = "input";
|
|
43
|
-
const exportName = strings.typeName(name);
|
|
44
|
-
super({ path: `${name}.ts`, exportName });
|
|
45
|
-
this._input = _input;
|
|
46
|
-
}
|
|
47
|
-
async getContent() {
|
|
48
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(this._input.schema, this.exportName);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
class ActionOutputModule extends import_module.Module {
|
|
52
|
-
constructor(_output) {
|
|
53
|
-
const name = "output";
|
|
54
|
-
const exportName = strings.typeName(name);
|
|
55
|
-
super({ path: `${name}.ts`, exportName });
|
|
56
|
-
this._output = _output;
|
|
57
|
-
}
|
|
58
|
-
async getContent() {
|
|
59
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(this._output.schema, this.exportName);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
class ActionModule extends import_module.ReExportTypeModule {
|
|
63
|
-
constructor(actionName, action) {
|
|
64
|
-
super({ exportName: strings.typeName(actionName) });
|
|
65
|
-
const inputModule = new ActionInputModule(action.input);
|
|
66
|
-
const outputModule = new ActionOutputModule(action.output);
|
|
67
|
-
this.pushDep(inputModule);
|
|
68
|
-
this.pushDep(outputModule);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
class ActionsModule extends import_module.ReExportTypeModule {
|
|
72
|
-
constructor(actions) {
|
|
73
|
-
super({ exportName: strings.typeName("actions") });
|
|
74
|
-
for (const [actionName, action] of Object.entries(actions)) {
|
|
75
|
-
const module2 = new ActionModule(actionName, action);
|
|
76
|
-
module2.unshift(actionName);
|
|
77
|
-
this.pushDep(module2);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
-
0 && (module.exports = {
|
|
83
|
-
ActionInputModule,
|
|
84
|
-
ActionModule,
|
|
85
|
-
ActionOutputModule,
|
|
86
|
-
ActionsModule
|
|
87
|
-
});
|
|
88
|
-
//# sourceMappingURL=actions-module.js.map
|
package/dist/code-generation/integration-implementation/integration-typings/actions-module.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/code-generation/integration-implementation/integration-typings/actions-module.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\n\ntype ActionInput = sdk.ActionDefinition['input']\ntype ActionOutput = sdk.ActionDefinition['output']\n\nexport class ActionInputModule extends Module {\n public constructor(private _input: ActionInput) {\n const name = 'input'\n const exportName = strings.typeName(name)\n super({ path: `${name}.ts`, exportName })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._input.schema, this.exportName)\n }\n}\n\nexport class ActionOutputModule extends Module {\n public constructor(private _output: ActionOutput) {\n const name = 'output'\n const exportName = strings.typeName(name)\n super({ path: `${name}.ts`, exportName })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._output.schema, this.exportName)\n }\n}\n\nexport class ActionModule extends ReExportTypeModule {\n public constructor(actionName: string, action: sdk.ActionDefinition) {\n super({ exportName: strings.typeName(actionName) })\n\n const inputModule = new ActionInputModule(action.input)\n const outputModule = new ActionOutputModule(action.output)\n\n this.pushDep(inputModule)\n this.pushDep(outputModule)\n }\n}\n\nexport class ActionsModule extends ReExportTypeModule {\n public constructor(actions: Record<string, sdk.ActionDefinition>) {\n super({ exportName: strings.typeName('actions') })\n for (const [actionName, action] of Object.entries(actions)) {\n const module = new ActionModule(actionName, action)\n module.unshift(actionName)\n this.pushDep(module)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAA0C;AAC1C,oBAA2C;AAC3C,cAAyB;AAKlB,MAAM,0BAA0B,qBAAO;AAAA,EACrC,YAAoB,QAAqB;AAC9C,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM,EAAE,MAAM,GAAG,WAAW,WAAW,CAAC;AAHf;AAAA,EAI3B;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,OAAO,QAAQ,KAAK,UAAU;AAAA,EACtE;AACF;AAEO,MAAM,2BAA2B,qBAAO;AAAA,EACtC,YAAoB,SAAuB;AAChD,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM,EAAE,MAAM,GAAG,WAAW,WAAW,CAAC;AAHf;AAAA,EAI3B;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,QAAQ,QAAQ,KAAK,UAAU;AAAA,EACvE;AACF;AAEO,MAAM,qBAAqB,iCAAmB;AAAA,EAC5C,YAAY,YAAoB,QAA8B;AACnE,UAAM,EAAE,YAAY,QAAQ,SAAS,UAAU,EAAE,CAAC;AAElD,UAAM,cAAc,IAAI,kBAAkB,OAAO,KAAK;AACtD,UAAM,eAAe,IAAI,mBAAmB,OAAO,MAAM;AAEzD,SAAK,QAAQ,WAAW;AACxB,SAAK,QAAQ,YAAY;AAAA,EAC3B;AACF;AAEO,MAAM,sBAAsB,iCAAmB;AAAA,EAC7C,YAAY,SAA+C;AAChE,UAAM,EAAE,YAAY,QAAQ,SAAS,SAAS,EAAE,CAAC;AACjD,eAAW,CAAC,YAAY,MAAM,KAAK,OAAO,QAAQ,OAAO,GAAG;AAC1D,YAAMA,UAAS,IAAI,aAAa,YAAY,MAAM;AAClD,MAAAA,QAAO,QAAQ,UAAU;AACzB,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;",
|
|
6
|
-
"names": ["module"]
|
|
7
|
-
}
|
package/dist/code-generation/integration-implementation/integration-typings/channels-module.js
DELETED
|
@@ -1,107 +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 channels_module_exports = {};
|
|
30
|
-
__export(channels_module_exports, {
|
|
31
|
-
ChannelsModule: () => ChannelsModule
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(channels_module_exports);
|
|
34
|
-
var import_consts = require("../../consts");
|
|
35
|
-
var import_generators = require("../../generators");
|
|
36
|
-
var import_module = require("../../module");
|
|
37
|
-
var strings = __toESM(require("../../strings"));
|
|
38
|
-
class MessageModule extends import_module.Module {
|
|
39
|
-
constructor(name, _message) {
|
|
40
|
-
super({
|
|
41
|
-
path: `${name}.ts`,
|
|
42
|
-
exportName: strings.typeName(name)
|
|
43
|
-
});
|
|
44
|
-
this._message = _message;
|
|
45
|
-
}
|
|
46
|
-
async getContent() {
|
|
47
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(this._message.schema, this.exportName);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
class MessagesModule extends import_module.ReExportTypeModule {
|
|
51
|
-
constructor(channel) {
|
|
52
|
-
super({ exportName: strings.typeName("messages") });
|
|
53
|
-
for (const [messageName, message] of Object.entries(channel.messages ?? {})) {
|
|
54
|
-
const module2 = new MessageModule(messageName, message);
|
|
55
|
-
this.pushDep(module2);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
class ChannelModule extends import_module.Module {
|
|
60
|
-
constructor(channelName, _channel) {
|
|
61
|
-
super({
|
|
62
|
-
path: import_consts.INDEX_FILE,
|
|
63
|
-
exportName: strings.typeName(channelName)
|
|
64
|
-
});
|
|
65
|
-
this._channel = _channel;
|
|
66
|
-
this._messagesModule = new MessagesModule(_channel);
|
|
67
|
-
this._messagesModule.unshift("messages");
|
|
68
|
-
this.pushDep(this._messagesModule);
|
|
69
|
-
}
|
|
70
|
-
_messagesModule;
|
|
71
|
-
async getContent() {
|
|
72
|
-
const messageImport = this._messagesModule.import(this);
|
|
73
|
-
const conversation = {
|
|
74
|
-
tags: this._channel.conversation?.tags ?? {},
|
|
75
|
-
creation: this._channel.conversation?.creation ?? { enabled: false, requiredTags: [] }
|
|
76
|
-
};
|
|
77
|
-
const message = {
|
|
78
|
-
tags: this._channel.message?.tags ?? {}
|
|
79
|
-
};
|
|
80
|
-
return [
|
|
81
|
-
import_consts.GENERATED_HEADER,
|
|
82
|
-
`import { ${this._messagesModule.exportName} } from './${messageImport}'`,
|
|
83
|
-
`export * from './${messageImport}'`,
|
|
84
|
-
"",
|
|
85
|
-
`export type ${this.exportName} = {`,
|
|
86
|
-
` messages: ${this._messagesModule.exportName}`,
|
|
87
|
-
` message: ${(0, import_generators.stringifySingleLine)(message)}`,
|
|
88
|
-
` conversation: ${(0, import_generators.stringifySingleLine)(conversation)}`,
|
|
89
|
-
"}"
|
|
90
|
-
].join("\n");
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
class ChannelsModule extends import_module.ReExportTypeModule {
|
|
94
|
-
constructor(channels) {
|
|
95
|
-
super({ exportName: strings.typeName("channels") });
|
|
96
|
-
for (const [channelName, channel] of Object.entries(channels)) {
|
|
97
|
-
const module2 = new ChannelModule(channelName, channel);
|
|
98
|
-
module2.unshift(channelName);
|
|
99
|
-
this.pushDep(module2);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
-
0 && (module.exports = {
|
|
105
|
-
ChannelsModule
|
|
106
|
-
});
|
|
107
|
-
//# sourceMappingURL=channels-module.js.map
|
package/dist/code-generation/integration-implementation/integration-typings/channels-module.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/code-generation/integration-implementation/integration-typings/channels-module.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { GENERATED_HEADER, INDEX_FILE } from '../../consts'\nimport { zuiSchemaToTypeScriptType, stringifySingleLine } from '../../generators'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\n\nclass MessageModule extends Module {\n public constructor(name: string, private _message: sdk.MessageDefinition) {\n super({\n path: `${name}.ts`,\n exportName: strings.typeName(name),\n })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._message.schema, this.exportName)\n }\n}\n\nclass MessagesModule extends ReExportTypeModule {\n public constructor(channel: sdk.ChannelDefinition) {\n super({ exportName: strings.typeName('messages') })\n for (const [messageName, message] of Object.entries(channel.messages ?? {})) {\n const module = new MessageModule(messageName, message)\n this.pushDep(module)\n }\n }\n}\n\nclass ChannelModule extends Module {\n private _messagesModule: MessagesModule\n\n public constructor(channelName: string, private _channel: sdk.ChannelDefinition) {\n super({\n path: INDEX_FILE,\n exportName: strings.typeName(channelName),\n })\n\n this._messagesModule = new MessagesModule(_channel)\n this._messagesModule.unshift('messages')\n this.pushDep(this._messagesModule)\n }\n\n public async getContent() {\n const messageImport = this._messagesModule.import(this)\n\n const conversation = {\n tags: this._channel.conversation?.tags ?? {},\n creation: this._channel.conversation?.creation ?? { enabled: false, requiredTags: [] },\n }\n\n const message = {\n tags: this._channel.message?.tags ?? {},\n }\n\n return [\n GENERATED_HEADER,\n `import { ${this._messagesModule.exportName} } from './${messageImport}'`,\n `export * from './${messageImport}'`,\n '',\n `export type ${this.exportName} = {`,\n ` messages: ${this._messagesModule.exportName}`,\n ` message: ${stringifySingleLine(message)}`,\n ` conversation: ${stringifySingleLine(conversation)}`,\n '}',\n ].join('\\n')\n }\n}\n\nexport class ChannelsModule extends ReExportTypeModule {\n public constructor(channels: Record<string, sdk.ChannelDefinition>) {\n super({ exportName: strings.typeName('channels') })\n for (const [channelName, channel] of Object.entries(channels)) {\n const module = new ChannelModule(channelName, channel)\n module.unshift(channelName)\n this.pushDep(module)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA6C;AAC7C,wBAA+D;AAC/D,oBAA2C;AAC3C,cAAyB;AAEzB,MAAM,sBAAsB,qBAAO;AAAA,EAC1B,YAAY,MAAsB,UAAiC;AACxE,UAAM;AAAA,MACJ,MAAM,GAAG;AAAA,MACT,YAAY,QAAQ,SAAS,IAAI;AAAA,IACnC,CAAC;AAJsC;AAAA,EAKzC;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,SAAS,QAAQ,KAAK,UAAU;AAAA,EACxE;AACF;AAEA,MAAM,uBAAuB,iCAAmB;AAAA,EACvC,YAAY,SAAgC;AACjD,UAAM,EAAE,YAAY,QAAQ,SAAS,UAAU,EAAE,CAAC;AAClD,eAAW,CAAC,aAAa,OAAO,KAAK,OAAO,QAAQ,QAAQ,YAAY,CAAC,CAAC,GAAG;AAC3E,YAAMA,UAAS,IAAI,cAAc,aAAa,OAAO;AACrD,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;AAEA,MAAM,sBAAsB,qBAAO;AAAA,EAG1B,YAAY,aAA6B,UAAiC;AAC/E,UAAM;AAAA,MACJ,MAAM;AAAA,MACN,YAAY,QAAQ,SAAS,WAAW;AAAA,IAC1C,CAAC;AAJ6C;AAM9C,SAAK,kBAAkB,IAAI,eAAe,QAAQ;AAClD,SAAK,gBAAgB,QAAQ,UAAU;AACvC,SAAK,QAAQ,KAAK,eAAe;AAAA,EACnC;AAAA,EAXQ;AAAA,EAaR,MAAa,aAAa;AACxB,UAAM,gBAAgB,KAAK,gBAAgB,OAAO,IAAI;AAEtD,UAAM,eAAe;AAAA,MACnB,MAAM,KAAK,SAAS,cAAc,QAAQ,CAAC;AAAA,MAC3C,UAAU,KAAK,SAAS,cAAc,YAAY,EAAE,SAAS,OAAO,cAAc,CAAC,EAAE;AAAA,IACvF;AAEA,UAAM,UAAU;AAAA,MACd,MAAM,KAAK,SAAS,SAAS,QAAQ,CAAC;AAAA,IACxC;AAEA,WAAO;AAAA,MACL;AAAA,MACA,YAAY,KAAK,gBAAgB,wBAAwB;AAAA,MACzD,oBAAoB;AAAA,MACpB;AAAA,MACA,eAAe,KAAK;AAAA,MACpB,eAAe,KAAK,gBAAgB;AAAA,MACpC,kBAAc,uCAAoB,OAAO;AAAA,MACzC,uBAAmB,uCAAoB,YAAY;AAAA,MACnD;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;AAEO,MAAM,uBAAuB,iCAAmB;AAAA,EAC9C,YAAY,UAAiD;AAClE,UAAM,EAAE,YAAY,QAAQ,SAAS,UAAU,EAAE,CAAC;AAClD,eAAW,CAAC,aAAa,OAAO,KAAK,OAAO,QAAQ,QAAQ,GAAG;AAC7D,YAAMA,UAAS,IAAI,cAAc,aAAa,OAAO;AACrD,MAAAA,QAAO,QAAQ,WAAW;AAC1B,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;",
|
|
6
|
-
"names": ["module"]
|
|
7
|
-
}
|
package/dist/code-generation/integration-implementation/integration-typings/configuration-module.js
DELETED
|
@@ -1,62 +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 configuration_module_exports = {};
|
|
30
|
-
__export(configuration_module_exports, {
|
|
31
|
-
DefaultConfigurationModule: () => DefaultConfigurationModule
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(configuration_module_exports);
|
|
34
|
-
var import_consts = require("../../consts");
|
|
35
|
-
var import_generators = require("../../generators");
|
|
36
|
-
var import_module = require("../../module");
|
|
37
|
-
var strings = __toESM(require("../../strings"));
|
|
38
|
-
class DefaultConfigurationModule extends import_module.Module {
|
|
39
|
-
constructor(_configuration) {
|
|
40
|
-
const name = "configuration";
|
|
41
|
-
const exportName = strings.typeName(name);
|
|
42
|
-
super({
|
|
43
|
-
path: import_consts.INDEX_FILE,
|
|
44
|
-
exportName
|
|
45
|
-
});
|
|
46
|
-
this._configuration = _configuration;
|
|
47
|
-
}
|
|
48
|
-
async getContent() {
|
|
49
|
-
if (!this._configuration) {
|
|
50
|
-
return [
|
|
51
|
-
"/** Default Configuration of the Integration */",
|
|
52
|
-
"export type Configuration = Record<string, never>;"
|
|
53
|
-
].join("\n");
|
|
54
|
-
}
|
|
55
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(this._configuration.schema, this.exportName);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
-
0 && (module.exports = {
|
|
60
|
-
DefaultConfigurationModule
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=configuration-module.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/code-generation/integration-implementation/integration-typings/configuration-module.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { INDEX_FILE } from '../../consts'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module } from '../../module'\nimport * as strings from '../../strings'\n\nexport class DefaultConfigurationModule extends Module {\n public constructor(private _configuration: sdk.ConfigurationDefinition | undefined) {\n const name = 'configuration'\n const exportName = strings.typeName(name)\n super({\n path: INDEX_FILE,\n exportName,\n })\n }\n\n public async getContent() {\n if (!this._configuration) {\n return [\n '/** Default Configuration of the Integration */',\n 'export type Configuration = Record<string, never>;',\n ].join('\\n')\n }\n return zuiSchemaToTypeScriptType(this._configuration.schema, this.exportName)\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAC3B,wBAA0C;AAC1C,oBAAuB;AACvB,cAAyB;AAElB,MAAM,mCAAmC,qBAAO;AAAA,EAC9C,YAAoB,gBAAyD;AAClF,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM;AAAA,MACJ,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AANwB;AAAA,EAO3B;AAAA,EAEA,MAAa,aAAa;AACxB,QAAI,CAAC,KAAK,gBAAgB;AACxB,aAAO;AAAA,QACL;AAAA,QACA;AAAA,MACF,EAAE,KAAK,IAAI;AAAA,IACb;AACA,eAAO,6CAA0B,KAAK,eAAe,QAAQ,KAAK,UAAU;AAAA,EAC9E;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/code-generation/integration-implementation/integration-typings/configurations-module.js
DELETED
|
@@ -1,70 +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 configurations_module_exports = {};
|
|
30
|
-
__export(configurations_module_exports, {
|
|
31
|
-
ConfigurationModule: () => ConfigurationModule,
|
|
32
|
-
ConfigurationsModule: () => ConfigurationsModule
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(configurations_module_exports);
|
|
35
|
-
var import_generators = require("../../generators");
|
|
36
|
-
var import_module = require("../../module");
|
|
37
|
-
var strings = __toESM(require("../../strings"));
|
|
38
|
-
class ConfigurationModule extends import_module.Module {
|
|
39
|
-
constructor(name, _configuration) {
|
|
40
|
-
const configurationName = name;
|
|
41
|
-
const exportName = strings.typeName(`${configurationName}Config`);
|
|
42
|
-
super({
|
|
43
|
-
path: `${name}.ts`,
|
|
44
|
-
exportName
|
|
45
|
-
});
|
|
46
|
-
this._configuration = _configuration;
|
|
47
|
-
}
|
|
48
|
-
async getContent() {
|
|
49
|
-
const { schema } = this._configuration;
|
|
50
|
-
if (!schema) {
|
|
51
|
-
return `export type ${this.exportName} = Record<string, never>;`;
|
|
52
|
-
}
|
|
53
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(schema, this.exportName);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
class ConfigurationsModule extends import_module.ReExportTypeModule {
|
|
57
|
-
constructor(configurations) {
|
|
58
|
-
super({ exportName: strings.typeName("configurations") });
|
|
59
|
-
for (const [configurationName, configuration] of Object.entries(configurations)) {
|
|
60
|
-
const module2 = new ConfigurationModule(configurationName, configuration);
|
|
61
|
-
this.pushDep(module2);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
-
0 && (module.exports = {
|
|
67
|
-
ConfigurationModule,
|
|
68
|
-
ConfigurationsModule
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=configurations-module.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/code-generation/integration-implementation/integration-typings/configurations-module.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\n\nexport class ConfigurationModule extends Module {\n public constructor(name: string, private _configuration: sdk.ConfigurationDefinition) {\n const configurationName = name\n const exportName = strings.typeName(`${configurationName}Config`)\n super({\n path: `${name}.ts`,\n exportName,\n })\n }\n\n public async getContent() {\n const { schema } = this._configuration\n if (!schema) {\n return `export type ${this.exportName} = Record<string, never>;`\n }\n return zuiSchemaToTypeScriptType(schema, this.exportName)\n }\n}\n\nexport class ConfigurationsModule extends ReExportTypeModule {\n public constructor(configurations: Record<string, sdk.ConfigurationDefinition>) {\n super({ exportName: strings.typeName('configurations') })\n for (const [configurationName, configuration] of Object.entries(configurations)) {\n const module = new ConfigurationModule(configurationName, configuration)\n this.pushDep(module)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAA0C;AAC1C,oBAA2C;AAC3C,cAAyB;AAElB,MAAM,4BAA4B,qBAAO;AAAA,EACvC,YAAY,MAAsB,gBAA6C;AACpF,UAAM,oBAAoB;AAC1B,UAAM,aAAa,QAAQ,SAAS,GAAG,yBAAyB;AAChE,UAAM;AAAA,MACJ,MAAM,GAAG;AAAA,MACT;AAAA,IACF,CAAC;AANsC;AAAA,EAOzC;AAAA,EAEA,MAAa,aAAa;AACxB,UAAM,EAAE,OAAO,IAAI,KAAK;AACxB,QAAI,CAAC,QAAQ;AACX,aAAO,eAAe,KAAK;AAAA,IAC7B;AACA,eAAO,6CAA0B,QAAQ,KAAK,UAAU;AAAA,EAC1D;AACF;AAEO,MAAM,6BAA6B,iCAAmB;AAAA,EACpD,YAAY,gBAA6D;AAC9E,UAAM,EAAE,YAAY,QAAQ,SAAS,gBAAgB,EAAE,CAAC;AACxD,eAAW,CAAC,mBAAmB,aAAa,KAAK,OAAO,QAAQ,cAAc,GAAG;AAC/E,YAAMA,UAAS,IAAI,oBAAoB,mBAAmB,aAAa;AACvE,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;",
|
|
6
|
-
"names": ["module"]
|
|
7
|
-
}
|
package/dist/code-generation/integration-implementation/integration-typings/entities-module.js
DELETED
|
@@ -1,63 +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 entities_module_exports = {};
|
|
30
|
-
__export(entities_module_exports, {
|
|
31
|
-
EntitiesModule: () => EntitiesModule,
|
|
32
|
-
EntityModule: () => EntityModule
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(entities_module_exports);
|
|
35
|
-
var import_generators = require("../../generators");
|
|
36
|
-
var import_module = require("../../module");
|
|
37
|
-
var strings = __toESM(require("../../strings"));
|
|
38
|
-
class EntityModule extends import_module.Module {
|
|
39
|
-
constructor(name, _entity) {
|
|
40
|
-
const entityName = name;
|
|
41
|
-
const exportName = strings.typeName(entityName);
|
|
42
|
-
super({ path: `${name}.ts`, exportName });
|
|
43
|
-
this._entity = _entity;
|
|
44
|
-
}
|
|
45
|
-
async getContent() {
|
|
46
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(this._entity.schema, this.exportName);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
class EntitiesModule extends import_module.ReExportTypeModule {
|
|
50
|
-
constructor(entities) {
|
|
51
|
-
super({ exportName: strings.typeName("entities") });
|
|
52
|
-
for (const [entityName, entity] of Object.entries(entities)) {
|
|
53
|
-
const module2 = new EntityModule(entityName, entity);
|
|
54
|
-
this.pushDep(module2);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
-
0 && (module.exports = {
|
|
60
|
-
EntitiesModule,
|
|
61
|
-
EntityModule
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=entities-module.js.map
|
package/dist/code-generation/integration-implementation/integration-typings/entities-module.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/code-generation/integration-implementation/integration-typings/entities-module.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\n\nexport class EntityModule extends Module {\n public constructor(name: string, private _entity: sdk.EntityDefinition) {\n const entityName = name\n const exportName = strings.typeName(entityName)\n super({ path: `${name}.ts`, exportName })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._entity.schema, this.exportName)\n }\n}\n\nexport class EntitiesModule extends ReExportTypeModule {\n public constructor(entities: Record<string, sdk.EntityDefinition>) {\n super({ exportName: strings.typeName('entities') })\n\n for (const [entityName, entity] of Object.entries(entities)) {\n const module = new EntityModule(entityName, entity)\n this.pushDep(module)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAA0C;AAC1C,oBAA2C;AAC3C,cAAyB;AAElB,MAAM,qBAAqB,qBAAO;AAAA,EAChC,YAAY,MAAsB,SAA+B;AACtE,UAAM,aAAa;AACnB,UAAM,aAAa,QAAQ,SAAS,UAAU;AAC9C,UAAM,EAAE,MAAM,GAAG,WAAW,WAAW,CAAC;AAHD;AAAA,EAIzC;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,QAAQ,QAAQ,KAAK,UAAU;AAAA,EACvE;AACF;AAEO,MAAM,uBAAuB,iCAAmB;AAAA,EAC9C,YAAY,UAAgD;AACjE,UAAM,EAAE,YAAY,QAAQ,SAAS,UAAU,EAAE,CAAC;AAElD,eAAW,CAAC,YAAY,MAAM,KAAK,OAAO,QAAQ,QAAQ,GAAG;AAC3D,YAAMA,UAAS,IAAI,aAAa,YAAY,MAAM;AAClD,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;",
|
|
6
|
-
"names": ["module"]
|
|
7
|
-
}
|
package/dist/code-generation/integration-implementation/integration-typings/events-module.js
DELETED
|
@@ -1,63 +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 events_module_exports = {};
|
|
30
|
-
__export(events_module_exports, {
|
|
31
|
-
EventModule: () => EventModule,
|
|
32
|
-
EventsModule: () => EventsModule
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(events_module_exports);
|
|
35
|
-
var import_generators = require("../../generators");
|
|
36
|
-
var import_module = require("../../module");
|
|
37
|
-
var strings = __toESM(require("../../strings"));
|
|
38
|
-
class EventModule extends import_module.Module {
|
|
39
|
-
constructor(name, _event) {
|
|
40
|
-
const eventName = name;
|
|
41
|
-
const exportName = strings.typeName(eventName);
|
|
42
|
-
super({ path: `${name}.ts`, exportName });
|
|
43
|
-
this._event = _event;
|
|
44
|
-
}
|
|
45
|
-
async getContent() {
|
|
46
|
-
return (0, import_generators.zuiSchemaToTypeScriptType)(this._event.schema, this.exportName);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
class EventsModule extends import_module.ReExportTypeModule {
|
|
50
|
-
constructor(events) {
|
|
51
|
-
super({ exportName: strings.typeName("events") });
|
|
52
|
-
for (const [eventName, event] of Object.entries(events)) {
|
|
53
|
-
const module2 = new EventModule(eventName, event);
|
|
54
|
-
this.pushDep(module2);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
-
0 && (module.exports = {
|
|
60
|
-
EventModule,
|
|
61
|
-
EventsModule
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=events-module.js.map
|
package/dist/code-generation/integration-implementation/integration-typings/events-module.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/code-generation/integration-implementation/integration-typings/events-module.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\n\nexport class EventModule extends Module {\n public constructor(name: string, private _event: sdk.EventDefinition) {\n const eventName = name\n const exportName = strings.typeName(eventName)\n super({ path: `${name}.ts`, exportName })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._event.schema, this.exportName)\n }\n}\n\nexport class EventsModule extends ReExportTypeModule {\n public constructor(events: Record<string, sdk.EventDefinition>) {\n super({ exportName: strings.typeName('events') })\n for (const [eventName, event] of Object.entries(events)) {\n const module = new EventModule(eventName, event)\n this.pushDep(module)\n }\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAA0C;AAC1C,oBAA2C;AAC3C,cAAyB;AAElB,MAAM,oBAAoB,qBAAO;AAAA,EAC/B,YAAY,MAAsB,QAA6B;AACpE,UAAM,YAAY;AAClB,UAAM,aAAa,QAAQ,SAAS,SAAS;AAC7C,UAAM,EAAE,MAAM,GAAG,WAAW,WAAW,CAAC;AAHD;AAAA,EAIzC;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,OAAO,QAAQ,KAAK,UAAU;AAAA,EACtE;AACF;AAEO,MAAM,qBAAqB,iCAAmB;AAAA,EAC5C,YAAY,QAA6C;AAC9D,UAAM,EAAE,YAAY,QAAQ,SAAS,QAAQ,EAAE,CAAC;AAChD,eAAW,CAAC,WAAW,KAAK,KAAK,OAAO,QAAQ,MAAM,GAAG;AACvD,YAAMA,UAAS,IAAI,YAAY,WAAW,KAAK;AAC/C,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;",
|
|
6
|
-
"names": ["module"]
|
|
7
|
-
}
|
|
@@ -1,128 +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 integration_typings_exports = {};
|
|
20
|
-
__export(integration_typings_exports, {
|
|
21
|
-
IntegrationTypingsModule: () => IntegrationTypingsModule
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(integration_typings_exports);
|
|
24
|
-
var import_consts = require("../../consts");
|
|
25
|
-
var import_generators = require("../../generators");
|
|
26
|
-
var import_module = require("../../module");
|
|
27
|
-
var import_actions_module = require("./actions-module");
|
|
28
|
-
var import_channels_module = require("./channels-module");
|
|
29
|
-
var import_configuration_module = require("./configuration-module");
|
|
30
|
-
var import_configurations_module = require("./configurations-module");
|
|
31
|
-
var import_entities_module = require("./entities-module");
|
|
32
|
-
var import_events_module = require("./events-module");
|
|
33
|
-
var import_states_module = require("./states-module");
|
|
34
|
-
class IntegrationTypingsModule extends import_module.Module {
|
|
35
|
-
constructor(_integration) {
|
|
36
|
-
super({
|
|
37
|
-
path: import_consts.INDEX_FILE,
|
|
38
|
-
exportName: "TIntegration"
|
|
39
|
-
});
|
|
40
|
-
this._integration = _integration;
|
|
41
|
-
const defaultConfigModule = new import_configuration_module.DefaultConfigurationModule(_integration.configuration);
|
|
42
|
-
defaultConfigModule.unshift("configuration");
|
|
43
|
-
const configurationsModule = new import_configurations_module.ConfigurationsModule(_integration.configurations ?? {});
|
|
44
|
-
configurationsModule.unshift("configurations");
|
|
45
|
-
const actionsModule = new import_actions_module.ActionsModule(_integration.actions ?? {});
|
|
46
|
-
actionsModule.unshift("actions");
|
|
47
|
-
const channelsModule = new import_channels_module.ChannelsModule(_integration.channels ?? {});
|
|
48
|
-
channelsModule.unshift("channels");
|
|
49
|
-
const eventsModule = new import_events_module.EventsModule(_integration.events ?? {});
|
|
50
|
-
eventsModule.unshift("events");
|
|
51
|
-
const statesModule = new import_states_module.StatesModule(_integration.states ?? {});
|
|
52
|
-
statesModule.unshift("states");
|
|
53
|
-
const entitiesModule = new import_entities_module.EntitiesModule(_integration.entities ?? {});
|
|
54
|
-
entitiesModule.unshift("entities");
|
|
55
|
-
this._dependencies = {
|
|
56
|
-
defaultConfigModule,
|
|
57
|
-
configurationsModule,
|
|
58
|
-
actionsModule,
|
|
59
|
-
channelsModule,
|
|
60
|
-
eventsModule,
|
|
61
|
-
statesModule,
|
|
62
|
-
entitiesModule
|
|
63
|
-
};
|
|
64
|
-
for (const dep of Object.values(this._dependencies)) {
|
|
65
|
-
this.pushDep(dep);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
_dependencies;
|
|
69
|
-
async getContent() {
|
|
70
|
-
let content = "";
|
|
71
|
-
const {
|
|
72
|
-
defaultConfigModule,
|
|
73
|
-
configurationsModule,
|
|
74
|
-
actionsModule,
|
|
75
|
-
channelsModule,
|
|
76
|
-
eventsModule,
|
|
77
|
-
statesModule,
|
|
78
|
-
entitiesModule
|
|
79
|
-
} = this._dependencies;
|
|
80
|
-
const defaultConfigImport = defaultConfigModule.import(this);
|
|
81
|
-
const configurationsImport = configurationsModule.import(this);
|
|
82
|
-
const actionsImport = actionsModule.import(this);
|
|
83
|
-
const channelsImport = channelsModule.import(this);
|
|
84
|
-
const eventsImport = eventsModule.import(this);
|
|
85
|
-
const statesImport = statesModule.import(this);
|
|
86
|
-
const entitiesImport = entitiesModule.import(this);
|
|
87
|
-
const user = {
|
|
88
|
-
tags: this._integration.user?.tags ?? {},
|
|
89
|
-
creation: this._integration.user?.creation ?? { enabled: false, requiredTags: [] }
|
|
90
|
-
};
|
|
91
|
-
content += [
|
|
92
|
-
import_consts.GENERATED_HEADER,
|
|
93
|
-
`import * as ${defaultConfigModule.name} from "./${defaultConfigImport}"`,
|
|
94
|
-
`import * as ${configurationsModule.name} from "./${configurationsImport}"`,
|
|
95
|
-
`import * as ${actionsModule.name} from "./${actionsImport}"`,
|
|
96
|
-
`import * as ${channelsModule.name} from "./${channelsImport}"`,
|
|
97
|
-
`import * as ${eventsModule.name} from "./${eventsImport}"`,
|
|
98
|
-
`import * as ${statesModule.name} from "./${statesImport}"`,
|
|
99
|
-
`import * as ${entitiesModule.name} from "./${entitiesImport}"`,
|
|
100
|
-
`export * as ${defaultConfigModule.name} from "./${defaultConfigImport}"`,
|
|
101
|
-
`export * as ${configurationsModule.name} from "./${configurationsImport}"`,
|
|
102
|
-
`export * as ${actionsModule.name} from "./${actionsImport}"`,
|
|
103
|
-
`export * as ${channelsModule.name} from "./${channelsImport}"`,
|
|
104
|
-
`export * as ${eventsModule.name} from "./${eventsImport}"`,
|
|
105
|
-
`export * as ${statesModule.name} from "./${statesImport}"`,
|
|
106
|
-
`export * as ${entitiesModule.name} from "./${entitiesImport}"`,
|
|
107
|
-
"",
|
|
108
|
-
"export type TIntegration = {",
|
|
109
|
-
` name: "${this._integration.name}"`,
|
|
110
|
-
` version: "${this._integration.version}"`,
|
|
111
|
-
` user: ${(0, import_generators.stringifySingleLine)(user)}`,
|
|
112
|
-
` configuration: ${defaultConfigModule.name}.${defaultConfigModule.exportName}`,
|
|
113
|
-
` configurations: ${configurationsModule.name}.${configurationsModule.exportName}`,
|
|
114
|
-
` actions: ${actionsModule.name}.${actionsModule.exportName}`,
|
|
115
|
-
` channels: ${channelsModule.name}.${channelsModule.exportName}`,
|
|
116
|
-
` events: ${eventsModule.name}.${eventsModule.exportName}`,
|
|
117
|
-
` states: ${statesModule.name}.${statesModule.exportName}`,
|
|
118
|
-
` entities: ${entitiesModule.name}.${entitiesModule.exportName}`,
|
|
119
|
-
"}"
|
|
120
|
-
].join("\n");
|
|
121
|
-
return content;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
125
|
-
0 && (module.exports = {
|
|
126
|
-
IntegrationTypingsModule
|
|
127
|
-
});
|
|
128
|
-
//# sourceMappingURL=index.js.map
|