@co0ontty/wand 1.44.0 → 1.45.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "commit": "82bf2e6b3f7f01bbee5ee3213967f3316020601b",
3
- "builtAt": "2026-05-31T13:20:33.303Z",
4
- "version": "1.44.0",
2
+ "commit": "031bcf6b34baf816e7bc830edb132fead9f3d804",
3
+ "builtAt": "2026-05-31T14:11:12.552Z",
4
+ "version": "1.45.1",
5
5
  "channel": "stable"
6
6
  }
@@ -121,6 +121,24 @@ function parsePorcelainV2(raw) {
121
121
  }
122
122
  return out;
123
123
  }
124
+ /**
125
+ * 仓库是否声明了 submodule(读 repo 根的 .gitmodules)。不能只看 `git status`——一个
126
+ * clean 的 submodule 不会出现在 status 里,但「是否提供 Submodule 选项」应基于声明而非当前改动。
127
+ */
128
+ function repoDeclaresSubmodule(repoRoot) {
129
+ if (!repoRoot)
130
+ return false;
131
+ const gitmodules = `${repoRoot}/.gitmodules`;
132
+ if (!existsSync(gitmodules))
133
+ return false;
134
+ try {
135
+ const out = runGitAllowEmpty(["config", "-f", gitmodules, "--get-regexp", "\\.path$"], repoRoot).trim();
136
+ return out.length > 0;
137
+ }
138
+ catch {
139
+ return false;
140
+ }
141
+ }
124
142
  export function getGitStatus(cwd) {
125
143
  if (!cwd || !existsSync(cwd)) {
126
144
  return { isGit: false, error: "工作目录不存在。" };