@deepseek-ai/dsh-native-command 0.1.7-alpha.1 → 0.1.7-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +3 -2
- package/README.zh.md +3 -2
- package/lib/index.js +51 -18
- package/lib/types/path-opener.d.ts +4 -1
- package/lib/types/path-opener.js +59 -22
- package/package.json +3 -3
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/util/native-command/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: c9e1f3fd936093bcad334390704b97630f7acfc8
|
|
6
|
+
README.zh.md: 2c6feadbb8e09391ab5f112e0129b669f6c33127
|
package/README.md
CHANGED
|
@@ -45,9 +45,9 @@ The `NativeCommandRunner` type is the injectable command boundary for host integ
|
|
|
45
45
|
|
|
46
46
|
### Opening a Host path
|
|
47
47
|
|
|
48
|
-
`openNativePath(path, signal)` hands a path to the default application and prefers the named default browser for HTML and SVG where the platform can identify one. `openNativeAssociatedPath(path, signal)` always uses the file-type association, without a browser override. `openNativeTextFile(path, signal)` selects text-editor intent; on macOS it uses `open -t`. WSL paths are translated with `wslpath -w` before the Windows desktop receives them. `canOpenNativePath()` reports whether the current Host plausibly has a desktop target.
|
|
48
|
+
`openNativePath(path, signal)` hands a path to the default application and prefers the named default browser for HTML and SVG where the platform can identify one. `openNativeAssociatedPath(path, signal)` always uses the file-type association, without a browser override. `openNativeTextFile(path, signal)` selects text-editor intent; on macOS it uses `open -t`. Windows hands every intent to Explorer, so the shell's own default-application resolution — the one a double-click uses — picks the application; Explorer receives the target as an encoded file URI and its exit code 1 counts as a delegated handoff, while cancellation, missing executables, and other exit codes still reject. This acknowledgement does not prove that an application opened the file. WSL paths are translated with `wslpath -w` before the Windows desktop receives them. `canOpenNativePath()` reports whether the current Host plausibly has a desktop target.
|
|
49
49
|
|
|
50
|
-
`revealNativePath(path, signal)` selects the file in Finder or Explorer, including WSL path translation, and opens its parent directory through `xdg-open` on desktop Linux. `nativeFileManager()` identifies that action for Host-derived UI labels; desktop availability remains a separate `canOpenNativePath()` check. Callers must authorize the absolute file path before invoking either operation. Platform dispatch is covered by injected-runner tests; native desktop verification belongs to the corresponding platform. Explorer receives an encoded file URI as a separate argument. Its exit code 1 is accepted as a delegated handoff; cancellation, missing executables, and other exit codes still reject. This acknowledgement does not prove that a
|
|
50
|
+
`revealNativePath(path, signal)` selects the file in Finder or Explorer, including WSL path translation, and opens its parent directory through `xdg-open` on desktop Linux. `nativeFileManager()` identifies that action for Host-derived UI labels; desktop availability remains a separate `canOpenNativePath()` check. Callers must authorize the absolute file path before invoking either operation. Platform dispatch is covered by injected-runner tests; native desktop verification belongs to the corresponding platform. Explorer receives an encoded file URI as a separate argument. Its exit code 1 is accepted as a delegated handoff; cancellation, missing executables, and other exit codes still reject. This acknowledgement does not prove that an application opened the file or that a window selected it.
|
|
51
51
|
|
|
52
52
|
`nativeFileApplications(path, signal)` returns registered applications, localized names, icons, and the current default. macOS 12 and later use LaunchServices; Windows uses Shell association handlers; Linux uses GIO with shared XDG desktop-entry and icon lookup. On macOS, copies sharing a bundle identifier and display name (staged self-updates, per-version installs) collapse to the system default, else the highest version; deliberate side-by-side installs keep distinct display names and both entries. `openNativeFileApplication(path, application, signal)` revalidates the handler against the complete registered list, so copies collapsed out of the display list stay openable, and never changes the system default. Windows delegates invocation to the Shell, and Linux delegates argument expansion to `gio launch`. WSL translates the path and uses the Windows adapter. Callers authorize the local file path. Native integration tests use private Windows file associations and Linux XDG roots on their respective platforms.
|
|
53
53
|
|
|
@@ -109,6 +109,7 @@ Linux association discovery and explicit launching require GIO. Missing native c
|
|
|
109
109
|
These limits define when this runner is not the right tool. They are current package constraints, not a task backlog.
|
|
110
110
|
|
|
111
111
|
- Command output uses Node’s `execFile` buffer limit; oversized replies reject. Use the subprocess capability for streaming output.
|
|
112
|
+
- A Windows host needs an interactive desktop session. In a non-interactive session — a service, or a scheduled task without an interactive logon — `explorer.exe` invokes no file association and still exits 1 after about a second (an SSH session 0 on Windows 11 ARM64 build 26200), so an open reports success having opened nothing; a caller's abort signal turns that wait into a timeout rather than a hang. An `Invoke-Item` command resolves the association in-process there, and its directory failure arrives as a non-zero exit code. No fallback for that session is implemented.
|
|
112
113
|
|
|
113
114
|
<a id="dev-note"></a>
|
|
114
115
|
### Dev Note
|
package/README.zh.md
CHANGED
|
@@ -45,9 +45,9 @@ const { stdout, stderr } = await runNativeCommand('osascript', ['-e', script], s
|
|
|
45
45
|
|
|
46
46
|
### 打开 Host 路径
|
|
47
47
|
|
|
48
|
-
`openNativePath(path, signal)` 将路径交给默认应用;平台能够确定默认浏览器时,HTML 与 SVG 会优先交给该浏览器。`openNativeAssociatedPath(path, signal)` 始终使用文件类型关联,不覆盖为浏览器。`openNativeTextFile(path, signal)` 选择文本编辑器意图;macOS 使用 `open -t`。WSL 路径先通过 `wslpath -w` 转换,再交给 Windows 桌面。`canOpenNativePath()` 报告当前 Host 是否可能具备桌面目标。
|
|
48
|
+
`openNativePath(path, signal)` 将路径交给默认应用;平台能够确定默认浏览器时,HTML 与 SVG 会优先交给该浏览器。`openNativeAssociatedPath(path, signal)` 始终使用文件类型关联,不覆盖为浏览器。`openNativeTextFile(path, signal)` 选择文本编辑器意图;macOS 使用 `open -t`。Windows 将每种意图都交给 Explorer,由 shell 自身的默认应用解析(即双击所走的那条)选择应用;Explorer 收到的是编码后的文件 URI,其退出码 1 按已转交请求处理,取消、找不到可执行文件和其他退出码仍然报错。该确认不能证明应用已打开文件。WSL 路径先通过 `wslpath -w` 转换,再交给 Windows 桌面。`canOpenNativePath()` 报告当前 Host 是否可能具备桌面目标。
|
|
49
49
|
|
|
50
|
-
`revealNativePath(path, signal)` 在 Finder 或文件资源管理器中选中文件,包含 WSL 路径转换;在桌面 Linux 上通过 `xdg-open` 打开上层目录。`nativeFileManager()` 标识该操作,供 UI 根据 Host 选择文案;桌面是否可用仍由独立的 `canOpenNativePath()` 检查决定。调用方必须先授权绝对文件路径,再执行操作。平台分派由注入运行器的测试覆盖;原生桌面验证由对应平台负责。 Explorer 接收独立参数中的编码文件 URI。退出码 1
|
|
50
|
+
`revealNativePath(path, signal)` 在 Finder 或文件资源管理器中选中文件,包含 WSL 路径转换;在桌面 Linux 上通过 `xdg-open` 打开上层目录。`nativeFileManager()` 标识该操作,供 UI 根据 Host 选择文案;桌面是否可用仍由独立的 `canOpenNativePath()` 检查决定。调用方必须先授权绝对文件路径,再执行操作。平台分派由注入运行器的测试覆盖;原生桌面验证由对应平台负责。 Explorer 接收独立参数中的编码文件 URI。退出码 1 按已转交请求处理;取消、找不到可执行文件和其他退出码仍然报错。该确认不能证明应用已打开文件,也不能证明桌面窗口已选中文件。
|
|
51
51
|
|
|
52
52
|
`nativeFileApplications(path, signal)` 返回关联应用、本地化名称、图标和当前默认项。macOS 12 及以上版本使用 LaunchServices,Windows 使用 Shell 关联处理器,Linux 使用 GIO,并共用 XDG 桌面文件和图标读取逻辑。macOS 上 bundle 标识符与显示名都相同的多份拷贝(自更新暂存副本、按版本安装的拷贝)合并为系统默认项,否则保留最高版本;显示名不同的并存安装两项都保留。`openNativeFileApplication(path, application, signal)` 按完整的当前注册列表重新验证关联应用,展示列表中被合并掉的拷贝仍可打开,且不修改系统默认值。Windows 交给 Shell 启动应用,Linux 交给 `gio launch` 展开参数。WSL 转换路径后使用 Windows 适配器。调用方负责验证本地文件路径。原生集成测试分别在相应平台使用独立的 Windows 文件关联和 Linux XDG 目录。
|
|
53
53
|
|
|
@@ -109,6 +109,7 @@ Linux 的关联查询和指定应用启动需要 GIO。缺少原生命令时查
|
|
|
109
109
|
这些限制说明本运行器何时不是合适的工具。它们是当前包约束,不是任务积压。
|
|
110
110
|
|
|
111
111
|
- 命令输出受 Node 的 `execFile` 缓冲上限约束,超过上限时拒绝结果。流式输出由 subprocess 能力处理。
|
|
112
|
+
- Windows 主机需要交互桌面会话。在非交互会话(服务,或没有交互登录的计划任务)中,`explorer.exe` 不调用任何文件关联,且仍在约 1 秒后以退出码 1 返回(Windows 11 ARM64 build 26200 的 SSH session 0 实测),于是「打开」会报告成功却什么都没打开;调用方的 abort 信号把这段等待变成超时而不是挂死。同一目标改用 `Invoke-Item` 命令时可在该会话内解析关联,目录失败也会以非零退出码报出。该会话下的兜底尚未实现。
|
|
112
113
|
|
|
113
114
|
<a id="dev-note"></a>
|
|
114
115
|
### 开发备注
|
package/lib/index.js
CHANGED
|
@@ -44,7 +44,10 @@ const runNativeCommand = (command, args, signal) => new Promise((resolve, reject
|
|
|
44
44
|
* The default intent prefers the default browser for documents it renders when
|
|
45
45
|
* the platform can name one, then falls back to the default application. WSL
|
|
46
46
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
47
|
-
* GUI. The text-editor intent never consults the browser.
|
|
47
|
+
* GUI. The text-editor intent never consults the browser. Windows hands every
|
|
48
|
+
* intent to Explorer: the shell's own default-application resolution, the one
|
|
49
|
+
* a double-click uses, selects the application, while a process that resolves
|
|
50
|
+
* the association itself reads a narrower record and reports none.
|
|
48
51
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
49
52
|
*/
|
|
50
53
|
/** Documents a browser renders, as opposed to ones an editor merely edits. */
|
|
@@ -95,10 +98,6 @@ async function openInBrowser(path, signal, platform, run, env) {
|
|
|
95
98
|
}
|
|
96
99
|
return false;
|
|
97
100
|
}
|
|
98
|
-
/** PowerShell single-quoted literal (doubles embedded quotes). */
|
|
99
|
-
function powershellLiteral(path) {
|
|
100
|
-
return `'${path.replace(/'/g, "''")}'`;
|
|
101
|
-
}
|
|
102
101
|
/** Whether one environment marker is set to a non-empty value. */
|
|
103
102
|
function present(value) {
|
|
104
103
|
return value !== void 0 && value !== "";
|
|
@@ -109,13 +108,53 @@ function isWsl(internals) {
|
|
|
109
108
|
if (present(env.WSL_DISTRO_NAME) || present(env.WSL_INTEROP)) return true;
|
|
110
109
|
return (internals.osRelease ?? release()).toLowerCase().includes("microsoft");
|
|
111
110
|
}
|
|
112
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Encode one Windows path as the target Explorer can receive intact.
|
|
113
|
+
*
|
|
114
|
+
* Explorer parses its own command line and splits fields at commas and equals
|
|
115
|
+
* signs, so a raw path loses everything after the first separator and the shell
|
|
116
|
+
* opens a different target without reporting it; both separators are escaped.
|
|
117
|
+
* Nothing else is: Explorer rejects percent-encoded non-ASCII in a file URI and
|
|
118
|
+
* opens the user's Documents folder instead, while it resolves the literal
|
|
119
|
+
* characters, so Node's non-ASCII escapes are decoded back and its ASCII escapes
|
|
120
|
+
* stand. Node resolves the path before encoding it, so a verbatim `\\?\` or
|
|
121
|
+
* `\\?\UNC\` prefix reaches Explorer as the ordinary drive or UNC URI; a `\\.\`
|
|
122
|
+
* device path keeps that same UNC handling and names a device rather than a
|
|
123
|
+
* shell item, which this opener does not open.
|
|
124
|
+
* @param windowsPath - path already translated for the Windows desktop.
|
|
125
|
+
* @returns the target for an open, or the object of a `/select,` reveal.
|
|
126
|
+
*/
|
|
127
|
+
function explorerTarget(windowsPath) {
|
|
128
|
+
return pathToFileURL(windowsPath, { windows: true }).href.replace(/(?:%[89A-F][0-9A-F])+/gi, (escaped) => decodeURIComponent(escaped)).replaceAll(",", "%2C").replaceAll("=", "%3D");
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Hand one target to Explorer, accepting its delegated-handoff exit code.
|
|
132
|
+
*
|
|
133
|
+
* Explorer exits 1 after handing the request to the desktop process already
|
|
134
|
+
* running, so exit 1 means the shell took it. Every other failure still
|
|
135
|
+
* rejects, and cancellation wins over a delegate's exit 1.
|
|
136
|
+
* @param args - Explorer argv: the encoded target alone to open it, or `/select,<encoded target>` to reveal it.
|
|
137
|
+
* @param signal - caller lifetime; abort terminates the command.
|
|
138
|
+
* @param run - shell-free command runner.
|
|
139
|
+
* @throws The runner's failure unless it is Explorer's delegate exit 1.
|
|
140
|
+
*/
|
|
141
|
+
async function runExplorer(args, signal, run) {
|
|
142
|
+
try {
|
|
143
|
+
await run("explorer.exe", args, signal);
|
|
144
|
+
} catch (error) {
|
|
145
|
+
signal.throwIfAborted();
|
|
146
|
+
if (!(error instanceof Error) || !("code" in error) || error.code !== 1) throw error;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Open one Windows-resolvable path through Explorer, the shell that owns the
|
|
151
|
+
* default-application resolution a double-click uses.
|
|
152
|
+
* @param path - Windows-resolvable path; Explorer receives its encoded file URI as one argv element, never a command string.
|
|
153
|
+
* @param signal - caller lifetime; abort terminates the command.
|
|
154
|
+
* @param run - shell-free command runner.
|
|
155
|
+
*/
|
|
113
156
|
async function openWindowsPath(path, signal, run) {
|
|
114
|
-
await
|
|
115
|
-
"-NoProfile",
|
|
116
|
-
"-Command",
|
|
117
|
-
`Invoke-Item -LiteralPath ${powershellLiteral(path)}`
|
|
118
|
-
], signal);
|
|
157
|
+
await runExplorer([explorerTarget(path)], signal, run);
|
|
119
158
|
}
|
|
120
159
|
/** Translate a WSL path before handing it to the Windows desktop. */
|
|
121
160
|
async function openWslPath(path, signal, run) {
|
|
@@ -236,13 +275,7 @@ async function revealNativePath(path, signal, internals = {}) {
|
|
|
236
275
|
windowsPath = translated.stdout.replace(/[\r\n]+$/, "");
|
|
237
276
|
if (windowsPath === "") throw new Error("wslpath returned no Windows path");
|
|
238
277
|
}
|
|
239
|
-
|
|
240
|
-
try {
|
|
241
|
-
await run("explorer.exe", ["/select,", target], signal);
|
|
242
|
-
} catch (error) {
|
|
243
|
-
signal.throwIfAborted();
|
|
244
|
-
if (!(error instanceof Error) || !("code" in error) || error.code !== 1) throw error;
|
|
245
|
-
}
|
|
278
|
+
await runExplorer(["/select,", explorerTarget(windowsPath)], signal, run);
|
|
246
279
|
return;
|
|
247
280
|
}
|
|
248
281
|
if (manager === "directory") {
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* The default intent prefers the default browser for documents it renders when
|
|
6
6
|
* the platform can name one, then falls back to the default application. WSL
|
|
7
7
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
8
|
-
* GUI. The text-editor intent never consults the browser.
|
|
8
|
+
* GUI. The text-editor intent never consults the browser. Windows hands every
|
|
9
|
+
* intent to Explorer: the shell's own default-application resolution, the one
|
|
10
|
+
* a double-click uses, selects the application, while a process that resolves
|
|
11
|
+
* the association itself reads a narrower record and reports none.
|
|
9
12
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
10
13
|
*/
|
|
11
14
|
import { type NativeCommandRunner } from './runner.ts';
|
package/lib/types/path-opener.js
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* The default intent prefers the default browser for documents it renders when
|
|
6
6
|
* the platform can name one, then falls back to the default application. WSL
|
|
7
7
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
8
|
-
* GUI. The text-editor intent never consults the browser.
|
|
8
|
+
* GUI. The text-editor intent never consults the browser. Windows hands every
|
|
9
|
+
* intent to Explorer: the shell's own default-application resolution, the one
|
|
10
|
+
* a double-click uses, selects the application, while a process that resolves
|
|
11
|
+
* the association itself reads a narrower record and reports none.
|
|
9
12
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
10
13
|
*/
|
|
11
14
|
import { release as osRelease } from 'node:os';
|
|
@@ -61,10 +64,6 @@ async function openInBrowser(path, signal, platform, run, env) {
|
|
|
61
64
|
// .html association is the browser in the ordinary case.
|
|
62
65
|
return false;
|
|
63
66
|
}
|
|
64
|
-
/** PowerShell single-quoted literal (doubles embedded quotes). */
|
|
65
|
-
function powershellLiteral(path) {
|
|
66
|
-
return `'${path.replace(/'/g, "''")}'`;
|
|
67
|
-
}
|
|
68
67
|
/** Whether one environment marker is set to a non-empty value. */
|
|
69
68
|
function present(value) {
|
|
70
69
|
return value !== undefined && value !== '';
|
|
@@ -76,13 +75,61 @@ function isWsl(internals) {
|
|
|
76
75
|
return true;
|
|
77
76
|
return (internals.osRelease ?? osRelease()).toLowerCase().includes('microsoft');
|
|
78
77
|
}
|
|
79
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Encode one Windows path as the target Explorer can receive intact.
|
|
80
|
+
*
|
|
81
|
+
* Explorer parses its own command line and splits fields at commas and equals
|
|
82
|
+
* signs, so a raw path loses everything after the first separator and the shell
|
|
83
|
+
* opens a different target without reporting it; both separators are escaped.
|
|
84
|
+
* Nothing else is: Explorer rejects percent-encoded non-ASCII in a file URI and
|
|
85
|
+
* opens the user's Documents folder instead, while it resolves the literal
|
|
86
|
+
* characters, so Node's non-ASCII escapes are decoded back and its ASCII escapes
|
|
87
|
+
* stand. Node resolves the path before encoding it, so a verbatim `\\?\` or
|
|
88
|
+
* `\\?\UNC\` prefix reaches Explorer as the ordinary drive or UNC URI; a `\\.\`
|
|
89
|
+
* device path keeps that same UNC handling and names a device rather than a
|
|
90
|
+
* shell item, which this opener does not open.
|
|
91
|
+
* @param windowsPath - path already translated for the Windows desktop.
|
|
92
|
+
* @returns the target for an open, or the object of a `/select,` reveal.
|
|
93
|
+
*/
|
|
94
|
+
function explorerTarget(windowsPath) {
|
|
95
|
+
const href = pathToFileURL(windowsPath, { windows: true }).href;
|
|
96
|
+
// A run of escapes whose every byte starts above ASCII is one non-ASCII character.
|
|
97
|
+
return href
|
|
98
|
+
.replace(/(?:%[89A-F][0-9A-F])+/gi, escaped => decodeURIComponent(escaped))
|
|
99
|
+
.replaceAll(',', '%2C')
|
|
100
|
+
.replaceAll('=', '%3D');
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Hand one target to Explorer, accepting its delegated-handoff exit code.
|
|
104
|
+
*
|
|
105
|
+
* Explorer exits 1 after handing the request to the desktop process already
|
|
106
|
+
* running, so exit 1 means the shell took it. Every other failure still
|
|
107
|
+
* rejects, and cancellation wins over a delegate's exit 1.
|
|
108
|
+
* @param args - Explorer argv: the encoded target alone to open it, or `/select,<encoded target>` to reveal it.
|
|
109
|
+
* @param signal - caller lifetime; abort terminates the command.
|
|
110
|
+
* @param run - shell-free command runner.
|
|
111
|
+
* @throws The runner's failure unless it is Explorer's delegate exit 1.
|
|
112
|
+
*/
|
|
113
|
+
async function runExplorer(args, signal, run) {
|
|
114
|
+
try {
|
|
115
|
+
await run('explorer.exe', args, signal);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
signal.throwIfAborted();
|
|
119
|
+
// Explorer can exit 1 after delegating to the existing desktop process.
|
|
120
|
+
if (!(error instanceof Error) || !('code' in error) || error.code !== 1)
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Open one Windows-resolvable path through Explorer, the shell that owns the
|
|
126
|
+
* default-application resolution a double-click uses.
|
|
127
|
+
* @param path - Windows-resolvable path; Explorer receives its encoded file URI as one argv element, never a command string.
|
|
128
|
+
* @param signal - caller lifetime; abort terminates the command.
|
|
129
|
+
* @param run - shell-free command runner.
|
|
130
|
+
*/
|
|
80
131
|
async function openWindowsPath(path, signal, run) {
|
|
81
|
-
await
|
|
82
|
-
'-NoProfile',
|
|
83
|
-
'-Command',
|
|
84
|
-
`Invoke-Item -LiteralPath ${powershellLiteral(path)}`,
|
|
85
|
-
], signal);
|
|
132
|
+
await runExplorer([explorerTarget(path)], signal, run);
|
|
86
133
|
}
|
|
87
134
|
/** Translate a WSL path before handing it to the Windows desktop. */
|
|
88
135
|
async function openWslPath(path, signal, run) {
|
|
@@ -208,17 +255,7 @@ export async function revealNativePath(path, signal, internals = {}) {
|
|
|
208
255
|
if (windowsPath === '')
|
|
209
256
|
throw new Error('wslpath returned no Windows path');
|
|
210
257
|
}
|
|
211
|
-
|
|
212
|
-
const target = pathToFileURL(windowsPath, { windows: true }).href.replaceAll(',', '%2C');
|
|
213
|
-
try {
|
|
214
|
-
await run('explorer.exe', ['/select,', target], signal);
|
|
215
|
-
}
|
|
216
|
-
catch (error) {
|
|
217
|
-
signal.throwIfAborted();
|
|
218
|
-
// Explorer can exit 1 after delegating to the existing desktop process.
|
|
219
|
-
if (!(error instanceof Error) || !('code' in error) || error.code !== 1)
|
|
220
|
-
throw error;
|
|
221
|
-
}
|
|
258
|
+
await runExplorer(['/select,', explorerTarget(windowsPath)], signal, run);
|
|
222
259
|
return;
|
|
223
260
|
}
|
|
224
261
|
if (manager === 'directory') {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-native-command",
|
|
3
3
|
"description": "Host-native command and path-opening utilities with shell-free execution, cancellation, desktop detection, and WSL handoff",
|
|
4
|
-
"version": "0.1.7-
|
|
4
|
+
"version": "0.1.7-rc.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/cordis": "
|
|
35
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@deepseek-ai/cordis": "
|
|
38
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
39
39
|
}
|
|
40
40
|
}
|