chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:48 +08:00
commit 77bb5bf71f
3762 changed files with 353249 additions and 0 deletions
@@ -0,0 +1,27 @@
import * as sdk from '@botpress/sdk'
import integrationWithEntityDependency from './bp_modules/integration-with-entity-dependency'
import pluginWithInterfaceDependency from './bp_modules/plugin-with-interface-dependency'
export default new sdk.BotDefinition({})
.addIntegration(integrationWithEntityDependency, {
alias: 'integration-with-entity-dep',
enabled: true,
configuration: {},
})
.addPlugin(pluginWithInterfaceDependency, {
alias: 'plugin-alias',
configuration: {
foo: 'bar',
item: {
id: 'foo',
name: 'Foo',
color: 'blue',
},
},
dependencies: {
'interface-alias': {
integrationAlias: 'integration-with-entity-dep',
integrationInterfaceAlias: Object.keys(integrationWithEntityDependency.definition.interfaces)[0]!,
},
},
})
@@ -0,0 +1,18 @@
{
"name": "cli-fixtures-bot-with-plugin-dependency",
"scripts": {
"check:type": "tsc --noEmit"
},
"private": true,
"dependencies": {
"@botpress/sdk": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.16.4",
"typescript": "^5.6.3"
},
"bpDependencies": {
"integration-with-entity-dependency": "../../integrations/integration-with-entity-dependency",
"plugin-with-interface-dependency": "../../plugins/plugin-with-interface-dependency"
}
}
@@ -0,0 +1,7 @@
import * as bp from '.botpress'
const bot = new bp.Bot({
actions: {},
})
export default bot
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedParameters": true,
"target": "es2017",
"paths": { "*": ["./*"] },
"outDir": "dist",
"checkJs": false,
"incremental": true,
"exactOptionalPropertyTypes": false,
"resolveJsonModule": true,
"noPropertyAccessFromIndexSignature": false,
"noUnusedLocals": false
},
"include": [".botpress/**/*", "src/**/*", "*.ts", "*.json"]
}
@@ -0,0 +1,17 @@
import * as sdk from '@botpress/sdk'
import interfaceWithEntities from './bp_modules/interface-with-entities'
import * as packageJson from './package.json'
export default new sdk.IntegrationDefinition({
name: packageJson.integrationName,
version: '1.0.0',
entities: {
customItem: {
schema: sdk.z.object({
id: sdk.z.string(),
name: sdk.z.string().optional(),
color: sdk.z.string().optional(),
}),
},
},
}).extend(interfaceWithEntities, ({ entities }) => ({ entities: { item: entities.customItem } }))
@@ -0,0 +1,18 @@
{
"name": "cli-fixtures-integration-with-entity-dependency",
"integrationName": "cli-fixtures-integration-with-entity-dependency",
"scripts": {
"check:type": "tsc --noEmit"
},
"private": true,
"dependencies": {
"@botpress/sdk": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.16.4",
"typescript": "^5.6.3"
},
"bpDependencies": {
"interface-with-entities": "../../interfaces/interface-with-entities"
}
}
@@ -0,0 +1,19 @@
import * as bp from '.botpress'
export default new bp.Integration({
register() {
throw new Error('Not implemented')
},
unregister() {
throw new Error('Not implemented')
},
actions: {
manipulateItem() {
throw new Error('Not implemented')
},
},
channels: {},
handler() {
throw new Error('Not implemented')
},
})
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedParameters": true,
"target": "es2017",
"paths": { "*": ["./*"] },
"outDir": "dist",
"checkJs": false,
"incremental": true,
"exactOptionalPropertyTypes": false,
"resolveJsonModule": true,
"noPropertyAccessFromIndexSignature": false,
"noUnusedLocals": false
},
"include": [".botpress/**/*", "src/**/*", "*.ts", "*.json"]
}
@@ -0,0 +1,38 @@
import * as sdk from '@botpress/sdk'
import * as packageJson from './package.json'
export default new sdk.InterfaceDefinition({
name: packageJson.interfaceName,
version: '1.0.0',
entities: {
item: {
schema: sdk.z.object({
id: sdk.z.string(),
name: sdk.z.string().optional(),
}),
},
},
actions: {
manipulateItem: {
input: {
schema: (entities) =>
sdk.z.object({
item: entities.item,
foo: sdk.z.number(),
}),
},
output: {
schema: () => sdk.z.object({}),
},
},
},
events: {
somethingHappened: {
schema: (entities) =>
sdk.z.object({
item: entities.item,
message: sdk.z.string(),
}),
},
},
})
@@ -0,0 +1,15 @@
{
"name": "cli-fixtures-interface-with-entities",
"interfaceName": "cli-fixtures-interface-with-entities",
"scripts": {
"check:type": "tsc --noEmit"
},
"private": true,
"dependencies": {
"@botpress/sdk": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.16.4",
"typescript": "^5.6.3"
}
}
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedParameters": true,
"target": "es2017",
"paths": { "*": ["./*"] },
"outDir": "dist",
"checkJs": false,
"incremental": true,
"exactOptionalPropertyTypes": false,
"resolveJsonModule": true,
"noPropertyAccessFromIndexSignature": false,
"noUnusedLocals": false
},
"include": [".botpress/**/*", "*.ts", "*.json"]
}
@@ -0,0 +1,18 @@
{
"name": "cli-fixtures-plugin-with-interface-dependency",
"pluginName": "cli-fixtures-plugin-with-interface-dependency",
"scripts": {
"check:type": "tsc --noEmit"
},
"private": true,
"dependencies": {
"@botpress/sdk": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.16.4",
"typescript": "^5.6.3"
},
"bpDependencies": {
"interface-with-entities": "../../interfaces/interface-with-entities"
}
}
@@ -0,0 +1,32 @@
import * as sdk from '@botpress/sdk'
import interfaceWithEntities from './bp_modules/interface-with-entities'
import * as packageJson from './package.json'
export default new sdk.PluginDefinition({
name: packageJson.pluginName,
version: '1.0.0',
interfaces: {
'interface-alias': interfaceWithEntities,
},
configuration: {
schema: ({ entities }) =>
sdk.z.object({
item: entities['interface-alias'].item,
foo: sdk.z.literal('bar'),
}),
},
actions: {
doSomething: {
input: {
schema: ({ entities }) =>
sdk.z.object({
item: entities['interface-alias'].item,
bar: sdk.z.number(),
}),
},
output: {
schema: sdk.z.object({}),
},
},
},
})
@@ -0,0 +1,7 @@
import * as bp from '.botpress'
const plugin = new bp.Plugin({
actions: {},
})
export default plugin
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedParameters": true,
"target": "es2017",
"paths": { "*": ["./*"] },
"outDir": "dist",
"checkJs": false,
"incremental": true,
"exactOptionalPropertyTypes": false,
"resolveJsonModule": true,
"noPropertyAccessFromIndexSignature": false,
"noUnusedLocals": false
},
"include": [".botpress/**/*", "src/**/*", "*.ts", "*.json"]
}