-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5cbe3c
commit cba8e04
Showing
2 changed files
with
92 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,61 @@ | ||
{ | ||
"name": "teaclient-website", | ||
"type": "module", | ||
"version": "0.0.2", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"preview": "astro preview", | ||
"build": "astro build", | ||
"astro": "astro", | ||
"lint": "biome check --apply . && stylelint 'src/styles/**/*.css' --fix", | ||
"fmt": "biome format ./ --write", | ||
"biome": "bunx @biomejs/biome", | ||
"check": "biome check ./ && stylelint 'src/styles/**/*.css' && bun astro check && bun test" | ||
}, | ||
"trustedDependencies": ["sharp"], | ||
"stylelint": { | ||
"extends": "stylelint-config-standard", | ||
"plugins": ["stylelint-scss"], | ||
"customSyntax": "postcss-scss", | ||
"rules": { | ||
"at-rule-no-unknown": null, | ||
"selector-class-pattern": null, | ||
"scss/at-rule-no-unknown": true, | ||
"custom-property-pattern": null | ||
} | ||
}, | ||
"commitlint": { | ||
"extends": ["@commitlint/config-conventional"] | ||
}, | ||
"dependencies": { | ||
"@astrojs/mdx": "^2.0.2", | ||
"@astrojs/rss": "^4.0.5", | ||
"@astrojs/sitemap": "^3.1.1", | ||
"@astrojs/tailwind": "^5.1.0", | ||
"@astrojs/ts-plugin": "^1.3.1", | ||
"astro-meta-tags": "^0.2.1", | ||
"astro-page-insight": "^0.6.1", | ||
"astro-seo": "^0.8.0", | ||
"axios": "^1.6.5", | ||
"sass": "^1.71.1", | ||
"sharp": "^0.33.2", | ||
"tailwind-merge": "^2.2.1", | ||
"tailwindcss": "^3.4.1", | ||
"web-vitals": "^3.5.0" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/check": "^0.5.10", | ||
"@biomejs/biome": "^1.5.3", | ||
"@types/bun": "^1.0.12", | ||
"astro": "^4.2.3", | ||
"happy-dom": "^14.7.1", | ||
"playwright": "^1.43.1", | ||
"postcss-scss": "^4.0.9", | ||
"stylelint": "^16.3.1", | ||
"stylelint-config-standard": "^36.0.0", | ||
"stylelint-scss": "^6.2.1", | ||
"typescript": "^5.2.2" | ||
}, | ||
"packageManager": "[email protected]" | ||
"name": "teaclient-website", | ||
"type": "module", | ||
"version": "0.0.2", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"preview": "astro preview", | ||
"build": "astro build", | ||
"astro": "astro", | ||
"lint": "biome check --apply . && stylelint 'src/styles/**/*.css' --fix", | ||
"fmt": "biome format ./ --write", | ||
"biome": "bunx @biomejs/biome", | ||
"check": "biome check ./ && stylelint 'src/styles/**/*.css' && bun astro check && bun test" | ||
}, | ||
"trustedDependencies": ["sharp"], | ||
"stylelint": { | ||
"extends": "stylelint-config-standard", | ||
"plugins": ["stylelint-scss"], | ||
"customSyntax": "postcss-scss", | ||
"rules": { | ||
"at-rule-no-unknown": null, | ||
"selector-class-pattern": null, | ||
"scss/at-rule-no-unknown": true, | ||
"custom-property-pattern": null | ||
} | ||
}, | ||
"commitlint": { | ||
"extends": ["@commitlint/config-conventional"] | ||
}, | ||
"dependencies": { | ||
"@astrojs/mdx": "^2.0.2", | ||
"@astrojs/rss": "^4.0.5", | ||
"@astrojs/sitemap": "^3.1.1", | ||
"@astrojs/tailwind": "^5.1.0", | ||
"@astrojs/ts-plugin": "^1.3.1", | ||
"astro-meta-tags": "^0.2.1", | ||
"astro-page-insight": "^0.6.1", | ||
"astro-seo": "^0.8.0", | ||
"axios": "^1.6.5", | ||
"octokit": "^4.0.2", | ||
"sass": "^1.71.1", | ||
"sharp": "^0.33.2", | ||
"tailwind-merge": "^2.2.1", | ||
"tailwindcss": "^3.4.1", | ||
"web-vitals": "^3.5.0" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/check": "^0.5.10", | ||
"@biomejs/biome": "^1.5.3", | ||
"@types/bun": "^1.0.12", | ||
"astro": "^4.2.3", | ||
"happy-dom": "^14.7.1", | ||
"playwright": "^1.43.1", | ||
"postcss-scss": "^4.0.9", | ||
"stylelint": "^16.3.1", | ||
"stylelint-config-standard": "^36.0.0", | ||
"stylelint-scss": "^6.2.1", | ||
"typescript": "^5.2.2" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Octokit } from "octokit"; | ||
|
||
export const GET = async () => { | ||
let octokit = new Octokit({ | ||
Check failure on line 4 in src/pages/configSchema.json.ts GitHub Actions / Qualitylint/style/useConst
|
||
auth: import.meta.env.GITHUB_TOKEN, | ||
}); | ||
|
||
try { | ||
let data = await octokit.request('GET /repos/{owner}/{repo}/releases/latest', { | ||
Check failure on line 9 in src/pages/configSchema.json.ts GitHub Actions / Qualitylint/style/useConst
|
||
owner: 'TeaClientMC', | ||
repo: 'ConfigSchema', | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28', | ||
}, | ||
}); | ||
|
||
// Access the assets array from the response | ||
const assets = data.data.assets; | ||
|
||
// Find the JSON file and get its download URL | ||
const jsonFileUrl = assets.find(asset => asset.name === 'configschema.json').browser_download_url; | ||
|
||
// Download the JSON file content | ||
const response = await fetch(jsonFileUrl); | ||
const jsonContent = await response.text(); | ||
|
||
// Return the JSON content | ||
return new Response(jsonContent); | ||
} catch (error) { | ||
console.error("Error fetching config schema:", error); | ||
return new Response(JSON.stringify({ error: "Failed to load config schema" }), { status: 500 }); | ||
} | ||
}; |