@lobehub/lobehub 2.0.0-next.176 → 2.0.0-next.177

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.
@@ -0,0 +1,117 @@
1
+ name: Bundle Analyzer
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: read
8
+ actions: write
9
+
10
+ env:
11
+ NODE_VERSION: 24.11.1
12
+ BUN_VERSION: 1.2.23
13
+
14
+ jobs:
15
+ bundle-analyzer:
16
+ name: Analyze Bundle Size
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v5
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v6
25
+ with:
26
+ node-version: ${{ env.NODE_VERSION }}
27
+
28
+ - name: Setup Bun
29
+ uses: oven-sh/setup-bun@v2
30
+ with:
31
+ bun-version: ${{ env.BUN_VERSION }}
32
+
33
+ - name: Setup pnpm
34
+ uses: pnpm/action-setup@v4
35
+
36
+ - name: Install dependencies
37
+ run: pnpm i
38
+
39
+ - name: Ensure lockfile exists
40
+ run: |
41
+ # Temporarily override .npmrc lockfile=false setting
42
+ # to generate pnpm-lock.yaml for reproducible builds
43
+ if [ ! -f "pnpm-lock.yaml" ]; then
44
+ echo "Generating pnpm-lock.yaml..."
45
+ # Create temporary .npmrc override
46
+ mv .npmrc .npmrc.bak
47
+ echo "lockfile=true" > .npmrc
48
+ cat .npmrc.bak >> .npmrc
49
+ pnpm i
50
+ mv .npmrc.bak .npmrc
51
+ fi
52
+
53
+ - name: Generate build secrets
54
+ id: generate-secret
55
+ run: echo "secret=$(openssl rand -base64 32)" >> $GITHUB_OUTPUT
56
+
57
+ - name: Build with bundle analyzer
58
+ run: bun run build:analyze
59
+ env:
60
+ NODE_OPTIONS: --max-old-space-size=6144
61
+ KEY_VAULTS_SECRET: ${{ steps.generate-secret.outputs.secret }}
62
+ S3_PUBLIC_DOMAIN: https://example.com
63
+ APP_URL: https://example.com
64
+
65
+ - name: Prepare analyzer reports
66
+ run: |
67
+ mkdir -p bundle-report
68
+ # Copy analyzer HTML reports if they exist
69
+ if [ -d ".next/analyze" ]; then
70
+ cp -r .next/analyze/* bundle-report/ || true
71
+ fi
72
+ # Also check if reports are in .vercel/output
73
+ if [ -d ".vercel/output/.next/analyze" ]; then
74
+ cp -r .vercel/output/.next/analyze/* bundle-report/ || true
75
+ fi
76
+ # Include pnpm lockfile for reproducible builds
77
+ if [ -f "pnpm-lock.yaml" ]; then
78
+ cp pnpm-lock.yaml bundle-report/pnpm-lock.yaml
79
+ echo "Copied pnpm-lock.yaml to bundle-report"
80
+ else
81
+ echo "Warning: pnpm-lock.yaml not found"
82
+ fi
83
+ # Create a summary with build metadata
84
+ echo "# Bundle Analysis Report" > bundle-report/README.md
85
+ echo "" >> bundle-report/README.md
86
+ echo "**Build Date:** $(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> bundle-report/README.md
87
+ echo "**Commit:** ${{ github.sha }}" >> bundle-report/README.md
88
+ echo "**Branch:** ${{ github.ref_name }}" >> bundle-report/README.md
89
+ echo "" >> bundle-report/README.md
90
+ echo "## How to view" >> bundle-report/README.md
91
+ echo "" >> bundle-report/README.md
92
+ echo "1. Download the \`bundle-report\` artifact from this workflow run" >> bundle-report/README.md
93
+ echo "2. Extract the archive" >> bundle-report/README.md
94
+ echo "3. Open \`client.html\` and \`server.html\` in your browser" >> bundle-report/README.md
95
+ echo "" >> bundle-report/README.md
96
+ echo "## Files in this report" >> bundle-report/README.md
97
+ echo "" >> bundle-report/README.md
98
+ echo "- \`client.html\` - Client-side bundle analysis" >> bundle-report/README.md
99
+ echo "- \`server.html\` - Server-side bundle analysis" >> bundle-report/README.md
100
+ echo "- \`pnpm-lock.yaml\` - pnpm lockfile (for reproducible builds)" >> bundle-report/README.md
101
+
102
+ - name: Upload bundle analyzer reports
103
+ uses: actions/upload-artifact@v4
104
+ with:
105
+ name: bundle-report-${{ github.run_id }}
106
+ path: bundle-report/
107
+ retention-days: 30
108
+ if-no-files-found: warn
109
+
110
+ - name: Create summary comment
111
+ run: |
112
+ echo "## Bundle Analysis Complete :chart_with_upwards_trend:" >> $GITHUB_STEP_SUMMARY
113
+ echo "" >> $GITHUB_STEP_SUMMARY
114
+ echo "- **Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
115
+ echo "- **Artifact:** \`bundle-report-${{ github.run_id }}\`" >> $GITHUB_STEP_SUMMARY
116
+ echo "" >> $GITHUB_STEP_SUMMARY
117
+ echo "Download the artifact to view the detailed bundle analysis reports." >> $GITHUB_STEP_SUMMARY
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.177](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.176...v2.0.0-next.177)
6
+
7
+ <sup>Released on **2025-12-24**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **ci**: Add bundle analyzer workflow.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **ci**: Add bundle analyzer workflow, closes [#10932](https://github.com/lobehub/lobe-chat/issues/10932) ([c470cfb](https://github.com/lobehub/lobe-chat/commit/c470cfb))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ## [Version 2.0.0-next.176](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.175...v2.0.0-next.176)
6
31
 
7
32
  <sup>Released on **2025-12-23**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,9 @@
1
1
  [
2
+ {
3
+ "children": {},
4
+ "date": "2025-12-24",
5
+ "version": "2.0.0-next.177"
6
+ },
2
7
  {
3
8
  "children": {
4
9
  "features": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.176",
3
+ "version": "2.0.0-next.177",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",