@deftai/directive-core 0.55.2 → 0.56.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.
- package/dist/cache/errors.d.ts +4 -1
- package/dist/cache/errors.js +8 -2
- package/dist/cache/fetch.d.ts +50 -0
- package/dist/cache/fetch.js +224 -3
- package/dist/cache/main.js +10 -5
- package/dist/cache/operations.js +6 -4
- package/dist/deposit/copy-tree.d.ts +16 -0
- package/dist/deposit/copy-tree.js +58 -0
- package/dist/deposit/resolve-content.d.ts +28 -0
- package/dist/deposit/resolve-content.js +70 -0
- package/dist/doctor/checks.d.ts +6 -0
- package/dist/doctor/checks.js +37 -0
- package/dist/doctor/constants.d.ts +2 -0
- package/dist/doctor/constants.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/init-deposit/gitignore.d.ts +51 -0
- package/dist/init-deposit/gitignore.js +200 -0
- package/dist/init-deposit/index.d.ts +6 -0
- package/dist/init-deposit/index.js +6 -0
- package/dist/init-deposit/init-deposit.d.ts +44 -0
- package/dist/init-deposit/init-deposit.js +197 -0
- package/dist/init-deposit/legacy-detect.d.ts +61 -0
- package/dist/init-deposit/legacy-detect.js +223 -0
- package/dist/init-deposit/migrate.d.ts +88 -0
- package/dist/init-deposit/migrate.js +196 -0
- package/dist/init-deposit/refresh.d.ts +50 -0
- package/dist/init-deposit/refresh.js +292 -0
- package/dist/init-deposit/scaffold.d.ts +41 -0
- package/dist/init-deposit/scaffold.js +753 -0
- package/dist/legacy-bridge/bridge-drift.d.ts +70 -0
- package/dist/legacy-bridge/bridge-drift.js +171 -0
- package/dist/legacy-bridge/freeze-gate.d.ts +79 -0
- package/dist/legacy-bridge/freeze-gate.js +168 -0
- package/dist/legacy-bridge/index.d.ts +4 -0
- package/dist/legacy-bridge/index.js +4 -0
- package/dist/legacy-bridge/sot.d.ts +45 -0
- package/dist/legacy-bridge/sot.js +49 -0
- package/dist/preflight-cache/evaluate.d.ts +11 -0
- package/dist/preflight-cache/evaluate.js +63 -13
- package/dist/release-e2e/flags.js +5 -1
- package/dist/release-e2e/legacy-bridge-leg.d.ts +134 -0
- package/dist/release-e2e/legacy-bridge-leg.js +478 -0
- package/dist/release-e2e/main.d.ts +2 -1
- package/dist/release-e2e/main.js +17 -1
- package/dist/release-e2e/types.d.ts +9 -0
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.js +1 -1
- package/dist/render/project-render.js +4 -3
- package/dist/render/roadmap-render.d.ts +4 -2
- package/dist/render/roadmap-render.js +14 -7
- package/dist/triage/actions/candidates-log.d.ts +12 -1
- package/dist/triage/actions/candidates-log.js +44 -7
- package/dist/triage/actions/index.d.ts +25 -1
- package/dist/triage/actions/index.js +94 -3
- package/dist/triage/summary/index.d.ts +1 -3
- package/dist/triage/summary/index.js +6 -57
- package/dist/triage/summary/reconcilable.js +4 -33
- package/dist/triage/welcome/default-mode.d.ts +1 -0
- package/dist/triage/welcome/default-mode.js +6 -0
- package/dist/vbrief-validate/project-definition.js +4 -69
- package/dist/vbrief-validate/registry-status.d.ts +20 -0
- package/dist/vbrief-validate/registry-status.js +85 -0
- package/package.json +11 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { scopeIdsForRefUri } from "./paths.js";
|
|
2
|
+
export const REGISTRY_SCOPE_LINK_TYPE = "x-vbrief/plan";
|
|
3
|
+
/** Derive the registry item status from a scope vBRIEF (render side). */
|
|
4
|
+
export function deriveRegistryItemStatus(planStatus, lifecycleFolder) {
|
|
5
|
+
if (typeof planStatus === "string" && planStatus.length > 0) {
|
|
6
|
+
return planStatus;
|
|
7
|
+
}
|
|
8
|
+
return lifecycleFolder;
|
|
9
|
+
}
|
|
10
|
+
function isScopeLinkRef(ref) {
|
|
11
|
+
return (typeof ref === "object" &&
|
|
12
|
+
ref !== null &&
|
|
13
|
+
!Array.isArray(ref) &&
|
|
14
|
+
ref.type === REGISTRY_SCOPE_LINK_TYPE);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* References copied onto a registry item from a scope vBRIEF.
|
|
18
|
+
*
|
|
19
|
+
* Scope-local ``x-vbrief/plan`` links (decompose children, epic forward refs)
|
|
20
|
+
* stay on the scope file only; copying them into PROJECT-DEFINITION item
|
|
21
|
+
* metadata makes D3 registry-status falsely compare the item row against
|
|
22
|
+
* mixed-status siblings (#1696).
|
|
23
|
+
*/
|
|
24
|
+
export function registryMetadataReferencesFromScope(references) {
|
|
25
|
+
if (!Array.isArray(references)) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
return references.filter((ref) => !isScopeLinkRef(ref));
|
|
29
|
+
}
|
|
30
|
+
function pushPlanScopeLink(uris, ref) {
|
|
31
|
+
if (!isScopeLinkRef(ref)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const uri = ref.uri;
|
|
35
|
+
if (typeof uri === "string" && uri.length > 0) {
|
|
36
|
+
uris.push(uri);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Local scope URIs whose ``plan.status`` must agree with the registry item
|
|
41
|
+
* status (D3). Shared by render output expectations and the validator.
|
|
42
|
+
*/
|
|
43
|
+
export function registryStatusScopeUris(item, plan) {
|
|
44
|
+
const uris = [];
|
|
45
|
+
const metadata = item.metadata;
|
|
46
|
+
if (typeof metadata === "object" && metadata !== null && !Array.isArray(metadata)) {
|
|
47
|
+
const meta = metadata;
|
|
48
|
+
const sourcePath = meta.source_path;
|
|
49
|
+
if (typeof sourcePath === "string" && sourcePath.length > 0) {
|
|
50
|
+
uris.push(sourcePath);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const itemRefs = item.references;
|
|
54
|
+
if (Array.isArray(itemRefs)) {
|
|
55
|
+
for (const ref of itemRefs) {
|
|
56
|
+
pushPlanScopeLink(uris, ref);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const itemId = item.id;
|
|
60
|
+
const itemTitle = item.title;
|
|
61
|
+
const planRefs = plan.references;
|
|
62
|
+
if (Array.isArray(planRefs)) {
|
|
63
|
+
for (const ref of planRefs) {
|
|
64
|
+
if (!isScopeLinkRef(ref)) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const uri = ref.uri;
|
|
68
|
+
if (typeof uri !== "string" || uri.length === 0) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const titleMatches = typeof itemTitle === "string" && ref.title === itemTitle;
|
|
72
|
+
const idMatches = typeof itemId === "string" && scopeIdsForRefUri(uri).has(itemId);
|
|
73
|
+
if (titleMatches || idMatches) {
|
|
74
|
+
uris.push(uri);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return [...new Set(uris)];
|
|
79
|
+
}
|
|
80
|
+
export function formatRegistryStatusMismatch(filepath, itemIndex, itemStatus, uri, scopeStatus) {
|
|
81
|
+
return (`${filepath}: items[${itemIndex}] status is '${itemStatus}' ` +
|
|
82
|
+
`but referenced scope '${uri}' has plan.status '${scopeStatus}' ` +
|
|
83
|
+
"(D3 registry-status)");
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=registry-status.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.1",
|
|
4
4
|
"description": "TypeScript engine core for the Directive framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -146,6 +146,10 @@
|
|
|
146
146
|
"types": "./dist/intake/parity-scenarios.d.ts",
|
|
147
147
|
"default": "./dist/intake/parity-scenarios.js"
|
|
148
148
|
},
|
|
149
|
+
"./legacy-bridge": {
|
|
150
|
+
"types": "./dist/legacy-bridge/index.d.ts",
|
|
151
|
+
"default": "./dist/legacy-bridge/index.js"
|
|
152
|
+
},
|
|
149
153
|
"./lifecycle": {
|
|
150
154
|
"types": "./dist/lifecycle/index.d.ts",
|
|
151
155
|
"default": "./dist/lifecycle/index.js"
|
|
@@ -181,6 +185,10 @@
|
|
|
181
185
|
"./ts-check-lane": {
|
|
182
186
|
"types": "./dist/ts-check-lane/index.d.ts",
|
|
183
187
|
"default": "./dist/ts-check-lane/index.js"
|
|
188
|
+
},
|
|
189
|
+
"./init-deposit": {
|
|
190
|
+
"types": "./dist/init-deposit/index.d.ts",
|
|
191
|
+
"default": "./dist/init-deposit/index.js"
|
|
184
192
|
}
|
|
185
193
|
},
|
|
186
194
|
"files": [
|
|
@@ -197,7 +205,8 @@
|
|
|
197
205
|
"provenance": true
|
|
198
206
|
},
|
|
199
207
|
"dependencies": {
|
|
200
|
-
"@deftai/directive-
|
|
208
|
+
"@deftai/directive-content": "^0.56.1",
|
|
209
|
+
"@deftai/directive-types": "^0.56.1"
|
|
201
210
|
},
|
|
202
211
|
"scripts": {
|
|
203
212
|
"build": "tsc -b",
|