payload 3.28.0-internal.c4e1bed → 3.28.1
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/admin/forms/Description.d.ts +2 -3
- package/dist/admin/forms/Description.d.ts.map +1 -1
- package/dist/admin/forms/Description.js.map +1 -1
- package/dist/admin/forms/Error.d.ts +2 -3
- package/dist/admin/forms/Error.d.ts.map +1 -1
- package/dist/admin/forms/Error.js.map +1 -1
- package/dist/admin/forms/Label.d.ts +3 -3
- package/dist/admin/forms/Label.d.ts.map +1 -1
- package/dist/admin/forms/Label.js.map +1 -1
- package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts.map +1 -1
- package/dist/auth/strategies/local/generatePasswordSaltHash.js +3 -0
- package/dist/auth/strategies/local/generatePasswordSaltHash.js.map +1 -1
- package/dist/bin/generateImportMap/generateImportMap.spec.js +175 -0
- package/dist/bin/generateImportMap/generateImportMap.spec.js.map +1 -0
- package/dist/bin/generateImportMap/index.d.ts +2 -10
- package/dist/bin/generateImportMap/index.d.ts.map +1 -1
- package/dist/bin/generateImportMap/index.js +20 -88
- package/dist/bin/generateImportMap/index.js.map +1 -1
- package/dist/bin/generateImportMap/iterateConfig.js.map +1 -1
- package/dist/bin/generateImportMap/utilities/addPayloadComponentToImportMap.d.ts +15 -0
- package/dist/bin/generateImportMap/utilities/addPayloadComponentToImportMap.d.ts.map +1 -0
- package/dist/bin/generateImportMap/utilities/addPayloadComponentToImportMap.js +56 -0
- package/dist/bin/generateImportMap/utilities/addPayloadComponentToImportMap.js.map +1 -0
- package/dist/bin/generateImportMap/{getFromImportMap.d.ts → utilities/getFromImportMap.d.ts} +2 -2
- package/dist/bin/generateImportMap/utilities/getFromImportMap.d.ts.map +1 -0
- package/dist/bin/generateImportMap/utilities/getFromImportMap.js.map +1 -0
- package/dist/bin/generateImportMap/utilities/getImportMapToBaseDirPath.d.ts +15 -0
- package/dist/bin/generateImportMap/utilities/getImportMapToBaseDirPath.d.ts.map +1 -0
- package/dist/bin/generateImportMap/utilities/getImportMapToBaseDirPath.js +22 -0
- package/dist/bin/generateImportMap/utilities/getImportMapToBaseDirPath.js.map +1 -0
- package/dist/bin/generateImportMap/{parsePayloadComponent.d.ts → utilities/parsePayloadComponent.d.ts} +1 -1
- package/dist/bin/generateImportMap/utilities/parsePayloadComponent.d.ts.map +1 -0
- package/dist/bin/generateImportMap/utilities/parsePayloadComponent.js.map +1 -0
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.d.ts +9 -0
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.d.ts.map +1 -0
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js +26 -0
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js.map +1 -0
- package/dist/collections/config/types.d.ts +4 -0
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +2 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/types.d.ts +14 -50
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/exports/shared.d.ts +2 -2
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +2 -2
- package/dist/exports/shared.js.map +1 -1
- package/dist/fields/config/client.js +1 -1
- package/dist/fields/config/client.js.map +1 -1
- package/dist/fields/config/types.d.ts +4 -0
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.js +1 -0
- package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
- package/dist/locked-documents/config.d.ts.map +1 -1
- package/dist/locked-documents/config.js +7 -0
- package/dist/locked-documents/config.js.map +1 -1
- package/dist/uploads/generateFileData.js +1 -1
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/imageResizer.d.ts.map +1 -1
- package/dist/uploads/imageResizer.js +1 -0
- package/dist/uploads/imageResizer.js.map +1 -1
- package/package.json +3 -3
- package/dist/bin/generateImportMap/getFromImportMap.d.ts.map +0 -1
- package/dist/bin/generateImportMap/getFromImportMap.js.map +0 -1
- package/dist/bin/generateImportMap/parsePayloadComponent.d.ts.map +0 -1
- package/dist/bin/generateImportMap/parsePayloadComponent.js.map +0 -1
- /package/dist/bin/generateImportMap/{getFromImportMap.js → utilities/getFromImportMap.js} +0 -0
- /package/dist/bin/generateImportMap/{parsePayloadComponent.js → utilities/parsePayloadComponent.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/generateImportMap/iterateConfig.ts"],"sourcesContent":["// @ts-strict-ignore\n\nimport type { AdminViewConfig } from '../../admin/views/index.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nimport { iterateCollections } from './iterateCollections.js'\nimport { genImportMapIterateFields } from './iterateFields.js'\nimport { iterateGlobals } from './iterateGlobals.js'\n\nexport function iterateConfig({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n}) {\n iterateCollections({\n addToImportMap,\n baseDir,\n collections: config.collections,\n config,\n importMap,\n imports,\n })\n\n iterateGlobals({\n addToImportMap,\n baseDir,\n config,\n globals: config.globals,\n importMap,\n imports,\n })\n\n if (config?.blocks) {\n const blocks = Object.values(config.blocks)\n if (blocks?.length) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: blocks,\n importMap,\n imports,\n })\n }\n }\n\n if (typeof config.admin?.avatar === 'object') {\n addToImportMap(config.admin?.avatar?.Component)\n }\n\n addToImportMap(config.admin?.components?.Nav)\n addToImportMap(config.admin?.components?.header)\n addToImportMap(config.admin?.components?.logout?.Button)\n addToImportMap(config.admin?.components?.graphics?.Icon)\n addToImportMap(config.admin?.components?.graphics?.Logo)\n\n addToImportMap(config.admin?.components?.actions)\n addToImportMap(config.admin?.components?.afterDashboard)\n addToImportMap(config.admin?.components?.afterLogin)\n addToImportMap(config.admin?.components?.afterNavLinks)\n addToImportMap(config.admin?.components?.beforeDashboard)\n addToImportMap(config.admin?.components?.beforeLogin)\n addToImportMap(config.admin?.components?.beforeNavLinks)\n\n addToImportMap(config.admin?.components?.providers)\n\n if (config.admin?.components?.views) {\n if (Object.keys(config.admin?.components?.views)?.length) {\n for (const key in config.admin?.components?.views) {\n const adminViewConfig
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/generateImportMap/iterateConfig.ts"],"sourcesContent":["// @ts-strict-ignore\n\nimport type { AdminViewConfig } from '../../admin/views/index.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nimport { iterateCollections } from './iterateCollections.js'\nimport { genImportMapIterateFields } from './iterateFields.js'\nimport { iterateGlobals } from './iterateGlobals.js'\n\nexport function iterateConfig({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n}) {\n iterateCollections({\n addToImportMap,\n baseDir,\n collections: config.collections,\n config,\n importMap,\n imports,\n })\n\n iterateGlobals({\n addToImportMap,\n baseDir,\n config,\n globals: config.globals,\n importMap,\n imports,\n })\n\n if (config?.blocks) {\n const blocks = Object.values(config.blocks)\n if (blocks?.length) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: blocks,\n importMap,\n imports,\n })\n }\n }\n\n if (typeof config.admin?.avatar === 'object') {\n addToImportMap(config.admin?.avatar?.Component)\n }\n\n addToImportMap(config.admin?.components?.Nav)\n addToImportMap(config.admin?.components?.header)\n addToImportMap(config.admin?.components?.logout?.Button)\n addToImportMap(config.admin?.components?.graphics?.Icon)\n addToImportMap(config.admin?.components?.graphics?.Logo)\n\n addToImportMap(config.admin?.components?.actions)\n addToImportMap(config.admin?.components?.afterDashboard)\n addToImportMap(config.admin?.components?.afterLogin)\n addToImportMap(config.admin?.components?.afterNavLinks)\n addToImportMap(config.admin?.components?.beforeDashboard)\n addToImportMap(config.admin?.components?.beforeLogin)\n addToImportMap(config.admin?.components?.beforeNavLinks)\n\n addToImportMap(config.admin?.components?.providers)\n\n if (config.admin?.components?.views) {\n if (Object.keys(config.admin?.components?.views)?.length) {\n for (const key in config.admin?.components?.views) {\n const adminViewConfig = config.admin?.components?.views[key]\n addToImportMap(adminViewConfig?.Component)\n }\n }\n }\n\n if (config?.admin?.importMap?.generators?.length) {\n for (const generator of config.admin.importMap.generators) {\n generator({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n }\n }\n\n if (config?.admin?.dependencies) {\n for (const key in config.admin.dependencies) {\n const dependency = config.admin.dependencies[key]\n addToImportMap(dependency.path)\n }\n }\n\n /*\n if (\n config?.editor &&\n typeof config.editor === 'object' &&\n config.editor.generateImportMap &&\n typeof config.editor.generateImportMap === 'function'\n ) {\n config.editor.generateImportMap({\n addToImportMap,\n baseDir,\n componentMap,\n config,\n importMap,\n })\n }*/ // No need to do that here since in the sanitized editor config, this root editor is already added to the field editor - and we already process that in iterateFields\n}\n"],"names":["iterateCollections","genImportMapIterateFields","iterateGlobals","iterateConfig","addToImportMap","baseDir","config","importMap","imports","collections","globals","blocks","Object","values","length","fields","admin","avatar","Component","components","Nav","header","logout","Button","graphics","Icon","Logo","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","providers","views","keys","key","adminViewConfig","generators","generator","dependencies","dependency","path"],"mappings":"AAAA,oBAAoB;AAMpB,SAASA,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,yBAAyB,QAAQ,qBAAoB;AAC9D,SAASC,cAAc,QAAQ,sBAAqB;AAEpD,OAAO,SAASC,cAAc,EAC5BC,cAAc,EACdC,OA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B,OAAO/B,OAAOU,KAAK,EAAEG,YAAYgB,MAAO;gBACjD,MAAMG,kBAAkBhC,OAAOU,KAAK,EAAEG,YAAYgB,KAAK,CAACE,IAAI;gBAC5DjC,eAAekC,iBAAiBpB;YAClC;QACF;IACF;IAEA,IAAIZ,QAAQU,OAAOT,WAAWgC,YAAYzB,QAAQ;QAChD,KAAK,MAAM0B,aAAalC,OAAOU,KAAK,CAACT,SAAS,CAACgC,UAAU,CAAE;YACzDC,UAAU;gBACRpC;gBACAC;gBACAC;gBACAC;gBACAC;YACF;QACF;IACF;IAEA,IAAIF,QAAQU,OAAOyB,cAAc;QAC/B,IAAK,MAAMJ,OAAO/B,OAAOU,KAAK,CAACyB,YAAY,CAAE;YAC3C,MAAMC,aAAapC,OAAOU,KAAK,CAACyB,YAAY,CAACJ,IAAI;YACjDjC,eAAesC,WAAWC,IAAI;QAChC;IACF;AAEA;;;;;;;;;;;;;;GAcC,GAAG,qKAAqK;AAC3K"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PayloadComponent } from '../../../config/types.js';
|
|
2
|
+
import type { Imports, InternalImportMap } from '../index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Adds a payload component to the import map.
|
|
5
|
+
*/
|
|
6
|
+
export declare function addPayloadComponentToImportMap({ importMap, importMapToBaseDirPath, imports, payloadComponent, }: {
|
|
7
|
+
importMap: InternalImportMap;
|
|
8
|
+
importMapToBaseDirPath: string;
|
|
9
|
+
imports: Imports;
|
|
10
|
+
payloadComponent: PayloadComponent;
|
|
11
|
+
}): {
|
|
12
|
+
path: string;
|
|
13
|
+
specifier: string;
|
|
14
|
+
} | null;
|
|
15
|
+
//# sourceMappingURL=addPayloadComponentToImportMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addPayloadComponentToImportMap.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/addPayloadComponentToImportMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AA2B7D;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EACT,sBAAsB,EACtB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,SAAS,EAAE,iBAAiB,CAAA;IAC5B,sBAAsB,EAAE,MAAM,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,gBAAgB,CAAA;CACnC,GAAG;IACF,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAuCP"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { parsePayloadComponent } from './parsePayloadComponent.js';
|
|
4
|
+
/**
|
|
5
|
+
* Normalizes the component path based on the import map's base directory path.
|
|
6
|
+
*/ function getAdjustedComponentPath(importMapToBaseDirPath, componentPath) {
|
|
7
|
+
// Normalize input paths to use forward slashes
|
|
8
|
+
const normalizedBasePath = importMapToBaseDirPath.replace(/\\/g, '/');
|
|
9
|
+
const normalizedComponentPath = componentPath.replace(/\\/g, '/');
|
|
10
|
+
// Base path starts with './' - preserve the './' prefix
|
|
11
|
+
// => import map is in a subdirectory of the base directory, or in the same directory as the base directory
|
|
12
|
+
if (normalizedBasePath.startsWith('./')) {
|
|
13
|
+
// Remove './' from component path if it exists
|
|
14
|
+
const cleanComponentPath = normalizedComponentPath.startsWith('./') ? normalizedComponentPath.substring(2) : normalizedComponentPath;
|
|
15
|
+
// Join the paths to preserve the './' prefix
|
|
16
|
+
return `${normalizedBasePath}${cleanComponentPath}`;
|
|
17
|
+
}
|
|
18
|
+
return path.posix.join(normalizedBasePath, normalizedComponentPath);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Adds a payload component to the import map.
|
|
22
|
+
*/ export function addPayloadComponentToImportMap({ importMap, importMapToBaseDirPath, imports, payloadComponent }) {
|
|
23
|
+
if (!payloadComponent) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const { exportName, path: componentPath } = parsePayloadComponent(payloadComponent);
|
|
27
|
+
if (importMap[componentPath + '#' + exportName]) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const importIdentifier = exportName + '_' + crypto.createHash('md5').update(componentPath).digest('hex');
|
|
31
|
+
importMap[componentPath + '#' + exportName] = importIdentifier;
|
|
32
|
+
const isRelativePath = componentPath.startsWith('.') || componentPath.startsWith('/');
|
|
33
|
+
if (isRelativePath) {
|
|
34
|
+
const adjustedComponentPath = getAdjustedComponentPath(importMapToBaseDirPath, componentPath);
|
|
35
|
+
imports[importIdentifier] = {
|
|
36
|
+
path: adjustedComponentPath,
|
|
37
|
+
specifier: exportName
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
path: adjustedComponentPath,
|
|
41
|
+
specifier: exportName
|
|
42
|
+
};
|
|
43
|
+
} else {
|
|
44
|
+
// Tsconfig alias or package import, e.g. '@payloadcms/ui' or '@/components/MyComponent'
|
|
45
|
+
imports[importIdentifier] = {
|
|
46
|
+
path: componentPath,
|
|
47
|
+
specifier: exportName
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
path: componentPath,
|
|
51
|
+
specifier: exportName
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=addPayloadComponentToImportMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/addPayloadComponentToImportMap.ts"],"sourcesContent":["import crypto from 'crypto'\nimport path from 'path'\n\nimport type { PayloadComponent } from '../../../config/types.js'\nimport type { Imports, InternalImportMap } from '../index.js'\n\nimport { parsePayloadComponent } from './parsePayloadComponent.js'\n\n/**\n * Normalizes the component path based on the import map's base directory path.\n */\nfunction getAdjustedComponentPath(importMapToBaseDirPath: string, componentPath: string): string {\n // Normalize input paths to use forward slashes\n const normalizedBasePath = importMapToBaseDirPath.replace(/\\\\/g, '/')\n const normalizedComponentPath = componentPath.replace(/\\\\/g, '/')\n\n // Base path starts with './' - preserve the './' prefix\n // => import map is in a subdirectory of the base directory, or in the same directory as the base directory\n if (normalizedBasePath.startsWith('./')) {\n // Remove './' from component path if it exists\n const cleanComponentPath = normalizedComponentPath.startsWith('./')\n ? normalizedComponentPath.substring(2)\n : normalizedComponentPath\n\n // Join the paths to preserve the './' prefix\n return `${normalizedBasePath}${cleanComponentPath}`\n }\n\n return path.posix.join(normalizedBasePath, normalizedComponentPath)\n}\n\n/**\n * Adds a payload component to the import map.\n */\nexport function addPayloadComponentToImportMap({\n importMap,\n importMapToBaseDirPath,\n imports,\n payloadComponent,\n}: {\n importMap: InternalImportMap\n importMapToBaseDirPath: string\n imports: Imports\n payloadComponent: PayloadComponent\n}): {\n path: string\n specifier: string\n} | null {\n if (!payloadComponent) {\n return null\n }\n const { exportName, path: componentPath } = parsePayloadComponent(payloadComponent)\n\n if (importMap[componentPath + '#' + exportName]) {\n return null\n }\n\n const importIdentifier =\n exportName + '_' + crypto.createHash('md5').update(componentPath).digest('hex')\n\n importMap[componentPath + '#' + exportName] = importIdentifier\n\n const isRelativePath = componentPath.startsWith('.') || componentPath.startsWith('/')\n\n if (isRelativePath) {\n const adjustedComponentPath = getAdjustedComponentPath(importMapToBaseDirPath, componentPath)\n\n imports[importIdentifier] = {\n path: adjustedComponentPath,\n specifier: exportName,\n }\n return {\n path: adjustedComponentPath,\n specifier: exportName,\n }\n } else {\n // Tsconfig alias or package import, e.g. '@payloadcms/ui' or '@/components/MyComponent'\n imports[importIdentifier] = {\n path: componentPath,\n specifier: exportName,\n }\n return {\n path: componentPath,\n specifier: exportName,\n }\n }\n}\n"],"names":["crypto","path","parsePayloadComponent","getAdjustedComponentPath","importMapToBaseDirPath","componentPath","normalizedBasePath","replace","normalizedComponentPath","startsWith","cleanComponentPath","substring","posix","join","addPayloadComponentToImportMap","importMap","imports","payloadComponent","exportName","importIdentifier","createHash","update","digest","isRelativePath","adjustedComponentPath","specifier"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAC3B,OAAOC,UAAU,OAAM;AAKvB,SAASC,qBAAqB,QAAQ,6BAA4B;AAElE;;CAEC,GACD,SAASC,yBAAyBC,sBAA8B,EAAEC,aAAqB;IACrF,+CAA+C;IAC/C,MAAMC,qBAAqBF,uBAAuBG,OAAO,CAAC,OAAO;IACjE,MAAMC,0BAA0BH,cAAcE,OAAO,CAAC,OAAO;IAE7D,wDAAwD;IACxD,2GAA2G;IAC3G,IAAID,mBAAmBG,UAAU,CAAC,OAAO;QACvC,+CAA+C;QAC/C,MAAMC,qBAAqBF,wBAAwBC,UAAU,CAAC,QAC1DD,wBAAwBG,SAAS,CAAC,KAClCH;QAEJ,6CAA6C;QAC7C,OAAO,GAAGF,qBAAqBI,oBAAoB;IACrD;IAEA,OAAOT,KAAKW,KAAK,CAACC,IAAI,CAACP,oBAAoBE;AAC7C;AAEA;;CAEC,GACD,OAAO,SAASM,+BAA+B,EAC7CC,SAAS,EACTX,sBAAsB,EACtBY,OAAO,EACPC,gBAAgB,EAMjB;IAIC,IAAI,CAACA,kBAAkB;QACrB,OAAO;IACT;IACA,MAAM,EAAEC,UAAU,EAAEjB,MAAMI,aAAa,EAAE,GAAGH,sBAAsBe;IAElE,IAAIF,SAAS,CAACV,gBAAgB,MAAMa,WAAW,EAAE;QAC/C,OAAO;IACT;IAEA,MAAMC,mBACJD,aAAa,MAAMlB,OAAOoB,UAAU,CAAC,OAAOC,MAAM,CAAChB,eAAeiB,MAAM,CAAC;IAE3EP,SAAS,CAACV,gBAAgB,MAAMa,WAAW,GAAGC;IAE9C,MAAMI,iBAAiBlB,cAAcI,UAAU,CAAC,QAAQJ,cAAcI,UAAU,CAAC;IAEjF,IAAIc,gBAAgB;QAClB,MAAMC,wBAAwBrB,yBAAyBC,wBAAwBC;QAE/EW,OAAO,CAACG,iBAAiB,GAAG;YAC1BlB,MAAMuB;YACNC,WAAWP;QACb;QACA,OAAO;YACLjB,MAAMuB;YACNC,WAAWP;QACb;IACF,OAAO;QACL,wFAAwF;QACxFF,OAAO,CAACG,iBAAiB,GAAG;YAC1BlB,MAAMI;YACNoB,WAAWP;QACb;QACA,OAAO;YACLjB,MAAMI;YACNoB,WAAWP;QACb;IACF;AACF"}
|
package/dist/bin/generateImportMap/{getFromImportMap.d.ts → utilities/getFromImportMap.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PayloadComponent } from '
|
|
2
|
-
import type { ImportMap } from '
|
|
1
|
+
import type { PayloadComponent } from '../../../config/types.js';
|
|
2
|
+
import type { ImportMap } from '../index.js';
|
|
3
3
|
export declare const getFromImportMap: <TOutput>(args: {
|
|
4
4
|
importMap: ImportMap;
|
|
5
5
|
PayloadComponent: PayloadComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFromImportMap.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/getFromImportMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,eAAO,MAAM,gBAAgB,GAAI,OAAO,QAAQ;IAC9C,SAAS,EAAE,SAAS,CAAA;IACpB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,OAuBH,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/getFromImportMap.ts"],"sourcesContent":["import type { PayloadComponent } from '../../../config/types.js'\nimport type { ImportMap } from '../index.js'\nimport { parsePayloadComponent } from './parsePayloadComponent.js'\n\nexport const getFromImportMap = <TOutput>(args: {\n importMap: ImportMap\n PayloadComponent: PayloadComponent\n schemaPath?: string\n silent?: boolean\n}): TOutput => {\n const { importMap, PayloadComponent, schemaPath, silent } = args\n\n const { exportName, path } = parsePayloadComponent(PayloadComponent)\n\n const key = path + '#' + exportName\n\n const importMapEntry = importMap[key]\n\n if (!importMapEntry && !silent) {\n // eslint-disable-next-line no-console\n console.error(\n `getFromImportMap: PayloadComponent not found in importMap`,\n {\n key,\n PayloadComponent,\n schemaPath,\n },\n 'You may need to run the `payload generate:importmap` command to generate the importMap ahead of runtime.',\n )\n }\n\n return importMapEntry\n}\n"],"names":["parsePayloadComponent","getFromImportMap","args","importMap","PayloadComponent","schemaPath","silent","exportName","path","key","importMapEntry","console","error"],"mappings":"AAEA,SAASA,qBAAqB,QAAQ,6BAA4B;AAElE,OAAO,MAAMC,mBAAmB,CAAUC;IAMxC,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,MAAM,EAAE,GAAGJ;IAE5D,MAAM,EAAEK,UAAU,EAAEC,IAAI,EAAE,GAAGR,sBAAsBI;IAEnD,MAAMK,MAAMD,OAAO,MAAMD;IAEzB,MAAMG,iBAAiBP,SAAS,CAACM,IAAI;IAErC,IAAI,CAACC,kBAAkB,CAACJ,QAAQ;QAC9B,sCAAsC;QACtCK,QAAQC,KAAK,CACX,CAAC,yDAAyD,CAAC,EAC3D;YACEH;YACAL;YACAC;QACF,GACA;IAEJ;IAEA,OAAOK;AACT,EAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the path that navigates from the import map file to the base directory.
|
|
3
|
+
* This can then be prepended to relative paths in the import map to get the full, absolute path.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getImportMapToBaseDirPath({ baseDir, importMapPath, }: {
|
|
6
|
+
/**
|
|
7
|
+
* Absolute path to the base directory
|
|
8
|
+
*/
|
|
9
|
+
baseDir: string;
|
|
10
|
+
/**
|
|
11
|
+
* Absolute path to the import map file
|
|
12
|
+
*/
|
|
13
|
+
importMapPath: string;
|
|
14
|
+
}): string;
|
|
15
|
+
//# sourceMappingURL=getImportMapToBaseDirPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getImportMapToBaseDirPath.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/getImportMapToBaseDirPath.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,OAAO,EACP,aAAa,GACd,EAAE;IACD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;CACtB,GAAG,MAAM,CAoBT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the path that navigates from the import map file to the base directory.
|
|
4
|
+
* This can then be prepended to relative paths in the import map to get the full, absolute path.
|
|
5
|
+
*/ export function getImportMapToBaseDirPath({ baseDir, importMapPath }) {
|
|
6
|
+
const importMapDir = path.dirname(importMapPath);
|
|
7
|
+
// 1. Direct relative path from `importMapDir` -> `baseDir`
|
|
8
|
+
let relativePath = path.relative(importMapDir, baseDir).replace(/\\/g, '/');
|
|
9
|
+
// 2. If they're the same directory, path.relative will be "", so use "./"
|
|
10
|
+
if (!relativePath) {
|
|
11
|
+
relativePath = './';
|
|
12
|
+
} else if (!relativePath.startsWith('.') && !relativePath.startsWith('/')) {
|
|
13
|
+
relativePath = `./${relativePath}`;
|
|
14
|
+
}
|
|
15
|
+
// 3. For consistency ensure a trailing slash
|
|
16
|
+
if (!relativePath.endsWith('/')) {
|
|
17
|
+
relativePath += '/';
|
|
18
|
+
}
|
|
19
|
+
return relativePath;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=getImportMapToBaseDirPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/getImportMapToBaseDirPath.ts"],"sourcesContent":["import path from 'path'\n\n/**\n * Returns the path that navigates from the import map file to the base directory.\n * This can then be prepended to relative paths in the import map to get the full, absolute path.\n */\nexport function getImportMapToBaseDirPath({\n baseDir,\n importMapPath,\n}: {\n /**\n * Absolute path to the base directory\n */\n baseDir: string\n /**\n * Absolute path to the import map file\n */\n importMapPath: string\n}): string {\n const importMapDir = path.dirname(importMapPath)\n\n // 1. Direct relative path from `importMapDir` -> `baseDir`\n let relativePath = path.relative(importMapDir, baseDir).replace(/\\\\/g, '/')\n\n // 2. If they're the same directory, path.relative will be \"\", so use \"./\"\n if (!relativePath) {\n relativePath = './'\n } // Add ./ prefix for subdirectories of the current directory\n else if (!relativePath.startsWith('.') && !relativePath.startsWith('/')) {\n relativePath = `./${relativePath}`\n }\n\n // 3. For consistency ensure a trailing slash\n if (!relativePath.endsWith('/')) {\n relativePath += '/'\n }\n\n return relativePath\n}\n"],"names":["path","getImportMapToBaseDirPath","baseDir","importMapPath","importMapDir","dirname","relativePath","relative","replace","startsWith","endsWith"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AAEvB;;;CAGC,GACD,OAAO,SAASC,0BAA0B,EACxCC,OAAO,EACPC,aAAa,EAUd;IACC,MAAMC,eAAeJ,KAAKK,OAAO,CAACF;IAElC,2DAA2D;IAC3D,IAAIG,eAAeN,KAAKO,QAAQ,CAACH,cAAcF,SAASM,OAAO,CAAC,OAAO;IAEvE,0EAA0E;IAC1E,IAAI,CAACF,cAAc;QACjBA,eAAe;IACjB,OACK,IAAI,CAACA,aAAaG,UAAU,CAAC,QAAQ,CAACH,aAAaG,UAAU,CAAC,MAAM;QACvEH,eAAe,CAAC,EAAE,EAAEA,cAAc;IACpC;IAEA,6CAA6C;IAC7C,IAAI,CAACA,aAAaI,QAAQ,CAAC,MAAM;QAC/BJ,gBAAgB;IAClB;IAEA,OAAOA;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePayloadComponent.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/parsePayloadComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG;IACzE,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAsBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/parsePayloadComponent.ts"],"sourcesContent":["// @ts-strict-ignore\nimport type { PayloadComponent } from '../../../config/types.js'\n\nexport function parsePayloadComponent(PayloadComponent: PayloadComponent): {\n exportName: string\n path: string\n} {\n if (!PayloadComponent) {\n return null\n }\n\n const pathAndMaybeExport =\n typeof PayloadComponent === 'string' ? PayloadComponent : PayloadComponent.path\n\n let path = ''\n let exportName = 'default'\n\n if (pathAndMaybeExport?.includes('#')) {\n ;[path, exportName] = pathAndMaybeExport.split('#')\n } else {\n path = pathAndMaybeExport\n }\n\n if (typeof PayloadComponent === 'object' && PayloadComponent.exportName) {\n exportName = PayloadComponent.exportName\n }\n\n return { exportName, path }\n}\n"],"names":["parsePayloadComponent","PayloadComponent","pathAndMaybeExport","path","exportName","includes","split"],"mappings":"AAAA,oBAAoB;AAGpB,OAAO,SAASA,sBAAsBC,gBAAkC;IAItE,IAAI,CAACA,kBAAkB;QACrB,OAAO;IACT;IAEA,MAAMC,qBACJ,OAAOD,qBAAqB,WAAWA,mBAAmBA,iBAAiBE,IAAI;IAEjF,IAAIA,OAAO;IACX,IAAIC,aAAa;IAEjB,IAAIF,oBAAoBG,SAAS,MAAM;;QACpC,CAACF,MAAMC,WAAW,GAAGF,mBAAmBI,KAAK,CAAC;IACjD,OAAO;QACLH,OAAOD;IACT;IAEA,IAAI,OAAOD,qBAAqB,YAAYA,iBAAiBG,UAAU,EAAE;QACvEA,aAAaH,iBAAiBG,UAAU;IAC1C;IAEA,OAAO;QAAEA;QAAYD;IAAK;AAC5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the path to the import map file. If the import map file is not found, it throws an error.
|
|
3
|
+
*/
|
|
4
|
+
export declare function resolveImportMapFilePath({ adminRoute, importMapFile, rootDir, }: {
|
|
5
|
+
adminRoute?: string;
|
|
6
|
+
importMapFile?: string;
|
|
7
|
+
rootDir: string;
|
|
8
|
+
}): string;
|
|
9
|
+
//# sourceMappingURL=resolveImportMapFilePath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveImportMapFilePath.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/resolveImportMapFilePath.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,UAAqB,EACrB,aAAa,EACb,OAAO,GACR,EAAE;IACD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;CAChB,UAuBA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the path to the import map file. If the import map file is not found, it throws an error.
|
|
5
|
+
*/ export function resolveImportMapFilePath({ adminRoute = '/admin', importMapFile, rootDir }) {
|
|
6
|
+
let importMapFilePath = undefined;
|
|
7
|
+
if (importMapFile?.length) {
|
|
8
|
+
if (!fs.existsSync(importMapFile)) {
|
|
9
|
+
throw new Error(`Could not find the import map file at ${importMapFile}`);
|
|
10
|
+
}
|
|
11
|
+
importMapFilePath = importMapFile;
|
|
12
|
+
} else {
|
|
13
|
+
const appLocation = path.resolve(rootDir, `app/(payload)${adminRoute}/`);
|
|
14
|
+
const srcAppLocation = path.resolve(rootDir, `src/app/(payload)${adminRoute}/`);
|
|
15
|
+
if (fs.existsSync(appLocation)) {
|
|
16
|
+
importMapFilePath = path.resolve(appLocation, 'importMap.js');
|
|
17
|
+
} else if (fs.existsSync(srcAppLocation)) {
|
|
18
|
+
importMapFilePath = path.resolve(srcAppLocation, 'importMap.js');
|
|
19
|
+
} else {
|
|
20
|
+
throw new Error(`Could not find Payload import map folder. Looked in ${appLocation} and ${srcAppLocation}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return importMapFilePath;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=resolveImportMapFilePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/resolveImportMapFilePath.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\n\n/**\n * Returns the path to the import map file. If the import map file is not found, it throws an error.\n */\nexport function resolveImportMapFilePath({\n adminRoute = '/admin',\n importMapFile,\n rootDir,\n}: {\n adminRoute?: string\n importMapFile?: string\n rootDir: string\n}) {\n let importMapFilePath: string | undefined = undefined\n\n if (importMapFile?.length) {\n if (!fs.existsSync(importMapFile)) {\n throw new Error(`Could not find the import map file at ${importMapFile}`)\n }\n importMapFilePath = importMapFile\n } else {\n const appLocation = path.resolve(rootDir, `app/(payload)${adminRoute}/`)\n const srcAppLocation = path.resolve(rootDir, `src/app/(payload)${adminRoute}/`)\n\n if (fs.existsSync(appLocation)) {\n importMapFilePath = path.resolve(appLocation, 'importMap.js')\n } else if (fs.existsSync(srcAppLocation)) {\n importMapFilePath = path.resolve(srcAppLocation, 'importMap.js')\n } else {\n throw new Error(\n `Could not find Payload import map folder. Looked in ${appLocation} and ${srcAppLocation}`,\n )\n }\n }\n return importMapFilePath\n}\n"],"names":["fs","path","resolveImportMapFilePath","adminRoute","importMapFile","rootDir","importMapFilePath","undefined","length","existsSync","Error","appLocation","resolve","srcAppLocation"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAEvB;;CAEC,GACD,OAAO,SAASC,yBAAyB,EACvCC,aAAa,QAAQ,EACrBC,aAAa,EACbC,OAAO,EAKR;IACC,IAAIC,oBAAwCC;IAE5C,IAAIH,eAAeI,QAAQ;QACzB,IAAI,CAACR,GAAGS,UAAU,CAACL,gBAAgB;YACjC,MAAM,IAAIM,MAAM,CAAC,sCAAsC,EAAEN,eAAe;QAC1E;QACAE,oBAAoBF;IACtB,OAAO;QACL,MAAMO,cAAcV,KAAKW,OAAO,CAACP,SAAS,CAAC,aAAa,EAAEF,WAAW,CAAC,CAAC;QACvE,MAAMU,iBAAiBZ,KAAKW,OAAO,CAACP,SAAS,CAAC,iBAAiB,EAAEF,WAAW,CAAC,CAAC;QAE9E,IAAIH,GAAGS,UAAU,CAACE,cAAc;YAC9BL,oBAAoBL,KAAKW,OAAO,CAACD,aAAa;QAChD,OAAO,IAAIX,GAAGS,UAAU,CAACI,iBAAiB;YACxCP,oBAAoBL,KAAKW,OAAO,CAACC,gBAAgB;QACnD,OAAO;YACL,MAAM,IAAIH,MACR,CAAC,oDAAoD,EAAEC,YAAY,KAAK,EAAEE,gBAAgB;QAE9F;IACF;IACA,OAAOP;AACT"}
|
|
@@ -461,6 +461,10 @@ export type SanitizedJoin = {
|
|
|
461
461
|
export type SanitizedJoins = {
|
|
462
462
|
[collectionSlug: string]: SanitizedJoin[];
|
|
463
463
|
};
|
|
464
|
+
/**
|
|
465
|
+
* @todo remove the `DeepRequired` in v4.
|
|
466
|
+
* We don't actually guarantee that all properties are set when sanitizing configs.
|
|
467
|
+
*/
|
|
464
468
|
export interface SanitizedCollectionConfig extends Omit<DeepRequired<CollectionConfig>, 'auth' | 'endpoints' | 'fields' | 'slug' | 'upload' | 'versions'> {
|
|
465
469
|
auth: Auth;
|
|
466
470
|
endpoints: Endpoint[] | false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","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;IACrD,MAAM,EAAE;QACN,EAAE,EAAE,sBAAsB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;QACvC,OAAO,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE;QACN,KAAK,EAAE,cAAc,CAAA;QACrB,aAAa,EAAE,MAAM,CAAA;QACrB,IAAI,EAAE,MAAM,CAAA;QACZ,gBAAgB,EAAE,OAAO,CAAA;KAC1B,EAAE,CAAA;IACH,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials'\n\nimport type { CustomUpload } from '../../admin/types.js'\nimport type { Arguments as MeArguments } from '../../auth/operations/me.js'\nimport type {\n Arguments as RefreshArguments,\n Result as RefreshResult,\n} from '../../auth/operations/refresh.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n AfterErrorHookArgs,\n AfterErrorResult,\n CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type {\n Field,\n FlattenedField,\n JoinField,\n RelationshipField,\n UploadField,\n} from '../../fields/config/types.js'\nimport type {\n CollectionSlug,\n JsonObject,\n RequestContext,\n TypedAuthOperations,\n TypedCollection,\n TypedCollectionSelect,\n TypedLocale,\n} from '../../index.js'\nimport type {\n PayloadRequest,\n SelectType,\n Sort,\n TransformCollectionWithSelect,\n Where,\n} from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js'\n\nexport type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug]\n\nexport type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug]\n\nexport type AuthOperationsFromCollectionSlug<TSlug extends CollectionSlug> =\n TypedAuthOperations[TSlug]\n\nexport type RequiredDataFromCollection<TData extends JsonObject> = MarkOptional<\n TData,\n 'createdAt' | 'id' | 'sizes' | 'updatedAt'\n>\n\nexport type RequiredDataFromCollectionSlug<TSlug extends CollectionSlug> =\n RequiredDataFromCollection<DataFromCollectionSlug<TSlug>>\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'countVersions'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'refresh'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n /**\n * Hook operation being performed\n */\n operation: HookOperationType\n req: PayloadRequest\n}) => any\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: AfterOperationArg<TOperationGeneric>,\n) =>\n | Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n | Promise<\n Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n >\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type RefreshHook<T extends TypeWithID = any> = (args: {\n args: RefreshArguments\n user: T\n}) => Promise<RefreshResult | void> | (RefreshResult | void)\n\nexport type MeHook<T extends TypeWithID = any> = (args: {\n args: MeArguments\n user: T\n}) => ({ exp: number; user: T } | void) | Promise<{ exp: number; user: T } | void>\n\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterErrorHook = (\n args: { collection: SanitizedCollectionConfig } & AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type BaseListFilter = (args: {\n limit: number\n locale?: TypedLocale\n page: number\n req: PayloadRequest\n sort: string\n}) => null | Promise<null | Where> | Where\n\nexport type CollectionAdminOptions = {\n baseListFilter?: BaseListFilter\n /**\n * Custom admin components\n */\n components?: {\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomComponent\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Set to a React component to replace the entire Edit View, including all nested routes.\n * Set to an object to replace or modify individual nested routes, or to add new ones.\n */\n edit?: EditConfig\n list?: {\n actions?: CustomComponent[]\n Component?: PayloadComponent\n }\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection. This will also be used as JSDoc for the generated types\n */\n description?: EntityDescription\n /**\n * Disable the Copy To Locale button in the edit document view\n * @default false\n */\n disableCopyToLocale?: boolean\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Specify a navigational group for collections in the admin sidebar.\n * - Provide a string to place the entity in a custom group.\n * - Provide a record to define localized group names.\n * - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.\n */\n group?: false | Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Hide the API URL within the Edit view\n */\n hideAPIURL?: boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live preview options\n */\n livePreview?: LivePreviewConfig\n meta?: MetaConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit View and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig<TSlug extends CollectionSlug = any> = {\n /**\n * Do not set this property manually. This is set to true during sanitization, to avoid\n * sanitizing the same collection multiple times.\n */\n _sanitized?: boolean\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => boolean | Promise<boolean>\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: boolean | IncomingAuthType\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n defaultPopulate?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectType\n : SelectFromCollectionSlug<TSlug>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: Sort\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: false | Omit<Endpoint, 'root'>[]\n fields: Field[]\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n disableMutations?: true\n disableQueries?: true\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook[]\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook<TSlug>[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n /**\n /**\n * Use the `me` hook to control the `me` operation.\n * Here, you can optionally instruct the me operation to return early,\n * and skip its default logic.\n */\n me?: MeHook[]\n /**\n * Use the `refresh` hook to control the refresh operation.\n * Here, you can optionally instruct the refresh operation to return early,\n * and skip its default logic.\n */\n refresh?: RefreshHook[]\n }\n /**\n * Define compound indexes for this collection.\n * This can be used to either speed up querying/sorting by 2 or more fields at the same time or\n * to ensure uniqueness between several fields.\n * Specify field paths\n * @example\n * [{ unique: true, fields: ['title', 'group.name'] }]\n * @default []\n */\n indexes?: CompoundIndex[]\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\n /**\n * Enables / Disables the ability to lock documents while editing\n * @default true\n */\n lockDocuments?:\n | {\n duration: number\n }\n | false\n slug: string\n /**\n * Add `createdAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: boolean | UploadConfig\n /**\n * Enable versioning. Set it to true to enable default versions settings,\n * or customize versions options by setting the property equal to an object\n * containing the version options.\n *\n * @default false // disable versioning\n */\n versions?: boolean | IncomingCollectionVersions\n}\n\nexport type SanitizedJoin = {\n /**\n * The field configuration defining the join\n */\n field: JoinField\n getForeignPath?(args: { locale?: TypedLocale }): string\n /**\n * The path of the join field in dot notation\n */\n joinPath: string\n /**\n * `parentIsLocalized` is true if any parent field of the\n * field configuration defining the join is localized\n */\n parentIsLocalized: boolean\n targetField: RelationshipField | UploadField\n}\n\nexport type SanitizedJoins = {\n [collectionSlug: string]: SanitizedJoin[]\n}\n\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'slug' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n /**\n * Fields in the database schema structure\n * Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded\n */\n flattenedFields: FlattenedField[]\n\n /**\n * Object of collections to join 'Join Fields object keyed by collection\n */\n joins: SanitizedJoins\n\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n countType: GraphQLObjectType\n JWT: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends CollectionSlug, TSelect extends SelectType> = {\n docs: TransformCollectionWithSelect<TSlug, TSelect>[]\n errors: {\n id: DataFromCollectionSlug<TSlug>['id']\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type TypeWithID = {\n docId?: any\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n\nexport type CompoundIndex = {\n fields: string[]\n unique?: boolean\n}\n\nexport type SanitizedCompoundIndex = {\n fields: {\n field: FlattenedField\n localizedPath: string\n path: string\n pathHasLocalized: boolean\n }[]\n unique: boolean\n}\n"],"names":[],"mappings":"AAknBA,WAQC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials'\n\nimport type { CustomUpload } from '../../admin/types.js'\nimport type { Arguments as MeArguments } from '../../auth/operations/me.js'\nimport type {\n Arguments as RefreshArguments,\n Result as RefreshResult,\n} from '../../auth/operations/refresh.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n AfterErrorHookArgs,\n AfterErrorResult,\n CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type {\n Field,\n FlattenedField,\n JoinField,\n RelationshipField,\n UploadField,\n} from '../../fields/config/types.js'\nimport type {\n CollectionSlug,\n JsonObject,\n RequestContext,\n TypedAuthOperations,\n TypedCollection,\n TypedCollectionSelect,\n TypedLocale,\n} from '../../index.js'\nimport type {\n PayloadRequest,\n SelectType,\n Sort,\n TransformCollectionWithSelect,\n Where,\n} from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js'\n\nexport type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug]\n\nexport type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug]\n\nexport type AuthOperationsFromCollectionSlug<TSlug extends CollectionSlug> =\n TypedAuthOperations[TSlug]\n\nexport type RequiredDataFromCollection<TData extends JsonObject> = MarkOptional<\n TData,\n 'createdAt' | 'id' | 'sizes' | 'updatedAt'\n>\n\nexport type RequiredDataFromCollectionSlug<TSlug extends CollectionSlug> =\n RequiredDataFromCollection<DataFromCollectionSlug<TSlug>>\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'countVersions'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'refresh'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n /**\n * Hook operation being performed\n */\n operation: HookOperationType\n req: PayloadRequest\n}) => any\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: AfterOperationArg<TOperationGeneric>,\n) =>\n | Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n | Promise<\n Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n >\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type RefreshHook<T extends TypeWithID = any> = (args: {\n args: RefreshArguments\n user: T\n}) => Promise<RefreshResult | void> | (RefreshResult | void)\n\nexport type MeHook<T extends TypeWithID = any> = (args: {\n args: MeArguments\n user: T\n}) => ({ exp: number; user: T } | void) | Promise<{ exp: number; user: T } | void>\n\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterErrorHook = (\n args: { collection: SanitizedCollectionConfig } & AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type BaseListFilter = (args: {\n limit: number\n locale?: TypedLocale\n page: number\n req: PayloadRequest\n sort: string\n}) => null | Promise<null | Where> | Where\n\nexport type CollectionAdminOptions = {\n baseListFilter?: BaseListFilter\n /**\n * Custom admin components\n */\n components?: {\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomComponent\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Set to a React component to replace the entire Edit View, including all nested routes.\n * Set to an object to replace or modify individual nested routes, or to add new ones.\n */\n edit?: EditConfig\n list?: {\n actions?: CustomComponent[]\n Component?: PayloadComponent\n }\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection. This will also be used as JSDoc for the generated types\n */\n description?: EntityDescription\n /**\n * Disable the Copy To Locale button in the edit document view\n * @default false\n */\n disableCopyToLocale?: boolean\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Specify a navigational group for collections in the admin sidebar.\n * - Provide a string to place the entity in a custom group.\n * - Provide a record to define localized group names.\n * - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.\n */\n group?: false | Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Hide the API URL within the Edit view\n */\n hideAPIURL?: boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live preview options\n */\n livePreview?: LivePreviewConfig\n meta?: MetaConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit View and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig<TSlug extends CollectionSlug = any> = {\n /**\n * Do not set this property manually. This is set to true during sanitization, to avoid\n * sanitizing the same collection multiple times.\n */\n _sanitized?: boolean\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => boolean | Promise<boolean>\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: boolean | IncomingAuthType\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n defaultPopulate?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectType\n : SelectFromCollectionSlug<TSlug>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: Sort\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: false | Omit<Endpoint, 'root'>[]\n fields: Field[]\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n disableMutations?: true\n disableQueries?: true\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook[]\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook<TSlug>[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n /**\n /**\n * Use the `me` hook to control the `me` operation.\n * Here, you can optionally instruct the me operation to return early,\n * and skip its default logic.\n */\n me?: MeHook[]\n /**\n * Use the `refresh` hook to control the refresh operation.\n * Here, you can optionally instruct the refresh operation to return early,\n * and skip its default logic.\n */\n refresh?: RefreshHook[]\n }\n /**\n * Define compound indexes for this collection.\n * This can be used to either speed up querying/sorting by 2 or more fields at the same time or\n * to ensure uniqueness between several fields.\n * Specify field paths\n * @example\n * [{ unique: true, fields: ['title', 'group.name'] }]\n * @default []\n */\n indexes?: CompoundIndex[]\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\n /**\n * Enables / Disables the ability to lock documents while editing\n * @default true\n */\n lockDocuments?:\n | {\n duration: number\n }\n | false\n slug: string\n /**\n * Add `createdAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: boolean | UploadConfig\n /**\n * Enable versioning. Set it to true to enable default versions settings,\n * or customize versions options by setting the property equal to an object\n * containing the version options.\n *\n * @default false // disable versioning\n */\n versions?: boolean | IncomingCollectionVersions\n}\n\nexport type SanitizedJoin = {\n /**\n * The field configuration defining the join\n */\n field: JoinField\n getForeignPath?(args: { locale?: TypedLocale }): string\n /**\n * The path of the join field in dot notation\n */\n joinPath: string\n /**\n * `parentIsLocalized` is true if any parent field of the\n * field configuration defining the join is localized\n */\n parentIsLocalized: boolean\n targetField: RelationshipField | UploadField\n}\n\nexport type SanitizedJoins = {\n [collectionSlug: string]: SanitizedJoin[]\n}\n\n/**\n * @todo remove the `DeepRequired` in v4.\n * We don't actually guarantee that all properties are set when sanitizing configs.\n */\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'slug' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n /**\n * Fields in the database schema structure\n * Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded\n */\n flattenedFields: FlattenedField[]\n /**\n * Object of collections to join 'Join Fields object keyed by collection\n */\n joins: SanitizedJoins\n\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n countType: GraphQLObjectType\n JWT: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends CollectionSlug, TSelect extends SelectType> = {\n docs: TransformCollectionWithSelect<TSlug, TSelect>[]\n errors: {\n id: DataFromCollectionSlug<TSlug>['id']\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type TypeWithID = {\n docId?: any\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n\nexport type CompoundIndex = {\n fields: string[]\n unique?: boolean\n}\n\nexport type SanitizedCompoundIndex = {\n fields: {\n field: FlattenedField\n localizedPath: string\n path: string\n pathHasLocalized: boolean\n }[]\n unique: boolean\n}\n"],"names":[],"mappings":"AAqnBA,WAQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,GAAG,QAAQ,CAqE7D,CAAA;AAED,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,MAmFpD,CAAA"}
|
package/dist/config/defaults.js
CHANGED
|
@@ -13,6 +13,7 @@ import defaultAccess from '../auth/defaultAccess.js';
|
|
|
13
13
|
},
|
|
14
14
|
meta: {
|
|
15
15
|
defaultOGImageType: 'dynamic',
|
|
16
|
+
robots: 'noindex, nofollow',
|
|
16
17
|
titleSuffix: '- Payload'
|
|
17
18
|
},
|
|
18
19
|
routes: {
|
|
@@ -89,6 +90,7 @@ export const addDefaultsToConfig = (config)=>{
|
|
|
89
90
|
},
|
|
90
91
|
meta: {
|
|
91
92
|
defaultOGImageType: 'dynamic',
|
|
93
|
+
robots: 'noindex, nofollow',
|
|
92
94
|
titleSuffix: '- Payload',
|
|
93
95
|
...config?.admin?.meta || {}
|
|
94
96
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/defaults.ts"],"sourcesContent":["import type { JobsConfig } from '../queues/config/types/index.js'\nimport type { Config } from './types.js'\n\nimport defaultAccess from '../auth/defaultAccess.js'\n\n/**\n * @deprecated - remove in 4.0. This is error-prone, as mutating this object will affect any objects that use the defaults as a base.\n */\nexport const defaults: Omit<Config, 'db' | 'editor' | 'secret'> = {\n admin: {\n avatar: 'gravatar',\n components: {},\n custom: {},\n dateFormat: 'MMMM do yyyy, h:mm a',\n dependencies: {},\n importMap: {\n baseDir: `${typeof process?.cwd === 'function' ? process.cwd() : ''}`,\n },\n meta: {\n defaultOGImageType: 'dynamic',\n titleSuffix: '- Payload',\n },\n routes: {\n account: '/account',\n createFirstUser: '/create-first-user',\n forgot: '/forgot',\n inactivity: '/logout-inactivity',\n login: '/login',\n logout: '/logout',\n reset: '/reset',\n unauthorized: '/unauthorized',\n },\n theme: 'all',\n },\n auth: {\n jwtOrder: ['JWT', 'Bearer', 'cookie'],\n },\n bin: [],\n collections: [],\n cookiePrefix: 'payload',\n cors: [],\n csrf: [],\n custom: {},\n defaultDepth: 2,\n defaultMaxTextLength: 40000,\n endpoints: [],\n globals: [],\n graphQL: {\n disablePlaygroundInProduction: true,\n maxComplexity: 1000,\n schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`,\n },\n hooks: {},\n i18n: {},\n jobs: {\n access: {\n run: defaultAccess,\n },\n deleteJobOnComplete: true,\n depth: 0,\n } as JobsConfig,\n localization: false,\n maxDepth: 10,\n routes: {\n admin: '/admin',\n api: '/api',\n graphQL: '/graphql',\n graphQLPlayground: '/graphql-playground',\n },\n serverURL: '',\n telemetry: true,\n typescript: {\n autoGenerate: true,\n outputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/payload-types.ts`,\n },\n upload: {},\n}\n\nexport const addDefaultsToConfig = (config: Config): Config => {\n config.admin = {\n avatar: 'gravatar',\n components: {},\n custom: {},\n dateFormat: 'MMMM do yyyy, h:mm a',\n dependencies: {},\n theme: 'all',\n ...(config.admin || {}),\n importMap: {\n baseDir: `${typeof process?.cwd === 'function' ? process.cwd() : ''}`,\n ...(config?.admin?.importMap || {}),\n },\n meta: {\n defaultOGImageType: 'dynamic',\n titleSuffix: '- Payload',\n ...(config?.admin?.meta || {}),\n },\n routes: {\n account: '/account',\n createFirstUser: '/create-first-user',\n forgot: '/forgot',\n inactivity: '/logout-inactivity',\n login: '/login',\n logout: '/logout',\n reset: '/reset',\n unauthorized: '/unauthorized',\n ...(config?.admin?.routes || {}),\n },\n }\n\n config.bin = config.bin ?? []\n config.collections = config.collections ?? []\n config.cookiePrefix = config.cookiePrefix ?? 'payload'\n config.cors = config.cors ?? []\n config.csrf = config.csrf ?? []\n config.custom = config.custom ?? {}\n config.defaultDepth = config.defaultDepth ?? 2\n config.defaultMaxTextLength = config.defaultMaxTextLength ?? 40000\n config.endpoints = config.endpoints ?? []\n config.globals = config.globals ?? []\n config.graphQL = {\n disablePlaygroundInProduction: true,\n maxComplexity: 1000,\n schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`,\n ...(config.graphQL || {}),\n }\n config.hooks = config.hooks ?? {}\n config.i18n = config.i18n ?? {}\n config.jobs = {\n deleteJobOnComplete: true,\n depth: 0,\n ...(config.jobs || {}),\n access: {\n run: defaultAccess,\n ...(config.jobs?.access || {}),\n },\n } as JobsConfig\n config.localization = config.localization ?? false\n config.maxDepth = config.maxDepth ?? 10\n config.routes = {\n admin: '/admin',\n api: (process.env.NEXT_BASE_PATH ?? '') + '/api',\n graphQL: '/graphql',\n graphQLPlayground: '/graphql-playground',\n ...(config.routes || {}),\n }\n config.serverURL = config.serverURL ?? ''\n config.telemetry = config.telemetry ?? true\n config.typescript = {\n autoGenerate: true,\n outputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/payload-types.ts`,\n ...(config.typescript || {}),\n }\n config.upload = config.upload ?? {}\n\n config.auth = {\n jwtOrder: ['JWT', 'Bearer', 'cookie'],\n ...(config.auth || {}),\n }\n\n return config\n}\n"],"names":["defaultAccess","defaults","admin","avatar","components","custom","dateFormat","dependencies","importMap","baseDir","process","cwd","meta","defaultOGImageType","titleSuffix","routes","account","createFirstUser","forgot","inactivity","login","logout","reset","unauthorized","theme","auth","jwtOrder","bin","collections","cookiePrefix","cors","csrf","defaultDepth","defaultMaxTextLength","endpoints","globals","graphQL","disablePlaygroundInProduction","maxComplexity","schemaOutputFile","hooks","i18n","jobs","access","run","deleteJobOnComplete","depth","localization","maxDepth","api","graphQLPlayground","serverURL","telemetry","typescript","autoGenerate","outputFile","upload","addDefaultsToConfig","config","env","NEXT_BASE_PATH"],"mappings":"AAGA,OAAOA,mBAAmB,2BAA0B;AAEpD;;CAEC,GACD,OAAO,MAAMC,WAAqD;IAChEC,OAAO;QACLC,QAAQ;QACRC,YAAY,CAAC;QACbC,QAAQ,CAAC;QACTC,YAAY;QACZC,cAAc,CAAC;QACfC,WAAW;YACTC,SAAS,GAAG,OAAOC,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,IAAI;QACvE;QACAC,MAAM;YACJC,oBAAoB;YACpBC,aAAa;QACf;QACAC,QAAQ;YACNC,SAAS;YACTC,iBAAiB;YACjBC,QAAQ;YACRC,YAAY;YACZC,OAAO;YACPC,QAAQ;YACRC,OAAO;YACPC,cAAc;QAChB;QACAC,OAAO;IACT;IACAC,MAAM;QACJC,UAAU;YAAC;YAAO;YAAU;SAAS;IACvC;IACAC,KAAK,EAAE;IACPC,aAAa,EAAE;IACfC,cAAc;IACdC,MAAM,EAAE;IACRC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../src/config/defaults.ts"],"sourcesContent":["import type { JobsConfig } from '../queues/config/types/index.js'\nimport type { Config } from './types.js'\n\nimport defaultAccess from '../auth/defaultAccess.js'\n\n/**\n * @deprecated - remove in 4.0. This is error-prone, as mutating this object will affect any objects that use the defaults as a base.\n */\nexport const defaults: Omit<Config, 'db' | 'editor' | 'secret'> = {\n admin: {\n avatar: 'gravatar',\n components: {},\n custom: {},\n dateFormat: 'MMMM do yyyy, h:mm a',\n dependencies: {},\n importMap: {\n baseDir: `${typeof process?.cwd === 'function' ? process.cwd() : ''}`,\n },\n meta: {\n defaultOGImageType: 'dynamic',\n robots: 'noindex, nofollow',\n titleSuffix: '- Payload',\n },\n routes: {\n account: '/account',\n createFirstUser: '/create-first-user',\n forgot: '/forgot',\n inactivity: '/logout-inactivity',\n login: '/login',\n logout: '/logout',\n reset: '/reset',\n unauthorized: '/unauthorized',\n },\n theme: 'all',\n },\n auth: {\n jwtOrder: ['JWT', 'Bearer', 'cookie'],\n },\n bin: [],\n collections: [],\n cookiePrefix: 'payload',\n cors: [],\n csrf: [],\n custom: {},\n defaultDepth: 2,\n defaultMaxTextLength: 40000,\n endpoints: [],\n globals: [],\n graphQL: {\n disablePlaygroundInProduction: true,\n maxComplexity: 1000,\n schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`,\n },\n hooks: {},\n i18n: {},\n jobs: {\n access: {\n run: defaultAccess,\n },\n deleteJobOnComplete: true,\n depth: 0,\n } as JobsConfig,\n localization: false,\n maxDepth: 10,\n routes: {\n admin: '/admin',\n api: '/api',\n graphQL: '/graphql',\n graphQLPlayground: '/graphql-playground',\n },\n serverURL: '',\n telemetry: true,\n typescript: {\n autoGenerate: true,\n outputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/payload-types.ts`,\n },\n upload: {},\n}\n\nexport const addDefaultsToConfig = (config: Config): Config => {\n config.admin = {\n avatar: 'gravatar',\n components: {},\n custom: {},\n dateFormat: 'MMMM do yyyy, h:mm a',\n dependencies: {},\n theme: 'all',\n ...(config.admin || {}),\n importMap: {\n baseDir: `${typeof process?.cwd === 'function' ? process.cwd() : ''}`,\n ...(config?.admin?.importMap || {}),\n },\n meta: {\n defaultOGImageType: 'dynamic',\n robots: 'noindex, nofollow',\n titleSuffix: '- Payload',\n ...(config?.admin?.meta || {}),\n },\n routes: {\n account: '/account',\n createFirstUser: '/create-first-user',\n forgot: '/forgot',\n inactivity: '/logout-inactivity',\n login: '/login',\n logout: '/logout',\n reset: '/reset',\n unauthorized: '/unauthorized',\n ...(config?.admin?.routes || {}),\n },\n }\n\n config.bin = config.bin ?? []\n config.collections = config.collections ?? []\n config.cookiePrefix = config.cookiePrefix ?? 'payload'\n config.cors = config.cors ?? []\n config.csrf = config.csrf ?? []\n config.custom = config.custom ?? {}\n config.defaultDepth = config.defaultDepth ?? 2\n config.defaultMaxTextLength = config.defaultMaxTextLength ?? 40000\n config.endpoints = config.endpoints ?? []\n config.globals = config.globals ?? []\n config.graphQL = {\n disablePlaygroundInProduction: true,\n maxComplexity: 1000,\n schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`,\n ...(config.graphQL || {}),\n }\n config.hooks = config.hooks ?? {}\n config.i18n = config.i18n ?? {}\n config.jobs = {\n deleteJobOnComplete: true,\n depth: 0,\n ...(config.jobs || {}),\n access: {\n run: defaultAccess,\n ...(config.jobs?.access || {}),\n },\n } as JobsConfig\n config.localization = config.localization ?? false\n config.maxDepth = config.maxDepth ?? 10\n config.routes = {\n admin: '/admin',\n api: (process.env.NEXT_BASE_PATH ?? '') + '/api',\n graphQL: '/graphql',\n graphQLPlayground: '/graphql-playground',\n ...(config.routes || {}),\n }\n config.serverURL = config.serverURL ?? ''\n config.telemetry = config.telemetry ?? true\n config.typescript = {\n autoGenerate: true,\n outputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/payload-types.ts`,\n ...(config.typescript || {}),\n }\n config.upload = config.upload ?? {}\n\n config.auth = {\n jwtOrder: ['JWT', 'Bearer', 'cookie'],\n ...(config.auth || {}),\n }\n\n return config\n}\n"],"names":["defaultAccess","defaults","admin","avatar","components","custom","dateFormat","dependencies","importMap","baseDir","process","cwd","meta","defaultOGImageType","robots","titleSuffix","routes","account","createFirstUser","forgot","inactivity","login","logout","reset","unauthorized","theme","auth","jwtOrder","bin","collections","cookiePrefix","cors","csrf","defaultDepth","defaultMaxTextLength","endpoints","globals","graphQL","disablePlaygroundInProduction","maxComplexity","schemaOutputFile","hooks","i18n","jobs","access","run","deleteJobOnComplete","depth","localization","maxDepth","api","graphQLPlayground","serverURL","telemetry","typescript","autoGenerate","outputFile","upload","addDefaultsToConfig","config","env","NEXT_BASE_PATH"],"mappings":"AAGA,OAAOA,mBAAmB,2BAA0B;AAEpD;;CAEC,GACD,OAAO,MAAMC,WAAqD;IAChEC,OAAO;QACLC,QAAQ;QACRC,YAAY,CAAC;QACbC,QAAQ,CAAC;QACTC,YAAY;QACZC,cAAc,CAAC;QACfC,WAAW;YACTC,SAAS,GAAG,OAAOC,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,IAAI;QACvE;QACAC,MAAM;YACJC,oBAAoB;YACpBC,QAAQ;YACRC,aAAa;QACf;QACAC,QAAQ;YACNC,SAAS;YACTC,iBAAiB;YACjBC,QAAQ;YACRC,YAAY;YACZC,OAAO;YACPC,QAAQ;YACRC,OAAO;YACPC,cAAc;QAChB;QACAC,OAAO;IACT;IACAC,MAAM;QACJC,UAAU;YAAC;YAAO;YAAU;SAAS;IACvC;IACAC,KAAK,EAAE;IACPC,aAAa,EAAE;IACfC,cAAc;IACdC,MAAM,EAAE;IACRC,MAAM,EAAE;IACR3B,QAAQ,CAAC;IACT4B,cAAc;IACdC,sBAAsB;IACtBC,WAAW,EAAE;IACbC,SAAS,EAAE;IACXC,SAAS;QACPC,+BAA+B;QAC/BC,eAAe;QACfC,kBAAkB,GAAG,OAAO9B,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,GAAG,eAA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M,OAAON,SAAS,IAAI;IACvCM,OAAOL,UAAU,GAAG;QAClBC,cAAc;QACdC,YAAY,GAAG,OAAO9C,SAASC,QAAQ,aAAaD,QAAQC,GAAG,KAAK,GAAG,iBAAiB,CAAC;QACzF,GAAIgD,OAAOL,UAAU,IAAI,CAAC,CAAC;IAC7B;IACAK,OAAOF,MAAM,GAAGE,OAAOF,MAAM,IAAI,CAAC;IAElCE,OAAOjC,IAAI,GAAG;QACZC,UAAU;YAAC;YAAO;YAAU;SAAS;QACrC,GAAIgC,OAAOjC,IAAI,IAAI,CAAC,CAAC;IACvB;IAEA,OAAOiC;AACT,EAAC"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { BusboyConfig } from 'busboy';
|
|
|
3
3
|
import type GraphQL from 'graphql';
|
|
4
4
|
import type { GraphQLFormattedError } from 'graphql';
|
|
5
5
|
import type { JSONSchema4 } from 'json-schema';
|
|
6
|
+
import type { Metadata } from 'next';
|
|
6
7
|
import type { DestinationStream, Level, pino } from 'pino';
|
|
7
8
|
import type React from 'react';
|
|
8
9
|
import type { default as sharp } from 'sharp';
|
|
@@ -90,28 +91,14 @@ export type OGImageConfig = {
|
|
|
90
91
|
url: string;
|
|
91
92
|
width?: number | string;
|
|
92
93
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority
|
|
103
|
-
*/
|
|
104
|
-
fetchPriority?: 'auto' | 'high' | 'low';
|
|
105
|
-
media?: string;
|
|
106
|
-
/** defaults to rel="icon" */
|
|
107
|
-
rel?: string;
|
|
108
|
-
sizes?: string;
|
|
109
|
-
type?: string;
|
|
110
|
-
/**
|
|
111
|
-
* URL of the icon to use. You can use a relative path from the public folder (see https://nextjs.org/docs/app/building-your-application/optimizing/static-assets) or an absolute URL.
|
|
112
|
-
*/
|
|
113
|
-
url: string;
|
|
114
|
-
};
|
|
94
|
+
/**
|
|
95
|
+
* @todo find a way to remove the deep clone here.
|
|
96
|
+
* It can probably be removed after the `DeepRequired` from `Config` to `SanitizedConfig` is removed.
|
|
97
|
+
* Same with `CollectionConfig` to `SanitizedCollectionConfig`.
|
|
98
|
+
*/
|
|
99
|
+
type DeepClone<T> = T extends object ? {
|
|
100
|
+
[K in keyof T]: DeepClone<T[K]>;
|
|
101
|
+
} : T;
|
|
115
102
|
export type MetaConfig = {
|
|
116
103
|
/**
|
|
117
104
|
* When `static`, a pre-made image will be used for all pages.
|
|
@@ -120,39 +107,12 @@ export type MetaConfig = {
|
|
|
120
107
|
* @default 'dynamic'
|
|
121
108
|
*/
|
|
122
109
|
defaultOGImageType?: 'dynamic' | 'off' | 'static';
|
|
123
|
-
/**
|
|
124
|
-
* Overrides the auto-generated <meta name="description"> of admin pages
|
|
125
|
-
* @example `"This is my custom CMS built with Payload."`
|
|
126
|
-
*/
|
|
127
|
-
description?: string;
|
|
128
|
-
/**
|
|
129
|
-
* Icons to be rendered by devices and browsers.
|
|
130
|
-
*
|
|
131
|
-
* For example browser tabs, phone home screens, and search engine results.
|
|
132
|
-
*/
|
|
133
|
-
icons?: IconConfig[];
|
|
134
|
-
/**
|
|
135
|
-
* Overrides the auto-generated <meta name="keywords"> of admin pages
|
|
136
|
-
* @example `"CMS, Payload, Custom"`
|
|
137
|
-
*/
|
|
138
|
-
keywords?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Metadata to be rendered as `og` meta tags in the head of the Admin Panel.
|
|
141
|
-
*
|
|
142
|
-
* For example when sharing the Admin Panel on social media or through messaging services.
|
|
143
|
-
*/
|
|
144
|
-
openGraph?: OpenGraphConfig;
|
|
145
|
-
/**
|
|
146
|
-
* Overrides the auto-generated <title> of admin pages
|
|
147
|
-
* @example `"My Admin Panel"`
|
|
148
|
-
*/
|
|
149
|
-
title?: string;
|
|
150
110
|
/**
|
|
151
111
|
* String to append to the auto-generated <title> of admin pages
|
|
152
112
|
* @example `" - Custom CMS"`
|
|
153
113
|
*/
|
|
154
114
|
titleSuffix?: string;
|
|
155
|
-
}
|
|
115
|
+
} & DeepClone<Metadata>;
|
|
156
116
|
export type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>;
|
|
157
117
|
type GeneratePreviewURLOptions = {
|
|
158
118
|
locale: string;
|
|
@@ -1043,6 +1003,10 @@ export type Config = {
|
|
|
1043
1003
|
*/
|
|
1044
1004
|
upload?: FetchAPIFileUploadOptions;
|
|
1045
1005
|
};
|
|
1006
|
+
/**
|
|
1007
|
+
* @todo remove the `DeepRequired` in v4.
|
|
1008
|
+
* We don't actually guarantee that all properties are set when sanitizing configs.
|
|
1009
|
+
*/
|
|
1046
1010
|
export type SanitizedConfig = {
|
|
1047
1011
|
admin: {
|
|
1048
1012
|
timezones: SanitizedTimezoneConfig;
|