Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Sep 23, 2023
1 parent 1d08103 commit 1b49cc5
Show file tree
Hide file tree
Showing 4 changed files with 2,063 additions and 516 deletions.
28 changes: 20 additions & 8 deletions apps/api/src/controllers/admin/admin-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,29 +111,41 @@ export class AdminController {
@Description("Get the changelog from GitHub.")
async getChangelog(@Res() res: Res) {
try {
if (this.changelogBody) {
return this.changelogBody;
}

const version = await getCADVersion();

if (!version?.currentVersion) {
return null;
}

const response = await request(
`https://api.github.com/repos/SnailyCAD/snaily-cadv4/releases/tags/${version?.currentVersion}`,
{
headers: { accept: "application/vnd.github+json" },
},
`https://api.github.com/repos/SnailyCAD/snaily-cadv4/releases/tags/${version.currentVersion}`,
{ headers: { "user-agent": "SnailyCAD", accept: "application/vnd.github+json" } },
);

console.log({ response });

res.setHeader(
"Cache-Control",
`private, max-age=${ONE_DAY} stale-while-revalidate=${ONE_DAY / 2}`,
);

if (this.changelogBody) {
return this.changelogBody;
}

const body = (await response.body.json()) as { body: string };

console.log({
body,
});

this.changelogBody = body.body;
const json = body.body;
return json;
} catch (e) {
if (process.env.NODE_ENV === "development") {
console.error(e);
}
return null;
}
}
Expand Down
3 changes: 1 addition & 2 deletions apps/api/src/middlewares/auth/is-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export class IsAuth implements MiddlewareMethods {
}

const now = Date.now();

if (this.lastVersionCheck && now - this.lastVersionCheck > this.VERSION_CHECK_INTERVAL) {
if (!this.lastVersionCheck || now - this.lastVersionCheck > this.VERSION_CHECK_INTERVAL) {
this.lastVersionCheck = now;
this.currentVersion = await getCADVersion();
}
Expand Down
56 changes: 28 additions & 28 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toolbar": "^1.0.4",
"@radix-ui/react-tooltip": "^1.0.6",
"@react-aria/label": "^3.6.1",
"@react-aria/ssr": "^3.7.1",
"@sentry/browser": "^7.66.0",
"@sentry/nextjs": "^7.66.0",
"@sentry/tracing": "^7.66.0",
"@react-aria/label": "^3.7.0",
"@react-aria/ssr": "^3.8.0",
"@sentry/browser": "^7.70.0",
"@sentry/nextjs": "^7.70.0",
"@sentry/tracing": "^7.70.0",
"@snailycad/audit-logger": "workspace:*",
"@snailycad/config": "^1.72.0",
"@snailycad/permissions": "workspace:*",
"@snailycad/schemas": "workspace:*",
"@snailycad/types": "workspace:*",
"@snailycad/ui": "workspace:*",
"@snailycad/utils": "^1.72.0",
"@tailwindcss/typography": "^0.5.9",
"@tanstack/react-query": "^4.33.0",
"@tanstack/react-table": "8.9.3",
"@tailwindcss/typography": "^0.5.10",
"@tanstack/react-query": "^4.35.3",
"@tanstack/react-table": "8.10.1",
"axios": "^1.5.0",
"bignumber.js": "^9.1.2",
"color": "^4.2.3",
"date-fns": "^2.30.0",
"eslint-config-next": "^13.4.19",
"formik": "^2.4.3",
"eslint-config-next": "^13.5.2",
"formik": "^2.4.5",
"hex-color-regex": "^1.1.0",
"is-hotkey": "^0.2.0",
"leaflet": "^1.9.4",
"mdast-util-find-and-replace": "^2.2.2",
"next": "13.4.19",
"next-intl": "2.20.0",
"mdast-util-find-and-replace": "^3.0.1",
"next": "13.5.2",
"next-intl": "2.20.2",
"nookies": "^2.5.2",
"nprogress": "^0.2.0",
"pretty-bytes": "^6.1.1",
Expand All @@ -67,41 +67,41 @@
"react-hot-toast": "^2.4.1",
"react-leaflet": "^4.2.1",
"react-markdown": "^8.0.7",
"react-select": "^5.7.4",
"react-select": "^5.7.5",
"react-sortablejs": "^6.1.4",
"react-use": "^17.4.0",
"remark-emoji": "^4.0.0",
"remark-gfm": "^3.0.1",
"remark-gfm": "^4.0.0",
"remark-github": "^11.2.4",
"slate": "^0.94.1",
"slate-history": "^0.93.0",
"slate-react": "^0.98.3",
"slate-react": "^0.98.4",
"socket.io-client": "^4.7.2",
"sortablejs": "^1.15.0",
"storage-factory": "^0.2.1",
"use-intl": "^2.20.0",
"uuid": "^9.0.0",
"use-intl": "^2.20.2",
"uuid": "^9.0.1",
"zod": "^3.22.2",
"zustand": "^4.4.1",
"@types/react": "^18.2.21",
"@types/react": "^18.2.22",
"@types/react-dom": "^18.2.7",
"autoprefixer": "^10.4.15",
"@react-types/shared": "^3.19.0",
"@types/color": "^3.0.3",
"@types/connect": "^3.4.35",
"autoprefixer": "^10.4.16",
"@react-types/shared": "^3.20.0",
"@types/color": "^3.0.4",
"@types/connect": "^3.4.36",
"@types/is-hotkey": "^0.1.7",
"@types/leaflet": "^1.9.4",
"@types/leaflet": "^1.9.5",
"@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.15.2",
"@types/uuid": "^9.0.3"
"@types/uuid": "^9.0.4"
},
"devDependencies": {
"dotenv": "^16.3.1",
"postcss": "^8.4.29",
"sass": "^1.66.1",
"postcss": "^8.4.30",
"sass": "^1.68.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.34.3"
"vitest": "^0.34.5"
}
}
Loading

0 comments on commit 1b49cc5

Please sign in to comment.