pumuki 6.3.341 → 6.3.342
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.342",
|
|
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": {
|
|
@@ -73,6 +73,9 @@ const stripTechnicalFieldsFromMessage = (message: string): string => {
|
|
|
73
73
|
const localizeDeveloperText = (value: string): string => {
|
|
74
74
|
const normalized = normalizeNotificationText(value);
|
|
75
75
|
const knownTexts: ReadonlyArray<[RegExp, string]> = [
|
|
76
|
+
[/Dynamic Type - Font scaling autom[aá]tico/iu, 'Dynamic Type: tamaño de fuente fijo sin escala dinámica.'],
|
|
77
|
+
[/Dynamic Type - fuentes escalables y layouts adaptativos/iu, 'Dynamic Type: fuente fija o layout no preparado para tamaños de texto del sistema.'],
|
|
78
|
+
[/Use semantic SwiftUI text styles such as \.headline\/\.body, Font\.TextStyle, or UIFontMetrics\/scaled metrics when a custom size is required\./iu, 'Usa estilos semánticos de SwiftUI como .headline o .body. Si necesitas un tamaño custom, escálalo con Font.TextStyle o UIFontMetrics.'],
|
|
76
79
|
[/Disallow empty catch blocks in backend runtime code\./iu, 'Catch vacío en código backend runtime.'],
|
|
77
80
|
[/Action handlers should reference methods, not contain inline logic/iu, 'El handler contiene lógica inline; debe llamar a un método o comando del view model.'],
|
|
78
81
|
[/Ensure constant number of views per ForEach element/iu, 'Cada elemento de ForEach debe devolver una estructura de vistas estable.'],
|
|
@@ -134,6 +134,7 @@ const humanizeRuleId = (ruleId: string): string => {
|
|
|
134
134
|
'no-wait-for-expectations': 'waitForExpectations en XCTest',
|
|
135
135
|
'ios-test-quality': 'calidad de tests iOS',
|
|
136
136
|
'dynamic-type-font-scaling-automatico': 'Dynamic Type',
|
|
137
|
+
'dynamic-type-font-scaling-automa-tico': 'Dynamic Type',
|
|
137
138
|
'dynamic-type-fuentes-escalables-y-layouts-adaptativos': 'fuentes escalables y layouts adaptativos',
|
|
138
139
|
'use-relative-layout-over-hard-coded-constants': 'layout relativo en vez de constantes fijas',
|
|
139
140
|
'magic-numbers-usar-constantes-con-nombres': 'números mágicos sin constantes con nombre',
|
|
@@ -146,10 +147,15 @@ const humanizeRuleId = (ruleId: string): string => {
|
|
|
146
147
|
.replace(/_/gu, '-');
|
|
147
148
|
const parts = normalized.split('.').filter(Boolean);
|
|
148
149
|
const leaf = parts.at(-1) ?? normalized;
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
const compactLeaf = leaf.replace(/-+/gu, '-');
|
|
151
|
+
const accentlessLeaf = compactLeaf.normalize('NFD').replace(/[\u0300-\u036f]/gu, '');
|
|
152
|
+
if (knownRules[compactLeaf]) {
|
|
153
|
+
return knownRules[compactLeaf];
|
|
151
154
|
}
|
|
152
|
-
|
|
155
|
+
if (knownRules[accentlessLeaf]) {
|
|
156
|
+
return knownRules[accentlessLeaf];
|
|
157
|
+
}
|
|
158
|
+
return compactLeaf
|
|
153
159
|
.replace(/-/gu, ' ')
|
|
154
160
|
.replace(/\bios\b/giu, 'iOS')
|
|
155
161
|
.replace(/\bui\b/giu, 'UI')
|
|
@@ -160,6 +166,21 @@ const humanizeRuleId = (ruleId: string): string => {
|
|
|
160
166
|
.trim();
|
|
161
167
|
};
|
|
162
168
|
|
|
169
|
+
const localizeDeveloperText = (value: string): string => {
|
|
170
|
+
const normalized = normalizeNotificationText(value);
|
|
171
|
+
const knownTexts: ReadonlyArray<[RegExp, string]> = [
|
|
172
|
+
[/Dynamic Type - Font scaling autom[aá]tico/iu, 'Dynamic Type: tamaño de fuente fijo sin escala dinámica.'],
|
|
173
|
+
[/Dynamic Type - fuentes escalables y layouts adaptativos/iu, 'Dynamic Type: fuente fija o layout no preparado para tamaños de texto del sistema.'],
|
|
174
|
+
[/Use semantic SwiftUI text styles such as \.headline\/\.body, Font\.TextStyle, or UIFontMetrics\/scaled metrics when a custom size is required\./iu, 'Usa estilos semánticos de SwiftUI como .headline o .body. Si necesitas un tamaño custom, escálalo con Font.TextStyle o UIFontMetrics.'],
|
|
175
|
+
];
|
|
176
|
+
for (const [pattern, replacement] of knownTexts) {
|
|
177
|
+
if (pattern.test(normalized)) {
|
|
178
|
+
return replacement;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return normalized;
|
|
182
|
+
};
|
|
183
|
+
|
|
163
184
|
const formatVisibleRule = (cause: BlockedCause): string => {
|
|
164
185
|
const ruleId = formatCauseRule(cause);
|
|
165
186
|
const readable = humanizeRuleId(ruleId);
|
|
@@ -188,13 +209,13 @@ const stripTechnicalFieldsFromMessage = (message: string): string =>
|
|
|
188
209
|
const formatCauseProblem = (cause: BlockedCause): string => {
|
|
189
210
|
const messageField = extractMessageField(cause.message, 'message');
|
|
190
211
|
if (messageField) {
|
|
191
|
-
return messageField;
|
|
212
|
+
return localizeDeveloperText(messageField);
|
|
192
213
|
}
|
|
193
|
-
return stripTechnicalFieldsFromMessage(cause.message) || cause.code;
|
|
214
|
+
return localizeDeveloperText(stripTechnicalFieldsFromMessage(cause.message) || cause.code);
|
|
194
215
|
};
|
|
195
216
|
|
|
196
217
|
const formatCauseFix = (cause: BlockedCause): string =>
|
|
197
|
-
|
|
218
|
+
localizeDeveloperText(
|
|
198
219
|
cause.remediation ??
|
|
199
220
|
'Corrige la violación indicada con regla, fichero y línea, y vuelve a intentar el commit.'
|
|
200
221
|
);
|