@deftai/directive 0.66.0 → 0.66.2
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/doctor.d.ts +2 -0
- package/dist/doctor.js +13 -0
- package/dist/migrate-preflight.js +13 -12
- package/dist/migrate-xbrief.js +13 -10
- package/package.json +3 -3
package/dist/doctor.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/** Advisory when a consumer deposit carries git-vendored framework source (#2142). */
|
|
3
|
+
export declare function renderStrayPackagesAdvisoryLine(projectRoot: string): string;
|
|
2
4
|
export declare function run(argv: string[]): number;
|
|
3
5
|
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/doctor.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
2
4
|
import { fileURLToPath } from "node:url";
|
|
3
5
|
import { parseDoctorFlags } from "@deftai/directive-core/dist/doctor/flags.js";
|
|
4
6
|
import { cmdDoctor } from "@deftai/directive-core/dist/doctor/main.js";
|
|
5
7
|
import { renderPrecutoverLine } from "@deftai/directive-core/dist/vbrief-validate/precutover.js";
|
|
6
8
|
import { renderXbriefMigrationLine } from "@deftai/directive-core/xbrief-migrate";
|
|
9
|
+
/** Advisory when a consumer deposit carries git-vendored framework source (#2142). */
|
|
10
|
+
export function renderStrayPackagesAdvisoryLine(projectRoot) {
|
|
11
|
+
const packagesDir = join(projectRoot, ".deft", "core", "packages");
|
|
12
|
+
if (!existsSync(packagesDir)) {
|
|
13
|
+
return "Deposit hygiene: none -- .deft/core contains no stray packages/ source tree.";
|
|
14
|
+
}
|
|
15
|
+
return ("Deposit hygiene: advisory -- .deft/core/packages/ is present (git-vendored framework source, " +
|
|
16
|
+
"not shipped by npm @deftai/directive-content). Upgrade directive to pick up task guard fixes; " +
|
|
17
|
+
"consider removing the stray tree from version control.");
|
|
18
|
+
}
|
|
7
19
|
export function run(argv) {
|
|
8
20
|
// #2022: surface pre-cutover (pre-v0.20 document model) migration state alongside the
|
|
9
21
|
// core doctor report. Only emit on a valid, human-readable invocation: suppressed under
|
|
@@ -14,6 +26,7 @@ export function run(argv) {
|
|
|
14
26
|
const projectRoot = flags.projectRoot ?? process.cwd();
|
|
15
27
|
process.stdout.write(`${renderPrecutoverLine(projectRoot)}\n`);
|
|
16
28
|
process.stdout.write(`${renderXbriefMigrationLine(projectRoot)}\n`);
|
|
29
|
+
process.stdout.write(`${renderStrayPackagesAdvisoryLine(projectRoot)}\n`);
|
|
17
30
|
}
|
|
18
31
|
return cmdDoctor(argv);
|
|
19
32
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { resolveFrameworkRootForProject } from "@deftai/directive-core/doctor";
|
|
4
4
|
import { emitMigratePreflight, runMigratePreflight, } from "@deftai/directive-core/migrate-preflight";
|
|
5
5
|
export function parseArgs(argv) {
|
|
6
6
|
let projectRoot = ".";
|
|
7
|
-
let
|
|
7
|
+
let explicitDeftRoot;
|
|
8
8
|
let quiet = false;
|
|
9
9
|
for (let i = 0; i < argv.length; i += 1) {
|
|
10
10
|
const arg = argv[i] ?? "";
|
|
@@ -16,7 +16,7 @@ export function parseArgs(argv) {
|
|
|
16
16
|
if (value === undefined) {
|
|
17
17
|
return {
|
|
18
18
|
projectRoot,
|
|
19
|
-
deftRoot,
|
|
19
|
+
deftRoot: resolveFrameworkRootForProject(projectRoot, explicitDeftRoot),
|
|
20
20
|
quiet,
|
|
21
21
|
error: "argument --project-root: expected one argument",
|
|
22
22
|
};
|
|
@@ -32,26 +32,27 @@ export function parseArgs(argv) {
|
|
|
32
32
|
if (value === undefined) {
|
|
33
33
|
return {
|
|
34
34
|
projectRoot,
|
|
35
|
-
deftRoot,
|
|
35
|
+
deftRoot: resolveFrameworkRootForProject(projectRoot, explicitDeftRoot),
|
|
36
36
|
quiet,
|
|
37
37
|
error: "argument --deft-root: expected one argument",
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
explicitDeftRoot = value;
|
|
41
41
|
i += 1;
|
|
42
42
|
}
|
|
43
43
|
else if (arg.startsWith("--deft-root=")) {
|
|
44
|
-
|
|
44
|
+
explicitDeftRoot = arg.slice("--deft-root=".length);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
return {
|
|
47
|
+
return {
|
|
48
|
+
projectRoot,
|
|
49
|
+
deftRoot: resolveFrameworkRootForProject(projectRoot, explicitDeftRoot),
|
|
50
|
+
quiet,
|
|
51
|
+
error: `unrecognized argument: ${arg}`,
|
|
52
|
+
};
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
|
-
|
|
51
|
-
process.env.DEFT_ROOT.length > 0 &&
|
|
52
|
-
!argv.some((a) => a.startsWith("--deft-root"))) {
|
|
53
|
-
deftRoot = process.env.DEFT_ROOT;
|
|
54
|
-
}
|
|
55
|
+
const deftRoot = resolveFrameworkRootForProject(projectRoot, explicitDeftRoot);
|
|
55
56
|
return { projectRoot, deftRoot, quiet };
|
|
56
57
|
}
|
|
57
58
|
export function run(argv) {
|
package/dist/migrate-xbrief.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { resolveFrameworkRootForProject } from "@deftai/directive-core/doctor";
|
|
4
4
|
import { runXbriefMigrationCli } from "@deftai/directive-core/xbrief-migrate";
|
|
5
5
|
export function parseArgs(argv) {
|
|
6
6
|
let projectRoot = ".";
|
|
7
|
-
let
|
|
7
|
+
let explicitFrameworkRoot;
|
|
8
8
|
let force = false;
|
|
9
9
|
for (let i = 0; i < argv.length; i += 1) {
|
|
10
10
|
const arg = argv[i] ?? "";
|
|
@@ -16,7 +16,7 @@ export function parseArgs(argv) {
|
|
|
16
16
|
if (value === undefined) {
|
|
17
17
|
return {
|
|
18
18
|
projectRoot,
|
|
19
|
-
frameworkRoot,
|
|
19
|
+
frameworkRoot: resolveFrameworkRootForProject(projectRoot, explicitFrameworkRoot),
|
|
20
20
|
force,
|
|
21
21
|
error: "argument --project-root: expected one argument",
|
|
22
22
|
};
|
|
@@ -32,24 +32,27 @@ export function parseArgs(argv) {
|
|
|
32
32
|
if (value === undefined) {
|
|
33
33
|
return {
|
|
34
34
|
projectRoot,
|
|
35
|
-
frameworkRoot,
|
|
35
|
+
frameworkRoot: resolveFrameworkRootForProject(projectRoot, explicitFrameworkRoot),
|
|
36
36
|
force,
|
|
37
37
|
error: "argument --framework-root: expected one argument",
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
explicitFrameworkRoot = value;
|
|
41
41
|
i += 1;
|
|
42
42
|
}
|
|
43
43
|
else if (arg.startsWith("--framework-root=")) {
|
|
44
|
-
|
|
44
|
+
explicitFrameworkRoot = arg.slice("--framework-root=".length);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
return {
|
|
47
|
+
return {
|
|
48
|
+
projectRoot,
|
|
49
|
+
frameworkRoot: resolveFrameworkRootForProject(projectRoot, explicitFrameworkRoot),
|
|
50
|
+
force,
|
|
51
|
+
error: `unrecognized argument: ${arg}`,
|
|
52
|
+
};
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
|
-
|
|
51
|
-
frameworkRoot = process.env.DEFT_ROOT;
|
|
52
|
-
}
|
|
55
|
+
const frameworkRoot = resolveFrameworkRootForProject(projectRoot, explicitFrameworkRoot);
|
|
53
56
|
return { projectRoot, frameworkRoot, force };
|
|
54
57
|
}
|
|
55
58
|
export function run(argv) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.2",
|
|
4
4
|
"description": "Directive CLI — npm install path for the Deft Directive framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"provenance": true
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@deftai/directive-core": "^0.66.
|
|
35
|
-
"@deftai/directive-content": "^0.66.
|
|
34
|
+
"@deftai/directive-core": "^0.66.2",
|
|
35
|
+
"@deftai/directive-content": "^0.66.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -b"
|