greybel-interpreter 2.6.13 → 2.6.15
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/dist/context.d.ts +1 -0
- package/dist/context.js +2 -2
- package/dist/handler/output.d.ts +7 -1
- package/dist/types/function.js +2 -1
- package/package.json +1 -1
package/dist/context.d.ts
CHANGED
package/dist/context.js
CHANGED
|
@@ -320,7 +320,7 @@ class OperationContext {
|
|
|
320
320
|
return this.locals.scope.get(path);
|
|
321
321
|
}
|
|
322
322
|
fork(options) {
|
|
323
|
-
var _a;
|
|
323
|
+
var _a, _b;
|
|
324
324
|
const newContext = new OperationContext({
|
|
325
325
|
target: (_a = options.target) !== null && _a !== void 0 ? _a : this.target,
|
|
326
326
|
stackTrace: this.stackTrace,
|
|
@@ -333,7 +333,7 @@ class OperationContext {
|
|
|
333
333
|
debugger: this.debugger,
|
|
334
334
|
handler: this.handler,
|
|
335
335
|
cps: this.cps,
|
|
336
|
-
processState: this.processState,
|
|
336
|
+
processState: (_b = options.processState) !== null && _b !== void 0 ? _b : this.processState,
|
|
337
337
|
environmentVariables: this.environmentVariables
|
|
338
338
|
});
|
|
339
339
|
if (options.type !== ContextType.Function) {
|
package/dist/handler/output.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { OperationContext } from '../context';
|
|
2
|
-
|
|
2
|
+
interface KeyEventWithKeyCode {
|
|
3
3
|
keyCode: number;
|
|
4
4
|
code: string;
|
|
5
5
|
}
|
|
6
|
+
interface KeyEventWithCharCode {
|
|
7
|
+
charCode: number;
|
|
8
|
+
code: string;
|
|
9
|
+
}
|
|
10
|
+
export type KeyEvent = KeyEventWithKeyCode | KeyEventWithCharCode;
|
|
6
11
|
export interface PrintOptions {
|
|
7
12
|
appendNewLine: boolean;
|
|
8
13
|
replace: boolean;
|
|
@@ -21,3 +26,4 @@ export declare class DefaultOutputHandler extends OutputHandler {
|
|
|
21
26
|
waitForKeyPress(_ctx: OperationContext, _message?: string): PromiseLike<KeyEvent>;
|
|
22
27
|
clear(_ctx: OperationContext): void;
|
|
23
28
|
}
|
|
29
|
+
export {};
|
package/dist/types/function.js
CHANGED
|
@@ -115,7 +115,8 @@ class CustomFunction extends base_1.CustomValue {
|
|
|
115
115
|
const fnCtx = (_a = this.scope) === null || _a === void 0 ? void 0 : _a.fork({
|
|
116
116
|
type: context_1.ContextType.Function,
|
|
117
117
|
state: context_1.ContextState.Default,
|
|
118
|
-
ignoreOuter: !this.assignOuter
|
|
118
|
+
ignoreOuter: !this.assignOuter,
|
|
119
|
+
processState: callContext.processState
|
|
119
120
|
});
|
|
120
121
|
const argMap = new Map();
|
|
121
122
|
const hasSelf = !(self instanceof nil_1.CustomNil);
|