@hydranium/cli 1.0.0-next.38 → 1.0.0-next.39
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EACT,kBAAkB,EAClB,kBAAkB,EAGpB,MAAM,0BAA0B,CAAC;AAIlC;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;CAC7C;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC7B,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,oBAAoB,GAAG,sBAAsB,CAAC,CAAC;IAC1G;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IAC9D,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC3C;AAiCD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,IAAI,CAIvE;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgE1E"}
|
package/lib/commands/watch.js
CHANGED
|
@@ -67,6 +67,21 @@ export async function runWatch(options) {
|
|
|
67
67
|
onDocumentSaved() {
|
|
68
68
|
// Persistence is out of band for the per-URI update view.
|
|
69
69
|
},
|
|
70
|
+
onDocumentDeleted(event) {
|
|
71
|
+
// In band, unlike the two neighbours: this is the end of the stream
|
|
72
|
+
// the view exists to show, and a consumer that never hears it waits
|
|
73
|
+
// forever for an update that cannot come. The line carries no
|
|
74
|
+
// `document`, so a reader must switch on shape rather than assume one.
|
|
75
|
+
if (event.uri !== options.uri) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
write(`${JSON.stringify(event)}\n`);
|
|
79
|
+
},
|
|
80
|
+
onDocumentsBuilt() {
|
|
81
|
+
// Out of band for a per-URI view by construction: this notification
|
|
82
|
+
// carries only documents nobody watches, and this command watches the
|
|
83
|
+
// one URI it was given.
|
|
84
|
+
},
|
|
70
85
|
onProjectsChanged() {
|
|
71
86
|
// Project lifecycle is out of band for the per-URI update view.
|
|
72
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../src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,iFAAiF;QACjF,+EAA+E;QAC/E,kEAAkE;QAClE,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAChF,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACjC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;YAAS,CAAC;QACR,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,YAAY,CACxB,MAAgG,EAChG,GAAW,EACX,QAAgB,EAChB,MAA+B;IAE/B,MAAM,MAAM,CAAC,kBAAkB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IACnD,IAAI,CAAC;QACF,MAAM,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;YAC/B,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;gBACnB,OAAO,EAAE,CAAC;gBACV,OAAO;YACV,CAAC;YACD,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;IACN,CAAC;YAAS,CAAC;QACR,MAAM,MAAM,CAAC,oBAAoB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/cli",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.39",
|
|
4
4
|
"description": "Build-time codegen tools + data-server subcommands for the hydranium framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hydranium",
|
|
@@ -65,20 +65,20 @@
|
|
|
65
65
|
"ts-morph": "^25.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@hydranium/core": "1.0.0-next.
|
|
69
|
-
"@hydranium/data-server": "1.0.0-next.
|
|
70
|
-
"@hydranium/langium": "1.0.0-next.
|
|
71
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
68
|
+
"@hydranium/core": "1.0.0-next.39",
|
|
69
|
+
"@hydranium/data-server": "1.0.0-next.39",
|
|
70
|
+
"@hydranium/langium": "1.0.0-next.39",
|
|
71
|
+
"@hydranium/protocol": "1.0.0-next.39",
|
|
72
72
|
"rimraf": "^5.0.0",
|
|
73
73
|
"typescript": "^5.8.0",
|
|
74
74
|
"vscode-jsonrpc": "9.0.1",
|
|
75
75
|
"vscode-languageserver": "~10.0.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@hydranium/core": "1.0.0-next.
|
|
79
|
-
"@hydranium/data-server": "1.0.0-next.
|
|
80
|
-
"@hydranium/langium": "1.0.0-next.
|
|
81
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
78
|
+
"@hydranium/core": "1.0.0-next.39",
|
|
79
|
+
"@hydranium/data-server": "1.0.0-next.39",
|
|
80
|
+
"@hydranium/langium": "1.0.0-next.39",
|
|
81
|
+
"@hydranium/protocol": "1.0.0-next.39",
|
|
82
82
|
"@memlab/core": "^2.0.3",
|
|
83
83
|
"@memlab/heap-analysis": "^2.0.3",
|
|
84
84
|
"vscode-jsonrpc": "9.0.1"
|
package/src/commands/watch.ts
CHANGED
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
|
|
10
10
|
import type { LogThreshold, TransferElement } from '@hydranium/protocol';
|
|
11
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
DataClientProtocol,
|
|
13
|
+
DataServerProtocol,
|
|
14
|
+
TransferDocumentDeletedEvent,
|
|
15
|
+
TransferDocumentUpdatedEvent
|
|
16
|
+
} from '@hydranium/protocol/data';
|
|
12
17
|
import { logLevelEnv } from '../log-level.js';
|
|
13
18
|
import { spawnDataServer } from '../spawn-data-server.js';
|
|
14
19
|
|
|
@@ -132,6 +137,21 @@ export async function runWatch(options: WatchCommandOptions): Promise<void> {
|
|
|
132
137
|
onDocumentSaved(): void {
|
|
133
138
|
// Persistence is out of band for the per-URI update view.
|
|
134
139
|
},
|
|
140
|
+
onDocumentDeleted(event: TransferDocumentDeletedEvent): void {
|
|
141
|
+
// In band, unlike the two neighbours: this is the end of the stream
|
|
142
|
+
// the view exists to show, and a consumer that never hears it waits
|
|
143
|
+
// forever for an update that cannot come. The line carries no
|
|
144
|
+
// `document`, so a reader must switch on shape rather than assume one.
|
|
145
|
+
if (event.uri !== options.uri) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
write(`${JSON.stringify(event)}\n`);
|
|
149
|
+
},
|
|
150
|
+
onDocumentsBuilt(): void {
|
|
151
|
+
// Out of band for a per-URI view by construction: this notification
|
|
152
|
+
// carries only documents nobody watches, and this command watches the
|
|
153
|
+
// one URI it was given.
|
|
154
|
+
},
|
|
135
155
|
onProjectsChanged(): void {
|
|
136
156
|
// Project lifecycle is out of band for the per-URI update view.
|
|
137
157
|
}
|