@botpress/sdk 6.4.0 → 6.4.2

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.
@@ -1,20 +1,20 @@
1
1
 
2
- > @botpress/sdk@6.4.0 build /home/runner/work/botpress/botpress/packages/sdk
2
+ > @botpress/sdk@6.4.2 build /home/runner/work/botpress/botpress/packages/sdk
3
3
  > pnpm build:type && pnpm build:node && pnpm build:browser
4
4
 
5
5
 
6
- > @botpress/sdk@6.4.0 build:type /home/runner/work/botpress/botpress/packages/sdk
6
+ > @botpress/sdk@6.4.2 build:type /home/runner/work/botpress/botpress/packages/sdk
7
7
  > tsc -p ./tsconfig.package.json --emitDeclarationOnly --declaration
8
8
 
9
9
 
10
- > @botpress/sdk@6.4.0 build:node /home/runner/work/botpress/botpress/packages/sdk
10
+ > @botpress/sdk@6.4.2 build:node /home/runner/work/botpress/botpress/packages/sdk
11
11
  > ts-node -T ./build.ts --node
12
12
 
13
13
  Done
14
14
 
15
- > @botpress/sdk@6.4.0 build:browser /home/runner/work/botpress/botpress/packages/sdk
15
+ > @botpress/sdk@6.4.2 build:browser /home/runner/work/botpress/botpress/packages/sdk
16
16
  > ts-node -T ./build.ts --browser
17
17
 
18
- (node:3372) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
18
+ (node:3416) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
19
19
  (Use `node --trace-deprecation ...` to show where the warning was created)
20
20
  Done
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Thrown by SDK definition classes (BotDefinition, IntegrationDefinition, PluginDefinition, etc.)
3
+ * for intentional validation errors whose message is already clear.
4
+ *
5
+ * The CLI detects this class to suppress the "Offending code:" section that it normally
6
+ * appends to errors thrown during definition file evaluation.
7
+ */
8
+ export declare class DefinitionError extends Error {
9
+ /** @internal Marker used by {@link isDefinitionError} to survive esbuild bundle boundaries. */
10
+ readonly __IS_SDK_ERROR__: true;
11
+ readonly type: "definition_error";
12
+ }
13
+ /**
14
+ * Type guard to detect {@link DefinitionError} across esbuild bundle boundaries.
15
+ *
16
+ * Tries `instanceof` first (same bundle), then falls back to the `__IS_SDK_ERROR__` marker
17
+ * and `type` field for cross-bundle cases where esbuild inlines a separate copy of the SDK class.
18
+ */
19
+ export declare const isDefinitionError: (error: unknown) => error is DefinitionError;