@lumenflow/core 2.2.0 → 2.2.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/wu-constants.d.ts +2 -0
- package/dist/wu-constants.js +61 -4
- package/dist/wu-done-preflight.js +1 -1
- package/package.json +2 -2
package/dist/wu-constants.d.ts
CHANGED
|
@@ -1186,6 +1186,8 @@ export declare const AUDIT_ARGS: {
|
|
|
1186
1186
|
* Centralized paths to validation scripts.
|
|
1187
1187
|
*/
|
|
1188
1188
|
export declare const SCRIPT_PATHS: {
|
|
1189
|
+
/** Gates runner */
|
|
1190
|
+
GATES: string;
|
|
1189
1191
|
/** WU YAML validation */
|
|
1190
1192
|
VALIDATE: string;
|
|
1191
1193
|
/** Prompt registry validation */
|
package/dist/wu-constants.js
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* @see {@link tools/lib/wu-schema.mjs} - PLACEHOLDER_SENTINEL (already centralized)
|
|
13
13
|
*/
|
|
14
14
|
import path from 'node:path';
|
|
15
|
+
import { existsSync } from 'node:fs';
|
|
16
|
+
import { createRequire } from 'node:module';
|
|
15
17
|
import { kebabCase } from 'change-case';
|
|
16
18
|
/**
|
|
17
19
|
* Git branch names
|
|
@@ -1000,16 +1002,63 @@ export const GATE_COMMANDS = {
|
|
|
1000
1002
|
/** WU-2062: Triggers tiered test execution based on risk */
|
|
1001
1003
|
TIERED_TEST: 'tiered-test',
|
|
1002
1004
|
};
|
|
1005
|
+
const require = createRequire(import.meta.url);
|
|
1006
|
+
const NOOP_NODE_COMMAND = 'node -e "process.exit(0)"';
|
|
1007
|
+
function resolveNodeModulePath(modulePath) {
|
|
1008
|
+
try {
|
|
1009
|
+
return require.resolve(modulePath);
|
|
1010
|
+
}
|
|
1011
|
+
catch {
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
function resolveRepoPath(relativePath, requireExists = false) {
|
|
1016
|
+
const candidate = path.join(process.cwd(), relativePath);
|
|
1017
|
+
if (requireExists && !existsSync(candidate)) {
|
|
1018
|
+
return null;
|
|
1019
|
+
}
|
|
1020
|
+
return candidate;
|
|
1021
|
+
}
|
|
1022
|
+
function buildNodeCommand({ modulePath, repoPath, allowMissing = false, repoPathRequiresExistence = false, }) {
|
|
1023
|
+
const resolved = modulePath ? resolveNodeModulePath(modulePath) : null;
|
|
1024
|
+
if (resolved) {
|
|
1025
|
+
return `node ${resolved}`;
|
|
1026
|
+
}
|
|
1027
|
+
const fallback = repoPath ? resolveRepoPath(repoPath, repoPathRequiresExistence) : null;
|
|
1028
|
+
if (fallback) {
|
|
1029
|
+
return `node ${fallback}`;
|
|
1030
|
+
}
|
|
1031
|
+
if (allowMissing) {
|
|
1032
|
+
return NOOP_NODE_COMMAND;
|
|
1033
|
+
}
|
|
1034
|
+
if (repoPath) {
|
|
1035
|
+
return `node ${resolveRepoPath(repoPath)}`;
|
|
1036
|
+
}
|
|
1037
|
+
if (modulePath) {
|
|
1038
|
+
return `node ${modulePath}`;
|
|
1039
|
+
}
|
|
1040
|
+
return NOOP_NODE_COMMAND;
|
|
1041
|
+
}
|
|
1003
1042
|
/**
|
|
1004
1043
|
* Tool paths for scripts
|
|
1005
1044
|
*
|
|
1006
1045
|
* Centralized paths to tool scripts.
|
|
1007
1046
|
*/
|
|
1008
1047
|
export const TOOL_PATHS = {
|
|
1009
|
-
VALIDATE_BACKLOG_SYNC:
|
|
1010
|
-
|
|
1048
|
+
VALIDATE_BACKLOG_SYNC: buildNodeCommand({
|
|
1049
|
+
modulePath: '@lumenflow/cli/dist/validate-backlog-sync.js',
|
|
1050
|
+
repoPath: 'packages/@lumenflow/cli/dist/validate-backlog-sync.js',
|
|
1051
|
+
}),
|
|
1052
|
+
SUPABASE_DOCS_LINTER: buildNodeCommand({
|
|
1053
|
+
repoPath: 'packages/linters/supabase-docs-linter.js',
|
|
1054
|
+
allowMissing: true,
|
|
1055
|
+
repoPathRequiresExistence: true,
|
|
1056
|
+
}),
|
|
1011
1057
|
/** WU-2315: System map validator script */
|
|
1012
|
-
SYSTEM_MAP_VALIDATE:
|
|
1058
|
+
SYSTEM_MAP_VALIDATE: buildNodeCommand({
|
|
1059
|
+
modulePath: '@lumenflow/core/dist/system-map-validator.js',
|
|
1060
|
+
repoPath: 'packages/@lumenflow/core/dist/system-map-validator.js',
|
|
1061
|
+
}),
|
|
1013
1062
|
};
|
|
1014
1063
|
/**
|
|
1015
1064
|
* CLI mode flags
|
|
@@ -1229,8 +1278,16 @@ export const AUDIT_ARGS = {
|
|
|
1229
1278
|
* Centralized paths to validation scripts.
|
|
1230
1279
|
*/
|
|
1231
1280
|
export const SCRIPT_PATHS = {
|
|
1281
|
+
/** Gates runner */
|
|
1282
|
+
GATES: buildNodeCommand({
|
|
1283
|
+
modulePath: '@lumenflow/cli/dist/gates.js',
|
|
1284
|
+
repoPath: 'packages/@lumenflow/cli/dist/gates.js',
|
|
1285
|
+
}),
|
|
1232
1286
|
/** WU YAML validation */
|
|
1233
|
-
VALIDATE:
|
|
1287
|
+
VALIDATE: buildNodeCommand({
|
|
1288
|
+
modulePath: '@lumenflow/cli/dist/validate.js',
|
|
1289
|
+
repoPath: 'packages/@lumenflow/cli/dist/validate.js',
|
|
1290
|
+
}),
|
|
1234
1291
|
/** Prompt registry validation */
|
|
1235
1292
|
VALIDATE_PROMPT_REGISTRY: 'tools/validate-prompt-registry.js',
|
|
1236
1293
|
};
|
|
@@ -165,7 +165,7 @@ export function validateAllPreCommitHooks(id, worktreePath = null, options = {})
|
|
|
165
165
|
execOptions.cwd = worktreePath;
|
|
166
166
|
}
|
|
167
167
|
// WU-1139: Run CLI gates directly (removes stub scripts)
|
|
168
|
-
execSyncFn(
|
|
168
|
+
execSyncFn(SCRIPT_PATHS.GATES, execOptions);
|
|
169
169
|
console.log(`${LOG_PREFIX.DONE} ${EMOJI.SUCCESS} All pre-commit hooks passed`);
|
|
170
170
|
return { valid: true, errors: [] };
|
|
171
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumenflow/core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Core WU lifecycle tools for LumenFlow workflow framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lumenflow",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"vitest": "^4.0.17"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@lumenflow/memory": "2.2.
|
|
98
|
+
"@lumenflow/memory": "2.2.1"
|
|
99
99
|
},
|
|
100
100
|
"peerDependenciesMeta": {
|
|
101
101
|
"@lumenflow/memory": {
|