@botpress/cli 0.6.13 → 0.6.15
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/index.ts
CHANGED
|
@@ -8,8 +8,6 @@ import defaults from '../defaults'
|
|
|
8
8
|
import { Test } from '../typings'
|
|
9
9
|
import * as utils from '../utils'
|
|
10
10
|
|
|
11
|
-
const HANDLE = 'botpress'
|
|
12
|
-
|
|
13
11
|
const fetchIntegration = async (client: Client, integrationName: string): Promise<ApiIntegration | undefined> => {
|
|
14
12
|
const integrations = await fetchAllIntegrations(client)
|
|
15
13
|
return integrations.find(({ name }) => name === integrationName)
|
|
@@ -17,13 +15,14 @@ const fetchIntegration = async (client: Client, integrationName: string): Promis
|
|
|
17
15
|
|
|
18
16
|
export const createDeployIntegration: Test = {
|
|
19
17
|
name: 'cli should allow creating, building, deploying and mannaging an integration',
|
|
20
|
-
handler: async ({ tmpDir, dependencies, logger, ...creds }) => {
|
|
18
|
+
handler: async ({ tmpDir, dependencies, workspaceHandle, logger, ...creds }) => {
|
|
21
19
|
const botpressHomeDir = pathlib.join(tmpDir, '.botpresshome')
|
|
22
20
|
const baseDir = pathlib.join(tmpDir, 'integrations')
|
|
23
21
|
|
|
24
22
|
const integrationSuffix = uuid.v4().replace(/-/g, '')
|
|
25
|
-
const
|
|
26
|
-
const
|
|
23
|
+
const name = `myintegration${integrationSuffix}`
|
|
24
|
+
const integrationName = `${workspaceHandle}/${name}`
|
|
25
|
+
const integrationDirName = `${workspaceHandle}-${name}`
|
|
27
26
|
const integrationDir = pathlib.join(baseDir, integrationDirName)
|
|
28
27
|
|
|
29
28
|
const argv = {
|
|
@@ -43,8 +42,6 @@ export const createDeployIntegration: Test = {
|
|
|
43
42
|
await impl.build({ ...argv, workDir: integrationDir }).then(utils.handleExitCode)
|
|
44
43
|
await impl.login({ ...argv }).then(utils.handleExitCode)
|
|
45
44
|
|
|
46
|
-
await client.updateWorkspace({ id: creds.workspaceId, handle: HANDLE })
|
|
47
|
-
|
|
48
45
|
await impl
|
|
49
46
|
.deploy({ ...argv, createNewBot: undefined, botId: undefined, workDir: integrationDir })
|
|
50
47
|
.then(utils.handleExitCode)
|
|
@@ -33,11 +33,15 @@ const appendSecretDefinition = (originalTsContent: string, secrets: SecretDef):
|
|
|
33
33
|
|
|
34
34
|
export const requiredSecrets: Test = {
|
|
35
35
|
name: 'cli should require required secrets',
|
|
36
|
-
handler: async ({ tmpDir, dependencies, ...creds }) => {
|
|
36
|
+
handler: async ({ tmpDir, workspaceHandle, dependencies, ...creds }) => {
|
|
37
37
|
const botpressHomeDir = pathlib.join(tmpDir, '.botpresshome')
|
|
38
38
|
const baseDir = pathlib.join(tmpDir, 'integrations')
|
|
39
|
-
|
|
40
|
-
const
|
|
39
|
+
|
|
40
|
+
const integrationSuffix = uuid.v4().replace(/-/g, '')
|
|
41
|
+
const name = `myintegration${integrationSuffix}`
|
|
42
|
+
const integrationName = `${workspaceHandle}/${name}`
|
|
43
|
+
const integrationDirName = `${workspaceHandle}-${name}`
|
|
44
|
+
const integrationDir = pathlib.join(baseDir, integrationDirName)
|
|
41
45
|
|
|
42
46
|
const definitionPath = pathlib.join(integrationDir, 'integration.definition.ts')
|
|
43
47
|
|
package/e2e/typings.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run bundle && pnpm run template:gen",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"main": "dist/index.js",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@botpress/client": "0.
|
|
23
|
+
"@botpress/client": "0.13.1",
|
|
24
24
|
"@bpinternal/const": "^0.0.20",
|
|
25
25
|
"@bpinternal/tunnel": "^0.1.1",
|
|
26
26
|
"@bpinternal/yargs-extra": "^0.0.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"zod": "^3.20.6"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@botpress/sdk": "0.6.
|
|
52
|
+
"@botpress/sdk": "0.6.14",
|
|
53
53
|
"@bpinternal/log4bot": "^0.0.4",
|
|
54
54
|
"@types/bluebird": "^3.5.38",
|
|
55
55
|
"@types/json-schema": "^7.0.11",
|