mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 12:44:58 -05:00
Compare commits
8 Commits
ff93c192f1
...
ec701a57da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec701a57da | ||
|
|
fd278b3e8d | ||
|
|
b3d2763106 | ||
|
|
8538ac5672 | ||
|
|
45fcc618c2 | ||
|
|
7e7c1a8648 | ||
|
|
17f444fbf4 | ||
|
|
0c627c1a19 |
@ -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)
|
||||
|
||||
## 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)
|
||||
Set the following variables in the .env.local file:
|
||||
```dotenv
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
"postbuild": "next-sitemap"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.24.7",
|
||||
"@babel/parser": "^7.26.7",
|
||||
"@biomejs/biome": "^1.8.3",
|
||||
"@clerk/elements": "^0.22.2",
|
||||
"@clerk/nextjs": "^6.9.2",
|
||||
|
||||
@ -31,15 +31,15 @@ import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse
|
||||
res: NextApiResponse,
|
||||
) {
|
||||
const betterStackResult = await fetch(
|
||||
`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(
|
||||
`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();
|
||||
@ -50,8 +50,9 @@ export default async function handler(
|
||||
c.attributes.ends_at === null &&
|
||||
c.attributes.affected_resources.filter(
|
||||
(v: any) =>
|
||||
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE
|
||||
).length > 0
|
||||
v.status_page_resource_id === process.env.BS_STATUS_MAIN_WEBSITE &&
|
||||
v.status !== "resolved",
|
||||
).length > 0,
|
||||
);
|
||||
|
||||
res.status(200).send({
|
||||
|
||||
46
yarn.lock
46
yarn.lock
@ -72,16 +72,21 @@
|
||||
dependencies:
|
||||
"@babel/types" "^7.24.7"
|
||||
|
||||
"@babel/helper-string-parser@^7.24.8":
|
||||
version "7.24.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d"
|
||||
integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==
|
||||
"@babel/helper-string-parser@^7.25.9":
|
||||
version "7.25.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c"
|
||||
integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==
|
||||
|
||||
"@babel/helper-validator-identifier@^7.24.7":
|
||||
version "7.24.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db"
|
||||
integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==
|
||||
|
||||
"@babel/helper-validator-identifier@^7.25.9":
|
||||
version "7.25.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7"
|
||||
integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==
|
||||
|
||||
"@babel/highlight@^7.24.7":
|
||||
version "7.24.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d"
|
||||
@ -92,15 +97,12 @@
|
||||
js-tokens "^4.0.0"
|
||||
picocolors "^1.0.0"
|
||||
|
||||
"@babel/parser@^7.23.9", "@babel/parser@^7.24.8":
|
||||
version "7.24.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.8.tgz#58a4dbbcad7eb1d48930524a3fd93d93e9084c6f"
|
||||
integrity sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==
|
||||
|
||||
"@babel/parser@^7.24.7":
|
||||
version "7.24.7"
|
||||
resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz"
|
||||
integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==
|
||||
"@babel/parser@^7.23.9", "@babel/parser@^7.24.7", "@babel/parser@^7.24.8", "@babel/parser@^7.26.7":
|
||||
version "7.26.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.7.tgz#e114cd099e5f7d17b05368678da0fb9f69b3385c"
|
||||
integrity sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==
|
||||
dependencies:
|
||||
"@babel/types" "^7.26.7"
|
||||
|
||||
"@babel/runtime@^7.13.10", "@babel/runtime@^7.23.2", "@babel/runtime@^7.24.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
|
||||
version "7.24.8"
|
||||
@ -141,14 +143,13 @@
|
||||
debug "^4.3.1"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.24.9":
|
||||
version "7.24.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.9.tgz#228ce953d7b0d16646e755acf204f4cf3d08cc73"
|
||||
integrity sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==
|
||||
"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.24.9", "@babel/types@^7.26.7":
|
||||
version "7.26.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.7.tgz#5e2b89c0768e874d4d061961f3a5a153d71dc17a"
|
||||
integrity sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==
|
||||
dependencies:
|
||||
"@babel/helper-string-parser" "^7.24.8"
|
||||
"@babel/helper-validator-identifier" "^7.24.7"
|
||||
to-fast-properties "^2.0.0"
|
||||
"@babel/helper-string-parser" "^7.25.9"
|
||||
"@babel/helper-validator-identifier" "^7.25.9"
|
||||
|
||||
"@biomejs/biome@^1.8.3":
|
||||
version "1.8.3"
|
||||
@ -7961,11 +7962,6 @@ tiny-invariant@^1.3.1:
|
||||
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127"
|
||||
integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==
|
||||
|
||||
to-fast-properties@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
|
||||
integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
|
||||
|
||||
to-regex-range@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user