dsh-zterm 0.0.0-stage → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,88 @@
1
1
  {
2
2
  "name": "dsh-zterm",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.13",
4
+ "description": "zTerm:SSH、JumpServer、真实机器读工具与人类开启的读写操作",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/guhanfei-ai/dsh-zterm.git"
10
+ },
11
+ "homepage": "https://github.com/guhanfei-ai/dsh-zterm#readme",
12
+ "bugs": "https://github.com/guhanfei-ai/dsh-zterm/issues",
13
+ "main": "lib/index.js",
14
+ "exports": {
15
+ ".": "./lib/index.js",
16
+ "./client": "./lib/client.js",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "lib",
21
+ "cordis.patch.yml",
22
+ "LICENSE",
23
+ "THIRD_PARTY_NOTICES.md",
24
+ "README.md",
25
+ "USERGUIDE.zh-CN.md",
26
+ "scripts/prepare-native.mjs"
27
+ ],
28
+ "engines": {
29
+ "node": ">=22"
30
+ },
31
+ "scripts": {
32
+ "build": "node scripts/build.mjs",
33
+ "typecheck": "tsc --noEmit",
34
+ "test": "vitest run",
35
+ "verify": "npm run typecheck && npm test && npm run build",
36
+ "check:package": "node scripts/check-package.mjs",
37
+ "postinstall": "node scripts/prepare-native.mjs"
38
+ },
39
+ "dependencies": {
40
+ "@deepseek-ai/schemastery": "3.18.4",
41
+ "@sinclair/typebox": "0.34.41",
42
+ "@xterm/addon-fit": "0.10.0",
43
+ "@xterm/addon-search": "0.15.0",
44
+ "@xterm/xterm": "5.5.0",
45
+ "ssh2": "1.17.0"
46
+ },
47
+ "optionalDependencies": {
48
+ "node-pty": "1.1.0"
49
+ },
50
+ "peerDependencies": {
51
+ "@deepseek-ai/dsh-tools": "^0.2.0-alpha.0",
52
+ "dsh-better-sidebar": ">=0.24.0"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "@deepseek-ai/dsh-tools": {
56
+ "optional": true
57
+ },
58
+ "dsh-better-sidebar": {
59
+ "optional": true
60
+ }
61
+ },
62
+ "devDependencies": {
63
+ "@types/node": "^24.0.0",
64
+ "@types/react": "^18.3.0",
65
+ "@types/react-dom": "^18.3.7",
66
+ "@types/ssh2": "^1.15.0",
67
+ "esbuild": "0.25.12",
68
+ "react": "18.3.1",
69
+ "react-dom": "18.3.1",
70
+ "typescript": "^5.6.3",
71
+ "vitest": "^4.1.9"
72
+ },
73
+ "dsh": {
74
+ "bundle": {
75
+ "patch": "./cordis.patch.yml"
76
+ },
77
+ "client": {
78
+ "platform": "web"
79
+ }
80
+ },
81
+ "allowScripts": {
82
+ "esbuild@0.25.12": true,
83
+ "esbuild@0.28.2": true,
84
+ "node-pty@1.1.0": true,
85
+ "ssh2@1.17.0": true,
86
+ "cpu-features@0.0.10": true
87
+ }
88
+ }
@@ -0,0 +1,16 @@
1
+ import { createRequire } from 'node:module'
2
+ import { dirname, join, relative, isAbsolute } from 'node:path'
3
+ import { existsSync, realpathSync, lstatSync, chmodSync } from 'node:fs'
4
+ // node-pty 1.1.0 的 macOS 预编译辅助程序可能以 0644 分发;只修复该依赖内的辅助程序。
5
+ if (process.platform === 'darwin') {
6
+ const require = createRequire(import.meta.url)
7
+ let packagePath
8
+ try { packagePath = require.resolve('node-pty/package.json') } catch { process.exit(0) }
9
+ const root = realpathSync(dirname(packagePath))
10
+ for (const candidate of [join(root, 'prebuilds', `darwin-${process.arch}`, 'spawn-helper'), join(root, 'build', 'Release', 'spawn-helper')]) {
11
+ if (!existsSync(candidate)) continue
12
+ const info = lstatSync(candidate), resolved = realpathSync(candidate), inside = relative(root, resolved)
13
+ if (!info.isFile() || info.isSymbolicLink() || inside.startsWith('..') || isAbsolute(inside)) throw new Error('node-pty 辅助程序路径无效')
14
+ if (!(info.mode & 0o111)) { chmodSync(candidate, info.mode | 0o111); console.log('Prepared node-pty macOS spawn-helper executable permission.') }
15
+ }
16
+ }