@wonderwhy-er/desktop-commander 0.3.1-alpha.1 → 0.3.1-alpha.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.
@@ -1,6 +1,6 @@
1
1
  import { LazyPackage } from '../../utils/lazy-package.js';
2
2
  // import(): unpdf is an ES module only. If it fails, Node keeps it failed until a restart.
3
- export const unpdfPackage = new LazyPackage('unpdf', 'PDF reading support', () => import('unpdf'));
3
+ export const unpdfPackage = new LazyPackage('unpdf', 'PDF reading support', () => import('unpdf'), true);
4
4
  /**
5
5
  * Optimized image extraction from PDF using unpdf's built-in extractImages method
6
6
  * @param pdfBuffer PDF file as Uint8Array
@@ -7,17 +7,19 @@
7
7
  * (preloadFileSupport() in utils/files/factory.ts), and until one is loaded the
8
8
  * calls that need it answer at once that it is still loading. preload() loads
9
9
  * it on a later turn of the event loop, so a call that starts it answers
10
- * first. `error` says why the last preload failed. Node keeps a failed
11
- * import() failed, so a package loaded with import() then `needsRestart`.
10
+ * first. `error` says why the last preload failed. Callers that load with
11
+ * import() can mark failures as requiring a restart, because Node caches a
12
+ * failed dynamic import.
12
13
  */
13
14
  export declare class LazyPackage<T> {
14
15
  readonly name: string;
15
16
  readonly support: string;
16
17
  readonly load: () => T;
18
+ readonly restartAfterFailure: boolean;
17
19
  loaded: boolean;
18
20
  error?: string;
19
21
  needsRestart: boolean;
20
22
  private running?;
21
- constructor(name: string, support: string, load: () => T);
23
+ constructor(name: string, support: string, load: () => T, restartAfterFailure?: boolean);
22
24
  preload(): Promise<void>;
23
25
  }
@@ -8,14 +8,16 @@ import { logger } from './logger.js';
8
8
  * (preloadFileSupport() in utils/files/factory.ts), and until one is loaded the
9
9
  * calls that need it answer at once that it is still loading. preload() loads
10
10
  * it on a later turn of the event loop, so a call that starts it answers
11
- * first. `error` says why the last preload failed. Node keeps a failed
12
- * import() failed, so a package loaded with import() then `needsRestart`.
11
+ * first. `error` says why the last preload failed. Callers that load with
12
+ * import() can mark failures as requiring a restart, because Node caches a
13
+ * failed dynamic import.
13
14
  */
14
15
  export class LazyPackage {
15
- constructor(name, support, load) {
16
+ constructor(name, support, load, restartAfterFailure = false) {
16
17
  this.name = name;
17
18
  this.support = support;
18
19
  this.load = load;
20
+ this.restartAfterFailure = restartAfterFailure;
19
21
  this.loaded = false;
20
22
  this.needsRestart = false;
21
23
  }
@@ -30,7 +32,7 @@ export class LazyPackage {
30
32
  }
31
33
  catch (error) {
32
34
  this.error = error instanceof Error ? error.message : String(error);
33
- this.needsRestart = loading instanceof Promise;
35
+ this.needsRestart = this.restartAfterFailure;
34
36
  logger.error(`Loading ${this.name} failed: ${this.error}`);
35
37
  }
36
38
  finally {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.3.1-alpha.1";
1
+ export declare const VERSION = "0.3.1-alpha.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.3.1-alpha.1';
1
+ export const VERSION = '0.3.1-alpha.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderwhy-er/desktop-commander",
3
- "version": "0.3.1-alpha.1",
3
+ "version": "0.3.1-alpha.2",
4
4
  "description": "MCP server for terminal operations and file editing",
5
5
  "mcpName": "io.github.wonderwhy-er/desktop-commander",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  "bugs": "https://github.com/wonderwhy-er/DesktopCommanderMCP/issues",
14
14
  "type": "module",
15
15
  "engines": {
16
- "node": ">=18.0.0"
16
+ "node": ">=22.12.0"
17
17
  },
18
18
  "bin": {
19
19
  "desktop-commander": "dist/index.js",
@@ -91,22 +91,21 @@
91
91
  ],
92
92
  "dependencies": {
93
93
  "@desktop-commander/telemetry-contract": "file:vendor/telemetry-contract",
94
- "@modelcontextprotocol/sdk": "^1.9.0",
95
- "@opendocsg/pdf2md": "^0.2.2",
94
+ "@modelcontextprotocol/sdk": "^1.32.1",
95
+ "@opendocsg/pdf2md": "^0.3.4",
96
96
  "@supabase/supabase-js": "^2.89.0",
97
- "@tiptap/core": "^3.22.3",
98
- "@tiptap/extension-image": "^3.22.3",
99
- "@tiptap/extension-table": "^3.22.4",
100
- "@tiptap/extension-table-cell": "^3.22.4",
101
- "@tiptap/extension-table-header": "^3.22.4",
102
- "@tiptap/extension-table-row": "^3.22.4",
103
- "@tiptap/pm": "^3.22.3",
104
- "@tiptap/starter-kit": "^3.22.3",
97
+ "@tiptap/core": "^3.31.4",
98
+ "@tiptap/extension-image": "^3.31.4",
99
+ "@tiptap/extension-table": "^3.31.4",
100
+ "@tiptap/extension-table-cell": "^3.31.4",
101
+ "@tiptap/extension-table-header": "^3.31.4",
102
+ "@tiptap/extension-table-row": "^3.31.4",
103
+ "@tiptap/pm": "^3.31.4",
104
+ "@tiptap/starter-kit": "^3.31.4",
105
105
  "@vscode/ripgrep": "^1.15.9",
106
106
  "cross-fetch": "^4.1.0",
107
107
  "exceljs": "^4.4.0",
108
108
  "fastest-levenshtein": "^1.0.16",
109
- "file-type": "^21.1.1",
110
109
  "glob": "^10.3.10",
111
110
  "highlight.js": "^11.11.1",
112
111
  "isbinaryfile": "^5.0.4",
@@ -119,7 +118,7 @@
119
118
  "remark": "^15.0.1",
120
119
  "remark-gfm": "^4.0.1",
121
120
  "remark-parse": "^11.0.0",
122
- "sharp": "^0.34.5",
121
+ "sharp": "^0.35.5",
123
122
  "tiptap-markdown": "^0.9.0",
124
123
  "unified": "^11.0.5",
125
124
  "unpdf": "^1.4.0",
@@ -148,5 +147,19 @@
148
147
  "tsx": "^4.21.0",
149
148
  "typescript": "^5.3.3",
150
149
  "ws": "^8.18.3"
150
+ },
151
+ "overrides": {
152
+ "md-to-pdf": {
153
+ "chokidar": "^4.0.3",
154
+ "gray-matter": {
155
+ "js-yaml": {
156
+ "argparse": "^2.0.1"
157
+ }
158
+ }
159
+ },
160
+ "exceljs": {
161
+ "uuid": "^11.1.1"
162
+ },
163
+ "proxy-addr": "^2.0.8"
151
164
  }
152
165
  }