repoctl 5.8.1 → 5.9.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 +22 -0
- package/README.zh-CN.md +22 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,6 +52,28 @@ If an older release PR omits these packages, upgrade the tool and lockfile on yo
|
|
|
52
52
|
pnpm add -Dw repoctl@^5.8.0
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
## Sync published packages to npmmirror
|
|
56
|
+
|
|
57
|
+
Use the HTTP API directly; cnpm is not required.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pnpm exec repo release sync-npmmirror --all
|
|
61
|
+
pnpm exec repo release sync-npmmirror --package repoctl --version 5.8.1
|
|
62
|
+
pnpm exec repo release sync-npmmirror --all --dry-run
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Choose exactly one of `--all`, `--package <name>`, or `--published`. With no explicit version, manual commands use the versions currently referenced by npm dist-tags. Private workspaces and packages explicitly targeting another registry are excluded from `--all`; packages not yet published on npm are reported as skipped.
|
|
66
|
+
|
|
67
|
+
For automatic synchronization, add `"release:sync-npmmirror": "repo release sync-npmmirror --published"` to the root scripts and append this hook to `commands.release.hooks.afterPublish`:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{ "script": "release:sync-npmmirror", "continueOnError": true, "idempotent": true }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The hook reads `REPO_RELEASE_PUBLISHED_PACKAGES` or `REPO_RELEASE_PUBLISH_SUMMARY`; an empty list skips synchronization, while missing or invalid input fails explicitly. Existing hooks remain in place.
|
|
74
|
+
|
|
75
|
+
The command submits tasks with dependency synchronization disabled, waits for task completion, then verifies versions and their current dist-tags through the public mirror registry. The total budget defaults to 300 seconds (`--timeout <seconds>`), including requests and retries, with concurrency 2. A failed manual run exits nonzero and prints retry commands. In GitHub Actions it emits warnings and a step summary; the optional hook preserves the successful npm release.
|
|
76
|
+
|
|
55
77
|
## Language
|
|
56
78
|
|
|
57
79
|
Output is English by default. Use `--lang zh-CN` or `REPOCTL_LANG=zh-CN` for Simplified Chinese.
|
package/README.zh-CN.md
CHANGED
|
@@ -45,6 +45,28 @@ repoctl 5.8.0 起会在发布 PR 的包数量和版本表中保留这些包,
|
|
|
45
45
|
pnpm add -Dw repoctl@^5.8.0
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
## 同步已发布包到 npmmirror
|
|
49
|
+
|
|
50
|
+
直接调用 HTTP API,无须安装 cnpm。
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm exec repo release sync-npmmirror --all
|
|
54
|
+
pnpm exec repo release sync-npmmirror --package repoctl --version 5.8.1
|
|
55
|
+
pnpm exec repo release sync-npmmirror --all --dry-run
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`--all`、`--package <name>`、`--published` 必须三选一。手动命令未指定版本时,以 npm 当前 dist-tag 指向的已发布版本为目标。`--all` 排除私有 workspace 和明确发布到其他 registry 的包;尚未发布到 npm 的包显示为跳过。
|
|
59
|
+
|
|
60
|
+
自动同步时,在根脚本添加 `"release:sync-npmmirror": "repo release sync-npmmirror --published"`,并在 `commands.release.hooks.afterPublish` 中追加:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{ "script": "release:sync-npmmirror", "continueOnError": true, "idempotent": true }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
钩子读取 `REPO_RELEASE_PUBLISHED_PACKAGES` 或 `REPO_RELEASE_PUBLISH_SUMMARY`;空列表跳过,缺失或损坏的输入明确失败。追加配置时保留已有钩子。
|
|
67
|
+
|
|
68
|
+
命令跳过依赖递归同步,等待任务完成后,通过公开镜像 registry 验证目标版本及其当前 dist-tag。请求、重试和等待共用默认 300 秒预算,可通过 `--timeout <seconds>` 调整,并发默认为 2。手动同步失败返回非零退出码并打印补同步命令;GitHub Actions 同时输出 warning 和步骤摘要,上述可选钩子保留已经成功的 npm 发布结果。
|
|
69
|
+
|
|
48
70
|
## 语言
|
|
49
71
|
|
|
50
72
|
默认输出英文。使用 `--lang zh-CN` 或 `REPOCTL_LANG=zh-CN` 切换为简体中文。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repoctl",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.9.0",
|
|
5
5
|
"description": "Task-first CLI for initializing, maintaining, validating, and releasing pnpm and Turborepo monorepos",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@icebreakers/monorepo": "5.
|
|
92
|
+
"@icebreakers/monorepo": "5.9.0"
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"access": "public",
|