@vscode/component-explorer-cli 0.1.1-2 → 0.1.1-21
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/LICENSE +21 -0
- package/README.md +177 -0
- package/SECURITY.md +14 -0
- package/dist/WorktreePool.d.ts +22 -0
- package/dist/WorktreePool.d.ts.map +1 -0
- package/dist/WorktreePool.js +58 -0
- package/dist/WorktreePool.js.map +1 -0
- package/dist/WorktreePool.test.d.ts +2 -0
- package/dist/WorktreePool.test.d.ts.map +1 -0
- package/dist/_virtual/_build-info.js +4 -0
- package/dist/_virtual/_build-info.js.map +1 -0
- package/dist/browserPage.d.ts +5 -0
- package/dist/browserPage.d.ts.map +1 -1
- package/dist/browserPage.js +28 -2
- package/dist/browserPage.js.map +1 -1
- package/dist/commands/acceptCommand.d.ts +2 -1
- package/dist/commands/acceptCommand.d.ts.map +1 -1
- package/dist/commands/acceptCommand.js +15 -8
- package/dist/commands/acceptCommand.js.map +1 -1
- package/dist/commands/checkStabilityCommand.d.ts +12 -0
- package/dist/commands/checkStabilityCommand.d.ts.map +1 -0
- package/dist/commands/checkStabilityCommand.js +84 -0
- package/dist/commands/checkStabilityCommand.js.map +1 -0
- package/dist/commands/compareCommand.d.ts +6 -1
- package/dist/commands/compareCommand.d.ts.map +1 -1
- package/dist/commands/compareCommand.js +64 -71
- package/dist/commands/compareCommand.js.map +1 -1
- package/dist/commands/mcpCommand.d.ts +4 -1
- package/dist/commands/mcpCommand.d.ts.map +1 -1
- package/dist/commands/mcpCommand.js +51 -8
- package/dist/commands/mcpCommand.js.map +1 -1
- package/dist/commands/screenshotCommand.d.ts +9 -2
- package/dist/commands/screenshotCommand.d.ts.map +1 -1
- package/dist/commands/screenshotCommand.js +73 -15
- package/dist/commands/screenshotCommand.js.map +1 -1
- package/dist/commands/serveCommand.d.ts +6 -1
- package/dist/commands/serveCommand.d.ts.map +1 -1
- package/dist/commands/serveCommand.js +104 -23
- package/dist/commands/serveCommand.js.map +1 -1
- package/dist/commands/watchCommand.d.ts +3 -2
- package/dist/commands/watchCommand.d.ts.map +1 -1
- package/dist/commands/watchCommand.js +28 -80
- package/dist/commands/watchCommand.js.map +1 -1
- package/dist/comparison.d.ts +70 -0
- package/dist/comparison.d.ts.map +1 -0
- package/dist/comparison.js +264 -0
- package/dist/comparison.js.map +1 -0
- package/dist/component-explorer-config.schema.json +222 -0
- package/dist/componentExplorer.d.ts +40 -2
- package/dist/componentExplorer.d.ts.map +1 -1
- package/dist/componentExplorer.js +118 -24
- package/dist/componentExplorer.js.map +1 -1
- package/dist/daemon/DaemonContext.d.ts +4 -0
- package/dist/daemon/DaemonContext.d.ts.map +1 -0
- package/dist/daemon/DaemonService.d.ts +146 -21
- package/dist/daemon/DaemonService.d.ts.map +1 -1
- package/dist/daemon/DaemonService.js +620 -123
- package/dist/daemon/DaemonService.js.map +1 -1
- package/dist/daemon/dynamicSessions.test.d.ts +2 -0
- package/dist/daemon/dynamicSessions.test.d.ts.map +1 -0
- package/dist/daemon/lifecycle.d.ts +8 -3
- package/dist/daemon/lifecycle.d.ts.map +1 -1
- package/dist/daemon/lifecycle.js +27 -10
- package/dist/daemon/lifecycle.js.map +1 -1
- package/dist/daemon/pipeClient.d.ts +6 -1
- package/dist/daemon/pipeClient.d.ts.map +1 -1
- package/dist/daemon/pipeClient.js +101 -8
- package/dist/daemon/pipeClient.js.map +1 -1
- package/dist/daemon/pipeServer.d.ts +2 -1
- package/dist/daemon/pipeServer.d.ts.map +1 -1
- package/dist/daemon/pipeServer.js +56 -6
- package/dist/daemon/pipeServer.js.map +1 -1
- package/dist/daemon/types.d.ts +12 -0
- package/dist/daemon/types.d.ts.map +1 -0
- package/dist/daemon/version.d.ts +10 -0
- package/dist/daemon/version.d.ts.map +1 -0
- package/dist/daemon/version.js +17 -0
- package/dist/daemon/version.js.map +1 -0
- package/dist/dependencyInstaller.d.ts +2 -2
- package/dist/dependencyInstaller.d.ts.map +1 -1
- package/dist/dependencyInstaller.js +1 -1
- package/dist/dependencyInstaller.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/disposables.js +24 -1
- package/dist/external/vscode-observables/observables/dist/disposables.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js +1 -4
- package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/index.js +2 -5
- package/dist/external/vscode-observables/observables/dist/observableInternal/index.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js +30 -6
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js +12 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js.map +1 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js +55 -0
- package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js.map +1 -0
- package/dist/formatValue.d.ts +2 -0
- package/dist/formatValue.d.ts.map +1 -0
- package/dist/formatValue.js +96 -0
- package/dist/formatValue.js.map +1 -0
- package/dist/formatValue.test.d.ts +2 -0
- package/dist/formatValue.test.d.ts.map +1 -0
- package/dist/git/gitIndexResolver.d.ts +25 -0
- package/dist/git/gitIndexResolver.d.ts.map +1 -0
- package/dist/git/gitIndexResolver.js +91 -0
- package/dist/git/gitIndexResolver.js.map +1 -0
- package/dist/git/gitIndexResolver.test.d.ts +2 -0
- package/dist/git/gitIndexResolver.test.d.ts.map +1 -0
- package/dist/git/gitService.d.ts +2 -0
- package/dist/git/gitService.d.ts.map +1 -1
- package/dist/git/gitService.js +6 -0
- package/dist/git/gitService.js.map +1 -1
- package/dist/git/gitUtils.js +1 -1
- package/dist/git/gitUtils.js.map +1 -1
- package/dist/git/gitWorktreeManager.d.ts +6 -0
- package/dist/git/gitWorktreeManager.d.ts.map +1 -1
- package/dist/git/gitWorktreeManager.js +42 -13
- package/dist/git/gitWorktreeManager.js.map +1 -1
- package/dist/git/gitWorktreeManager.test.d.ts +2 -0
- package/dist/git/gitWorktreeManager.test.d.ts.map +1 -0
- package/dist/git/testUtils.d.ts +13 -0
- package/dist/git/testUtils.d.ts.map +1 -0
- package/dist/httpServer.d.ts +6 -1
- package/dist/httpServer.d.ts.map +1 -1
- package/dist/httpServer.js +30 -10
- package/dist/httpServer.js.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +7 -1
- package/dist/logger.js.map +1 -1
- package/dist/mcp/McpServer.d.ts +47 -4
- package/dist/mcp/McpServer.d.ts.map +1 -1
- package/dist/mcp/McpServer.js +913 -155
- package/dist/mcp/McpServer.js.map +1 -1
- package/dist/mcp/TaskManager.d.ts +28 -0
- package/dist/mcp/TaskManager.d.ts.map +1 -0
- package/dist/mcp/TaskManager.js +54 -0
- package/dist/mcp/TaskManager.js.map +1 -0
- package/dist/packages/simple-api/dist/chunk-3R7GHWBM.js +137 -0
- package/dist/packages/simple-api/dist/chunk-3R7GHWBM.js.map +1 -0
- package/dist/packages/simple-api/dist/chunk-SGBCNXYH.js +24 -0
- package/dist/packages/simple-api/dist/chunk-SGBCNXYH.js.map +1 -0
- package/dist/packages/simple-api/dist/chunk-TAEFVNPN.js +27 -0
- package/dist/packages/simple-api/dist/chunk-TAEFVNPN.js.map +1 -0
- package/dist/packages/simple-api/dist/express.js +104 -0
- package/dist/packages/simple-api/dist/express.js.map +1 -0
- package/dist/resolveProject.d.ts +21 -0
- package/dist/resolveProject.d.ts.map +1 -0
- package/dist/resolveProject.js +39 -0
- package/dist/resolveProject.js.map +1 -0
- package/dist/utils.d.ts +31 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +49 -0
- package/dist/utils.js.map +1 -0
- package/dist/watchConfig.d.ts +52 -9
- package/dist/watchConfig.d.ts.map +1 -1
- package/dist/watchConfig.js +67 -62
- package/dist/watchConfig.js.map +1 -1
- package/package.json +31 -8
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js +0 -72
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js +0 -447
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js +0 -64
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js +0 -52
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js.map +0 -1
|
@@ -9,7 +9,7 @@ async function installDependencies(worktreePath, config, logger) {
|
|
|
9
9
|
const command = resolveCommand(worktreePath, config);
|
|
10
10
|
logger.log(`Installing dependencies: ${command}`);
|
|
11
11
|
await new Promise((resolve, reject) => {
|
|
12
|
-
const proc = exec(command, { cwd: worktreePath, encoding: 'utf-8' }, (err) => {
|
|
12
|
+
const proc = exec(command, { cwd: worktreePath, encoding: 'utf-8', windowsHide: true }, (err) => {
|
|
13
13
|
if (err) {
|
|
14
14
|
reject(new Error(`Dependency install failed: ${err.message}`));
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencyInstaller.js","sources":["../src/dependencyInstaller.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMO,eAAe,mBAAmB,CACxC,YAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"dependencyInstaller.js","sources":["../src/dependencyInstaller.ts"],"sourcesContent":[null],"names":[],"mappings":";;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gC;AACpD,QAAA,KAAK,QAAQ,EAAE,OAAO,MAAM,CAAC,OAAO;QACpC,KAAK,MAAM,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;AACtD,QAAA,SAAS,MAAM,IAAI,KAAK,CAAC,CAAA,6BAAA,EAAiC,MAA2B,CAAC,IAAI,CAAA,CAAE,CAAC;;AAE/F;AAEA,SAAS,oBAAoB,CAAC,YAAoB,EAAA;AACjD,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC,EAAE;AAC7D,QAAA,OAAO,gCAAgC;IACxC;AACA,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,EAAE;AACxD,QAAA,OAAO,gCAAgC;IACxC;AACA,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC,EAAE;AAChE,QAAA,OAAO,QAAQ;IAChB;AACA,IAAA,OAAO,aAAa;AACrB;;;;"}
|
|
@@ -38,6 +38,29 @@ class DisposableStore {
|
|
|
38
38
|
this.disposables = [];
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
class Disposable {
|
|
42
|
+
constructor() {
|
|
43
|
+
this._store = new DisposableStore();
|
|
44
|
+
}
|
|
45
|
+
dispose() {
|
|
46
|
+
this._store.dispose();
|
|
47
|
+
}
|
|
48
|
+
_register(t) {
|
|
49
|
+
this._store.add(t);
|
|
50
|
+
return t;
|
|
51
|
+
}
|
|
52
|
+
_registerOrDispose(t) {
|
|
53
|
+
if (t) {
|
|
54
|
+
if (this._store.isDisposed) {
|
|
55
|
+
t.dispose();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this._store.add(t);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return t;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
41
64
|
|
|
42
|
-
export { DisposableStore };
|
|
65
|
+
export { Disposable, DisposableStore };
|
|
43
66
|
//# sourceMappingURL=disposables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposables.js","sources":["../../../../../../../external/vscode-observables/observables/dist/disposables.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 *--------------------------------------------------------------------------------------------*/\nclass DisposableStore {\n constructor() {\n this.disposables = [];\n this._isDisposed = false;\n }\n get isDisposed() { return this._isDisposed; }\n dispose() {\n this.clear();\n this._isDisposed = true;\n }\n add(disposable) {\n if (disposable) {\n this.disposables.push(disposable);\n }\n return disposable;\n }\n remove(disposable) {\n if (!disposable) {\n return disposable;\n }\n const index = this.disposables.indexOf(disposable);\n if (index !== -1) {\n this.disposables.splice(index, 1);\n }\n return disposable;\n }\n clear() {\n for (const disposable of this.disposables) {\n disposable.dispose();\n }\n this.disposables = [];\n }\n leakItems() {\n this.disposables = [];\n }\n}\nclass Disposable {\n constructor() {\n this._store = new DisposableStore();\n }\n dispose() {\n this._store.dispose();\n }\n _register(t) {\n this._store.add(t);\n return t;\n }\n _registerOrDispose(t) {\n if (t) {\n if (this._store.isDisposed) {\n t.dispose();\n }\n else {\n this._store.add(t);\n }\n }\n return t;\n }\n}\n\nexport { Disposable, DisposableStore };\n//# sourceMappingURL=disposables.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,MAAM,eAAe,CAAC;AACtB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK;AAChC,IAAI;AACJ,IAAI,IAAI,UAAU,GAAG,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;AAChD,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;AAC/B,IAAI;AACJ,IAAI,GAAG,CAAC,UAAU,EAAE;AACpB,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,OAAO,UAAU;AAC7B,QAAQ;AACR,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,QAAQ,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1B,YAAY,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,KAAK,GAAG;AACZ,QAAQ,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE;AACnD,YAAY,UAAU,CAAC,OAAO,EAAE;AAChC,QAAQ;AACR,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ,IAAI,SAAS,GAAG;AAChB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"disposables.js","sources":["../../../../../../../external/vscode-observables/observables/dist/disposables.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 *--------------------------------------------------------------------------------------------*/\nclass DisposableStore {\n constructor() {\n this.disposables = [];\n this._isDisposed = false;\n }\n get isDisposed() { return this._isDisposed; }\n dispose() {\n this.clear();\n this._isDisposed = true;\n }\n add(disposable) {\n if (disposable) {\n this.disposables.push(disposable);\n }\n return disposable;\n }\n remove(disposable) {\n if (!disposable) {\n return disposable;\n }\n const index = this.disposables.indexOf(disposable);\n if (index !== -1) {\n this.disposables.splice(index, 1);\n }\n return disposable;\n }\n clear() {\n for (const disposable of this.disposables) {\n disposable.dispose();\n }\n this.disposables = [];\n }\n leakItems() {\n this.disposables = [];\n }\n}\nclass Disposable {\n constructor() {\n this._store = new DisposableStore();\n }\n dispose() {\n this._store.dispose();\n }\n _register(t) {\n this._store.add(t);\n return t;\n }\n _registerOrDispose(t) {\n if (t) {\n if (this._store.isDisposed) {\n t.dispose();\n }\n else {\n this._store.add(t);\n }\n }\n return t;\n }\n}\n\nexport { Disposable, DisposableStore };\n//# sourceMappingURL=disposables.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,MAAM,eAAe,CAAC;AACtB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK;AAChC,IAAI;AACJ,IAAI,IAAI,UAAU,GAAG,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;AAChD,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;AAC/B,IAAI;AACJ,IAAI,GAAG,CAAC,UAAU,EAAE;AACpB,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,OAAO,UAAU;AAC7B,QAAQ;AACR,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,QAAQ,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1B,YAAY,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,KAAK,GAAG;AACZ,QAAQ,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE;AACnD,YAAY,UAAU,CAAC,OAAO,EAAE;AAChC,QAAQ;AACR,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ,IAAI,SAAS,GAAG;AAChB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ;AACA,MAAM,UAAU,CAAC;AACjB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,EAAE;AAC3C,IAAI;AACJ,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC7B,IAAI;AACJ,IAAI,SAAS,CAAC,CAAC,EAAE;AACjB,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1B,QAAQ,OAAO,CAAC;AAChB,IAAI;AACJ,IAAI,kBAAkB,CAAC,CAAC,EAAE;AAC1B,QAAQ,IAAI,CAAC,EAAE;AACf,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AACxC,gBAAgB,CAAC,CAAC,OAAO,EAAE;AAC3B,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,YAAY;AACZ,QAAQ;AACR,QAAQ,OAAO,CAAC;AAChB,IAAI;AACJ;;;;"}
|
package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js
CHANGED
|
@@ -32,9 +32,6 @@ function onUnexpectedError(error) {
|
|
|
32
32
|
* Compares two items for equality using strict equality.
|
|
33
33
|
*/
|
|
34
34
|
const strictEquals = (a, b) => a === b;
|
|
35
|
-
function isDefined(arg) {
|
|
36
|
-
return arg !== undefined && arg !== null;
|
|
37
|
-
}
|
|
38
35
|
|
|
39
|
-
export { BugIndicatingError,
|
|
36
|
+
export { BugIndicatingError, onBugIndicatingError, onUnexpectedError, strictEquals, toDisposable };
|
|
40
37
|
//# sourceMappingURL=deps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.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 *--------------------------------------------------------------------------------------------*/\nfunction toDisposable(fn) {\n return {\n dispose: fn\n };\n}\nclass BugIndicatingError extends Error {\n constructor(message) {\n super(message || 'An unexpected bug occurred.');\n Object.setPrototypeOf(this, BugIndicatingError.prototype);\n // Because we know for sure only buggy code throws this,\n // we definitely want to break here and fix the bug.\n // eslint-disable-next-line no-debugger\n // debugger;\n }\n}\nfunction onBugIndicatingError(error) {\n // debugger;\n throw error;\n}\nfunction onUnexpectedError(error) {\n console.error('Unexpected error:', error);\n}\n/**\n * Compares two items for equality using strict equality.\n*/\nconst strictEquals = (a, b) => a === b;\
|
|
1
|
+
{"version":3,"file":"deps.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.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 *--------------------------------------------------------------------------------------------*/\nfunction toDisposable(fn) {\n return {\n dispose: fn\n };\n}\nclass BugIndicatingError extends Error {\n constructor(message) {\n super(message || 'An unexpected bug occurred.');\n Object.setPrototypeOf(this, BugIndicatingError.prototype);\n // Because we know for sure only buggy code throws this,\n // we definitely want to break here and fix the bug.\n // eslint-disable-next-line no-debugger\n // debugger;\n }\n}\nfunction onBugIndicatingError(error) {\n // debugger;\n throw error;\n}\nfunction onUnexpectedError(error) {\n console.error('Unexpected error:', error);\n}\n/**\n * Compares two items for equality using strict equality.\n*/\nconst strictEquals = (a, b) => a === b;\n\nexport { BugIndicatingError, onBugIndicatingError, onUnexpectedError, strictEquals, toDisposable };\n//# sourceMappingURL=deps.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,EAAE,EAAE;AAC1B,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE;AACjB,KAAK;AACL;AACA,MAAM,kBAAkB,SAAS,KAAK,CAAC;AACvC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,KAAK,CAAC,OAAO,IAAI,6BAA6B,CAAC;AACvD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC;AACjE;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC;AACA,IAAI,MAAM,KAAK;AACf;AACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;AAClC,IAAI,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC;AAC7C;AACA;AACA;AACA;AACK,MAAC,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setLogObservableFn } from './logging/logging.js';
|
|
2
2
|
import { _setDebugGetDependencyGraph } from './observables/baseObservable.js';
|
|
3
3
|
export { DebugLocation } from './debugLocation.js';
|
|
4
|
-
export { derivedOpts } from './observables/derived.js';
|
|
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 { DevToolsLogger } from './logging/debugger/devToolsLogger.js';
|
|
9
8
|
import { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';
|
|
10
9
|
|
|
11
10
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -20,6 +19,4 @@ import { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';
|
|
|
20
19
|
// This is a facade for the observable implementation. Only import from here!
|
|
21
20
|
_setDebugGetDependencyGraph(debugGetDependencyGraph);
|
|
22
21
|
setLogObservableFn(logObservableToConsole);
|
|
23
|
-
// To debug observables you also need the extension "ms-vscode.debug-value-editor"
|
|
24
|
-
addLogger(DevToolsLogger.getInstance());
|
|
25
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 {
|
|
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 { _setDebugGetDependencyGraph } 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 { debugGetDependencyGraph } 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_setDebugGetDependencyGraph(debugGetDependencyGraph);\nsetLogObservableFn(logObservableToConsole);\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA,2BAA2B,CAAC,uBAAuB,CAAC;AACpD,kBAAkB,CAAC,sBAAsB,CAAC"}
|
|
@@ -244,6 +244,15 @@ function styled(text, options = {
|
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
function formatValue(value, availableLen) {
|
|
247
|
+
try {
|
|
248
|
+
return formatValueUnsafe(value, availableLen);
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// Value could not be formatted (e.g., a Proxy that throws on coercion)
|
|
252
|
+
return '[[???]]';
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function formatValueUnsafe(value, availableLen) {
|
|
247
256
|
switch (typeof value) {
|
|
248
257
|
case 'number':
|
|
249
258
|
return '' + value;
|
|
@@ -290,17 +299,32 @@ function formatArray(value, availableLen) {
|
|
|
290
299
|
return result;
|
|
291
300
|
}
|
|
292
301
|
function formatObject(value, availableLen) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (
|
|
296
|
-
|
|
302
|
+
// Avoid drilling into Proxies - wrap operations that could trigger traps
|
|
303
|
+
try {
|
|
304
|
+
if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {
|
|
305
|
+
const val = value.toString();
|
|
306
|
+
if (val.length <= availableLen) {
|
|
307
|
+
return val;
|
|
308
|
+
}
|
|
309
|
+
return val.substring(0, availableLen - 3) + '...';
|
|
297
310
|
}
|
|
298
|
-
|
|
311
|
+
}
|
|
312
|
+
catch {
|
|
313
|
+
// toString triggered a Proxy trap or threw - bail out
|
|
314
|
+
return '[[Object]]';
|
|
299
315
|
}
|
|
300
316
|
const className = getClassName(value);
|
|
301
317
|
let result = className ? className + '(' : '{ ';
|
|
302
318
|
let first = true;
|
|
303
|
-
|
|
319
|
+
let entries;
|
|
320
|
+
try {
|
|
321
|
+
entries = Object.entries(value);
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
// Object.entries triggered a Proxy trap - bail out
|
|
325
|
+
return className ? `${className}(...)` : '[[Object]]';
|
|
326
|
+
}
|
|
327
|
+
for (const [key, val] of entries) {
|
|
304
328
|
if (!first) {
|
|
305
329
|
result += ', ';
|
|
306
330
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleObservableLogger.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.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 { addLogger } from './logging.js';\nimport { getClassName } from '../debugName.js';\nimport { Derived } from '../observables/derivedImpl.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 consoleObservableLogger;\nfunction logObservableToConsole(obs) {\n if (!consoleObservableLogger) {\n consoleObservableLogger = new ConsoleObservableLogger();\n addLogger(consoleObservableLogger);\n }\n consoleObservableLogger.addFilteredObj(obs);\n}\nclass ConsoleObservableLogger {\n constructor() {\n this.indentation = 0;\n this.changedObservablesSets = new WeakMap();\n }\n addFilteredObj(obj) {\n if (!this._filteredObjects) {\n this._filteredObjects = new Set();\n }\n this._filteredObjects.add(obj);\n }\n _isIncluded(obj) {\n return this._filteredObjects?.has(obj) ?? true;\n }\n textToConsoleArgs(text) {\n return consoleTextToArgs([\n normalText(repeat('| ', this.indentation)),\n text,\n ]);\n }\n formatInfo(info) {\n if (!info.hadValue) {\n return [\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n normalText(` (initial)`),\n ];\n }\n return info.didChange\n ? [\n normalText(` `),\n styled(formatValue(info.oldValue, 70), {\n color: 'red',\n strikeThrough: true,\n }),\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n ]\n : [normalText(` (unchanged)`)];\n }\n handleObservableCreated(observable) {\n if (observable instanceof Derived) {\n const derived = observable;\n this.changedObservablesSets.set(derived, new Set());\n }\n }\n handleOnListenerCountChanged(observable, newCount) {\n }\n handleObservableUpdated(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n if (observable instanceof Derived) {\n this._handleDerivedRecomputed(observable, info);\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable value changed'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n ]));\n }\n formatChanges(changes) {\n if (changes.size === 0) {\n return undefined;\n }\n return styled(' (changed deps: ' +\n [...changes].map((o) => o.debugName).join(', ') +\n ')', { color: 'gray' });\n }\n handleDerivedDependencyChanged(derived, observable, change) {\n if (!this._isIncluded(derived)) {\n return;\n }\n this.changedObservablesSets.get(derived)?.add(observable);\n }\n _handleDerivedRecomputed(derived, info) {\n if (!this._isIncluded(derived)) {\n return;\n }\n const changedObservables = this.changedObservablesSets.get(derived);\n if (!changedObservables) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived recomputed'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n this.formatChanges(changedObservables),\n { data: [{ fn: derived._debugNameData.referenceFn ?? derived._computeFn }] }\n ]));\n changedObservables.clear();\n }\n handleDerivedCleared(derived) {\n if (!this._isIncluded(derived)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived cleared'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ]));\n }\n handleFromEventObservableTriggered(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable from event triggered'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n { data: [{ fn: observable._getValue }] }\n ]));\n }\n handleAutorunCreated(autorun) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.set(autorun, new Set());\n }\n handleAutorunDisposed(autorun) {\n }\n handleAutorunDependencyChanged(autorun, observable, change) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.get(autorun).add(observable);\n }\n handleAutorunStarted(autorun) {\n const changedObservables = this.changedObservablesSets.get(autorun);\n if (!changedObservables) {\n return;\n }\n if (this._isIncluded(autorun)) {\n console.log(...this.textToConsoleArgs([\n formatKind('autorun'),\n styled(autorun.debugName, { color: 'BlueViolet' }),\n this.formatChanges(changedObservables),\n { data: [{ fn: autorun._debugNameData.referenceFn ?? autorun._runFn }] }\n ]));\n }\n changedObservables.clear();\n this.indentation++;\n }\n handleAutorunFinished(autorun) {\n this.indentation--;\n }\n handleBeginTransaction(transaction) {\n let transactionName = transaction.getDebugName();\n if (transactionName === undefined) {\n transactionName = '';\n }\n if (this._isIncluded(transaction)) {\n console.log(...this.textToConsoleArgs([\n formatKind('transaction'),\n styled(transactionName, { color: 'BlueViolet' }),\n { data: [{ fn: transaction._fn }] }\n ]));\n }\n this.indentation++;\n }\n handleEndTransaction() {\n this.indentation--;\n }\n}\nfunction consoleTextToArgs(text) {\n const styles = new Array();\n const data = [];\n let firstArg = '';\n function process(t) {\n if ('length' in t) {\n for (const item of t) {\n if (item) {\n process(item);\n }\n }\n }\n else if ('text' in t) {\n firstArg += `%c${t.text}`;\n styles.push(t.style);\n if (t.data) {\n data.push(...t.data);\n }\n }\n else if ('data' in t) {\n data.push(...t.data);\n }\n }\n process(text);\n const result = [firstArg, ...styles];\n result.push(...data);\n return result;\n}\nfunction normalText(text) {\n return styled(text, { color: 'black' });\n}\nfunction formatKind(kind) {\n return styled(padStr(`${kind}: `, 10), { color: 'black', bold: true });\n}\nfunction styled(text, options = {\n color: 'black',\n}) {\n function objToCss(styleObj) {\n return Object.entries(styleObj).reduce((styleString, [propName, propValue]) => {\n return `${styleString}${propName}:${propValue};`;\n }, '');\n }\n const style = {\n color: options.color,\n };\n if (options.strikeThrough) {\n style['text-decoration'] = 'line-through';\n }\n if (options.bold) {\n style['font-weight'] = 'bold';\n }\n return {\n text,\n style: objToCss(style),\n };\n}\nfunction formatValue(value, availableLen) {\n switch (typeof value) {\n case 'number':\n return '' + value;\n case 'string':\n if (value.length + 2 <= availableLen) {\n return `\"${value}\"`;\n }\n return `\"${value.substr(0, availableLen - 7)}\"+...`;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'undefined':\n return 'undefined';\n case 'object':\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return formatArray(value, availableLen);\n }\n return formatObject(value, availableLen);\n case 'symbol':\n return value.toString();\n case 'function':\n return `[[Function${value.name ? ' ' + value.name : ''}]]`;\n default:\n return '' + value;\n }\n}\nfunction formatArray(value, availableLen) {\n let result = '[ ';\n let first = true;\n for (const val of value) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${formatValue(val, availableLen - result.length)}`;\n }\n result += ' ]';\n return result;\n}\nfunction formatObject(value, availableLen) {\n if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {\n const val = value.toString();\n if (val.length <= availableLen) {\n return val;\n }\n return val.substring(0, availableLen - 3) + '...';\n }\n const className = getClassName(value);\n let result = className ? className + '(' : '{ ';\n let first = true;\n for (const [key, val] of Object.entries(value)) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${key}: ${formatValue(val, availableLen - result.length)}`;\n }\n result += className ? ')' : ' }';\n return result;\n}\nfunction repeat(str, count) {\n let result = '';\n for (let i = 1; i <= count; i++) {\n result += str;\n }\n return result;\n}\nfunction padStr(str, length) {\n while (str.length < length) {\n str += ' ';\n }\n return str;\n}\n\nexport { ConsoleObservableLogger, formatValue, logObservableToConsole };\n//# sourceMappingURL=consoleObservableLogger.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,IAAI,uBAAuB;AAC3B,SAAS,sBAAsB,CAAC,GAAG,EAAE;AACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAClC,QAAQ,uBAAuB,GAAG,IAAI,uBAAuB,EAAE;AAC/D,QAAQ,SAAS,CAAC,uBAAuB,CAAC;AAC1C,IAAI;AACJ,IAAI,uBAAuB,CAAC,cAAc,CAAC,GAAG,CAAC;AAC/C;AACA,MAAM,uBAAuB,CAAC;AAC9B,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,CAAC;AAC5B,QAAQ,IAAI,CAAC,sBAAsB,GAAG,IAAI,OAAO,EAAE;AACnD,IAAI;AACJ,IAAI,cAAc,CAAC,GAAG,EAAE;AACxB,QAAQ,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;AACpC,YAAY,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE;AAC7C,QAAQ;AACR,QAAQ,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;AACtC,IAAI;AACJ,IAAI,WAAW,CAAC,GAAG,EAAE;AACrB,QAAQ,OAAO,IAAI,CAA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,MAAM,IAAI,KAAK;AAC3B,YAAY;AACZ,QAAQ;AACR,QAAQ,KAAK,GAAG,KAAK;AACrB,QAAQ,MAAM,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7E,IAAI;AACJ,IAAI,MAAM,IAAI,SAAS,GAAG,GAAG,GAAG,IAAI;AACpC,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE;AAC5B,IAAI,IAAI,MAAM,GAAG,EAAE;AACnB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE;AACrC,QAAQ,MAAM,IAAI,GAAG;AACrB,IAAI;AACJ,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE;AAC7B,IAAI,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE;AAChC,QAAQ,GAAG,IAAI,GAAG;AAClB,IAAI;AACJ,IAAI,OAAO,GAAG;AACd;;;;"}
|
|
1
|
+
{"version":3,"file":"consoleObservableLogger.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.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 { addLogger } from './logging.js';\nimport { getClassName } from '../debugName.js';\nimport { Derived } from '../observables/derivedImpl.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 consoleObservableLogger;\nfunction logObservableToConsole(obs) {\n if (!consoleObservableLogger) {\n consoleObservableLogger = new ConsoleObservableLogger();\n addLogger(consoleObservableLogger);\n }\n consoleObservableLogger.addFilteredObj(obs);\n}\nclass ConsoleObservableLogger {\n constructor() {\n this.indentation = 0;\n this.changedObservablesSets = new WeakMap();\n }\n addFilteredObj(obj) {\n if (!this._filteredObjects) {\n this._filteredObjects = new Set();\n }\n this._filteredObjects.add(obj);\n }\n _isIncluded(obj) {\n return this._filteredObjects?.has(obj) ?? true;\n }\n textToConsoleArgs(text) {\n return consoleTextToArgs([\n normalText(repeat('| ', this.indentation)),\n text,\n ]);\n }\n formatInfo(info) {\n if (!info.hadValue) {\n return [\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n normalText(` (initial)`),\n ];\n }\n return info.didChange\n ? [\n normalText(` `),\n styled(formatValue(info.oldValue, 70), {\n color: 'red',\n strikeThrough: true,\n }),\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n ]\n : [normalText(` (unchanged)`)];\n }\n handleObservableCreated(observable) {\n if (observable instanceof Derived) {\n const derived = observable;\n this.changedObservablesSets.set(derived, new Set());\n }\n }\n handleOnListenerCountChanged(observable, newCount) {\n }\n handleObservableUpdated(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n if (observable instanceof Derived) {\n this._handleDerivedRecomputed(observable, info);\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable value changed'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n ]));\n }\n formatChanges(changes) {\n if (changes.size === 0) {\n return undefined;\n }\n return styled(' (changed deps: ' +\n [...changes].map((o) => o.debugName).join(', ') +\n ')', { color: 'gray' });\n }\n handleDerivedDependencyChanged(derived, observable, change) {\n if (!this._isIncluded(derived)) {\n return;\n }\n this.changedObservablesSets.get(derived)?.add(observable);\n }\n _handleDerivedRecomputed(derived, info) {\n if (!this._isIncluded(derived)) {\n return;\n }\n const changedObservables = this.changedObservablesSets.get(derived);\n if (!changedObservables) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived recomputed'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n this.formatChanges(changedObservables),\n { data: [{ fn: derived._debugNameData.referenceFn ?? derived._computeFn }] }\n ]));\n changedObservables.clear();\n }\n handleDerivedCleared(derived) {\n if (!this._isIncluded(derived)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived cleared'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ]));\n }\n handleFromEventObservableTriggered(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable from event triggered'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n { data: [{ fn: observable._getValue }] }\n ]));\n }\n handleAutorunCreated(autorun) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.set(autorun, new Set());\n }\n handleAutorunDisposed(autorun) {\n }\n handleAutorunDependencyChanged(autorun, observable, change) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.get(autorun).add(observable);\n }\n handleAutorunStarted(autorun) {\n const changedObservables = this.changedObservablesSets.get(autorun);\n if (!changedObservables) {\n return;\n }\n if (this._isIncluded(autorun)) {\n console.log(...this.textToConsoleArgs([\n formatKind('autorun'),\n styled(autorun.debugName, { color: 'BlueViolet' }),\n this.formatChanges(changedObservables),\n { data: [{ fn: autorun._debugNameData.referenceFn ?? autorun._runFn }] }\n ]));\n }\n changedObservables.clear();\n this.indentation++;\n }\n handleAutorunFinished(autorun) {\n this.indentation--;\n }\n handleBeginTransaction(transaction) {\n let transactionName = transaction.getDebugName();\n if (transactionName === undefined) {\n transactionName = '';\n }\n if (this._isIncluded(transaction)) {\n console.log(...this.textToConsoleArgs([\n formatKind('transaction'),\n styled(transactionName, { color: 'BlueViolet' }),\n { data: [{ fn: transaction._fn }] }\n ]));\n }\n this.indentation++;\n }\n handleEndTransaction() {\n this.indentation--;\n }\n}\nfunction consoleTextToArgs(text) {\n const styles = new Array();\n const data = [];\n let firstArg = '';\n function process(t) {\n if ('length' in t) {\n for (const item of t) {\n if (item) {\n process(item);\n }\n }\n }\n else if ('text' in t) {\n firstArg += `%c${t.text}`;\n styles.push(t.style);\n if (t.data) {\n data.push(...t.data);\n }\n }\n else if ('data' in t) {\n data.push(...t.data);\n }\n }\n process(text);\n const result = [firstArg, ...styles];\n result.push(...data);\n return result;\n}\nfunction normalText(text) {\n return styled(text, { color: 'black' });\n}\nfunction formatKind(kind) {\n return styled(padStr(`${kind}: `, 10), { color: 'black', bold: true });\n}\nfunction styled(text, options = {\n color: 'black',\n}) {\n function objToCss(styleObj) {\n return Object.entries(styleObj).reduce((styleString, [propName, propValue]) => {\n return `${styleString}${propName}:${propValue};`;\n }, '');\n }\n const style = {\n color: options.color,\n };\n if (options.strikeThrough) {\n style['text-decoration'] = 'line-through';\n }\n if (options.bold) {\n style['font-weight'] = 'bold';\n }\n return {\n text,\n style: objToCss(style),\n };\n}\nfunction formatValue(value, availableLen) {\n try {\n return formatValueUnsafe(value, availableLen);\n }\n catch {\n // Value could not be formatted (e.g., a Proxy that throws on coercion)\n return '[[???]]';\n }\n}\nfunction formatValueUnsafe(value, availableLen) {\n switch (typeof value) {\n case 'number':\n return '' + value;\n case 'string':\n if (value.length + 2 <= availableLen) {\n return `\"${value}\"`;\n }\n return `\"${value.substr(0, availableLen - 7)}\"+...`;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'undefined':\n return 'undefined';\n case 'object':\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return formatArray(value, availableLen);\n }\n return formatObject(value, availableLen);\n case 'symbol':\n return value.toString();\n case 'function':\n return `[[Function${value.name ? ' ' + value.name : ''}]]`;\n default:\n return '' + value;\n }\n}\nfunction formatArray(value, availableLen) {\n let result = '[ ';\n let first = true;\n for (const val of value) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${formatValue(val, availableLen - result.length)}`;\n }\n result += ' ]';\n return result;\n}\nfunction formatObject(value, availableLen) {\n // Avoid drilling into Proxies - wrap operations that could trigger traps\n try {\n if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {\n const val = value.toString();\n if (val.length <= availableLen) {\n return val;\n }\n return val.substring(0, availableLen - 3) + '...';\n }\n }\n catch {\n // toString triggered a Proxy trap or threw - bail out\n return '[[Object]]';\n }\n const className = getClassName(value);\n let result = className ? className + '(' : '{ ';\n let first = true;\n let entries;\n try {\n entries = Object.entries(value);\n }\n catch {\n // Object.entries triggered a Proxy trap - bail out\n return className ? `${className}(...)` : '[[Object]]';\n }\n for (const [key, val] of entries) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${key}: ${formatValue(val, availableLen - result.length)}`;\n }\n result += className ? ')' : ' }';\n return result;\n}\nfunction repeat(str, count) {\n let result = '';\n for (let i = 1; i <= count; i++) {\n result += str;\n }\n return result;\n}\nfunction padStr(str, length) {\n while (str.length < length) {\n str += ' ';\n }\n return str;\n}\n\nexport { ConsoleObservableLogger, formatValue, logObservableToConsole };\n//# sourceMappingURL=consoleObservableLogger.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,IAAI,uBAAuB;AAC3B,SAAS,sBAAsB,CAAC,GAAG,EAAE;AACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAClC,QAAQ,uBAAuB,GAAG,IAAI,uBAAuB,EAAE;AAC/D,QAAQ,SAAS,CAAC,uBAAuB,CAAC;AAC1C,IAAI;AACJ,IAAI,uBAAuB,CAAC,cAAc,CAAC,GAAG,CAAC;AAC/C;AACA,MAAM,uBAAuB,CAAC;AAC9B,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,CAAC;AAC5B,QAAQ,IAAI,CAAC,sBAAsB,GAAG,IAAI,OAAO,EAAE;AAC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AC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE;AACrC,QAAQ,MAAM,IAAI,GAAG;AACrB,IAAI;AACJ,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE;AAC7B,IAAI,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE;AAChC,QAAQ,GAAG,IAAI,GAAG;AAClB,IAAI;AACJ,IAAI,OAAO,GAAG;AACd;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DebugLocation } from '../debugLocation.js';
|
|
2
2
|
import { getFunctionName } from '../debugName.js';
|
|
3
|
-
import {
|
|
3
|
+
import { logObservable, getLogger } from '../logging/logging.js';
|
|
4
4
|
|
|
5
5
|
/*---------------------------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -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 {
|
|
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 _debugGetDependencyGraph;\nfunction _setDebugGetDependencyGraph(debugGetDependencyGraph) {\n _debugGetDependencyGraph = debugGetDependencyGraph;\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 debugGetDependencyGraph() {\n return _debugGetDependencyGraph(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, _setDebugGetDependencyGraph, _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,YAA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AQ,IAAI,CAAC,SAAS,EAAE;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;;;;"}
|
package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js
CHANGED
|
@@ -8,10 +8,21 @@ import { Derived } from './derivedImpl.js';
|
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
10
10
|
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
|
|
12
|
+
/*---------------------------------------------------------------------------------------------
|
|
13
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
15
|
+
*--------------------------------------------------------------------------------------------*/
|
|
16
|
+
function derived(computeFnOrOwner, computeFn, debugLocation = DebugLocation.ofCaller()) {
|
|
17
|
+
if (computeFn !== undefined) {
|
|
18
|
+
return new Derived(new DebugNameData(computeFnOrOwner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, debugLocation);
|
|
19
|
+
}
|
|
20
|
+
return new Derived(new DebugNameData(undefined, undefined, computeFnOrOwner), computeFnOrOwner, undefined, undefined, strictEquals, debugLocation);
|
|
21
|
+
}
|
|
11
22
|
function derivedOpts(options, computeFn, debugLocation = DebugLocation.ofCaller()) {
|
|
12
23
|
return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, options.onLastObserverRemoved, options.equalsFn ?? strictEquals, debugLocation);
|
|
13
24
|
}
|
|
14
25
|
_setDerivedOpts(derivedOpts);
|
|
15
26
|
|
|
16
|
-
export { derivedOpts };
|
|
27
|
+
export { derived, derivedOpts };
|
|
17
28
|
//# sourceMappingURL=derived.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derived.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/derived.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 { strictEquals } from '../commonFacade/deps.js';\nimport { DebugLocation } from '../debugLocation.js';\nimport { DebugNameData } from '../debugName.js';\nimport { _setDerivedOpts } from './baseObservable.js';\nimport { Derived, DerivedWithSetter } from './derivedImpl.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 derived(computeFnOrOwner, computeFn, debugLocation = DebugLocation.ofCaller()) {\n if (computeFn !== undefined) {\n return new Derived(new DebugNameData(computeFnOrOwner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, debugLocation);\n }\n return new Derived(new DebugNameData(undefined, undefined, computeFnOrOwner), computeFnOrOwner, undefined, undefined, strictEquals, debugLocation);\n}\nfunction derivedWithSetter(owner, computeFn, setter, debugLocation = DebugLocation.ofCaller()) {\n return new DerivedWithSetter(new DebugNameData(owner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, setter, debugLocation);\n}\nfunction derivedOpts(options, computeFn, debugLocation = DebugLocation.ofCaller()) {\n return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, options.onLastObserverRemoved, options.equalsFn ?? strictEquals, debugLocation);\n}\n_setDerivedOpts(derivedOpts);\n/**\n * Represents an observable that is derived from other observables.\n * The value is only recomputed when absolutely needed.\n *\n * {@link computeFn} should start with a JS Doc using `@description` to name the derived.\n *\n * Use `createEmptyChangeSummary` to create a \"change summary\" that can collect the changes.\n * Use `handleChange` to add a reported change to the change summary.\n * The compute function is given the last change summary.\n * The change summary is discarded after the compute function was called.\n *\n * @see derived\n */\nfunction derivedHandleChanges(options, computeFn, debugLocation = DebugLocation.ofCaller()) {\n return new Derived(new DebugNameData(options.owner, options.debugName, undefined), computeFn, options.changeTracker, undefined, options.equalityComparer ?? strictEquals, debugLocation);\n}\nfunction derivedWithStore(computeFnOrOwner, computeFnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n // Intentionally re-assigned in case an inactive observable is re-used later\n // eslint-disable-next-line local/code-no-potentially-unsafe-disposables\n let store = new DisposableStore();\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (store.isDisposed) {\n store = new DisposableStore();\n }\n else {\n store.clear();\n }\n return computeFn(r, store);\n }, undefined, () => store.dispose(), strictEquals, debugLocation);\n}\nfunction derivedDisposable(computeFnOrOwner, computeFnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n let store = undefined;\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (!store) {\n store = new DisposableStore();\n }\n else {\n store.clear();\n }\n const result = computeFn(r);\n if (result) {\n store.add(result);\n }\n return result;\n }, undefined, () => {\n if (store) {\n store.dispose();\n store = undefined;\n }\n }, strictEquals, debugLocation);\n}\n\nexport { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter, derivedWithStore };\n//# sourceMappingURL=derived.js.map\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"derived.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/derived.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 { strictEquals } from '../commonFacade/deps.js';\nimport { DebugLocation } from '../debugLocation.js';\nimport { DebugNameData } from '../debugName.js';\nimport { _setDerivedOpts } from './baseObservable.js';\nimport { Derived, DerivedWithSetter } from './derivedImpl.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 derived(computeFnOrOwner, computeFn, debugLocation = DebugLocation.ofCaller()) {\n if (computeFn !== undefined) {\n return new Derived(new DebugNameData(computeFnOrOwner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, debugLocation);\n }\n return new Derived(new DebugNameData(undefined, undefined, computeFnOrOwner), computeFnOrOwner, undefined, undefined, strictEquals, debugLocation);\n}\nfunction derivedWithSetter(owner, computeFn, setter, debugLocation = DebugLocation.ofCaller()) {\n return new DerivedWithSetter(new DebugNameData(owner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, setter, debugLocation);\n}\nfunction derivedOpts(options, computeFn, debugLocation = DebugLocation.ofCaller()) {\n return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, options.onLastObserverRemoved, options.equalsFn ?? strictEquals, debugLocation);\n}\n_setDerivedOpts(derivedOpts);\n/**\n * Represents an observable that is derived from other observables.\n * The value is only recomputed when absolutely needed.\n *\n * {@link computeFn} should start with a JS Doc using `@description` to name the derived.\n *\n * Use `createEmptyChangeSummary` to create a \"change summary\" that can collect the changes.\n * Use `handleChange` to add a reported change to the change summary.\n * The compute function is given the last change summary.\n * The change summary is discarded after the compute function was called.\n *\n * @see derived\n */\nfunction derivedHandleChanges(options, computeFn, debugLocation = DebugLocation.ofCaller()) {\n return new Derived(new DebugNameData(options.owner, options.debugName, undefined), computeFn, options.changeTracker, undefined, options.equalityComparer ?? strictEquals, debugLocation);\n}\nfunction derivedWithStore(computeFnOrOwner, computeFnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n // Intentionally re-assigned in case an inactive observable is re-used later\n // eslint-disable-next-line local/code-no-potentially-unsafe-disposables\n let store = new DisposableStore();\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (store.isDisposed) {\n store = new DisposableStore();\n }\n else {\n store.clear();\n }\n return computeFn(r, store);\n }, undefined, () => store.dispose(), strictEquals, debugLocation);\n}\nfunction derivedDisposable(computeFnOrOwner, computeFnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n let store = undefined;\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (!store) {\n store = new DisposableStore();\n }\n else {\n store.clear();\n }\n const result = computeFn(r);\n if (result) {\n store.add(result);\n }\n return result;\n }, undefined, () => {\n if (store) {\n store.dispose();\n store = undefined;\n }\n }, strictEquals, debugLocation);\n}\n\nexport { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter, derivedWithStore };\n//# sourceMappingURL=derived.js.map\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA,SAAS,OAAO,CAAC,gBAAgB,EAAE,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAE;AACxF,IAAI,IAAI,SAAS,KAAK,SAAS,EAAE;AACjC,QAAQ,OAAO,IAAI,OAAO,CAAC,IAAI,aAAa,CAAC,gBAAgB,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,CAAC;AACnJ,IAAI;AACJ,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,CAAC;AACtJ;AAIA,SAAS,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAE;AACnF,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,EAAE,aAAa,CAAC;AAC3M;AACA,eAAe,CAAC,WAAW,CAAC;;;;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { autorun } from '../reactions/autorun.js';
|
|
2
|
+
import '../debugLocation.js';
|
|
3
|
+
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
|
|
9
|
+
/*---------------------------------------------------------------------------------------------
|
|
10
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
12
|
+
*--------------------------------------------------------------------------------------------*/
|
|
13
|
+
function waitForState(observable, predicate, isError, cancellationToken) {
|
|
14
|
+
if (!predicate) {
|
|
15
|
+
predicate = state => state !== null && state !== undefined;
|
|
16
|
+
}
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
let isImmediateRun = true;
|
|
19
|
+
let shouldDispose = false;
|
|
20
|
+
const stateObs = observable.map(state => {
|
|
21
|
+
/** @description waitForState.state */
|
|
22
|
+
return {
|
|
23
|
+
isFinished: predicate(state),
|
|
24
|
+
error: false,
|
|
25
|
+
state
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
const d = autorun(reader => {
|
|
29
|
+
/** @description waitForState */
|
|
30
|
+
const { isFinished, error, state } = stateObs.read(reader);
|
|
31
|
+
if (isFinished || error) {
|
|
32
|
+
if (isImmediateRun) {
|
|
33
|
+
// The variable `d` is not initialized yet
|
|
34
|
+
shouldDispose = true;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
d.dispose();
|
|
38
|
+
}
|
|
39
|
+
if (error) {
|
|
40
|
+
reject(error === true ? state : error);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
resolve(state);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
isImmediateRun = false;
|
|
48
|
+
if (shouldDispose) {
|
|
49
|
+
d.dispose();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { waitForState };
|
|
55
|
+
//# sourceMappingURL=utilsCancellation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilsCancellation.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.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 { CancellationError, CancellationTokenSource } from '../commonFacade/cancellation.js';\nimport { strictEquals } from '../commonFacade/deps.js';\nimport { autorun } from '../reactions/autorun.js';\nimport { Derived } from '../observables/derivedImpl.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 waitForState(observable, predicate, isError, cancellationToken) {\n if (!predicate) {\n predicate = state => state !== null && state !== undefined;\n }\n return new Promise((resolve, reject) => {\n let isImmediateRun = true;\n let shouldDispose = false;\n const stateObs = observable.map(state => {\n /** @description waitForState.state */\n return {\n isFinished: predicate(state),\n error: isError ? isError(state) : false,\n state\n };\n });\n const d = autorun(reader => {\n /** @description waitForState */\n const { isFinished, error, state } = stateObs.read(reader);\n if (isFinished || error) {\n if (isImmediateRun) {\n // The variable `d` is not initialized yet\n shouldDispose = true;\n }\n else {\n d.dispose();\n }\n if (error) {\n reject(error === true ? state : error);\n }\n else {\n resolve(state);\n }\n }\n });\n if (cancellationToken) {\n const dc = cancellationToken.onCancellationRequested(() => {\n d.dispose();\n dc.dispose();\n reject(new CancellationError());\n });\n if (cancellationToken.isCancellationRequested) {\n d.dispose();\n dc.dispose();\n reject(new CancellationError());\n return;\n }\n }\n isImmediateRun = false;\n if (shouldDispose) {\n d.dispose();\n }\n });\n}\nfunction derivedWithCancellationToken(computeFnOrOwner, computeFnOrUndefined) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n let cancellationTokenSource = undefined;\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (cancellationTokenSource) {\n cancellationTokenSource.dispose();\n }\n cancellationTokenSource = new CancellationTokenSource();\n return computeFn(r, cancellationTokenSource.token);\n }, undefined, () => cancellationTokenSource?.dispose(), strictEquals, DebugLocation.ofCaller());\n}\n\nexport { derivedWithCancellationToken, waitForState };\n//# sourceMappingURL=utilsCancellation.js.map\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,UAAU,EA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QAAQ;AACR,IAAI,CAAC,CAAC;AACN;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatValue.d.ts","sourceRoot":"","sources":["../src/formatValue.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,SAAM,GAAG,MAAM,CAEnE"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
function formatValue(value, maxLength = 100) {
|
|
2
|
+
return truncate(formatInner(value), maxLength);
|
|
3
|
+
}
|
|
4
|
+
function formatInner(value) {
|
|
5
|
+
if (value === null) {
|
|
6
|
+
return 'null';
|
|
7
|
+
}
|
|
8
|
+
if (value === undefined) {
|
|
9
|
+
return 'undefined';
|
|
10
|
+
}
|
|
11
|
+
switch (typeof value) {
|
|
12
|
+
case 'string':
|
|
13
|
+
return JSON.stringify(value);
|
|
14
|
+
case 'number':
|
|
15
|
+
case 'boolean':
|
|
16
|
+
return String(value);
|
|
17
|
+
}
|
|
18
|
+
if (Array.isArray(value)) {
|
|
19
|
+
if (value.length === 0) {
|
|
20
|
+
return '[]';
|
|
21
|
+
}
|
|
22
|
+
const items = value.map(formatInner);
|
|
23
|
+
const joined = `[${items.join(', ')}]`;
|
|
24
|
+
return joined;
|
|
25
|
+
}
|
|
26
|
+
if (typeof value === 'object') {
|
|
27
|
+
const entries = Object.entries(value);
|
|
28
|
+
if (entries.length === 0) {
|
|
29
|
+
return '{}';
|
|
30
|
+
}
|
|
31
|
+
const parts = entries.map(([k, v]) => `${k}: ${formatInner(v)}`);
|
|
32
|
+
return `{${parts.join(', ')}}`;
|
|
33
|
+
}
|
|
34
|
+
return String(value);
|
|
35
|
+
}
|
|
36
|
+
function truncate(str, maxLength) {
|
|
37
|
+
if (str.length <= maxLength) {
|
|
38
|
+
return str;
|
|
39
|
+
}
|
|
40
|
+
// Try to find the outermost container type for a smart summary suffix
|
|
41
|
+
const suffix = summarySuffix(str);
|
|
42
|
+
const available = maxLength - suffix.length - 1; // 1 for ellipsis char
|
|
43
|
+
if (available <= 0) {
|
|
44
|
+
return str.slice(0, maxLength - 1) + '…';
|
|
45
|
+
}
|
|
46
|
+
return str.slice(0, available) + '…' + suffix;
|
|
47
|
+
}
|
|
48
|
+
function summarySuffix(str) {
|
|
49
|
+
if (str.startsWith('[')) {
|
|
50
|
+
const count = countTopLevelCommas(str, '[', ']') + 1;
|
|
51
|
+
return ` (${count} items)`;
|
|
52
|
+
}
|
|
53
|
+
if (str.startsWith('{')) {
|
|
54
|
+
const count = countTopLevelCommas(str, '{', '}') + 1;
|
|
55
|
+
return ` (${count} keys)`;
|
|
56
|
+
}
|
|
57
|
+
if (str.startsWith('"')) {
|
|
58
|
+
return ` (${str.length - 2} chars)`;
|
|
59
|
+
}
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
function countTopLevelCommas(str, open, close) {
|
|
63
|
+
let depth = 0;
|
|
64
|
+
let count = 0;
|
|
65
|
+
let inString = false;
|
|
66
|
+
for (let i = 0; i < str.length; i++) {
|
|
67
|
+
const ch = str[i];
|
|
68
|
+
if (inString) {
|
|
69
|
+
if (ch === '\\') {
|
|
70
|
+
i++;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (ch === '"') {
|
|
74
|
+
inString = false;
|
|
75
|
+
}
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (ch === '"') {
|
|
79
|
+
inString = true;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (ch === open || ch === '[' || ch === '{') {
|
|
83
|
+
depth++;
|
|
84
|
+
}
|
|
85
|
+
else if (ch === close || ch === ']' || ch === '}') {
|
|
86
|
+
depth--;
|
|
87
|
+
}
|
|
88
|
+
else if (ch === ',' && depth === 1) {
|
|
89
|
+
count++;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return count;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { formatValue };
|
|
96
|
+
//# source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