@dsh-workbench/module-tools 1.1.14 → 1.1.16

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,6 @@
1
1
  {
2
2
  "name": "@dsh-workbench/module-tools",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "模块包的构建与门禁工具:build(单文件 ESM 宿主侧 + 套 loader 壳的浏览器侧)、check(契约/产物边界/源码边界/卡片渲染)。模块包不再各带一份构建脚本。",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "semver": "^7.8.5",
34
34
  "typescript": "5.9.3",
35
35
  "typescript-eslint": "^8.71.0",
36
- "@dsh-workbench/shared": "1.1.14"
36
+ "@dsh-workbench/shared": "1.1.16"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
@@ -637,7 +637,14 @@ export function updateMarketIndex(options) {
637
637
  if (resume !== undefined) {
638
638
  if (plan.source.localPath === undefined) {
639
639
  const fetched = runGit(exec, workdir, ['fetch', 'origin', branch], { allowFailure: true });
640
- if (fetched.status === 0) runGit(exec, workdir, ['reset', '--hard', `origin/${branch}`], { allowFailure: true });
640
+ if (fetched.status !== 0) {
641
+ throw new MarketIndexError(
642
+ `续跑前拉不到索引仓库的远端 ${branch}:${tailOf(`${fetched.stdout}\n${fetched.stderr}`)} —— 本地镜像可能落后,先让网络/凭据通,再 resume`,
643
+ 'git-auth',
644
+ `git -C ${workdir} fetch origin ${branch}`,
645
+ );
646
+ }
647
+ runGit(exec, workdir, ['reset', '--hard', `origin/${branch}`], { allowFailure: true });
641
648
  runGit(exec, workdir, ['clean', '-fd', '--', marketArtifactRoot(manifest.name), dir], {
642
649
  allowFailure: true,
643
650
  });