-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move vitest to root using workspace config
- Loading branch information
1 parent
d4b6dbb
commit 443136e
Showing
144 changed files
with
449 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
...enapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/OpenAPI.ts.snap
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/OpenAPI.ts.snap
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...__/test/generated/v3/core/OpenAPI.ts.snap → ...est/__snapshots__/v2/core/OpenAPI.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
|
||
type Headers = Record<string, string>; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
.../generated/v3_client/core/OpenAPI.ts.snap → ...est/__snapshots__/v3/core/OpenAPI.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
|
||
type Headers = Record<string, string>; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
.../v3_enums_typescript/core/OpenAPI.ts.snap → ...napshots__/v3_client/core/OpenAPI.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
|
||
type Headers = Record<string, string>; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...__/test/generated/v2/core/OpenAPI.ts.snap → .../v3_enums_typescript/core/OpenAPI.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
|
||
type Headers = Record<string, string>; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 56 additions & 0 deletions
56
packages/openapi-ts/test/__snapshots__/v3_legacy_positional_args/core/OpenAPI.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
|
||
type Headers = Record<string, string>; | ||
type Middleware<T> = (value: T) => T | Promise<T>; | ||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>; | ||
|
||
export class Interceptors<T> { | ||
_fns: Middleware<T>[]; | ||
|
||
constructor() { | ||
this._fns = []; | ||
} | ||
|
||
eject(fn: Middleware<T>) { | ||
const index = this._fns.indexOf(fn); | ||
if (index !== -1) { | ||
this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; | ||
} | ||
} | ||
|
||
use(fn: Middleware<T>) { | ||
this._fns = [...this._fns, fn]; | ||
} | ||
} | ||
|
||
export type OpenAPIConfig = { | ||
BASE: string; | ||
CREDENTIALS: 'include' | 'omit' | 'same-origin'; | ||
ENCODE_PATH?: ((path: string) => string) | undefined; | ||
HEADERS?: Headers | Resolver<Headers> | undefined; | ||
PASSWORD?: string | Resolver<string> | undefined; | ||
TOKEN?: string | Resolver<string> | undefined; | ||
USERNAME?: string | Resolver<string> | undefined; | ||
VERSION: string; | ||
WITH_CREDENTIALS: boolean; | ||
interceptors: { | ||
request: Interceptors<RequestInit>; | ||
response: Interceptors<Response>; | ||
}; | ||
}; | ||
|
||
export const OpenAPI: OpenAPIConfig = { | ||
BASE: 'http://localhost:3000/base', | ||
CREDENTIALS: 'include', | ||
ENCODE_PATH: undefined, | ||
HEADERS: undefined, | ||
PASSWORD: undefined, | ||
TOKEN: undefined, | ||
USERNAME: undefined, | ||
VERSION: '1.0', | ||
WITH_CREDENTIALS: false, | ||
interceptors: { | ||
request: new Interceptors(), | ||
response: new Interceptors(), | ||
}, | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.