@mks2508/better-logger 5.0.0 → 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.
Files changed (162) hide show
  1. package/dist/chunks/{Logger-Cbi1f10o.js → Logger-CKqzXDh3.js} +2 -2
  2. package/dist/chunks/{Logger-Cbi1f10o.js.map → Logger-CKqzXDh3.js.map} +1 -1
  3. package/dist/chunks/{Logger-BZ7B7OXE.js → Logger-D_vuKP4l.js} +2 -2
  4. package/dist/chunks/{Logger-BZ7B7OXE.js.map → Logger-D_vuKP4l.js.map} +1 -1
  5. package/dist/chunks/cli-module-B-njrTWb.js +2 -0
  6. package/dist/chunks/cli-module-B-njrTWb.js.map +1 -0
  7. package/dist/chunks/{cli-module-ClIJmaT8.js → cli-module-Cx7qotPY.js} +16 -9
  8. package/dist/chunks/cli-module-Cx7qotPY.js.map +1 -0
  9. package/dist/cli.cjs +1 -1
  10. package/dist/cli.js +1 -1
  11. package/dist/exports.cjs +1 -1
  12. package/dist/exports.js +1 -1
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.js +3 -3
  15. package/dist/styling.cjs +1 -1
  16. package/dist/styling.js +2 -2
  17. package/dist/terminal/formatter.d.ts.map +1 -1
  18. package/package.json +5 -1
  19. package/.claude/settings.local.json +0 -48
  20. package/.github/workflows/ci-quality.yml +0 -357
  21. package/.github/workflows/docs-demo.yml +0 -119
  22. package/.github/workflows/releases-core.yml +0 -512
  23. package/.github/workflows/releases-full.yml +0 -582
  24. package/.github/workflows-backup/ci.yml +0 -221
  25. package/.github/workflows-backup/nightly.yml +0 -196
  26. package/.github/workflows-backup/release-optimized.yml +0 -373
  27. package/.github/workflows-backup/release.yml +0 -269
  28. package/.release-notes-0.2.0.md +0 -129
  29. package/.yamllint +0 -28
  30. package/CHANGELOG.json +0 -1076
  31. package/CHANGELOG.md +0 -209
  32. package/CLAUDE.md +0 -217
  33. package/bun.lock +0 -333
  34. package/demo.html +0 -847
  35. package/dist/chunks/cli-module-CadqgZ1Z.js +0 -2
  36. package/dist/chunks/cli-module-CadqgZ1Z.js.map +0 -1
  37. package/dist/chunks/cli-module-ClIJmaT8.js.map +0 -1
  38. package/docs/API.md +0 -918
  39. package/docs/CORE.md +0 -264
  40. package/docs/DEVELOPMENT.md +0 -731
  41. package/docs/EXPORTS.md +0 -467
  42. package/docs/PACKAGES.md +0 -244
  43. package/docs/STYLING.md +0 -405
  44. package/docs/_config.yml +0 -36
  45. package/docs/index.md +0 -179
  46. package/examples/README.md +0 -208
  47. package/examples/basic-logging.js +0 -75
  48. package/examples/data-export.js +0 -234
  49. package/examples/package.json +0 -16
  50. package/examples/performance-timing.js +0 -170
  51. package/examples/simplified-api.js +0 -124
  52. package/examples/styling-themes.js +0 -207
  53. package/index.html +0 -358
  54. package/packages/core/package.json +0 -57
  55. package/packages/exports/package.json +0 -41
  56. package/packages/nodejs-opentui/README.md +0 -232
  57. package/packages/nodejs-opentui/package.json +0 -72
  58. package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
  59. package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
  60. package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
  61. package/packages/nodejs-opentui/src/index.ts +0 -133
  62. package/packages/nodejs-opentui/src/types.ts +0 -158
  63. package/packages/nodejs-opentui/tsconfig.json +0 -20
  64. package/packages/styling/package.json +0 -41
  65. package/playground/demo-all.ts +0 -95
  66. package/playground/demo-box.ts +0 -85
  67. package/playground/demo-levels.ts +0 -56
  68. package/playground/demo-real-world.ts +0 -98
  69. package/playground/demo-spinner.ts +0 -77
  70. package/playground/demo-steps.ts +0 -72
  71. package/playground/demo-table.ts +0 -83
  72. package/project-utils/README.md +0 -172
  73. package/project-utils/auto-release-gemini.ts +0 -1193
  74. package/project-utils/auto-release-ui.ts +0 -1329
  75. package/project-utils/commit-generator.ts +0 -1385
  76. package/project-utils/commit-ui.ts +0 -264
  77. package/project-utils/git-utils.ts +0 -199
  78. package/project-utils/github-release-manager.ts +0 -466
  79. package/project-utils/project-config.ts +0 -260
  80. package/project-utils/prompt-templates.js +0 -345
  81. package/project-utils/prompt-templates.ts +0 -422
  82. package/project-utils/version-manager.ts +0 -1078
  83. package/public/vite.svg +0 -1
  84. package/src/Logger.ts +0 -1858
  85. package/src/ScopedLogger.ts +0 -256
  86. package/src/cli/CommandProcessor.ts +0 -248
  87. package/src/cli/commands/ConfigCommand.ts +0 -93
  88. package/src/cli/commands/ExportCommand.ts +0 -276
  89. package/src/cli/commands/HistoryCommand.ts +0 -117
  90. package/src/cli/commands/StatusCommand.ts +0 -112
  91. package/src/cli/commands/ThemeCommand.ts +0 -88
  92. package/src/cli/help.ts +0 -127
  93. package/src/cli/index.ts +0 -71
  94. package/src/cli-module.ts +0 -21
  95. package/src/cli-primitives/box.ts +0 -86
  96. package/src/cli-primitives/cli-table.ts +0 -62
  97. package/src/cli-primitives/divider.ts +0 -17
  98. package/src/cli-primitives/header.ts +0 -18
  99. package/src/cli-primitives/index.ts +0 -13
  100. package/src/cli-primitives/server-fallback.ts +0 -54
  101. package/src/cli-primitives/spinner.ts +0 -133
  102. package/src/cli-primitives/step.ts +0 -22
  103. package/src/constants.ts +0 -313
  104. package/src/core.ts +0 -397
  105. package/src/example.ts +0 -210
  106. package/src/exports-module.ts +0 -311
  107. package/src/handlers/AnalyticsLogHandler.ts +0 -22
  108. package/src/handlers/ExportLogHandler.ts +0 -610
  109. package/src/handlers/FileLogHandler.ts +0 -169
  110. package/src/handlers/RemoteLogHandler.ts +0 -42
  111. package/src/handlers/index.ts +0 -8
  112. package/src/hooks/HookManager.ts +0 -177
  113. package/src/hooks/index.ts +0 -1
  114. package/src/index.ts +0 -395
  115. package/src/main.ts +0 -196
  116. package/src/serializers/SerializerRegistry.ts +0 -173
  117. package/src/serializers/index.ts +0 -1
  118. package/src/style.css +0 -96
  119. package/src/styling/LogStyleBuilder.ts +0 -355
  120. package/src/styling/SemanticStyles.ts +0 -380
  121. package/src/styling/SmartPresets.ts +0 -288
  122. package/src/styling/StyleBuilder.ts +0 -319
  123. package/src/styling/StyleCache.ts +0 -131
  124. package/src/styling/banners.ts +0 -168
  125. package/src/styling/index.ts +0 -27
  126. package/src/styling/themes.ts +0 -235
  127. package/src/styling-module.ts +0 -244
  128. package/src/terminal/color-converter.ts +0 -315
  129. package/src/terminal/formatter.ts +0 -236
  130. package/src/terminal/terminal-renderer.ts +0 -342
  131. package/src/transports/ConsoleTransport.ts +0 -28
  132. package/src/transports/FileTransport.ts +0 -53
  133. package/src/transports/HttpTransport.ts +0 -56
  134. package/src/transports/TransportManager.ts +0 -130
  135. package/src/transports/index.ts +0 -4
  136. package/src/types/core.ts +0 -417
  137. package/src/types/handlers.ts +0 -95
  138. package/src/types/hooks.ts +0 -45
  139. package/src/types/index.ts +0 -83
  140. package/src/types/serializers.ts +0 -30
  141. package/src/types/transports.ts +0 -52
  142. package/src/typescript.svg +0 -1
  143. package/src/utils/adapter.ts +0 -291
  144. package/src/utils/ansi-colors.ts +0 -333
  145. package/src/utils/environment-detector.ts +0 -170
  146. package/src/utils/environment.ts +0 -94
  147. package/src/utils/formatting.ts +0 -332
  148. package/src/utils/index.ts +0 -33
  149. package/src/utils/opentui-detection.ts +0 -138
  150. package/src/utils/output.ts +0 -227
  151. package/src/utils/stackTrace.ts +0 -144
  152. package/src/utils/timestamps.ts +0 -80
  153. package/src/vite-env.d.ts +0 -1
  154. package/src/writers/BufferWriter.ts +0 -157
  155. package/src/writers/index.ts +0 -6
  156. package/test-core-browser.html +0 -237
  157. package/test-core-node.js +0 -63
  158. package/tests/test-conflict-resolution.ts +0 -391
  159. package/tests/validate-workflows.sh +0 -131
  160. package/tests/yaml-autofix.sh +0 -146
  161. package/tsconfig.json +0 -50
  162. package/vite.config.ts +0 -256
@@ -1,512 +0,0 @@
1
- ---
2
- name: Core Modular Releases - AI Enhanced (Manual Only)
3
-
4
- on:
5
- workflow_dispatch:
6
- inputs:
7
- module:
8
- description: 'Módulo a construir y publicar'
9
- required: true
10
- default: 'all'
11
- type: choice
12
- options:
13
- - all
14
- - core
15
- - styling
16
- - exports
17
- - full
18
- version_type:
19
- description: 'Tipo de versión'
20
- required: false
21
- default: 'auto'
22
- type: choice
23
- options:
24
- - auto
25
- - patch
26
- - minor
27
- - major
28
- version_prefix:
29
- description: 'Prefijo de versión'
30
- required: false
31
- default: 'stable'
32
- type: choice
33
- options:
34
- - stable
35
- - alpha
36
- - beta
37
- - rc
38
- target_registry:
39
- description: 'Registro objetivo'
40
- required: false
41
- default: 'both'
42
- type: choice
43
- options:
44
- - npm
45
- - github
46
- - both
47
- skip_tests:
48
- description: 'Saltar tests (no recomendado)'
49
- required: false
50
- default: false
51
- type: boolean
52
-
53
- # Concurrency control para evitar conflictos con otros releases
54
- concurrency:
55
- group: release-pipeline-${{ github.ref }}
56
- cancel-in-progress: true
57
-
58
- env:
59
- NODE_VERSION: '20'
60
-
61
- jobs:
62
- # ===== STEP 1: AI VERSION ANALYSIS FOR MODULAR RELEASE =====
63
- ai-modular-version:
64
- runs-on: ubuntu-latest
65
- permissions:
66
- contents: write
67
-
68
- outputs:
69
- version: ${{ steps.version.outputs.version }}
70
- tag: ${{ steps.version.outputs.tag }}
71
- is_prerelease: ${{ steps.version.outputs.is_prerelease }}
72
- release_channel: ${{ steps.version.outputs.release_channel }}
73
- modules_to_build: ${{ steps.modules.outputs.modules }}
74
-
75
- steps:
76
- - name: "📥 Checkout code"
77
- uses: actions/checkout@v4
78
- with:
79
- fetch-depth: 0
80
- token: ${{ secrets.GITHUB_TOKEN }}
81
-
82
- - name: "📦 Setup Bun"
83
- uses: oven-sh/setup-bun@v2
84
- with:
85
- bun-version: latest
86
-
87
- - name: "🔧 Install dependencies"
88
- run: bun install --frozen-lockfile
89
-
90
- - name: "🤖 Setup Gemini CLI"
91
- run: |
92
- echo "🤖 Configurando Gemini CLI para release modular..."
93
- # Install Gemini CLI
94
- npm install -g @google/generative-ai
95
- # Verificar instalación
96
- echo "✅ Gemini CLI configurado para módulos"
97
- env:
98
- GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
99
-
100
- - name: "🤖 Step 1: AI Version Analysis for Modular Release"
101
- id: version
102
- run: |
103
- echo "🤖 === PASO 1: ANÁLISIS AI PARA RELEASE MODULAR ==="
104
-
105
- # Configurar contexto específico para release modular
106
- WORK_TYPE="modular-release"
107
- AFFECTED_COMPONENTS="${{ inputs.module }}"
108
- CONTEXT="Modular release for ${{ inputs.module }} module(s)"
109
-
110
- VERSION_TYPE="${{ inputs.version_type }}"
111
- VERSION_PREFIX="${{ inputs.version_prefix }}"
112
-
113
- # Preparar argumentos para version-manager con contexto de módulos
114
- ARGS="--auto-approve"
115
-
116
- if [ "$VERSION_TYPE" != "auto" ]; then
117
- ARGS="$ARGS --type $VERSION_TYPE"
118
- fi
119
-
120
- if [ "$VERSION_PREFIX" != "stable" ]; then
121
- ARGS="$ARGS --prefix $VERSION_PREFIX"
122
- fi
123
-
124
- echo "📋 Ejecutando version-manager con contexto modular: $AFFECTED_COMPONENTS"
125
- echo "🚀 Comando: bun project-utils/version-manager.ts $ARGS"
126
-
127
- # Ejecutar version-manager con análisis AI
128
- bun project-utils/version-manager.ts $ARGS
129
-
130
- # Obtener nueva versión
131
- NEW_VERSION=$(node -p "require('./package.json').version")
132
- echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
133
- echo "tag=v$NEW_VERSION" >> $GITHUB_OUTPUT
134
-
135
- # Determinar si es prerelease y canal
136
- case "$NEW_VERSION" in
137
- *alpha*)
138
- echo "is_prerelease=true" >> $GITHUB_OUTPUT
139
- echo "release_channel=alpha" >> $GITHUB_OUTPUT
140
- ;;
141
- *beta*)
142
- echo "is_prerelease=true" >> $GITHUB_OUTPUT
143
- echo "release_channel=beta" >> $GITHUB_OUTPUT
144
- ;;
145
- *rc*)
146
- echo "is_prerelease=true" >> $GITHUB_OUTPUT
147
- echo "release_channel=rc" >> $GITHUB_OUTPUT
148
- ;;
149
- *)
150
- echo "is_prerelease=false" >> $GITHUB_OUTPUT
151
- echo "release_channel=latest" >> $GITHUB_OUTPUT
152
- ;;
153
- esac
154
-
155
- echo "✅ Versión generada para release modular: $NEW_VERSION"
156
-
157
- - name: "📋 Step 2: Determine modules to build"
158
- id: modules
159
- run: |
160
- echo "📋 === PASO 2: DETERMINANDO MÓDULOS A CONSTRUIR ==="
161
- MODULE_INPUT="${{ inputs.module }}"
162
-
163
- case "$MODULE_INPUT" in
164
- "all")
165
- MODULES="core,styling,exports,full"
166
- ;;
167
- "full")
168
- MODULES="full"
169
- ;;
170
- *)
171
- MODULES="$MODULE_INPUT"
172
- ;;
173
- esac
174
-
175
- echo "modules=$MODULES" >> $GITHUB_OUTPUT
176
- echo "✅ Módulos a construir: $MODULES"
177
-
178
- - name: "🏷️ Commit version changes"
179
- run: |
180
- echo "🏷️ Commiteando cambios de versión modular usando project-utils con resolución automática de conflictos..."
181
-
182
- # Configurar environment variables para detectar contexto de release
183
- export RELEASE_WORKFLOW=true
184
- export GITHUB_WORKFLOW="${{ github.workflow }}"
185
-
186
- # Usar commit-generator con contexto específico de release modular
187
- echo "🤖 Usando commit-generator con detección automática de conflictos para módulo ${{ inputs.module }}..."
188
- bun project-utils/commit-generator.ts \
189
- --context "modular release ${{ steps.version.outputs.version }} (${{ inputs.module }})" \
190
- --work-type "release" \
191
- --affected-components "${{ inputs.module }},changelog" \
192
- --auto-approve \
193
- --quiet \
194
- || {
195
- echo "⚠️ Commit-generator falló, usando estrategia de fallback..."
196
-
197
- # Fallback: estrategia manual con pull-rebase-push
198
- git config user.name "github-actions[bot]"
199
- git config user.email "github-actions[bot]@users.noreply.github.com"
200
-
201
- MAX_RETRIES=3
202
- RETRY_COUNT=0
203
-
204
- while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
205
- echo "🔄 Intento fallback $((RETRY_COUNT + 1))/$MAX_RETRIES"
206
-
207
- git fetch origin main
208
- if ! git merge-base --is-ancestor origin/main HEAD; then
209
- echo "🔄 Aplicando rebase..."
210
- git rebase origin/main || {
211
- echo "⚠️ Conflictos en rebase, aplicando reset hard"
212
- git rebase --abort
213
- git reset --hard origin/main
214
- }
215
- fi
216
-
217
- git add package.json CHANGELOG.json packages/*/package.json
218
- git commit -m "chore: modular release ${{ steps.version.outputs.version }} (${{ inputs.module }}) [skip ci]" || {
219
- echo "ℹ️ No hay cambios para commit"
220
- break
221
- }
222
-
223
- if git push origin main; then
224
- echo "✅ Push exitoso en intento fallback $((RETRY_COUNT + 1))"
225
- break
226
- else
227
- RETRY_COUNT=$((RETRY_COUNT + 1))
228
- if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
229
- sleep 5
230
- git reset --hard HEAD~1
231
- fi
232
- fi
233
- done
234
-
235
- if [ $RETRY_COUNT -ge $MAX_RETRIES ]; then
236
- echo "❌ Push falló después de $MAX_RETRIES intentos"
237
- exit 1
238
- fi
239
- }
240
-
241
- - name: "📤 Upload version artifacts"
242
- uses: actions/upload-artifact@v4
243
- with:
244
- name: modular-version-artifacts
245
- path: |
246
- project-utils/.temp/
247
- CHANGELOG.json
248
- package.json
249
- retention-days: 7
250
-
251
- # ===== STEP 2: BUILD SPECIFIED MODULES =====
252
- build-modular:
253
- runs-on: ubuntu-latest
254
- needs: ai-modular-version
255
-
256
- strategy:
257
- matrix:
258
- module: ${{ fromJson(format('["{0}"]', needs.ai-modular-version.outputs.modules_to_build)) }}
259
-
260
- steps:
261
- - name: "📥 Checkout code with version changes"
262
- uses: actions/checkout@v4
263
- with:
264
- fetch-depth: 0
265
- token: ${{ secrets.GITHUB_TOKEN }}
266
- ref: main
267
-
268
- - name: "🔄 Pull latest changes"
269
- run: git pull origin main
270
-
271
- - name: "📦 Setup Bun"
272
- uses: oven-sh/setup-bun@v2
273
- with:
274
- bun-version: latest
275
-
276
- - name: "🔧 Install dependencies"
277
- run: bun install --frozen-lockfile
278
-
279
- - name: "🧪 Run tests for module (unless skipped)"
280
- if: ${{ !inputs.skip_tests }}
281
- run: |
282
- echo "🧪 === EJECUTANDO TESTS PARA MÓDULO: ${{ matrix.module }} ==="
283
- bun run type-check
284
- bun run test
285
- echo "✅ Tests completados para ${{ matrix.module }}"
286
-
287
- - name: "🏗️ Step 3: Build specific module"
288
- run: |
289
- echo "🏗️ === PASO 3: CONSTRUYENDO MÓDULO: ${{ matrix.module }} ==="
290
-
291
- case "${{ matrix.module }}" in
292
- "core")
293
- bun run build:core
294
- echo "✅ Módulo core construido"
295
- ;;
296
- "styling")
297
- bun run build:styling
298
- echo "✅ Módulo styling construido"
299
- ;;
300
- "exports")
301
- bun run build:exports
302
- echo "✅ Módulo exports construido"
303
- ;;
304
- "full")
305
- bun run build:full
306
- echo "✅ Build completo realizado"
307
- ;;
308
- *)
309
- echo "🏗️ Construyendo todos los módulos..."
310
- bun run build:all
311
- echo "✅ Todos los módulos construidos"
312
- ;;
313
- esac
314
-
315
- # Mostrar archivos generados
316
- echo "📊 Archivos generados para ${{ matrix.module }}:"
317
- if [ "${{ matrix.module }}" == "full" ] || ["${{ matrix.module }}" == "all"]; then
318
- ls -la dist/
319
- else
320
- ls -la dist/modular/${{ matrix.module }}/ || ls -la dist/
321
- fi
322
-
323
- - name: "📤 Upload build artifacts for module"
324
- uses: actions/upload-artifact@v4
325
- with:
326
- name: build-${{ matrix.module }}-${{ needs.ai-modular-version.outputs.version }}
327
- path: |
328
- dist/
329
- retention-days: 30
330
-
331
- # ===== STEP 3: PUBLISH MODULAR RELEASES =====
332
- publish-modular:
333
- runs-on: ubuntu-latest
334
- needs: [ai-modular-version, build-modular]
335
- if: inputs.target_registry == 'npm' || inputs.target_registry == 'both'
336
-
337
- steps:
338
- - name: "📥 Checkout code"
339
- uses: actions/checkout@v4
340
- with:
341
- ref: main
342
-
343
- - name: "📦 Setup Bun with NPM registry"
344
- uses: oven-sh/setup-bun@v2
345
- with:
346
- bun-version: latest
347
- registry-url: 'https://registry.npmjs.org'
348
-
349
- - name: "📥 Download all build artifacts"
350
- uses: actions/download-artifact@v4
351
- with:
352
- pattern: build-*-${{ needs.ai-modular-version.outputs.version }}
353
- path: builds/
354
- merge-multiple: true
355
-
356
- - name: "🚀 Step 4: Publish modular releases to NPM"
357
- run: |
358
- echo "🚀 === PASO 4: PUBLICANDO RELEASES MODULARES EN NPM ==="
359
-
360
- # Determinar tag de publicación
361
- if [ "${{ needs.ai-modular-version.outputs.is_prerelease }}" = "true" ]; then
362
- PUBLISH_TAG="${{ needs.ai-modular-version.outputs.release_channel }}"
363
- echo "📦 Publicando como prerelease con tag: $PUBLISH_TAG"
364
- else
365
- PUBLISH_TAG="latest"
366
- echo "📦 Publicando como release estable"
367
- fi
368
-
369
- # Publicar dependiendo del módulo seleccionado
370
- if [ "${{ inputs.module }}" == "all" ] || ["${{ inputs.module }}" == "full"]; then
371
- echo "📦 Publicando paquete completo..."
372
- npm publish --access public --tag $PUBLISH_TAG
373
- else
374
- echo "📦 Publicando módulo específico: ${{ inputs.module }}"
375
- # Para releases modulares específicos, publicar como paquete scoped
376
- npm publish --access public --tag $PUBLISH_TAG
377
- fi
378
-
379
- echo "✅ Publicación modular completada en NPM"
380
- env:
381
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
382
-
383
- # ===== STEP 4: GITHUB PACKAGES (if selected) =====
384
- publish-github-modular:
385
- runs-on: ubuntu-latest
386
- needs: [ai-modular-version, build-modular]
387
- if: inputs.target_registry == 'github' || inputs.target_registry == 'both'
388
-
389
- steps:
390
- - name: "📥 Checkout code"
391
- uses: actions/checkout@v4
392
- with:
393
- ref: main
394
-
395
- - name: "📦 Setup Bun with GitHub registry"
396
- uses: oven-sh/setup-bun@v2
397
- with:
398
- bun-version: latest
399
- registry-url: 'https://npm.pkg.github.com'
400
-
401
- - name: "📥 Download all build artifacts"
402
- uses: actions/download-artifact@v4
403
- with:
404
- pattern: build-*-${{ needs.ai-modular-version.outputs.version }}
405
- path: builds/
406
- merge-multiple: true
407
-
408
- - name: "📦 Step 5: Publish to GitHub Packages"
409
- run: |
410
- echo "📦 === PASO 5: PUBLICANDO EN GITHUB PACKAGES ==="
411
-
412
- if [ "${{ needs.ai-modular-version.outputs.is_prerelease }}" = "true" ]; then
413
- echo "📦 Publishing prerelease to GitHub Packages with tag: ${{ needs.ai-modular-version.outputs.release_channel }}"
414
- npm publish --access public --tag ${{ needs.ai-modular-version.outputs.release_channel }}
415
- else
416
- echo "📦 Publishing stable release to GitHub Packages"
417
- npm publish --access public
418
- fi
419
- echo "✅ Publicación modular completada en GitHub Packages"
420
- env:
421
- NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
422
-
423
- # ===== STEP 5: CREATE MODULAR GITHUB RELEASE =====
424
- create-modular-release:
425
- runs-on: ubuntu-latest
426
- needs: [ai-modular-version, build-modular, publish-modular, publish-github-modular]
427
- if: always() && needs.build-modular.result == 'success'
428
-
429
- permissions:
430
- contents: write
431
-
432
- steps:
433
- - name: "📥 Checkout code"
434
- uses: actions/checkout@v4
435
- with:
436
- fetch-depth: 0
437
- ref: main
438
-
439
- - name: "📦 Setup Bun"
440
- uses: oven-sh/setup-bun@v2
441
- with:
442
- bun-version: latest
443
-
444
- - name: "🔧 Install dependencies"
445
- run: bun install --frozen-lockfile
446
-
447
- - name: "📥 Download build artifacts"
448
- uses: actions/download-artifact@v4
449
- with:
450
- pattern: build-*-${{ needs.ai-modular-version.outputs.version }}
451
- path: builds/
452
- merge-multiple: true
453
-
454
- - name: "🏷️ Create git tag for modular release"
455
- run: |
456
- echo "🏷️ Creando tag para release modular..."
457
- git config user.name "github-actions[bot]"
458
- git config user.email "github-actions[bot]@users.noreply.github.com"
459
- TAG_NAME="${{ needs.ai-modular-version.outputs.tag }}-${{ inputs.module }}"
460
- git tag -a "$TAG_NAME" -m "Modular release ${{ needs.ai-modular-version.outputs.version }} (${{ inputs.module }})"
461
- git push origin --tags
462
-
463
- - name: "🚀 Step 6: Create Modular GitHub Release with AI"
464
- run: |
465
- echo "🚀 === PASO 6: CREANDO GITHUB RELEASE MODULAR CON AI ==="
466
-
467
- # Agregar contexto de módulo al release
468
- export RELEASE_CONTEXT="Modular release for ${{ inputs.module }} module(s)"
469
- export RELEASE_MODULE="${{ inputs.module }}"
470
-
471
- bun project-utils/github-release-manager.ts --auto-approve
472
- echo "✅ GitHub Release modular creado exitosamente"
473
- env:
474
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
475
-
476
- # ===== MODULAR RELEASE SUMMARY =====
477
- modular-summary:
478
- runs-on: ubuntu-latest
479
- needs: [ai-modular-version, build-modular, publish-modular, publish-github-modular, create-modular-release]
480
- if: always()
481
-
482
- steps:
483
- - name: 📊 Modular Release Summary
484
- run: |
485
- VERSION="${{ needs.ai-modular-version.outputs.version }}"
486
- MODULE="${{ inputs.module }}"
487
- CHANNEL="${{ needs.ai-modular-version.outputs.release_channel }}"
488
- IS_PRERELEASE="${{ needs.ai-modular-version.outputs.is_prerelease }}"
489
-
490
- echo "## 🎉 Modular Release Pipeline Complete!" >> $GITHUB_STEP_SUMMARY
491
- echo "- **Version**: $VERSION" >> $GITHUB_STEP_SUMMARY
492
- echo "- **Module(s)**: $MODULE" >> $GITHUB_STEP_SUMMARY
493
- echo "- **Channel**: $CHANNEL" >> $GITHUB_STEP_SUMMARY
494
- echo "- **Prerelease**: $IS_PRERELEASE" >> $GITHUB_STEP_SUMMARY
495
- echo "" >> $GITHUB_STEP_SUMMARY
496
-
497
- echo "### 📊 Pipeline Steps Results" >> $GITHUB_STEP_SUMMARY
498
- echo "1. **AI Version Analysis**: ✅ $VERSION" >> $GITHUB_STEP_SUMMARY
499
- echo "2. **Module Build**: ${{ needs.build-modular.result }}" >> $GITHUB_STEP_SUMMARY
500
- echo "3. **NPM Publishing**: ${{ needs.publish-modular.result }}" >> $GITHUB_STEP_SUMMARY
501
- echo "4. **GitHub Packages**: ${{ needs.publish-github-modular.result }}" >> $GITHUB_STEP_SUMMARY
502
- echo "5. **GitHub Release**: ${{ needs.create-modular-release.result }}" >> $GITHUB_STEP_SUMMARY
503
- echo "" >> $GITHUB_STEP_SUMMARY
504
-
505
- echo "### 📦 Module-Specific Installation" >> $GITHUB_STEP_SUMMARY
506
- echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
507
- if [ "$IS_PRERELEASE" = "true" ]; then
508
- echo "npm install @mks2508/better-logger@$CHANNEL # $MODULE module included" >> $GITHUB_STEP_SUMMARY
509
- else
510
- echo "npm install @mks2508/better-logger # $MODULE module included" >> $GITHUB_STEP_SUMMARY
511
- fi
512
- echo "\`\`\`" >> $GITHUB_STEP_SUMMARY