mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 11:44:58 -05:00
Compare commits
8 Commits
ed779ebfdf
...
cb2dd7bb27
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb2dd7bb27 | ||
|
|
fd278b3e8d | ||
|
|
b3d2763106 | ||
|
|
8538ac5672 | ||
|
|
45fcc618c2 | ||
|
|
7e7c1a8648 | ||
|
|
17f444fbf4 | ||
|
|
b8d9ea2fe4 |
@ -28,6 +28,10 @@ The primary stack for MHSF is Next.js, a React framework, which you can start by
|
|||||||
[You can also opt out of telemetry if you'd like.](https://nextjs.org/telemetry)
|
[You can also opt out of telemetry if you'd like.](https://nextjs.org/telemetry)
|
||||||
|
|
||||||
## Clerk
|
## Clerk
|
||||||
|
> [!CAUTION]
|
||||||
|
> Clerk is no longer optional. If Clerk is not setup, you *will* get a `Non-authenticated environments are disallowed on this origin.` error on the frontend.
|
||||||
|
> You may be able to modify/test API endpoints as long as they do not require accounts.
|
||||||
|
|
||||||
If you want to test out accounts, [you must create an Clerk key from their website.](https://clerk.com)
|
If you want to test out accounts, [you must create an Clerk key from their website.](https://clerk.com)
|
||||||
Set the following variables in the .env.local file:
|
Set the following variables in the .env.local file:
|
||||||
```dotenv
|
```dotenv
|
||||||
|
|||||||
@ -96,7 +96,7 @@
|
|||||||
"@types/react-dom": "^18",
|
"@types/react-dom": "^18",
|
||||||
"@types/react-twemoji": "^0.4.3",
|
"@types/react-twemoji": "^0.4.3",
|
||||||
"@unocss/eslint-config": "^0.61.5",
|
"@unocss/eslint-config": "^0.61.5",
|
||||||
"@unocss/preset-uno": "^0.61.5",
|
"@unocss/preset-uno": "^65.4.3",
|
||||||
"@unocss/transformer-compile-class": "^0.61.5",
|
"@unocss/transformer-compile-class": "^0.61.5",
|
||||||
"@vercel/analytics": "^1.3.1",
|
"@vercel/analytics": "^1.3.1",
|
||||||
"@vercel/speed-insights": "^1.0.12",
|
"@vercel/speed-insights": "^1.0.12",
|
||||||
|
|||||||
@ -30,32 +30,33 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from "next";
|
import { NextApiRequest, NextApiResponse } from "next";
|
||||||
|
|
||||||
export default async function handler(
|
export default async function handler(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
res: NextApiResponse
|
res: NextApiResponse,
|
||||||
) {
|
) {
|
||||||
const betterStackResult = await fetch(
|
const betterStackResult = await fetch(
|
||||||
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}/status-reports`,
|
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}/status-reports`,
|
||||||
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } }
|
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } },
|
||||||
);
|
);
|
||||||
const betterStackURL = await fetch(
|
const betterStackURL = await fetch(
|
||||||
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}`,
|
`https://uptime.betterstack.com/api/v2/status-pages/${process.env.BS_STATUS_PAGE}`,
|
||||||
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } }
|
{ headers: { Authorization: `Bearer ${process.env.BS_TOKEN}` } },
|
||||||
);
|
);
|
||||||
|
|
||||||
const result = await betterStackResult.json();
|
const result = await betterStackResult.json();
|
||||||
const url = await betterStackURL.json();
|
const url = await betterStackURL.json();
|
||||||
|
|
||||||
const filtered = result.data.filter(
|
const filtered = result.data.filter(
|
||||||
(c: any) =>
|
(c: any) =>
|
||||||
c.attributes.ends_at === null &&
|
c.attributes.ends_at === null &&
|
||||||
c.attributes.affected_resources.filter(
|
c.attributes.affected_resources.filter(
|
||||||
(v: any) =>
|
(v: any) =>
|
||||||
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE
|
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE &&
|
||||||
).length > 0
|
v.status !== "resolved",
|
||||||
);
|
).length > 0,
|
||||||
|
);
|
||||||
|
|
||||||
res.status(200).send({
|
res.status(200).send({
|
||||||
url: url.data.attributes.custom_domain,
|
url: url.data.attributes.custom_domain,
|
||||||
incidents: filtered,
|
incidents: filtered,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
76
yarn.lock
76
yarn.lock
@ -753,7 +753,7 @@
|
|||||||
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
|
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
|
||||||
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
||||||
|
|
||||||
"@jridgewell/sourcemap-codec@^1.4.15":
|
"@jridgewell/sourcemap-codec@^1.4.15", "@jridgewell/sourcemap-codec@^1.5.0":
|
||||||
version "1.5.0"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
|
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
|
||||||
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
|
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
|
||||||
@ -2504,6 +2504,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.61.5.tgz#09f4da600f6f50dbb68a173f23566e9171d5cd3d"
|
resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.61.5.tgz#09f4da600f6f50dbb68a173f23566e9171d5cd3d"
|
||||||
integrity sha512-hB8zr2rnrCzz9x8ho2SAXQiYTEjwAPMiBzpaEe2C0+CFWeL1179h9508YVyZHHAzMyZILIG9YrVAWrrMdt2/Xg==
|
integrity sha512-hB8zr2rnrCzz9x8ho2SAXQiYTEjwAPMiBzpaEe2C0+CFWeL1179h9508YVyZHHAzMyZILIG9YrVAWrrMdt2/Xg==
|
||||||
|
|
||||||
|
"@unocss/core@65.4.3", "@unocss/core@^65.4.3":
|
||||||
|
version "65.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@unocss/core/-/core-65.4.3.tgz#ed8f4a6735cb84f8404f27214b80bbe9efb254a7"
|
||||||
|
integrity sha512-luFgdcchSlNrYSaDvU2176T2PPQZdxqfREVbxEXNXlFEgyEFrx5hOSUXoJtJSZjRhAcE6zkWyLDf/JkQJ5Eeyw==
|
||||||
|
|
||||||
"@unocss/eslint-config@^0.61.5":
|
"@unocss/eslint-config@^0.61.5":
|
||||||
version "0.61.5"
|
version "0.61.5"
|
||||||
resolved "https://registry.yarnpkg.com/@unocss/eslint-config/-/eslint-config-0.61.5.tgz#01a8ebb4a626d22d6e29d9800c31d2f87bed2b6b"
|
resolved "https://registry.yarnpkg.com/@unocss/eslint-config/-/eslint-config-0.61.5.tgz#01a8ebb4a626d22d6e29d9800c31d2f87bed2b6b"
|
||||||
@ -2522,12 +2527,12 @@
|
|||||||
magic-string "^0.30.10"
|
magic-string "^0.30.10"
|
||||||
synckit "^0.9.1"
|
synckit "^0.9.1"
|
||||||
|
|
||||||
"@unocss/extractor-arbitrary-variants@0.61.5":
|
"@unocss/extractor-arbitrary-variants@65.4.3":
|
||||||
version "0.61.5"
|
version "65.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.61.5.tgz#478b15f0ae298b0f05d9978ef528b08723c22cb5"
|
resolved "https://registry.yarnpkg.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-65.4.3.tgz#c527d251577eb344ec47c9bd96359258bfc19e2f"
|
||||||
integrity sha512-UB1EweAaJrUxv+h3n5FqoizKHrnUgUzkdmOdJTfV6xvow90ITqbUoza+L6iVMNfcrcXTx8QpDnWh6rhLRyKY+g==
|
integrity sha512-RhSOOzOxkNjJl9zeglaBe0U+o39jleCCNPWJ87DDJA3ckbyylIIf21ZwY1Xu76rmdar5DT9ob7ucuPfEpJLN9A==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@unocss/core" "0.61.5"
|
"@unocss/core" "65.4.3"
|
||||||
|
|
||||||
"@unocss/postcss@^0.61.5":
|
"@unocss/postcss@^0.61.5":
|
||||||
version "0.61.5"
|
version "0.61.5"
|
||||||
@ -2542,33 +2547,33 @@
|
|||||||
magic-string "^0.30.10"
|
magic-string "^0.30.10"
|
||||||
postcss "^8.4.39"
|
postcss "^8.4.39"
|
||||||
|
|
||||||
"@unocss/preset-mini@0.61.5":
|
"@unocss/preset-mini@65.4.3":
|
||||||
version "0.61.5"
|
version "65.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/@unocss/preset-mini/-/preset-mini-0.61.5.tgz#60dc1aa2c05e415b6e9860493fb92a20acce62da"
|
resolved "https://registry.yarnpkg.com/@unocss/preset-mini/-/preset-mini-65.4.3.tgz#0311bd105b94636a7233ddb90006f0e2b0015b3b"
|
||||||
integrity sha512-gVm7Z9X0krx8CK/+pKAqcVmpqzRk1+SH7bfgRxKtKhyFSxJlwpjNp1rKm3gCT0F1Tlp3d8aufYRksaXGZhs8Ow==
|
integrity sha512-JajAF18DKJRXgd9usrAYTcHUtZy606mD396ZswDgw/mUSu529tuiT6LOD43aJMYHgPEw7wKYjiGFHkeBTHijuQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@unocss/core" "0.61.5"
|
"@unocss/core" "65.4.3"
|
||||||
"@unocss/extractor-arbitrary-variants" "0.61.5"
|
"@unocss/extractor-arbitrary-variants" "65.4.3"
|
||||||
"@unocss/rule-utils" "0.61.5"
|
"@unocss/rule-utils" "65.4.3"
|
||||||
|
|
||||||
"@unocss/preset-uno@^0.61.5":
|
"@unocss/preset-uno@^65.4.3":
|
||||||
version "0.61.5"
|
version "65.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/@unocss/preset-uno/-/preset-uno-0.61.5.tgz#80c85edaf4ed364c91df3400dae5abfe3976f21e"
|
resolved "https://registry.yarnpkg.com/@unocss/preset-uno/-/preset-uno-65.4.3.tgz#e8a73763711993fc12115c3e706627d1c524b7a1"
|
||||||
integrity sha512-CflB0l9CeZx+b/Q8mA4Ow4d63Caf+vFJ+1EGA06jG9qYjPLy76Rkci//0m9cEtO+vPnYtgLc7HZAZv0X6wh4Tg==
|
integrity sha512-gxELOQwR3YbMLR+WjYz3m/Zb6VXa8O0Xln0rfS2TI7OXXoQ1twak5zwYPrOI5fJF8lJ5yyKUiXiOR8UEPBpoCQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@unocss/core" "0.61.5"
|
"@unocss/core" "65.4.3"
|
||||||
"@unocss/preset-mini" "0.61.5"
|
"@unocss/preset-mini" "65.4.3"
|
||||||
"@unocss/preset-wind" "0.61.5"
|
"@unocss/preset-wind" "65.4.3"
|
||||||
"@unocss/rule-utils" "0.61.5"
|
"@unocss/rule-utils" "65.4.3"
|
||||||
|
|
||||||
"@unocss/preset-wind@0.61.5":
|
"@unocss/preset-wind@65.4.3":
|
||||||
version "0.61.5"
|
version "65.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/@unocss/preset-wind/-/preset-wind-0.61.5.tgz#049f4cf3d15be5d5bf1bb3c2108cff22a69d0884"
|
resolved "https://registry.yarnpkg.com/@unocss/preset-wind/-/preset-wind-65.4.3.tgz#c1f4ccc4355f1d2bcca0e7dec82fd81e8126e8ac"
|
||||||
integrity sha512-n4uepxv3gVoVQb0tv7iV8M4W0CgwLw0QaMX+3ECYzFLMynjCkZmFDtdQAX720yTvLZxwCxEZfQCgydOSt0qjZA==
|
integrity sha512-KM13xIARNeZ/ZKJr33fZ89l79wgI+1Oo8VPJzmckLjbH9IGOhcH2GON7wVIxQqqqM9IM3vALEqw2KNdM6ontWw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@unocss/core" "0.61.5"
|
"@unocss/core" "65.4.3"
|
||||||
"@unocss/preset-mini" "0.61.5"
|
"@unocss/preset-mini" "65.4.3"
|
||||||
"@unocss/rule-utils" "0.61.5"
|
"@unocss/rule-utils" "65.4.3"
|
||||||
|
|
||||||
"@unocss/rule-utils@0.61.5":
|
"@unocss/rule-utils@0.61.5":
|
||||||
version "0.61.5"
|
version "0.61.5"
|
||||||
@ -2578,6 +2583,14 @@
|
|||||||
"@unocss/core" "^0.61.5"
|
"@unocss/core" "^0.61.5"
|
||||||
magic-string "^0.30.10"
|
magic-string "^0.30.10"
|
||||||
|
|
||||||
|
"@unocss/rule-utils@65.4.3":
|
||||||
|
version "65.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@unocss/rule-utils/-/rule-utils-65.4.3.tgz#337f361338c79444fbf6624df3a8fc41e12b6bc5"
|
||||||
|
integrity sha512-bzRRdb9mb82IvgOt3KiRyUh/njRfJC3hoV84lMyUPryT8YTEP/hl6kt2KQ2l1K3WDz7ZPQXVi2eqUbqc+AUpwg==
|
||||||
|
dependencies:
|
||||||
|
"@unocss/core" "^65.4.3"
|
||||||
|
magic-string "^0.30.17"
|
||||||
|
|
||||||
"@unocss/transformer-compile-class@^0.61.5":
|
"@unocss/transformer-compile-class@^0.61.5":
|
||||||
version "0.61.5"
|
version "0.61.5"
|
||||||
resolved "https://registry.yarnpkg.com/@unocss/transformer-compile-class/-/transformer-compile-class-0.61.5.tgz#be992b1a9e2300314618b1866854f1f6ea95419c"
|
resolved "https://registry.yarnpkg.com/@unocss/transformer-compile-class/-/transformer-compile-class-0.61.5.tgz#be992b1a9e2300314618b1866854f1f6ea95419c"
|
||||||
@ -5342,6 +5355,13 @@ magic-string@^0.30.10:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||||
|
|
||||||
|
magic-string@^0.30.17:
|
||||||
|
version "0.30.17"
|
||||||
|
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.17.tgz#450a449673d2460e5bbcfba9a61916a1714c7453"
|
||||||
|
integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==
|
||||||
|
dependencies:
|
||||||
|
"@jridgewell/sourcemap-codec" "^1.5.0"
|
||||||
|
|
||||||
mangle-css-class-webpack-plugin@^5.1.0:
|
mangle-css-class-webpack-plugin@^5.1.0:
|
||||||
version "5.1.0"
|
version "5.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/mangle-css-class-webpack-plugin/-/mangle-css-class-webpack-plugin-5.1.0.tgz#42008a8fbe0257f491968796320eb94b17a36321"
|
resolved "https://registry.yarnpkg.com/mangle-css-class-webpack-plugin/-/mangle-css-class-webpack-plugin-5.1.0.tgz#42008a8fbe0257f491968796320eb94b17a36321"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user