@vscode/component-explorer-cli 0.2.1-49 → 0.2.1-50
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/_virtual/_build-info.js +1 -1
- package/dist/comparison.d.ts.map +1 -1
- package/dist/comparison.js +7 -4
- package/dist/comparison.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js +3 -2
- package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/experimental/manualObserver.js +85 -0
- package/dist/external/vscode-observables/observables/dist/observableInternal/experimental/manualObserver.js.map +1 -0
- package/dist/external/vscode-observables/observables/dist/observableInternal/index.js +3 -3
- package/dist/external/vscode-observables/observables/dist/observableInternal/index.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js +171 -28
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js +9 -6
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js +11 -8
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js +7 -5
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js +16 -0
- package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/package.json +1 -1
package/dist/comparison.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparison.d.ts","sourceRoot":"","sources":["../src/comparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,E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O,CAAC,UAAU,CAAC,CAAC;CACpE;AAED,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDtF;AAMD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAiFpE"}
|
package/dist/comparison.js
CHANGED
|
@@ -170,6 +170,9 @@ async function writeComparisonReport(options) {
|
|
|
170
170
|
await fs.writeFile(reportDir.join(new RelativePath('report.md')).value, markdown);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
+
function encodeImagePath(path) {
|
|
174
|
+
return path.split('/').map(segment => encodeURIComponent(segment)).join('/');
|
|
175
|
+
}
|
|
173
176
|
function generateMarkdownReport(report) {
|
|
174
177
|
const lines = [];
|
|
175
178
|
const changed = Object.entries(report.fixtures).filter(([, d]) => d.status === 'changed').map(([id]) => id);
|
|
@@ -204,8 +207,8 @@ function generateMarkdownReport(report) {
|
|
|
204
207
|
lines.push('');
|
|
205
208
|
lines.push('| Baseline | Current |');
|
|
206
209
|
lines.push('|----------|---------|');
|
|
207
|
-
const baseImg = detail.baselineScreenshot ? `` : '-';
|
|
208
|
-
const curImg = detail.currentScreenshot ? `` : '-';
|
|
210
|
+
const baseImg = detail.baselineScreenshot ? `})` : '-';
|
|
211
|
+
const curImg = detail.currentScreenshot ? `})` : '-';
|
|
209
212
|
lines.push(`| ${baseImg} | ${curImg} |`);
|
|
210
213
|
lines.push('');
|
|
211
214
|
}
|
|
@@ -218,7 +221,7 @@ function generateMarkdownReport(report) {
|
|
|
218
221
|
lines.push(`### \`${id}\``);
|
|
219
222
|
lines.push('');
|
|
220
223
|
if (detail.currentScreenshot) {
|
|
221
|
-
lines.push(``);
|
|
224
|
+
lines.push(`})`);
|
|
222
225
|
}
|
|
223
226
|
lines.push('');
|
|
224
227
|
}
|
|
@@ -231,7 +234,7 @@ function generateMarkdownReport(report) {
|
|
|
231
234
|
lines.push(`### \`${id}\``);
|
|
232
235
|
lines.push('');
|
|
233
236
|
if (detail.baselineScreenshot) {
|
|
234
|
-
lines.push(``);
|
|
237
|
+
lines.push(`})`);
|
|
235
238
|
}
|
|
236
239
|
lines.push('');
|
|
237
240
|
}
|
package/dist/comparison.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparison.js","sources":["../src/comparison.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAmDA;;;;AAIG;AACI,eAAe,0BAA0B,CAC/C,kBAA+C,EAC/C,eAAkC,EAAA;IAElC,MAAM,KAAK,GAAa,EAAE;IAC1B,MAAM,OAAO,GAAa,EAAE;IAC5B,MAAM,SAAS,GAAa,EAAE;IAC9B,MAAM,QAAQ,GAA+C,EAAE;IAE/D,KAAK,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,kBAAkB,EAAE;QACzD,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC;QAEhD,IAAI,MAAM,eAAe,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA,IAAA,CAAM,CAAC,EAAE;YACrD,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,CAAA,EAAG,SAAS,CAAA,IAAA,CAAM,CAAC;AACnE,YAAA,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;AAE9C,YAAA,IAAI,WAAW,KAAK,YAAY,EAAE;AACjC,gBAAA,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;gBACzB,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE;YACvI;iBAAO;AACN,gBAAA,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;AACvB,gBAAA,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EA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AI,CAAC,OAAO,EAAE,CAAA,EAAA,CAAI,CAAC;QAC1B;AACA,QAAA,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;AACd,QAAA,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;IACzB;AAEA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACxB;AAEA,SAAS,WAAW,CAAI,CAAe,EAAE,CAAe,EAAA;IACvD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;AAAE,QAAA,OAAO,KAAK;IAAE;AAC3C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AAAE,YAAA,OAAO,KAAK;QAAE;IACpC;AACA,IAAA,OAAO,IAAI;AACZ;;;;"}
|
package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js
CHANGED
|
@@ -14,7 +14,8 @@ var DebugLocation;
|
|
|
14
14
|
}
|
|
15
15
|
DebugLocation.enable = enable;
|
|
16
16
|
function ofCaller() {
|
|
17
|
-
|
|
17
|
+
const result = ofNthCaller(2);
|
|
18
|
+
return result;
|
|
18
19
|
}
|
|
19
20
|
DebugLocation.ofCaller = ofCaller;
|
|
20
21
|
function ofNthCaller(n) {
|
|
@@ -23,7 +24,7 @@ var DebugLocation;
|
|
|
23
24
|
}
|
|
24
25
|
const Err = Error; // For the monaco editor checks, which don't have the nodejs types.
|
|
25
26
|
const l = Err.stackTraceLimit;
|
|
26
|
-
Err.stackTraceLimit =
|
|
27
|
+
Err.stackTraceLimit = 4;
|
|
27
28
|
const stack = new Error().stack;
|
|
28
29
|
Err.stackTraceLimit = l;
|
|
29
30
|
return DebugLocationImpl.fromStack(stack, n + 1);
|
package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugLocation.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/debugLocation.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar DebugLocation;\n(function (DebugLocation) {\n let enabled = false;\n function enable() {\n enabled = true;\n }\n DebugLocation.enable = enable;\n function ofCaller() {\n
|
|
1
|
+
{"version":3,"file":"debugLocation.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/debugLocation.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar DebugLocation;\n(function (DebugLocation) {\n let enabled = false;\n function enable() {\n enabled = true;\n }\n DebugLocation.enable = enable;\n function ofCaller() {\n const result = ofNthCaller(2);\n return result;\n }\n DebugLocation.ofCaller = ofCaller;\n function ofNthCaller(n) {\n if (!enabled) {\n return undefined;\n }\n const Err = Error; // For the monaco editor checks, which don't have the nodejs types.\n const l = Err.stackTraceLimit;\n Err.stackTraceLimit = 4;\n const stack = new Error().stack;\n Err.stackTraceLimit = l;\n return DebugLocationImpl.fromStack(stack, n + 1);\n }\n DebugLocation.ofNthCaller = ofNthCaller;\n})(DebugLocation || (DebugLocation = {}));\nclass DebugLocationImpl {\n static fromStack(stack, parentIdx) {\n const lines = stack.split('\\n');\n const location = parseLine(lines[parentIdx + 1]);\n if (location) {\n return new DebugLocationImpl(location.fileName, location.line, location.column, location.id);\n }\n else {\n return undefined;\n }\n }\n constructor(fileName, line, column, id) {\n this.fileName = fileName;\n this.line = line;\n this.column = column;\n this.id = id;\n }\n}\nfunction parseLine(stackLine) {\n if (!stackLine) {\n return undefined;\n }\n const match = stackLine.match(/\\((.*):(\\d+):(\\d+)\\)/);\n if (match) {\n return {\n fileName: match[1],\n line: parseInt(match[2]),\n column: parseInt(match[3]),\n id: stackLine,\n };\n }\n const match2 = stackLine.match(/at ([^\\(\\)]*):(\\d+):(\\d+)/);\n if (match2) {\n return {\n fileName: match2[1],\n line: parseInt(match2[2]),\n column: parseInt(match2[3]),\n id: stackLine,\n };\n }\n return undefined;\n}\n\nexport { DebugLocation };\n//# sourceMappingURL=debugLocation.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACG,IAAC;AACJ,CAAC,UAAU,aAAa,EAAE;AAC1B,IAAI,IAAI,OAAO,GAAG,KAAK;AACvB,IAAI,SAAS,MAAM,GAAG;AACtB,QAAQ,OAAO,GAAG,IAAI;AACtB,IAAI;AACJ,IAAI,aAAa,CAAC,MAAM,GAAG,MAAM;AACjC,IAAI,SAAS,QAAQ,GAAG;AACxB,QAAQ,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC;AACrC,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ,IAAI,aAAa,CAAC,QAAQ,GAAG,QAAQ;AACrC,IAAI,SAAS,WAAW,CAAC,CAAC,EAAE;AAC5B,QAAQ,IAAI,CAAC,OAAO,EAAE;AACtB,YAAY,OAAO,SAAS;AAC5B,QAAQ;AACR,QAAQ,MAAM,GAAG,GAAG,KAAK,CAAC;AAC1B,QAAQ,MAAM,CAAC,GAAG,GAAG,CAAC,eAAe;AACrC,QAAQ,GAAG,CAAC,eAAe,GAAG,CAAC;AAC/B,QAAQ,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK;AACvC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AAE,KAAK,CAAC,CAAC,CAAC;AAC9B,YAAY,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpC,YAAY,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtC,YAAY,EAAE,EAAE,SAAS;AACzB,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,2BAA2B,CAAC;AAC/D,IAAI,IAAI,MAAM,EAAE;AAChB,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/B,YAAY,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrC,YAAY,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvC,YAAY,EAAE,EAAE,SAAS;AACzB,SAAS;AACT,IAAI;AACJ,IAAI,OAAO,SAAS;AACpB;;;;"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { DebugNameData } from '../debugName.js';
|
|
2
|
+
import { getLogger } from '../logging/logging.js';
|
|
3
|
+
import { DebugLocation } from '../debugLocation.js';
|
|
4
|
+
import { _getDebugHelperClass } from '../observables/baseObservable.js';
|
|
5
|
+
|
|
6
|
+
/*---------------------------------------------------------------------------------------------
|
|
7
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
9
|
+
*--------------------------------------------------------------------------------------------*/
|
|
10
|
+
|
|
11
|
+
/*---------------------------------------------------------------------------------------------
|
|
12
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
14
|
+
*--------------------------------------------------------------------------------------------*/
|
|
15
|
+
class ManualChangesHandler {
|
|
16
|
+
constructor(_run) {
|
|
17
|
+
this._run = _run;
|
|
18
|
+
this._changes = [];
|
|
19
|
+
this._updateCounter = 0;
|
|
20
|
+
}
|
|
21
|
+
beginUpdate(observable) {
|
|
22
|
+
this._updateCounter++;
|
|
23
|
+
this._changes.push(observable);
|
|
24
|
+
}
|
|
25
|
+
endUpdate(_observable) {
|
|
26
|
+
this._updateCounter--;
|
|
27
|
+
if (this._updateCounter === 0) {
|
|
28
|
+
if (this._changes.length > 0) {
|
|
29
|
+
const c = this._changes;
|
|
30
|
+
this._changes = [];
|
|
31
|
+
this._run(c);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
handlePossibleChange(observable) {
|
|
36
|
+
this._changes.push(observable);
|
|
37
|
+
}
|
|
38
|
+
handleChange(_observable, _change) {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class ManualObserver {
|
|
42
|
+
constructor(_run, debugName, debugLocation = DebugLocation.ofCaller()) {
|
|
43
|
+
this._run = _run;
|
|
44
|
+
this._dependencies = new Set();
|
|
45
|
+
this._disposed = false;
|
|
46
|
+
this.debugName = debugName ?? '(anonymous ManualObserver)';
|
|
47
|
+
this._debugNameData = new DebugNameData(undefined, this.debugName, undefined);
|
|
48
|
+
this._runFn = _run;
|
|
49
|
+
this._handler = new ManualChangesHandler(() => {
|
|
50
|
+
if (!this._disposed) {
|
|
51
|
+
this._run();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
getLogger()?.handleAutorunCreated(this, debugLocation);
|
|
55
|
+
}
|
|
56
|
+
get reader() {
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
readObservable(observable) {
|
|
60
|
+
observable.addObserver(this._handler);
|
|
61
|
+
const value = observable.get();
|
|
62
|
+
this._dependencies.add(observable);
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
getDependencies() {
|
|
66
|
+
return this._dependencies;
|
|
67
|
+
}
|
|
68
|
+
get debug() {
|
|
69
|
+
return new (_getDebugHelperClass())(this);
|
|
70
|
+
}
|
|
71
|
+
dispose() {
|
|
72
|
+
if (this._disposed) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this._disposed = true;
|
|
76
|
+
for (const dep of this._dependencies) {
|
|
77
|
+
dep.removeObserver(this._handler);
|
|
78
|
+
}
|
|
79
|
+
this._dependencies.clear();
|
|
80
|
+
getLogger()?.handleAutorunDisposed(this);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { ManualChangesHandler, ManualObserver };
|
|
85
|
+
//# sourceMappingURL=manualObserver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manualObserver.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/experimental/manualObserver.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { DebugNameData } from '../debugName.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DebugLocation } from '../debugLocation.js';\nimport { _getDebugHelperClass } from '../observables/baseObservable.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass ManualChangesHandler {\n constructor(_run) {\n this._run = _run;\n this._changes = [];\n this._updateCounter = 0;\n }\n beginUpdate(observable) {\n this._updateCounter++;\n this._changes.push(observable);\n }\n endUpdate(_observable) {\n this._updateCounter--;\n if (this._updateCounter === 0) {\n if (this._changes.length > 0) {\n const c = this._changes;\n this._changes = [];\n this._run(c);\n }\n }\n }\n handlePossibleChange(observable) {\n this._changes.push(observable);\n }\n handleChange(_observable, _change) {\n }\n}\nclass ManualObserver {\n constructor(_run, debugName, debugLocation = DebugLocation.ofCaller()) {\n this._run = _run;\n this._dependencies = new Set();\n this._disposed = false;\n this.debugName = debugName ?? '(anonymous ManualObserver)';\n this._debugNameData = new DebugNameData(undefined, this.debugName, undefined);\n this._runFn = _run;\n this._handler = new ManualChangesHandler(() => {\n if (!this._disposed) {\n this._run();\n }\n });\n getLogger()?.handleAutorunCreated(this, debugLocation);\n }\n get reader() {\n return this;\n }\n readObservable(observable) {\n observable.addObserver(this._handler);\n const value = observable.get();\n this._dependencies.add(observable);\n return value;\n }\n getDependencies() {\n return this._dependencies;\n }\n get debug() {\n return new (_getDebugHelperClass())(this);\n }\n dispose() {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n for (const dep of this._dependencies) {\n dep.removeObserver(this._handler);\n }\n this._dependencies.clear();\n getLogger()?.handleAutorunDisposed(this);\n }\n}\n\nexport { ManualChangesHandler, ManualObserver };\n//# sourceMappingURL=manualObserver.js.map\n"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,MAAM,oBAAoB,CAAC;AAC3B,IAAI,WAAW,CAAC,IAAI,EAAE;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,QAAQ,GAAG,EAAE;AAC1B,QAAQ,IAAI,CAAC,cAAc,GAAG,CAAC;AAC/B,IAAI;AACJ,IAAI,WAAW,CAAC,UAAU,EAAE;AAC5B,QAAQ,IAAI,CAAC,cAAc,EAAE;AAC7B,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;AACtC,IAAI;AACJ,IAAI,SAAS,CAAC,WAAW,EAAE;AAC3B,QAAQ,IAAI,CAAC,cAAc,EAAE;AAC7B,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,CAAC,EAAE;AACvC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,gBAAgB,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ;AACvC,gBAAgB,IAAI,CAAC,QAAQ,GAAG,EAAE;AAClC,gBAAgB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5B,YA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1C,QAAQ,OAAO,KAAK;AACpB,IAAI;AACJ,IAAI,eAAe,GAAG;AACtB,QAAQ,OAAO,IAAI,CAAC,aAAa;AACjC,IAAI;AACJ,IAAI,IAAI,KAAK,GAAG;AAChB,QAAQ,OAAO,KAAK,oBAAoB,EAAE,EAAE,IAAI,CAAC;AACjD,IAAI;AACJ,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;AAC5B,YAAY;AACZ,QAAQ;AACR,QAAQ,IAAI,CAAC,SAAS,GAAG,IAAI;AAC7B,QAAQ,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE;AAC9C,YAAY,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC7C,QAAQ;AACR,QAAQ,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;AAClC,QAAQ,SAAS,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC;AAChD,IAAI;AACJ;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { setLogObservableFn } from './logging/logging.js';
|
|
2
|
-
import {
|
|
2
|
+
import { _setDebugHelperClass } from './observables/baseObservable.js';
|
|
3
3
|
export { DebugLocation } from './debugLocation.js';
|
|
4
4
|
export { derived, derivedOpts } from './observables/derived.js';
|
|
5
5
|
export { keepObserved, recomputeInitiallyAndOnChange } from './utils/utils.js';
|
|
6
6
|
export { observableFromEvent } from './observables/observableFromEvent.js';
|
|
7
7
|
import { logObservableToConsole } from './logging/consoleObservableLogger.js';
|
|
8
|
-
import {
|
|
8
|
+
import { DebugHelper } from './logging/debugGetDependencyGraph.js';
|
|
9
9
|
|
|
10
10
|
/*---------------------------------------------------------------------------------------------
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -17,6 +17,6 @@ import { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';
|
|
|
17
17
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
18
18
|
*--------------------------------------------------------------------------------------------*/
|
|
19
19
|
// This is a facade for the observable implementation. Only import from here!
|
|
20
|
-
|
|
20
|
+
_setDebugHelperClass(DebugHelper);
|
|
21
21
|
setLogObservableFn(logObservableToConsole);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/index.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { setLogObservableFn } from './logging/logging.js';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/index.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { setLogObservableFn } from './logging/logging.js';\nimport { _setDebugHelperClass } from './observables/baseObservable.js';\nexport { DebugLocation } from './debugLocation.js';\nexport { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter, derivedWithStore } from './observables/derived.js';\nexport { debouncedObservable, debouncedObservableDeprecated, derivedObservableWithCache, derivedObservableWithWritableCache, keepObserved, mapObservableArrayCached, observableFromPromise, recomputeInitiallyAndOnChange, signalFromObservable, wasEventTriggeredRecently } from './utils/utils.js';\nexport { observableFromEvent, observableFromEventOpts } from './observables/observableFromEvent.js';\nimport { logObservableToConsole } from './logging/consoleObservableLogger.js';\nimport { DebugHelper } from './logging/debugGetDependencyGraph.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// This is a facade for the observable implementation. Only import from here!\n_setDebugHelperClass(DebugHelper);\nsetLogObservableFn(logObservableToConsole);\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA,oBAAoB,CAAC,WAAW,CAAC;AACjC,kBAAkB,CAAC,sBAAsB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { Derived } from '../observables/derivedImpl.js';
|
|
|
2
2
|
import { FromEventObservable } from '../observables/observableFromEvent.js';
|
|
3
3
|
import { ObservableValue } from '../observables/observableValue.js';
|
|
4
4
|
import { AutorunObserver } from '../reactions/autorunImpl.js';
|
|
5
|
+
import { ManualObserver } from '../experimental/manualObserver.js';
|
|
5
6
|
import { formatValue } from './consoleObservableLogger.js';
|
|
6
7
|
|
|
7
8
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -13,67 +14,209 @@ import { formatValue } from './consoleObservableLogger.js';
|
|
|
13
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14
15
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
15
16
|
*--------------------------------------------------------------------------------------------*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// GraphInfo — the result of graph traversal, separated from rendering
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
class GraphInfo {
|
|
21
|
+
constructor(name, type, value, state, children) {
|
|
22
|
+
this.name = name;
|
|
23
|
+
this.type = type;
|
|
24
|
+
this.value = value;
|
|
25
|
+
this.state = state;
|
|
26
|
+
this.children = children;
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
|
-
function
|
|
29
|
+
function buildGraph(obs, options) {
|
|
30
|
+
const debugNamePostProcessor = options.debugNamePostProcessor ?? ((s) => s);
|
|
31
|
+
const visited = new Map();
|
|
32
|
+
function build(node) {
|
|
33
|
+
const existing = visited.get(node);
|
|
34
|
+
if (existing) {
|
|
35
|
+
return existing;
|
|
36
|
+
}
|
|
37
|
+
const info = RawInfo.from(node, debugNamePostProcessor) ?? RawInfo.unknown(node);
|
|
38
|
+
const children = options.type === 'observers' ? info.observers : info.dependencies;
|
|
39
|
+
const graphInfo = new GraphInfo(info.name, info.type, info.value, info.state, []);
|
|
40
|
+
visited.set(info.sourceObj, graphInfo);
|
|
41
|
+
graphInfo.children.push(...children.map(build));
|
|
42
|
+
return graphInfo;
|
|
43
|
+
}
|
|
44
|
+
const root = RawInfo.from(obs, debugNamePostProcessor);
|
|
45
|
+
if (!root) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
return build(obs);
|
|
49
|
+
}
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// Text backend
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
function formatAsText(graph) {
|
|
54
|
+
const visited = new Set();
|
|
55
|
+
return formatNodeAsText(graph, 0, visited).trim();
|
|
56
|
+
}
|
|
57
|
+
function formatNodeAsText(node, indentLevel, visited) {
|
|
26
58
|
const indent = '\t\t'.repeat(indentLevel);
|
|
27
59
|
const lines = [];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
lines.push(`${indent}* ${info.type} ${info.name} (already listed)`);
|
|
60
|
+
if (visited.has(node)) {
|
|
61
|
+
lines.push(`${indent}* ${node.type} ${node.name} (already listed)`);
|
|
31
62
|
return lines.join('\n');
|
|
32
63
|
}
|
|
33
|
-
|
|
34
|
-
lines.push(`${indent}* ${
|
|
35
|
-
lines.push(`${indent} value: ${formatValue(
|
|
36
|
-
lines.push(`${indent} state: ${
|
|
37
|
-
if (
|
|
38
|
-
lines.push(`${indent}
|
|
39
|
-
for (const
|
|
40
|
-
lines.push(
|
|
64
|
+
visited.add(node);
|
|
65
|
+
lines.push(`${indent}* ${node.type} ${node.name}:`);
|
|
66
|
+
lines.push(`${indent} value: ${formatValue(node.value, 50)}`);
|
|
67
|
+
lines.push(`${indent} state: ${node.state}`);
|
|
68
|
+
if (node.children.length > 0) {
|
|
69
|
+
lines.push(`${indent} children:`);
|
|
70
|
+
for (const child of node.children) {
|
|
71
|
+
lines.push(formatNodeAsText(child, indentLevel + 1, visited));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return lines.join('\n');
|
|
75
|
+
}
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
// Mermaid backend
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
function formatAsMermaid(graph) {
|
|
80
|
+
const nodeIds = new Map();
|
|
81
|
+
let nextId = 0;
|
|
82
|
+
const getNodeId = (node) => {
|
|
83
|
+
let id = nodeIds.get(node);
|
|
84
|
+
if (!id) {
|
|
85
|
+
id = `n${nextId++}`;
|
|
86
|
+
nodeIds.set(node, id);
|
|
87
|
+
}
|
|
88
|
+
return id;
|
|
89
|
+
};
|
|
90
|
+
const lines = ['graph TD'];
|
|
91
|
+
const visited = new Set();
|
|
92
|
+
const escape = (s) => s.replace(/"/g, '#quot;');
|
|
93
|
+
function visit(node) {
|
|
94
|
+
if (visited.has(node)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
visited.add(node);
|
|
98
|
+
const id = getNodeId(node);
|
|
99
|
+
const label = `${node.type}: ${node.name}\\nstate: ${node.state}${node.value !== undefined ? `\\nvalue: ${formatValue(node.value, 30)}` : ''}`;
|
|
100
|
+
lines.push(` ${id}["${escape(label)}"]`);
|
|
101
|
+
for (const child of node.children) {
|
|
102
|
+
lines.push(` ${id} --> ${getNodeId(child)}`);
|
|
103
|
+
visit(child);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
visit(graph);
|
|
107
|
+
return lines.join('\n');
|
|
108
|
+
}
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
110
|
+
// Graphviz DOT backend
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
function formatAsGraphviz(graph) {
|
|
113
|
+
const nodeIds = new Map();
|
|
114
|
+
let nextId = 0;
|
|
115
|
+
const getNodeId = (node) => {
|
|
116
|
+
let id = nodeIds.get(node);
|
|
117
|
+
if (!id) {
|
|
118
|
+
id = `n${nextId++}`;
|
|
119
|
+
nodeIds.set(node, id);
|
|
120
|
+
}
|
|
121
|
+
return id;
|
|
122
|
+
};
|
|
123
|
+
const lines = ['digraph {'];
|
|
124
|
+
const visited = new Set();
|
|
125
|
+
const escape = (s) => s.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
126
|
+
function visit(node) {
|
|
127
|
+
if (visited.has(node)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
visited.add(node);
|
|
131
|
+
const id = getNodeId(node);
|
|
132
|
+
const label = `${node.type}: ${node.name}\nstate: ${node.state}${node.value !== undefined ? `\nvalue: ${formatValue(node.value, 30)}` : ''}`;
|
|
133
|
+
lines.push(` ${id} [label="${escape(label)}"]`);
|
|
134
|
+
for (const child of node.children) {
|
|
135
|
+
lines.push(` ${id} -> ${getNodeId(child)}`);
|
|
136
|
+
visit(child);
|
|
41
137
|
}
|
|
42
138
|
}
|
|
139
|
+
visit(graph);
|
|
140
|
+
lines.push('}');
|
|
43
141
|
return lines.join('\n');
|
|
44
142
|
}
|
|
45
|
-
|
|
143
|
+
// ---------------------------------------------------------------------------
|
|
144
|
+
// DebugHelper — the public API for .debug on observables and observers
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
class DebugHelper {
|
|
147
|
+
constructor(_node) {
|
|
148
|
+
this._node = _node;
|
|
149
|
+
}
|
|
150
|
+
buildDependencyGraph() {
|
|
151
|
+
return buildGraph(this._node, { type: 'dependencies' });
|
|
152
|
+
}
|
|
153
|
+
buildObserverGraph() {
|
|
154
|
+
return buildGraph(this._node, { type: 'observers' });
|
|
155
|
+
}
|
|
156
|
+
getDependencyGraph() {
|
|
157
|
+
const graph = this.buildDependencyGraph();
|
|
158
|
+
return graph ? formatAsText(graph) : '';
|
|
159
|
+
}
|
|
160
|
+
getObserverGraph() {
|
|
161
|
+
const graph = this.buildObserverGraph();
|
|
162
|
+
return graph ? formatAsText(graph) : '';
|
|
163
|
+
}
|
|
164
|
+
getDependencyMermaid() {
|
|
165
|
+
const graph = this.buildDependencyGraph();
|
|
166
|
+
return graph ? formatAsMermaid(graph) : '';
|
|
167
|
+
}
|
|
168
|
+
getObserverMermaid() {
|
|
169
|
+
const graph = this.buildObserverGraph();
|
|
170
|
+
return graph ? formatAsMermaid(graph) : '';
|
|
171
|
+
}
|
|
172
|
+
getDependencyGraphviz() {
|
|
173
|
+
const graph = this.buildDependencyGraph();
|
|
174
|
+
return graph ? formatAsGraphviz(graph) : '';
|
|
175
|
+
}
|
|
176
|
+
getObserverGraphviz() {
|
|
177
|
+
const graph = this.buildObserverGraph();
|
|
178
|
+
return graph ? formatAsGraphviz(graph) : '';
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// ---------------------------------------------------------------------------
|
|
182
|
+
// RawInfo — internal: extracts metadata from concrete observable/observer types
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
class RawInfo {
|
|
46
185
|
static from(obs, debugNamePostProcessor) {
|
|
47
186
|
if (obs instanceof AutorunObserver) {
|
|
48
187
|
const state = obs.debugGetState();
|
|
49
|
-
return new
|
|
188
|
+
return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'autorun', undefined, state.stateStr, Array.from(state.dependencies), []);
|
|
189
|
+
}
|
|
190
|
+
else if (obs instanceof ManualObserver) {
|
|
191
|
+
return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'manualObserver', undefined, 'active', Array.from(obs.getDependencies()), []);
|
|
50
192
|
}
|
|
51
193
|
else if (obs instanceof Derived) {
|
|
52
194
|
const state = obs.debugGetState();
|
|
53
|
-
return new
|
|
195
|
+
return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'derived', state.value, state.stateStr, Array.from(state.dependencies), Array.from(obs.debugGetObservers()));
|
|
54
196
|
}
|
|
55
197
|
else if (obs instanceof ObservableValue) {
|
|
56
198
|
const state = obs.debugGetState();
|
|
57
|
-
return new
|
|
199
|
+
return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'observableValue', state.value, 'upToDate', [], Array.from(obs.debugGetObservers()));
|
|
58
200
|
}
|
|
59
201
|
else if (obs instanceof FromEventObservable) {
|
|
60
202
|
const state = obs.debugGetState();
|
|
61
|
-
return new
|
|
203
|
+
return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'fromEvent', state.value, state.hasValue ? 'upToDate' : 'initial', [], Array.from(obs.debugGetObservers()));
|
|
62
204
|
}
|
|
63
205
|
return undefined;
|
|
64
206
|
}
|
|
65
207
|
static unknown(obs) {
|
|
66
|
-
return new
|
|
208
|
+
return new RawInfo(obs, '(unknown)', 'unknown', undefined, 'unknown', [], []);
|
|
67
209
|
}
|
|
68
|
-
constructor(sourceObj, name, type, value, state, dependencies) {
|
|
210
|
+
constructor(sourceObj, name, type, value, state, dependencies, observers) {
|
|
69
211
|
this.sourceObj = sourceObj;
|
|
70
212
|
this.name = name;
|
|
71
213
|
this.type = type;
|
|
72
214
|
this.value = value;
|
|
73
215
|
this.state = state;
|
|
74
216
|
this.dependencies = dependencies;
|
|
217
|
+
this.observers = observers;
|
|
75
218
|
}
|
|
76
219
|
}
|
|
77
220
|
|
|
78
|
-
export {
|
|
221
|
+
export { DebugHelper, GraphInfo };
|
|
79
222
|
//# sourceMappingURL=debugGetDependencyGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugGetDependencyGraph.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Derived } from '../observables/derivedImpl.js';\nimport { FromEventObservable } from '../observables/observableFromEvent.js';\nimport { ObservableValue } from '../observables/observableValue.js';\nimport { AutorunObserver } from '../reactions/autorunImpl.js';\nimport { formatValue } from './consoleObservableLogger.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction debugGetDependencyGraph(obs, options) {\n const debugNamePostProcessor = options?.debugNamePostProcessor ?? ((str) => str);\n const info = Info.from(obs, debugNamePostProcessor);\n if (!info) {\n return '';\n }\n const alreadyListed = new Set();\n return formatObservableInfo(info, 0, alreadyListed).trim();\n}\nfunction formatObservableInfo(info, indentLevel, alreadyListed) {\n const indent = '\\t\\t'.repeat(indentLevel);\n const lines = [];\n const isAlreadyListed = alreadyListed.has(info.sourceObj);\n if (isAlreadyListed) {\n lines.push(`${indent}* ${info.type} ${info.name} (already listed)`);\n return lines.join('\\n');\n }\n alreadyListed.add(info.sourceObj);\n lines.push(`${indent}* ${info.type} ${info.name}:`);\n lines.push(`${indent} value: ${formatValue(info.value, 50)}`);\n lines.push(`${indent} state: ${info.state}`);\n if (info.dependencies.length > 0) {\n lines.push(`${indent} dependencies:`);\n for (const dep of info.dependencies) {\n lines.push(formatObservableInfo(dep, indentLevel + 1, alreadyListed));\n }\n }\n return lines.join('\\n');\n}\nclass Info {\n static from(obs, debugNamePostProcessor) {\n if (obs instanceof AutorunObserver) {\n const state = obs.debugGetState();\n return new Info(obs, debugNamePostProcessor(obs.debugName), 'autorun', undefined, state.stateStr, Array.from(state.dependencies).map(dep => Info.from(dep, debugNamePostProcessor) || Info.unknown(dep)));\n }\n else if (obs instanceof Derived) {\n const state = obs.debugGetState();\n return new Info(obs, debugNamePostProcessor(obs.debugName), 'derived', state.value, state.stateStr, Array.from(state.dependencies).map(dep => Info.from(dep, debugNamePostProcessor) || Info.unknown(dep)));\n }\n else if (obs instanceof ObservableValue) {\n const state = obs.debugGetState();\n return new Info(obs, debugNamePostProcessor(obs.debugName), 'observableValue', state.value, 'upToDate', []);\n }\n else if (obs instanceof FromEventObservable) {\n const state = obs.debugGetState();\n return new Info(obs, debugNamePostProcessor(obs.debugName), 'fromEvent', state.value, state.hasValue ? 'upToDate' : 'initial', []);\n }\n return undefined;\n }\n static unknown(obs) {\n return new Info(obs, '(unknown)', 'unknown', undefined, 'unknown', []);\n }\n constructor(sourceObj, name, type, value, state, dependencies) {\n this.sourceObj = sourceObj;\n this.name = name;\n this.type = type;\n this.value = value;\n this.state = state;\n this.dependencies = dependencies;\n }\n}\n\nexport { debugGetDependencyGraph };\n//# sourceMappingURL=debugGetDependencyGraph.js.map\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA,SAAS,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE;AAC/C,IAAI,MAAM,sBAAsB,GAAG,OAAO,EAAE,sBAAsB,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC;AACpF,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,sBAAsB,CAAC;AACvD,IAAI,IAAI,CAAC,IAAI,EAAE;AACf,QAAQ,OAAO,EAAE;AACjB,IAAI;AACJ,IAAI,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE;AACnC,IAAI,OAAO,oBAAoB,CAAC,IAAI,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE;AAC9D;AACA,SAAS,oBAAoB,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE;AAChE,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;AAC7C,IAAI,MAAM,KAAK,GAAG,EAAE;AACpB,IAAI,MAAM,eAAe,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;AAC7D,IAAI,IAAI,eAAe,EAAE;AACzB,QAAQ,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,C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AC,QAAQ,GAAG,UAAU,GAAG,SAAS,EAAE,EAAE,CAAC;AAC9I,QAAQ;AACR,QAAQ,OAAO,SAAS;AACxB,IAAI;AACJ,IAAI,OAAO,OAAO,CAAC,GAAG,EAAE;AACxB,QAAQ,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC;AAC9E,IAAI;AACJ,IAAI,WAAW,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE;AACnE,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS;AAClC,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAQ,IAAI,CAAC,YAAY,GAAG,YAAY;AACxC,IAAI;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"debugGetDependencyGraph.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Derived } from '../observables/derivedImpl.js';\nimport { FromEventObservable } from '../observables/observableFromEvent.js';\nimport { ObservableValue } from '../observables/observableValue.js';\nimport { AutorunObserver } from '../reactions/autorunImpl.js';\nimport { ManualObserver } from '../experimental/manualObserver.js';\nimport { formatValue } from './consoleObservableLogger.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// ---------------------------------------------------------------------------\n// GraphInfo — the result of graph traversal, separated from rendering\n// ---------------------------------------------------------------------------\nclass GraphInfo {\n constructor(name, type, value, state, children) {\n this.name = name;\n this.type = type;\n this.value = value;\n this.state = state;\n this.children = children;\n }\n}\nfunction buildGraph(obs, options) {\n const debugNamePostProcessor = options.debugNamePostProcessor ?? ((s) => s);\n const visited = new Map();\n function build(node) {\n const existing = visited.get(node);\n if (existing) {\n return existing;\n }\n const info = RawInfo.from(node, debugNamePostProcessor) ?? RawInfo.unknown(node);\n const children = options.type === 'observers' ? info.observers : info.dependencies;\n const graphInfo = new GraphInfo(info.name, info.type, info.value, info.state, []);\n visited.set(info.sourceObj, graphInfo);\n graphInfo.children.push(...children.map(build));\n return graphInfo;\n }\n const root = RawInfo.from(obs, debugNamePostProcessor);\n if (!root) {\n return undefined;\n }\n return build(obs);\n}\n// ---------------------------------------------------------------------------\n// Text backend\n// ---------------------------------------------------------------------------\nfunction formatAsText(graph) {\n const visited = new Set();\n return formatNodeAsText(graph, 0, visited).trim();\n}\nfunction formatNodeAsText(node, indentLevel, visited) {\n const indent = '\\t\\t'.repeat(indentLevel);\n const lines = [];\n if (visited.has(node)) {\n lines.push(`${indent}* ${node.type} ${node.name} (already listed)`);\n return lines.join('\\n');\n }\n visited.add(node);\n lines.push(`${indent}* ${node.type} ${node.name}:`);\n lines.push(`${indent} value: ${formatValue(node.value, 50)}`);\n lines.push(`${indent} state: ${node.state}`);\n if (node.children.length > 0) {\n lines.push(`${indent} children:`);\n for (const child of node.children) {\n lines.push(formatNodeAsText(child, indentLevel + 1, visited));\n }\n }\n return lines.join('\\n');\n}\n// ---------------------------------------------------------------------------\n// Mermaid backend\n// ---------------------------------------------------------------------------\nfunction formatAsMermaid(graph) {\n const nodeIds = new Map();\n let nextId = 0;\n const getNodeId = (node) => {\n let id = nodeIds.get(node);\n if (!id) {\n id = `n${nextId++}`;\n nodeIds.set(node, id);\n }\n return id;\n };\n const lines = ['graph TD'];\n const visited = new Set();\n const escape = (s) => s.replace(/\"/g, '#quot;');\n function visit(node) {\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n const id = getNodeId(node);\n const label = `${node.type}: ${node.name}\\\\nstate: ${node.state}${node.value !== undefined ? `\\\\nvalue: ${formatValue(node.value, 30)}` : ''}`;\n lines.push(` ${id}[\"${escape(label)}\"]`);\n for (const child of node.children) {\n lines.push(` ${id} --> ${getNodeId(child)}`);\n visit(child);\n }\n }\n visit(graph);\n return lines.join('\\n');\n}\n// ---------------------------------------------------------------------------\n// Graphviz DOT backend\n// ---------------------------------------------------------------------------\nfunction formatAsGraphviz(graph) {\n const nodeIds = new Map();\n let nextId = 0;\n const getNodeId = (node) => {\n let id = nodeIds.get(node);\n if (!id) {\n id = `n${nextId++}`;\n nodeIds.set(node, id);\n }\n return id;\n };\n const lines = ['digraph {'];\n const visited = new Set();\n const escape = (s) => s.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n function visit(node) {\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n const id = getNodeId(node);\n const label = `${node.type}: ${node.name}\\nstate: ${node.state}${node.value !== undefined ? `\\nvalue: ${formatValue(node.value, 30)}` : ''}`;\n lines.push(` ${id} [label=\"${escape(label)}\"]`);\n for (const child of node.children) {\n lines.push(` ${id} -> ${getNodeId(child)}`);\n visit(child);\n }\n }\n visit(graph);\n lines.push('}');\n return lines.join('\\n');\n}\n// ---------------------------------------------------------------------------\n// DebugHelper — the public API for .debug on observables and observers\n// ---------------------------------------------------------------------------\nclass DebugHelper {\n constructor(_node) {\n this._node = _node;\n }\n buildDependencyGraph() {\n return buildGraph(this._node, { type: 'dependencies' });\n }\n buildObserverGraph() {\n return buildGraph(this._node, { type: 'observers' });\n }\n getDependencyGraph() {\n const graph = this.buildDependencyGraph();\n return graph ? formatAsText(graph) : '';\n }\n getObserverGraph() {\n const graph = this.buildObserverGraph();\n return graph ? formatAsText(graph) : '';\n }\n getDependencyMermaid() {\n const graph = this.buildDependencyGraph();\n return graph ? formatAsMermaid(graph) : '';\n }\n getObserverMermaid() {\n const graph = this.buildObserverGraph();\n return graph ? formatAsMermaid(graph) : '';\n }\n getDependencyGraphviz() {\n const graph = this.buildDependencyGraph();\n return graph ? formatAsGraphviz(graph) : '';\n }\n getObserverGraphviz() {\n const graph = this.buildObserverGraph();\n return graph ? formatAsGraphviz(graph) : '';\n }\n}\n// ---------------------------------------------------------------------------\n// RawInfo — internal: extracts metadata from concrete observable/observer types\n// ---------------------------------------------------------------------------\nclass RawInfo {\n static from(obs, debugNamePostProcessor) {\n if (obs instanceof AutorunObserver) {\n const state = obs.debugGetState();\n return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'autorun', undefined, state.stateStr, Array.from(state.dependencies), []);\n }\n else if (obs instanceof ManualObserver) {\n return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'manualObserver', undefined, 'active', Array.from(obs.getDependencies()), []);\n }\n else if (obs instanceof Derived) {\n const state = obs.debugGetState();\n return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'derived', state.value, state.stateStr, Array.from(state.dependencies), Array.from(obs.debugGetObservers()));\n }\n else if (obs instanceof ObservableValue) {\n const state = obs.debugGetState();\n return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'observableValue', state.value, 'upToDate', [], Array.from(obs.debugGetObservers()));\n }\n else if (obs instanceof FromEventObservable) {\n const state = obs.debugGetState();\n return new RawInfo(obs, debugNamePostProcessor(obs.debugName), 'fromEvent', state.value, state.hasValue ? 'upToDate' : 'initial', [], Array.from(obs.debugGetObservers()));\n }\n return undefined;\n }\n static unknown(obs) {\n return new RawInfo(obs, '(unknown)', 'unknown', undefined, 'unknown', [], []);\n }\n constructor(sourceObj, name, type, value, state, dependencies, observers) {\n this.sourceObj = sourceObj;\n this.name = name;\n this.type = type;\n this.value = value;\n this.state = state;\n this.dependencies = dependencies;\n this.observers = observers;\n }\n}\n\nexport { DebugHelper, GraphInfo };\n//# sourceMappingURL=debugGetDependencyGraph.js.map\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;A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I,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE;AAC9E,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS;AAClC,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAQ,IAAI,CAAC,YAAY,GAAG,YAAY;AACxC,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS;AAClC,IAAI;AACJ;;;;"}
|
|
@@ -27,9 +27,12 @@ let _keepObserved;
|
|
|
27
27
|
function _setKeepObserved(keepObserved) {
|
|
28
28
|
_keepObserved = keepObserved;
|
|
29
29
|
}
|
|
30
|
-
let
|
|
31
|
-
function
|
|
32
|
-
|
|
30
|
+
let _debugHelperCtor;
|
|
31
|
+
function _setDebugHelperClass(ctor) {
|
|
32
|
+
_debugHelperCtor = ctor;
|
|
33
|
+
}
|
|
34
|
+
function _getDebugHelperClass() {
|
|
35
|
+
return _debugHelperCtor;
|
|
33
36
|
}
|
|
34
37
|
class ConvenientObservable {
|
|
35
38
|
get TChange() { return null; }
|
|
@@ -95,8 +98,8 @@ class ConvenientObservable {
|
|
|
95
98
|
get debugValue() {
|
|
96
99
|
return this.get();
|
|
97
100
|
}
|
|
98
|
-
|
|
99
|
-
return
|
|
101
|
+
get debug() {
|
|
102
|
+
return new _debugHelperCtor(this);
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
class BaseObservable extends ConvenientObservable {
|
|
@@ -139,5 +142,5 @@ class BaseObservable extends ConvenientObservable {
|
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
|
|
142
|
-
export { BaseObservable, ConvenientObservable,
|
|
145
|
+
export { BaseObservable, ConvenientObservable, _getDebugHelperClass, _setDebugHelperClass, _setDerivedOpts, _setKeepObserved, _setRecomputeInitiallyAndOnChange };
|
|
143
146
|
//# sourceMappingURL=baseObservable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseObservable.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { DebugLocation } from '../debugLocation.js';\nimport { getFunctionName } from '../debugName.js';\nimport { logObservable, getLogger } from '../logging/logging.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nlet _derived;\n/**\n * @internal\n * This is to allow splitting files.\n*/\nfunction _setDerivedOpts(derived) {\n _derived = derived;\n}\nlet _recomputeInitiallyAndOnChange;\nfunction _setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange) {\n _recomputeInitiallyAndOnChange = recomputeInitiallyAndOnChange;\n}\nlet _keepObserved;\nfunction _setKeepObserved(keepObserved) {\n _keepObserved = keepObserved;\n}\nlet
|
|
1
|
+
{"version":3,"file":"baseObservable.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { DebugLocation } from '../debugLocation.js';\nimport { getFunctionName } from '../debugName.js';\nimport { logObservable, getLogger } from '../logging/logging.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nlet _derived;\n/**\n * @internal\n * This is to allow splitting files.\n*/\nfunction _setDerivedOpts(derived) {\n _derived = derived;\n}\nlet _recomputeInitiallyAndOnChange;\nfunction _setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange) {\n _recomputeInitiallyAndOnChange = recomputeInitiallyAndOnChange;\n}\nlet _keepObserved;\nfunction _setKeepObserved(keepObserved) {\n _keepObserved = keepObserved;\n}\nlet _debugHelperCtor;\nfunction _setDebugHelperClass(ctor) {\n _debugHelperCtor = ctor;\n}\nfunction _getDebugHelperClass() {\n return _debugHelperCtor;\n}\nclass ConvenientObservable {\n get TChange() { return null; }\n reportChanges() {\n this.get();\n }\n /** @sealed */\n read(reader) {\n if (reader) {\n return reader.readObservable(this);\n }\n else {\n return this.get();\n }\n }\n map(fnOrOwner, fnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n const owner = fnOrUndefined === undefined ? undefined : fnOrOwner;\n const fn = fnOrUndefined === undefined ? fnOrOwner : fnOrUndefined;\n return _derived({\n owner,\n debugName: () => {\n const name = getFunctionName(fn);\n if (name !== undefined) {\n return name;\n }\n // regexp to match `x => x.y` or `x => x?.y` where x and y can be arbitrary identifiers (uses backref):\n const regexp = /^\\s*\\(?\\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\\s*\\)?\\s*=>\\s*\\1(?:\\??)\\.([a-zA-Z_$][a-zA-Z_$0-9]*)\\s*$/;\n const match = regexp.exec(fn.toString());\n if (match) {\n return `${this.debugName}.${match[2]}`;\n }\n if (!owner) {\n return `${this.debugName} (mapped)`;\n }\n return undefined;\n },\n debugReferenceFn: fn,\n }, (reader) => fn(this.read(reader), reader), debugLocation);\n }\n /**\n * @sealed\n * Converts an observable of an observable value into a direct observable of the value.\n */\n flatten() {\n return _derived({\n owner: undefined,\n debugName: () => `${this.debugName} (flattened)`,\n }, (reader) => this.read(reader).read(reader));\n }\n recomputeInitiallyAndOnChange(store, handleValue) {\n store.add(_recomputeInitiallyAndOnChange(this, handleValue));\n return this;\n }\n /**\n * Ensures that this observable is observed. This keeps the cache alive.\n * However, in case of deriveds, it does not force eager evaluation (only when the value is read/get).\n * Use `recomputeInitiallyAndOnChange` for eager evaluation.\n */\n keepObserved(store) {\n store.add(_keepObserved(this));\n return this;\n }\n get debugValue() {\n return this.get();\n }\n get debug() {\n return new _debugHelperCtor(this);\n }\n}\nclass BaseObservable extends ConvenientObservable {\n constructor(debugLocation) {\n super();\n this._observers = new Set();\n getLogger()?.handleObservableCreated(this, debugLocation);\n }\n addObserver(observer) {\n const len = this._observers.size;\n this._observers.add(observer);\n if (len === 0) {\n this.onFirstObserverAdded();\n }\n if (len !== this._observers.size) {\n getLogger()?.handleOnListenerCountChanged(this, this._observers.size);\n }\n }\n removeObserver(observer) {\n const deleted = this._observers.delete(observer);\n if (deleted && this._observers.size === 0) {\n this.onLastObserverRemoved();\n }\n if (deleted) {\n getLogger()?.handleOnListenerCountChanged(this, this._observers.size);\n }\n }\n onFirstObserverAdded() { }\n onLastObserverRemoved() { }\n log() {\n const hadLogger = !!getLogger();\n logObservable(this);\n if (!hadLogger) {\n getLogger()?.handleObservableCreated(this, DebugLocation.ofCaller());\n }\n return this;\n }\n debugGetObservers() {\n return this._observers;\n }\n}\n\nexport { BaseObservable, ConvenientObservable, _getDebugHelperClass, _setDebugHelperClass, _setDerivedOpts, _setKeepObserved, _setRecomputeInitiallyAndOnChange };\n//# sourceMappingURL=baseObservable.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,IAAI,QAAQ;AACZ;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,OAAO,EAAE;AAClC,IAAI,QAAQ,GAAG,OAAO;AACtB;AACA,IAAI,8BAA8B;AAClC,SAAS,iCAAiC,CAAC,6BAA6B,EAAE;AAC1E,IAAI,8BAA8B,GAAG,6BAA6B;AAClE;AACA,IAAI,aAAa;AACjB,SAAS,gBAAgB,CAAC,YAAY,EAAE;AACxC,IAAI,aAAa,GAAG,YAAY;AAChC;AACA,IAAI,gBAAgB;AACpB,SAAS,oBAAoB,CAA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;AACxB,YAAY,SAAS,EAAE,EAAE,uBAAuB,CAAC,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC;AAChF,QAAQ;AACR,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ,IAAI,iBAAiB,GAAG;AACxB,QAAQ,OAAO,IAAI,CAAC,UAAU;AAC9B,IAAI;AACJ;;;;"}
|
|
@@ -310,10 +310,7 @@ class Derived extends BaseObservable {
|
|
|
310
310
|
const shouldCallBeginUpdate = !this._observers.has(observer) && this._updateCount > 0;
|
|
311
311
|
super.addObserver(observer);
|
|
312
312
|
if (shouldCallBeginUpdate) {
|
|
313
|
-
if (this._removedObserverToCallEndUpdateOn
|
|
314
|
-
this._removedObserverToCallEndUpdateOn.delete(observer);
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
313
|
+
if (!this._removedObserverToCallEndUpdateOn?.delete(observer)) {
|
|
317
314
|
observer.beginUpdate(this);
|
|
318
315
|
}
|
|
319
316
|
}
|
|
@@ -341,11 +338,17 @@ class Derived extends BaseObservable {
|
|
|
341
338
|
this._value = newValue;
|
|
342
339
|
}
|
|
343
340
|
debugRecompute() {
|
|
344
|
-
|
|
345
|
-
|
|
341
|
+
this.beginUpdate(this);
|
|
342
|
+
try {
|
|
343
|
+
if (!this._isComputing) {
|
|
344
|
+
this._recompute();
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
this._state = 2 /* DerivedState.stale */;
|
|
348
|
+
}
|
|
346
349
|
}
|
|
347
|
-
|
|
348
|
-
this.
|
|
350
|
+
finally {
|
|
351
|
+
this.endUpdate(this);
|
|
349
352
|
}
|
|
350
353
|
}
|
|
351
354
|
setValue(newValue, tx, change) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivedImpl.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { BaseObservable } from './baseObservable.js';\nimport { BugIndicatingError, onBugIndicatingError } from '../commonFacade/deps.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DisposableStore } from '../../disposables.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction derivedStateToString(state) {\n switch (state) {\n case 0 /* DerivedState.initial */: return 'initial';\n case 1 /* DerivedState.dependenciesMightHaveChanged */: return 'dependenciesMightHaveChanged';\n case 2 /* DerivedState.stale */: return 'stale';\n case 3 /* DerivedState.upToDate */: return 'upToDate';\n default: return '<unknown>';\n }\n}\nclass Derived extends BaseObservable {\n get debugName() {\n return this._debugNameData.getDebugName(this) ?? '(anonymous)';\n }\n constructor(_debugNameData, _computeFn, _changeTracker, _handleLastObserverRemoved = undefined, _equalityComparator, debugLocation) {\n super(debugLocation);\n this._debugNameData = _debugNameData;\n this._computeFn = _computeFn;\n this._changeTracker = _changeTracker;\n this._handleLastObserverRemoved = _handleLastObserverRemoved;\n this._equalityComparator = _equalityComparator;\n this._state = 0 /* DerivedState.initial */;\n this._value = undefined;\n this._updateCount = 0;\n this._dependencies = new Set();\n this._dependenciesToBeRemoved = new Set();\n this._changeSummary = undefined;\n this._isUpdating = false;\n this._isComputing = false;\n this._didReportChange = false;\n this._isInBeforeUpdate = false;\n this._isReaderValid = false;\n this._store = undefined;\n this._delayedStore = undefined;\n this._removedObserverToCallEndUpdateOn = null;\n this._changeSummary = this._changeTracker?.createChangeSummary(undefined);\n }\n onLastObserverRemoved() {\n /**\n * We are not tracking changes anymore, thus we have to assume\n * that our cache is invalid.\n */\n this._state = 0 /* DerivedState.initial */;\n this._value = undefined;\n getLogger()?.handleDerivedCleared(this);\n for (const d of this._dependencies) {\n d.removeObserver(this);\n }\n this._dependencies.clear();\n if (this._store !== undefined) {\n this._store.dispose();\n this._store = undefined;\n }\n if (this._delayedStore !== undefined) {\n this._delayedStore.dispose();\n this._delayedStore = undefined;\n }\n this._handleLastObserverRemoved?.();\n }\n get() {\n const checkEnabled = false; // TODO set to true\n if (this._isComputing && checkEnabled) {\n // investigate why this fails in the diff editor!\n throw new BugIndicatingError('Cyclic deriveds are not supported yet!');\n }\n if (this._observers.size === 0) {\n let result;\n // Without observers, we don't know when to clean up stuff.\n // Thus, we don't cache anything to prevent memory leaks.\n try {\n this._isReaderValid = true;\n let changeSummary = undefined;\n if (this._changeTracker) {\n changeSummary = this._changeTracker.createChangeSummary(undefined);\n this._changeTracker.beforeUpdate?.(this, changeSummary);\n }\n result = this._computeFn(this, changeSummary);\n }\n finally {\n this._isReaderValid = false;\n }\n // Clear new dependencies\n this.onLastObserverRemoved();\n return result;\n }\n else {\n do {\n // We might not get a notification for a dependency that changed while it is updating,\n // thus we also have to ask all our depedencies if they changed in this case.\n if (this._state === 1 /* DerivedState.dependenciesMightHaveChanged */) {\n for (const d of this._dependencies) {\n /** might call {@link handleChange} indirectly, which could make us stale */\n d.reportChanges();\n if (this._state === 2 /* DerivedState.stale */) {\n // The other dependencies will refresh on demand, so early break\n break;\n }\n }\n }\n // We called report changes of all dependencies.\n // If we are still not stale, we can assume to be up to date again.\n if (this._state === 1 /* DerivedState.dependenciesMightHaveChanged */) {\n this._state = 3 /* DerivedState.upToDate */;\n }\n if (this._state !== 3 /* DerivedState.upToDate */) {\n this._recompute();\n }\n // In case recomputation changed one of our dependencies, we need to recompute again.\n } while (this._state !== 3 /* DerivedState.upToDate */);\n return this._value;\n }\n }\n _recompute() {\n let didChange = false;\n this._isComputing = true;\n this._didReportChange = false;\n const emptySet = this._dependenciesToBeRemoved;\n this._dependenciesToBeRemoved = this._dependencies;\n this._dependencies = emptySet;\n try {\n const changeSummary = this._changeSummary;\n this._isReaderValid = true;\n if (this._changeTracker) {\n this._isInBeforeUpdate = true;\n this._changeTracker.beforeUpdate?.(this, changeSummary);\n this._isInBeforeUpdate = false;\n this._changeSummary = this._changeTracker?.createChangeSummary(changeSummary);\n }\n const hadValue = this._state !== 0 /* DerivedState.initial */;\n const oldValue = this._value;\n this._state = 3 /* DerivedState.upToDate */;\n const delayedStore = this._delayedStore;\n if (delayedStore !== undefined) {\n this._delayedStore = undefined;\n }\n try {\n if (this._store !== undefined) {\n this._store.dispose();\n this._store = undefined;\n }\n /** might call {@link handleChange} indirectly, which could invalidate us */\n this._value = this._computeFn(this, changeSummary);\n }\n finally {\n this._isReaderValid = false;\n // We don't want our observed observables to think that they are (not even temporarily) not being observed.\n // Thus, we only unsubscribe from observables that are definitely not read anymore.\n for (const o of this._dependenciesToBeRemoved) {\n o.removeObserver(this);\n }\n this._dependenciesToBeRemoved.clear();\n if (delayedStore !== undefined) {\n delayedStore.dispose();\n }\n }\n didChange = this._didReportChange || (hadValue && !(this._equalityComparator(oldValue, this._value)));\n getLogger()?.handleObservableUpdated(this, {\n oldValue,\n newValue: this._value,\n change: undefined,\n didChange,\n hadValue,\n });\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n this._isComputing = false;\n if (!this._didReportChange && didChange) {\n for (const r of this._observers) {\n r.handleChange(this, undefined);\n }\n }\n else {\n this._didReportChange = false;\n }\n }\n toString() {\n return `LazyDerived<${this.debugName}>`;\n }\n // IObserver Implementation\n beginUpdate(_observable) {\n if (this._isUpdating) {\n throw new BugIndicatingError('Cyclic deriveds are not supported yet!');\n }\n this._updateCount++;\n this._isUpdating = true;\n try {\n const propagateBeginUpdate = this._updateCount === 1;\n if (this._state === 3 /* DerivedState.upToDate */) {\n this._state = 1 /* DerivedState.dependenciesMightHaveChanged */;\n // If we propagate begin update, that will already signal a possible change.\n if (!propagateBeginUpdate) {\n for (const r of this._observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n if (propagateBeginUpdate) {\n for (const r of this._observers) {\n r.beginUpdate(this); // This signals a possible change\n }\n }\n }\n finally {\n this._isUpdating = false;\n }\n }\n endUpdate(_observable) {\n this._updateCount--;\n if (this._updateCount === 0) {\n // End update could change the observer list.\n const observers = [...this._observers];\n for (const r of observers) {\n r.endUpdate(this);\n }\n if (this._removedObserverToCallEndUpdateOn) {\n const observers = [...this._removedObserverToCallEndUpdateOn];\n this._removedObserverToCallEndUpdateOn = null;\n for (const r of observers) {\n r.endUpdate(this);\n }\n }\n }\n }\n handlePossibleChange(observable) {\n // In all other states, observers already know that we might have changed.\n if (this._state === 3 /* DerivedState.upToDate */ && this._dependencies.has(observable) && !this._dependenciesToBeRemoved.has(observable)) {\n this._state = 1 /* DerivedState.dependenciesMightHaveChanged */;\n for (const r of this._observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n handleChange(observable, change) {\n if (this._dependencies.has(observable) && !this._dependenciesToBeRemoved.has(observable) || this._isInBeforeUpdate) {\n getLogger()?.handleDerivedDependencyChanged(this, observable, change);\n let shouldReact = false;\n try {\n shouldReact = this._changeTracker ? this._changeTracker.handleChange({\n changedObservable: observable,\n change,\n didChange: (o) => o === observable,\n }, this._changeSummary) : true;\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n const wasUpToDate = this._state === 3 /* DerivedState.upToDate */;\n if (shouldReact && (this._state === 1 /* DerivedState.dependenciesMightHaveChanged */ || wasUpToDate)) {\n this._state = 2 /* DerivedState.stale */;\n if (wasUpToDate) {\n for (const r of this._observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n }\n }\n // IReader Implementation\n _ensureReaderValid() {\n if (!this._isReaderValid) {\n throw new BugIndicatingError('The reader object cannot be used outside its compute function!');\n }\n }\n readObservable(observable) {\n this._ensureReaderValid();\n // Subscribe before getting the value to enable caching\n observable.addObserver(this);\n /** This might call {@link handleChange} indirectly, which could invalidate us */\n const value = observable.get();\n // Which is why we only add the observable to the dependencies now.\n this._dependencies.add(observable);\n this._dependenciesToBeRemoved.delete(observable);\n return value;\n }\n reportChange(change) {\n this._ensureReaderValid();\n this._didReportChange = true;\n // TODO add logging\n for (const r of this._observers) {\n r.handleChange(this, change);\n }\n }\n get store() {\n this._ensureReaderValid();\n if (this._store === undefined) {\n this._store = new DisposableStore();\n }\n return this._store;\n }\n get delayedStore() {\n this._ensureReaderValid();\n if (this._delayedStore === undefined) {\n this._delayedStore = new DisposableStore();\n }\n return this._delayedStore;\n }\n addObserver(observer) {\n const shouldCallBeginUpdate = !this._observers.has(observer) && this._updateCount > 0;\n super.addObserver(observer);\n if (shouldCallBeginUpdate) {\n if (this._removedObserverToCallEndUpdateOn && this._removedObserverToCallEndUpdateOn.has(observer)) {\n this._removedObserverToCallEndUpdateOn.delete(observer);\n }\n else {\n observer.beginUpdate(this);\n }\n }\n }\n removeObserver(observer) {\n if (this._observers.has(observer) && this._updateCount > 0) {\n if (!this._removedObserverToCallEndUpdateOn) {\n this._removedObserverToCallEndUpdateOn = new Set();\n }\n this._removedObserverToCallEndUpdateOn.add(observer);\n }\n super.removeObserver(observer);\n }\n debugGetState() {\n return {\n state: this._state,\n stateStr: derivedStateToString(this._state),\n updateCount: this._updateCount,\n isComputing: this._isComputing,\n dependencies: this._dependencies,\n value: this._value,\n };\n }\n debugSetValue(newValue) {\n this._value = newValue;\n }\n debugRecompute() {\n if (!this._isComputing) {\n this._recompute();\n }\n else {\n this._state = 2 /* DerivedState.stale */;\n }\n }\n setValue(newValue, tx, change) {\n this._value = newValue;\n const observers = this._observers;\n tx.updateObserver(this, this);\n for (const d of observers) {\n d.handleChange(this, change);\n }\n }\n}\nclass DerivedWithSetter extends Derived {\n constructor(debugNameData, computeFn, changeTracker, handleLastObserverRemoved = undefined, equalityComparator, set, debugLocation) {\n super(debugNameData, computeFn, changeTracker, handleLastObserverRemoved, equalityComparator, debugLocation);\n this.set = set;\n }\n}\n\nexport { Derived, DerivedWithSetter };\n//# sourceMappingURL=derivedImpl.js.map\n"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,QAAQ,K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AQ;AAC9B,QAAQ,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU;AACzC,QAAQ,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC;AACrC,QAAQ,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE;AACnC,YAAY,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;AACxC,QAAQ;AACR,IAAI;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"derivedImpl.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { BaseObservable } from './baseObservable.js';\nimport { BugIndicatingError, onBugIndicatingError } from '../commonFacade/deps.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DisposableStore } from '../../disposables.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction derivedStateToString(state) {\n switch (state) {\n case 0 /* DerivedState.initial */: return 'initial';\n case 1 /* DerivedState.dependenciesMightHaveChanged */: return 'dependenciesMightHaveChanged';\n case 2 /* DerivedState.stale */: return 'stale';\n case 3 /* DerivedState.upToDate */: return 'upToDate';\n default: return '<unknown>';\n }\n}\nclass Derived extends BaseObservable {\n get debugName() {\n return this._debugNameData.getDebugName(this) ?? '(anonymous)';\n }\n constructor(_debugNameData, _computeFn, _changeTracker, _handleLastObserverRemoved = undefined, _equalityComparator, debugLocation) {\n super(debugLocation);\n this._debugNameData = _debugNameData;\n this._computeFn = _computeFn;\n this._changeTracker = _changeTracker;\n this._handleLastObserverRemoved = _handleLastObserverRemoved;\n this._equalityComparator = _equalityComparator;\n this._state = 0 /* DerivedState.initial */;\n this._value = undefined;\n this._updateCount = 0;\n this._dependencies = new Set();\n this._dependenciesToBeRemoved = new Set();\n this._changeSummary = undefined;\n this._isUpdating = false;\n this._isComputing = false;\n this._didReportChange = false;\n this._isInBeforeUpdate = false;\n this._isReaderValid = false;\n this._store = undefined;\n this._delayedStore = undefined;\n this._removedObserverToCallEndUpdateOn = null;\n this._changeSummary = this._changeTracker?.createChangeSummary(undefined);\n }\n onLastObserverRemoved() {\n /**\n * We are not tracking changes anymore, thus we have to assume\n * that our cache is invalid.\n */\n this._state = 0 /* DerivedState.initial */;\n this._value = undefined;\n getLogger()?.handleDerivedCleared(this);\n for (const d of this._dependencies) {\n d.removeObserver(this);\n }\n this._dependencies.clear();\n if (this._store !== undefined) {\n this._store.dispose();\n this._store = undefined;\n }\n if (this._delayedStore !== undefined) {\n this._delayedStore.dispose();\n this._delayedStore = undefined;\n }\n this._handleLastObserverRemoved?.();\n }\n get() {\n const checkEnabled = false; // TODO set to true\n if (this._isComputing && checkEnabled) {\n // investigate why this fails in the diff editor!\n throw new BugIndicatingError('Cyclic deriveds are not supported yet!');\n }\n if (this._observers.size === 0) {\n let result;\n // Without observers, we don't know when to clean up stuff.\n // Thus, we don't cache anything to prevent memory leaks.\n try {\n this._isReaderValid = true;\n let changeSummary = undefined;\n if (this._changeTracker) {\n changeSummary = this._changeTracker.createChangeSummary(undefined);\n this._changeTracker.beforeUpdate?.(this, changeSummary);\n }\n result = this._computeFn(this, changeSummary);\n }\n finally {\n this._isReaderValid = false;\n }\n // Clear new dependencies\n this.onLastObserverRemoved();\n return result;\n }\n else {\n do {\n // We might not get a notification for a dependency that changed while it is updating,\n // thus we also have to ask all our depedencies if they changed in this case.\n if (this._state === 1 /* DerivedState.dependenciesMightHaveChanged */) {\n for (const d of this._dependencies) {\n /** might call {@link handleChange} indirectly, which could make us stale */\n d.reportChanges();\n if (this._state === 2 /* DerivedState.stale */) {\n // The other dependencies will refresh on demand, so early break\n break;\n }\n }\n }\n // We called report changes of all dependencies.\n // If we are still not stale, we can assume to be up to date again.\n if (this._state === 1 /* DerivedState.dependenciesMightHaveChanged */) {\n this._state = 3 /* DerivedState.upToDate */;\n }\n if (this._state !== 3 /* DerivedState.upToDate */) {\n this._recompute();\n }\n // In case recomputation changed one of our dependencies, we need to recompute again.\n } while (this._state !== 3 /* DerivedState.upToDate */);\n return this._value;\n }\n }\n _recompute() {\n let didChange = false;\n this._isComputing = true;\n this._didReportChange = false;\n const emptySet = this._dependenciesToBeRemoved;\n this._dependenciesToBeRemoved = this._dependencies;\n this._dependencies = emptySet;\n try {\n const changeSummary = this._changeSummary;\n this._isReaderValid = true;\n if (this._changeTracker) {\n this._isInBeforeUpdate = true;\n this._changeTracker.beforeUpdate?.(this, changeSummary);\n this._isInBeforeUpdate = false;\n this._changeSummary = this._changeTracker?.createChangeSummary(changeSummary);\n }\n const hadValue = this._state !== 0 /* DerivedState.initial */;\n const oldValue = this._value;\n this._state = 3 /* DerivedState.upToDate */;\n const delayedStore = this._delayedStore;\n if (delayedStore !== undefined) {\n this._delayedStore = undefined;\n }\n try {\n if (this._store !== undefined) {\n this._store.dispose();\n this._store = undefined;\n }\n /** might call {@link handleChange} indirectly, which could invalidate us */\n this._value = this._computeFn(this, changeSummary);\n }\n finally {\n this._isReaderValid = false;\n // We don't want our observed observables to think that they are (not even temporarily) not being observed.\n // Thus, we only unsubscribe from observables that are definitely not read anymore.\n for (const o of this._dependenciesToBeRemoved) {\n o.removeObserver(this);\n }\n this._dependenciesToBeRemoved.clear();\n if (delayedStore !== undefined) {\n delayedStore.dispose();\n }\n }\n didChange = this._didReportChange || (hadValue && !(this._equalityComparator(oldValue, this._value)));\n getLogger()?.handleObservableUpdated(this, {\n oldValue,\n newValue: this._value,\n change: undefined,\n didChange,\n hadValue,\n });\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n this._isComputing = false;\n if (!this._didReportChange && didChange) {\n for (const r of this._observers) {\n r.handleChange(this, undefined);\n }\n }\n else {\n this._didReportChange = false;\n }\n }\n toString() {\n return `LazyDerived<${this.debugName}>`;\n }\n // IObserver Implementation\n beginUpdate(_observable) {\n if (this._isUpdating) {\n throw new BugIndicatingError('Cyclic deriveds are not supported yet!');\n }\n this._updateCount++;\n this._isUpdating = true;\n try {\n const propagateBeginUpdate = this._updateCount === 1;\n if (this._state === 3 /* DerivedState.upToDate */) {\n this._state = 1 /* DerivedState.dependenciesMightHaveChanged */;\n // If we propagate begin update, that will already signal a possible change.\n if (!propagateBeginUpdate) {\n for (const r of this._observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n if (propagateBeginUpdate) {\n for (const r of this._observers) {\n r.beginUpdate(this); // This signals a possible change\n }\n }\n }\n finally {\n this._isUpdating = false;\n }\n }\n endUpdate(_observable) {\n this._updateCount--;\n if (this._updateCount === 0) {\n // End update could change the observer list.\n const observers = [...this._observers];\n for (const r of observers) {\n r.endUpdate(this);\n }\n if (this._removedObserverToCallEndUpdateOn) {\n const observers = [...this._removedObserverToCallEndUpdateOn];\n this._removedObserverToCallEndUpdateOn = null;\n for (const r of observers) {\n r.endUpdate(this);\n }\n }\n }\n }\n handlePossibleChange(observable) {\n // In all other states, observers already know that we might have changed.\n if (this._state === 3 /* DerivedState.upToDate */ && this._dependencies.has(observable) && !this._dependenciesToBeRemoved.has(observable)) {\n this._state = 1 /* DerivedState.dependenciesMightHaveChanged */;\n for (const r of this._observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n handleChange(observable, change) {\n if (this._dependencies.has(observable) && !this._dependenciesToBeRemoved.has(observable) || this._isInBeforeUpdate) {\n getLogger()?.handleDerivedDependencyChanged(this, observable, change);\n let shouldReact = false;\n try {\n shouldReact = this._changeTracker ? this._changeTracker.handleChange({\n changedObservable: observable,\n change,\n didChange: (o) => o === observable,\n }, this._changeSummary) : true;\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n const wasUpToDate = this._state === 3 /* DerivedState.upToDate */;\n if (shouldReact && (this._state === 1 /* DerivedState.dependenciesMightHaveChanged */ || wasUpToDate)) {\n this._state = 2 /* DerivedState.stale */;\n if (wasUpToDate) {\n for (const r of this._observers) {\n r.handlePossibleChange(this);\n }\n }\n }\n }\n }\n // IReader Implementation\n _ensureReaderValid() {\n if (!this._isReaderValid) {\n throw new BugIndicatingError('The reader object cannot be used outside its compute function!');\n }\n }\n readObservable(observable) {\n this._ensureReaderValid();\n // Subscribe before getting the value to enable caching\n observable.addObserver(this);\n /** This might call {@link handleChange} indirectly, which could invalidate us */\n const value = observable.get();\n // Which is why we only add the observable to the dependencies now.\n this._dependencies.add(observable);\n this._dependenciesToBeRemoved.delete(observable);\n return value;\n }\n reportChange(change) {\n this._ensureReaderValid();\n this._didReportChange = true;\n // TODO add logging\n for (const r of this._observers) {\n r.handleChange(this, change);\n }\n }\n get store() {\n this._ensureReaderValid();\n if (this._store === undefined) {\n this._store = new DisposableStore();\n }\n return this._store;\n }\n get delayedStore() {\n this._ensureReaderValid();\n if (this._delayedStore === undefined) {\n this._delayedStore = new DisposableStore();\n }\n return this._delayedStore;\n }\n addObserver(observer) {\n const shouldCallBeginUpdate = !this._observers.has(observer) && this._updateCount > 0;\n super.addObserver(observer);\n if (shouldCallBeginUpdate) {\n if (!this._removedObserverToCallEndUpdateOn?.delete(observer)) {\n observer.beginUpdate(this);\n }\n }\n }\n removeObserver(observer) {\n if (this._observers.has(observer) && this._updateCount > 0) {\n if (!this._removedObserverToCallEndUpdateOn) {\n this._removedObserverToCallEndUpdateOn = new Set();\n }\n this._removedObserverToCallEndUpdateOn.add(observer);\n }\n super.removeObserver(observer);\n }\n debugGetState() {\n return {\n state: this._state,\n stateStr: derivedStateToString(this._state),\n updateCount: this._updateCount,\n isComputing: this._isComputing,\n dependencies: this._dependencies,\n value: this._value,\n };\n }\n debugSetValue(newValue) {\n this._value = newValue;\n }\n debugRecompute() {\n this.beginUpdate(this);\n try {\n if (!this._isComputing) {\n this._recompute();\n }\n else {\n this._state = 2 /* DerivedState.stale */;\n }\n }\n finally {\n this.endUpdate(this);\n }\n }\n setValue(newValue, tx, change) {\n this._value = newValue;\n const observers = this._observers;\n tx.updateObserver(this, this);\n for (const d of observers) {\n d.handleChange(this, change);\n }\n }\n}\nclass DerivedWithSetter extends Derived {\n constructor(debugNameData, computeFn, changeTracker, handleLastObserverRemoved = undefined, equalityComparator, set, debugLocation) {\n super(debugNameData, computeFn, changeTracker, handleLastObserverRemoved, equalityComparator, debugLocation);\n this.set = set;\n }\n}\n\nexport { Derived, DerivedWithSetter };\n//# sourceMappingURL=derivedImpl.js.map\n"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,QAAQ,KAAK;AACjB,QAAQ,KAAK,CAAC,6BAA6B,OAAO,SAAS;AAC3D,QAAQ,KAAK,CAAC,kDAAkD,OAAO,8BAA8B;AACrG,QAAQ,KAAK,CAAC,2BAA2B,OAAO,OAAO;AACvD,QAAQ,KAAK,CAAC,8BAA8B,OAAO,UAAU;AAC7D,QAAQ,SAAS,OAAO,WAAW;AACnC;AACA;AACA,MAAM,OAAO,SAAS,cAAc,CAAC;AACrC,IAAI,IAAI,SAAS,GAAG;AACpB,QAAQ,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,aAAa;AACtE,IAAI;AACJ,IAAI,WAAW,CAAC,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,0BAA0B,GAAG,SAAS,EAAE,mBAAmB,EAAE,aAAa,EAAE;AACxI,QAAQ,KAAK,CAAC,aAAa,CAAC;AAC5B,QAAQ,IAAI,CAAC,cAAc,GAAG,cAAc;AAC5C,QAAQ,IAAI,CAAC,UAAU,GAAG,UAAU;AACpC,QAAQ,IAAI,CAAC,cAAc,GAAG,cAAc;AAC5C,QAAQ,IAAI,CAAC,0BAA0B,GAAG,0BAA0B;AACpE,QAAQ,IAAI,CAAC,mBAAmB,GAAG,mBAAmB;AACtD,QAAQ,IAAI,CAAC,MAAM,GAAG,CAAC;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I;AACJ,IAAI,cAAc,GAAG;AACrB,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;AAC9B,QAAQ,IAAI;AACZ,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AACpC,gBAAgB,IAAI,CAAC,UAAU,EAAE;AACjC,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,IAAI,CAAC,MAAM,GAAG,CAAC;AAC/B,YAAY;AACZ,QAAQ;AACR,gBAAgB;AAChB,YAAY,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AAChC,QAAQ;AACR,IAAI;AACJ,IAAI,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,GAAG,QAAQ;AAC9B,QAAQ,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU;AACzC,QAAQ,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC;AACrC,QAAQ,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE;AACnC,YAAY,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;AACxC,QAAQ;AACR,IAAI;AACJ;;;;"}
|
|
@@ -14,14 +14,16 @@ import { DebugLocation } from '../debugLocation.js';
|
|
|
14
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15
15
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
16
16
|
*--------------------------------------------------------------------------------------------*/
|
|
17
|
-
function
|
|
18
|
-
let debugNameData;
|
|
17
|
+
function toDebugNameData(nameOrOwner) {
|
|
19
18
|
if (typeof nameOrOwner === 'string') {
|
|
20
|
-
|
|
19
|
+
return new DebugNameData(undefined, nameOrOwner, undefined);
|
|
21
20
|
}
|
|
22
21
|
else {
|
|
23
|
-
|
|
22
|
+
return new DebugNameData(nameOrOwner, undefined, undefined);
|
|
24
23
|
}
|
|
24
|
+
}
|
|
25
|
+
function observableValue(nameOrOwner, initialValue, debugLocation = DebugLocation.ofCaller()) {
|
|
26
|
+
const debugNameData = toDebugNameData(nameOrOwner);
|
|
25
27
|
return new ObservableValue(debugNameData, initialValue, strictEquals, debugLocation);
|
|
26
28
|
}
|
|
27
29
|
class ObservableValue extends BaseObservable {
|
|
@@ -77,5 +79,5 @@ class ObservableValue extends BaseObservable {
|
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
export { ObservableValue, observableValue };
|
|
82
|
+
export { ObservableValue, observableValue, toDebugNameData };
|
|
81
83
|
//# sourceMappingURL=observableValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observableValue.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { TransactionImpl } from '../transaction.js';\nimport { BaseObservable } from './baseObservable.js';\nimport { strictEquals } from '../commonFacade/deps.js';\nimport { DebugNameData } from '../debugName.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DebugLocation } from '../debugLocation.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction
|
|
1
|
+
{"version":3,"file":"observableValue.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { TransactionImpl } from '../transaction.js';\nimport { BaseObservable } from './baseObservable.js';\nimport { strictEquals } from '../commonFacade/deps.js';\nimport { DebugNameData } from '../debugName.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DebugLocation } from '../debugLocation.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction toDebugNameData(nameOrOwner) {\n if (typeof nameOrOwner === 'string') {\n return new DebugNameData(undefined, nameOrOwner, undefined);\n }\n else {\n return new DebugNameData(nameOrOwner, undefined, undefined);\n }\n}\nfunction observableValue(nameOrOwner, initialValue, debugLocation = DebugLocation.ofCaller()) {\n const debugNameData = toDebugNameData(nameOrOwner);\n return new ObservableValue(debugNameData, initialValue, strictEquals, debugLocation);\n}\nclass ObservableValue extends BaseObservable {\n get debugName() {\n return this._debugNameData.getDebugName(this) ?? 'ObservableValue';\n }\n constructor(_debugNameData, initialValue, _equalityComparator, debugLocation) {\n super(debugLocation);\n this._debugNameData = _debugNameData;\n this._equalityComparator = _equalityComparator;\n this._value = initialValue;\n getLogger()?.handleObservableUpdated(this, { hadValue: false, newValue: initialValue, change: undefined, didChange: true, oldValue: undefined });\n }\n get() {\n return this._value;\n }\n set(value, tx, change) {\n if (change === undefined && this._equalityComparator(this._value, value)) {\n return;\n }\n let _tx;\n if (!tx) {\n tx = _tx = new TransactionImpl(() => { }, () => `Setting ${this.debugName}`);\n }\n try {\n const oldValue = this._value;\n this._setValue(value);\n getLogger()?.handleObservableUpdated(this, { oldValue, newValue: value, change, didChange: true, hadValue: true });\n for (const observer of this._observers) {\n tx.updateObserver(observer, this);\n observer.handleChange(this, change);\n }\n }\n finally {\n if (_tx) {\n _tx.finish();\n }\n }\n }\n toString() {\n return `${this.debugName}: ${this._value}`;\n }\n _setValue(newValue) {\n this._value = newValue;\n }\n debugGetState() {\n return {\n value: this._value,\n };\n }\n debugSetValue(value) {\n this._value = value;\n }\n}\n/**\n * A disposable observable. When disposed, its value is also disposed.\n * When a new value is set, the previous value is disposed.\n */\nfunction disposableObservableValue(nameOrOwner, initialValue, debugLocation = DebugLocation.ofCaller()) {\n let debugNameData;\n if (typeof nameOrOwner === 'string') {\n debugNameData = new DebugNameData(undefined, nameOrOwner, undefined);\n }\n else {\n debugNameData = new DebugNameData(nameOrOwner, undefined, undefined);\n }\n return new DisposableObservableValue(debugNameData, initialValue, strictEquals, debugLocation);\n}\nclass DisposableObservableValue extends ObservableValue {\n _setValue(newValue) {\n if (this._value === newValue) {\n return;\n }\n if (this._value) {\n this._value.dispose();\n }\n this._value = newValue;\n }\n dispose() {\n this._value?.dispose();\n }\n}\n\nexport { DisposableObservableValue, ObservableValue, disposableObservableValue, observableValue, toDebugNameData };\n//# sourceMappingURL=observableValue.js.map\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,WAAW,EAAE;AACtC,IAAI,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACzC,QAAQ,OAAO,IAAI,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC;AACnE,IAAI;AACJ,SAAS;AACT,QAAQ,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC;AACnE,IAAI;AACJ;AACA,SAAS,eAAe,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAE;AAC9F,IAAI,MAAM,aAAa,GAAG,eAAe,CAAC,WAAW,CAAC;AACtD,IAAI,OAAO,IAAI,eAAe,CAAC,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;AACxF;AACA,MAAM,eAAe,SAAS,cAAc,CAAC;AAC7C,IAAI,IAAI,SAAS,GAAG;AACpB,QAAQ,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,iBAAiB;AAC1E,IAAI;AACJ,IAAI,WAAW,CAAC,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE;AAClF,QAAQ,KAAK,CAAC,aAAa,CAAC;AAC5B,QAAQ,IAAI,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,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;AACnD,YAAY;AACZ,QAAQ;AACR,gBAAgB;AAChB,YAAY,IAAI,GAAG,EAAE;AACrB,gBAAgB,GAAG,CAAC,MAAM,EAAE;AAC5B,YAAY;AACZ,QAAQ;AACR,IAAI;AACJ,IAAI,QAAQ,GAAG;AACf,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;AAClD,IAAI;AACJ,IAAI,SAAS,CAAC,QAAQ,EAAE;AACxB,QAAQ,IAAI,CAAC,MAAM,GAAG,QAAQ;AAC9B,IAAI;AACJ,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,IAAI,CAAC,MAAM;AAC9B,SAAS;AACT,IAAI;AACJ,IAAI,aAAa,CAAC,KAAK,EAAE;AACzB,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK;AAC3B,IAAI;AACJ;;;;"}
|
|
@@ -33,6 +33,7 @@ class AutorunObserver {
|
|
|
33
33
|
this._dependencies = new Set();
|
|
34
34
|
this._dependenciesToBeRemoved = new Set();
|
|
35
35
|
this._isRunning = false;
|
|
36
|
+
this._iteration = 0;
|
|
36
37
|
this._store = undefined;
|
|
37
38
|
this._delayedStore = undefined;
|
|
38
39
|
this._changeSummary = this._changeTracker?.createChangeSummary(undefined);
|
|
@@ -110,6 +111,7 @@ class AutorunObserver {
|
|
|
110
111
|
// IObserver implementation
|
|
111
112
|
beginUpdate(_observable) {
|
|
112
113
|
if (this._state === 3 /* AutorunState.upToDate */) {
|
|
114
|
+
this._checkIterations();
|
|
113
115
|
this._state = 1 /* AutorunState.dependenciesMightHaveChanged */;
|
|
114
116
|
}
|
|
115
117
|
this._updateCount++;
|
|
@@ -117,7 +119,11 @@ class AutorunObserver {
|
|
|
117
119
|
endUpdate(_observable) {
|
|
118
120
|
try {
|
|
119
121
|
if (this._updateCount === 1) {
|
|
122
|
+
this._iteration = 1;
|
|
120
123
|
do {
|
|
124
|
+
if (this._checkIterations()) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
121
127
|
if (this._state === 1 /* AutorunState.dependenciesMightHaveChanged */) {
|
|
122
128
|
this._state = 3 /* AutorunState.upToDate */;
|
|
123
129
|
for (const d of this._dependencies) {
|
|
@@ -128,6 +134,7 @@ class AutorunObserver {
|
|
|
128
134
|
}
|
|
129
135
|
}
|
|
130
136
|
}
|
|
137
|
+
this._iteration++;
|
|
131
138
|
if (this._state !== 3 /* AutorunState.upToDate */) {
|
|
132
139
|
this._run(); // Warning: indirect external call!
|
|
133
140
|
}
|
|
@@ -140,6 +147,7 @@ class AutorunObserver {
|
|
|
140
147
|
}
|
|
141
148
|
handlePossibleChange(observable) {
|
|
142
149
|
if (this._state === 3 /* AutorunState.upToDate */ && this._isDependency(observable)) {
|
|
150
|
+
this._checkIterations();
|
|
143
151
|
this._state = 1 /* AutorunState.dependenciesMightHaveChanged */;
|
|
144
152
|
}
|
|
145
153
|
}
|
|
@@ -154,6 +162,7 @@ class AutorunObserver {
|
|
|
154
162
|
didChange: (o) => o === observable,
|
|
155
163
|
}, this._changeSummary) : true;
|
|
156
164
|
if (shouldReact) {
|
|
165
|
+
this._checkIterations();
|
|
157
166
|
this._state = 2 /* AutorunState.stale */;
|
|
158
167
|
}
|
|
159
168
|
}
|
|
@@ -220,6 +229,13 @@ class AutorunObserver {
|
|
|
220
229
|
this._state = 2 /* AutorunState.stale */;
|
|
221
230
|
}
|
|
222
231
|
}
|
|
232
|
+
_checkIterations() {
|
|
233
|
+
if (this._iteration > 100) {
|
|
234
|
+
onBugIndicatingError(new BugIndicatingError(`Autorun '${this.debugName}' is stuck in an infinite update loop.`));
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
223
239
|
}
|
|
224
240
|
|
|
225
241
|
export { AutorunObserver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autorunImpl.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { onBugIndicatingError, BugIndicatingError } from '../commonFacade/deps.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DisposableStore } from '../../disposables.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction autorunStateToString(state) {\n switch (state) {\n case 1 /* AutorunState.dependenciesMightHaveChanged */: return 'dependenciesMightHaveChanged';\n case 2 /* AutorunState.stale */: return 'stale';\n case 3 /* AutorunState.upToDate */: return 'upToDate';\n default: return '<unknown>';\n }\n}\nclass AutorunObserver {\n get debugName() {\n return this._debugNameData.getDebugName(this) ?? '(anonymous)';\n }\n constructor(_debugNameData, _runFn, _changeTracker, debugLocation) {\n this._debugNameData = _debugNameData;\n this._runFn = _runFn;\n this._changeTracker = _changeTracker;\n this._state = 2 /* AutorunState.stale */;\n this._updateCount = 0;\n this._disposed = false;\n this._dependencies = new Set();\n this._dependenciesToBeRemoved = new Set();\n this._isRunning = false;\n this._store = undefined;\n this._delayedStore = undefined;\n this._changeSummary = this._changeTracker?.createChangeSummary(undefined);\n getLogger()?.handleAutorunCreated(this, debugLocation);\n this._run();\n }\n dispose() {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n for (const o of this._dependencies) {\n o.removeObserver(this); // Warning: external call!\n }\n this._dependencies.clear();\n if (this._store !== undefined) {\n this._store.dispose();\n }\n if (this._delayedStore !== undefined) {\n this._delayedStore.dispose();\n }\n getLogger()?.handleAutorunDisposed(this);\n }\n _run() {\n const emptySet = this._dependenciesToBeRemoved;\n this._dependenciesToBeRemoved = this._dependencies;\n this._dependencies = emptySet;\n this._state = 3 /* AutorunState.upToDate */;\n try {\n if (!this._disposed) {\n getLogger()?.handleAutorunStarted(this);\n const changeSummary = this._changeSummary;\n const delayedStore = this._delayedStore;\n if (delayedStore !== undefined) {\n this._delayedStore = undefined;\n }\n try {\n this._isRunning = true;\n if (this._changeTracker) {\n this._changeTracker.beforeUpdate?.(this, changeSummary);\n this._changeSummary = this._changeTracker.createChangeSummary(changeSummary); // Warning: external call!\n }\n if (this._store !== undefined) {\n this._store.dispose();\n this._store = undefined;\n }\n this._runFn(this, changeSummary); // Warning: external call!\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n finally {\n this._isRunning = false;\n if (delayedStore !== undefined) {\n delayedStore.dispose();\n }\n }\n }\n }\n finally {\n if (!this._disposed) {\n getLogger()?.handleAutorunFinished(this);\n }\n // We don't want our observed observables to think that they are (not even temporarily) not being observed.\n // Thus, we only unsubscribe from observables that are definitely not read anymore.\n for (const o of this._dependenciesToBeRemoved) {\n o.removeObserver(this); // Warning: external call!\n }\n this._dependenciesToBeRemoved.clear();\n }\n }\n toString() {\n return `Autorun<${this.debugName}>`;\n }\n // IObserver implementation\n beginUpdate(_observable) {\n if (this._state === 3 /* AutorunState.upToDate */) {\n this._state = 1 /* AutorunState.dependenciesMightHaveChanged */;\n }\n this._updateCount++;\n }\n endUpdate(_observable) {\n try {\n if (this._updateCount === 1) {\n do {\n if (this._state === 1 /* AutorunState.dependenciesMightHaveChanged */) {\n this._state = 3 /* AutorunState.upToDate */;\n for (const d of this._dependencies) {\n d.reportChanges(); // Warning: external call!\n if (this._state === 2 /* AutorunState.stale */) {\n // The other dependencies will refresh on demand\n break;\n }\n }\n }\n if (this._state !== 3 /* AutorunState.upToDate */) {\n this._run(); // Warning: indirect external call!\n }\n } while (this._state !== 3 /* AutorunState.upToDate */);\n }\n }\n finally {\n this._updateCount--;\n }\n }\n handlePossibleChange(observable) {\n if (this._state === 3 /* AutorunState.upToDate */ && this._isDependency(observable)) {\n this._state = 1 /* AutorunState.dependenciesMightHaveChanged */;\n }\n }\n handleChange(observable, change) {\n if (this._isDependency(observable)) {\n getLogger()?.handleAutorunDependencyChanged(this, observable, change);\n try {\n // Warning: external call!\n const shouldReact = this._changeTracker ? this._changeTracker.handleChange({\n changedObservable: observable,\n change,\n didChange: (o) => o === observable,\n }, this._changeSummary) : true;\n if (shouldReact) {\n this._state = 2 /* AutorunState.stale */;\n }\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n }\n }\n _isDependency(observable) {\n return this._dependencies.has(observable) && !this._dependenciesToBeRemoved.has(observable);\n }\n // IReader implementation\n _ensureNoRunning() {\n if (!this._isRunning) {\n throw new BugIndicatingError('The reader object cannot be used outside its compute function!');\n }\n }\n readObservable(observable) {\n this._ensureNoRunning();\n // In case the run action disposes the autorun\n if (this._disposed) {\n return observable.get(); // warning: external call!\n }\n observable.addObserver(this); // warning: external call!\n const value = observable.get(); // warning: external call!\n this._dependencies.add(observable);\n this._dependenciesToBeRemoved.delete(observable);\n return value;\n }\n get store() {\n this._ensureNoRunning();\n if (this._disposed) {\n throw new BugIndicatingError('Cannot access store after dispose');\n }\n if (this._store === undefined) {\n this._store = new DisposableStore();\n }\n return this._store;\n }\n get delayedStore() {\n this._ensureNoRunning();\n if (this._disposed) {\n throw new BugIndicatingError('Cannot access store after dispose');\n }\n if (this._delayedStore === undefined) {\n this._delayedStore = new DisposableStore();\n }\n return this._delayedStore;\n }\n debugGetState() {\n return {\n isRunning: this._isRunning,\n updateCount: this._updateCount,\n dependencies: this._dependencies,\n state: this._state,\n stateStr: autorunStateToString(this._state),\n };\n }\n debugRerun() {\n if (!this._isRunning) {\n this._run();\n }\n else {\n this._state = 2 /* AutorunState.stale */;\n }\n }\n}\n\nexport { AutorunObserver };\n//# sourceMappingURL=autorunImpl.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAA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AAQ;AACR,aAAa;AACb,YAAY,IAAI,CAAC,MAAM,GAAG,CAAC;AAC3B,QAAQ;AACR,IAAI;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"autorunImpl.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { onBugIndicatingError, BugIndicatingError } from '../commonFacade/deps.js';\nimport { getLogger } from '../logging/logging.js';\nimport { DisposableStore } from '../../disposables.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction autorunStateToString(state) {\n switch (state) {\n case 1 /* AutorunState.dependenciesMightHaveChanged */: return 'dependenciesMightHaveChanged';\n case 2 /* AutorunState.stale */: return 'stale';\n case 3 /* AutorunState.upToDate */: return 'upToDate';\n default: return '<unknown>';\n }\n}\nclass AutorunObserver {\n get debugName() {\n return this._debugNameData.getDebugName(this) ?? '(anonymous)';\n }\n constructor(_debugNameData, _runFn, _changeTracker, debugLocation) {\n this._debugNameData = _debugNameData;\n this._runFn = _runFn;\n this._changeTracker = _changeTracker;\n this._state = 2 /* AutorunState.stale */;\n this._updateCount = 0;\n this._disposed = false;\n this._dependencies = new Set();\n this._dependenciesToBeRemoved = new Set();\n this._isRunning = false;\n this._iteration = 0;\n this._store = undefined;\n this._delayedStore = undefined;\n this._changeSummary = this._changeTracker?.createChangeSummary(undefined);\n getLogger()?.handleAutorunCreated(this, debugLocation);\n this._run();\n }\n dispose() {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n for (const o of this._dependencies) {\n o.removeObserver(this); // Warning: external call!\n }\n this._dependencies.clear();\n if (this._store !== undefined) {\n this._store.dispose();\n }\n if (this._delayedStore !== undefined) {\n this._delayedStore.dispose();\n }\n getLogger()?.handleAutorunDisposed(this);\n }\n _run() {\n const emptySet = this._dependenciesToBeRemoved;\n this._dependenciesToBeRemoved = this._dependencies;\n this._dependencies = emptySet;\n this._state = 3 /* AutorunState.upToDate */;\n try {\n if (!this._disposed) {\n getLogger()?.handleAutorunStarted(this);\n const changeSummary = this._changeSummary;\n const delayedStore = this._delayedStore;\n if (delayedStore !== undefined) {\n this._delayedStore = undefined;\n }\n try {\n this._isRunning = true;\n if (this._changeTracker) {\n this._changeTracker.beforeUpdate?.(this, changeSummary);\n this._changeSummary = this._changeTracker.createChangeSummary(changeSummary); // Warning: external call!\n }\n if (this._store !== undefined) {\n this._store.dispose();\n this._store = undefined;\n }\n this._runFn(this, changeSummary); // Warning: external call!\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n finally {\n this._isRunning = false;\n if (delayedStore !== undefined) {\n delayedStore.dispose();\n }\n }\n }\n }\n finally {\n if (!this._disposed) {\n getLogger()?.handleAutorunFinished(this);\n }\n // We don't want our observed observables to think that they are (not even temporarily) not being observed.\n // Thus, we only unsubscribe from observables that are definitely not read anymore.\n for (const o of this._dependenciesToBeRemoved) {\n o.removeObserver(this); // Warning: external call!\n }\n this._dependenciesToBeRemoved.clear();\n }\n }\n toString() {\n return `Autorun<${this.debugName}>`;\n }\n // IObserver implementation\n beginUpdate(_observable) {\n if (this._state === 3 /* AutorunState.upToDate */) {\n this._checkIterations();\n this._state = 1 /* AutorunState.dependenciesMightHaveChanged */;\n }\n this._updateCount++;\n }\n endUpdate(_observable) {\n try {\n if (this._updateCount === 1) {\n this._iteration = 1;\n do {\n if (this._checkIterations()) {\n return;\n }\n if (this._state === 1 /* AutorunState.dependenciesMightHaveChanged */) {\n this._state = 3 /* AutorunState.upToDate */;\n for (const d of this._dependencies) {\n d.reportChanges(); // Warning: external call!\n if (this._state === 2 /* AutorunState.stale */) {\n // The other dependencies will refresh on demand\n break;\n }\n }\n }\n this._iteration++;\n if (this._state !== 3 /* AutorunState.upToDate */) {\n this._run(); // Warning: indirect external call!\n }\n } while (this._state !== 3 /* AutorunState.upToDate */);\n }\n }\n finally {\n this._updateCount--;\n }\n }\n handlePossibleChange(observable) {\n if (this._state === 3 /* AutorunState.upToDate */ && this._isDependency(observable)) {\n this._checkIterations();\n this._state = 1 /* AutorunState.dependenciesMightHaveChanged */;\n }\n }\n handleChange(observable, change) {\n if (this._isDependency(observable)) {\n getLogger()?.handleAutorunDependencyChanged(this, observable, change);\n try {\n // Warning: external call!\n const shouldReact = this._changeTracker ? this._changeTracker.handleChange({\n changedObservable: observable,\n change,\n didChange: (o) => o === observable,\n }, this._changeSummary) : true;\n if (shouldReact) {\n this._checkIterations();\n this._state = 2 /* AutorunState.stale */;\n }\n }\n catch (e) {\n onBugIndicatingError(e);\n }\n }\n }\n _isDependency(observable) {\n return this._dependencies.has(observable) && !this._dependenciesToBeRemoved.has(observable);\n }\n // IReader implementation\n _ensureNoRunning() {\n if (!this._isRunning) {\n throw new BugIndicatingError('The reader object cannot be used outside its compute function!');\n }\n }\n readObservable(observable) {\n this._ensureNoRunning();\n // In case the run action disposes the autorun\n if (this._disposed) {\n return observable.get(); // warning: external call!\n }\n observable.addObserver(this); // warning: external call!\n const value = observable.get(); // warning: external call!\n this._dependencies.add(observable);\n this._dependenciesToBeRemoved.delete(observable);\n return value;\n }\n get store() {\n this._ensureNoRunning();\n if (this._disposed) {\n throw new BugIndicatingError('Cannot access store after dispose');\n }\n if (this._store === undefined) {\n this._store = new DisposableStore();\n }\n return this._store;\n }\n get delayedStore() {\n this._ensureNoRunning();\n if (this._disposed) {\n throw new BugIndicatingError('Cannot access store after dispose');\n }\n if (this._delayedStore === undefined) {\n this._delayedStore = new DisposableStore();\n }\n return this._delayedStore;\n }\n debugGetState() {\n return {\n isRunning: this._isRunning,\n updateCount: this._updateCount,\n dependencies: this._dependencies,\n state: this._state,\n stateStr: autorunStateToString(this._state),\n };\n }\n debugRerun() {\n if (!this._isRunning) {\n this._run();\n }\n else {\n this._state = 2 /* AutorunState.stale */;\n }\n }\n _checkIterations() {\n if (this._iteration > 100) {\n onBugIndicatingError(new BugIndicatingError(`Autorun '${this.debugName}' is stuck in an infinite update loop.`));\n return true;\n }\n return false;\n }\n}\n\nexport { AutorunObserver };\n//# sourceMappingURL=autorunImpl.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,QAAQ,KAAK;AACjB,QAAQ,KAAK,CAAC,kDAAkD,OAAO,8BAA8B;AACrG,QAAQ,KAAK,CAAC,2BAA2B,OAAO,OAAO;AACvD,QAAQ,KAAK,CAAC,8BAA8B,OAAO,UAAU;AAC7D,QAAQ,SAAS,OAAO,WAAW;AACnC;AACA;AACA,MAAM,eAAe,CAAC;AACtB,IAAI,IAAI,SAAS,GAAG;AACpB,QAAQ,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,aAAa;AACtE,IAAI;AACJ,IAAI,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE;AACvE,QAAQ,IAAI,CAAC,cAAc,GAAG,cAAc;AAC5C,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM;AAC5B,QAAQ,IAAI,CAAC,cAAc,GAAG,cAAc;AAC5C,QAAQ,IAAI,CAAC,MAAM,GAAG,CAAC;AACvB,QAAQ,IAAI,CAAC,YAAY,GAAG,CAAC;AAC7B,QAAQ,IAAI,CAAC,SAAS,GAAG,KAAK;AAC9B,QAAQ,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAE;AACtC,QAAQ,IAAI,CAAC,wBAAwB,GAAG,IAAI,GAAG,EAAE;AACjD,QAAQ,IAAI,CAAC,UAAU,GAAG,KAAK;AAC/B,QAAQ,IAAI,CAAC,UAAU,GAAG,CAAC;AAC3B,QAAQ,IAAI,CAAC,MAAM,GAAG,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