@vscode/component-explorer-cli 0.1.1-0 → 0.1.1-2

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.
Files changed (139) hide show
  1. package/dist/browserPage.js +4 -2
  2. package/dist/browserPage.js.map +1 -1
  3. package/dist/commands/acceptCommand.d.ts +1 -0
  4. package/dist/commands/acceptCommand.d.ts.map +1 -1
  5. package/dist/commands/acceptCommand.js +8 -2
  6. package/dist/commands/acceptCommand.js.map +1 -1
  7. package/dist/commands/compareCommand.d.ts +1 -0
  8. package/dist/commands/compareCommand.d.ts.map +1 -1
  9. package/dist/commands/compareCommand.js +8 -2
  10. package/dist/commands/compareCommand.js.map +1 -1
  11. package/dist/commands/mcpCommand.d.ts +8 -0
  12. package/dist/commands/mcpCommand.d.ts.map +1 -0
  13. package/dist/commands/mcpCommand.js +24 -0
  14. package/dist/commands/mcpCommand.js.map +1 -0
  15. package/dist/commands/screenshotCommand.d.ts +1 -0
  16. package/dist/commands/screenshotCommand.d.ts.map +1 -1
  17. package/dist/commands/screenshotCommand.js +10 -4
  18. package/dist/commands/screenshotCommand.js.map +1 -1
  19. package/dist/commands/serveCommand.d.ts +16 -0
  20. package/dist/commands/serveCommand.d.ts.map +1 -0
  21. package/dist/commands/serveCommand.js +137 -0
  22. package/dist/commands/serveCommand.js.map +1 -0
  23. package/dist/commands/watchCommand.d.ts +1 -0
  24. package/dist/commands/watchCommand.d.ts.map +1 -1
  25. package/dist/commands/watchCommand.js +22 -10
  26. package/dist/commands/watchCommand.js.map +1 -1
  27. package/dist/componentExplorer.js +5 -2
  28. package/dist/componentExplorer.js.map +1 -1
  29. package/dist/daemon/DaemonService.d.ts +131 -0
  30. package/dist/daemon/DaemonService.d.ts.map +1 -0
  31. package/dist/daemon/DaemonService.js +450 -0
  32. package/dist/daemon/DaemonService.js.map +1 -0
  33. package/dist/daemon/approvalStore.d.ts +51 -0
  34. package/dist/daemon/approvalStore.d.ts.map +1 -0
  35. package/dist/daemon/approvalStore.js +58 -0
  36. package/dist/daemon/approvalStore.js.map +1 -0
  37. package/dist/daemon/lifecycle.d.ts +8 -0
  38. package/dist/daemon/lifecycle.d.ts.map +1 -0
  39. package/dist/daemon/lifecycle.js +51 -0
  40. package/dist/daemon/lifecycle.js.map +1 -0
  41. package/dist/daemon/pipeClient.d.ts +4 -0
  42. package/dist/daemon/pipeClient.d.ts.map +1 -0
  43. package/dist/daemon/pipeClient.js +97 -0
  44. package/dist/daemon/pipeClient.js.map +1 -0
  45. package/dist/daemon/pipeName.d.ts +2 -0
  46. package/dist/daemon/pipeName.d.ts.map +1 -0
  47. package/dist/daemon/pipeName.js +14 -0
  48. package/dist/daemon/pipeName.js.map +1 -0
  49. package/dist/daemon/pipeServer.d.ts +4 -0
  50. package/dist/daemon/pipeServer.d.ts.map +1 -0
  51. package/dist/daemon/pipeServer.js +23 -0
  52. package/dist/daemon/pipeServer.js.map +1 -0
  53. package/dist/dependencyInstaller.js +7 -4
  54. package/dist/dependencyInstaller.js.map +1 -1
  55. package/dist/explorerSession.d.ts +5 -3
  56. package/dist/explorerSession.d.ts.map +1 -1
  57. package/dist/explorerSession.js +11 -5
  58. package/dist/explorerSession.js.map +1 -1
  59. package/dist/external/vscode-observables/observables/dist/disposables.js +43 -0
  60. package/dist/external/vscode-observables/observables/dist/disposables.js.map +1 -0
  61. package/dist/external/vscode-observables/observables/dist/observableInternal/base.js +22 -0
  62. package/dist/external/vscode-observables/observables/dist/observableInternal/base.js.map +1 -0
  63. package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js +40 -0
  64. package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js.map +1 -0
  65. package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js +77 -0
  66. package/dist/external/vscode-observables/observables/dist/observableInternal/debugLocation.js.map +1 -0
  67. package/dist/external/vscode-observables/observables/dist/observableInternal/debugName.js +114 -0
  68. package/dist/external/vscode-observables/observables/dist/observableInternal/debugName.js.map +1 -0
  69. package/dist/external/vscode-observables/observables/dist/observableInternal/index.js +25 -0
  70. package/dist/external/vscode-observables/observables/dist/observableInternal/index.js.map +1 -0
  71. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js +332 -0
  72. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js.map +1 -0
  73. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js +79 -0
  74. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugGetDependencyGraph.js.map +1 -0
  75. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js +72 -0
  76. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js.map +1 -0
  77. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js +447 -0
  78. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js.map +1 -0
  79. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js +64 -0
  80. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js.map +1 -0
  81. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js +52 -0
  82. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js.map +1 -0
  83. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/logging.js +100 -0
  84. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/logging.js.map +1 -0
  85. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js +143 -0
  86. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +1 -0
  87. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js +17 -0
  88. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js.map +1 -0
  89. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js +362 -0
  90. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derivedImpl.js.map +1 -0
  91. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableFromEvent.js +123 -0
  92. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableFromEvent.js.map +1 -0
  93. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js +81 -0
  94. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/observableValue.js.map +1 -0
  95. package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorun.js +23 -0
  96. package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorun.js.map +1 -0
  97. package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js +226 -0
  98. package/dist/external/vscode-observables/observables/dist/observableInternal/reactions/autorunImpl.js.map +1 -0
  99. package/dist/external/vscode-observables/observables/dist/observableInternal/transaction.js +87 -0
  100. package/dist/external/vscode-observables/observables/dist/observableInternal/transaction.js.map +1 -0
  101. package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utils.js +68 -0
  102. package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utils.js.map +1 -0
  103. package/dist/git/gitCommitId.js +4 -2
  104. package/dist/git/gitCommitId.js.map +1 -1
  105. package/dist/git/gitCommitResolver.js +11 -3
  106. package/dist/git/gitCommitResolver.js.map +1 -1
  107. package/dist/git/gitService.js +5 -2
  108. package/dist/git/gitService.js.map +1 -1
  109. package/dist/git/gitUtils.js +9 -6
  110. package/dist/git/gitUtils.js.map +1 -1
  111. package/dist/git/gitWorktreeManager.js +5 -2
  112. package/dist/git/gitWorktreeManager.js.map +1 -1
  113. package/dist/httpServer.d.ts +9 -7
  114. package/dist/httpServer.d.ts.map +1 -1
  115. package/dist/httpServer.js +67 -10
  116. package/dist/httpServer.js.map +1 -1
  117. package/dist/index.js +6 -1
  118. package/dist/index.js.map +1 -1
  119. package/dist/logger.d.ts +17 -1
  120. package/dist/logger.d.ts.map +1 -1
  121. package/dist/logger.js +43 -6
  122. package/dist/logger.js.map +1 -1
  123. package/dist/mcp/McpServer.d.ts +28 -0
  124. package/dist/mcp/McpServer.d.ts.map +1 -0
  125. package/dist/mcp/McpServer.js +386 -0
  126. package/dist/mcp/McpServer.js.map +1 -0
  127. package/dist/screenshotCache.js +7 -4
  128. package/dist/screenshotCache.js.map +1 -1
  129. package/dist/sourceTreeId.js +4 -2
  130. package/dist/sourceTreeId.js.map +1 -1
  131. package/dist/storage.js +5 -2
  132. package/dist/storage.js.map +1 -1
  133. package/dist/viteProjectRef.js +5 -2
  134. package/dist/viteProjectRef.js.map +1 -1
  135. package/dist/watchConfig.d.ts +5 -0
  136. package/dist/watchConfig.d.ts.map +1 -1
  137. package/dist/watchConfig.js +22 -7
  138. package/dist/watchConfig.js.map +1 -1
  139. package/package.json +11 -4
@@ -0,0 +1,64 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /*---------------------------------------------------------------------------------------------
6
+ * Copyright (c) Microsoft Corporation. All rights reserved.
7
+ * Licensed under the MIT License. See License.txt in the project root for license information.
8
+ *--------------------------------------------------------------------------------------------*/
9
+ class SimpleTypedRpcConnection {
10
+ static createHost(channelFactory, getHandler) {
11
+ return new SimpleTypedRpcConnection(channelFactory, getHandler);
12
+ }
13
+ static createClient(channelFactory, getHandler) {
14
+ return new SimpleTypedRpcConnection(channelFactory, getHandler);
15
+ }
16
+ constructor(_channelFactory, _getHandler) {
17
+ this._channelFactory = _channelFactory;
18
+ this._getHandler = _getHandler;
19
+ this._channel = this._channelFactory({
20
+ handleNotification: (notificationData) => {
21
+ const m = notificationData;
22
+ const fn = this._getHandler().notifications[m[0]];
23
+ if (!fn) {
24
+ throw new Error(`Unknown notification "${m[0]}"!`);
25
+ }
26
+ fn(...m[1]);
27
+ },
28
+ handleRequest: (requestData) => {
29
+ const m = requestData;
30
+ try {
31
+ const result = this._getHandler().requests[m[0]](...m[1]);
32
+ return { type: 'result', value: result };
33
+ }
34
+ catch (e) {
35
+ return { type: 'error', value: e };
36
+ }
37
+ },
38
+ });
39
+ const requests = new Proxy({}, {
40
+ get: (target, key) => {
41
+ return async (...args) => {
42
+ const result = await this._channel.sendRequest([key, args]);
43
+ if (result.type === 'error') {
44
+ throw result.value;
45
+ }
46
+ else {
47
+ return result.value;
48
+ }
49
+ };
50
+ }
51
+ });
52
+ const notifications = new Proxy({}, {
53
+ get: (target, key) => {
54
+ return (...args) => {
55
+ this._channel.sendNotification([key, args]);
56
+ };
57
+ }
58
+ });
59
+ this.api = { notifications: notifications, requests: requests };
60
+ }
61
+ }
62
+
63
+ export { SimpleTypedRpcConnection };
64
+ //# sourceMappingURL=rpc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc.js","sources":["../../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.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 SimpleTypedRpcConnection {\n static createHost(channelFactory, getHandler) {\n return new SimpleTypedRpcConnection(channelFactory, getHandler);\n }\n static createClient(channelFactory, getHandler) {\n return new SimpleTypedRpcConnection(channelFactory, getHandler);\n }\n constructor(_channelFactory, _getHandler) {\n this._channelFactory = _channelFactory;\n this._getHandler = _getHandler;\n this._channel = this._channelFactory({\n handleNotification: (notificationData) => {\n const m = notificationData;\n const fn = this._getHandler().notifications[m[0]];\n if (!fn) {\n throw new Error(`Unknown notification \"${m[0]}\"!`);\n }\n fn(...m[1]);\n },\n handleRequest: (requestData) => {\n const m = requestData;\n try {\n const result = this._getHandler().requests[m[0]](...m[1]);\n return { type: 'result', value: result };\n }\n catch (e) {\n return { type: 'error', value: e };\n }\n },\n });\n const requests = new Proxy({}, {\n get: (target, key) => {\n return async (...args) => {\n const result = await this._channel.sendRequest([key, args]);\n if (result.type === 'error') {\n throw result.value;\n }\n else {\n return result.value;\n }\n };\n }\n });\n const notifications = new Proxy({}, {\n get: (target, key) => {\n return (...args) => {\n this._channel.sendNotification([key, args]);\n };\n }\n });\n this.api = { notifications: notifications, requests: requests };\n }\n}\n\nexport { SimpleTypedRpcConnection };\n//# sourceMappingURL=rpc.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB,CAAC;AAC/B,IAAI,OAAO,UAAU,CAAC,cAAc,EAAE,UAAU,EAAE;AAClD,QAAQ,OAAO,IAAI,wBAAwB,CAAC,cAAc,EAAE,UAAU,CAAC;AACvE,IAAI;AACJ,IAAI,OAAO,YAAY,CAAC,cAAc,EAAE,UAAU,EAAE;AACpD,QAAQ,OAAO,IAAI,wBAAwB,CAAC,cAAc,EAAE,UAAU,CAAC;AACvE,IAAI;AACJ,IAAI,WAAW,CAAC,eAAe,EAAE,WAAW,EAAE;AAC9C,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe;AAC9C,QAAQ,IAAI,CAAC,WAAW,GAAG,WAAW;AACtC,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC;AAC7C,YAAY,kBAAkB,EAAE,CAAC,gBAAgB,KAAK;AACtD,gBAAgB,MAAM,CAAC,GAAG,gBAAgB;AAC1C,gBAAgB,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,gBAAgB,IAAI,CAAC,EAAE,EAAE;AACzB,oBAAoB,MAAM,IAAI,KAAK,CAAC,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtE,gBAAgB;AA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AAI,KAAK;AACpC,oBAAoB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC/D,gBAAgB,CAAC;AACjB,YAAY;AACZ,SAAS,CAAC;AACV,QAAQ,IAAI,CAAC,GAAG,GAAG,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACvE,IAAI;AACJ;;;;"}
@@ -0,0 +1,52 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /*---------------------------------------------------------------------------------------------
6
+ * Copyright (c) Microsoft Corporation. All rights reserved.
7
+ * Licensed under the MIT License. See License.txt in the project root for license information.
8
+ *--------------------------------------------------------------------------------------------*/
9
+ class Throttler {
10
+ constructor() {
11
+ this._timeout = undefined;
12
+ }
13
+ throttle(fn, timeoutMs) {
14
+ if (this._timeout === undefined) {
15
+ this._timeout = setTimeout(() => {
16
+ this._timeout = undefined;
17
+ fn();
18
+ }, timeoutMs);
19
+ }
20
+ }
21
+ dispose() {
22
+ if (this._timeout !== undefined) {
23
+ clearTimeout(this._timeout);
24
+ }
25
+ }
26
+ }
27
+ function deepAssign(target, source) {
28
+ for (const key in source) {
29
+ if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {
30
+ deepAssign(target[key], source[key]);
31
+ }
32
+ else {
33
+ target[key] = source[key];
34
+ }
35
+ }
36
+ }
37
+ function deepAssignDeleteNulls(target, source) {
38
+ for (const key in source) {
39
+ if (source[key] === null) {
40
+ delete target[key];
41
+ }
42
+ else if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {
43
+ deepAssignDeleteNulls(target[key], source[key]);
44
+ }
45
+ else {
46
+ target[key] = source[key];
47
+ }
48
+ }
49
+ }
50
+
51
+ export { Throttler, deepAssign, deepAssignDeleteNulls };
52
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugger/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 *--------------------------------------------------------------------------------------------*/\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 Throttler {\n constructor() {\n this._timeout = undefined;\n }\n throttle(fn, timeoutMs) {\n if (this._timeout === undefined) {\n this._timeout = setTimeout(() => {\n this._timeout = undefined;\n fn();\n }, timeoutMs);\n }\n }\n dispose() {\n if (this._timeout !== undefined) {\n clearTimeout(this._timeout);\n }\n }\n}\nfunction deepAssign(target, source) {\n for (const key in source) {\n if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {\n deepAssign(target[key], source[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n}\nfunction deepAssignDeleteNulls(target, source) {\n for (const key in source) {\n if (source[key] === null) {\n delete target[key];\n }\n else if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {\n deepAssignDeleteNulls(target[key], source[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n}\n\nexport { Throttler, deepAssign, deepAssignDeleteNulls };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,CAAC;AAChB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,QAAQ,GAAG,SAAS;AACjC,IAAI;AACJ,IAAI,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE;AAC5B,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;AACzC,YAAY,IAA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KAAK,QAAQ,EAAE;AACvH,YAAY,qBAAqB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AAC3D,QAAQ;AACR,aAAa;AACb,YAAY,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;AACrC,QAAQ;AACR,IAAI;AACJ;;;;"}
@@ -0,0 +1,100 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /*---------------------------------------------------------------------------------------------
6
+ * Copyright (c) Microsoft Corporation. All rights reserved.
7
+ * Licensed under the MIT License. See License.txt in the project root for license information.
8
+ *--------------------------------------------------------------------------------------------*/
9
+ let globalObservableLogger;
10
+ function addLogger(logger) {
11
+ if (!globalObservableLogger) {
12
+ globalObservableLogger = logger;
13
+ }
14
+ else if (globalObservableLogger instanceof ComposedLogger) {
15
+ globalObservableLogger.loggers.push(logger);
16
+ }
17
+ else {
18
+ globalObservableLogger = new ComposedLogger([globalObservableLogger, logger]);
19
+ }
20
+ }
21
+ function getLogger() {
22
+ return globalObservableLogger;
23
+ }
24
+ let globalObservableLoggerFn = undefined;
25
+ function setLogObservableFn(fn) {
26
+ globalObservableLoggerFn = fn;
27
+ }
28
+ function logObservable(obs) {
29
+ if (globalObservableLoggerFn) {
30
+ globalObservableLoggerFn(obs);
31
+ }
32
+ }
33
+ class ComposedLogger {
34
+ constructor(loggers) {
35
+ this.loggers = loggers;
36
+ }
37
+ handleObservableCreated(observable, location) {
38
+ for (const logger of this.loggers) {
39
+ logger.handleObservableCreated(observable, location);
40
+ }
41
+ }
42
+ handleOnListenerCountChanged(observable, newCount) {
43
+ for (const logger of this.loggers) {
44
+ logger.handleOnListenerCountChanged(observable, newCount);
45
+ }
46
+ }
47
+ handleObservableUpdated(observable, info) {
48
+ for (const logger of this.loggers) {
49
+ logger.handleObservableUpdated(observable, info);
50
+ }
51
+ }
52
+ handleAutorunCreated(autorun, location) {
53
+ for (const logger of this.loggers) {
54
+ logger.handleAutorunCreated(autorun, location);
55
+ }
56
+ }
57
+ handleAutorunDisposed(autorun) {
58
+ for (const logger of this.loggers) {
59
+ logger.handleAutorunDisposed(autorun);
60
+ }
61
+ }
62
+ handleAutorunDependencyChanged(autorun, observable, change) {
63
+ for (const logger of this.loggers) {
64
+ logger.handleAutorunDependencyChanged(autorun, observable, change);
65
+ }
66
+ }
67
+ handleAutorunStarted(autorun) {
68
+ for (const logger of this.loggers) {
69
+ logger.handleAutorunStarted(autorun);
70
+ }
71
+ }
72
+ handleAutorunFinished(autorun) {
73
+ for (const logger of this.loggers) {
74
+ logger.handleAutorunFinished(autorun);
75
+ }
76
+ }
77
+ handleDerivedDependencyChanged(derived, observable, change) {
78
+ for (const logger of this.loggers) {
79
+ logger.handleDerivedDependencyChanged(derived, observable, change);
80
+ }
81
+ }
82
+ handleDerivedCleared(observable) {
83
+ for (const logger of this.loggers) {
84
+ logger.handleDerivedCleared(observable);
85
+ }
86
+ }
87
+ handleBeginTransaction(transaction) {
88
+ for (const logger of this.loggers) {
89
+ logger.handleBeginTransaction(transaction);
90
+ }
91
+ }
92
+ handleEndTransaction(transaction) {
93
+ for (const logger of this.loggers) {
94
+ logger.handleEndTransaction(transaction);
95
+ }
96
+ }
97
+ }
98
+
99
+ export { addLogger, getLogger, logObservable, setLogObservableFn };
100
+ //# sourceMappingURL=logging.js.map
@@ -0,0 +1 @@
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,wBAAwB,GAAG,SAAS;AACxC,SAAS,kBAAkB,CAAC,EAAE,EAAE;AAChC,IAAI,wBAAwB,GAAG,EAAE;AACjC;AACA,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,IAAI,IAAI,wBAAwB,EAAE;AAClC,QAAQ,wBAAwB,CAAC,GAAG,CAAC;AACrC,IAAI;AACJ;AACA,MAAM,cAAc,CAAC;AACrB,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO;AAC9B,IAAI;AACJ,IAAI,uBAAuB,CAAC,UAAU,EAAE,QAAQ,EAAE;AAClD,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3C,YAAY,MAAM,CAAC,uBAAuB,CAAC,UAAU,EAAE,QAAQ,CAAC;AAChE,QAAQ;AACR,IAAI;AACJ,IAAI,4BAA4B,CAAC,UAAU,EAAE,QAAQ,EAAE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E;AAC3C,YAAY,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC;AACjD,QAAQ;AACR,IAAI;AACJ,IAAI,8BAA8B,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE;AAChE,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3C,YAAY,MAAM,CAAC,8BAA8B,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC;AAC9E,QAAQ;AACR,IAAI;AACJ,IAAI,oBAAoB,CAAC,UAAU,EAAE;AACrC,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3C,YAAY,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC;AACnD,QAAQ;AACR,IAAI;AACJ,IAAI,sBAAsB,CAAC,WAAW,EAAE;AACxC,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3C,YAAY,MAAM,CAAC,sBAAsB,CAAC,WAAW,CAAC;AACtD,QAAQ;AACR,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;;;;"}
@@ -0,0 +1,143 @@
1
+ import { DebugLocation } from '../debugLocation.js';
2
+ import { getFunctionName } from '../debugName.js';
3
+ import { getLogger, logObservable } from '../logging/logging.js';
4
+
5
+ /*---------------------------------------------------------------------------------------------
6
+ * Copyright (c) Microsoft Corporation. All rights reserved.
7
+ * Licensed under the MIT License. See License.txt in the project root for license information.
8
+ *--------------------------------------------------------------------------------------------*/
9
+
10
+ /*---------------------------------------------------------------------------------------------
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License. See License.txt in the project root for license information.
13
+ *--------------------------------------------------------------------------------------------*/
14
+ let _derived;
15
+ /**
16
+ * @internal
17
+ * This is to allow splitting files.
18
+ */
19
+ function _setDerivedOpts(derived) {
20
+ _derived = derived;
21
+ }
22
+ let _recomputeInitiallyAndOnChange;
23
+ function _setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange) {
24
+ _recomputeInitiallyAndOnChange = recomputeInitiallyAndOnChange;
25
+ }
26
+ let _keepObserved;
27
+ function _setKeepObserved(keepObserved) {
28
+ _keepObserved = keepObserved;
29
+ }
30
+ let _debugGetDependencyGraph;
31
+ function _setDebugGetDependencyGraph(debugGetDependencyGraph) {
32
+ _debugGetDependencyGraph = debugGetDependencyGraph;
33
+ }
34
+ class ConvenientObservable {
35
+ get TChange() { return null; }
36
+ reportChanges() {
37
+ this.get();
38
+ }
39
+ /** @sealed */
40
+ read(reader) {
41
+ if (reader) {
42
+ return reader.readObservable(this);
43
+ }
44
+ else {
45
+ return this.get();
46
+ }
47
+ }
48
+ map(fnOrOwner, fnOrUndefined, debugLocation = DebugLocation.ofCaller()) {
49
+ const owner = fnOrUndefined === undefined ? undefined : fnOrOwner;
50
+ const fn = fnOrUndefined === undefined ? fnOrOwner : fnOrUndefined;
51
+ return _derived({
52
+ owner,
53
+ debugName: () => {
54
+ const name = getFunctionName(fn);
55
+ if (name !== undefined) {
56
+ return name;
57
+ }
58
+ // regexp to match `x => x.y` or `x => x?.y` where x and y can be arbitrary identifiers (uses backref):
59
+ 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*$/;
60
+ const match = regexp.exec(fn.toString());
61
+ if (match) {
62
+ return `${this.debugName}.${match[2]}`;
63
+ }
64
+ if (!owner) {
65
+ return `${this.debugName} (mapped)`;
66
+ }
67
+ return undefined;
68
+ },
69
+ debugReferenceFn: fn,
70
+ }, (reader) => fn(this.read(reader), reader), debugLocation);
71
+ }
72
+ /**
73
+ * @sealed
74
+ * Converts an observable of an observable value into a direct observable of the value.
75
+ */
76
+ flatten() {
77
+ return _derived({
78
+ owner: undefined,
79
+ debugName: () => `${this.debugName} (flattened)`,
80
+ }, (reader) => this.read(reader).read(reader));
81
+ }
82
+ recomputeInitiallyAndOnChange(store, handleValue) {
83
+ store.add(_recomputeInitiallyAndOnChange(this, handleValue));
84
+ return this;
85
+ }
86
+ /**
87
+ * Ensures that this observable is observed. This keeps the cache alive.
88
+ * However, in case of deriveds, it does not force eager evaluation (only when the value is read/get).
89
+ * Use `recomputeInitiallyAndOnChange` for eager evaluation.
90
+ */
91
+ keepObserved(store) {
92
+ store.add(_keepObserved(this));
93
+ return this;
94
+ }
95
+ get debugValue() {
96
+ return this.get();
97
+ }
98
+ debugGetDependencyGraph() {
99
+ return _debugGetDependencyGraph(this);
100
+ }
101
+ }
102
+ class BaseObservable extends ConvenientObservable {
103
+ constructor(debugLocation) {
104
+ super();
105
+ this._observers = new Set();
106
+ getLogger()?.handleObservableCreated(this, debugLocation);
107
+ }
108
+ addObserver(observer) {
109
+ const len = this._observers.size;
110
+ this._observers.add(observer);
111
+ if (len === 0) {
112
+ this.onFirstObserverAdded();
113
+ }
114
+ if (len !== this._observers.size) {
115
+ getLogger()?.handleOnListenerCountChanged(this, this._observers.size);
116
+ }
117
+ }
118
+ removeObserver(observer) {
119
+ const deleted = this._observers.delete(observer);
120
+ if (deleted && this._observers.size === 0) {
121
+ this.onLastObserverRemoved();
122
+ }
123
+ if (deleted) {
124
+ getLogger()?.handleOnListenerCountChanged(this, this._observers.size);
125
+ }
126
+ }
127
+ onFirstObserverAdded() { }
128
+ onLastObserverRemoved() { }
129
+ log() {
130
+ const hadLogger = !!getLogger();
131
+ logObservable(this);
132
+ if (!hadLogger) {
133
+ getLogger()?.handleObservableCreated(this, DebugLocation.ofCaller());
134
+ }
135
+ return this;
136
+ }
137
+ debugGetObservers() {
138
+ return this._observers;
139
+ }
140
+ }
141
+
142
+ export { BaseObservable, ConvenientObservable, _setDebugGetDependencyGraph, _setDerivedOpts, _setKeepObserved, _setRecomputeInitiallyAndOnChange };
143
+ //# sourceMappingURL=baseObservable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseObservable.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { DebugLocation } from '../debugLocation.js';\nimport { getFunctionName } from '../debugName.js';\nimport { getLogger, logObservable } 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,QAAQ,MAAM,KAAK,GAAG,aAAa,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS;AACzE,QAAQ,MAAM,EAAE,GAAG,aAAa,KAAK,SAAS,GAAG,SAAS,GAAG,aA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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;;;;"}
@@ -0,0 +1,17 @@
1
+ import { strictEquals } from '../commonFacade/deps.js';
2
+ import { DebugLocation } from '../debugLocation.js';
3
+ import { DebugNameData } from '../debugName.js';
4
+ import { _setDerivedOpts } from './baseObservable.js';
5
+ import { Derived } from './derivedImpl.js';
6
+
7
+ /*---------------------------------------------------------------------------------------------
8
+ * Copyright (c) Microsoft Corporation. All rights reserved.
9
+ * Licensed under the MIT License. See License.txt in the project root for license information.
10
+ *--------------------------------------------------------------------------------------------*/
11
+ function derivedOpts(options, computeFn, debugLocation = DebugLocation.ofCaller()) {
12
+ return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, options.onLastObserverRemoved, options.equalsFn ?? strictEquals, debugLocation);
13
+ }
14
+ _setDerivedOpts(derivedOpts);
15
+
16
+ export { derivedOpts };
17
+ //# sourceMappingURL=derived.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derived.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/derived.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { strictEquals } from '../commonFacade/deps.js';\nimport { DebugLocation } from '../debugLocation.js';\nimport { DebugNameData } from '../debugName.js';\nimport { _setDerivedOpts } from './baseObservable.js';\nimport { Derived, DerivedWithSetter } from './derivedImpl.js';\nimport { DisposableStore } from '../../disposables.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction derived(computeFnOrOwner, computeFn, debugLocation = DebugLocation.ofCaller()) {\n if (computeFn !== undefined) {\n return new Derived(new DebugNameData(computeFnOrOwner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, debugLocation);\n }\n return new Derived(new DebugNameData(undefined, undefined, computeFnOrOwner), computeFnOrOwner, undefined, undefined, strictEquals, debugLocation);\n}\nfunction derivedWithSetter(owner, computeFn, setter, debugLocation = DebugLocation.ofCaller()) {\n return new DerivedWithSetter(new DebugNameData(owner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, setter, debugLocation);\n}\nfunction derivedOpts(options, computeFn, debugLocation = DebugLocation.ofCaller()) {\n return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, options.onLastObserverRemoved, options.equalsFn ?? strictEquals, debugLocation);\n}\n_setDerivedOpts(derivedOpts);\n/**\n * Represents an observable that is derived from other observables.\n * The value is only recomputed when absolutely needed.\n *\n * {@link computeFn} should start with a JS Doc using `@description` to name the derived.\n *\n * Use `createEmptyChangeSummary` to create a \"change summary\" that can collect the changes.\n * Use `handleChange` to add a reported change to the change summary.\n * The compute function is given the last change summary.\n * The change summary is discarded after the compute function was called.\n *\n * @see derived\n */\nfunction derivedHandleChanges(options, computeFn, debugLocation = DebugLocation.ofCaller()) {\n return new Derived(new DebugNameData(options.owner, options.debugName, undefined), computeFn, options.changeTracker, undefined, options.equalityComparer ?? strictEquals, debugLocation);\n}\nfunction derivedWithStore(computeFnOrOwner, computeFnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n // Intentionally re-assigned in case an inactive observable is re-used later\n // eslint-disable-next-line local/code-no-potentially-unsafe-disposables\n let store = new DisposableStore();\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (store.isDisposed) {\n store = new DisposableStore();\n }\n else {\n store.clear();\n }\n return computeFn(r, store);\n }, undefined, () => store.dispose(), strictEquals, debugLocation);\n}\nfunction derivedDisposable(computeFnOrOwner, computeFnOrUndefined, debugLocation = DebugLocation.ofCaller()) {\n let computeFn;\n let owner;\n if (computeFnOrUndefined === undefined) {\n computeFn = computeFnOrOwner;\n owner = undefined;\n }\n else {\n owner = computeFnOrOwner;\n computeFn = computeFnOrUndefined;\n }\n let store = undefined;\n return new Derived(new DebugNameData(owner, undefined, computeFn), r => {\n if (!store) {\n store = new DisposableStore();\n }\n else {\n store.clear();\n }\n const result = computeFn(r);\n if (result) {\n store.add(result);\n }\n return result;\n }, undefined, () => {\n if (store) {\n store.dispose();\n store = undefined;\n }\n }, strictEquals, debugLocation);\n}\n\nexport { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter, derivedWithStore };\n//# sourceMappingURL=derived.js.map\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAqBA,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;;;;"}