@mks2508/better-logger 0.0.2-alpha.2 → 0.3.0
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/.claude/settings.local.json +18 -2
- package/.github/workflows/ci-quality.yml +357 -0
- package/.github/workflows/docs-demo.yml +119 -0
- package/.github/workflows/releases-core.yml +512 -0
- package/.github/workflows/releases-full.yml +582 -0
- package/.github/{workflows → workflows-backup}/ci.yml +12 -110
- package/.github/workflows-backup/nightly.yml +196 -0
- package/.github/workflows-backup/release-optimized.yml +373 -0
- package/.release-notes-0.2.0.md +129 -0
- package/.yamllint +28 -0
- package/CHANGELOG.json +783 -0
- package/CLAUDE.md +92 -1
- package/README.md +198 -490
- package/bun.lock +323 -0
- package/demo.html +9 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/Logger.d.ts +272 -0
- package/dist/Logger.d.ts.map +1 -0
- package/dist/Logger.js +680 -0
- package/dist/ScopedLogger.d.ts +126 -0
- package/dist/ScopedLogger.d.ts.map +1 -0
- package/dist/ScopedLogger.js +234 -0
- package/dist/chunks/Logger-BpeuYIxR.js +2 -0
- package/dist/chunks/Logger-BpeuYIxR.js.map +1 -0
- package/dist/chunks/Logger-Didxtr23.js +3275 -0
- package/dist/chunks/Logger-Didxtr23.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
- package/dist/chunks/environment-Bxbnw4pd.js +544 -0
- package/dist/chunks/environment-Bxbnw4pd.js.map +1 -0
- package/dist/chunks/environment-Dm66zOML.js +4 -0
- package/dist/chunks/environment-Dm66zOML.js.map +1 -0
- package/dist/chunks/formatting-C0riPC5_.js +95 -0
- package/dist/chunks/formatting-C0riPC5_.js.map +1 -0
- package/dist/chunks/formatting-DNCAV66-.js +2 -0
- package/dist/chunks/formatting-DNCAV66-.js.map +1 -0
- package/dist/cli/CommandProcessor.d.ts +103 -0
- package/dist/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/cli/CommandProcessor.js +184 -0
- package/dist/cli/commands/ConfigCommand.d.ts +17 -0
- package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/cli/commands/ConfigCommand.js +88 -0
- package/dist/cli/commands/ExportCommand.d.ts +51 -0
- package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/cli/commands/ExportCommand.js +243 -0
- package/dist/cli/commands/HistoryCommand.d.ts +50 -0
- package/dist/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/cli/commands/HistoryCommand.js +96 -0
- package/dist/cli/commands/StatusCommand.d.ts +33 -0
- package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/cli/commands/StatusCommand.js +93 -0
- package/dist/cli/commands/ThemeCommand.d.ts +33 -0
- package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/cli/commands/ThemeCommand.js +79 -0
- package/dist/cli/help.d.ts +15 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +118 -0
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +46 -0
- package/dist/constants.d.ts +122 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +159 -0
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +134 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +315 -242
- package/dist/core.js.map +1 -1
- package/dist/example.d.ts +18 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +154 -0
- package/dist/exports-module.d.ts +203 -0
- package/dist/exports-module.d.ts.map +1 -0
- package/dist/exports-module.js +260 -0
- package/dist/exports.cjs +1 -1
- package/dist/exports.cjs.map +1 -1
- package/dist/exports.js +5 -4
- package/dist/exports.js.map +1 -1
- package/dist/handlers/AnalyticsLogHandler.d.ts +11 -0
- package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/handlers/AnalyticsLogHandler.js +19 -0
- package/dist/handlers/ExportLogHandler.d.ts +103 -0
- package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/handlers/ExportLogHandler.js +516 -0
- package/dist/handlers/FileLogHandler.d.ts +36 -0
- package/dist/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/handlers/FileLogHandler.js +156 -0
- package/dist/handlers/RemoteLogHandler.d.ts +14 -0
- package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/dist/handlers/RemoteLogHandler.js +37 -0
- package/dist/handlers/index.d.ts +8 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +86 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -103
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +139 -0
- package/dist/styling/LogStyleBuilder.d.ts +149 -0
- package/dist/styling/LogStyleBuilder.d.ts.map +1 -0
- package/dist/styling/LogStyleBuilder.js +289 -0
- package/dist/styling/SemanticStyles.d.ts +181 -0
- package/dist/styling/SemanticStyles.d.ts.map +1 -0
- package/dist/styling/SemanticStyles.js +339 -0
- package/dist/styling/SmartPresets.d.ts +25 -0
- package/dist/styling/SmartPresets.d.ts.map +1 -0
- package/dist/styling/SmartPresets.js +276 -0
- package/dist/styling/StyleBuilder.d.ts +140 -0
- package/dist/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/styling/StyleBuilder.js +280 -0
- package/dist/styling/banners.d.ts +45 -0
- package/dist/styling/banners.d.ts.map +1 -0
- package/dist/styling/banners.js +155 -0
- package/dist/styling/index.d.ts +10 -0
- package/dist/styling/index.d.ts.map +1 -0
- package/dist/styling/index.js +9 -0
- package/dist/styling/themes.d.ts +10 -0
- package/dist/styling/themes.d.ts.map +1 -0
- package/dist/styling/themes.js +231 -0
- package/dist/styling-module.d.ts +185 -0
- package/dist/styling-module.d.ts.map +1 -0
- package/dist/styling-module.js +199 -0
- package/dist/styling.cjs +1 -1
- package/dist/styling.cjs.map +1 -1
- package/dist/styling.js +6 -6
- package/dist/styling.js.map +1 -1
- package/dist/types/Logger.d.ts +268 -0
- package/dist/types/Logger.d.ts.map +1 -0
- package/dist/types/ScopedLogger.d.ts +123 -0
- package/dist/types/ScopedLogger.d.ts.map +1 -0
- package/dist/types/cli/CommandProcessor.d.ts +100 -0
- package/dist/types/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/types/cli/commands/ConfigCommand.d.ts +14 -0
- package/dist/types/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/ExportCommand.d.ts +48 -0
- package/dist/types/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/HistoryCommand.d.ts +47 -0
- package/dist/types/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/StatusCommand.d.ts +30 -0
- package/dist/types/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/ThemeCommand.d.ts +30 -0
- package/dist/types/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/types/cli/help.d.ts +12 -0
- package/dist/types/cli/help.d.ts.map +1 -0
- package/dist/types/cli/index.d.ts +15 -0
- package/dist/types/cli/index.d.ts.map +1 -0
- package/dist/types/constants.d.ts +119 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/core.d.ts +125 -211
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +13 -0
- package/dist/types/example.d.ts +18 -0
- package/dist/types/example.d.ts.map +1 -0
- package/dist/types/exports-module.d.ts +196 -0
- package/dist/types/exports-module.d.ts.map +1 -0
- package/dist/types/handlers/AnalyticsLogHandler.d.ts +8 -0
- package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/ExportLogHandler.d.ts +100 -0
- package/dist/types/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/FileLogHandler.d.ts +33 -0
- package/dist/types/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/RemoteLogHandler.d.ts +11 -0
- package/dist/types/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/index.d.ts +8 -0
- package/dist/types/handlers/index.d.ts.map +1 -0
- package/dist/types/handlers.d.ts +88 -0
- package/dist/types/handlers.d.ts.map +1 -0
- package/dist/types/handlers.js +4 -0
- package/dist/types/index.d.ts +7 -675
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/styling/LogStyleBuilder.d.ts +146 -0
- package/dist/types/styling/LogStyleBuilder.d.ts.map +1 -0
- package/dist/types/styling/SemanticStyles.d.ts +178 -0
- package/dist/types/styling/SemanticStyles.d.ts.map +1 -0
- package/dist/types/styling/SmartPresets.d.ts +22 -0
- package/dist/types/styling/SmartPresets.d.ts.map +1 -0
- package/dist/types/styling/StyleBuilder.d.ts +140 -0
- package/dist/types/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/types/styling/banners.d.ts +42 -0
- package/dist/types/styling/banners.d.ts.map +1 -0
- package/dist/types/styling/index.d.ts +10 -0
- package/dist/types/styling/index.d.ts.map +1 -0
- package/dist/types/styling/themes.d.ts +7 -0
- package/dist/types/styling/themes.d.ts.map +1 -0
- package/dist/types/styling-module.d.ts +178 -0
- package/dist/types/styling-module.d.ts.map +1 -0
- package/dist/types/types/core.d.ts +125 -0
- package/dist/types/types/core.d.ts.map +1 -0
- package/dist/types/types/handlers.d.ts +85 -0
- package/dist/types/types/handlers.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/environment.d.ts +47 -0
- package/dist/types/utils/environment.d.ts.map +1 -0
- package/dist/types/utils/formatting.d.ts +37 -0
- package/dist/types/utils/formatting.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/opentui-detection.d.ts +34 -0
- package/dist/types/utils/opentui-detection.d.ts.map +1 -0
- package/dist/types/utils/output.d.ts +41 -0
- package/dist/types/utils/output.d.ts.map +1 -0
- package/dist/types/utils/stackTrace.d.ts +6 -0
- package/dist/types/utils/stackTrace.d.ts.map +1 -0
- package/dist/types/utils/timestamps.d.ts +20 -0
- package/dist/types/utils/timestamps.d.ts.map +1 -0
- package/dist/utils/environment.d.ts +47 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/environment.js +85 -0
- package/dist/utils/formatting.d.ts +40 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +117 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/opentui-detection.d.ts +34 -0
- package/dist/utils/opentui-detection.d.ts.map +1 -0
- package/dist/utils/opentui-detection.js +116 -0
- package/dist/utils/output.d.ts +44 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +150 -0
- package/dist/utils/stackTrace.d.ts +9 -0
- package/dist/utils/stackTrace.d.ts.map +1 -0
- package/dist/utils/stackTrace.js +81 -0
- package/dist/utils/timestamps.d.ts +20 -0
- package/dist/utils/timestamps.d.ts.map +1 -0
- package/dist/utils/timestamps.js +71 -0
- package/docs/API.md +691 -0
- package/docs/CORE.md +10 -10
- package/docs/DEVELOPMENT.md +731 -0
- package/docs/PACKAGES.md +244 -0
- package/docs/_config.yml +36 -0
- package/docs/index.md +179 -0
- package/examples/README.md +208 -0
- package/examples/basic-logging.js +75 -0
- package/examples/data-export.js +234 -0
- package/examples/package.json +16 -0
- package/examples/performance-timing.js +170 -0
- package/examples/simplified-api.js +124 -0
- package/examples/styling-themes.js +207 -0
- package/package.json +37 -21
- package/packages/core/package.json +57 -0
- package/packages/exports/package.json +41 -0
- package/packages/nodejs-opentui/README.md +232 -0
- package/packages/nodejs-opentui/package.json +72 -0
- package/packages/nodejs-opentui/src/LogRenderer.ts +171 -0
- package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +178 -0
- package/packages/nodejs-opentui/src/components/LogBadge.tsx +131 -0
- package/packages/nodejs-opentui/src/index.ts +133 -0
- package/packages/nodejs-opentui/src/types.ts +158 -0
- package/packages/nodejs-opentui/tsconfig.json +20 -0
- package/packages/styling/package.json +41 -0
- package/project-utils/README.md +172 -0
- package/project-utils/auto-release-gemini.ts +1193 -0
- package/project-utils/auto-release-ui.ts +1329 -0
- package/project-utils/commit-generator.ts +1385 -0
- package/project-utils/commit-ui.ts +264 -0
- package/project-utils/git-utils.ts +199 -0
- package/project-utils/github-release-manager.ts +466 -0
- package/project-utils/project-config.ts +260 -0
- package/project-utils/prompt-templates.js +345 -0
- package/project-utils/prompt-templates.ts +422 -0
- package/project-utils/version-manager.ts +1078 -0
- package/src/Logger.ts +251 -16
- package/src/ScopedLogger.ts +262 -0
- package/src/cli/CommandProcessor.ts +173 -2
- package/src/cli/commands/HistoryCommand.ts +117 -0
- package/src/cli/index.ts +12 -0
- package/src/constants.ts +84 -2
- package/src/core.ts +119 -46
- package/src/example.ts +4 -4
- package/src/exports-module.ts +1 -1
- package/src/handlers/ExportLogHandler.ts +141 -0
- package/src/handlers/FileLogHandler.ts +144 -5
- package/src/index.ts +1 -1
- package/src/main.ts +3 -3
- package/src/styling/LogStyleBuilder.ts +355 -0
- package/src/styling/SemanticStyles.ts +380 -0
- package/src/styling/SmartPresets.ts +288 -0
- package/src/styling/StyleBuilder.ts +14 -0
- package/src/styling/index.ts +16 -1
- package/src/styling-module.ts +1 -1
- package/src/types/core.ts +60 -0
- package/src/types/index.ts +6 -0
- package/src/utils/environment.ts +94 -0
- package/src/utils/formatting.ts +142 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/opentui-detection.ts +138 -0
- package/src/utils/output.ts +66 -8
- package/test-core-browser.html +237 -0
- package/test-core-node.js +63 -0
- package/tests/test-conflict-resolution.ts +391 -0
- package/tests/validate-workflows.sh +131 -0
- package/tests/yaml-autofix.sh +146 -0
- package/vite.config.ts +189 -50
- package/.npmrc.bak +0 -1
- package/dist/chunks/Logger-BQhMKy_T.js +0 -2
- package/dist/chunks/Logger-BQhMKy_T.js.map +0 -1
- package/dist/chunks/Logger-BrFKFZcD.js +0 -978
- package/dist/chunks/Logger-BrFKFZcD.js.map +0 -1
- package/dist/chunks/core-2opW4Pi3.js +0 -194
- package/dist/chunks/core-2opW4Pi3.js.map +0 -1
- package/dist/chunks/core-DyugwSYZ.js +0 -4
- package/dist/chunks/core-DyugwSYZ.js.map +0 -1
- package/dist/chunks/exports-BNP3R7dp.js +0 -421
- package/dist/chunks/exports-BNP3R7dp.js.map +0 -1
- package/dist/chunks/exports-U1xLBXrY.js +0 -2
- package/dist/chunks/exports-U1xLBXrY.js.map +0 -1
- package/dist/chunks/styling-DhUDzwlE.js +0 -654
- package/dist/chunks/styling-DhUDzwlE.js.map +0 -1
- package/dist/chunks/styling-tmRDI28D.js +0 -2
- package/dist/chunks/styling-tmRDI28D.js.map +0 -1
- package/dist/types/exports.d.ts +0 -600
- package/dist/types/styling.d.ts +0 -751
- package/src/Logger.ts.backup +0 -1684
- /package/.github/{workflows → workflows-backup}/release.yml +0 -0
|
@@ -105,109 +105,6 @@ jobs:
|
|
|
105
105
|
path: test-results/
|
|
106
106
|
retention-days: 30
|
|
107
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
108
|
|
|
212
109
|
# ===== DEPLOY GITHUB PAGES =====
|
|
213
110
|
deploy-docs:
|
|
@@ -243,13 +140,18 @@ jobs:
|
|
|
243
140
|
name: dist-files
|
|
244
141
|
path: dist/
|
|
245
142
|
|
|
246
|
-
- name: 🏗️
|
|
143
|
+
- name: 🏗️ Setup site structure
|
|
247
144
|
run: |
|
|
248
|
-
mkdir -p docs
|
|
249
|
-
|
|
250
|
-
cp
|
|
251
|
-
cp -r
|
|
252
|
-
|
|
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
|
|
253
155
|
|
|
254
156
|
- name: 📤 Setup Pages
|
|
255
157
|
uses: actions/configure-pages@v4
|
|
@@ -257,7 +159,7 @@ jobs:
|
|
|
257
159
|
- name: 📤 Upload to Pages
|
|
258
160
|
uses: actions/upload-pages-artifact@v3
|
|
259
161
|
with:
|
|
260
|
-
path:
|
|
162
|
+
path: ./_site
|
|
261
163
|
|
|
262
164
|
- name: 🚀 Deploy to GitHub Pages
|
|
263
165
|
id: deployment
|
|
@@ -0,0 +1,196 @@
|
|
|
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
|