Skip to content

Commit

Permalink
Merge branch 'main' into replaceparcelwithtsupcomponents
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh authored Nov 4, 2024
2 parents c3a8c10 + 57731c7 commit 33d3307
Show file tree
Hide file tree
Showing 124 changed files with 426 additions and 452 deletions.
9 changes: 0 additions & 9 deletions packages/client/.parcelrc

This file was deleted.

1 change: 1 addition & 0 deletions packages/client/news/6461.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump local `typescript` version. @sneridagh
34 changes: 11 additions & 23 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/API.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' };

Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/actions/get.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/addons/get.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/addons/get_list.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/addons/install.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/addons/install_profile.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/addons/unistall.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/addons/upgrade.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/aliases/add.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/aliases/add_multiple.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/aliases/delete.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/aliases/get.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/aliases/get_list.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/breadcrumbs/get.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/comments/add.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/comments/delete.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/comments/get.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/comments/update.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/content/add.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/content/delete.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/content/get.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/content/update.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/contextnavigation/get.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/controlpanels/add.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/controlpanels/delete.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/controlpanels/get.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/controlpanels/get_list.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/restapi/controlpanels/update.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/copymove/copy.ts
Original file line number Diff line number Diff line change
@@ -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<typeof copyDataSchema> & {
config: PloneClientConfig;
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/restapi/copymove/move.ts
Original file line number Diff line number Diff line change
@@ -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<typeof moveDataSchema> & {
config: PloneClientConfig;
Expand Down
Loading

0 comments on commit 33d3307

Please sign in to comment.