@vibemancer/core 0.2.2 → 1.0.1
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-X3ZCKBVC.js → chunk-XYEK7THS.js} +4 -3
- package/dist/chunk-XYEK7THS.js.map +1 -0
- package/dist/index-browser.d.ts +5 -7
- 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 +5 -4
- package/dist/chunk-X3ZCKBVC.js.map +0 -1
package/dist/index-browser.d.ts
CHANGED
|
@@ -597,16 +597,17 @@ declare function resetRuleset(): void;
|
|
|
597
597
|
declare function currentRuleset(): Record<string, number>;
|
|
598
598
|
|
|
599
599
|
/**
|
|
600
|
-
* Engine version —
|
|
600
|
+
* Engine version — a stable content hash of packages/core/src.
|
|
601
601
|
*
|
|
602
|
-
*
|
|
602
|
+
* Derived by `scripts/update-engine-version.mjs` from the engine sources, so it changes
|
|
603
|
+
* only when the engine changes — NOT on every build.
|
|
603
604
|
* The same value is propagated to `packages/functions/src/engine-version.generated.ts`
|
|
604
|
-
* so cloud functions and the core engine always agree on
|
|
605
|
+
* so cloud functions and the core engine always agree on one version.
|
|
605
606
|
*
|
|
606
607
|
* Used to gate spectator replays: a recorded match can only be re-simulated when
|
|
607
608
|
* the runtime engine version matches the version that produced the match.
|
|
608
609
|
*/
|
|
609
|
-
declare const ENGINE_VERSION =
|
|
610
|
+
declare const ENGINE_VERSION = 1203306608058186;
|
|
610
611
|
|
|
611
612
|
interface InternalWizardState extends WizardState {
|
|
612
613
|
missileConfig?: MissileConfig;
|
|
@@ -2417,9 +2418,6 @@ type WorkerFactory = (code: string) => {
|
|
|
2417
2418
|
worker: WorkerLike;
|
|
2418
2419
|
cleanup?: () => void;
|
|
2419
2420
|
};
|
|
2420
|
-
/**
|
|
2421
|
-
* Options for browser sandbox creation.
|
|
2422
|
-
*/
|
|
2423
2421
|
interface BrowserSandboxOptions {
|
|
2424
2422
|
/** Timeout in ms for fight/simulate calls (default: 30000). */
|
|
2425
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
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Engine version —
|
|
2
|
+
* Engine version — a stable content hash of packages/core/src.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Derived by `scripts/update-engine-version.mjs` from the engine sources, so it changes
|
|
5
|
+
* only when the engine changes — NOT on every build.
|
|
5
6
|
* The same value is propagated to `packages/functions/src/engine-version.generated.ts`
|
|
6
|
-
* so cloud functions and the core engine always agree on
|
|
7
|
+
* so cloud functions and the core engine always agree on one version.
|
|
7
8
|
*
|
|
8
9
|
* Used to gate spectator replays: a recorded match can only be re-simulated when
|
|
9
10
|
* the runtime engine version matches the version that produced the match.
|
|
10
11
|
*/
|
|
11
|
-
export const ENGINE_VERSION =
|
|
12
|
+
export const ENGINE_VERSION = 1203306608058186;
|