@abyss-project/runtime 3.11.0 → 3.13.0
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/.eslintrc.js +32 -32
- package/dist/definition/definition.schema.js +6 -0
- package/dist/definition/definition.schema.js.map +1 -1
- package/dist/definition/definition.types.d.ts +11 -0
- package/dist/definition/definition.types.js +6 -1
- package/dist/definition/definition.types.js.map +1 -1
- package/dist/engine/engine-source.js +1 -1
- package/dist/errors/runtime-error-code.enum.d.ts +1 -0
- package/dist/errors/runtime-error-code.enum.js +1 -0
- package/dist/errors/runtime-error-code.enum.js.map +1 -1
- package/dist/runner-protocol/evaluation.types.d.ts +1 -0
- package/dist/steps/global-references.js +7 -0
- package/dist/steps/global-references.js.map +1 -1
- package/dist/steps/step-fields.js +10 -0
- package/dist/steps/step-fields.js.map +1 -1
- package/jest.config.ts +11 -11
- package/package.json +1 -1
- package/scripts/build-engine.cjs +70 -70
- package/src/__tests__/engine-bundle.test.ts +121 -121
- package/src/__tests__/surface.test.ts +81 -81
- package/src/access/__tests__/host-match.test.ts +24 -24
- package/src/access/access.types.ts +25 -25
- package/src/access/host-match.ts +13 -13
- package/src/cost/__tests__/execution-cost.test.ts +249 -249
- package/src/cost/execution-cost.ts +203 -203
- package/src/definition/__tests__/code-step.test.ts +56 -0
- package/src/definition/__tests__/validate-definition.test.ts +354 -354
- package/src/definition/definition.limits.ts +9 -9
- package/src/definition/definition.schema.ts +7 -0
- package/src/definition/definition.types.ts +21 -1
- package/src/definition/validate-definition.ts +206 -206
- package/src/definition/walk-steps.ts +44 -44
- package/src/discord/__tests__/discord-event-input.test.ts +90 -90
- package/src/discord/discord.types.ts +696 -696
- package/src/engine/__tests__/run-in-isolate.test.ts +519 -519
- package/src/engine/engine-entry.ts +3 -3
- package/src/engine/engine-global.ts +2 -2
- package/src/engine/run-in-isolate.ts +462 -462
- package/src/errors/runtime-error-code.enum.ts +5 -0
- package/src/index.ts +32 -32
- package/src/interpreter/__tests__/interpreter.test.ts +854 -854
- package/src/interpreter/__tests__/log-respond-resume.test.ts +271 -271
- package/src/interpreter/interpreter-error.ts +12 -12
- package/src/interpreter/interpreter.ts +483 -483
- package/src/interpreter/interpreter.types.ts +204 -204
- package/src/interpreter/sequence-path.ts +67 -67
- package/src/interpreter/test-host.ts +85 -85
- package/src/runner-protocol/__tests__/file-payload.test.ts +26 -26
- package/src/runner-protocol/evaluation.types.ts +2 -0
- package/src/runner-protocol/execution-protocol.types.ts +297 -297
- package/src/schedule/schedule.types.ts +100 -100
- package/src/server/__tests__/code-runner-session.test.ts +311 -311
- package/src/server/code-runner-error.ts +12 -12
- package/src/server/code-runner-session.ts +310 -310
- package/src/server/index.ts +11 -11
- package/src/steps/__tests__/global-references.test.ts +140 -124
- package/src/steps/__tests__/step-fields.test.ts +58 -0
- package/src/steps/execute-step.ts +186 -186
- package/src/steps/global-references.ts +56 -48
- package/src/steps/step-access.ts +56 -56
- package/src/steps/step-fields.ts +10 -0
- package/src/steps/value-source.ts +69 -69
- package/tsconfig.check.json +15 -15
- package/tsconfig.json +35 -35
|
@@ -8,6 +8,11 @@ export enum RuntimeErrorCode {
|
|
|
8
8
|
EXPRESSION_ERROR = 'EXPRESSION_ERROR',
|
|
9
9
|
/** A `code` item threw or did not parse. */
|
|
10
10
|
CODE_ERROR = 'CODE_ERROR',
|
|
11
|
+
/**
|
|
12
|
+
* A host refused to compile a CODE step before the run (syntax, library not provided, size).
|
|
13
|
+
* The runtime never raises it itself; hosts use it.
|
|
14
|
+
*/
|
|
15
|
+
CODE_COMPILE_ERROR = 'CODE_COMPILE_ERROR',
|
|
11
16
|
/** The execution exceeded its wall-clock or CPU time limit. */
|
|
12
17
|
TIMEOUT = 'TIMEOUT',
|
|
13
18
|
/** The execution exceeded the memory limit of its isolate. */
|
package/src/index.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
// Package root: browser-compatible. No Node import (`fs`, `net`, `http`, `ws`...) here nor in what
|
|
2
|
-
// this root re-exports; everything touching the network or the system lives under `src/server`
|
|
3
|
-
// (entry point `@abyss-project/runtime/server`).
|
|
4
|
-
export * from './errors/runtime-error-code.enum';
|
|
5
|
-
export * from './access/access.types';
|
|
6
|
-
export { hostMatches } from './access/host-match';
|
|
7
|
-
export * from './definition/definition.types';
|
|
8
|
-
export { validateDefinition } from './definition/validate-definition';
|
|
9
|
-
export type { ValidationResult } from './definition/validate-definition';
|
|
10
|
-
export { MAX_WAIT_DURATION_MS } from './definition/definition.limits';
|
|
11
|
-
export { walkSteps } from './definition/walk-steps';
|
|
12
|
-
export type { StepVisitor } from './definition/walk-steps';
|
|
13
|
-
export * from './interpreter/interpreter.types';
|
|
14
|
-
export { start, step } from './interpreter/interpreter';
|
|
15
|
-
export { InterpreterError } from './interpreter/interpreter-error';
|
|
16
|
-
export { runToCompletion } from './interpreter/test-host';
|
|
17
|
-
export type { TestHostHandlers, TestRunResult } from './interpreter/test-host';
|
|
18
|
-
export * from './discord/discord.types';
|
|
19
|
-
export * from './schedule/schedule.types';
|
|
20
|
-
export * from './runner-protocol/evaluation.types';
|
|
21
|
-
export * from './runner-protocol/execution-protocol.types';
|
|
22
|
-
export { runInIsolate, EngineResultKind } from './engine/run-in-isolate';
|
|
23
|
-
export type {
|
|
24
|
-
EngineHost,
|
|
25
|
-
EngineProgress,
|
|
26
|
-
EngineRequest,
|
|
27
|
-
EngineResult,
|
|
28
|
-
HostCallAnswer,
|
|
29
|
-
} from './engine/run-in-isolate';
|
|
30
|
-
export { ENGINE_GLOBAL_NAME } from './engine/engine-global';
|
|
31
|
-
export { collectGlobalReferences } from './steps/global-references';
|
|
32
|
-
export * from './cost/execution-cost';
|
|
1
|
+
// Package root: browser-compatible. No Node import (`fs`, `net`, `http`, `ws`...) here nor in what
|
|
2
|
+
// this root re-exports; everything touching the network or the system lives under `src/server`
|
|
3
|
+
// (entry point `@abyss-project/runtime/server`).
|
|
4
|
+
export * from './errors/runtime-error-code.enum';
|
|
5
|
+
export * from './access/access.types';
|
|
6
|
+
export { hostMatches } from './access/host-match';
|
|
7
|
+
export * from './definition/definition.types';
|
|
8
|
+
export { validateDefinition } from './definition/validate-definition';
|
|
9
|
+
export type { ValidationResult } from './definition/validate-definition';
|
|
10
|
+
export { MAX_WAIT_DURATION_MS } from './definition/definition.limits';
|
|
11
|
+
export { walkSteps } from './definition/walk-steps';
|
|
12
|
+
export type { StepVisitor } from './definition/walk-steps';
|
|
13
|
+
export * from './interpreter/interpreter.types';
|
|
14
|
+
export { start, step } from './interpreter/interpreter';
|
|
15
|
+
export { InterpreterError } from './interpreter/interpreter-error';
|
|
16
|
+
export { runToCompletion } from './interpreter/test-host';
|
|
17
|
+
export type { TestHostHandlers, TestRunResult } from './interpreter/test-host';
|
|
18
|
+
export * from './discord/discord.types';
|
|
19
|
+
export * from './schedule/schedule.types';
|
|
20
|
+
export * from './runner-protocol/evaluation.types';
|
|
21
|
+
export * from './runner-protocol/execution-protocol.types';
|
|
22
|
+
export { runInIsolate, EngineResultKind } from './engine/run-in-isolate';
|
|
23
|
+
export type {
|
|
24
|
+
EngineHost,
|
|
25
|
+
EngineProgress,
|
|
26
|
+
EngineRequest,
|
|
27
|
+
EngineResult,
|
|
28
|
+
HostCallAnswer,
|
|
29
|
+
} from './engine/run-in-isolate';
|
|
30
|
+
export { ENGINE_GLOBAL_NAME } from './engine/engine-global';
|
|
31
|
+
export { collectGlobalReferences } from './steps/global-references';
|
|
32
|
+
export * from './cost/execution-cost';
|