@dezkareid/osddt 1.11.10 → 1.11.11
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/dist/index.js +18 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -152,7 +152,7 @@ Use the following logic to determine the working directory:
|
|
|
152
152
|
|
|
153
153
|
## Instructions
|
|
154
154
|
|
|
155
|
-
Check the working directory
|
|
155
|
+
Check the working directory for the files listed below **in order** to determine the current phase. Use the \`workingDir\` resolved above (from \`worktree-info\` in worktree mode, or \`{project-path}/working-on/{feature-name}\` in standard mode). Use the first matching condition:
|
|
156
156
|
|
|
157
157
|
| Condition | Current phase | Run next |
|
|
158
158
|
| --------- | ------------- | -------- |
|
|
@@ -1308,13 +1308,24 @@ async function resolveWorkingDir(worktreePath, featureName) {
|
|
|
1308
1308
|
if (await fs.pathExists(path.join(worktreePath, target))) {
|
|
1309
1309
|
return path.join(worktreePath, target);
|
|
1310
1310
|
}
|
|
1311
|
-
// Search
|
|
1311
|
+
// Search up to two levels deep (monorepo packages, e.g. apps/my-app or packages/my-pkg)
|
|
1312
1312
|
try {
|
|
1313
|
-
const
|
|
1314
|
-
for (const
|
|
1315
|
-
const
|
|
1316
|
-
if (await fs.pathExists(
|
|
1317
|
-
return
|
|
1313
|
+
const topEntries = await fs.readdir(worktreePath);
|
|
1314
|
+
for (const top of topEntries) {
|
|
1315
|
+
const topCandidate = path.join(worktreePath, top, target);
|
|
1316
|
+
if (await fs.pathExists(topCandidate)) {
|
|
1317
|
+
return topCandidate;
|
|
1318
|
+
}
|
|
1319
|
+
// Second level (e.g. apps/collectstory/working-on/...)
|
|
1320
|
+
const topStat = await fs.stat(path.join(worktreePath, top)).catch(() => null);
|
|
1321
|
+
if (topStat?.isDirectory()) {
|
|
1322
|
+
const subEntries = await fs.readdir(path.join(worktreePath, top)).catch(() => []);
|
|
1323
|
+
for (const sub of subEntries) {
|
|
1324
|
+
const subCandidate = path.join(worktreePath, top, sub, target);
|
|
1325
|
+
if (await fs.pathExists(subCandidate)) {
|
|
1326
|
+
return subCandidate;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1318
1329
|
}
|
|
1319
1330
|
}
|
|
1320
1331
|
}
|