From 43994ade3619c539a42ffdb7494ccd148307408e Mon Sep 17 00:00:00 2001
From: DrMint
Date: Sat, 27 Aug 2022 17:03:05 +0200
Subject: [PATCH 1/3] Trying to make localdata words
---
graphql-codegen.config.js | 2 +-
graphql.config.js | 19 -
package-lock.json | 850 +++++++++++++++++-
package.json | 7 +-
public/local-data/currencies.json | 1 +
public/local-data/languages.json | 1 +
public/local-data/websiteInterfaces.json | 1 +
src/components/AnchorShare.tsx | 54 +-
src/components/AppLayout.tsx | 117 +--
src/components/Inputs/LanguageSwitcher.tsx | 53 +-
src/components/Inputs/OrderableList.tsx | 31 +-
src/components/Library/PreviewCardCTAs.tsx | 13 +-
src/components/Markdown/Markdawn.tsx | 24 +-
.../PanelComponents/ReturnButton.tsx | 6 +-
src/components/Panels/MainPanel.tsx | 10 +-
src/components/PostPage.tsx | 29 +-
src/components/PreviewCard.tsx | 10 +-
src/components/RecorderChip.tsx | 99 +-
src/components/SmartList.tsx | 15 +-
src/components/ThumbnailHeader.tsx | 10 +-
src/components/Wiki/DefinitionCard.tsx | 8 +-
src/contexts/AppLayoutContext.tsx | 95 +-
src/graphql/fetchLocalData.ts | 42 +
src/graphql/getAppStaticProps.ts | 55 --
src/graphql/getPostStaticProps.ts | 22 +-
.../{ => dev}/devGetContents.graphql | 0
.../{ => dev}/devGetLibraryItems.graphql | 0
.../localDataGetCurrencies.graphql} | 2 +-
.../localDataGetLanguages.graphql} | 2 +-
.../localDataGetWebsiteInterfaces.graphql} | 13 +-
src/helpers/formatters.ts | 11 +-
src/helpers/localData.ts | 58 ++
src/helpers/numbers.ts | 5 +-
src/helpers/openGraph.ts | 4 +-
src/helpers/others.ts | 10 +-
src/hooks/useLocalData.ts | 35 +
src/hooks/useSmartLanguage.ts | 5 +-
src/pages/404.tsx | 23 +-
src/pages/500.tsx | 23 +-
src/pages/about-us/accords-handbook.tsx | 22 +-
src/pages/about-us/contact.tsx | 7 +-
src/pages/about-us/index.tsx | 77 +-
src/pages/about-us/legality.tsx | 22 +-
src/pages/about-us/sharing-policy.tsx | 22 +-
src/pages/archives/index.tsx | 20 +-
src/pages/archives/videos/c/[uid].tsx | 17 +-
src/pages/archives/videos/index.tsx | 22 +-
src/pages/archives/videos/v/[uid].tsx | 20 +-
src/pages/chronicles/[slug]/index.tsx | 45 +-
src/pages/chronicles/index.tsx | 23 +-
src/pages/contents/[slug].tsx | 75 +-
src/pages/contents/all.tsx | 26 +-
src/pages/contents/folder/[slug].tsx | 47 +-
src/pages/dev/checkup/contents.tsx | 9 +-
src/pages/dev/checkup/libraryitems.tsx | 10 +-
src/pages/dev/editor.tsx | 22 +-
src/pages/dev/transcript.tsx | 14 +-
src/pages/index.tsx | 5 +-
src/pages/library/[slug]/index.tsx | 49 +-
src/pages/library/[slug]/scans.tsx | 83 +-
src/pages/library/index.tsx | 31 +-
src/pages/merch/index.tsx | 47 +-
src/pages/news/[slug].tsx | 27 +-
src/pages/news/index.tsx | 21 +-
src/pages/wiki/[slug]/index.tsx | 35 +-
src/pages/wiki/chronology.tsx | 59 +-
src/pages/wiki/index.tsx | 20 +-
67 files changed, 1624 insertions(+), 1018 deletions(-)
delete mode 100644 graphql.config.js
create mode 100644 public/local-data/currencies.json
create mode 100644 public/local-data/languages.json
create mode 100644 public/local-data/websiteInterfaces.json
create mode 100644 src/graphql/fetchLocalData.ts
delete mode 100644 src/graphql/getAppStaticProps.ts
rename src/graphql/operations/{ => dev}/devGetContents.graphql (100%)
rename src/graphql/operations/{ => dev}/devGetLibraryItems.graphql (100%)
rename src/graphql/operations/{getCurrencies.graphql => local-data/localDataGetCurrencies.graphql} (79%)
rename src/graphql/operations/{getLanguages.graphql => local-data/localDataGetLanguages.graphql} (78%)
rename src/graphql/operations/{getWebsiteInterface.graphql => local-data/localDataGetWebsiteInterfaces.graphql} (89%)
create mode 100644 src/helpers/localData.ts
create mode 100644 src/hooks/useLocalData.ts
diff --git a/graphql-codegen.config.js b/graphql-codegen.config.js
index 16b99f3..2155cde 100644
--- a/graphql-codegen.config.js
+++ b/graphql-codegen.config.js
@@ -9,7 +9,7 @@ module.exports = {
},
},
documents: [
- "src/graphql/operations/*.graphql",
+ "src/graphql/operations/**/*.graphql",
"src/graphql/fragments/*.graphql",
],
generates: {
diff --git a/graphql.config.js b/graphql.config.js
deleted file mode 100644
index 73f7dcf..0000000
--- a/graphql.config.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = {
- projects: {
- app: {
- schema: process.env.URL_GRAPHQL,
- documents: [
- "src/graphql/operations/*.graphql",
- "src/graphql/fragments/*.graphql",
- ],
- extensions: {
- endpoints: {
- default: {
- url: process.env.URL_GRAPHQL,
- headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
- },
- },
- },
- },
- },
-};
diff --git a/package-lock.json b/package-lock.json
index b3a1179..581f93b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30,6 +30,7 @@
"usehooks-ts": "^2.6.0"
},
"devDependencies": {
+ "@digitak/esrun": "^3.2.10",
"@graphql-codegen/cli": "^2.11.6",
"@graphql-codegen/typescript": "2.7.3",
"@graphql-codegen/typescript-graphql-request": "^4.5.3",
@@ -42,6 +43,7 @@
"@types/turndown": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
+ "dotenv": "^16.0.1",
"eslint": "^8.22.0",
"eslint-config-next": "12.2.5",
"eslint-plugin-import": "^2.26.0",
@@ -1062,6 +1064,55 @@
"integrity": "sha512-q/yVUnqckA8Do+EvAfpy7RLdumnBy9ZsducMUtZTvpdbJC7azEf1hGtnYYxm0QfphYxjwggv6XtH64prvS1W+A==",
"dev": true
},
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@digitak/esrun": {
+ "version": "3.2.10",
+ "resolved": "https://registry.npmjs.org/@digitak/esrun/-/esrun-3.2.10.tgz",
+ "integrity": "sha512-wm/ayE2d9+WoTY8RlXj8bh/ml7yzXJXat3Clp20U1MxKwU5zxyHKmT5uo2C2NQJigaR83KvnWiPRrarAmHq0AQ==",
+ "dev": true,
+ "dependencies": {
+ "@digitak/grubber": "^3.1.1",
+ "chokidar": "^3.5.1",
+ "esbuild": "^0.14.47"
+ },
+ "bin": {
+ "esrun": "bin.js"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ },
+ "node_modules/@digitak/grubber": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/@digitak/grubber/-/grubber-3.1.3.tgz",
+ "integrity": "sha512-7PV6XCS5qC28oaEKWUUXLxiewoj3Z0EfdCdxX5D6Vy5wtC/rYuCO15XOOupUcnwBaNR+Xm/bfmsCe1KJtEfE7g==",
+ "dev": true
+ },
"node_modules/@endemolshinegroup/cosmiconfig-typescript-loader": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz",
@@ -1080,12 +1131,60 @@
"cosmiconfig": ">=6"
}
},
+ "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
+ "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/ts-node": {
+ "version": "9.1.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
+ "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
+ "dev": true,
+ "dependencies": {
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "source-map-support": "^0.5.17",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "typescript": ">=2.7"
+ }
+ },
"node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
"dev": true
},
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
+ "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/@eslint/eslintrc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
@@ -2377,6 +2476,38 @@
"node": ">= 10"
}
},
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
+ "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
"node_modules/@types/js-yaml": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz",
@@ -4035,6 +4166,362 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/esbuild": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
+ "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/linux-loong64": "0.14.54",
+ "esbuild-android-64": "0.14.54",
+ "esbuild-android-arm64": "0.14.54",
+ "esbuild-darwin-64": "0.14.54",
+ "esbuild-darwin-arm64": "0.14.54",
+ "esbuild-freebsd-64": "0.14.54",
+ "esbuild-freebsd-arm64": "0.14.54",
+ "esbuild-linux-32": "0.14.54",
+ "esbuild-linux-64": "0.14.54",
+ "esbuild-linux-arm": "0.14.54",
+ "esbuild-linux-arm64": "0.14.54",
+ "esbuild-linux-mips64le": "0.14.54",
+ "esbuild-linux-ppc64le": "0.14.54",
+ "esbuild-linux-riscv64": "0.14.54",
+ "esbuild-linux-s390x": "0.14.54",
+ "esbuild-netbsd-64": "0.14.54",
+ "esbuild-openbsd-64": "0.14.54",
+ "esbuild-sunos-64": "0.14.54",
+ "esbuild-windows-32": "0.14.54",
+ "esbuild-windows-64": "0.14.54",
+ "esbuild-windows-arm64": "0.14.54"
+ }
+ },
+ "node_modules/esbuild-android-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
+ "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-android-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
+ "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-darwin-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
+ "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-darwin-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
+ "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-freebsd-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
+ "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-freebsd-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
+ "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-32": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
+ "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
+ "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-arm": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
+ "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
+ "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-mips64le": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
+ "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-ppc64le": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
+ "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-riscv64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
+ "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-s390x": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
+ "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-netbsd-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
+ "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-openbsd-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
+ "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-sunos-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
+ "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-windows-32": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
+ "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-windows-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
+ "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-windows-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
+ "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -7884,36 +8371,68 @@
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/ts-node": {
- "version": "9.1.1",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
- "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
+ "optional": true,
+ "peer": true,
"dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
"arg": "^4.1.0",
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
- "source-map-support": "^0.5.17",
+ "v8-compile-cache-lib": "^3.0.1",
"yn": "3.1.1"
},
"bin": {
"ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
"ts-node-script": "dist/bin-script.js",
"ts-node-transpile-only": "dist/bin-transpile.js",
"ts-script": "dist/bin-script-deprecated.js"
},
- "engines": {
- "node": ">=10.0.0"
- },
"peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
"typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node/node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "optional": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.4.0"
}
},
"node_modules/ts-node/node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "dev": true
+ "dev": true,
+ "optional": true,
+ "peer": true
},
"node_modules/ts-unused-exports": {
"version": "8.0.0",
@@ -8184,6 +8703,14 @@
"integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
"dev": true
},
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
"node_modules/value-or-promise": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz",
@@ -9223,6 +9750,48 @@
"integrity": "sha512-q/yVUnqckA8Do+EvAfpy7RLdumnBy9ZsducMUtZTvpdbJC7azEf1hGtnYYxm0QfphYxjwggv6XtH64prvS1W+A==",
"dev": true
},
+ "@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "optional": true,
+ "peer": true,
+ "requires": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "dependencies": {
+ "@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "optional": true,
+ "peer": true,
+ "requires": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ }
+ }
+ },
+ "@digitak/esrun": {
+ "version": "3.2.10",
+ "resolved": "https://registry.npmjs.org/@digitak/esrun/-/esrun-3.2.10.tgz",
+ "integrity": "sha512-wm/ayE2d9+WoTY8RlXj8bh/ml7yzXJXat3Clp20U1MxKwU5zxyHKmT5uo2C2NQJigaR83KvnWiPRrarAmHq0AQ==",
+ "dev": true,
+ "requires": {
+ "@digitak/grubber": "^3.1.1",
+ "chokidar": "^3.5.1",
+ "esbuild": "^0.14.47"
+ }
+ },
+ "@digitak/grubber": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/@digitak/grubber/-/grubber-3.1.3.tgz",
+ "integrity": "sha512-7PV6XCS5qC28oaEKWUUXLxiewoj3Z0EfdCdxX5D6Vy5wtC/rYuCO15XOOupUcnwBaNR+Xm/bfmsCe1KJtEfE7g==",
+ "dev": true
+ },
"@endemolshinegroup/cosmiconfig-typescript-loader": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz",
@@ -9235,6 +9804,26 @@
"tslib": "^2"
},
"dependencies": {
+ "arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
+ "ts-node": {
+ "version": "9.1.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
+ "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
+ "dev": true,
+ "requires": {
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "source-map-support": "^0.5.17",
+ "yn": "3.1.1"
+ }
+ },
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -9243,6 +9832,13 @@
}
}
},
+ "@esbuild/linux-loong64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
+ "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
+ "dev": true,
+ "optional": true
+ },
"@eslint/eslintrc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
@@ -10300,6 +10896,38 @@
"integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
"dev": true
},
+ "@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
+ "@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
+ "@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
+ "@tsconfig/node16": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
+ "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
"@types/js-yaml": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz",
@@ -11570,6 +12198,175 @@
"is-symbol": "^1.0.2"
}
},
+ "esbuild": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
+ "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+ "dev": true,
+ "requires": {
+ "@esbuild/linux-loong64": "0.14.54",
+ "esbuild-android-64": "0.14.54",
+ "esbuild-android-arm64": "0.14.54",
+ "esbuild-darwin-64": "0.14.54",
+ "esbuild-darwin-arm64": "0.14.54",
+ "esbuild-freebsd-64": "0.14.54",
+ "esbuild-freebsd-arm64": "0.14.54",
+ "esbuild-linux-32": "0.14.54",
+ "esbuild-linux-64": "0.14.54",
+ "esbuild-linux-arm": "0.14.54",
+ "esbuild-linux-arm64": "0.14.54",
+ "esbuild-linux-mips64le": "0.14.54",
+ "esbuild-linux-ppc64le": "0.14.54",
+ "esbuild-linux-riscv64": "0.14.54",
+ "esbuild-linux-s390x": "0.14.54",
+ "esbuild-netbsd-64": "0.14.54",
+ "esbuild-openbsd-64": "0.14.54",
+ "esbuild-sunos-64": "0.14.54",
+ "esbuild-windows-32": "0.14.54",
+ "esbuild-windows-64": "0.14.54",
+ "esbuild-windows-arm64": "0.14.54"
+ }
+ },
+ "esbuild-android-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
+ "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-android-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
+ "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-darwin-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
+ "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-darwin-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
+ "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-freebsd-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
+ "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-freebsd-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
+ "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-32": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
+ "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
+ "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-arm": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
+ "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
+ "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-mips64le": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
+ "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-ppc64le": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
+ "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-riscv64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
+ "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-s390x": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
+ "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-netbsd-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
+ "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-openbsd-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
+ "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-sunos-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
+ "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-32": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
+ "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
+ "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-arm64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
+ "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
+ "dev": true,
+ "optional": true
+ },
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -14431,24 +15228,43 @@
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"ts-node": {
- "version": "9.1.1",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
- "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
+ "optional": true,
+ "peer": true,
"requires": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
"arg": "^4.1.0",
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
- "source-map-support": "^0.5.17",
+ "v8-compile-cache-lib": "^3.0.1",
"yn": "3.1.1"
},
"dependencies": {
+ "acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
"arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "dev": true
+ "dev": true,
+ "optional": true,
+ "peer": true
}
}
},
@@ -14643,6 +15459,14 @@
"integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
"dev": true
},
+ "v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true,
+ "optional": true,
+ "peer": true
+ },
"value-or-promise": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz",
diff --git a/package.json b/package.json
index 92ec690..3917375 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,10 @@
"private": true,
"scripts": {
"dev": "next dev -p 12499",
- "precommit": "npm run generate && npm run prettier && npm run unused-exports && npm run eslint && npm run tsc && echo ALL PRECOMMIT CHECKS PASSED SUCCESSFULLY, LET\\'S FUCKING GO!",
+ "precommit": "npm run generate && npm run fetch-local-data && npm run prettier && npm run unused-exports && npm run eslint && npm run tsc && echo ALL PRECOMMIT CHECKS PASSED SUCCESSFULLY, LET\\'S FUCKING GO!",
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport=src/pages --ignoreFiles=generated",
- "prebuild": "npm run generate",
+ "fetch-local-data": "esrun src/graphql/fetchLocalData.ts",
+ "prebuild": "npm run generate && npm run fetch-local-data",
"build": "next build",
"postbuild": "next-sitemap --config next-sitemap.config.js",
"start": "next start -p 12500",
@@ -40,6 +41,7 @@
"usehooks-ts": "^2.6.0"
},
"devDependencies": {
+ "@digitak/esrun": "^3.2.10",
"@graphql-codegen/cli": "^2.11.6",
"@graphql-codegen/typescript": "2.7.3",
"@graphql-codegen/typescript-graphql-request": "^4.5.3",
@@ -52,6 +54,7 @@
"@types/turndown": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
+ "dotenv": "^16.0.1",
"eslint": "^8.22.0",
"eslint-config-next": "12.2.5",
"eslint-plugin-import": "^2.26.0",
diff --git a/public/local-data/currencies.json b/public/local-data/currencies.json
new file mode 100644
index 0000000..2b40fc9
--- /dev/null
+++ b/public/local-data/currencies.json
@@ -0,0 +1 @@
+{"currencies":{"data":[{"id":"1","attributes":{"code":"EUR","symbol":"€","rate_to_usd":1.1062771,"display_decimals":true}},{"id":"2","attributes":{"code":"CAD","symbol":"$","rate_to_usd":0.79319156,"display_decimals":true}},{"id":"3","attributes":{"code":"USD","symbol":"$","rate_to_usd":1,"display_decimals":true}},{"id":"4","attributes":{"code":"JPY","symbol":"¥","rate_to_usd":0.0083864261,"display_decimals":false}},{"id":"5","attributes":{"code":"BRL","symbol":"R$","rate_to_usd":0.19904328,"display_decimals":true}},{"id":"6","attributes":{"code":"GBP","symbol":"£","rate_to_usd":1.3181323,"display_decimals":true}},{"id":"7","attributes":{"code":"AUD","symbol":"$","rate_to_usd":0.7422,"display_decimals":true}},{"id":"8","attributes":{"code":"INR","symbol":"₹","rate_to_usd":0.013162881,"display_decimals":false}},{"id":"9","attributes":{"code":"NZD","symbol":"$","rate_to_usd":0.69089984,"display_decimals":true}},{"id":"10","attributes":{"code":"CHF","symbol":"CHF","rate_to_usd":1.0728706,"display_decimals":true}}]}}
\ No newline at end of file
diff --git a/public/local-data/languages.json b/public/local-data/languages.json
new file mode 100644
index 0000000..a4f33d1
--- /dev/null
+++ b/public/local-data/languages.json
@@ -0,0 +1 @@
+{"languages":{"data":[{"id":"1","attributes":{"name":"French","code":"fr","localized_name":"Français"}},{"id":"2","attributes":{"name":"English","code":"en","localized_name":"English"}},{"id":"3","attributes":{"name":"Japanese","code":"ja","localized_name":"日本語"}},{"id":"4","attributes":{"name":"Spanish","code":"es","localized_name":"Español"}},{"id":"6","attributes":{"name":"Portuguese (Brazil)","code":"pt-br","localized_name":"Português (Brasil)"}},{"id":"8","attributes":{"name":"German","code":"de","localized_name":"Deutsch"}},{"id":"9","attributes":{"name":"Italian","code":"it","localized_name":"Italiano"}},{"id":"10","attributes":{"name":"Russian","code":"ru","localized_name":"русский"}},{"id":"11","attributes":{"name":"Korean","code":"ko","localized_name":"한국어"}},{"id":"12","attributes":{"name":"Chinese (Traditional)","code":"zh-cht","localized_name":"中文(繁體)"}}]}}
\ No newline at end of file
diff --git a/public/local-data/websiteInterfaces.json b/public/local-data/websiteInterfaces.json
new file mode 100644
index 0000000..2d27425
--- /dev/null
+++ b/public/local-data/websiteInterfaces.json
@@ -0,0 +1 @@
+{"websiteInterfaces":{"data":[{"attributes":{"ui_language":{"data":{"attributes":{"code":"en"}}},"library":"Library","contents":"Contents","wiki":"Wiki","chronicles":"Chronicles","library_short_description":"Browse all physical and digital media","contents_short_description":"Explore all content and filter by type or category","wiki_short_description":"An encyclopedia for everything related to DrakeNieR","chronicles_short_description":"Experience all events and content in chronological order","news":"News","merch":"Merch","gallery":"Gallery","archives":"Archives","about_us":"About us","licensing_notice":"This website’s content is made available under [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) unless otherwise noted.","copyright_notice":"Accord’s Library is not affiliated with or endorsed by SQUARE ENIX CO. LTD. All game assets and promotional materials belongs to © SQUARE ENIX CO. LTD.","contents_description":"All the contents (textual, audio, and video) from the Library or other online sources.","type":"Type","category":"Category","categories":"Categories","size":"Size","release_date":"Release date","release_year":"Release year","details":"Details","price":"Price","width":"Width","height":"Height","thickness":"Thickness","subitem":"Subitem","subitems":"Subitems","subitem_of":"Subitem of","variant":"Variant","variants":"Variants","variant_of":"Variant of","summary":"Summary","audio":"Audio","video":"Video","textual":"Textual","game":"Game","other":"Other","return_to":"Return to","left_to_right":"Left to right","right_to_left":"Right to left","page":"Page","pages":"Pages","page_order":"Page order","binding":"Binding","type_information":"Type information","front_matter":"Front matter","back_matter":"Back matter","open_content":"Open content","read_content":"Read content","watch_content":"Watch content","listen_content":"Listen to content","view_scans":"View scans","paperback":"Paperback","hardcover":"Hardcover","languages":"Languages","select_language":"Select a language","language":"Language","library_description":"A comprehensive list of all Yokoverse’s side materials (books, novellas, artbooks, stage plays, manga, drama CDs, and comics). For each, we provide photos, scans, and transcript of the content, information about what it is, when and how it was released, size, initial price…","wiki_description":"An encyclopedia for everything related to DrakeNieR. Right now, we only have the Chronology but a lot more pages are planned to be released!","chronicles_description":"Experience all events and content in chronological order.","news_description":"News articles written by our Recorders! Here you will find announcements about new merch/items releases, guides, theories, unboxings, showcases...","merch_description":"Harum ut consequatur a earum explicabo suscipit. Nostrum asperiores consectetur aperiam in ut sunt. Ipsa quibusdam et vel quam voluptas placeat. Qui est aliquam voluptatem. Tempora nisi exercitationem tempore sapiente expedita. Voluptas ut eaque nulla sunt ut dolor corrupti quos.","gallery_description":"A fully tagged Danbooru-styled gallery with currently more than a thousand unique official artworks.","archives_description":"Besides physical medias, we also archive digital contents such as websites, webpages, videos, and documents.","about_us_description":"Find more information about the Accord's Library project in the following pages.","page_not_found":"Page not found","default_description":"Accord's Library aims at gathering and archiving all of Yoko Taro’s work. Yoko Taro is a Japanese video game director and scenario writer.","name":"Name","show_subitems":"Show subitems","show_primary_items":"Show primary items","show_secondary_items":"Show secondary items","no_type":"No type","no_year":"No year","order_by":"Order by","group_by":"Group by","select_option_sidebar":"Select one of the options in the sidebar","group":"Group","settings":"Settings","theme":"Theme","light":"Light","auto":"Auto","dark":"Dark","font_size":"Font size","player_name":"Player name","currency":"Currency","font":"Font","calculated":"Calculated","status_incomplete":"This entry is only partially translated/transcribed.","status_draft":"This entry is just a draft. It usually means that this is a work-in-progress. Translation/transcription might be poor and/or computer-generated.","status_review":"This entry has not yet being proofread. The content should still be accurate.","status_done":"This entry has been checked and proofread. If you notice any translation errors or typos, please contact us so we can fix it!","incomplete":"Incomplete","draft":"Draft","review":"Review","done":"Done","status":"Status","transcribers":"Transcribers","translators":"Translators","proofreaders":"Proofreaders","transcript_notice":"This content is a transcript","translation_notice":"This content is a fan-translation","source_language":"Source language","pronouns":"Pronouns","no_category":"No category","item":"Item","items":"Items","content":"Content","result":"Result","results":"Results","language_switch_message":"","open_settings":"Open settings","change_language":"Change language","open_search":"Open search","chronology":"Chronology","accords_handbook":"Accord's Handbook","legality":"Legality","members":"Members","sharing_policy":"Sharing Policy","contact_us":"Contact us","email":"Email","email_gdpr_notice":"We only use your email in order to contact you in regard to your request. We do not share this email with anyone nor use it for any other purpose.","message":"Message","send":"Send","response_invalid_code":"Verification code is incorrect.","response_invalid_email":"Please enter a valid email address!","response_email_success":"Thank you for contacting us! We will be in touch with you shortly.","always_show_info":"Always show info","item_not_available":"This item is not for sale or is no longer available","primary_language":"Primary language","secondary_language":"Secondary languages","combine_related_contents":"Combine related contents","previous_content":"Previous content","followup_content":"Follow-up content","videos":"Videos","view_on":"View on","channel":"Channel","subscribers":"Subscribers","description":"Description","available_at":"Available at","search_title":"Search title...","want_it":"I want it!","have_it":"I have it!","source":"Source","reset_all_filters":"Reset all filters","only_display_items_i_have":"Only display items marked as “I have”","only_display_items_i_want":"Only display items marked as “I want”","only_display_unmarked_items":"Only display unmarked items","display_all_items":"Display all items","table_of_contents":"Table of Contents","definition":"Definition","no_results_message":"No results. You can try changing or resetting the search parameters.","all":"All","special_pages":"Special Pages","scan":"Scan","scanlation":"Scanlation","scanners":"Scanners","cleaners":"Cleaners","typesetters":"Typesetters","notes":"Notes","cover":"Cover","tags":"Tags","no_source_warning":"No source!","copy_anchor_link":"Click to copy the archor link","anchor_link_copied":"Copied! 👍","folders":"Folders","empty_folder_message":"This folder is empty"}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"fr"}}},"library":"Bibliothèque","contents":"Contenus","wiki":"Wiki","chronicles":"Chroniques","library_short_description":"Explorer l'ensemble des médias physique ou numérique","contents_short_description":"Explorer tout les contenus et filtrer par type ou par catégorie","wiki_short_description":"Une encyclopédie pour tout l'univers DrakeNieR","chronicles_short_description":"Parcourir tous les événements et les contenu dans l'ordre chronologique","news":"News","merch":"Merch","gallery":"Galerie","archives":"Archives","about_us":"À propos","licensing_notice":"Le contenu de ce site web est mis à disposition sous licence [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/), sauf indication contraire.","copyright_notice":"Accord's Library n'est pas affiliée ni approuvée par SQUARE ENIX CO. LTD. Tous les contenus du jeu et les contenus promotionnel appartiennent à © SQUARE ENIX CO. LTD.","contents_description":"","type":"Type","category":"Catégorie","categories":"Catégories","size":"Dimension","release_date":"Date de sortie","release_year":"Année de sortie","details":"Détails","price":"Prix","width":"Largeur","height":"Hauteur","thickness":"Épaisseur","subitem":"Sous-item","subitems":"Sous-items","subitem_of":"Sous-item de","variant":"Variante","variants":"Variantes","variant_of":"Variante de","summary":"Résumé","audio":"Audio","video":"Vidéo","textual":"Textuel","game":"Jeux","other":"Autre","return_to":"Retourner à ","left_to_right":"Gauche à droite","right_to_left":"Droite à gauche","page":"Page","pages":"Pages","page_order":"Order des pages","binding":"Brochure","type_information":"Information de type","front_matter":"Avant propos","back_matter":"Après propos","open_content":"Parcourir le contenu","read_content":"Lire le contenu","watch_content":"Regarder le contenu","listen_content":"Écouter le contenu","view_scans":"Voir les scans","paperback":"Broché","hardcover":"Relié","languages":"Langues","select_language":"Séléctionner la langue","language":"Langue","library_description":"","wiki_description":"","chronicles_description":"","news_description":"","merch_description":"","gallery_description":"","archives_description":"","about_us_description":"","page_not_found":"Page introuvable","default_description":"Accord's Library a pour but de rassembler et d'archiver l'ensemble des travaux de Yoko Taro. Yoko Taro est un réalisateur et scénariste de jeux vidéo japonais.","name":"Nom","show_subitems":"Afficher les sous-items","show_primary_items":"Afficher les items primaires","show_secondary_items":"Afficher les items secondaires","no_type":"Pas de type","no_year":"Pas d'année","order_by":"Ordonné par","group_by":"Groupé par","select_option_sidebar":"Sélectionner l'une des options de la barre latérale","group":"Groupe","settings":"Paramètres","theme":"Thème","light":"Clair","auto":"Auto","dark":"Sombre","font_size":"Taille de la police","player_name":"Nom du joueur","currency":"Devise","font":"Police d'écriture","calculated":"calculé","status_incomplete":"Cette entrée n'est que partiellement traduite/transcrite.","status_draft":"Cette entrée n'est qu'un brouillon. Cela signifie généralement qu'il s'agit d'un travail en cours. La traduction/transcription peut être médiocre et/ou auto-générée par ordinateur.","status_review":"Cet entrée n'a pas encore été relue. Le contenu devrait néanmoins être correct.","status_done":"Cet entrée a été vérifiée et corrigée. Si vous remarquez des erreurs de traduction ou des fautes de frappe, veuillez nous contacter afin que nous puissions les corriger !","incomplete":"Incomplet","draft":"Ébauche","review":"Pour vérification","done":"Terminé","status":"Statut","transcribers":"Transcripteurs","translators":"Traducteurs","proofreaders":"Correcteurs","transcript_notice":"Ceci est une transcription","translation_notice":"Ceci est une traduction","source_language":"Langue source","pronouns":"Pronoms","no_category":"Pas de categorie","item":"Item","items":"Items","content":"Content","result":"Resultat","results":"Résultats","language_switch_message":"Ce contenu n'est pas disponible dans la langue actuellement sélectionnée. Vous pouvez sélectionner l'une des langues suivantes à la place :","open_settings":"Ouvrir les paramètres","change_language":"Changer de langue","open_search":"Ouvrir le menu de recherche","chronology":"Chronologie","accords_handbook":"Le manuel de Accord","legality":"Légalité","members":"Membres","sharing_policy":"Politique de partage","contact_us":"Nous contacter","email":"Email","email_gdpr_notice":"Nous utilisons votre adresse électronique uniquement pour vous contacter au sujet de votre demande. Nous ne partageons cette adresse avec personne et ne l'utilisons pas à d'autres fins.","message":"Message","send":"Envoyer","response_invalid_code":"Le code de vérification est incorrect.","response_invalid_email":"Veuillez saisir une adresse électronique valide !","response_email_success":"Merci de nous avoir contactés ! Nous prendrons contact avec vous sous peu.","always_show_info":"Toujours montrer les informations","item_not_available":"Cet article n'est pas à vendre ou n'est plus disponible.","primary_language":"Langue principale","secondary_language":"Langues secondaires","combine_related_contents":"Combiner les contenus connexes","previous_content":"Contenu précédent","followup_content":"Contenu suivant","videos":"Videos","view_on":"Voir sur","channel":"Chaîne","subscribers":"Abonnés","description":"Description","available_at":"Disponible sur","search_title":"Rechercher un titre...","want_it":"Je le veux !","have_it":"Je l'ai !","source":"Source","reset_all_filters":"Réinitialiser les filtres","only_display_items_i_have":"Seulement afficher les items marqués avec \"je le veux\"","only_display_items_i_want":"Seulement afficher les items marqués avec \"je l'ai\"","only_display_unmarked_items":"Seulement afficher les items non-marqués","display_all_items":"Afficher tous les items","table_of_contents":"Sommaire","definition":"Definition","no_results_message":"Aucun résultat. Vous pouvez essayer de modifier ou de réinitialiser les paramètres de recherche.","all":"Tous","special_pages":"Pages spéciales","scan":"Scan","scanlation":"Scantrad","scanners":"Scanneurs","cleaners":"Nettoyeurs","typesetters":"Lettreurs","notes":"Notes","cover":"Couverture","tags":"Tags","no_source_warning":"Pas de source !","copy_anchor_link":"Cliquez pour copier le permalien","anchor_link_copied":"Copié ! 👍","folders":null,"empty_folder_message":null}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"ja"}}},"library":"ライブラリー","contents":"コンテンツ","wiki":"ウィキ","chronicles":"クロニクル","library_short_description":"すべての物理メディアとデジタルメディアを見る","contents_short_description":"すべてのコンテンツを検索し、種類やカテゴリーで絞り込むことができます。","wiki_short_description":"ゲーム宇宙に関連するすべての百科事典です。","chronicles_short_description":"すべてのイベントとコンテンツを時系列で体験できる","news":"ニュース","merch":"マーチ","gallery":"ギャラリー","archives":"アーカイブス","about_us":"会社概要","licensing_notice":"このウェブサイトのコンテンツは、特に断りのない限り [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) で提供されています。","copyright_notice":"Accord's Libraryは、株式会社スクウェア・エニックスと提携、または推奨しているものではありません。株式会社スクウェア・エニックスの登録商標です。すべてのゲーム資産およびプロモーション素材は、© SQUARE ENIX CO. LTD.に帰属します。","contents_description":"図書館や他のオンラインソースのすべてのコンテンツ(テキスト、オーディオ、ビデオ)。","type":"タイプ","category":"カテゴリー","categories":"カテゴリー","size":"サイズ","release_date":"発売日","release_year":"発売年","details":"詳細","price":"価格","width":"幅","height":"高さ","thickness":"厚み","subitem":"サブアイテム","subitems":"サブアイテム","subitem_of":"のサブアイテム","variant":"バリアント","variants":"バリアント","variant_of":"のバリアント","summary":"概要","audio":"オーディオ","video":"ビデオ","textual":"テキスト","game":"ゲーム","other":"他","return_to":"戻る","left_to_right":"左から右へ","right_to_left":"右から左へ","page":"ページ","pages":"ページ","page_order":"ページ順序","binding":"製本","type_information":"タイプ情報","front_matter":"フロントマター","back_matter":"バックナンバー","open_content":"コンテンツを開放","read_content":"コンテンツを読む","watch_content":"コンテンツを見る","listen_content":"コンテンツを聴く","view_scans":"スキャンを開放","paperback":"ペーパーバック","hardcover":"ハードカバー","languages":"言語","select_language":"言語を選択する","language":"言語","library_description":"ヨコベースの副教材(書籍、小説、画集、舞台劇、漫画、ドラマCD、コミック)を網羅したリストです。それぞれについて、写真、スキャン、内容の書き起こし、どんなものなのか、いつ、どのように発売されたのか、サイズ、初回価格...などの情報を掲載しています。","wiki_description":"DrakeNieRに関連するすべての百科事典です。現在は年表のみですが、今後多くのページを公開予定です","chronicles_description":"Accord's Libraryは、ヨーコ・タローの全作品を収集・保存することを目的としています。ヨーコ・タローは、日本のゲームディレクター、シナリオライターです。","news_description":"レコーダーが書いたニュース記事です ここでは、新しい商品/アイテムのリリースに関するお知らせ、ガイド、セオリー、アンボックス、ショーケース...をご紹介しています。","merch_description":"","gallery_description":"","archives_description":"","about_us_description":"Accord's Libraryプロジェクトについては、以下のページで詳しくご紹介しています。","page_not_found":"ページが見つかりません","default_description":"Accord's Libraryは、ヨーコ・タローの全作品を収集・保存することを目的としています。ヨーコ・タローは、日本のゲームディレクター、シナリオライターです。","name":"名称","show_subitems":"サブアイテムをみせる","show_primary_items":"一次のイテムをみせる","show_secondary_items":"二次のイテムをみせる","no_type":"タイプなし","no_year":"年なし","order_by":"注文する","group_by":"グループ化する","select_option_sidebar":"サイドバーのオプションを選択します","group":"グループ","settings":"設定","theme":"テーマ","light":"光","auto":"オート","dark":"暗","font_size":"文字サイズ","player_name":"プレイヤー名","currency":"通貨","font":"文字","calculated":"計算された","status_incomplete":"このエントリーは一部のみ翻訳/転記されています。","status_draft":"このエントリーはあくまで下書きです。通常、これは作業中であることを意味します。翻訳/転写は稚拙であったり、コンピュータで作成されたものであったりするかもしれません。","status_review":"このエントリーはまだ校正されていません。内容はまだ正確であるはずです。","status_done":"このエントリーは、チェックと校正を行いました。もし、翻訳ミスや誤字脱字にお気づきの際は、修正いたしますので、ご連絡ください","incomplete":"未完成","draft":"ドラフト","review":"レビュー","done":"完了","status":"状況","transcribers":"トランスクライバー","translators":"翻訳者","proofreaders":"校正者","transcript_notice":"このコンテンツは転写です","translation_notice":"このコンテンツはファンによる翻訳です","source_language":"ソース言語","pronouns":"代名詞","no_category":"カテゴリーなし","item":"項目","items":"項目","content":"コンテンツ","result":"結果","results":"結果","language_switch_message":null,"open_settings":"オープン設定","change_language":"言語を変更する","open_search":"オープンサーチ","chronology":"年表","accords_handbook":"アコードの手引き","legality":"合法性","members":"メンバー紹介","sharing_policy":"共有ポリシー","contact_us":"お問い合わせ","email":"電子メール","email_gdpr_notice":"お客様の電子メールは、お客様のご要望に関してご連絡するためにのみ使用します。この電子メールを誰かと共有したり、他の目的で使用することはありません。","message":"メッセージ","send":"送信","response_invalid_code":"検証コードが正しくありません。","response_invalid_email":"有効なEメールアドレスを入力してください","response_email_success":"お問い合わせありがとうございます。折り返しご連絡させていただきます。","always_show_info":"常に情報を表示する","item_not_available":"この商品は非売品です","primary_language":"主要言語","secondary_language":"二次言語","combine_related_contents":"関連するコンテンツを組み合わせる","previous_content":"前のコンテンツ","followup_content":"フォローアップコンテンツ","videos":"動画","view_on":"見る","channel":"チャンネル","subscribers":"サブスクライバー","description":"説明","available_at":"でご覧いただけます。","search_title":"検索タイトル...","want_it":"欲しいです!","have_it":"持ってます!","source":"出典","reset_all_filters":"すべてのフィルタをリセットする","only_display_items_i_have":"\"持ってる \"と表示されているもののみ表示","only_display_items_i_want":"\"欲しい \"とマークされたものだけを表示する","only_display_unmarked_items":"無印のアイテムのみ表示","display_all_items":"すべての項目を表示する","table_of_contents":"目次","definition":"定義","no_results_message":"結果が出ません。検索条件を変更またはリセットしてみてください。","all":"すべて","special_pages":"特設ページ","scan":null,"scanlation":null,"scanners":null,"cleaners":null,"typesetters":null,"notes":null,"cover":null,"tags":null,"no_source_warning":null,"copy_anchor_link":null,"anchor_link_copied":null,"folders":null,"empty_folder_message":null}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"es"}}},"library":"Librería","contents":"Contenidos","wiki":"Wiki","chronicles":"Crónicas","library_short_description":"Explora todos los medios físicos y digitales","contents_short_description":"Explora todo el contenido y filtra por tipo o categoría","wiki_short_description":"Una enciclopedia para todo lo relacionado con DrakeNieR","chronicles_short_description":"Experimenta todos los eventos y contenidos en orden cronológico","news":"Novedades","merch":"Merch","gallery":"Galería","archives":"Archivos","about_us":"Sobre nosotros","licensing_notice":"El contenido de este sitio web está disponible bajo [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) a menos que se indique lo contrario.","copyright_notice":"Accord's Library no está afiliada ni respaldada por SQUARE ENIX CO. LTD. Todos los archivos de los juegos y material promocional pertenecen a © SQUARE ENIX CO. LTD.","contents_description":"Todo el contenido (textual, audio y video) de la Biblioteca u otras fuentes en línea.","type":"Tipo","category":"Categoría","categories":"Categorías","size":"Tamaño","release_date":"Fecha de lanzamiento","release_year":"Año de lanzamiento","details":"Detalles","price":"Precio","width":"Ancho","height":"Altura","thickness":"Grosor","subitem":"Sub-item","subitems":"Sub-items","subitem_of":"Sub-item de","variant":"Variante","variants":"Variantes","variant_of":"Variante de","summary":"Sumario","audio":"Audio","video":"Video","textual":"Textual","game":"Juego","other":"Otros","return_to":"Volver a","left_to_right":"Izquierda a derecha","right_to_left":"Derecha a izquierda","page":"Página","pages":"Páginas","page_order":"Orden de las páginas","binding":"Encuadernación","type_information":"Tipo de información","front_matter":"Anteportada","back_matter":"Portada anterior","open_content":"Abrir contenido","read_content":"Leer contenido","watch_content":"Ver contenido","listen_content":"Escuchar contenido","view_scans":"Ver escaneos","paperback":"Tapa blanda","hardcover":"Tapa dura","languages":"Idiomas","select_language":"Seleccionar idioma","language":"Idioma","library_description":"Una lista completa de todos los materiales complementarios de Yokoverse (libros, novelas, libros de arte, obras de teatro, manga, CDs novelizados y cómics). Para cada uno, proporcionamos fotos, escaneos y transcripciones del contenido, información sobre qué es, cuándo y cómo se ha publicado, tamaño, precio inicial...","wiki_description":"Una enciclopedia para todo lo relacionado con DrakeNieR. En este momento, solo tenemos la Cronología, ¡pero muchas más páginas están planeadas para ser publicadas!","chronicles_description":"","news_description":"¡Nuevos artículos escritos por nuestros/as Archivistas! Aquí encontrarás anuncios sobre nuevos lanzamientos de merchandising/artículos, guías, teorías, unboxings, showcases...","merch_description":"","gallery_description":"Una galería completamente etiquetada de estilo Danbooru, actualmente con más de mil obras de arte oficiales únicas.","archives_description":"","about_us_description":"Encuentra más información sobre el proyecto de Accord's Library en las siguientes páginas.","page_not_found":"Página no encontrada","default_description":"Accord's Library tiene como objetivo recopilar y archivar todo el trabajo de Yoko Taro. Yoko Taro es un director de videojuegos y escritor de escenarios japonés.","name":"Nombre","show_subitems":"Mostrar sub-items","show_primary_items":"Mostrar items principales","show_secondary_items":"Mostrar items secundarios","no_type":"Ningún tipo","no_year":"Ningún año","order_by":"Ordenar por","group_by":"Agrupar por","select_option_sidebar":"Selecciona una de las opciones en la barra lateral","group":"Grupo","settings":"Ajustes","theme":"Tema","light":"Claro","auto":"Auto","dark":"Oscuro","font_size":"Tamaño de la fuente","player_name":"Nombre del jugador/a","currency":"Divisa","font":"Fuente","calculated":"Calculada","status_incomplete":"Esta entrada está solo parcialmente traducida/transcrita.","status_draft":"Esta entrada es solo un borrador. Por lo general, significa que se trata de un trabajo en curso. La traducción/transcripción puede ser deficiente y/o generada por ordenador.","status_review":"Esta entrada aún no ha sido corregida. No obstante, el contenido debería ser preciso.","status_done":"Esta entrada ha sido revisada y corregida. Si notas algún error de traducción o error tipográfico, contáctanos para que podamos solucionarlo!","incomplete":"Incompleto","draft":"Borrador","review":"Revisado","done":"Completado","status":"Estado","transcribers":"Transcriptores/as","translators":"Traductores/as","proofreaders":"Correctores/as","transcript_notice":"Este contenido es una transcripción","translation_notice":"Este contenido es una traducción de fans","source_language":"Idioma original","pronouns":"Pronombres","no_category":"Ningún categoría","item":null,"items":null,"content":null,"result":null,"results":null,"language_switch_message":null,"open_settings":null,"change_language":null,"open_search":null,"chronology":null,"accords_handbook":null,"legality":null,"members":null,"sharing_policy":null,"contact_us":null,"email":"Email","email_gdpr_notice":"Solo usamos tu correo electrónico exclusivamente para contactarte en relación a tu solicitud. No compartimos este correo electrónico con nadie ni lo usamos para ningún otro propósito.","message":null,"send":null,"response_invalid_code":"El código de verificación es incorrecto.","response_invalid_email":"¡Por favor, introduce una dirección de correo electrónico válida!","response_email_success":"¡Gracias por contactarnos! Nos pondremos en contacto contigo en breve.","always_show_info":null,"item_not_available":null,"primary_language":null,"secondary_language":null,"combine_related_contents":null,"previous_content":null,"followup_content":null,"videos":null,"view_on":null,"channel":null,"subscribers":null,"description":null,"available_at":null,"search_title":null,"want_it":null,"have_it":null,"source":null,"reset_all_filters":null,"only_display_items_i_have":null,"only_display_items_i_want":null,"only_display_unmarked_items":null,"display_all_items":null,"table_of_contents":null,"definition":null,"no_results_message":null,"all":null,"special_pages":null,"scan":null,"scanlation":null,"scanners":null,"cleaners":null,"typesetters":null,"notes":null,"cover":null,"tags":null,"no_source_warning":null,"copy_anchor_link":null,"anchor_link_copied":null,"folders":null,"empty_folder_message":null}},{"attributes":{"ui_language":{"data":{"attributes":{"code":"pt-br"}}},"library":"Coleção","contents":"Conteúdos","wiki":"Wiki","chronicles":"Crônicas","library_short_description":"Procure por todas mídias digitais e físicas","contents_short_description":"Explore todo o conteúdo e filtre por categorias e tipos","wiki_short_description":"Uma enciclopédia com tudo relacionado a DrakeNieR","chronicles_short_description":"Explore as crônicas de DrakeNieR em ordem cronológica.","news":"Notícias","merch":"Mercadorias","gallery":"Galeria","archives":"Arquivos","about_us":"Sobre Nós","licensing_notice":"O conteúdo nesse site está disponível pela CC-BY-SA, a não ser que esteja anotado.","copyright_notice":"Accord's Library não é afiliada ou reconhecida pela SQUARE ENIX CO. LTD. Todos assets de jogos e materiais promocionais pertencem a © SQUARE ENIX CO. LTD.\n\n","contents_description":"","type":"Tipo","category":"Categoria","categories":"Categorias","size":"Tamanho","release_date":"Dia de lançamento","release_year":"Ano de lançamento","details":"Detalhes","price":"Preço","width":"Largura","height":"Altura","thickness":"Grossura","subitem":"Subitem","subitems":"Subitens","subitem_of":"Subitem de","variant":"Variante","variants":"Variantes","variant_of":"Variante de","summary":"Sumário","audio":"Audio","video":"Video","textual":"Textos","game":"Jogos","other":"Outros","return_to":"Voltar para","left_to_right":"Esquerda para direita","right_to_left":"Direita para esquerda","page":"Página","pages":"Páginas","page_order":"Ordem de páginas","binding":"Encadernação","type_information":"Informação do tipo","front_matter":"Pré textual","back_matter":"Pós textual","open_content":"Abrir conteúdo","read_content":"Ler o conteúdo","watch_content":"Assistir o conteúdo","listen_content":"Ouvir o conteúdo","view_scans":"Ver scans","paperback":"Brochura","hardcover":"Capa dura","languages":"Línguas","select_language":"Selecionar língua","language":"Língua","library_description":"","wiki_description":null,"chronicles_description":null,"news_description":"","merch_description":"","gallery_description":"","archives_description":"","about_us_description":"","page_not_found":"Página não encontrada","default_description":null,"name":"Nome","show_subitems":"Mostrar subitens","show_primary_items":"Mostrar itens primários","show_secondary_items":"Mostrar itens secundários","no_type":"Sem tipo","no_year":"Sem ano","order_by":"Ordenar por","group_by":"Agrupar por","select_option_sidebar":"Selecione uma opção na aba lateral","group":"Grupo","settings":"Configurações","theme":"Tema","light":"Claro","auto":"Automático","dark":"Escuro","font_size":"Tamanho da fonte","player_name":"Nome do jogador","currency":"Moeda","font":"Fonte","calculated":"Calculado","status_incomplete":"Este conteúdo está incompleto e não foi traduzido/transcrito completamente.","status_draft":"A tradução/transcrição selecionada é um Rascunho. Isso significa que a tradução pode estar fraca e/ou ter sido gerada por uma inteligência artificial.","status_review":"Este conteúdo ainda não foi Revisado, erros gramaticais podem ser encontrados uma vez que os revisores ainda não leram a tradução.","status_done":"O conteúdo foi completamente traduzido e revisado.","incomplete":"Incompleto","draft":"Rascunho","review":"Review","done":"Concluido","status":"Status","transcribers":"Transcritores","translators":"Tradutores","proofreaders":"Revisores","transcript_notice":"Este conteúdo foi transcrito.","translation_notice":"Este conteúdo é uma tradução de fã.","source_language":"Língua original","pronouns":"Pronomes","no_category":"Sem Categoria","item":"Item","items":"Itens","content":"Conteúdo","result":"Resultado","results":"Resultados","language_switch_message":"Este conteúdo não está disponível na língua selecionada. Você pode escolher uma das seguintes línguas:","open_settings":"Abrir configurações","change_language":"Mudar língua","open_search":"Abrir pesquisa","chronology":"Cronologia","accords_handbook":"Livro de mão da Accord","legality":"Legalidade","members":"Membros","sharing_policy":"Política de compartilhamento","contact_us":"Fale conosco","email":null,"email_gdpr_notice":null,"message":null,"send":null,"response_invalid_code":null,"response_invalid_email":null,"response_email_success":null,"always_show_info":"Mostrar informações","item_not_available":"Item indisponível","primary_language":"Língua primaria","secondary_language":"Línguas secundárias","combine_related_contents":"Combinar relacionados","previous_content":"Conteúdo anterior:","followup_content":"Próximo conteúdo:","videos":"Videos:","view_on":"Ver no:","channel":"Canal","subscribers":"Inscritos","description":"Descrição","available_at":"Disponível no:","search_title":"Pesquisar","want_it":null,"have_it":null,"source":null,"reset_all_filters":null,"only_display_items_i_have":null,"only_display_items_i_want":null,"only_display_unmarked_items":null,"display_all_items":null,"table_of_contents":null,"definition":null,"no_results_message":null,"all":null,"special_pages":null,"scan":null,"scanlation":null,"scanners":null,"cleaners":null,"typesetters":null,"notes":null,"cover":null,"tags":null,"no_source_warning":null,"copy_anchor_link":null,"anchor_link_copied":null,"folders":null,"empty_folder_message":null}}]}}
\ No newline at end of file
diff --git a/src/components/AnchorShare.tsx b/src/components/AnchorShare.tsx
index df24492..e087925 100644
--- a/src/components/AnchorShare.tsx
+++ b/src/components/AnchorShare.tsx
@@ -1,7 +1,7 @@
import { Ico, Icon } from "./Ico";
import { ToolTip } from "./ToolTip";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { cJoin } from "helpers/className";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭─────────────╮
@@ -10,37 +10,39 @@ import { cJoin } from "helpers/className";
interface Props {
id: string;
- langui: AppStaticProps["langui"];
className?: string;
}
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const AnchorShare = ({ id, langui, className }: Props): JSX.Element => (
-
+export const AnchorShare = ({ id, className }: Props): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
- {
- navigator.clipboard.writeText(
- `${
- process.env.NEXT_PUBLIC_URL_SELF + window.location.pathname
- }#${id}`
- );
- }}
- />
+
+ {
+ navigator.clipboard.writeText(
+ `${
+ process.env.NEXT_PUBLIC_URL_SELF + window.location.pathname
+ }#${id}`
+ );
+ }}
+ />
+
-
-);
+ );
+};
diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx
index efe4336..f023d2c 100644
--- a/src/components/AppLayout.tsx
+++ b/src/components/AppLayout.tsx
@@ -1,9 +1,10 @@
import Head from "next/head";
import { useRouter } from "next/router";
-import { useEffect, useLayoutEffect, useMemo, useState } from "react";
+import { useEffect, useMemo, useState } from "react";
import { useSwipeable } from "react-swipeable";
import UAParser from "ua-parser-js";
import { useBoolean, useIsClient } from "usehooks-ts";
+import Script from "next/script";
import { layout } from "../../design.config";
import { Ico, Icon } from "./Ico";
import { ButtonGroup } from "./Inputs/ButtonGroup";
@@ -13,25 +14,16 @@ import { TextInput } from "./Inputs/TextInput";
import { MainPanel } from "./Panels/MainPanel";
import { Popup } from "./Popup";
import { AnchorIds } from "hooks/useScrollTopOnChange";
-import {
- filterHasAttributes,
- isDefined,
- isDefinedAndNotEmpty,
- isUndefined,
- iterateMap,
-} from "helpers/others";
+import { filterHasAttributes, isDefined, isUndefined } from "helpers/others";
import { prettyLanguage } from "helpers/formatters";
import { cIf, cJoin } from "helpers/className";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { useAppLayout } from "contexts/AppLayoutContext";
import { Button } from "components/Inputs/Button";
import { OpenGraph, TITLE_PREFIX, TITLE_SEPARATOR } from "helpers/openGraph";
-import { getDefaultPreferredLanguages } from "helpers/locales";
import {
useIs1ColumnLayout,
useIsScreenAtLeast,
} from "hooks/useContainerQuery";
-import { useOnResize } from "hooks/useOnResize";
/*
* ╭─────────────╮
@@ -49,7 +41,7 @@ export interface AppLayoutRequired {
openGraph: OpenGraph;
}
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
subPanel?: React.ReactNode;
subPanelIcon?: Icon;
contentPanel?: React.ReactNode;
@@ -59,9 +51,6 @@ interface Props extends AppStaticProps, AppLayoutRequired {
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
export const AppLayout = ({
- langui,
- currencies,
- languages,
subPanel,
contentPanel,
openGraph,
@@ -93,31 +82,15 @@ export const AppLayout = ({
setSubPanelOpen,
toggleMainPanelOpen,
toggleSubPanelOpen,
- setScreenWidth,
- setContentPanelWidth,
- setSubPanelWidth,
+ langui,
+ currencies,
+ languages,
} = useAppLayout();
const router = useRouter();
const is1ColumnLayout = useIs1ColumnLayout();
const isScreenAtLeastXs = useIsScreenAtLeast("xs");
- useOnResize(AnchorIds.Body, (width) => setScreenWidth(width));
- useOnResize(AnchorIds.ContentPanel, (width) => setContentPanelWidth(width));
- useOnResize(AnchorIds.SubPanel, (width) => setSubPanelWidth(width));
-
- useEffect(() => {
- router.events.on("routeChangeStart", () => {
- setConfigPanelOpen(false);
- setMainPanelOpen(false);
- setSubPanelOpen(false);
- });
-
- router.events.on("hashChangeStart", () => {
- setSubPanelOpen(false);
- });
- }, [router.events, setConfigPanelOpen, setMainPanelOpen, setSubPanelOpen]);
-
const handlers = useSwipeable({
onSwipedLeft: (SwipeEventData) => {
if (menuGestures) {
@@ -146,12 +119,6 @@ export const AppLayout = ({
[contentPanel, subPanel]
);
- useLayoutEffect(() => {
- document.getElementsByTagName("html")[0].style.fontSize = `${
- fontSize * 100
- }%`;
- }, [fontSize]);
-
const currencyOptions = useMemo(
() =>
filterHasAttributes(currencies, ["attributes"] as const).map(
@@ -171,26 +138,6 @@ export const AppLayout = ({
if (currencySelect >= 0) setCurrency(currencyOptions[currencySelect]);
}, [currencyOptions, currencySelect, setCurrency]);
- useEffect(() => {
- if (preferredLanguages.length === 0) {
- if (isDefinedAndNotEmpty(router.locale) && router.locales) {
- setPreferredLanguages(
- getDefaultPreferredLanguages(router.locale, router.locales)
- );
- }
- } else if (router.locale !== preferredLanguages[0]) {
- router.replace(router.asPath, router.asPath, {
- locale: preferredLanguages[0],
- });
- }
- }, [
- preferredLanguages,
- router,
- router.locale,
- router.locales,
- setPreferredLanguages,
- ]);
-
const isClient = useIsClient();
const { value: hasDisgardSafariWarning, setTrue: disgardSafariWarning } =
useBoolean(false);
@@ -256,15 +203,15 @@ export const AppLayout = ({
/>
-
-
+
+
{/* Background when navbar is opened */}
-
+
{/* Navbar */}
@@ -448,24 +395,24 @@ export const AppLayout = ({
{langui.languages}
{preferredLanguages.length > 0 && (
[
- locale,
- prettyLanguage(locale, languages),
- ])
- )
- }
- insertLabels={
- new Map([
- [0, langui.primary_language],
- [1, langui.secondary_language],
- ])
- }
+ items={preferredLanguages.map((locale) => ({
+ code: locale,
+ name: prettyLanguage(locale, languages),
+ }))}
+ insertLabels={[
+ {
+ insertAt: 0,
+ name: langui.primary_language ?? "Primary language",
+ },
+ {
+ insertAt: 1,
+ name:
+ langui.secondary_language ?? "Secondary languages",
+ },
+ ]}
onChange={(items) => {
- const newPreferredLanguages = iterateMap(
- items,
- (code) => code
+ const newPreferredLanguages = items.map(
+ (item) => item.code
);
setPreferredLanguages(newPreferredLanguages);
}}
diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx
index 7e71a00..115d243 100644
--- a/src/components/Inputs/LanguageSwitcher.tsx
+++ b/src/components/Inputs/LanguageSwitcher.tsx
@@ -2,10 +2,10 @@ import { Fragment } from "react";
import { ToolTip } from "../ToolTip";
import { Button } from "./Button";
import { Icon } from "components/Ico";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { cJoin } from "helpers/className";
import { prettyLanguage } from "helpers/formatters";
import { iterateMap } from "helpers/others";
+import { useLanguages } from "hooks/useLocalData";
/*
* ╭─────────────╮
@@ -14,7 +14,6 @@ import { iterateMap } from "helpers/others";
interface Props {
className?: string;
- languages: AppStaticProps["languages"];
locales: Map;
localesIndex: number | undefined;
onLanguageChanged: (index: number) => void;
@@ -28,30 +27,32 @@ export const LanguageSwitcher = ({
className,
locales,
localesIndex,
- languages,
size,
onLanguageChanged,
showBadge = true,
-}: Props): JSX.Element => (
-
- {iterateMap(locales, (locale, value, index) => (
-
-
- ))}
-
- }
- >
-
-);
+}: Props): JSX.Element => {
+ const languages = useLanguages();
+ return (
+
+ {iterateMap(locales, (locale, value, index) => (
+
+
+ ))}
+
+ }
+ >
+
+ );
+};
diff --git a/src/components/Inputs/OrderableList.tsx b/src/components/Inputs/OrderableList.tsx
index 6f6cb0f..0b3673d 100644
--- a/src/components/Inputs/OrderableList.tsx
+++ b/src/components/Inputs/OrderableList.tsx
@@ -1,6 +1,6 @@
-import { Fragment, useCallback, useState } from "react";
+import { Fragment, useCallback } from "react";
import { Ico, Icon } from "components/Ico";
-import { isDefinedAndNotEmpty, iterateMap, mapMoveEntry } from "helpers/others";
+import { arrayMove, isDefinedAndNotEmpty } from "helpers/others";
/*
* ╭─────────────╮
@@ -9,35 +9,32 @@ import { isDefinedAndNotEmpty, iterateMap, mapMoveEntry } from "helpers/others";
interface Props {
className?: string;
- items: Map;
- insertLabels?: Map;
- onChange?: (items: Map) => void;
+ items: { code: string; name: string }[];
+ insertLabels?: { insertAt: number; name: string }[];
+ onChange?: (props: Props["items"]) => void;
}
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
export const OrderableList = ({
onChange,
- items: propsItems,
+ items,
insertLabels,
}: Props): JSX.Element => {
- const [items, setItems] = useState
)}
- {metadata.price && metadata.currencies && (
+ {metadata.price && (
- {prettyPrice(metadata.price, metadata.currencies, currency)}
+ {prettyPrice(metadata.price, currencies, currency)}
)}
{metadata.views && (
@@ -129,7 +129,7 @@ export const PreviewCard = ({
)}
>
),
- [currency, metadata, router.locale]
+ [currencies, currency, metadata, router.locale]
);
return (
diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx
index 6d34635..0ab6103 100644
--- a/src/components/RecorderChip.tsx
+++ b/src/components/RecorderChip.tsx
@@ -4,9 +4,9 @@ import { Markdawn } from "./Markdown/Markdawn";
import { ToolTip } from "./ToolTip";
import { Chip } from "components/Chip";
import { RecorderChipFragment } from "graphql/generated";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { ImageQuality } from "helpers/img";
import { filterHasAttributes } from "helpers/others";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭─────────────╮
@@ -16,59 +16,60 @@ import { filterHasAttributes } from "helpers/others";
interface Props {
className?: string;
recorder: RecorderChipFragment;
- langui: AppStaticProps["langui"];
}
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const RecorderChip = ({ recorder, langui }: Props): JSX.Element => (
-
-
- {recorder.avatar?.data?.attributes && (
-
- )}
-
-
{recorder.username}
- {recorder.languages?.data && recorder.languages.data.length > 0 && (
-
-
{langui.languages}:
- {filterHasAttributes(recorder.languages.data, [
- "attributes",
- ] as const).map((language) => (
-
-
-
- ))}
-
- )}
- {recorder.pronouns && (
-
+export const RecorderChip = ({ recorder }: Props): JSX.Element => {
+ const { langui } = useAppLayout();
+
+ return (
+
+
+ {recorder.avatar?.data?.attributes && (
+
)}
+
+
{recorder.username}
+ {recorder.languages?.data && recorder.languages.data.length > 0 && (
+
+
{langui.languages}:
+ {filterHasAttributes(recorder.languages.data, [
+ "attributes",
+ ] as const).map((language) => (
+
+
+
+ ))}
+
+ )}
+ {recorder.pronouns && (
+
+ )}
+
+ {recorder.bio?.[0] && }
- {recorder.bio?.[0] && (
-
- )}
-
- }
- placement="top"
- >
-
-
-);
+ placement="top"
+ >
+
+
+ );
+};
diff --git a/src/components/SmartList.tsx b/src/components/SmartList.tsx
index 159d541..dc87663 100644
--- a/src/components/SmartList.tsx
+++ b/src/components/SmartList.tsx
@@ -2,11 +2,11 @@ import { Fragment, useCallback, useEffect, useMemo, useState } from "react";
import { Chip } from "./Chip";
import { PageSelector } from "./Inputs/PageSelector";
import { Ico, Icon } from "./Ico";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { cJoin } from "helpers/className";
import { isDefined, isDefinedAndNotEmpty } from "helpers/others";
import { AnchorIds, useScrollTopOnChange } from "hooks/useScrollTopOnChange";
import { useIs3ColumnsLayout } from "hooks/useContainerQuery";
+import { useAppLayout } from "contexts/AppLayoutContext";
interface Group {
name: string;
@@ -46,7 +46,6 @@ interface Props {
sortingFunction?: (a: T, b: T) => number;
// Other
className?: string;
- langui: AppStaticProps["langui"];
}
export const SmartList = ({
@@ -67,10 +66,9 @@ export const SmartList = ({
filteringFunction = defaultFilteringFunction,
sortingFunction = defaultSortingFunction,
className,
- langui,
}: Props): JSX.Element => {
const [page, setPage] = useState(0);
-
+ const { langui } = useAppLayout();
useScrollTopOnChange(AnchorIds.ContentPanel, [page], paginationScroolTop);
useEffect(
() => setPage(0),
@@ -220,7 +218,7 @@ export const SmartList = ({
) : isDefined(RenderWhenEmpty) ? (
) : (
-
+
)}
@@ -241,12 +239,9 @@ export const SmartList = ({
* ───────────────────────────────────╯ PRIVATE COMPONENTS ╰──────────────────────────────────────
*/
-interface DefaultRenderWhenEmptyProps {
- langui: AppStaticProps["langui"];
-}
-
-const DefaultRenderWhenEmpty = ({ langui }: DefaultRenderWhenEmptyProps) => {
+const DefaultRenderWhenEmpty = () => {
const is3ColumnsLayout = useIs3ColumnsLayout();
+ const { langui } = useAppLayout();
return (
["data"][number]["attributes"]
>["categories"];
thumbnail?: UploadImageFragment | null | undefined;
- langui: AppStaticProps["langui"];
+
languageSwitcher?: JSX.Element;
}
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
export const ThumbnailHeader = ({
- langui,
pre_title,
title,
subtitle,
@@ -44,6 +43,7 @@ export const ThumbnailHeader = ({
languageSwitcher,
}: Props): JSX.Element => {
const [openLightBox, LightBox] = useLightBox();
+ const { langui } = useAppLayout();
return (
<>
@@ -106,9 +106,7 @@ export const ThumbnailHeader = ({
{languageSwitcher}
{description && (
-
- {}
-
+
{}
)}
>
);
diff --git a/src/components/Wiki/DefinitionCard.tsx b/src/components/Wiki/DefinitionCard.tsx
index 61261e6..00a3d4a 100644
--- a/src/components/Wiki/DefinitionCard.tsx
+++ b/src/components/Wiki/DefinitionCard.tsx
@@ -1,12 +1,12 @@
import { useCallback } from "react";
import { Chip } from "components/Chip";
import { ToolTip } from "components/ToolTip";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { getStatusDescription } from "helpers/others";
import { useSmartLanguage } from "hooks/useSmartLanguage";
import { Button } from "components/Inputs/Button";
import { useIsContentPanelNoMoreThan } from "hooks/useContainerQuery";
import { cIf, cJoin } from "helpers/className";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭─────────────╮
@@ -23,8 +23,6 @@ interface Props {
definition: string | null | undefined;
status: string | undefined;
}[];
- languages: AppStaticProps["languages"];
- langui: AppStaticProps["langui"];
index: number;
categories: string[];
}
@@ -34,16 +32,14 @@ interface Props {
const DefinitionCard = ({
source,
translations = [],
- languages,
- langui,
index,
categories,
}: Props): JSX.Element => {
const isContentPanelNoMoreThanMd = useIsContentPanelNoMoreThan("md");
+ const { langui } = useAppLayout();
const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: translations,
- languages: languages,
languageExtractor: useCallback(
(item: Props["translations"][number]) => item.language,
[]
diff --git a/src/contexts/AppLayoutContext.tsx b/src/contexts/AppLayoutContext.tsx
index 43d3e77..1850fcb 100644
--- a/src/contexts/AppLayoutContext.tsx
+++ b/src/contexts/AppLayoutContext.tsx
@@ -1,8 +1,20 @@
-import React, { ReactNode, useContext, useState } from "react";
+import React, {
+ ReactNode,
+ useContext,
+ useEffect,
+ useLayoutEffect,
+ useState,
+} from "react";
import { useLocalStorage } from "usehooks-ts";
-import { isDefined } from "helpers/others";
+import { useRouter } from "next/router";
+import { isDefined, isDefinedAndNotEmpty } from "helpers/others";
import { LibraryItemUserStatus, RequiredNonNullable } from "helpers/types";
import { useDarkMode } from "hooks/useDarkMode";
+import { Currencies, Languages, Langui } from "helpers/localData";
+import { useCurrencies, useLanguages, useLangui } from "hooks/useLocalData";
+import { getDefaultPreferredLanguages } from "helpers/locales";
+import { useOnResize } from "hooks/useOnResize";
+import { AnchorIds } from "hooks/useScrollTopOnChange";
interface AppLayoutState {
subPanelOpen: boolean;
@@ -77,19 +89,12 @@ interface AppLayoutState {
>;
screenWidth: number;
- setScreenWidth: React.Dispatch<
- React.SetStateAction
- >;
-
contentPanelWidth: number;
- setContentPanelWidth: React.Dispatch<
- React.SetStateAction
- >;
-
subPanelWidth: number;
- setSubPanelWidth: React.Dispatch<
- React.SetStateAction
- >;
+
+ langui: Langui;
+ languages: Languages;
+ currencies: Currencies;
}
const initialState: RequiredNonNullable = {
@@ -145,13 +150,12 @@ const initialState: RequiredNonNullable = {
setLibraryItemUserStatus: () => null,
screenWidth: 0,
- setScreenWidth: () => null,
-
contentPanelWidth: 0,
- setContentPanelWidth: () => null,
-
subPanelWidth: 0,
- setSubPanelWidth: () => null,
+
+ currencies: [],
+ languages: [],
+ langui: {},
};
const AppContext = React.createContext(initialState);
@@ -265,6 +269,55 @@ export const AppContextProvider = (props: Props): JSX.Element => {
const [contentPanelWidth, setContentPanelWidth] = useState(0);
const [subPanelWidth, setSubPanelWidth] = useState(0);
+ const langui = useLangui();
+ const languages = useLanguages();
+ const currencies = useCurrencies();
+
+ const router = useRouter();
+ useEffect(() => {
+ console.log("I'm in preferredLanguages update");
+ if (preferredLanguages.length === 0) {
+ if (isDefinedAndNotEmpty(router.locale) && router.locales) {
+ setPreferredLanguages(
+ getDefaultPreferredLanguages(router.locale, router.locales)
+ );
+ }
+ } else if (router.locale !== preferredLanguages[0]) {
+ console.log("I'm rerouting you");
+ router.replace(router.asPath, router.asPath, {
+ locale: preferredLanguages[0],
+ });
+ }
+ }, [
+ preferredLanguages,
+ router,
+ router.locale,
+ router.locales,
+ setPreferredLanguages,
+ ]);
+
+ useEffect(() => {
+ router.events.on("routeChangeStart", () => {
+ setConfigPanelOpen(false);
+ setMainPanelOpen(false);
+ setSubPanelOpen(false);
+ });
+
+ router.events.on("hashChangeStart", () => {
+ setSubPanelOpen(false);
+ });
+ }, [router.events, setConfigPanelOpen, setMainPanelOpen, setSubPanelOpen]);
+
+ useLayoutEffect(() => {
+ document.getElementsByTagName("html")[0].style.fontSize = `${
+ fontSize * 100
+ }%`;
+ }, [fontSize]);
+
+ useOnResize(AnchorIds.Body, (width) => setScreenWidth(width));
+ useOnResize(AnchorIds.ContentPanel, (width) => setContentPanelWidth(width));
+ useOnResize(AnchorIds.SubPanel, (width) => setSubPanelWidth(width));
+
return (
{
toggleMenuGestures,
toggleSelectedThemeMode,
toggleDyslexic,
- setContentPanelWidth,
- setScreenWidth,
- setSubPanelWidth,
+ languages,
+ langui,
+ currencies,
}}
>
{props.children}
diff --git a/src/graphql/fetchLocalData.ts b/src/graphql/fetchLocalData.ts
new file mode 100644
index 0000000..cf0ae3b
--- /dev/null
+++ b/src/graphql/fetchLocalData.ts
@@ -0,0 +1,42 @@
+/* eslint-disable import/no-nodejs-modules */
+import { resolve } from "path";
+import { readFileSync, writeFileSync } from "fs";
+import { config } from "dotenv";
+import { getReadySdk } from "./sdk";
+import { LocalDataGetWebsiteInterfacesQuery } from "./generated";
+import { processLangui, Langui } from "helpers/localData";
+
+config({ path: resolve(process.cwd(), ".env.local") });
+
+const LOCAL_DATA_FOLDER = `${process.cwd()}/public/local-data`;
+
+const writeLocalData = (name: LocalDataFile, localData: unknown) => {
+ const path = `${LOCAL_DATA_FOLDER}/${name}.json`;
+ writeFileSync(path, JSON.stringify(localData), { encoding: "utf-8" });
+};
+
+const readLocalData = (name: LocalDataFile): T => {
+ const path = `${LOCAL_DATA_FOLDER}/${name}.json`;
+ return JSON.parse(readFileSync(path, { encoding: "utf8" }));
+};
+
+const sdk = getReadySdk();
+
+(async () => {
+ writeLocalData(
+ "websiteInterfaces",
+ await sdk.localDataGetWebsiteInterfaces()
+ );
+ writeLocalData("currencies", await sdk.localDataGetCurrencies());
+ writeLocalData("languages", await sdk.localDataGetLanguages());
+})();
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
+export type LocalDataFile = "currencies" | "languages" | "websiteInterfaces";
+
+export const getLangui = (locale: string | undefined): Langui => {
+ const websiteInterfaces =
+ readLocalData("websiteInterfaces");
+ return processLangui(websiteInterfaces, locale);
+};
diff --git a/src/graphql/getAppStaticProps.ts b/src/graphql/getAppStaticProps.ts
deleted file mode 100644
index c73367c..0000000
--- a/src/graphql/getAppStaticProps.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { GetStaticPropsContext } from "next";
-import {
- GetCurrenciesQuery,
- GetLanguagesQuery,
- GetWebsiteInterfaceQuery,
-} from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-
-export type AppStaticProps = {
- langui: NonNullable<
- NonNullable<
- GetWebsiteInterfaceQuery["websiteInterfaces"]
- >["data"][number]["attributes"]
- >;
- currencies: NonNullable["data"];
- languages: NonNullable["data"];
-};
-
-export const getAppStaticProps = async (
- context: GetStaticPropsContext
-): Promise => {
- const sdk = getReadySdk();
- const { languages } = await sdk.getLanguages();
-
- if (languages?.data) {
- languages.data.sort((a, b) =>
- a.attributes && b.attributes
- ? a.attributes.localized_name.localeCompare(b.attributes.localized_name)
- : 0
- );
- }
-
- const { currencies } = await sdk.getCurrencies();
- if (currencies?.data) {
- currencies.data.sort((a, b) =>
- a.attributes && b.attributes
- ? a.attributes.code.localeCompare(b.attributes.code)
- : 0
- );
- }
-
- const langui = (
- await sdk.getWebsiteInterface({
- language_code: context.locale ?? "en",
- })
- ).websiteInterfaces?.data[0].attributes;
-
- const appStaticProps: AppStaticProps = {
- langui: langui ?? {},
- currencies: currencies?.data ?? [],
- languages: languages?.data ?? [],
- };
-
- return appStaticProps;
-};
diff --git a/src/graphql/getPostStaticProps.ts b/src/graphql/getPostStaticProps.ts
index c7b981a..9f26e4e 100644
--- a/src/graphql/getPostStaticProps.ts
+++ b/src/graphql/getPostStaticProps.ts
@@ -1,8 +1,8 @@
import { GetStaticProps } from "next";
-import { AppStaticProps, getAppStaticProps } from "./getAppStaticProps";
import { getReadySdk } from "./sdk";
+import { getLangui } from "./fetchLocalData";
import { PostWithTranslations } from "helpers/types";
-import { OpenGraph, getOpenGraph } from "helpers/openGraph";
+import { getOpenGraph } from "helpers/openGraph";
import { prettyDate, prettySlug } from "helpers/formatters";
import {
getDefaultPreferredLanguages,
@@ -10,16 +10,17 @@ import {
} from "helpers/locales";
import { filterHasAttributes, isDefined } from "helpers/others";
import { getDescription } from "helpers/description";
+import { AppLayoutRequired } from "components/AppLayout";
-export interface PostStaticProps extends AppStaticProps {
+export interface PostStaticProps extends AppLayoutRequired {
post: PostWithTranslations;
- openGraph: OpenGraph;
}
export const getPostStaticProps =
(slug: string): GetStaticProps =>
async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const post = await sdk.getPost({
slug: slug,
language_code: context.locale ?? "en",
@@ -31,7 +32,6 @@ export const getPostStaticProps =
isDefined(context.locale) &&
isDefined(context.locales)
) {
- const appStaticProps = await getAppStaticProps(context);
const selectedTranslation = staticSmartLanguage({
items: post.posts.data[0].attributes.translations,
languageExtractor: (item) => item.language?.data?.attributes?.code,
@@ -44,10 +44,10 @@ export const getPostStaticProps =
const title = selectedTranslation?.title ?? prettySlug(slug);
const description = getDescription(selectedTranslation?.excerpt, {
- [appStaticProps.langui.release_date ?? "Release date"]: [
+ [langui.release_date ?? "Release date"]: [
prettyDate(post.posts.data[0].attributes.date, context.locale),
],
- [appStaticProps.langui.categories ?? "Categories"]: filterHasAttributes(
+ [langui.categories ?? "Categories"]: filterHasAttributes(
post.posts.data[0].attributes.categories?.data,
["attributes"] as const
).map((category) => category.attributes.short),
@@ -58,14 +58,8 @@ export const getPostStaticProps =
post.posts.data[0].attributes.thumbnail?.data?.attributes;
const props: PostStaticProps = {
- ...appStaticProps,
post: post.posts.data[0].attributes as PostWithTranslations,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- title,
- description,
- thumbnail
- ),
+ openGraph: getOpenGraph(langui, title, description, thumbnail),
};
return {
props: props,
diff --git a/src/graphql/operations/devGetContents.graphql b/src/graphql/operations/dev/devGetContents.graphql
similarity index 100%
rename from src/graphql/operations/devGetContents.graphql
rename to src/graphql/operations/dev/devGetContents.graphql
diff --git a/src/graphql/operations/devGetLibraryItems.graphql b/src/graphql/operations/dev/devGetLibraryItems.graphql
similarity index 100%
rename from src/graphql/operations/devGetLibraryItems.graphql
rename to src/graphql/operations/dev/devGetLibraryItems.graphql
diff --git a/src/graphql/operations/getCurrencies.graphql b/src/graphql/operations/local-data/localDataGetCurrencies.graphql
similarity index 79%
rename from src/graphql/operations/getCurrencies.graphql
rename to src/graphql/operations/local-data/localDataGetCurrencies.graphql
index d34c90e..85efbee 100644
--- a/src/graphql/operations/getCurrencies.graphql
+++ b/src/graphql/operations/local-data/localDataGetCurrencies.graphql
@@ -1,4 +1,4 @@
-query getCurrencies {
+query localDataGetCurrencies {
currencies(pagination: { limit: -1 }) {
data {
id
diff --git a/src/graphql/operations/getLanguages.graphql b/src/graphql/operations/local-data/localDataGetLanguages.graphql
similarity index 78%
rename from src/graphql/operations/getLanguages.graphql
rename to src/graphql/operations/local-data/localDataGetLanguages.graphql
index bc820ff..764a8f8 100644
--- a/src/graphql/operations/getLanguages.graphql
+++ b/src/graphql/operations/local-data/localDataGetLanguages.graphql
@@ -1,4 +1,4 @@
-query getLanguages {
+query localDataGetLanguages {
languages(pagination: { limit: -1 }) {
data {
id
diff --git a/src/graphql/operations/getWebsiteInterface.graphql b/src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql
similarity index 89%
rename from src/graphql/operations/getWebsiteInterface.graphql
rename to src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql
index a144264..711e8cd 100644
--- a/src/graphql/operations/getWebsiteInterface.graphql
+++ b/src/graphql/operations/local-data/localDataGetWebsiteInterfaces.graphql
@@ -1,9 +1,14 @@
-query getWebsiteInterface($language_code: String) {
- websiteInterfaces(
- filters: { ui_language: { code: { eq: $language_code } } }
- ) {
+query localDataGetWebsiteInterfaces {
+ websiteInterfaces(pagination: { limit: -1 }) {
data {
attributes {
+ ui_language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
library
contents
wiki
diff --git a/src/helpers/formatters.ts b/src/helpers/formatters.ts
index 3bbf1f1..01006f1 100644
--- a/src/helpers/formatters.ts
+++ b/src/helpers/formatters.ts
@@ -1,7 +1,7 @@
-import { AppStaticProps } from "../graphql/getAppStaticProps";
import { convertPrice } from "./numbers";
import { isDefinedAndNotEmpty, isUndefined } from "./others";
import { datePickerToDate } from "./date";
+import { Currencies, Languages, Langui } from "./localData";
import { DatePickerFragment, PricePickerFragment } from "graphql/generated";
export const prettyDate = (
@@ -12,7 +12,7 @@ export const prettyDate = (
export const prettyPrice = (
pricePicker: PricePickerFragment,
- currencies: AppStaticProps["currencies"],
+ currencies: Currencies,
targetCurrencyCode?: string
): string => {
if (!targetCurrencyCode) return "";
@@ -58,10 +58,7 @@ export const prettyInlineTitle = (
return result;
};
-export const prettyItemType = (
- metadata: any,
- langui: AppStaticProps["langui"]
-): string => {
+export const prettyItemType = (metadata: any, langui: Langui): string => {
switch (metadata.__typename) {
case "ComponentMetadataAudio":
return langui.audio ?? "Audio";
@@ -244,7 +241,7 @@ export const prettyDuration = (seconds: number): string => {
export const prettyLanguage = (
code: string,
- languages: AppStaticProps["languages"]
+ languages: Languages
): string => {
let result = code;
languages.forEach((language) => {
diff --git a/src/helpers/localData.ts b/src/helpers/localData.ts
new file mode 100644
index 0000000..7115b8c
--- /dev/null
+++ b/src/helpers/localData.ts
@@ -0,0 +1,58 @@
+import {
+ LocalDataGetCurrenciesQuery,
+ LocalDataGetLanguagesQuery,
+ LocalDataGetWebsiteInterfacesQuery,
+} from "graphql/generated";
+
+export type Langui = NonNullable<
+ NonNullable<
+ LocalDataGetWebsiteInterfacesQuery["websiteInterfaces"]
+ >["data"][number]["attributes"]
+>;
+
+export const processLangui = (
+ websiteInterfaces: LocalDataGetWebsiteInterfacesQuery | undefined,
+ locale: string | undefined
+): Langui =>
+ websiteInterfaces?.websiteInterfaces?.data.find(
+ (langui) =>
+ langui.attributes?.ui_language?.data?.attributes?.code === locale
+ )?.attributes ?? {};
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
+export type Currencies = NonNullable<
+ LocalDataGetCurrenciesQuery["currencies"]
+>["data"];
+
+export const processCurrencies = (
+ currencies: LocalDataGetCurrenciesQuery | undefined
+): Currencies => {
+ if (currencies?.currencies?.data) {
+ currencies.currencies.data.sort((a, b) =>
+ a.attributes && b.attributes
+ ? a.attributes.code.localeCompare(b.attributes.code)
+ : 0
+ );
+ }
+ return currencies?.currencies?.data ?? [];
+};
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
+export type Languages = NonNullable<
+ LocalDataGetLanguagesQuery["languages"]
+>["data"];
+
+export const processLanguages = (
+ languages: LocalDataGetLanguagesQuery | undefined
+): Languages => {
+ if (languages?.languages?.data) {
+ languages.languages.data.sort((a, b) =>
+ a.attributes && b.attributes
+ ? a.attributes.localized_name.localeCompare(b.attributes.localized_name)
+ : 0
+ );
+ }
+ return languages?.languages?.data ?? [];
+};
diff --git a/src/helpers/numbers.ts b/src/helpers/numbers.ts
index 740bf0b..35c87f7 100644
--- a/src/helpers/numbers.ts
+++ b/src/helpers/numbers.ts
@@ -1,8 +1,9 @@
-import { GetCurrenciesQuery, PricePickerFragment } from "graphql/generated";
+import { Currencies } from "./localData";
+import { PricePickerFragment } from "graphql/generated";
export const convertPrice = (
pricePicker: PricePickerFragment,
- targetCurrency: NonNullable["data"][number]
+ targetCurrency: Currencies[number]
): number => {
if (
pricePicker.amount &&
diff --git a/src/helpers/openGraph.ts b/src/helpers/openGraph.ts
index 62b3502..b7236e2 100644
--- a/src/helpers/openGraph.ts
+++ b/src/helpers/openGraph.ts
@@ -5,8 +5,8 @@ import {
getAssetURL,
} from "./img";
import { isDefinedAndNotEmpty } from "./others";
+import { Langui } from "./localData";
import { UploadImageFragment } from "graphql/generated";
-import { AppStaticProps } from "graphql/getAppStaticProps";
const DEFAULT_OG_THUMBNAIL = {
image: `${process.env.NEXT_PUBLIC_URL_SELF}/default_og.jpg`,
@@ -25,7 +25,7 @@ export interface OpenGraph {
}
export const getOpenGraph = (
- langui: AppStaticProps["langui"],
+ langui: Langui,
title?: string | null | undefined,
description?: string | null | undefined,
thumbnail?: UploadImageFragment | null | undefined
diff --git a/src/helpers/others.ts b/src/helpers/others.ts
index d128d66..96996b0 100644
--- a/src/helpers/others.ts
+++ b/src/helpers/others.ts
@@ -1,5 +1,5 @@
-import { AppStaticProps } from "../graphql/getAppStaticProps";
import { PathDot, SelectiveNonNullable } from "./types/SelectiveNonNullable";
+import { Langui } from "./localData";
import {
Enum_Componentsetstextset_Status,
GetLibraryItemQuery,
@@ -35,7 +35,7 @@ export const sortRangedContent = (contents: SortRangedContentProps): void => {
export const getStatusDescription = (
status: string,
- langui: AppStaticProps["langui"]
+ langui: Langui
): string | null | undefined => {
switch (status) {
case Enum_Componentsetstextset_Status.Incomplete:
@@ -118,7 +118,11 @@ export const mapMoveEntry = (
targetIndex: number
): Map => new Map(arrayMove([...map], sourceIndex, targetIndex));
-const arrayMove = (arr: T[], sourceIndex: number, targetIndex: number) => {
+export const arrayMove = (
+ arr: T[],
+ sourceIndex: number,
+ targetIndex: number
+): T[] => {
arr.splice(targetIndex, 0, arr.splice(sourceIndex, 1)[0]);
return arr;
};
diff --git a/src/hooks/useLocalData.ts b/src/hooks/useLocalData.ts
new file mode 100644
index 0000000..fd3a39e
--- /dev/null
+++ b/src/hooks/useLocalData.ts
@@ -0,0 +1,35 @@
+import { useFetch } from "usehooks-ts";
+import { useRouter } from "next/router";
+import { useMemo } from "react";
+import { LocalDataGetWebsiteInterfacesQuery } from "graphql/generated";
+import {
+ Currencies,
+ Languages,
+ Langui,
+ processCurrencies,
+ processLanguages,
+ processLangui,
+} from "helpers/localData";
+import { LocalDataFile } from "graphql/fetchLocalData";
+
+const useFetchLocalData = (name: LocalDataFile) =>
+ useFetch(`/local-data/${name}.json`);
+
+export const useLangui = (): Langui => {
+ const { locale } = useRouter();
+ const { data: websiteInterfaces } = useFetchLocalData("websiteInterfaces");
+ return useMemo(
+ () => processLangui(websiteInterfaces, locale),
+ [websiteInterfaces, locale]
+ );
+};
+
+export const useCurrencies = (): Currencies => {
+ const { data: currencies } = useFetchLocalData("currencies");
+ return useMemo(() => processCurrencies(currencies), [currencies]);
+};
+
+export const useLanguages = (): Languages => {
+ const { data: languages } = useFetchLocalData("languages");
+ return useMemo(() => processLanguages(languages), [languages]);
+};
diff --git a/src/hooks/useSmartLanguage.ts b/src/hooks/useSmartLanguage.ts
index f367dfc..327e2c9 100644
--- a/src/hooks/useSmartLanguage.ts
+++ b/src/hooks/useSmartLanguage.ts
@@ -1,14 +1,13 @@
import { useRouter } from "next/router";
import { useEffect, useMemo, useState } from "react";
+import { useLanguages } from "./useLocalData";
import { LanguageSwitcher } from "components/Inputs/LanguageSwitcher";
import { useAppLayout } from "contexts/AppLayoutContext";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import { filterDefined, isDefined } from "helpers/others";
import { getPreferredLanguage } from "helpers/locales";
interface Props {
items: T[];
- languages?: AppStaticProps["languages"];
languageExtractor: (item: NonNullable) => string | undefined;
transform?: (item: NonNullable) => NonNullable;
}
@@ -16,7 +15,6 @@ interface Props {
export const useSmartLanguage = ({
items,
languageExtractor,
- languages = [],
transform = (item) => item,
}: Props): [
T | undefined,
@@ -24,6 +22,7 @@ export const useSmartLanguage = ({
Parameters[0]
] => {
const { preferredLanguages } = useAppLayout();
+ const languages = useLanguages();
const router = useRouter();
const availableLocales = useMemo(() => {
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index d49f52b..41bbeb5 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -2,30 +2,25 @@ import { GetStaticProps } from "next";
import { AppLayout, AppLayoutRequired } from "components/AppLayout";
import { ReturnButton } from "components/PanelComponents/ReturnButton";
import { ContentPanel } from "components/Panels/ContentPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getOpenGraph } from "helpers/openGraph";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {}
+interface Props extends AppLayoutRequired {}
-const FourOhFour = ({
- langui,
- openGraph,
- ...otherProps
-}: Props): JSX.Element => (
+const FourOhFour = ({ openGraph, ...otherProps }: Props): JSX.Element => (
{openGraph.title}
-
+
}
openGraph={openGraph}
- langui={langui}
{...otherProps}
/>
);
@@ -36,14 +31,10 @@ export default FourOhFour;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- `404 - ${appStaticProps.langui.page_not_found}`
- ),
+ openGraph: getOpenGraph(langui, `404 - ${langui.page_not_found}`),
};
return {
props: props,
diff --git a/src/pages/500.tsx b/src/pages/500.tsx
index 9121fd3..8e44873 100644
--- a/src/pages/500.tsx
+++ b/src/pages/500.tsx
@@ -2,30 +2,25 @@ import { GetStaticProps } from "next";
import { AppLayout, AppLayoutRequired } from "components/AppLayout";
import { ReturnButton } from "components/PanelComponents/ReturnButton";
import { ContentPanel } from "components/Panels/ContentPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getOpenGraph } from "helpers/openGraph";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {}
+interface Props extends AppLayoutRequired {}
-const FiveHundred = ({
- langui,
- openGraph,
- ...otherProps
-}: Props): JSX.Element => (
+const FiveHundred = ({ openGraph, ...otherProps }: Props): JSX.Element => (
{openGraph.title}
-
+
}
openGraph={openGraph}
- langui={langui}
{...otherProps}
/>
);
@@ -36,14 +31,10 @@ export default FiveHundred;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- "500 - Internal Server Error"
- ),
+ openGraph: getOpenGraph(langui, "500 - Internal Server Error"),
};
return {
props: props,
diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx
index ba9c8cd..2f8688c 100644
--- a/src/pages/about-us/accords-handbook.tsx
+++ b/src/pages/about-us/accords-handbook.tsx
@@ -3,21 +3,25 @@ import {
getPostStaticProps,
PostStaticProps,
} from "graphql/getPostStaticProps";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-const AccordsHandbook = (props: PostStaticProps): JSX.Element => (
-
-);
+const AccordsHandbook = (props: PostStaticProps): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
+
+ );
+};
export default AccordsHandbook;
/*
diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx
index bfb2dc1..fc263de 100644
--- a/src/pages/about-us/contact.tsx
+++ b/src/pages/about-us/contact.tsx
@@ -10,14 +10,16 @@ import { cIf, cJoin } from "helpers/className";
import { randomInt } from "helpers/numbers";
import { RequestMailProps, ResponseMailProps } from "pages/api/mail";
import { useIs1ColumnLayout } from "hooks/useContainerQuery";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-const AboutUs = ({ langui, ...otherProps }: PostStaticProps): JSX.Element => {
+const AboutUs = (props: PostStaticProps): JSX.Element => {
const router = useRouter();
+ const { langui } = useAppLayout();
const is1ColumnLayout = useIs1ColumnLayout();
const [formResponse, setFormResponse] = useState("");
const [formState, setFormState] = useState<"completed" | "ongoing" | "stale">(
@@ -174,8 +176,7 @@ const AboutUs = ({ langui, ...otherProps }: PostStaticProps): JSX.Element => {
return (
(
-
-
+const AboutUs = (props: Props): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
+
+
-
+
-
-
-
-
-
- }
- langui={langui}
- {...otherProps}
- />
-);
+
+
+
+
+
+ }
+ {...props}
+ />
+ );
+};
export default AboutUs;
/*
@@ -52,14 +59,10 @@ export default AboutUs;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.about_us ?? "About us"
- ),
+ openGraph: getOpenGraph(langui, langui.about_us ?? "About us"),
};
return {
props: props,
diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx
index 1e8d8b2..c6d4ed7 100644
--- a/src/pages/about-us/legality.tsx
+++ b/src/pages/about-us/legality.tsx
@@ -3,21 +3,25 @@ import {
getPostStaticProps,
PostStaticProps,
} from "graphql/getPostStaticProps";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-const Legality = (props: PostStaticProps): JSX.Element => (
-
-);
+const Legality = (props: PostStaticProps): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
+
+ );
+};
export default Legality;
/*
diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx
index 29e22ef..56ba2e5 100644
--- a/src/pages/about-us/sharing-policy.tsx
+++ b/src/pages/about-us/sharing-policy.tsx
@@ -3,21 +3,25 @@ import {
getPostStaticProps,
PostStaticProps,
} from "graphql/getPostStaticProps";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-const SharingPolicy = (props: PostStaticProps): JSX.Element => (
-
-);
+const SharingPolicy = (props: PostStaticProps): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
+
+ );
+};
export default SharingPolicy;
/*
diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx
index a06a6f1..dc3b785 100644
--- a/src/pages/archives/index.tsx
+++ b/src/pages/archives/index.tsx
@@ -4,19 +4,21 @@ import { AppLayout, AppLayoutRequired } from "components/AppLayout";
import { NavOption } from "components/PanelComponents/NavOption";
import { PanelHeader } from "components/PanelComponents/PanelHeader";
import { SubPanel } from "components/Panels/SubPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { Icon } from "components/Ico";
import { getOpenGraph } from "helpers/openGraph";
import { HorizontalLine } from "components/HorizontalLine";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {}
+interface Props extends AppLayoutRequired {}
-const Archives = ({ langui, ...otherProps }: Props): JSX.Element => {
+const Archives = (props: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const subPanel = useMemo(
() => (
@@ -31,7 +33,7 @@ const Archives = ({ langui, ...otherProps }: Props): JSX.Element => {
),
[langui]
);
- return ;
+ return ;
};
export default Archives;
@@ -40,14 +42,10 @@ export default Archives;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.archives ?? "Archives"
- ),
+ openGraph: getOpenGraph(langui, langui.archives ?? "Archives"),
};
return {
props: props,
diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx
index c5363d0..bea29dc 100644
--- a/src/pages/archives/videos/c/[uid].tsx
+++ b/src/pages/archives/videos/c/[uid].tsx
@@ -12,7 +12,6 @@ import {
import { SubPanel } from "components/Panels/SubPanel";
import { PreviewCard } from "components/PreviewCard";
import { GetVideoChannelQuery } from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { getVideoThumbnailURL } from "helpers/videos";
import { Icon } from "components/Ico";
@@ -26,6 +25,8 @@ import { SmartList } from "components/SmartList";
import { cIf } from "helpers/className";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
import { TextInput } from "components/Inputs/TextInput";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -41,15 +42,16 @@ const DEFAULT_FILTERS_STATE = {
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
channel: NonNullable<
GetVideoChannelQuery["videoChannels"]
>["data"][number]["attributes"];
}
-const Channel = ({ langui, channel, ...otherProps }: Props): JSX.Element => {
+const Channel = ({ channel, ...otherProps }: Props): JSX.Element => {
const { value: keepInfoVisible, toggle: toggleKeepInfoVisible } =
useBoolean(true);
+ const { langui } = useAppLayout();
const hoverable = useDeviceSupportsHover();
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
@@ -63,7 +65,6 @@ const Channel = ({ langui, channel, ...otherProps }: Props): JSX.Element => {
@@ -122,7 +123,6 @@ const Channel = ({ langui, channel, ...otherProps }: Props): JSX.Element => {
}}
/>
)}
- langui={langui}
className={cIf(
isContentPanelAtLeast4xl,
"grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
@@ -140,7 +140,6 @@ const Channel = ({ langui, channel, ...otherProps }: Props): JSX.Element => {
channel?.videos?.data,
isContentPanelAtLeast4xl,
keepInfoVisible,
- langui,
searchName,
]
);
@@ -149,7 +148,6 @@ const Channel = ({ langui, channel, ...otherProps }: Props): JSX.Element => {
);
@@ -163,6 +161,7 @@ export default Channel;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const channel = await sdk.getVideoChannel({
channel:
context.params && isDefined(context.params.uid)
@@ -177,12 +176,10 @@ export const getStaticProps: GetStaticProps = async (context) => {
)
.reverse();
- const appStaticProps = await getAppStaticProps(context);
const props: Props = {
- ...appStaticProps,
channel: channel.videoChannels.data[0].attributes,
openGraph: getOpenGraph(
- appStaticProps.langui,
+ langui,
channel.videoChannels.data[0].attributes.title
),
};
diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx
index 6e07b27..be9563c 100644
--- a/src/pages/archives/videos/index.tsx
+++ b/src/pages/archives/videos/index.tsx
@@ -16,7 +16,6 @@ import {
import { SubPanel } from "components/Panels/SubPanel";
import { PreviewCard } from "components/PreviewCard";
import { GetVideosPreviewQuery } from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { filterHasAttributes } from "helpers/others";
import { getVideoThumbnailURL } from "helpers/videos";
@@ -26,6 +25,8 @@ import { compareDate } from "helpers/date";
import { HorizontalLine } from "components/HorizontalLine";
import { cIf } from "helpers/className";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -41,11 +42,12 @@ const DEFAULT_FILTERS_STATE = {
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
videos: NonNullable["data"];
}
-const Videos = ({ langui, videos, ...otherProps }: Props): JSX.Element => {
+const Videos = ({ videos, ...otherProps }: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const hoverable = useDeviceSupportsHover();
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
@@ -62,7 +64,6 @@ const Videos = ({ langui, videos, ...otherProps }: Props): JSX.Element => {
@@ -118,7 +119,6 @@ const Videos = ({ langui, videos, ...otherProps }: Props): JSX.Element => {
}}
/>
)}
- langui={langui}
className={cIf(
isContentPanelAtLeast4xl,
"grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
@@ -130,13 +130,12 @@ const Videos = ({ langui, videos, ...otherProps }: Props): JSX.Element => {
/>
),
- [isContentPanelAtLeast4xl, keepInfoVisible, langui, searchName, videos]
+ [isContentPanelAtLeast4xl, keepInfoVisible, searchName, videos]
);
return (
);
@@ -150,6 +149,7 @@ export default Videos;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const videos = await sdk.getVideosPreview();
if (!videos.videos) return { notFound: true };
videos.videos.data
@@ -157,14 +157,10 @@ export const getStaticProps: GetStaticProps = async (context) => {
compareDate(a.attributes?.published_date, b.attributes?.published_date)
)
.reverse();
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
videos: videos.videos.data,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.videos ?? "Videos"
- ),
+ openGraph: getOpenGraph(langui, langui.videos ?? "Videos"),
};
return {
props: props,
diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx
index 0c68176..9c70765 100644
--- a/src/pages/archives/videos/v/[uid].tsx
+++ b/src/pages/archives/videos/v/[uid].tsx
@@ -15,28 +15,28 @@ import {
import { SubPanel } from "components/Panels/SubPanel";
import { useAppLayout } from "contexts/AppLayoutContext";
import { GetVideoQuery } from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { prettyDate, prettyShortenNumber } from "helpers/formatters";
import { filterHasAttributes, isDefined } from "helpers/others";
import { getVideoFile } from "helpers/videos";
import { getOpenGraph } from "helpers/openGraph";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
video: NonNullable<
NonNullable["data"][number]["attributes"]
>;
}
-const Video = ({ langui, video, ...otherProps }: Props): JSX.Element => {
+const Video = ({ video, ...otherProps }: Props): JSX.Element => {
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
- const { setSubPanelOpen } = useAppLayout();
+ const { setSubPanelOpen, langui } = useAppLayout();
const router = useRouter();
const subPanel = useMemo(
@@ -45,7 +45,6 @@ const Video = ({ langui, video, ...otherProps }: Props): JSX.Element => {
@@ -82,7 +81,6 @@ const Video = ({ langui, video, ...otherProps }: Props): JSX.Element => {
@@ -201,7 +199,6 @@ const Video = ({ langui, video, ...otherProps }: Props): JSX.Element => {
);
@@ -215,6 +212,7 @@ export default Video;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const videos = await sdk.getVideo({
uid:
context.params && isDefined(context.params.uid)
@@ -222,14 +220,10 @@ export const getStaticProps: GetStaticProps = async (context) => {
: "",
});
if (!videos.videos?.data[0]?.attributes) return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
video: videos.videos.data[0].attributes,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- videos.videos.data[0].attributes.title
- ),
+ openGraph: getOpenGraph(langui, videos.videos.data[0].attributes.title),
};
return {
props: props,
diff --git a/src/pages/chronicles/[slug]/index.tsx b/src/pages/chronicles/[slug]/index.tsx
index d16bb13..5cfa6a6 100644
--- a/src/pages/chronicles/[slug]/index.tsx
+++ b/src/pages/chronicles/[slug]/index.tsx
@@ -1,6 +1,5 @@
import { GetStaticProps, GetStaticPaths, GetStaticPathsResult } from "next";
import { useCallback, useMemo } from "react";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { isDefined, filterHasAttributes } from "helpers/others";
import { ChronicleWithTranslations } from "helpers/types";
@@ -22,13 +21,15 @@ import {
} from "helpers/locales";
import { getDescription } from "helpers/description";
import { TranslatedChroniclesList } from "components/Chronicles/ChroniclesList";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
chronicle: ChronicleWithTranslations;
chapters: NonNullable<
GetChroniclesChaptersQuery["chroniclesChapters"]
@@ -38,14 +39,12 @@ interface Props extends AppStaticProps, AppLayoutRequired {
const Chronicle = ({
chronicle,
chapters,
- langui,
- languages,
...otherProps
}: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: chronicle.translations,
- languages: languages,
languageExtractor: useCallback(
(item: ChronicleWithTranslations["translations"][number]) =>
item?.language?.data?.attributes?.code,
@@ -71,7 +70,6 @@ const Chronicle = ({
ContentLanguageSwitcherProps,
] = useSmartLanguage({
items: primaryContent?.translations ?? [],
- languages: languages,
languageExtractor: useCallback(
(
item: NonNullable<
@@ -93,7 +91,6 @@ const Chronicle = ({
displayOnlyOn={"1ColumnLayout"}
href="/chronicles"
title={langui.chronicles}
- langui={langui}
className="mb-10"
/>
@@ -108,7 +105,7 @@ const Chronicle = ({
)}
{isDefined(selectedTranslation.body) && (
-
+
)}
>
) : (
@@ -130,16 +127,12 @@ const Chronicle = ({
type={primaryContent?.type}
description={selectedContentTranslation.description}
thumbnail={primaryContent?.thumbnail?.data?.attributes}
- langui={langui}
/>
{selectedContentTranslation.text_set?.text && (
<>
-
+
>
)}
>
@@ -169,7 +162,6 @@ const Chronicle = ({
displayOnlyOn={"3ColumnsLayout"}
href="/chronicles"
title={langui.chronicles}
- langui={langui}
/>
@@ -202,8 +194,6 @@ const Chronicle = ({
@@ -218,6 +208,7 @@ export default Chronicle;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const slug =
context.params && isDefined(context.params.slug)
? context.params.slug.toString()
@@ -232,7 +223,6 @@ export const getStaticProps: GetStaticProps = async (context) => {
!chronicles.chroniclesChapters?.data
)
return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
const { title, description } = (() => {
if (context.locale && context.locales) {
@@ -260,16 +250,15 @@ export const getStaticProps: GetStaticProps = async (context) => {
description: getDescription(
selectedContentTranslation.description,
{
- [appStaticProps.langui.type ?? "Type"]: [
+ [langui.type ?? "Type"]: [
chronicle.chronicles.data[0].attributes.contents.data[0]
.attributes.type?.data?.attributes?.titles?.[0]?.title,
],
- [appStaticProps.langui.categories ?? "Categories"]:
- filterHasAttributes(
- chronicle.chronicles.data[0].attributes.contents.data[0]
- .attributes.categories?.data,
- ["attributes"] as const
- ).map((category) => category.attributes.short),
+ [langui.categories ?? "Categories"]: filterHasAttributes(
+ chronicle.chronicles.data[0].attributes.contents.data[0]
+ .attributes.categories?.data,
+ ["attributes"] as const
+ ).map((category) => category.attributes.short),
}
),
};
@@ -304,16 +293,10 @@ export const getStaticProps: GetStaticProps = async (context) => {
: undefined;
const props: Props = {
- ...appStaticProps,
chronicle: chronicle.chronicles.data[0]
.attributes as ChronicleWithTranslations,
chapters: chronicles.chroniclesChapters.data,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- title,
- description,
- thumbnail
- ),
+ openGraph: getOpenGraph(langui, title, description, thumbnail),
};
return {
props: props,
diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx
index ca1080a..c1e604a 100644
--- a/src/pages/chronicles/index.tsx
+++ b/src/pages/chronicles/index.tsx
@@ -3,7 +3,6 @@ import { useMemo } from "react";
import { AppLayout, AppLayoutRequired } from "components/AppLayout";
import { PanelHeader } from "components/PanelComponents/PanelHeader";
import { SubPanel } from "components/Panels/SubPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { Icon } from "components/Ico";
import { getReadySdk } from "graphql/sdk";
import { GetChroniclesChaptersQuery } from "graphql/generated";
@@ -12,23 +11,22 @@ import { prettySlug } from "helpers/formatters";
import { getOpenGraph } from "helpers/openGraph";
import { TranslatedChroniclesList } from "components/Chronicles/ChroniclesList";
import { HorizontalLine } from "components/HorizontalLine";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
chapters: NonNullable<
GetChroniclesChaptersQuery["chroniclesChapters"]
>["data"];
}
-const Chronicles = ({
- langui,
- chapters,
- ...otherProps
-}: Props): JSX.Element => {
+const Chronicles = ({ chapters, ...otherProps }: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const subPanel = useMemo(
() => (
@@ -63,7 +61,7 @@ const Chronicles = ({
[chapters, langui]
);
- return ;
+ return ;
};
export default Chronicles;
@@ -74,16 +72,13 @@ export default Chronicles;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const chronicles = await sdk.getChroniclesChapters();
if (!chronicles.chroniclesChapters?.data) return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
chapters: chronicles.chroniclesChapters.data,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.chronicles ?? "Chronicles"
- ),
+ openGraph: getOpenGraph(langui, langui.chronicles ?? "Chronicles"),
};
return {
props: props,
diff --git a/src/pages/contents/[slug].tsx b/src/pages/contents/[slug].tsx
index 19baa42..8f30ebf 100644
--- a/src/pages/contents/[slug].tsx
+++ b/src/pages/contents/[slug].tsx
@@ -12,7 +12,6 @@ import { PreviewCard } from "components/PreviewCard";
import { RecorderChip } from "components/RecorderChip";
import { ThumbnailHeader } from "components/ThumbnailHeader";
import { ToolTip } from "components/ToolTip";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import {
prettyInlineTitle,
@@ -41,30 +40,26 @@ import {
useIsContentPanelAtLeast,
} from "hooks/useContainerQuery";
import { cIf } from "helpers/className";
+import { getLangui } from "graphql/fetchLocalData";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
content: ContentWithTranslations;
}
-const Content = ({
- langui,
- content,
- languages,
- currencies,
- ...otherProps
-}: Props): JSX.Element => {
+const Content = ({ content, ...otherProps }: Props): JSX.Element => {
const isContentPanelAtLeast2xl = useIsContentPanelAtLeast("2xl");
const is1ColumnLayout = useIs1ColumnLayout();
+ const { langui, languages } = useAppLayout();
const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: content.translations,
- languages: languages,
languageExtractor: useCallback(
(item: NonNullable) =>
item.language?.data?.attributes?.code,
@@ -182,10 +177,7 @@ const Content = ({
["attributes", "id"] as const
).map((recorder) => (
-
+
))}
@@ -204,10 +196,7 @@ const Content = ({
["attributes", "id"] as const
).map((recorder) => (
-
+
))}
@@ -226,10 +215,7 @@ const Content = ({
["attributes", "id"] as const
).map((recorder) => (
-
+
))}
@@ -240,10 +226,7 @@ const Content = ({
)}
@@ -260,7 +243,6 @@ const Content = ({
selectedTranslation.title,
selectedTranslation.subtitle
)}
- langui={langui}
horizontalLine
/>
>
@@ -311,7 +293,6 @@ const Content = ({
["attributes"] as const
).map((category) => category.attributes.short)}
metadata={{
- currencies: currencies,
releaseDate: libraryItem.attributes.release_date,
price: libraryItem.attributes.price,
position: "Bottom",
@@ -319,12 +300,7 @@ const Content = ({
infoAppend={
!isUntangibleGroupItem(
libraryItem.attributes.metadata?.[0]
- ) && (
-
- )
+ ) &&
}
/>
@@ -338,7 +314,6 @@ const Content = ({
),
[
content.ranged_contents?.data,
- currencies,
languages,
langui,
returnButtonProps,
@@ -365,7 +340,6 @@ const Content = ({
description={selectedTranslation?.description}
type={content.type}
categories={content.categories}
- langui={langui}
languageSwitcher={
languageSwitcherProps.locales.size > 1 ? (
@@ -425,10 +399,7 @@ const Content = ({
{selectedTranslation?.text_set?.text && (
<>
-
+
>
)}
@@ -501,9 +472,6 @@ const Content = ({
);
@@ -517,6 +485,7 @@ export default Content;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const slug = context.params?.slug ? context.params.slug.toString() : "";
const content = await sdk.getContentText({
slug: slug,
@@ -526,7 +495,6 @@ export const getStaticProps: GetStaticProps = async (context) => {
if (!content.contents?.data[0]?.attributes?.translations) {
return { notFound: true };
}
- const appStaticProps = await getAppStaticProps(context);
const { title, description } = (() => {
if (context.locale && context.locales) {
@@ -546,15 +514,14 @@ export const getStaticProps: GetStaticProps = async (context) => {
selectedTranslation.subtitle
),
description: getDescription(selectedTranslation.description, {
- [appStaticProps.langui.type ?? "Type"]: [
+ [langui.type ?? "Type"]: [
content.contents.data[0].attributes.type?.data?.attributes
?.titles?.[0]?.title,
],
- [appStaticProps.langui.categories ?? "Categories"]:
- filterHasAttributes(
- content.contents.data[0].attributes.categories?.data,
- ["attributes"] as const
- ).map((category) => category.attributes.short),
+ [langui.categories ?? "Categories"]: filterHasAttributes(
+ content.contents.data[0].attributes.categories?.data,
+ ["attributes"] as const
+ ).map((category) => category.attributes.short),
}),
};
}
@@ -569,14 +536,8 @@ export const getStaticProps: GetStaticProps = async (context) => {
content.contents.data[0].attributes.thumbnail?.data?.attributes;
const props: Props = {
- ...appStaticProps,
content: content.contents.data[0].attributes as ContentWithTranslations,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- title,
- description,
- thumbnail
- ),
+ openGraph: getOpenGraph(langui, title, description, thumbnail),
};
return {
props: props,
diff --git a/src/pages/contents/all.tsx b/src/pages/contents/all.tsx
index 46e9dcb..1ee0bfc 100644
--- a/src/pages/contents/all.tsx
+++ b/src/pages/contents/all.tsx
@@ -10,7 +10,6 @@ import {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import { SubPanel } from "components/Panels/SubPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { prettyInlineTitle, prettySlug } from "helpers/formatters";
import { TextInput } from "components/Inputs/TextInput";
@@ -27,6 +26,8 @@ import { HorizontalLine } from "components/HorizontalLine";
import { TranslatedPreviewCard } from "components/PreviewCard";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
import { cJoin, cIf } from "helpers/className";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -44,17 +45,13 @@ const DEFAULT_FILTERS_STATE = {
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
contents: NonNullable["data"];
}
-const Contents = ({
- langui,
- contents,
- languages,
- ...otherProps
-}: Props): JSX.Element => {
+const Contents = ({ contents, ...otherProps }: Props): JSX.Element => {
const hoverable = useDeviceSupportsHover();
+ const { langui } = useAppLayout();
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
const [groupingMethod, setGroupingMethod] = useState(
@@ -142,6 +139,7 @@ const Contents = ({
@@ -262,7 +260,6 @@ const Contents = ({
.join(" ")}`
}
paginationItemPerPage={50}
- langui={langui}
/>
),
@@ -272,7 +269,6 @@ const Contents = ({
filteringFunction,
groupingFunction,
keepInfoVisible,
- langui,
searchName,
]
);
@@ -282,8 +278,6 @@ const Contents = ({
subPanel={subPanel}
contentPanel={contentPanel}
subPanelIcon={Icon.Search}
- languages={languages}
- langui={langui}
{...otherProps}
/>
);
@@ -297,6 +291,7 @@ export default Contents;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const contents = await sdk.getContents({
language_code: context.locale ?? "en",
});
@@ -307,14 +302,9 @@ export const getStaticProps: GetStaticProps = async (context) => {
return titleA.localeCompare(titleB);
});
- const appStaticProps = await getAppStaticProps(context);
const props: Props = {
- ...appStaticProps,
contents: contents.contents.data,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.contents ?? "Contents"
- ),
+ openGraph: getOpenGraph(langui, langui.contents ?? "Contents"),
};
return {
props: props,
diff --git a/src/pages/contents/folder/[slug].tsx b/src/pages/contents/folder/[slug].tsx
index 3e92904..2bd3b93 100644
--- a/src/pages/contents/folder/[slug].tsx
+++ b/src/pages/contents/folder/[slug].tsx
@@ -5,7 +5,6 @@ import {
ContentPanel,
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getOpenGraph } from "helpers/openGraph";
import { getReadySdk } from "graphql/sdk";
import { filterHasAttributes } from "helpers/others";
@@ -27,13 +26,15 @@ import { TranslatedPreviewCard } from "components/PreviewCard";
import { HorizontalLine } from "components/HorizontalLine";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
import { cJoin, cIf } from "helpers/className";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
folder: NonNullable<
NonNullable<
GetContentsFolderQuery["contentsFolders"]
@@ -42,11 +43,11 @@ interface Props extends AppStaticProps, AppLayoutRequired {
}
const ContentsFolder = ({
- langui,
openGraph,
folder,
...otherProps
}: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
const subPanel = useMemo(
@@ -62,6 +63,7 @@ const ContentsFolder = ({
@@ -142,7 +144,6 @@ const ContentsFolder = ({
)
)}
renderWhenEmpty={() => <>>}
- langui={langui}
groupingFunction={() => [langui.folders ?? "Folders"]}
/>
@@ -188,14 +189,11 @@ const ContentsFolder = ({
"grid-cols-2 gap-x-3 gap-y-5"
)}
renderWhenEmpty={() => <>>}
- langui={langui}
groupingFunction={() => [langui.contents ?? "Contents"]}
/>
{folder.contents?.data.length === 0 &&
- folder.subfolders?.data.length === 0 && (
-
- )}
+ folder.subfolders?.data.length === 0 && }
),
[
@@ -214,7 +212,6 @@ const ContentsFolder = ({
subPanel={subPanel}
contentPanel={contentPanel}
openGraph={openGraph}
- langui={langui}
{...otherProps}
/>
);
@@ -228,6 +225,7 @@ export default ContentsFolder;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const slug = context.params?.slug ? context.params.slug.toString() : "";
const contentsFolder = await sdk.getContentsFolder({
slug: slug,
@@ -238,11 +236,10 @@ export const getStaticProps: GetStaticProps = async (context) => {
}
const folder = contentsFolder.contentsFolders.data[0].attributes;
- const appStaticProps = await getAppStaticProps(context);
const title = (() => {
if (slug === "root") {
- return appStaticProps.langui.contents ?? "Contents";
+ return langui.contents ?? "Contents";
}
if (context.locale && context.locales) {
const selectedTranslation = staticSmartLanguage({
@@ -261,8 +258,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
})();
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(appStaticProps.langui, title),
+ openGraph: getOpenGraph(langui, title),
folder,
};
return {
@@ -340,19 +336,16 @@ const TranslatedPreviewFolder = ({
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-interface NoContentNorFolderMessageProps {
- langui: AppStaticProps["langui"];
-}
-
-const NoContentNorFolderMessage = ({
- langui,
-}: NoContentNorFolderMessageProps) => (
-
-
+
-
{langui.empty_folder_message}
+ >
+
{langui.empty_folder_message}
+
-
-);
+ );
+};
diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx
index 5d8dc60..bf3384a 100644
--- a/src/pages/dev/checkup/contents.tsx
+++ b/src/pages/dev/checkup/contents.tsx
@@ -9,18 +9,18 @@ import {
} from "components/Panels/ContentPanel";
import { ToolTip } from "components/ToolTip";
import { DevGetContentsQuery } from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { filterDefined, filterHasAttributes } from "helpers/others";
import { Report, Severity } from "helpers/types/Report";
import { getOpenGraph } from "helpers/openGraph";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
contents: DevGetContentsQuery;
}
@@ -99,12 +99,11 @@ export default CheckupContents;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const contents = await sdk.devGetContents();
- const appStaticProps = await getAppStaticProps(context);
const props: Props = {
- ...appStaticProps,
contents: contents,
- openGraph: getOpenGraph(appStaticProps.langui, "Checkup Contents"),
+ openGraph: getOpenGraph(langui, "Checkup Contents"),
};
return {
props: props,
diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx
index a2fa298..ede00b2 100644
--- a/src/pages/dev/checkup/libraryitems.tsx
+++ b/src/pages/dev/checkup/libraryitems.tsx
@@ -12,17 +12,17 @@ import {
DevGetLibraryItemsQuery,
Enum_Componentcollectionscomponentlibraryimages_Status,
} from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { Report, Severity } from "helpers/types/Report";
import { getOpenGraph } from "helpers/openGraph";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
libraryItems: DevGetLibraryItemsQuery;
}
@@ -104,12 +104,12 @@ export default CheckupLibraryItems;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const libraryItems = await sdk.devGetLibraryItems();
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
libraryItems: libraryItems,
- openGraph: getOpenGraph(appStaticProps.langui, "Checkup Library Items"),
+ openGraph: getOpenGraph(langui, "Checkup Library Items"),
};
return {
props: props,
diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx
index bf65908..97a490c 100644
--- a/src/pages/dev/editor.tsx
+++ b/src/pages/dev/editor.tsx
@@ -10,18 +10,18 @@ import {
} from "components/Panels/ContentPanel";
import { Popup } from "components/Popup";
import { ToolTip } from "components/ToolTip";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { Icon } from "components/Ico";
import { getOpenGraph } from "helpers/openGraph";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {}
+interface Props extends AppLayoutRequired {}
-const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
+const Editor = (props: Props): JSX.Element => {
const handleInput = useCallback((text: string) => {
setMarkdown(text);
}, []);
@@ -445,13 +445,13 @@ const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
),
@@ -460,7 +460,6 @@ const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
converterOpened,
handleInput,
insert,
- langui,
markdown,
preline,
toggleWrap,
@@ -468,9 +467,7 @@ const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
]
);
- return (
-
- );
+ return ;
};
export default Editor;
@@ -479,11 +476,10 @@ export default Editor;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(appStaticProps.langui, "Markdawn Editor"),
+ openGraph: getOpenGraph(langui, "Markdawn Editor"),
};
return {
props: props,
diff --git a/src/pages/dev/transcript.tsx b/src/pages/dev/transcript.tsx
index f4f6cdf..8fa25af 100644
--- a/src/pages/dev/transcript.tsx
+++ b/src/pages/dev/transcript.tsx
@@ -8,8 +8,8 @@ import {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import { ToolTip } from "components/ToolTip";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getOpenGraph } from "helpers/openGraph";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -23,7 +23,7 @@ const SIZE_MULTIPLIER = 1000;
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {}
+interface Props extends AppLayoutRequired {}
const replaceSelection = (
text: string,
@@ -580,14 +580,10 @@ export default Transcript;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- "Japanese Transcription Tool"
- ),
+ openGraph: getOpenGraph(langui, "Japanese Transcription Tool"),
};
return {
props: props,
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index a0e9e87..554b398 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -3,18 +3,15 @@ import {
getPostStaticProps,
PostStaticProps,
} from "graphql/getPostStaticProps";
-import { getOpenGraph } from "helpers/openGraph";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-const Home = ({ langui, ...otherProps }: PostStaticProps): JSX.Element => (
+const Home = ({ ...otherProps }: PostStaticProps): JSX.Element => (
["data"][number]["id"];
}
-const LibrarySlug = ({
- item,
- itemId,
- langui,
- currencies,
- languages,
- ...otherProps
-}: Props): JSX.Element => {
+const LibrarySlug = ({ item, itemId, ...otherProps }: Props): JSX.Element => {
const { currency } = useAppLayout();
+ const { langui } = useAppLayout();
+ const currencies = useCurrencies();
const isContentPanelNoMoreThan3xl = useIsContentPanelNoMoreThan("3xl");
const isContentPanelNoMoreThanSm = useIsContentPanelNoMoreThan("sm");
const hoverable = useDeviceSupportsHover();
@@ -128,7 +124,6 @@ const LibrarySlug = ({
@@ -196,7 +191,6 @@ const LibrarySlug = ({
@@ -252,7 +246,7 @@ const LibrarySlug = ({
{!isUntangibleGroupItem(item.metadata?.[0]) &&
isDefinedAndNotEmpty(itemId) && (
-
+
)}
{item.descriptions?.[0] && (
@@ -571,7 +565,6 @@ const LibrarySlug = ({
(category) => category.attributes?.short ?? ""
)}
metadata={{
- currencies: currencies,
releaseDate: subitem.attributes.release_date,
price: subitem.attributes.price,
position: "Bottom",
@@ -579,7 +572,7 @@ const LibrarySlug = ({
infoAppend={
!isUntangibleGroupItem(
subitem.attributes.metadata?.[0]
- ) &&
+ ) &&
}
/>
@@ -635,7 +628,6 @@ const LibrarySlug = ({
}
: undefined
}
- langui={langui}
rangeStart={
rangedContent.attributes.range[0]?.__typename ===
"ComponentRangePageRange"
@@ -645,7 +637,6 @@ const LibrarySlug = ({
slug={rangedContent.attributes.slug}
parentSlug={item.slug}
key={rangedContent.id}
- languages={languages}
hasScanSet={
isDefined(rangedContent.attributes.scan_set) &&
rangedContent.attributes.scan_set.length > 0
@@ -689,7 +680,6 @@ const LibrarySlug = ({
keepInfoVisible,
displayOpenScans,
openLightBox,
- languages,
]
);
@@ -697,9 +687,6 @@ const LibrarySlug = ({
);
@@ -713,6 +700,7 @@ export default LibrarySlug;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const item = await sdk.getLibraryItem({
slug:
context.params && isDefined(context.params.slug)
@@ -722,22 +710,21 @@ export const getStaticProps: GetStaticProps = async (context) => {
});
if (!item.libraryItems?.data[0]?.attributes) return { notFound: true };
sortRangedContent(item.libraryItems.data[0].attributes.contents);
- const appStaticProps = await getAppStaticProps(context);
const { title, thumbnail } = item.libraryItems.data[0].attributes;
const description = getDescription(
item.libraryItems.data[0].attributes.descriptions?.[0]?.description,
{
- [appStaticProps.langui.categories ?? "Categories"]: filterHasAttributes(
+ [langui.categories ?? "Categories"]: filterHasAttributes(
item.libraryItems.data[0].attributes.categories?.data,
["attributes.short"]
).map((category) => category.attributes.short),
- [appStaticProps.langui.type ?? "Type"]: item.libraryItems.data[0]
- .attributes.metadata?.[0]
+ [langui.type ?? "Type"]: item.libraryItems.data[0].attributes
+ .metadata?.[0]
? [prettyItemSubType(item.libraryItems.data[0].attributes.metadata[0])]
: [],
- [appStaticProps.langui.release_date ?? "Release date"]: [
+ [langui.release_date ?? "Release date"]: [
item.libraryItems.data[0].attributes.release_date
? prettyDate(
item.libraryItems.data[0].attributes.release_date,
@@ -749,11 +736,10 @@ export const getStaticProps: GetStaticProps = async (context) => {
);
const props: Props = {
- ...appStaticProps,
item: item.libraryItems.data[0].attributes,
itemId: item.libraryItems.data[0].id,
openGraph: getOpenGraph(
- appStaticProps.langui,
+ langui,
title,
description,
thumbnail?.data?.attributes
@@ -803,8 +789,7 @@ interface ContentLineProps {
rangeStart: string;
parentSlug: string;
slug: string;
- langui: AppStaticProps["langui"];
- languages: AppStaticProps["languages"];
+
hasScanSet: boolean;
condensed: boolean;
}
@@ -812,17 +797,15 @@ interface ContentLineProps {
const ContentLine = ({
rangeStart,
content,
- langui,
- languages,
hasScanSet,
slug,
parentSlug,
condensed,
}: ContentLineProps): JSX.Element => {
+ const { langui } = useAppLayout();
const { value: isOpened, toggle: toggleOpened } = useBoolean(false);
const [selectedTranslation] = useSmartLanguage({
items: content?.translations ?? [],
- languages: languages,
languageExtractor: useCallback(
(
item: NonNullable
["translations"][number]
diff --git a/src/pages/library/[slug]/scans.tsx b/src/pages/library/[slug]/scans.tsx
index 908a7e3..0da5a9b 100644
--- a/src/pages/library/[slug]/scans.tsx
+++ b/src/pages/library/[slug]/scans.tsx
@@ -11,7 +11,6 @@ import {
GetLibraryItemScansQuery,
UploadImageFragment,
} from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import {
prettyInlineTitle,
@@ -47,13 +46,15 @@ import {
useIsContentPanelNoMoreThan,
} from "hooks/useContainerQuery";
import { cIf, cJoin } from "helpers/className";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
item: NonNullable<
NonNullable<
GetLibraryItemScansQuery["libraryItems"]
@@ -64,16 +65,10 @@ interface Props extends AppStaticProps, AppLayoutRequired {
>;
}
-const LibrarySlug = ({
- item,
- itemId,
- langui,
- languages,
- currencies,
- ...otherProps
-}: Props): JSX.Element => {
+const LibrarySlug = ({ item, itemId, ...otherProps }: Props): JSX.Element => {
const [openLightBox, LightBox] = useLightBox();
const is1ColumnLayout = useIs1ColumnLayout();
+ const { langui } = useAppLayout();
const ids = useMemo(
() =>
@@ -90,7 +85,6 @@ const LibrarySlug = ({
@@ -113,14 +107,13 @@ const LibrarySlug = ({
"attributes",
] as const).map((category) => category.attributes.short)}
metadata={{
- currencies: currencies,
releaseDate: item.release_date,
price: item.price,
position: "Bottom",
}}
infoAppend={
!isUntangibleGroupItem(item.metadata?.[0]) && (
-
+
)
}
/>
@@ -180,7 +173,6 @@ const LibrarySlug = ({
),
[
- currencies,
currentIntersection,
item.categories?.data,
item.contents?.data,
@@ -205,18 +197,12 @@ const LibrarySlug = ({
{item.images && (
-
+
)}
{item.contents?.data.map((content) => (
@@ -240,8 +226,6 @@ const LibrarySlug = ({
fallback={{
title: prettySlug(content.attributes.slug, item.slug),
}}
- languages={languages}
- langui={langui}
content={content.attributes.content}
/>
)}
@@ -255,7 +239,6 @@ const LibrarySlug = ({
item.contents?.data,
item.images,
item.slug,
- languages,
langui,
]
);
@@ -264,9 +247,6 @@ const LibrarySlug = ({
);
@@ -280,6 +260,7 @@ export default LibrarySlug;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const item = await sdk.getLibraryItemScans({
slug:
context.params && isDefined(context.params.slug)
@@ -290,13 +271,12 @@ export const getStaticProps: GetStaticProps = async (context) => {
if (!item.libraryItems?.data[0]?.attributes || !item.libraryItems.data[0]?.id)
return { notFound: true };
sortRangedContent(item.libraryItems.data[0].attributes.contents);
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
item: item.libraryItems.data[0].attributes,
itemId: item.libraryItems.data[0].id,
openGraph: getOpenGraph(
- appStaticProps.langui,
+ langui,
item.libraryItems.data[0].attributes.title,
undefined,
item.libraryItems.data[0].attributes.thumbnail?.data?.attributes
@@ -352,8 +332,7 @@ interface ScanSetProps {
>;
id: string;
title: string;
- languages: AppStaticProps["languages"];
- langui: AppStaticProps["langui"];
+
content: NonNullable<
NonNullable<
NonNullable<
@@ -370,15 +349,13 @@ const ScanSet = ({
scanSet,
id,
title,
- languages,
- langui,
content,
}: ScanSetProps): JSX.Element => {
const is1ColumnLayout = useIsContentPanelNoMoreThan("2xl");
+ const { langui } = useAppLayout();
const [selectedScan, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: scanSet,
- languages: languages,
languageExtractor: useCallback(
(item: NonNullable) =>
item.language?.data?.attributes?.code,
@@ -479,10 +456,7 @@ const ScanSet = ({
"attributes",
] as const).map((scanner) => (
-
+
))}
@@ -498,10 +472,7 @@ const ScanSet = ({
"attributes",
] as const).map((cleaner) => (
-
+
))}
@@ -520,10 +491,7 @@ const ScanSet = ({
"attributes",
] as const).map((typesetter) => (
-
+
))}
@@ -604,21 +572,17 @@ interface ScanSetCoverProps {
>["data"][number]["attributes"]
>["images"]
>;
- languages: AppStaticProps["languages"];
- langui: AppStaticProps["langui"];
}
const ScanSetCover = ({
openLightBox,
images,
- languages,
- langui,
}: ScanSetCoverProps): JSX.Element => {
const is1ColumnLayout = useIsContentPanelNoMoreThan("4xl");
+ const { langui } = useAppLayout();
const [selectedScan, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: images,
- languages: languages,
languageExtractor: useCallback(
(item: NonNullable) =>
item.language?.data?.attributes?.code,
@@ -687,10 +651,7 @@ const ScanSetCover = ({
"attributes",
] as const).map((scanner) => (
-
+
))}
@@ -706,10 +667,7 @@ const ScanSetCover = ({
"attributes",
] as const).map((cleaner) => (
-
+
))}
@@ -728,10 +686,7 @@ const ScanSetCover = ({
"attributes",
] as const).map((typesetter) => (
-
+
))}
diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx
index 0c28a26..d79d58f 100644
--- a/src/pages/library/index.tsx
+++ b/src/pages/library/index.tsx
@@ -11,7 +11,6 @@ import {
} from "components/Panels/ContentPanel";
import { SubPanel } from "components/Panels/SubPanel";
import { GetLibraryItemsPreviewQuery } from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { prettyInlineTitle, prettyItemSubType } from "helpers/formatters";
import { LibraryItemUserStatus } from "helpers/types";
@@ -34,6 +33,8 @@ import { compareDate } from "helpers/date";
import { HorizontalLine } from "components/HorizontalLine";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
import { cIf, cJoin } from "helpers/className";
+import { useCurrencies } from "hooks/useLocalData";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -56,17 +57,14 @@ const DEFAULT_FILTERS_STATE = {
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
items: NonNullable["data"];
}
-const Library = ({
- langui,
- items,
- currencies,
- ...otherProps
-}: Props): JSX.Element => {
+const Library = ({ items, ...otherProps }: Props): JSX.Element => {
const hoverable = useDeviceSupportsHover();
+ const currencies = useCurrencies();
+ const { langui } = useAppLayout();
const { libraryItemUserStatus } = useAppLayout();
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
@@ -417,14 +415,13 @@ const Library = ({
(category) => category.attributes?.short ?? ""
)}
metadata={{
- currencies: currencies,
releaseDate: item.attributes.release_date,
price: item.attributes.price,
position: "Bottom",
}}
infoAppend={
!isUntangibleGroupItem(item.attributes.metadata?.[0]) && (
-
+
)
}
/>
@@ -448,18 +445,15 @@ const Library = ({
}
filteringFunction={filteringFunction}
paginationItemPerPage={25}
- langui={langui}
/>
),
[
- currencies,
filteringFunction,
groupingFunction,
isContentPanelAtLeast4xl,
items,
keepInfoVisible,
- langui,
searchName,
sortingFunction,
]
@@ -470,8 +464,6 @@ const Library = ({
subPanel={subPanel}
contentPanel={contentPanel}
subPanelIcon={Icon.Search}
- currencies={currencies}
- langui={langui}
{...otherProps}
/>
);
@@ -485,18 +477,15 @@ export default Library;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const items = await sdk.getLibraryItemsPreview({
language_code: context.locale ?? "en",
});
if (!items.libraryItems?.data) return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
items: items.libraryItems.data,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.library ?? "Library"
- ),
+ openGraph: getOpenGraph(langui, langui.library ?? "Library"),
};
return {
props: props,
diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx
index 5c0b9f9..a98421a 100644
--- a/src/pages/merch/index.tsx
+++ b/src/pages/merch/index.tsx
@@ -2,31 +2,34 @@ import { GetStaticProps } from "next";
import { AppLayout, AppLayoutRequired } from "components/AppLayout";
import { PanelHeader } from "components/PanelComponents/PanelHeader";
import { SubPanel } from "components/Panels/SubPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { Icon } from "components/Ico";
import { getOpenGraph } from "helpers/openGraph";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {}
-const Merch = ({ langui, ...otherProps }: Props): JSX.Element => (
-
-
-
- }
- langui={langui}
- {...otherProps}
- />
-);
+interface Props extends AppLayoutRequired {}
+const Merch = (props: Props): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
+
+
+
+ }
+ {...props}
+ />
+ );
+};
export default Merch;
/*
@@ -34,14 +37,10 @@ export default Merch;
* ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
*/
-export const getStaticProps: GetStaticProps = async (context) => {
- const appStaticProps = await getAppStaticProps(context);
+export const getStaticProps: GetStaticProps = (context) => {
+ const langui = getLangui(context.locale);
const props: Props = {
- ...appStaticProps,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.merch ?? "Merch"
- ),
+ openGraph: getOpenGraph(langui, langui.merch ?? "Merch"),
};
return {
props: props,
diff --git a/src/pages/news/[slug].tsx b/src/pages/news/[slug].tsx
index 792cb84..ec6fe96 100644
--- a/src/pages/news/[slug].tsx
+++ b/src/pages/news/[slug].tsx
@@ -1,30 +1,33 @@
import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
import { PostPage } from "components/PostPage";
-import { AppStaticProps } from "graphql/getAppStaticProps";
import {
getPostStaticProps,
PostStaticProps,
} from "graphql/getPostStaticProps";
import { getReadySdk } from "graphql/sdk";
import { filterHasAttributes, isDefined } from "helpers/others";
+import { useAppLayout } from "contexts/AppLayoutContext";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, PostStaticProps {}
+interface Props extends PostStaticProps {}
-const LibrarySlug = (props: Props): JSX.Element => (
-
-);
+const LibrarySlug = (props: Props): JSX.Element => {
+ const { langui } = useAppLayout();
+ return (
+
+ );
+};
export default LibrarySlug;
/*
diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx
index 11c56c3..5a0df2a 100644
--- a/src/pages/news/index.tsx
+++ b/src/pages/news/index.tsx
@@ -10,7 +10,6 @@ import {
} from "components/Panels/ContentPanel";
import { SubPanel } from "components/Panels/SubPanel";
import { GetPostsPreviewQuery } from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { prettySlug } from "helpers/formatters";
import { Icon } from "components/Ico";
@@ -26,6 +25,8 @@ import { TranslatedPreviewCard } from "components/PreviewCard";
import { HorizontalLine } from "components/HorizontalLine";
import { cIf } from "helpers/className";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -42,12 +43,13 @@ const DEFAULT_FILTERS_STATE = {
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
posts: NonNullable["data"];
}
-const News = ({ langui, posts, ...otherProps }: Props): JSX.Element => {
+const News = ({ posts, ...otherProps }: Props): JSX.Element => {
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
+ const { langui } = useAppLayout();
const hoverable = useDeviceSupportsHover();
const [searchName, setSearchName] = useState(
DEFAULT_FILTERS_STATE.searchName
@@ -109,7 +111,6 @@ const News = ({ langui, posts, ...otherProps }: Props): JSX.Element => {
post.id}
- langui={langui}
renderItem={({ item: post }) => (
{
/>
),
- [keepInfoVisible, langui, posts, searchName, isContentPanelAtLeast4xl]
+ [keepInfoVisible, posts, searchName, isContentPanelAtLeast4xl]
);
return (
@@ -158,7 +159,6 @@ const News = ({ langui, posts, ...otherProps }: Props): JSX.Element => {
subPanel={subPanel}
contentPanel={contentPanel}
subPanelIcon={Icon.Search}
- langui={langui}
{...otherProps}
/>
);
@@ -172,16 +172,13 @@ export default News;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const posts = await sdk.getPostsPreview();
if (!posts.posts) return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
posts: sortPosts(posts.posts.data),
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.news ?? "News"
- ),
+ openGraph: getOpenGraph(langui, langui.news ?? "News"),
};
return {
props: props,
diff --git a/src/pages/wiki/[slug]/index.tsx b/src/pages/wiki/[slug]/index.tsx
index 57253bf..2c65a5a 100644
--- a/src/pages/wiki/[slug]/index.tsx
+++ b/src/pages/wiki/[slug]/index.tsx
@@ -11,7 +11,6 @@ import {
} from "components/Panels/ContentPanel";
import { SubPanel } from "components/Panels/SubPanel";
import DefinitionCard from "components/Wiki/DefinitionCard";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import {
filterHasAttributes,
@@ -31,26 +30,23 @@ import {
import { getDescription } from "helpers/description";
import { cIf, cJoin } from "helpers/className";
import { useIs3ColumnsLayout } from "hooks/useContainerQuery";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
page: WikiPageWithTranslations;
}
-const WikiPage = ({
- page,
- langui,
- languages,
- ...otherProps
-}: Props): JSX.Element => {
+const WikiPage = ({ page, ...otherProps }: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: page.translations,
- languages: languages,
languageExtractor: useCallback(
(item: NonNullable) =>
item.language?.data?.attributes?.code,
@@ -67,7 +63,6 @@ const WikiPage = ({
@@ -83,7 +78,6 @@ const WikiPage = ({
@@ -200,8 +194,6 @@ const WikiPage = ({
})
)}
index={index + 1}
- languages={languages}
- langui={langui}
categories={filterHasAttributes(
definition.categories?.data,
["attributes"] as const
@@ -219,7 +211,6 @@ const WikiPage = ({
LightBox,
is3ColumnsLayout,
languageSwitcherProps,
- languages,
langui,
openLightBox,
page.categories?.data,
@@ -234,8 +225,6 @@ const WikiPage = ({
);
@@ -249,6 +238,7 @@ export default WikiPage;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const slug =
context.params && isDefined(context.params.slug)
? context.params.slug.toString()
@@ -259,18 +249,17 @@ export const getStaticProps: GetStaticProps = async (context) => {
});
if (!page.wikiPages?.data[0].attributes?.translations)
return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
const { title, description } = (() => {
const chipsGroups = {
- [appStaticProps.langui.tags ?? "Tags"]: filterHasAttributes(
+ [langui.tags ?? "Tags"]: filterHasAttributes(
page.wikiPages.data[0].attributes.tags?.data,
["attributes"] as const
).map(
(tag) =>
tag.attributes.titles?.[0]?.title ?? prettySlug(tag.attributes.slug)
),
- [appStaticProps.langui.categories ?? "Categories"]: filterHasAttributes(
+ [langui.categories ?? "Categories"]: filterHasAttributes(
page.wikiPages.data[0].attributes.categories?.data,
["attributes"] as const
).map((category) => category.attributes.short),
@@ -303,14 +292,8 @@ export const getStaticProps: GetStaticProps = async (context) => {
page.wikiPages.data[0].attributes.thumbnail?.data?.attributes;
const props: Props = {
- ...appStaticProps,
page: page.wikiPages.data[0].attributes as WikiPageWithTranslations,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- title,
- description,
- thumbnail
- ),
+ openGraph: getOpenGraph(langui, title, description, thumbnail),
};
return {
props: props,
diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx
index 9bbe5d6..ec72023 100644
--- a/src/pages/wiki/chronology.tsx
+++ b/src/pages/wiki/chronology.tsx
@@ -11,7 +11,6 @@ import {
GetChronologyItemsQuery,
GetErasQuery,
} from "graphql/generated";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { prettySlug } from "helpers/formatters";
import {
@@ -31,13 +30,15 @@ import { TranslatedProps } from "helpers/types/TranslatedProps";
import { TranslatedNavOption } from "components/PanelComponents/NavOption";
import { useIntersectionList } from "hooks/useIntersectionList";
import { HorizontalLine } from "components/HorizontalLine";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
chronologyItems: NonNullable<
GetChronologyItemsQuery["chronologyItems"]
>["data"];
@@ -47,10 +48,9 @@ interface Props extends AppStaticProps, AppLayoutRequired {
const Chronology = ({
chronologyItems,
chronologyEras,
- langui,
- languages,
...otherProps
}: Props): JSX.Element => {
+ const { langui } = useAppLayout();
const ids = useMemo(
() =>
filterHasAttributes(chronologyEras, ["attributes"] as const).map(
@@ -67,7 +67,6 @@ const Chronology = ({
@@ -106,7 +105,6 @@ const Chronology = ({
@@ -131,22 +129,18 @@ const Chronology = ({
item.attributes.year >= era.attributes.starting_year &&
item.attributes.year < era.attributes.ending_year
)}
- langui={langui}
- languages={languages}
/>
)
)}
),
- [chronologyEras, chronologyItems, languages, langui]
+ [chronologyEras, chronologyItems, langui]
);
return (
);
@@ -160,19 +154,16 @@ export default Chronology;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const chronologyItems = await sdk.getChronologyItems();
const chronologyEras = await sdk.getEras();
if (!chronologyItems.chronologyItems || !chronologyEras.chronologyEras)
return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
chronologyItems: chronologyItems.chronologyItems.data,
chronologyEras: chronologyEras.chronologyEras.data,
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.chronology ?? "Chronology"
- ),
+ openGraph: getOpenGraph(langui, langui.chronology ?? "Chronology"),
};
return {
props: props,
@@ -189,8 +180,6 @@ interface ChronologyEraProps {
title: string;
description?: string | null | undefined;
chronologyItems: Props["chronologyItems"];
- langui: AppStaticProps["langui"];
- languages: AppStaticProps["languages"];
}
const ChronologyEra = ({
@@ -198,8 +187,6 @@ const ChronologyEra = ({
title,
description,
chronologyItems,
- langui,
- languages,
}: ChronologyEraProps) => {
const yearGroups = useMemo(() => {
const memo: Props["chronologyItems"][] = [];
@@ -222,7 +209,7 @@ const ChronologyEra = ({
{title}
-
+
{isDefinedAndNotEmpty(description) && (
@@ -231,12 +218,7 @@ const ChronologyEra = ({
{yearGroups.map((item, index) => (
-
+
))}
@@ -271,11 +253,9 @@ const TranslatedChronologyEra = ({
interface ChronologyYearProps {
items: NonNullable;
- langui: AppStaticProps["langui"];
- languages: AppStaticProps["languages"];
}
-const ChronologyYear = ({ items, langui, languages }: ChronologyYearProps) => (
+const ChronologyYear = ({ items }: ChronologyYearProps) => (
(
(item, index) => (
[number]["attributes"]
>["events"]
>;
- langui: AppStaticProps["langui"];
- languages: AppStaticProps["languages"];
}
export const ChronologyDate = ({
date,
events,
- langui,
- languages,
}: ChronologyDateProps): JSX.Element => {
const router = useRouter();
return (
@@ -368,8 +342,6 @@ export const ChronologyDate = ({
id={generateAnchor(date.year, date.month, date.day)}
key={event.id}
event={event}
- langui={langui}
- languages={languages}
/>
)
)}
@@ -388,17 +360,15 @@ interface ChronologyEventProps {
>["events"]
>[number]
>;
- langui: AppStaticProps["langui"];
- languages: AppStaticProps["languages"];
+
id: string;
}
export const ChronologyEvent = ({
event,
- langui,
- languages,
id,
}: ChronologyEventProps): JSX.Element => {
+ const { langui } = useAppLayout();
const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
useSmartLanguage({
items: event.translations ?? [],
@@ -410,7 +380,6 @@ export const ChronologyEvent = ({
) => item?.language?.data?.attributes?.code,
[]
),
- languages: languages,
});
return (
@@ -449,7 +418,7 @@ export const ChronologyEvent = ({
-
+
diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx
index bdb2d75..349b7af 100644
--- a/src/pages/wiki/index.tsx
+++ b/src/pages/wiki/index.tsx
@@ -5,7 +5,6 @@ import { AppLayout, AppLayoutRequired } from "components/AppLayout";
import { NavOption } from "components/PanelComponents/NavOption";
import { PanelHeader } from "components/PanelComponents/PanelHeader";
import { SubPanel } from "components/Panels/SubPanel";
-import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { Icon } from "components/Ico";
import { getReadySdk } from "graphql/sdk";
import { GetWikiPageQuery, GetWikiPagesPreviewsQuery } from "graphql/generated";
@@ -28,6 +27,8 @@ import { getOpenGraph } from "helpers/openGraph";
import { TranslatedPreviewCard } from "components/PreviewCard";
import { useIsContentPanelAtLeast } from "hooks/useContainerQuery";
import { cIf } from "helpers/className";
+import { useAppLayout } from "contexts/AppLayoutContext";
+import { getLangui } from "graphql/fetchLocalData";
/*
* ╭─────────────╮
@@ -45,12 +46,13 @@ const DEFAULT_FILTERS_STATE = {
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps, AppLayoutRequired {
+interface Props extends AppLayoutRequired {
pages: NonNullable["data"];
}
-const Wiki = ({ langui, pages, ...otherProps }: Props): JSX.Element => {
+const Wiki = ({ pages, ...otherProps }: Props): JSX.Element => {
const hoverable = useDeviceSupportsHover();
+ const { langui } = useAppLayout();
const isContentPanelAtLeast4xl = useIsContentPanelAtLeast("4xl");
const [searchName, setSearchName] = useState(
@@ -198,7 +200,6 @@ const Wiki = ({ langui, pages, ...otherProps }: Props): JSX.Element => {
).map((category) => category.attributes.short)}
/>
)}
- langui={langui}
className={cIf(
isContentPanelAtLeast4xl,
"grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
@@ -223,7 +224,6 @@ const Wiki = ({ langui, pages, ...otherProps }: Props): JSX.Element => {
[
groupingFunction,
keepInfoVisible,
- langui,
pages,
searchName,
isContentPanelAtLeast4xl,
@@ -235,7 +235,6 @@ const Wiki = ({ langui, pages, ...otherProps }: Props): JSX.Element => {
subPanel={subPanel}
contentPanel={contentPanel}
subPanelIcon={Icon.Search}
- langui={langui}
{...otherProps}
/>
);
@@ -249,18 +248,15 @@ export default Wiki;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
+ const langui = getLangui(context.locale);
const pages = await sdk.getWikiPagesPreviews({
language_code: context.locale ?? "en",
});
if (!pages.wikiPages?.data) return { notFound: true };
- const appStaticProps = await getAppStaticProps(context);
+
const props: Props = {
- ...appStaticProps,
pages: sortPages(pages.wikiPages.data),
- openGraph: getOpenGraph(
- appStaticProps.langui,
- appStaticProps.langui.wiki ?? "Wiki"
- ),
+ openGraph: getOpenGraph(langui, langui.wiki ?? "Wiki"),
};
return {
props: props,
--
2.40.1
From 119794a23658160394073f367c6994546ad2465f Mon Sep 17 00:00:00 2001
From: DrMint
Date: Sat, 27 Aug 2022 21:55:46 +0200
Subject: [PATCH 2/3] Fixed the problems
---
src/components/AppLayout.tsx | 8 +++
src/contexts/AppLayoutContext.tsx | 73 +++++++++++++--------------
src/helpers/formatters.ts | 5 +-
src/helpers/others.ts | 6 ---
src/hooks/useDarkMode.ts | 6 +--
src/hooks/useStateWithLocalStorage.ts | 31 ++++++++++++
src/pages/about-us/index.tsx | 6 +--
7 files changed, 80 insertions(+), 55 deletions(-)
create mode 100644 src/hooks/useStateWithLocalStorage.ts
diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx
index f023d2c..c1d927e 100644
--- a/src/components/AppLayout.tsx
+++ b/src/components/AppLayout.tsx
@@ -24,6 +24,7 @@ import {
useIs1ColumnLayout,
useIsScreenAtLeast,
} from "hooks/useContainerQuery";
+import { useOnResize } from "hooks/useOnResize";
/*
* ╭─────────────╮
@@ -82,6 +83,9 @@ export const AppLayout = ({
setSubPanelOpen,
toggleMainPanelOpen,
toggleSubPanelOpen,
+ setScreenWidth,
+ setContentPanelWidth,
+ setSubPanelWidth,
langui,
currencies,
languages,
@@ -91,6 +95,10 @@ export const AppLayout = ({
const is1ColumnLayout = useIs1ColumnLayout();
const isScreenAtLeastXs = useIsScreenAtLeast("xs");
+ useOnResize(AnchorIds.Body, (width) => setScreenWidth(width));
+ useOnResize(AnchorIds.ContentPanel, (width) => setContentPanelWidth(width));
+ useOnResize(AnchorIds.SubPanel, (width) => setSubPanelWidth(width));
+
const handlers = useSwipeable({
onSwipedLeft: (SwipeEventData) => {
if (menuGestures) {
diff --git a/src/contexts/AppLayoutContext.tsx b/src/contexts/AppLayoutContext.tsx
index 1850fcb..39c7607 100644
--- a/src/contexts/AppLayoutContext.tsx
+++ b/src/contexts/AppLayoutContext.tsx
@@ -5,16 +5,15 @@ import React, {
useLayoutEffect,
useState,
} from "react";
-import { useLocalStorage } from "usehooks-ts";
import { useRouter } from "next/router";
+import { useLocalStorage } from "usehooks-ts";
import { isDefined, isDefinedAndNotEmpty } from "helpers/others";
import { LibraryItemUserStatus, RequiredNonNullable } from "helpers/types";
import { useDarkMode } from "hooks/useDarkMode";
import { Currencies, Languages, Langui } from "helpers/localData";
import { useCurrencies, useLanguages, useLangui } from "hooks/useLocalData";
import { getDefaultPreferredLanguages } from "helpers/locales";
-import { useOnResize } from "hooks/useOnResize";
-import { AnchorIds } from "hooks/useScrollTopOnChange";
+import { useStateWithLocalStorage } from "hooks/useStateWithLocalStorage";
interface AppLayoutState {
subPanelOpen: boolean;
@@ -29,12 +28,6 @@ interface AppLayoutState {
React.SetStateAction
>;
- searchPanelOpen: boolean;
- toggleSearchPanelOpen: () => void;
- setSearchPanelOpen: React.Dispatch<
- React.SetStateAction
- >;
-
mainPanelReduced: boolean;
toggleMainPanelReduced: () => void;
setMainPanelReduced: React.Dispatch<
@@ -89,8 +82,19 @@ interface AppLayoutState {
>;
screenWidth: number;
+ setScreenWidth: React.Dispatch<
+ React.SetStateAction
+ >;
+
contentPanelWidth: number;
+ setContentPanelWidth: React.Dispatch<
+ React.SetStateAction
+ >;
+
subPanelWidth: number;
+ setSubPanelWidth: React.Dispatch<
+ React.SetStateAction
+ >;
langui: Langui;
languages: Languages;
@@ -106,10 +110,6 @@ const initialState: RequiredNonNullable = {
setConfigPanelOpen: () => null,
toggleConfigPanelOpen: () => null,
- searchPanelOpen: false,
- setSearchPanelOpen: () => null,
- toggleSearchPanelOpen: () => null,
-
mainPanelReduced: false,
setMainPanelReduced: () => null,
toggleMainPanelReduced: () => null,
@@ -150,8 +150,13 @@ const initialState: RequiredNonNullable = {
setLibraryItemUserStatus: () => null,
screenWidth: 0,
+ setScreenWidth: () => null,
+
contentPanelWidth: 0,
+ setContentPanelWidth: () => null,
+
subPanelWidth: 0,
+ setSubPanelWidth: () => null,
currencies: [],
languages: [],
@@ -167,7 +172,9 @@ interface Props {
}
export const AppContextProvider = (props: Props): JSX.Element => {
- const [subPanelOpen, setSubPanelOpen] = useLocalStorage(
+ const router = useRouter();
+
+ const [subPanelOpen, setSubPanelOpen] = useStateWithLocalStorage(
"subPanelOpen",
initialState.subPanelOpen
);
@@ -182,7 +189,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
initialState.mainPanelReduced
);
- const [mainPanelOpen, setMainPanelOpen] = useLocalStorage(
+ const [mainPanelOpen, setMainPanelOpen] = useStateWithLocalStorage(
"mainPanelOpen",
initialState.mainPanelOpen
);
@@ -217,11 +224,6 @@ export const AppContextProvider = (props: Props): JSX.Element => {
const [menuGestures, setMenuGestures] = useState(false);
- const [searchPanelOpen, setSearchPanelOpen] = useLocalStorage(
- "searchPanelOpen",
- initialState.searchPanelOpen
- );
-
const [libraryItemUserStatus, setLibraryItemUserStatus] = useLocalStorage(
"libraryItemUserStatus",
initialState.libraryItemUserStatus
@@ -235,10 +237,6 @@ export const AppContextProvider = (props: Props): JSX.Element => {
setConfigPanelOpen((current) => (isDefined(current) ? !current : current));
};
- const toggleSearchPanelOpen = () => {
- setSearchPanelOpen((current) => (isDefined(current) ? !current : current));
- };
-
const toggleMainPanelReduced = () => {
setMainPanelReduced((current) => (isDefined(current) ? !current : current));
};
@@ -273,9 +271,7 @@ export const AppContextProvider = (props: Props): JSX.Element => {
const languages = useLanguages();
const currencies = useCurrencies();
- const router = useRouter();
useEffect(() => {
- console.log("I'm in preferredLanguages update");
if (preferredLanguages.length === 0) {
if (isDefinedAndNotEmpty(router.locale) && router.locales) {
setPreferredLanguages(
@@ -283,10 +279,17 @@ export const AppContextProvider = (props: Props): JSX.Element => {
);
}
} else if (router.locale !== preferredLanguages[0]) {
- console.log("I'm rerouting you");
- router.replace(router.asPath, router.asPath, {
- locale: preferredLanguages[0],
- });
+ /*
+ * Using a timeout to the code getting stuck into a loop when reaching the website with a
+ * different preferredLanguages[0] from router.locale
+ */
+ setTimeout(
+ async () =>
+ router.replace(router.asPath, router.asPath, {
+ locale: preferredLanguages[0],
+ }),
+ 250
+ );
}
}, [
preferredLanguages,
@@ -314,16 +317,11 @@ export const AppContextProvider = (props: Props): JSX.Element => {
}%`;
}, [fontSize]);
- useOnResize(AnchorIds.Body, (width) => setScreenWidth(width));
- useOnResize(AnchorIds.ContentPanel, (width) => setContentPanelWidth(width));
- useOnResize(AnchorIds.SubPanel, (width) => setSubPanelWidth(width));
-
return (
{
subPanelWidth,
setSubPanelOpen,
setConfigPanelOpen,
- setSearchPanelOpen,
setMainPanelReduced,
setMainPanelOpen,
setDarkMode,
@@ -354,13 +351,15 @@ export const AppContextProvider = (props: Props): JSX.Element => {
setLibraryItemUserStatus,
toggleSubPanelOpen,
toggleConfigPanelOpen,
- toggleSearchPanelOpen,
toggleMainPanelReduced,
toggleMainPanelOpen,
toggleDarkMode,
toggleMenuGestures,
toggleSelectedThemeMode,
toggleDyslexic,
+ setScreenWidth,
+ setContentPanelWidth,
+ setSubPanelWidth,
languages,
langui,
currencies,
diff --git a/src/helpers/formatters.ts b/src/helpers/formatters.ts
index 01006f1..b10da19 100644
--- a/src/helpers/formatters.ts
+++ b/src/helpers/formatters.ts
@@ -239,10 +239,7 @@ export const prettyDuration = (seconds: number): string => {
return result;
};
-export const prettyLanguage = (
- code: string,
- languages: Languages
-): string => {
+export const prettyLanguage = (code: string, languages: Languages): string => {
let result = code;
languages.forEach((language) => {
if (language.attributes?.code === code)
diff --git a/src/helpers/others.ts b/src/helpers/others.ts
index 96996b0..cd30b36 100644
--- a/src/helpers/others.ts
+++ b/src/helpers/others.ts
@@ -112,12 +112,6 @@ export const iterateMap = (
return toList.map(([key, value], index) => callbackfn(key, value, index));
};
-export const mapMoveEntry = (
- map: Map,
- sourceIndex: number,
- targetIndex: number
-): Map => new Map(arrayMove([...map], sourceIndex, targetIndex));
-
export const arrayMove = (
arr: T[],
sourceIndex: number,
diff --git a/src/hooks/useDarkMode.ts b/src/hooks/useDarkMode.ts
index 66db829..1ef4374 100644
--- a/src/hooks/useDarkMode.ts
+++ b/src/hooks/useDarkMode.ts
@@ -1,6 +1,6 @@
import { useEffect } from "react";
-import { useLocalStorage } from "usehooks-ts";
import { usePrefersDarkMode } from "./useMediaQuery";
+import { useStateWithLocalStorage } from "./useStateWithLocalStorage";
export const useDarkMode = (
key: string,
@@ -11,9 +11,9 @@ export const useDarkMode = (
React.Dispatch>,
React.Dispatch>
] => {
- const [darkMode, setDarkMode] = useLocalStorage(key, initialValue);
+ const [darkMode, setDarkMode] = useStateWithLocalStorage(key, initialValue);
const prefersDarkMode = usePrefersDarkMode();
- const [selectedThemeMode, setSelectedThemeMode] = useLocalStorage(
+ const [selectedThemeMode, setSelectedThemeMode] = useStateWithLocalStorage(
"selectedThemeMode",
false
);
diff --git a/src/hooks/useStateWithLocalStorage.ts b/src/hooks/useStateWithLocalStorage.ts
new file mode 100644
index 0000000..5bad2b2
--- /dev/null
+++ b/src/hooks/useStateWithLocalStorage.ts
@@ -0,0 +1,31 @@
+import { useEffect, useState } from "react";
+import { isDefined } from "helpers/others";
+
+export const useStateWithLocalStorage = (
+ key: string,
+ initialValue: T
+): [T, React.Dispatch>] => {
+ const [value, setValue] = useState(initialValue);
+ const [isFromLocaleStorage, setFromLocaleStorage] = useState(false);
+
+ useEffect(() => {
+ try {
+ const item = localStorage.getItem(key);
+ if (isDefined(item)) {
+ setValue(JSON.parse(item) as T);
+ } else {
+ setValue(initialValue);
+ }
+ setFromLocaleStorage(true);
+ } catch (error) {
+ console.warn(`Error reading localStorage key “${key}”:`, error);
+ setValue(initialValue);
+ }
+ }, [initialValue, key]);
+
+ useEffect(() => {
+ if (isFromLocaleStorage) localStorage.setItem(key, JSON.stringify(value));
+ }, [value, key, isFromLocaleStorage]);
+
+ return [value, setValue];
+};
diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx
index 896f855..ba5ad15 100644
--- a/src/pages/about-us/index.tsx
+++ b/src/pages/about-us/index.tsx
@@ -41,11 +41,7 @@ const AboutUs = (props: Props): JSX.Element => {
url="/about-us/sharing-policy"
border
/>
-
+
}
{...props}
--
2.40.1
From a4467a6ee4148b01f9068306c4bd60e01c850b59 Mon Sep 17 00:00:00 2001
From: DrMint
Date: Sat, 27 Aug 2022 22:22:16 +0200
Subject: [PATCH 3/3] Updated deps
---
package-lock.json | 945 ++++++++++++++++++----------------
package.json | 14 +-
src/graphql/fetchLocalData.ts | 1 +
3 files changed, 522 insertions(+), 438 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 581f93b..dd0222e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,7 +14,7 @@
"@tippyjs/react": "^4.2.6",
"@types/ua-parser-js": "^0.7.36",
"autoprefixer": "^10.4.8",
- "graphql-request": "^4.3.0",
+ "graphql-request": "^5.0.0",
"markdown-to-jsx": "^7.1.7",
"meilisearch": "^0.27.0",
"next": "^12.2.5",
@@ -31,20 +31,20 @@
},
"devDependencies": {
"@digitak/esrun": "^3.2.10",
- "@graphql-codegen/cli": "^2.11.6",
+ "@graphql-codegen/cli": "^2.11.8",
"@graphql-codegen/typescript": "2.7.3",
"@graphql-codegen/typescript-graphql-request": "^4.5.3",
"@graphql-codegen/typescript-operations": "^2.5.3",
- "@types/node": "18.7.9",
+ "@types/node": "18.7.13",
"@types/nodemailer": "^6.4.5",
"@types/react": "18.0.17",
"@types/react-dom": "^18.0.6",
"@types/throttle-debounce": "^5.0.0",
"@types/turndown": "^5.0.1",
- "@typescript-eslint/eslint-plugin": "^5.33.1",
- "@typescript-eslint/parser": "^5.33.1",
+ "@typescript-eslint/eslint-plugin": "^5.35.1",
+ "@typescript-eslint/parser": "^5.35.1",
"dotenv": "^16.0.1",
- "eslint": "^8.22.0",
+ "eslint": "^8.23.0",
"eslint-config-next": "12.2.5",
"eslint-plugin-import": "^2.26.0",
"graphql": "^16.6.0",
@@ -53,7 +53,7 @@
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.1.8",
"ts-unused-exports": "^8.0.0",
- "typescript": "^4.7.4"
+ "typescript": "^4.8.2"
}
},
"node_modules/@ampproject/remapping": {
@@ -1069,8 +1069,6 @@
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@jridgewell/trace-mapping": "0.3.9"
},
@@ -1083,8 +1081,6 @@
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
@@ -1113,62 +1109,6 @@
"integrity": "sha512-7PV6XCS5qC28oaEKWUUXLxiewoj3Z0EfdCdxX5D6Vy5wtC/rYuCO15XOOupUcnwBaNR+Xm/bfmsCe1KJtEfE7g==",
"dev": true
},
- "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz",
- "integrity": "sha512-QRVtqJuS1mcT56oHpVegkKBlgtWjXw/gHNWO3eL9oyB5Sc7HBoc2OLG/nYpVfT/Jejvo3NUrD0Udk7XgoyDKkA==",
- "dev": true,
- "dependencies": {
- "lodash.get": "^4",
- "make-error": "^1",
- "ts-node": "^9",
- "tslib": "^2"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "cosmiconfig": ">=6"
- }
- },
- "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/arg": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
- "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "dev": true
- },
- "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/ts-node": {
- "version": "9.1.1",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
- "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
- "dev": true,
- "dependencies": {
- "arg": "^4.1.0",
- "create-require": "^1.1.0",
- "diff": "^4.0.1",
- "make-error": "^1.1.1",
- "source-map-support": "^0.5.17",
- "yn": "3.1.1"
- },
- "bin": {
- "ts-node": "dist/bin.js",
- "ts-node-script": "dist/bin-script.js",
- "ts-node-transpile-only": "dist/bin-transpile.js",
- "ts-script": "dist/bin-script-deprecated.js"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "typescript": ">=2.7"
- }
- },
- "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
- "dev": true
- },
"node_modules/@esbuild/linux-loong64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
@@ -1186,14 +1126,14 @@
}
},
"node_modules/@eslint/eslintrc": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
- "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
+ "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==",
"dev": true,
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.3.2",
+ "espree": "^9.4.0",
"globals": "^13.15.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -1203,6 +1143,9 @@
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
"node_modules/@fontsource/material-icons": {
@@ -1231,9 +1174,9 @@
"integrity": "sha512-aSyb02SPBkLKcpy6OIQH535C8CZSX++Cq+48Ayj6fFbXM99IB+E6M0jwSf7VHyGReeGFpNS3fpi9+7gfInsoJg=="
},
"node_modules/@graphql-codegen/cli": {
- "version": "2.11.6",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.11.6.tgz",
- "integrity": "sha512-0R2Bhgjt3XZTSdsn8MGGuJjDEN2z+KCo7920zLZz9boy6bQ0EyuxS9AUATePS9aC3djy2POAIPCHz8iHK68IlQ==",
+ "version": "2.11.8",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.11.8.tgz",
+ "integrity": "sha512-LFEgDk+ShNsuy8GVR8bkLcfvvq6ugq3NmDsHYzCtJO/NW/8InQeqoH2X4e+7YhS/4M9iA2vdzSk0hSsv610Oww==",
"dev": true,
"dependencies": {
"@graphql-codegen/core": "2.6.2",
@@ -1248,14 +1191,14 @@
"@graphql-tools/prisma-loader": "^7.2.7",
"@graphql-tools/url-loader": "^7.13.2",
"@graphql-tools/utils": "^8.9.0",
- "@whatwg-node/fetch": "^0.2.3",
+ "@whatwg-node/fetch": "^0.3.0",
"ansi-escapes": "^4.3.1",
"chalk": "^4.1.0",
"chokidar": "^3.5.2",
"cosmiconfig": "^7.0.0",
"debounce": "^1.2.0",
"detect-indent": "^6.0.0",
- "graphql-config": "^4.3.1",
+ "graphql-config": "^4.3.4",
"inquirer": "^8.0.0",
"is-glob": "^4.0.1",
"json-to-pretty-yaml": "^1.2.2",
@@ -1278,6 +1221,23 @@
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
},
+ "node_modules/@graphql-codegen/cli/node_modules/@whatwg-node/fetch": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.3.2.tgz",
+ "integrity": "sha512-Bs5zAWQs0tXsLa4mRmLw7Psps1EN78vPtgcLpw3qPY8s6UYPUM67zFZ9cy+7tZ64PXhfwzxJn+m7RH2Lq48RNQ==",
+ "dev": true,
+ "dependencies": {
+ "@peculiar/webcrypto": "^1.4.0",
+ "abort-controller": "^3.0.0",
+ "busboy": "^1.6.0",
+ "event-target-polyfill": "^0.0.3",
+ "form-data-encoder": "^1.7.1",
+ "formdata-node": "^4.3.1",
+ "node-fetch": "^2.6.7",
+ "undici": "^5.8.0",
+ "web-streams-polyfill": "^3.2.0"
+ }
+ },
"node_modules/@graphql-codegen/cli/node_modules/cli-width": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
@@ -1717,13 +1677,13 @@
"dev": true
},
"node_modules/@graphql-tools/graphql-file-loader": {
- "version": "7.5.2",
- "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.2.tgz",
- "integrity": "sha512-4M5c5SRnxTURNwfq46dlEspWGk+nQpO2nF/p9kxaPiXG0iMAQ8suOd3jQk99LEefQpVhFNb5FumyvUnyW0BogA==",
+ "version": "7.5.3",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.3.tgz",
+ "integrity": "sha512-KM2Rg5jWCYH91Vfc3L9bWk0uW7JDeC9+QUTaqY+yUQbjT3RckYOdjPdiLtNMgkJA8r432RM5/Ns/gO8QScOkmQ==",
"dev": true,
"dependencies": {
- "@graphql-tools/import": "6.7.3",
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/import": "6.7.4",
+ "@graphql-tools/utils": "8.10.1",
"globby": "^11.0.3",
"tslib": "^2.4.0",
"unixify": "^1.0.0"
@@ -1732,6 +1692,18 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
+ "node_modules/@graphql-tools/graphql-file-loader/node_modules/@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ }
+ },
"node_modules/@graphql-tools/graphql-file-loader/node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -1761,12 +1733,12 @@
"dev": true
},
"node_modules/@graphql-tools/import": {
- "version": "6.7.3",
- "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.7.3.tgz",
- "integrity": "sha512-7D/nDfwAj1TEkF+vAxm+hxgYNQW3h1kDz8JnYmvvY1Yv7OxZQQHDNd4tVg3BYVtW2kjsz3nzip46Z8ZQ9L7gHg==",
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.7.4.tgz",
+ "integrity": "sha512-fUlX+pVF2X6IiRFE9vUb8/Qiwm2WHadSN5i3YHjtFJ71nUyMeyfbcd6xYAHEpR1mwRCC+8US+JsMlo/KxT4TEA==",
"dev": true,
"dependencies": {
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/utils": "8.10.1",
"resolve-from": "5.0.0",
"tslib": "^2.4.0"
},
@@ -1774,13 +1746,16 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
- "node_modules/@graphql-tools/import/node_modules/resolve-from": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "node_modules/@graphql-tools/import/node_modules/@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
"dev": true,
- "engines": {
- "node": ">=8"
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
"node_modules/@graphql-tools/import/node_modules/tslib": {
@@ -1790,12 +1765,12 @@
"dev": true
},
"node_modules/@graphql-tools/json-file-loader": {
- "version": "7.4.3",
- "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-7.4.3.tgz",
- "integrity": "sha512-YihARAoaGJnYakDAaUkdZ6GsvGcyZRdZK2qx9FWkqtpHt02FLCBpcjjLq/cpM0N6K0ecqzh/dYSVD7MthUFXQg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-7.4.4.tgz",
+ "integrity": "sha512-hQP3+S+59sJQXvP4FW0IUMAVWZtGhHcssoS44tn/fNGJgFeaeRSoDPi2om/NL3RhsgAaQYU8xbscGp2sOwIdFg==",
"dev": true,
"dependencies": {
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/utils": "8.10.1",
"globby": "^11.0.3",
"tslib": "^2.4.0",
"unixify": "^1.0.0"
@@ -1804,6 +1779,18 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
+ "node_modules/@graphql-tools/json-file-loader/node_modules/@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ }
+ },
"node_modules/@graphql-tools/json-file-loader/node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -1811,13 +1798,13 @@
"dev": true
},
"node_modules/@graphql-tools/load": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.7.4.tgz",
- "integrity": "sha512-2VtVWeMNizNTTc8Dv/hs0lrvGHaLko8jpBoP9TewFdBz6pAXPsLHYnNAhEfBYJd+Vk5GZbnWTfVColxhnF8NEQ==",
+ "version": "7.7.5",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.7.5.tgz",
+ "integrity": "sha512-7AnT87hNG37gE8677D9/1P6yaRLKCxi52Ipr1YFN3vSIIARA692nv5/k9PkksHVmJitbvjPu4BxvnVcDOMtMSw==",
"dev": true,
"dependencies": {
- "@graphql-tools/schema": "9.0.1",
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/schema": "9.0.2",
+ "@graphql-tools/utils": "8.10.1",
"p-limit": "3.1.0",
"tslib": "^2.4.0"
},
@@ -1825,6 +1812,46 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
+ "node_modules/@graphql-tools/load/node_modules/@graphql-tools/merge": {
+ "version": "8.3.4",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.4.tgz",
+ "integrity": "sha512-2z1UpHvvI52nQZIYArU+rPq1lOENWetsdb+6vu8yLGyCRP4CpKMBvtmiHkbrlPBO8dItpZ08szXEoaStfJHBxQ==",
+ "dev": true,
+ "dependencies": {
+ "@graphql-tools/utils": "8.10.1",
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ }
+ },
+ "node_modules/@graphql-tools/load/node_modules/@graphql-tools/schema": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.2.tgz",
+ "integrity": "sha512-FnBM1PMKQ6y8KlzeFocnEwcGA/IT++z4v+hvvwwXL+IUYDNqmrp9XYNklpQRb/KKSbTtKnQapCWNiVNex7jl+Q==",
+ "dev": true,
+ "dependencies": {
+ "@graphql-tools/merge": "8.3.4",
+ "@graphql-tools/utils": "8.10.1",
+ "tslib": "^2.4.0",
+ "value-or-promise": "1.0.11"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ }
+ },
+ "node_modules/@graphql-tools/load/node_modules/@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ }
+ },
"node_modules/@graphql-tools/load/node_modules/p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
@@ -1913,6 +1940,32 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
+ "node_modules/@graphql-tools/prisma-loader/node_modules/extract-files": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz",
+ "integrity": "sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==",
+ "dev": true,
+ "engines": {
+ "node": "^10.17.0 || ^12.0.0 || >= 13.7.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jaydenseric"
+ }
+ },
+ "node_modules/@graphql-tools/prisma-loader/node_modules/graphql-request": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-4.3.0.tgz",
+ "integrity": "sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow==",
+ "dev": true,
+ "dependencies": {
+ "cross-fetch": "^3.1.5",
+ "extract-files": "^9.0.0",
+ "form-data": "^3.0.0"
+ },
+ "peerDependencies": {
+ "graphql": "14 - 16"
+ }
+ },
"node_modules/@graphql-tools/prisma-loader/node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -2032,6 +2085,14 @@
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
"dev": true
},
+ "node_modules/@graphql-typed-document-node/core": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.1.1.tgz",
+ "integrity": "sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==",
+ "peerDependencies": {
+ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
+ }
+ },
"node_modules/@humanwhocodes/config-array": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz",
@@ -2056,6 +2117,19 @@
"url": "https://github.com/sponsors/nzakas"
}
},
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
"node_modules/@humanwhocodes/object-schema": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
@@ -2480,33 +2554,25 @@
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"node_modules/@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"node_modules/@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"node_modules/@tsconfig/node16": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"node_modules/@types/js-yaml": {
"version": "4.0.5",
@@ -2542,9 +2608,9 @@
}
},
"node_modules/@types/node": {
- "version": "18.7.9",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.9.tgz",
- "integrity": "sha512-0N5Y1XAdcl865nDdjbO0m3T6FdmQ4ijE89/urOHLREyTXbpMWbSafx9y7XIsgWGtwUP2iYTinLyyW3FatAxBLQ==",
+ "version": "18.7.13",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz",
+ "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==",
"dev": true
},
"node_modules/@types/nodemailer": {
@@ -2621,14 +2687,14 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz",
- "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.35.1.tgz",
+ "integrity": "sha512-RBZZXZlI4XCY4Wzgy64vB+0slT9+yAPQRjj/HSaRwUot33xbDjF1oN9BLwOLTewoOI0jothIltZRe9uJCHf8gg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.33.1",
- "@typescript-eslint/type-utils": "5.33.1",
- "@typescript-eslint/utils": "5.33.1",
+ "@typescript-eslint/scope-manager": "5.35.1",
+ "@typescript-eslint/type-utils": "5.35.1",
+ "@typescript-eslint/utils": "5.35.1",
"debug": "^4.3.4",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.2.0",
@@ -2654,14 +2720,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz",
- "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.35.1.tgz",
+ "integrity": "sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.33.1",
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/typescript-estree": "5.33.1",
+ "@typescript-eslint/scope-manager": "5.35.1",
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/typescript-estree": "5.35.1",
"debug": "^4.3.4"
},
"engines": {
@@ -2681,13 +2747,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz",
- "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.35.1.tgz",
+ "integrity": "sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/visitor-keys": "5.33.1"
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/visitor-keys": "5.35.1"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2698,12 +2764,12 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz",
- "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.35.1.tgz",
+ "integrity": "sha512-8xT8ljvo43Mp7BiTn1vxLXkjpw8wS4oAc00hMSB4L1/jIiYbjjnc3Qp2GAUOG/v8zsNCd1qwcqfCQ0BuishHkw==",
"dev": true,
"dependencies": {
- "@typescript-eslint/utils": "5.33.1",
+ "@typescript-eslint/utils": "5.35.1",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
},
@@ -2724,9 +2790,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz",
- "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.35.1.tgz",
+ "integrity": "sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2737,13 +2803,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz",
- "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.35.1.tgz",
+ "integrity": "sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/visitor-keys": "5.33.1",
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/visitor-keys": "5.35.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -2764,15 +2830,15 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz",
- "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.35.1.tgz",
+ "integrity": "sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.9",
- "@typescript-eslint/scope-manager": "5.33.1",
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/typescript-estree": "5.33.1",
+ "@typescript-eslint/scope-manager": "5.35.1",
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/typescript-estree": "5.35.1",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
},
@@ -2810,12 +2876,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz",
- "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.35.1.tgz",
+ "integrity": "sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.33.1",
+ "@typescript-eslint/types": "5.35.1",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
@@ -3394,12 +3460,6 @@
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
"dev": true
},
- "node_modules/buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
- "dev": true
- },
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
@@ -3806,6 +3866,22 @@
"@iarna/toml": "^2.2.5"
}
},
+ "node_modules/cosmiconfig-typescript-loader": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.0.0.tgz",
+ "integrity": "sha512-cVpucSc2Tf+VPwCCR7SZzmQTQkPbkk4O01yXsYqXBIbjE1bhwqSyAgYQkRK1un4i0OPziTleqFhdkmOc4RQ/9g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ },
+ "peerDependencies": {
+ "@types/node": "*",
+ "cosmiconfig": ">=7",
+ "ts-node": ">=10",
+ "typescript": ">=3"
+ }
+ },
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
@@ -4543,14 +4619,15 @@
}
},
"node_modules/eslint": {
- "version": "8.22.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz",
- "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==",
+ "version": "8.23.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz",
+ "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==",
"dev": true,
"dependencies": {
- "@eslint/eslintrc": "^1.3.0",
+ "@eslint/eslintrc": "^1.3.1",
"@humanwhocodes/config-array": "^0.10.4",
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
+ "@humanwhocodes/module-importer": "^1.0.1",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -4560,7 +4637,7 @@
"eslint-scope": "^7.1.1",
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
- "espree": "^9.3.3",
+ "espree": "^9.4.0",
"esquery": "^1.4.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -4585,8 +4662,7 @@
"regexpp": "^3.2.0",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
- "text-table": "^0.2.0",
- "v8-compile-cache": "^2.0.3"
+ "text-table": "^0.2.0"
},
"bin": {
"eslint": "bin/eslint.js"
@@ -4979,9 +5055,9 @@
}
},
"node_modules/espree": {
- "version": "9.3.3",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz",
- "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==",
+ "version": "9.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
+ "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
"dev": true,
"dependencies": {
"acorn": "^8.8.0",
@@ -5430,9 +5506,9 @@
}
},
"node_modules/globals": {
- "version": "13.15.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz",
- "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==",
+ "version": "13.17.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
+ "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
"dev": true,
"dependencies": {
"type-fest": "^0.20.2"
@@ -5479,12 +5555,11 @@
}
},
"node_modules/graphql-config": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.3.1.tgz",
- "integrity": "sha512-czBWzJSGaLJfOHBLuUTZVRTjfgohPfvlaeN1B5nXBVptFARpiFuS7iI4FnRhCGwm6qt1h2j1g05nkg0OIGA6bg==",
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.3.5.tgz",
+ "integrity": "sha512-B4jXhHL7j3llCem+ACeo48wvVYhtJxRyt5SfSnvywbRlVYyUzt5ibZV6WJU2Yii2/rcVRIGi7BHDgcAPWdWdJg==",
"dev": true,
"dependencies": {
- "@endemolshinegroup/cosmiconfig-typescript-loader": "3.0.2",
"@graphql-tools/graphql-file-loader": "^7.3.7",
"@graphql-tools/json-file-loader": "^7.3.7",
"@graphql-tools/load": "^7.5.5",
@@ -5493,8 +5568,11 @@
"@graphql-tools/utils": "^8.6.5",
"cosmiconfig": "7.0.1",
"cosmiconfig-toml-loader": "1.0.0",
+ "cosmiconfig-typescript-loader": "^4.0.0",
"minimatch": "4.2.1",
- "string-env-interpolation": "1.0.1"
+ "string-env-interpolation": "1.0.1",
+ "ts-node": "^10.8.1",
+ "tslib": "^2.4.0"
},
"engines": {
"node": ">= 10.0.0"
@@ -5515,11 +5593,18 @@
"node": ">=10"
}
},
+ "node_modules/graphql-config/node_modules/tslib": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "dev": true
+ },
"node_modules/graphql-request": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-4.3.0.tgz",
- "integrity": "sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-5.0.0.tgz",
+ "integrity": "sha512-SpVEnIo2J5k2+Zf76cUkdvIRaq5FMZvGQYnA4lUWYbc99m+fHh4CZYRRO/Ff4tCLQ613fzCm3SiDT64ubW5Gyw==",
"dependencies": {
+ "@graphql-typed-document-node/core": "^3.1.1",
"cross-fetch": "^3.1.5",
"extract-files": "^9.0.0",
"form-data": "^3.0.0"
@@ -5755,6 +5840,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/import-fresh/node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/import-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/import-from/-/import-from-4.0.0.tgz",
@@ -6411,12 +6505,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
- "node_modules/lodash.get": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
- "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
- "dev": true
- },
"node_modules/lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
@@ -7756,12 +7844,12 @@
}
},
"node_modules/resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true,
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
"node_modules/restore-cursor": {
@@ -8025,15 +8113,6 @@
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
"dev": true
},
- "node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
@@ -8042,16 +8121,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/source-map-support": {
- "version": "0.5.21",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
- "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
- "dev": true,
- "dependencies": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
"node_modules/sponge-case": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sponge-case/-/sponge-case-1.0.1.tgz",
@@ -8375,8 +8444,6 @@
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
@@ -8420,8 +8487,6 @@
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"dev": true,
- "optional": true,
- "peer": true,
"engines": {
"node": ">=0.4.0"
}
@@ -8430,9 +8495,7 @@
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"node_modules/ts-unused-exports": {
"version": "8.0.0",
@@ -8524,9 +8587,9 @@
}
},
"node_modules/typescript": {
- "version": "4.7.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
- "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+ "version": "4.8.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+ "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -8697,19 +8760,11 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
- "node_modules/v8-compile-cache": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
- "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
- "dev": true
- },
"node_modules/v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"node_modules/value-or-promise": {
"version": "1.0.11",
@@ -9755,8 +9810,6 @@
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@jridgewell/trace-mapping": "0.3.9"
},
@@ -9766,8 +9819,6 @@
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
@@ -9792,46 +9843,6 @@
"integrity": "sha512-7PV6XCS5qC28oaEKWUUXLxiewoj3Z0EfdCdxX5D6Vy5wtC/rYuCO15XOOupUcnwBaNR+Xm/bfmsCe1KJtEfE7g==",
"dev": true
},
- "@endemolshinegroup/cosmiconfig-typescript-loader": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz",
- "integrity": "sha512-QRVtqJuS1mcT56oHpVegkKBlgtWjXw/gHNWO3eL9oyB5Sc7HBoc2OLG/nYpVfT/Jejvo3NUrD0Udk7XgoyDKkA==",
- "dev": true,
- "requires": {
- "lodash.get": "^4",
- "make-error": "^1",
- "ts-node": "^9",
- "tslib": "^2"
- },
- "dependencies": {
- "arg": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
- "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "dev": true
- },
- "ts-node": {
- "version": "9.1.1",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
- "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
- "dev": true,
- "requires": {
- "arg": "^4.1.0",
- "create-require": "^1.1.0",
- "diff": "^4.0.1",
- "make-error": "^1.1.1",
- "source-map-support": "^0.5.17",
- "yn": "3.1.1"
- }
- },
- "tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
- "dev": true
- }
- }
- },
"@esbuild/linux-loong64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
@@ -9840,14 +9851,14 @@
"optional": true
},
"@eslint/eslintrc": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
- "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
+ "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.3.2",
+ "espree": "^9.4.0",
"globals": "^13.15.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -9882,9 +9893,9 @@
"integrity": "sha512-aSyb02SPBkLKcpy6OIQH535C8CZSX++Cq+48Ayj6fFbXM99IB+E6M0jwSf7VHyGReeGFpNS3fpi9+7gfInsoJg=="
},
"@graphql-codegen/cli": {
- "version": "2.11.6",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.11.6.tgz",
- "integrity": "sha512-0R2Bhgjt3XZTSdsn8MGGuJjDEN2z+KCo7920zLZz9boy6bQ0EyuxS9AUATePS9aC3djy2POAIPCHz8iHK68IlQ==",
+ "version": "2.11.8",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.11.8.tgz",
+ "integrity": "sha512-LFEgDk+ShNsuy8GVR8bkLcfvvq6ugq3NmDsHYzCtJO/NW/8InQeqoH2X4e+7YhS/4M9iA2vdzSk0hSsv610Oww==",
"dev": true,
"requires": {
"@graphql-codegen/core": "2.6.2",
@@ -9899,14 +9910,14 @@
"@graphql-tools/prisma-loader": "^7.2.7",
"@graphql-tools/url-loader": "^7.13.2",
"@graphql-tools/utils": "^8.9.0",
- "@whatwg-node/fetch": "^0.2.3",
+ "@whatwg-node/fetch": "^0.3.0",
"ansi-escapes": "^4.3.1",
"chalk": "^4.1.0",
"chokidar": "^3.5.2",
"cosmiconfig": "^7.0.0",
"debounce": "^1.2.0",
"detect-indent": "^6.0.0",
- "graphql-config": "^4.3.1",
+ "graphql-config": "^4.3.4",
"inquirer": "^8.0.0",
"is-glob": "^4.0.1",
"json-to-pretty-yaml": "^1.2.2",
@@ -9920,6 +9931,23 @@
"yargs": "^17.0.0"
},
"dependencies": {
+ "@whatwg-node/fetch": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.3.2.tgz",
+ "integrity": "sha512-Bs5zAWQs0tXsLa4mRmLw7Psps1EN78vPtgcLpw3qPY8s6UYPUM67zFZ9cy+7tZ64PXhfwzxJn+m7RH2Lq48RNQ==",
+ "dev": true,
+ "requires": {
+ "@peculiar/webcrypto": "^1.4.0",
+ "abort-controller": "^3.0.0",
+ "busboy": "^1.6.0",
+ "event-target-polyfill": "^0.0.3",
+ "form-data-encoder": "^1.7.1",
+ "formdata-node": "^4.3.1",
+ "node-fetch": "^2.6.7",
+ "undici": "^5.8.0",
+ "web-streams-polyfill": "^3.2.0"
+ }
+ },
"cli-width": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
@@ -10313,18 +10341,27 @@
}
},
"@graphql-tools/graphql-file-loader": {
- "version": "7.5.2",
- "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.2.tgz",
- "integrity": "sha512-4M5c5SRnxTURNwfq46dlEspWGk+nQpO2nF/p9kxaPiXG0iMAQ8suOd3jQk99LEefQpVhFNb5FumyvUnyW0BogA==",
+ "version": "7.5.3",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.3.tgz",
+ "integrity": "sha512-KM2Rg5jWCYH91Vfc3L9bWk0uW7JDeC9+QUTaqY+yUQbjT3RckYOdjPdiLtNMgkJA8r432RM5/Ns/gO8QScOkmQ==",
"dev": true,
"requires": {
- "@graphql-tools/import": "6.7.3",
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/import": "6.7.4",
+ "@graphql-tools/utils": "8.10.1",
"globby": "^11.0.3",
"tslib": "^2.4.0",
"unixify": "^1.0.0"
},
"dependencies": {
+ "@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.4.0"
+ }
+ },
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -10355,21 +10392,24 @@
}
},
"@graphql-tools/import": {
- "version": "6.7.3",
- "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.7.3.tgz",
- "integrity": "sha512-7D/nDfwAj1TEkF+vAxm+hxgYNQW3h1kDz8JnYmvvY1Yv7OxZQQHDNd4tVg3BYVtW2kjsz3nzip46Z8ZQ9L7gHg==",
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.7.4.tgz",
+ "integrity": "sha512-fUlX+pVF2X6IiRFE9vUb8/Qiwm2WHadSN5i3YHjtFJ71nUyMeyfbcd6xYAHEpR1mwRCC+8US+JsMlo/KxT4TEA==",
"dev": true,
"requires": {
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/utils": "8.10.1",
"resolve-from": "5.0.0",
"tslib": "^2.4.0"
},
"dependencies": {
- "resolve-from": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
- "dev": true
+ "@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.4.0"
+ }
},
"tslib": {
"version": "2.4.0",
@@ -10380,17 +10420,26 @@
}
},
"@graphql-tools/json-file-loader": {
- "version": "7.4.3",
- "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-7.4.3.tgz",
- "integrity": "sha512-YihARAoaGJnYakDAaUkdZ6GsvGcyZRdZK2qx9FWkqtpHt02FLCBpcjjLq/cpM0N6K0ecqzh/dYSVD7MthUFXQg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-7.4.4.tgz",
+ "integrity": "sha512-hQP3+S+59sJQXvP4FW0IUMAVWZtGhHcssoS44tn/fNGJgFeaeRSoDPi2om/NL3RhsgAaQYU8xbscGp2sOwIdFg==",
"dev": true,
"requires": {
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/utils": "8.10.1",
"globby": "^11.0.3",
"tslib": "^2.4.0",
"unixify": "^1.0.0"
},
"dependencies": {
+ "@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.4.0"
+ }
+ },
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -10400,17 +10449,48 @@
}
},
"@graphql-tools/load": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.7.4.tgz",
- "integrity": "sha512-2VtVWeMNizNTTc8Dv/hs0lrvGHaLko8jpBoP9TewFdBz6pAXPsLHYnNAhEfBYJd+Vk5GZbnWTfVColxhnF8NEQ==",
+ "version": "7.7.5",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.7.5.tgz",
+ "integrity": "sha512-7AnT87hNG37gE8677D9/1P6yaRLKCxi52Ipr1YFN3vSIIARA692nv5/k9PkksHVmJitbvjPu4BxvnVcDOMtMSw==",
"dev": true,
"requires": {
- "@graphql-tools/schema": "9.0.1",
- "@graphql-tools/utils": "8.10.0",
+ "@graphql-tools/schema": "9.0.2",
+ "@graphql-tools/utils": "8.10.1",
"p-limit": "3.1.0",
"tslib": "^2.4.0"
},
"dependencies": {
+ "@graphql-tools/merge": {
+ "version": "8.3.4",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.4.tgz",
+ "integrity": "sha512-2z1UpHvvI52nQZIYArU+rPq1lOENWetsdb+6vu8yLGyCRP4CpKMBvtmiHkbrlPBO8dItpZ08szXEoaStfJHBxQ==",
+ "dev": true,
+ "requires": {
+ "@graphql-tools/utils": "8.10.1",
+ "tslib": "^2.4.0"
+ }
+ },
+ "@graphql-tools/schema": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.2.tgz",
+ "integrity": "sha512-FnBM1PMKQ6y8KlzeFocnEwcGA/IT++z4v+hvvwwXL+IUYDNqmrp9XYNklpQRb/KKSbTtKnQapCWNiVNex7jl+Q==",
+ "dev": true,
+ "requires": {
+ "@graphql-tools/merge": "8.3.4",
+ "@graphql-tools/utils": "8.10.1",
+ "tslib": "^2.4.0",
+ "value-or-promise": "1.0.11"
+ }
+ },
+ "@graphql-tools/utils": {
+ "version": "8.10.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.10.1.tgz",
+ "integrity": "sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.4.0"
+ }
+ },
"p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
@@ -10490,6 +10570,23 @@
"yaml-ast-parser": "^0.0.43"
},
"dependencies": {
+ "extract-files": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz",
+ "integrity": "sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==",
+ "dev": true
+ },
+ "graphql-request": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-4.3.0.tgz",
+ "integrity": "sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow==",
+ "dev": true,
+ "requires": {
+ "cross-fetch": "^3.1.5",
+ "extract-files": "^9.0.0",
+ "form-data": "^3.0.0"
+ }
+ },
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
@@ -10606,6 +10703,12 @@
}
}
},
+ "@graphql-typed-document-node/core": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.1.1.tgz",
+ "integrity": "sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==",
+ "requires": {}
+ },
"@humanwhocodes/config-array": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz",
@@ -10623,6 +10726,12 @@
"integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==",
"dev": true
},
+ "@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true
+ },
"@humanwhocodes/object-schema": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
@@ -10900,33 +11009,25 @@
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"@tsconfig/node16": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"@types/js-yaml": {
"version": "4.0.5",
@@ -10962,9 +11063,9 @@
}
},
"@types/node": {
- "version": "18.7.9",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.9.tgz",
- "integrity": "sha512-0N5Y1XAdcl865nDdjbO0m3T6FdmQ4ijE89/urOHLREyTXbpMWbSafx9y7XIsgWGtwUP2iYTinLyyW3FatAxBLQ==",
+ "version": "18.7.13",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz",
+ "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==",
"dev": true
},
"@types/nodemailer": {
@@ -11041,14 +11142,14 @@
}
},
"@typescript-eslint/eslint-plugin": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz",
- "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.35.1.tgz",
+ "integrity": "sha512-RBZZXZlI4XCY4Wzgy64vB+0slT9+yAPQRjj/HSaRwUot33xbDjF1oN9BLwOLTewoOI0jothIltZRe9uJCHf8gg==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "5.33.1",
- "@typescript-eslint/type-utils": "5.33.1",
- "@typescript-eslint/utils": "5.33.1",
+ "@typescript-eslint/scope-manager": "5.35.1",
+ "@typescript-eslint/type-utils": "5.35.1",
+ "@typescript-eslint/utils": "5.35.1",
"debug": "^4.3.4",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.2.0",
@@ -11058,52 +11159,52 @@
}
},
"@typescript-eslint/parser": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz",
- "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.35.1.tgz",
+ "integrity": "sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "5.33.1",
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/typescript-estree": "5.33.1",
+ "@typescript-eslint/scope-manager": "5.35.1",
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/typescript-estree": "5.35.1",
"debug": "^4.3.4"
}
},
"@typescript-eslint/scope-manager": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz",
- "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.35.1.tgz",
+ "integrity": "sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/visitor-keys": "5.33.1"
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/visitor-keys": "5.35.1"
}
},
"@typescript-eslint/type-utils": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz",
- "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.35.1.tgz",
+ "integrity": "sha512-8xT8ljvo43Mp7BiTn1vxLXkjpw8wS4oAc00hMSB4L1/jIiYbjjnc3Qp2GAUOG/v8zsNCd1qwcqfCQ0BuishHkw==",
"dev": true,
"requires": {
- "@typescript-eslint/utils": "5.33.1",
+ "@typescript-eslint/utils": "5.35.1",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/types": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz",
- "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.35.1.tgz",
+ "integrity": "sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz",
- "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.35.1.tgz",
+ "integrity": "sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/visitor-keys": "5.33.1",
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/visitor-keys": "5.35.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -11112,15 +11213,15 @@
}
},
"@typescript-eslint/utils": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz",
- "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.35.1.tgz",
+ "integrity": "sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.9",
- "@typescript-eslint/scope-manager": "5.33.1",
- "@typescript-eslint/types": "5.33.1",
- "@typescript-eslint/typescript-estree": "5.33.1",
+ "@typescript-eslint/scope-manager": "5.35.1",
+ "@typescript-eslint/types": "5.35.1",
+ "@typescript-eslint/typescript-estree": "5.35.1",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
},
@@ -11144,12 +11245,12 @@
}
},
"@typescript-eslint/visitor-keys": {
- "version": "5.33.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz",
- "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==",
+ "version": "5.35.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.35.1.tgz",
+ "integrity": "sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.33.1",
+ "@typescript-eslint/types": "5.35.1",
"eslint-visitor-keys": "^3.3.0"
}
},
@@ -11562,12 +11663,6 @@
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
"dev": true
},
- "buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
- "dev": true
- },
"busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
@@ -11902,6 +11997,13 @@
"@iarna/toml": "^2.2.5"
}
},
+ "cosmiconfig-typescript-loader": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.0.0.tgz",
+ "integrity": "sha512-cVpucSc2Tf+VPwCCR7SZzmQTQkPbkk4O01yXsYqXBIbjE1bhwqSyAgYQkRK1un4i0OPziTleqFhdkmOc4RQ/9g==",
+ "dev": true,
+ "requires": {}
+ },
"create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
@@ -12379,14 +12481,15 @@
"dev": true
},
"eslint": {
- "version": "8.22.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz",
- "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==",
+ "version": "8.23.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz",
+ "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==",
"dev": true,
"requires": {
- "@eslint/eslintrc": "^1.3.0",
+ "@eslint/eslintrc": "^1.3.1",
"@humanwhocodes/config-array": "^0.10.4",
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
+ "@humanwhocodes/module-importer": "^1.0.1",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -12396,7 +12499,7 @@
"eslint-scope": "^7.1.1",
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
- "espree": "^9.3.3",
+ "espree": "^9.4.0",
"esquery": "^1.4.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -12421,8 +12524,7 @@
"regexpp": "^3.2.0",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
- "text-table": "^0.2.0",
- "v8-compile-cache": "^2.0.3"
+ "text-table": "^0.2.0"
},
"dependencies": {
"find-up": {
@@ -12715,9 +12817,9 @@
"dev": true
},
"espree": {
- "version": "9.3.3",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz",
- "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==",
+ "version": "9.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
+ "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
"dev": true,
"requires": {
"acorn": "^8.8.0",
@@ -13055,9 +13157,9 @@
}
},
"globals": {
- "version": "13.15.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz",
- "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==",
+ "version": "13.17.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
+ "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
"dev": true,
"requires": {
"type-fest": "^0.20.2"
@@ -13089,12 +13191,11 @@
"integrity": "sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw=="
},
"graphql-config": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.3.1.tgz",
- "integrity": "sha512-czBWzJSGaLJfOHBLuUTZVRTjfgohPfvlaeN1B5nXBVptFARpiFuS7iI4FnRhCGwm6qt1h2j1g05nkg0OIGA6bg==",
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.3.5.tgz",
+ "integrity": "sha512-B4jXhHL7j3llCem+ACeo48wvVYhtJxRyt5SfSnvywbRlVYyUzt5ibZV6WJU2Yii2/rcVRIGi7BHDgcAPWdWdJg==",
"dev": true,
"requires": {
- "@endemolshinegroup/cosmiconfig-typescript-loader": "3.0.2",
"@graphql-tools/graphql-file-loader": "^7.3.7",
"@graphql-tools/json-file-loader": "^7.3.7",
"@graphql-tools/load": "^7.5.5",
@@ -13103,8 +13204,11 @@
"@graphql-tools/utils": "^8.6.5",
"cosmiconfig": "7.0.1",
"cosmiconfig-toml-loader": "1.0.0",
+ "cosmiconfig-typescript-loader": "^4.0.0",
"minimatch": "4.2.1",
- "string-env-interpolation": "1.0.1"
+ "string-env-interpolation": "1.0.1",
+ "ts-node": "^10.8.1",
+ "tslib": "^2.4.0"
},
"dependencies": {
"minimatch": {
@@ -13115,14 +13219,21 @@
"requires": {
"brace-expansion": "^1.1.7"
}
+ },
+ "tslib": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "dev": true
}
}
},
"graphql-request": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-4.3.0.tgz",
- "integrity": "sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-5.0.0.tgz",
+ "integrity": "sha512-SpVEnIo2J5k2+Zf76cUkdvIRaq5FMZvGQYnA4lUWYbc99m+fHh4CZYRRO/Ff4tCLQ613fzCm3SiDT64ubW5Gyw==",
"requires": {
+ "@graphql-typed-document-node/core": "^3.1.1",
"cross-fetch": "^3.1.5",
"extract-files": "^9.0.0",
"form-data": "^3.0.0"
@@ -13283,6 +13394,14 @@
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
+ },
+ "dependencies": {
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ }
}
},
"import-from": {
@@ -13786,12 +13905,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
- "lodash.get": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
- "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
- "dev": true
- },
"lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
@@ -14744,9 +14857,9 @@
}
},
"resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true
},
"restore-cursor": {
@@ -14951,27 +15064,11 @@
}
}
},
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- },
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
},
- "source-map-support": {
- "version": "0.5.21",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
- "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
- "dev": true,
- "requires": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
"sponge-case": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sponge-case/-/sponge-case-1.0.1.tgz",
@@ -15232,8 +15329,6 @@
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
@@ -15254,17 +15349,13 @@
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
}
}
},
@@ -15329,9 +15420,9 @@
"dev": true
},
"typescript": {
- "version": "4.7.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
- "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+ "version": "4.8.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+ "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
"dev": true
},
"ua-parser-js": {
@@ -15453,19 +15544,11 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
- "v8-compile-cache": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
- "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
- "dev": true
- },
"v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
- "dev": true,
- "optional": true,
- "peer": true
+ "dev": true
},
"value-or-promise": {
"version": "1.0.11",
diff --git a/package.json b/package.json
index 3917375..07a0d13 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
"@tippyjs/react": "^4.2.6",
"@types/ua-parser-js": "^0.7.36",
"autoprefixer": "^10.4.8",
- "graphql-request": "^4.3.0",
+ "graphql-request": "^5.0.0",
"markdown-to-jsx": "^7.1.7",
"meilisearch": "^0.27.0",
"next": "^12.2.5",
@@ -42,20 +42,20 @@
},
"devDependencies": {
"@digitak/esrun": "^3.2.10",
- "@graphql-codegen/cli": "^2.11.6",
+ "@graphql-codegen/cli": "^2.11.8",
"@graphql-codegen/typescript": "2.7.3",
"@graphql-codegen/typescript-graphql-request": "^4.5.3",
"@graphql-codegen/typescript-operations": "^2.5.3",
- "@types/node": "18.7.9",
+ "@types/node": "18.7.13",
"@types/nodemailer": "^6.4.5",
"@types/react": "18.0.17",
"@types/react-dom": "^18.0.6",
"@types/throttle-debounce": "^5.0.0",
"@types/turndown": "^5.0.1",
- "@typescript-eslint/eslint-plugin": "^5.33.1",
- "@typescript-eslint/parser": "^5.33.1",
+ "@typescript-eslint/eslint-plugin": "^5.35.1",
+ "@typescript-eslint/parser": "^5.35.1",
"dotenv": "^16.0.1",
- "eslint": "^8.22.0",
+ "eslint": "^8.23.0",
"eslint-config-next": "12.2.5",
"eslint-plugin-import": "^2.26.0",
"graphql": "^16.6.0",
@@ -64,6 +64,6 @@
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.1.8",
"ts-unused-exports": "^8.0.0",
- "typescript": "^4.7.4"
+ "typescript": "^4.8.2"
}
}
diff --git a/src/graphql/fetchLocalData.ts b/src/graphql/fetchLocalData.ts
index cf0ae3b..1e558d7 100644
--- a/src/graphql/fetchLocalData.ts
+++ b/src/graphql/fetchLocalData.ts
@@ -13,6 +13,7 @@ const LOCAL_DATA_FOLDER = `${process.cwd()}/public/local-data`;
const writeLocalData = (name: LocalDataFile, localData: unknown) => {
const path = `${LOCAL_DATA_FOLDER}/${name}.json`;
writeFileSync(path, JSON.stringify(localData), { encoding: "utf-8" });
+ console.log(`${path} has been written!`)
};
const readLocalData = (name: LocalDataFile): T => {
--
2.40.1