@seljs/runtime 1.3.0-beta.21 → 1.3.0-beta.27

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,6 +1,6 @@
1
1
  require("../_virtual/_rolldown/runtime.cjs");
2
- const require_errors = require("../errors/errors.cjs");
3
2
  require("../errors/index.cjs");
3
+ let _seljs_common = require("@seljs/common");
4
4
  let _marcbachmann_cel_js = require("@marcbachmann/cel-js");
5
5
  //#region src/environment/error-wrapper.ts
6
6
  /**
@@ -13,14 +13,14 @@ let _marcbachmann_cel_js = require("@marcbachmann/cel-js");
13
13
  * @returns The wrapped error.
14
14
  */
15
15
  const wrapError = (error) => {
16
- if (error instanceof require_errors.SELContractError) return error;
16
+ if (error instanceof _seljs_common.SELError) return error;
17
17
  if (error instanceof _marcbachmann_cel_js.EvaluationError) {
18
18
  const cause = error.cause;
19
- if (cause instanceof require_errors.SELContractError) return cause;
20
- return new require_errors.SELEvaluationError(error.message, { cause: error });
19
+ if (cause instanceof _seljs_common.SELError) return cause;
20
+ return new _seljs_common.SELEvaluationError(error.message, { cause: error });
21
21
  }
22
- if (error instanceof _marcbachmann_cel_js.ParseError) return new require_errors.SELEvaluationError(error.message, { cause: error });
23
- if (error instanceof _marcbachmann_cel_js.TypeError) return new require_errors.SELEvaluationError(error.message, { cause: error });
22
+ if (error instanceof _marcbachmann_cel_js.ParseError) return new _seljs_common.SELEvaluationError(error.message, { cause: error });
23
+ if (error instanceof _marcbachmann_cel_js.TypeError) return new _seljs_common.SELEvaluationError(error.message, { cause: error });
24
24
  if (error instanceof Error) return error;
25
25
  return new Error(String(error));
26
26
  };
@@ -1,5 +1,6 @@
1
- import { SELContractError, SELEvaluationError } from "../errors/errors.mjs";
1
+ import { SELEvaluationError } from "../errors/errors.mjs";
2
2
  import "../errors/index.mjs";
3
+ import { SELError } from "@seljs/common";
3
4
  import { EvaluationError, ParseError, TypeError } from "@marcbachmann/cel-js";
4
5
  //#region src/environment/error-wrapper.ts
5
6
  /**
@@ -12,10 +13,10 @@ import { EvaluationError, ParseError, TypeError } from "@marcbachmann/cel-js";
12
13
  * @returns The wrapped error.
13
14
  */
14
15
  const wrapError = (error) => {
15
- if (error instanceof SELContractError) return error;
16
+ if (error instanceof SELError) return error;
16
17
  if (error instanceof EvaluationError) {
17
18
  const cause = error.cause;
18
- if (cause instanceof SELContractError) return cause;
19
+ if (cause instanceof SELError) return cause;
19
20
  return new SELEvaluationError(error.message, { cause: error });
20
21
  }
21
22
  if (error instanceof ParseError) return new SELEvaluationError(error.message, { cause: error });
@@ -2,11 +2,6 @@ require("../_virtual/_rolldown/runtime.cjs");
2
2
  let _seljs_common = require("@seljs/common");
3
3
  //#region src/errors/errors.ts
4
4
  /**
5
- * Thrown when CEL expression evaluation fails.
6
- * Wraps cel-js EvaluationError with additional context.
7
- */
8
- var SELEvaluationError = class extends _seljs_common.SELError {};
9
- /**
10
5
  * Thrown when contract validation or execution fails.
11
6
  * Includes optional contract name and method name for context.
12
7
  */
@@ -84,5 +79,4 @@ exports.ExecutionLimitError = ExecutionLimitError;
84
79
  exports.MulticallBatchError = MulticallBatchError;
85
80
  exports.SELClientError = SELClientError;
86
81
  exports.SELContractError = SELContractError;
87
- exports.SELEvaluationError = SELEvaluationError;
88
82
  exports.SELLintError = SELLintError;
@@ -1,12 +1,7 @@
1
1
  import { SELDiagnostic } from "@seljs/checker";
2
- import { SELError } from "@seljs/common";
2
+ import { SELError, SELEvaluationError } from "@seljs/common";
3
3
 
4
4
  //#region src/errors/errors.d.ts
5
- /**
6
- * Thrown when CEL expression evaluation fails.
7
- * Wraps cel-js EvaluationError with additional context.
8
- */
9
- declare class SELEvaluationError extends SELError {}
10
5
  /**
11
6
  * Thrown when contract validation or execution fails.
12
7
  * Includes optional contract name and method name for context.
@@ -1,17 +1,12 @@
1
1
  import { SELDiagnostic } from "@seljs/checker";
2
- import { SELError } from "@seljs/common";
2
+ import { SELError as SELError$1, SELEvaluationError } from "@seljs/common";
3
3
 
4
4
  //#region src/errors/errors.d.ts
5
- /**
6
- * Thrown when CEL expression evaluation fails.
7
- * Wraps cel-js EvaluationError with additional context.
8
- */
9
- declare class SELEvaluationError extends SELError {}
10
5
  /**
11
6
  * Thrown when contract validation or execution fails.
12
7
  * Includes optional contract name and method name for context.
13
8
  */
14
- declare class SELContractError extends SELError {
9
+ declare class SELContractError extends SELError$1 {
15
10
  readonly contractName?: string;
16
11
  readonly methodName?: string;
17
12
  constructor(message: string, options?: {
@@ -24,7 +19,7 @@ declare class SELContractError extends SELError {
24
19
  * Thrown when a circular dependency is detected in the call dependency graph.
25
20
  * Indicates that call A depends on call B which depends on call A (directly or transitively).
26
21
  */
27
- declare class CircularDependencyError extends SELError {
22
+ declare class CircularDependencyError extends SELError$1 {
28
23
  readonly callIds: string[];
29
24
  constructor(message: string, options?: {
30
25
  cause?: unknown;
@@ -35,7 +30,7 @@ declare class CircularDependencyError extends SELError {
35
30
  * Thrown when execution limits are exceeded (maxRounds or maxCalls).
36
31
  * Prevents infinite loops and runaway execution.
37
32
  */
38
- declare class ExecutionLimitError extends SELError {
33
+ declare class ExecutionLimitError extends SELError$1 {
39
34
  readonly limitType: "maxRounds" | "maxCalls";
40
35
  readonly limit: number;
41
36
  readonly actual: number;
@@ -50,7 +45,7 @@ declare class ExecutionLimitError extends SELError {
50
45
  * Thrown when a Multicall3 batch execution fails.
51
46
  * Includes the failed call index and optional contract name/method name for context.
52
47
  */
53
- declare class MulticallBatchError extends SELError {
48
+ declare class MulticallBatchError extends SELError$1 {
54
49
  readonly failedCallIndex?: number;
55
50
  readonly contractName?: string;
56
51
  readonly methodName?: string;
@@ -64,18 +59,18 @@ declare class MulticallBatchError extends SELError {
64
59
  /**
65
60
  * Thrown when the provided client fails validation or is misconfigured.
66
61
  */
67
- declare class SELClientError extends SELError {
62
+ declare class SELClientError extends SELError$1 {
68
63
  readonly name = "SELClientError";
69
64
  }
70
65
  /**
71
66
  * Thrown when lint rules with error severity detect violations.
72
67
  * Contains the diagnostics that caused the failure.
73
68
  */
74
- declare class SELLintError extends SELError {
69
+ declare class SELLintError extends SELError$1 {
75
70
  readonly diagnostics: SELDiagnostic[];
76
71
  constructor(diagnostics: SELDiagnostic[], options?: {
77
72
  cause?: unknown;
78
73
  });
79
74
  }
80
75
  //#endregion
81
- export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError };
76
+ export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError$1 as SELError, SELEvaluationError, SELLintError };
@@ -1,15 +1,10 @@
1
- import { SELError } from "@seljs/common";
1
+ import { SELError as SELError$1, SELEvaluationError } from "@seljs/common";
2
2
  //#region src/errors/errors.ts
3
3
  /**
4
- * Thrown when CEL expression evaluation fails.
5
- * Wraps cel-js EvaluationError with additional context.
6
- */
7
- var SELEvaluationError = class extends SELError {};
8
- /**
9
4
  * Thrown when contract validation or execution fails.
10
5
  * Includes optional contract name and method name for context.
11
6
  */
12
- var SELContractError = class extends SELError {
7
+ var SELContractError = class extends SELError$1 {
13
8
  contractName;
14
9
  methodName;
15
10
  constructor(message, options) {
@@ -22,7 +17,7 @@ var SELContractError = class extends SELError {
22
17
  * Thrown when a circular dependency is detected in the call dependency graph.
23
18
  * Indicates that call A depends on call B which depends on call A (directly or transitively).
24
19
  */
25
- var CircularDependencyError = class extends SELError {
20
+ var CircularDependencyError = class extends SELError$1 {
26
21
  callIds;
27
22
  constructor(message, options) {
28
23
  super(message, { cause: options?.cause });
@@ -33,7 +28,7 @@ var CircularDependencyError = class extends SELError {
33
28
  * Thrown when execution limits are exceeded (maxRounds or maxCalls).
34
29
  * Prevents infinite loops and runaway execution.
35
30
  */
36
- var ExecutionLimitError = class extends SELError {
31
+ var ExecutionLimitError = class extends SELError$1 {
37
32
  limitType;
38
33
  limit;
39
34
  actual;
@@ -48,7 +43,7 @@ var ExecutionLimitError = class extends SELError {
48
43
  * Thrown when a Multicall3 batch execution fails.
49
44
  * Includes the failed call index and optional contract name/method name for context.
50
45
  */
51
- var MulticallBatchError = class extends SELError {
46
+ var MulticallBatchError = class extends SELError$1 {
52
47
  failedCallIndex;
53
48
  contractName;
54
49
  methodName;
@@ -62,14 +57,14 @@ var MulticallBatchError = class extends SELError {
62
57
  /**
63
58
  * Thrown when the provided client fails validation or is misconfigured.
64
59
  */
65
- var SELClientError = class extends SELError {
60
+ var SELClientError = class extends SELError$1 {
66
61
  name = "SELClientError";
67
62
  };
68
63
  /**
69
64
  * Thrown when lint rules with error severity detect violations.
70
65
  * Contains the diagnostics that caused the failure.
71
66
  */
72
- var SELLintError = class extends SELError {
67
+ var SELLintError = class extends SELError$1 {
73
68
  diagnostics;
74
69
  constructor(diagnostics, options) {
75
70
  const messages = diagnostics.map((d) => d.message).join("; ");
@@ -78,4 +73,4 @@ var SELLintError = class extends SELError {
78
73
  }
79
74
  };
80
75
  //#endregion
81
- export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError };
76
+ export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError$1 as SELError, SELEvaluationError, SELLintError };
package/dist/index.cjs CHANGED
@@ -13,7 +13,7 @@ exports.MulticallBatchError = require_errors.MulticallBatchError;
13
13
  exports.SELClientError = require_errors.SELClientError;
14
14
  exports.SELContractError = require_errors.SELContractError;
15
15
  exports.SELError = _seljs_common.SELError;
16
- exports.SELEvaluationError = require_errors.SELEvaluationError;
16
+ exports.SELEvaluationError = _seljs_common.SELEvaluationError;
17
17
  exports.SELLintError = require_errors.SELLintError;
18
18
  exports.SELRuntime = require_environment.SELRuntime;
19
19
  exports.createSEL = require_factory.createSEL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seljs/runtime",
3
- "version": "1.3.0-beta.21",
3
+ "version": "1.3.0-beta.27",
4
4
  "repository": {
5
5
  "url": "https://github.com/abinnovision/seljs"
6
6
  },
@@ -50,11 +50,11 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@marcbachmann/cel-js": "^7.5.3",
53
- "@seljs/checker": "1.3.0-beta.21",
54
- "@seljs/common": "1.3.0-beta.21",
55
- "@seljs/env": "1.3.0-beta.21",
53
+ "@seljs/checker": "1.3.0-beta.27",
54
+ "@seljs/common": "1.3.0-beta.27",
55
+ "@seljs/env": "1.3.0-beta.27",
56
56
  "@seljs/schema": "1.2.0",
57
- "@seljs/types": "1.3.0-beta.21",
57
+ "@seljs/types": "1.3.0-beta.27",
58
58
  "debug": "^4.4.3",
59
59
  "ox": "^0.14.10"
60
60
  },