@mks2508/better-logger 0.0.2-alpha.2 → 0.8.1-alpha.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.
Files changed (231) hide show
  1. package/.github/workflows/ci-quality.yml +356 -0
  2. package/.github/workflows/docs-demo.yml +123 -0
  3. package/.github/workflows/releases-core.yml +448 -0
  4. package/.github/workflows/releases-full.yml +404 -0
  5. package/.github/{workflows → workflows-backup}/ci.yml +12 -110
  6. package/.github/workflows-backup/nightly.yml +196 -0
  7. package/.github/workflows-backup/release-optimized.yml +373 -0
  8. package/.release-notes-0.2.0.md +129 -0
  9. package/CHANGELOG.json +658 -0
  10. package/README.md +110 -512
  11. package/demo.html +9 -2
  12. package/dist/Logger.d.ts +176 -0
  13. package/dist/Logger.d.ts.map +1 -0
  14. package/dist/Logger.js +498 -0
  15. package/dist/chunks/{Logger-BrFKFZcD.js → Logger-CbCUS5pQ.js} +987 -5
  16. package/dist/chunks/Logger-CbCUS5pQ.js.map +1 -0
  17. package/dist/chunks/Logger-PCfgYKTP.js +2 -0
  18. package/dist/chunks/Logger-PCfgYKTP.js.map +1 -0
  19. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
  20. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
  21. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
  22. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
  23. package/dist/chunks/StyleBuilder-BoJTmskd.js +361 -0
  24. package/dist/chunks/StyleBuilder-BoJTmskd.js.map +1 -0
  25. package/dist/chunks/StyleBuilder-LPLzsoHY.js +4 -0
  26. package/dist/chunks/StyleBuilder-LPLzsoHY.js.map +1 -0
  27. package/dist/cli/CommandProcessor.d.ts +40 -0
  28. package/dist/cli/CommandProcessor.d.ts.map +1 -0
  29. package/dist/cli/CommandProcessor.js +57 -0
  30. package/dist/cli/commands/ConfigCommand.d.ts +17 -0
  31. package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
  32. package/dist/cli/commands/ConfigCommand.js +88 -0
  33. package/dist/cli/commands/ExportCommand.d.ts +51 -0
  34. package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
  35. package/dist/cli/commands/ExportCommand.js +243 -0
  36. package/dist/cli/commands/StatusCommand.d.ts +33 -0
  37. package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
  38. package/dist/cli/commands/StatusCommand.js +93 -0
  39. package/dist/cli/commands/ThemeCommand.d.ts +33 -0
  40. package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
  41. package/dist/cli/commands/ThemeCommand.js +79 -0
  42. package/dist/cli/help.d.ts +15 -0
  43. package/dist/cli/help.d.ts.map +1 -0
  44. package/dist/cli/help.js +118 -0
  45. package/dist/cli/index.d.ts +15 -0
  46. package/dist/cli/index.d.ts.map +1 -0
  47. package/dist/cli/index.js +40 -0
  48. package/dist/constants.d.ts +91 -0
  49. package/dist/constants.d.ts.map +1 -0
  50. package/dist/constants.js +80 -0
  51. package/dist/core.cjs +1 -1
  52. package/dist/core.cjs.map +1 -1
  53. package/dist/core.d.ts +130 -0
  54. package/dist/core.d.ts.map +1 -0
  55. package/dist/core.js +258 -242
  56. package/dist/core.js.map +1 -1
  57. package/dist/example.d.ts +18 -0
  58. package/dist/example.d.ts.map +1 -0
  59. package/dist/example.js +154 -0
  60. package/dist/exports-module.d.ts +203 -0
  61. package/dist/exports-module.d.ts.map +1 -0
  62. package/dist/exports-module.js +260 -0
  63. package/dist/exports.cjs +1 -1
  64. package/dist/exports.cjs.map +1 -1
  65. package/dist/exports.js +2 -2
  66. package/dist/handlers/AnalyticsLogHandler.d.ts +11 -0
  67. package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
  68. package/dist/handlers/AnalyticsLogHandler.js +19 -0
  69. package/dist/handlers/ExportLogHandler.d.ts +103 -0
  70. package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
  71. package/dist/handlers/ExportLogHandler.js +516 -0
  72. package/dist/handlers/FileLogHandler.d.ts +13 -0
  73. package/dist/handlers/FileLogHandler.d.ts.map +1 -0
  74. package/dist/handlers/FileLogHandler.js +24 -0
  75. package/dist/handlers/RemoteLogHandler.d.ts +14 -0
  76. package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
  77. package/dist/handlers/RemoteLogHandler.js +37 -0
  78. package/dist/handlers/index.d.ts +8 -0
  79. package/dist/handlers/index.d.ts.map +1 -0
  80. package/dist/handlers/index.js +7 -0
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.ts +86 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +89 -103
  86. package/dist/main.d.ts +2 -0
  87. package/dist/main.d.ts.map +1 -0
  88. package/dist/main.js +139 -0
  89. package/dist/styling/StyleBuilder.d.ts +132 -0
  90. package/dist/styling/StyleBuilder.d.ts.map +1 -0
  91. package/dist/styling/StyleBuilder.js +268 -0
  92. package/dist/styling/banners.d.ts +45 -0
  93. package/dist/styling/banners.d.ts.map +1 -0
  94. package/dist/styling/banners.js +155 -0
  95. package/dist/styling/index.d.ts +7 -0
  96. package/dist/styling/index.d.ts.map +1 -0
  97. package/dist/styling/index.js +6 -0
  98. package/dist/styling/themes.d.ts +10 -0
  99. package/dist/styling/themes.d.ts.map +1 -0
  100. package/dist/styling/themes.js +231 -0
  101. package/dist/styling-module.d.ts +185 -0
  102. package/dist/styling-module.d.ts.map +1 -0
  103. package/dist/styling-module.js +199 -0
  104. package/dist/styling.cjs +1 -1
  105. package/dist/styling.cjs.map +1 -1
  106. package/dist/styling.js +4 -4
  107. package/dist/types/Logger.d.ts +172 -0
  108. package/dist/types/Logger.d.ts.map +1 -0
  109. package/dist/types/cli/CommandProcessor.d.ts +37 -0
  110. package/dist/types/cli/CommandProcessor.d.ts.map +1 -0
  111. package/dist/types/cli/commands/ConfigCommand.d.ts +14 -0
  112. package/dist/types/cli/commands/ConfigCommand.d.ts.map +1 -0
  113. package/dist/types/cli/commands/ExportCommand.d.ts +48 -0
  114. package/dist/types/cli/commands/ExportCommand.d.ts.map +1 -0
  115. package/dist/types/cli/commands/StatusCommand.d.ts +30 -0
  116. package/dist/types/cli/commands/StatusCommand.d.ts.map +1 -0
  117. package/dist/types/cli/commands/ThemeCommand.d.ts +30 -0
  118. package/dist/types/cli/commands/ThemeCommand.d.ts.map +1 -0
  119. package/dist/types/cli/help.d.ts +12 -0
  120. package/dist/types/cli/help.d.ts.map +1 -0
  121. package/dist/types/cli/index.d.ts +15 -0
  122. package/dist/types/cli/index.d.ts.map +1 -0
  123. package/dist/types/constants.d.ts +88 -0
  124. package/dist/types/constants.d.ts.map +1 -0
  125. package/dist/types/core.d.ts +71 -211
  126. package/dist/types/core.d.ts.map +1 -0
  127. package/dist/types/core.js +13 -0
  128. package/dist/types/example.d.ts +18 -0
  129. package/dist/types/example.d.ts.map +1 -0
  130. package/dist/types/exports-module.d.ts +196 -0
  131. package/dist/types/exports-module.d.ts.map +1 -0
  132. package/dist/types/handlers/AnalyticsLogHandler.d.ts +8 -0
  133. package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +1 -0
  134. package/dist/types/handlers/ExportLogHandler.d.ts +100 -0
  135. package/dist/types/handlers/ExportLogHandler.d.ts.map +1 -0
  136. package/dist/types/handlers/FileLogHandler.d.ts +10 -0
  137. package/dist/types/handlers/FileLogHandler.d.ts.map +1 -0
  138. package/dist/types/handlers/RemoteLogHandler.d.ts +11 -0
  139. package/dist/types/handlers/RemoteLogHandler.d.ts.map +1 -0
  140. package/dist/types/handlers/index.d.ts +8 -0
  141. package/dist/types/handlers/index.d.ts.map +1 -0
  142. package/dist/types/handlers.d.ts +88 -0
  143. package/dist/types/handlers.d.ts.map +1 -0
  144. package/dist/types/handlers.js +4 -0
  145. package/dist/types/index.d.ts +7 -675
  146. package/dist/types/index.d.ts.map +1 -0
  147. package/dist/types/index.js +4 -0
  148. package/dist/types/main.d.ts +2 -0
  149. package/dist/types/main.d.ts.map +1 -0
  150. package/dist/types/styling/StyleBuilder.d.ts +132 -0
  151. package/dist/types/styling/StyleBuilder.d.ts.map +1 -0
  152. package/dist/types/styling/banners.d.ts +42 -0
  153. package/dist/types/styling/banners.d.ts.map +1 -0
  154. package/dist/types/styling/index.d.ts +7 -0
  155. package/dist/types/styling/index.d.ts.map +1 -0
  156. package/dist/types/styling/themes.d.ts +7 -0
  157. package/dist/types/styling/themes.d.ts.map +1 -0
  158. package/dist/types/styling-module.d.ts +178 -0
  159. package/dist/types/styling-module.d.ts.map +1 -0
  160. package/dist/types/types/core.d.ts +71 -0
  161. package/dist/types/types/core.d.ts.map +1 -0
  162. package/dist/types/types/handlers.d.ts +85 -0
  163. package/dist/types/types/handlers.d.ts.map +1 -0
  164. package/dist/types/types/index.d.ts +7 -0
  165. package/dist/types/types/index.d.ts.map +1 -0
  166. package/dist/types/utils/index.d.ts +7 -0
  167. package/dist/types/utils/index.d.ts.map +1 -0
  168. package/dist/types/utils/output.d.ts +29 -0
  169. package/dist/types/utils/output.d.ts.map +1 -0
  170. package/dist/types/utils/stackTrace.d.ts +6 -0
  171. package/dist/types/utils/stackTrace.d.ts.map +1 -0
  172. package/dist/types/utils/timestamps.d.ts +20 -0
  173. package/dist/types/utils/timestamps.d.ts.map +1 -0
  174. package/dist/utils/index.d.ts +7 -0
  175. package/dist/utils/index.d.ts.map +1 -0
  176. package/dist/utils/index.js +6 -0
  177. package/dist/utils/output.d.ts +32 -0
  178. package/dist/utils/output.d.ts.map +1 -0
  179. package/dist/utils/output.js +97 -0
  180. package/dist/utils/stackTrace.d.ts +9 -0
  181. package/dist/utils/stackTrace.d.ts.map +1 -0
  182. package/dist/utils/stackTrace.js +81 -0
  183. package/dist/utils/timestamps.d.ts +20 -0
  184. package/dist/utils/timestamps.d.ts.map +1 -0
  185. package/dist/utils/timestamps.js +71 -0
  186. package/docs/API.md +607 -0
  187. package/docs/DEVELOPMENT.md +731 -0
  188. package/docs/_config.yml +36 -0
  189. package/docs/index.md +179 -0
  190. package/examples/README.md +208 -0
  191. package/examples/basic-logging.js +75 -0
  192. package/examples/data-export.js +234 -0
  193. package/examples/package.json +16 -0
  194. package/examples/performance-timing.js +170 -0
  195. package/examples/styling-themes.js +207 -0
  196. package/package.json +24 -21
  197. package/packages/core/package.json +35 -0
  198. package/packages/exports/package.json +41 -0
  199. package/packages/styling/package.json +41 -0
  200. package/project-utils/README.md +172 -0
  201. package/project-utils/auto-release-gemini.ts +1193 -0
  202. package/project-utils/commit-generator.ts +1000 -0
  203. package/project-utils/commit-ui.ts +246 -0
  204. package/project-utils/git-utils.ts +199 -0
  205. package/project-utils/github-release-manager.ts +466 -0
  206. package/project-utils/prompt-templates.js +345 -0
  207. package/project-utils/prompt-templates.ts +422 -0
  208. package/project-utils/version-manager.ts +1078 -0
  209. package/src/Logger.ts +2 -1
  210. package/src/handlers/ExportLogHandler.ts +141 -0
  211. package/vite.config.ts +152 -50
  212. package/.claude/settings.local.json +0 -22
  213. package/.npmrc.bak +0 -1
  214. package/dist/chunks/Logger-BQhMKy_T.js +0 -2
  215. package/dist/chunks/Logger-BQhMKy_T.js.map +0 -1
  216. package/dist/chunks/Logger-BrFKFZcD.js.map +0 -1
  217. package/dist/chunks/core-2opW4Pi3.js +0 -194
  218. package/dist/chunks/core-2opW4Pi3.js.map +0 -1
  219. package/dist/chunks/core-DyugwSYZ.js +0 -4
  220. package/dist/chunks/core-DyugwSYZ.js.map +0 -1
  221. package/dist/chunks/exports-BNP3R7dp.js +0 -421
  222. package/dist/chunks/exports-BNP3R7dp.js.map +0 -1
  223. package/dist/chunks/exports-U1xLBXrY.js +0 -2
  224. package/dist/chunks/exports-U1xLBXrY.js.map +0 -1
  225. package/dist/chunks/styling-DhUDzwlE.js +0 -654
  226. package/dist/chunks/styling-DhUDzwlE.js.map +0 -1
  227. package/dist/chunks/styling-tmRDI28D.js +0 -2
  228. package/dist/chunks/styling-tmRDI28D.js.map +0 -1
  229. package/dist/types/exports.d.ts +0 -600
  230. package/dist/types/styling.d.ts +0 -751
  231. /package/.github/{workflows → workflows-backup}/release.yml +0 -0
@@ -0,0 +1,356 @@
1
+ name: CI Quality & Testing
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+ workflow_dispatch:
9
+ inputs:
10
+ run_performance:
11
+ description: 'Ejecutar tests de performance'
12
+ required: false
13
+ default: true
14
+ type: boolean
15
+ run_visual:
16
+ description: 'Ejecutar tests visuales'
17
+ required: false
18
+ default: false
19
+ type: boolean
20
+
21
+ env:
22
+ NODE_VERSION: '20'
23
+
24
+ jobs:
25
+ # ===== MATRIX TESTING =====
26
+ test-matrix:
27
+ runs-on: ubuntu-latest
28
+
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ bun-version: ["1.0", "latest"]
33
+ build-mode: [full, core, styling, exports]
34
+
35
+ name: Test Bun ${{ matrix.bun-version }} - ${{ matrix.build-mode }}
36
+
37
+ steps:
38
+ - name: 📥 Checkout code
39
+ uses: actions/checkout@v4
40
+ with:
41
+ fetch-depth: 0
42
+
43
+ - name: 📦 Setup Bun ${{ matrix.bun-version }}
44
+ uses: oven-sh/setup-bun@v2
45
+ with:
46
+ bun-version: ${{ matrix.bun-version }}
47
+
48
+ - name: 🔧 Install dependencies
49
+ run: bun install --frozen-lockfile
50
+
51
+ - name: 🔍 Type checking
52
+ run: bun run type-check
53
+
54
+ - name: 🏗️ Build ${{ matrix.build-mode }}
55
+ run: |
56
+ if [ "${{ matrix.build-mode }}" = "full" ]; then
57
+ bun run build:all
58
+ else
59
+ bun run build:${{ matrix.build-mode }}
60
+ fi
61
+
62
+ - name: 🧪 Run tests
63
+ run: bun run ci:test
64
+
65
+ - name: 📊 Check bundle sizes
66
+ run: bun run size-limit
67
+
68
+ - name: 📤 Upload build artifacts (Node 20 only)
69
+ uses: actions/upload-artifact@v4
70
+ if: matrix.node-version == 20
71
+ with:
72
+ name: build-${{ matrix.build-mode }}-node${{ matrix.node-version }}
73
+ path: dist/
74
+ retention-days: 7
75
+
76
+ # ===== PERFORMANCE TESTING =====
77
+ performance-tests:
78
+ runs-on: ubuntu-latest
79
+ needs: test-matrix
80
+ if: ${{ inputs.run_performance != false }}
81
+
82
+ steps:
83
+ - name: 📥 Checkout code
84
+ uses: actions/checkout@v4
85
+
86
+ - name: 📦 Setup Node.js
87
+ uses: actions/setup-node@v4
88
+ with:
89
+ node-version: ${{ env.NODE_VERSION }}
90
+ cache: 'npm'
91
+
92
+ - name: 🔧 Install dependencies
93
+ run: bun install --frozen-lockfile
94
+
95
+ - name: 📥 Download build artifacts
96
+ uses: actions/download-artifact@v4
97
+ with:
98
+ name: build-full-node20
99
+ path: dist/
100
+
101
+ - name: ⚡ Performance benchmarks
102
+ run: bun run test:performance
103
+
104
+ - name: 📊 Bundle analysis
105
+ run: |
106
+ echo "## 📦 Bundle Analysis Report" > performance-report.md
107
+ echo "### Size Breakdown" >> performance-report.md
108
+ echo "\`\`\`" >> performance-report.md
109
+ ls -la dist/ >> performance-report.md
110
+ echo "\`\`\`" >> performance-report.md
111
+
112
+ echo "### File Sizes by Module" >> performance-report.md
113
+ for module in core styling exports; do
114
+ if [ -d "dist/modular/$module" ]; then
115
+ echo "#### $module Module" >> performance-report.md
116
+ echo "\`\`\`" >> performance-report.md
117
+ ls -la dist/modular/$module/ >> performance-report.md
118
+ echo "\`\`\`" >> performance-report.md
119
+ fi
120
+ done
121
+
122
+ echo "### Performance Metrics" >> performance-report.md
123
+ echo "- **Build Time**: $(date)" >> performance-report.md
124
+ echo "- **Node Version**: ${{ env.NODE_VERSION }}" >> performance-report.md
125
+
126
+ - name: 📤 Upload performance report
127
+ uses: actions/upload-artifact@v4
128
+ with:
129
+ name: performance-report
130
+ path: performance-report.md
131
+ retention-days: 30
132
+
133
+ # ===== VISUAL TESTING =====
134
+ visual-tests:
135
+ runs-on: ubuntu-latest
136
+ needs: test-matrix
137
+ if: ${{ inputs.run_visual == true }}
138
+
139
+ steps:
140
+ - name: 📥 Checkout code
141
+ uses: actions/checkout@v4
142
+
143
+ - name: 📦 Setup Node.js
144
+ uses: actions/setup-node@v4
145
+ with:
146
+ node-version: ${{ env.NODE_VERSION }}
147
+ cache: 'npm'
148
+
149
+ - name: 🔧 Install dependencies
150
+ run: bun install --frozen-lockfile
151
+
152
+ - name: 📥 Download build artifacts
153
+ uses: actions/download-artifact@v4
154
+ with:
155
+ name: build-full-node20
156
+ path: dist/
157
+
158
+ - name: 🎭 Install Playwright
159
+ run: npx playwright install --with-deps chromium
160
+
161
+ - name: 🖼️ Run visual tests
162
+ run: bun run test:visual
163
+
164
+ - name: 📤 Upload test results
165
+ uses: actions/upload-artifact@v4
166
+ if: always()
167
+ with:
168
+ name: visual-test-results
169
+ path: test-results/
170
+ retention-days: 30
171
+
172
+ - name: 📤 Upload screenshots
173
+ uses: actions/upload-artifact@v4
174
+ if: failure()
175
+ with:
176
+ name: visual-test-failures
177
+ path: test-results/
178
+ retention-days: 30
179
+
180
+ # ===== SECURITY AUDIT =====
181
+ security-audit:
182
+ runs-on: ubuntu-latest
183
+
184
+ steps:
185
+ - name: 📥 Checkout code
186
+ uses: actions/checkout@v4
187
+
188
+ - name: 📦 Setup Node.js
189
+ uses: actions/setup-node@v4
190
+ with:
191
+ node-version: ${{ env.NODE_VERSION }}
192
+ cache: 'npm'
193
+
194
+ - name: 🔒 Security audit
195
+ run: |
196
+ echo "🔒 Running security audit..."
197
+ npm audit --audit-level=high || echo "Security issues detected, review required"
198
+
199
+ - name: 📊 Check for outdated packages
200
+ run: |
201
+ echo "📊 Checking for outdated packages..."
202
+ npm outdated || true
203
+
204
+ - name: 🔍 Vulnerability report
205
+ run: |
206
+ echo "## 🔒 Security Audit Report" > security-report.md
207
+ echo "### NPM Audit Results" >> security-report.md
208
+ echo "\`\`\`" >> security-report.md
209
+ npm audit --audit-level=moderate >> security-report.md || echo "No critical vulnerabilities" >> security-report.md
210
+ echo "\`\`\`" >> security-report.md
211
+
212
+ echo "### Outdated Packages" >> security-report.md
213
+ echo "\`\`\`" >> security-report.md
214
+ npm outdated >> security-report.md || echo "All packages up to date" >> security-report.md
215
+ echo "\`\`\`" >> security-report.md
216
+
217
+ - name: 📤 Upload security report
218
+ uses: actions/upload-artifact@v4
219
+ with:
220
+ name: security-report
221
+ path: security-report.md
222
+ retention-days: 30
223
+
224
+ # ===== CODE QUALITY ANALYSIS =====
225
+ code-quality:
226
+ runs-on: ubuntu-latest
227
+ needs: test-matrix
228
+
229
+ steps:
230
+ - name: 📥 Checkout code
231
+ uses: actions/checkout@v4
232
+
233
+ - name: 📦 Setup Node.js
234
+ uses: actions/setup-node@v4
235
+ with:
236
+ node-version: ${{ env.NODE_VERSION }}
237
+ cache: 'npm'
238
+
239
+ - name: 🔧 Install dependencies
240
+ run: bun install --frozen-lockfile
241
+
242
+ - name: 🔍 Code analysis
243
+ run: |
244
+ echo "🔍 Analyzing code quality..."
245
+
246
+ # Análisis básico de código
247
+ echo "## 📊 Code Quality Report" > quality-report.md
248
+ echo "### TypeScript Analysis" >> quality-report.md
249
+ echo "\`\`\`" >> quality-report.md
250
+ bun run type-check >> quality-report.md 2>&1 || echo "TypeScript issues detected" >> quality-report.md
251
+ echo "\`\`\`" >> quality-report.md
252
+
253
+ echo "### File Statistics" >> quality-report.md
254
+ echo "- **Total TypeScript files**: $(find src/ -name '*.ts' | wc -l)" >> quality-report.md
255
+ echo "- **Total lines of code**: $(find src/ -name '*.ts' -exec wc -l {} + | tail -1 | awk '{print $1}')" >> quality-report.md
256
+ echo "- **Build date**: $(date)" >> quality-report.md
257
+
258
+ - name: 📤 Upload quality report
259
+ uses: actions/upload-artifact@v4
260
+ with:
261
+ name: code-quality-report
262
+ path: quality-report.md
263
+ retention-days: 30
264
+
265
+ # ===== PROJECT UTILS VALIDATION =====
266
+ validate-project-utils:
267
+ runs-on: ubuntu-latest
268
+
269
+ steps:
270
+ - name: 📥 Checkout code
271
+ uses: actions/checkout@v4
272
+
273
+ - name: 📦 Setup Node.js
274
+ uses: actions/setup-node@v4
275
+ with:
276
+ node-version: ${{ env.NODE_VERSION }}
277
+ cache: 'npm'
278
+
279
+ - name: 🔧 Install dependencies
280
+ run: bun install --frozen-lockfile
281
+
282
+ - name: 🧪 Test project-utils scripts
283
+ run: |
284
+ echo "🧪 Validating project-utils scripts..."
285
+
286
+ # Verificar que los scripts existan y sean ejecutables
287
+ SCRIPTS=("commit-generator.ts" "version-manager.ts" "github-release-manager.ts" "auto-release-gemini.ts")
288
+
289
+ for script in "${SCRIPTS[@]}"; do
290
+ if [ -f "project-utils/$script" ]; then
291
+ echo "✅ $script exists"
292
+ # Verificar sintaxis básica
293
+ node --check "project-utils/$script" && echo "✅ $script syntax OK" || echo "❌ $script syntax error"
294
+ else
295
+ echo "❌ $script missing"
296
+ fi
297
+ done
298
+
299
+ - name: 📊 Validate package.json scripts
300
+ run: |
301
+ echo "📊 Validating package.json scripts..."
302
+
303
+ # Verificar scripts críticos
304
+ CRITICAL_SCRIPTS=("build" "build:all" "commit:auto" "version:auto" "workflow:full")
305
+
306
+ for script in "${CRITICAL_SCRIPTS[@]}"; do
307
+ if bun run --silent "$script" --help >/dev/null 2>&1; then
308
+ echo "✅ Script '$script' is valid"
309
+ else
310
+ echo "❌ Script '$script' has issues"
311
+ fi
312
+ done
313
+
314
+ # ===== COMPREHENSIVE SUMMARY =====
315
+ ci-summary:
316
+ runs-on: ubuntu-latest
317
+ needs: [test-matrix, performance-tests, visual-tests, security-audit, code-quality, validate-project-utils]
318
+ if: always()
319
+
320
+ steps:
321
+ - name: 📊 CI Quality Summary
322
+ run: |
323
+ echo "## 📊 CI Quality & Testing Summary" >> $GITHUB_STEP_SUMMARY
324
+ echo "" >> $GITHUB_STEP_SUMMARY
325
+
326
+ # Status de cada job
327
+ echo "### 🧪 Test Results" >> $GITHUB_STEP_SUMMARY
328
+ echo "- **Matrix Testing**: ${{ needs.test-matrix.result }}" >> $GITHUB_STEP_SUMMARY
329
+ echo "- **Performance Tests**: ${{ needs.performance-tests.result }}" >> $GITHUB_STEP_SUMMARY
330
+ echo "- **Visual Tests**: ${{ needs.visual-tests.result }}" >> $GITHUB_STEP_SUMMARY
331
+ echo "- **Security Audit**: ${{ needs.security-audit.result }}" >> $GITHUB_STEP_SUMMARY
332
+ echo "- **Code Quality**: ${{ needs.code-quality.result }}" >> $GITHUB_STEP_SUMMARY
333
+ echo "- **Project Utils**: ${{ needs.validate-project-utils.result }}" >> $GITHUB_STEP_SUMMARY
334
+ echo "" >> $GITHUB_STEP_SUMMARY
335
+
336
+ echo "### 📋 Coverage Matrix" >> $GITHUB_STEP_SUMMARY
337
+ echo "- **Node Versions**: 18, 20, 21" >> $GITHUB_STEP_SUMMARY
338
+ echo "- **Build Modes**: full, core, styling, exports" >> $GITHUB_STEP_SUMMARY
339
+ echo "- **Test Types**: unit, performance, visual, security" >> $GITHUB_STEP_SUMMARY
340
+ echo "" >> $GITHUB_STEP_SUMMARY
341
+
342
+ # Determinar estado general
343
+ if [ "${{ needs.test-matrix.result }}" = "success" ] && [ "${{ needs.security-audit.result }}" = "success" ] && [ "${{ needs.code-quality.result }}" = "success" ]; then
344
+ echo "### ✅ Overall Status: PASSED" >> $GITHUB_STEP_SUMMARY
345
+ echo "All critical quality checks passed successfully." >> $GITHUB_STEP_SUMMARY
346
+ else
347
+ echo "### ⚠️ Overall Status: ATTENTION REQUIRED" >> $GITHUB_STEP_SUMMARY
348
+ echo "Some quality checks require attention. Review individual job results." >> $GITHUB_STEP_SUMMARY
349
+ fi
350
+
351
+ echo "" >> $GITHUB_STEP_SUMMARY
352
+ echo "### 📎 Artifacts Generated" >> $GITHUB_STEP_SUMMARY
353
+ echo "- Build artifacts for all modules" >> $GITHUB_STEP_SUMMARY
354
+ echo "- Performance analysis report" >> $GITHUB_STEP_SUMMARY
355
+ echo "- Security audit report" >> $GITHUB_STEP_SUMMARY
356
+ echo "- Code quality metrics" >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,123 @@
1
+ name: Docs & Demo Deployment
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ paths:
7
+ - 'docs/**'
8
+ - 'demo.html'
9
+ - 'index.html'
10
+ - 'src/**'
11
+ workflow_dispatch:
12
+
13
+ env:
14
+ NODE_VERSION: '20'
15
+
16
+ jobs:
17
+ # ===== BUILD DEMO =====
18
+ build-demo:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: 📥 Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ - name: 📦 Setup Bun
26
+ uses: oven-sh/setup-bun@v2
27
+ with:
28
+ bun-version: latest
29
+ - name: 🔧 Install dependencies
30
+ run: bun install --frozen-lockfile
31
+
32
+ - name: 🏗️ Build library for demo
33
+ run: bun run build:full
34
+
35
+ - name: 🏗️ Setup demo structure
36
+ run: |
37
+ mkdir -p _site/docs
38
+ # Copy demo as root
39
+ cp demo.html _site/index.html
40
+ cp index.html _site/dev.html
41
+ cp -r dist/ _site/dist/
42
+
43
+ # Create demo metadata
44
+ echo "## 📦 Demo Build Info" > _site/build-info.md
45
+ echo "- **Build Date**: $(date)" >> _site/build-info.md
46
+ echo "- **Commit**: ${{ github.sha }}" >> _site/build-info.md
47
+ echo "- **Version**: $(node -p 'require("./package.json").version')" >> _site/build-info.md
48
+
49
+ - name: 📤 Upload demo artifacts
50
+ uses: actions/upload-artifact@v4
51
+ with:
52
+ name: demo-site
53
+ path: _site/
54
+ retention-days: 30
55
+
56
+ # ===== BUILD DOCS =====
57
+ build-docs:
58
+ runs-on: ubuntu-latest
59
+
60
+ steps:
61
+ - name: 📥 Checkout code
62
+ uses: actions/checkout@v4
63
+
64
+ - name: 📤 Build Jekyll documentation
65
+ uses: actions/jekyll-build-pages@v1
66
+ with:
67
+ source: ./docs
68
+ destination: ./_site/docs
69
+
70
+ - name: 📤 Upload docs artifacts
71
+ uses: actions/upload-artifact@v4
72
+ with:
73
+ name: docs-site
74
+ path: _site/docs/
75
+ retention-days: 30
76
+
77
+ # ===== DEPLOY TO GITHUB PAGES =====
78
+ deploy-pages:
79
+ runs-on: ubuntu-latest
80
+ needs: [build-demo, build-docs]
81
+ if: github.ref == 'refs/heads/main'
82
+
83
+ permissions:
84
+ contents: read
85
+ pages: write
86
+ id-token: write
87
+
88
+ environment:
89
+ name: github-pages
90
+ url: ${{ steps.deployment.outputs.page_url }}
91
+
92
+ steps:
93
+ - name: 📥 Download demo artifacts
94
+ uses: actions/download-artifact@v4
95
+ with:
96
+ name: demo-site
97
+ path: _site/
98
+
99
+ - name: 📥 Download docs artifacts
100
+ uses: actions/download-artifact@v4
101
+ with:
102
+ name: docs-site
103
+ path: _site/docs/
104
+
105
+ - name: 📤 Setup Pages
106
+ uses: actions/configure-pages@v4
107
+
108
+ - name: 📤 Upload to Pages
109
+ uses: actions/upload-pages-artifact@v3
110
+ with:
111
+ path: ./_site
112
+
113
+ - name: 🚀 Deploy to GitHub Pages
114
+ id: deployment
115
+ uses: actions/deploy-pages@v4
116
+
117
+ - name: 📊 Deployment summary
118
+ run: |
119
+ echo "## 📝 Documentation & Demo Deployed!" >> $GITHUB_STEP_SUMMARY
120
+ echo "- **Demo URL**: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
121
+ echo "- **Docs URL**: ${{ steps.deployment.outputs.page_url }}docs/" >> $GITHUB_STEP_SUMMARY
122
+ echo "- **Dev Demo**: ${{ steps.deployment.outputs.page_url }}dev.html" >> $GITHUB_STEP_SUMMARY
123
+ echo "- **Build Info**: ${{ steps.deployment.outputs.page_url }}build-info.md" >> $GITHUB_STEP_SUMMARY