@hydranium/core 1.0.0-next.289 → 1.0.0-next.298
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/README.md +1 -0
- package/lib/browser/index.d.ts +10 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +14 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/indexeddb-file-system-store.d.ts +82 -0
- package/lib/browser/indexeddb-file-system-store.d.ts.map +1 -0
- package/lib/browser/indexeddb-file-system-store.js +181 -0
- package/lib/browser/indexeddb-file-system-store.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts +39 -31
- package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -1
- package/lib/langium/ast-extension/ast-extension-service.js +45 -19
- package/lib/langium/ast-extension/ast-extension-service.js.map +1 -1
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +8 -8
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -1
- package/lib/langium/build-phase-pass/build-phase-pass-service.js +25 -16
- package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -1
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts +19 -7
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -1
- package/lib/langium/build-phase-pass/build-phase-pass.js +20 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.js +11 -40
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -1
- package/lib/langium/residency/cst-residency-service.js +1 -1
- package/lib/langium/workspace/persistent-file-system-provider.d.ts +8 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -1
- package/lib/langium/workspace/persistent-file-system-provider.js +11 -0
- package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -1
- package/package.json +14 -9
- package/src/browser/index.ts +14 -0
- package/src/browser/indexeddb-file-system-store.ts +192 -0
- package/src/langium/ast-extension/ast-extension-service.ts +74 -41
- package/src/langium/build-phase-pass/build-phase-pass-service.ts +28 -18
- package/src/langium/build-phase-pass/build-phase-pass.ts +36 -7
- package/src/langium/document-builder/build-pipeline-integration.ts +11 -42
- package/src/langium/residency/cst-residency-service.ts +1 -1
- package/src/langium/workspace/persistent-file-system-provider.ts +11 -0
|
@@ -29,7 +29,7 @@ import { type BuildPhasePass, type BuildPhasePassRegistry } from './build-phase-
|
|
|
29
29
|
*/
|
|
30
30
|
export interface BuildPhasePassService extends BuildPhasePassRegistry {
|
|
31
31
|
/**
|
|
32
|
-
* Run every pass declaring `phase
|
|
32
|
+
* Run every pass declaring `phase`, in priority order,
|
|
33
33
|
* sequentially — each pass is awaited before the next begins. The cancel
|
|
34
34
|
* token is checked before each pass so a preempted build stops cleanly.
|
|
35
35
|
* No-ops when no pass targets the phase. Called by
|
|
@@ -48,8 +48,8 @@ export type BuildPhasePassServiceOptions = LogNameOptions;
|
|
|
48
48
|
* `BuildPipelineIntegration`,
|
|
49
49
|
* which calls {@link runPasses} from its `onBuildPhase` listeners.
|
|
50
50
|
*
|
|
51
|
-
* **Performance:** {@link runPasses} shares the bucket-by-
|
|
52
|
-
* with the AST-extension service — the per-
|
|
51
|
+
* **Performance:** {@link runPasses} shares the bucket-by-phase cache pattern
|
|
52
|
+
* with the AST-extension service — the per-phase pass list is rebuilt lazily
|
|
53
53
|
* only after a register / unregister, so steady-state dispatch allocates
|
|
54
54
|
* nothing and early-outs when no pass targets the phase.
|
|
55
55
|
*
|
|
@@ -60,18 +60,18 @@ export type BuildPhasePassServiceOptions = LogNameOptions;
|
|
|
60
60
|
*/
|
|
61
61
|
export declare class DefaultBuildPhasePassService implements BuildPhasePassService {
|
|
62
62
|
protected readonly passes: Registry<BuildPhasePass>;
|
|
63
|
-
/** Per-
|
|
64
|
-
protected
|
|
65
|
-
protected
|
|
63
|
+
/** Per-phase bucket of passes targeting each phase, rebuilt lazily on the first run after a registry mutation. */
|
|
64
|
+
protected phaseBuckets: Map<DocumentState, readonly BuildPhasePass[]>;
|
|
65
|
+
protected phaseBucketsFor: readonly BuildPhasePass[] | undefined;
|
|
66
66
|
protected readonly tracer: Tracer;
|
|
67
67
|
constructor(services: ServerSharedServices, options?: BuildPhasePassServiceOptions);
|
|
68
68
|
register(pass: BuildPhasePass): Disposable;
|
|
69
69
|
runPasses(documents: readonly LangiumDocument[], phase: DocumentState, cancelToken: CancellationToken): Promise<void>;
|
|
70
70
|
/**
|
|
71
|
-
* Bucket-by-
|
|
71
|
+
* Bucket-by-phase view of {@link passes}, rebuilt lazily when the registry's
|
|
72
72
|
* cached `all()` reference changes. Each bucket preserves the registry's
|
|
73
73
|
* priority order (`Registry.all()` is already priority-sorted).
|
|
74
74
|
*/
|
|
75
|
-
protected
|
|
75
|
+
protected getPhaseBucket(phase: DocumentState): readonly BuildPhasePass[];
|
|
76
76
|
}
|
|
77
77
|
//# sourceMappingURL=build-phase-pass-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-phase-pass-service.d.ts","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"build-ph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AU,CAYzC;IAEK,SAAS,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB1H;IAED;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,cAAc,EAAE,CAgBxE;CACH"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { Logger } from '@hydranium/protocol';
|
|
10
10
|
import { DocumentState } from '@hydranium/langium';
|
|
11
11
|
import { Registry } from '../../util/registry.js';
|
|
12
|
+
import { BuildPassPhase } from './build-phase-pass.js';
|
|
12
13
|
/**
|
|
13
14
|
* Default {@link BuildPhasePassService}. Generic registry for batch-level
|
|
14
15
|
* build-phase work, the `onBuildPhase` sibling of
|
|
@@ -18,8 +19,8 @@ import { Registry } from '../../util/registry.js';
|
|
|
18
19
|
* `BuildPipelineIntegration`,
|
|
19
20
|
* which calls {@link runPasses} from its `onBuildPhase` listeners.
|
|
20
21
|
*
|
|
21
|
-
* **Performance:** {@link runPasses} shares the bucket-by-
|
|
22
|
-
* with the AST-extension service — the per-
|
|
22
|
+
* **Performance:** {@link runPasses} shares the bucket-by-phase cache pattern
|
|
23
|
+
* with the AST-extension service — the per-phase pass list is rebuilt lazily
|
|
23
24
|
* only after a register / unregister, so steady-state dispatch allocates
|
|
24
25
|
* nothing and early-outs when no pass targets the phase.
|
|
25
26
|
*
|
|
@@ -30,9 +31,9 @@ import { Registry } from '../../util/registry.js';
|
|
|
30
31
|
*/
|
|
31
32
|
export class DefaultBuildPhasePassService {
|
|
32
33
|
passes = new Registry();
|
|
33
|
-
/** Per-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
/** Per-phase bucket of passes targeting each phase, rebuilt lazily on the first run after a registry mutation. */
|
|
35
|
+
phaseBuckets = new Map();
|
|
36
|
+
phaseBucketsFor;
|
|
36
37
|
tracer;
|
|
37
38
|
constructor(services, options = {}) {
|
|
38
39
|
this.tracer = services.Tracer.for(options.logName ?? 'BuildPhasePass').trace('instantiated');
|
|
@@ -46,10 +47,18 @@ export class DefaultBuildPhasePassService {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
register(pass) {
|
|
50
|
+
// A phase outside the wired set type-checks only past a cast, and a pass
|
|
51
|
+
// there is accepted and never fires.
|
|
52
|
+
if (!BuildPassPhase.all().includes(pass.phase)) {
|
|
53
|
+
throw new Error(`Build-phase pass '${pass.id}' registered at phase ${DocumentState[pass.phase]} would never fire. ` +
|
|
54
|
+
`Allowed phases are ${BuildPassPhase.all()
|
|
55
|
+
.map(phase => DocumentState[phase])
|
|
56
|
+
.join(', ')}.`);
|
|
57
|
+
}
|
|
49
58
|
return this.passes.register(pass);
|
|
50
59
|
}
|
|
51
60
|
async runPasses(documents, phase, cancelToken) {
|
|
52
|
-
const bucket = this.
|
|
61
|
+
const bucket = this.getPhaseBucket(phase);
|
|
53
62
|
if (bucket.length === 0) {
|
|
54
63
|
return;
|
|
55
64
|
}
|
|
@@ -75,28 +84,28 @@ export class DefaultBuildPhasePassService {
|
|
|
75
84
|
session?.report('debug');
|
|
76
85
|
}
|
|
77
86
|
/**
|
|
78
|
-
* Bucket-by-
|
|
87
|
+
* Bucket-by-phase view of {@link passes}, rebuilt lazily when the registry's
|
|
79
88
|
* cached `all()` reference changes. Each bucket preserves the registry's
|
|
80
89
|
* priority order (`Registry.all()` is already priority-sorted).
|
|
81
90
|
*/
|
|
82
|
-
|
|
91
|
+
getPhaseBucket(phase) {
|
|
83
92
|
const current = this.passes.all();
|
|
84
|
-
if (this.
|
|
93
|
+
if (this.phaseBucketsFor !== current) {
|
|
85
94
|
const next = new Map();
|
|
86
95
|
for (const pass of current) {
|
|
87
|
-
let bucket = next.get(pass.
|
|
96
|
+
let bucket = next.get(pass.phase);
|
|
88
97
|
if (!bucket) {
|
|
89
98
|
bucket = [];
|
|
90
|
-
next.set(pass.
|
|
99
|
+
next.set(pass.phase, bucket);
|
|
91
100
|
}
|
|
92
101
|
bucket.push(pass);
|
|
93
102
|
}
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
103
|
+
this.phaseBuckets = next;
|
|
104
|
+
this.phaseBucketsFor = current;
|
|
96
105
|
}
|
|
97
|
-
return this.
|
|
106
|
+
return this.phaseBuckets.get(phase) ?? EMPTY_PHASE_BUCKET;
|
|
98
107
|
}
|
|
99
108
|
}
|
|
100
|
-
/** Shared empty result so `
|
|
101
|
-
const
|
|
109
|
+
/** Shared empty result so `getPhaseBucket` doesn't allocate per call on the cold path. */
|
|
110
|
+
const EMPTY_PHASE_BUCKET = Object.freeze([]);
|
|
102
111
|
//# sourceMappingURL=build-phase-pass-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-phase-pass-service.js","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAwB,MAAM,oBAAoB,CAAC;AAIzE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-phase-pass-service.js","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAwB,MAAM,oBAAoB,CAAC;AAIzE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAoD,cAAc,EAAE,MAAM,uBAAuB,CAAC;AA8BzG;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,4BAA4B;IACnB,MAAM,GAAG,IAAI,QAAQ,EAAkB,CAAC;IAC3D,kHAAkH;IACxG,YAAY,GAAG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AE,MAAM,CAAC,CAAC;gBAChC,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;YACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;QAClC,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC;IAC7D,CAAC;CACH;AAED,0FAA0F;AAC1F,MAAM,kBAAkB,GAA8B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -6,9 +6,25 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import {
|
|
9
|
+
import { DocumentState, type LangiumCoreServices, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
10
10
|
import { type CancellationToken, type Disposable } from 'vscode-languageserver';
|
|
11
11
|
import { type RegistryItem } from '../../util/registry.js';
|
|
12
|
+
/**
|
|
13
|
+
* The build phases a {@link BuildPhasePass} may fire at: every phase after
|
|
14
|
+
* `Changed`, which has no AST yet. `IndexedContent` is one, unlike for an
|
|
15
|
+
* `AstExtension`: per document it carries nothing `Parsed` does, but per
|
|
16
|
+
* batch it is the only phase meaning the global index is whole again, which
|
|
17
|
+
* batch work keyed on a complete index has nowhere else to run.
|
|
18
|
+
*/
|
|
19
|
+
export type BuildPassPhase = DocumentState.Parsed | DocumentState.IndexedContent | DocumentState.ComputedScopes | DocumentState.Linked | DocumentState.IndexedReferences | DocumentState.Validated;
|
|
20
|
+
export declare namespace BuildPassPhase {
|
|
21
|
+
/**
|
|
22
|
+
* Every {@link BuildPassPhase}, in build order. `BuildPipelineIntegration`
|
|
23
|
+
* wires one `onBuildPhase` listener per entry and `register` refuses a phase
|
|
24
|
+
* outside it, so the two cannot drift apart. A fresh array each call.
|
|
25
|
+
*/
|
|
26
|
+
function all(): readonly BuildPassPhase[];
|
|
27
|
+
}
|
|
12
28
|
/**
|
|
13
29
|
* A unit of whole-batch work run once per build when the batch reaches a
|
|
14
30
|
* declared build phase, ordered by {@link RegistryItem.priority}.
|
|
@@ -44,12 +60,8 @@ import { type RegistryItem } from '../../util/registry.js';
|
|
|
44
60
|
* rather than running the remaining passes against a doomed build.
|
|
45
61
|
*/
|
|
46
62
|
export interface BuildPhasePass extends RegistryItem {
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
* wires a listener for the same phase set as AST extension; a pass declaring
|
|
50
|
-
* any other state type-checks but never fires.
|
|
51
|
-
*/
|
|
52
|
-
state: DocumentState;
|
|
63
|
+
/** The single build phase whose `onBuildPhase` fires this pass. */
|
|
64
|
+
phase: BuildPassPhase;
|
|
53
65
|
/**
|
|
54
66
|
* Run this pass against the whole built batch. May mutate and reparse
|
|
55
67
|
* documents — the framework's integrity pass does — or derive cross-document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-phase-pass.d.ts","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"build-phase-pass.d.ts","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACrB,aAAa,CAAC,MAAM,GACpB,aAAa,CAAC,cAAc,GAC5B,aAAa,CAAC,cAAc,GAC5B,aAAa,CAAC,MAAM,GACpB,aAAa,CAAC,iBAAiB,GAC/B,aAAa,CAAC,SAAS,CAAC;AAE7B,yBAAiB,cAAc,CAAC;IAC7B;;;;OAIG;IACH,SAAgB,GAAG,IAAI,SAAS,cAAc,EAAE,CAS/C;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,cAAe,SAAQ,YAAY;IACjD,mEAAmE;IACnE,KAAK,EAAE,cAAc,CAAC;IACtB;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,SAAS,mBAAmB,EAC3E,QAAQ,EAAE;IAAE,eAAe,EAAE;QAAE,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC;QAAC,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS,CAAA;KAAE,CAAA;CAAE,EACnG,SAAS,EAAE,SAAS,eAAe,EAAE,GACrC,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,CAAC,CAenC;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACpC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,0BAA0B;IACxC,wBAAwB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACnE"}
|
|
@@ -6,6 +6,26 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
+
import { DocumentState } from '@hydranium/langium';
|
|
10
|
+
export var BuildPassPhase;
|
|
11
|
+
(function (BuildPassPhase) {
|
|
12
|
+
/**
|
|
13
|
+
* Every {@link BuildPassPhase}, in build order. `BuildPipelineIntegration`
|
|
14
|
+
* wires one `onBuildPhase` listener per entry and `register` refuses a phase
|
|
15
|
+
* outside it, so the two cannot drift apart. A fresh array each call.
|
|
16
|
+
*/
|
|
17
|
+
function all() {
|
|
18
|
+
return [
|
|
19
|
+
DocumentState.Parsed,
|
|
20
|
+
DocumentState.IndexedContent,
|
|
21
|
+
DocumentState.ComputedScopes,
|
|
22
|
+
DocumentState.Linked,
|
|
23
|
+
DocumentState.IndexedReferences,
|
|
24
|
+
DocumentState.Validated
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
BuildPassPhase.all = all;
|
|
28
|
+
})(BuildPassPhase || (BuildPassPhase = {}));
|
|
9
29
|
/**
|
|
10
30
|
* Group a build batch by the language that owns each document, preserving the
|
|
11
31
|
* batch's order within each group.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-phase-pass.js","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;
|
|
1
|
+
{"version":3,"file":"build-phase-pass.js","sourceRoot":"","sources":["../../../src/langium/build-phase-pass/build-phase-pass.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAA4D,MAAM,oBAAoB,CAAC;AAmB7G,MAAM,KAAW,cAAc,CAgB9B;AAhBD,WAAiB,cAAc;IAC5B;;;;OAIG;IACH,SAAgB,GAAG;QAChB,OAAO;YACJ,aAAa,CAAC,MAAM;YACpB,aAAa,CAAC,cAAc;YAC5B,aAAa,CAAC,cAAc;YAC5B,aAAa,CAAC,MAAM;YACpB,aAAa,CAAC,iBAAiB;YAC/B,aAAa,CAAC,SAAS;SACzB,CAAC;IACL,CAAC;IATe,eAAA,GAAG,MASlB,CAAA;AACJ,CAAC,EAhBgB,cAAc,KAAd,cAAc,QAgB9B;AAgDD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,wBAAwB,CACrC,QAAmG,EACnG,SAAqC;IAErC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgC,CAAC;IACxD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACvD,SAAS;QACZ,CAAC;QACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,KAAK,EAAE,CAAC;YACT,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;aAAM,CAAC;YACL,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrC,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-pipeline-integration.d.ts","sourceRoot":"","sources":["../../../src/langium/document-builder/build-pipeline-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-pipeline-integration.d.ts","sourceRoot":"","sources":["../../../src/langium/document-builder/build-pipeline-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI/D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGzD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAE7C,iEAAiE;AACjE,MAAM,WAAW,+BAA+B;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;;;;GASG;AAEH,MAAM,WAAW,wBAAwB;CAAG;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,+BAAgC,YAAW,wBAAwB;IAE1E,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB;IADpD,YACsB,QAAQ,EAAE,oBAAoB,EACjD,OAAO,GAAE,+BAAoC,EA4D/C;IAMD;;;;;;;;;;OAUG;IACH,UAAgB,aAAa,CAC1B,SAAS,EAAE,SAAS,eAAe,EAAE,EACrC,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,iBAAiB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAUf;IAED;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI,CAIjC;IAED,oFAAoF;IACpF,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAEzG;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAElI;CACH"}
|
|
@@ -8,42 +8,9 @@
|
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
import { DocumentState } from '@hydranium/langium';
|
|
10
10
|
import { IntegrityPhase } from '../integrity/integrity-rule.js';
|
|
11
|
-
import {
|
|
11
|
+
import { AstExtensionPhase } from '../ast-extension/ast-extension-service.js';
|
|
12
|
+
import { BuildPassPhase, groupDocumentsByLanguage } from '../build-phase-pass/build-phase-pass.js';
|
|
12
13
|
import { labelPhaseListener } from './labeled-phase-listener.js';
|
|
13
|
-
/**
|
|
14
|
-
* AST extension wiring covers every "useful" `DocumentState` an extension can
|
|
15
|
-
* target. `Changed` has no AST yet; `IndexedContent` carries the same
|
|
16
|
-
* per-document information as `Parsed`. No-op fires for documents with no
|
|
17
|
-
* extension at a given state are negligible (`notifyDocumentPhase` is a plain
|
|
18
|
-
* listener loop), so the framework wires the full set unconditionally rather
|
|
19
|
-
* than collecting declared states from per-language registrations.
|
|
20
|
-
*/
|
|
21
|
-
const AST_EXTENSION_PHASES = [
|
|
22
|
-
DocumentState.Parsed,
|
|
23
|
-
DocumentState.ComputedScopes,
|
|
24
|
-
DocumentState.Linked,
|
|
25
|
-
DocumentState.IndexedReferences,
|
|
26
|
-
DocumentState.Validated
|
|
27
|
-
];
|
|
28
|
-
/**
|
|
29
|
-
* Build phases at which the `BuildPhasePassService` is driven. A pass
|
|
30
|
-
* registered at any other state never fires (the listener is not wired), and
|
|
31
|
-
* `runPasses` no-ops at a phase with no registered pass, so wiring the full set
|
|
32
|
-
* unconditionally costs only an empty-bucket check per phase.
|
|
33
|
-
*
|
|
34
|
-
* `IndexedContent` belongs here and NOT in {@link AST_EXTENSION_PHASES}, so the
|
|
35
|
-
* two cannot be collapsed. Per document it carries nothing `Parsed` does; per
|
|
36
|
-
* BATCH it is the only phase meaning the global index is whole again, which
|
|
37
|
-
* batch work keyed on a complete index has nowhere else to run.
|
|
38
|
-
*/
|
|
39
|
-
const BUILD_PHASE_PASS_STATES = [
|
|
40
|
-
DocumentState.Parsed,
|
|
41
|
-
DocumentState.IndexedContent,
|
|
42
|
-
DocumentState.ComputedScopes,
|
|
43
|
-
DocumentState.Linked,
|
|
44
|
-
DocumentState.IndexedReferences,
|
|
45
|
-
DocumentState.Validated
|
|
46
|
-
];
|
|
47
14
|
/**
|
|
48
15
|
* Default priority of the framework integrity passes. Integrity mutates / cleans
|
|
49
16
|
* the AST that every derived-state pass reads, so it is *foundational* and must
|
|
@@ -98,16 +65,18 @@ export class DefaultBuildPipelineIntegration {
|
|
|
98
65
|
for (const phase of IntegrityPhase.all()) {
|
|
99
66
|
passes.register({
|
|
100
67
|
id: `framework:integrity:${IntegrityPhase.toString(phase).toLowerCase()}`,
|
|
101
|
-
|
|
68
|
+
phase,
|
|
102
69
|
priority: integrityPriority,
|
|
103
70
|
run: (documents, cancelToken) => this.callIntegrity(documents, phase, cancelToken)
|
|
104
71
|
});
|
|
105
72
|
}
|
|
106
|
-
// One onBuildPhase listener per pass
|
|
73
|
+
// One onBuildPhase listener per pass phase, routed through the overridable
|
|
107
74
|
// `runBuildPhase` seam → priority-ordered, sequential, cancel-aware pass
|
|
108
75
|
// dispatch. The returned promise is awaited by the build pipeline, so a
|
|
109
|
-
// mutating pass (integrity) reparses before the build advances.
|
|
110
|
-
|
|
76
|
+
// mutating pass (integrity) reparses before the build advances. The full
|
|
77
|
+
// set is wired unconditionally: `runPasses` no-ops at a phase with no
|
|
78
|
+
// pass, so an unused listener costs one empty-bucket check.
|
|
79
|
+
for (const phase of BuildPassPhase.all()) {
|
|
111
80
|
builder.onBuildPhase(phase, labelPhaseListener((documents, cancelToken) => this.runBuildPhase(documents, phase, cancelToken), `BuildPipeline.runBuildPhase.${DocumentState[phase]}`));
|
|
112
81
|
}
|
|
113
82
|
// Per DOCUMENT as well: `reparseAndRelink` re-indexes one document from
|
|
@@ -118,7 +87,9 @@ export class DefaultBuildPipelineIntegration {
|
|
|
118
87
|
// unchanged by the build-phase-pass registry, which is batch-granular. The
|
|
119
88
|
// listener calls the `extendAst` seam directly (the document-phase analog of
|
|
120
89
|
// `runBuildPhase`); there is no per-phase handler tier — one parameterized seam.
|
|
121
|
-
for
|
|
90
|
+
// Wired for every phase unconditionally rather than for the phases the
|
|
91
|
+
// per-language registrations declare: a no-op fire is a plain listener loop.
|
|
92
|
+
for (const phase of AstExtensionPhase.all()) {
|
|
122
93
|
builder.onDocumentPhase(phase, labelPhaseListener((document, cancelToken) => this.extendAst(document, phase, cancelToken), `BuildPipeline.extendAst.${DocumentState[phase]}`));
|
|
123
94
|
}
|
|
124
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-pipeline-integration.js","sourceRoot":"","sources":["../../../src/langium/document-builder/build-pipeline-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAwB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"build-pipeline-integration.js","sourceRoot":"","sources":["../../../src/langium/document-builder/build-pipeline-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAwB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AAEnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAI,CAAC;AA2B7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,+BAA+B;IAEnB,QAAQ;IAD9B,YACsB,QAA8B,EACjD,OAAO,GAAoC,EAAE;wBAD1B,QAAQ;QAG3B,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC;QACnD,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,qBAAqB,CAAC;QAExD,2EAA2E;QAC3E,wEAAwE;QACxE,mEAAmE;QACnE,yEAAyE;QACzE,iEAAiE;QACjE,2BAA2B;QAC3B,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,uBAAuB,CAAC;QAC/E,KA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,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACjG,CAAC;CACH"}
|
|
@@ -159,7 +159,7 @@ export class DefaultCstResidencyService {
|
|
|
159
159
|
this.langiumDocs = services.workspace.LangiumDocuments;
|
|
160
160
|
services.workspace.BuildPhasePassService.register({
|
|
161
161
|
id: 'framework:cst-residency:shed',
|
|
162
|
-
|
|
162
|
+
phase: DocumentState.Validated,
|
|
163
163
|
priority: options.priority ?? CST_RESIDENCY_PASS_PRIORITY,
|
|
164
164
|
run: documents => this.onBuild(documents)
|
|
165
165
|
});
|
|
@@ -135,6 +135,14 @@ export declare class PersistentFileSystemProvider extends InMemoryFileSystemProv
|
|
|
135
135
|
* of marking it — a deletion that quietly undoes itself on the next load.
|
|
136
136
|
*/
|
|
137
137
|
protected readonly seededPaths: ReadonlySet<string>;
|
|
138
|
+
/**
|
|
139
|
+
* The store keys restored as CONTENT, in the store's order.
|
|
140
|
+
*
|
|
141
|
+
* A deletion marker is not listed: the store holds a key for a deleted seeded
|
|
142
|
+
* file, so a host counting stored keys would report that deletion as a
|
|
143
|
+
* restored file, and only this class can tell the two apart.
|
|
144
|
+
*/
|
|
145
|
+
readonly restoredPaths: readonly string[];
|
|
138
146
|
constructor(services: ServerSharedServicesMinimal, options: PersistentFileSystemOptions);
|
|
139
147
|
/**
|
|
140
148
|
* The sync twin, mirrored without waiting.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistent-file-system-provider.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/persistent-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAuB,KAAK,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,KAAK,cAAc,EAAE,0BAA0B,EAAE,KAAK,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEtI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,eAAe;IAC7B;;;OAGG;IACH,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,kEAAkE;IAClE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAYD,yFAAyF;AACzF,MAAM,WAAW,2BAA4B,SAAQ,yBAAyB;IAC3E,6EAA6E;IAC7E,KAAK,EAAE,eAAe,CAAC;IACvB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,qBAAa,4BAA6B,SAAQ,0BAA0B;IACzE,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAC1C;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IACtC;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"persistent-file-system-provider.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/persistent-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAuB,KAAK,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,KAAK,cAAc,EAAE,0BAA0B,EAAE,KAAK,yBAAyB,EAAE,MAA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C,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAKjD;IAED,uDAAuD;IACvD,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAEpC;IAED,4FAA4F;IAC5F,UAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;IAED;;;;OAIG;IACH,UAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9C;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CASnC;IAED,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAE9E;CACH;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC;IACvF,kBAAkB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,0BAA0B,CAAC;CACxE,CAAC,CAKD"}
|
|
@@ -80,11 +80,20 @@ export class PersistentFileSystemProvider extends InMemoryFileSystemProvider {
|
|
|
80
80
|
* of marking it — a deletion that quietly undoes itself on the next load.
|
|
81
81
|
*/
|
|
82
82
|
seededPaths;
|
|
83
|
+
/**
|
|
84
|
+
* The store keys restored as CONTENT, in the store's order.
|
|
85
|
+
*
|
|
86
|
+
* A deletion marker is not listed: the store holds a key for a deleted seeded
|
|
87
|
+
* file, so a host counting stored keys would report that deletion as a
|
|
88
|
+
* restored file, and only this class can tell the two apart.
|
|
89
|
+
*/
|
|
90
|
+
restoredPaths;
|
|
83
91
|
constructor(services, options) {
|
|
84
92
|
super(services, options);
|
|
85
93
|
this.store = options.store;
|
|
86
94
|
this.storeRoot = options.rootUri === undefined ? undefined : `${this.fileKey(options.rootUri)}/`;
|
|
87
95
|
this.seededPaths = new Set(Object.keys(options.seed ?? {}).map(path => this.storeKey(this.storeUri(path))));
|
|
96
|
+
const restoredPaths = [];
|
|
88
97
|
for (const [path, content] of Object.entries(options.restored ?? {})) {
|
|
89
98
|
// `super.*`, so restoring does not mirror straight back into the store
|
|
90
99
|
// it just came from — a write-back on every start, and one that would
|
|
@@ -100,8 +109,10 @@ export class PersistentFileSystemProvider extends InMemoryFileSystemProvider {
|
|
|
100
109
|
}
|
|
101
110
|
else {
|
|
102
111
|
super.setFile(uri, content);
|
|
112
|
+
restoredPaths.push(path);
|
|
103
113
|
}
|
|
104
114
|
}
|
|
115
|
+
this.restoredPaths = restoredPaths;
|
|
105
116
|
}
|
|
106
117
|
/**
|
|
107
118
|
* The sync twin, mirrored without waiting.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistent-file-system-provider.js","sourceRoot":"","sources":["../../../src/langium/workspace/persistent-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAoC,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAuB,0BAA0B,EAAkC,MAAM,qCAAqC,CAAC;AAqDtI;;;;;;;GAOG;AACH,MAAM,SAAS,GAAG,+BAA+B,CAAC;AAiBlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,4BAA6B,SAAQ,0BAA0B;IACtD,KAAK,CAAkB;IAC1C;;;OAGG;IACgB,SAAS,CAAU;IACtC;;;;;;;OAOG;IACgB,WAAW,CAAsB;
|
|
1
|
+
{"version":3,"file":"persistent-file-system-provider.js","sourceRoot":"","sources":["../../../src/langium/workspace/persistent-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;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E,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAES,kBAAkB,CAAC,SAAiB,EAAE,GAAQ,EAAE,KAAc;QACrE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,SAAS,IAAI,GAAG,CAAC,QAAQ,EAAE,KAAK,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnG,CAAC;CACH;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAoC;IAG5E,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5C,OAAO;QACJ,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,4BAA4B,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;KAC3H,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/core",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.298",
|
|
4
4
|
"description": "Foundational runtime of the hydranium framework: AST coordination layer (services, integrity, AST extension, serialization, multi-client documents) plus the LSP textual head at the /lsp subpath. Consumed by protocol-head packages (@hydranium/data-server, @hydranium/glsp-server).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"types": "./lib/lsp/index.d.ts",
|
|
45
45
|
"default": "./lib/lsp/index.js"
|
|
46
46
|
},
|
|
47
|
+
"./browser": {
|
|
48
|
+
"types": "./lib/browser/index.d.ts",
|
|
49
|
+
"default": "./lib/browser/index.js"
|
|
50
|
+
},
|
|
47
51
|
"./node": {
|
|
48
52
|
"types": "./lib/node/index.d.ts",
|
|
49
53
|
"default": "./lib/node/index.js"
|
|
@@ -71,22 +75,23 @@
|
|
|
71
75
|
"scripts": {
|
|
72
76
|
"audit:mutation": "stryker run",
|
|
73
77
|
"audit:mutation:quick": "stryker run --mutate src/langium/model-service/model-service.ts",
|
|
74
|
-
"build": "tsc -b",
|
|
75
|
-
"clean": "rimraf lib tsconfig.tsbuildinfo",
|
|
78
|
+
"build": "tsc -b tsconfig.browser.json",
|
|
79
|
+
"clean": "rimraf lib tsconfig.tsbuildinfo tsconfig.browser.tsbuildinfo",
|
|
76
80
|
"lint": "oxlint --format stylish --config ../../oxlint.config.cjs src test --max-warnings 0",
|
|
77
81
|
"prepack": "node -e \"const m=require('./package.json'),fs=require('node:fs');const missing=[m.main,...Object.values(m.bin||{})].filter(entry=>entry&&!fs.existsSync(entry));if(missing.length){console.error('prepack '+m.name+': not built ('+missing.join(', ')+' missing). Run the build before packing: a files entry that matches nothing is skipped silently, so the tarball would ship src only.');process.exit(1);}\"",
|
|
78
82
|
"test": "npm run typecheck:test && vitest run",
|
|
79
|
-
"typecheck:test": "tsc --noEmit -p tsconfig.test.json",
|
|
80
|
-
"watch": "tsc -b -w --preserveWatchOutput"
|
|
83
|
+
"typecheck:test": "tsc --noEmit -p tsconfig.test.json && tsc --noEmit -p tsconfig.browser.test.json",
|
|
84
|
+
"watch": "tsc -b tsconfig.browser.json -w --preserveWatchOutput"
|
|
81
85
|
},
|
|
82
86
|
"dependencies": {
|
|
83
87
|
"diff": "^5.2.0"
|
|
84
88
|
},
|
|
85
89
|
"devDependencies": {
|
|
86
|
-
"@hydranium/langium": "1.0.0-next.
|
|
87
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
90
|
+
"@hydranium/langium": "1.0.0-next.298",
|
|
91
|
+
"@hydranium/protocol": "1.0.0-next.298",
|
|
88
92
|
"@playwright/test": "^1.40.0",
|
|
89
93
|
"@types/diff": "^5.2.0",
|
|
94
|
+
"fake-indexeddb": "^6.2.5",
|
|
90
95
|
"rimraf": "^5.0.0",
|
|
91
96
|
"typescript": "^7.0.2",
|
|
92
97
|
"vscode-jsonrpc": "9.0.0",
|
|
@@ -96,8 +101,8 @@
|
|
|
96
101
|
"vscode-languageserver-types": "^3.17.5"
|
|
97
102
|
},
|
|
98
103
|
"peerDependencies": {
|
|
99
|
-
"@hydranium/langium": "1.0.0-next.
|
|
100
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
104
|
+
"@hydranium/langium": "1.0.0-next.298",
|
|
105
|
+
"@hydranium/protocol": "1.0.0-next.298",
|
|
101
106
|
"@playwright/test": "^1.40.0",
|
|
102
107
|
"vscode-jsonrpc": "^9.0.0",
|
|
103
108
|
"vscode-languageserver": "~10.0.1",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
// Worker-only entry (`@hydranium/core/browser`). Compiled as its own project
|
|
11
|
+
// against `lib.webworker`, so a worker global such as `indexedDB` resolves here
|
|
12
|
+
// and nowhere else in the package: the portable `.` barrel must stay free of
|
|
13
|
+
// DOM and worker globals, since it also loads in a plain Node consumer.
|
|
14
|
+
export * from './indexeddb-file-system-store.js';
|