bsmnt 0.2.0 → 0.2.4
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/package.json +21 -4
- package/src/templates/next-default/.biome/plugins/no-anchor-element.grit +12 -0
- package/src/templates/next-default/.biome/plugins/no-relative-parent-imports.grit +10 -0
- package/src/templates/next-default/.biome/plugins/no-unnecessary-forwardref.grit +9 -0
- package/src/templates/next-default/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- package/src/templates/next-default/.vscode/extensions.json +20 -0
- package/src/templates/next-default/.vscode/settings.json +105 -0
- package/src/templates/next-default/app/favicon.ico +0 -0
- package/src/templates/next-default/app/layout.tsx +104 -0
- package/src/templates/next-default/app/page.tsx +11 -0
- package/src/templates/next-default/app/robots.ts +15 -0
- package/src/templates/next-default/app/sitemap.ts +16 -0
- package/src/templates/next-default/biome.json +2 -2
- package/src/templates/next-default/components/layout/footer/index.tsx +31 -0
- package/src/templates/next-default/components/layout/header/index.tsx +9 -0
- package/src/templates/next-default/components/layout/theme/index.tsx +66 -0
- package/src/templates/next-default/components/layout/wrapper/index.tsx +63 -0
- package/src/templates/next-default/components/ui/README.md +77 -0
- package/src/templates/next-default/components/ui/image/README.md +37 -0
- package/src/templates/next-default/components/ui/image/index.tsx +219 -0
- package/src/templates/next-default/components/ui/link/index.tsx +152 -0
- package/src/templates/next-default/lib/utils/metadata.ts +26 -26
- package/src/templates/next-default/package.json +4 -4
- package/src/templates/next-default/public/fonts/geist/Geist-Mono.woff2 +0 -0
- package/src/templates/next-experiments/app/layout.tsx +18 -18
- package/src/templates/next-experiments/app/robots.ts +3 -3
- package/src/templates/next-experiments/app/sitemap.ts +4 -4
- package/src/templates/next-experiments/biome.json +2 -2
- package/src/templates/next-experiments/components/layout/theme/index.tsx +1 -1
- package/src/templates/next-experiments/components/layout/wrapper/index.tsx +7 -9
- package/src/templates/next-experiments/components/ui/image/index.tsx +39 -46
- package/src/templates/next-experiments/components/ui/link/index.tsx +6 -0
- package/src/templates/next-experiments/lib/utils/metadata.ts +26 -26
- package/src/templates/next-experiments/package.json +4 -4
- package/src/templates/next-webgl/app/layout.tsx +18 -18
- package/src/templates/next-webgl/app/robots.ts +3 -3
- package/src/templates/next-webgl/app/sitemap.ts +4 -4
- package/src/templates/next-webgl/biome.json +2 -2
- package/src/templates/next-webgl/components/layout/theme/index.tsx +1 -1
- package/src/templates/next-webgl/components/layout/wrapper/index.tsx +0 -2
- package/src/templates/next-webgl/components/ui/image/index.tsx +6 -11
- package/src/templates/next-webgl/components/ui/link/index.tsx +9 -2
- package/src/templates/next-webgl/components/webgl/components/scene/index.tsx +1 -0
- package/src/templates/next-webgl/lib/utils/metadata.ts +26 -26
- package/src/templates/next-webgl/package.json +4 -4
- package/src/templates/next-experiments/.cursor/rules/README.md +0 -184
- package/src/templates/next-experiments/.cursor/rules/architecture.mdc +0 -437
- package/src/templates/next-experiments/.cursor/rules/components.mdc +0 -436
- package/src/templates/next-experiments/.cursor/rules/integrations.mdc +0 -447
- package/src/templates/next-experiments/.cursor/rules/main.mdc +0 -278
- package/src/templates/next-experiments/.cursor/rules/styling.mdc +0 -433
- package/src/templates/next-experiments/.github/workflows/lighthouse-to-slack.yml +0 -136
- package/src/templates/next-webgl/.cursor/rules/README.md +0 -184
- package/src/templates/next-webgl/.cursor/rules/architecture.mdc +0 -437
- package/src/templates/next-webgl/.cursor/rules/components.mdc +0 -436
- package/src/templates/next-webgl/.cursor/rules/integrations.mdc +0 -447
- package/src/templates/next-webgl/.cursor/rules/main.mdc +0 -278
- package/src/templates/next-webgl/.cursor/rules/styling.mdc +0 -433
- package/src/templates/next-webgl/.github/workflows/lighthouse-to-slack.yml +0 -136
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
# Lighthouse Performance Reports
|
|
2
|
-
#
|
|
3
|
-
# Runs Lighthouse on Vercel deployments and posts results as commit comments.
|
|
4
|
-
# Our GitHub → Slack integration forwards these to Slack automatically.
|
|
5
|
-
#
|
|
6
|
-
# Required GitHub Secrets:
|
|
7
|
-
# VERCEL_TOKEN - Vercel API token (Settings → Tokens)
|
|
8
|
-
|
|
9
|
-
name: Lighthouse
|
|
10
|
-
|
|
11
|
-
on:
|
|
12
|
-
push:
|
|
13
|
-
branches: [main]
|
|
14
|
-
pull_request:
|
|
15
|
-
types: [opened, synchronize]
|
|
16
|
-
branches: [main]
|
|
17
|
-
paths:
|
|
18
|
-
# Only runs when relevant files change
|
|
19
|
-
- 'app/**'
|
|
20
|
-
- 'components/**'
|
|
21
|
-
- 'lib/**'
|
|
22
|
-
- 'public/**'
|
|
23
|
-
- 'package.json'
|
|
24
|
-
- 'package-lock.json'
|
|
25
|
-
- 'next.config.**'
|
|
26
|
-
|
|
27
|
-
permissions:
|
|
28
|
-
contents: write
|
|
29
|
-
pull-requests: write
|
|
30
|
-
actions: read
|
|
31
|
-
|
|
32
|
-
jobs:
|
|
33
|
-
lighthouse:
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
timeout-minutes: 10
|
|
36
|
-
|
|
37
|
-
steps:
|
|
38
|
-
- name: Discover Vercel Project
|
|
39
|
-
id: vercel_info
|
|
40
|
-
env:
|
|
41
|
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
42
|
-
run: |
|
|
43
|
-
project_name="${GITHUB_REPOSITORY##*/}"
|
|
44
|
-
echo "Looking for Vercel project: $project_name"
|
|
45
|
-
|
|
46
|
-
# Get team ID for basement.studio
|
|
47
|
-
teams=$(curl -s -H "Authorization: Bearer $VERCEL_TOKEN" "https://api.vercel.com/v2/teams")
|
|
48
|
-
team_id=$(echo "$teams" | jq -r '.teams[] | select(.slug=="basement") | .id')
|
|
49
|
-
echo "Team ID: $team_id"
|
|
50
|
-
|
|
51
|
-
# Get project ID by matching repo name
|
|
52
|
-
projects=$(curl -s -H "Authorization: Bearer $VERCEL_TOKEN" "https://api.vercel.com/v9/projects?teamId=$team_id")
|
|
53
|
-
project_id=$(echo "$projects" | jq -r ".projects[] | select(.name==\"$project_name\") | .id")
|
|
54
|
-
echo "Project ID: $project_id"
|
|
55
|
-
|
|
56
|
-
echo "team_id=$team_id" >> $GITHUB_OUTPUT
|
|
57
|
-
echo "project_id=$project_id" >> $GITHUB_OUTPUT
|
|
58
|
-
|
|
59
|
-
- name: Get Vercel Preview URL
|
|
60
|
-
id: vercel_url
|
|
61
|
-
uses: zentered/vercel-preview-url@v1.4.0
|
|
62
|
-
env:
|
|
63
|
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
64
|
-
with:
|
|
65
|
-
vercel_team_id: ${{ steps.vercel_info.outputs.team_id }}
|
|
66
|
-
vercel_project_id: ${{ steps.vercel_info.outputs.project_id }}
|
|
67
|
-
|
|
68
|
-
- name: Wait for Deployment
|
|
69
|
-
id: await
|
|
70
|
-
uses: UnlyEd/github-action-await-vercel@v2.0.0
|
|
71
|
-
env:
|
|
72
|
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
73
|
-
with:
|
|
74
|
-
deployment-url: ${{ steps.vercel_url.outputs.preview_url }}
|
|
75
|
-
timeout: 300
|
|
76
|
-
poll-interval: 10
|
|
77
|
-
continue-on-error: true
|
|
78
|
-
|
|
79
|
-
- name: Run Lighthouse
|
|
80
|
-
if: steps.await.outcome == 'success'
|
|
81
|
-
id: lighthouse
|
|
82
|
-
uses: treosh/lighthouse-ci-action@v12
|
|
83
|
-
env:
|
|
84
|
-
LHCI_BUILD_CONTEXT__CURRENT_HASH: ${{ github.sha }}
|
|
85
|
-
with:
|
|
86
|
-
urls: https://${{ steps.vercel_url.outputs.preview_url }}
|
|
87
|
-
uploadArtifacts: true
|
|
88
|
-
temporaryPublicStorage: true
|
|
89
|
-
|
|
90
|
-
- name: Format Results
|
|
91
|
-
id: format
|
|
92
|
-
uses: actions/github-script@v8
|
|
93
|
-
env:
|
|
94
|
-
DEPLOYMENT_FAILED: ${{ steps.await.outcome != 'success' }}
|
|
95
|
-
PREVIEW_URL: ${{ steps.vercel_url.outputs.preview_url }}
|
|
96
|
-
MANIFEST: ${{ steps.lighthouse.outputs.manifest }}
|
|
97
|
-
LINKS: ${{ steps.lighthouse.outputs.links }}
|
|
98
|
-
with:
|
|
99
|
-
script: |
|
|
100
|
-
if (process.env.DEPLOYMENT_FAILED === 'true') {
|
|
101
|
-
core.setOutput('comment', '⚠️ Vercel deployment failed or timed out. Lighthouse audit skipped.');
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
const manifest = JSON.parse(process.env.MANIFEST);
|
|
107
|
-
const links = JSON.parse(process.env.LINKS);
|
|
108
|
-
const previewUrl = process.env.PREVIEW_URL;
|
|
109
|
-
|
|
110
|
-
const scores = manifest[0].summary;
|
|
111
|
-
const reportUrl = Object.values(links)[0];
|
|
112
|
-
|
|
113
|
-
const emoji = (score) => score >= 0.9 ? '🟢' : score >= 0.5 ? '🟠' : '🔴';
|
|
114
|
-
const format = (score) => Math.round(score * 100);
|
|
115
|
-
|
|
116
|
-
const comment = [
|
|
117
|
-
`⚡️ [Lighthouse report](${reportUrl}) for this commit:`,
|
|
118
|
-
'',
|
|
119
|
-
`${emoji(scores.performance)} Performance: ${format(scores.performance)}`,
|
|
120
|
-
`${emoji(scores.accessibility)} Accessibility: ${format(scores.accessibility)}`,
|
|
121
|
-
`${emoji(scores['best-practices'])} Best Practices: ${format(scores['best-practices'])}`,
|
|
122
|
-
`${emoji(scores.seo)} SEO: ${format(scores.seo)}`,
|
|
123
|
-
'',
|
|
124
|
-
`*Tested on [${previewUrl}](https://${previewUrl})*`
|
|
125
|
-
].join('\n');
|
|
126
|
-
|
|
127
|
-
core.setOutput('comment', comment);
|
|
128
|
-
} catch (error) {
|
|
129
|
-
console.error('Error:', error);
|
|
130
|
-
core.setOutput('comment', '⚠️ Failed to generate Lighthouse report. Check workflow logs.');
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
- name: Post Commit Comment
|
|
134
|
-
uses: peter-evans/commit-comment@v4
|
|
135
|
-
with:
|
|
136
|
-
body: ${{ steps.format.outputs.comment }}
|