diff --git a/packages/client/.parcelrc b/packages/client/.parcelrc deleted file mode 100644 index db2d15099d..0000000000 --- a/packages/client/.parcelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@parcel/config-default", - "transformers": { - "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ - "@parcel/transformer-js", - "@parcel/transformer-react-refresh-wrap" - ] - } -} diff --git a/packages/client/news/6461.internal b/packages/client/news/6461.internal new file mode 100644 index 0000000000..96267e48f2 --- /dev/null +++ b/packages/client/news/6461.internal @@ -0,0 +1 @@ +Bump local `typescript` version. @sneridagh diff --git a/packages/client/package.json b/packages/client/package.json index d33b80c4f4..f1a310635e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -19,20 +19,15 @@ "type": "module", "files": [ "dist", - "src", "README.md" ], - "source": "./src/index.ts", - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./dist/index.js", "exports": { + "./package.json": "./package.json", ".": { - "types": "./dist/index.d.ts", "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./src/*": "./src/*" + "default": "./dist/index.cjs" + } }, "homepage": "https://plone.org", "keywords": [ @@ -46,11 +41,11 @@ "react-query" ], "scripts": { - "watch": "parcel watch", - "build": "parcel build", - "build:force": "parcel build --no-cache", + "build": "tsup", + "build:force": "tsup", "test": "vitest", - "check-ts": "tsc --project tsconfig.json", + "check:exports": "attw --pack .", + "check:ts": "tsc --project tsconfig.json", "coverage": "vitest run --coverage --no-threads", "dry-release": "release-it --dry-run", "release": "release-it", @@ -61,13 +56,7 @@ "access": "public" }, "devDependencies": { - "@parcel/config-default": "^2.12.0", - "@parcel/core": "^2.12.0", - "@parcel/packager-ts": "^2.12.0", - "@parcel/transformer-js": "^2.12.0", - "@parcel/transformer-react-refresh-wrap": "^2.12.0", - "@parcel/transformer-typescript-types": "^2.12.0", - "@parcel/optimizer-terser": "2.12.0", + "@arethetypeswrong/cli": "^0.16.4", "@plone/types": "workspace: *", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "13.4.0", @@ -79,12 +68,11 @@ "@vitest/coverage-v8": "^1.3.1", "glob": "7.1.6", "jsdom": "^21.1.1", - "parcel": "^2.12.0", "react": "^18.2.0", "react-dom": "^18.2.0", "release-it": "17.1.1", - "tsup": "^8.0.2", - "typescript": "^5.4.5", + "tsup": "^8.3.5", + "typescript": "^5.6.3", "uuid": "^9.0.1", "vite": "^5.4.8", "vite-plugin-dts": "^3.7.3", diff --git a/packages/client/src/API.ts b/packages/client/src/API.ts index 5862f3084d..12e53ff42e 100644 --- a/packages/client/src/API.ts +++ b/packages/client/src/API.ts @@ -1,5 +1,5 @@ import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; -import { PloneClientConfig } from './validation/config'; +import type { PloneClientConfig } from './validation/config'; import qs from 'query-string'; import debugFactory from 'debug'; diff --git a/packages/client/src/client.ts b/packages/client/src/client.ts index 93fdb7e4b6..b0d5e5289a 100644 --- a/packages/client/src/client.ts +++ b/packages/client/src/client.ts @@ -109,7 +109,7 @@ import { queryWithConfig, mutationHookFromMutation, } from './utils/misc'; -import { PloneClientConfig } from './validation/config'; +import type { PloneClientConfig } from './validation/config'; const PLONECLIENT_DEFAULT_CONFIG = { apiPath: 'http://localhost:8080/Plone' }; diff --git a/packages/client/src/restapi/actions/get.ts b/packages/client/src/restapi/actions/get.ts index 5ad55b06b3..7d9ffd3c8b 100644 --- a/packages/client/src/restapi/actions/get.ts +++ b/packages/client/src/restapi/actions/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { ActionsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { ActionsResponse } from '@plone/types'; import { z } from 'zod'; const getActionsSchema = z.object({ diff --git a/packages/client/src/restapi/addons/get.ts b/packages/client/src/restapi/addons/get.ts index f4ce7c67cb..2fdf5669d3 100644 --- a/packages/client/src/restapi/addons/get.ts +++ b/packages/client/src/restapi/addons/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetAddonResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetAddonResponse } from '@plone/types'; import { z } from 'zod'; const getAddonSchema = z.object({ diff --git a/packages/client/src/restapi/addons/get_list.ts b/packages/client/src/restapi/addons/get_list.ts index 16a9b54f59..f283e21c38 100644 --- a/packages/client/src/restapi/addons/get_list.ts +++ b/packages/client/src/restapi/addons/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { Addons } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { Addons } from '@plone/types'; export type AddonsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/addons/install.ts b/packages/client/src/restapi/addons/install.ts index 39d1cd516a..1e0812fe00 100644 --- a/packages/client/src/restapi/addons/install.ts +++ b/packages/client/src/restapi/addons/install.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const installAddonSchema = z.object({ diff --git a/packages/client/src/restapi/addons/install_profile.ts b/packages/client/src/restapi/addons/install_profile.ts index eff76e0bb8..3be0e2a5bd 100644 --- a/packages/client/src/restapi/addons/install_profile.ts +++ b/packages/client/src/restapi/addons/install_profile.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const installAddonProfileSchema = z.object({ diff --git a/packages/client/src/restapi/addons/unistall.ts b/packages/client/src/restapi/addons/unistall.ts index ca4033a1a4..e0b480a4a5 100644 --- a/packages/client/src/restapi/addons/unistall.ts +++ b/packages/client/src/restapi/addons/unistall.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const uninstallAddonSchema = z.object({ diff --git a/packages/client/src/restapi/addons/upgrade.ts b/packages/client/src/restapi/addons/upgrade.ts index f1275b53cb..b75f0400d6 100644 --- a/packages/client/src/restapi/addons/upgrade.ts +++ b/packages/client/src/restapi/addons/upgrade.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const upgradeAddonSchema = z.object({ diff --git a/packages/client/src/restapi/aliases/add.ts b/packages/client/src/restapi/aliases/add.ts index 07e9eee3ff..2d9bfd80ca 100644 --- a/packages/client/src/restapi/aliases/add.ts +++ b/packages/client/src/restapi/aliases/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createAliasesDataSchema } from '../../validation/aliases'; diff --git a/packages/client/src/restapi/aliases/add_multiple.ts b/packages/client/src/restapi/aliases/add_multiple.ts index 2cd990bc41..77c1c6a518 100644 --- a/packages/client/src/restapi/aliases/add_multiple.ts +++ b/packages/client/src/restapi/aliases/add_multiple.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createAliasesMultipleDataSchema } from '../../validation/aliases'; diff --git a/packages/client/src/restapi/aliases/delete.ts b/packages/client/src/restapi/aliases/delete.ts index af2401daf8..73d408cc7b 100644 --- a/packages/client/src/restapi/aliases/delete.ts +++ b/packages/client/src/restapi/aliases/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteAliasesDataSchema } from '../../validation/aliases'; diff --git a/packages/client/src/restapi/aliases/get.ts b/packages/client/src/restapi/aliases/get.ts index 7919d859a4..e535175537 100644 --- a/packages/client/src/restapi/aliases/get.ts +++ b/packages/client/src/restapi/aliases/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetAliasesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetAliasesResponse } from '@plone/types'; import { z } from 'zod'; const getAliasesSchema = z.object({ diff --git a/packages/client/src/restapi/aliases/get_list.ts b/packages/client/src/restapi/aliases/get_list.ts index a19d8e193f..767325feb1 100644 --- a/packages/client/src/restapi/aliases/get_list.ts +++ b/packages/client/src/restapi/aliases/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetAliasesListResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetAliasesListResponse } from '@plone/types'; export type AliasesListArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/breadcrumbs/get.ts b/packages/client/src/restapi/breadcrumbs/get.ts index b882abdc7a..65a8e1095a 100644 --- a/packages/client/src/restapi/breadcrumbs/get.ts +++ b/packages/client/src/restapi/breadcrumbs/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { BreadcrumbsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { BreadcrumbsResponse } from '@plone/types'; import { z } from 'zod'; const getBreadcrumbsSchema = z.object({ diff --git a/packages/client/src/restapi/comments/add.ts b/packages/client/src/restapi/comments/add.ts index 601ec9f2a8..961c7c092c 100644 --- a/packages/client/src/restapi/comments/add.ts +++ b/packages/client/src/restapi/comments/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { newCommentDataSchema as createCommentDataSchema } from '../../validation/comments'; diff --git a/packages/client/src/restapi/comments/delete.ts b/packages/client/src/restapi/comments/delete.ts index 70c0353960..403999308c 100644 --- a/packages/client/src/restapi/comments/delete.ts +++ b/packages/client/src/restapi/comments/delete.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/comments/get.ts b/packages/client/src/restapi/comments/get.ts index 3d225e39e8..9495f96354 100644 --- a/packages/client/src/restapi/comments/get.ts +++ b/packages/client/src/restapi/comments/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetCommentsResponse } from '@plone/types'; +import type { GetCommentsResponse } from '@plone/types'; const getCommentsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/comments/update.ts b/packages/client/src/restapi/comments/update.ts index a0cde49faa..32a3efd4b5 100644 --- a/packages/client/src/restapi/comments/update.ts +++ b/packages/client/src/restapi/comments/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { newCommentDataSchema as updateCommentDataSchema } from '../../validation/comments'; diff --git a/packages/client/src/restapi/content/add.ts b/packages/client/src/restapi/content/add.ts index 1cff2e06b3..671b1b1406 100644 --- a/packages/client/src/restapi/content/add.ts +++ b/packages/client/src/restapi/content/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createContentDataSchema } from '../../validation/content'; -import { CreateContentResponse } from '@plone/types'; +import type { CreateContentResponse } from '@plone/types'; export const createContentArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/content/delete.ts b/packages/client/src/restapi/content/delete.ts index fbf8ec0230..95ce268eeb 100644 --- a/packages/client/src/restapi/content/delete.ts +++ b/packages/client/src/restapi/content/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/content/get.ts b/packages/client/src/restapi/content/get.ts index 18103e1427..5d5cf8fa96 100644 --- a/packages/client/src/restapi/content/get.ts +++ b/packages/client/src/restapi/content/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { Content } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { Content } from '@plone/types'; import { z } from 'zod'; const getContentArgsSchema = z.object({ diff --git a/packages/client/src/restapi/content/update.ts b/packages/client/src/restapi/content/update.ts index fe751e7a68..83ee95571b 100644 --- a/packages/client/src/restapi/content/update.ts +++ b/packages/client/src/restapi/content/update.ts @@ -1,11 +1,11 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { z } from 'zod'; import { updateContentDataSchema } from '../../validation/content'; -import { UpdateContentResponse } from '@plone/types'; +import type { UpdateContentResponse } from '@plone/types'; export const updateContentArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/contextnavigation/get.ts b/packages/client/src/restapi/contextnavigation/get.ts index af0c1b7398..ca586a2e8a 100644 --- a/packages/client/src/restapi/contextnavigation/get.ts +++ b/packages/client/src/restapi/contextnavigation/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { ContextNavigationResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { ContextNavigationResponse } from '@plone/types'; import { z } from 'zod'; const getContextNavigationSchema = z.object({ diff --git a/packages/client/src/restapi/controlpanels/add.ts b/packages/client/src/restapi/controlpanels/add.ts index 9b25859833..a48fefda63 100644 --- a/packages/client/src/restapi/controlpanels/add.ts +++ b/packages/client/src/restapi/controlpanels/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/controlpanels/delete.ts b/packages/client/src/restapi/controlpanels/delete.ts index 5abff355f8..34cdfe983b 100644 --- a/packages/client/src/restapi/controlpanels/delete.ts +++ b/packages/client/src/restapi/controlpanels/delete.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/controlpanels/get.ts b/packages/client/src/restapi/controlpanels/get.ts index 3cb54124dc..2c18b4a25a 100644 --- a/packages/client/src/restapi/controlpanels/get.ts +++ b/packages/client/src/restapi/controlpanels/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetControlpanelResponse } from '@plone/types'; +import type { GetControlpanelResponse } from '@plone/types'; const getControlpanelSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/controlpanels/get_list.ts b/packages/client/src/restapi/controlpanels/get_list.ts index e5c171c8e5..24f9b54cc6 100644 --- a/packages/client/src/restapi/controlpanels/get_list.ts +++ b/packages/client/src/restapi/controlpanels/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetControlpanelsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetControlpanelsResponse } from '@plone/types'; export type ControlpanelsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/controlpanels/update.ts b/packages/client/src/restapi/controlpanels/update.ts index cdd7815db3..1eb8ff8482 100644 --- a/packages/client/src/restapi/controlpanels/update.ts +++ b/packages/client/src/restapi/controlpanels/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/copymove/copy.ts b/packages/client/src/restapi/copymove/copy.ts index bf300f958f..e62302a1a7 100644 --- a/packages/client/src/restapi/copymove/copy.ts +++ b/packages/client/src/restapi/copymove/copy.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { type ApiRequestParams, apiRequest } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { copyMoveDataSchema as copyDataSchema } from '../../validation/copymove'; -import { CopyMoveResponse as CopyResponse } from '@plone/types'; +import type { CopyMoveResponse as CopyResponse } from '@plone/types'; export type CopyArgs = z.infer & { config: PloneClientConfig; diff --git a/packages/client/src/restapi/copymove/move.ts b/packages/client/src/restapi/copymove/move.ts index 6f1015caad..ebd11e193e 100644 --- a/packages/client/src/restapi/copymove/move.ts +++ b/packages/client/src/restapi/copymove/move.ts @@ -1,8 +1,8 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { type ApiRequestParams, apiRequest } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { copyMoveDataSchema as moveDataSchema } from '../../validation/copymove'; -import { CopyMoveResponse as MoveResponse } from '@plone/types'; +import type { CopyMoveResponse as MoveResponse } from '@plone/types'; export type MoveArgs = z.infer & { config: PloneClientConfig; diff --git a/packages/client/src/restapi/database/get.ts b/packages/client/src/restapi/database/get.ts index 53769b3c41..5a10438edd 100644 --- a/packages/client/src/restapi/database/get.ts +++ b/packages/client/src/restapi/database/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { DatabaseResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { DatabaseResponse } from '@plone/types'; export type DatabaseArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/email-notification/post.ts b/packages/client/src/restapi/email-notification/post.ts index 54a81b340b..718ab59f7b 100644 --- a/packages/client/src/restapi/email-notification/post.ts +++ b/packages/client/src/restapi/email-notification/post.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/email-send/post.ts b/packages/client/src/restapi/email-send/post.ts index f1d5863ed0..23cc727f2e 100644 --- a/packages/client/src/restapi/email-send/post.ts +++ b/packages/client/src/restapi/email-send/post.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/groups/add.ts b/packages/client/src/restapi/groups/add.ts index b9dd8fa2cc..27f0fc8d17 100644 --- a/packages/client/src/restapi/groups/add.ts +++ b/packages/client/src/restapi/groups/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createGroupDataSchema } from '../../validation/groups'; -import { CreateGroupResponse } from '@plone/types'; +import type { CreateGroupResponse } from '@plone/types'; export const createGroupArgsSchema = z.object({ data: createGroupDataSchema, diff --git a/packages/client/src/restapi/groups/delete.ts b/packages/client/src/restapi/groups/delete.ts index 4d2565ae3d..e135f1b691 100644 --- a/packages/client/src/restapi/groups/delete.ts +++ b/packages/client/src/restapi/groups/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/groups/get.ts b/packages/client/src/restapi/groups/get.ts index 7048b40fb9..3d23c1690e 100644 --- a/packages/client/src/restapi/groups/get.ts +++ b/packages/client/src/restapi/groups/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetGroupResponse } from '@plone/types'; +import type { GetGroupResponse } from '@plone/types'; const getGroupSchema = z.object({ groupId: z.string(), diff --git a/packages/client/src/restapi/groups/get_list.ts b/packages/client/src/restapi/groups/get_list.ts index 7c7928bbec..e3b1724492 100644 --- a/packages/client/src/restapi/groups/get_list.ts +++ b/packages/client/src/restapi/groups/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetGroupsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetGroupsResponse } from '@plone/types'; export type GroupsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/groups/update.ts b/packages/client/src/restapi/groups/update.ts index c189643e2a..d31ca1a680 100644 --- a/packages/client/src/restapi/groups/update.ts +++ b/packages/client/src/restapi/groups/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateGroupDataSchema } from '../../validation/groups'; diff --git a/packages/client/src/restapi/history/get.ts b/packages/client/src/restapi/history/get.ts index 15e2ca1169..70f2d2bfbf 100644 --- a/packages/client/src/restapi/history/get.ts +++ b/packages/client/src/restapi/history/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetHistoryResponse } from '@plone/types'; +import type { GetHistoryResponse } from '@plone/types'; const getHistorySchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/history/get_versioned.ts b/packages/client/src/restapi/history/get_versioned.ts index de016b50fd..b6e33c86f9 100644 --- a/packages/client/src/restapi/history/get_versioned.ts +++ b/packages/client/src/restapi/history/get_versioned.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const getHistoryVersionedSchema = z.object({ diff --git a/packages/client/src/restapi/history/revert.ts b/packages/client/src/restapi/history/revert.ts index 3e0ad44580..616e4053f4 100644 --- a/packages/client/src/restapi/history/revert.ts +++ b/packages/client/src/restapi/history/revert.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { revertHistoryDataSchema } from '../../validation/history'; diff --git a/packages/client/src/restapi/linkintegrity/get.ts b/packages/client/src/restapi/linkintegrity/get.ts index 9af2dd5551..8cf9f359eb 100644 --- a/packages/client/src/restapi/linkintegrity/get.ts +++ b/packages/client/src/restapi/linkintegrity/get.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { PloneClientConfigSchema } from '../../validation/config'; const getLinkintegriyArgsSchema = z.object({ diff --git a/packages/client/src/restapi/lock/add.ts b/packages/client/src/restapi/lock/add.ts index 2ba71b85c3..608b3e38a6 100644 --- a/packages/client/src/restapi/lock/add.ts +++ b/packages/client/src/restapi/lock/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createLockDataSchema } from '../../validation/lock'; -import { CreateLockResponse } from '@plone/types'; +import type { CreateLockResponse } from '@plone/types'; export const createLockArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/lock/delete.ts b/packages/client/src/restapi/lock/delete.ts index c18cd46d17..ee06ad8d62 100644 --- a/packages/client/src/restapi/lock/delete.ts +++ b/packages/client/src/restapi/lock/delete.ts @@ -1,11 +1,11 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteLockDataSchema } from '../../validation/lock'; -import { LockInfo as DeleteLockResponse } from '@plone/types'; +import type { LockInfo as DeleteLockResponse } from '@plone/types'; export const deleteLockArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/lock/get.ts b/packages/client/src/restapi/lock/get.ts index 9c1962e16a..9c09841968 100644 --- a/packages/client/src/restapi/lock/get.ts +++ b/packages/client/src/restapi/lock/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { LockInfo as GetLockResponse } from '@plone/types'; +import type { LockInfo as GetLockResponse } from '@plone/types'; const getLockSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/lock/update.ts b/packages/client/src/restapi/lock/update.ts index d9c0a3553a..42fc26866c 100644 --- a/packages/client/src/restapi/lock/update.ts +++ b/packages/client/src/restapi/lock/update.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { z } from 'zod'; diff --git a/packages/client/src/restapi/login/post.ts b/packages/client/src/restapi/login/post.ts index 5d893fef9f..e35f1d87f6 100644 --- a/packages/client/src/restapi/login/post.ts +++ b/packages/client/src/restapi/login/post.ts @@ -1,10 +1,10 @@ -import { Login } from '@plone/types'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; +import type { Login } from '@plone/types'; export const loginArgsSchema = z.object({ username: z.string(), diff --git a/packages/client/src/restapi/navigation/get.ts b/packages/client/src/restapi/navigation/get.ts index d5b6577a17..71e64fb94f 100644 --- a/packages/client/src/restapi/navigation/get.ts +++ b/packages/client/src/restapi/navigation/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { NavigationResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { NavigationResponse } from '@plone/types'; import { z } from 'zod'; const getNavigationSchema = z.object({ diff --git a/packages/client/src/restapi/navroot/get.ts b/packages/client/src/restapi/navroot/get.ts index a43d9d1d51..d5dea3d4f2 100644 --- a/packages/client/src/restapi/navroot/get.ts +++ b/packages/client/src/restapi/navroot/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetNavrootResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetNavrootResponse } from '@plone/types'; import { z } from 'zod'; const getNavrootSchema = z.object({ diff --git a/packages/client/src/restapi/principals/get.ts b/packages/client/src/restapi/principals/get.ts index d42abc930c..4ae976781e 100644 --- a/packages/client/src/restapi/principals/get.ts +++ b/packages/client/src/restapi/principals/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetPrincipalsResponse } from '@plone/types'; +import type { GetPrincipalsResponse } from '@plone/types'; const getPrincipalsSchema = z.object({ search: z.string(), diff --git a/packages/client/src/restapi/querysources/get.ts b/packages/client/src/restapi/querysources/get.ts index 46949b2d5c..47207b9507 100644 --- a/packages/client/src/restapi/querysources/get.ts +++ b/packages/client/src/restapi/querysources/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetQuerysourceResponse } from '@plone/types'; +import type { GetQuerysourceResponse } from '@plone/types'; const getQuerysourceSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/querystring-search/get.ts b/packages/client/src/restapi/querystring-search/get.ts index 926453dfbd..588b50eddc 100644 --- a/packages/client/src/restapi/querystring-search/get.ts +++ b/packages/client/src/restapi/querystring-search/get.ts @@ -1,8 +1,8 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; import { querystringSearchDataSchema as getQuerystringSearchSchema } from '../../validation/querystring-search'; -import { QuerystringSearchResponse as GetQuerystringSearchResponse } from '@plone/types'; +import type { QuerystringSearchResponse as GetQuerystringSearchResponse } from '@plone/types'; export type QuerystringSearchArgs = z.infer< typeof getQuerystringSearchSchema diff --git a/packages/client/src/restapi/querystring-search/post.ts b/packages/client/src/restapi/querystring-search/post.ts index 95c07e6be5..decf6dad71 100644 --- a/packages/client/src/restapi/querystring-search/post.ts +++ b/packages/client/src/restapi/querystring-search/post.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { querystringSearchDataSchema as postQuerystringSearchDataSchema } from '../../validation/querystring-search'; -import { QuerystringSearchResponse as PostQuerystringSearchResponse } from '@plone/types'; +import type { QuerystringSearchResponse as PostQuerystringSearchResponse } from '@plone/types'; export const postQuerystringSearchArgsSchema = z.object({ data: postQuerystringSearchDataSchema, diff --git a/packages/client/src/restapi/querystring/get.ts b/packages/client/src/restapi/querystring/get.ts index 008f1747ea..acea020e41 100644 --- a/packages/client/src/restapi/querystring/get.ts +++ b/packages/client/src/restapi/querystring/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetQueryStringResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetQueryStringResponse } from '@plone/types'; export type QueryStringArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/registry/get.ts b/packages/client/src/restapi/registry/get.ts index d4642ee39a..90784f77fe 100644 --- a/packages/client/src/restapi/registry/get.ts +++ b/packages/client/src/restapi/registry/get.ts @@ -1,5 +1,5 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; const getRegistrySchema = z.object({ diff --git a/packages/client/src/restapi/registry/get_list.ts b/packages/client/src/restapi/registry/get_list.ts index c3c43faaa9..438a12a771 100644 --- a/packages/client/src/restapi/registry/get_list.ts +++ b/packages/client/src/restapi/registry/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRegistriesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRegistriesResponse } from '@plone/types'; export type GetRegistriesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/registry/update.ts b/packages/client/src/restapi/registry/update.ts index ee24c141e6..0bd30eeff9 100644 --- a/packages/client/src/restapi/registry/update.ts +++ b/packages/client/src/restapi/registry/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateRegistryDataSchema } from '../../validation/registry'; diff --git a/packages/client/src/restapi/relations/add.ts b/packages/client/src/restapi/relations/add.ts index c979571172..70a90b1673 100644 --- a/packages/client/src/restapi/relations/add.ts +++ b/packages/client/src/restapi/relations/add.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createRelationsDataSchema } from '../../validation/relations'; diff --git a/packages/client/src/restapi/relations/delete.ts b/packages/client/src/restapi/relations/delete.ts index 6276712db2..97eef66aab 100644 --- a/packages/client/src/restapi/relations/delete.ts +++ b/packages/client/src/restapi/relations/delete.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteRelationsDataSchema } from '../../validation/relations'; diff --git a/packages/client/src/restapi/relations/fix.ts b/packages/client/src/restapi/relations/fix.ts index 53daba35be..e52b0306fd 100644 --- a/packages/client/src/restapi/relations/fix.ts +++ b/packages/client/src/restapi/relations/fix.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { fixRelationsDataSchema } from '../../validation/relations'; diff --git a/packages/client/src/restapi/relations/get.ts b/packages/client/src/restapi/relations/get.ts index 6ac85f6a14..44e608a276 100644 --- a/packages/client/src/restapi/relations/get.ts +++ b/packages/client/src/restapi/relations/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetRelationsResponse } from '@plone/types'; +import type { GetRelationsResponse } from '@plone/types'; export const getRelationsSchema = z .object({ diff --git a/packages/client/src/restapi/relations/get_list.ts b/packages/client/src/restapi/relations/get_list.ts index e37cdc2381..07490cf19f 100644 --- a/packages/client/src/restapi/relations/get_list.ts +++ b/packages/client/src/restapi/relations/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRelationsListResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRelationsListResponse } from '@plone/types'; export type GetRelationsListArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/roles/get.ts b/packages/client/src/restapi/roles/get.ts index 96dfd7e18a..6fb5d23504 100644 --- a/packages/client/src/restapi/roles/get.ts +++ b/packages/client/src/restapi/roles/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRolesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRolesResponse } from '@plone/types'; export type GetRolesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/rules/add.ts b/packages/client/src/restapi/rules/add.ts index b187c64b4d..10009142c0 100644 --- a/packages/client/src/restapi/rules/add.ts +++ b/packages/client/src/restapi/rules/add.ts @@ -1,10 +1,10 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; -import { RuleRespose as CreateRuleResponse } from '@plone/types'; +import type { RuleRespose as CreateRuleResponse } from '@plone/types'; export const createRuleArgsSchema = z.object({ ruleId: z.string(), diff --git a/packages/client/src/restapi/rules/delete.ts b/packages/client/src/restapi/rules/delete.ts index 343e71cd65..9f53b63508 100644 --- a/packages/client/src/restapi/rules/delete.ts +++ b/packages/client/src/restapi/rules/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { deleteRulesDataSchema } from '../../validation/rules'; diff --git a/packages/client/src/restapi/rules/get.ts b/packages/client/src/restapi/rules/get.ts index a5b9f930f1..141204c5f8 100644 --- a/packages/client/src/restapi/rules/get.ts +++ b/packages/client/src/restapi/rules/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetRulesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetRulesResponse } from '@plone/types'; export type GetRulesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/rules/update.ts b/packages/client/src/restapi/rules/update.ts index 302a0d0592..73260fb05c 100644 --- a/packages/client/src/restapi/rules/update.ts +++ b/packages/client/src/restapi/rules/update.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateRulesDataSchema } from '../../validation/rules'; -import { RuleRespose as UpdateRuleRespose } from '@plone/types'; +import type { RuleRespose as UpdateRuleRespose } from '@plone/types'; export const updateRulesArgsSchema = z.object({ data: updateRulesDataSchema, diff --git a/packages/client/src/restapi/search/get.ts b/packages/client/src/restapi/search/get.ts index 53e44aadd0..ab75b82fd9 100644 --- a/packages/client/src/restapi/search/get.ts +++ b/packages/client/src/restapi/search/get.ts @@ -1,8 +1,8 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; import { getSearchSchema } from '../../validation/search'; -import { GetSearchResponse } from '@plone/types'; +import type { GetSearchResponse } from '@plone/types'; import { flattenToDottedNotation } from '../../utils/misc'; export type SearchArgs = z.infer & { diff --git a/packages/client/src/restapi/site/get.ts b/packages/client/src/restapi/site/get.ts index a857df017d..dcfe189eb6 100644 --- a/packages/client/src/restapi/site/get.ts +++ b/packages/client/src/restapi/site/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetSiteResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetSiteResponse } from '@plone/types'; export type SiteArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/sources/get.ts b/packages/client/src/restapi/sources/get.ts index 7fc5fa4e0d..fc4a6ecbb5 100644 --- a/packages/client/src/restapi/sources/get.ts +++ b/packages/client/src/restapi/sources/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetSourceResponse } from '@plone/types'; +import type { GetSourceResponse } from '@plone/types'; const getSourceSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/system/get.ts b/packages/client/src/restapi/system/get.ts index 41c447bc6e..ed801c6e4d 100644 --- a/packages/client/src/restapi/system/get.ts +++ b/packages/client/src/restapi/system/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetSystemResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetSystemResponse } from '@plone/types'; export type GetSystemArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/transactions/get.ts b/packages/client/src/restapi/transactions/get.ts index c9f7f5ffb5..c45b3790ca 100644 --- a/packages/client/src/restapi/transactions/get.ts +++ b/packages/client/src/restapi/transactions/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetTransactionsResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetTransactionsResponse } from '@plone/types'; export type GetTransactionsArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/transactions/revert.ts b/packages/client/src/restapi/transactions/revert.ts index e9e5f45fbc..1e9723620c 100644 --- a/packages/client/src/restapi/transactions/revert.ts +++ b/packages/client/src/restapi/transactions/revert.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { revertTransactionsDataSchema } from '../../validation/transactions'; -import { RevertTransactionsResponse } from '@plone/types'; +import type { RevertTransactionsResponse } from '@plone/types'; export const revertTransactionsArgsSchema = z.object({ data: revertTransactionsDataSchema, diff --git a/packages/client/src/restapi/translations/get.ts b/packages/client/src/restapi/translations/get.ts index 726112310a..fb383f0bd2 100644 --- a/packages/client/src/restapi/translations/get.ts +++ b/packages/client/src/restapi/translations/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetTranslationResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetTranslationResponse } from '@plone/types'; import { z } from 'zod'; const getTranslationSchema = z.object({ diff --git a/packages/client/src/restapi/translations/link.ts b/packages/client/src/restapi/translations/link.ts index 4b5a34c2b5..468aa23654 100644 --- a/packages/client/src/restapi/translations/link.ts +++ b/packages/client/src/restapi/translations/link.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { linkTranslationDataSchema } from '../../validation/translations'; diff --git a/packages/client/src/restapi/translations/unlink.ts b/packages/client/src/restapi/translations/unlink.ts index ab360e7ff0..321ee63a07 100644 --- a/packages/client/src/restapi/translations/unlink.ts +++ b/packages/client/src/restapi/translations/unlink.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { unlinkTranslationDataSchema } from '../../validation/translations'; diff --git a/packages/client/src/restapi/types/add.ts b/packages/client/src/restapi/types/add.ts index 7516b00227..6182a97126 100644 --- a/packages/client/src/restapi/types/add.ts +++ b/packages/client/src/restapi/types/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createTypeFieldDataSchema } from '../../validation/types'; -import { CreateTypeFieldResponse } from '@plone/types'; +import type { CreateTypeFieldResponse } from '@plone/types'; export const createTypeFieldArgsSchema = z.object({ contentPath: z.string(), diff --git a/packages/client/src/restapi/types/get.ts b/packages/client/src/restapi/types/get.ts index ccbf2278a5..86dd3c5a11 100644 --- a/packages/client/src/restapi/types/get.ts +++ b/packages/client/src/restapi/types/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetTypeResponse } from '@plone/types'; +import type { GetTypeResponse } from '@plone/types'; const getTypeSchema = z.object({ contentPath: z.string(), diff --git a/packages/client/src/restapi/types/get_list.ts b/packages/client/src/restapi/types/get_list.ts index 314b2d273d..31cb883e7b 100644 --- a/packages/client/src/restapi/types/get_list.ts +++ b/packages/client/src/restapi/types/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetTypesResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetTypesResponse } from '@plone/types'; export type GetTypesArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/types/get_type_field.ts b/packages/client/src/restapi/types/get_type_field.ts index 32a0f771ba..2891792e44 100644 --- a/packages/client/src/restapi/types/get_type_field.ts +++ b/packages/client/src/restapi/types/get_type_field.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetTypeFieldResponse } from '@plone/types'; +import type { GetTypeFieldResponse } from '@plone/types'; const getTypeFieldSchema = z.object({ contentFieldPath: z.string(), diff --git a/packages/client/src/restapi/types/update.ts b/packages/client/src/restapi/types/update.ts index c3e0eff2ef..bae958ffc0 100644 --- a/packages/client/src/restapi/types/update.ts +++ b/packages/client/src/restapi/types/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateTypeFieldDataSchema } from '../../validation/types'; diff --git a/packages/client/src/restapi/upgrade/get.ts b/packages/client/src/restapi/upgrade/get.ts index 4edb5f08f4..1f05437ada 100644 --- a/packages/client/src/restapi/upgrade/get.ts +++ b/packages/client/src/restapi/upgrade/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetUpgradeResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetUpgradeResponse } from '@plone/types'; export type GetUpgradeArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/upgrade/run.ts b/packages/client/src/restapi/upgrade/run.ts index c9cb34faab..3d847045fd 100644 --- a/packages/client/src/restapi/upgrade/run.ts +++ b/packages/client/src/restapi/upgrade/run.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { runUpgradeDataSchema } from '../../validation/upgrade'; -import { RunUpgradeResponse } from '@plone/types'; +import type { RunUpgradeResponse } from '@plone/types'; export const runUpgradeArgsSchema = z.object({ data: runUpgradeDataSchema, diff --git a/packages/client/src/restapi/users/add.ts b/packages/client/src/restapi/users/add.ts index e9896013dc..de76be19d1 100644 --- a/packages/client/src/restapi/users/add.ts +++ b/packages/client/src/restapi/users/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createUserDataSchema } from '../../validation/users'; -import { User as CreateUserResponse } from '@plone/types'; +import type { User as CreateUserResponse } from '@plone/types'; export const createUserArgsSchema = z.object({ data: createUserDataSchema, diff --git a/packages/client/src/restapi/users/delete.ts b/packages/client/src/restapi/users/delete.ts index c3f5c175cc..59203b8bc2 100644 --- a/packages/client/src/restapi/users/delete.ts +++ b/packages/client/src/restapi/users/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/users/get.ts b/packages/client/src/restapi/users/get.ts index 1f8ab45bfb..dd29774f12 100644 --- a/packages/client/src/restapi/users/get.ts +++ b/packages/client/src/restapi/users/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { User as GetUserResponse } from '@plone/types'; +import type { User as GetUserResponse } from '@plone/types'; const getUserSchema = z.object({ userId: z.string(), diff --git a/packages/client/src/restapi/users/get_list.ts b/packages/client/src/restapi/users/get_list.ts index f441084903..d0319f2e62 100644 --- a/packages/client/src/restapi/users/get_list.ts +++ b/packages/client/src/restapi/users/get_list.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetUsersResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetUsersResponse } from '@plone/types'; const getUsersSchema = z.object({ query: z.string().optional(), diff --git a/packages/client/src/restapi/users/reset_password.ts b/packages/client/src/restapi/users/reset_password.ts index 6b831048e8..ec13bc4f5c 100644 --- a/packages/client/src/restapi/users/reset_password.ts +++ b/packages/client/src/restapi/users/reset_password.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/users/reset_password_with_token.ts b/packages/client/src/restapi/users/reset_password_with_token.ts index 65d9ead9e1..8355b11544 100644 --- a/packages/client/src/restapi/users/reset_password_with_token.ts +++ b/packages/client/src/restapi/users/reset_password_with_token.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { resetPasswordWithTokenDataSchema } from '../../validation/users'; diff --git a/packages/client/src/restapi/users/update.ts b/packages/client/src/restapi/users/update.ts index 83f71fb396..cc0e7a36ef 100644 --- a/packages/client/src/restapi/users/update.ts +++ b/packages/client/src/restapi/users/update.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updateUserDataSchema } from '../../validation/users'; diff --git a/packages/client/src/restapi/users/update_password.ts b/packages/client/src/restapi/users/update_password.ts index d5a52996df..21b29143b6 100644 --- a/packages/client/src/restapi/users/update_password.ts +++ b/packages/client/src/restapi/users/update_password.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { ApiRequestParams, apiRequest } from '../../API'; +import { type ApiRequestParams, apiRequest } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { updatePasswordDataSchema } from '../../validation/users'; diff --git a/packages/client/src/restapi/userschema/get.ts b/packages/client/src/restapi/userschema/get.ts index c5cf6c55d3..2d7e0fbf17 100644 --- a/packages/client/src/restapi/userschema/get.ts +++ b/packages/client/src/restapi/userschema/get.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetUserschemaResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetUserschemaResponse } from '@plone/types'; export type GetUserschemaArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/vocabularies/get.ts b/packages/client/src/restapi/vocabularies/get.ts index b25c9b00cf..a8e00488c3 100644 --- a/packages/client/src/restapi/vocabularies/get.ts +++ b/packages/client/src/restapi/vocabularies/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetVocabulariesResponse } from '@plone/types'; import { z } from 'zod'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetVocabulariesResponse } from '@plone/types'; const getVocabulariesSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/vocabularies/get_list.ts b/packages/client/src/restapi/vocabularies/get_list.ts index 1a6b18b83a..312be656aa 100644 --- a/packages/client/src/restapi/vocabularies/get_list.ts +++ b/packages/client/src/restapi/vocabularies/get_list.ts @@ -1,6 +1,6 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { GetVocabulariesListResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetVocabulariesListResponse } from '@plone/types'; export type VocabulariesListArgs = { config: PloneClientConfig; diff --git a/packages/client/src/restapi/workflow/add.ts b/packages/client/src/restapi/workflow/add.ts index 91b355bff9..86988f021c 100644 --- a/packages/client/src/restapi/workflow/add.ts +++ b/packages/client/src/restapi/workflow/add.ts @@ -1,11 +1,11 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; import { createWorkflowDataSchema } from '../../validation/workflow'; -import { CreateWorkflowResponse } from '@plone/types'; +import type { CreateWorkflowResponse } from '@plone/types'; export const createWorkflowArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/workflow/get.ts b/packages/client/src/restapi/workflow/get.ts index 7b0e733dfe..1e1f16801d 100644 --- a/packages/client/src/restapi/workflow/get.ts +++ b/packages/client/src/restapi/workflow/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; -import { WorkflowResponse } from '@plone/types'; import { z } from 'zod'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { WorkflowResponse } from '@plone/types'; const getWorkflowSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/workingcopy/add.ts b/packages/client/src/restapi/workingcopy/add.ts index b5d3bcfa49..534a00eae0 100644 --- a/packages/client/src/restapi/workingcopy/add.ts +++ b/packages/client/src/restapi/workingcopy/add.ts @@ -1,10 +1,10 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; -import { CreateWorkingcopyResponse } from '@plone/types'; +import type { CreateWorkingcopyResponse } from '@plone/types'; export const createWorkingcopyArgsSchema = z.object({ path: z.string(), diff --git a/packages/client/src/restapi/workingcopy/check-in.ts b/packages/client/src/restapi/workingcopy/check-in.ts index d2c91d7c81..36627ac325 100644 --- a/packages/client/src/restapi/workingcopy/check-in.ts +++ b/packages/client/src/restapi/workingcopy/check-in.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/workingcopy/delete.ts b/packages/client/src/restapi/workingcopy/delete.ts index 9efab73607..11db8c026c 100644 --- a/packages/client/src/restapi/workingcopy/delete.ts +++ b/packages/client/src/restapi/workingcopy/delete.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; +import { apiRequest, type ApiRequestParams } from '../../API'; import { z } from 'zod'; import { - PloneClientConfig, + type PloneClientConfig, PloneClientConfigSchema, } from '../../validation/config'; diff --git a/packages/client/src/restapi/workingcopy/get.ts b/packages/client/src/restapi/workingcopy/get.ts index 1149d49863..4426a0314a 100644 --- a/packages/client/src/restapi/workingcopy/get.ts +++ b/packages/client/src/restapi/workingcopy/get.ts @@ -1,7 +1,7 @@ -import { apiRequest, ApiRequestParams } from '../../API'; -import { PloneClientConfig } from '../../validation/config'; import { z } from 'zod'; -import { GetWorkingcopyResponse } from '@plone/types'; +import { apiRequest, type ApiRequestParams } from '../../API'; +import type { PloneClientConfig } from '../../validation/config'; +import type { GetWorkingcopyResponse } from '@plone/types'; const getWorkingcopySchema = z.object({ path: z.string(), diff --git a/packages/client/src/utils/misc.ts b/packages/client/src/utils/misc.ts index 6486c48f7d..d668d3971e 100644 --- a/packages/client/src/utils/misc.ts +++ b/packages/client/src/utils/misc.ts @@ -4,7 +4,7 @@ import { useMutation, useQuery, } from '@tanstack/react-query'; -import { PloneClientConfig } from '../validation/config'; +import type { PloneClientConfig } from '../validation/config'; /* configGetter is required instead of using the config directly to make sure diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index dfe27120f2..8d104e76ee 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,21 +1,28 @@ { "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", + "skipLibCheck": true, + "target": "es2022", + "allowJs": true, "resolveJsonModule": true, + "moduleDetection": "force", "isolatedModules": true, + "verbatimModuleSyntax": true, + + "strict": true, + "noImplicitOverride": true, + + "lib": ["es2022", "dom", "dom.iterable"], + "module": "preserve", "noEmit": true, + "jsx": "react-jsx", - "types": ["vite", "vitest/globals"] + + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strictPropertyInitialization": false, + + "useDefineForClassFields": true }, "exclude": ["node_modules", "dist", "coverage", "src/**/*.test.{ts,tsx}"], "include": ["src"], diff --git a/packages/client/tsup.config.ts b/packages/client/tsup.config.ts new file mode 100644 index 0000000000..82b88a425c --- /dev/null +++ b/packages/client/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entryPoints: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + outDir: 'dist', + clean: true, +}); diff --git a/packages/helpers/package.json b/packages/helpers/package.json index db697e84dc..55d7bd33c7 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -62,7 +62,7 @@ "parcel": "^2.12.0", "release-it": "^17.1.1", "tsconfig": "workspace:*", - "typescript": "^5.4.5", + "typescript": "^5.6.3", "vitest": "^2.1.3" } } diff --git a/packages/providers/news/6461.internal b/packages/providers/news/6461.internal new file mode 100644 index 0000000000..96267e48f2 --- /dev/null +++ b/packages/providers/news/6461.internal @@ -0,0 +1 @@ +Bump local `typescript` version. @sneridagh diff --git a/packages/providers/package.json b/packages/providers/package.json index 100c519771..6950e0b31a 100644 --- a/packages/providers/package.json +++ b/packages/providers/package.json @@ -79,7 +79,7 @@ "parcel": "^2.12.0", "release-it": "17.1.1", "tsconfig": "workspace:*", - "typescript": "^5.4.5", + "typescript": "^5.6.3", "vitest": "^2.1.3" } } diff --git a/packages/registry/news/6461.bugfix b/packages/registry/news/6461.bugfix new file mode 100644 index 0000000000..ec4a0ab820 --- /dev/null +++ b/packages/registry/news/6461.bugfix @@ -0,0 +1 @@ +Fix types for add-on's TypeScript. Fix `.tsconfig` for Node.js side. @sneridagh diff --git a/packages/registry/news/6461.internal b/packages/registry/news/6461.internal new file mode 100644 index 0000000000..47e581e30f --- /dev/null +++ b/packages/registry/news/6461.internal @@ -0,0 +1 @@ +Replace `parcel` with `tsup` for build. @sneridagh diff --git a/packages/registry/package.json b/packages/registry/package.json index 743a6c38d1..588d36f8d4 100644 --- a/packages/registry/package.json +++ b/packages/registry/package.json @@ -32,48 +32,34 @@ "access": "public" }, "type": "module", - "source": "src/index.ts", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/types.d.ts", + "main": "dist/index.js", "exports": { - "./src/*": "./src/*.cjs", + "./package.json": "./package.json", "./addon-registry": { - "require": "./dist/cjs/addon-registry.cjs", - "import": "./dist/esm/addon-registry.js", - "types": "./dist/esm/addon-registry.d.ts" + "import": "./dist/addon-registry/addon-registry.js", + "default": "./dist/addon-registry/addon-registry.cjs" }, "./create-addons-loader": { - "require": "./dist/cjs/create-addons-loader.cjs", - "import": "./dist/esm/create-addons-loader.js", - "types": "./dist/esm/create-addons-loader.d.ts" + "import": "./dist/addon-registry/create-addons-loader.js", + "default": "./dist/addon-registry/create-addons-loader.cjs" }, "./create-theme-loader": { - "require": "./dist/cjs/create-theme-loader.cjs", - "import": "./dist/esm/create-theme-loader.js", - "types": "./dist/esm/create-theme-loader.d.ts" + "import": "./dist/addon-registry/create-theme-loader.js", + "default": "./dist/addon-registry/create-theme-loader.cjs" }, "./vite-plugin": { "import": "./vite-plugin.js", "types": "./vite-plugin.d.ts" }, ".": { - "types": "./dist/types.d.ts", "import": "./dist/index.js", - "require": "./dist/index.cjs" - } - }, - "targets": { - "main": { - "includeNodeModules": false + "default": "./dist/index.cjs" } }, "scripts": { - "watch": "parcel watch", - "build": "parcel build && pnpm build:node:esm && pnpm build:node:cjs", - "build:force": "rm -rf dist && parcel build --no-cache && pnpm build:node:esm && pnpm build:node:cjs", - "build:node:esm": "tsc --project tsconfig.node.json || true", - "build:node:cjs": "tsc --project tsconfig.node.json --module commonjs --moduleResolution Node --outDir dist/cjs || true && make fix-build", + "build": "tsup", + "build:force": "rm -rf dist && tsup", + "check:exports": "attw --pack .", "test": "vitest", "test:debug": "vitest --inspect-brk --no-file-parallelism registry", "dry-release": "release-it --dry-run", @@ -99,8 +85,7 @@ "tmp": "0.2.1" }, "devDependencies": { - "@parcel/packager-ts": "^2.12.0", - "@parcel/transformer-typescript-types": "^2.12.0", + "@arethetypeswrong/cli": "^0.16.4", "@plone/types": "workspace:*", "@types/debug": "^4.1.12", "@types/glob": "^8.1.0", @@ -108,11 +93,11 @@ "@types/react": "^18", "@types/react-dom": "^18", "@types/tmp": "^0.2.6", - "parcel": "^2.12.0", "react": "^18.2.0", "react-dom": "^18.2.0", "release-it": "16.2.1", "tsconfig": "workspace:*", + "tsup": "^8.3.5", "typescript": "^5.6.3", "vite": "^5.4.8", "vitest": "^2.1.3" diff --git a/packages/registry/src/addon-registry/addon-registry.ts b/packages/registry/src/addon-registry/addon-registry.ts index 596d69e230..e4eb233c89 100644 --- a/packages/registry/src/addon-registry/addon-registry.ts +++ b/packages/registry/src/addon-registry/addon-registry.ts @@ -97,7 +97,10 @@ function buildDependencyGraph( } addons.forEach((loaderString) => { - const [name, extra] = loaderString.split(':'); + const [name, extra] = loaderString.split(':') as [ + string, + string | undefined, + ]; if (!graph.hasNode(name)) { graph.addNode(name, []); } @@ -199,7 +202,7 @@ class AddonRegistry { this.addonNames = this.resultantMergedAddons.map( (s: string) => s.split(':')[0], - ); + ) as Array; this.packages = {}; this.customizations = new Map(); @@ -215,14 +218,14 @@ class AddonRegistry { this.dependencyGraph = buildDependencyGraph( [ ...(Object.keys(this.coreAddons).map( - (key) => this.coreAddons[key].package, + (key) => this.coreAddons[key]?.package as string, ) || []), ...this.resultantMergedAddons, ...(process.env.ADDONS ? process.env.ADDONS.split(';') : []), ], (name) => { this.initPublishedPackage(name); - return this.packages[name].addons || []; + return this.packages[name]?.addons || []; }, ); @@ -361,14 +364,15 @@ class AddonRegistry { initDevelopmentPackage(name: string) { const [baseUrl, pathsConfig] = this.getTSConfigPaths(); if (pathsConfig && pathsConfig.hasOwnProperty(name)) { - const packagePath = `${this.projectRootPath}/${baseUrl}/${pathsConfig[name][0]}`; + const packagePath = `${this.projectRootPath}/${baseUrl}/${pathsConfig[name]![0]}`; const packageJsonPath = `${getPackageBasePath(packagePath)}/package.json`; const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')); const innerAddons: Array = packageJson.addons || []; const innerAddonsNormalized = innerAddons.map((s) => s.split(':')[0]); if (this.addonNames.includes(name) && innerAddonsNormalized.length > 0) { innerAddonsNormalized.forEach((name) => { - if (!this.addonNames.includes(name)) this.addonNames.push(name); + if (!this.addonNames.includes(name as string)) + this.addonNames.push(name as string); }); } const pkg = { @@ -415,7 +419,8 @@ class AddonRegistry { const innerAddonsNormalized = innerAddons.map((s) => s.split(':')[0]); if (this.addonNames.includes(name) && innerAddonsNormalized.length > 0) { innerAddonsNormalized.forEach((name) => { - if (!this.addonNames.includes(name)) this.addonNames.push(name); + if (!this.addonNames.includes(name as string)) + this.addonNames.push(name as string); }); } const packageTSConfig = this.getTSConfigPaths(basePath); @@ -444,7 +449,7 @@ class AddonRegistry { // An add-on from the ADDONS env var can only be a published one initAddonFromEnvVar(name: string) { - const normalizedAddonName = name.split(':')[0]; + const normalizedAddonName = name.split(':')[0] as string; this.initPublishedPackage(normalizedAddonName); } @@ -460,14 +465,14 @@ class AddonRegistry { */ initAddonExtenders() { this.getAddons().forEach((addon) => { - const base = path.dirname(addon.packageJson); + const base = path.dirname(addon!.packageJson); const razzlePath = path.resolve(`${base}/razzle.extend.js`); if (fs.existsSync(razzlePath)) { - addon.razzleExtender = razzlePath; + addon!.razzleExtender = razzlePath; } const eslintPath = path.resolve(`${base}/eslint.extend.js`); if (fs.existsSync(eslintPath)) { - addon.eslintExtender = eslintPath; + addon!.eslintExtender = eslintPath; } }); } @@ -483,13 +488,13 @@ class AddonRegistry { getAddonExtenders() { return this.getAddons() - .map((o) => o.razzleExtender) + .map((o) => o?.razzleExtender) .filter((e) => e); } getEslintExtenders() { return this.getAddons() - .map((o) => o.eslintExtender) + .map((o) => o?.eslintExtender) .filter((e) => e); } @@ -503,11 +508,11 @@ class AddonRegistry { }; this.getAddonDependencies().forEach((addon) => { - const normalizedAddonName = addon.split(':')[0]; + const normalizedAddonName = addon.split(':')[0] as string; // We have two possible insertion points, variables and main - const customThemeVariables = `${this.packages[normalizedAddonName].modulePath}/theme/_variables.scss`; - const customThemeMain = `${this.packages[normalizedAddonName].modulePath}/theme/_main.scss`; + const customThemeVariables = `${this.packages[normalizedAddonName]?.modulePath}/theme/_variables.scss`; + const customThemeMain = `${this.packages[normalizedAddonName]?.modulePath}/theme/_main.scss`; if ( fs.existsSync(customThemeVariables) && normalizedAddonName !== this.theme @@ -555,12 +560,12 @@ class AddonRegistry { getResolveAliases() { const pairs: [string, string][] = Object.keys(this.packages).map((o) => [ o, - this.packages[o].modulePath, + this.packages[o]?.modulePath || '', ]); let aliasesFromTSPaths = {}; Object.keys(this.packages).forEach((o) => { - if (this.packages[o].tsConfigPaths) { + if (this.packages[o]?.tsConfigPaths) { aliasesFromTSPaths = { ...aliasesFromTSPaths, ...this.getAliasesFromTSConfig( @@ -734,8 +739,8 @@ class AddonRegistry { aliases = { ...aliases, ...this.getCustomizationPaths( - JSON.parse(fs.readFileSync(addon.packageJson, 'utf-8')), - getPackageBasePath(addon.modulePath), + JSON.parse(fs.readFileSync(addon!.packageJson, 'utf-8')), + getPackageBasePath(addon!.modulePath), ), }; }); @@ -805,7 +810,7 @@ class AddonRegistry { if (!seen.has(dep)) { seen.add(dep); - queue.push(dep); + queue.push(dep as string); } out += ` "${name}" -> "${dep}"\n`; } diff --git a/packages/registry/src/addon-registry/create-addons-loader.ts b/packages/registry/src/addon-registry/create-addons-loader.ts index 25b7d97545..3678242f75 100644 --- a/packages/registry/src/addon-registry/create-addons-loader.ts +++ b/packages/registry/src/addon-registry/create-addons-loader.ts @@ -46,10 +46,11 @@ Instead, change the "addons" setting in your package.json file. let extras: string[] | string[][] = []; // TODO: Improve this typing const addonConfigLoadInfo = addonConfigString.split(':'); const pkgName = addonConfigLoadInfo[0]; - const defaultImport = nameFromPackage(pkgName); + const defaultImport = nameFromPackage(pkgName as string); if (addonConfigLoadInfo.length > 1) { extras = addonConfigLoadInfo[1].split(','); } + // @ts-expect-error This forEach is a complete mess extras = extras.map((name) => [name, `${name}${counter++}`]); const line = `import ${defaultImport}${ extras.length diff --git a/packages/registry/src/addon-registry/create-theme-loader.ts b/packages/registry/src/addon-registry/create-theme-loader.ts index d5f4dbbc24..89a2911025 100644 --- a/packages/registry/src/addon-registry/create-theme-loader.ts +++ b/packages/registry/src/addon-registry/create-theme-loader.ts @@ -22,7 +22,7 @@ function nameFromPackage(name: string) { * Creates a static file with code necessary to load the addons configuration * */ -function getThemeLoaderCode(name, customThemeAddons = []) { +function getThemeLoaderCode(name: string, customThemeAddons = []) { let buf = `/* This file is autogenerated. Don't change it directly. Add a ./theme/_${name}.scss in your add-on to load your theme customizations in the current theme. diff --git a/packages/registry/tsconfig.json b/packages/registry/tsconfig.json index 1319106020..5ab3185eba 100644 --- a/packages/registry/tsconfig.json +++ b/packages/registry/tsconfig.json @@ -1,23 +1,30 @@ { "compilerOptions": { - "target": "ESNext", - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "module": "commonjs", - "allowJs": true, - "skipLibCheck": true, "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "strictPropertyInitialization": false, - "moduleResolution": "Node", + "skipLibCheck": true, + "target": "es2022", + "allowJs": true, "resolveJsonModule": true, + "moduleDetection": "force", "isolatedModules": true, + "verbatimModuleSyntax": true, + + "strict": true, + "noImplicitOverride": true, + + "lib": ["es2022", "dom", "dom.iterable"], + "module": "preserve", "noEmit": true, + "jsx": "react-jsx", + + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strictPropertyInitialization": false, + "paths": {} }, - "include": ["src/index.ts", "src/**/*.js", "src/**/*.cjs"], + "include": ["src/index.ts"], "exclude": [ "node_modules", "build", @@ -26,5 +33,6 @@ "src/**/*.test.{js,jsx,ts,tsx}", "src/**/*.spec.{js,jsx,ts,tsx}", "src/**/*.stories.{js,jsx,ts,tsx}" - ] + ], + "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/packages/registry/tsconfig.node.json b/packages/registry/tsconfig.node.json index a25380a557..72d408d611 100644 --- a/packages/registry/tsconfig.node.json +++ b/packages/registry/tsconfig.node.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "composite": true, /* Base Options: */ "esModuleInterop": true, "skipLibCheck": true, @@ -10,11 +11,10 @@ "isolatedModules": true, /* Strictness */ "strict": true, - "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, /* If transpiling with TypeScript: */ - "moduleResolution": "NodeNext", - "module": "NodeNext", - "outDir": "dist/esm", + "module": "Preserve", + "outDir": "dist", "sourceMap": true, /* If your code doesn't run in the DOM: */ "lib": ["es2022"], diff --git a/packages/registry/tsup.config.ts b/packages/registry/tsup.config.ts new file mode 100644 index 0000000000..e5f2cb8fe2 --- /dev/null +++ b/packages/registry/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entryPoints: ['src/index.ts', 'src/addon-registry/**/*.ts'], + format: ['cjs', 'esm'], + dts: true, + outDir: 'dist', + clean: true, +}); diff --git a/packages/scripts/i18n.cjs b/packages/scripts/i18n.cjs index 439c860e67..e0c95cf399 100755 --- a/packages/scripts/i18n.cjs +++ b/packages/scripts/i18n.cjs @@ -283,14 +283,14 @@ function main({ addonMode }) { fs.existsSync( path.join( projectRootPath, - '/node_modules/@plone/registry/dist/cjs/addon-registry.cjs', + '/node_modules/@plone/registry/dist/addon-registry/addon-registry.cjs', ), ) ) { AddonRegistry = require( path.join( projectRootPath, - '/node_modules/@plone/registry/dist/cjs/addon-registry.cjs', + '/node_modules/@plone/registry/dist/addon-registry/addon-registry.cjs', ), ).AddonRegistry; // Detect where is the registry (if we are in Volto 18-alpha.46 or below) diff --git a/packages/scripts/news/6461.internal b/packages/scripts/news/6461.internal new file mode 100644 index 0000000000..7bbe93ec94 --- /dev/null +++ b/packages/scripts/news/6461.internal @@ -0,0 +1 @@ +Improve exports in `@plone/registry`. Adapt its detection in i18n script. @sneridagh diff --git a/packages/volto/news/6461.internal b/packages/volto/news/6461.internal new file mode 100644 index 0000000000..0c6205f6fb --- /dev/null +++ b/packages/volto/news/6461.internal @@ -0,0 +1 @@ +Improve exports in @plone/registry, adapt the Jest test setup. @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index da10ce6914..727196fd28 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -85,8 +85,8 @@ "@plone/volto/babel": "/babel.js", "@plone/volto/(.*)$": "/src/$1", "@plone/volto-slate/(.*)$": "/../volto-slate/src/$1", - "@plone/registry/addon-registry$": "/node_modules/@plone/registry/dist/esm/addon-registry.js", - "@plone/registry/create-addons-loader$": "/node_modules/@plone/registry/dist/esm/create-addons-loader.js", + "@plone/registry/addon-registry$": "/node_modules/@plone/registry/dist/addon-registry/addon-registry.js", + "@plone/registry/create-addons-loader$": "/node_modules/@plone/registry/dist/addon-registry/create-addons-loader.js", "@plone/registry": "/../registry/src", "@plone/registry/(.*)$": "/../registry/src/$1", "@plone/volto": "/src/index.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ac056dcedc..99c3732ab9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -386,27 +386,9 @@ importers: specifier: ^3.22.4 version: 3.22.5 devDependencies: - '@parcel/config-default': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) - '@parcel/core': - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10) - '@parcel/optimizer-terser': - specifier: 2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/packager-ts': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-js': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10)) - '@parcel/transformer-react-refresh-wrap': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-typescript-types': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(typescript@5.6.3) + '@arethetypeswrong/cli': + specifier: ^0.16.4 + version: 0.16.4 '@plone/types': specifier: 'workspace: *' version: link:../types @@ -440,9 +422,6 @@ importers: jsdom: specifier: ^21.1.1 version: 21.1.2 - parcel: - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) react: specifier: ^18.2.0 version: 18.2.0 @@ -453,10 +432,10 @@ importers: specifier: 17.1.1 version: 17.1.1(typescript@5.6.3) tsup: - specifier: ^8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(postcss@8.4.47)(typescript@5.6.3) + specifier: ^8.3.5 + version: 8.3.5(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3) typescript: - specifier: ^5.4.5 + specifier: ^5.6.3 version: 5.6.3 uuid: specifier: ^9.0.1 @@ -727,7 +706,7 @@ importers: specifier: workspace:* version: link:../tsconfig typescript: - specifier: ^5.4.5 + specifier: ^5.6.3 version: 5.6.3 vitest: specifier: ^2.1.3 @@ -794,7 +773,7 @@ importers: specifier: workspace:* version: link:../tsconfig typescript: - specifier: ^5.4.5 + specifier: ^5.6.3 version: 5.6.3 vitest: specifier: ^2.1.3 @@ -821,12 +800,9 @@ importers: specifier: 0.2.1 version: 0.2.1 devDependencies: - '@parcel/packager-ts': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/transformer-typescript-types': - specifier: ^2.12.0 - version: 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)(typescript@5.6.3) + '@arethetypeswrong/cli': + specifier: ^0.16.4 + version: 0.16.4 '@plone/types': specifier: workspace:* version: link:../types @@ -848,9 +824,6 @@ importers: '@types/tmp': specifier: ^0.2.6 version: 0.2.6 - parcel: - specifier: ^2.12.0 - version: 2.12.0(@swc/helpers@0.5.10)(postcss@8.4.47)(relateurl@0.2.7)(srcset@4.0.0)(terser@5.30.3)(typescript@5.6.3) react: specifier: ^18.2.0 version: 18.2.0 @@ -863,6 +836,9 @@ importers: tsconfig: specifier: workspace:* version: link:../tsconfig + tsup: + specifier: ^8.3.5 + version: 8.3.5(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3) typescript: specifier: ^5.6.3 version: 5.6.3 @@ -4456,10 +4432,6 @@ packages: resolution: {integrity: sha512-iBi6LZB3lm6WmbXfzi8J3DCVPmn4FN2lw7DGXxUXu7MouDPVWfTsM6U/5TkSHJRNRogZ2gqy5q9g34NPxHbJcw==} engines: {node: '>= 12.0.0', parcel: ^2.12.0} - '@parcel/optimizer-terser@2.12.0': - resolution: {integrity: sha512-cIAJ+nLPk7MUGiSbsam8vM8gQNiaVavKhJN13PsEBzv0QLOQm0TCl02cGC9WJIukyc90AO5p3MnFP4/1U1M8iA==} - engines: {node: '>= 12.0.0', parcel: ^2.12.0} - '@parcel/package-manager@2.12.0': resolution: {integrity: sha512-0nvAezcjPx9FT+hIL+LS1jb0aohwLZXct7jAh7i0MLMtehOi0z1Sau+QpgMlA9rfEZZ1LIeFdnZZwqSy7Ccspw==} engines: {node: '>= 12.0.0'} @@ -7866,11 +7838,11 @@ packages: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} - bundle-require@4.0.2: - resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.17' + esbuild: '>=0.18' bundle-require@5.0.0: resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} @@ -16456,8 +16428,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsup@8.0.2: - resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==} + tsup@8.3.5: + resolution: {integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -20790,18 +20762,6 @@ snapshots: - '@parcel/core' - '@swc/helpers' - '@parcel/optimizer-terser@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)': - dependencies: - '@parcel/diagnostic': 2.12.0 - '@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10) - '@parcel/source-map': 2.1.1 - '@parcel/utils': 2.12.0 - nullthrows: 1.1.1 - terser: 5.30.3 - transitivePeerDependencies: - - '@parcel/core' - - '@swc/helpers' - '@parcel/package-manager@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.10))(@swc/helpers@0.5.10)': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.10) @@ -26072,9 +26032,9 @@ snapshots: dependencies: run-applescript: 7.0.0 - bundle-require@4.0.2(esbuild@0.19.12): + bundle-require@5.0.0(esbuild@0.24.0): dependencies: - esbuild: 0.19.12 + esbuild: 0.24.0 load-tsconfig: 0.2.5 bundle-require@5.0.0(esbuild@0.24.0): @@ -26365,7 +26325,7 @@ snapshots: chokidar@3.6.0: dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -34111,12 +34071,13 @@ snapshots: optionalDependencies: postcss: 8.4.31 - postcss-load-config@4.0.2(postcss@8.4.47): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1): dependencies: lilconfig: 3.1.1 - yaml: 2.4.1 optionalDependencies: + jiti: 1.21.6 postcss: 8.4.47 + tsx: 4.19.1 postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1): dependencies: @@ -37427,21 +37388,23 @@ snapshots: tslib@2.6.2: {} - tsup@8.0.2(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(postcss@8.4.47)(typescript@5.6.3): + tsup@8.3.5(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3): dependencies: - bundle-require: 4.0.2(esbuild@0.19.12) + bundle-require: 5.0.0(esbuild@0.24.0) cac: 6.7.14 - chokidar: 3.6.0 - debug: 4.3.4(supports-color@8.1.1) - esbuild: 0.19.12 - execa: 5.1.1 - globby: 11.1.0 + chokidar: 4.0.1 + consola: 3.2.3 + debug: 4.3.7 + esbuild: 0.24.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.47) + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1) resolve-from: 5.0.0 - rollup: 4.14.3 + rollup: 4.24.0 source-map: 0.8.0-beta.0 sucrase: 3.35.0 + tinyexec: 0.3.1 + tinyglobby: 0.2.10 tree-kill: 1.2.2 optionalDependencies: '@microsoft/api-extractor': 7.43.0(@types/node@20.12.7) @@ -37449,8 +37412,10 @@ snapshots: postcss: 8.4.47 typescript: 5.6.3 transitivePeerDependencies: + - jiti - supports-color - - ts-node + - tsx + - yaml tsup@8.3.5(@microsoft/api-extractor@7.43.0(@types/node@20.12.7))(@swc/core@1.4.16(@swc/helpers@0.5.10))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3): dependencies: