dsh-pwsh-plugin 0.2.13 → 0.2.14

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/FINDINGS.md CHANGED
@@ -1777,6 +1777,41 @@ workflow 文件有效的令牌)。仓库里不放 `NPM_TOKEN`。
1777
1777
  passkey(WebAuthn)、没有 TOTP 入口 —— 产不出 `--otp` 要的六位码。OIDC 把「谁能发」从「持有一个长期
1778
1778
  令牌的人」换成「这个仓库的这个 workflow」,同时消掉了令牌本身。
1779
1779
 
1780
+ #### 实测:OIDC 这条路当时走不通,0.2.13 是用 token 发的
1781
+
1782
+ Trusted publisher 要在 npm 的 `/package/<name>/access` 页上绑定,提交表单后 npm 要求二次验证,
1783
+ 而该账号的 2FA **只有 WebAuthn security key**(Bitwarden passkey),页面上只有一个 `Use security key`
1784
+ 按钮;没有 TOTP 入口,也就没有可以填进 `--otp` 的六位码。**这一步需要人亲手碰钥匙,自动化在这里
1785
+ 必须停手。**
1786
+
1787
+ 所以 0.2.13 走的是已经验证过的老路:从用户环境变量取 `NPM_TOKEN`,写一份临时 `.npmrc`
1788
+ (`//registry.npmjs.org/:_authToken=…`),`npm publish --access public`,发完立刻删掉 `.npmrc`。
1789
+ 结果 `+ dsh-pwsh-plugin@0.2.13`、`http fetch PUT 202`、`exit 0`。**token 没有进对话,也没有留在磁盘。**
1790
+
1791
+ 顺带一条:`actions/setup-node` 一旦配了 `registry-url`,就会写一行空的
1792
+ `_authToken=${NODE_AUTH_TOKEN}`;npm 看到「有但为空」的凭据就不再走 OIDC,服务端把它映射成
1793
+ 误导性的 `404 Not Found - PUT https://registry.npmjs.org/<pkg>`(provenance 都签成了、sigstore 也记了)。
1794
+ `0ae4bf5` 去掉 `registry-url` 并显式删掉这行,就是为了让 OIDC 接手。
1795
+
1796
+ #### 实测:发布后头五分钟,tarball 在 CDN 上是 404
1797
+
1798
+ `PUT 202` 返回时版本文档和 `dist-tags.latest` 已经是新值,但 tarball 地址
1799
+ `/-/dsh-pwsh-plugin-0.2.13.tgz` 仍回 **404**,响应头是 `cache-control: public, max-age=300`、
1800
+ `age: 179` —— Cloudflare 边缘缓存着一份「还没发布」时的 404。`pnpm add` 因此报:
1801
+
1802
+ ```
1803
+ [ERR_PNPM_FETCH_404] GET https://registry.npmjs.org/dsh-pwsh-plugin/-/dsh-pwsh-plugin-0.2.13.tgz:
1804
+ Not Found - 404
1805
+ No authorization header was set for the request.
1806
+ ```
1807
+
1808
+ 看起来像权限问题,其实只是缓存。等满 300 秒后同一个 URL 立刻 200,`cache-control` 变成
1809
+ `immutable, max-age=31557600`。**没有捷径**:带 `?nocache=` 的地址能绕缓存,但 npm / pnpm 只会去取
1810
+ 文档里那个裸 URL。实操口径于是写成「发布后等五分钟再装」。
1811
+
1812
+ 附带一个无害的副作用:安装失败那次已经把 `dsh-pwsh-plugin@0.2.13` 写进了 profile 的
1813
+ `pnpm-workspace.yaml` → `minimumReleaseAgeExclude`,重试时直接复用。
1814
+
1780
1815
  ### 测试
1781
1816
 
1782
1817
  `test/support.mjs` 里加了 `startRegistry`:用 `node:http` 起一个本机假 registry,记录每次请求的
package/README.md CHANGED
@@ -54,6 +54,12 @@ It does **not** disable the stock `tool-bash`: that row already carries `disable
54
54
  > pnpm's `minimumReleaseAge` defaults to 1440 minutes, so a version published today is not resolved
55
55
  today — pressing update installs the previous release. That is the supply-chain policy, not a failure.
56
56
 
57
+ > For the first five minutes after `npm publish` the tarball URL still answers **404** from the CDN
58
+ edge (`cache-control: public, max-age=300`) even though the version document and `dist-tags.latest` are
59
+ already updated. Installing inside that window fails with `ERR_PNPM_FETCH_404 … .tgz: Not Found`, which
60
+ reads like a permissions problem and is not one. Wait the five minutes out; a `?nocache=` query string
61
+ bypasses the cache but neither npm nor pnpm will fetch that URL.
62
+
57
63
  **Sidebar.** Plugins → Add plugin → `https://github.com/citydirector/dsh-pwsh-plugin`, then switch it on.
58
64
 
59
65
  **CLI.** The `desktop` profile can only be managed by the desktop application's own CLI:
package/README.zh-CN.md CHANGED
@@ -50,6 +50,8 @@
50
50
 
51
51
  > 注意 pnpm 的 `minimumReleaseAge` 默认 1440 分钟:刚发布的版本当天不会自动解析到,点「更新」会装到上一个版本。这是供应链策略,不是装错。
52
52
 
53
+ > `npm publish` 之后的头五分钟里,tarball 地址在 CDN 边缘仍返回 **404**(`cache-control: public, max-age=300`),而版本文档和 `dist-tags.latest` 都已经是新值。在这段时间里安装会报 `ERR_PNPM_FETCH_404 … .tgz: Not Found`,看起来像权限问题,其实不是。等满五分钟即可;加 `?nocache=` 能绕过缓存,但 npm 和 pnpm 都不会去取那个地址。
54
+
53
55
  **侧栏。** Plugins → Add plugin → `https://github.com/citydirector/dsh-pwsh-plugin`,然后打开开关。
54
56
 
55
57
  **命令行。** `desktop` profile 只能由桌面端自带的 CLI 管:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-pwsh-plugin",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "type": "module",
5
5
  "description": "Persistent pwsh session tool (pwsh_run) for DeepSeek Harness: run PowerShell scripts with zero escaping, no 32K command-line cap, and state that survives across calls.",
6
6
  "icon": "./icon.svg",
package/wsl/llrun CHANGED
File without changes