@botpress/cli 6.2.4 → 6.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +12 -12
- package/dist/utils/require-utils.js +4 -0
- package/dist/utils/require-utils.js.map +2 -2
- package/package.json +2 -2
- package/templates/empty-bot/package.json +1 -1
- package/templates/empty-integration/package.json +1 -1
- package/templates/empty-plugin/package.json +1 -1
- package/templates/hello-world/package.json +1 -1
- package/templates/webhook-message/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@6.2.
|
|
2
|
+
> @botpress/cli@6.2.6 build /home/runner/work/botpress/botpress/packages/cli
|
|
3
3
|
> pnpm run build:types && pnpm run bundle && pnpm run template:gen
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cli@6.2.
|
|
6
|
+
> @botpress/cli@6.2.6 build:types /home/runner/work/botpress/botpress/packages/cli
|
|
7
7
|
> tsc -p ./tsconfig.build.json
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/cli@6.2.
|
|
10
|
+
> @botpress/cli@6.2.6 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
11
11
|
> ts-node -T build.ts
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
> @botpress/cli@6.2.
|
|
14
|
+
> @botpress/cli@6.2.6 template:gen /home/runner/work/botpress/botpress/packages/cli
|
|
15
15
|
> pnpm -r --stream -F @bp-templates/* exec bp gen
|
|
16
16
|
|
|
17
|
-
🤖 Botpress CLI v6.2.
|
|
17
|
+
🤖 Botpress CLI v6.2.6
|
|
18
|
+
🤖 Botpress CLI v6.2.6
|
|
18
19
|
● Checking if cli is up to date
|
|
19
|
-
🤖 Botpress CLI v6.2.4
|
|
20
20
|
● Checking if cli is up to date
|
|
21
|
-
🤖 Botpress CLI v6.2.
|
|
21
|
+
🤖 Botpress CLI v6.2.6
|
|
22
22
|
● Checking if cli is up to date
|
|
23
|
-
🤖 Botpress CLI v6.2.
|
|
23
|
+
🤖 Botpress CLI v6.2.6
|
|
24
24
|
● Checking if cli is up to date
|
|
25
25
|
● Checking if sdk is up to date
|
|
26
26
|
● Checking if sdk is up to date
|
|
27
27
|
● Checking if sdk is up to date
|
|
28
28
|
● Checking if sdk is up to date
|
|
29
|
-
○ Generating typings for bot...
|
|
30
|
-
✓ Typings available at .botpress
|
|
31
|
-
|
|
32
29
|
○ Generating typings for integration empty-integration...
|
|
33
30
|
✓ Typings available at .botpress
|
|
34
31
|
|
|
35
32
|
○ Generating typings for plugin empty-plugin...
|
|
33
|
+
○ Generating typings for bot...
|
|
36
34
|
✓ Typings available at .botpress
|
|
37
35
|
|
|
38
36
|
○ Generating typings for integration hello-world...
|
|
39
37
|
✓ Typings available at .botpress
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
✓ Typings available at .botpress
|
|
40
|
+
|
|
41
|
+
🤖 Botpress CLI v6.2.6
|
|
42
42
|
● Checking if cli is up to date
|
|
43
43
|
● Checking if sdk is up to date
|
|
44
44
|
○ Generating typings for integration webhook-message...
|
|
@@ -32,6 +32,7 @@ __export(require_utils_exports, {
|
|
|
32
32
|
requireJsFile: () => requireJsFile
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(require_utils_exports);
|
|
35
|
+
var sdk = __toESM(require("@botpress/sdk"));
|
|
35
36
|
var import_module = __toESM(require("module"));
|
|
36
37
|
var import_path = __toESM(require("path"));
|
|
37
38
|
const requireJsFile = (path) => {
|
|
@@ -48,6 +49,9 @@ const requireJsCode = (code) => {
|
|
|
48
49
|
return m.exports;
|
|
49
50
|
} catch (thrown) {
|
|
50
51
|
const error = thrown instanceof Error ? thrown : new Error(`${thrown}`);
|
|
52
|
+
if (sdk.errors.isDefinitionError(thrown)) {
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
51
55
|
throw _injectStackTrace(error, code, filename);
|
|
52
56
|
}
|
|
53
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/require-utils.ts"],
|
|
4
|
-
"sourcesContent": ["import Module from 'module'\nimport pathlib from 'path'\n\nexport const requireJsFile = <T>(path: string): T => {\n return require(path)\n}\n\nexport const requireJsCode = <T>(code: string): T => {\n const filedir = 'tmp'\n const filename = `${Date.now()}.js`\n\n const fileid = pathlib.join(filedir, filename)\n\n const m = new Module(fileid)\n m.filename = filename\n\n try {\n // @ts-ignore\n m._compile(code, filename)\n return m.exports\n } catch (thrown: unknown) {\n const error = thrown instanceof Error ? thrown : new Error(`${thrown}`)\n throw _injectStackTrace(error, code, filename)\n }\n}\n\nconst STACK_TRACE_SURROUNDING_LINES = 3\n\nconst _injectStackTrace = (compileError: Error, code: string, filename: string): Error => {\n if (!compileError.stack || !compileError.stack.includes(`${filename}:`)) {\n return compileError\n }\n\n // Extract line and column from the stack trace:\n const [, locationInfo] = compileError.stack.split(`${filename}:`, 2)\n if (!locationInfo) {\n return compileError\n }\n\n const [lineNoStr, _rest] = locationInfo.split(':', 2)\n if (!lineNoStr || !_rest) {\n return compileError\n }\n\n const [columnStr] = _rest.split(')', 1)\n if (!columnStr) {\n return compileError\n }\n\n const lineNo = parseInt(lineNoStr)\n const column = parseInt(columnStr)\n\n // Build the stack trace:\n const allLines = code.split('\\n')\n const linesBefore = allLines.slice(Math.max(0, lineNo - 1 - STACK_TRACE_SURROUNDING_LINES), lineNo - 1)\n const offendingLine = allLines[lineNo - 1]\n const caretLine = ' '.repeat(column - 1) + '^'\n const linesAfter = allLines.slice(lineNo, Math.min(allLines.length, lineNo + STACK_TRACE_SURROUNDING_LINES))\n const stackTrace = [...linesBefore, offendingLine, caretLine, ...linesAfter].join('\\n')\n\n return new Error(`${compileError.message}\\n\\nOffending code:\\n\\n${stackTrace}`, { cause: compileError })\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;AACnB,kBAAoB;AAEb,MAAM,gBAAgB,CAAI,SAAoB;AACnD,SAAO,QAAQ,IAAI;AACrB;AAEO,MAAM,gBAAgB,CAAI,SAAoB;AACnD,QAAM,UAAU;AAChB,QAAM,WAAW,GAAG,KAAK,IAAI,CAAC;AAE9B,QAAM,SAAS,YAAAA,QAAQ,KAAK,SAAS,QAAQ;AAE7C,QAAM,IAAI,IAAI,cAAAC,QAAO,MAAM;AAC3B,IAAE,WAAW;AAEb,MAAI;AAEF,MAAE,SAAS,MAAM,QAAQ;AACzB,WAAO,EAAE;AAAA,EACX,SAAS,QAAiB;AACxB,UAAM,QAAQ,kBAAkB,QAAQ,SAAS,IAAI,MAAM,GAAG,MAAM,EAAE;
|
|
4
|
+
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport Module from 'module'\nimport pathlib from 'path'\n\nexport const requireJsFile = <T>(path: string): T => {\n return require(path)\n}\n\nexport const requireJsCode = <T>(code: string): T => {\n const filedir = 'tmp'\n const filename = `${Date.now()}.js`\n\n const fileid = pathlib.join(filedir, filename)\n\n const m = new Module(fileid)\n m.filename = filename\n\n try {\n // @ts-ignore\n m._compile(code, filename)\n return m.exports\n } catch (thrown: unknown) {\n const error = thrown instanceof Error ? thrown : new Error(`${thrown}`)\n // sdk.errors.isDefinitionError() handles cross-bundle detection: esbuild inlines a separate\n // copy of @botpress/sdk into the compiled definition artifact, so instanceof alone is\n // unreliable. See the isDefinitionError() docstring in the SDK for the full explanation.\n if (sdk.errors.isDefinitionError(thrown)) {\n throw error\n }\n throw _injectStackTrace(error, code, filename)\n }\n}\n\nconst STACK_TRACE_SURROUNDING_LINES = 3\n\nconst _injectStackTrace = (compileError: Error, code: string, filename: string): Error => {\n if (!compileError.stack || !compileError.stack.includes(`${filename}:`)) {\n return compileError\n }\n\n // Extract line and column from the stack trace:\n const [, locationInfo] = compileError.stack.split(`${filename}:`, 2)\n if (!locationInfo) {\n return compileError\n }\n\n const [lineNoStr, _rest] = locationInfo.split(':', 2)\n if (!lineNoStr || !_rest) {\n return compileError\n }\n\n const [columnStr] = _rest.split(')', 1)\n if (!columnStr) {\n return compileError\n }\n\n const lineNo = parseInt(lineNoStr)\n const column = parseInt(columnStr)\n\n // Build the stack trace:\n const allLines = code.split('\\n')\n const linesBefore = allLines.slice(Math.max(0, lineNo - 1 - STACK_TRACE_SURROUNDING_LINES), lineNo - 1)\n const offendingLine = allLines[lineNo - 1]\n const caretLine = ' '.repeat(column - 1) + '^'\n const linesAfter = allLines.slice(lineNo, Math.min(allLines.length, lineNo + STACK_TRACE_SURROUNDING_LINES))\n const stackTrace = [...linesBefore, offendingLine, caretLine, ...linesAfter].join('\\n')\n\n return new Error(`${compileError.message}\\n\\nOffending code:\\n\\n${stackTrace}`, { cause: compileError })\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAAqB;AACrB,oBAAmB;AACnB,kBAAoB;AAEb,MAAM,gBAAgB,CAAI,SAAoB;AACnD,SAAO,QAAQ,IAAI;AACrB;AAEO,MAAM,gBAAgB,CAAI,SAAoB;AACnD,QAAM,UAAU;AAChB,QAAM,WAAW,GAAG,KAAK,IAAI,CAAC;AAE9B,QAAM,SAAS,YAAAA,QAAQ,KAAK,SAAS,QAAQ;AAE7C,QAAM,IAAI,IAAI,cAAAC,QAAO,MAAM;AAC3B,IAAE,WAAW;AAEb,MAAI;AAEF,MAAE,SAAS,MAAM,QAAQ;AACzB,WAAO,EAAE;AAAA,EACX,SAAS,QAAiB;AACxB,UAAM,QAAQ,kBAAkB,QAAQ,SAAS,IAAI,MAAM,GAAG,MAAM,EAAE;AAItE,QAAI,IAAI,OAAO,kBAAkB,MAAM,GAAG;AACxC,YAAM;AAAA,IACR;AACA,UAAM,kBAAkB,OAAO,MAAM,QAAQ;AAAA,EAC/C;AAC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
+
"version": "6.2.6",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run build:types && pnpm run bundle && pnpm run template:gen",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@apidevtools/json-schema-ref-parser": "^11.7.0",
|
|
29
29
|
"@botpress/chat": "0.5.5",
|
|
30
30
|
"@botpress/client": "1.38.2",
|
|
31
|
-
"@botpress/sdk": "6.4.
|
|
31
|
+
"@botpress/sdk": "6.4.2",
|
|
32
32
|
"@bpinternal/const": "^0.1.0",
|
|
33
33
|
"@bpinternal/tunnel": "^0.1.1",
|
|
34
34
|
"@bpinternal/verel": "^0.2.0",
|