update deps (#15311)
* wip * bump misskey-dev/eslint-plugin * lint fixes (backend) * lint fixes (frontend) * lint fixes (frontend-embed) * rollback nsfwjs to 4.2.0 ref: infinitered/nsfwjs#904 * rollback openapi-typescript to v6 v7でOpenAPIのバリデーションが入るようになった関係でスコープ外での変更が避けられないため一時的に戻した * lint fixes (misskey-js) * temporarily disable errored lint rule (frontend-shared) * fix lint * temporarily ignore errored file for lint (frontend-shared) * rollback simplewebauthn/server to 12.0.0 v13 contains breaking changes that require some decision making * lint fixes (frontend-shared) * build misskey-js with types * fix(backend): migrate simplewebauthn/server to v12 * fix(misskey-js/autogen): ignore indent rules to generate consistent output * attempt to fix test changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML) * attempt to fix test changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML) * fix test * fix test * fix test * Apply suggestions from code review Co-authored-by: anatawa12 <anatawa12@icloud.com> * bump summaly to v5.2.0 * update tabler-icons to v3.30.0-based --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: anatawa12 <anatawa12@icloud.com>
This commit is contained in:
@@ -33,14 +33,15 @@ type IsCaseMatched<E extends keyof Endpoints, P extends Endpoints[E]['req'], C e
|
||||
Endpoints[E]['res'] extends SwitchCase
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
? IsNeverType<StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>> extends false ? true : false
|
||||
: false
|
||||
: false;
|
||||
|
||||
type GetCaseResult<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
Endpoints[E]['res'] extends SwitchCase
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
? StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>[1]
|
||||
: never
|
||||
: never;
|
||||
|
||||
/* eslint-disable @stylistic/indent */
|
||||
export type SwitchCaseResponseType<E extends keyof Endpoints, P extends Endpoints[E]['req']> = Endpoints[E]['res'] extends SwitchCase
|
||||
? IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> :
|
||||
IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> :
|
||||
@@ -53,6 +54,7 @@ export type SwitchCaseResponseType<E extends keyof Endpoints, P extends Endpoint
|
||||
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
|
||||
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
|
||||
Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res'];
|
||||
/* eslint-enable @stylistic/indent */
|
||||
|
||||
export type Endpoints = Overwrite<
|
||||
Gen,
|
||||
@@ -106,4 +108,4 @@ export type Endpoints = Overwrite<
|
||||
res: AdminRolesCreateResponse;
|
||||
}
|
||||
}
|
||||
>
|
||||
>;
|
||||
|
@@ -973,7 +973,7 @@ export type Endpoints = {
|
||||
'users/show': { req: UsersShowRequest; res: UsersShowResponse };
|
||||
'users/update-memo': { req: UsersUpdateMemoRequest; res: EmptyResponse };
|
||||
'v2/admin/emoji/list': { req: V2AdminEmojiListRequest; res: V2AdminEmojiListResponse };
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* NOTE: The content-type for all endpoints not listed here is application/json.
|
||||
|
@@ -258,11 +258,11 @@ export type SignupRequest = {
|
||||
'g-recaptcha-response'?: string | null;
|
||||
'turnstile-response'?: string | null;
|
||||
'm-captcha-response'?: string | null;
|
||||
}
|
||||
};
|
||||
|
||||
export type SignupResponse = MeDetailed & {
|
||||
token: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type SignupPendingRequest = {
|
||||
code: string;
|
||||
@@ -313,4 +313,4 @@ export type SigninWithPasskeyResponse = {
|
||||
|
||||
type Values<T extends Record<PropertyKey, unknown>> = T[keyof T];
|
||||
|
||||
export type PartialRolePolicyOverride = Partial<{[k in keyof RolePolicies]: Omit<Values<Role['policies']>, 'value'> & { value: RolePolicies[k] }}>;
|
||||
export type PartialRolePolicyOverride = Partial<{ [k in keyof RolePolicies]: Omit<Values<Role['policies']>, 'value'> & { value: RolePolicies[k] } }>;
|
||||
|
@@ -197,9 +197,9 @@ export default class Stream extends EventEmitter<StreamEvents> implements IStrea
|
||||
* Send a message to connection
|
||||
* ! ストリーム上のやり取りはすべてJSONで行われます !
|
||||
*/
|
||||
public send(typeOrPayload: string): void
|
||||
public send(typeOrPayload: string, payload: unknown): void
|
||||
public send(typeOrPayload: Record<string, unknown> | unknown[]): void
|
||||
public send(typeOrPayload: string): void;
|
||||
public send(typeOrPayload: string, payload: unknown): void;
|
||||
public send(typeOrPayload: Record<string, unknown> | unknown[]): void;
|
||||
public send(typeOrPayload: string | Record<string, unknown> | unknown[], payload?: unknown): void {
|
||||
if (typeof typeOrPayload === 'string') {
|
||||
this.stream.send(JSON.stringify({
|
||||
|
Reference in New Issue
Block a user