@mks2508/better-logger 0.0.1 → 0.0.2-alpha.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 (64) hide show
  1. package/.claude/settings.local.json +10 -1
  2. package/.github/workflows/ci.yml +319 -0
  3. package/.github/workflows/release.yml +269 -0
  4. package/.npmrc.bak +1 -0
  5. package/README.md +577 -0
  6. package/demo.html +840 -0
  7. package/dist/chunks/Logger-BQhMKy_T.js +2 -0
  8. package/dist/chunks/Logger-BQhMKy_T.js.map +1 -0
  9. package/dist/chunks/Logger-BrFKFZcD.js +978 -0
  10. package/dist/chunks/Logger-BrFKFZcD.js.map +1 -0
  11. package/dist/chunks/core-2opW4Pi3.js +194 -0
  12. package/dist/chunks/core-2opW4Pi3.js.map +1 -0
  13. package/dist/chunks/core-DyugwSYZ.js +4 -0
  14. package/dist/chunks/core-DyugwSYZ.js.map +1 -0
  15. package/dist/chunks/exports-BNP3R7dp.js +421 -0
  16. package/dist/chunks/exports-BNP3R7dp.js.map +1 -0
  17. package/dist/chunks/exports-U1xLBXrY.js +2 -0
  18. package/dist/chunks/exports-U1xLBXrY.js.map +1 -0
  19. package/dist/chunks/styling-DhUDzwlE.js +654 -0
  20. package/dist/chunks/styling-DhUDzwlE.js.map +1 -0
  21. package/dist/chunks/styling-tmRDI28D.js +2 -0
  22. package/dist/chunks/styling-tmRDI28D.js.map +1 -0
  23. package/dist/core.cjs +2 -0
  24. package/dist/core.cjs.map +1 -0
  25. package/dist/core.js +244 -0
  26. package/dist/core.js.map +1 -0
  27. package/dist/exports.cjs +2 -0
  28. package/dist/exports.cjs.map +1 -0
  29. package/dist/exports.js +237 -0
  30. package/dist/exports.js.map +1 -0
  31. package/dist/index.cjs +2 -0
  32. package/dist/index.cjs.map +1 -0
  33. package/dist/index.js +105 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/styling.cjs +2 -0
  36. package/dist/styling.cjs.map +1 -0
  37. package/dist/styling.js +146 -0
  38. package/dist/styling.js.map +1 -0
  39. package/dist/types/core.d.ts +211 -0
  40. package/dist/types/exports.d.ts +600 -0
  41. package/dist/types/index.d.ts +675 -0
  42. package/dist/types/styling.d.ts +751 -0
  43. package/docs/CORE.md +264 -0
  44. package/docs/EXPORTS.md +467 -0
  45. package/docs/STYLING.md +405 -0
  46. package/index.html +28 -4
  47. package/package.json +37 -4
  48. package/src/Logger.ts +28 -8
  49. package/src/cli/CommandProcessor.ts +2 -2
  50. package/src/cli/commands/ExportCommand.ts +5 -0
  51. package/src/cli/commands/StatusCommand.ts +11 -10
  52. package/src/core.ts +320 -0
  53. package/src/example.ts +184 -62
  54. package/src/exports-module.ts +311 -0
  55. package/src/handlers/ExportLogHandler.ts +34 -13
  56. package/src/index.ts +97 -79
  57. package/src/main.ts +77 -7
  58. package/src/styling-module.ts +244 -0
  59. package/src/utils/stackTrace.ts +39 -10
  60. package/src/utils/timestamps.ts +1 -1
  61. package/tsconfig.json +40 -14
  62. package/vite.config.ts +84 -0
  63. package/dist/assets/index-DxvJByYN.js +0 -183
  64. package/dist/index.html +0 -334
@@ -5,7 +5,16 @@
5
5
  "Bash(npm run dev:*)",
6
6
  "WebSearch",
7
7
  "Bash(git add:*)",
8
- "Bash(npm publish:*)"
8
+ "Bash(npm publish:*)",
9
+ "Bash(git commit:*)",
10
+ "Bash(git push:*)",
11
+ "Bash(npm install:*)",
12
+ "Bash(gh workflow view:*)",
13
+ "Bash(gh run list:*)",
14
+ "Bash(gh run view:*)",
15
+ "Bash(gh api:*)",
16
+ "Bash(gh run rerun:*)",
17
+ "Bash(gh workflow run:*)"
9
18
  ],
10
19
  "deny": [],
11
20
  "ask": []
@@ -0,0 +1,319 @@
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
+ # ===== NPM PUBLISH =====
109
+ publish:
110
+ runs-on: ubuntu-latest
111
+ needs: [build-and-test, visual-tests]
112
+ if: startsWith(github.ref, 'refs/tags/v')
113
+ permissions:
114
+ contents: read
115
+ packages: write
116
+ id-token: write
117
+
118
+ steps:
119
+ - name: 📥 Checkout code
120
+ uses: actions/checkout@v4
121
+
122
+ - name: 📦 Setup Node.js
123
+ uses: actions/setup-node@v4
124
+ with:
125
+ node-version: ${{ env.NODE_VERSION }}
126
+ cache: 'npm'
127
+ registry-url: ${{ env.REGISTRY_URL }}
128
+
129
+ - name: 🔧 Install dependencies
130
+ run: npm run ci:install
131
+
132
+ - name: 📥 Download build artifacts
133
+ uses: actions/download-artifact@v4
134
+ with:
135
+ name: dist-files
136
+ path: dist/
137
+
138
+ - name: 🚀 Publish to NPM Registry
139
+ run: npm run ci:publish
140
+ env:
141
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
142
+
143
+ - name: 📦 Setup GitHub Packages Registry
144
+ run: |
145
+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
146
+ echo "@mks2508:registry=https://npm.pkg.github.com" >> ~/.npmrc
147
+
148
+ - name: 📦 Publish to GitHub Packages
149
+ run: npm publish --registry=https://npm.pkg.github.com --access=public --ignore-scripts
150
+
151
+ - name: 📝 Extract release notes
152
+ id: extract_release
153
+ run: |
154
+ VERSION=${GITHUB_REF#refs/tags/v}
155
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
156
+ echo "tag_name=v$VERSION" >> $GITHUB_OUTPUT
157
+
158
+ # ===== GITHUB RELEASE =====
159
+ github-release:
160
+ runs-on: ubuntu-latest
161
+ needs: publish
162
+ if: startsWith(github.ref, 'refs/tags/v')
163
+
164
+ steps:
165
+ - name: 📥 Checkout code
166
+ uses: actions/checkout@v4
167
+
168
+ - name: 📥 Download build artifacts
169
+ uses: actions/download-artifact@v4
170
+ with:
171
+ name: dist-files
172
+ path: dist/
173
+
174
+ - name: 📦 Create release archive
175
+ run: |
176
+ tar -czf better-logger-dist.tar.gz dist/
177
+ zip -r better-logger-dist.zip dist/
178
+
179
+ - name: 🏷️ Create GitHub Release
180
+ uses: softprops/action-gh-release@v1
181
+ with:
182
+ name: Better Logger ${{ github.ref_name }}
183
+ tag_name: ${{ github.ref_name }}
184
+ body: |
185
+ ## 🚀 Better Logger ${{ github.ref_name }}
186
+
187
+ ### 📦 Installation
188
+ ```bash
189
+ npm install @mks2508/better-logger@${{ github.ref_name }}
190
+ ```
191
+
192
+ ### 📊 Bundle Sizes
193
+ - **Full library**: ~64KB (13KB gzipped)
194
+ - **Core module**: ~6KB (2KB gzipped)
195
+ - **Styling module**: ~26KB (5KB gzipped)
196
+ - **Exports module**: ~12KB (3KB gzipped)
197
+
198
+ ### 🔗 Links
199
+ - [📚 Documentation](https://mks2508.github.io/advanced-logger/)
200
+ - [🧩 Examples](https://github.com/MKS2508/advanced-logger/tree/main/examples)
201
+ - [📋 Changelog](https://github.com/MKS2508/advanced-logger/blob/main/CHANGELOG.md)
202
+
203
+ ### 📁 Assets
204
+ - `better-logger-dist.tar.gz` - Distribution files (tar.gz)
205
+ - `better-logger-dist.zip` - Distribution files (zip)
206
+ files: |
207
+ better-logger-dist.tar.gz
208
+ better-logger-dist.zip
209
+ env:
210
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
211
+
212
+ # ===== DEPLOY GITHUB PAGES =====
213
+ deploy-docs:
214
+ runs-on: ubuntu-latest
215
+ needs: build-and-test
216
+ if: github.ref == 'refs/heads/main'
217
+
218
+ permissions:
219
+ contents: read
220
+ pages: write
221
+ id-token: write
222
+
223
+ environment:
224
+ name: github-pages
225
+ url: ${{ steps.deployment.outputs.page_url }}
226
+
227
+ steps:
228
+ - name: 📥 Checkout code
229
+ uses: actions/checkout@v4
230
+
231
+ - name: 📦 Setup Node.js
232
+ uses: actions/setup-node@v4
233
+ with:
234
+ node-version: ${{ env.NODE_VERSION }}
235
+ cache: 'npm'
236
+
237
+ - name: 🔧 Install dependencies
238
+ run: npm run ci:install
239
+
240
+ - name: 📥 Download build artifacts
241
+ uses: actions/download-artifact@v4
242
+ with:
243
+ name: dist-files
244
+ path: dist/
245
+
246
+ - name: 🏗️ Build documentation site
247
+ run: |
248
+ mkdir -p docs-site
249
+ cp demo.html docs-site/index.html
250
+ cp -r dist/ docs-site/dist/
251
+ cp -r docs/ docs-site/docs/
252
+ cp README.md docs-site/
253
+
254
+ - name: 📤 Setup Pages
255
+ uses: actions/configure-pages@v4
256
+
257
+ - name: 📤 Upload to Pages
258
+ uses: actions/upload-pages-artifact@v3
259
+ with:
260
+ path: docs-site/
261
+
262
+ - name: 🚀 Deploy to GitHub Pages
263
+ id: deployment
264
+ uses: actions/deploy-pages@v4
265
+
266
+ # ===== SECURITY & QUALITY =====
267
+ security-audit:
268
+ runs-on: ubuntu-latest
269
+
270
+ steps:
271
+ - name: 📥 Checkout code
272
+ uses: actions/checkout@v4
273
+
274
+ - name: 📦 Setup Node.js
275
+ uses: actions/setup-node@v4
276
+ with:
277
+ node-version: ${{ env.NODE_VERSION }}
278
+ cache: 'npm'
279
+
280
+ - name: 🔒 Security audit
281
+ run: npm audit --audit-level=high
282
+
283
+ - name: 📊 Check for outdated packages
284
+ run: npm outdated || true
285
+
286
+ # ===== PERFORMANCE TESTING =====
287
+ performance:
288
+ runs-on: ubuntu-latest
289
+ needs: build-and-test
290
+
291
+ steps:
292
+ - name: 📥 Checkout code
293
+ uses: actions/checkout@v4
294
+
295
+ - name: 📦 Setup Node.js
296
+ uses: actions/setup-node@v4
297
+ with:
298
+ node-version: ${{ env.NODE_VERSION }}
299
+ cache: 'npm'
300
+
301
+ - name: 🔧 Install dependencies
302
+ run: npm run ci:install
303
+
304
+ - name: 📥 Download build artifacts
305
+ uses: actions/download-artifact@v4
306
+ with:
307
+ name: dist-files
308
+ path: dist/
309
+
310
+ - name: ⚡ Performance benchmarks
311
+ run: npm run test:performance
312
+
313
+ - name: 📊 Bundle analysis
314
+ run: |
315
+ echo "## Bundle Analysis" >> $GITHUB_STEP_SUMMARY
316
+ echo "### Size Breakdown" >> $GITHUB_STEP_SUMMARY
317
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
318
+ ls -la dist/ >> $GITHUB_STEP_SUMMARY
319
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,269 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ release_type:
7
+ description: 'Release type'
8
+ required: true
9
+ default: 'patch'
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+ - alpha
16
+ - beta
17
+ skip_tests:
18
+ description: 'Skip tests (not recommended)'
19
+ required: false
20
+ default: false
21
+ type: boolean
22
+
23
+ env:
24
+ NODE_VERSION: '20'
25
+ REGISTRY_URL: 'https://registry.npmjs.org'
26
+
27
+ jobs:
28
+ # ===== PRE-RELEASE VALIDATION =====
29
+ pre-release:
30
+ runs-on: ubuntu-latest
31
+
32
+ outputs:
33
+ version: ${{ steps.version.outputs.version }}
34
+ tag: ${{ steps.version.outputs.tag }}
35
+
36
+ steps:
37
+ - name: 📥 Checkout code
38
+ uses: actions/checkout@v4
39
+ with:
40
+ fetch-depth: 0
41
+ token: ${{ secrets.GITHUB_TOKEN }}
42
+
43
+ - name: 📦 Setup Node.js
44
+ uses: actions/setup-node@v4
45
+ with:
46
+ node-version: ${{ env.NODE_VERSION }}
47
+ cache: 'npm'
48
+ registry-url: ${{ env.REGISTRY_URL }}
49
+
50
+ - name: 🔧 Install dependencies
51
+ run: npm ci
52
+
53
+ - name: 🧪 Run tests (unless skipped)
54
+ if: ${{ !inputs.skip_tests }}
55
+ run: |
56
+ npm run type-check
57
+ npm run lint
58
+ npm run test
59
+ npm run build
60
+
61
+ - name: 🏷️ Determine version
62
+ id: version
63
+ run: |
64
+ case "${{ inputs.release_type }}" in
65
+ "patch")
66
+ NEW_VERSION=$(npm version patch --no-git-tag-version)
67
+ ;;
68
+ "minor")
69
+ NEW_VERSION=$(npm version minor --no-git-tag-version)
70
+ ;;
71
+ "major")
72
+ NEW_VERSION=$(npm version major --no-git-tag-version)
73
+ ;;
74
+ "alpha")
75
+ NEW_VERSION=$(npm version prerelease --preid=alpha --no-git-tag-version)
76
+ ;;
77
+ "beta")
78
+ NEW_VERSION=$(npm version prerelease --preid=beta --no-git-tag-version)
79
+ ;;
80
+ esac
81
+
82
+ echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
83
+ echo "tag=v$NEW_VERSION" >> $GITHUB_OUTPUT
84
+ echo "📦 New version: $NEW_VERSION"
85
+
86
+ - name: 🏗️ Build for release
87
+ run: npm run build
88
+
89
+ - name: 📤 Upload build artifacts
90
+ uses: actions/upload-artifact@v4
91
+ with:
92
+ name: release-dist
93
+ path: dist/
94
+ retention-days: 7
95
+
96
+ # ===== CREATE RELEASE =====
97
+ create-release:
98
+ runs-on: ubuntu-latest
99
+ needs: pre-release
100
+ permissions:
101
+ contents: write
102
+ packages: write
103
+ id-token: write
104
+
105
+ steps:
106
+ - name: 📥 Checkout code
107
+ uses: actions/checkout@v4
108
+ with:
109
+ fetch-depth: 0
110
+ token: ${{ secrets.GITHUB_TOKEN }}
111
+
112
+ - name: 📦 Setup Node.js
113
+ uses: actions/setup-node@v4
114
+ with:
115
+ node-version: ${{ env.NODE_VERSION }}
116
+ cache: 'npm'
117
+ registry-url: ${{ env.REGISTRY_URL }}
118
+
119
+ - name: 📥 Download build artifacts
120
+ uses: actions/download-artifact@v4
121
+ with:
122
+ name: release-dist
123
+ path: dist/
124
+
125
+ - name: 🔄 Update package version
126
+ run: npm version ${{ needs.pre-release.outputs.version }} --no-git-tag-version
127
+
128
+ - name: 📦 Create release archives
129
+ run: |
130
+ # Create distribution archives
131
+ tar -czf better-logger-${{ needs.pre-release.outputs.version }}.tar.gz dist/ docs/ README.md package.json
132
+ zip -r better-logger-${{ needs.pre-release.outputs.version }}.zip dist/ docs/ README.md package.json
133
+
134
+ # Create individual module packages
135
+ cd dist
136
+ tar -czf ../better-logger-core-${{ needs.pre-release.outputs.version }}.tar.gz core.js core.cjs types/core.d.ts
137
+ tar -czf ../better-logger-styling-${{ needs.pre-release.outputs.version }}.tar.gz styling.js styling.cjs types/styling.d.ts
138
+ tar -czf ../better-logger-exports-${{ needs.pre-release.outputs.version }}.tar.gz exports.js exports.cjs types/exports.d.ts
139
+ cd ..
140
+
141
+ - name: 📝 Generate changelog
142
+ id: changelog
143
+ run: |
144
+ # Get commits since last tag
145
+ LAST_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "")
146
+ if [ -n "$LAST_TAG" ]; then
147
+ echo "## Changes since $LAST_TAG" > RELEASE_NOTES.md
148
+ git log $LAST_TAG..HEAD --pretty=format:"- %s (%h)" >> RELEASE_NOTES.md
149
+ else
150
+ echo "## Initial Release" > RELEASE_NOTES.md
151
+ echo "- Complete Better Logger implementation with all features" >> RELEASE_NOTES.md
152
+ fi
153
+
154
+ # Add bundle size info
155
+ echo "" >> RELEASE_NOTES.md
156
+ echo "## 📦 Bundle Sizes" >> RELEASE_NOTES.md
157
+ echo "\`\`\`" >> RELEASE_NOTES.md
158
+ ls -lh dist/*.js dist/*.cjs | grep -E '\.(js|cjs)$' >> RELEASE_NOTES.md
159
+ echo "\`\`\`" >> RELEASE_NOTES.md
160
+
161
+ - name: 🏷️ Create and push tag
162
+ run: |
163
+ git config user.name "github-actions[bot]"
164
+ git config user.email "github-actions[bot]@users.noreply.github.com"
165
+ git add package.json
166
+ git commit -m "chore: release ${{ needs.pre-release.outputs.version }}"
167
+ git tag -a "${{ needs.pre-release.outputs.tag }}" -m "Release ${{ needs.pre-release.outputs.version }}"
168
+ git push origin main --tags
169
+
170
+ - name: 🚀 Publish to NPM Registry
171
+ run: |
172
+ if [[ "${{ inputs.release_type }}" == "alpha" || "${{ inputs.release_type }}" == "beta" ]]; then
173
+ npm run ci:publish -- --tag ${{ inputs.release_type }}
174
+ else
175
+ npm run ci:publish
176
+ fi
177
+ env:
178
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
179
+
180
+ - name: 📦 Setup GitHub Packages Registry
181
+ run: |
182
+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
183
+ echo "@mks2508:registry=https://npm.pkg.github.com" >> ~/.npmrc
184
+
185
+ - name: 📦 Publish to GitHub Packages
186
+ run: |
187
+ if [[ "${{ inputs.release_type }}" == "alpha" || "${{ inputs.release_type }}" == "beta" ]]; then
188
+ npm publish --registry=https://npm.pkg.github.com --access=public --tag ${{ inputs.release_type }} --ignore-scripts
189
+ else
190
+ npm publish --registry=https://npm.pkg.github.com --access=public --ignore-scripts
191
+ fi
192
+
193
+ - name: 🏷️ Create GitHub Release
194
+ uses: softprops/action-gh-release@v1
195
+ with:
196
+ tag_name: ${{ needs.pre-release.outputs.tag }}
197
+ name: Better Logger ${{ needs.pre-release.outputs.version }}
198
+ body_path: RELEASE_NOTES.md
199
+ draft: false
200
+ prerelease: ${{ contains(inputs.release_type, 'alpha') || contains(inputs.release_type, 'beta') }}
201
+ files: |
202
+ better-logger-${{ needs.pre-release.outputs.version }}.tar.gz
203
+ better-logger-${{ needs.pre-release.outputs.version }}.zip
204
+ better-logger-core-${{ needs.pre-release.outputs.version }}.tar.gz
205
+ better-logger-styling-${{ needs.pre-release.outputs.version }}.tar.gz
206
+ better-logger-exports-${{ needs.pre-release.outputs.version }}.tar.gz
207
+ env:
208
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
209
+
210
+ # ===== POST-RELEASE TASKS =====
211
+ post-release:
212
+ runs-on: ubuntu-latest
213
+ needs: [pre-release, create-release]
214
+ permissions:
215
+ contents: read
216
+ pages: write
217
+ id-token: write
218
+
219
+ steps:
220
+ - name: 📥 Checkout code
221
+ uses: actions/checkout@v4
222
+ with:
223
+ ref: main
224
+ fetch-depth: 0
225
+
226
+ - name: 📦 Setup Node.js
227
+ uses: actions/setup-node@v4
228
+ with:
229
+ node-version: ${{ env.NODE_VERSION }}
230
+ cache: 'npm'
231
+
232
+ - name: 🔧 Install dependencies
233
+ run: npm ci
234
+
235
+ - name: 📥 Download build artifacts
236
+ uses: actions/download-artifact@v4
237
+ with:
238
+ name: release-dist
239
+ path: dist/
240
+
241
+ - name: 🚀 Deploy documentation
242
+ run: |
243
+ # Build documentation site
244
+ mkdir -p docs-site
245
+ cp demo.html docs-site/index.html
246
+ cp -r dist/ docs-site/dist/
247
+ cp -r docs/ docs-site/docs/
248
+ cp README.md docs-site/
249
+
250
+ - name: 📤 Deploy to GitHub Pages
251
+ uses: peaceiris/actions-gh-pages@v3
252
+ with:
253
+ github_token: ${{ secrets.GITHUB_TOKEN }}
254
+ publish_dir: ./docs-site
255
+ publish_branch: gh-pages
256
+ commit_message: 'docs: update documentation for ${{ needs.pre-release.outputs.version }}'
257
+
258
+ - name: 📊 Release summary
259
+ run: |
260
+ echo "## 🎉 Release Complete!" >> $GITHUB_STEP_SUMMARY
261
+ echo "- **Version**: ${{ needs.pre-release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
262
+ echo "- **NPM**: https://www.npmjs.com/package/@mks2508/better-logger" >> $GITHUB_STEP_SUMMARY
263
+ echo "- **GitHub**: https://github.com/MKS2508/advanced-logger/releases/tag/${{ needs.pre-release.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
264
+ echo "- **Docs**: https://mks2508.github.io/advanced-logger/" >> $GITHUB_STEP_SUMMARY
265
+ echo "" >> $GITHUB_STEP_SUMMARY
266
+ echo "### 📦 Installation" >> $GITHUB_STEP_SUMMARY
267
+ echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
268
+ echo "npm install @mks2508/better-logger@${{ needs.pre-release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
269
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
package/.npmrc.bak ADDED
@@ -0,0 +1 @@
1
+ @mks2508:registry=https://npm.pkg.github.com