@ifc-lite/parser 4.0.2 → 4.0.3
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/parser.worker.d.ts +6 -0
- package/dist/parser.worker.d.ts.map +1 -1
- package/dist/parser.worker.js +6 -0
- package/dist/parser.worker.js.map +1 -1
- package/dist/wasm-panic-forward.d.ts +67 -0
- package/dist/wasm-panic-forward.d.ts.map +1 -0
- package/dist/wasm-panic-forward.js +107 -0
- package/dist/wasm-panic-forward.js.map +1 -0
- package/dist/worker-parser.d.ts.map +1 -1
- package/dist/worker-parser.js +7 -0
- package/dist/worker-parser.js.map +1 -1
- package/package.json +4 -4
package/dist/parser.worker.d.ts
CHANGED
|
@@ -55,6 +55,12 @@ export interface ParserWorkerErrorMessage {
|
|
|
55
55
|
type: 'error';
|
|
56
56
|
id: string;
|
|
57
57
|
message: string;
|
|
58
|
+
/** This worker realm's wasm panic-location stash (#2527 follow-up), forwarded
|
|
59
|
+
* so the main thread can re-plant it on ITS global for the existing
|
|
60
|
+
* `attachWasmPanicLocation` gate. Location only, never the panic message.
|
|
61
|
+
* Absent when there was no stash. See `wasm-panic-forward.ts`. */
|
|
62
|
+
wasmPanicLocation?: string;
|
|
63
|
+
wasmPanicAt?: number;
|
|
58
64
|
}
|
|
59
65
|
export type ParserWorkerOutputMessage = ParserWorkerProgressMessage | ParserWorkerDiagnosticMessage | ParserWorkerPartialStoreMessage | ParserWorkerCompleteMessage | ParserWorkerErrorMessage;
|
|
60
66
|
//# sourceMappingURL=parser.worker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.worker.d.ts","sourceRoot":"","sources":["../src/parser.worker.ts"],"names":[],"mappings":"AAsBA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"parser.worker.d.ts","sourceRoot":"","sources":["../src/parser.worker.ts"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AwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB;;;uEAGmE;IACnE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,yBAAyB,GACjC,2BAA2B,GAC3B,6BAA6B,GAC7B,+BAA+B,GAC/B,2BAA2B,GAC3B,wBAAwB,CAAC"}
|
package/dist/parser.worker.js
CHANGED
|
@@ -17,6 +17,7 @@ import init, { IfcAPI } from '@ifc-lite/wasm';
|
|
|
17
17
|
import { initWasmWithRetry } from './wasm-init-retry.js';
|
|
18
18
|
import { IfcParser } from './index.js';
|
|
19
19
|
import { toTransport, transportByteSize, } from './data-store-transport.js';
|
|
20
|
+
import { takeWasmPanicStash } from './wasm-panic-forward.js';
|
|
20
21
|
function readJsHeapBytes() {
|
|
21
22
|
const perf = performance;
|
|
22
23
|
return perf.memory?.usedJSHeapSize;
|
|
@@ -227,10 +228,15 @@ self.onmessage = async (event) => {
|
|
|
227
228
|
postOutput({ type: 'complete', id, payload, memory }, transfers);
|
|
228
229
|
}
|
|
229
230
|
catch (err) {
|
|
231
|
+
// #2527 follow-up: forward this realm's panic-location stash (set by the
|
|
232
|
+
// Rust panic hook if this failure was a wasm trap) so the main thread can
|
|
233
|
+
// re-plant it on ITS global for `attachWasmPanicLocation`.
|
|
234
|
+
const panic = takeWasmPanicStash(self);
|
|
230
235
|
postOutput({
|
|
231
236
|
type: 'error',
|
|
232
237
|
id,
|
|
233
238
|
message: err instanceof Error ? err.message : String(err),
|
|
239
|
+
...(panic ? { wasmPanicLocation: panic.location, wasmPanicAt: panic.at } : {}),
|
|
234
240
|
});
|
|
235
241
|
}
|
|
236
242
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.worker.js","sourceRoot":"","sources":["../src/parser.worker.ts"],"names":[],"mappings":"AAAA;;+DAE+D;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EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC;IACnE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,yEAAyE;QACzE,0EAA0E;QAC1E,2DAA2D;QAC3D,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACvC,UAAU,CAAC;YACT,IAAI,EAAE,OAAO;YACb,EAAE;YACF,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;YACzD,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/E,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forward a worker realm's wasm panic-location stash to the main thread
|
|
3
|
+
* (#2527 follow-up).
|
|
4
|
+
*
|
|
5
|
+
* The Rust panic hook (`rust/wasm-bindings/src/utils.rs`) stashes
|
|
6
|
+
* `{ location, at }` on whichever realm's JS global it runs in — `self` in a
|
|
7
|
+
* worker, `window` on the main thread. #2527 taught the main thread to read
|
|
8
|
+
* its OWN global's stash and attach it to a trap's exception event
|
|
9
|
+
* (`apps/viewer/src/lib/analytics-scrub.ts`'s `attachWasmPanicLocation`), but
|
|
10
|
+
* a worker-realm trap leaves that stash stranded in the worker's global,
|
|
11
|
+
* which the main thread can never see across the realm boundary.
|
|
12
|
+
*
|
|
13
|
+
* `takeWasmPanicStash` reads + consumes the stash worker-side so it can ride
|
|
14
|
+
* the worker's own `{type:'error'}` message; `restashWasmPanicLocation`
|
|
15
|
+
* re-plants it on the main thread's global so the EXISTING #2527 gate (same
|
|
16
|
+
* key, same TTL, same consume-once semantics) picks it up unmodified.
|
|
17
|
+
*
|
|
18
|
+
* Location only, never the panic's message — the message can embed
|
|
19
|
+
* model-derived text (see `utils.rs`'s privacy contract); the location alone
|
|
20
|
+
* travels on the error message and through this module.
|
|
21
|
+
*
|
|
22
|
+
* NOTE: this file is intentionally byte-identical to
|
|
23
|
+
* `packages/geometry/src/wasm-panic-forward.ts` — both `@ifc-lite/geometry`
|
|
24
|
+
* and `@ifc-lite/parser` need the exact same realm-forwarding contract, and
|
|
25
|
+
* neither package depends on the other (nor is `@ifc-lite/wasm`, the one
|
|
26
|
+
* package both DO depend on, a safe home: it ships only the wasm-pack build
|
|
27
|
+
* output, with no TypeScript build step of its own, and `test`/`typecheck`
|
|
28
|
+
* for either consumer already runs its build via turbo's `^build` — adding a
|
|
29
|
+
* hand-written TS module there would make every geometry/parser test run
|
|
30
|
+
* gate on a full Rust→wasm rebuild). Keep any change to one copy in lockstep
|
|
31
|
+
* with the other; `wasm-panic-forward.test.ts` is duplicated the same way.
|
|
32
|
+
*/
|
|
33
|
+
/** Kept in lockstep with `PANIC_STASH_KEY` in `rust/wasm-bindings/src/utils.rs`,
|
|
34
|
+
* `WASM_PANIC_STASH_KEY` in `apps/viewer/src/lib/analytics-scrub.ts`, and this
|
|
35
|
+
* module's twin at `packages/geometry/src/wasm-panic-forward.ts`. */
|
|
36
|
+
export declare const WASM_PANIC_STASH_KEY = "__ifclite_wasm_panic";
|
|
37
|
+
export interface WasmPanicStash {
|
|
38
|
+
location: string;
|
|
39
|
+
at: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Worker-side: read and CONSUME this realm's panic stash so it can be
|
|
43
|
+
* forwarded on the worker's own error message. Consume-once regardless of
|
|
44
|
+
* shape validity — an unconsumed malformed stash must not linger to
|
|
45
|
+
* mislabel a later trap, mirroring the main-thread gate's own rule.
|
|
46
|
+
*/
|
|
47
|
+
export declare function takeWasmPanicStash(realm: object): WasmPanicStash | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Main-side: re-plant a worker-forwarded stash on this realm's global so the
|
|
50
|
+
* existing #2527 `attachWasmPanicLocation` gate consumes it unmodified.
|
|
51
|
+
*
|
|
52
|
+
* Gated on `errorMessage` looking like a wasm trap: the worker forwards
|
|
53
|
+
* `wasmPanicLocation`/`wasmPanicAt` on ANY `{type:'error'}` message (a stale
|
|
54
|
+
* stash from an earlier suppressed panic can ride out on an ordinary,
|
|
55
|
+
* non-trap worker error), and re-planting unconditionally would let that
|
|
56
|
+
* stale location sit on `globalThis` until an unrelated trap-shaped
|
|
57
|
+
* exception consumed it — mislabeling that trap. Only a message that itself
|
|
58
|
+
* looks like a wasm trap is allowed to re-plant.
|
|
59
|
+
*
|
|
60
|
+
* Never clobbers an existing, unconsumed stash — a genuine main-thread trap
|
|
61
|
+
* that hasn't been captured yet must win over a worker trap that merely
|
|
62
|
+
* arrived first (the older-looking stash, if stale, is simply dropped later
|
|
63
|
+
* by the TTL check at attach time; this function never overwrites either
|
|
64
|
+
* way).
|
|
65
|
+
*/
|
|
66
|
+
export declare function restashWasmPanicLocation(realm: object, location: unknown, at: unknown, errorMessage: string): void;
|
|
67
|
+
//# sourceMappingURL=wasm-panic-forward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm-panic-forward.d.ts","sourceRoot":"","sources":["../src/wasm-panic-forward.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;sEAEsE;AACtE,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAgB3D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AAeD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAK5E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EACjB,EAAE,EAAE,OAAO,EACX,YAAY,EAAE,MAAM,GACnB,IAAI,CAON"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Forward a worker realm's wasm panic-location stash to the main thread
|
|
6
|
+
* (#2527 follow-up).
|
|
7
|
+
*
|
|
8
|
+
* The Rust panic hook (`rust/wasm-bindings/src/utils.rs`) stashes
|
|
9
|
+
* `{ location, at }` on whichever realm's JS global it runs in — `self` in a
|
|
10
|
+
* worker, `window` on the main thread. #2527 taught the main thread to read
|
|
11
|
+
* its OWN global's stash and attach it to a trap's exception event
|
|
12
|
+
* (`apps/viewer/src/lib/analytics-scrub.ts`'s `attachWasmPanicLocation`), but
|
|
13
|
+
* a worker-realm trap leaves that stash stranded in the worker's global,
|
|
14
|
+
* which the main thread can never see across the realm boundary.
|
|
15
|
+
*
|
|
16
|
+
* `takeWasmPanicStash` reads + consumes the stash worker-side so it can ride
|
|
17
|
+
* the worker's own `{type:'error'}` message; `restashWasmPanicLocation`
|
|
18
|
+
* re-plants it on the main thread's global so the EXISTING #2527 gate (same
|
|
19
|
+
* key, same TTL, same consume-once semantics) picks it up unmodified.
|
|
20
|
+
*
|
|
21
|
+
* Location only, never the panic's message — the message can embed
|
|
22
|
+
* model-derived text (see `utils.rs`'s privacy contract); the location alone
|
|
23
|
+
* travels on the error message and through this module.
|
|
24
|
+
*
|
|
25
|
+
* NOTE: this file is intentionally byte-identical to
|
|
26
|
+
* `packages/geometry/src/wasm-panic-forward.ts` — both `@ifc-lite/geometry`
|
|
27
|
+
* and `@ifc-lite/parser` need the exact same realm-forwarding contract, and
|
|
28
|
+
* neither package depends on the other (nor is `@ifc-lite/wasm`, the one
|
|
29
|
+
* package both DO depend on, a safe home: it ships only the wasm-pack build
|
|
30
|
+
* output, with no TypeScript build step of its own, and `test`/`typecheck`
|
|
31
|
+
* for either consumer already runs its build via turbo's `^build` — adding a
|
|
32
|
+
* hand-written TS module there would make every geometry/parser test run
|
|
33
|
+
* gate on a full Rust→wasm rebuild). Keep any change to one copy in lockstep
|
|
34
|
+
* with the other; `wasm-panic-forward.test.ts` is duplicated the same way.
|
|
35
|
+
*/
|
|
36
|
+
/** Kept in lockstep with `PANIC_STASH_KEY` in `rust/wasm-bindings/src/utils.rs`,
|
|
37
|
+
* `WASM_PANIC_STASH_KEY` in `apps/viewer/src/lib/analytics-scrub.ts`, and this
|
|
38
|
+
* module's twin at `packages/geometry/src/wasm-panic-forward.ts`. */
|
|
39
|
+
export const WASM_PANIC_STASH_KEY = '__ifclite_wasm_panic';
|
|
40
|
+
/**
|
|
41
|
+
* Trap-shape text match, kept in lockstep with `WASM_TRAP_TEXT` in
|
|
42
|
+
* `apps/viewer/src/lib/analytics-scrub.ts` and this module's twin at
|
|
43
|
+
* `packages/geometry/src/wasm-panic-forward.ts`. Deliberately excludes bare
|
|
44
|
+
* "unreachable" inside network-failure phrasing ("network is unreachable",
|
|
45
|
+
* "host unreachable") — those are not wasm traps.
|
|
46
|
+
*/
|
|
47
|
+
const WASM_TRAP_TEXT = /(?<!network is |host |destination |address )\bunreachable\b|\bRuntimeError\b|memory access out of bounds|index out of bounds|indirect call to null|integer (?:overflow|divide by zero)|call stack exhausted/i;
|
|
48
|
+
function looksLikeWasmTrap(message) {
|
|
49
|
+
return WASM_TRAP_TEXT.test(message);
|
|
50
|
+
}
|
|
51
|
+
/** Validate + narrow an unknown stash value read off a realm global. */
|
|
52
|
+
function readStashShape(value) {
|
|
53
|
+
if (typeof value !== 'object' || value === null)
|
|
54
|
+
return undefined;
|
|
55
|
+
const { location, at } = value;
|
|
56
|
+
if (typeof location !== 'string' || location === '')
|
|
57
|
+
return undefined;
|
|
58
|
+
// Reject non-finite (`NaN`/`Infinity`) and future timestamps — both pass
|
|
59
|
+
// the analytics TTL gate's `Date.now() - at <= TTL` check trivially
|
|
60
|
+
// (`Infinity` makes the delta `-Infinity`; a future `at` makes it
|
|
61
|
+
// negative), which would let a malformed stash label a later trap.
|
|
62
|
+
if (typeof at !== 'number' || !Number.isFinite(at) || at > Date.now())
|
|
63
|
+
return undefined;
|
|
64
|
+
return { location, at };
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Worker-side: read and CONSUME this realm's panic stash so it can be
|
|
68
|
+
* forwarded on the worker's own error message. Consume-once regardless of
|
|
69
|
+
* shape validity — an unconsumed malformed stash must not linger to
|
|
70
|
+
* mislabel a later trap, mirroring the main-thread gate's own rule.
|
|
71
|
+
*/
|
|
72
|
+
export function takeWasmPanicStash(realm) {
|
|
73
|
+
const g = realm;
|
|
74
|
+
const raw = g[WASM_PANIC_STASH_KEY];
|
|
75
|
+
delete g[WASM_PANIC_STASH_KEY];
|
|
76
|
+
return readStashShape(raw);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Main-side: re-plant a worker-forwarded stash on this realm's global so the
|
|
80
|
+
* existing #2527 `attachWasmPanicLocation` gate consumes it unmodified.
|
|
81
|
+
*
|
|
82
|
+
* Gated on `errorMessage` looking like a wasm trap: the worker forwards
|
|
83
|
+
* `wasmPanicLocation`/`wasmPanicAt` on ANY `{type:'error'}` message (a stale
|
|
84
|
+
* stash from an earlier suppressed panic can ride out on an ordinary,
|
|
85
|
+
* non-trap worker error), and re-planting unconditionally would let that
|
|
86
|
+
* stale location sit on `globalThis` until an unrelated trap-shaped
|
|
87
|
+
* exception consumed it — mislabeling that trap. Only a message that itself
|
|
88
|
+
* looks like a wasm trap is allowed to re-plant.
|
|
89
|
+
*
|
|
90
|
+
* Never clobbers an existing, unconsumed stash — a genuine main-thread trap
|
|
91
|
+
* that hasn't been captured yet must win over a worker trap that merely
|
|
92
|
+
* arrived first (the older-looking stash, if stale, is simply dropped later
|
|
93
|
+
* by the TTL check at attach time; this function never overwrites either
|
|
94
|
+
* way).
|
|
95
|
+
*/
|
|
96
|
+
export function restashWasmPanicLocation(realm, location, at, errorMessage) {
|
|
97
|
+
const stash = readStashShape({ location, at });
|
|
98
|
+
if (!stash)
|
|
99
|
+
return;
|
|
100
|
+
if (!looksLikeWasmTrap(errorMessage))
|
|
101
|
+
return;
|
|
102
|
+
const g = realm;
|
|
103
|
+
if (g[WASM_PANIC_STASH_KEY] !== undefined)
|
|
104
|
+
return;
|
|
105
|
+
g[WASM_PANIC_STASH_KEY] = stash;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=wasm-panic-forward.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm-panic-forward.js","sourceRoot":"","sources":["../src/wasm-panic-forward.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;sEAEsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,cAAc,GAClB,8MAA8M,CAAC;AAEjN,SAAS,iBAAiB,CAAC,OAAe;IACxC,OAAO,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAOD,wEAAwE;AACxE,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAClE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,KAA6C,CAAC;IACvE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IACtE,yEAAyE;IACzE,oEAAoE;IACpE,kEAAkE;IAClE,mEAAmE;IACnE,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC;IACxF,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,MAAM,GAAG,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAAC;IACpC,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC/B,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAa,EACb,QAAiB,EACjB,EAAW,EACX,YAAoB;IAEpB,MAAM,KAAK,GAAG,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC;QAAE,OAAO;IAC7C,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,IAAI,CAAC,CAAC,oBAAoB,CAAC,KAAK,SAAS;QAAE,OAAO;IAClD,CAAC,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-parser.d.ts","sourceRoot":"","sources":["../src/worker-parser.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"worker-parser.d.ts","sourceRoot":"","sources":["../src/worker-parser.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAQnC,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,6EAA6E;IAC7E,SAAS,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IACzB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAChD;;;;OAIG;IACH,OAAO,CAAC,iBAAiB,CAIT;IAEhB;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,IAAI,OAAO;gBAOjB,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,GAAG,GAAG,MAAM,CAAA;KAAO;IAQtD;;;;;;OAMG;IACH,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC;IA8IlG;;;;;OAKG;IACH,cAAc,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI;IAiBjF,gEAAgE;IAChE,SAAS,IAAI,IAAI;CAMlB"}
|
package/dist/worker-parser.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
import { fromTransport, } from './data-store-transport.js';
|
|
5
5
|
import { contiguousSourceBytes } from './source-bytes.js';
|
|
6
|
+
import { restashWasmPanicLocation } from './wasm-panic-forward.js';
|
|
6
7
|
export class WorkerParser {
|
|
7
8
|
worker = null;
|
|
8
9
|
requestCounter = 0;
|
|
@@ -121,6 +122,12 @@ export class WorkerParser {
|
|
|
121
122
|
return;
|
|
122
123
|
}
|
|
123
124
|
case 'error':
|
|
125
|
+
// #2527 follow-up: re-plant the worker realm's panic-location
|
|
126
|
+
// stash (if this error was a wasm trap) on THIS realm's global,
|
|
127
|
+
// before the rejection below propagates, so
|
|
128
|
+
// `attachWasmPanicLocation` in analytics-scrub.ts sees it
|
|
129
|
+
// exactly as it would a main-thread trap.
|
|
130
|
+
restashWasmPanicLocation(globalThis, msg.wasmPanicLocation, msg.wasmPanicAt, msg.message);
|
|
124
131
|
settle(() => {
|
|
125
132
|
worker.terminate();
|
|
126
133
|
this.worker = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-parser.js","sourceRoot":"","sources":["../src/worker-parser.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAqB/D,OAAO,EACL,aAAa,GAGd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"worker-parser.js","sourceRoot":"","sources":["../src/worker-parser.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAqB/D,OAAO,EACL,aAAa,GAGd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAenE,MAAM,OAAO,YAAY;IACf,MAAM,GAAkB,IAAI,CAAC;IAC7B,cAAc,GAAG,CAAC,CAAC;IACV,SAAS,CAAsB;IAChD;;;;OAIG;IACK,iBAAiB,GAId,IAAI,CAAC;IAEhB;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW;QAChB,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,KAAK,CAAC;QAChD,IAAI,OAAO,iBAAiB,KAAK,WAAW;YAA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,EAAE,OAAO,CAAC,kBAAkB;aAC/C,CAAC;YACF,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,GAAgB,EAAE,MAAmB,EAAE,OAAoB;QACxE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,iBAAiB,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;YAClD,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBACtB,IAAI,EAAE,kBAAkB;gBACxB,GAAG;gBACH,MAAM;gBACN,OAAO;aACR,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED,gEAAgE;IAChE,SAAS;QACP,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/parser",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "IFC/STEP parser for IFC-Lite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"fflate": "^0.8.3",
|
|
21
21
|
"jszip": "^3.10.0",
|
|
22
|
-
"@ifc-lite/data": "^3.
|
|
22
|
+
"@ifc-lite/data": "^3.3.0",
|
|
23
23
|
"@ifc-lite/encoding": "^2.0.0",
|
|
24
|
-
"@ifc-lite/ifcx": "^2.3.
|
|
25
|
-
"@ifc-lite/wasm": "^4.
|
|
24
|
+
"@ifc-lite/ifcx": "^2.3.5",
|
|
25
|
+
"@ifc-lite/wasm": "^4.5.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "^6.0.3",
|