@vibemancer/core 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.
- package/dist/{chunk-OTLG74DO.js → chunk-XYEK7THS.js} +4 -3
- package/dist/{chunk-OTLG74DO.js.map → chunk-XYEK7THS.js.map} +1 -1
- package/dist/index-browser.d.ts +1 -4
- package/dist/index-browser.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/engine/sandbox-browser.ts +13 -1
- package/src/engine-version.ts +1 -1
package/dist/index-browser.d.ts
CHANGED
|
@@ -607,7 +607,7 @@ declare function currentRuleset(): Record<string, number>;
|
|
|
607
607
|
* Used to gate spectator replays: a recorded match can only be re-simulated when
|
|
608
608
|
* the runtime engine version matches the version that produced the match.
|
|
609
609
|
*/
|
|
610
|
-
declare const ENGINE_VERSION =
|
|
610
|
+
declare const ENGINE_VERSION = 1203306608058186;
|
|
611
611
|
|
|
612
612
|
interface InternalWizardState extends WizardState {
|
|
613
613
|
missileConfig?: MissileConfig;
|
|
@@ -2418,9 +2418,6 @@ type WorkerFactory = (code: string) => {
|
|
|
2418
2418
|
worker: WorkerLike;
|
|
2419
2419
|
cleanup?: () => void;
|
|
2420
2420
|
};
|
|
2421
|
-
/**
|
|
2422
|
-
* Options for browser sandbox creation.
|
|
2423
|
-
*/
|
|
2424
2421
|
interface BrowserSandboxOptions {
|
|
2425
2422
|
/** Timeout in ms for fight/simulate calls (default: 30000). */
|
|
2426
2423
|
timeoutMs?: number;
|
package/dist/index-browser.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -51,6 +51,18 @@ export type WorkerFactory = (code: string) => {worker: WorkerLike; cleanup?: ()
|
|
|
51
51
|
/**
|
|
52
52
|
* Options for browser sandbox creation.
|
|
53
53
|
*/
|
|
54
|
+
/**
|
|
55
|
+
* Floor for worker STARTUP, independent of the fight budget.
|
|
56
|
+
*
|
|
57
|
+
* `timeoutMs` answers "how long may a fight run" — the crasher tests set it to 2-3s on
|
|
58
|
+
* purpose so an infinite loop is caught quickly. Booting a worker is not a fight, and on a
|
|
59
|
+
* busy machine it can exceed a deliberately tiny budget, which surfaced as "Worker
|
|
60
|
+
* initialization timed out" from tests asserting something else entirely.
|
|
61
|
+
*
|
|
62
|
+
* A floor rather than a replacement: a caller asking for a LONGER budget still gets it.
|
|
63
|
+
*/
|
|
64
|
+
const WORKER_INIT_MIN_MS = 30_000;
|
|
65
|
+
|
|
54
66
|
export interface BrowserSandboxOptions
|
|
55
67
|
{
|
|
56
68
|
/** Timeout in ms for fight/simulate calls (default: 30000). */
|
|
@@ -214,7 +226,7 @@ export class BrowserMatchSandbox
|
|
|
214
226
|
|
|
215
227
|
try
|
|
216
228
|
{
|
|
217
|
-
await sandbox.waitForReady(timeout);
|
|
229
|
+
await sandbox.waitForReady(Math.max(timeout, WORKER_INIT_MIN_MS));
|
|
218
230
|
}
|
|
219
231
|
catch(error)
|
|
220
232
|
{
|
package/src/engine-version.ts
CHANGED