pumuki 6.3.233 → 6.3.234
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/bin/_chained-pre-write.js +22 -0
- package/bin/pumuki-pre-commit.js +5 -0
- package/bin/pumuki-pre-push.js +5 -0
- package/integrations/lifecycle/audit.ts +4 -1
- package/integrations/lifecycle/hookBlock.ts +5 -2
- package/package.json +1 -1
- package/scripts/framework-menu-system-notifications-cause.ts +21 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const PRE_WRITE_ENTRY = 'integrations/lifecycle/cli.ts';
|
|
2
|
+
const PRE_WRITE_ARGS = ['sdd', 'validate', '--stage=PRE_WRITE'];
|
|
3
|
+
|
|
4
|
+
function shouldRunChainedPreWrite(env = process.env) {
|
|
5
|
+
if (env.PUMUKI_SKIP_CHAINED_PRE_WRITE === '1') {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
return env.PUMUKI_CHAINED_PRE_WRITE_DONE !== '1';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function runChainedPreWriteIfNeeded(runTsEntry, env = process.env) {
|
|
12
|
+
if (!shouldRunChainedPreWrite(env)) {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
env.PUMUKI_CHAINED_PRE_WRITE_DONE = '1';
|
|
16
|
+
return runTsEntry(PRE_WRITE_ENTRY, PRE_WRITE_ARGS);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
runChainedPreWriteIfNeeded,
|
|
21
|
+
shouldRunChainedPreWrite,
|
|
22
|
+
};
|
package/bin/pumuki-pre-commit.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { runTsEntry } = require('./_run-ts-entry');
|
|
4
|
+
const { runChainedPreWriteIfNeeded } = require('./_chained-pre-write');
|
|
4
5
|
|
|
6
|
+
const preWriteStatus = runChainedPreWriteIfNeeded(runTsEntry);
|
|
7
|
+
if (preWriteStatus !== 0) {
|
|
8
|
+
process.exit(preWriteStatus);
|
|
9
|
+
}
|
|
5
10
|
process.exit(runTsEntry('integrations/git/preCommitBackend.cli.ts', process.argv.slice(2)));
|
package/bin/pumuki-pre-push.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { runTsEntry } = require('./_run-ts-entry');
|
|
4
|
+
const { runChainedPreWriteIfNeeded } = require('./_chained-pre-write');
|
|
4
5
|
|
|
6
|
+
const preWriteStatus = runChainedPreWriteIfNeeded(runTsEntry);
|
|
7
|
+
if (preWriteStatus !== 0) {
|
|
8
|
+
process.exit(preWriteStatus);
|
|
9
|
+
}
|
|
5
10
|
process.exit(runTsEntry('integrations/git/prePushBackend.cli.ts', process.argv.slice(2)));
|
|
@@ -207,7 +207,10 @@ const resolveLifecycleAuditScope = (params: {
|
|
|
207
207
|
extensions: ReadonlyArray<string>;
|
|
208
208
|
stagedMatchingExtensions: ReadonlyArray<string>;
|
|
209
209
|
}): LifecycleAuditScope => {
|
|
210
|
-
if (
|
|
210
|
+
if (
|
|
211
|
+
(params.stage === 'PRE_WRITE' || params.stage === 'PRE_COMMIT') &&
|
|
212
|
+
params.stagedMatchingExtensions.length > 0
|
|
213
|
+
) {
|
|
211
214
|
return { kind: 'staged' };
|
|
212
215
|
}
|
|
213
216
|
if (params.stage === 'PRE_PUSH') {
|
|
@@ -33,8 +33,11 @@ const runnerLine = (
|
|
|
33
33
|
phase: ResolverPhase,
|
|
34
34
|
runner: string
|
|
35
35
|
): string => {
|
|
36
|
-
if (
|
|
37
|
-
|
|
36
|
+
if (phase === 'main') {
|
|
37
|
+
if (parentHook === 'pre-push') {
|
|
38
|
+
return ` PUMUKI_CHAINED_PRE_WRITE_DONE=1 PUMUKI_PRE_PUSH_STDIN="$PUMUKI_PRE_PUSH_STDIN" ${runner} "$@"`;
|
|
39
|
+
}
|
|
40
|
+
return ` PUMUKI_CHAINED_PRE_WRITE_DONE=1 ${runner}`;
|
|
38
41
|
}
|
|
39
42
|
return ` ${runner}`;
|
|
40
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.234",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -30,6 +30,10 @@ const BLOCKED_CAUSE_SUMMARY_BY_CODE: Readonly<Record<string, string>> = {
|
|
|
30
30
|
'Hay conflicto entre fuentes de tracking canónico.',
|
|
31
31
|
ACTIVE_RULE_IDS_EMPTY_FOR_CODE_CHANGES_HIGH:
|
|
32
32
|
'No hay reglas activas para cambios de código.',
|
|
33
|
+
EVIDENCE_PLATFORM_CRITICAL_SKILLS_RULES_MISSING:
|
|
34
|
+
'Falta enforcement crítico de skills para la plataforma detectada.',
|
|
35
|
+
EVIDENCE_SKILLS_CONTRACT_INCOMPLETE:
|
|
36
|
+
'El contrato de skills está incompleto para este stage.',
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
const ENGLISH_CAUSE_HINTS = [
|
|
@@ -53,6 +57,19 @@ const ENGLISH_CAUSE_HINTS = [
|
|
|
53
57
|
'usage.',
|
|
54
58
|
];
|
|
55
59
|
|
|
60
|
+
const PRIORITY_CODES_FROM_MESSAGE = [
|
|
61
|
+
'EVIDENCE_PLATFORM_CRITICAL_SKILLS_RULES_MISSING',
|
|
62
|
+
'EVIDENCE_SKILLS_CONTRACT_INCOMPLETE',
|
|
63
|
+
'ACTIVE_RULE_IDS_EMPTY_FOR_CODE_CHANGES_HIGH',
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
const resolvePriorityCauseFromMessage = (message?: string): string | null => {
|
|
67
|
+
if (!message) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return PRIORITY_CODES_FROM_MESSAGE.find((code) => message.includes(code)) ?? null;
|
|
71
|
+
};
|
|
72
|
+
|
|
56
73
|
const buildGenericSpanishBlockedCauseSummary = (
|
|
57
74
|
event: Extract<PumukiCriticalNotificationEvent, { kind: 'gate.blocked' }>,
|
|
58
75
|
causeCode: string
|
|
@@ -97,6 +114,10 @@ export const resolveBlockedCauseSummary = (
|
|
|
97
114
|
causeCode: string
|
|
98
115
|
): string => {
|
|
99
116
|
const trackingContext = extractNotificationTrackingContext(event.causeMessage);
|
|
117
|
+
const priorityCode = resolvePriorityCauseFromMessage(event.causeMessage);
|
|
118
|
+
if (priorityCode) {
|
|
119
|
+
return BLOCKED_CAUSE_SUMMARY_BY_CODE[priorityCode];
|
|
120
|
+
}
|
|
100
121
|
if (trackingContext) {
|
|
101
122
|
return buildNotificationTrackingCauseSummary(trackingContext);
|
|
102
123
|
}
|