@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.
- package/dist/chunks/{Logger-Cbi1f10o.js → Logger-CKqzXDh3.js} +2 -2
- package/dist/chunks/{Logger-Cbi1f10o.js.map → Logger-CKqzXDh3.js.map} +1 -1
- package/dist/chunks/{Logger-BZ7B7OXE.js → Logger-D_vuKP4l.js} +2 -2
- package/dist/chunks/{Logger-BZ7B7OXE.js.map → Logger-D_vuKP4l.js.map} +1 -1
- 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-ClIJmaT8.js → cli-module-Cx7qotPY.js} +16 -9
- package/dist/chunks/cli-module-Cx7qotPY.js.map +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/exports.cjs +1 -1
- package/dist/exports.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/styling.cjs +1 -1
- package/dist/styling.js +2 -2
- package/dist/terminal/formatter.d.ts.map +1 -1
- 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 -1076
- package/CHANGELOG.md +0 -209
- package/CLAUDE.md +0 -217
- package/bun.lock +0 -333
- package/demo.html +0 -847
- package/dist/chunks/cli-module-CadqgZ1Z.js +0 -2
- package/dist/chunks/cli-module-CadqgZ1Z.js.map +0 -1
- package/dist/chunks/cli-module-ClIJmaT8.js.map +0 -1
- 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/public/vite.svg +0 -1
- 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-module.ts +0 -21
- 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/index.ts +0 -13
- 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/handlers/index.ts +0 -8
- package/src/hooks/HookManager.ts +0 -177
- package/src/hooks/index.ts +0 -1
- package/src/index.ts +0 -395
- package/src/main.ts +0 -196
- package/src/serializers/SerializerRegistry.ts +0 -173
- package/src/serializers/index.ts +0 -1
- 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 -236
- 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/transports/index.ts +0 -4
- package/src/types/core.ts +0 -417
- package/src/types/handlers.ts +0 -95
- package/src/types/hooks.ts +0 -45
- package/src/types/index.ts +0 -83
- package/src/types/serializers.ts +0 -30
- package/src/types/transports.ts +0 -52
- 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/src/writers/BufferWriter.ts +0 -157
- package/src/writers/index.ts +0 -6
- 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
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
name: CI/CD Pipeline
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ main, develop ]
|
|
6
|
-
tags: [ 'v*' ]
|
|
7
|
-
pull_request:
|
|
8
|
-
branches: [ main, develop ]
|
|
9
|
-
|
|
10
|
-
env:
|
|
11
|
-
NODE_VERSION: '20'
|
|
12
|
-
REGISTRY_URL: 'https://registry.npmjs.org'
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
# ===== BUILD & TEST =====
|
|
16
|
-
build-and-test:
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
strategy:
|
|
20
|
-
matrix:
|
|
21
|
-
node-version: [18, 20, 21]
|
|
22
|
-
|
|
23
|
-
steps:
|
|
24
|
-
- name: 📥 Checkout code
|
|
25
|
-
uses: actions/checkout@v4
|
|
26
|
-
with:
|
|
27
|
-
fetch-depth: 0
|
|
28
|
-
|
|
29
|
-
- name: 📦 Setup Node.js ${{ matrix.node-version }}
|
|
30
|
-
uses: actions/setup-node@v4
|
|
31
|
-
with:
|
|
32
|
-
node-version: ${{ matrix.node-version }}
|
|
33
|
-
cache: 'npm'
|
|
34
|
-
registry-url: ${{ env.REGISTRY_URL }}
|
|
35
|
-
|
|
36
|
-
- name: 🔧 Install dependencies
|
|
37
|
-
run: npm run ci:install
|
|
38
|
-
|
|
39
|
-
- name: 🔍 Type checking
|
|
40
|
-
run: npm run type-check
|
|
41
|
-
|
|
42
|
-
- name: 🧹 Lint code
|
|
43
|
-
run: npm run lint
|
|
44
|
-
|
|
45
|
-
- name: 🏗️ Build library
|
|
46
|
-
run: npm run ci:build
|
|
47
|
-
|
|
48
|
-
- name: 🧪 Run tests
|
|
49
|
-
run: npm run ci:test
|
|
50
|
-
|
|
51
|
-
- name: 📊 Check bundle sizes
|
|
52
|
-
run: npm run size-limit
|
|
53
|
-
|
|
54
|
-
- name: 📤 Upload build artifacts
|
|
55
|
-
uses: actions/upload-artifact@v4
|
|
56
|
-
if: matrix.node-version == 20
|
|
57
|
-
with:
|
|
58
|
-
name: dist-files
|
|
59
|
-
path: dist/
|
|
60
|
-
retention-days: 30
|
|
61
|
-
|
|
62
|
-
# ===== VISUAL TESTING =====
|
|
63
|
-
visual-tests:
|
|
64
|
-
runs-on: ubuntu-latest
|
|
65
|
-
needs: build-and-test
|
|
66
|
-
|
|
67
|
-
steps:
|
|
68
|
-
- name: 📥 Checkout code
|
|
69
|
-
uses: actions/checkout@v4
|
|
70
|
-
|
|
71
|
-
- name: 📦 Setup Node.js
|
|
72
|
-
uses: actions/setup-node@v4
|
|
73
|
-
with:
|
|
74
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
75
|
-
cache: 'npm'
|
|
76
|
-
|
|
77
|
-
- name: 🔧 Install dependencies
|
|
78
|
-
run: npm run ci:install
|
|
79
|
-
|
|
80
|
-
- name: 📥 Download build artifacts
|
|
81
|
-
uses: actions/download-artifact@v4
|
|
82
|
-
with:
|
|
83
|
-
name: dist-files
|
|
84
|
-
path: dist/
|
|
85
|
-
|
|
86
|
-
- name: 🎭 Install Playwright
|
|
87
|
-
run: npx playwright install --with-deps chromium
|
|
88
|
-
|
|
89
|
-
- name: 🖼️ Run visual tests
|
|
90
|
-
run: npm run test:visual
|
|
91
|
-
|
|
92
|
-
- name: 📤 Upload test results
|
|
93
|
-
uses: actions/upload-artifact@v4
|
|
94
|
-
if: always()
|
|
95
|
-
with:
|
|
96
|
-
name: playwright-results
|
|
97
|
-
path: test-results/
|
|
98
|
-
retention-days: 30
|
|
99
|
-
|
|
100
|
-
- name: 📤 Upload screenshots
|
|
101
|
-
uses: actions/upload-artifact@v4
|
|
102
|
-
if: failure()
|
|
103
|
-
with:
|
|
104
|
-
name: failed-screenshots
|
|
105
|
-
path: test-results/
|
|
106
|
-
retention-days: 30
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
# ===== DEPLOY GITHUB PAGES =====
|
|
110
|
-
deploy-docs:
|
|
111
|
-
runs-on: ubuntu-latest
|
|
112
|
-
needs: build-and-test
|
|
113
|
-
if: github.ref == 'refs/heads/main'
|
|
114
|
-
|
|
115
|
-
permissions:
|
|
116
|
-
contents: read
|
|
117
|
-
pages: write
|
|
118
|
-
id-token: write
|
|
119
|
-
|
|
120
|
-
environment:
|
|
121
|
-
name: github-pages
|
|
122
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
123
|
-
|
|
124
|
-
steps:
|
|
125
|
-
- name: 📥 Checkout code
|
|
126
|
-
uses: actions/checkout@v4
|
|
127
|
-
|
|
128
|
-
- name: 📦 Setup Node.js
|
|
129
|
-
uses: actions/setup-node@v4
|
|
130
|
-
with:
|
|
131
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
132
|
-
cache: 'npm'
|
|
133
|
-
|
|
134
|
-
- name: 🔧 Install dependencies
|
|
135
|
-
run: npm run ci:install
|
|
136
|
-
|
|
137
|
-
- name: 📥 Download build artifacts
|
|
138
|
-
uses: actions/download-artifact@v4
|
|
139
|
-
with:
|
|
140
|
-
name: dist-files
|
|
141
|
-
path: dist/
|
|
142
|
-
|
|
143
|
-
- name: 🏗️ Setup site structure
|
|
144
|
-
run: |
|
|
145
|
-
mkdir -p _site/docs
|
|
146
|
-
# Copy demo as root
|
|
147
|
-
cp demo.html _site/index.html
|
|
148
|
-
cp -r dist/ _site/dist/
|
|
149
|
-
|
|
150
|
-
- name: 📤 Build Jekyll documentation
|
|
151
|
-
uses: actions/jekyll-build-pages@v1
|
|
152
|
-
with:
|
|
153
|
-
source: ./docs
|
|
154
|
-
destination: ./_site/docs
|
|
155
|
-
|
|
156
|
-
- name: 📤 Setup Pages
|
|
157
|
-
uses: actions/configure-pages@v4
|
|
158
|
-
|
|
159
|
-
- name: 📤 Upload to Pages
|
|
160
|
-
uses: actions/upload-pages-artifact@v3
|
|
161
|
-
with:
|
|
162
|
-
path: ./_site
|
|
163
|
-
|
|
164
|
-
- name: 🚀 Deploy to GitHub Pages
|
|
165
|
-
id: deployment
|
|
166
|
-
uses: actions/deploy-pages@v4
|
|
167
|
-
|
|
168
|
-
# ===== SECURITY & QUALITY =====
|
|
169
|
-
security-audit:
|
|
170
|
-
runs-on: ubuntu-latest
|
|
171
|
-
|
|
172
|
-
steps:
|
|
173
|
-
- name: 📥 Checkout code
|
|
174
|
-
uses: actions/checkout@v4
|
|
175
|
-
|
|
176
|
-
- name: 📦 Setup Node.js
|
|
177
|
-
uses: actions/setup-node@v4
|
|
178
|
-
with:
|
|
179
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
180
|
-
cache: 'npm'
|
|
181
|
-
|
|
182
|
-
- name: 🔒 Security audit
|
|
183
|
-
run: npm audit --audit-level=high
|
|
184
|
-
|
|
185
|
-
- name: 📊 Check for outdated packages
|
|
186
|
-
run: npm outdated || true
|
|
187
|
-
|
|
188
|
-
# ===== PERFORMANCE TESTING =====
|
|
189
|
-
performance:
|
|
190
|
-
runs-on: ubuntu-latest
|
|
191
|
-
needs: build-and-test
|
|
192
|
-
|
|
193
|
-
steps:
|
|
194
|
-
- name: 📥 Checkout code
|
|
195
|
-
uses: actions/checkout@v4
|
|
196
|
-
|
|
197
|
-
- name: 📦 Setup Node.js
|
|
198
|
-
uses: actions/setup-node@v4
|
|
199
|
-
with:
|
|
200
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
201
|
-
cache: 'npm'
|
|
202
|
-
|
|
203
|
-
- name: 🔧 Install dependencies
|
|
204
|
-
run: npm run ci:install
|
|
205
|
-
|
|
206
|
-
- name: 📥 Download build artifacts
|
|
207
|
-
uses: actions/download-artifact@v4
|
|
208
|
-
with:
|
|
209
|
-
name: dist-files
|
|
210
|
-
path: dist/
|
|
211
|
-
|
|
212
|
-
- name: ⚡ Performance benchmarks
|
|
213
|
-
run: npm run test:performance
|
|
214
|
-
|
|
215
|
-
- name: 📊 Bundle analysis
|
|
216
|
-
run: |
|
|
217
|
-
echo "## Bundle Analysis" >> $GITHUB_STEP_SUMMARY
|
|
218
|
-
echo "### Size Breakdown" >> $GITHUB_STEP_SUMMARY
|
|
219
|
-
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
|
220
|
-
ls -la dist/ >> $GITHUB_STEP_SUMMARY
|
|
221
|
-
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
name: Nightly Builds
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
# Ejecutar cada día a las 3:00 AM UTC
|
|
6
|
-
- cron: '0 3 * * *'
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
inputs:
|
|
9
|
-
force_build:
|
|
10
|
-
description: 'Forzar build aunque no haya cambios'
|
|
11
|
-
required: false
|
|
12
|
-
default: false
|
|
13
|
-
type: boolean
|
|
14
|
-
|
|
15
|
-
env:
|
|
16
|
-
NODE_VERSION: '20'
|
|
17
|
-
REGISTRY_URL: 'https://registry.npmjs.org'
|
|
18
|
-
|
|
19
|
-
jobs:
|
|
20
|
-
check-changes:
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
outputs:
|
|
23
|
-
has_changes: ${{ steps.changes.outputs.has_changes }}
|
|
24
|
-
last_commit: ${{ steps.changes.outputs.last_commit }}
|
|
25
|
-
commit_count: ${{ steps.changes.outputs.commit_count }}
|
|
26
|
-
|
|
27
|
-
steps:
|
|
28
|
-
- name: 📥 Checkout code
|
|
29
|
-
uses: actions/checkout@v4
|
|
30
|
-
with:
|
|
31
|
-
fetch-depth: 0
|
|
32
|
-
|
|
33
|
-
- name: 🔍 Check for changes since last nightly
|
|
34
|
-
id: changes
|
|
35
|
-
run: |
|
|
36
|
-
# Buscar último tag nightly
|
|
37
|
-
LAST_NIGHTLY=$(git tag -l "nightly-*" | sort -V | tail -1 || echo "")
|
|
38
|
-
|
|
39
|
-
if [ -z "$LAST_NIGHTLY" ]; then
|
|
40
|
-
# No hay nightlies previos, verificar desde hace 24 horas
|
|
41
|
-
SINCE_DATE=$(date -d '24 hours ago' --iso-8601)
|
|
42
|
-
COMMITS_COUNT=$(git log --since="$SINCE_DATE" --oneline | wc -l)
|
|
43
|
-
else
|
|
44
|
-
# Verificar desde último nightly
|
|
45
|
-
COMMITS_COUNT=$(git log $LAST_NIGHTLY..HEAD --oneline | wc -l)
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
LAST_COMMIT=$(git rev-parse --short HEAD)
|
|
49
|
-
|
|
50
|
-
echo "commit_count=$COMMITS_COUNT" >> $GITHUB_OUTPUT
|
|
51
|
-
echo "last_commit=$LAST_COMMIT" >> $GITHUB_OUTPUT
|
|
52
|
-
|
|
53
|
-
if [ "$COMMITS_COUNT" -gt 0 ] || [ "${{ inputs.force_build }}" == "true" ]; then
|
|
54
|
-
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
55
|
-
echo "✅ Cambios detectados: $COMMITS_COUNT commits"
|
|
56
|
-
else
|
|
57
|
-
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
58
|
-
echo "ℹ️ No hay cambios desde último nightly"
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
nightly-build:
|
|
62
|
-
runs-on: ubuntu-latest
|
|
63
|
-
needs: check-changes
|
|
64
|
-
if: needs.check-changes.outputs.has_changes == 'true'
|
|
65
|
-
|
|
66
|
-
permissions:
|
|
67
|
-
contents: write
|
|
68
|
-
packages: write
|
|
69
|
-
id-token: write
|
|
70
|
-
|
|
71
|
-
steps:
|
|
72
|
-
- name: 📥 Checkout code
|
|
73
|
-
uses: actions/checkout@v4
|
|
74
|
-
with:
|
|
75
|
-
fetch-depth: 0
|
|
76
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
77
|
-
|
|
78
|
-
- name: 📦 Setup Node.js
|
|
79
|
-
uses: actions/setup-node@v4
|
|
80
|
-
with:
|
|
81
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
82
|
-
cache: 'npm'
|
|
83
|
-
registry-url: ${{ env.REGISTRY_URL }}
|
|
84
|
-
|
|
85
|
-
- name: 🔧 Install dependencies
|
|
86
|
-
run: npm ci
|
|
87
|
-
|
|
88
|
-
- name: 🏗️ Build library
|
|
89
|
-
run: npm run build
|
|
90
|
-
|
|
91
|
-
- name: 🧪 Run tests
|
|
92
|
-
run: |
|
|
93
|
-
npm run type-check
|
|
94
|
-
npm run test
|
|
95
|
-
npm run size-limit
|
|
96
|
-
|
|
97
|
-
- name: 🏷️ Generate nightly version
|
|
98
|
-
id: version
|
|
99
|
-
run: |
|
|
100
|
-
# Generar versión nightly usando commit y fecha
|
|
101
|
-
DATE=$(date +%Y%m%d)
|
|
102
|
-
SHORT_SHA="${{ needs.check-changes.outputs.last_commit }}"
|
|
103
|
-
BASE_VERSION=$(node -p "require('./package.json').version")
|
|
104
|
-
|
|
105
|
-
# Remover cualquier sufijo existente del base version
|
|
106
|
-
CLEAN_VERSION=$(echo $BASE_VERSION | sed 's/-.*//')
|
|
107
|
-
NIGHTLY_VERSION="${CLEAN_VERSION}-nightly.${DATE}.${SHORT_SHA}"
|
|
108
|
-
|
|
109
|
-
echo "version=$NIGHTLY_VERSION" >> $GITHUB_OUTPUT
|
|
110
|
-
echo "tag=nightly-$DATE-$SHORT_SHA" >> $GITHUB_OUTPUT
|
|
111
|
-
echo "🌙 Nightly version: $NIGHTLY_VERSION"
|
|
112
|
-
|
|
113
|
-
- name: 📝 Update package.json for nightly
|
|
114
|
-
run: |
|
|
115
|
-
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
|
|
116
|
-
|
|
117
|
-
- name: 📦 Create nightly archives
|
|
118
|
-
run: |
|
|
119
|
-
mkdir -p nightly-dist
|
|
120
|
-
|
|
121
|
-
# Crear archivos de distribución nightly
|
|
122
|
-
tar -czf nightly-dist/better-logger-nightly-${{ steps.version.outputs.tag }}.tar.gz dist/ README.md package.json
|
|
123
|
-
zip -r nightly-dist/better-logger-nightly-${{ steps.version.outputs.tag }}.zip dist/ README.md package.json
|
|
124
|
-
|
|
125
|
-
- name: 🚀 Publish nightly to NPM
|
|
126
|
-
run: |
|
|
127
|
-
npm publish --tag nightly --access public
|
|
128
|
-
env:
|
|
129
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
130
|
-
|
|
131
|
-
- name: 📦 Publish nightly to GitHub Packages
|
|
132
|
-
run: |
|
|
133
|
-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
|
|
134
|
-
echo "@mks2508:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
|
135
|
-
npm publish --registry=https://npm.pkg.github.com --tag nightly --access public
|
|
136
|
-
|
|
137
|
-
- name: 🏷️ Create nightly tag
|
|
138
|
-
run: |
|
|
139
|
-
git config user.name "github-actions[bot]"
|
|
140
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
141
|
-
git tag -a "${{ steps.version.outputs.tag }}" -m "Nightly build ${{ steps.version.outputs.version }}"
|
|
142
|
-
git push origin "${{ steps.version.outputs.tag }}"
|
|
143
|
-
|
|
144
|
-
- name: 🌙 Create nightly release
|
|
145
|
-
uses: softprops/action-gh-release@v1
|
|
146
|
-
with:
|
|
147
|
-
tag_name: ${{ steps.version.outputs.tag }}
|
|
148
|
-
name: "Nightly Build ${{ steps.version.outputs.version }}"
|
|
149
|
-
body: |
|
|
150
|
-
🌙 **Nightly Build** - Experimental version for testing
|
|
151
|
-
|
|
152
|
-
**⚠️ This is a development build - not recommended for production use**
|
|
153
|
-
|
|
154
|
-
## 📋 Changes since last nightly
|
|
155
|
-
${{ needs.check-changes.outputs.commit_count }} commits included in this build.
|
|
156
|
-
|
|
157
|
-
## 📦 Installation
|
|
158
|
-
```bash
|
|
159
|
-
npm install @mks2508/better-logger@nightly
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## 🔗 Links
|
|
163
|
-
- **Commit**: https://github.com/MKS2508/advanced-logger/commit/${{ needs.check-changes.outputs.last_commit }}
|
|
164
|
-
- **NPM**: https://www.npmjs.com/package/@mks2508/better-logger/v/${{ steps.version.outputs.version }}
|
|
165
|
-
draft: false
|
|
166
|
-
prerelease: true
|
|
167
|
-
files: |
|
|
168
|
-
nightly-dist/better-logger-nightly-${{ steps.version.outputs.tag }}.tar.gz
|
|
169
|
-
nightly-dist/better-logger-nightly-${{ steps.version.outputs.tag }}.zip
|
|
170
|
-
env:
|
|
171
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
172
|
-
|
|
173
|
-
- name: 📊 Nightly build summary
|
|
174
|
-
run: |
|
|
175
|
-
echo "## 🌙 Nightly Build Complete!" >> $GITHUB_STEP_SUMMARY
|
|
176
|
-
echo "- **Version**: ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
177
|
-
echo "- **Commits**: ${{ needs.check-changes.outputs.commit_count }}" >> $GITHUB_STEP_SUMMARY
|
|
178
|
-
echo "- **NPM**: https://www.npmjs.com/package/@mks2508/better-logger/v/${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
179
|
-
echo "- **GitHub**: https://github.com/MKS2508/advanced-logger/releases/tag/${{ steps.version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
|
|
180
|
-
echo "" >> $GITHUB_STEP_SUMMARY
|
|
181
|
-
echo "### 📦 Installation" >> $GITHUB_STEP_SUMMARY
|
|
182
|
-
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
|
|
183
|
-
echo "npm install @mks2508/better-logger@nightly" >> $GITHUB_STEP_SUMMARY
|
|
184
|
-
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
|
185
|
-
|
|
186
|
-
no-changes:
|
|
187
|
-
runs-on: ubuntu-latest
|
|
188
|
-
needs: check-changes
|
|
189
|
-
if: needs.check-changes.outputs.has_changes == 'false'
|
|
190
|
-
|
|
191
|
-
steps:
|
|
192
|
-
- name: ℹ️ No changes detected
|
|
193
|
-
run: |
|
|
194
|
-
echo "## ℹ️ No Nightly Build Required" >> $GITHUB_STEP_SUMMARY
|
|
195
|
-
echo "No changes detected since last nightly build." >> $GITHUB_STEP_SUMMARY
|
|
196
|
-
echo "Use \`workflow_dispatch\` with \`force_build: true\` to force a build." >> $GITHUB_STEP_SUMMARY
|