From ed3bd8544212ce1585e82804d4b0a68e11e13005 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Sun, 11 Aug 2024 16:46:57 +0200 Subject: [PATCH 01/18] refactor: require context to be an object --- .../src/__tests__/middleware.test.ts | 4 +-- .../next-safe-action/src/action-builder.ts | 6 ++-- packages/next-safe-action/src/index.ts | 4 +-- packages/next-safe-action/src/index.types.ts | 32 +++++++++++++------ .../src/safe-action-client.ts | 15 +++++---- 5 files changed, 38 insertions(+), 23 deletions(-) diff --git a/packages/next-safe-action/src/__tests__/middleware.test.ts b/packages/next-safe-action/src/__tests__/middleware.test.ts index 60ba0ae5..6b1f02a1 100644 --- a/packages/next-safe-action/src/__tests__/middleware.test.ts +++ b/packages/next-safe-action/src/__tests__/middleware.test.ts @@ -326,7 +326,7 @@ test("flattened validation errors in execution result from middleware are correc const expectedResult = { success: false, - ctx: undefined, + ctx: {}, validationErrors: { formErrors: [], fieldErrors: { @@ -377,7 +377,7 @@ test("overridden formatted validation errors in execution result from middleware const expectedResult = { success: false, - ctx: undefined, + ctx: {}, validationErrors: { username: { _errors: ["String must contain at most 3 character(s)"], diff --git a/packages/next-safe-action/src/action-builder.ts b/packages/next-safe-action/src/action-builder.ts index ebd9ad9c..f5efb77c 100644 --- a/packages/next-safe-action/src/action-builder.ts +++ b/packages/next-safe-action/src/action-builder.ts @@ -26,7 +26,7 @@ export function actionBuilder< ServerError, MetadataSchema extends Schema | undefined = undefined, MD = MetadataSchema extends Schema ? Infer : undefined, - Ctx = undefined, + Ctx extends object = {}, SF extends (() => Promise) | undefined = undefined, // schema function S extends Schema | undefined = SF extends Function ? Awaited> : undefined, const BAS extends readonly Schema[] = [], @@ -71,8 +71,8 @@ export function actionBuilder< utils?: SafeActionUtils ) => { return async (...clientInputs: unknown[]) => { - let prevCtx: unknown = undefined; - const middlewareResult: MiddlewareResult = { success: false }; + let prevCtx: object = {}; + const middlewareResult: MiddlewareResult = { success: false }; type PrevResult = SafeActionResult | undefined; let prevResult: PrevResult | undefined = undefined; const parsedInputDatas: any[] = []; diff --git a/packages/next-safe-action/src/index.ts b/packages/next-safe-action/src/index.ts index 033c4368..7c6756c1 100644 --- a/packages/next-safe-action/src/index.ts +++ b/packages/next-safe-action/src/index.ts @@ -55,13 +55,13 @@ export const createSafeActionClient = < >); return new SafeActionClient({ - middlewareFns: [async ({ next }) => next({ ctx: undefined })], + middlewareFns: [async ({ next }) => next({ ctx: {} })], handleServerErrorLog, handleReturnedServerError, schemaFn: undefined, bindArgsSchemas: [], validationAdapter: createOpts?.validationAdapter ?? zodAdapter(), // use zod adapter by default - ctxType: undefined, + ctxType: {}, metadataSchema: (createOpts?.defineMetadataSchema?.() ?? undefined) as MetadataSchema, metadata: undefined as MetadataSchema extends Schema ? Infer : undefined, defaultValidationErrorsShape: (createOpts?.defaultValidationErrorsShape ?? "formatted") as ODVES, diff --git a/packages/next-safe-action/src/index.types.ts b/packages/next-safe-action/src/index.types.ts index 73c41389..ede2f975 100644 --- a/packages/next-safe-action/src/index.types.ts +++ b/packages/next-safe-action/src/index.types.ts @@ -14,7 +14,7 @@ export type DVES = "formatted" | "flattened"; export type ServerErrorFunctionUtils = { clientInput: unknown; bindArgsClientInputs: unknown[]; - ctx: unknown; + ctx: object; metadata: MetadataSchema extends Schema ? Infer : undefined; }; @@ -53,7 +53,7 @@ export type SafeActionResult< CBAVE = BindArgsValidationErrors, Data = unknown, // eslint-disable-next-line - NextCtx = unknown, + NextCtx = object, > = { data?: Data; serverError?: ServerError; @@ -90,24 +90,32 @@ export type SafeStateActionFn< * Type of the result of a middleware function. It extends the result of a safe action with * information about the action execution. */ -export type MiddlewareResult = SafeActionResult & { +export type MiddlewareResult = SafeActionResult< + ServerError, + any, + any, + any, + any, + any, + NextCtx +> & { parsedInput?: unknown; bindArgsParsedInputs?: unknown[]; - ctx?: unknown; + ctx?: object; success: boolean; }; /** * Type of the middleware function passed to a safe action client. */ -export type MiddlewareFn = { +export type MiddlewareFn = { (opts: { clientInput: unknown; bindArgsClientInputs: unknown[]; ctx: Ctx; metadata: MD; next: { - (opts: { ctx: NC }): Promise>; + (opts: { ctx: NC }): Promise>; }; }): Promise>; }; @@ -115,7 +123,13 @@ export type MiddlewareFn = { /** * Type of the function that executes server code when defining a new safe action. */ -export type ServerCodeFn = (args: { +export type ServerCodeFn< + MD, + Ctx extends object, + S extends Schema | undefined, + BAS extends readonly Schema[], + Data, +> = (args: { parsedInput: S extends Schema ? Infer : undefined; bindArgsParsedInputs: InferArray; ctx: Ctx; @@ -128,7 +142,7 @@ export type ServerCodeFn : undefined, - Ctx = undefined, + Ctx extends object = {}, SF extends (() => Promise) | undefined = undefined, // schema function S extends Schema | undefined = SF extends Function ? Awaited> : undefined, const BAS extends readonly Schema[] = [], @@ -37,10 +37,10 @@ export class SafeActionClient< SafeActionClientOpts["handleReturnedServerError"] >; readonly #middlewareFns: MiddlewareFn[]; - readonly #ctxType = undefined as Ctx; readonly #metadataSchema: MetadataSchema; readonly #metadata: MD; readonly #schemaFn: SF; + readonly #ctxType: Ctx; readonly #bindArgsSchemas: BAS; readonly #validationAdapter: ValidationAdapter; readonly #handleValidationErrorsShape: HandleValidationErrorsShapeFn; @@ -74,6 +74,7 @@ export class SafeActionClient< this.#schemaFn = (opts.schemaFn ?? undefined) as SF; this.#bindArgsSchemas = opts.bindArgsSchemas ?? []; this.#validationAdapter = opts.validationAdapter; + this.#ctxType = opts.ctxType as unknown as Ctx; this.#handleValidationErrorsShape = opts.handleValidationErrorsShape; this.#handleBindArgsValidationErrorsShape = opts.handleBindArgsValidationErrorsShape; this.#defaultValidationErrorsShape = opts.defaultValidationErrorsShape; @@ -86,7 +87,7 @@ export class SafeActionClient< * * {@link https://next-safe-action.dev/docs/safe-action-client/instance-methods#use See docs for more information} */ - use(middlewareFn: MiddlewareFn) { + use(middlewareFn: MiddlewareFn) { return new SafeActionClient({ middlewareFns: [...this.#middlewareFns, middlewareFn], handleReturnedServerError: this.#handleReturnedServerError, @@ -98,7 +99,7 @@ export class SafeActionClient< validationAdapter: this.#validationAdapter, handleValidationErrorsShape: this.#handleValidationErrorsShape, handleBindArgsValidationErrorsShape: this.#handleBindArgsValidationErrorsShape, - ctxType: undefined as NextCtx, + ctxType: {} as NextCtx, defaultValidationErrorsShape: this.#defaultValidationErrorsShape, throwValidationErrors: this.#throwValidationErrors, }); @@ -122,7 +123,7 @@ export class SafeActionClient< validationAdapter: this.#validationAdapter, handleValidationErrorsShape: this.#handleValidationErrorsShape, handleBindArgsValidationErrorsShape: this.#handleBindArgsValidationErrorsShape, - ctxType: undefined as Ctx, + ctxType: {} as Ctx, defaultValidationErrorsShape: this.#defaultValidationErrorsShape, throwValidationErrors: this.#throwValidationErrors, }); @@ -164,7 +165,7 @@ export class SafeActionClient< handleValidationErrorsShape: (utils?.handleValidationErrorsShape ?? this.#handleValidationErrorsShape) as HandleValidationErrorsShapeFn, handleBindArgsValidationErrorsShape: this.#handleBindArgsValidationErrorsShape, - ctxType: undefined as Ctx, + ctxType: {} as Ctx, defaultValidationErrorsShape: this.#defaultValidationErrorsShape, throwValidationErrors: this.#throwValidationErrors, }); @@ -198,7 +199,7 @@ export class SafeActionClient< handleValidationErrorsShape: this.#handleValidationErrorsShape, handleBindArgsValidationErrorsShape: (utils?.handleBindArgsValidationErrorsShape ?? this.#handleBindArgsValidationErrorsShape) as HandleBindArgsValidationErrorsShapeFn, - ctxType: undefined as Ctx, + ctxType: {} as Ctx, defaultValidationErrorsShape: this.#defaultValidationErrorsShape, throwValidationErrors: this.#throwValidationErrors, }); From 53489feb51f074f0a6b25503825f6d584774727e Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Sun, 11 Aug 2024 19:15:39 +0200 Subject: [PATCH 02/18] feat(middleware): extend context by default when defining middleware --- packages/next-safe-action/package.json | 4 +-- .../next-safe-action/src/action-builder.ts | 29 ++++++++++--------- packages/next-safe-action/src/index.types.ts | 14 ++++----- .../src/safe-action-client.ts | 4 +-- packages/next-safe-action/src/utils.ts | 16 ++++++++++ packages/next-safe-action/tsconfig.json | 2 +- pnpm-lock.yaml | 18 ++++++------ 7 files changed, 52 insertions(+), 35 deletions(-) diff --git a/packages/next-safe-action/package.json b/packages/next-safe-action/package.json index 850d35cb..f4a9129c 100644 --- a/packages/next-safe-action/package.json +++ b/packages/next-safe-action/package.json @@ -89,13 +89,13 @@ "zod": "^3.23.6" }, "peerDependencies": { + "@sinclair/typebox": ">= 0.33.3", "next": ">= 14.0.0", "react": ">= 18.2.0", "react-dom": ">= 18.2.0", "valibot": ">= 0.36.0", "yup": ">= 1.0.0", - "zod": ">= 3.0.0", - "@sinclair/typebox": ">= 0.33.3" + "zod": ">= 3.0.0" }, "peerDependenciesMeta": { "zod": { diff --git a/packages/next-safe-action/src/action-builder.ts b/packages/next-safe-action/src/action-builder.ts index f5efb77c..a194c771 100644 --- a/packages/next-safe-action/src/action-builder.ts +++ b/packages/next-safe-action/src/action-builder.ts @@ -13,7 +13,7 @@ import type { ServerCodeFn, StateServerCodeFn, } from "./index.types"; -import { ActionMetadataError, DEFAULT_SERVER_ERROR_MESSAGE, isError } from "./utils"; +import { ActionMetadataError, deepMerge, DEFAULT_SERVER_ERROR_MESSAGE, isError } from "./utils"; import { ActionServerValidationError, ActionValidationError, buildValidationErrors } from "./validation-errors"; import type { BindArgsValidationErrors, @@ -71,7 +71,7 @@ export function actionBuilder< utils?: SafeActionUtils ) => { return async (...clientInputs: unknown[]) => { - let prevCtx: object = {}; + let currentCtx: object = {}; const middlewareResult: MiddlewareResult = { success: false }; type PrevResult = SafeActionResult | undefined; let prevResult: PrevResult | undefined = undefined; @@ -99,7 +99,7 @@ export function actionBuilder< } const middlewareFn = args.middlewareFns[idx]; - middlewareResult.ctx = prevCtx; + middlewareResult.ctx = currentCtx; try { if (idx === 0) { @@ -118,10 +118,11 @@ export function actionBuilder< await middlewareFn({ clientInput: clientInputs.at(-1), // pass raw client input bindArgsClientInputs: bindArgsSchemas.length ? clientInputs.slice(0, -1) : [], - ctx: prevCtx, + ctx: currentCtx, metadata: args.metadata, - next: async ({ ctx }) => { - prevCtx = ctx; + next: async (nextOpts) => { + currentCtx = deepMerge(currentCtx, nextOpts?.ctx ?? {}); + // currentCtx = { ...cloneDeep(currentCtx), ...(nextOpts?.ctx ?? {}) }; await executeMiddlewareStack(idx + 1); return middlewareResult; }, @@ -196,7 +197,7 @@ export function actionBuilder< scfArgs[0] = { parsedInput: parsedInputDatas.at(-1) as S extends Schema ? Infer : undefined, bindArgsParsedInputs: parsedInputDatas.slice(0, -1) as InferArray, - ctx: prevCtx as Ctx, + ctx: currentCtx as Ctx, metadata: args.metadata, }; @@ -234,7 +235,7 @@ export function actionBuilder< args.handleReturnedServerError(error, { clientInput: clientInputs.at(-1), // pass raw client input bindArgsClientInputs: bindArgsSchemas.length ? clientInputs.slice(0, -1) : [], - ctx: prevCtx, + ctx: currentCtx, metadata: args.metadata as MetadataSchema extends Schema ? Infer : undefined, }) ); @@ -246,7 +247,7 @@ export function actionBuilder< returnedError, clientInput: clientInputs.at(-1), // pass raw client input bindArgsClientInputs: bindArgsSchemas.length ? clientInputs.slice(0, -1) : [], - ctx: prevCtx, + ctx: currentCtx, metadata: args.metadata as MetadataSchema extends Schema ? Infer : undefined, }) ); @@ -263,7 +264,7 @@ export function actionBuilder< utils?.onSuccess?.({ data: undefined, metadata: args.metadata, - ctx: prevCtx as Ctx, + ctx: currentCtx as Ctx, clientInput: clientInputs.at(-1) as S extends Schema ? InferIn : undefined, bindArgsClientInputs: (bindArgsSchemas.length ? clientInputs.slice(0, -1) : []) as InferInArray, parsedInput: parsedInputDatas.at(-1) as S extends Schema ? Infer : undefined, @@ -276,7 +277,7 @@ export function actionBuilder< await Promise.resolve( utils?.onSettled?.({ metadata: args.metadata, - ctx: prevCtx as Ctx, + ctx: currentCtx as Ctx, clientInput: clientInputs.at(-1) as S extends Schema ? InferIn : undefined, bindArgsClientInputs: (bindArgsSchemas.length ? clientInputs.slice(0, -1) : []) as InferInArray, result: {}, @@ -324,7 +325,7 @@ export function actionBuilder< await Promise.resolve( utils?.onSuccess?.({ metadata: args.metadata, - ctx: prevCtx as Ctx, + ctx: currentCtx as Ctx, data: actionResult.data as Data, clientInput: clientInputs.at(-1) as S extends Schema ? InferIn : undefined, bindArgsClientInputs: (bindArgsSchemas.length ? clientInputs.slice(0, -1) : []) as InferInArray, @@ -338,7 +339,7 @@ export function actionBuilder< await Promise.resolve( utils?.onError?.({ metadata: args.metadata, - ctx: prevCtx as Ctx, + ctx: currentCtx as Ctx, clientInput: clientInputs.at(-1) as S extends Schema ? InferIn : undefined, bindArgsClientInputs: (bindArgsSchemas.length ? clientInputs.slice(0, -1) : []) as InferInArray, error: actionResult, @@ -350,7 +351,7 @@ export function actionBuilder< await Promise.resolve( utils?.onSettled?.({ metadata: args.metadata, - ctx: prevCtx as Ctx, + ctx: currentCtx as Ctx, clientInput: clientInputs.at(-1) as S extends Schema ? InferIn : undefined, bindArgsClientInputs: (bindArgsSchemas.length ? clientInputs.slice(0, -1) : []) as InferInArray, result: actionResult, diff --git a/packages/next-safe-action/src/index.types.ts b/packages/next-safe-action/src/index.types.ts index ede2f975..1cfd9ebf 100644 --- a/packages/next-safe-action/src/index.types.ts +++ b/packages/next-safe-action/src/index.types.ts @@ -112,10 +112,10 @@ export type MiddlewareFn; metadata: MD; next: { - (opts: { ctx: NC }): Promise>; + (opts?: { ctx?: NC }): Promise>; }; }): Promise>; }; @@ -132,7 +132,7 @@ export type ServerCodeFn< > = (args: { parsedInput: S extends Schema ? Infer : undefined; bindArgsParsedInputs: InferArray; - ctx: Ctx; + ctx: Prettify; metadata: MD; }) => Promise; @@ -152,7 +152,7 @@ export type StateServerCodeFn< args: { parsedInput: S extends Schema ? Infer : undefined; bindArgsParsedInputs: InferArray; - ctx: Ctx; + ctx: Prettify; metadata: MD; }, utils: { prevResult: Prettify> } @@ -176,7 +176,7 @@ export type SafeActionUtils< onSuccess?: (args: { data?: Data; metadata: MD; - ctx?: Ctx; + ctx?: Prettify; clientInput: S extends Schema ? InferIn : undefined; bindArgsClientInputs: InferInArray; parsedInput: S extends Schema ? Infer : undefined; @@ -187,14 +187,14 @@ export type SafeActionUtils< onError?: (args: { error: Prettify, "data">>; metadata: MD; - ctx?: Ctx; + ctx?: Prettify; clientInput: S extends Schema ? InferIn : undefined; bindArgsClientInputs: InferInArray; }) => MaybePromise; onSettled?: (args: { result: Prettify>; metadata: MD; - ctx?: Ctx; + ctx?: Prettify; clientInput: S extends Schema ? InferIn : undefined; bindArgsClientInputs: InferInArray; hasRedirected: boolean; diff --git a/packages/next-safe-action/src/safe-action-client.ts b/packages/next-safe-action/src/safe-action-client.ts index ae9c6bce..22f0fc5c 100644 --- a/packages/next-safe-action/src/safe-action-client.ts +++ b/packages/next-safe-action/src/safe-action-client.ts @@ -87,7 +87,7 @@ export class SafeActionClient< * * {@link https://next-safe-action.dev/docs/safe-action-client/instance-methods#use See docs for more information} */ - use(middlewareFn: MiddlewareFn) { + use(middlewareFn: MiddlewareFn) { return new SafeActionClient({ middlewareFns: [...this.#middlewareFns, middlewareFn], handleReturnedServerError: this.#handleReturnedServerError, @@ -99,7 +99,7 @@ export class SafeActionClient< validationAdapter: this.#validationAdapter, handleValidationErrorsShape: this.#handleValidationErrorsShape, handleBindArgsValidationErrorsShape: this.#handleBindArgsValidationErrorsShape, - ctxType: {} as NextCtx, + ctxType: {} as Ctx & NextCtx, defaultValidationErrorsShape: this.#defaultValidationErrorsShape, throwValidationErrors: this.#throwValidationErrors, }); diff --git a/packages/next-safe-action/src/utils.ts b/packages/next-safe-action/src/utils.ts index 78def49c..c923c9ec 100644 --- a/packages/next-safe-action/src/utils.ts +++ b/packages/next-safe-action/src/utils.ts @@ -2,6 +2,22 @@ export const DEFAULT_SERVER_ERROR_MESSAGE = "Something went wrong while executin export const isError = (error: unknown): error is Error => error instanceof Error; +export const deepMerge = (obj1: object, obj2: object) => { + for (const key of Object.keys(obj2)) { + const k = key as keyof typeof obj2; + // eslint-disable-next-line + if (typeof obj2[k] === "object" && Object.hasOwn(obj1, k)) { + // @ts-expect-error + if (!obj1[k]) obj1[k] = {}; + deepMerge(obj1[k], obj2[k]); + } else { + obj1[k] = obj2[k]; + } + } + + return obj1; +}; + /** * This error is thrown when an action's metadata input is invalid, i.e. when there's a mismatch between the * type of the metadata schema returned from `defineMetadataSchema` and the actual input. diff --git a/packages/next-safe-action/tsconfig.json b/packages/next-safe-action/tsconfig.json index 4ef58d21..7449f5ce 100644 --- a/packages/next-safe-action/tsconfig.json +++ b/packages/next-safe-action/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ESNext", "module": "CommonJS", - "lib": ["ES2021.String"], + "lib": ["ES2022"], "skipLibCheck": true, "sourceMap": true, "outDir": "./dist", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e42c9fb..c3785a49 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5579,8 +5579,8 @@ snapshots: '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.34.1(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -5604,13 +5604,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.4 enhanced-resolve: 5.16.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -5621,18 +5621,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5642,7 +5642,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 From eb537a128fc321945b21e0338b23e576a0225ffa Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Sun, 11 Aug 2024 20:45:44 +0200 Subject: [PATCH 03/18] chore(website): add context extension recipe --- .../recipes/additional-validation-errors.md | 2 +- .../customize-validation-errors-format.md | 2 +- website/docs/recipes/extend-context.md | 32 +++++++++++++++++++ .../docs/recipes/extend-previous-schema.md | 2 +- website/docs/recipes/form-actions.md | 2 +- website/docs/recipes/i18n.md | 2 +- website/docs/recipes/upload-files.md | 2 +- website/docs/safe-action-client/middleware.md | 8 +++-- 8 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 website/docs/recipes/extend-context.md diff --git a/website/docs/recipes/additional-validation-errors.md b/website/docs/recipes/additional-validation-errors.md index 353587e5..1c6858f6 100644 --- a/website/docs/recipes/additional-validation-errors.md +++ b/website/docs/recipes/additional-validation-errors.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 description: Set additional custom validation errors in schema or in action's server code function. --- diff --git a/website/docs/recipes/customize-validation-errors-format.md b/website/docs/recipes/customize-validation-errors-format.md index 0d313d81..ab33d9ef 100644 --- a/website/docs/recipes/customize-validation-errors-format.md +++ b/website/docs/recipes/customize-validation-errors-format.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 description: Learn how to customize validation errors format returned to the client. --- diff --git a/website/docs/recipes/extend-context.md b/website/docs/recipes/extend-context.md new file mode 100644 index 00000000..381dcd4f --- /dev/null +++ b/website/docs/recipes/extend-context.md @@ -0,0 +1,32 @@ +--- +sidebar_position: 4 +description: Learn how to extend context when using middleware functions. +--- + +# Extend context + +Context is a special object that holds information about the current execution state. This object is passed to middleware functions and server code functions when defining actions. + +Since version 7.6.0, context is extended by default when defining middleware functions. For instance, if you want both the `sessionId` and `userId` in the context, by using two different middleware functions (trivial example), you can do it like this: + +```typescript +import { createSafeActionClient } from "next-safe-action"; + +const actionClient = createSafeActionClient() + .use(async ({ next }) => { + const sessionId = await getSessionId(); + return next({ ctx: { sessionId } }) + }) + .use(async ({ next, ctx }) => { + // Get user id from database. + const { sessionId } = ctx; // Context contains `sessionId` + const userId = await getUserIdBySessionId(sessionId); + return next({ ctx: { userId } }) + }) + .use(async ({ next }) => { + // You can also define a middleware function that doesn't extend or modify the context. + return next(); + }) +``` + +All actions defined using this client will contain both `sessionId` and `userId` in their context. \ No newline at end of file diff --git a/website/docs/recipes/extend-previous-schema.md b/website/docs/recipes/extend-previous-schema.md index bc28a1e4..c6859032 100644 --- a/website/docs/recipes/extend-previous-schema.md +++ b/website/docs/recipes/extend-previous-schema.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 description: Learn how to use next-safe-action with a i18n solution. --- diff --git a/website/docs/recipes/form-actions.md b/website/docs/recipes/form-actions.md index 2ba36ee8..e411deb5 100644 --- a/website/docs/recipes/form-actions.md +++ b/website/docs/recipes/form-actions.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 description: Learn how to use next-safe-action with Form Actions. --- diff --git a/website/docs/recipes/i18n.md b/website/docs/recipes/i18n.md index 6c02e9cd..7b740801 100644 --- a/website/docs/recipes/i18n.md +++ b/website/docs/recipes/i18n.md @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 10 description: Learn how to use next-safe-action with a i18n solution. --- diff --git a/website/docs/recipes/upload-files.md b/website/docs/recipes/upload-files.md index 88782eb8..e34ebfda 100644 --- a/website/docs/recipes/upload-files.md +++ b/website/docs/recipes/upload-files.md @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 description: Learn how to upload a file using next-safe-action. --- diff --git a/website/docs/safe-action-client/middleware.md b/website/docs/safe-action-client/middleware.md index e6a5b96f..f99282c5 100644 --- a/website/docs/safe-action-client/middleware.md +++ b/website/docs/safe-action-client/middleware.md @@ -5,7 +5,7 @@ description: Learn how to use middleware functions in your actions. # Middleware -next-safe-action, since version 7, ships with a composable and powerful middleware system, which allows you to create functions for almost every kind of use case you can imagine (authorization, logging, role based access, etc.). It works very similarly to the [tRPC implementation](https://trpc.io/docs/server/middlewares), with some minor differences. +next-safe-action, since version 7, ships with a composable and powerful middleware system, which allows you to create functions for almost every kind of use case you can imagine (authorization, logging, role based access, etc.). It works very similarly to the [tRPC implementation](https://trpc.io/docs/server/middlewares). Middleware functions are defined using [`use`](/docs/safe-action-client/instance-methods#use) method in your action clients, via the `middlewareFn` argument. @@ -144,7 +144,7 @@ const deleteUser = authActionClient // Here we pass the same untouched context (`userId`) to the next function, since we don't need // to add data to the context here. - return next({ ctx }); + return next(); }) .metadata({ actionName: "deleteUser" }) .action(async ({ ctx: { userId } }) => { @@ -200,3 +200,7 @@ Note that the second line comes from the default `handleServerErrorLog` function ## `middlewareFn` return value `middlewareFn` returns a Promise of a [`MiddlewareResult`](/docs/types#middlewareresult) object. It extends the result of a safe action with `success` property, and `parsedInput`, `bindArgsParsedInputs` and `ctx` optional properties. This is the exact return type of the `next` function, so you must always return it (or its result) to continue executing the middleware chain. + +## Context extension + +Visit the [context extension](/docs/recipes/extend-context) recipe for more information on how to extend context with middleware functions. \ No newline at end of file From 97587ae8691fddd4fceb278f2db1358928864a68 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Sun, 11 Aug 2024 20:46:09 +0200 Subject: [PATCH 04/18] chore(playground): update middleware code --- apps/playground/src/lib/safe-action.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/playground/src/lib/safe-action.ts b/apps/playground/src/lib/safe-action.ts index f53569d5..13bb2bf0 100644 --- a/apps/playground/src/lib/safe-action.ts +++ b/apps/playground/src/lib/safe-action.ts @@ -38,7 +38,7 @@ export const action = createSafeActionClient({ const start = Date.now(); // Here we await the next middleware. - const result = await next({ ctx }); + const result = await next(); const end = Date.now(); From e70a74b5212055c6b5f67ae0801b5505580788ef Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Sun, 11 Aug 2024 20:46:25 +0200 Subject: [PATCH 05/18] test(middleware): remove args from `next` function --- .../src/__tests__/middleware.test.ts | 26 +++++++++---------- .../src/__tests__/server-error.test.ts | 8 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/next-safe-action/src/__tests__/middleware.test.ts b/packages/next-safe-action/src/__tests__/middleware.test.ts index 6b1f02a1..6878605b 100644 --- a/packages/next-safe-action/src/__tests__/middleware.test.ts +++ b/packages/next-safe-action/src/__tests__/middleware.test.ts @@ -70,7 +70,7 @@ test("instance context value is correctly overridden in subsequent middleware", if (ctx.foo !== "baz") { throw new Error("Expected ctx.foo to be 'baz'"); } - return next({ ctx }); + return next(); }) .action(async ({ ctx }) => { return { @@ -130,9 +130,9 @@ test("happy path execution result from middleware is correct", async () => { }) ) .bindArgsSchemas([z.object({ age: z.number().positive() })]) - .use(async ({ next, ctx }) => { + .use(async ({ next }) => { // Await action execution. - const res = await next({ ctx }); + const res = await next(); middlewareResult = res; return res; }) @@ -176,9 +176,9 @@ test("server error execution result from middleware is correct", async () => { }) ) .bindArgsSchemas([z.object({ age: z.number().positive() })]) - .use(async ({ next, ctx }) => { + .use(async ({ next }) => { // Await action execution. - const res = await next({ ctx }); + const res = await next(); middlewareResult = res; return res; }) @@ -212,9 +212,9 @@ test("validation errors in execution result from middleware are correct", async }) ) .bindArgsSchemas([z.object({ age: z.number().positive() })]) - .use(async ({ next, ctx }) => { + .use(async ({ next }) => { // Await action execution. - const res = await next({ ctx }); + const res = await next(); middlewareResult = res; return res; }) @@ -259,9 +259,9 @@ test("server validation errors in execution result from middleware are correct", const action = ac .schema(schema) .bindArgsSchemas([z.object({ age: z.number().positive() })]) - .use(async ({ next, ctx }) => { + .use(async ({ next }) => { // Await action execution. - const res = await next({ ctx }); + const res = await next(); middlewareResult = res; return res; }) @@ -309,9 +309,9 @@ test("flattened validation errors in execution result from middleware are correc }) ) .bindArgsSchemas([z.object({ age: z.number().positive() })]) - .use(async ({ next, ctx }) => { + .use(async ({ next }) => { // Await action execution. - const res = await next({ ctx }); + const res = await next(); middlewareResult = res; return res; }) @@ -360,9 +360,9 @@ test("overridden formatted validation errors in execution result from middleware .bindArgsSchemas([z.object({ age: z.number().positive() })], { handleBindArgsValidationErrorsShape: formatBindArgsValidationErrors, }) - .use(async ({ next, ctx }) => { + .use(async ({ next }) => { // Await action execution. - const res = await next({ ctx }); + const res = await next(); middlewareResult = res; return res; }) diff --git a/packages/next-safe-action/src/__tests__/server-error.test.ts b/packages/next-safe-action/src/__tests__/server-error.test.ts index cf874baa..66a28580 100644 --- a/packages/next-safe-action/src/__tests__/server-error.test.ts +++ b/packages/next-safe-action/src/__tests__/server-error.test.ts @@ -39,7 +39,7 @@ test("unknown error occurred in server code function is masked by default", asyn test("unknown error occurred in middleware function is masked by default", async () => { const action = ac1 - .use(async ({ next, ctx }) => next({ ctx })) + .use(async ({ next }) => next()) .use(async () => { throw new Error("Something bad happened"); }) @@ -74,7 +74,7 @@ test("known error occurred in server code function is unmasked", async () => { test("known error occurred in middleware function is unmasked", async () => { const action = ac1 - .use(async ({ next, ctx }) => next({ ctx })) + .use(async ({ next }) => next()) .use(async () => { throw new ActionError("Something bad happened"); }) @@ -131,7 +131,7 @@ test("error occurred in server code function has the correct shape defined by `h test("error occurred in middleware function has the correct shape defined by `handleReturnedServerError`", async () => { const action = ac2 - .use(async ({ next, ctx }) => next({ ctx })) + .use(async ({ next }) => next()) .use(async () => { throw new Error("Something bad happened"); }) @@ -169,7 +169,7 @@ test("action throws if an error occurred in server code function and `handleRetu test("action throws if an error occurred in middleware function and `handleReturnedServerError` rethrows it", async () => { const action = ac3 - .use(async ({ next, ctx }) => next({ ctx })) + .use(async ({ next }) => next()) .use(async () => { throw new Error("Something bad happened"); }) From 158f395a8327c3156e7739ef7f089e3e65b78f23 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 04:20:21 +0200 Subject: [PATCH 06/18] chore(website): fix context extension code snippet --- website/docs/recipes/extend-context.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/recipes/extend-context.md b/website/docs/recipes/extend-context.md index 381dcd4f..36bdcc82 100644 --- a/website/docs/recipes/extend-context.md +++ b/website/docs/recipes/extend-context.md @@ -18,7 +18,6 @@ const actionClient = createSafeActionClient() return next({ ctx: { sessionId } }) }) .use(async ({ next, ctx }) => { - // Get user id from database. const { sessionId } = ctx; // Context contains `sessionId` const userId = await getUserIdBySessionId(sessionId); return next({ ctx: { userId } }) From cfc1b8c348a057071246bb467468394924f5d67d Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 04:33:12 +0200 Subject: [PATCH 07/18] chore(website): add wip `createMiddleware` section --- website/docs/safe-action-client/middleware.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/docs/safe-action-client/middleware.md b/website/docs/safe-action-client/middleware.md index f99282c5..13294fa4 100644 --- a/website/docs/safe-action-client/middleware.md +++ b/website/docs/safe-action-client/middleware.md @@ -203,4 +203,8 @@ Note that the second line comes from the default `handleServerErrorLog` function ## Context extension -Visit the [context extension](/docs/recipes/extend-context) recipe for more information on how to extend context with middleware functions. \ No newline at end of file +Visit the [context extension](/docs/recipes/extend-context) recipe for more information on how to extend context with middleware functions. + +## Create standalone middleware with `createMiddleware` + +WIP \ No newline at end of file From 87868a2db2303bb20657a4e19fc2e9b151f7ceb6 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 04:33:26 +0200 Subject: [PATCH 08/18] feat(middleware): support standalone middleware definition via exported `createMiddleware` function --- packages/next-safe-action/src/index.ts | 2 +- packages/next-safe-action/src/utils.ts | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/next-safe-action/src/index.ts b/packages/next-safe-action/src/index.ts index 7c6756c1..967caa29 100644 --- a/packages/next-safe-action/src/index.ts +++ b/packages/next-safe-action/src/index.ts @@ -10,7 +10,7 @@ import { formatValidationErrors, } from "./validation-errors"; -export { ActionMetadataError, DEFAULT_SERVER_ERROR_MESSAGE } from "./utils"; +export { ActionMetadataError, createMiddleware, DEFAULT_SERVER_ERROR_MESSAGE } from "./utils"; export { ActionValidationError, flattenBindArgsValidationErrors, diff --git a/packages/next-safe-action/src/utils.ts b/packages/next-safe-action/src/utils.ts index c923c9ec..aaa41115 100644 --- a/packages/next-safe-action/src/utils.ts +++ b/packages/next-safe-action/src/utils.ts @@ -1,3 +1,5 @@ +import type { MiddlewareFn } from "./index.types"; + export const DEFAULT_SERVER_ERROR_MESSAGE = "Something went wrong while executing the operation."; export const isError = (error: unknown): error is Error => error instanceof Error; @@ -28,3 +30,23 @@ export class ActionMetadataError extends Error { this.name = "ActionMetadataError"; } } + +/** + * Creates a standalone middleware function. It accepts a generic object with optional `serverError`, `ctx` and `metadata` + * properties, if you need one or all of them to be typed. The type for each property that is passed as generic is the + * **minimum** shape required to define the middleware function, but it can also be larger than that. + * + * {@link https://next-safe-action.dev/docs/safe-action-client/middleware#create-standalone-middleware-with-createmiddleware See docs for more information} + */ +export const createMiddleware = () => { + return { + define: ( + middlewareFn: MiddlewareFn< + BaseData extends { serverError: infer SE } ? SE : any, + BaseData extends { metadata: infer MD } ? MD : any, + BaseData extends { ctx: infer Ctx extends object } ? Ctx : object, + NextCtx + > + ) => middlewareFn, + }; +}; From 37af4faa863b0a3929f1dcd6763d70e3c7b867cd Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 14:16:44 +0200 Subject: [PATCH 09/18] refactor(middleware): move `createMiddleware` function to separate file --- packages/next-safe-action/src/index.ts | 3 ++- packages/next-safe-action/src/middleware.ts | 21 ++++++++++++++++++++ packages/next-safe-action/src/utils.ts | 22 --------------------- 3 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 packages/next-safe-action/src/middleware.ts diff --git a/packages/next-safe-action/src/index.ts b/packages/next-safe-action/src/index.ts index 967caa29..b40e2417 100644 --- a/packages/next-safe-action/src/index.ts +++ b/packages/next-safe-action/src/index.ts @@ -10,7 +10,8 @@ import { formatValidationErrors, } from "./validation-errors"; -export { ActionMetadataError, createMiddleware, DEFAULT_SERVER_ERROR_MESSAGE } from "./utils"; +export { createMiddleware } from "./middleware"; +export { ActionMetadataError, DEFAULT_SERVER_ERROR_MESSAGE } from "./utils"; export { ActionValidationError, flattenBindArgsValidationErrors, diff --git a/packages/next-safe-action/src/middleware.ts b/packages/next-safe-action/src/middleware.ts new file mode 100644 index 00000000..d8bde5a4 --- /dev/null +++ b/packages/next-safe-action/src/middleware.ts @@ -0,0 +1,21 @@ +import type { MiddlewareFn } from "./index.types"; + +/** + * Creates a standalone middleware function. It accepts a generic object with optional `serverError`, `ctx` and `metadata` + * properties, if you need one or all of them to be typed. The type for each property that is passed as generic is the + * **minimum** shape required to define the middleware function, but it can also be larger than that. + * + * {@link https://next-safe-action.dev/docs/safe-action-client/middleware#create-standalone-middleware-with-createmiddleware See docs for more information} + */ +export const createMiddleware = () => { + return { + define: ( + middlewareFn: MiddlewareFn< + BaseData extends { serverError: infer SE } ? SE : any, + BaseData extends { metadata: infer MD } ? MD : any, + BaseData extends { ctx: infer Ctx extends object } ? Ctx : object, + NextCtx + > + ) => middlewareFn, + }; +}; diff --git a/packages/next-safe-action/src/utils.ts b/packages/next-safe-action/src/utils.ts index aaa41115..c923c9ec 100644 --- a/packages/next-safe-action/src/utils.ts +++ b/packages/next-safe-action/src/utils.ts @@ -1,5 +1,3 @@ -import type { MiddlewareFn } from "./index.types"; - export const DEFAULT_SERVER_ERROR_MESSAGE = "Something went wrong while executing the operation."; export const isError = (error: unknown): error is Error => error instanceof Error; @@ -30,23 +28,3 @@ export class ActionMetadataError extends Error { this.name = "ActionMetadataError"; } } - -/** - * Creates a standalone middleware function. It accepts a generic object with optional `serverError`, `ctx` and `metadata` - * properties, if you need one or all of them to be typed. The type for each property that is passed as generic is the - * **minimum** shape required to define the middleware function, but it can also be larger than that. - * - * {@link https://next-safe-action.dev/docs/safe-action-client/middleware#create-standalone-middleware-with-createmiddleware See docs for more information} - */ -export const createMiddleware = () => { - return { - define: ( - middlewareFn: MiddlewareFn< - BaseData extends { serverError: infer SE } ? SE : any, - BaseData extends { metadata: infer MD } ? MD : any, - BaseData extends { ctx: infer Ctx extends object } ? Ctx : object, - NextCtx - > - ) => middlewareFn, - }; -}; From 8813200217856297e303ae8759dd4846efd8ce2e Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 15:22:25 +0200 Subject: [PATCH 10/18] refactor(middleware): export `createMiddleware` function as `experimental_createMiddleware` --- packages/next-safe-action/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-safe-action/src/index.ts b/packages/next-safe-action/src/index.ts index b40e2417..e3eb1030 100644 --- a/packages/next-safe-action/src/index.ts +++ b/packages/next-safe-action/src/index.ts @@ -10,7 +10,7 @@ import { formatValidationErrors, } from "./validation-errors"; -export { createMiddleware } from "./middleware"; +export { createMiddleware as experimental_createMiddleware } from "./middleware"; export { ActionMetadataError, DEFAULT_SERVER_ERROR_MESSAGE } from "./utils"; export { ActionValidationError, From 1764d8da7ed6a7260dcbe4a33ea5893accb76f11 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 17:47:04 +0200 Subject: [PATCH 11/18] test(middleware): don't spread `ctx` when extending it --- .../next-safe-action/src/__tests__/middleware.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/next-safe-action/src/__tests__/middleware.test.ts b/packages/next-safe-action/src/__tests__/middleware.test.ts index 6878605b..9b7d215f 100644 --- a/packages/next-safe-action/src/__tests__/middleware.test.ts +++ b/packages/next-safe-action/src/__tests__/middleware.test.ts @@ -42,8 +42,8 @@ test("instance context value is accessible in server code function", async () => test("instance context value is extended in action middleware and both values are accessible in server code function", async () => { const action = ac - .use(async ({ next, ctx }) => { - return next({ ctx: { ...ctx, bar: "baz" } }); + .use(async ({ next }) => { + return next({ ctx: { bar: "baz" } }); }) .action(async ({ ctx }) => { return { @@ -96,8 +96,8 @@ test("action client inputs are passed to middleware", async () => { }) ) .bindArgsSchemas([z.object({ age: z.number().positive() })]) - .use(async ({ clientInput, bindArgsClientInputs, next, ctx }) => { - return next({ ctx: { ...ctx, clientInput, bindArgsClientInputs } }); + .use(async ({ clientInput, bindArgsClientInputs, next }) => { + return next({ ctx: { clientInput, bindArgsClientInputs } }); }) .action(async ({ ctx }) => { return { From 70612d57c667b39258877428ef933ddac5c4be60 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 17:51:35 +0200 Subject: [PATCH 12/18] test(middleware): add standalone middleware test --- .../src/__tests__/middleware.test.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/next-safe-action/src/__tests__/middleware.test.ts b/packages/next-safe-action/src/__tests__/middleware.test.ts index 9b7d215f..0c66815e 100644 --- a/packages/next-safe-action/src/__tests__/middleware.test.ts +++ b/packages/next-safe-action/src/__tests__/middleware.test.ts @@ -5,6 +5,7 @@ import { test } from "node:test"; import { z } from "zod"; import { createSafeActionClient, + experimental_createMiddleware, formatBindArgsValidationErrors, formatValidationErrors, returnValidationErrors, @@ -394,3 +395,24 @@ test("overridden formatted validation errors in execution result from middleware assert.deepStrictEqual(middlewareResult, expectedResult); }); + +test("standalone middleware extends context", async () => { + const myMiddleware = experimental_createMiddleware<{ ctx: { foo: string } }>().define(async ({ next }) => { + return next({ ctx: { baz: "qux" } }); + }); + + const action = ac.use(myMiddleware).action(async ({ ctx }) => { + return { + ctx, + }; + }); + + const actualResult = await action(); + const expectedResult = { + data: { + ctx: { foo: "bar", baz: "qux" }, + }, + }; + + assert.deepStrictEqual(actualResult, expectedResult); +}); From f810202bce42abdc44739b55797fdb4f00b58f24 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 19:17:08 +0200 Subject: [PATCH 13/18] chore(website): add standalone middleware documentation --- .../customize-validation-errors-format.md | 2 +- website/docs/recipes/extend-context.md | 31 -------- .../extend-a-client.md} | 4 +- .../extend-previous-schema.md | 2 +- website/docs/safe-action-client/index.md | 2 +- website/docs/safe-action-client/middleware.md | 75 ++++++++++++++++++- 6 files changed, 76 insertions(+), 40 deletions(-) delete mode 100644 website/docs/recipes/extend-context.md rename website/docs/{recipes/extend-base-client.md => safe-action-client/extend-a-client.md} (98%) rename website/docs/{recipes => safe-action-client}/extend-previous-schema.md (98%) diff --git a/website/docs/recipes/customize-validation-errors-format.md b/website/docs/recipes/customize-validation-errors-format.md index ab33d9ef..940c5cc8 100644 --- a/website/docs/recipes/customize-validation-errors-format.md +++ b/website/docs/recipes/customize-validation-errors-format.md @@ -49,7 +49,7 @@ export const loginUser = actionClient ``` :::note -If you chain multiple `schema` methods, as explained in the [Extend previous schema](/docs/recipes/extend-previous-schema) page, and want to override the default validation errors shape, you **must** use `handleValidationErrorsShape` inside the last `schema` method, otherwise there would be a type mismatch in the returned action result. +If you chain multiple `schema` methods, as explained in the [Extend previous schema](/docs/safe-action-client/extend-previous-schema) page, and want to override the default validation errors shape, you **must** use `handleValidationErrorsShape` inside the last `schema` method, otherwise there would be a type mismatch in the returned action result. ::: ### `flattenValidationErrors` and `flattenBindArgsValidationErrors` utility functions diff --git a/website/docs/recipes/extend-context.md b/website/docs/recipes/extend-context.md deleted file mode 100644 index 36bdcc82..00000000 --- a/website/docs/recipes/extend-context.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_position: 4 -description: Learn how to extend context when using middleware functions. ---- - -# Extend context - -Context is a special object that holds information about the current execution state. This object is passed to middleware functions and server code functions when defining actions. - -Since version 7.6.0, context is extended by default when defining middleware functions. For instance, if you want both the `sessionId` and `userId` in the context, by using two different middleware functions (trivial example), you can do it like this: - -```typescript -import { createSafeActionClient } from "next-safe-action"; - -const actionClient = createSafeActionClient() - .use(async ({ next }) => { - const sessionId = await getSessionId(); - return next({ ctx: { sessionId } }) - }) - .use(async ({ next, ctx }) => { - const { sessionId } = ctx; // Context contains `sessionId` - const userId = await getUserIdBySessionId(sessionId); - return next({ ctx: { userId } }) - }) - .use(async ({ next }) => { - // You can also define a middleware function that doesn't extend or modify the context. - return next(); - }) -``` - -All actions defined using this client will contain both `sessionId` and `userId` in their context. \ No newline at end of file diff --git a/website/docs/recipes/extend-base-client.md b/website/docs/safe-action-client/extend-a-client.md similarity index 98% rename from website/docs/recipes/extend-base-client.md rename to website/docs/safe-action-client/extend-a-client.md index b01a5d00..4fc002ac 100644 --- a/website/docs/recipes/extend-base-client.md +++ b/website/docs/safe-action-client/extend-a-client.md @@ -1,9 +1,9 @@ --- -sidebar_position: 3 +sidebar_position: 5 description: Learn how to use both a basic and an authorization client at the same time in your project. --- -# Extend base client +# Extend a client A common and recommended pattern with this library is to extend the base safe action client, to cover different use cases that you might want and/or need in your applicaton. diff --git a/website/docs/recipes/extend-previous-schema.md b/website/docs/safe-action-client/extend-previous-schema.md similarity index 98% rename from website/docs/recipes/extend-previous-schema.md rename to website/docs/safe-action-client/extend-previous-schema.md index c6859032..7f104f0b 100644 --- a/website/docs/recipes/extend-previous-schema.md +++ b/website/docs/safe-action-client/extend-previous-schema.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 description: Learn how to use next-safe-action with a i18n solution. --- diff --git a/website/docs/safe-action-client/index.md b/website/docs/safe-action-client/index.md index 2046ebbe..616b79a1 100644 --- a/website/docs/safe-action-client/index.md +++ b/website/docs/safe-action-client/index.md @@ -5,6 +5,6 @@ description: Safe action client is the instance that you can use to create types # Safe action client -The safe action client instance is created by the `createSafeActionClient()` function. The instance is used to create safe actions, as you have already seen in previous sections of the documentation. You can create multiple clients too, for different purposes, as explained [in this section](/docs/recipes/extend-base-client). +The safe action client instance is created by the `createSafeActionClient()` function. The instance is used to create safe actions, as you have already seen in previous sections of the documentation. You can create multiple clients too, for different purposes, as explained [in this page](/docs/safe-action-client/extend-a-client). You can also provide functions to the client, to customize the behavior for every action you then create with it. We will explore them in detail in the next sections. \ No newline at end of file diff --git a/website/docs/safe-action-client/middleware.md b/website/docs/safe-action-client/middleware.md index 13294fa4..788582f4 100644 --- a/website/docs/safe-action-client/middleware.md +++ b/website/docs/safe-action-client/middleware.md @@ -201,10 +201,77 @@ Note that the second line comes from the default `handleServerErrorLog` function `middlewareFn` returns a Promise of a [`MiddlewareResult`](/docs/types#middlewareresult) object. It extends the result of a safe action with `success` property, and `parsedInput`, `bindArgsParsedInputs` and `ctx` optional properties. This is the exact return type of the `next` function, so you must always return it (or its result) to continue executing the middleware chain. -## Context extension +## Extend context -Visit the [context extension](/docs/recipes/extend-context) recipe for more information on how to extend context with middleware functions. +Context is a special object that holds information about the current execution state. This object is passed to middleware functions and server code functions when defining actions. -## Create standalone middleware with `createMiddleware` +Starting from version 7.6.0, context is extended by default when defining middleware functions. For instance, if you want both the `sessionId` and `userId` in the context, by using two different middleware functions (trivial example), you can do it like this: -WIP \ No newline at end of file +```typescript +import { createSafeActionClient } from "next-safe-action"; + +const actionClient = createSafeActionClient() + .use(async ({ next }) => { + const sessionId = await getSessionId(); + return next({ ctx: { sessionId } }) + }) + .use(async ({ next, ctx }) => { + const { sessionId } = ctx; // Context contains `sessionId` + const userId = await getUserIdBySessionId(sessionId); + return next({ ctx: { userId } }) + }) + .use(async ({ next }) => { + // You can also define a middleware function that doesn't extend or modify the context. + return next(); + }) +``` + +All actions defined using this client will contain both `sessionId` and `userId` in their context. + +## Create standalone middleware + +:::info +Experimental feature +::: + +Starting from version 7.6.0, you can create standalone middleware functions using the built-in `experimental_createMiddleware()` function. It's labelled as experimental because the API could change in the future, but it's perfectly fine to use it, as it's a pretty simple function that just wraps the creation of middleware. + +Thanks to this feature, and the previously mentioned [context extension](#extend-context), you can now define standalone middleware functions and even publish them as packages, if you want to. + +Here's how to use `experimental_createMiddleware()`: + +```typescript title="src/lib/safe-action.ts" +import { createSafeActionClient, experimental_createMiddleware } from "next-safe-action"; +import { z } from "zod"; + +export const actionClient = createSafeActionClient({ + defineMetadataSchema: () => z.object({ + actionName: z.string() + }), +}).use(async ({ next }) => { + return next({ ctx: { foo: "bar" } }); +}); + +// This middleware works with any client. +const myMiddleware1 = experimental_createMiddleware().define(async ({ next }) => { + // Do something useful here... + return next({ ctx: { baz: "qux" } }); +}); + +// This middleware works with clients that at minimum have `ctx.foo` and `metadata.actionName` properties. +// More information below. * +const myMiddleware2 = experimental_createMiddleware<{ + ctx: { foo: string }; // [1] + metadata: { actionName: string }; // [2] +}>().define(async ({ next }) => { + // Do something useful here... + return next({ ctx: { john: "doe" } }); +}); + +// You can use it like a regular middleware function. +export const actionClientWithMyMiddleware = actionClient.use(myMiddleware1).use(myMiddleware2); +``` + +An action defined using the `actionClientWithMyMiddleware` will contain `foo`, `baz` and `john` in its context. + +\* Note that you can pass, **but not required to**, an object with two generic properties to the `experimental_createMiddleware()` function: `ctx` \[1\], and `metadata` \[2\]. Those keys are optional, and you should only provide them if you want your middleware to require **at minimum** the shape you passed in as generic. By doing that, following the above example, you can then access `ctx.foo` and `metadata.actionName` in the middleware you're defining. If you pass a middleware that requires those properties to a client that doesn't have them, you'll get an error in `use()` method. \ No newline at end of file From 33a4e9df2f1013b47c6856928d18cbd15f483bb6 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 19:23:24 +0200 Subject: [PATCH 14/18] chore(website): update types --- website/docs/types.md | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/website/docs/types.md b/website/docs/types.md index 22c34b56..cb7f3029 100644 --- a/website/docs/types.md +++ b/website/docs/types.md @@ -23,7 +23,7 @@ Type of the util properties passed to server error handler functions. export type ServerErrorFunctionUtils = { clientInput: unknown; bindArgsClientInputs: unknown[]; - ctx: unknown; + ctx: object; metadata: MetadataSchema extends Schema ? Infer : undefined; }; ``` @@ -67,7 +67,7 @@ export type SafeActionResult< CBAVE = BindArgsValidationErrors, Data = unknown, // eslint-disable-next-line - NextCtx = unknown, + NextCtx = object, > = { data?: Data; serverError?: ServerError; @@ -119,7 +119,7 @@ export type SafeStateActionFn< Type of the result of a middleware function. It extends the result of a safe action with information about the action execution. ```typescript -export type MiddlewareResult = SafeActionResult< +export type MiddlewareResult = SafeActionResult< ServerError, any, any, @@ -130,7 +130,7 @@ export type MiddlewareResult = SafeActionResult< > & { parsedInput?: unknown; bindArgsParsedInputs?: unknown[]; - ctx?: unknown; + ctx?: object; success: boolean; }; ``` @@ -140,14 +140,14 @@ export type MiddlewareResult = SafeActionResult< Type of the middleware function passed to a safe action client. ```typescript -export type MiddlewareFn = { +export type MiddlewareFn = { (opts: { clientInput: unknown; bindArgsClientInputs: unknown[]; ctx: Ctx; metadata: MD; next: { - (opts: { ctx: NC }): Promise>; + (opts: { ctx: NC }): Promise>; }; }): Promise>; }; @@ -158,10 +158,16 @@ export type MiddlewareFn = { Type of the function that executes server code when defining a new safe action. ```typescript -export type ServerCodeFn = (args: { +export type ServerCodeFn< + MD, + Ctx extends object, + S extends Schema | undefined, + BAS extends readonly Schema[], + Data, +> = (args: { parsedInput: S extends Schema ? Infer : undefined; bindArgsParsedInputs: InferArray; - ctx: Ctx; + ctx: Prettify; metadata: MD; }) => Promise; ``` @@ -174,7 +180,7 @@ Type of the function that executes server code when defining a new stateful safe export type StateServerCodeFn< ServerError, MD, - Ctx + Ctx extends object, S extends Schema | undefined, BAS extends readonly Schema[], CVE, @@ -198,6 +204,8 @@ Type of action execution utils. It includes action callbacks and other utils. ```typescript export type SafeActionUtils< ServerError, + MD, + Ctx extends object, S extends Schema | undefined, BAS extends readonly Schema[], CVE, @@ -208,20 +216,30 @@ export type SafeActionUtils< throwValidationErrors?: boolean; onSuccess?: (args: { data?: Data; + metadata: MD; + ctx?: Prettify; clientInput: S extends Schema ? InferIn : undefined; bindArgsClientInputs: InferInArray; parsedInput: S extends Schema ? Infer : undefined; bindArgsParsedInputs: InferArray; + hasRedirected: boolean; + hasNotFound: boolean; }) => MaybePromise; onError?: (args: { - error: Omit, "data">; + error: Prettify, "data">>; + metadata: MD; + ctx?: Prettify; clientInput: S extends Schema ? InferIn : undefined; bindArgsClientInputs: InferInArray; }) => MaybePromise; onSettled?: (args: { - result: SafeActionResult; + result: Prettify>; + metadata: MD; + ctx?: Prettify; clientInput: S extends Schema ? InferIn : undefined; bindArgsClientInputs: InferInArray; + hasRedirected: boolean; + hasNotFound: boolean; }) => MaybePromise; }; ``` From 07966b7ac6064291ee1d7df5e9803191ff474a40 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 19:27:05 +0200 Subject: [PATCH 15/18] chore(website): update dependencies --- website/package.json | 24 +- website/pnpm-lock.yaml | 918 ++++++++++++++++++++++------------------- 2 files changed, 494 insertions(+), 448 deletions(-) diff --git a/website/package.json b/website/package.json index 255a9fb8..eb903315 100644 --- a/website/package.json +++ b/website/package.json @@ -15,26 +15,26 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "3.4.0", - "@docusaurus/preset-classic": "3.4.0", - "@docusaurus/remark-plugin-npm2yarn": "^3.4.0", + "@docusaurus/core": "3.5.1", + "@docusaurus/preset-classic": "3.5.1", + "@docusaurus/remark-plugin-npm2yarn": "^3.5.1", "@mdx-js/react": "^3.0.1", - "acorn": "8.11.3", + "acorn": "8.12.1", "clsx": "^2.1.1", - "lucide-react": "^0.383.0", + "lucide-react": "^0.427.0", "prism-react-renderer": "^2.3.1", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "3.4.0", - "@docusaurus/tsconfig": "^3.4.0", - "autoprefixer": "^10.4.19", - "postcss": "^8.4.38", - "postcss-nested": "^6.0.1", - "tailwindcss": "^3.4.3", + "@docusaurus/module-type-aliases": "3.5.1", + "@docusaurus/tsconfig": "^3.5.1", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.41", + "postcss-nested": "^6.2.0", + "tailwindcss": "^3.4.9", "tailwindcss-bg-patterns": "^0.3.0", - "typescript": "^5.5.3" + "typescript": "^5.5.4" }, "browserslist": { "production": [ diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 0616877c..91854bdc 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -9,26 +9,26 @@ importers: .: dependencies: '@docusaurus/core': - specifier: 3.4.0 - version: 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) + specifier: 3.5.1 + version: 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) '@docusaurus/preset-classic': - specifier: 3.4.0 - version: 3.4.0(@algolia/client-search@4.23.3)(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.3) + specifier: 3.5.1 + version: 3.5.1(@algolia/client-search@4.23.3)(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.4) '@docusaurus/remark-plugin-npm2yarn': - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.5.1 + version: 3.5.1 '@mdx-js/react': specifier: ^3.0.1 version: 3.0.1(@types/react@18.2.79)(react@18.3.1) acorn: - specifier: 8.11.3 - version: 8.11.3 + specifier: 8.12.1 + version: 8.12.1 clsx: specifier: ^2.1.1 version: 2.1.1 lucide-react: - specifier: ^0.383.0 - version: 0.383.0(react@18.3.1) + specifier: ^0.427.0 + version: 0.427.0(react@18.3.1) prism-react-renderer: specifier: ^2.3.1 version: 2.3.1(react@18.3.1) @@ -40,29 +40,29 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@docusaurus/module-type-aliases': - specifier: 3.4.0 - version: 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 3.5.1 + version: 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@docusaurus/tsconfig': - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.5.1 + version: 3.5.1 autoprefixer: - specifier: ^10.4.19 - version: 10.4.19(postcss@8.4.38) + specifier: ^10.4.20 + version: 10.4.20(postcss@8.4.41) postcss: - specifier: ^8.4.38 - version: 8.4.38 + specifier: ^8.4.41 + version: 8.4.41 postcss-nested: - specifier: ^6.0.1 - version: 6.0.1(postcss@8.4.38) + specifier: ^6.2.0 + version: 6.2.0(postcss@8.4.41) tailwindcss: - specifier: ^3.4.3 - version: 3.4.3 + specifier: ^3.4.9 + version: 3.4.9 tailwindcss-bg-patterns: specifier: ^0.3.0 - version: 0.3.0(tailwindcss@3.4.3) + version: 0.3.0(tailwindcss@3.4.9) typescript: - specifier: ^5.5.3 - version: 5.5.3 + specifier: ^5.5.4 + version: 5.5.4 packages: @@ -816,93 +816,94 @@ packages: search-insights: optional: true - '@docusaurus/core@3.4.0': - resolution: {integrity: sha512-g+0wwmN2UJsBqy2fQRQ6fhXruoEa62JDeEa5d8IdTJlMoaDaEDfHh7WjwGRn4opuTQWpjAwP/fbcgyHKlE+64w==} + '@docusaurus/core@3.5.1': + resolution: {integrity: sha512-N3+9IbGI2jbkiRc6ZbEnU9dC02nHQXi8ivM1VJldkPQyP7WlyHXS+NDhmL3rwaYOMbGH96X2LcKigCKg7pEEqg==} engines: {node: '>=18.0'} hasBin: true peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/cssnano-preset@3.4.0': - resolution: {integrity: sha512-qwLFSz6v/pZHy/UP32IrprmH5ORce86BGtN0eBtG75PpzQJAzp9gefspox+s8IEOr0oZKuQ/nhzZ3xwyc3jYJQ==} + '@docusaurus/cssnano-preset@3.5.1': + resolution: {integrity: sha512-mvtWPLWePlm+4doepxMUT5ynsJQ3CgPtDdbaQh9wm3iAE/7OATBpSgLlfz5N+YtxI5bjIErjbkH8yzISP+S65g==} engines: {node: '>=18.0'} - '@docusaurus/logger@3.4.0': - resolution: {integrity: sha512-bZwkX+9SJ8lB9kVRkXw+xvHYSMGG4bpYHKGXeXFvyVc79NMeeBSGgzd4TQLHH+DYeOJoCdl8flrFJVxlZ0wo/Q==} + '@docusaurus/logger@3.5.1': + resolution: {integrity: sha512-B36a88CEHCtxIylAV1HNuiiISpoKBqm0UxA6a/JwtHX++Dxb7LNDSGs8ELBlQsZN0OG2tX3tBsCWyaLPwYorkQ==} engines: {node: '>=18.0'} - '@docusaurus/mdx-loader@3.4.0': - resolution: {integrity: sha512-kSSbrrk4nTjf4d+wtBA9H+FGauf2gCax89kV8SUSJu3qaTdSIKdWERlngsiHaCFgZ7laTJ8a67UFf+xlFPtuTw==} + '@docusaurus/mdx-loader@3.5.1': + resolution: {integrity: sha512-D6Ea2dt32xhoqH+1EuHLGDVSX2HLFiR4QpI0GTU46qOu2hb2ChpQENIUZ2inOsdGFunNa0fCnDG3qn7Kdbzq1A==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/module-type-aliases@3.4.0': - resolution: {integrity: sha512-A1AyS8WF5Bkjnb8s+guTDuYmUiwJzNrtchebBHpc0gz0PyHJNMaybUlSrmJjHVcGrya0LKI4YcR3lBDQfXRYLw==} + '@docusaurus/module-type-aliases@3.5.1': + resolution: {integrity: sha512-SKKdA5RnvZr3pvFXkxtfsBVNgflRGa/bN1HbNi+1s0HNVYPuhB9DFC/CrKe2OoOfUXx7F7k2gg0Jg9gJYDy4rA==} peerDependencies: react: '*' react-dom: '*' - '@docusaurus/plugin-content-blog@3.4.0': - resolution: {integrity: sha512-vv6ZAj78ibR5Jh7XBUT4ndIjmlAxkijM3Sx5MAAzC1gyv0vupDQNhzuFg1USQmQVj3P5I6bquk12etPV3LJ+Xw==} + '@docusaurus/plugin-content-blog@3.5.1': + resolution: {integrity: sha512-aPmrMV5cDa2QUZ+kPVJID5O6r+ZuLFtHEyneVl9AgryL/9ECudhtpTUdmdnmapnWfUzSSgqYRZ1JtydGLheSzw==} engines: {node: '>=18.0'} peerDependencies: + '@docusaurus/plugin-content-docs': '*' react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-content-docs@3.4.0': - resolution: {integrity: sha512-HkUCZffhBo7ocYheD9oZvMcDloRnGhBMOZRyVcAQRFmZPmNqSyISlXA1tQCIxW+r478fty97XXAGjNYzBjpCsg==} + '@docusaurus/plugin-content-docs@3.5.1': + resolution: {integrity: sha512-DX+I3eVyXak9KqYXg8dgptomqz/O4twjydpLJT8ZSe9lsZ0Pa1ZNPwmftWYn160O3o6GGeUYzr13Y1Got3iXRQ==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-content-pages@3.4.0': - resolution: {integrity: sha512-h2+VN/0JjpR8fIkDEAoadNjfR3oLzB+v1qSXbIAKjQ46JAHx3X22n9nqS+BWSQnTnp1AjkjSvZyJMekmcwxzxg==} + '@docusaurus/plugin-content-pages@3.5.1': + resolution: {integrity: sha512-V2PDVrO2vHYJ7uhrEHpfzg3TTuwfrgNC0pGhM5gXaMfCbdhKm7iwV0huGLcyIX5Peyh7EMP2e8GFccUzWFMYOg==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-debug@3.4.0': - resolution: {integrity: sha512-uV7FDUNXGyDSD3PwUaf5YijX91T5/H9SX4ErEcshzwgzWwBtK37nUWPU3ZLJfeTavX3fycTOqk9TglpOLaWkCg==} + '@docusaurus/plugin-debug@3.5.1': + resolution: {integrity: sha512-teFZamoECDiELwM1cx5OXd6dBpRtHarc7kWGL1iQozAkYcobZmqOWykBl4joMjSWUbJlx5v9/CVciykWbFNXjA==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-google-analytics@3.4.0': - resolution: {integrity: sha512-mCArluxEGi3cmYHqsgpGGt3IyLCrFBxPsxNZ56Mpur0xSlInnIHoeLDH7FvVVcPJRPSQ9/MfRqLsainRw+BojA==} + '@docusaurus/plugin-google-analytics@3.5.1': + resolution: {integrity: sha512-5FUiYZQWPXTPucMzaOOM25R7IwIPvMKbiB0SNVGtxVsGyFyo5i5fzrkBQl4mkZd7uqmslEPzwYbC28ZeFnrxjg==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-google-gtag@3.4.0': - resolution: {integrity: sha512-Dsgg6PLAqzZw5wZ4QjUYc8Z2KqJqXxHxq3vIoyoBWiLEEfigIs7wHR+oiWUQy3Zk9MIk6JTYj7tMoQU0Jm3nqA==} + '@docusaurus/plugin-google-gtag@3.5.1': + resolution: {integrity: sha512-jxBtLBPMv9BJXPXrwJSs69qYcHP/evT1NkVza2yOai7wi5r3E1tVm0bAxdciWitpM0dgS/HDa30qXE7vA1NRDg==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-google-tag-manager@3.4.0': - resolution: {integrity: sha512-O9tX1BTwxIhgXpOLpFDueYA9DWk69WCbDRrjYoMQtFHSkTyE7RhNgyjSPREUWJb9i+YUg3OrsvrBYRl64FCPCQ==} + '@docusaurus/plugin-google-tag-manager@3.5.1': + resolution: {integrity: sha512-W5WsKoRmb3lDmg2IBfmKsZDlQAkEx/dXuwr4bj7sSQdM8qd829Rsc4Gp5RddUrQdUz/W3Iocn7LayRM5aacJlA==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/plugin-sitemap@3.4.0': - resolution: {integrity: sha512-+0VDvx9SmNrFNgwPoeoCha+tRoAjopwT0+pYO1xAbyLcewXSemq+eLxEa46Q1/aoOaJQ0qqHELuQM7iS2gp33Q==} + '@docusaurus/plugin-sitemap@3.5.1': + resolution: {integrity: sha512-VXMGJM6uy4jx6HUsFs+kn8MujWGjN7S7p7PYUYSf1bmcFNlf+Qg5vDZtwBElHa2hapeH2AIj2b3QmTgmWeyOHw==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/preset-classic@3.4.0': - resolution: {integrity: sha512-Ohj6KB7siKqZaQhNJVMBBUzT3Nnp6eTKqO+FXO3qu/n1hJl3YLwVKTWBg28LF7MWrKu46UuYavwMRxud0VyqHg==} + '@docusaurus/preset-classic@3.5.1': + resolution: {integrity: sha512-afDMZoNYxdloJ7qJJbd3Lmv9uYXKKsEAOtvnvu2945kqe1LUGIIwOo1nMAKgB9y21E5FEvWKnla0MvkMraumZA==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 @@ -913,46 +914,47 @@ packages: peerDependencies: react: '*' - '@docusaurus/remark-plugin-npm2yarn@3.4.0': - resolution: {integrity: sha512-MXcYAkKu6544h7J4vbKdeH+G5HZf6LF3qZORQqWzxOi2p82PTLRu0YM6ZgzfPjH5nZClgLBHypPbyO9qhkxPKw==} + '@docusaurus/remark-plugin-npm2yarn@3.5.1': + resolution: {integrity: sha512-oN/jHOe4mI+wMmaQABYPvQm03DhiFrzJY2YEtHQrrUJNpfievoajM2QS2NObA8lngQ8U3+lMn0ULcKmfY309gQ==} engines: {node: '>=18.0'} - '@docusaurus/theme-classic@3.4.0': - resolution: {integrity: sha512-0IPtmxsBYv2adr1GnZRdMkEQt1YW6tpzrUPj02YxNpvJ5+ju4E13J5tB4nfdaen/tfR1hmpSPlTFPvTf4kwy8Q==} + '@docusaurus/theme-classic@3.5.1': + resolution: {integrity: sha512-k8rLMwHuTc3SqYekc20s1uZHjabt9yi6mt1RUjbkwmjsJlAB6zrtYvsB+ZxrhY5yeUD8DZm3h0qVvKbClHVCCA==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/theme-common@3.4.0': - resolution: {integrity: sha512-0A27alXuv7ZdCg28oPE8nH/Iz73/IUejVaCazqu9elS4ypjiLhK3KfzdSQBnL/g7YfHSlymZKdiOHEo8fJ0qMA==} + '@docusaurus/theme-common@3.5.1': + resolution: {integrity: sha512-r34YDzSjggX+B+8W+mG2dVh1ps4JJRCiyq8E1LnZIKLU6F89I2KpAZpPQ2/njKsKhBRLtQ1x92HVkD0FZ3xjrg==} engines: {node: '>=18.0'} peerDependencies: + '@docusaurus/plugin-content-docs': '*' react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/theme-search-algolia@3.4.0': - resolution: {integrity: sha512-aiHFx7OCw4Wck1z6IoShVdUWIjntC8FHCw9c5dR8r3q4Ynh+zkS8y2eFFunN/DL6RXPzpnvKCg3vhLQYJDmT9Q==} + '@docusaurus/theme-search-algolia@3.5.1': + resolution: {integrity: sha512-IcUbgh9YcedANhpa0Q3+67WUKY8G7YkN/pZxVBEFjq3d2bniRKktPv41Nh/+AtGLSNJIcspZwEAs/r/mKSZGug==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/theme-translations@3.4.0': - resolution: {integrity: sha512-zSxCSpmQCCdQU5Q4CnX/ID8CSUUI3fvmq4hU/GNP/XoAWtXo9SAVnM3TzpU8Gb//H3WCsT8mJcTfyOk3d9ftNg==} + '@docusaurus/theme-translations@3.5.1': + resolution: {integrity: sha512-fyzQOWrTm0+ZpTlS0/xHsIK4f+LA4qVFrq8rCzIHjxZRip/noYUOwF64lA95vcuw6qnOVBoNE/LyfbBvExnpcw==} engines: {node: '>=18.0'} - '@docusaurus/tsconfig@3.4.0': - resolution: {integrity: sha512-0qENiJ+TRaeTzcg4olrnh0BQ7eCxTgbYWBnWUeQDc84UYkt/T3pDNnm3SiQkqPb+YQ1qtYFlC0RriAElclo8Dg==} + '@docusaurus/tsconfig@3.5.1': + resolution: {integrity: sha512-6OO63/xQ11Tu4reCRuB4zfjqdZYmQwkOTVI8zxxEHCLma4pplsx4HTCB2lVgztEL+Qr6hcHY952ZrpmoAt5rUA==} - '@docusaurus/types@3.4.0': - resolution: {integrity: sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==} + '@docusaurus/types@3.5.1': + resolution: {integrity: sha512-IXTGQBoXAGFliGF5Cn3F+gSGskgzAL8+4y6dDY1gcePA0r8WngHj8oovS1YPv+b9JOff32nv8YGGZITHOMXJsA==} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - '@docusaurus/utils-common@3.4.0': - resolution: {integrity: sha512-NVx54Wr4rCEKsjOH5QEVvxIqVvm+9kh7q8aYTU5WzUU9/Hctd6aTrcZ3G0Id4zYJ+AeaG5K5qHA4CY5Kcm2iyQ==} + '@docusaurus/utils-common@3.5.1': + resolution: {integrity: sha512-374n6/IW34gHR65JMMN33XLFogTCsrGVPQDVbv2vG96EYHvYzE/plfcGV7xSbXB8yS1YHsxVfvNgVUGi973bfQ==} engines: {node: '>=18.0'} peerDependencies: '@docusaurus/types': '*' @@ -960,12 +962,12 @@ packages: '@docusaurus/types': optional: true - '@docusaurus/utils-validation@3.4.0': - resolution: {integrity: sha512-hYQ9fM+AXYVTWxJOT1EuNaRnrR2WGpRdLDQG07O8UOpsvCPWUVOeo26Rbm0JWY2sGLfzAb+tvJ62yF+8F+TV0g==} + '@docusaurus/utils-validation@3.5.1': + resolution: {integrity: sha512-LZdQnqVVLStgTCn0rfvf4wuOQkjPbGtLXJIQ449em1wJeSFO7lfmn5VGUNLt+xKHvIPfN272EHG8BuvijCI0+A==} engines: {node: '>=18.0'} - '@docusaurus/utils@3.4.0': - resolution: {integrity: sha512-fRwnu3L3nnWaXOgs88BVBmG1yGjcQqZNHG+vInhEa2Sz2oQB+ZjbEMO5Rh9ePFpZ0YDiDUhpaVjwmS+AU2F14g==} + '@docusaurus/utils@3.5.1': + resolution: {integrity: sha512-/4QAvXyiQviz2FQ4ct5l1ckvDihIdjS8FsOExC0T+Y1UD38jgPbjTwRJXsDaRsDRCCrDAtXvlonxXw2kixcnXw==} engines: {node: '>=18.0'} peerDependencies: '@docusaurus/types': '*' @@ -1386,8 +1388,8 @@ packages: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true @@ -1490,8 +1492,8 @@ packages: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} - autoprefixer@10.4.19: - resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==} + autoprefixer@10.4.20: + resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: @@ -1571,6 +1573,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -1619,6 +1626,9 @@ packages: caniuse-lite@1.0.30001612: resolution: {integrity: sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==} + caniuse-lite@1.0.30001651: + resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -2084,6 +2094,9 @@ packages: electron-to-chromium@1.4.747: resolution: {integrity: sha512-+FnSWZIAvFHbsNVmUxhEqWiaOiPMcfum1GQzlWCg/wLigVtshOsjXHyEFfmt6cFK6+HkS3QOJBv6/3OPumbBfw==} + electron-to-chromium@1.5.6: + resolution: {integrity: sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2632,8 +2645,8 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - infima@0.2.0-alpha.43: - resolution: {integrity: sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ==} + infima@0.2.0-alpha.44: + resolution: {integrity: sha512-tuRkUSO/lB3rEhLJk25atwAjgLuzq070+pOW8XcvpHky/YbENnRRdPd85IBkyeTgttmOy5ah+yHYsK1HhUd4lQ==} engines: {node: '>=12'} inflight@1.0.6: @@ -2957,10 +2970,10 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - lucide-react@0.383.0: - resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} + lucide-react@0.427.0: + resolution: {integrity: sha512-lv9s6c5BDF/ccuA0EgTdskTxIe11qpwBDmzRZHJAKtp8LTewAvDvOM+pTES9IpbBuTqkjiMhOmGpJ/CB+mKjFw==} peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc markdown-extensions@2.0.0: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} @@ -3280,6 +3293,9 @@ packages: node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -3474,6 +3490,9 @@ packages: picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -3639,8 +3658,8 @@ packages: peerDependencies: postcss: ^8.1.0 - postcss-nested@6.0.1: - resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + postcss-nested@6.2.0: + resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 @@ -3727,6 +3746,10 @@ packages: resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==} engines: {node: '>=4'} + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} + engines: {node: '>=4'} + postcss-sort-media-queries@5.2.0: resolution: {integrity: sha512-AZ5fDMLD8SldlAYlvi8NIqo0+Z8xnXU2ia0jxmuhxAU+Lqt9K+AlmLNJ/zWEnE9x+Zx3qL3+1K20ATgNOr3fAA==} engines: {node: '>=14.0.0'} @@ -3754,8 +3777,8 @@ packages: peerDependencies: postcss: ^8.4.31 - postcss@8.4.38: - resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + postcss@8.4.41: + resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} engines: {node: ^10 || ^12 || >=14} pretty-error@4.0.0: @@ -4332,8 +4355,8 @@ packages: peerDependencies: tailwindcss: '>2' - tailwindcss@3.4.3: - resolution: {integrity: sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==} + tailwindcss@3.4.9: + resolution: {integrity: sha512-1SEOvRr6sSdV5IDf9iC+NU4dhwdqzF4zKKq3sAbasUWHEM6lsMhX+eNN5gkPx1BvLFEnZQEUFbXnGj8Qlp83Pg==} engines: {node: '>=14.0.0'} hasBin: true @@ -4428,8 +4451,8 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript@5.5.3: - resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true @@ -4498,6 +4521,12 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + update-notifier@6.0.2: resolution: {integrity: sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==} engines: {node: '>=14.16'} @@ -5632,7 +5661,7 @@ snapshots: transitivePeerDependencies: - '@algolia/client-search' - '@docusaurus/core@3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/core@3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: '@babel/core': 7.24.4 '@babel/generator': 7.24.4 @@ -5644,13 +5673,13 @@ snapshots: '@babel/runtime': 7.24.4 '@babel/runtime-corejs3': 7.24.4 '@babel/traverse': 7.24.1 - '@docusaurus/cssnano-preset': 3.4.0 - '@docusaurus/logger': 3.4.0 - '@docusaurus/mdx-loader': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - autoprefixer: 10.4.19(postcss@8.4.38) + '@docusaurus/cssnano-preset': 3.5.1 + '@docusaurus/logger': 3.5.1 + '@docusaurus/mdx-loader': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + autoprefixer: 10.4.20(postcss@8.4.41) babel-loader: 9.1.3(@babel/core@7.24.4)(webpack@5.91.0) babel-plugin-dynamic-import-node: 2.3.3 boxen: 6.2.1 @@ -5664,7 +5693,7 @@ snapshots: core-js: 3.37.0 css-loader: 6.11.0(webpack@5.91.0) css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(webpack@5.91.0) - cssnano: 6.1.2(postcss@8.4.38) + cssnano: 6.1.2(postcss@8.4.41) del: 6.1.1 detect-port: 1.5.1 escape-html: 1.0.3 @@ -5679,11 +5708,11 @@ snapshots: lodash: 4.17.21 mini-css-extract-plugin: 2.9.0(webpack@5.91.0) p-map: 4.0.0 - postcss: 8.4.38 - postcss-loader: 7.3.4(postcss@8.4.38)(typescript@5.5.3)(webpack@5.91.0) + postcss: 8.4.41 + postcss-loader: 7.3.4(postcss@8.4.41)(typescript@5.5.4)(webpack@5.91.0) prompts: 2.4.2 react: 18.3.1 - react-dev-utils: 12.0.1(typescript@5.5.3)(webpack@5.91.0) + react-dev-utils: 12.0.1(typescript@5.5.4)(webpack@5.91.0) react-dom: 18.3.1(react@18.3.1) react-helmet-async: 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-loadable: '@docusaurus/react-loadable@6.0.0(react@18.3.1)' @@ -5723,23 +5752,23 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/cssnano-preset@3.4.0': + '@docusaurus/cssnano-preset@3.5.1': dependencies: - cssnano-preset-advanced: 6.1.2(postcss@8.4.38) - postcss: 8.4.38 - postcss-sort-media-queries: 5.2.0(postcss@8.4.38) + cssnano-preset-advanced: 6.1.2(postcss@8.4.41) + postcss: 8.4.41 + postcss-sort-media-queries: 5.2.0(postcss@8.4.41) tslib: 2.6.2 - '@docusaurus/logger@3.4.0': + '@docusaurus/logger@3.5.1': dependencies: chalk: 4.1.2 tslib: 2.6.2 - '@docusaurus/mdx-loader@3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/mdx-loader@3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/logger': 3.4.0 - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/logger': 3.5.1 + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) '@mdx-js/mdx': 3.0.1 '@slorber/remark-comment': 1.0.0 escape-html: 1.0.3 @@ -5772,9 +5801,9 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/module-type-aliases@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@docusaurus/module-type-aliases@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/history': 4.7.11 '@types/react': 18.2.79 '@types/react-router-config': 5.0.11 @@ -5790,15 +5819,17 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/plugin-content-blog@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': - dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/logger': 3.4.0 - '@docusaurus/mdx-loader': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/plugin-content-blog@3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': + dependencies: + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/logger': 3.5.1 + '@docusaurus/mdx-loader': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-content-docs': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-common': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) cheerio: 1.0.0-rc.12 feed: 4.2.2 fs-extra: 11.2.0 @@ -5829,16 +5860,17 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-content-docs@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': - dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/logger': 3.4.0 - '@docusaurus/mdx-loader': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/module-type-aliases': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': + dependencies: + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/logger': 3.5.1 + '@docusaurus/mdx-loader': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/module-type-aliases': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/theme-common': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) '@types/react-router-config': 5.0.11 combine-promises: 1.2.0 fs-extra: 11.2.0 @@ -5867,13 +5899,13 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-content-pages@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/plugin-content-pages@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/mdx-loader': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/mdx-loader': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) fs-extra: 11.2.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -5897,11 +5929,11 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-debug@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/plugin-debug@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) fs-extra: 11.2.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -5925,11 +5957,11 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-google-analytics@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/plugin-google-analytics@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) tslib: 2.6.2 @@ -5951,11 +5983,11 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-google-gtag@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/plugin-google-gtag@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) '@types/gtag.js': 0.0.12 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -5978,11 +6010,11 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-google-tag-manager@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/plugin-google-tag-manager@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) tslib: 2.6.2 @@ -6004,14 +6036,14 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/plugin-sitemap@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/plugin-sitemap@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/logger': 3.4.0 - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/logger': 3.5.1 + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) fs-extra: 11.2.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -6035,21 +6067,21 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/preset-classic@3.4.0(@algolia/client-search@4.23.3)(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.3)': - dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-blog': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-docs': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-pages': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-debug': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-google-analytics': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-google-gtag': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-google-tag-manager': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-sitemap': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-classic': 3.4.0(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-search-algolia': 3.4.0(@algolia/client-search@4.23.3)(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.3) - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/preset-classic@3.5.1(@algolia/client-search@4.23.3)(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.4)': + dependencies: + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-content-blog': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-content-docs': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-content-pages': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-debug': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-google-analytics': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-google-gtag': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-google-tag-manager': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-sitemap': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-classic': 3.5.1(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-common': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-search-algolia': 3.5.1(@algolia/client-search@4.23.3)(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.4) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) transitivePeerDependencies: @@ -6078,7 +6110,7 @@ snapshots: '@types/react': 18.2.79 react: 18.3.1 - '@docusaurus/remark-plugin-npm2yarn@3.4.0': + '@docusaurus/remark-plugin-npm2yarn@3.5.1': dependencies: mdast-util-mdx: 3.0.0 npm-to-yarn: 2.2.1 @@ -6088,27 +6120,27 @@ snapshots: transitivePeerDependencies: - supports-color - '@docusaurus/theme-classic@3.4.0(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': - dependencies: - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/mdx-loader': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/module-type-aliases': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/plugin-content-blog': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-docs': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-pages': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-translations': 3.4.0 - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/theme-classic@3.5.1(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': + dependencies: + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/mdx-loader': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/module-type-aliases': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/plugin-content-blog': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-content-docs': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/plugin-content-pages': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-common': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-translations': 3.5.1 + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) '@mdx-js/react': 3.0.1(@types/react@18.2.79)(react@18.3.1) clsx: 2.1.1 copy-text-to-clipboard: 3.2.0 - infima: 0.2.0-alpha.43 + infima: 0.2.0-alpha.44 lodash: 4.17.21 nprogress: 0.2.0 - postcss: 8.4.38 + postcss: 8.4.41 prism-react-renderer: 2.3.1(react@18.3.1) prismjs: 1.29.0 react: 18.3.1 @@ -6136,15 +6168,13 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/theme-common@3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3)': + '@docusaurus/theme-common@3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)': dependencies: - '@docusaurus/mdx-loader': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/module-type-aliases': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/plugin-content-blog': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-docs': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/plugin-content-pages': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/mdx-loader': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/module-type-aliases': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/plugin-content-docs': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) '@types/history': 4.7.11 '@types/react': 18.2.79 '@types/react-router-config': 5.0.11 @@ -6157,33 +6187,23 @@ snapshots: utility-types: 3.11.0 transitivePeerDependencies: - '@docusaurus/types' - - '@parcel/css' - - '@rspack/core' - '@swc/core' - - '@swc/css' - - bufferutil - - csso - - debug - esbuild - - eslint - - lightningcss - supports-color - typescript - uglify-js - - utf-8-validate - - vue-template-compiler - webpack-cli - '@docusaurus/theme-search-algolia@3.4.0(@algolia/client-search@4.23.3)(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.3)': + '@docusaurus/theme-search-algolia@3.5.1(@algolia/client-search@4.23.3)(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0)(typescript@5.5.4)': dependencies: '@docsearch/react': 3.6.0(@algolia/client-search@4.23.3)(@types/react@18.2.79)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.13.0) - '@docusaurus/core': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/logger': 3.4.0 - '@docusaurus/plugin-content-docs': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) - '@docusaurus/theme-translations': 3.4.0 - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-validation': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) + '@docusaurus/core': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/logger': 3.5.1 + '@docusaurus/plugin-content-docs': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-common': 3.5.1(@docusaurus/plugin-content-docs@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4))(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4) + '@docusaurus/theme-translations': 3.5.1 + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-validation': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) algoliasearch: 4.23.3 algoliasearch-helper: 3.18.0(algoliasearch@4.23.3) clsx: 2.1.1 @@ -6216,14 +6236,14 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/theme-translations@3.4.0': + '@docusaurus/theme-translations@3.5.1': dependencies: fs-extra: 11.2.0 tslib: 2.6.2 - '@docusaurus/tsconfig@3.4.0': {} + '@docusaurus/tsconfig@3.5.1': {} - '@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@mdx-js/mdx': 3.0.1 '@types/history': 4.7.11 @@ -6243,17 +6263,17 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils-common@3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))': + '@docusaurus/utils-common@3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))': dependencies: tslib: 2.6.2 optionalDependencies: - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@docusaurus/utils-validation@3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3)': + '@docusaurus/utils-validation@3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4)': dependencies: - '@docusaurus/logger': 3.4.0 - '@docusaurus/utils': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3) - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@docusaurus/logger': 3.5.1 + '@docusaurus/utils': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4) + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) fs-extra: 11.2.0 joi: 17.13.0 js-yaml: 4.1.0 @@ -6268,11 +6288,11 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils@3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.3)': + '@docusaurus/utils@3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.5.4)': dependencies: - '@docusaurus/logger': 3.4.0 - '@docusaurus/utils-common': 3.4.0(@docusaurus/types@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) - '@svgr/webpack': 8.1.0(typescript@5.5.3) + '@docusaurus/logger': 3.5.1 + '@docusaurus/utils-common': 3.5.1(@docusaurus/types@3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + '@svgr/webpack': 8.1.0(typescript@5.5.4) escape-string-regexp: 4.0.0 file-loader: 6.2.0(webpack@5.91.0) fs-extra: 11.2.0 @@ -6291,7 +6311,7 @@ snapshots: utility-types: 3.11.0 webpack: 5.91.0 optionalDependencies: - '@docusaurus/types': 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@docusaurus/types': 3.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) transitivePeerDependencies: - '@swc/core' - esbuild @@ -6479,12 +6499,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.4) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.4) - '@svgr/core@8.1.0(typescript@5.5.3)': + '@svgr/core@8.1.0(typescript@5.5.4)': dependencies: '@babel/core': 7.24.4 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.4) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.5.3) + cosmiconfig: 8.3.6(typescript@5.5.4) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -6495,35 +6515,35 @@ snapshots: '@babel/types': 7.24.0 entities: 4.5.0 - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.5.3))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.5.4))': dependencies: '@babel/core': 7.24.4 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.4) - '@svgr/core': 8.1.0(typescript@5.5.3) + '@svgr/core': 8.1.0(typescript@5.5.4) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.5.3))(typescript@5.5.3)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.5.4))(typescript@5.5.4)': dependencies: - '@svgr/core': 8.1.0(typescript@5.5.3) - cosmiconfig: 8.3.6(typescript@5.5.3) + '@svgr/core': 8.1.0(typescript@5.5.4) + cosmiconfig: 8.3.6(typescript@5.5.4) deepmerge: 4.3.1 svgo: 3.2.0 transitivePeerDependencies: - typescript - '@svgr/webpack@8.1.0(typescript@5.5.3)': + '@svgr/webpack@8.1.0(typescript@5.5.4)': dependencies: '@babel/core': 7.24.4 '@babel/plugin-transform-react-constant-elements': 7.24.1(@babel/core@7.24.4) '@babel/preset-env': 7.24.4(@babel/core@7.24.4) '@babel/preset-react': 7.24.1(@babel/core@7.24.4) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.4) - '@svgr/core': 8.1.0(typescript@5.5.3) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.5.3)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.5.3))(typescript@5.5.3) + '@svgr/core': 8.1.0(typescript@5.5.4) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.5.4)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.5.4))(typescript@5.5.4) transitivePeerDependencies: - supports-color - typescript @@ -6676,7 +6696,7 @@ snapshots: '@types/sax@1.2.7': dependencies: - '@types/node': 17.0.45 + '@types/node': 20.14.11 '@types/send@0.17.4': dependencies: @@ -6798,17 +6818,17 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-import-assertions@1.9.0(acorn@8.11.3): + acorn-import-assertions@1.9.0(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 acorn-walk@8.3.2: {} - acorn@8.11.3: {} + acorn@8.12.1: {} address@1.2.2: {} @@ -6910,14 +6930,14 @@ snapshots: at-least-node@1.0.0: {} - autoprefixer@10.4.19(postcss@8.4.38): + autoprefixer@10.4.20(postcss@8.4.41): dependencies: - browserslist: 4.23.0 - caniuse-lite: 1.0.30001612 + browserslist: 4.23.3 + caniuse-lite: 1.0.30001651 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.38 + picocolors: 1.0.1 + postcss: 8.4.41 postcss-value-parser: 4.2.0 babel-loader@9.1.3(@babel/core@7.24.4)(webpack@5.91.0): @@ -7031,6 +7051,13 @@ snapshots: node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) + browserslist@4.23.3: + dependencies: + caniuse-lite: 1.0.30001651 + electron-to-chromium: 1.5.6 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.23.3) + buffer-from@1.1.2: {} bytes@3.0.0: {} @@ -7079,6 +7106,8 @@ snapshots: caniuse-lite@1.0.30001612: {} + caniuse-lite@1.0.30001651: {} + ccount@2.0.1: {} chalk@2.4.2: @@ -7276,14 +7305,14 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.3.6(typescript@5.5.3): + cosmiconfig@8.3.6(typescript@5.5.4): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 cross-spawn@7.0.3: dependencies: @@ -7295,18 +7324,18 @@ snapshots: dependencies: type-fest: 1.4.0 - css-declaration-sorter@7.2.0(postcss@8.4.38): + css-declaration-sorter@7.2.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 css-loader@6.11.0(webpack@5.91.0): dependencies: - icss-utils: 5.1.0(postcss@8.4.38) - postcss: 8.4.38 - postcss-modules-extract-imports: 3.1.0(postcss@8.4.38) - postcss-modules-local-by-default: 4.0.5(postcss@8.4.38) - postcss-modules-scope: 3.2.0(postcss@8.4.38) - postcss-modules-values: 4.0.0(postcss@8.4.38) + icss-utils: 5.1.0(postcss@8.4.41) + postcss: 8.4.41 + postcss-modules-extract-imports: 3.1.0(postcss@8.4.41) + postcss-modules-local-by-default: 4.0.5(postcss@8.4.41) + postcss-modules-scope: 3.2.0(postcss@8.4.41) + postcss-modules-values: 4.0.0(postcss@8.4.41) postcss-value-parser: 4.2.0 semver: 7.6.0 optionalDependencies: @@ -7315,9 +7344,9 @@ snapshots: css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(webpack@5.91.0): dependencies: '@jridgewell/trace-mapping': 0.3.25 - cssnano: 6.1.2(postcss@8.4.38) + cssnano: 6.1.2(postcss@8.4.41) jest-worker: 29.7.0 - postcss: 8.4.38 + postcss: 8.4.41 schema-utils: 4.2.0 serialize-javascript: 6.0.2 webpack: 5.91.0 @@ -7354,60 +7383,60 @@ snapshots: cssesc@3.0.0: {} - cssnano-preset-advanced@6.1.2(postcss@8.4.38): + cssnano-preset-advanced@6.1.2(postcss@8.4.41): dependencies: - autoprefixer: 10.4.19(postcss@8.4.38) + autoprefixer: 10.4.20(postcss@8.4.41) browserslist: 4.23.0 - cssnano-preset-default: 6.1.2(postcss@8.4.38) - postcss: 8.4.38 - postcss-discard-unused: 6.0.5(postcss@8.4.38) - postcss-merge-idents: 6.0.3(postcss@8.4.38) - postcss-reduce-idents: 6.0.3(postcss@8.4.38) - postcss-zindex: 6.0.2(postcss@8.4.38) + cssnano-preset-default: 6.1.2(postcss@8.4.41) + postcss: 8.4.41 + postcss-discard-unused: 6.0.5(postcss@8.4.41) + postcss-merge-idents: 6.0.3(postcss@8.4.41) + postcss-reduce-idents: 6.0.3(postcss@8.4.41) + postcss-zindex: 6.0.2(postcss@8.4.41) - cssnano-preset-default@6.1.2(postcss@8.4.38): + cssnano-preset-default@6.1.2(postcss@8.4.41): dependencies: browserslist: 4.23.0 - css-declaration-sorter: 7.2.0(postcss@8.4.38) - cssnano-utils: 4.0.2(postcss@8.4.38) - postcss: 8.4.38 - postcss-calc: 9.0.1(postcss@8.4.38) - postcss-colormin: 6.1.0(postcss@8.4.38) - postcss-convert-values: 6.1.0(postcss@8.4.38) - postcss-discard-comments: 6.0.2(postcss@8.4.38) - postcss-discard-duplicates: 6.0.3(postcss@8.4.38) - postcss-discard-empty: 6.0.3(postcss@8.4.38) - postcss-discard-overridden: 6.0.2(postcss@8.4.38) - postcss-merge-longhand: 6.0.5(postcss@8.4.38) - postcss-merge-rules: 6.1.1(postcss@8.4.38) - postcss-minify-font-values: 6.1.0(postcss@8.4.38) - postcss-minify-gradients: 6.0.3(postcss@8.4.38) - postcss-minify-params: 6.1.0(postcss@8.4.38) - postcss-minify-selectors: 6.0.4(postcss@8.4.38) - postcss-normalize-charset: 6.0.2(postcss@8.4.38) - postcss-normalize-display-values: 6.0.2(postcss@8.4.38) - postcss-normalize-positions: 6.0.2(postcss@8.4.38) - postcss-normalize-repeat-style: 6.0.2(postcss@8.4.38) - postcss-normalize-string: 6.0.2(postcss@8.4.38) - postcss-normalize-timing-functions: 6.0.2(postcss@8.4.38) - postcss-normalize-unicode: 6.1.0(postcss@8.4.38) - postcss-normalize-url: 6.0.2(postcss@8.4.38) - postcss-normalize-whitespace: 6.0.2(postcss@8.4.38) - postcss-ordered-values: 6.0.2(postcss@8.4.38) - postcss-reduce-initial: 6.1.0(postcss@8.4.38) - postcss-reduce-transforms: 6.0.2(postcss@8.4.38) - postcss-svgo: 6.0.3(postcss@8.4.38) - postcss-unique-selectors: 6.0.4(postcss@8.4.38) - - cssnano-utils@4.0.2(postcss@8.4.38): - dependencies: - postcss: 8.4.38 - - cssnano@6.1.2(postcss@8.4.38): - dependencies: - cssnano-preset-default: 6.1.2(postcss@8.4.38) + css-declaration-sorter: 7.2.0(postcss@8.4.41) + cssnano-utils: 4.0.2(postcss@8.4.41) + postcss: 8.4.41 + postcss-calc: 9.0.1(postcss@8.4.41) + postcss-colormin: 6.1.0(postcss@8.4.41) + postcss-convert-values: 6.1.0(postcss@8.4.41) + postcss-discard-comments: 6.0.2(postcss@8.4.41) + postcss-discard-duplicates: 6.0.3(postcss@8.4.41) + postcss-discard-empty: 6.0.3(postcss@8.4.41) + postcss-discard-overridden: 6.0.2(postcss@8.4.41) + postcss-merge-longhand: 6.0.5(postcss@8.4.41) + postcss-merge-rules: 6.1.1(postcss@8.4.41) + postcss-minify-font-values: 6.1.0(postcss@8.4.41) + postcss-minify-gradients: 6.0.3(postcss@8.4.41) + postcss-minify-params: 6.1.0(postcss@8.4.41) + postcss-minify-selectors: 6.0.4(postcss@8.4.41) + postcss-normalize-charset: 6.0.2(postcss@8.4.41) + postcss-normalize-display-values: 6.0.2(postcss@8.4.41) + postcss-normalize-positions: 6.0.2(postcss@8.4.41) + postcss-normalize-repeat-style: 6.0.2(postcss@8.4.41) + postcss-normalize-string: 6.0.2(postcss@8.4.41) + postcss-normalize-timing-functions: 6.0.2(postcss@8.4.41) + postcss-normalize-unicode: 6.1.0(postcss@8.4.41) + postcss-normalize-url: 6.0.2(postcss@8.4.41) + postcss-normalize-whitespace: 6.0.2(postcss@8.4.41) + postcss-ordered-values: 6.0.2(postcss@8.4.41) + postcss-reduce-initial: 6.1.0(postcss@8.4.41) + postcss-reduce-transforms: 6.0.2(postcss@8.4.41) + postcss-svgo: 6.0.3(postcss@8.4.41) + postcss-unique-selectors: 6.0.4(postcss@8.4.41) + + cssnano-utils@4.0.2(postcss@8.4.41): + dependencies: + postcss: 8.4.41 + + cssnano@6.1.2(postcss@8.4.41): + dependencies: + cssnano-preset-default: 6.1.2(postcss@8.4.41) lilconfig: 3.1.1 - postcss: 8.4.38 + postcss: 8.4.41 csso@5.0.5: dependencies: @@ -7563,6 +7592,8 @@ snapshots: electron-to-chromium@1.4.747: {} + electron-to-chromium@1.5.6: {} + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} @@ -7809,7 +7840,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@6.5.3(typescript@5.5.3)(webpack@5.91.0): + fork-ts-checker-webpack-plugin@6.5.3(typescript@5.5.4)(webpack@5.91.0): dependencies: '@babel/code-frame': 7.24.2 '@types/json-schema': 7.0.15 @@ -7824,7 +7855,7 @@ snapshots: schema-utils: 2.7.0 semver: 7.6.0 tapable: 1.1.3 - typescript: 5.5.3 + typescript: 5.5.4 webpack: 5.91.0 form-data-encoder@2.1.4: {} @@ -8208,9 +8239,9 @@ snapshots: dependencies: safer-buffer: 2.1.2 - icss-utils@5.1.0(postcss@8.4.38): + icss-utils@5.1.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 ignore@5.3.1: {} @@ -8231,7 +8262,7 @@ snapshots: indent-string@4.0.0: {} - infima@0.2.0-alpha.43: {} + infima@0.2.0-alpha.44: {} inflight@1.0.6: dependencies: @@ -8495,7 +8526,7 @@ snapshots: dependencies: yallist: 4.0.0 - lucide-react@0.383.0(react@18.3.1): + lucide-react@0.427.0(react@18.3.1): dependencies: react: 18.3.1 @@ -8844,8 +8875,8 @@ snapshots: micromark-extension-mdxjs@3.0.0: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) micromark-extension-mdx-expression: 3.0.0 micromark-extension-mdx-jsx: 3.0.0 micromark-extension-mdx-md: 2.0.0 @@ -9089,6 +9120,8 @@ snapshots: node-releases@2.0.14: {} + node-releases@2.0.18: {} + normalize-path@3.0.0: {} normalize-range@0.1.2: {} @@ -9272,6 +9305,8 @@ snapshots: picocolors@1.0.0: {} + picocolors@1.0.1: {} + picomatch@2.3.1: {} pify@2.3.0: {} @@ -9286,211 +9321,211 @@ snapshots: dependencies: find-up: 3.0.0 - postcss-calc@9.0.1(postcss@8.4.38): + postcss-calc@9.0.1(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-selector-parser: 6.0.16 postcss-value-parser: 4.2.0 - postcss-colormin@6.1.0(postcss@8.4.38): + postcss-colormin@6.1.0(postcss@8.4.41): dependencies: browserslist: 4.23.0 caniuse-api: 3.0.0 colord: 2.9.3 - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-convert-values@6.1.0(postcss@8.4.38): + postcss-convert-values@6.1.0(postcss@8.4.41): dependencies: browserslist: 4.23.0 - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-discard-comments@6.0.2(postcss@8.4.38): + postcss-discard-comments@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-discard-duplicates@6.0.3(postcss@8.4.38): + postcss-discard-duplicates@6.0.3(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-discard-empty@6.0.3(postcss@8.4.38): + postcss-discard-empty@6.0.3(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-discard-overridden@6.0.2(postcss@8.4.38): + postcss-discard-overridden@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-discard-unused@6.0.5(postcss@8.4.38): + postcss-discard-unused@6.0.5(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-selector-parser: 6.0.16 - postcss-import@15.1.0(postcss@8.4.38): + postcss-import@15.1.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-js@4.0.1(postcss@8.4.38): + postcss-js@4.0.1(postcss@8.4.41): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.38 + postcss: 8.4.41 - postcss-load-config@4.0.2(postcss@8.4.38): + postcss-load-config@4.0.2(postcss@8.4.41): dependencies: lilconfig: 3.1.1 yaml: 2.4.1 optionalDependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-loader@7.3.4(postcss@8.4.38)(typescript@5.5.3)(webpack@5.91.0): + postcss-loader@7.3.4(postcss@8.4.41)(typescript@5.5.4)(webpack@5.91.0): dependencies: - cosmiconfig: 8.3.6(typescript@5.5.3) + cosmiconfig: 8.3.6(typescript@5.5.4) jiti: 1.21.0 - postcss: 8.4.38 + postcss: 8.4.41 semver: 7.6.0 webpack: 5.91.0 transitivePeerDependencies: - typescript - postcss-merge-idents@6.0.3(postcss@8.4.38): + postcss-merge-idents@6.0.3(postcss@8.4.41): dependencies: - cssnano-utils: 4.0.2(postcss@8.4.38) - postcss: 8.4.38 + cssnano-utils: 4.0.2(postcss@8.4.41) + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-merge-longhand@6.0.5(postcss@8.4.38): + postcss-merge-longhand@6.0.5(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - stylehacks: 6.1.1(postcss@8.4.38) + stylehacks: 6.1.1(postcss@8.4.41) - postcss-merge-rules@6.1.1(postcss@8.4.38): + postcss-merge-rules@6.1.1(postcss@8.4.41): dependencies: browserslist: 4.23.0 caniuse-api: 3.0.0 - cssnano-utils: 4.0.2(postcss@8.4.38) - postcss: 8.4.38 + cssnano-utils: 4.0.2(postcss@8.4.41) + postcss: 8.4.41 postcss-selector-parser: 6.0.16 - postcss-minify-font-values@6.1.0(postcss@8.4.38): + postcss-minify-font-values@6.1.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-minify-gradients@6.0.3(postcss@8.4.38): + postcss-minify-gradients@6.0.3(postcss@8.4.41): dependencies: colord: 2.9.3 - cssnano-utils: 4.0.2(postcss@8.4.38) - postcss: 8.4.38 + cssnano-utils: 4.0.2(postcss@8.4.41) + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-minify-params@6.1.0(postcss@8.4.38): + postcss-minify-params@6.1.0(postcss@8.4.41): dependencies: browserslist: 4.23.0 - cssnano-utils: 4.0.2(postcss@8.4.38) - postcss: 8.4.38 + cssnano-utils: 4.0.2(postcss@8.4.41) + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-minify-selectors@6.0.4(postcss@8.4.38): + postcss-minify-selectors@6.0.4(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-selector-parser: 6.0.16 - postcss-modules-extract-imports@3.1.0(postcss@8.4.38): + postcss-modules-extract-imports@3.1.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-modules-local-by-default@4.0.5(postcss@8.4.38): + postcss-modules-local-by-default@4.0.5(postcss@8.4.41): dependencies: - icss-utils: 5.1.0(postcss@8.4.38) - postcss: 8.4.38 + icss-utils: 5.1.0(postcss@8.4.41) + postcss: 8.4.41 postcss-selector-parser: 6.0.16 postcss-value-parser: 4.2.0 - postcss-modules-scope@3.2.0(postcss@8.4.38): + postcss-modules-scope@3.2.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-selector-parser: 6.0.16 - postcss-modules-values@4.0.0(postcss@8.4.38): + postcss-modules-values@4.0.0(postcss@8.4.41): dependencies: - icss-utils: 5.1.0(postcss@8.4.38) - postcss: 8.4.38 + icss-utils: 5.1.0(postcss@8.4.41) + postcss: 8.4.41 - postcss-nested@6.0.1(postcss@8.4.38): + postcss-nested@6.2.0(postcss@8.4.41): dependencies: - postcss: 8.4.38 - postcss-selector-parser: 6.0.16 + postcss: 8.4.41 + postcss-selector-parser: 6.1.2 - postcss-normalize-charset@6.0.2(postcss@8.4.38): + postcss-normalize-charset@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss-normalize-display-values@6.0.2(postcss@8.4.38): + postcss-normalize-display-values@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-positions@6.0.2(postcss@8.4.38): + postcss-normalize-positions@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-repeat-style@6.0.2(postcss@8.4.38): + postcss-normalize-repeat-style@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-string@6.0.2(postcss@8.4.38): + postcss-normalize-string@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-timing-functions@6.0.2(postcss@8.4.38): + postcss-normalize-timing-functions@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-unicode@6.1.0(postcss@8.4.38): + postcss-normalize-unicode@6.1.0(postcss@8.4.41): dependencies: browserslist: 4.23.0 - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-url@6.0.2(postcss@8.4.38): + postcss-normalize-url@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-normalize-whitespace@6.0.2(postcss@8.4.38): + postcss-normalize-whitespace@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-ordered-values@6.0.2(postcss@8.4.38): + postcss-ordered-values@6.0.2(postcss@8.4.41): dependencies: - cssnano-utils: 4.0.2(postcss@8.4.38) - postcss: 8.4.38 + cssnano-utils: 4.0.2(postcss@8.4.41) + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-reduce-idents@6.0.3(postcss@8.4.38): + postcss-reduce-idents@6.0.3(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-reduce-initial@6.1.0(postcss@8.4.38): + postcss-reduce-initial@6.1.0(postcss@8.4.41): dependencies: browserslist: 4.23.0 caniuse-api: 3.0.0 - postcss: 8.4.38 + postcss: 8.4.41 - postcss-reduce-transforms@6.0.2(postcss@8.4.38): + postcss-reduce-transforms@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 postcss-selector-parser@6.0.16: @@ -9498,32 +9533,37 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-sort-media-queries@5.2.0(postcss@8.4.38): + postcss-selector-parser@6.1.2: dependencies: - postcss: 8.4.38 + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss-sort-media-queries@5.2.0(postcss@8.4.41): + dependencies: + postcss: 8.4.41 sort-css-media-queries: 2.2.0 - postcss-svgo@6.0.3(postcss@8.4.38): + postcss-svgo@6.0.3(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-value-parser: 4.2.0 svgo: 3.2.0 - postcss-unique-selectors@6.0.4(postcss@8.4.38): + postcss-unique-selectors@6.0.4(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 postcss-selector-parser: 6.0.16 postcss-value-parser@4.2.0: {} - postcss-zindex@6.0.2(postcss@8.4.38): + postcss-zindex@6.0.2(postcss@8.4.41): dependencies: - postcss: 8.4.38 + postcss: 8.4.41 - postcss@8.4.38: + postcss@8.4.41: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 + picocolors: 1.0.1 source-map-js: 1.2.0 pretty-error@4.0.0: @@ -9605,7 +9645,7 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dev-utils@12.0.1(typescript@5.5.3)(webpack@5.91.0): + react-dev-utils@12.0.1(typescript@5.5.4)(webpack@5.91.0): dependencies: '@babel/code-frame': 7.24.2 address: 1.2.2 @@ -9616,7 +9656,7 @@ snapshots: escape-string-regexp: 4.0.0 filesize: 8.0.7 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.3(typescript@5.5.3)(webpack@5.91.0) + fork-ts-checker-webpack-plugin: 6.5.3(typescript@5.5.4)(webpack@5.91.0) global-modules: 2.0.0 globby: 11.1.0 gzip-size: 6.0.0 @@ -9633,7 +9673,7 @@ snapshots: text-table: 0.2.0 webpack: 5.91.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - eslint - supports-color @@ -9899,7 +9939,7 @@ snapshots: dependencies: escalade: 3.1.2 picocolors: 1.0.0 - postcss: 8.4.38 + postcss: 8.4.41 strip-json-comments: 3.1.1 run-parallel@1.2.0: @@ -10194,10 +10234,10 @@ snapshots: dependencies: inline-style-parser: 0.2.3 - stylehacks@6.1.1(postcss@8.4.38): + stylehacks@6.1.1(postcss@8.4.41): dependencies: browserslist: 4.23.0 - postcss: 8.4.38 + postcss: 8.4.41 postcss-selector-parser: 6.0.16 sucrase@3.35.0: @@ -10236,11 +10276,11 @@ snapshots: csso: 5.0.5 picocolors: 1.0.0 - tailwindcss-bg-patterns@0.3.0(tailwindcss@3.4.3): + tailwindcss-bg-patterns@0.3.0(tailwindcss@3.4.9): dependencies: - tailwindcss: 3.4.3 + tailwindcss: 3.4.9 - tailwindcss@3.4.3: + tailwindcss@3.4.9: dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -10256,11 +10296,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.38 - postcss-import: 15.1.0(postcss@8.4.38) - postcss-js: 4.0.1(postcss@8.4.38) - postcss-load-config: 4.0.2(postcss@8.4.38) - postcss-nested: 6.0.1(postcss@8.4.38) + postcss: 8.4.41 + postcss-import: 15.1.0(postcss@8.4.41) + postcss-js: 4.0.1(postcss@8.4.41) + postcss-load-config: 4.0.2(postcss@8.4.41) + postcss-nested: 6.2.0(postcss@8.4.41) postcss-selector-parser: 6.0.16 resolve: 1.22.8 sucrase: 3.35.0 @@ -10283,7 +10323,7 @@ snapshots: terser@5.30.4: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.11.3 + acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -10334,7 +10374,7 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typescript@5.5.3: {} + typescript@5.5.4: {} undici-types@5.26.5: {} @@ -10407,6 +10447,12 @@ snapshots: escalade: 3.1.2 picocolors: 1.0.0 + update-browserslist-db@1.1.0(browserslist@4.23.3): + dependencies: + browserslist: 4.23.3 + escalade: 3.1.2 + picocolors: 1.0.1 + update-notifier@6.0.2: dependencies: boxen: 7.1.1 @@ -10481,7 +10527,7 @@ snapshots: webpack-bundle-analyzer@4.10.2: dependencies: '@discoveryjs/json-ext': 0.5.7 - acorn: 8.11.3 + acorn: 8.12.1 acorn-walk: 8.3.2 commander: 7.2.0 debounce: 1.2.1 @@ -10560,8 +10606,8 @@ snapshots: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/wasm-edit': 1.12.1 '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.11.3 - acorn-import-assertions: 1.9.0(acorn@8.11.3) + acorn: 8.12.1 + acorn-import-assertions: 1.9.0(acorn@8.12.1) browserslist: 4.23.0 chrome-trace-event: 1.0.3 enhanced-resolve: 5.16.0 From 0a13fa9c3ee763dba3d35fe68899917b146fa8b4 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Mon, 12 Aug 2024 19:27:27 +0200 Subject: [PATCH 16/18] chore: update TypeScript dependency --- apps/playground/package.json | 2 +- packages/next-safe-action/package.json | 2 +- pnpm-lock.yaml | 172 ++++++++++++------------- 3 files changed, 88 insertions(+), 88 deletions(-) diff --git a/apps/playground/package.json b/apps/playground/package.json index 84236c8b..c890065c 100644 --- a/apps/playground/package.json +++ b/apps/playground/package.json @@ -29,6 +29,6 @@ "eslint-config-next": "15.0.0-canary.75", "postcss": "8.4.38", "tailwindcss": "3.4.3", - "typescript": "^5.5.3" + "typescript": "^5.5.4" } } diff --git a/packages/next-safe-action/package.json b/packages/next-safe-action/package.json index f4a9129c..beaf3ced 100644 --- a/packages/next-safe-action/package.json +++ b/packages/next-safe-action/package.json @@ -82,7 +82,7 @@ "semantic-release": "^23.0.8", "tsup": "^8.0.2", "tsx": "^4.11.2", - "typescript": "^5.5.3", + "typescript": "^5.5.4", "typescript-eslint": "^7.8.0", "valibot": "^0.36.0", "yup": "^1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3785a49..7d9ccb73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@commitlint/cli': specifier: ^19.3.0 - version: 19.3.0(@types/node@20.14.11)(typescript@5.5.3) + version: 19.3.0(@types/node@20.14.11)(typescript@5.5.4) '@commitlint/config-conventional': specifier: ^19.2.2 version: 19.2.2 @@ -19,10 +19,10 @@ importers: version: 0.21.4 commitizen: specifier: ^4.3.0 - version: 4.3.0(@types/node@20.14.11)(typescript@5.5.3) + version: 4.3.0(@types/node@20.14.11)(typescript@5.5.4) cz-conventional-changelog: specifier: ^3.3.0 - version: 3.3.0(@types/node@20.14.11)(typescript@5.5.3) + version: 3.3.0(@types/node@20.14.11)(typescript@5.5.4) husky: specifier: ^9.0.11 version: 9.0.11 @@ -80,7 +80,7 @@ importers: version: 8.57.0 eslint-config-next: specifier: 15.0.0-canary.75 - version: 15.0.0-canary.75(eslint@8.57.0)(typescript@5.5.3) + version: 15.0.0-canary.75(eslint@8.57.0)(typescript@5.5.4) postcss: specifier: 8.4.38 version: 8.4.38 @@ -88,8 +88,8 @@ importers: specifier: 3.4.3 version: 3.4.3 typescript: - specifier: ^5.5.3 - version: 5.5.3 + specifier: ^5.5.4 + version: 5.5.4 packages/next-safe-action: devDependencies: @@ -134,19 +134,19 @@ importers: version: 18.3.1(react@18.3.1) semantic-release: specifier: ^23.0.8 - version: 23.1.1(typescript@5.5.3) + version: 23.1.1(typescript@5.5.4) tsup: specifier: ^8.0.2 - version: 8.0.2(postcss@8.4.38)(typescript@5.5.3) + version: 8.0.2(postcss@8.4.38)(typescript@5.5.4) tsx: specifier: ^4.11.2 version: 4.11.2 typescript: - specifier: ^5.5.3 - version: 5.5.3 + specifier: ^5.5.4 + version: 5.5.4 typescript-eslint: specifier: ^7.8.0 - version: 7.10.0(eslint@8.57.0)(typescript@5.5.3) + version: 7.10.0(eslint@8.57.0)(typescript@5.5.4) valibot: specifier: ^0.36.0 version: 0.36.0 @@ -3799,8 +3799,8 @@ packages: typescript: optional: true - typescript@5.5.3: - resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true @@ -3994,11 +3994,11 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@commitlint/cli@19.3.0(@types/node@20.14.11)(typescript@5.5.3)': + '@commitlint/cli@19.3.0(@types/node@20.14.11)(typescript@5.5.4)': dependencies: '@commitlint/format': 19.3.0 '@commitlint/lint': 19.2.2 - '@commitlint/load': 19.2.0(@types/node@20.14.11)(typescript@5.5.3) + '@commitlint/load': 19.2.0(@types/node@20.14.11)(typescript@5.5.4) '@commitlint/read': 19.2.1 '@commitlint/types': 19.0.3 execa: 8.0.1 @@ -4045,15 +4045,15 @@ snapshots: '@commitlint/rules': 19.0.3 '@commitlint/types': 19.0.3 - '@commitlint/load@19.2.0(@types/node@20.14.11)(typescript@5.5.3)': + '@commitlint/load@19.2.0(@types/node@20.14.11)(typescript@5.5.4)': dependencies: '@commitlint/config-validator': 19.0.3 '@commitlint/execute-rule': 19.0.0 '@commitlint/resolve-extends': 19.1.0 '@commitlint/types': 19.0.3 chalk: 5.3.0 - cosmiconfig: 9.0.0(typescript@5.5.3) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.11)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3) + cosmiconfig: 9.0.0(typescript@5.5.4) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.11)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -4623,7 +4623,7 @@ snapshots: '@sec-ant/readable-stream@0.4.1': {} - '@semantic-release/commit-analyzer@12.0.0(semantic-release@23.1.1(typescript@5.5.3))': + '@semantic-release/commit-analyzer@12.0.0(semantic-release@23.1.1(typescript@5.5.4))': dependencies: conventional-changelog-angular: 7.0.0 conventional-commits-filter: 4.0.0 @@ -4632,13 +4632,13 @@ snapshots: import-from-esm: 1.3.4 lodash-es: 4.17.21 micromatch: 4.0.7 - semantic-release: 23.1.1(typescript@5.5.3) + semantic-release: 23.1.1(typescript@5.5.4) transitivePeerDependencies: - supports-color '@semantic-release/error@4.0.0': {} - '@semantic-release/github@10.0.5(semantic-release@23.1.1(typescript@5.5.3))': + '@semantic-release/github@10.0.5(semantic-release@23.1.1(typescript@5.5.4))': dependencies: '@octokit/core': 6.1.2 '@octokit/plugin-paginate-rest': 11.3.0(@octokit/core@6.1.2) @@ -4655,12 +4655,12 @@ snapshots: lodash-es: 4.17.21 mime: 4.0.3 p-filter: 4.1.0 - semantic-release: 23.1.1(typescript@5.5.3) + semantic-release: 23.1.1(typescript@5.5.4) url-join: 5.0.0 transitivePeerDependencies: - supports-color - '@semantic-release/npm@12.0.1(semantic-release@23.1.1(typescript@5.5.3))': + '@semantic-release/npm@12.0.1(semantic-release@23.1.1(typescript@5.5.4))': dependencies: '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 @@ -4673,11 +4673,11 @@ snapshots: rc: 1.2.8 read-pkg: 9.0.1 registry-auth-token: 5.0.2 - semantic-release: 23.1.1(typescript@5.5.3) + semantic-release: 23.1.1(typescript@5.5.4) semver: 7.6.2 tempy: 3.1.0 - '@semantic-release/release-notes-generator@13.0.0(semantic-release@23.1.1(typescript@5.5.3))': + '@semantic-release/release-notes-generator@13.0.0(semantic-release@23.1.1(typescript@5.5.4))': dependencies: conventional-changelog-angular: 7.0.0 conventional-changelog-writer: 7.0.1 @@ -4689,7 +4689,7 @@ snapshots: into-stream: 7.0.0 lodash-es: 4.17.21 read-pkg-up: 11.0.0 - semantic-release: 23.1.1(typescript@5.5.3) + semantic-release: 23.1.1(typescript@5.5.4) transitivePeerDependencies: - supports-color @@ -4746,34 +4746,34 @@ snapshots: '@types/semver@6.2.7': {} - '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/type-utils': 7.10.0(eslint@8.57.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/type-utils': 7.10.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.10.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.3) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 7.10.0 '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.10.0 debug: 4.3.4 eslint: 8.57.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color @@ -4782,21 +4782,21 @@ snapshots: '@typescript-eslint/types': 7.10.0 '@typescript-eslint/visitor-keys': 7.10.0 - '@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.5.3) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.5.4) + '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.4 eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.5.3) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color '@typescript-eslint/types@7.10.0': {} - '@typescript-eslint/typescript-estree@7.10.0(typescript@5.5.3)': + '@typescript-eslint/typescript-estree@7.10.0(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 7.10.0 '@typescript-eslint/visitor-keys': 7.10.0 @@ -4805,18 +4805,18 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.4 semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.5.3) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.10.0 '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.5.4) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -5188,10 +5188,10 @@ snapshots: commander@4.1.1: {} - commitizen@4.3.0(@types/node@20.14.11)(typescript@5.5.3): + commitizen@4.3.0(@types/node@20.14.11)(typescript@5.5.4): dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@20.14.11)(typescript@5.5.3) + cz-conventional-changelog: 3.3.0(@types/node@20.14.11)(typescript@5.5.4) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -5252,21 +5252,21 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.11)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3): + cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.11)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4): dependencies: '@types/node': 20.14.11 - cosmiconfig: 9.0.0(typescript@5.5.3) + cosmiconfig: 9.0.0(typescript@5.5.4) jiti: 1.21.0 - typescript: 5.5.3 + typescript: 5.5.4 - cosmiconfig@9.0.0(typescript@5.5.3): + cosmiconfig@9.0.0(typescript@5.5.4): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 cross-spawn@5.1.0: dependencies: @@ -5288,16 +5288,16 @@ snapshots: csstype@3.1.3: {} - cz-conventional-changelog@3.3.0(@types/node@20.14.11)(typescript@5.5.3): + cz-conventional-changelog@3.3.0(@types/node@20.14.11)(typescript@5.5.4): dependencies: chalk: 2.4.2 - commitizen: 4.3.0(@types/node@20.14.11)(typescript@5.5.3) + commitizen: 4.3.0(@types/node@20.14.11)(typescript@5.5.4) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.5 optionalDependencies: - '@commitlint/load': 19.2.0(@types/node@20.14.11)(typescript@5.5.3) + '@commitlint/load': 19.2.0(@types/node@20.14.11)(typescript@5.5.4) transitivePeerDependencies: - '@types/node' - typescript @@ -5571,21 +5571,21 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-next@15.0.0-canary.75(eslint@8.57.0)(typescript@5.5.3): + eslint-config-next@15.0.0-canary.75(eslint@8.57.0)(typescript@5.5.4): dependencies: '@next/eslint-plugin-next': 15.0.0-canary.75 '@rushstack/eslint-patch': 1.10.3 - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.34.1(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -5604,13 +5604,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 4.3.4 enhanced-resolve: 5.16.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -5621,18 +5621,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5642,7 +5642,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -5653,7 +5653,7 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -7224,15 +7224,15 @@ snapshots: scheduler@0.25.0-rc-512b09b2-20240718: {} - semantic-release@23.1.1(typescript@5.5.3): + semantic-release@23.1.1(typescript@5.5.4): dependencies: - '@semantic-release/commit-analyzer': 12.0.0(semantic-release@23.1.1(typescript@5.5.3)) + '@semantic-release/commit-analyzer': 12.0.0(semantic-release@23.1.1(typescript@5.5.4)) '@semantic-release/error': 4.0.0 - '@semantic-release/github': 10.0.5(semantic-release@23.1.1(typescript@5.5.3)) - '@semantic-release/npm': 12.0.1(semantic-release@23.1.1(typescript@5.5.3)) - '@semantic-release/release-notes-generator': 13.0.0(semantic-release@23.1.1(typescript@5.5.3)) + '@semantic-release/github': 10.0.5(semantic-release@23.1.1(typescript@5.5.4)) + '@semantic-release/npm': 12.0.1(semantic-release@23.1.1(typescript@5.5.4)) + '@semantic-release/release-notes-generator': 13.0.0(semantic-release@23.1.1(typescript@5.5.4)) aggregate-error: 5.0.0 - cosmiconfig: 9.0.0(typescript@5.5.3) + cosmiconfig: 9.0.0(typescript@5.5.4) debug: 4.3.4 env-ci: 11.0.0 execa: 9.1.0 @@ -7604,9 +7604,9 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.5.3): + ts-api-utils@1.3.0(typescript@5.5.4): dependencies: - typescript: 5.5.3 + typescript: 5.5.4 ts-interface-checker@0.1.13: {} @@ -7619,7 +7619,7 @@ snapshots: tslib@2.6.2: {} - tsup@8.0.2(postcss@8.4.38)(typescript@5.5.3): + tsup@8.0.2(postcss@8.4.38)(typescript@5.5.4): dependencies: bundle-require: 4.1.0(esbuild@0.19.12) cac: 6.7.14 @@ -7637,7 +7637,7 @@ snapshots: tree-kill: 1.2.2 optionalDependencies: postcss: 8.4.38 - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - ts-node @@ -7731,18 +7731,18 @@ snapshots: typed-array-buffer: 1.0.2 typed-array-byte-offset: 1.0.2 - typescript-eslint@7.10.0(eslint@8.57.0)(typescript@5.5.3): + typescript-eslint@7.10.0(eslint@8.57.0)(typescript@5.5.4): dependencies: - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - typescript@5.5.3: {} + typescript@5.5.4: {} uglify-js@3.17.4: optional: true From b18bf3ca4d2cf9b6e03ef7ce319575543c1817c4 Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Tue, 13 Aug 2024 12:00:23 +0200 Subject: [PATCH 17/18] refactor(middleware): use deepmerge-ts to merge context object --- packages/next-safe-action/package.json | 1 + .../next-safe-action/src/action-builder.ts | 5 ++-- packages/next-safe-action/src/utils.ts | 16 ----------- pnpm-lock.yaml | 27 ++++++++++++------- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/packages/next-safe-action/package.json b/packages/next-safe-action/package.json index beaf3ced..ee97c2dd 100644 --- a/packages/next-safe-action/package.json +++ b/packages/next-safe-action/package.json @@ -71,6 +71,7 @@ "@types/node": "^20.14.11", "@types/react": "^18.3.1", "@types/react-dom": "18.3.0", + "deepmerge-ts": "^7.1.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-define-config": "^2.1.0", diff --git a/packages/next-safe-action/src/action-builder.ts b/packages/next-safe-action/src/action-builder.ts index a194c771..6bdb9bac 100644 --- a/packages/next-safe-action/src/action-builder.ts +++ b/packages/next-safe-action/src/action-builder.ts @@ -1,3 +1,4 @@ +import { deepmerge } from "deepmerge-ts"; import { isNotFoundError } from "next/dist/client/components/not-found.js"; import { isRedirectError } from "next/dist/client/components/redirect.js"; import type {} from "zod"; @@ -13,7 +14,7 @@ import type { ServerCodeFn, StateServerCodeFn, } from "./index.types"; -import { ActionMetadataError, deepMerge, DEFAULT_SERVER_ERROR_MESSAGE, isError } from "./utils"; +import { ActionMetadataError, DEFAULT_SERVER_ERROR_MESSAGE, isError } from "./utils"; import { ActionServerValidationError, ActionValidationError, buildValidationErrors } from "./validation-errors"; import type { BindArgsValidationErrors, @@ -121,7 +122,7 @@ export function actionBuilder< ctx: currentCtx, metadata: args.metadata, next: async (nextOpts) => { - currentCtx = deepMerge(currentCtx, nextOpts?.ctx ?? {}); + currentCtx = deepmerge(currentCtx, nextOpts?.ctx ?? {}); // currentCtx = { ...cloneDeep(currentCtx), ...(nextOpts?.ctx ?? {}) }; await executeMiddlewareStack(idx + 1); return middlewareResult; diff --git a/packages/next-safe-action/src/utils.ts b/packages/next-safe-action/src/utils.ts index c923c9ec..78def49c 100644 --- a/packages/next-safe-action/src/utils.ts +++ b/packages/next-safe-action/src/utils.ts @@ -2,22 +2,6 @@ export const DEFAULT_SERVER_ERROR_MESSAGE = "Something went wrong while executin export const isError = (error: unknown): error is Error => error instanceof Error; -export const deepMerge = (obj1: object, obj2: object) => { - for (const key of Object.keys(obj2)) { - const k = key as keyof typeof obj2; - // eslint-disable-next-line - if (typeof obj2[k] === "object" && Object.hasOwn(obj1, k)) { - // @ts-expect-error - if (!obj1[k]) obj1[k] = {}; - deepMerge(obj1[k], obj2[k]); - } else { - obj1[k] = obj2[k]; - } - } - - return obj1; -}; - /** * This error is thrown when an action's metadata input is invalid, i.e. when there's a mismatch between the * type of the metadata schema returned from `defineMetadataSchema` and the actual input. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7d9ccb73..1a11dc9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,6 +108,9 @@ importers: '@types/react-dom': specifier: 18.3.0 version: 18.3.0 + deepmerge-ts: + specifier: ^7.1.0 + version: 7.1.0 eslint: specifier: ^8.57.0 version: 8.57.0 @@ -1604,6 +1607,10 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge-ts@7.1.0: + resolution: {integrity: sha512-q6bNsfNBtgr8ZOQqmZbl94MmYWm+QcDNIkqCxVWiw1vKvf+y/N2dZQKdnDXn4c5Ygt/y63tDof6OCN+2YwWVEg==} + engines: {node: '>=16.0.0'} + defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -5342,6 +5349,8 @@ snapshots: deep-is@0.1.4: {} + deepmerge-ts@7.1.0: {} + defaults@1.0.4: dependencies: clone: 1.0.4 @@ -5579,8 +5588,8 @@ snapshots: '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.34.1(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -5604,13 +5613,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.4 enhanced-resolve: 5.16.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -5621,18 +5630,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5642,7 +5651,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 From d81840592a621b18af42ffebefc815e7d577ab8d Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Tue, 13 Aug 2024 12:49:53 +0200 Subject: [PATCH 18/18] chore(website): update middleware context extension section --- website/docs/safe-action-client/middleware.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/website/docs/safe-action-client/middleware.md b/website/docs/safe-action-client/middleware.md index 788582f4..a322bf1e 100644 --- a/website/docs/safe-action-client/middleware.md +++ b/website/docs/safe-action-client/middleware.md @@ -207,10 +207,10 @@ Context is a special object that holds information about the current execution s Starting from version 7.6.0, context is extended by default when defining middleware functions. For instance, if you want both the `sessionId` and `userId` in the context, by using two different middleware functions (trivial example), you can do it like this: -```typescript +```typescript title="src/lib/safe-action.ts" import { createSafeActionClient } from "next-safe-action"; -const actionClient = createSafeActionClient() +export const actionClient = createSafeActionClient() .use(async ({ next }) => { const sessionId = await getSessionId(); return next({ ctx: { sessionId } }) @@ -226,7 +226,17 @@ const actionClient = createSafeActionClient() }) ``` -All actions defined using this client will contain both `sessionId` and `userId` in their context. +```typescript title="src/app/test-action.ts" +"use server"; + +import { actionClient } from "@/lib/safe-action"; + +export const testAction = actionClient + .action(async ({ ctx }) => { + // Context contains `sessionId` and `userId` thanks to the middleware. + const { sessionId, userId } = ctx; + }); +``` ## Create standalone middleware