@vscode/component-explorer-cli 0.2.1-1 → 0.2.1-100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -6
- package/dist/WorktreePool.d.ts +5 -4
- package/dist/WorktreePool.d.ts.map +1 -1
- package/dist/WorktreePool.js +3 -3
- package/dist/WorktreePool.js.map +1 -1
- package/dist/_virtual/_build-info.js +1 -1
- package/dist/browserPage.d.ts +54 -4
- package/dist/browserPage.d.ts.map +1 -1
- package/dist/browserPage.js +113 -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 +30 -14
- package/dist/commands/acceptCommand.js.map +1 -1
- package/dist/commands/checkStabilityCommand.d.ts +3 -0
- package/dist/commands/checkStabilityCommand.d.ts.map +1 -1
- package/dist/commands/checkStabilityCommand.js +39 -18
- package/dist/commands/checkStabilityCommand.js.map +1 -1
- package/dist/commands/compareCommand.d.ts +2 -1
- package/dist/commands/compareCommand.d.ts.map +1 -1
- package/dist/commands/compareCommand.js +53 -25
- package/dist/commands/compareCommand.js.map +1 -1
- package/dist/commands/inputArg.d.ts +33 -0
- package/dist/commands/inputArg.d.ts.map +1 -0
- package/dist/commands/inputArg.js +103 -0
- package/dist/commands/inputArg.js.map +1 -0
- package/dist/commands/mcpCommand.d.ts +3 -0
- package/dist/commands/mcpCommand.d.ts.map +1 -1
- package/dist/commands/mcpCommand.js +189 -51
- package/dist/commands/mcpCommand.js.map +1 -1
- package/dist/commands/renderCommand.d.ts +28 -0
- package/dist/commands/renderCommand.d.ts.map +1 -0
- package/dist/commands/renderCommand.js +495 -0
- package/dist/commands/renderCommand.js.map +1 -0
- package/dist/commands/serveCommand.d.ts +2 -0
- package/dist/commands/serveCommand.d.ts.map +1 -1
- package/dist/commands/serveCommand.js +85 -44
- package/dist/commands/serveCommand.js.map +1 -1
- package/dist/commands/serviceDiffCommitsCommand.d.ts +16 -0
- package/dist/commands/serviceDiffCommitsCommand.d.ts.map +1 -0
- package/dist/commands/serviceDiffCommitsCommand.js +230 -0
- package/dist/commands/serviceDiffCommitsCommand.js.map +1 -0
- package/dist/commands/watchCommand.d.ts +2 -0
- package/dist/commands/watchCommand.d.ts.map +1 -1
- package/dist/commands/watchCommand.js +47 -41
- package/dist/commands/watchCommand.js.map +1 -1
- package/dist/comparison.d.ts +4 -3
- package/dist/comparison.d.ts.map +1 -1
- package/dist/comparison.js +17 -14
- package/dist/comparison.js.map +1 -1
- package/dist/component-explorer-config.schema.json +55 -2
- package/dist/componentExplorer.d.ts +122 -20
- package/dist/componentExplorer.d.ts.map +1 -1
- package/dist/componentExplorer.js +250 -78
- package/dist/componentExplorer.js.map +1 -1
- package/dist/{watchConfig.d.ts → config.d.ts} +59 -26
- package/dist/config.d.ts.map +1 -0
- package/dist/{watchConfig.js → config.js} +108 -31
- package/dist/config.js.map +1 -0
- package/dist/coverage.d.ts +64 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/coverage.js +212 -0
- package/dist/coverage.js.map +1 -0
- package/dist/daemon/DaemonService.d.ts +17 -8
- package/dist/daemon/DaemonService.d.ts.map +1 -1
- package/dist/daemon/DaemonService.js +64 -57
- package/dist/daemon/DaemonService.js.map +1 -1
- package/dist/daemon/approvalStore.d.ts +2 -1
- package/dist/daemon/approvalStore.d.ts.map +1 -1
- package/dist/daemon/approvalStore.js +4 -3
- package/dist/daemon/approvalStore.js.map +1 -1
- package/dist/daemon/client.d.ts +5 -0
- package/dist/daemon/client.d.ts.map +1 -0
- package/dist/daemon/client.js +7 -0
- package/dist/daemon/client.js.map +1 -0
- package/dist/daemon/inProcessClient.d.ts +11 -0
- package/dist/daemon/inProcessClient.d.ts.map +1 -0
- package/dist/daemon/inProcessClient.js +35 -0
- package/dist/daemon/inProcessClient.js.map +1 -0
- package/dist/daemon/lifecycle.d.ts +8 -1
- package/dist/daemon/lifecycle.d.ts.map +1 -1
- package/dist/daemon/lifecycle.js +13 -3
- package/dist/daemon/lifecycle.js.map +1 -1
- package/dist/daemon/pipeClient.d.ts +2 -0
- package/dist/daemon/pipeClient.d.ts.map +1 -1
- package/dist/daemon/pipeClient.js +29 -9
- package/dist/daemon/pipeClient.js.map +1 -1
- package/dist/daemon/pipeName.d.ts +7 -1
- package/dist/daemon/pipeName.d.ts.map +1 -1
- package/dist/daemon/pipeName.js +8 -4
- package/dist/daemon/pipeName.js.map +1 -1
- package/dist/daemon/pipeServer.d.ts.map +1 -1
- package/dist/daemon/pipeServer.js +10 -4
- package/dist/daemon/pipeServer.js.map +1 -1
- package/dist/daemon/version.d.ts +2 -2
- package/dist/daemon/version.d.ts.map +1 -1
- package/dist/daemon/version.js +2 -2
- package/dist/dependencyInstaller.d.ts +3 -2
- package/dist/dependencyInstaller.d.ts.map +1 -1
- package/dist/dependencyInstaller.js +4 -4
- package/dist/dependencyInstaller.js.map +1 -1
- package/dist/evaluateFn.d.ts +21 -0
- package/dist/evaluateFn.d.ts.map +1 -0
- package/dist/evaluateFn.js +17 -0
- package/dist/evaluateFn.js.map +1 -0
- package/dist/explorerSession.d.ts +2 -3
- package/dist/explorerSession.d.ts.map +1 -1
- package/dist/explorerSession.js +3 -20
- package/dist/explorerSession.js.map +1 -1
- package/dist/git/gitCommitResolver.d.ts +2 -1
- package/dist/git/gitCommitResolver.d.ts.map +1 -1
- package/dist/git/gitCommitResolver.js +8 -8
- package/dist/git/gitCommitResolver.js.map +1 -1
- package/dist/git/gitIndexResolver.d.ts +2 -1
- package/dist/git/gitIndexResolver.d.ts.map +1 -1
- package/dist/git/gitIndexResolver.js +7 -7
- package/dist/git/gitIndexResolver.js.map +1 -1
- package/dist/git/gitService.d.ts +5 -4
- package/dist/git/gitService.d.ts.map +1 -1
- package/dist/git/gitService.js.map +1 -1
- package/dist/git/gitUtils.d.ts +6 -4
- package/dist/git/gitUtils.d.ts.map +1 -1
- package/dist/git/gitUtils.js +10 -5
- package/dist/git/gitUtils.js.map +1 -1
- package/dist/git/gitWorktreeManager.d.ts +15 -14
- package/dist/git/gitWorktreeManager.d.ts.map +1 -1
- package/dist/git/gitWorktreeManager.js +10 -11
- package/dist/git/gitWorktreeManager.js.map +1 -1
- package/dist/git/testUtils.d.ts +2 -1
- package/dist/git/testUtils.d.ts.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/js-component-explorer/packages/common/dist/explorerUrl.js +21 -0
- package/dist/js-component-explorer/packages/common/dist/explorerUrl.js.map +1 -0
- package/dist/js-component-explorer/packages/common/dist/renderManifest.js +68 -0
- package/dist/js-component-explorer/packages/common/dist/renderManifest.js.map +1 -0
- package/dist/js-component-explorer/packages/semver/dist/index.js +186 -0
- package/dist/js-component-explorer/packages/semver/dist/index.js.map +1 -0
- package/dist/{packages/simple-api/dist/chunk-3R7GHWBM.js → js-component-explorer/packages/simple-api/dist/chunk-FJ7AVNQE.js} +2 -1
- package/dist/js-component-explorer/packages/simple-api/dist/chunk-FJ7AVNQE.js.map +1 -0
- package/dist/{packages/simple-api/dist/chunk-SGBCNXYH.js → js-component-explorer/packages/simple-api/dist/chunk-TTRCY65Z.js} +4 -1
- package/dist/js-component-explorer/packages/simple-api/dist/chunk-TTRCY65Z.js.map +1 -0
- package/dist/{packages/simple-api/dist/chunk-TAEFVNPN.js → js-component-explorer/packages/simple-api/dist/chunk-WNXMRXWV.js} +2 -1
- package/dist/js-component-explorer/packages/simple-api/dist/chunk-WNXMRXWV.js.map +1 -0
- package/dist/{packages → js-component-explorer/packages}/simple-api/dist/express.js +1 -1
- package/dist/js-component-explorer/packages/simple-api/dist/express.js.map +1 -0
- package/dist/logger.d.ts +12 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +35 -2
- package/dist/logger.js.map +1 -1
- package/dist/manifest.schema.json +215 -0
- package/dist/mcp/DaemonAccessor.d.ts +22 -0
- package/dist/mcp/DaemonAccessor.d.ts.map +1 -0
- package/dist/mcp/McpServer.d.ts +5 -19
- package/dist/mcp/McpServer.d.ts.map +1 -1
- package/dist/mcp/McpServer.js +391 -304
- package/dist/mcp/McpServer.js.map +1 -1
- package/dist/path.d.ts +30 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +78 -0
- package/dist/path.js.map +1 -0
- package/dist/processTree.d.ts +14 -0
- package/dist/processTree.d.ts.map +1 -0
- package/dist/processTree.js +84 -0
- package/dist/processTree.js.map +1 -0
- package/dist/renderManifest.d.ts +5 -0
- package/dist/renderManifest.d.ts.map +1 -0
- package/dist/renderManifest.js +11 -0
- package/dist/renderManifest.js.map +1 -0
- package/dist/screenshotServiceClient.d.ts +31 -0
- package/dist/screenshotServiceClient.d.ts.map +1 -0
- package/dist/screenshotServiceClient.js +38 -0
- package/dist/screenshotServiceClient.js.map +1 -0
- package/dist/server/httpServer.d.ts +14 -0
- package/dist/server/httpServer.d.ts.map +1 -0
- package/dist/server/httpServer.js +110 -0
- package/dist/server/httpServer.js.map +1 -0
- package/dist/server/httpServer.test.d.ts.map +1 -0
- package/dist/server/serverConfig.d.ts +59 -0
- package/dist/server/serverConfig.d.ts.map +1 -0
- package/dist/server/serverConfig.js +53 -0
- package/dist/server/serverConfig.js.map +1 -0
- package/dist/server/types.d.ts +6 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/viteServer.d.ts +31 -0
- package/dist/server/viteServer.d.ts.map +1 -0
- package/dist/{httpServer.js → server/viteServer.js} +96 -115
- package/dist/server/viteServer.js.map +1 -0
- package/dist/storage.d.ts +2 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +1 -1
- package/dist/storage.js.map +1 -1
- package/dist/utils.d.ts +3 -25
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -23
- package/dist/utils.js.map +1 -1
- package/dist/visualCache.d.ts +2 -1
- package/dist/visualCache.d.ts.map +1 -1
- package/dist/visualCache.js +4 -3
- package/dist/visualCache.js.map +1 -1
- package/dist/viteProjectRef.d.ts +4 -12
- package/dist/viteProjectRef.d.ts.map +1 -1
- package/dist/viteProjectRef.js +9 -17
- package/dist/viteProjectRef.js.map +1 -1
- package/dist/vscode-observables/observables/dist/disposables.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/base.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/debugLocation.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/debugName.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/index.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js.map +1 -0
- package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/logging/debugGetDependencyGraph.js +1 -1
- package/dist/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/logging/logging.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/observables/derived.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/observables/observableFromEvent.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/observables/observableValue.js.map +1 -0
- package/dist/{external/vscode-observables/observables/dist/observableInternal/reactions/autorun.js → vscode-observables/observables/dist/observableInternal/reactions/createEffect.js} +9 -5
- package/dist/vscode-observables/observables/dist/observableInternal/reactions/createEffect.js.map +1 -0
- package/dist/{external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js → vscode-observables/observables/dist/observableInternal/reactions/createEffectImpl.js} +1 -1
- package/dist/vscode-observables/observables/dist/observableInternal/reactions/createEffectImpl.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/transaction.js.map +1 -0
- package/dist/vscode-observables/observables/dist/observableInternal/utils/utils.js.map +1 -0
- package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/utils/utilsCancellation.js +2 -2
- package/dist/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js.map +1 -0
- package/package.json +34 -22
- package/dist/commands/screenshotCommand.d.ts +0 -18
- package/dist/commands/screenshotCommand.d.ts.map +0 -1
- package/dist/commands/screenshotCommand.js +0 -127
- package/dist/commands/screenshotCommand.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/disposables.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/base.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/debugName.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/index.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/logging/logging.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableFromEvent.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorun.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/transaction.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utils.js.map +0 -1
- package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js.map +0 -1
- package/dist/httpServer.d.ts +0 -36
- package/dist/httpServer.d.ts.map +0 -1
- package/dist/httpServer.js.map +0 -1
- package/dist/httpServer.test.d.ts.map +0 -1
- package/dist/packages/simple-api/dist/chunk-3R7GHWBM.js.map +0 -1
- package/dist/packages/simple-api/dist/chunk-SGBCNXYH.js.map +0 -1
- package/dist/packages/simple-api/dist/chunk-TAEFVNPN.js.map +0 -1
- package/dist/packages/simple-api/dist/express.js.map +0 -1
- package/dist/resolveProject.d.ts +0 -21
- package/dist/resolveProject.d.ts.map +0 -1
- package/dist/resolveProject.js +0 -39
- package/dist/resolveProject.js.map +0 -1
- package/dist/watchConfig.d.ts.map +0 -1
- package/dist/watchConfig.js.map +0 -1
- /package/dist/{httpServer.test.d.ts → server/httpServer.test.d.ts} +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/disposables.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/base.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/commonFacade/deps.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/debugLocation.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/debugName.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/index.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/logging/consoleObservableLogger.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/logging/logging.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/observables/baseObservable.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/observables/derived.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/observables/derivedImpl.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/observables/observableFromEvent.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/observables/observableValue.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/transaction.js +0 -0
- /package/dist/{external/vscode-observables → vscode-observables}/observables/dist/observableInternal/utils/utils.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEffectImpl.js","sources":["../../../../../../../../../vscode-observables/observables/dist/observableInternal/reactions/createEffectImpl.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._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AAC,MAAM;AAC9B,YAAY,QAAQ,EAAE,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC;AACvD,SAAS;AACT,IAAI;AACJ,IAAI,UAAU,GAAG;AACjB,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;AAC9B,YAAY,IAAI,CAAC,IAAI,EAAE;AACvB,QAAQ;AACR,aAAa;AACb,YAAY,IAAI,CAAC,MAAM,GAAG,CAAC;AAC3B,QAAQ;AACR,IAAI;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.js","sources":["../../../../../../../../vscode-observables/observables/dist/observableInternal/transaction.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 { handleBugIndicatingErrorRecovery } from './base.js';\nimport { getFunctionName } from './debugName.js';\nimport { 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 *--------------------------------------------------------------------------------------------*/\n/**\n * Starts a transaction in which many observables can be changed at once.\n * {@link fn} should start with a JS Doc using `@description` to give the transaction a debug name.\n * Reaction run on demand or when the transaction ends.\n */\nfunction transaction(fn, getDebugName) {\n const tx = new TransactionImpl(fn, getDebugName);\n try {\n fn(tx);\n }\n finally {\n tx.finish();\n }\n}\nlet _globalTransaction = undefined;\nfunction globalTransaction(fn) {\n if (_globalTransaction) {\n fn(_globalTransaction);\n }\n else {\n const tx = new TransactionImpl(fn, undefined);\n _globalTransaction = tx;\n try {\n fn(tx);\n }\n finally {\n tx.finish(); // During finish, more actions might be added to the transaction.\n // Which is why we only clear the global transaction after finish.\n _globalTransaction = undefined;\n }\n }\n}\n/** @deprecated */\nasync function asyncTransaction(fn, getDebugName) {\n const tx = new TransactionImpl(fn, getDebugName);\n try {\n await fn(tx);\n }\n finally {\n tx.finish();\n }\n}\n/**\n * Allows to chain transactions.\n */\nfunction subtransaction(tx, fn, getDebugName) {\n if (!tx) {\n transaction(fn, getDebugName);\n }\n else {\n fn(tx);\n }\n}\nclass TransactionImpl {\n constructor(_fn, _getDebugName) {\n this._fn = _fn;\n this._getDebugName = _getDebugName;\n this._updatingObservers = [];\n getLogger()?.handleBeginTransaction(this);\n }\n getDebugName() {\n if (this._getDebugName) {\n return this._getDebugName();\n }\n return getFunctionName(this._fn);\n }\n updateObserver(observer, observable) {\n if (!this._updatingObservers) {\n // This happens when a transaction is used in a callback or async function.\n // If an async transaction is used, make sure the promise awaits all users of the transaction (e.g. no race).\n handleBugIndicatingErrorRecovery('Transaction already finished!');\n // Error recovery\n transaction(tx => {\n tx.updateObserver(observer, observable);\n });\n return;\n }\n // When this gets called while finish is active, they will still get considered\n this._updatingObservers.push({ observer, observable });\n observer.beginUpdate(observable);\n }\n finish() {\n const updatingObservers = this._updatingObservers;\n if (!updatingObservers) {\n handleBugIndicatingErrorRecovery('transaction.finish() has already been called!');\n return;\n }\n for (let i = 0; i < updatingObservers.length; i++) {\n const { observer, observable } = updatingObservers[i];\n observer.endUpdate(observable);\n }\n // Prevent anyone from updating observers from now on.\n this._updatingObservers = null;\n getLogger()?.handleEndTransaction(this);\n }\n debugGetUpdatingObservers() {\n return this._updatingObservers;\n }\n}\n\nexport { TransactionImpl, asyncTransaction, globalTransaction, subtransaction, transaction };\n//# sourceMappingURL=transaction.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,EAAE,EAAE,YAAY,EAAE;AACvC,IAAI,MAAM,EAAE,GAAG,IAAI,eAAe,CAAC,EAAE,EAAE,YAAY,CAAC;AACpD,IAAI,IAAI;AACR,QAAQ,EAAE,CAAC,EAAE,CAAC;AACd,IAAI;AACJ,YAAY;AACZ,QAAQ,EAAE,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AQ,MAAM,iBAAiB,GAAG,IAAI,CAAC,kBAAkB;AACzD,QAAQ,IAAI,CAAC,iBAAiB,EAAE;AAChC,YAAY,gCAAgC,CAAC,+CAA+C,CAAC;AAC7F,YAAY;AACZ,QAAQ;AACR,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC3D,YAAY,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC;AACjE,YAAY,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC;AAC1C,QAAQ;AACR;AACA,QAAQ,IAAI,CAAC,kBAAkB,GAAG,IAAI;AACtC,QAAQ,SAAS,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC;AAC/C,IAAI;AACJ,IAAI,yBAAyB,GAAG;AAChC,QAAQ,OAAO,IAAI,CAAC,kBAAkB;AACtC,IAAI;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../../../vscode-observables/observables/dist/observableInternal/utils/utils.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 { createEffect } from '../reactions/createEffect.js';\nimport { transaction } from '../transaction.js';\nimport { observableValue } from '../observables/observableValue.js';\nimport { toDisposable } from '../commonFacade/deps.js';\nimport { derivedOpts, derived } from '../observables/derived.js';\nimport { observableFromEvent } from '../observables/observableFromEvent.js';\nimport { observableSignal } from '../observables/observableSignal.js';\nimport { _setKeepObserved, _setRecomputeInitiallyAndOnChange } from '../observables/baseObservable.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 observableFromPromise(promise) {\n const observable = observableValue('promiseValue', {});\n promise.then((value) => {\n observable.set({ value }, undefined);\n });\n return observable;\n}\nfunction signalFromObservable(owner, observable) {\n return derivedOpts({\n owner,\n equalsFn: () => false,\n }, reader => {\n observable.read(reader);\n });\n}\n/**\n * @deprecated Use `debouncedObservable` instead.\n */\nfunction debouncedObservableDeprecated(observable, debounceMs, disposableStore) {\n const debouncedObservable = observableValue('debounced', undefined);\n let timeout = undefined;\n disposableStore.add(createEffect(reader => {\n /** @description debounce */\n const value = observable.read(reader);\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n transaction(tx => {\n debouncedObservable.set(value, tx);\n });\n }, debounceMs);\n }));\n return debouncedObservable;\n}\n/**\n * Creates an observable that debounces the input observable.\n */\nfunction debouncedObservable(observable, debounceMs) {\n let hasValue = false;\n let lastValue;\n let timeout = undefined;\n return observableFromEvent(cb => {\n const d = createEffect(reader => {\n const value = observable.read(reader);\n if (!hasValue) {\n hasValue = true;\n lastValue = value;\n }\n else {\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n lastValue = value;\n cb();\n }, debounceMs);\n }\n });\n return {\n dispose() {\n d.dispose();\n hasValue = false;\n lastValue = undefined;\n },\n };\n }, () => {\n if (hasValue) {\n return lastValue;\n }\n else {\n return observable.get();\n }\n });\n}\nfunction wasEventTriggeredRecently(event, timeoutMs, disposableStore) {\n const observable = observableValue('triggeredRecently', false);\n let timeout = undefined;\n disposableStore.add(event(() => {\n observable.set(true, undefined);\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n observable.set(false, undefined);\n }, timeoutMs);\n }));\n return observable;\n}\n/**\n * This makes sure the observable is being observed and keeps its cache alive.\n */\nfunction keepObserved(observable) {\n const o = new KeepAliveObserver(false, undefined);\n observable.addObserver(o);\n return toDisposable(() => {\n observable.removeObserver(o);\n });\n}\n_setKeepObserved(keepObserved);\n/**\n * This converts the given observable into an autorun.\n */\nfunction recomputeInitiallyAndOnChange(observable, handleValue) {\n const o = new KeepAliveObserver(true, handleValue);\n observable.addObserver(o);\n try {\n o.beginUpdate(observable);\n }\n finally {\n o.endUpdate(observable);\n }\n return toDisposable(() => {\n observable.removeObserver(o);\n });\n}\n_setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange);\nclass KeepAliveObserver {\n constructor(_forceRecompute, _handleValue) {\n this._forceRecompute = _forceRecompute;\n this._handleValue = _handleValue;\n this._counter = 0;\n }\n beginUpdate(observable) {\n this._counter++;\n }\n endUpdate(observable) {\n if (this._counter === 1 && this._forceRecompute) {\n if (this._handleValue) {\n this._handleValue(observable.get());\n }\n else {\n observable.reportChanges();\n }\n }\n this._counter--;\n }\n handlePossibleChange(observable) {\n // NO OP\n }\n handleChange(observable, change) {\n // NO OP\n }\n}\nfunction derivedObservableWithCache(owner, computeFn) {\n let lastValue = undefined;\n const observable = derivedOpts({ owner, debugReferenceFn: computeFn }, reader => {\n lastValue = computeFn(reader, lastValue);\n return lastValue;\n });\n return observable;\n}\nfunction derivedObservableWithWritableCache(owner, computeFn) {\n let lastValue = undefined;\n const onChange = observableSignal('derivedObservableWithWritableCache');\n const observable = derived(owner, reader => {\n onChange.read(reader);\n lastValue = computeFn(reader, lastValue);\n return lastValue;\n });\n return Object.assign(observable, {\n clearCache: (tx) => {\n lastValue = undefined;\n onChange.trigger(tx);\n },\n setCache: (newValue, tx) => {\n lastValue = newValue;\n onChange.trigger(tx);\n }\n });\n}\n/**\n * When the items array changes, referential equal items are not mapped again.\n */\nfunction mapObservableArrayCached(owner, items, map, keySelector) {\n let m = new ArrayMap(map, keySelector);\n const self = derivedOpts({\n debugReferenceFn: map,\n owner,\n onLastObserverRemoved: () => {\n m.dispose();\n m = new ArrayMap(map);\n }\n }, (reader) => {\n m.setItems(items.read(reader));\n return m.getItems();\n });\n return self;\n}\nclass ArrayMap {\n constructor(_map, _keySelector) {\n this._map = _map;\n this._keySelector = _keySelector;\n this._cache = new Map();\n this._items = [];\n }\n dispose() {\n this._cache.forEach(entry => entry.store.dispose());\n this._cache.clear();\n }\n setItems(items) {\n const newItems = [];\n const itemsToRemove = new Set(this._cache.keys());\n for (const item of items) {\n const key = this._keySelector ? this._keySelector(item) : item;\n let entry = this._cache.get(key);\n if (!entry) {\n const store = new DisposableStore();\n const out = this._map(item, store);\n entry = { out, store };\n this._cache.set(key, entry);\n }\n else {\n itemsToRemove.delete(key);\n }\n newItems.push(entry.out);\n }\n for (const item of itemsToRemove) {\n const entry = this._cache.get(item);\n entry.store.dispose();\n this._cache.delete(item);\n }\n this._items = newItems;\n }\n getItems() {\n return this._items;\n }\n}\n\nexport { KeepAliveObserver, debouncedObservable, debouncedObservableDeprecated, derivedObservableWithCache, derivedObservableWithWritableCache, keepObserved, mapObservableArrayCached, observableFromPromise, recomputeInitiallyAndOnChange, signalFromObservable, wasEventTriggeredRecently };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAwGA;AACA;AACA;AACA,SAAS,YAAY,CAAC,UAAU,EAAE;AAClC,IAAI,MAAM,CAAC,GAAG,IAAI,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC;AACrD,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7B,IAAI,OAAO,YAAY,CAAC,MAAM;AAC9B,QAAQ,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;AACpC,IAAI,CAAC,CAAC;AACN;AACA,gBAAgB,CAAC,YAAY,CAAC;AAC9B;AACA;AACA;AACA,SAAS,6BAA6B,CAAC,UAAU,EAAE,WAAW,EAAE;AAChE,IAAI,MAAM,CAAC,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;AACtD,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7B,IAAI,IAAI;AACR,QAAQ,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC;AACjC,IAAI;AACJ,YAAY;AACZ,QAAQ,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC;AAC/B,IAAI;AACJ,IAAI,OAAO,YAAY,CAAC,MAAM;AAC9B,QAAQ,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;AACpC,IAAI,CAAC,CAAC;AACN;AACA,iCAAiC,CAAC,6BAA6B,CAAC;AAChE,MAAM,iBAAiB,CAAC;AACxB,IAAI,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE;AAC/C,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe;AAC9C,QAAQ,IAAI,CAAC,YAAY,GAAG,YAAY;AACxC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC;AACzB,IAAI;AACJ,IAAI,WAAW,CAAC,UAAU,EAAE;AAC5B,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACvB,IAAI;AACJ,IAAI,SAAS,CAAC,UAAU,EAAE;AAC1B,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE;AACzD,YAAY,IAAI,IAAI,CAAC,YAAY,EAAE;AACnC,gBAAgB,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;AACnD,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,UAAU,CAAC,aAAa,EAAE;AAC1C,YAAY;AACZ,QAAQ;AACR,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACvB,IAAI;AACJ,IAAI,oBAAoB,CAAC,UAAU,EAAE;AACrC;AACA,IAAI;AACJ,IAAI,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE;AACrC;AACA,IAAI;AACJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createEffect } from '../reactions/createEffect.js';
|
|
2
2
|
import '../debugLocation.js';
|
|
3
3
|
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -25,7 +25,7 @@ function waitForState(observable, predicate, isError, cancellationToken) {
|
|
|
25
25
|
state
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
|
-
const d =
|
|
28
|
+
const d = createEffect(reader => {
|
|
29
29
|
/** @description waitForState */
|
|
30
30
|
const { isFinished, error, state } = stateObs.read(reader);
|
|
31
31
|
if (isFinished || error) {
|
package/dist/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilsCancellation.js","sources":["../../../../../../../../../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 { createEffect } from '../reactions/createEffect.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 = createEffect(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,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE;AACzE,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,SAAS,GAAG,KAAK,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAClE,IAAI;AACJ,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC5C,QAAQ,IAAI,cAAc,GAAG,IAAI;AACjC,QAAQ,IAAI,aAAa,GAAG,KAAK;AACjC,QAAQ,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI;AACjD;AACA,YAAY,OAAO;AACnB,gBAAgB,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC;AAC5C,gBAAgB,KAAK,EAA6B,KAAK;AACvD,gBAAgB;AAChB,aAAa;AACb,QAAQ,CAAC,CAAC;AACV,QAAQ,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,IAAI;AACzC;AACA,YAAY,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;AACtE,YAAY,IAAI,UAAU,IAAI,KAAK,EAAE;AACrC,gBAAgB,IAAI,cAAc,EAAE;AACpC;AACA,oBAAoB,aAAa,GAAG,IAAI;AACxC,gBAAgB;AAChB,qBAAqB;AACrB,oBAAoB,CAAC,CAAC,OAAO,EAAE;AAC/B,gBAAgB;AAChB,gBAAgB,IAAI,KAAK,EAAE;AAC3B,oBAAoB,MAAM,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;AAC1D,gBAAgB;AAChB,qBAAqB;AACrB,oBAAoB,OAAO,CAAC,KAAK,CAAC;AAClC,gBAAgB;AAChB,YAAY;AACZ,QAAQ,CAAC,CAAC;AAcV,QAAQ,cAAc,GAAG,KAAK;AAC9B,QAAQ,IAAI,aAAa,EAAE;AAC3B,YAAY,CAAC,CAAC,OAAO,EAAE;AACvB,QAAQ;AACR,IAAI,CAAC,CAAC;AACN;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/component-explorer-cli",
|
|
3
|
-
"version": "0.2.1-
|
|
3
|
+
"version": "0.2.1-100",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,11 +26,16 @@
|
|
|
26
26
|
"import": "./dist/daemon/DaemonService.js",
|
|
27
27
|
"types": "./dist/daemon/DaemonService.d.ts"
|
|
28
28
|
},
|
|
29
|
-
"./
|
|
30
|
-
"import": "./dist/
|
|
31
|
-
"types": "./dist/
|
|
29
|
+
"./daemon-client": {
|
|
30
|
+
"import": "./dist/daemon/client.js",
|
|
31
|
+
"types": "./dist/daemon/client.d.ts"
|
|
32
32
|
},
|
|
33
|
-
"./
|
|
33
|
+
"./render-manifest": {
|
|
34
|
+
"import": "./dist/renderManifest.js",
|
|
35
|
+
"types": "./dist/renderManifest.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./config-schema.json": "./dist/component-explorer-config.schema.json",
|
|
38
|
+
"./manifest.schema.json": "./dist/manifest.schema.json"
|
|
34
39
|
},
|
|
35
40
|
"files": [
|
|
36
41
|
"dist",
|
|
@@ -39,16 +44,18 @@
|
|
|
39
44
|
"SECURITY.md"
|
|
40
45
|
],
|
|
41
46
|
"scripts": {
|
|
42
|
-
"build": "rollup -c &&
|
|
47
|
+
"build": "rollup -c && tsx scripts/generate-json-schema.ts",
|
|
43
48
|
"dev": "rollup -c -w",
|
|
44
49
|
"test": "vitest --run",
|
|
45
|
-
"generate-schema": "
|
|
50
|
+
"generate-schema": "tsx scripts/generate-json-schema.ts"
|
|
46
51
|
},
|
|
47
52
|
"dependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
53
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
54
|
+
"clipanion": "4.0.0-rc.4",
|
|
55
|
+
"express": "^5.2.1",
|
|
56
|
+
"istanbul-lib-coverage": "^3.2.2",
|
|
57
|
+
"v8-to-istanbul": "^9.3.0",
|
|
58
|
+
"vite-plugin-istanbul": "^7.2.0",
|
|
52
59
|
"zod": "^4.3.6"
|
|
53
60
|
},
|
|
54
61
|
"peerDependencies": {
|
|
@@ -59,17 +66,22 @@
|
|
|
59
66
|
"@hediet/simple-api": "workspace:*",
|
|
60
67
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
61
68
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
62
|
-
"@types/express": "^5.0.
|
|
63
|
-
"@types/
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
69
|
+
"@types/express": "^5.0.6",
|
|
70
|
+
"@types/istanbul-lib-coverage": "^2.0.6",
|
|
71
|
+
"@types/node": "^20.19.39",
|
|
72
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
73
|
+
"@vitest/coverage-v8": "^1.6.1",
|
|
74
|
+
"@vscode/component-explorer-common": "workspace:*",
|
|
66
75
|
"@vscode/observables": "workspace:*",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"react
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
76
|
+
"@vscode/screenshot-service": "workspace:*",
|
|
77
|
+
"playwright": "^1.59.1",
|
|
78
|
+
"react": "^18.3.1",
|
|
79
|
+
"react-dom": "^18.3.1",
|
|
80
|
+
"rollup": "^4.60.1",
|
|
81
|
+
"semver": "workspace:*",
|
|
82
|
+
"tsx": "4.22.4",
|
|
83
|
+
"typescript": "^5.9.3",
|
|
84
|
+
"vite": "^6.4.3",
|
|
85
|
+
"vitest": "^4.1.0"
|
|
74
86
|
}
|
|
75
87
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Command } from 'clipanion';
|
|
2
|
-
export declare class ScreenshotCommand extends Command {
|
|
3
|
-
static paths: string[][];
|
|
4
|
-
static usage: import("clipanion").Usage;
|
|
5
|
-
readonly verbose: number;
|
|
6
|
-
readonly filter: string | undefined;
|
|
7
|
-
readonly accept: boolean;
|
|
8
|
-
readonly project: string;
|
|
9
|
-
readonly target: string | undefined;
|
|
10
|
-
readonly compare: boolean;
|
|
11
|
-
readonly compareTarget: string | undefined;
|
|
12
|
-
readonly report: string | undefined;
|
|
13
|
-
readonly headed: boolean;
|
|
14
|
-
readonly timeout: string;
|
|
15
|
-
execute(): Promise<number>;
|
|
16
|
-
private _runComparison;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=screenshotCommand.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screenshotCommand.d.ts","sourceRoot":"","sources":["../../src/commands/screenshotCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAW5C,qBAAa,iBAAkB,SAAQ,OAAO;IAC7C,OAAgB,KAAK,aAAoB;IAEzC,OAAgB,KAAK,4BAOlB;IAEH,QAAQ,CAAC,OAAO,SAAsG;IACtH,QAAQ,CAAC,MAAM,qBAAkG;IACjH,QAAQ,CAAC,MAAM,UAAiI;IAChJ,QAAQ,CAAC,OAAO,SAAuI;IACvJ,QAAQ,CAAC,MAAM,qBAAsK;IACrL,QAAQ,CAAC,OAAO,UAA8F;IAC9G,QAAQ,CAAC,aAAa,qBAA+K;IACrM,QAAQ,CAAC,MAAM,qBAA4G;IAC3H,QAAQ,CAAC,MAAM,UAAwG;IACvH,QAAQ,CAAC,OAAO,SAA+G;IAEzH,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;YA+ElB,cAAc;CA+B5B"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Command, Option } from 'clipanion';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { PlaywrightBrowserPageFactory } from '../browserPage.js';
|
|
4
|
-
import { compareScreenshotsInMemory, printComparisonToConsole, writeComparisonReport } from '../comparison.js';
|
|
5
|
-
import { BrowserComponentExplorer } from '../componentExplorer.js';
|
|
6
|
-
import { DefaultComponentExplorerHttpServerFactory } from '../httpServer.js';
|
|
7
|
-
import { ConsoleLogger, verbosityToLogLevel, logBuildInfo } from '../logger.js';
|
|
8
|
-
import { resolveProject, resolvedProjectToViteProjectRef } from '../resolveProject.js';
|
|
9
|
-
import { FileSystemStorage } from '../storage.js';
|
|
10
|
-
import { matchGlob, writeFile } from '../utils.js';
|
|
11
|
-
|
|
12
|
-
class ScreenshotCommand extends Command {
|
|
13
|
-
static paths = [['screenshot']];
|
|
14
|
-
static usage = Command.Usage({
|
|
15
|
-
description: 'Capture screenshots of all fixtures',
|
|
16
|
-
examples: [
|
|
17
|
-
['Capture all fixtures', '$0 screenshot'],
|
|
18
|
-
['Capture and accept as baseline', '$0 screenshot --accept'],
|
|
19
|
-
['Filter by glob', '$0 screenshot --filter "Button/*"'],
|
|
20
|
-
],
|
|
21
|
-
});
|
|
22
|
-
verbose = Option.Counter('-v,--verbose', 0, { description: 'Increase log verbosity (-v debug, -vv trace)' });
|
|
23
|
-
filter = Option.String('--filter', { required: false, description: 'Filter fixtures by glob pattern' });
|
|
24
|
-
accept = Option.Boolean('--accept', false, { description: 'Write to baseline instead of current (mutually exclusive with --target)' });
|
|
25
|
-
project = Option.String('-p,--project', process.cwd(), { description: 'Project: a directory, vite config file, or component-explorer.json' });
|
|
26
|
-
target = Option.String('--target', { required: false, description: 'Screenshot output directory (default: .screenshots/current, or .screenshots/baseline with --accept)' });
|
|
27
|
-
compare = Option.Boolean('--compare', false, { description: 'Compare screenshots after capturing' });
|
|
28
|
-
compareTarget = Option.String('--compare-target', { required: false, description: 'Directory to compare against (default: .screenshots/baseline, or .screenshots/current with --accept)' });
|
|
29
|
-
report = Option.String('--report', { required: false, description: 'Output report folder (requires --compare)' });
|
|
30
|
-
headed = Option.Boolean('--headed', false, { description: 'Show the browser window (useful for debugging)' });
|
|
31
|
-
timeout = Option.String('--timeout', '30000', { description: 'Navigation timeout in milliseconds (default: 30000)' });
|
|
32
|
-
async execute() {
|
|
33
|
-
// Validate mutually exclusive options
|
|
34
|
-
if (this.accept && this.target) {
|
|
35
|
-
this.context.stderr.write('Error: --accept and --target are mutually exclusive.\n');
|
|
36
|
-
return 1;
|
|
37
|
-
}
|
|
38
|
-
const logger = new ConsoleLogger('screenshot', this.context.stdout, verbosityToLogLevel(this.verbose));
|
|
39
|
-
logBuildInfo(logger);
|
|
40
|
-
const resolved = await resolveProject(this.project);
|
|
41
|
-
const projectDir = resolved.projectDir;
|
|
42
|
-
const viteProject = resolvedProjectToViteProjectRef(resolved);
|
|
43
|
-
// Determine target directory
|
|
44
|
-
const defaultTarget = this.accept ? '.screenshots/baseline' : '.screenshots/current';
|
|
45
|
-
const targetDir = this.target ?? defaultTarget;
|
|
46
|
-
const targetPath = path.isAbsolute(targetDir) ? targetDir : path.join(projectDir, targetDir);
|
|
47
|
-
// Determine compare target directory
|
|
48
|
-
const defaultCompareTarget = this.accept ? '.screenshots/current' : '.screenshots/baseline';
|
|
49
|
-
const compareTargetDir = this.compareTarget ?? defaultCompareTarget;
|
|
50
|
-
const compareTargetPath = path.isAbsolute(compareTargetDir) ? compareTargetDir : path.join(projectDir, compareTargetDir);
|
|
51
|
-
const storage = new FileSystemStorage(targetPath);
|
|
52
|
-
const serverFactory = new DefaultComponentExplorerHttpServerFactory();
|
|
53
|
-
const browserFactory = new PlaywrightBrowserPageFactory(this.headed, Number(this.timeout), logger);
|
|
54
|
-
const screenshots = new Map();
|
|
55
|
-
let server;
|
|
56
|
-
let explorer;
|
|
57
|
-
try {
|
|
58
|
-
this.context.stdout.write('Starting Vite dev server...\n');
|
|
59
|
-
server = await serverFactory.createViteServer(viteProject, { logger });
|
|
60
|
-
this.context.stdout.write(`Server running at ${server.url}\n`);
|
|
61
|
-
explorer = new BrowserComponentExplorer(browserFactory, server, logger);
|
|
62
|
-
const listResult = await explorer.listFixtures();
|
|
63
|
-
if (listResult.loadError) {
|
|
64
|
-
this.context.stderr.write(`Warning: Fixture loading error: ${listResult.loadError}\n`);
|
|
65
|
-
}
|
|
66
|
-
const filtered = this.filter
|
|
67
|
-
? listResult.fixtures.filter(f => matchGlob(f.fixtureId, this.filter))
|
|
68
|
-
: listResult.fixtures;
|
|
69
|
-
this.context.stdout.write(`Found ${filtered.length} fixture(s)\n`);
|
|
70
|
-
for (const fixture of filtered) {
|
|
71
|
-
const result = await explorer.screenshotFixture(fixture.fixtureId);
|
|
72
|
-
if (!result.image) {
|
|
73
|
-
this.context.stderr.write(` ✗ ${fixture.fixtureId} (no screenshot: DOM node not found or not visible)\n`);
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
await storage.write(`${fixture.fixtureId}.png`, result.image);
|
|
77
|
-
screenshots.set(fixture.fixtureId, { data: result.image, background: fixture.background, labels: fixture.labels });
|
|
78
|
-
this.context.stdout.write(` ✓ ${fixture.fixtureId}\n`);
|
|
79
|
-
}
|
|
80
|
-
await writeFixturesJson(targetPath, filtered);
|
|
81
|
-
this.context.stdout.write(`\nScreenshots saved to ${targetDir}/\n`);
|
|
82
|
-
}
|
|
83
|
-
finally {
|
|
84
|
-
await explorer?.dispose();
|
|
85
|
-
await browserFactory.dispose();
|
|
86
|
-
await server?.dispose();
|
|
87
|
-
}
|
|
88
|
-
// Compare if requested
|
|
89
|
-
if (this.compare) {
|
|
90
|
-
this.context.stdout.write(`\nComparing against ${compareTargetDir}...\n`);
|
|
91
|
-
return this._runComparison(screenshots, targetPath, compareTargetPath, projectDir);
|
|
92
|
-
}
|
|
93
|
-
return 0;
|
|
94
|
-
}
|
|
95
|
-
async _runComparison(screenshots, targetPath, compareTargetPath, projectDir) {
|
|
96
|
-
const compareStorage = new FileSystemStorage(compareTargetPath);
|
|
97
|
-
const result = await compareScreenshotsInMemory(screenshots, {
|
|
98
|
-
list: async () => [],
|
|
99
|
-
read: (id) => compareStorage.read(id),
|
|
100
|
-
exists: (id) => compareStorage.exists(id),
|
|
101
|
-
});
|
|
102
|
-
printComparisonToConsole(result, this.context.stdout);
|
|
103
|
-
if (this.report) {
|
|
104
|
-
const reportDir = path.isAbsolute(this.report) ? this.report : path.join(projectDir, this.report);
|
|
105
|
-
await writeComparisonReport({
|
|
106
|
-
reportDir,
|
|
107
|
-
result,
|
|
108
|
-
baselinePath: compareTargetPath,
|
|
109
|
-
currentPath: targetPath,
|
|
110
|
-
getBaselineData: (id) => compareStorage.read(`${id}.png`),
|
|
111
|
-
getCurrentData: async (id) => screenshots.get(id).data,
|
|
112
|
-
});
|
|
113
|
-
this.context.stdout.write(`\nReport written to: ${this.report}/\n`);
|
|
114
|
-
}
|
|
115
|
-
return (result.added.length > 0 || result.changed.length > 0) ? 1 : 0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
async function writeFixturesJson(targetDir, fixtures) {
|
|
119
|
-
const metadata = {};
|
|
120
|
-
for (const f of fixtures) {
|
|
121
|
-
metadata[f.fixtureId] = { background: f.background, labels: f.labels };
|
|
122
|
-
}
|
|
123
|
-
await writeFile(path.join(targetDir, 'fixtures.json'), Buffer.from(JSON.stringify(metadata, null, 2)));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { ScreenshotCommand };
|
|
127
|
-
//# sourceMappingURL=screenshotCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screenshotCommand.js","sources":["../../src/commands/screenshotCommand.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAWM,MAAO,iBAAkB,SAAQ,OAAO,CAAA;IAC7C,OAAgB,KAAK,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC;AAExC,IAAA,OAAgB,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACrC,QAAA,WAAW,EAAE,qCAAqC;AAClD,QAAA,QAAQ,EAAE;YACT,CAAC,sBAAsB,EAAE,eAAe,CAAC;YACzC,CAAC,gCAAgC,EAAE,wBAAwB,CAAC;YAC5D,CAAC,gBAAgB,EAAE,mCAAmC,CAAC;AACvD,SAAA;AACD,KAAA,CAAC;AAEO,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;AAC5G,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;AACvG,IAAA,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,yEAAyE,EAAE,CAAC;AACtI,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,oEAAoE,EAAE,CAAC;AAC7I,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
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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O,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;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/base.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 { onUnexpectedError } from './commonFacade/deps.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 * This function is used to indicate that the caller recovered from an error that indicates a bug.\n*/\nfunction handleBugIndicatingErrorRecovery(message) {\n const err = new Error('BugIndicatingErrorRecovery: ' + message);\n onUnexpectedError(err);\n console.error('recovered from an error that indicates a bug', err);\n}\n\nexport { handleBugIndicatingErrorRecovery };\n//# sourceMappingURL=base.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gCAAgC,CAAC,OAAO,EAAE;AACnD,IAAI,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,8BAA8B,GAAG,OAAO,CAAC;AACnE,IAAI,iBAAiB,CAAC,GAAG,CAAC;AAC1B,IAAI,OAAO,CAAC,KAAK,CAAC,8CAA8C,EAAE,GAAG,CAAC;AACtE;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;"}
|
package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 return ofNthCaller(1);\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 = 3;\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,OAAO,WAAW,CAAC,CAAC,CAAC;AAC7B,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,QAAQ,GAAG,CAAC,eAAe,GAAG,CAAC;AAC/B,QAAQ,OAAO,iBAAiB,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;AACxD,IAAI;AACJ,IAAI,aAAa,CAAC,WAAW,GAAG,WAAW;AAC3C,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,EAAE,CAAC,CAAC;AACzC,MAAM,iBAAiB,CAAC;AACxB,IAAI,OAAO,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE;AACvC,QAAQ,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAA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C;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;;;;"}
|
package/dist/external/vscode-observables/observables/dist/observableInternal/debugName.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debugName.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/debugName.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 *--------------------------------------------------------------------------------------------*/\nclass DebugNameData {\n constructor(owner, debugNameSource, referenceFn) {\n this.owner = owner;\n this.debugNameSource = debugNameSource;\n this.referenceFn = referenceFn;\n }\n getDebugName(target) {\n return getDebugName(target, this);\n }\n}\nconst countPerName = new Map();\nconst cachedDebugName = new WeakMap();\nfunction getDebugName(target, data) {\n const cached = cachedDebugName.get(target);\n if (cached) {\n return cached;\n }\n const dbgName = computeDebugName(target, data);\n if (dbgName) {\n let count = countPerName.get(dbgName) ?? 0;\n count++;\n countPerName.set(dbgName, count);\n const result = count === 1 ? dbgName : `${dbgName}#${count}`;\n cachedDebugName.set(target, result);\n return result;\n }\n return undefined;\n}\nfunction computeDebugName(self, data) {\n const cached = cachedDebugName.get(self);\n if (cached) {\n return cached;\n }\n const ownerStr = data.owner ? formatOwner(data.owner) + `.` : '';\n let result;\n const debugNameSource = data.debugNameSource;\n if (debugNameSource !== undefined) {\n if (typeof debugNameSource === 'function') {\n result = debugNameSource();\n if (result !== undefined) {\n return ownerStr + result;\n }\n }\n else {\n return ownerStr + debugNameSource;\n }\n }\n const referenceFn = data.referenceFn;\n if (referenceFn !== undefined) {\n result = getFunctionName(referenceFn);\n if (result !== undefined) {\n return ownerStr + result;\n }\n }\n if (data.owner !== undefined) {\n const key = findKey(data.owner, self);\n if (key !== undefined) {\n return ownerStr + key;\n }\n }\n return undefined;\n}\nfunction findKey(obj, value) {\n for (const key in obj) {\n if (obj[key] === value) {\n return key;\n }\n }\n return undefined;\n}\nconst countPerClassName = new Map();\nconst ownerId = new WeakMap();\nfunction formatOwner(owner) {\n const id = ownerId.get(owner);\n if (id) {\n return id;\n }\n const className = getClassName(owner) ?? 'Object';\n let count = countPerClassName.get(className) ?? 0;\n count++;\n countPerClassName.set(className, count);\n const result = count === 1 ? className : `${className}#${count}`;\n ownerId.set(owner, result);\n return result;\n}\nfunction getClassName(obj) {\n const ctor = obj.constructor;\n if (ctor) {\n if (ctor.name === 'Object') {\n return undefined;\n }\n return ctor.name;\n }\n return undefined;\n}\nfunction getFunctionName(fn) {\n const fnSrc = fn.toString();\n // Pattern: /** @description ... */\n const regexp = /\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//;\n const match = regexp.exec(fnSrc);\n const result = match ? match[1] : undefined;\n return result?.trim();\n}\n\nexport { DebugNameData, getClassName, getDebugName, getFunctionName };\n//# sourceMappingURL=debugName.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,CAAC;AACpB,IAAI,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE;AACrD,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe;AAC9C,QAAQ,IAAI,CAAC,WAAW,GAAG,WAAW;AACtC,IAAI;AACJ,IAAI,YAAY,CAAC,MAAM,EAAE;AACzB,QAAQ,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC;AACzC,IAAI;AACJ;AAC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AE;AACjB,IAAI;AACJ,IAAI,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,QAAQ;AACrD,IAAI,IAAI,KAAK,GAAG,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC;AACrD,IAAI,KAAK,EAAE;AACX,IAAI,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC;AAC3C,IAAI,MAAM,MAAM,GAAG,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;AAC9B,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,YAAY,CAAC,GAAG,EAAE;AAC3B,IAAI,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW;AAChC,IAAI,IAAI,IAAI,EAAE;AACd,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;AACpC,YAAY,OAAO,SAAS;AAC5B,QAAQ;AACR,QAAQ,OAAO,IAAI,CAAC,IAAI;AACxB,IAAI;AACJ,IAAI,OAAO,SAAS;AACpB;AACA,SAAS,eAAe,CAAC,EAAE,EAAE;AAC7B,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE;AAC/B;AACA,IAAI,MAAM,MAAM,GAAG,qCAAqC;AACxD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;AACpC,IAAI,MAAM,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS;AAC/C,IAAI,OAAO,MAAM,EAAE,IAAI,EAAE;AACzB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,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AG,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 +0,0 @@
|
|
|
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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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;;;;"}
|
package/dist/external/vscode-observables/observables/dist/observableInternal/logging/logging.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logging.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/logging.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 *--------------------------------------------------------------------------------------------*/\nlet globalObservableLogger;\nfunction addLogger(logger) {\n if (!globalObservableLogger) {\n globalObservableLogger = logger;\n }\n else if (globalObservableLogger instanceof ComposedLogger) {\n globalObservableLogger.loggers.push(logger);\n }\n else {\n globalObservableLogger = new ComposedLogger([globalObservableLogger, logger]);\n }\n}\nfunction getLogger() {\n return globalObservableLogger;\n}\nlet globalObservableLoggerFn = undefined;\nfunction setLogObservableFn(fn) {\n globalObservableLoggerFn = fn;\n}\nfunction logObservable(obs) {\n if (globalObservableLoggerFn) {\n globalObservableLoggerFn(obs);\n }\n}\nclass ComposedLogger {\n constructor(loggers) {\n this.loggers = loggers;\n }\n handleObservableCreated(observable, location) {\n for (const logger of this.loggers) {\n logger.handleObservableCreated(observable, location);\n }\n }\n handleOnListenerCountChanged(observable, newCount) {\n for (const logger of this.loggers) {\n logger.handleOnListenerCountChanged(observable, newCount);\n }\n }\n handleObservableUpdated(observable, info) {\n for (const logger of this.loggers) {\n logger.handleObservableUpdated(observable, info);\n }\n }\n handleAutorunCreated(autorun, location) {\n for (const logger of this.loggers) {\n logger.handleAutorunCreated(autorun, location);\n }\n }\n handleAutorunDisposed(autorun) {\n for (const logger of this.loggers) {\n logger.handleAutorunDisposed(autorun);\n }\n }\n handleAutorunDependencyChanged(autorun, observable, change) {\n for (const logger of this.loggers) {\n logger.handleAutorunDependencyChanged(autorun, observable, change);\n }\n }\n handleAutorunStarted(autorun) {\n for (const logger of this.loggers) {\n logger.handleAutorunStarted(autorun);\n }\n }\n handleAutorunFinished(autorun) {\n for (const logger of this.loggers) {\n logger.handleAutorunFinished(autorun);\n }\n }\n handleDerivedDependencyChanged(derived, observable, change) {\n for (const logger of this.loggers) {\n logger.handleDerivedDependencyChanged(derived, observable, change);\n }\n }\n handleDerivedCleared(observable) {\n for (const logger of this.loggers) {\n logger.handleDerivedCleared(observable);\n }\n }\n handleBeginTransaction(transaction) {\n for (const logger of this.loggers) {\n logger.handleBeginTransaction(transaction);\n }\n }\n handleEndTransaction(transaction) {\n for (const logger of this.loggers) {\n logger.handleEndTransaction(transaction);\n }\n }\n}\n\nexport { addLogger, getLogger, logObservable, setLogObservableFn };\n//# sourceMappingURL=logging.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB;AAC1B,SAAS,SAAS,CAAC,MAAM,EAAE;AAC3B,IAAI,IAAI,CAAC,sBAAsB,EAAE;AACjC,QAAQ,sBAAsB,GAAG,MAAM;AACvC,IAAI;AACJ,SAAS,IAAI,sBAAsB,YAAY,cAAc,EAAE;AAC/D,QAAQ,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AACnD,IAAI;AACJ,SAAS;AACT,QAAQ,sBAAsB,GAAG,IAAI,cAAc,CAAC,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;AACrF,IAAI;AACJ;AACA,SAAS,SAAS,GAAG;AACrB,IAAI,OAAO,sBAAsB;AACjC;AACA,IAAI,wBAAw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R,IAAI;AACJ,IAAI,oBAAoB,CAAC,WAAW,EAAE;AACtC,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3C,YAAY,MAAM,CAAC,oBAAoB,CAAC,WAAW,CAAC;AACpD,QAAQ;AACR,IAAI;AACJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
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,YAAY,EAAE;AACxC,IAAI,aAAa,GAAG,YAAY;AAChC;AACA,IAAI,wBAAwB;AAC5B,SAAS,2BAA2B,CAAC,uBAAuB,EAAE;AAC9D,IAAI,wBAAwB,GAAG,uBAAuB;AACtD;AACA,MAAM,oBAAoB,CAAC;AAC3B,IAAI,IAAI,OAAO,GAAG,EAAE,OAAO,IAAI,CAAC,CAAC;AACjC,IAAI,aAAa,GAAG;AACpB,QAAQ,IAAI,CAAC,GAAG,EAAE;AAClB,IAAI;AACJ;AACA,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC;AAC9C,QAAQ;AACR,aAAa;AACb,YAAY,OAAO,IAAI,CAAC,GAAG,EAAE;AAC7B,QAAQ;AACR,IAAI;AACJ,IAAI,GAAG,CAAC,SAAS,EAAE,aAAa,EAAE,aAAa,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAE;AAC5E,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QAAQ;AACR,IAAI;AACJ,IAAI,cAAc,CAAC,QAAQ,EAAE;AAC7B,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC;AACxD,QAAQ,IAAI,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAE;AACnD,YAAY,IAAI,CAAC,qBAAqB,EAAE;AACxC,QAAQ;AACR,QAAQ,IAAI,OAAO,EAAE;AACrB,YAAY,SAAS,EAAE,EAAE,4BAA4B,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACjF,QAAQ;AACR,IAAI;AACJ,IAAI,oBAAoB,GAAG,EAAE;AAC7B,IAAI,qBAAqB,GAAG,EAAE;AAC9B,IAAI,GAAG,GAAG;AACV,QAAQ,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE;AACvC,QAAQ,aAAa,CAAC,IAAI,CAAC;AAC3B,QAAQ,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;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;"}
|