@mks2508/better-logger 5.0.1 → 5.0.2
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/Logger.d.ts +976 -0
- package/dist/Logger.d.ts.map +1 -0
- package/dist/ScopedLogger.d.ts +74 -0
- package/dist/ScopedLogger.d.ts.map +1 -0
- package/dist/chunks/Logger-CKqzXDh3.js +2 -0
- package/dist/chunks/Logger-CKqzXDh3.js.map +1 -0
- package/dist/chunks/Logger-D_vuKP4l.js +4511 -0
- package/dist/chunks/Logger-D_vuKP4l.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
- package/dist/chunks/cli-module-B-njrTWb.js +2 -0
- package/dist/chunks/cli-module-B-njrTWb.js.map +1 -0
- package/dist/chunks/cli-module-Cx7qotPY.js +390 -0
- package/dist/chunks/cli-module-Cx7qotPY.js.map +1 -0
- package/dist/chunks/color-converter-CCSQRztd.js +2 -0
- package/dist/chunks/color-converter-CCSQRztd.js.map +1 -0
- package/dist/chunks/color-converter-_Xdmsy7E.js +462 -0
- package/dist/chunks/color-converter-_Xdmsy7E.js.map +1 -0
- package/dist/chunks/environment-C1xxvc8l.js +1127 -0
- package/dist/chunks/environment-C1xxvc8l.js.map +1 -0
- package/dist/chunks/environment-Cprkw3g9.js +4 -0
- package/dist/chunks/environment-Cprkw3g9.js.map +1 -0
- package/dist/chunks/formatting-DMJxYq9o.js +380 -0
- package/dist/chunks/formatting-DMJxYq9o.js.map +1 -0
- package/dist/chunks/formatting-DpKxCsXq.js +2 -0
- package/dist/chunks/formatting-DpKxCsXq.js.map +1 -0
- package/dist/cli/CommandProcessor.d.ts +100 -0
- package/dist/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/cli/commands/ConfigCommand.d.ts +14 -0
- package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/cli/commands/ExportCommand.d.ts +48 -0
- package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/cli/commands/HistoryCommand.d.ts +47 -0
- package/dist/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/cli/commands/StatusCommand.d.ts +30 -0
- package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/cli/commands/ThemeCommand.d.ts +30 -0
- package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/cli/help.d.ts +12 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/{src/cli-module.ts → dist/cli-module.d.ts} +2 -8
- package/dist/cli-module.d.ts.map +1 -0
- package/dist/cli-primitives/box.d.ts +11 -0
- package/dist/cli-primitives/box.d.ts.map +1 -0
- package/dist/cli-primitives/cli-table.d.ts +11 -0
- package/dist/cli-primitives/cli-table.d.ts.map +1 -0
- package/dist/cli-primitives/divider.d.ts +11 -0
- package/dist/cli-primitives/divider.d.ts.map +1 -0
- package/dist/cli-primitives/header.d.ts +12 -0
- package/dist/cli-primitives/header.d.ts.map +1 -0
- package/{src/cli-primitives/index.ts → dist/cli-primitives/index.d.ts} +1 -1
- package/dist/cli-primitives/index.d.ts.map +1 -0
- package/dist/cli-primitives/server-fallback.d.ts +25 -0
- package/dist/cli-primitives/server-fallback.d.ts.map +1 -0
- package/dist/cli-primitives/spinner.d.ts +47 -0
- package/dist/cli-primitives/spinner.d.ts.map +1 -0
- package/dist/cli-primitives/step.d.ts +11 -0
- package/dist/cli-primitives/step.d.ts.map +1 -0
- package/dist/cli.cjs +2 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.js +12 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.d.ts +235 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/core.cjs +2 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.ts +127 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +291 -0
- package/dist/core.js.map +1 -0
- package/dist/example.d.ts +18 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/exports-module.d.ts +196 -0
- package/dist/exports-module.d.ts.map +1 -0
- package/dist/exports.cjs +2 -0
- package/dist/exports.cjs.map +1 -0
- package/dist/exports.js +238 -0
- package/dist/exports.js.map +1 -0
- package/dist/handlers/AnalyticsLogHandler.d.ts +8 -0
- package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/handlers/ExportLogHandler.d.ts +100 -0
- package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/handlers/FileLogHandler.d.ts +33 -0
- package/dist/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/handlers/RemoteLogHandler.d.ts +11 -0
- package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/{src/handlers/index.ts → dist/handlers/index.d.ts} +2 -2
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/hooks/HookManager.d.ts +21 -0
- package/dist/hooks/HookManager.d.ts.map +1 -0
- package/{src/hooks/index.ts → dist/hooks/index.d.ts} +1 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +161 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +627 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/serializers/SerializerRegistry.d.ts +16 -0
- package/dist/serializers/SerializerRegistry.d.ts.map +1 -0
- package/{src/serializers/index.ts → dist/serializers/index.d.ts} +1 -0
- package/dist/serializers/index.d.ts.map +1 -0
- package/dist/styling/LogStyleBuilder.d.ts +146 -0
- package/dist/styling/LogStyleBuilder.d.ts.map +1 -0
- package/dist/styling/SemanticStyles.d.ts +178 -0
- package/dist/styling/SemanticStyles.d.ts.map +1 -0
- package/dist/styling/SmartPresets.d.ts +22 -0
- package/dist/styling/SmartPresets.d.ts.map +1 -0
- package/dist/styling/StyleBuilder.d.ts +140 -0
- package/dist/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/styling/StyleCache.d.ts +42 -0
- package/dist/styling/StyleCache.d.ts.map +1 -0
- package/dist/styling/banners.d.ts +42 -0
- package/dist/styling/banners.d.ts.map +1 -0
- package/dist/styling/index.d.ts +10 -0
- package/dist/styling/index.d.ts.map +1 -0
- package/dist/styling/themes.d.ts +7 -0
- package/dist/styling/themes.d.ts.map +1 -0
- package/dist/styling-module.d.ts +178 -0
- package/dist/styling-module.d.ts.map +1 -0
- package/dist/styling.cjs +2 -0
- package/dist/styling.cjs.map +1 -0
- package/dist/styling.js +146 -0
- package/dist/styling.js.map +1 -0
- package/dist/terminal/color-converter.d.ts +73 -0
- package/dist/terminal/color-converter.d.ts.map +1 -0
- package/dist/terminal/formatter.d.ts +20 -0
- package/dist/terminal/formatter.d.ts.map +1 -0
- package/dist/terminal/terminal-renderer.d.ts +77 -0
- package/dist/terminal/terminal-renderer.d.ts.map +1 -0
- package/dist/transports/ConsoleTransport.d.ts +9 -0
- package/dist/transports/ConsoleTransport.d.ts.map +1 -0
- package/dist/transports/FileTransport.d.ts +15 -0
- package/dist/transports/FileTransport.d.ts.map +1 -0
- package/dist/transports/HttpTransport.d.ts +16 -0
- package/dist/transports/HttpTransport.d.ts.map +1 -0
- package/dist/transports/TransportManager.d.ts +14 -0
- package/dist/transports/TransportManager.d.ts.map +1 -0
- package/{src/transports/index.ts → dist/transports/index.d.ts} +1 -0
- package/dist/transports/index.d.ts.map +1 -0
- package/{src/types/core.ts → dist/types/core.d.ts} +25 -62
- package/dist/types/core.d.ts.map +1 -0
- package/{src/types/handlers.ts → dist/types/handlers.d.ts} +5 -15
- package/dist/types/handlers.d.ts.map +1 -0
- package/{src/types/hooks.ts → dist/types/hooks.d.ts} +3 -12
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/{src/types/serializers.ts → dist/types/serializers.d.ts} +1 -6
- package/dist/types/serializers.d.ts.map +1 -0
- package/{src/types/transports.ts → dist/types/transports.d.ts} +2 -7
- package/dist/types/transports.d.ts.map +1 -0
- package/dist/utils/adapter.d.ts +48 -0
- package/dist/utils/adapter.d.ts.map +1 -0
- package/dist/utils/ansi-colors.d.ts +156 -0
- package/dist/utils/ansi-colors.d.ts.map +1 -0
- package/dist/utils/environment-detector.d.ts +45 -0
- package/dist/utils/environment-detector.d.ts.map +1 -0
- package/dist/utils/environment.d.ts +47 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/formatting.d.ts +58 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/opentui-detection.d.ts +34 -0
- package/dist/utils/opentui-detection.d.ts.map +1 -0
- package/dist/utils/output.d.ts +46 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/stackTrace.d.ts +6 -0
- package/dist/utils/stackTrace.d.ts.map +1 -0
- package/dist/utils/timestamps.d.ts +20 -0
- package/dist/utils/timestamps.d.ts.map +1 -0
- package/{src/writers/BufferWriter.ts → dist/writers/BufferWriter.d.ts} +16 -77
- package/dist/writers/BufferWriter.d.ts.map +1 -0
- package/{src/writers/index.ts → dist/writers/index.d.ts} +1 -1
- package/dist/writers/index.d.ts.map +1 -0
- package/package.json +5 -1
- package/.claude/settings.local.json +0 -48
- package/.github/workflows/ci-quality.yml +0 -357
- package/.github/workflows/docs-demo.yml +0 -119
- package/.github/workflows/releases-core.yml +0 -512
- package/.github/workflows/releases-full.yml +0 -582
- package/.github/workflows-backup/ci.yml +0 -221
- package/.github/workflows-backup/nightly.yml +0 -196
- package/.github/workflows-backup/release-optimized.yml +0 -373
- package/.github/workflows-backup/release.yml +0 -269
- package/.release-notes-0.2.0.md +0 -129
- package/.yamllint +0 -28
- package/CHANGELOG.json +0 -1120
- package/CHANGELOG.md +0 -209
- package/CLAUDE.md +0 -217
- package/demo.html +0 -847
- package/docs/API.md +0 -918
- package/docs/CORE.md +0 -264
- package/docs/DEVELOPMENT.md +0 -731
- package/docs/EXPORTS.md +0 -467
- package/docs/PACKAGES.md +0 -244
- package/docs/STYLING.md +0 -405
- package/docs/_config.yml +0 -36
- package/docs/index.md +0 -179
- package/examples/README.md +0 -208
- package/examples/basic-logging.js +0 -75
- package/examples/data-export.js +0 -234
- package/examples/package.json +0 -16
- package/examples/performance-timing.js +0 -170
- package/examples/simplified-api.js +0 -124
- package/examples/styling-themes.js +0 -207
- package/index.html +0 -358
- package/packages/core/package.json +0 -57
- package/packages/exports/package.json +0 -41
- package/packages/nodejs-opentui/README.md +0 -232
- package/packages/nodejs-opentui/package.json +0 -72
- package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
- package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
- package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
- package/packages/nodejs-opentui/src/index.ts +0 -133
- package/packages/nodejs-opentui/src/types.ts +0 -158
- package/packages/nodejs-opentui/tsconfig.json +0 -20
- package/packages/styling/package.json +0 -41
- package/playground/demo-all.ts +0 -95
- package/playground/demo-box.ts +0 -85
- package/playground/demo-levels.ts +0 -56
- package/playground/demo-real-world.ts +0 -98
- package/playground/demo-spinner.ts +0 -77
- package/playground/demo-steps.ts +0 -72
- package/playground/demo-table.ts +0 -83
- package/project-utils/README.md +0 -172
- package/project-utils/auto-release-gemini.ts +0 -1193
- package/project-utils/auto-release-ui.ts +0 -1329
- package/project-utils/commit-generator.ts +0 -1385
- package/project-utils/commit-ui.ts +0 -264
- package/project-utils/git-utils.ts +0 -199
- package/project-utils/github-release-manager.ts +0 -466
- package/project-utils/project-config.ts +0 -260
- package/project-utils/prompt-templates.js +0 -345
- package/project-utils/prompt-templates.ts +0 -422
- package/project-utils/version-manager.ts +0 -1078
- package/src/Logger.ts +0 -1858
- package/src/ScopedLogger.ts +0 -256
- package/src/cli/CommandProcessor.ts +0 -248
- package/src/cli/commands/ConfigCommand.ts +0 -93
- package/src/cli/commands/ExportCommand.ts +0 -276
- package/src/cli/commands/HistoryCommand.ts +0 -117
- package/src/cli/commands/StatusCommand.ts +0 -112
- package/src/cli/commands/ThemeCommand.ts +0 -88
- package/src/cli/help.ts +0 -127
- package/src/cli/index.ts +0 -71
- package/src/cli-primitives/box.ts +0 -86
- package/src/cli-primitives/cli-table.ts +0 -62
- package/src/cli-primitives/divider.ts +0 -17
- package/src/cli-primitives/header.ts +0 -18
- package/src/cli-primitives/server-fallback.ts +0 -54
- package/src/cli-primitives/spinner.ts +0 -133
- package/src/cli-primitives/step.ts +0 -22
- package/src/constants.ts +0 -313
- package/src/core.ts +0 -397
- package/src/example.ts +0 -210
- package/src/exports-module.ts +0 -311
- package/src/handlers/AnalyticsLogHandler.ts +0 -22
- package/src/handlers/ExportLogHandler.ts +0 -610
- package/src/handlers/FileLogHandler.ts +0 -169
- package/src/handlers/RemoteLogHandler.ts +0 -42
- package/src/hooks/HookManager.ts +0 -177
- package/src/index.ts +0 -395
- package/src/main.ts +0 -196
- package/src/serializers/SerializerRegistry.ts +0 -173
- package/src/style.css +0 -96
- package/src/styling/LogStyleBuilder.ts +0 -355
- package/src/styling/SemanticStyles.ts +0 -380
- package/src/styling/SmartPresets.ts +0 -288
- package/src/styling/StyleBuilder.ts +0 -319
- package/src/styling/StyleCache.ts +0 -131
- package/src/styling/banners.ts +0 -168
- package/src/styling/index.ts +0 -27
- package/src/styling/themes.ts +0 -235
- package/src/styling-module.ts +0 -244
- package/src/terminal/color-converter.ts +0 -315
- package/src/terminal/formatter.ts +0 -242
- package/src/terminal/terminal-renderer.ts +0 -342
- package/src/transports/ConsoleTransport.ts +0 -28
- package/src/transports/FileTransport.ts +0 -53
- package/src/transports/HttpTransport.ts +0 -56
- package/src/transports/TransportManager.ts +0 -130
- package/src/types/index.ts +0 -83
- package/src/typescript.svg +0 -1
- package/src/utils/adapter.ts +0 -291
- package/src/utils/ansi-colors.ts +0 -333
- package/src/utils/environment-detector.ts +0 -170
- package/src/utils/environment.ts +0 -94
- package/src/utils/formatting.ts +0 -332
- package/src/utils/index.ts +0 -33
- package/src/utils/opentui-detection.ts +0 -138
- package/src/utils/output.ts +0 -227
- package/src/utils/stackTrace.ts +0 -144
- package/src/utils/timestamps.ts +0 -80
- package/src/vite-env.d.ts +0 -1
- package/test-core-browser.html +0 -237
- package/test-core-node.js +0 -63
- package/tests/test-conflict-resolution.ts +0 -391
- package/tests/validate-workflows.sh +0 -131
- package/tests/yaml-autofix.sh +0 -146
- package/tsconfig.json +0 -50
- package/vite.config.ts +0 -256
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Script de validación de workflows YAML
|
|
4
|
-
# Valida sintaxis y estructura de workflows de GitHub Actions
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
echo "🔍 Validando workflows YAML..."
|
|
9
|
-
|
|
10
|
-
WORKFLOW_DIR=".github/workflows"
|
|
11
|
-
EXIT_CODE=0
|
|
12
|
-
|
|
13
|
-
# Función para validar un archivo YAML
|
|
14
|
-
validate_yaml() {
|
|
15
|
-
local file="$1"
|
|
16
|
-
echo "📄 Validando: $file"
|
|
17
|
-
|
|
18
|
-
# Validar sintaxis YAML básica
|
|
19
|
-
if command -v yamllint >/dev/null 2>&1; then
|
|
20
|
-
echo " 🔧 Verificando sintaxis con yamllint..."
|
|
21
|
-
if yamllint -c .yamllint "$file"; then
|
|
22
|
-
echo " ✅ Sintaxis YAML válida"
|
|
23
|
-
else
|
|
24
|
-
echo " ❌ Error de sintaxis YAML"
|
|
25
|
-
EXIT_CODE=1
|
|
26
|
-
fi
|
|
27
|
-
else
|
|
28
|
-
echo " ⚠️ yamllint no disponible, saltando validación de sintaxis"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Validar estructura de workflow específica
|
|
32
|
-
echo " 🔍 Verificando estructura de workflow..."
|
|
33
|
-
|
|
34
|
-
# Verificar elementos obligatorios
|
|
35
|
-
if ! grep -q "^name:" "$file"; then
|
|
36
|
-
echo " ❌ Falta campo 'name'"
|
|
37
|
-
EXIT_CODE=1
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
if ! grep -q "^on:" "$file"; then
|
|
41
|
-
echo " ❌ Falta campo 'on'"
|
|
42
|
-
EXIT_CODE=1
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
if ! grep -q "^jobs:" "$file"; then
|
|
46
|
-
echo " ❌ Falta campo 'jobs'"
|
|
47
|
-
EXIT_CODE=1
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
# Verificar concurrency control en workflows de release
|
|
51
|
-
if [[ "$file" == *"release"* ]]; then
|
|
52
|
-
if ! grep -q "^concurrency:" "$file"; then
|
|
53
|
-
echo " ❌ Workflow de release falta concurrency control"
|
|
54
|
-
EXIT_CODE=1
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
if ! grep -q "group: release-pipeline-" "$file"; then
|
|
58
|
-
echo " ❌ Falta group correcto en concurrency"
|
|
59
|
-
EXIT_CODE=1
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
if ! grep -q "cancel-in-progress: true" "$file"; then
|
|
63
|
-
echo " ❌ Falta cancel-in-progress en concurrency"
|
|
64
|
-
EXIT_CODE=1
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
echo " ✅ Concurrency control verificado"
|
|
68
|
-
fi
|
|
69
|
-
|
|
70
|
-
# Verificar estrategia anti-conflictos en releases
|
|
71
|
-
if [[ "$file" == *"release"* ]]; then
|
|
72
|
-
if grep -q "git fetch origin" "$file" &&
|
|
73
|
-
grep -q "git rebase" "$file" &&
|
|
74
|
-
grep -q "MAX_RETRIES" "$file"; then
|
|
75
|
-
echo " ✅ Estrategia anti-conflictos verificada"
|
|
76
|
-
else
|
|
77
|
-
echo " ❌ Estrategia anti-conflictos incompleta"
|
|
78
|
-
EXIT_CODE=1
|
|
79
|
-
fi
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
# Verificar integración project-utils en releases
|
|
83
|
-
if [[ "$file" == *"release"* ]]; then
|
|
84
|
-
if grep -q "bun project-utils/commit-generator.ts" "$file" &&
|
|
85
|
-
grep -q "RELEASE_WORKFLOW=true" "$file"; then
|
|
86
|
-
echo " ✅ Integración project-utils verificada"
|
|
87
|
-
else
|
|
88
|
-
echo " ❌ Integración project-utils incompleta"
|
|
89
|
-
EXIT_CODE=1
|
|
90
|
-
fi
|
|
91
|
-
fi
|
|
92
|
-
|
|
93
|
-
echo " ✅ Validación de $file completada"
|
|
94
|
-
echo ""
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
# Verificar que existe el directorio de workflows
|
|
98
|
-
if [ ! -d "$WORKFLOW_DIR" ]; then
|
|
99
|
-
echo "❌ Directorio $WORKFLOW_DIR no encontrado"
|
|
100
|
-
exit 1
|
|
101
|
-
fi
|
|
102
|
-
|
|
103
|
-
# Validar todos los archivos YAML en el directorio
|
|
104
|
-
echo "🚀 Iniciando validación de workflows..."
|
|
105
|
-
echo ""
|
|
106
|
-
|
|
107
|
-
for file in "$WORKFLOW_DIR"/*.yml "$WORKFLOW_DIR"/*.yaml; do
|
|
108
|
-
if [ -f "$file" ]; then
|
|
109
|
-
validate_yaml "$file"
|
|
110
|
-
fi
|
|
111
|
-
done
|
|
112
|
-
|
|
113
|
-
# Resumen final
|
|
114
|
-
echo "============================================================"
|
|
115
|
-
echo "📊 RESUMEN DE VALIDACIÓN YAML"
|
|
116
|
-
echo "============================================================"
|
|
117
|
-
|
|
118
|
-
if [ $EXIT_CODE -eq 0 ]; then
|
|
119
|
-
echo "✅ TODOS LOS WORKFLOWS SON VÁLIDOS"
|
|
120
|
-
echo "🎉 Sintaxis YAML correcta"
|
|
121
|
-
echo "🎉 Estructura de workflows completa"
|
|
122
|
-
echo "🎉 Concurrency control implementado"
|
|
123
|
-
echo "🎉 Estrategias anti-conflictos verificadas"
|
|
124
|
-
echo "🎉 Integración project-utils confirmada"
|
|
125
|
-
else
|
|
126
|
-
echo "❌ SE ENCONTRARON ERRORES EN WORKFLOWS"
|
|
127
|
-
echo "⚠️ Revisar los mensajes de error anteriores"
|
|
128
|
-
fi
|
|
129
|
-
|
|
130
|
-
echo "============================================================"
|
|
131
|
-
exit $EXIT_CODE
|
package/tests/yaml-autofix.sh
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Script de auto-fix para archivos YAML
|
|
4
|
-
# Corrige automáticamente problemas comunes de sintaxis y formato
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
echo "🔧 Auto-fixing YAML files..."
|
|
9
|
-
|
|
10
|
-
WORKFLOW_DIR=".github/workflows"
|
|
11
|
-
EXIT_CODE=0
|
|
12
|
-
FIXED_FILES=0
|
|
13
|
-
|
|
14
|
-
# Función para auto-fix un archivo YAML
|
|
15
|
-
autofix_yaml() {
|
|
16
|
-
local file="$1"
|
|
17
|
-
echo "🔧 Auto-fixing: $file"
|
|
18
|
-
|
|
19
|
-
local temp_file=$(mktemp)
|
|
20
|
-
local changes_made=false
|
|
21
|
-
|
|
22
|
-
# 1. Remover trailing spaces
|
|
23
|
-
if sed 's/[[:space:]]*$//' "$file" > "$temp_file"; then
|
|
24
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
25
|
-
echo " ✓ Removed trailing spaces"
|
|
26
|
-
changes_made=true
|
|
27
|
-
fi
|
|
28
|
-
cp "$temp_file" "$file"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# 2. Corregir líneas demasiado largas en comentarios
|
|
32
|
-
if sed -E 's/^([[:space:]]*#.{75}).+$/\1.../' "$file" > "$temp_file"; then
|
|
33
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
34
|
-
echo " ✓ Truncated long comment lines"
|
|
35
|
-
changes_made=true
|
|
36
|
-
fi
|
|
37
|
-
cp "$temp_file" "$file"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# 3. Escapar emojis y caracteres especiales en names
|
|
41
|
-
if sed -E 's/^([[:space:]]*- name: )([^"]*[🔧📄🚀✅❌⚠️🎉📋🔄📥📦🏗️🧪🤖🏷️📤][^"]*)/\1"\2"/' "$file" > "$temp_file"; then
|
|
42
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
43
|
-
echo " ✓ Quoted names with special characters"
|
|
44
|
-
changes_made=true
|
|
45
|
-
fi
|
|
46
|
-
cp "$temp_file" "$file"
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
# 4. Normalizar boolean values (on -> true/false)
|
|
50
|
-
if sed -E 's/^([[:space:]]*[a-zA-Z_-]+:[[:space:]]*)on([[:space:]]*$)/\1true\2/' "$file" > "$temp_file"; then
|
|
51
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
52
|
-
echo " ✓ Normalized boolean values"
|
|
53
|
-
changes_made=true
|
|
54
|
-
fi
|
|
55
|
-
cp "$temp_file" "$file"
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# 5. Corregir indentación básica (2 spaces)
|
|
59
|
-
if sed -E 's/^( )+/ /' "$file" > "$temp_file"; then
|
|
60
|
-
# Solo aplicar si mejora la indentación
|
|
61
|
-
if yamllint --format parsable "$temp_file" 2>/dev/null | grep -q "wrong indentation"; then
|
|
62
|
-
# Revertir si empeora
|
|
63
|
-
cp "$file" "$temp_file"
|
|
64
|
-
else
|
|
65
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
66
|
-
echo " ✓ Fixed basic indentation"
|
|
67
|
-
changes_made=true
|
|
68
|
-
fi
|
|
69
|
-
fi
|
|
70
|
-
cp "$temp_file" "$file"
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
# 6. Skip advanced line splitting for now (needs improvement)
|
|
74
|
-
# TODO: Implement smarter line breaking for YAML multiline strings
|
|
75
|
-
|
|
76
|
-
# Cleanup
|
|
77
|
-
rm -f "$temp_file"
|
|
78
|
-
|
|
79
|
-
if [ "$changes_made" = true ]; then
|
|
80
|
-
echo " ✅ Auto-fixes applied to $file"
|
|
81
|
-
FIXED_FILES=$((FIXED_FILES + 1))
|
|
82
|
-
else
|
|
83
|
-
echo " ℹ️ No fixes needed for $file"
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# Validar después de los fixes
|
|
87
|
-
if command -v yamllint >/dev/null 2>&1; then
|
|
88
|
-
if yamllint "$file" >/dev/null 2>&1; then
|
|
89
|
-
echo " ✅ YAML syntax valid after fixes"
|
|
90
|
-
else
|
|
91
|
-
echo " ⚠️ Manual intervention may be needed"
|
|
92
|
-
EXIT_CODE=1
|
|
93
|
-
fi
|
|
94
|
-
fi
|
|
95
|
-
|
|
96
|
-
echo ""
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
# Verificar que existe el directorio de workflows
|
|
100
|
-
if [ ! -d "$WORKFLOW_DIR" ]; then
|
|
101
|
-
echo "❌ Directorio $WORKFLOW_DIR no encontrado"
|
|
102
|
-
exit 1
|
|
103
|
-
fi
|
|
104
|
-
|
|
105
|
-
# Auto-fix todos los archivos YAML en el directorio
|
|
106
|
-
echo "🚀 Starting YAML auto-fix..."
|
|
107
|
-
echo ""
|
|
108
|
-
|
|
109
|
-
for file in "$WORKFLOW_DIR"/*.yml "$WORKFLOW_DIR"/*.yaml; do
|
|
110
|
-
if [ -f "$file" ]; then
|
|
111
|
-
autofix_yaml "$file"
|
|
112
|
-
fi
|
|
113
|
-
done
|
|
114
|
-
|
|
115
|
-
# También fix archivos YAML en root si existen
|
|
116
|
-
for file in .yamllint .github/dependabot.yml; do
|
|
117
|
-
if [ -f "$file" ]; then
|
|
118
|
-
autofix_yaml "$file"
|
|
119
|
-
fi
|
|
120
|
-
done
|
|
121
|
-
|
|
122
|
-
# Resumen final
|
|
123
|
-
echo "============================================================"
|
|
124
|
-
echo "🔧 YAML AUTO-FIX SUMMARY"
|
|
125
|
-
echo "============================================================"
|
|
126
|
-
echo "📄 Files processed: $(find "$WORKFLOW_DIR" -name "*.yml" -o -name "*.yaml" | wc -l | tr -d ' ')"
|
|
127
|
-
echo "🔧 Files fixed: $FIXED_FILES"
|
|
128
|
-
|
|
129
|
-
if [ $EXIT_CODE -eq 0 ]; then
|
|
130
|
-
echo "✅ ALL FILES AUTO-FIXED SUCCESSFULLY"
|
|
131
|
-
echo "💡 Run 'npm run validate:workflows' to verify fixes"
|
|
132
|
-
else
|
|
133
|
-
echo "⚠️ SOME FILES MAY NEED MANUAL INTERVENTION"
|
|
134
|
-
echo "💡 Check yamllint output for remaining issues"
|
|
135
|
-
fi
|
|
136
|
-
|
|
137
|
-
echo "============================================================"
|
|
138
|
-
|
|
139
|
-
# Mostrar comandos útiles
|
|
140
|
-
echo ""
|
|
141
|
-
echo "🚀 Next steps:"
|
|
142
|
-
echo " npm run lint:yaml # Check syntax"
|
|
143
|
-
echo " npm run validate:workflows # Full validation"
|
|
144
|
-
echo " git diff # Review changes"
|
|
145
|
-
|
|
146
|
-
exit $EXIT_CODE
|
package/tsconfig.json
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Library Build Configuration */
|
|
10
|
-
"declaration": true,
|
|
11
|
-
"declarationMap": true,
|
|
12
|
-
"outDir": "dist",
|
|
13
|
-
"rootDir": "src",
|
|
14
|
-
"emitDeclarationOnly": false,
|
|
15
|
-
|
|
16
|
-
/* Module System */
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true,
|
|
19
|
-
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"isolatedModules": true,
|
|
21
|
-
"moduleDetection": "force",
|
|
22
|
-
"verbatimModuleSyntax": false,
|
|
23
|
-
|
|
24
|
-
/* Type Checking */
|
|
25
|
-
"strict": true,
|
|
26
|
-
"noImplicitAny": true,
|
|
27
|
-
"strictNullChecks": true,
|
|
28
|
-
"strictFunctionTypes": true,
|
|
29
|
-
"noImplicitReturns": true,
|
|
30
|
-
"noFallthroughCasesInSwitch": true,
|
|
31
|
-
"noUncheckedIndexedAccess": true,
|
|
32
|
-
|
|
33
|
-
/* Advanced */
|
|
34
|
-
"resolveJsonModule": true,
|
|
35
|
-
"allowImportingTsExtensions": false,
|
|
36
|
-
"noEmit": false,
|
|
37
|
-
"incremental": true,
|
|
38
|
-
"tsBuildInfoFile": "./dist/.tsbuildinfo"
|
|
39
|
-
},
|
|
40
|
-
"include": [
|
|
41
|
-
"src/**/*"
|
|
42
|
-
],
|
|
43
|
-
"exclude": [
|
|
44
|
-
"node_modules",
|
|
45
|
-
"dist",
|
|
46
|
-
"**/*.test.ts",
|
|
47
|
-
"**/*.spec.ts",
|
|
48
|
-
"**/*.d.ts"
|
|
49
|
-
]
|
|
50
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { defineConfig, UserConfig } from 'vite'
|
|
2
|
-
import { resolve } from 'path'
|
|
3
|
-
import dts from 'vite-plugin-dts'
|
|
4
|
-
|
|
5
|
-
// Configuración base compartida
|
|
6
|
-
const baseConfig = {
|
|
7
|
-
plugins: [
|
|
8
|
-
dts({
|
|
9
|
-
include: ['src/**/*'],
|
|
10
|
-
exclude: ['src/**/*.test.ts', 'src/**/*.spec.ts', 'src/main.ts', 'src/example.ts'],
|
|
11
|
-
rollupTypes: true,
|
|
12
|
-
insertTypesEntry: true,
|
|
13
|
-
})
|
|
14
|
-
],
|
|
15
|
-
define: {
|
|
16
|
-
'process.env.NODE_ENV': JSON.stringify('production')
|
|
17
|
-
},
|
|
18
|
-
build: {
|
|
19
|
-
sourcemap: true,
|
|
20
|
-
minify: 'terser',
|
|
21
|
-
terserOptions: {
|
|
22
|
-
compress: {
|
|
23
|
-
drop_console: false,
|
|
24
|
-
drop_debugger: true,
|
|
25
|
-
pure_funcs: ['console.debug'],
|
|
26
|
-
passes: 2
|
|
27
|
-
},
|
|
28
|
-
mangle: {
|
|
29
|
-
properties: false,
|
|
30
|
-
keep_classnames: true,
|
|
31
|
-
keep_fnames: true
|
|
32
|
-
},
|
|
33
|
-
format: {
|
|
34
|
-
comments: false,
|
|
35
|
-
preserve_annotations: true
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
target: 'es2022'
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Configuraciones específicas por build
|
|
43
|
-
const buildConfigs = {
|
|
44
|
-
// Build completa - Incluye todas las funcionalidades
|
|
45
|
-
full: {
|
|
46
|
-
...baseConfig,
|
|
47
|
-
plugins: [
|
|
48
|
-
dts({
|
|
49
|
-
...baseConfig.plugins[0].options,
|
|
50
|
-
outDir: 'dist',
|
|
51
|
-
})
|
|
52
|
-
],
|
|
53
|
-
build: {
|
|
54
|
-
...baseConfig.build,
|
|
55
|
-
outDir: 'dist',
|
|
56
|
-
lib: {
|
|
57
|
-
entry: {
|
|
58
|
-
index: resolve(__dirname, 'src/index.ts'),
|
|
59
|
-
core: resolve(__dirname, 'src/core.ts'),
|
|
60
|
-
cli: resolve(__dirname, 'src/cli-module.ts'),
|
|
61
|
-
styling: resolve(__dirname, 'src/styling-module.ts'),
|
|
62
|
-
exports: resolve(__dirname, 'src/exports-module.ts')
|
|
63
|
-
},
|
|
64
|
-
name: 'BetterLogger',
|
|
65
|
-
formats: ['es', 'cjs'],
|
|
66
|
-
fileName: (format, entryName) => {
|
|
67
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
68
|
-
return `${entryName}.${ext}`;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
rollupOptions: {
|
|
72
|
-
external: [],
|
|
73
|
-
output: {
|
|
74
|
-
globals: {},
|
|
75
|
-
exports: 'named',
|
|
76
|
-
preserveModules: false,
|
|
77
|
-
chunkFileNames: 'chunks/[name]-[hash].js'
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
// Build modular - Solo core (logger básico universal)
|
|
84
|
-
core: {
|
|
85
|
-
...baseConfig,
|
|
86
|
-
plugins: [
|
|
87
|
-
dts({
|
|
88
|
-
...baseConfig.plugins[0].options,
|
|
89
|
-
outDir: 'packages/core/dist/types',
|
|
90
|
-
include: ['src/core.ts', 'src/constants.ts', 'src/types/**/*', 'src/utils/**/*'],
|
|
91
|
-
})
|
|
92
|
-
],
|
|
93
|
-
build: {
|
|
94
|
-
...baseConfig.build,
|
|
95
|
-
outDir: 'packages/core/dist',
|
|
96
|
-
lib: {
|
|
97
|
-
entry: resolve(__dirname, 'src/core.ts'),
|
|
98
|
-
name: 'BetterLoggerCore',
|
|
99
|
-
formats: ['es', 'cjs', 'umd'],
|
|
100
|
-
fileName: (format) => {
|
|
101
|
-
if (format === 'cjs') return 'index.cjs';
|
|
102
|
-
if (format === 'es') return 'index.js';
|
|
103
|
-
if (format === 'umd') return 'index.umd.js';
|
|
104
|
-
return 'index.js';
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
rollupOptions: {
|
|
108
|
-
// External dependencies for Node.js
|
|
109
|
-
external: (id) => {
|
|
110
|
-
// Mark Node.js built-ins as external
|
|
111
|
-
return ['fs', 'path', 'process', 'util'].includes(id);
|
|
112
|
-
},
|
|
113
|
-
output: [
|
|
114
|
-
{
|
|
115
|
-
format: 'es',
|
|
116
|
-
entryFileNames: 'index.js',
|
|
117
|
-
globals: {
|
|
118
|
-
fs: 'fs',
|
|
119
|
-
path: 'path',
|
|
120
|
-
process: 'process',
|
|
121
|
-
util: 'util'
|
|
122
|
-
},
|
|
123
|
-
exports: 'named'
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
format: 'cjs',
|
|
127
|
-
entryFileNames: 'index.cjs',
|
|
128
|
-
globals: {
|
|
129
|
-
fs: 'fs',
|
|
130
|
-
path: 'path',
|
|
131
|
-
process: 'process',
|
|
132
|
-
util: 'util'
|
|
133
|
-
},
|
|
134
|
-
exports: 'named'
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
format: 'umd',
|
|
138
|
-
name: 'BetterLoggerCore',
|
|
139
|
-
entryFileNames: 'index.umd.js',
|
|
140
|
-
globals: {
|
|
141
|
-
fs: 'fs',
|
|
142
|
-
path: 'path',
|
|
143
|
-
process: 'process',
|
|
144
|
-
util: 'util'
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
// Build modular - Solo styling (características visuales)
|
|
153
|
-
styling: {
|
|
154
|
-
...baseConfig,
|
|
155
|
-
plugins: [
|
|
156
|
-
dts({
|
|
157
|
-
...baseConfig.plugins[0].options,
|
|
158
|
-
outDir: 'packages/styling/dist/types',
|
|
159
|
-
include: ['src/styling-module.ts', 'src/constants.ts', 'src/types/**/*'],
|
|
160
|
-
})
|
|
161
|
-
],
|
|
162
|
-
build: {
|
|
163
|
-
...baseConfig.build,
|
|
164
|
-
outDir: 'packages/styling/dist',
|
|
165
|
-
lib: {
|
|
166
|
-
entry: resolve(__dirname, 'src/styling-module.ts'),
|
|
167
|
-
name: 'BetterLoggerStyling',
|
|
168
|
-
formats: ['es', 'cjs'],
|
|
169
|
-
fileName: (format) => {
|
|
170
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
171
|
-
return `index.${ext}`;
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
rollupOptions: {
|
|
175
|
-
external: [],
|
|
176
|
-
output: {
|
|
177
|
-
globals: {},
|
|
178
|
-
exports: 'named'
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
// Build modular - Solo exports (handlers de exportación)
|
|
185
|
-
exports: {
|
|
186
|
-
...baseConfig,
|
|
187
|
-
plugins: [
|
|
188
|
-
dts({
|
|
189
|
-
...baseConfig.plugins[0].options,
|
|
190
|
-
outDir: 'packages/exports/dist/types',
|
|
191
|
-
include: ['src/exports-module.ts', 'src/constants.ts', 'src/types/**/*'],
|
|
192
|
-
})
|
|
193
|
-
],
|
|
194
|
-
build: {
|
|
195
|
-
...baseConfig.build,
|
|
196
|
-
outDir: 'packages/exports/dist',
|
|
197
|
-
lib: {
|
|
198
|
-
entry: resolve(__dirname, 'src/exports-module.ts'),
|
|
199
|
-
name: 'BetterLoggerExports',
|
|
200
|
-
formats: ['es', 'cjs'],
|
|
201
|
-
fileName: (format) => {
|
|
202
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
203
|
-
return `index.${ext}`;
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
rollupOptions: {
|
|
207
|
-
external: [],
|
|
208
|
-
output: {
|
|
209
|
-
globals: {},
|
|
210
|
-
exports: 'named'
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
// Build modular - Solo CLI primitives (spinners, boxes, tables, steps)
|
|
217
|
-
cli: {
|
|
218
|
-
...baseConfig,
|
|
219
|
-
plugins: [
|
|
220
|
-
dts({
|
|
221
|
-
...baseConfig.plugins[0].options,
|
|
222
|
-
outDir: 'packages/cli/dist/types',
|
|
223
|
-
include: ['src/cli-module.ts', 'src/cli-primitives/**/*', 'src/types/**/*', 'src/terminal/**/*', 'src/utils/environment-detector.ts'],
|
|
224
|
-
})
|
|
225
|
-
],
|
|
226
|
-
build: {
|
|
227
|
-
...baseConfig.build,
|
|
228
|
-
outDir: 'packages/cli/dist',
|
|
229
|
-
lib: {
|
|
230
|
-
entry: resolve(__dirname, 'src/cli-module.ts'),
|
|
231
|
-
name: 'BetterLoggerCLI',
|
|
232
|
-
formats: ['es', 'cjs'],
|
|
233
|
-
fileName: (format) => {
|
|
234
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
235
|
-
return `index.${ext}`;
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
rollupOptions: {
|
|
239
|
-
external: [],
|
|
240
|
-
output: {
|
|
241
|
-
globals: {},
|
|
242
|
-
exports: 'named'
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
// Determinar configuración según variable de entorno
|
|
250
|
-
const buildMode = process.env.BUILD_MODE || 'full';
|
|
251
|
-
|
|
252
|
-
if (!buildConfigs[buildMode]) {
|
|
253
|
-
throw new Error(`Build mode "${buildMode}" not found. Available modes: ${Object.keys(buildConfigs).join(', ')}`);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export default defineConfig(buildConfigs[buildMode] as UserConfig);
|
|
File without changes
|