@ball-lang/engine 0.2.1 → 1.3.4
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/README.md +31 -9
- package/dist/ball_file.d.ts +25 -0
- package/dist/ball_file.d.ts.map +1 -0
- package/dist/ball_file.js +50 -0
- package/dist/ball_file.js.map +1 -0
- package/dist/compiled_engine.d.ts +319 -0
- package/dist/compiled_engine.d.ts.map +1 -0
- package/dist/compiled_engine.js +10112 -0
- package/dist/compiled_engine.js.map +1 -0
- package/dist/engine_setup.d.ts +45 -0
- package/dist/engine_setup.d.ts.map +1 -0
- package/dist/engine_setup.js +2027 -0
- package/dist/engine_setup.js.map +1 -0
- package/dist/index.d.ts +33 -121
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -949
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/ball_file.ts +50 -0
- package/src/compiled_engine.ts +9948 -0
- package/src/engine_setup.ts +1733 -0
- package/src/index.ts +121 -975
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared engine setup for the Ball TS self-hosted engine.
|
|
3
|
+
*
|
|
4
|
+
* This module factors the proto3-JSON normalization, method-dispatch handler,
|
|
5
|
+
* extra std-function registrations, and compiled-engine patches OUT of
|
|
6
|
+
* index.ts so they can be applied to ANY compiled-engine module instance —
|
|
7
|
+
* both the committed `compiled_engine.ts` (used by index.ts / ts/engine) and
|
|
8
|
+
* a freshly compiled engine (used by the Phase 2.7b conformance harness in
|
|
9
|
+
* ts/compiler).
|
|
10
|
+
*
|
|
11
|
+
* The single source of truth for 'what a working engine needs' therefore
|
|
12
|
+
* lives here, eliminating drift between the two harnesses.
|
|
13
|
+
*
|
|
14
|
+
* `createEngineSetup(mod)` takes the compiled-engine module namespace
|
|
15
|
+
* (its exports: BallEngine, StdModuleHandler, BallGenerator, _FlowSignal, and
|
|
16
|
+
* optionally BallFuture) and returns the bound setup helpers.
|
|
17
|
+
*/
|
|
18
|
+
export interface EngineModule {
|
|
19
|
+
BallEngine: any;
|
|
20
|
+
StdModuleHandler: any;
|
|
21
|
+
BallGenerator: any;
|
|
22
|
+
_FlowSignal: any;
|
|
23
|
+
BallFuture?: any;
|
|
24
|
+
[k: string]: any;
|
|
25
|
+
}
|
|
26
|
+
export declare function createEngineSetup(mod: EngineModule): {
|
|
27
|
+
protoWrap: (obj: any, isMetadata?: boolean) => any;
|
|
28
|
+
wrapValue: (raw: any) => any;
|
|
29
|
+
__bts: (v: any) => string;
|
|
30
|
+
BallFuture: any;
|
|
31
|
+
MethodDispatchHandler: {
|
|
32
|
+
new (): {
|
|
33
|
+
handles(module: any): boolean;
|
|
34
|
+
init(_engine: any): void;
|
|
35
|
+
call(fn: string, input: any, _engine: any): any;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
registerExtraStdFunctions: (stdHandler: any) => void;
|
|
39
|
+
patchCompiledEngine: (engine: any) => void;
|
|
40
|
+
seedGlobalScope: (engine: any) => void;
|
|
41
|
+
patchScopeBindings: (globalScope: any) => void;
|
|
42
|
+
_isFutureLike: (v: any) => boolean;
|
|
43
|
+
_unwrapBallValue: (v: any) => any;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=engine_setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine_setup.d.ts","sourceRoot":"","sources":["../src/engine_setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,GAAG,CAAC;IAChB,gBAAgB,EAAE,GAAG,CAAC;IACtB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY;qBA8TzB,GAAG,2BAAuB,GAAG;qBA6E7B,GAAG,KAAG,GAAG;eAqCf,GAAG,KAAG,MAAM;;;;4BA8CZ,GAAG,GAAG,OAAO;0BACf,GAAG,GAAG,IAAI;qBACf,MAAM,SAAS,GAAG,WAAW,GAAG,GAAG,GAAG;;;oDA0HW,IAAI;0CA+hBV,IAAI;sCAgfR,IAAI;sCA0Bb,GAAG,KAAG,IAAI;uBAtmDzB,GAAG,KAAG,OAAO;0BAklCV,GAAG,KAAG,GAAG;EA0jBvC"}
|