dsh-session-ops 0.1.4 → 0.2.0
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.md +7 -3
- package/README.zh.md +7 -3
- package/lib/admin.js +723 -774
- package/lib/client.js +1767 -2065
- package/lib/engine.js +181 -182
- package/lib/index.js +125 -166
- package/lib/memory.js +137 -132
- package/lib/move.js +630 -644
- package/lib/sessionlog.js +2 -18
- package/lib/store/frames.js +183 -170
- package/lib/store/host.js +41 -42
- package/lib/store/http.js +64 -59
- package/lib/store/index.js +5 -6
- package/lib/store/paths.js +79 -76
- package/lib/store/registry.js +100 -89
- package/lib/store/util.js +19 -0
- package/lib/types/admin.d.ts +187 -0
- package/lib/types/engine.d.ts +136 -0
- package/lib/types/index.d.ts +281 -0
- package/lib/types/memory.d.ts +106 -0
- package/lib/types/move.d.ts +272 -0
- package/lib/types/sessionlog.d.ts +14 -0
- package/lib/types/store/frames.d.ts +128 -0
- package/lib/types/store/host.d.ts +88 -0
- package/lib/types/store/http.d.ts +105 -0
- package/lib/types/store/index.d.ts +30 -0
- package/lib/types/store/paths.d.ts +100 -0
- package/lib/types/store/registry.d.ts +206 -0
- package/lib/types/store/util.d.ts +16 -0
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -107,11 +107,15 @@ import { projectKey, readSessionHeader, hasZstd } from 'dsh-session-ops/store'
|
|
|
107
107
|
## Development
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
|
-
npm
|
|
110
|
+
npm run build # host tsc (src/ -> lib/, lib/types/), client tsc (client/ -> .client-build/),
|
|
111
|
+
# then scripts/build-client.mts emits the browser bundle to lib/client.js
|
|
112
|
+
npm test # build, then node --test on test/**/*.test.ts (Node >= 24 runs TS natively)
|
|
111
113
|
```
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
script
|
|
115
|
+
All hand-written code is TypeScript now: host code in `src/`, the browser half in `client/`
|
|
116
|
+
(a plain classic-script IIFE for `window.__ModuleLoader__`, so it is emitted as one file rather
|
|
117
|
+
than bundled). `lib/**/*.js` and `lib/types/` are build output committed with the repo (so a
|
|
118
|
+
checkout/profile install works without a build); `test/*.ts` is run directly by Node, never emitted.
|
|
115
119
|
|
|
116
120
|
## License
|
|
117
121
|
|
package/README.zh.md
CHANGED
|
@@ -100,11 +100,15 @@ import { projectKey, readSessionHeader, hasZstd } from 'dsh-session-ops/store'
|
|
|
100
100
|
## 开发
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
npm
|
|
103
|
+
npm run build # 宿主 tsc(src/ -> lib/、lib/types/)、浏览器 tsc(client/ -> .client-build/),
|
|
104
|
+
# 再由 scripts/build-client.mts 产出 lib/client.js
|
|
105
|
+
npm test # 先 build,再用 node --test 跑 test/**/*.test.ts(Node ≥24 原生执行 TS)
|
|
104
106
|
```
|
|
105
107
|
|
|
106
|
-
`
|
|
107
|
-
|
|
108
|
+
手写代码现在全是 TypeScript:宿主在 `src/`,浏览器半边在 `client/`(给
|
|
109
|
+
`window.__ModuleLoader__` 用的经典脚本 IIFE,按单文件发射、不打包)。
|
|
110
|
+
`lib/**/*.js` 与 `lib/types/` 是随仓库入库的构建产物(checkout / profile 安装不先 build 也能用);
|
|
111
|
+
`test/*.ts` 由 Node 直接执行,不参与发射。
|
|
108
112
|
|
|
109
113
|
## License
|
|
110
114
|
|