payload 3.2.1 → 3.2.2-canary.317488d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config/client.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export type ServerOnlyRootProperties = keyof Pick<SanitizedConfig, 'bin' | 'cors
|
|
|
7
7
|
export type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>;
|
|
8
8
|
export type ClientConfig = {
|
|
9
9
|
admin: {
|
|
10
|
-
dependencies?: Record<string, React.ReactNode>;
|
|
11
10
|
livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>;
|
|
12
11
|
} & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>;
|
|
13
12
|
collections: ClientCollectionConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,+BAA+B,EAChC,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,kBAAkB,EAA6B,MAAM,6BAA6B,CAAA;AAEhG,MAAM,MAAM,wBAAwB,GAAG,MAAM,IAAI,CAC/C,eAAe,EACb,KAAK,GACL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,WAAW,GACX,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,YAAY,CACf,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,MAAM,IAAI,CAAC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,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAA;CAC3D,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,wBAAwB,CAAC,CAAA;AAElG,eAAO,MAAM,+BAA+B,EAAE,SAAS,OAAO,CAAC,6BAA6B,CAAC,EAAO,CAAA;AAEpG,eAAO,MAAM,0BAA0B,EAAE,SAAS,OAAO,CAAC,wBAAwB,CAAC,EAmBlF,CAAA;AAED,eAAO,MAAM,kBAAkB,iCAI5B;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,YA2FH,CAAA"}
|
package/dist/config/client.js
CHANGED
|
@@ -33,7 +33,6 @@ export const createClientConfig = ({ config, i18n, importMap })=>{
|
|
|
33
33
|
avatar: config.admin.avatar,
|
|
34
34
|
custom: config.admin.custom,
|
|
35
35
|
dateFormat: config.admin.dateFormat,
|
|
36
|
-
dependencies: config.admin.dependencies,
|
|
37
36
|
disable: config.admin.disable,
|
|
38
37
|
importMap: config.admin.importMap,
|
|
39
38
|
meta: config.admin.meta,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { DeepPartial } from 'ts-essentials'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.js'\n\nimport {\n type ClientCollectionConfig,\n createClientCollectionConfigs,\n} from '../collections/config/client.js'\nimport { type ClientGlobalConfig, createClientGlobalConfigs } from '../globals/config/client.js'\n\nexport type ServerOnlyRootProperties = keyof Pick<\n SanitizedConfig,\n | 'bin'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'db'\n | 'editor'\n | 'email'\n | 'endpoints'\n | 'graphQL'\n | 'hooks'\n | 'jobs'\n | 'logger'\n | 'onInit'\n | 'plugins'\n | 'secret'\n | 'sharp'\n | 'typescript'\n>\n\nexport type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>\n\nexport type ClientConfig = {\n admin: {\n
|
|
1
|
+
{"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { DeepPartial } from 'ts-essentials'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.js'\n\nimport {\n type ClientCollectionConfig,\n createClientCollectionConfigs,\n} from '../collections/config/client.js'\nimport { type ClientGlobalConfig, createClientGlobalConfigs } from '../globals/config/client.js'\n\nexport type ServerOnlyRootProperties = keyof Pick<\n SanitizedConfig,\n | 'bin'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'db'\n | 'editor'\n | 'email'\n | 'endpoints'\n | 'graphQL'\n | 'hooks'\n | 'jobs'\n | 'logger'\n | 'onInit'\n | 'plugins'\n | 'secret'\n | 'sharp'\n | 'typescript'\n>\n\nexport type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>\n\nexport type ClientConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n i18n?: Omit<SanitizedConfig['i18n'], 'supportedLanguages'>\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport const serverOnlyAdminConfigProperties: readonly Partial<ServerOnlyRootAdminProperties>[] = []\n\nexport const serverOnlyConfigProperties: readonly Partial<ServerOnlyRootProperties>[] = [\n 'endpoints',\n 'db',\n 'editor',\n 'plugins',\n 'sharp',\n 'onInit',\n 'secret',\n 'hooks',\n 'bin',\n 'typescript',\n 'cors',\n 'csrf',\n 'email',\n 'custom',\n 'graphQL',\n 'jobs',\n 'logger',\n // `admin`, `onInit`, `localization`, `collections`, and `globals` are all handled separately\n]\n\nexport const createClientConfig = ({\n config,\n i18n,\n importMap,\n}: {\n config: SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n}): ClientConfig => {\n const clientConfig = {} as DeepPartial<ClientConfig>\n\n for (const key in config) {\n if (serverOnlyConfigProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n clientConfig.admin = {\n autoLogin: config.admin.autoLogin,\n avatar: config.admin.avatar,\n custom: config.admin.custom,\n dateFormat: config.admin.dateFormat,\n disable: config.admin.disable,\n importMap: config.admin.importMap,\n meta: config.admin.meta,\n routes: config.admin.routes,\n theme: config.admin.theme,\n user: config.admin.user,\n }\n if (config.admin.livePreview) {\n clientConfig.admin.livePreview = {}\n\n if (config.admin.livePreview.breakpoints) {\n clientConfig.admin.livePreview.breakpoints = config.admin.livePreview.breakpoints\n }\n }\n break\n case 'collections':\n ;(clientConfig.collections as ClientCollectionConfig[]) = createClientCollectionConfigs({\n collections: config.collections,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n })\n break\n case 'globals':\n ;(clientConfig.globals as ClientGlobalConfig[]) = createClientGlobalConfigs({\n defaultIDType: config.db.defaultIDType,\n globals: config.globals,\n i18n,\n importMap,\n })\n break\n case 'i18n':\n clientConfig.i18n = {\n fallbackLanguage: config.i18n.fallbackLanguage,\n translations: config.i18n.translations,\n }\n break\n case 'localization':\n if (typeof config.localization === 'object' && config.localization) {\n clientConfig.localization = {}\n if (config.localization.defaultLocale) {\n clientConfig.localization.defaultLocale = config.localization.defaultLocale\n }\n if (config.localization.fallback) {\n clientConfig.localization.fallback = config.localization.fallback\n }\n if (config.localization.localeCodes) {\n clientConfig.localization.localeCodes = config.localization.localeCodes\n }\n if (config.localization.locales) {\n clientConfig.localization.locales = []\n for (const locale of config.localization.locales) {\n if (locale) {\n const clientLocale: Partial<(typeof config.localization.locales)[0]> = {}\n if (locale.code) {\n clientLocale.code = locale.code\n }\n if (locale.fallbackLocale) {\n clientLocale.fallbackLocale = locale.fallbackLocale\n }\n if (locale.label) {\n clientLocale.label = locale.label\n }\n if (locale.rtl) {\n clientLocale.rtl = locale.rtl\n }\n clientConfig.localization.locales.push(clientLocale)\n }\n }\n }\n }\n break\n default:\n clientConfig[key] = config[key]\n }\n }\n return clientConfig as ClientConfig\n}\n"],"names":["createClientCollectionConfigs","createClientGlobalConfigs","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","createClientConfig","config","i18n","importMap","clientConfig","key","includes","admin","autoLogin","avatar","custom","dateFormat","disable","meta","routes","theme","user","livePreview","breakpoints","collections","defaultIDType","db","globals","fallbackLanguage","translations","localization","defaultLocale","fallback","localeCodes","locales","locale","clientLocale","code","fallbackLocale","label","rtl","push"],"mappings":"AAUA,SAEEA,6BAA6B,QACxB,kCAAiC;AACxC,SAAkCC,yBAAyB,QAAQ,8BAA6B;AAmChG,OAAO,MAAMC,kCAAqF,EAAE,CAAA;AAEpG,OAAO,MAAMC,6BAA2E;IACtF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAED,CAAA;AAED,OAAO,MAAMC,qBAAqB,CAAC,EACjCC,MAAM,EACNC,IAAI,EACJC,SAAS,EAKV;IACC,MAAMC,eAAe,CAAC;IAEtB,IAAK,MAAMC,OAAOJ,OAAQ;QACxB,IAAIF,2BAA2BO,QAAQ,CAACD,MAAa;YACnD;QACF;QACA,OAAQA;YACN,KAAK;gBACHD,aAAaG,KAAK,GAAG;oBACnBC,WAAWP,OAAOM,KAAK,CAACC,SAAS;oBACjCC,QAAQR,OAAOM,KAAK,CAACE,MAAM;oBAC3BC,QAAQT,OAAOM,KAAK,CAACG,MAAM;oBAC3BC,YAAYV,OAAOM,KAAK,CAACI,UAAU;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B,YAAY,CAACE,QAAQ,EAAE;wBAChCvB,aAAaqB,YAAY,CAACE,QAAQ,GAAG1B,OAAOwB,YAAY,CAACE,QAAQ;oBACnE;oBACA,IAAI1B,OAAOwB,YAAY,CAACG,WAAW,EAAE;wBACnCxB,aAAaqB,YAAY,CAACG,WAAW,GAAG3B,OAAOwB,YAAY,CAACG,WAAW;oBACzE;oBACA,IAAI3B,OAAOwB,YAAY,CAACI,OAAO,EAAE;wBAC/BzB,aAAaqB,YAAY,CAACI,OAAO,GAAG,EAAE;wBACtC,KAAK,MAAMC,UAAU7B,OAAOwB,YAAY,CAACI,OAAO,CAAE;4BAChD,IAAIC,QAAQ;gCACV,MAAMC,eAAiE,CAAC;gCACxE,IAAID,OAAOE,IAAI,EAAE;oCACfD,aAAaC,IAAI,GAAGF,OAAOE,IAAI;gCACjC;gCACA,IAAIF,OAAOG,cAAc,EAAE;oCACzBF,aAAaE,cAAc,GAAGH,OAAOG,cAAc;gCACrD;gCACA,IAAIH,OAAOI,KAAK,EAAE;oCAChBH,aAAaG,KAAK,GAAGJ,OAAOI,KAAK;gCACnC;gCACA,IAAIJ,OAAOK,GAAG,EAAE;oCACdJ,aAAaI,GAAG,GAAGL,OAAOK,GAAG;gCAC/B;gCACA/B,aAAaqB,YAAY,CAACI,OAAO,CAACO,IAAI,CAACL;4BACzC;wBACF;oBACF;gBACF;gBACA;YACF;gBACE3B,YAAY,CAACC,IAAI,GAAGJ,MAAM,CAACI,IAAI;QACnC;IACF;IACA,OAAOD;AACT,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2-canary.317488d",
|
|
4
4
|
"description": "Node, React, Headless CMS and Application Framework built on Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"admin panel",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"tsx": "4.19.2",
|
|
98
98
|
"uuid": "10.0.0",
|
|
99
99
|
"ws": "^8.16.0",
|
|
100
|
-
"@payloadcms/translations": "3.2.
|
|
100
|
+
"@payloadcms/translations": "3.2.2-canary.317488d"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@hyrious/esbuild-plugin-commonjs": "^0.2.4",
|