mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
chore: bump openapi-ts dep version to fix slow gen
This commit is contained in:
1
docs/generated/tunarr-v0.21.6-openapi.json
Normal file
1
docs/generated/tunarr-v0.21.6-openapi.json
Normal file
File diff suppressed because one or more lines are too long
39
pnpm-lock.yaml
generated
39
pnpm-lock.yaml
generated
@@ -581,11 +581,11 @@ importers:
|
||||
version: 4.4.6(@types/react@18.2.15)(immer@10.0.3)(react@18.2.0)
|
||||
devDependencies:
|
||||
'@hey-api/openapi-ts':
|
||||
specifier: 0.80.12
|
||||
version: 0.80.12(magicast@0.3.5)(typescript@5.7.3)
|
||||
specifier: 0.80.16
|
||||
version: 0.80.16(magicast@0.3.5)(typescript@5.7.3)
|
||||
'@hey-api/vite-plugin':
|
||||
specifier: ^0.2.0
|
||||
version: 0.2.0(@hey-api/openapi-ts@0.80.12(magicast@0.3.5)(typescript@5.7.3))
|
||||
version: 0.2.0(@hey-api/openapi-ts@0.80.16(magicast@0.3.5)(typescript@5.7.3))
|
||||
'@tanstack/react-table':
|
||||
specifier: 8.19.3
|
||||
version: 8.19.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
|
||||
@@ -1761,8 +1761,8 @@ packages:
|
||||
resolution: {integrity: sha512-yktiFZoWPtEW8QKS65eqKwA5MTKp88CyiL8q72WynrBs/73SAaxlSWlA2zW/DZlywZ5hX1OYzrCC0wFdvO9c2w==}
|
||||
engines: {node: '>= 16'}
|
||||
|
||||
'@hey-api/openapi-ts@0.80.12':
|
||||
resolution: {integrity: sha512-uMAfH20uCJT3mv4c3UK/n3Phr7DRBOrz+yOW9gtYOdeF1rWfWDDRedfXp5AymkQa56HWQd2q5JU5oXlclVyvTA==}
|
||||
'@hey-api/openapi-ts@0.80.16':
|
||||
resolution: {integrity: sha512-FzLmiajysUyOeGh0D2Va1IXVlWvQZNd6OYoNNbbIQhWIJTHWwuTd6KUit2WpaHAzxl+KmJgxh4yrewZy/u8y5w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=22.10.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -8584,7 +8584,7 @@ snapshots:
|
||||
'@commitlint/is-ignored@19.2.2':
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
|
||||
'@commitlint/lint@19.2.2':
|
||||
dependencies:
|
||||
@@ -9182,7 +9182,7 @@ snapshots:
|
||||
js-yaml: 4.1.0
|
||||
lodash: 4.17.21
|
||||
|
||||
'@hey-api/openapi-ts@0.80.12(magicast@0.3.5)(typescript@5.7.3)':
|
||||
'@hey-api/openapi-ts@0.80.16(magicast@0.3.5)(typescript@5.7.3)':
|
||||
dependencies:
|
||||
'@hey-api/json-schema-ref-parser': 1.0.6
|
||||
ansi-colors: 4.1.3
|
||||
@@ -9190,15 +9190,16 @@ snapshots:
|
||||
color-support: 1.1.3
|
||||
commander: 13.0.0
|
||||
handlebars: 4.7.8
|
||||
js-yaml: 4.1.0
|
||||
open: 10.1.2
|
||||
semver: 7.7.2
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- magicast
|
||||
|
||||
'@hey-api/vite-plugin@0.2.0(@hey-api/openapi-ts@0.80.12(magicast@0.3.5)(typescript@5.7.3))':
|
||||
'@hey-api/vite-plugin@0.2.0(@hey-api/openapi-ts@0.80.16(magicast@0.3.5)(typescript@5.7.3))':
|
||||
dependencies:
|
||||
'@hey-api/openapi-ts': 0.80.12(magicast@0.3.5)(typescript@5.7.3)
|
||||
'@hey-api/openapi-ts': 0.80.16(magicast@0.3.5)(typescript@5.7.3)
|
||||
|
||||
'@hookform/error-message@2.0.1(react-dom@18.2.0(react@18.2.0))(react-hook-form@7.48.2(react@18.2.0))(react@18.2.0)':
|
||||
dependencies:
|
||||
@@ -9797,7 +9798,7 @@ snapshots:
|
||||
read-pkg: 9.0.1
|
||||
registry-auth-token: 5.1.0
|
||||
semantic-release: 24.2.7(typescript@5.7.3)
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
tempy: 3.1.0
|
||||
|
||||
'@semantic-release/release-notes-generator@14.0.3(semantic-release@24.2.7(typescript@5.7.3))':
|
||||
@@ -10446,7 +10447,7 @@ snapshots:
|
||||
debug: 4.4.1
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
ts-api-utils: 1.0.3(typescript@5.7.3)
|
||||
optionalDependencies:
|
||||
typescript: 5.7.3
|
||||
@@ -10461,7 +10462,7 @@ snapshots:
|
||||
fast-glob: 3.3.3
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.5
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
ts-api-utils: 1.4.3(typescript@5.7.3)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
@@ -10491,7 +10492,7 @@ snapshots:
|
||||
'@typescript-eslint/typescript-estree': 6.0.0(typescript@5.7.3)
|
||||
eslint: 9.17.0(jiti@2.4.1)
|
||||
eslint-scope: 5.1.1
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
@@ -10630,7 +10631,7 @@ snapshots:
|
||||
node-fetch: 2.7.0
|
||||
picocolors: 1.1.1
|
||||
progress: 2.0.3
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
tar-fs: 2.1.2
|
||||
yargs: 16.2.0
|
||||
transitivePeerDependencies:
|
||||
@@ -11330,7 +11331,7 @@ snapshots:
|
||||
conventional-commits-filter: 5.0.0
|
||||
handlebars: 4.7.8
|
||||
meow: 13.2.0
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
|
||||
conventional-commits-filter@5.0.0: {}
|
||||
|
||||
@@ -13514,7 +13515,7 @@ snapshots:
|
||||
|
||||
make-dir@4.0.0:
|
||||
dependencies:
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
|
||||
make-error@1.3.6:
|
||||
optional: true
|
||||
@@ -13990,7 +13991,7 @@ snapshots:
|
||||
normalize-package-data@6.0.2:
|
||||
dependencies:
|
||||
hosted-git-info: 7.0.2
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
validate-npm-package-license: 3.0.4
|
||||
|
||||
normalize-path@3.0.0: {}
|
||||
@@ -14932,7 +14933,7 @@ snapshots:
|
||||
|
||||
semver-diff@4.0.0:
|
||||
dependencies:
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
|
||||
semver-regex@4.0.5: {}
|
||||
|
||||
@@ -15039,7 +15040,7 @@ snapshots:
|
||||
|
||||
simple-update-notifier@2.0.0:
|
||||
dependencies:
|
||||
semver: 7.6.3
|
||||
semver: 7.7.2
|
||||
|
||||
skin-tone@2.0.0:
|
||||
dependencies:
|
||||
|
||||
@@ -4,12 +4,6 @@ export default defineConfig({
|
||||
// input: 'http://localhost:8000/openapi.json',
|
||||
input: '../tunarr-openapi.json',
|
||||
output: 'src/generated',
|
||||
parser: {
|
||||
transforms: {
|
||||
// See: https://github.com/hey-api/openapi-ts/issues/2373
|
||||
readWrite: false,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
name: '@hey-api/client-axios',
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"zustand": "^4.4.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hey-api/openapi-ts": "0.80.12",
|
||||
"@hey-api/openapi-ts": "0.80.16",
|
||||
"@hey-api/vite-plugin": "^0.2.0",
|
||||
"@tanstack/react-table": "8.19.3",
|
||||
"@tanstack/router-cli": "^1.35.4",
|
||||
|
||||
@@ -11,7 +11,12 @@ import {
|
||||
serializeObjectParam,
|
||||
serializePrimitiveParam,
|
||||
} from '../core/pathSerializer.gen';
|
||||
import type { Client, ClientOptions, Config, RequestOptions } from './types.gen';
|
||||
import type {
|
||||
Client,
|
||||
ClientOptions,
|
||||
Config,
|
||||
RequestOptions,
|
||||
} from './types.gen';
|
||||
|
||||
interface PathSerializer {
|
||||
path: Record<string, unknown>;
|
||||
@@ -140,6 +145,28 @@ export const createQuerySerializer = <T = unknown>({
|
||||
return querySerializer;
|
||||
};
|
||||
|
||||
const checkForExistence = (
|
||||
options: Pick<RequestOptions, 'auth' | 'query'> & {
|
||||
headers: Record<any, unknown>;
|
||||
},
|
||||
name?: string,
|
||||
): boolean => {
|
||||
if (!name) {
|
||||
return false;
|
||||
}
|
||||
if (name in options.headers || options.query?.[name]) {
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
'Cookie' in options.headers &&
|
||||
options.headers['Cookie'] &&
|
||||
typeof options.headers['Cookie'] === 'string'
|
||||
) {
|
||||
return options.headers['Cookie'].includes(`${name}=`);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
export const setAuthParams = async ({
|
||||
security,
|
||||
...options
|
||||
@@ -148,6 +175,9 @@ export const setAuthParams = async ({
|
||||
headers: Record<any, unknown>;
|
||||
}) => {
|
||||
for (const auth of security) {
|
||||
if (checkForExistence(options, auth.name)) {
|
||||
continue;
|
||||
}
|
||||
const token = await getAuthToken(auth, options.auth);
|
||||
|
||||
if (!token) {
|
||||
@@ -177,8 +207,6 @@ export const setAuthParams = async ({
|
||||
options.headers[name] = token;
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user