@akashic/headless-driver 2.5.2 → 2.6.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.
|
@@ -187,12 +187,7 @@ class AMFlowClient {
|
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
189
|
const tickList = this.store.getTickList(opts);
|
|
190
|
-
|
|
191
|
-
callback(null, tickList);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
callback((0, ErrorFactory_1.createError)("runtime_error", "No tick list"), undefined);
|
|
195
|
-
}
|
|
190
|
+
callback(null, tickList !== null && tickList !== void 0 ? tickList : undefined);
|
|
196
191
|
});
|
|
197
192
|
}
|
|
198
193
|
putStartPoint(startPoint, callback) {
|
|
@@ -51,6 +51,9 @@ class AMFlowStore {
|
|
|
51
51
|
const tickList = opts.excludeEventFlags && opts.excludeEventFlags.ignorable ? this.filteredTickList : this.unfilteredTickList;
|
|
52
52
|
const from = Math.max(opts.begin, tickList[0 /* TickListIndex.From */]);
|
|
53
53
|
const to = Math.min(opts.end - 1, tickList[1 /* TickListIndex.To */]);
|
|
54
|
+
if (to < from) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
54
57
|
const tickListTicks = tickList[2 /* TickListIndex.Ticks */];
|
|
55
58
|
if (tickListTicks == null) {
|
|
56
59
|
return [from, to];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeVM } from "vm2";
|
|
2
2
|
import type { AMFlowClient } from "../play/amflow/AMFlowClient";
|
|
3
3
|
import type { PlayManager } from "../play/PlayManager";
|
|
4
|
+
import type { RunnerStartParameters } from "./Runner";
|
|
4
5
|
import type { RunnerExecutionMode, RunnerPlayer, RunnerRenderingMode } from "./types";
|
|
5
6
|
import type { RunnerV1, RunnerV1Game } from "./v1";
|
|
6
7
|
import type { RunnerV2, RunnerV2Game } from "./v2";
|
|
@@ -75,7 +76,7 @@ export declare class RunnerManager {
|
|
|
75
76
|
* Runner を開始する。
|
|
76
77
|
* @param runnerId RunnerID
|
|
77
78
|
*/
|
|
78
|
-
startRunner(runnerId: string): Promise<RunnerV1Game | RunnerV2Game | RunnerV3Game | null>;
|
|
79
|
+
startRunner(runnerId: string, options?: RunnerStartParameters): Promise<RunnerV1Game | RunnerV2Game | RunnerV3Game | null>;
|
|
79
80
|
/**
|
|
80
81
|
* Runner を停止する。
|
|
81
82
|
* @param runnerId RunnerID
|
|
@@ -157,13 +157,13 @@ class RunnerManager {
|
|
|
157
157
|
* Runner を開始する。
|
|
158
158
|
* @param runnerId RunnerID
|
|
159
159
|
*/
|
|
160
|
-
startRunner(runnerId) {
|
|
160
|
+
startRunner(runnerId, options) {
|
|
161
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
162
|
const runner = this.getRunner(runnerId);
|
|
163
163
|
if (!runner) {
|
|
164
164
|
throw new Error("Runner is not found");
|
|
165
165
|
}
|
|
166
|
-
return runner.start();
|
|
166
|
+
return runner.start(options);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
/**
|