@vscode/component-explorer-cli 0.1.1-7 → 0.1.1-9

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 (80) hide show
  1. package/dist/commands/mcpCommand.d.ts +2 -0
  2. package/dist/commands/mcpCommand.d.ts.map +1 -1
  3. package/dist/commands/mcpCommand.js +34 -6
  4. package/dist/commands/mcpCommand.js.map +1 -1
  5. package/dist/commands/serveCommand.d.ts +3 -0
  6. package/dist/commands/serveCommand.d.ts.map +1 -1
  7. package/dist/commands/serveCommand.js +60 -10
  8. package/dist/commands/serveCommand.js.map +1 -1
  9. package/dist/component-explorer-config.schema.json +183 -0
  10. package/dist/componentExplorer.d.ts +10 -0
  11. package/dist/componentExplorer.d.ts.map +1 -1
  12. package/dist/componentExplorer.js +66 -14
  13. package/dist/componentExplorer.js.map +1 -1
  14. package/dist/daemon/DaemonContext.d.ts +4 -0
  15. package/dist/daemon/DaemonContext.d.ts.map +1 -0
  16. package/dist/daemon/DaemonService.d.ts +43 -20
  17. package/dist/daemon/DaemonService.d.ts.map +1 -1
  18. package/dist/daemon/DaemonService.js +56 -7
  19. package/dist/daemon/DaemonService.js.map +1 -1
  20. package/dist/daemon/lifecycle.d.ts +8 -3
  21. package/dist/daemon/lifecycle.d.ts.map +1 -1
  22. package/dist/daemon/lifecycle.js +27 -10
  23. package/dist/daemon/lifecycle.js.map +1 -1
  24. package/dist/daemon/pipeClient.d.ts +6 -1
  25. package/dist/daemon/pipeClient.d.ts.map +1 -1
  26. package/dist/daemon/pipeClient.js +19 -6
  27. package/dist/daemon/pipeClient.js.map +1 -1
  28. package/dist/daemon/pipeServer.d.ts.map +1 -1
  29. package/dist/daemon/pipeServer.js +5 -3
  30. package/dist/daemon/pipeServer.js.map +1 -1
  31. package/dist/dependencyInstaller.js +1 -1
  32. package/dist/dependencyInstaller.js.map +1 -1
  33. package/dist/external/vscode-observables/observables/dist/disposables.js +24 -1
  34. package/dist/external/vscode-observables/observables/dist/disposables.js.map +1 -1
  35. package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js +1 -4
  36. package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js.map +1 -1
  37. package/dist/external/vscode-observables/observables/dist/observableInternal/index.js +2 -5
  38. package/dist/external/vscode-observables/observables/dist/observableInternal/index.js.map +1 -1
  39. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js +30 -6
  40. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  41. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js +1 -1
  42. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +1 -1
  43. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js +12 -1
  44. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js.map +1 -1
  45. package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js +55 -0
  46. package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js.map +1 -0
  47. package/dist/formatValue.d.ts +2 -0
  48. package/dist/formatValue.d.ts.map +1 -0
  49. package/dist/formatValue.js +96 -0
  50. package/dist/formatValue.js.map +1 -0
  51. package/dist/formatValue.test.d.ts +2 -0
  52. package/dist/formatValue.test.d.ts.map +1 -0
  53. package/dist/git/gitUtils.js +1 -1
  54. package/dist/git/gitUtils.js.map +1 -1
  55. package/dist/httpServer.js +4 -3
  56. package/dist/httpServer.js.map +1 -1
  57. package/dist/mcp/McpServer.d.ts +30 -4
  58. package/dist/mcp/McpServer.d.ts.map +1 -1
  59. package/dist/mcp/McpServer.js +433 -95
  60. package/dist/mcp/McpServer.js.map +1 -1
  61. package/dist/packages/simple-api/dist/{chunk-A5PE72HI.js → chunk-Q24JOMNK.js} +7 -1
  62. package/dist/packages/simple-api/dist/chunk-Q24JOMNK.js.map +1 -0
  63. package/dist/utils.d.ts +20 -0
  64. package/dist/utils.d.ts.map +1 -1
  65. package/dist/utils.js +22 -1
  66. package/dist/utils.js.map +1 -1
  67. package/dist/watchConfig.d.ts +36 -0
  68. package/dist/watchConfig.d.ts.map +1 -1
  69. package/dist/watchConfig.js +32 -22
  70. package/dist/watchConfig.js.map +1 -1
  71. package/package.json +6 -4
  72. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js +0 -72
  73. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js.map +0 -1
  74. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js +0 -447
  75. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js.map +0 -1
  76. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js +0 -64
  77. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js.map +0 -1
  78. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js +0 -52
  79. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js.map +0 -1
  80. package/dist/packages/simple-api/dist/chunk-A5PE72HI.js.map +0 -1
@@ -1,50 +1,67 @@
1
- import http from 'node:http';
1
+ import http__default from 'node:http';
2
2
  import { spawn } from 'node:child_process';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import * as path from 'node:path';
5
5
  import { createPipeClient } from './pipeClient.js';
6
6
  import { daemonPipeName } from './pipeName.js';
7
+ import { nullLogger } from '../logger.js';
7
8
 
8
9
  const _cliEntryPoint = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../index.js');
9
- function tryConnect(pipeName) {
10
+ function tryConnect(pipeName, options) {
11
+ const logger = options?.logger ?? nullLogger;
12
+ logger.debug(`tryConnect: ${pipeName}`);
10
13
  return new Promise(resolve => {
11
- const req = http.request({ socketPath: pipeName, path: '/api/sessions', method: 'POST', headers: { 'Content-Type': 'application/json' } }, (res) => {
14
+ const req = http__default.request({ socketPath: pipeName, path: '/api/sessions', method: 'POST', headers: { 'Content-Type': 'application/json' } }, (res) => {
12
15
  let data = '';
13
16
  res.on('data', chunk => data += chunk);
14
17
  res.on('end', () => {
15
18
  if (res.statusCode === 200) {
16
- resolve(createPipeClient(pipeName));
19
+ logger.debug(`tryConnect: success`);
20
+ resolve(createPipeClient(pipeName, options));
17
21
  }
18
22
  else {
23
+ logger.debug(`tryConnect: failed (status ${res.statusCode})`);
19
24
  resolve(undefined);
20
25
  }
21
26
  });
22
27
  });
23
- req.on('error', () => resolve(undefined));
28
+ req.on('error', (err) => {
29
+ logger.debug(`tryConnect: failed (${err.message})`);
30
+ resolve(undefined);
31
+ });
24
32
  req.write('{}');
25
33
  req.end();
26
34
  });
27
35
  }
28
36
  async function waitForDaemon(pipeName, options) {
37
+ const logger = options.logger ?? nullLogger;
29
38
  const deadline = Date.now() + options.timeoutMs;
39
+ logger.debug(`waitForDaemon: polling (timeout ${options.timeoutMs}ms)`);
40
+ let attempt = 0;
30
41
  while (Date.now() < deadline) {
31
- const client = await tryConnect(pipeName);
42
+ attempt++;
43
+ const client = await tryConnect(pipeName, options);
32
44
  if (client) {
45
+ logger.debug(`waitForDaemon: connected after ${attempt} attempt(s)`);
33
46
  return client;
34
47
  }
35
48
  await new Promise(r => setTimeout(r, 200));
36
49
  }
37
50
  throw new Error(`Daemon did not start within ${options.timeoutMs}ms`);
38
51
  }
39
- async function ensureDaemon(configPath) {
52
+ async function ensureDaemon(configPath, options) {
53
+ const logger = options?.logger ?? nullLogger;
40
54
  const pipeName = daemonPipeName(configPath);
41
- const existing = await tryConnect(pipeName);
55
+ const existing = await tryConnect(pipeName, options);
42
56
  if (existing) {
43
57
  return existing;
44
58
  }
45
- const child = spawn(process.execPath, [_cliEntryPoint, 'serve', '--project', configPath], { detached: true, stdio: 'ignore', windowsHide: true });
59
+ logger.debug(`ensureDaemon: spawning child process`);
60
+ const args = [_cliEntryPoint, 'serve', '--project', configPath];
61
+ logger.trace(`ensureDaemon: spawn args: ${args.join(' ')}`);
62
+ const child = spawn(process.execPath, args, { detached: true, stdio: 'ignore', windowsHide: true });
46
63
  child.unref();
47
- return waitForDaemon(pipeName, { timeoutMs: 30_000 });
64
+ return waitForDaemon(pipeName, { timeoutMs: 30_000, ...options });
48
65
  }
49
66
 
50
67
  export { ensureDaemon, tryConnect, waitForDaemon };
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.js","sources":["../../src/daemon/lifecycle.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AASA,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAClC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAC5C,aAAa,CACb;AAEK,SAAU,UAAU,CAAC,QAAgB,EAAA;AAC1C,IAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;AAC5B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,GAAG,KAAI;YAClJ,IAAI,IAAI,GAAG,EAAE;AACb,YAAA,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC;AACtC,YAAA,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAK;AAClB,gBAAA,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;AAC3B,oBAAA,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;gBACpC;qBAAO;oBACN,OAAO,CAAC,SAAS,CAAC;gBACnB;AACD,YAAA,CAAC,CAAC;AACH,QAAA,CAAC,CAAC;AACF,QAAA,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;AACzC,QAA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IAAI,QAAQ,EAAE;AAAE,QAAA,OAAO,QAAQ;IAAE;AAEjC,IAAA,MAAM,CAAC,KAAK,CAAC,CAAA,oCAAA,CAAsC,CAAC;IACpD,MAAM,IAAI,GAAG,CAAC,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC;AAC/D,IAAA,MAAM,CAAC,KAAK,CAAC,CAAA,0BAAA,EAA6B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,KAAK,CAClB,OAAO,CAAC,QAAQ,EAChB,IAAI,EACJ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CACtD;IACD,KAAK,CAAC,KAAK,EAAE;AAEb,IAAA,OAAO,aAAa,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC;AAClE;;;;"}
@@ -1,4 +1,9 @@
1
1
  import { ProxyApiClient } from '@hediet/simple-api/client';
2
2
  import type { DaemonApiType } from './DaemonService.js';
3
- export declare function createPipeClient(pipeName: string): ProxyApiClient<DaemonApiType>;
3
+ import { type ILogger } from '../logger.js';
4
+ export interface PipeClientOptions {
5
+ readonly logger?: ILogger;
6
+ readonly clientName?: string;
7
+ }
8
+ export declare function createPipeClient(pipeName: string, options?: PipeClientOptions): ProxyApiClient<DaemonApiType>;
4
9
  //# sourceMappingURL=pipeClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeClient.d.ts","sourceRoot":"","sources":["../../src/daemon/pipeClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAC,aAAa,CAAC,CA2FhF"}
1
+ {"version":3,"file":"pipeClient.d.ts","sourceRoot":"","sources":["../../src/daemon/pipeClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,cAAc,CAAC;AAGxD,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,cAAc,CAAC,aAAa,CAAC,CAoG7G"}
@@ -1,19 +1,25 @@
1
- import http from 'node:http';
2
- import { ProxyApiClient } from '../packages/simple-api/dist/chunk-A5PE72HI.js';
1
+ import http__default from 'node:http';
2
+ import { ProxyApiClient } from '../packages/simple-api/dist/chunk-Q24JOMNK.js';
3
3
  import { AsyncStream } from '../packages/simple-api/dist/chunk-SGBCNXYH.js';
4
4
  import 'zod';
5
+ import { nullLogger } from '../logger.js';
6
+ import { formatValue } from '../formatValue.js';
5
7
 
6
- function createPipeClient(pipeName) {
8
+ function createPipeClient(pipeName, options) {
9
+ const logger = options?.logger ?? nullLogger;
10
+ const clientName = options?.clientName ?? 'unknown';
7
11
  return new ProxyApiClient(async (method, arg) => {
8
12
  const body = JSON.stringify(arg ?? {});
13
+ logger.debug(`Daemon call: ${method} args=${formatValue(arg)}`);
9
14
  return new Promise((resolve, reject) => {
10
- const req = http.request({
15
+ const req = http__default.request({
11
16
  socketPath: pipeName,
12
17
  path: `/api/${method}`,
13
18
  method: 'POST',
14
19
  headers: {
15
20
  'Content-Type': 'application/json',
16
21
  'Content-Length': Buffer.byteLength(body),
22
+ 'X-Client-Name': clientName,
17
23
  },
18
24
  }, (res) => {
19
25
  const contentType = res.headers['content-type'] ?? '';
@@ -54,6 +60,7 @@ function createPipeClient(pipeName) {
54
60
  }
55
61
  });
56
62
  res.on('error', (err) => {
63
+ logger.trace(`Daemon call: ${method} stream error: ${err.message}`);
57
64
  done = true;
58
65
  if (resolve) {
59
66
  const r = resolve;
@@ -79,15 +86,21 @@ function createPipeClient(pipeName) {
79
86
  res.on('data', chunk => data += chunk);
80
87
  res.on('end', () => {
81
88
  if (res.statusCode !== 200) {
89
+ logger.debug(`Daemon call: ${method} error (${res.statusCode})`);
82
90
  reject(new Error(`Daemon error (${res.statusCode}): ${data}`));
83
91
  }
84
92
  else {
85
- resolve(data ? JSON.parse(data) : null);
93
+ const parsed = data ? JSON.parse(data) : null;
94
+ logger.debug(`Daemon call: ${method} result=${formatValue(parsed)}`);
95
+ resolve(parsed);
86
96
  }
87
97
  });
88
98
  }
89
99
  });
90
- req.on('error', reject);
100
+ req.on('error', (err) => {
101
+ logger.trace(`Daemon call: ${method} connection error: ${err.message}`);
102
+ reject(err);
103
+ });
91
104
  req.write(body);
92
105
  req.end();
93
106
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pipeClient.js","sources":["../../src/daemon/pipeClient.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKM,SAAU,gBAAgB,CAAC,QAAgB,EAAA;IAChD,OAAO,IAAI,cAAc,CAAC,OAAO,MAAM,EAAE,GAAG,KAAI;QAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC;QACtC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACtC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;AACxB,gBAAA,UAAU,EAAE,QAAQ;gBACpB,IAAI,EAAE,CAAA,KAAA,EAAQ,MAAM,CAAA,CAAE;AACtB,gBAAA,MAAM,EAAE,MAAM;AACd,gBAAA,OAAO,EAAE;AACR,oBAAA,cAAc,EAAE,kBAAkB;AAClC,oBAAA,gBAAg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G,CAAC;AACZ,YAAA,CAAC,CAAC;AACF,YAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YACf,GAAG,CAAC,GAAG,EAAE;AACV,QAAA,CAAC,CAAC;AACH,IAAA,CAAC,CAAC;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeServer.d.ts","sourceRoot":"","sources":["../../src/daemon/pipeServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAsB,eAAe,CACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAatB"}
1
+ {"version":3,"file":"pipeServer.d.ts","sourceRoot":"","sources":["../../src/daemon/pipeServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,wBAAsB,eAAe,CACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAetB"}
@@ -1,4 +1,4 @@
1
- import http from 'node:http';
1
+ import http__default from 'node:http';
2
2
  import * as fs from 'node:fs';
3
3
  import express from 'express';
4
4
  import { createApiRouter } from '../packages/simple-api/dist/express.js';
@@ -12,9 +12,11 @@ async function startPipeServer(pipeName, service) {
12
12
  }
13
13
  const app = express();
14
14
  app.use('/api', createApiRouter(service.api, {
15
- contextFactory: () => undefined,
15
+ contextFactory: (req) => ({
16
+ clientName: req.headers['x-client-name'] ?? 'unknown',
17
+ }),
16
18
  }));
17
- const server = http.createServer(app);
19
+ const server = http__default.createServer(app);
18
20
  await new Promise(resolve => server.listen(pipeName, resolve));
19
21
  return server;
20
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pipeServer.js","sources":["../../src/daemon/pipeServer.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAMO,eAAe,eAAe,CACpC,QAAgB,EAChB,OAAsB,EAAA;AAEtB,IAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;AACjC,QAAA,IAAI;AAAE,YAAA,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE;AAAE,QAAA,MAAM,sBAAsB;IAC9D;AAEA,IAAA,MAAM,GAAG,GAAG,OAAO,EAAE;IACrB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE;AAC5C,QAAA,cAAc,EAAE,MAAM,SAAS;AAC/B,KAAA,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;AACrC,IAAA,MAAM,IAAI,OAAO,CAAO,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpE,IAAA,OAAO,MAAM;AACd;;;;"}
1
+ {"version":3,"file":"pipeServer.js","sources":["../../src/daemon/pipeServer.ts"],"sourcesContent":[null],"names":["http"],"mappings":";;;;;AAOO,eAAe,eAAe,CACpC,QAAgB,EAChB,OAAsB,EAAA;AAEtB,IAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;AACjC,QAAA,IAAI;AAAE,YAAA,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE;AAAE,QAAA,MAAM,sBAAsB;IAC9D;AAEA,IAAA,MAAM,GAAG,GAAG,OAAO,EAAE;IACrB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE;AAC5C,QAAA,cAAc,EAAE,CAAC,GAAG,MAAqB;YACxC,UAAU,EAAG,GAAG,CAAC,OAAO,CAAC,eAAe,CAAY,IAAI,SAAS;SACjE,CAAC;AACF,KAAA,CAAC,CAAC;IAEH,MAAM,MAAM,GAAGA,aAAI,CAAC,YAAY,CAAC,GAAG,CAAC;AACrC,IAAA,MAAM,IAAI,OAAO,CAAO,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACpE,IAAA,OAAO,MAAM;AACd;;;;"}
@@ -9,7 +9,7 @@ async function installDependencies(worktreePath, config, logger) {
9
9
  const command = resolveCommand(worktreePath, config);
10
10
  logger.log(`Installing dependencies: ${command}`);
11
11
  await new Promise((resolve, reject) => {
12
- const proc = exec(command, { cwd: worktreePath, encoding: 'utf-8' }, (err) => {
12
+ const proc = exec(command, { cwd: worktreePath, encoding: 'utf-8', windowsHide: true }, (err) => {
13
13
  if (err) {
14
14
  reject(new Error(`Dependency install failed: ${err.message}`));
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dependencyInstaller.js","sources":["../src/dependencyInstaller.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMO,eAAe,mBAAmB,CACxC,YAAoB,EACpB,MAA6B,EAC7B,MAAe,EAAA;AAEf,IAAA,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE;QAAE;IAAQ;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,YAAY,EAAE,MAAM,CAAC;AACpD,IAAA,MAAM,CAAC,GAAG,CAAC,4BAA4B,OAAO,CAAA,CAAE,CAAC;IAEjD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,KAAI;AAC3C,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,KAAI;YAC5E,IAAI,GAAG,EAAE;gBACR,MAAM,CAAC,IAAI,KAAK,CAAC,CAAA,2BAAA,EAA8B,GAAG,CAAC,OAAO,CAAA,CAAE,CAAC,CAAC;YAC/D;iBAAO;AACN,gBAAA,OAAO,EAAE;YACV;AACD,QAAA,CAAC,CAAC;QACF,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,KAAK,EAAE,OAAO,QAAQ;AAC3B,QAAA,KAAK,MAAM,EAAE,OAAO,gCAAgC;AACpD,QAAA,KAAK,MAAM,EAAE,OAAO,gCAAgC;AACpD,QAAA,KAAK,QAAQ,EAAE,OAAO,MAAM,CAAC,OAAO;QACpC,KAAK,MAAM,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;AACtD,QAAA,SAAS,MAAM,IAAI,KAAK,CAAC,CAAA,6BAAA,EAAiC,MAA2B,CAAC,IAAI,CAAA,CAAE,CAAC;;AAE/F;AAEA,SAAS,oBAAoB,CAAC,YAAoB,EAAA;AACjD,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC,EAAE;AAC7D,QAAA,OAAO,gCAAgC;IACxC;AACA,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,EAAE;AACxD,QAAA,OAAO,gCAAgC;IACxC;AACA,IAAA,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC,EAAE;AAChE,QAAA,OAAO,QAAQ;IAChB;AACA,IAAA,OAAO,aAAa;AACrB;;;;"}
@@ -38,6 +38,29 @@ class DisposableStore {
38
38
  this.disposables = [];
39
39
  }
40
40
  }
41
+ class Disposable {
42
+ constructor() {
43
+ this._store = new DisposableStore();
44
+ }
45
+ dispose() {
46
+ this._store.dispose();
47
+ }
48
+ _register(t) {
49
+ this._store.add(t);
50
+ return t;
51
+ }
52
+ _registerOrDispose(t) {
53
+ if (t) {
54
+ if (this._store.isDisposed) {
55
+ t.dispose();
56
+ }
57
+ else {
58
+ this._store.add(t);
59
+ }
60
+ }
61
+ return t;
62
+ }
63
+ }
41
64
 
42
- export { DisposableStore };
65
+ export { Disposable, DisposableStore };
43
66
  //# sourceMappingURL=disposables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"disposables.js","sources":["../../../../../../../external/vscode-observables/observables/dist/disposables.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass DisposableStore {\n constructor() {\n this.disposables = [];\n this._isDisposed = false;\n }\n get isDisposed() { return this._isDisposed; }\n dispose() {\n this.clear();\n this._isDisposed = true;\n }\n add(disposable) {\n if (disposable) {\n this.disposables.push(disposable);\n }\n return disposable;\n }\n remove(disposable) {\n if (!disposable) {\n return disposable;\n }\n const index = this.disposables.indexOf(disposable);\n if (index !== -1) {\n this.disposables.splice(index, 1);\n }\n return disposable;\n }\n clear() {\n for (const disposable of this.disposables) {\n disposable.dispose();\n }\n this.disposables = [];\n }\n leakItems() {\n this.disposables = [];\n }\n}\nclass Disposable {\n constructor() {\n this._store = new DisposableStore();\n }\n dispose() {\n this._store.dispose();\n }\n _register(t) {\n this._store.add(t);\n return t;\n }\n _registerOrDispose(t) {\n if (t) {\n if (this._store.isDisposed) {\n t.dispose();\n }\n else {\n this._store.add(t);\n }\n }\n return t;\n }\n}\n\nexport { Disposable, DisposableStore };\n//# sourceMappingURL=disposables.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,MAAM,eAAe,CAAC;AACtB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK;AAChC,IAAI;AACJ,IAAI,IAAI,UAAU,GAAG,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;AAChD,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;AAC/B,IAAI;AACJ,IAAI,GAAG,CAAC,UAAU,EAAE;AACpB,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,OAAO,UAAU;AAC7B,QAAQ;AACR,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,QAAQ,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1B,YAAY,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,KAAK,GAAG;AACZ,QAAQ,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE;AACnD,YAAY,UAAU,CAAC,OAAO,EAAE;AAChC,QAAQ;AACR,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ,IAAI,SAAS,GAAG;AAChB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ;;;;"}
1
+ {"version":3,"file":"disposables.js","sources":["../../../../../../../external/vscode-observables/observables/dist/disposables.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass DisposableStore {\n constructor() {\n this.disposables = [];\n this._isDisposed = false;\n }\n get isDisposed() { return this._isDisposed; }\n dispose() {\n this.clear();\n this._isDisposed = true;\n }\n add(disposable) {\n if (disposable) {\n this.disposables.push(disposable);\n }\n return disposable;\n }\n remove(disposable) {\n if (!disposable) {\n return disposable;\n }\n const index = this.disposables.indexOf(disposable);\n if (index !== -1) {\n this.disposables.splice(index, 1);\n }\n return disposable;\n }\n clear() {\n for (const disposable of this.disposables) {\n disposable.dispose();\n }\n this.disposables = [];\n }\n leakItems() {\n this.disposables = [];\n }\n}\nclass Disposable {\n constructor() {\n this._store = new DisposableStore();\n }\n dispose() {\n this._store.dispose();\n }\n _register(t) {\n this._store.add(t);\n return t;\n }\n _registerOrDispose(t) {\n if (t) {\n if (this._store.isDisposed) {\n t.dispose();\n }\n else {\n this._store.add(t);\n }\n }\n return t;\n }\n}\n\nexport { Disposable, DisposableStore };\n//# sourceMappingURL=disposables.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,MAAM,eAAe,CAAC;AACtB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK;AAChC,IAAI;AACJ,IAAI,IAAI,UAAU,GAAG,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;AAChD,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;AAC/B,IAAI;AACJ,IAAI,GAAG,CAAC,UAAU,EAAE;AACpB,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,OAAO,UAAU;AAC7B,QAAQ;AACR,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,QAAQ,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1B,YAAY,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC7C,QAAQ;AACR,QAAQ,OAAO,UAAU;AACzB,IAAI;AACJ,IAAI,KAAK,GAAG;AACZ,QAAQ,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE;AACnD,YAAY,UAAU,CAAC,OAAO,EAAE;AAChC,QAAQ;AACR,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ,IAAI,SAAS,GAAG;AAChB,QAAQ,IAAI,CAAC,WAAW,GAAG,EAAE;AAC7B,IAAI;AACJ;AACA,MAAM,UAAU,CAAC;AACjB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,EAAE;AAC3C,IAAI;AACJ,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC7B,IAAI;AACJ,IAAI,SAAS,CAAC,CAAC,EAAE;AACjB,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1B,QAAQ,OAAO,CAAC;AAChB,IAAI;AACJ,IAAI,kBAAkB,CAAC,CAAC,EAAE;AAC1B,QAAQ,IAAI,CAAC,EAAE;AACf,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AACxC,gBAAgB,CAAC,CAAC,OAAO,EAAE;AAC3B,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,YAAY;AACZ,QAAQ;AACR,QAAQ,OAAO,CAAC;AAChB,IAAI;AACJ;;;;"}
@@ -32,9 +32,6 @@ function onUnexpectedError(error) {
32
32
  * Compares two items for equality using strict equality.
33
33
  */
34
34
  const strictEquals = (a, b) => a === b;
35
- function isDefined(arg) {
36
- return arg !== undefined && arg !== null;
37
- }
38
35
 
39
- export { BugIndicatingError, isDefined, onBugIndicatingError, onUnexpectedError, strictEquals, toDisposable };
36
+ export { BugIndicatingError, onBugIndicatingError, onUnexpectedError, strictEquals, toDisposable };
40
37
  //# sourceMappingURL=deps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deps.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction toDisposable(fn) {\n return {\n dispose: fn\n };\n}\nclass BugIndicatingError extends Error {\n constructor(message) {\n super(message || 'An unexpected bug occurred.');\n Object.setPrototypeOf(this, BugIndicatingError.prototype);\n // Because we know for sure only buggy code throws this,\n // we definitely want to break here and fix the bug.\n // eslint-disable-next-line no-debugger\n // debugger;\n }\n}\nfunction onBugIndicatingError(error) {\n // debugger;\n throw error;\n}\nfunction onUnexpectedError(error) {\n console.error('Unexpected error:', error);\n}\n/**\n * Compares two items for equality using strict equality.\n*/\nconst strictEquals = (a, b) => a === b;\nfunction isDefined(arg) {\n return arg !== undefined && arg !== null;\n}\n\nexport { BugIndicatingError, isDefined, 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;AACrC,SAAS,SAAS,CAAC,GAAG,EAAE;AACxB,IAAI,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;AAC5C;;;;"}
1
+ {"version":3,"file":"deps.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction toDisposable(fn) {\n return {\n dispose: fn\n };\n}\nclass BugIndicatingError extends Error {\n constructor(message) {\n super(message || 'An unexpected bug occurred.');\n Object.setPrototypeOf(this, BugIndicatingError.prototype);\n // Because we know for sure only buggy code throws this,\n // we definitely want to break here and fix the bug.\n // eslint-disable-next-line no-debugger\n // debugger;\n }\n}\nfunction onBugIndicatingError(error) {\n // debugger;\n throw error;\n}\nfunction onUnexpectedError(error) {\n console.error('Unexpected error:', error);\n}\n/**\n * Compares two items for equality using strict equality.\n*/\nconst strictEquals = (a, b) => a === b;\n\nexport { BugIndicatingError, onBugIndicatingError, onUnexpectedError, strictEquals, toDisposable };\n//# sourceMappingURL=deps.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,EAAE,EAAE;AAC1B,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE;AACjB,KAAK;AACL;AACA,MAAM,kBAAkB,SAAS,KAAK,CAAC;AACvC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,KAAK,CAAC,OAAO,IAAI,6BAA6B,CAAC;AACvD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC;AACjE;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC;AACA,IAAI,MAAM,KAAK;AACf;AACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;AAClC,IAAI,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC;AAC7C;AACA;AACA;AACA;AACK,MAAC,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK;;;;"}
@@ -1,11 +1,10 @@
1
- import { addLogger, setLogObservableFn } from './logging/logging.js';
1
+ import { setLogObservableFn } from './logging/logging.js';
2
2
  import { _setDebugGetDependencyGraph } from './observables/baseObservable.js';
3
3
  export { DebugLocation } from './debugLocation.js';
4
- export { derivedOpts } from './observables/derived.js';
4
+ export { derived, derivedOpts } from './observables/derived.js';
5
5
  export { keepObserved, recomputeInitiallyAndOnChange } from './utils/utils.js';
6
6
  export { observableFromEvent } from './observables/observableFromEvent.js';
7
7
  import { logObservableToConsole } from './logging/consoleObservableLogger.js';
8
- import { DevToolsLogger } from './logging/debugger/devToolsLogger.js';
9
8
  import { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';
10
9
 
11
10
  /*---------------------------------------------------------------------------------------------
@@ -20,6 +19,4 @@ import { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';
20
19
  // This is a facade for the observable implementation. Only import from here!
21
20
  _setDebugGetDependencyGraph(debugGetDependencyGraph);
22
21
  setLogObservableFn(logObservableToConsole);
23
- // To debug observables you also need the extension "ms-vscode.debug-value-editor"
24
- addLogger(DevToolsLogger.getInstance());
25
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/index.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { addLogger, 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 { DevToolsLogger } from './logging/debugger/devToolsLogger.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// To debug observables you also need the extension \"ms-vscode.debug-value-editor\"\naddLogger(DevToolsLogger.getInstance());\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA,2BAA2B,CAAC,uBAAuB,CAAC;AACpD,kBAAkB,CAAC,sBAAsB,CAAC;AAC1C;AACA,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../external/vscode-observables/observables/dist/observableInternal/index.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { setLogObservableFn } from './logging/logging.js';\nimport { _setDebugGetDependencyGraph } from './observables/baseObservable.js';\nexport { DebugLocation } from './debugLocation.js';\nexport { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter, derivedWithStore } from './observables/derived.js';\nexport { debouncedObservable, debouncedObservableDeprecated, derivedObservableWithCache, derivedObservableWithWritableCache, keepObserved, mapObservableArrayCached, observableFromPromise, recomputeInitiallyAndOnChange, signalFromObservable, wasEventTriggeredRecently } from './utils/utils.js';\nexport { observableFromEvent, observableFromEventOpts } from './observables/observableFromEvent.js';\nimport { logObservableToConsole } from './logging/consoleObservableLogger.js';\nimport { debugGetDependencyGraph } from './logging/debugGetDependencyGraph.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// This is a facade for the observable implementation. Only import from here!\n_setDebugGetDependencyGraph(debugGetDependencyGraph);\nsetLogObservableFn(logObservableToConsole);\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA,2BAA2B,CAAC,uBAAuB,CAAC;AACpD,kBAAkB,CAAC,sBAAsB,CAAC"}
@@ -244,6 +244,15 @@ function styled(text, options = {
244
244
  };
245
245
  }
246
246
  function formatValue(value, availableLen) {
247
+ try {
248
+ return formatValueUnsafe(value, availableLen);
249
+ }
250
+ catch {
251
+ // Value could not be formatted (e.g., a Proxy that throws on coercion)
252
+ return '[[???]]';
253
+ }
254
+ }
255
+ function formatValueUnsafe(value, availableLen) {
247
256
  switch (typeof value) {
248
257
  case 'number':
249
258
  return '' + value;
@@ -290,17 +299,32 @@ function formatArray(value, availableLen) {
290
299
  return result;
291
300
  }
292
301
  function formatObject(value, availableLen) {
293
- if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {
294
- const val = value.toString();
295
- if (val.length <= availableLen) {
296
- return val;
302
+ // Avoid drilling into Proxies - wrap operations that could trigger traps
303
+ try {
304
+ if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {
305
+ const val = value.toString();
306
+ if (val.length <= availableLen) {
307
+ return val;
308
+ }
309
+ return val.substring(0, availableLen - 3) + '...';
297
310
  }
298
- return val.substring(0, availableLen - 3) + '...';
311
+ }
312
+ catch {
313
+ // toString triggered a Proxy trap or threw - bail out
314
+ return '[[Object]]';
299
315
  }
300
316
  const className = getClassName(value);
301
317
  let result = className ? className + '(' : '{ ';
302
318
  let first = true;
303
- for (const [key, val] of Object.entries(value)) {
319
+ let entries;
320
+ try {
321
+ entries = Object.entries(value);
322
+ }
323
+ catch {
324
+ // Object.entries triggered a Proxy trap - bail out
325
+ return className ? `${className}(...)` : '[[Object]]';
326
+ }
327
+ for (const [key, val] of entries) {
304
328
  if (!first) {
305
329
  result += ', ';
306
330
  }
@@ -1 +1 @@
1
- {"version":3,"file":"consoleObservableLogger.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { addLogger } from './logging.js';\nimport { getClassName } from '../debugName.js';\nimport { Derived } from '../observables/derivedImpl.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nlet consoleObservableLogger;\nfunction logObservableToConsole(obs) {\n if (!consoleObservableLogger) {\n consoleObservableLogger = new ConsoleObservableLogger();\n addLogger(consoleObservableLogger);\n }\n consoleObservableLogger.addFilteredObj(obs);\n}\nclass ConsoleObservableLogger {\n constructor() {\n this.indentation = 0;\n this.changedObservablesSets = new WeakMap();\n }\n addFilteredObj(obj) {\n if (!this._filteredObjects) {\n this._filteredObjects = new Set();\n }\n this._filteredObjects.add(obj);\n }\n _isIncluded(obj) {\n return this._filteredObjects?.has(obj) ?? true;\n }\n textToConsoleArgs(text) {\n return consoleTextToArgs([\n normalText(repeat('| ', this.indentation)),\n text,\n ]);\n }\n formatInfo(info) {\n if (!info.hadValue) {\n return [\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n normalText(` (initial)`),\n ];\n }\n return info.didChange\n ? [\n normalText(` `),\n styled(formatValue(info.oldValue, 70), {\n color: 'red',\n strikeThrough: true,\n }),\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n ]\n : [normalText(` (unchanged)`)];\n }\n handleObservableCreated(observable) {\n if (observable instanceof Derived) {\n const derived = observable;\n this.changedObservablesSets.set(derived, new Set());\n }\n }\n handleOnListenerCountChanged(observable, newCount) {\n }\n handleObservableUpdated(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n if (observable instanceof Derived) {\n this._handleDerivedRecomputed(observable, info);\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable value changed'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n ]));\n }\n formatChanges(changes) {\n if (changes.size === 0) {\n return undefined;\n }\n return styled(' (changed deps: ' +\n [...changes].map((o) => o.debugName).join(', ') +\n ')', { color: 'gray' });\n }\n handleDerivedDependencyChanged(derived, observable, change) {\n if (!this._isIncluded(derived)) {\n return;\n }\n this.changedObservablesSets.get(derived)?.add(observable);\n }\n _handleDerivedRecomputed(derived, info) {\n if (!this._isIncluded(derived)) {\n return;\n }\n const changedObservables = this.changedObservablesSets.get(derived);\n if (!changedObservables) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived recomputed'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n this.formatChanges(changedObservables),\n { data: [{ fn: derived._debugNameData.referenceFn ?? derived._computeFn }] }\n ]));\n changedObservables.clear();\n }\n handleDerivedCleared(derived) {\n if (!this._isIncluded(derived)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived cleared'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ]));\n }\n handleFromEventObservableTriggered(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable from event triggered'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n { data: [{ fn: observable._getValue }] }\n ]));\n }\n handleAutorunCreated(autorun) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.set(autorun, new Set());\n }\n handleAutorunDisposed(autorun) {\n }\n handleAutorunDependencyChanged(autorun, observable, change) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.get(autorun).add(observable);\n }\n handleAutorunStarted(autorun) {\n const changedObservables = this.changedObservablesSets.get(autorun);\n if (!changedObservables) {\n return;\n }\n if (this._isIncluded(autorun)) {\n console.log(...this.textToConsoleArgs([\n formatKind('autorun'),\n styled(autorun.debugName, { color: 'BlueViolet' }),\n this.formatChanges(changedObservables),\n { data: [{ fn: autorun._debugNameData.referenceFn ?? autorun._runFn }] }\n ]));\n }\n changedObservables.clear();\n this.indentation++;\n }\n handleAutorunFinished(autorun) {\n this.indentation--;\n }\n handleBeginTransaction(transaction) {\n let transactionName = transaction.getDebugName();\n if (transactionName === undefined) {\n transactionName = '';\n }\n if (this._isIncluded(transaction)) {\n console.log(...this.textToConsoleArgs([\n formatKind('transaction'),\n styled(transactionName, { color: 'BlueViolet' }),\n { data: [{ fn: transaction._fn }] }\n ]));\n }\n this.indentation++;\n }\n handleEndTransaction() {\n this.indentation--;\n }\n}\nfunction consoleTextToArgs(text) {\n const styles = new Array();\n const data = [];\n let firstArg = '';\n function process(t) {\n if ('length' in t) {\n for (const item of t) {\n if (item) {\n process(item);\n }\n }\n }\n else if ('text' in t) {\n firstArg += `%c${t.text}`;\n styles.push(t.style);\n if (t.data) {\n data.push(...t.data);\n }\n }\n else if ('data' in t) {\n data.push(...t.data);\n }\n }\n process(text);\n const result = [firstArg, ...styles];\n result.push(...data);\n return result;\n}\nfunction normalText(text) {\n return styled(text, { color: 'black' });\n}\nfunction formatKind(kind) {\n return styled(padStr(`${kind}: `, 10), { color: 'black', bold: true });\n}\nfunction styled(text, options = {\n color: 'black',\n}) {\n function objToCss(styleObj) {\n return Object.entries(styleObj).reduce((styleString, [propName, propValue]) => {\n return `${styleString}${propName}:${propValue};`;\n }, '');\n }\n const style = {\n color: options.color,\n };\n if (options.strikeThrough) {\n style['text-decoration'] = 'line-through';\n }\n if (options.bold) {\n style['font-weight'] = 'bold';\n }\n return {\n text,\n style: objToCss(style),\n };\n}\nfunction formatValue(value, availableLen) {\n switch (typeof value) {\n case 'number':\n return '' + value;\n case 'string':\n if (value.length + 2 <= availableLen) {\n return `\"${value}\"`;\n }\n return `\"${value.substr(0, availableLen - 7)}\"+...`;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'undefined':\n return 'undefined';\n case 'object':\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return formatArray(value, availableLen);\n }\n return formatObject(value, availableLen);\n case 'symbol':\n return value.toString();\n case 'function':\n return `[[Function${value.name ? ' ' + value.name : ''}]]`;\n default:\n return '' + value;\n }\n}\nfunction formatArray(value, availableLen) {\n let result = '[ ';\n let first = true;\n for (const val of value) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${formatValue(val, availableLen - result.length)}`;\n }\n result += ' ]';\n return result;\n}\nfunction formatObject(value, availableLen) {\n if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {\n const val = value.toString();\n if (val.length <= availableLen) {\n return val;\n }\n return val.substring(0, availableLen - 3) + '...';\n }\n const className = getClassName(value);\n let result = className ? className + '(' : '{ ';\n let first = true;\n for (const [key, val] of Object.entries(value)) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${key}: ${formatValue(val, availableLen - result.length)}`;\n }\n result += className ? ')' : ' }';\n return result;\n}\nfunction repeat(str, count) {\n let result = '';\n for (let i = 1; i <= count; i++) {\n result += str;\n }\n return result;\n}\nfunction padStr(str, length) {\n while (str.length < length) {\n str += ' ';\n }\n return str;\n}\n\nexport { ConsoleObservableLogger, formatValue, logObservableToConsole };\n//# sourceMappingURL=consoleObservableLogger.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,IAAI,uBAAuB;AAC3B,SAAS,sBAAsB,CAAC,GAAG,EAAE;AACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAClC,QAAQ,uBAAuB,GAAG,IAAI,uBAAuB,EAAE;AAC/D,QAAQ,SAAS,CAAC,uBAAuB,CAAC;AAC1C,IAAI;AACJ,IAAI,uBAAuB,CAAC,cAAc,CAAC,GAAG,CAAC;AAC/C;AACA,MAAM,uBAAuB,CAAC;AAC9B,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,CAAC;AAC5B,QAAQ,IAAI,CAAC,sBAAsB,GAAG,IAAI,OAAO,EAAE;AACnD,IAAI;AACJ,IAAI,cAAc,CAAC,GAAG,EAAE;AACxB,QAAQ,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;AACpC,YAAY,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE;AAC7C,QAAQ;AACR,QAAQ,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;AACtC,IAAI;AACJ,IAAI,WAAW,CAAC,GAAG,EAAE;AACrB,QAAQ,OAAO,IAAI,CAAC,gBAAgB,EAAE,GAAG,CAAC,GAAG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ACZ,QAAQ;AACR,QAAQ,KAAK,GAAG,KAAK;AACrB,QAAQ,MAAM,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7E,IAAI;AACJ,IAAI,MAAM,IAAI,SAAS,GAAG,GAAG,GAAG,IAAI;AACpC,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE;AAC5B,IAAI,IAAI,MAAM,GAAG,EAAE;AACnB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE;AACrC,QAAQ,MAAM,IAAI,GAAG;AACrB,IAAI;AACJ,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE;AAC7B,IAAI,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE;AAChC,QAAQ,GAAG,IAAI,GAAG;AAClB,IAAI;AACJ,IAAI,OAAO,GAAG;AACd;;;;"}
1
+ {"version":3,"file":"consoleObservableLogger.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { addLogger } from './logging.js';\nimport { getClassName } from '../debugName.js';\nimport { Derived } from '../observables/derivedImpl.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nlet consoleObservableLogger;\nfunction logObservableToConsole(obs) {\n if (!consoleObservableLogger) {\n consoleObservableLogger = new ConsoleObservableLogger();\n addLogger(consoleObservableLogger);\n }\n consoleObservableLogger.addFilteredObj(obs);\n}\nclass ConsoleObservableLogger {\n constructor() {\n this.indentation = 0;\n this.changedObservablesSets = new WeakMap();\n }\n addFilteredObj(obj) {\n if (!this._filteredObjects) {\n this._filteredObjects = new Set();\n }\n this._filteredObjects.add(obj);\n }\n _isIncluded(obj) {\n return this._filteredObjects?.has(obj) ?? true;\n }\n textToConsoleArgs(text) {\n return consoleTextToArgs([\n normalText(repeat('| ', this.indentation)),\n text,\n ]);\n }\n formatInfo(info) {\n if (!info.hadValue) {\n return [\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n normalText(` (initial)`),\n ];\n }\n return info.didChange\n ? [\n normalText(` `),\n styled(formatValue(info.oldValue, 70), {\n color: 'red',\n strikeThrough: true,\n }),\n normalText(` `),\n styled(formatValue(info.newValue, 60), {\n color: 'green',\n }),\n ]\n : [normalText(` (unchanged)`)];\n }\n handleObservableCreated(observable) {\n if (observable instanceof Derived) {\n const derived = observable;\n this.changedObservablesSets.set(derived, new Set());\n }\n }\n handleOnListenerCountChanged(observable, newCount) {\n }\n handleObservableUpdated(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n if (observable instanceof Derived) {\n this._handleDerivedRecomputed(observable, info);\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable value changed'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n ]));\n }\n formatChanges(changes) {\n if (changes.size === 0) {\n return undefined;\n }\n return styled(' (changed deps: ' +\n [...changes].map((o) => o.debugName).join(', ') +\n ')', { color: 'gray' });\n }\n handleDerivedDependencyChanged(derived, observable, change) {\n if (!this._isIncluded(derived)) {\n return;\n }\n this.changedObservablesSets.get(derived)?.add(observable);\n }\n _handleDerivedRecomputed(derived, info) {\n if (!this._isIncluded(derived)) {\n return;\n }\n const changedObservables = this.changedObservablesSets.get(derived);\n if (!changedObservables) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived recomputed'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n this.formatChanges(changedObservables),\n { data: [{ fn: derived._debugNameData.referenceFn ?? derived._computeFn }] }\n ]));\n changedObservables.clear();\n }\n handleDerivedCleared(derived) {\n if (!this._isIncluded(derived)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('derived cleared'),\n styled(derived.debugName, { color: 'BlueViolet' }),\n ]));\n }\n handleFromEventObservableTriggered(observable, info) {\n if (!this._isIncluded(observable)) {\n return;\n }\n console.log(...this.textToConsoleArgs([\n formatKind('observable from event triggered'),\n styled(observable.debugName, { color: 'BlueViolet' }),\n ...this.formatInfo(info),\n { data: [{ fn: observable._getValue }] }\n ]));\n }\n handleAutorunCreated(autorun) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.set(autorun, new Set());\n }\n handleAutorunDisposed(autorun) {\n }\n handleAutorunDependencyChanged(autorun, observable, change) {\n if (!this._isIncluded(autorun)) {\n return;\n }\n this.changedObservablesSets.get(autorun).add(observable);\n }\n handleAutorunStarted(autorun) {\n const changedObservables = this.changedObservablesSets.get(autorun);\n if (!changedObservables) {\n return;\n }\n if (this._isIncluded(autorun)) {\n console.log(...this.textToConsoleArgs([\n formatKind('autorun'),\n styled(autorun.debugName, { color: 'BlueViolet' }),\n this.formatChanges(changedObservables),\n { data: [{ fn: autorun._debugNameData.referenceFn ?? autorun._runFn }] }\n ]));\n }\n changedObservables.clear();\n this.indentation++;\n }\n handleAutorunFinished(autorun) {\n this.indentation--;\n }\n handleBeginTransaction(transaction) {\n let transactionName = transaction.getDebugName();\n if (transactionName === undefined) {\n transactionName = '';\n }\n if (this._isIncluded(transaction)) {\n console.log(...this.textToConsoleArgs([\n formatKind('transaction'),\n styled(transactionName, { color: 'BlueViolet' }),\n { data: [{ fn: transaction._fn }] }\n ]));\n }\n this.indentation++;\n }\n handleEndTransaction() {\n this.indentation--;\n }\n}\nfunction consoleTextToArgs(text) {\n const styles = new Array();\n const data = [];\n let firstArg = '';\n function process(t) {\n if ('length' in t) {\n for (const item of t) {\n if (item) {\n process(item);\n }\n }\n }\n else if ('text' in t) {\n firstArg += `%c${t.text}`;\n styles.push(t.style);\n if (t.data) {\n data.push(...t.data);\n }\n }\n else if ('data' in t) {\n data.push(...t.data);\n }\n }\n process(text);\n const result = [firstArg, ...styles];\n result.push(...data);\n return result;\n}\nfunction normalText(text) {\n return styled(text, { color: 'black' });\n}\nfunction formatKind(kind) {\n return styled(padStr(`${kind}: `, 10), { color: 'black', bold: true });\n}\nfunction styled(text, options = {\n color: 'black',\n}) {\n function objToCss(styleObj) {\n return Object.entries(styleObj).reduce((styleString, [propName, propValue]) => {\n return `${styleString}${propName}:${propValue};`;\n }, '');\n }\n const style = {\n color: options.color,\n };\n if (options.strikeThrough) {\n style['text-decoration'] = 'line-through';\n }\n if (options.bold) {\n style['font-weight'] = 'bold';\n }\n return {\n text,\n style: objToCss(style),\n };\n}\nfunction formatValue(value, availableLen) {\n try {\n return formatValueUnsafe(value, availableLen);\n }\n catch {\n // Value could not be formatted (e.g., a Proxy that throws on coercion)\n return '[[???]]';\n }\n}\nfunction formatValueUnsafe(value, availableLen) {\n switch (typeof value) {\n case 'number':\n return '' + value;\n case 'string':\n if (value.length + 2 <= availableLen) {\n return `\"${value}\"`;\n }\n return `\"${value.substr(0, availableLen - 7)}\"+...`;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'undefined':\n return 'undefined';\n case 'object':\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return formatArray(value, availableLen);\n }\n return formatObject(value, availableLen);\n case 'symbol':\n return value.toString();\n case 'function':\n return `[[Function${value.name ? ' ' + value.name : ''}]]`;\n default:\n return '' + value;\n }\n}\nfunction formatArray(value, availableLen) {\n let result = '[ ';\n let first = true;\n for (const val of value) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${formatValue(val, availableLen - result.length)}`;\n }\n result += ' ]';\n return result;\n}\nfunction formatObject(value, availableLen) {\n // Avoid drilling into Proxies - wrap operations that could trigger traps\n try {\n if (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) {\n const val = value.toString();\n if (val.length <= availableLen) {\n return val;\n }\n return val.substring(0, availableLen - 3) + '...';\n }\n }\n catch {\n // toString triggered a Proxy trap or threw - bail out\n return '[[Object]]';\n }\n const className = getClassName(value);\n let result = className ? className + '(' : '{ ';\n let first = true;\n let entries;\n try {\n entries = Object.entries(value);\n }\n catch {\n // Object.entries triggered a Proxy trap - bail out\n return className ? `${className}(...)` : '[[Object]]';\n }\n for (const [key, val] of entries) {\n if (!first) {\n result += ', ';\n }\n if (result.length - 5 > availableLen) {\n result += '...';\n break;\n }\n first = false;\n result += `${key}: ${formatValue(val, availableLen - result.length)}`;\n }\n result += className ? ')' : ' }';\n return result;\n}\nfunction repeat(str, count) {\n let result = '';\n for (let i = 1; i <= count; i++) {\n result += str;\n }\n return result;\n}\nfunction padStr(str, length) {\n while (str.length < length) {\n str += ' ';\n }\n return str;\n}\n\nexport { ConsoleObservableLogger, formatValue, logObservableToConsole };\n//# sourceMappingURL=consoleObservableLogger.js.map\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA,IAAI,uBAAuB;AAC3B,SAAS,sBAAsB,CAAC,GAAG,EAAE;AACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAClC,QAAQ,uBAAuB,GAAG,IAAI,uBAAuB,EAAE;AAC/D,QAAQ,SAAS,CAAC,uBAAuB,CAAC;AAC1C,IAAI;AACJ,IAAI,uBAAuB,CAAC,cAAc,CAAC,GAAG,CAAC;AAC/C;AACA,MAAM,uBAAuB,CAAC;AAC9B,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,WAAW,GAAG,CAAC;AAC5B,QAAQ,IAAI,CAAC,sBAAsB,GAAG,IAAI,OAAO,EAAE;AACnD,IAAI;AACJ,IAAI,cAAc,CAAC,GAAG,E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AAE,EAAE;AACrC,QAAQ,MAAM,IAAI,GAAG;AACrB,IAAI;AACJ,IAAI,OAAO,MAAM;AACjB;AACA,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE;AAC7B,IAAI,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE;AAChC,QAAQ,GAAG,IAAI,GAAG;AAClB,IAAI;AACJ,IAAI,OAAO,GAAG;AACd;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { DebugLocation } from '../debugLocation.js';
2
2
  import { getFunctionName } from '../debugName.js';
3
- import { getLogger, logObservable } from '../logging/logging.js';
3
+ import { logObservable, getLogger } from '../logging/logging.js';
4
4
 
5
5
  /*---------------------------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1 +1 @@
1
- {"version":3,"file":"baseObservable.js","sources":["../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { DebugLocation } from '../debugLocation.js';\nimport { getFunctionName } from '../debugName.js';\nimport { 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,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,CAAC;AACrC,QAAQ,IAAI,GAAG,KAAK,CAAC,EAAE;AACvB,YAAY,IAAI,CAAC,oBAAoB,EAAE;AACvC,QAAQ;AACR,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AAC1C,YAAY,SAAS,EAAE,EAAE,4BAA4B,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACjF,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
+ {"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;;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,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;;;;"}
@@ -8,10 +8,21 @@ import { Derived } from './derivedImpl.js';
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Licensed under the MIT License. See License.txt in the project root for license information.
10
10
  *--------------------------------------------------------------------------------------------*/
11
+
12
+ /*---------------------------------------------------------------------------------------------
13
+ * Copyright (c) Microsoft Corporation. All rights reserved.
14
+ * Licensed under the MIT License. See License.txt in the project root for license information.
15
+ *--------------------------------------------------------------------------------------------*/
16
+ function derived(computeFnOrOwner, computeFn, debugLocation = DebugLocation.ofCaller()) {
17
+ if (computeFn !== undefined) {
18
+ return new Derived(new DebugNameData(computeFnOrOwner, undefined, computeFn), computeFn, undefined, undefined, strictEquals, debugLocation);
19
+ }
20
+ return new Derived(new DebugNameData(undefined, undefined, computeFnOrOwner), computeFnOrOwner, undefined, undefined, strictEquals, debugLocation);
21
+ }
11
22
  function derivedOpts(options, computeFn, debugLocation = DebugLocation.ofCaller()) {
12
23
  return new Derived(new DebugNameData(options.owner, options.debugName, options.debugReferenceFn), computeFn, undefined, options.onLastObserverRemoved, options.equalsFn ?? strictEquals, debugLocation);
13
24
  }
14
25
  _setDerivedOpts(derivedOpts);
15
26
 
16
- export { derivedOpts };
27
+ export { derived, derivedOpts };
17
28
  //# sourceMappingURL=derived.js.map