@empire-builder-kit/nx 1.0.0-beta.10
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/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.md +34 -0
- package/executors.json +74 -0
- package/generators.json +40 -0
- package/migrations/standard-pre-v1-to-v1.md +11 -0
- package/package.json +80 -0
- package/src/blueprints/execution.d.ts +31 -0
- package/src/blueprints/execution.js +166 -0
- package/src/blueprints/execution.js.map +1 -0
- package/src/blueprints/index.d.ts +5 -0
- package/src/blueprints/index.js +9 -0
- package/src/blueprints/index.js.map +1 -0
- package/src/blueprints/inputs.d.ts +43 -0
- package/src/blueprints/inputs.js +103 -0
- package/src/blueprints/inputs.js.map +1 -0
- package/src/blueprints/manifest.d.ts +281 -0
- package/src/blueprints/manifest.js +441 -0
- package/src/blueprints/manifest.js.map +1 -0
- package/src/blueprints/resolver.d.ts +28 -0
- package/src/blueprints/resolver.js +218 -0
- package/src/blueprints/resolver.js.map +1 -0
- package/src/blueprints/transitions.d.ts +20 -0
- package/src/blueprints/transitions.js +61 -0
- package/src/blueprints/transitions.js.map +1 -0
- package/src/executors/deploy/deploy.d.ts +4 -0
- package/src/executors/deploy/deploy.js +6 -0
- package/src/executors/deploy/deploy.js.map +1 -0
- package/src/executors/deployment-plan/deployment-plan.d.ts +9 -0
- package/src/executors/deployment-plan/deployment-plan.js +50 -0
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -0
- package/src/executors/deployment-plan/schema.json +24 -0
- package/src/executors/dev/dev.d.ts +4 -0
- package/src/executors/dev/dev.js +6 -0
- package/src/executors/dev/dev.js.map +1 -0
- package/src/executors/dev-doctor/dev-doctor.d.ts +31 -0
- package/src/executors/dev-doctor/dev-doctor.js +260 -0
- package/src/executors/dev-doctor/dev-doctor.js.map +1 -0
- package/src/executors/dev-doctor/schema.json +17 -0
- package/src/executors/dev-setup/dev-setup.d.ts +11 -0
- package/src/executors/dev-setup/dev-setup.js +454 -0
- package/src/executors/dev-setup/dev-setup.js.map +1 -0
- package/src/executors/dev-setup/schema.json +16 -0
- package/src/executors/fleet/fleet.d.ts +62 -0
- package/src/executors/fleet/fleet.js +613 -0
- package/src/executors/fleet/fleet.js.map +1 -0
- package/src/executors/fleet/schema.json +37 -0
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +15 -0
- package/src/executors/foundation-preflight/foundation-preflight.js +116 -0
- package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -0
- package/src/executors/foundation-preflight/schema.json +31 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +8 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +41 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -0
- package/src/executors/foundation-profile-preflight/schema.json +21 -0
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +13 -0
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +69 -0
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -0
- package/src/executors/foundation-remove-preflight/schema.json +17 -0
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +8 -0
- package/src/executors/github-bootstrap/github-bootstrap.js +30 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -0
- package/src/executors/github-bootstrap/schema.json +25 -0
- package/src/executors/refresh/refresh.d.ts +4 -0
- package/src/executors/refresh/refresh.js +6 -0
- package/src/executors/refresh/refresh.js.map +1 -0
- package/src/executors/remove/remove.d.ts +4 -0
- package/src/executors/remove/remove.js +6 -0
- package/src/executors/remove/remove.js.map +1 -0
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +31 -0
- package/src/executors/sst-lifecycle/run-sst-command.js +226 -0
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -0
- package/src/executors/sst-lifecycle/schema.json +45 -0
- package/src/executors/unlock/unlock.d.ts +4 -0
- package/src/executors/unlock/unlock.js +6 -0
- package/src/executors/unlock/unlock.js.map +1 -0
- package/src/executors/work-markers/schema.json +14 -0
- package/src/executors/work-markers/work-markers.d.ts +6 -0
- package/src/executors/work-markers/work-markers.js +20 -0
- package/src/executors/work-markers/work-markers.js.map +1 -0
- package/src/foundation/aurora-logical-database.d.ts +76 -0
- package/src/foundation/aurora-logical-database.js +419 -0
- package/src/foundation/aurora-logical-database.js.map +1 -0
- package/src/foundation/discovery.d.ts +55 -0
- package/src/foundation/discovery.js +55 -0
- package/src/foundation/discovery.js.map +1 -0
- package/src/foundation/index.d.ts +6 -0
- package/src/foundation/index.js +10 -0
- package/src/foundation/index.js.map +1 -0
- package/src/foundation/local-database-contract.d.ts +30 -0
- package/src/foundation/local-database-contract.js +75 -0
- package/src/foundation/local-database-contract.js.map +1 -0
- package/src/foundation/preflight.d.ts +31 -0
- package/src/foundation/preflight.js +114 -0
- package/src/foundation/preflight.js.map +1 -0
- package/src/foundation/provision-database-bindings.d.ts +30 -0
- package/src/foundation/provision-database-bindings.js +113 -0
- package/src/foundation/provision-database-bindings.js.map +1 -0
- package/src/foundation/provision-logical-database.d.ts +26 -0
- package/src/foundation/provision-logical-database.js +163 -0
- package/src/foundation/provision-logical-database.js.map +1 -0
- package/src/foundation/requirements.d.ts +37 -0
- package/src/foundation/requirements.js +141 -0
- package/src/foundation/requirements.js.map +1 -0
- package/src/foundation/stages.d.ts +14 -0
- package/src/foundation/stages.js +51 -0
- package/src/foundation/stages.js.map +1 -0
- package/src/generators/function/function.d.ts +13 -0
- package/src/generators/function/function.js +71 -0
- package/src/generators/function/function.js.map +1 -0
- package/src/generators/function/schema.d.ts +5 -0
- package/src/generators/function/schema.json +20 -0
- package/src/generators/job/job.d.ts +4 -0
- package/src/generators/job/job.js +5 -0
- package/src/generators/job/job.js.map +1 -0
- package/src/generators/preset/generator.d.ts +5 -0
- package/src/generators/preset/generator.js +41 -0
- package/src/generators/preset/generator.js.map +1 -0
- package/src/generators/preset/schema.d.ts +4 -0
- package/src/generators/preset/schema.json +22 -0
- package/src/generators/preset/workspace-files.d.ts +18 -0
- package/src/generators/preset/workspace-files.js +1605 -0
- package/src/generators/preset/workspace-files.js.map +1 -0
- package/src/generators/repository-policy/repository-policy.d.ts +4 -0
- package/src/generators/repository-policy/repository-policy.js +107 -0
- package/src/generators/repository-policy/repository-policy.js.map +1 -0
- package/src/generators/repository-policy/schema.d.ts +18 -0
- package/src/generators/repository-policy/schema.json +46 -0
- package/src/generators/service/service.d.ts +4 -0
- package/src/generators/service/service.js +5 -0
- package/src/generators/service/service.js.map +1 -0
- package/src/generators/slice/schema.d.ts +7 -0
- package/src/generators/slice/schema.json +38 -0
- package/src/generators/slice/slice.d.ts +26 -0
- package/src/generators/slice/slice.js +1698 -0
- package/src/generators/slice/slice.js.map +1 -0
- package/src/generators/upgrade/schema.d.ts +8 -0
- package/src/generators/upgrade/schema.json +31 -0
- package/src/generators/upgrade/upgrade.d.ts +27 -0
- package/src/generators/upgrade/upgrade.js +682 -0
- package/src/generators/upgrade/upgrade.js.map +1 -0
- package/src/generators/workload/schema.d.ts +6 -0
- package/src/generators/workload/schema.json +21 -0
- package/src/generators/workload/workload.d.ts +16 -0
- package/src/generators/workload/workload.js +157 -0
- package/src/generators/workload/workload.js.map +1 -0
- package/src/git-policy/action-pins.d.ts +28 -0
- package/src/git-policy/action-pins.js +35 -0
- package/src/git-policy/action-pins.js.map +1 -0
- package/src/git-policy/github-bootstrap.d.ts +23 -0
- package/src/git-policy/github-bootstrap.js +759 -0
- package/src/git-policy/github-bootstrap.js.map +1 -0
- package/src/git-policy/index.d.ts +3 -0
- package/src/git-policy/index.js +7 -0
- package/src/git-policy/index.js.map +1 -0
- package/src/git-policy/routing.d.ts +15 -0
- package/src/git-policy/routing.js +77 -0
- package/src/git-policy/routing.js.map +1 -0
- package/src/index.d.ts +8 -0
- package/src/index.js +12 -0
- package/src/index.js.map +1 -0
- package/src/local-dev/contracts.d.ts +31 -0
- package/src/local-dev/contracts.js +126 -0
- package/src/local-dev/contracts.js.map +1 -0
- package/src/local-dev/effects.d.ts +16 -0
- package/src/local-dev/effects.js +63 -0
- package/src/local-dev/effects.js.map +1 -0
- package/src/local-dev/gateway-daemon.d.ts +4 -0
- package/src/local-dev/gateway-daemon.js +39 -0
- package/src/local-dev/gateway-daemon.js.map +1 -0
- package/src/local-dev/gateway.d.ts +60 -0
- package/src/local-dev/gateway.js +368 -0
- package/src/local-dev/gateway.js.map +1 -0
- package/src/local-dev/identity.d.ts +16 -0
- package/src/local-dev/identity.js +101 -0
- package/src/local-dev/identity.js.map +1 -0
- package/src/local-dev/index.d.ts +7 -0
- package/src/local-dev/index.js +11 -0
- package/src/local-dev/index.js.map +1 -0
- package/src/local-dev/portless.d.ts +15 -0
- package/src/local-dev/portless.js +115 -0
- package/src/local-dev/portless.js.map +1 -0
- package/src/local-dev/ports.d.ts +10 -0
- package/src/local-dev/ports.js +39 -0
- package/src/local-dev/ports.js.map +1 -0
- package/src/local-dev/proxy.d.ts +37 -0
- package/src/local-dev/proxy.js +271 -0
- package/src/local-dev/proxy.js.map +1 -0
- package/src/local-dev/tls.d.ts +24 -0
- package/src/local-dev/tls.js +294 -0
- package/src/local-dev/tls.js.map +1 -0
- package/src/ownership/composition.d.ts +16 -0
- package/src/ownership/composition.js +125 -0
- package/src/ownership/composition.js.map +1 -0
- package/src/ownership/foundation-record.d.ts +66 -0
- package/src/ownership/foundation-record.js +108 -0
- package/src/ownership/foundation-record.js.map +1 -0
- package/src/ownership/hash.d.ts +2 -0
- package/src/ownership/hash.js +10 -0
- package/src/ownership/hash.js.map +1 -0
- package/src/ownership/index.d.ts +6 -0
- package/src/ownership/index.js +10 -0
- package/src/ownership/index.js.map +1 -0
- package/src/ownership/json-ownership.d.ts +13 -0
- package/src/ownership/json-ownership.js +147 -0
- package/src/ownership/json-ownership.js.map +1 -0
- package/src/ownership/record.d.ts +186 -0
- package/src/ownership/record.js +336 -0
- package/src/ownership/record.js.map +1 -0
- package/src/ownership/workspace-record.d.ts +66 -0
- package/src/ownership/workspace-record.js +108 -0
- package/src/ownership/workspace-record.js.map +1 -0
- package/src/repository-policy/aurora-preflight.d.ts +15 -0
- package/src/repository-policy/aurora-preflight.js +45 -0
- package/src/repository-policy/aurora-preflight.js.map +1 -0
- package/src/repository-policy/deployment-plan.d.ts +24 -0
- package/src/repository-policy/deployment-plan.js +124 -0
- package/src/repository-policy/deployment-plan.js.map +1 -0
- package/src/repository-policy/foundation-profile.d.ts +20 -0
- package/src/repository-policy/foundation-profile.js +45 -0
- package/src/repository-policy/foundation-profile.js.map +1 -0
- package/src/repository-policy/index.d.ts +4 -0
- package/src/repository-policy/index.js +8 -0
- package/src/repository-policy/index.js.map +1 -0
- package/src/repository-policy/policy.d.ts +59 -0
- package/src/repository-policy/policy.js +274 -0
- package/src/repository-policy/policy.js.map +1 -0
- package/src/schemas/blueprint-input-schema-v1.json +23 -0
- package/src/schemas/blueprint-v1.json +186 -0
- package/src/schemas/foundation-ownership-v2.json +42 -0
- package/src/schemas/foundation-requirement-v1.json +32 -0
- package/src/schemas/generated-ownership-v2.json +117 -0
- package/src/schemas/repository-policy-v1.json +58 -0
- package/src/schemas/workspace-ownership-v2.json +42 -0
- package/src/validation.d.ts +14 -0
- package/src/validation.js +14 -0
- package/src/validation.js.map +1 -0
- package/src/work-markers/index.d.ts +1 -0
- package/src/work-markers/index.js +5 -0
- package/src/work-markers/index.js.map +1 -0
- package/src/work-markers/work-markers.d.ts +39 -0
- package/src/work-markers/work-markers.js +359 -0
- package/src/work-markers/work-markers.js.map +1 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WORK_MARKER_KINDS = void 0;
|
|
4
|
+
exports.scanWorkMarkers = scanWorkMarkers;
|
|
5
|
+
exports.formatWorkMarkerComment = formatWorkMarkerComment;
|
|
6
|
+
exports.formatWorkMarkerReport = formatWorkMarkerReport;
|
|
7
|
+
exports.assertWorkMarkerReport = assertWorkMarkerReport;
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const index_js_1 = require("../ownership/index.js");
|
|
11
|
+
exports.WORK_MARKER_KINDS = [
|
|
12
|
+
'TODO',
|
|
13
|
+
'ASSUMPTION',
|
|
14
|
+
'QUESTION',
|
|
15
|
+
'SECURITY',
|
|
16
|
+
'BLOCKER',
|
|
17
|
+
];
|
|
18
|
+
const IGNORED_DIRECTORIES = new Set([
|
|
19
|
+
'.cache',
|
|
20
|
+
'.git',
|
|
21
|
+
'.next',
|
|
22
|
+
'.nx',
|
|
23
|
+
'.open-next',
|
|
24
|
+
'.sst',
|
|
25
|
+
'.turbo',
|
|
26
|
+
'build',
|
|
27
|
+
'coverage',
|
|
28
|
+
'dist',
|
|
29
|
+
'node_modules',
|
|
30
|
+
'out',
|
|
31
|
+
]);
|
|
32
|
+
const SCANNED_EXTENSIONS = new Set([
|
|
33
|
+
'.bash',
|
|
34
|
+
'.c',
|
|
35
|
+
'.cc',
|
|
36
|
+
'.conf',
|
|
37
|
+
'.cpp',
|
|
38
|
+
'.cs',
|
|
39
|
+
'.csh',
|
|
40
|
+
'.css',
|
|
41
|
+
'.cts',
|
|
42
|
+
'.fish',
|
|
43
|
+
'.go',
|
|
44
|
+
'.gql',
|
|
45
|
+
'.graphql',
|
|
46
|
+
'.h',
|
|
47
|
+
'.hcl',
|
|
48
|
+
'.hh',
|
|
49
|
+
'.hpp',
|
|
50
|
+
'.htm',
|
|
51
|
+
'.html',
|
|
52
|
+
'.ini',
|
|
53
|
+
'.java',
|
|
54
|
+
'.js',
|
|
55
|
+
'.jsx',
|
|
56
|
+
'.kt',
|
|
57
|
+
'.kts',
|
|
58
|
+
'.less',
|
|
59
|
+
'.mjs',
|
|
60
|
+
'.mts',
|
|
61
|
+
'.php',
|
|
62
|
+
'.properties',
|
|
63
|
+
'.py',
|
|
64
|
+
'.rb',
|
|
65
|
+
'.rs',
|
|
66
|
+
'.sass',
|
|
67
|
+
'.scss',
|
|
68
|
+
'.sh',
|
|
69
|
+
'.sql',
|
|
70
|
+
'.svelte',
|
|
71
|
+
'.swift',
|
|
72
|
+
'.tf',
|
|
73
|
+
'.toml',
|
|
74
|
+
'.ts',
|
|
75
|
+
'.tsx',
|
|
76
|
+
'.vue',
|
|
77
|
+
'.xml',
|
|
78
|
+
'.yaml',
|
|
79
|
+
'.yml',
|
|
80
|
+
'.zsh',
|
|
81
|
+
]);
|
|
82
|
+
const SCANNED_BASENAMES = new Set(['Containerfile', 'Dockerfile', 'Makefile']);
|
|
83
|
+
const WORK_MARKER_COMMENT_PREFIXES = ['//', '#', '--', '/*', '<!--'];
|
|
84
|
+
const MARKER_LINE_PATTERN = /^\s*(?:\/\/|#|--|\/\*+|\*|<!--)\s*(?<content>.*)$/;
|
|
85
|
+
const MARKER_KIND_PATTERN = /^EBK-(?<kind>[A-Z][A-Z-]*)(?=\(|:)/;
|
|
86
|
+
const MARKER_PATTERN = /^EBK-(?<kind>[A-Z][A-Z-]*)\((?<reference>[^)]+)\):\s+(?<description>.+)$/;
|
|
87
|
+
const MARKER_REFERENCE_PATTERN = /^(?:GH:[1-9]\d*|PLAN:[a-z0-9][a-z0-9-]*\/[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?)$/;
|
|
88
|
+
function toWorkspacePath(root, path) {
|
|
89
|
+
const value = (0, node_path_1.relative)(root, path);
|
|
90
|
+
return value.split(node_path_1.sep).join('/');
|
|
91
|
+
}
|
|
92
|
+
function isScannedSource(path) {
|
|
93
|
+
const name = path.split(node_path_1.sep).at(-1) ?? path;
|
|
94
|
+
return (SCANNED_BASENAMES.has(name) ||
|
|
95
|
+
SCANNED_EXTENSIONS.has((0, node_path_1.extname)(name).toLowerCase()));
|
|
96
|
+
}
|
|
97
|
+
function isOwnershipRecord(path) {
|
|
98
|
+
return (path.split(node_path_1.sep).at(-1) === 'ownership.json' &&
|
|
99
|
+
path.split(node_path_1.sep).at(-2) === '.ebk');
|
|
100
|
+
}
|
|
101
|
+
function walkWorkspace(root, issues) {
|
|
102
|
+
const ownershipRecords = [];
|
|
103
|
+
const sourceFiles = [];
|
|
104
|
+
const visit = (directory) => {
|
|
105
|
+
let entries;
|
|
106
|
+
try {
|
|
107
|
+
entries = (0, node_fs_1.readdirSync)(directory, { withFileTypes: true });
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
issues.push({
|
|
111
|
+
code: 'unreadable-path',
|
|
112
|
+
line: 1,
|
|
113
|
+
message: `cannot read directory: ${error instanceof Error ? error.message : String(error)}`,
|
|
114
|
+
path: toWorkspacePath(root, directory) || '.',
|
|
115
|
+
});
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
entries.sort((left, right) => left.name.localeCompare(right.name));
|
|
119
|
+
for (const entry of entries) {
|
|
120
|
+
const path = (0, node_path_1.join)(directory, entry.name);
|
|
121
|
+
if (entry.isSymbolicLink())
|
|
122
|
+
continue;
|
|
123
|
+
if (entry.isDirectory()) {
|
|
124
|
+
const isEbkCache = entry.name === 'cache' && directory.split(node_path_1.sep).at(-1) === '.ebk';
|
|
125
|
+
if (!IGNORED_DIRECTORIES.has(entry.name) && !isEbkCache)
|
|
126
|
+
visit(path);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (!entry.isFile())
|
|
130
|
+
continue;
|
|
131
|
+
if (isOwnershipRecord(path))
|
|
132
|
+
ownershipRecords.push(path);
|
|
133
|
+
if (isScannedSource(path))
|
|
134
|
+
sourceFiles.push(path);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
visit(root);
|
|
138
|
+
return { ownershipRecords, sourceFiles };
|
|
139
|
+
}
|
|
140
|
+
function ownershipValidation(value) {
|
|
141
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
142
|
+
const record = value;
|
|
143
|
+
if (record.kind === 'workspace') {
|
|
144
|
+
return (0, index_js_1.validateWorkspaceOwnershipRecord)(value);
|
|
145
|
+
}
|
|
146
|
+
if (record.kind === 'foundation') {
|
|
147
|
+
return (0, index_js_1.validateFoundationOwnershipRecord)(value);
|
|
148
|
+
}
|
|
149
|
+
if ('slice' in record || 'blueprint' in record) {
|
|
150
|
+
return (0, index_js_1.validateGeneratedOwnershipRecord)(value);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
issues: [
|
|
155
|
+
{
|
|
156
|
+
message: 'must identify a workspace, Foundation, or Product Slice',
|
|
157
|
+
path: 'ownership',
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
valid: false,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function addOwnershipPaths(workspaceRoot, recordPath, paths, ownership, issues) {
|
|
164
|
+
const recordRoot = (0, node_path_1.dirname)((0, node_path_1.dirname)(recordPath));
|
|
165
|
+
for (const entry of paths) {
|
|
166
|
+
const absolutePath = (0, node_path_1.resolve)(recordRoot, ...entry.path.split('/'));
|
|
167
|
+
const current = ownership.get(absolutePath);
|
|
168
|
+
if (current && current !== entry.mode) {
|
|
169
|
+
issues.push({
|
|
170
|
+
code: 'ownership-conflict',
|
|
171
|
+
line: 1,
|
|
172
|
+
message: `ownership records disagree whether this path is ${current} or ${entry.mode}`,
|
|
173
|
+
path: toWorkspacePath(workspaceRoot, absolutePath),
|
|
174
|
+
});
|
|
175
|
+
ownership.set(absolutePath, 'managed');
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
ownership.set(absolutePath, entry.mode);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function readOwnership(workspaceRoot, recordPaths, issues) {
|
|
182
|
+
const ownership = new Map();
|
|
183
|
+
for (const recordPath of recordPaths) {
|
|
184
|
+
let value;
|
|
185
|
+
try {
|
|
186
|
+
value = JSON.parse((0, node_fs_1.readFileSync)(recordPath, 'utf8'));
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
issues.push({
|
|
190
|
+
code: 'invalid-ownership-record',
|
|
191
|
+
line: 1,
|
|
192
|
+
message: `cannot parse ownership record: ${error instanceof Error ? error.message : String(error)}`,
|
|
193
|
+
path: toWorkspacePath(workspaceRoot, recordPath),
|
|
194
|
+
});
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
const validation = ownershipValidation(value);
|
|
198
|
+
if (!validation.valid) {
|
|
199
|
+
issues.push({
|
|
200
|
+
code: 'invalid-ownership-record',
|
|
201
|
+
line: 1,
|
|
202
|
+
message: validation.issues
|
|
203
|
+
.map((issue) => `${issue.path}: ${issue.message}`)
|
|
204
|
+
.join('; '),
|
|
205
|
+
path: toWorkspacePath(workspaceRoot, recordPath),
|
|
206
|
+
});
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
addOwnershipPaths(workspaceRoot, recordPath, validation.value.paths, ownership, issues);
|
|
210
|
+
}
|
|
211
|
+
return ownership;
|
|
212
|
+
}
|
|
213
|
+
function trimCommentClose(value) {
|
|
214
|
+
return value.replace(/\s*(?:\*\/|-->)\s*$/, '').trim();
|
|
215
|
+
}
|
|
216
|
+
function scanSourceFile(workspaceRoot, path, ownership, markers, issues) {
|
|
217
|
+
let content;
|
|
218
|
+
try {
|
|
219
|
+
content = (0, node_fs_1.readFileSync)(path, 'utf8');
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
issues.push({
|
|
223
|
+
code: 'unreadable-path',
|
|
224
|
+
line: 1,
|
|
225
|
+
message: `cannot read source file: ${error instanceof Error ? error.message : String(error)}`,
|
|
226
|
+
path: toWorkspacePath(workspaceRoot, path),
|
|
227
|
+
});
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (content.includes('\0'))
|
|
231
|
+
return;
|
|
232
|
+
const workspacePath = toWorkspacePath(workspaceRoot, path);
|
|
233
|
+
const pathOwnership = ownership.get((0, node_path_1.resolve)(path)) ?? 'user-owned';
|
|
234
|
+
const lines = content.split(/\r?\n/);
|
|
235
|
+
lines.forEach((line, index) => {
|
|
236
|
+
const comment = MARKER_LINE_PATTERN.exec(line)?.groups?.content;
|
|
237
|
+
if (!comment || !comment.includes('EBK-'))
|
|
238
|
+
return;
|
|
239
|
+
const candidate = trimCommentClose(comment);
|
|
240
|
+
const markerKind = MARKER_KIND_PATTERN.exec(candidate)?.groups?.kind;
|
|
241
|
+
// Vocabulary names can appear in prose. Only the two marker-shaped forms
|
|
242
|
+
// are executable attempts: EBK-KIND(...) and the malformed EBK-KIND: form.
|
|
243
|
+
if (!markerKind)
|
|
244
|
+
return;
|
|
245
|
+
if (!exports.WORK_MARKER_KINDS.includes(markerKind)) {
|
|
246
|
+
issues.push({
|
|
247
|
+
code: 'unknown-marker-kind',
|
|
248
|
+
line: index + 1,
|
|
249
|
+
message: `EBK-${markerKind} is not in the framework marker vocabulary`,
|
|
250
|
+
path: workspacePath,
|
|
251
|
+
});
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
const match = MARKER_PATTERN.exec(candidate);
|
|
255
|
+
const reference = match?.groups?.reference?.trim();
|
|
256
|
+
const description = match?.groups?.description?.trim();
|
|
257
|
+
if (!match ||
|
|
258
|
+
!reference ||
|
|
259
|
+
!MARKER_REFERENCE_PATTERN.test(reference) ||
|
|
260
|
+
!description) {
|
|
261
|
+
issues.push({
|
|
262
|
+
code: 'invalid-marker-syntax',
|
|
263
|
+
line: index + 1,
|
|
264
|
+
message: 'marker must use EBK-KIND(GH:<positive-number>|PLAN:<phase>/<slug>): self-contained description',
|
|
265
|
+
path: workspacePath,
|
|
266
|
+
});
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const marker = {
|
|
270
|
+
description,
|
|
271
|
+
kind: markerKind,
|
|
272
|
+
line: index + 1,
|
|
273
|
+
ownership: pathOwnership,
|
|
274
|
+
path: workspacePath,
|
|
275
|
+
reference,
|
|
276
|
+
};
|
|
277
|
+
markers.push(marker);
|
|
278
|
+
if (pathOwnership === 'managed') {
|
|
279
|
+
issues.push({
|
|
280
|
+
code: 'managed-file-marker',
|
|
281
|
+
line: marker.line,
|
|
282
|
+
message: 'work markers are permitted only in seeded or user-owned files; report a managed framework defect outside the generated file',
|
|
283
|
+
path: workspacePath,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
function compareLocations(left, right) {
|
|
289
|
+
return left.path.localeCompare(right.path) || left.line - right.line;
|
|
290
|
+
}
|
|
291
|
+
function scanWorkMarkers(root) {
|
|
292
|
+
const workspaceRoot = (0, node_path_1.resolve)(root);
|
|
293
|
+
let isDirectory = false;
|
|
294
|
+
try {
|
|
295
|
+
isDirectory = (0, node_fs_1.statSync)(workspaceRoot).isDirectory();
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
// Use the stable contract error below.
|
|
299
|
+
}
|
|
300
|
+
if (!isDirectory) {
|
|
301
|
+
throw new Error(`Work-marker root is not a directory: ${root}`);
|
|
302
|
+
}
|
|
303
|
+
const issues = [];
|
|
304
|
+
const { ownershipRecords, sourceFiles } = walkWorkspace(workspaceRoot, issues);
|
|
305
|
+
const markers = [];
|
|
306
|
+
const ownership = readOwnership(workspaceRoot, ownershipRecords, issues);
|
|
307
|
+
for (const path of sourceFiles) {
|
|
308
|
+
scanSourceFile(workspaceRoot, path, ownership, markers, issues);
|
|
309
|
+
}
|
|
310
|
+
markers.sort(compareLocations);
|
|
311
|
+
issues.sort(compareLocations);
|
|
312
|
+
return {
|
|
313
|
+
blockingMarkers: markers.filter((marker) => marker.kind === 'SECURITY' || marker.kind === 'BLOCKER'),
|
|
314
|
+
issues,
|
|
315
|
+
markers,
|
|
316
|
+
root: workspaceRoot,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function formatWorkMarkerComment(input) {
|
|
320
|
+
if (!exports.WORK_MARKER_KINDS.includes(input.kind)) {
|
|
321
|
+
throw new Error(`Unknown EBK work-marker kind: ${String(input.kind)}`);
|
|
322
|
+
}
|
|
323
|
+
const reference = input.reference.trim();
|
|
324
|
+
if (!MARKER_REFERENCE_PATTERN.test(reference)) {
|
|
325
|
+
throw new Error('EBK work-marker reference must be GH:<positive-number> or PLAN:<phase>/<slug>.');
|
|
326
|
+
}
|
|
327
|
+
const description = input.description.trim();
|
|
328
|
+
if (description === '' || /[\r\n]/.test(description)) {
|
|
329
|
+
throw new Error('EBK work-marker description must be non-empty and remain on one line.');
|
|
330
|
+
}
|
|
331
|
+
const commentPrefix = input.commentPrefix ?? '//';
|
|
332
|
+
if (!WORK_MARKER_COMMENT_PREFIXES.includes(commentPrefix)) {
|
|
333
|
+
throw new Error('EBK work-marker comment prefix must be //, #, --, /*, or <!--.');
|
|
334
|
+
}
|
|
335
|
+
const commentClose = commentPrefix === '/*' ? ' */' : commentPrefix === '<!--' ? ' -->' : '';
|
|
336
|
+
return `${commentPrefix} EBK-${input.kind}(${reference}): ${description}${commentClose}`;
|
|
337
|
+
}
|
|
338
|
+
function formatWorkMarkerReport(report) {
|
|
339
|
+
const lines = [
|
|
340
|
+
`[ebk-work-markers] ${report.markers.length} open marker(s); ${report.issues.length} validation issue(s); ${report.blockingMarkers.length} protected-promotion blocker(s).`,
|
|
341
|
+
];
|
|
342
|
+
for (const marker of report.markers) {
|
|
343
|
+
lines.push(` ${marker.path}:${marker.line} EBK-${marker.kind}(${marker.reference}) [${marker.ownership}] ${marker.description}`);
|
|
344
|
+
}
|
|
345
|
+
for (const issue of report.issues) {
|
|
346
|
+
lines.push(` ERROR ${issue.path}:${issue.line} ${issue.code}: ${issue.message}`);
|
|
347
|
+
}
|
|
348
|
+
return lines.join('\n');
|
|
349
|
+
}
|
|
350
|
+
function assertWorkMarkerReport(report, options = {}) {
|
|
351
|
+
const failures = report.issues.map((issue) => `${issue.path}:${issue.line} ${issue.code}: ${issue.message}`);
|
|
352
|
+
if (options.protectedPromotion) {
|
|
353
|
+
failures.push(...report.blockingMarkers.map((marker) => `${marker.path}:${marker.line} EBK-${marker.kind}(${marker.reference}) blocks protected deploy and refresh`));
|
|
354
|
+
}
|
|
355
|
+
if (failures.length > 0) {
|
|
356
|
+
throw new Error(`EBK work-marker validation failed:\n${failures.join('\n')}`);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
//# sourceMappingURL=work-markers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-markers.js","sourceRoot":"","sources":["../../../../../packages/nx/src/work-markers/work-markers.ts"],"names":[],"mappings":";;;AAmYA,0CA+BC;AAED,0DAyBC;AAED,wDAeC;AAED,wDAoBC;AApeD,qCAA2E;AAC3E,yCAA2E;AAC3E,oDAM+B;AAElB,QAAA,iBAAiB,GAAG;IAC/B,MAAM;IACN,YAAY;IACZ,UAAU;IACV,UAAU;IACV,SAAS;CACD,CAAC;AAgDX,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,QAAQ;IACR,MAAM;IACN,OAAO;IACP,KAAK;IACL,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,OAAO;IACP,UAAU;IACV,MAAM;IACN,cAAc;IACd,KAAK;CACN,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,OAAO;IACP,IAAI;IACJ,KAAK;IACL,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,UAAU;IACV,IAAI;IACJ,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,aAAa;IACb,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,OAAO;IACP,KAAK;IACL,MAAM;IACN,SAAS;IACT,QAAQ;IACR,KAAK;IACL,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;CACP,CA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