Skip to content

Commit

Permalink
refactor: use new nuxt shared folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Nov 10, 2024
1 parent 2be3470 commit b761a20
Show file tree
Hide file tree
Showing 12 changed files with 1,641 additions and 1,961 deletions.
2 changes: 1 addition & 1 deletion .config/nuxt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import vue from "@vitejs/plugin-vue";
import { SITE } from "../app/utils/site";
import { SITE } from "../shared/utils/site";

export default defineNuxtConfig({
future: { compatibilityVersion: 4 },
Expand Down
2 changes: 0 additions & 2 deletions app/utils/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export { ErrorCode } from "~~/server/utils/errors";
export { Quota } from "~~/server/utils/quotas";
export { watchDebounced, useMagicKeys } from "@vueuse/core";

export const getGroups = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, type HeadConfig } from "vitepress";
import { SITE } from "./../../app/utils/site";
import { SITE } from "./../../shared/utils/site";
import { sidebar } from "./theme/sidebar";

// refer https://vitepress.dev/reference/site-config for details
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,44 +32,44 @@
"test:types": "vue-tsc --noEmit"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241022.0",
"@dargmuesli/nuxt-cookie-control": "^8.4.15",
"@cloudflare/workers-types": "^4.20241106.0",
"@dargmuesli/nuxt-cookie-control": "^8.4.16",
"@iconify-json/solar": "^1.2.1",
"@iconify-json/tabler": "^1.2.7",
"@nuxt/eslint": "^0.6.1",
"@nuxt/icon": "^1.6.1",
"@nuxthub/core": "^0.8.4",
"@nuxt/icon": "^1.7.2",
"@nuxthub/core": "^0.8.6",
"@nuxtjs/color-mode": "^3.5.2",
"@nuxtjs/sitemap": "^6.1.3",
"@nuxtjs/turnstile": "^0.9.10",
"@paddle/paddle-js": "^1.3.1",
"@nuxtjs/sitemap": "^6.1.5",
"@nuxtjs/turnstile": "^0.9.11",
"@paddle/paddle-js": "^1.3.2",
"@paddle/paddle-node-sdk": "^1.9.1",
"@types/bootstrap": "^5.2.10",
"@types/leaflet": "^1.9.14",
"@vue-email/components": "^0.0.19",
"@vue-email/components": "^0.0.21",
"@vue-email/render": "^0.0.9",
"@vuepic/vue-datepicker": "^9.0.3",
"@vuepic/vue-datepicker": "^10.0.0",
"@yeger/vue-masonry-wall": "^5.0.16",
"bootstrap": "^5.3.3",
"drizzle-kit": "^0.27.0",
"drizzle-orm": "^0.36.0",
"eslint": "^9.13.0",
"drizzle-kit": "^0.28.0",
"drizzle-orm": "^0.36.1",
"eslint": "^9.14.0",
"leaflet": "^1.9.4",
"leaflet-geosearch": "^4.0.0",
"nodemailer": "^6.9.16",
"nuxt": "^3.13.2",
"nuxt-auth-utils": "^0.5.1",
"nuxt": "^3.14.159",
"nuxt-auth-utils": "^0.5.2",
"nuxt-twemoji": "3.6.2",
"nuxt-webhook-validators": "^0.1.3",
"sass": "^1.80.5",
"sass": "^1.80.6",
"stylelint": "^16.10.0",
"stylelint-config-standard-scss": "^13.1.0",
"tsx": "^4.19.2",
"typescript": "^5.6.3",
"vitepress": "^1.4.3",
"vitepress": "^1.5.0",
"vue-draggable-next": "^2.2.1",
"vue-tsc": "^2.1.10",
"wrangler": "^3.84.0",
"wrangler": "^3.86.0",
"zod": "^3.23.8"
},
"packageManager": "[email protected]"
Expand Down
3,553 changes: 1,619 additions & 1,934 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions server/utils/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { sha256 } from "ohash";

export { SITE } from "~/utils/site";
export { isPasswordValid } from "~/utils/validators";
export { z } from "zod";

export const hash = (string: string, salt?: string) => {
Expand Down
3 changes: 1 addition & 2 deletions server/utils/session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { H3Event } from "h3";
import { useSession } from "h3";
import { useSession, type H3Event } from "h3";
import type { UserSession } from "#auth-utils";

export const setUserSessionNullable = async (event: H3Event, data: UserSession) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ErrorCode } from "~~/server/utils/errors";
import type { Quota } from "~/server/utils/quotas";
import type { ErrorCode } from "#shared/utils/errors";
import type { Quota } from "#shared/utils/quotas";

export {};

Expand Down

0 comments on commit b761a20

Please sign in to comment.