payload 3.0.0-beta.96 → 3.0.0-beta.97
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/RichText.d.ts +2 -2
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.js.map +1 -1
- package/dist/admin/elements/Tab.d.ts +1 -1
- package/dist/admin/elements/Tab.d.ts.map +1 -1
- package/dist/admin/elements/Tab.js.map +1 -1
- package/dist/admin/forms/Description.d.ts +1 -1
- 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 +1 -1
- package/dist/admin/forms/Error.d.ts.map +1 -1
- package/dist/admin/forms/Error.js.map +1 -1
- package/dist/admin/forms/Form.d.ts +1 -1
- package/dist/admin/forms/Form.d.ts.map +1 -1
- package/dist/admin/forms/Form.js.map +1 -1
- package/dist/admin/forms/Label.d.ts +1 -1
- package/dist/admin/forms/Label.d.ts.map +1 -1
- package/dist/admin/forms/Label.js.map +1 -1
- package/dist/admin/types.d.ts +5 -5
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/types.d.ts +1 -1
- package/dist/admin/views/types.d.ts.map +1 -1
- package/dist/admin/views/types.js.map +1 -1
- package/dist/auth/operations/auth.d.ts +1 -1
- package/dist/auth/operations/auth.d.ts.map +1 -1
- package/dist/auth/operations/auth.js.map +1 -1
- package/dist/auth/strategies/jwt.js.map +1 -1
- package/dist/auth/types.d.ts +5 -5
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/bin/generateImportMap/iterateFields.js.map +1 -1
- package/dist/bin/generateTypes.js +1 -1
- package/dist/bin/generateTypes.js.map +1 -1
- package/dist/collections/config/client.d.ts +2 -2
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/types.d.ts +9 -9
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/dataloader.d.ts +1 -1
- package/dist/collections/dataloader.d.ts.map +1 -1
- package/dist/collections/dataloader.js.map +1 -1
- package/dist/collections/operations/utils.d.ts +1 -1
- package/dist/collections/operations/utils.d.ts.map +1 -1
- package/dist/collections/operations/utils.js.map +1 -1
- package/dist/config/client.d.ts +2 -2
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js.map +1 -1
- package/dist/config/types.d.ts +49 -33
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database/combineQueries.d.ts +1 -1
- package/dist/database/combineQueries.d.ts.map +1 -1
- package/dist/database/combineQueries.js.map +1 -1
- package/dist/database/types.d.ts +3 -3
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/fields/config/sanitize.js +1 -1
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/types.d.ts +56 -56
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/hooks/afterChange/index.d.ts +2 -2
- package/dist/fields/hooks/afterChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/index.js.map +1 -1
- package/dist/fields/hooks/afterChange/promise.d.ts +2 -2
- package/dist/fields/hooks/afterChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/promise.js.map +1 -1
- package/dist/fields/hooks/afterChange/traverseFields.d.ts +2 -2
- package/dist/fields/hooks/afterChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/traverseFields.js.map +1 -1
- package/dist/fields/hooks/afterRead/index.d.ts +2 -2
- package/dist/fields/hooks/afterRead/index.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/index.js.map +1 -1
- package/dist/fields/hooks/afterRead/promise.d.ts +2 -2
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/promise.js.map +1 -1
- package/dist/fields/hooks/afterRead/traverseFields.d.ts +2 -2
- package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/traverseFields.js.map +1 -1
- package/dist/fields/hooks/beforeChange/index.d.ts +2 -2
- package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/index.js.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts +2 -2
- package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts +2 -2
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.d.ts +2 -2
- package/dist/fields/hooks/beforeValidate/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.d.ts +2 -2
- package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts +2 -2
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
- package/dist/fields/validations.d.ts +1 -1
- package/dist/fields/validations.d.ts.map +1 -1
- package/dist/fields/validations.js.map +1 -1
- package/dist/globals/config/types.d.ts +2 -2
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/isReactComponent.d.ts +3 -3
- package/dist/utilities/isReactComponent.d.ts.map +1 -1
- package/dist/utilities/isReactComponent.js.map +1 -1
- package/dist/utilities/isValidID.d.ts +1 -1
- package/dist/utilities/isValidID.d.ts.map +1 -1
- package/dist/utilities/isValidID.js.map +1 -1
- package/dist/utilities/logger.d.ts +8 -3
- package/dist/utilities/logger.d.ts.map +1 -1
- package/dist/utilities/logger.js +22 -14
- package/dist/utilities/logger.js.map +1 -1
- package/dist/utilities/telemetry/conf/index.d.ts +1 -1
- package/dist/utilities/telemetry/conf/index.d.ts.map +1 -1
- package/dist/utilities/telemetry/conf/index.js +8 -8
- package/dist/utilities/telemetry/conf/index.js.map +1 -1
- package/dist/versions/drafts/appendVersionToQueryKey.js +1 -1
- package/dist/versions/drafts/appendVersionToQueryKey.js.map +1 -1
- package/dist/versions/types.d.ts +4 -4
- package/dist/versions/types.d.ts.map +1 -1
- package/dist/versions/types.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/generateImportMap/iterateFields.ts"],"sourcesContent":["import type { PayloadComponent, SanitizedConfig } from '../../config/types.js'\nimport type { Block, Field, Tab } from '../../fields/config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nfunction hasKey<T, K extends string>(\n obj:
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/generateImportMap/iterateFields.ts"],"sourcesContent":["import type { PayloadComponent, SanitizedConfig } from '../../config/types.js'\nimport type { Block, Field, Tab } from '../../fields/config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nfunction hasKey<T, K extends string>(\n obj: null | T | undefined,\n key: K,\n): obj is { [P in K]: PayloadComponent | PayloadComponent[] } & T {\n return obj != null && Object.prototype.hasOwnProperty.call(obj, key)\n}\n\nexport function genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n fields: Block[] | Field[] | Tab[]\n importMap: InternalImportMap\n imports: Imports\n}) {\n for (const field of fields) {\n if ('fields' in field) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.fields,\n importMap,\n imports,\n })\n } else if (field.type === 'blocks') {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.blocks,\n importMap,\n imports,\n })\n } else if (field.type === 'tabs') {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.tabs,\n importMap,\n imports,\n })\n } else if (field.type === 'richText') {\n if (\n field?.editor &&\n typeof field.editor === 'object' &&\n field.editor.generateImportMap &&\n typeof field.editor.generateImportMap === 'function'\n ) {\n field.editor.generateImportMap({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n }\n }\n\n hasKey(field?.admin?.components, 'Label') && addToImportMap(field.admin.components.Label)\n\n hasKey(field?.admin?.components, 'Cell') && addToImportMap(field?.admin?.components?.Cell)\n\n hasKey(field?.admin?.components, 'Description') &&\n addToImportMap(field?.admin?.components?.Description)\n\n hasKey(field?.admin?.components, 'Field') && addToImportMap(field?.admin?.components?.Field)\n hasKey(field?.admin?.components, 'Filter') && addToImportMap(field?.admin?.components?.Filter)\n\n hasKey(field?.admin?.components, 'Error') && addToImportMap(field?.admin?.components?.Error)\n\n hasKey(field?.admin?.components, 'afterInput') &&\n addToImportMap(field?.admin?.components?.afterInput)\n\n hasKey(field?.admin?.components, 'beforeInput') &&\n addToImportMap(field?.admin?.components?.beforeInput)\n\n hasKey(field?.admin?.components, 'RowLabel') &&\n addToImportMap(field?.admin?.components?.RowLabel)\n }\n}\n"],"names":["hasKey","obj","key","Object","prototype","hasOwnProperty","call","genImportMapIterateFields","addToImportMap","baseDir","config","fields","importMap","imports","field","type","blocks","tabs","editor","generateImportMap","admin","components","Label","Cell","Description","Field","Filter","Error","afterInput","beforeInput","RowLabel"],"mappings":"AAIA,SAASA,OACPC,GAAyB,EACzBC,GAAM;IAEN,OAAOD,OAAO,QAAQE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vF1B,OAAOc,OAAOM,OAAOC,YAAY,YAAYb,eAAeM,OAAOM,OAAOC,YAAYM;QAEtF3B,OAAOc,OAAOM,OAAOC,YAAY,iBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYO;QAE3C5B,OAAOc,OAAOM,OAAOC,YAAY,kBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYQ;QAE3C7B,OAAOc,OAAOM,OAAOC,YAAY,eAC/Bb,eAAeM,OAAOM,OAAOC,YAAYS;IAC7C;AACF"}
|
|
@@ -3,7 +3,7 @@ import { compile } from 'json-schema-to-typescript';
|
|
|
3
3
|
import { configToJSONSchema } from '../utilities/configToJSONSchema.js';
|
|
4
4
|
import { getLogger } from '../utilities/logger.js';
|
|
5
5
|
export async function generateTypes(config, options) {
|
|
6
|
-
const logger = getLogger();
|
|
6
|
+
const logger = getLogger('payload', 'sync');
|
|
7
7
|
const outputFile = process.env.PAYLOAD_TS_OUTPUT_PATH || config.typescript.outputFile;
|
|
8
8
|
const shouldLog = options?.log ?? true;
|
|
9
9
|
if (shouldLog) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/generateTypes.ts"],"sourcesContent":["import fs from 'fs'\nimport { compile } from 'json-schema-to-typescript'\n\nimport type { SanitizedConfig } from '../config/types.js'\n\nimport { configToJSONSchema } from '../utilities/configToJSONSchema.js'\nimport { getLogger } from '../utilities/logger.js'\n\nexport async function generateTypes(\n config: SanitizedConfig,\n options?: { log: boolean },\n): Promise<void> {\n const logger = getLogger()\n const outputFile = process.env.PAYLOAD_TS_OUTPUT_PATH || config.typescript.outputFile\n\n const shouldLog = options?.log ?? true\n\n if (shouldLog) {\n logger.info('Compiling TS types for Collections and Globals...')\n }\n\n const jsonSchema = configToJSONSchema(config, config.db.defaultIDType)\n\n const declare = `declare module 'payload' {\\n export interface GeneratedTypes extends Config {}\\n}`\n const declareWithTSIgnoreError = `declare module 'payload' {\\n // @ts-ignore \\n export interface GeneratedTypes extends Config {}\\n}`\n\n let compiled = await compile(jsonSchema, 'Config', {\n bannerComment:\n '/* tslint:disable */\\n/* eslint-disable */\\n/**\\n* This file was automatically generated by Payload.\\n* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,\\n* and re-run `payload generate:types` to regenerate this file.\\n*/',\n style: {\n singleQuote: true,\n },\n // Generates code for $defs that aren't referenced by the schema. Reason:\n // If a field defines an interfaceName, it should be included in the generated types\n // even if it's not used by another type. Reason: the user might want to use it in their own code.\n unreachableDefinitions: true,\n })\n\n if (config.typescript.declare !== false) {\n if (config.typescript.declare?.ignoreTSError) {\n compiled += `\\n\\n${declareWithTSIgnoreError}`\n } else {\n compiled += `\\n\\n${declare}`\n }\n }\n\n // Diff the compiled types against the existing types file\n try {\n const existingTypes = fs.readFileSync(outputFile, 'utf-8')\n\n if (compiled === existingTypes) {\n return\n }\n } catch (_) {\n // swallow err\n }\n\n fs.writeFileSync(outputFile, compiled)\n if (shouldLog) {\n logger.info(`Types written to ${outputFile}`)\n }\n}\n"],"names":["fs","compile","configToJSONSchema","getLogger","generateTypes","config","options","logger","outputFile","process","env","PAYLOAD_TS_OUTPUT_PATH","typescript","shouldLog","log","info","jsonSchema","db","defaultIDType","declare","declareWithTSIgnoreError","compiled","bannerComment","style","singleQuote","unreachableDefinitions","ignoreTSError","existingTypes","readFileSync","_","writeFileSync"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,SAASC,OAAO,QAAQ,4BAA2B;AAInD,SAASC,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,SAAS,QAAQ,yBAAwB;AAElD,OAAO,eAAeC,cACpBC,MAAuB,EACvBC,OAA0B;IAE1B,MAAMC,SAASJ;
|
|
1
|
+
{"version":3,"sources":["../../src/bin/generateTypes.ts"],"sourcesContent":["import fs from 'fs'\nimport { compile } from 'json-schema-to-typescript'\n\nimport type { SanitizedConfig } from '../config/types.js'\n\nimport { configToJSONSchema } from '../utilities/configToJSONSchema.js'\nimport { getLogger } from '../utilities/logger.js'\n\nexport async function generateTypes(\n config: SanitizedConfig,\n options?: { log: boolean },\n): Promise<void> {\n const logger = getLogger('payload', 'sync')\n const outputFile = process.env.PAYLOAD_TS_OUTPUT_PATH || config.typescript.outputFile\n\n const shouldLog = options?.log ?? true\n\n if (shouldLog) {\n logger.info('Compiling TS types for Collections and Globals...')\n }\n\n const jsonSchema = configToJSONSchema(config, config.db.defaultIDType)\n\n const declare = `declare module 'payload' {\\n export interface GeneratedTypes extends Config {}\\n}`\n const declareWithTSIgnoreError = `declare module 'payload' {\\n // @ts-ignore \\n export interface GeneratedTypes extends Config {}\\n}`\n\n let compiled = await compile(jsonSchema, 'Config', {\n bannerComment:\n '/* tslint:disable */\\n/* eslint-disable */\\n/**\\n* This file was automatically generated by Payload.\\n* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,\\n* and re-run `payload generate:types` to regenerate this file.\\n*/',\n style: {\n singleQuote: true,\n },\n // Generates code for $defs that aren't referenced by the schema. Reason:\n // If a field defines an interfaceName, it should be included in the generated types\n // even if it's not used by another type. Reason: the user might want to use it in their own code.\n unreachableDefinitions: true,\n })\n\n if (config.typescript.declare !== false) {\n if (config.typescript.declare?.ignoreTSError) {\n compiled += `\\n\\n${declareWithTSIgnoreError}`\n } else {\n compiled += `\\n\\n${declare}`\n }\n }\n\n // Diff the compiled types against the existing types file\n try {\n const existingTypes = fs.readFileSync(outputFile, 'utf-8')\n\n if (compiled === existingTypes) {\n return\n }\n } catch (_) {\n // swallow err\n }\n\n fs.writeFileSync(outputFile, compiled)\n if (shouldLog) {\n logger.info(`Types written to ${outputFile}`)\n }\n}\n"],"names":["fs","compile","configToJSONSchema","getLogger","generateTypes","config","options","logger","outputFile","process","env","PAYLOAD_TS_OUTPUT_PATH","typescript","shouldLog","log","info","jsonSchema","db","defaultIDType","declare","declareWithTSIgnoreError","compiled","bannerComment","style","singleQuote","unreachableDefinitions","ignoreTSError","existingTypes","readFileSync","_","writeFileSync"],"mappings":"AAAA,OAAOA,QA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Enabled?: true;
|
|
11
11
|
admin: {
|
|
12
12
|
components: {
|
|
13
|
-
Description: MappedComponent;
|
|
14
13
|
afterList: MappedComponent[];
|
|
15
14
|
afterListTable: MappedComponent[];
|
|
16
15
|
beforeList: MappedComponent[];
|
|
17
16
|
beforeListTable: MappedComponent[];
|
|
17
|
+
Description: MappedComponent;
|
|
18
18
|
edit: {
|
|
19
19
|
PreviewButton: MappedComponent;
|
|
20
20
|
PublishButton: MappedComponent;
|
|
@@ -32,8 +32,8 @@ export type ClientCollectionConfig = {
|
|
|
32
32
|
versions: MappedView;
|
|
33
33
|
};
|
|
34
34
|
list: {
|
|
35
|
-
Component: MappedComponent;
|
|
36
35
|
actions: MappedComponent[];
|
|
36
|
+
Component: MappedComponent;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collections/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D,MAAM,MAAM,8BAA8B,GAAG,MAAM,IAAI,CACrD,yBAAyB,EACzB,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAC5C,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG,MAAM,IAAI,CAC1D,yBAAyB,CAAC,OAAO,CAAC,EAClC,QAAQ,GAAG,SAAS,CACrB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,IAAI,CACjD,yBAAyB,CAAC,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e,EAAE,CAAA;YAClC,WAAW,EAAE,eAAe,CAAA;YAC5B,IAAI,EAAE;gBACJ,aAAa,EAAE,eAAe,CAAA;gBAC9B,aAAa,EAAE,eAAe,CAAA;gBAC9B,UAAU,EAAE,eAAe,CAAA;gBAC3B,eAAe,EAAE,eAAe,CAAA;gBAChC,MAAM,EAAE,eAAe,CAAA;aACxB,CAAA;YACD,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;oBACzB,GAAG,EAAE,UAAU,CAAA;oBACf,OAAO,EAAE,UAAU,CAAA;oBACnB,WAAW,EAAE,UAAU,CAAA;oBACvB,OAAO,EAAE,UAAU,CAAA;oBACnB,QAAQ,EAAE,UAAU,CAAA;iBACrB,CAAA;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,eAAe,EAAE,CAAA;oBAC1B,SAAS,EAAE,eAAe,CAAA;iBAC3B,CAAA;aACF,CAAA;SACF,CAAA;QACD,WAAW,CAAC,EAAE,iBAAiB,CAAA;QAC/B,WAAW,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,CAAC,CAAA;KACvE,GAAG,IAAI,CACN,yBAAyB,CAAC,OAAO,CAAC,EAClC,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,mCAAmC,CACnF,CAAA;IACD,MAAM,EAAE,WAAW,EAAE,CAAA;CACtB,GAAG,IAAI,CAAC,yBAAyB,EAAE,OAAO,GAAG,QAAQ,GAAG,8BAA8B,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/client.ts"],"sourcesContent":["import type { MappedComponent, StaticDescription } from '../../admin/types.js'\nimport type { MappedView } from '../../admin/views/types.js'\nimport type { LivePreviewConfig, ServerOnlyLivePreviewProperties } from '../../config/types.js'\nimport type { ClientField } from '../../fields/config/client.js'\nimport type { SanitizedCollectionConfig } from './types.js'\n\nexport type ServerOnlyCollectionProperties = keyof Pick<\n SanitizedCollectionConfig,\n 'access' | 'custom' | 'endpoints' | 'hooks'\n>\n\nexport type ServerOnlyCollectionAdminProperties = keyof Pick<\n SanitizedCollectionConfig['admin'],\n 'hidden' | 'preview'\n>\n\nexport type ServerOnlyUploadProperties = keyof Pick<\n SanitizedCollectionConfig['upload'],\n | 'adminThumbnail'\n | 'externalFileHeaderFilter'\n | 'handlers'\n | 'modifyResponseHeaders'\n | 'withMetadata'\n>\n\nexport type ClientCollectionConfig = {\n _isPreviewEnabled?: true\n admin: {\n components: {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/client.ts"],"sourcesContent":["import type { MappedComponent, StaticDescription } from '../../admin/types.js'\nimport type { MappedView } from '../../admin/views/types.js'\nimport type { LivePreviewConfig, ServerOnlyLivePreviewProperties } from '../../config/types.js'\nimport type { ClientField } from '../../fields/config/client.js'\nimport type { SanitizedCollectionConfig } from './types.js'\n\nexport type ServerOnlyCollectionProperties = keyof Pick<\n SanitizedCollectionConfig,\n 'access' | 'custom' | 'endpoints' | 'hooks'\n>\n\nexport type ServerOnlyCollectionAdminProperties = keyof Pick<\n SanitizedCollectionConfig['admin'],\n 'hidden' | 'preview'\n>\n\nexport type ServerOnlyUploadProperties = keyof Pick<\n SanitizedCollectionConfig['upload'],\n | 'adminThumbnail'\n | 'externalFileHeaderFilter'\n | 'handlers'\n | 'modifyResponseHeaders'\n | 'withMetadata'\n>\n\nexport type ClientCollectionConfig = {\n _isPreviewEnabled?: true\n admin: {\n components: {\n afterList: MappedComponent[]\n afterListTable: MappedComponent[]\n beforeList: MappedComponent[]\n beforeListTable: MappedComponent[]\n Description: MappedComponent\n edit: {\n PreviewButton: MappedComponent\n PublishButton: MappedComponent\n SaveButton: MappedComponent\n SaveDraftButton: MappedComponent\n Upload: MappedComponent\n }\n views: {\n edit: {\n [key: string]: MappedView\n api: MappedView\n default: MappedView\n livePreview: MappedView\n version: MappedView\n versions: MappedView\n }\n list: {\n actions: MappedComponent[]\n Component: MappedComponent\n }\n }\n }\n description?: StaticDescription\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<\n SanitizedCollectionConfig['admin'],\n 'components' | 'description' | 'livePreview' | ServerOnlyCollectionAdminProperties\n >\n fields: ClientField[]\n} & Omit<SanitizedCollectionConfig, 'admin' | 'fields' | ServerOnlyCollectionProperties>\n"],"names":[],"mappings":"AAyBA,WAsCwF"}
|
|
@@ -114,7 +114,7 @@ export type AfterDeleteHook<T extends TypeWithID = any> = (args: {
|
|
|
114
114
|
export type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (arg: AfterOperationArg<TOperationGeneric>) => Awaited<ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>> | Promise<Awaited<ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>>>;
|
|
115
115
|
export type AfterErrorHook = (err: Error, res: unknown, context: RequestContext,
|
|
116
116
|
/** The collection which this hook is being run on. This is null if the AfterError hook was be added to the payload-wide config */
|
|
117
|
-
collection:
|
|
117
|
+
collection: null | SanitizedCollectionConfig) => {
|
|
118
118
|
response: any;
|
|
119
119
|
status: number;
|
|
120
120
|
} | void;
|
|
@@ -179,11 +179,11 @@ export type CollectionAdminOptions = {
|
|
|
179
179
|
* Custom admin components
|
|
180
180
|
*/
|
|
181
181
|
components?: {
|
|
182
|
-
Description?: EntityDescriptionComponent;
|
|
183
182
|
afterList?: CustomComponent[];
|
|
184
183
|
afterListTable?: CustomComponent[];
|
|
185
184
|
beforeList?: CustomComponent[];
|
|
186
185
|
beforeListTable?: CustomComponent[];
|
|
186
|
+
Description?: EntityDescriptionComponent;
|
|
187
187
|
/**
|
|
188
188
|
* Components within the edit view
|
|
189
189
|
*/
|
|
@@ -221,8 +221,8 @@ export type CollectionAdminOptions = {
|
|
|
221
221
|
*/
|
|
222
222
|
edit?: EditConfig;
|
|
223
223
|
list?: {
|
|
224
|
-
Component?: PayloadComponent;
|
|
225
224
|
actions?: CustomComponent[];
|
|
225
|
+
Component?: PayloadComponent;
|
|
226
226
|
};
|
|
227
227
|
};
|
|
228
228
|
};
|
|
@@ -282,7 +282,7 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
282
282
|
access?: {
|
|
283
283
|
admin?: ({ req }: {
|
|
284
284
|
req: PayloadRequest;
|
|
285
|
-
}) =>
|
|
285
|
+
}) => boolean | Promise<boolean>;
|
|
286
286
|
create?: Access;
|
|
287
287
|
delete?: Access;
|
|
288
288
|
read?: Access;
|
|
@@ -299,7 +299,7 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
299
299
|
*
|
|
300
300
|
* Use `true` to enable with default options
|
|
301
301
|
*/
|
|
302
|
-
auth?:
|
|
302
|
+
auth?: boolean | IncomingAuthType;
|
|
303
303
|
/** Extension point to add your custom data. Server only. */
|
|
304
304
|
custom?: Record<string, any>;
|
|
305
305
|
/**
|
|
@@ -318,7 +318,7 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
318
318
|
/**
|
|
319
319
|
* Custom rest api endpoints, set false to disable all rest endpoints for this collection.
|
|
320
320
|
*/
|
|
321
|
-
endpoints?: Omit<Endpoint, 'root'>[]
|
|
321
|
+
endpoints?: false | Omit<Endpoint, 'root'>[];
|
|
322
322
|
fields: Field[];
|
|
323
323
|
/**
|
|
324
324
|
* GraphQL configuration
|
|
@@ -389,7 +389,7 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
389
389
|
*
|
|
390
390
|
* @default false // disable uploads
|
|
391
391
|
*/
|
|
392
|
-
upload?:
|
|
392
|
+
upload?: boolean | UploadConfig;
|
|
393
393
|
/**
|
|
394
394
|
* Enable versioning. Set it to true to enable default versions settings,
|
|
395
395
|
* or customize versions options by setting the property equal to an object
|
|
@@ -397,7 +397,7 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
397
397
|
*
|
|
398
398
|
* @default false // disable versioning
|
|
399
399
|
*/
|
|
400
|
-
versions?:
|
|
400
|
+
versions?: boolean | IncomingCollectionVersions;
|
|
401
401
|
};
|
|
402
402
|
export interface SanitizedCollectionConfig extends Omit<DeepRequired<CollectionConfig>, 'auth' | 'endpoints' | 'fields' | 'upload' | 'versions'> {
|
|
403
403
|
auth: Auth;
|
|
@@ -410,8 +410,8 @@ export type Collection = {
|
|
|
410
410
|
config: SanitizedCollectionConfig;
|
|
411
411
|
customIDType?: 'number' | 'text';
|
|
412
412
|
graphQL?: {
|
|
413
|
-
JWT: GraphQLObjectType;
|
|
414
413
|
countType: GraphQLObjectType;
|
|
414
|
+
JWT: GraphQLObjectType;
|
|
415
415
|
mutationInputType: GraphQLNonNull<any>;
|
|
416
416
|
paginatedType: GraphQLObjectType;
|
|
417
417
|
type: GraphQLObjectType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/collections/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,KAAK,EACV,SAAS,IAAI,gBAAgB,EAC7B,MAAM,IAAI,aAAa,EACxB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,0BAA0B,EAC1B,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raphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, MarkOptional } from 'ts-essentials'\n\nimport type {\n CustomPreviewButton,\n CustomPublishButton,\n CustomSaveButton,\n CustomSaveDraftButton,\n CustomUpload,\n} 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 CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n OpenGraphConfig,\n PayloadComponent,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type {\n CollectionSlug,\n JsonObject,\n TypedAuthOperations,\n TypedCollection,\n} from '../../index.js'\nimport type { PayloadRequest, RequestContext } 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]\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 | '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 AfterErrorHook = (\n err: Error,\n res: unknown,\n context: RequestContext,\n /** The collection which this hook is being run on. This is null if the AfterError hook was be added to the payload-wide config */\n collection: SanitizedCollectionConfig | null,\n) => { response: any; status: number } | void\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 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 CollectionAdminOptions = {\n /**\n * Custom admin components\n */\n components?: {\n Description?: EntityDescriptionComponent\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomPreviewButton\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomPublishButton\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomSaveButton\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomSaveDraftButton\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\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 Component?: PayloadComponent\n actions?: CustomComponent[]\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\n */\n description?: EntityDescription\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Place collections into a navigational group\n * */\n group?: 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 * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => Promise<boolean> | 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?: IncomingAuthType | boolean\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 /**\n * Default field to sort by in collection list view\n */\n defaultSort?: string\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?: Omit<Endpoint, 'root'>[] | false\n fields: Field[]\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\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 * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\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?: UploadConfig | boolean\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?: IncomingCollectionVersions | boolean\n}\n\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n JWT: GraphQLObjectType\n countType: 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> = {\n docs: DataFromCollectionSlug<TSlug>[]\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 id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n"],"names":[],"mappings":"AAmgBA,WAKC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, MarkOptional } from 'ts-essentials'\n\nimport type {\n CustomPreviewButton,\n CustomPublishButton,\n CustomSaveButton,\n CustomSaveDraftButton,\n CustomUpload,\n} 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 CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n OpenGraphConfig,\n PayloadComponent,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type {\n CollectionSlug,\n JsonObject,\n TypedAuthOperations,\n TypedCollection,\n} from '../../index.js'\nimport type { PayloadRequest, RequestContext } 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]\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 | '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 AfterErrorHook = (\n err: Error,\n res: unknown,\n context: RequestContext,\n /** The collection which this hook is being run on. This is null if the AfterError hook was be added to the payload-wide config */\n collection: null | SanitizedCollectionConfig,\n) => { response: any; status: number } | void\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 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 CollectionAdminOptions = {\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?: CustomPreviewButton\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomPublishButton\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomSaveButton\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomSaveDraftButton\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\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\n */\n description?: EntityDescription\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Place collections into a navigational group\n * */\n group?: 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 * 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 /**\n * Default field to sort by in collection list view\n */\n defaultSort?: string\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 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 * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\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 interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\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> = {\n docs: DataFromCollectionSlug<TSlug>[]\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 id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n"],"names":[],"mappings":"AAmgBA,WAKC"}
|
|
@@ -12,7 +12,7 @@ type CreateCacheKeyArgs = {
|
|
|
12
12
|
locale: string;
|
|
13
13
|
overrideAccess: boolean;
|
|
14
14
|
showHiddenFields: boolean;
|
|
15
|
-
transactionID: Promise<number | string> |
|
|
15
|
+
transactionID: number | Promise<number | string> | string;
|
|
16
16
|
};
|
|
17
17
|
export declare const createDataloaderCacheKey: ({ collectionSlug, currentDepth, depth, docID, draft, fallbackLocale, locale, overrideAccess, showHiddenFields, transactionID, }: CreateCacheKeyArgs) => string;
|
|
18
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAyJnD,eAAO,MAAM,aAAa,QAAS,cAAc,2CAA0C,CAAA;AAE3F,KAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,OAAO,CAAA;IACzB,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAyJnD,eAAO,MAAM,aAAa,QAAS,cAAc,2CAA0C,CAAA;AAE3F,KAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,OAAO,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;CAC1D,CAAA;AACD,eAAO,MAAM,wBAAwB,oIAWlC,kBAAkB,KAAG,MAYpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/dataloader.ts"],"sourcesContent":["import type { BatchLoadFn } from 'dataloader'\n\nimport DataLoader from 'dataloader'\n\nimport type { JsonValue, PayloadRequest } from '../types/index.js'\nimport type { TypeWithID } from './config/types.js'\n\nimport { isValidID } from '../utilities/isValidID.js'\n\n// Payload uses `dataloader` to solve the classic GraphQL N+1 problem.\n\n// We keep a list of all documents requested to be populated for any given request\n// and then batch together documents within the same collection,\n// making only 1 find per each collection, rather than `findByID` per each requested doc.\n\n// This dramatically improves performance for REST and Local API `depth` populations,\n// and also ensures complex GraphQL queries perform lightning-fast.\n\nconst batchAndLoadDocs =\n (req: PayloadRequest): BatchLoadFn<string, TypeWithID> =>\n async (keys: string[]): Promise<TypeWithID[]> => {\n const { payload } = req\n\n // Create docs array of same length as keys, using null as value\n // We will replace nulls with injected docs as they are retrieved\n const docs: (
|
|
1
|
+
{"version":3,"sources":["../../src/collections/dataloader.ts"],"sourcesContent":["import type { BatchLoadFn } from 'dataloader'\n\nimport DataLoader from 'dataloader'\n\nimport type { JsonValue, PayloadRequest } from '../types/index.js'\nimport type { TypeWithID } from './config/types.js'\n\nimport { isValidID } from '../utilities/isValidID.js'\n\n// Payload uses `dataloader` to solve the classic GraphQL N+1 problem.\n\n// We keep a list of all documents requested to be populated for any given request\n// and then batch together documents within the same collection,\n// making only 1 find per each collection, rather than `findByID` per each requested doc.\n\n// This dramatically improves performance for REST and Local API `depth` populations,\n// and also ensures complex GraphQL queries perform lightning-fast.\n\nconst batchAndLoadDocs =\n (req: PayloadRequest): BatchLoadFn<string, TypeWithID> =>\n async (keys: string[]): Promise<TypeWithID[]> => {\n const { payload } = req\n\n // Create docs array of same length as keys, using null as value\n // We will replace nulls with injected docs as they are retrieved\n const docs: (null | TypeWithID)[] = keys.map(() => null)\n\n /**\n * Batch IDs by their `find` args\n * so we can make one find query per combination of collection, depth, locale, and fallbackLocale.\n *\n * Resulting shape will be as follows:\n {\n // key is stringified set of find args\n '[null,\"pages\",2,0,\"es\",\"en\",false,false]': [\n // value is array of IDs to find with these args\n 'q34tl23462346234524',\n '435523540194324280',\n '2346245j35l3j5234532li',\n ],\n // etc\n };\n *\n **/\n\n const batchByFindArgs = keys.reduce((batches, key) => {\n const [\n transactionID,\n collection,\n id,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ] = JSON.parse(key)\n\n const batchKeyArray = [\n transactionID,\n collection,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ]\n\n const batchKey = JSON.stringify(batchKeyArray)\n\n const idType = payload.collections?.[collection].customIDType || payload.db.defaultIDType\n\n let sanitizedID: number | string = id\n\n if (idType === 'number') {\n sanitizedID = parseFloat(id)\n }\n\n if (isValidID(sanitizedID, idType)) {\n return {\n ...batches,\n [batchKey]: [...(batches[batchKey] || []), sanitizedID],\n }\n }\n return batches\n }, {})\n\n // Run find requests one after another, so as to not hang transactions\n\n await Object.entries(batchByFindArgs).reduce(async (priorFind, [batchKey, ids]) => {\n await priorFind\n\n const [\n transactionID,\n collection,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ] = JSON.parse(batchKey)\n\n req.transactionID = transactionID\n\n const result = await payload.find({\n collection,\n currentDepth,\n depth,\n disableErrors: true,\n draft,\n fallbackLocale,\n locale,\n overrideAccess: Boolean(overrideAccess),\n pagination: false,\n req,\n showHiddenFields: Boolean(showHiddenFields),\n where: {\n id: {\n in: ids,\n },\n },\n })\n\n // For each returned doc, find index in original keys\n // Inject doc within docs array if index exists\n\n result.docs.forEach((doc) => {\n const docKey = createDataloaderCacheKey({\n collectionSlug: collection,\n currentDepth,\n depth,\n docID: doc.id,\n draft,\n fallbackLocale: req.fallbackLocale,\n locale: req.locale,\n overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n })\n const docsIndex = keys.findIndex((key) => key === docKey)\n\n if (docsIndex > -1) {\n docs[docsIndex] = doc\n }\n })\n }, Promise.resolve())\n\n // Return docs array,\n // which has now been injected with all fetched docs\n // and should match the length of the incoming keys arg\n return docs\n }\n\nexport const getDataLoader = (req: PayloadRequest) => new DataLoader(batchAndLoadDocs(req))\n\ntype CreateCacheKeyArgs = {\n collectionSlug: string\n currentDepth: number\n depth: number\n docID: number | string\n draft: boolean\n fallbackLocale: string\n locale: string\n overrideAccess: boolean\n showHiddenFields: boolean\n transactionID: number | Promise<number | string> | string\n}\nexport const createDataloaderCacheKey = ({\n collectionSlug,\n currentDepth,\n depth,\n docID,\n draft,\n fallbackLocale,\n locale,\n overrideAccess,\n showHiddenFields,\n transactionID,\n}: CreateCacheKeyArgs): string =>\n JSON.stringify([\n transactionID,\n collectionSlug,\n docID,\n depth,\n currentDepth,\n locale,\n fallbackLocale,\n overrideAccess,\n showHiddenFields,\n draft,\n ])\n"],"names":["DataLoader","isValidID","batchAndLoadDocs","req","keys","payload","docs","map","batchByFindArgs","reduce","batches","key","transactionID","collection","id","depth","currentDepth","locale","fallbackLocale","overrideAccess","showHiddenFields","draft","JSON","parse","batchKeyArray","batchKey","stringify","idType","collections","customIDType","db","defaultIDType","sanitizedID","parseFloat","Object","entries","priorFind","ids","result","find","disableErrors","Boolean","pagination","where","in","forEach","doc","docKey","createDataloaderCacheKey","collectionSlug","docID","docsIndex","findIndex","Promise","resolve","getDataLoader"],"mappings":"AAEA,OAAOA,gBAAgB,aAAY;AAKnC,SAASC,SAAS,QAAQ,4BAA2B;AAErD,sEAAsE;AAEtE,kFAAkF;AAClF,gEAAgE;AAChE,yFAAyF;AAEzF,qFAAqF;AACrF,mEAAmE;AAEnE,MAAMC,mBACJ,CAACC,MACD,OAAOC;QACL,MAAM,EAAEC,OAAO,EAAE,GAAGF;QAEpB,gEAAgE;QAChE,iEAAiE;QACjE,MAAMG,OAA8BF,KAAKG,GAAG,CAAC,IAAM;QAEnD;;;;;;;;;;;;;;;;KAgBC,GAED,MAAMC,kBAAkBJ,KAAKK,MAAM,CAAC,CAACC,SAASC;YAC5C,MAAM,CACJC,eACAC,YACAC,IACAC,OACAC,cACAC,QACAC,gBACAC,gBACAC,kBACAC,MACD,GAAGC,KAAKC,KAAK,CAACZ;YAEf,MAAMa,gBAAgB;gBACpBZ;gBACAC;gBACAE;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;aACD;YAED,MAAMI,WAAWH,KAAKI,SAAS,CAACF;YAEhC,MAAMG,SAAStB,QAAQuB,WAAW,EAAE,CAACf,WAAW,CAACgB,gBAAgBxB,QAAQyB,EAAE,CAACC,aAAa;YAEzF,IAAIC,cAA+BlB;YAEnC,IAAIa,WAAW,UAAU;gBACvBK,cAAcC,WAAWnB;YAC3B;YAEA,IAAIb,UAAU+B,aAAaL,SAAS;gBAClC,OAAO;oBACL,GAAGjB,OAAO;oBACV,CAACe,SAAS,EAAE;2BAAKf,OAAO,CAACe,SAAS,IAAI,EAAE;wBAAGO;qBAAY;gBACzD;YACF;YACA,OAAOtB;QACT,GAAG,CAAC;QAEJ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c,EACdC,gBAAgB,EAChBR,aAAa,EACM,GACnBU,KAAKI,SAAS,CAAC;QACbd;QACAqC;QACAC;QACAnC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD,EAAC"}
|
|
@@ -77,6 +77,6 @@ export type AfterOperationArg<TOperationGeneric extends CollectionSlug> = {
|
|
|
77
77
|
type OperationResult<TOperationGeneric extends CollectionSlug, O extends keyof AfterOperationMap<TOperationGeneric>> = Awaited<ReturnType<AfterOperationMap<TOperationGeneric>[O]>>;
|
|
78
78
|
export declare const buildAfterOperation: <TOperationGeneric extends CollectionSlug, O extends keyof AfterOperationMap<TOperationGeneric> = keyof AfterOperationMap<TOperationGeneric>>(operationArgs: {
|
|
79
79
|
operation: O;
|
|
80
|
-
} & Omit<AfterOperationArg<TOperationGeneric>, "req">) => Promise<OperationResult<TOperationGeneric, O
|
|
80
|
+
} & Omit<AfterOperationArg<TOperationGeneric>, "req">) => Promise<any | OperationResult<TOperationGeneric, O>>;
|
|
81
81
|
export {};
|
|
82
82
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAA;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAsB,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,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OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;CAC5E,GACD;IACE,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvE,SAAS,EAAE,YAAY,CAAA;IACvB,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;CAChF,CACJ,CAAA;AAED,KAAK,eAAe,CAClB,iBAAiB,SAAS,cAAc,EACxC,CAAC,SAAS,MAAM,iBAAiB,CAAC,iBAAiB,CAAC,IAClD,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEhE,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,SAAS,cAAc,EACxC,CAAC,SAAS,MAAM,iBAAiB,CAAC,iBAAiB,CAAC,8DAErC;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,KAClF,OAAO,CAAC,GAAG,GAAG,eAAe,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAyBrD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/operations/utils.ts"],"sourcesContent":["import type { forgotPasswordOperation } from '../../auth/operations/forgotPassword.js'\nimport type { loginOperation } from '../../auth/operations/login.js'\nimport type { refreshOperation } from '../../auth/operations/refresh.js'\nimport type { CollectionSlug } from '../../index.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { AfterOperationHook, SanitizedCollectionConfig } from '../config/types.js'\nimport type { countOperation } from './count.js'\nimport type { createOperation } from './create.js'\nimport type { deleteOperation } from './delete.js'\nimport type { deleteByIDOperation } from './deleteByID.js'\nimport type { findOperation } from './find.js'\nimport type { findByIDOperation } from './findByID.js'\nimport type { updateOperation } from './update.js'\nimport type { updateByIDOperation } from './updateByID.js'\n\nexport type AfterOperationMap<TOperationGeneric extends CollectionSlug> = {\n count: typeof countOperation<TOperationGeneric>\n create: typeof createOperation<TOperationGeneric>\n delete: typeof deleteOperation<TOperationGeneric>\n deleteByID: typeof deleteByIDOperation<TOperationGeneric>\n find: typeof findOperation<TOperationGeneric>\n findByID: typeof findByIDOperation<TOperationGeneric>\n forgotPassword: typeof forgotPasswordOperation\n login: typeof loginOperation<TOperationGeneric>\n refresh: typeof refreshOperation\n update: typeof updateOperation<TOperationGeneric>\n updateByID: typeof updateByIDOperation<TOperationGeneric>\n}\n\nexport type AfterOperationArg<TOperationGeneric extends CollectionSlug> = {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n req: PayloadRequest\n} & (\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['count']>[0]\n operation: 'count'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['count']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['create']>[0]\n operation: 'create'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['create']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['delete']>[0]\n operation: 'delete'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['delete']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['deleteByID']>[0]\n operation: 'deleteByID'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['deleteByID']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['find']>[0]\n operation: 'find'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['find']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['findByID']>[0]\n operation: 'findByID'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['findByID']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['forgotPassword']>[0]\n operation: 'forgotPassword'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['forgotPassword']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['login']>[0]\n operation: 'login'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['login']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['refresh']>[0]\n operation: 'refresh'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['refresh']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['update']>[0]\n operation: 'update'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['update']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['updateByID']>[0]\n operation: 'updateByID'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['updateByID']>>\n }\n)\n\ntype OperationResult<\n TOperationGeneric extends CollectionSlug,\n O extends keyof AfterOperationMap<TOperationGeneric>,\n> = Awaited<ReturnType<AfterOperationMap<TOperationGeneric>[O]>>\n\nexport const buildAfterOperation = async <\n TOperationGeneric extends CollectionSlug,\n O extends keyof AfterOperationMap<TOperationGeneric> = keyof AfterOperationMap<TOperationGeneric>,\n>(\n operationArgs: { operation: O } & Omit<AfterOperationArg<TOperationGeneric>, 'req'>,\n): Promise<OperationResult<TOperationGeneric, O
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/operations/utils.ts"],"sourcesContent":["import type { forgotPasswordOperation } from '../../auth/operations/forgotPassword.js'\nimport type { loginOperation } from '../../auth/operations/login.js'\nimport type { refreshOperation } from '../../auth/operations/refresh.js'\nimport type { CollectionSlug } from '../../index.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { AfterOperationHook, SanitizedCollectionConfig } from '../config/types.js'\nimport type { countOperation } from './count.js'\nimport type { createOperation } from './create.js'\nimport type { deleteOperation } from './delete.js'\nimport type { deleteByIDOperation } from './deleteByID.js'\nimport type { findOperation } from './find.js'\nimport type { findByIDOperation } from './findByID.js'\nimport type { updateOperation } from './update.js'\nimport type { updateByIDOperation } from './updateByID.js'\n\nexport type AfterOperationMap<TOperationGeneric extends CollectionSlug> = {\n count: typeof countOperation<TOperationGeneric>\n create: typeof createOperation<TOperationGeneric>\n delete: typeof deleteOperation<TOperationGeneric>\n deleteByID: typeof deleteByIDOperation<TOperationGeneric>\n find: typeof findOperation<TOperationGeneric>\n findByID: typeof findByIDOperation<TOperationGeneric>\n forgotPassword: typeof forgotPasswordOperation\n login: typeof loginOperation<TOperationGeneric>\n refresh: typeof refreshOperation\n update: typeof updateOperation<TOperationGeneric>\n updateByID: typeof updateByIDOperation<TOperationGeneric>\n}\n\nexport type AfterOperationArg<TOperationGeneric extends CollectionSlug> = {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n req: PayloadRequest\n} & (\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['count']>[0]\n operation: 'count'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['count']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['create']>[0]\n operation: 'create'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['create']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['delete']>[0]\n operation: 'delete'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['delete']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['deleteByID']>[0]\n operation: 'deleteByID'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['deleteByID']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['find']>[0]\n operation: 'find'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['find']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['findByID']>[0]\n operation: 'findByID'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['findByID']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['forgotPassword']>[0]\n operation: 'forgotPassword'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['forgotPassword']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['login']>[0]\n operation: 'login'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['login']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['refresh']>[0]\n operation: 'refresh'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['refresh']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['update']>[0]\n operation: 'update'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['update']>>\n }\n | {\n args: Parameters<AfterOperationMap<TOperationGeneric>['updateByID']>[0]\n operation: 'updateByID'\n result: Awaited<ReturnType<AfterOperationMap<TOperationGeneric>['updateByID']>>\n }\n)\n\ntype OperationResult<\n TOperationGeneric extends CollectionSlug,\n O extends keyof AfterOperationMap<TOperationGeneric>,\n> = Awaited<ReturnType<AfterOperationMap<TOperationGeneric>[O]>>\n\nexport const buildAfterOperation = async <\n TOperationGeneric extends CollectionSlug,\n O extends keyof AfterOperationMap<TOperationGeneric> = keyof AfterOperationMap<TOperationGeneric>,\n>(\n operationArgs: { operation: O } & Omit<AfterOperationArg<TOperationGeneric>, 'req'>,\n): Promise<any | OperationResult<TOperationGeneric, O>> => {\n const { args, collection, operation, result } = operationArgs\n\n let newResult = result as OperationResult<TOperationGeneric, O>\n\n await args.collection.config.hooks.afterOperation.reduce(\n async (priorHook, hook: AfterOperationHook<TOperationGeneric>) => {\n await priorHook\n\n const hookResult = await hook({\n args,\n collection,\n operation,\n req: args.req,\n result: newResult,\n } as AfterOperationArg<TOperationGeneric>)\n\n if (hookResult !== undefined) {\n newResult = hookResult as OperationResult<TOperationGeneric, O>\n }\n },\n Promise.resolve(),\n )\n\n return newResult\n}\n"],"names":["buildAfterOperation","operationArgs","args","collection","operation","result","newResult","config","hooks","afterOperation","reduce","priorHook","hook","hookResult","req","undefined","Promise","resolve"],"mappings":"AAgGA,OAAO,MAAMA,sBAAsB,OAIjCC;IAEA,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGJ;IAEhD,IAAIK,YAAYD;IAEhB,MAAMH,KAAKC,UAAU,CAACI,MAAM,CAACC,KAAK,CAACC,cAAc,CAACC,MAAM,CACtD,OAAOC,WAAWC;QAChB,MAAMD;QAEN,MAAME,aAAa,MAAMD,KAAK;YAC5BV;YACAC;YACAC;YACAU,KAAKZ,KAAKY,GAAG;YACbT,QAAQC;QACV;QAEA,IAAIO,eAAeE,WAAW;YAC5BT,YAAYO;QACd;IACF,GACAG,QAAQC,OAAO;IAGjB,OAAOX;AACT,EAAC"}
|
package/dist/config/client.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ export type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'],
|
|
|
7
7
|
export type ClientConfig = {
|
|
8
8
|
admin: {
|
|
9
9
|
components: {
|
|
10
|
-
Avatar: MappedComponent;
|
|
11
|
-
LogoutButton?: MappedComponent;
|
|
12
10
|
actions?: MappedComponent[];
|
|
11
|
+
Avatar: MappedComponent;
|
|
13
12
|
graphics: {
|
|
14
13
|
Icon: MappedComponent;
|
|
15
14
|
Logo: MappedComponent;
|
|
16
15
|
};
|
|
16
|
+
LogoutButton?: MappedComponent;
|
|
17
17
|
};
|
|
18
18
|
dependencies?: Record<string, MappedComponent>;
|
|
19
19
|
livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAA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,EAAE;YACV,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;YAC3B,MAAM,EAAE,eAAe,CAAA;YACvB,QAAQ,EAAE;gBACR,IAAI,EAAE,eAAe,CAAA;gBACrB,IAAI,EAAE,eAAe,CAAA;aACtB,CAAA;YACD,YAAY,CAAC,EAAE,eAAe,CAAA;SAC/B,CAAA;QACD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;QAC9C,WAAW,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,CAAC,CAAA;KACvE,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc,GAAG,aAAa,CAAC,CAAA;IACjF,WAAW,EAAE,sBAAsB,EAAE,CAAA;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAC9B,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,wBAAwB,CAAC,CAAA;AAEzF,eAAO,MAAM,0BAA0B,EAAE,SAAS,OAAO,CAAC,wBAAwB,CAAC,EAiBlF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["import type { MappedComponent } from '../admin/types.js'\nimport type { ClientCollectionConfig } from '../collections/config/client.js'\nimport type { ClientGlobalConfig } from '../globals/config/client.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.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 | '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 components: {\n
|
|
1
|
+
{"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["import type { MappedComponent } from '../admin/types.js'\nimport type { ClientCollectionConfig } from '../collections/config/client.js'\nimport type { ClientGlobalConfig } from '../globals/config/client.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.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 | '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 components: {\n actions?: MappedComponent[]\n Avatar: MappedComponent\n graphics: {\n Icon: MappedComponent\n Logo: MappedComponent\n }\n LogoutButton?: MappedComponent\n }\n dependencies?: Record<string, MappedComponent>\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | ServerOnlyRootProperties>\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 // `admin`, `onInit`, `localization`, `collections`, and `globals` are all handled separately\n]\n"],"names":["serverOnlyConfigProperties"],"mappings":"AAiDA,OAAO,MAAMA,6BAA2E;IACtF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAED,CAAA"}
|