greyscript-interpreter 1.0.0 → 1.0.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.
@@ -3,5 +3,5 @@ import { InterpreterRunOptions } from 'greybel-interpreter/dist/interpreter';
3
3
  export declare class Interpreter extends GreybelInterpreter {
4
4
  parse(code: string): import("miniscript-core").ASTBase | import("greyscript-core").ASTChunkGreyScript;
5
5
  inject(code: string, context?: OperationContext): Promise<Interpreter>;
6
- run({ customCode }?: InterpreterRunOptions): Promise<Interpreter>;
6
+ run({ customCode, vmOptions }?: InterpreterRunOptions): Promise<Interpreter>;
7
7
  }
@@ -51,7 +51,7 @@ class Interpreter extends greybel_interpreter_1.Interpreter {
51
51
  return this;
52
52
  });
53
53
  }
54
- run({ customCode } = {}) {
54
+ run({ customCode, vmOptions } = {}) {
55
55
  return __awaiter(this, void 0, void 0, function* () {
56
56
  const code = customCode !== null && customCode !== void 0 ? customCode : (yield this.handler.resourceHandler.get(this.target));
57
57
  const bytecodeConverter = new bytecode_generator_1.BytecodeGenerator({
@@ -60,7 +60,7 @@ class Interpreter extends greybel_interpreter_1.Interpreter {
60
60
  debugMode: this.debugMode
61
61
  });
62
62
  const bytecode = yield bytecodeConverter.compile(code);
63
- this.initVM(bytecode);
63
+ this.initVM(bytecode, vmOptions);
64
64
  yield this.start();
65
65
  return this;
66
66
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greyscript-interpreter",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Interpreter",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "greyscript-core": "~1.4.2",
52
- "greybel-interpreter": "~4.0.3"
52
+ "greybel-interpreter": "~4.0.5"
53
53
  },
54
54
  "keywords": [
55
55
  "greyscript",