@dittowords/spec-cli 0.0.1-alpha.4 → 0.0.1-alpha.5
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/discover.js +5 -0
- package/package.json +3 -2
package/dist/discover.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.discover = discover;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const glob_1 = require("glob");
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
10
|
const SPEC_GLOB = "**/*.ditto.md";
|
|
@@ -15,5 +16,9 @@ function discover(repoRoot, roots = ["."]) {
|
|
|
15
16
|
ignore: IGNORE,
|
|
16
17
|
absolute: true,
|
|
17
18
|
});
|
|
19
|
+
const workspacePath = path_1.default.resolve(repoRoot, "workspace.ditto.md");
|
|
20
|
+
if (fs_1.default.existsSync(workspacePath) && !results.includes(workspacePath)) {
|
|
21
|
+
results.push(workspacePath);
|
|
22
|
+
}
|
|
18
23
|
return results.map((abs) => ({ abs, rel: path_1.default.relative(repoRoot, abs) })).sort((a, b) => a.rel.localeCompare(b.rel));
|
|
19
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dittowords/spec-cli",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.5",
|
|
4
4
|
"description": "CLI for syncing .ditto.md content specs with the Ditto platform.",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,14 +18,15 @@
|
|
|
18
18
|
"node": ">=18"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
+
"@dittowords/spec-cli": "^0.0.1-alpha.0",
|
|
21
22
|
"dotenv": "^16.0.0",
|
|
22
23
|
"glob": "^11.0.1",
|
|
23
24
|
"js-yaml": "^4.1.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"tsx": "^4.0.0",
|
|
27
27
|
"@types/js-yaml": "^4.0.9",
|
|
28
28
|
"@types/node": "^20.0.0",
|
|
29
|
+
"tsx": "^4.0.0",
|
|
29
30
|
"typescript": "^5.0.0"
|
|
30
31
|
},
|
|
31
32
|
"license": "Proprietary"
|