@michengai/dsh-archive-manager 0.1.26 → 0.1.27

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/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  Published release notes are retained below; new versions are added without removing earlier entries.
6
6
 
7
+ ## 0.1.27 — 2026-09-03
8
+
9
+ - Moved the sole maintained source into `src` and atomically generate the publishable `lib` directory with esbuild. A failed build preserves the previous output so local installation remains usable.
10
+ - Added generated-output synchronization checks and failed-build regression coverage, and unified CI and prepublish validation under `pnpm verify`.
11
+
7
12
  ## 0.1.26 — 2026-09-03
8
13
 
9
14
  - Fixed the Windows CI host-test fixture to use the same native realpath representation as DSH's asynchronous session-path index, preventing valid workspace sessions from being filtered out only in the test environment.
@@ -4,6 +4,11 @@
4
4
 
5
5
  以下发布说明会持续保留;新增版本时不再删除较早记录。
6
6
 
7
+ ## 0.1.27 — 2026-09-03
8
+
9
+ - 将唯一可维护源码迁入 `src`,以 esbuild 原子生成发布目录 `lib`;构建失败时保留原有产物,避免本地安装路径被破坏。
10
+ - 新增发布产物同步检查、构建失败回归测试,并将 CI 与发布前验证统一为 `pnpm verify`。
11
+
7
12
  ## 0.1.26 — 2026-09-03
8
13
 
9
14
  - 修复 Windows CI 宿主测试夹具:改用与 DSH 异步会话路径索引一致的原生 `realpath` 表示,避免有效工作区会话仅在测试环境被路径成员校验过滤。
package/README.md CHANGED
@@ -148,38 +148,35 @@ If the entry is missing after installation or upgrade, restart DSH Web and hard-
148
148
 
149
149
  ## Secondary development
150
150
 
151
- This repository has no `src` directory. `lib` is directly maintained runtime source, which is its current layout rather than the recommended layout for new plugins. New plugins should prefer `src` built to `lib`.
151
+ `src` is the sole maintained source directory. `pnpm build` uses esbuild to compile it into publishable `lib` output. Do not edit `lib` directly because the next build overwrites it.
152
152
 
153
- - [lib\index.js](lib/index.js): host service entry point.
154
- - [lib\workspace.js](lib/workspace.js): archived-session and workspace service.
155
- - [lib\projcache.js](lib/projcache.js): session projection cache.
156
- - [lib\client.js](lib/client.js): Settings page and archive UI.
153
+ - [src\index.js](src/index.js): host service entry point.
154
+ - [src\workspace.js](src/workspace.js): archived-session and workspace service.
155
+ - [src\projcache.js](src/projcache.js): session projection cache.
156
+ - [src\client.js](src/client.js): Settings page and archive UI.
157
157
  - `test\*.test.mjs`: host, client, Remote, and styling coverage.
158
158
 
159
- After changing the runtime source, validate, test, and install from the local directory:
159
+ After changing `src`, run the tests, confirm that generated `lib` output is committed with the source, then install from the local directory:
160
160
 
161
161
  ```powershell
162
162
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
163
163
  $OutputEncoding = [System.Text.Encoding]::UTF8
164
- pnpm build
165
164
  pnpm test
166
165
  pnpm pack:check
167
166
  dsh plugin --profile web add .
168
167
  ```
169
168
 
170
- `pnpm build` validates package integrity; it does not compile `lib` into another directory.
169
+ `pnpm test` runs `pnpm build` first. The build generates all `lib` output from `src` in a temporary directory, then atomically replaces the previous output only after a successful build. A failed build preserves the existing `lib`.
171
170
 
172
171
  ## Validation
173
172
 
174
173
  ```powershell
175
174
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
176
175
  $OutputEncoding = [System.Text.Encoding]::UTF8
177
- pnpm build
178
- pnpm test
179
- pnpm pack:check
176
+ pnpm verify
180
177
  ```
181
178
 
182
- `prepublishOnly` runs the build check and tests before publishing.
179
+ `prepublishOnly` runs the full verification suite before publishing and verifies that committed `lib` output matches the current `src` build.
183
180
 
184
181
  ## License
185
182
 
package/README.zh-CN.md CHANGED
@@ -148,38 +148,35 @@ dsh --profile web --dump-config
148
148
 
149
149
  ## 二次开发
150
150
 
151
- 当前仓库未提供 `src` 源目录,`lib` 是直接维护的运行源码;这是当前仓库的实现方式,不是新插件的推荐布局。新插件建议使用 `src` 开发并构建到 `lib`:
151
+ `src` 是唯一可维护源码目录,`pnpm build` 使用 esbuild 将其编译为可发布的 `lib`。请勿直接修改 `lib`,否则下次构建会覆盖改动:
152
152
 
153
- - [lib\index.js](lib/index.js):客户端插件 Host 服务入口。
154
- - [lib\workspace.js](lib/workspace.js):归档会话和工作区服务实现。
155
- - [lib\projcache.js](lib/projcache.js):会话投影缓存实现。
156
- - [lib\client.js](lib/client.js):设置页和归档会话界面。
153
+ - [src\index.js](src/index.js):客户端插件 Host 服务入口。
154
+ - [src\workspace.js](src/workspace.js):归档会话和工作区服务实现。
155
+ - [src\projcache.js](src/projcache.js):会话投影缓存实现。
156
+ - [src\client.js](src/client.js):设置页和归档会话界面。
157
157
  - `test\*.test.mjs`:Host、客户端、Remote 和样式边界测试。
158
158
 
159
- 修改后运行检查、测试并用本地目录重新安装:
159
+ 修改 `src` 后,执行测试并确认生成的 `lib` 与 `src` 一同提交,再用本地目录重新安装:
160
160
 
161
161
  ```powershell
162
162
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
163
163
  $OutputEncoding = [System.Text.Encoding]::UTF8
164
- pnpm build
165
164
  pnpm test
166
165
  pnpm pack:check
167
166
  dsh plugin --profile web add .
168
167
  ```
169
168
 
170
- `pnpm build` 负责发布包完整性检查,不会将 `lib` 重新编译为其他目录。
169
+ `pnpm test` 会先执行 `pnpm build`。构建在临时目录中从 `src` 生成全部 `lib` 产物;仅在生成成功后才原子替换旧产物,构建失败时会保留旧的 `lib`。
171
170
 
172
171
  ## 验证
173
172
 
174
173
  ```powershell
175
174
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
176
175
  $OutputEncoding = [System.Text.Encoding]::UTF8
177
- pnpm build
178
- pnpm test
179
- pnpm pack:check
176
+ pnpm verify
180
177
  ```
181
178
 
182
- `prepublishOnly` 会在发布前执行构建检查与测试。
179
+ `prepublishOnly` 会在发布前执行完整验证,并确认提交的 `lib` 与当前 `src` 构建结果一致。
183
180
 
184
181
  ## 许可证
185
182