Fix send function headers error

This commit is contained in:
venashial
2022-06-25 13:08:20 -07:00
parent e9d7df8862
commit fb3a9f1f29
7 changed files with 35 additions and 22 deletions

View File

@@ -1,9 +1,5 @@
# Omorphia
_The Modrinth frontend library_
---
Omorphia is Modrinth's component, style, and utility library for Svelte projects. It includes:
- 🧩 Typed components which enhance HTML elements and provide a consistent UI

View File

@@ -2,7 +2,7 @@
import { page } from '$app/stores'
import IconMenu from 'virtual:icons/lucide/menu'
const cleanPath = (it) => it.replace(/\.\.\/routes\/.*\//, '').replace('.md', '')
const cleanPath = (it: string) => it.replace(/\.\.\/routes\/.*\//, '').replace('.md', '')
const components = Object.keys(import.meta.glob('../routes/components/**'))
.map(cleanPath)

View File

@@ -16,6 +16,10 @@ Omorphia is used in [Knossos](https://github.com/modrinth/knossos) (modrinth.com
It uses [Svelte](https://svelte.dev/) to deliver the best performance with the least boilerplate.
## Try Omorphia online
You can try Omorphia online via [➜ **CodeSandbox** 💻](https://codesandbox.io/s/omorphia-starter-bsbgke).
## Getting started
Follow the instructions on the [➜ setup page 🛠️](/setup).
Follow the instructions on the [**setup page** 🛠️](/setup).

View File

@@ -43,7 +43,6 @@
"mdsvex": "^0.10.5",
"mdsvexamples": "^0.3.0",
"merge-dirs": "^0.2.1",
"micromatch": "^4.0.5",
"nodemon": "^2.0.15",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0",
@@ -51,6 +50,7 @@
"svelte": "^3.48.0",
"svelte-check": "^2.7.2",
"svelte-intl-precompile": "^0.11.1",
"svelte-preprocess": "^4.10.7",
"svelte2tsx": "^0.5.5",
"tslib": "^2.3.1",
"typescript": "~4.6.2"
@@ -81,7 +81,6 @@
"postcss-preset-env": "^7.7.1",
"postcss-pxtorem": "^6.0.0",
"sanitize.css": "^13.0.0",
"svelte-preprocess": "^4.10.1",
"svelte-tiny-virtual-list": "^2.0.1",
"svelte-use-click-outside": "^1.0.0",
"throttle-debounce": "^3.0.1",

40
pnpm-lock.yaml generated
View File

@@ -27,7 +27,6 @@ specifiers:
mdsvex: ^0.10.5
mdsvexamples: ^0.3.0
merge-dirs: ^0.2.1
micromatch: ^4.0.5
nodemon: ^2.0.15
openapi-typescript: ^5.4.0
postcss: ^8.4.8
@@ -46,7 +45,7 @@ specifiers:
svelte: ^3.48.0
svelte-check: ^2.7.2
svelte-intl-precompile: ^0.11.1
svelte-preprocess: ^4.10.1
svelte-preprocess: ^4.10.7
svelte-tiny-virtual-list: ^2.0.1
svelte-use-click-outside: ^1.0.0
svelte2tsx: ^0.5.5
@@ -82,7 +81,6 @@ dependencies:
postcss-preset-env: 7.7.1_postcss@8.4.8
postcss-pxtorem: 6.0.0_postcss@8.4.8
sanitize.css: 13.0.0
svelte-preprocess: 4.10.4_44qe5g6fi6uxvss56imdgyaaty
svelte-tiny-virtual-list: 2.0.1
svelte-use-click-outside: 1.0.0
throttle-debounce: 3.0.1
@@ -102,7 +100,6 @@ devDependencies:
mdsvex: 0.10.5_svelte@3.48.0
mdsvexamples: 0.3.0
merge-dirs: 0.2.1
micromatch: 4.0.5
nodemon: 2.0.15
prettier: 2.6.2
prettier-plugin-svelte: 2.7.0_kkjbqzpydplecjtkxrgomroeru
@@ -110,6 +107,7 @@ devDependencies:
svelte: 3.48.0
svelte-check: 2.7.2_2pvebpkgu3ohgo43qaf5qmcxwm
svelte-intl-precompile: 0.11.1_svelte@3.48.0
svelte-preprocess: 4.10.7_44qe5g6fi6uxvss56imdgyaaty
svelte2tsx: 0.5.5_c64miirrcucob5yjzfkddrmila
tslib: 2.3.1
typescript: 4.6.2
@@ -1169,6 +1167,7 @@ packages:
/@types/node/17.0.21:
resolution: {integrity: sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==}
dev: true
/@types/offscreencanvas/2019.6.4:
resolution: {integrity: sha512-u8SAgdZ8ROtkTF+mfZGOscl0or6BSj9A4g37e6nvxDc+YB/oDut0wHkK2PBBiC2bNR8TS0CPV+1gAk4fNisr1Q==}
@@ -1176,6 +1175,7 @@ packages:
/@types/pug/2.0.6:
resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==}
dev: true
/@types/resolve/1.17.1:
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
@@ -1193,6 +1193,7 @@ packages:
resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==}
dependencies:
'@types/node': 17.0.21
dev: true
/@types/throttle-debounce/2.1.0:
resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==}
@@ -1604,7 +1605,8 @@ packages:
picocolors: 1.0.0
/buffer-crc32/0.2.13:
resolution: {integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=}
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
dev: true
/buffer-equal/0.0.1:
resolution: {integrity: sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=}
@@ -2053,6 +2055,7 @@ packages:
/detect-indent/6.1.0:
resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==}
engines: {node: '>=8'}
dev: true
/detect-libc/2.0.1:
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
@@ -2142,7 +2145,8 @@ packages:
dev: false
/es6-promise/3.3.1:
resolution: {integrity: sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=}
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
dev: true
/esbuild-android-64/0.14.30:
resolution: {integrity: sha512-vdJ7t8A8msPfKpYUGUV/KaTQRiZ0vDa2XSTlzXVkGGVHLKPeb85PBUtYJcEgw3htW3IdX5i1t1IMdQCwJJgNAg==}
@@ -2836,6 +2840,7 @@ packages:
/graceful-fs/4.2.9:
resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==}
dev: true
/has-ansi/2.0.0:
resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==}
@@ -3256,6 +3261,7 @@ packages:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
dependencies:
sourcemap-codec: 1.4.8
dev: true
/magic-string/0.26.2:
resolution: {integrity: sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==}
@@ -3375,6 +3381,7 @@ packages:
/min-indent/1.0.1:
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
engines: {node: '>=4'}
dev: true
/minimatch/3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
@@ -4681,6 +4688,7 @@ packages:
hasBin: true
dependencies:
glob: 7.2.0
dev: true
/rimraf/3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
@@ -4746,12 +4754,13 @@ packages:
dev: false
/sander/0.5.1:
resolution: {integrity: sha1-dB4kXiMfB8r7b98PEzrfohalAq0=}
resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==}
dependencies:
es6-promise: 3.3.1
graceful-fs: 4.2.9
mkdirp: 0.5.5
rimraf: 2.7.1
dev: true
/sanitize.css/13.0.0:
resolution: {integrity: sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA==}
@@ -4859,13 +4868,14 @@ packages:
dev: true
/sorcery/0.10.0:
resolution: {integrity: sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=}
resolution: {integrity: sha512-R5ocFmKZQFfSTstfOtHjJuAwbpGyf9qjQa1egyhvXSbM7emjrtLXtGdZsDJDABC85YBfVvrOiGWKSYXPKdvP1g==}
hasBin: true
dependencies:
buffer-crc32: 0.2.13
minimist: 1.2.5
sander: 0.5.1
sourcemap-codec: 1.4.8
dev: true
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
@@ -4883,6 +4893,7 @@ packages:
/sourcemap-codec/1.4.8:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
dev: true
/sprintf-js/1.0.3:
resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=}
@@ -4947,6 +4958,7 @@ packages:
engines: {node: '>=8'}
dependencies:
min-indent: 1.0.1
dev: true
/strip-json-comments/2.0.1:
resolution: {integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=}
@@ -5004,7 +5016,7 @@ packages:
rollup: 2.70.0
rollup-plugin-svelte: 7.1.0_7kcxvcbulooiu4lbzbqujygbhi
svelte: 3.48.0
svelte-preprocess: 4.10.4_44qe5g6fi6uxvss56imdgyaaty
svelte-preprocess: 4.10.7_44qe5g6fi6uxvss56imdgyaaty
typescript: 4.6.2
transitivePeerDependencies:
- '@babel/core'
@@ -5032,7 +5044,7 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
svelte: 3.48.0
svelte-preprocess: 4.10.4_44qe5g6fi6uxvss56imdgyaaty
svelte-preprocess: 4.10.7_44qe5g6fi6uxvss56imdgyaaty
typescript: 4.6.2
transitivePeerDependencies:
- '@babel/core'
@@ -5070,8 +5082,8 @@ packages:
- svelte
dev: true
/svelte-preprocess/4.10.4_44qe5g6fi6uxvss56imdgyaaty:
resolution: {integrity: sha512-fuwol0N4UoHsNQolLFbMqWivqcJ9N0vfWO9IuPAiX/5okfoGXURyJ6nECbuEIv0nU3M8Xe2I1ONNje2buk7l6A==}
/svelte-preprocess/4.10.7_44qe5g6fi6uxvss56imdgyaaty:
resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==}
engines: {node: '>= 9.11.2'}
requiresBuild: true
peerDependencies:
@@ -5080,7 +5092,7 @@ packages:
less: ^3.11.3 || ^4.0.0
node-sass: '*'
postcss: ^7 || ^8
postcss-load-config: ^2.1.0 || ^3.0.0
postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0
pug: ^3.0.0
sass: ^1.26.8
stylus: ^0.55.0
@@ -5121,6 +5133,7 @@ packages:
strip-indent: 3.0.0
svelte: 3.48.0
typescript: 4.6.2
dev: true
/svelte-tiny-virtual-list/2.0.1:
resolution: {integrity: sha512-0X6k5cZxF9yRLfVJ1bfwQmfEMbd3OSNNM/tI9y44jYbsB/FkI2GEIKpeV5J8AQy87qFU9xnPLxxo3erQFfdC2A==}
@@ -5299,6 +5312,7 @@ packages:
resolution: {integrity: sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/undefsafe/2.0.5:
resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==}

View File

@@ -35,6 +35,7 @@ export async function send<Operation extends keyof operations>(
const fetchOptions: RequestInit = {
method,
headers: {},
}
const token = get(tokenStore) || options.token

View File

@@ -7,7 +7,6 @@ import path from 'path'
import { preprocess, plugins } from './src/config/svelte.js'
import Generator from './src/plugins/generator/index.js'
import precompileIntl from 'svelte-intl-precompile/sveltekit-plugin'
import mm from 'micromatch'
/** @type {import('@sveltejs/kit').Config} */
export default {