@akashic/headless-driver 2.15.10 → 2.15.11
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/lib/Looper.js +2 -2
- package/lib/runner/Runner.js +0 -1
- package/lib/runner/RunnerManager.js +1 -1
- package/lib/runner/v1/platform/assets/NodeScriptAsset.js +7 -6
- package/lib/runner/v2/platform/assets/NodeScriptAsset.js +7 -6
- package/lib/runner/v3/platform/assets/NodeScriptAsset.js +8 -7
- package/package.json +1 -1
package/lib/Looper.js
CHANGED
|
@@ -53,9 +53,9 @@ class Looper {
|
|
|
53
53
|
this._errorHandler(e);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
this._prev =
|
|
56
|
+
this._prev = performance.now();
|
|
57
57
|
this._timerId = setInterval(() => {
|
|
58
|
-
const now =
|
|
58
|
+
const now = performance.now();
|
|
59
59
|
try {
|
|
60
60
|
this._fun(now - this._prev);
|
|
61
61
|
}
|
package/lib/runner/Runner.js
CHANGED
|
@@ -127,7 +127,7 @@ class RunnerManager {
|
|
|
127
127
|
runner = new v1_1.RunnerV1(runnerParameter);
|
|
128
128
|
}
|
|
129
129
|
runner.errorTrigger.add((err) => {
|
|
130
|
-
(0, Logger_1.getSystemLogger)().error(err
|
|
130
|
+
(0, Logger_1.getSystemLogger)().error(err);
|
|
131
131
|
this.stopRunner(runnerId);
|
|
132
132
|
return true;
|
|
133
133
|
});
|
|
@@ -41,12 +41,13 @@ class NodeScriptAsset extends engine_files_v1_1.akashicEngine.ScriptAsset {
|
|
|
41
41
|
globalThis.g = g;
|
|
42
42
|
}
|
|
43
43
|
`, context)(console, execEnv);
|
|
44
|
-
(0, vm_1.runInContext)(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
filename: `${this.path}
|
|
44
|
+
(0, vm_1.runInContext)([
|
|
45
|
+
"(function(exports, require, module, __filename, __dirname) {",
|
|
46
|
+
`${this.script}`,
|
|
47
|
+
"})(g.module.exports, g.module.require, g.module, g.filename, g.dirname);"
|
|
48
|
+
].join("\n"), context, {
|
|
49
|
+
filename: `${this.path}`,
|
|
50
|
+
lineOffset: -1
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
catch (e) {
|
|
@@ -41,12 +41,13 @@ class NodeScriptAsset extends engine_files_v2_1.akashicEngine.ScriptAsset {
|
|
|
41
41
|
globalThis.g = g;
|
|
42
42
|
}
|
|
43
43
|
`, context)(console, execEnv);
|
|
44
|
-
(0, vm_1.runInContext)(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
filename: `${this.path}
|
|
44
|
+
(0, vm_1.runInContext)([
|
|
45
|
+
"(function(exports, require, module, __filename, __dirname) {",
|
|
46
|
+
`${this.script}`,
|
|
47
|
+
"})(g.module.exports, g.module.require, g.module, g.filename, g.dirname);"
|
|
48
|
+
].join("\n"), context, {
|
|
49
|
+
filename: `${this.path}`,
|
|
50
|
+
lineOffset: -1
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
catch (e) {
|
|
@@ -60,13 +60,14 @@ class NodeScriptAsset extends Asset_1.Asset {
|
|
|
60
60
|
globalThis.g = g;
|
|
61
61
|
}
|
|
62
62
|
`, context)(console, execEnv);
|
|
63
|
-
(0, vm_1.runInContext)(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
filename: `${this.path}
|
|
63
|
+
(0, vm_1.runInContext)([
|
|
64
|
+
"(function(exports, require, module, __filename, __dirname) {",
|
|
65
|
+
`${this.script}`,
|
|
66
|
+
`${postScript}`,
|
|
67
|
+
"})(g.module.exports, g.module.require, g.module, g.filename, g.dirname);"
|
|
68
|
+
].join("\n"), context, {
|
|
69
|
+
filename: `${this.path}`,
|
|
70
|
+
lineOffset: -1
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
catch (e) {
|