@payloadcms/plugin-import-export 4.0.0-internal.af6aad0 → 4.0.0-internal.b8a92d2
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/utilities/getFileFromDoc.js +3 -3
- package/dist/utilities/getFileFromDoc.js.map +1 -1
- package/dist/utilities/getSelect.d.ts.map +1 -1
- package/dist/utilities/getSelect.js +4 -2
- package/dist/utilities/getSelect.js.map +1 -1
- package/dist/utilities/setNestedValue.d.ts.map +1 -1
- package/dist/utilities/setNestedValue.js +20 -6
- package/dist/utilities/setNestedValue.js.map +1 -1
- package/package.json +8 -8
- package/dist/components/FieldsToExport/reduceFields.spec.js +0 -239
- package/dist/components/FieldsToExport/reduceFields.spec.js.map +0 -1
- package/dist/utilities/applyFieldHooks.spec.js +0 -205
- package/dist/utilities/applyFieldHooks.spec.js.map +0 -1
- package/dist/utilities/buildDisabledFieldRegex.spec.js +0 -64
- package/dist/utilities/buildDisabledFieldRegex.spec.js.map +0 -1
- package/dist/utilities/fieldPath.d.ts +0 -2
- package/dist/utilities/fieldPath.d.ts.map +0 -1
- package/dist/utilities/fieldPath.js +0 -8
- package/dist/utilities/fieldPath.js.map +0 -1
- package/dist/utilities/fieldToRegex.spec.js +0 -151
- package/dist/utilities/fieldToRegex.spec.js.map +0 -1
- package/dist/utilities/filterToSelectedFields.spec.js +0 -204
- package/dist/utilities/filterToSelectedFields.spec.js.map +0 -1
- package/dist/utilities/flattenObject.spec.js +0 -158
- package/dist/utilities/flattenObject.spec.js.map +0 -1
- package/dist/utilities/getExportFieldFunctions.spec.js +0 -50
- package/dist/utilities/getExportFieldFunctions.spec.js.map +0 -1
- package/dist/utilities/getImportFieldFunctions.spec.js +0 -167
- package/dist/utilities/getImportFieldFunctions.spec.js.map +0 -1
- package/dist/utilities/getSchemaColumns.spec.js +0 -157
- package/dist/utilities/getSchemaColumns.spec.js.map +0 -1
- package/dist/utilities/getSelect.spec.js +0 -70
- package/dist/utilities/getSelect.spec.js.map +0 -1
- package/dist/utilities/parseCSV.spec.js +0 -195
- package/dist/utilities/parseCSV.spec.js.map +0 -1
- package/dist/utilities/processRichTextField.spec.js +0 -308
- package/dist/utilities/processRichTextField.spec.js.map +0 -1
- package/dist/utilities/setNestedValue.spec.js +0 -164
- package/dist/utilities/setNestedValue.spec.js.map +0 -1
- package/dist/utilities/siblingDoc.spec.js +0 -278
- package/dist/utilities/siblingDoc.spec.js.map +0 -1
- package/dist/utilities/unflattenObject.spec.js +0 -819
- package/dist/utilities/unflattenObject.spec.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileRetrievalError, getFileByPath } from 'payload';
|
|
2
|
-
import {
|
|
2
|
+
import { downloadFileToBuffer } from 'payload/internal';
|
|
3
3
|
import { formatAdminURL } from 'payload/shared';
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves file data from an uploaded document, handling both local storage
|
|
@@ -33,7 +33,7 @@ import { formatAdminURL } from 'payload/shared';
|
|
|
33
33
|
}
|
|
34
34
|
if (doc.filename && doc.url) {
|
|
35
35
|
// Cloud storage or external - fetch via Payload's file endpoint
|
|
36
|
-
//
|
|
36
|
+
// downloadFileToBuffer constructs full URL, includes cookies for auth, and
|
|
37
37
|
// the request goes through Payload's handler chain (including storage adapter)
|
|
38
38
|
// For relative URLs, construct a full URL using formatAdminURL which properly
|
|
39
39
|
// handles serverURL, basePath, and other config. This is important in job contexts
|
|
@@ -44,7 +44,7 @@ import { formatAdminURL } from 'payload/shared';
|
|
|
44
44
|
path: doc.url,
|
|
45
45
|
serverURL: serverURL || req.origin
|
|
46
46
|
});
|
|
47
|
-
const file = await
|
|
47
|
+
const file = await downloadFileToBuffer({
|
|
48
48
|
data: {
|
|
49
49
|
filename: doc.filename,
|
|
50
50
|
url: fileUrl
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/getFileFromDoc.ts"],"sourcesContent":["import type { CollectionConfig, FileData, PayloadRequest, UploadConfig } from 'payload'\n\nimport { FileRetrievalError, getFileByPath } from 'payload'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/getFileFromDoc.ts"],"sourcesContent":["import type { CollectionConfig, FileData, PayloadRequest, UploadConfig } from 'payload'\n\nimport { FileRetrievalError, getFileByPath } from 'payload'\nimport { downloadFileToBuffer } from 'payload/internal'\nimport { formatAdminURL } from 'payload/shared'\n\ntype Args = {\n collectionConfig: CollectionConfig\n doc: { filename: string; mimeType?: string; url?: string }\n req: PayloadRequest\n}\n\ntype Result = {\n data: Buffer\n mimetype: string\n}\n\n/**\n * Retrieves file data from an uploaded document, handling both local storage\n * and cloud storage (S3, Azure, GCS, etc.) scenarios correctly.\n *\n * This function uses the same pattern as Payload's internal file retrieval:\n * - For local storage: reads directly from disk (efficient, no HTTP roundtrip)\n * - For cloud storage: fetches via Payload's file endpoint, which triggers\n * the storage adapter's staticHandler to serve the file\n */\nexport const getFileFromDoc = async ({ collectionConfig, doc, req }: Args): Promise<Result> => {\n const uploadConfig: UploadConfig =\n typeof collectionConfig.upload === 'object' ? collectionConfig.upload : {}\n const disableLocalStorage = uploadConfig.disableLocalStorage ?? false\n const staticDir = uploadConfig.staticDir || collectionConfig.slug\n\n const serverURL = req.payload.config.serverURL\n const isLocalFile = (serverURL && doc.url?.startsWith(serverURL)) || doc.url?.startsWith('/')\n\n if (!disableLocalStorage && isLocalFile && doc.filename) {\n // Local storage enabled - read directly from disk (efficient, no HTTP roundtrip)\n const filePath = `${staticDir}/${doc.filename}`\n const file = await getFileByPath(filePath)\n\n if (!file) {\n throw new Error(`File not found at path: ${filePath}`)\n }\n\n const mimetype = file.mimetype || doc.mimeType\n\n if (!mimetype) {\n throw new FileRetrievalError(req.t, `Unable to determine mimetype for file: ${doc.filename}`)\n }\n\n return {\n data: file.data,\n mimetype,\n }\n }\n\n if (doc.filename && doc.url) {\n // Cloud storage or external - fetch via Payload's file endpoint\n // downloadFileToBuffer constructs full URL, includes cookies for auth, and\n // the request goes through Payload's handler chain (including storage adapter)\n\n // For relative URLs, construct a full URL using formatAdminURL which properly\n // handles serverURL, basePath, and other config. This is important in job contexts\n // where request headers may not be available for URL construction.\n // Use serverURL from config, falling back to req.origin for local/job requests.\n const fileUrl = doc.url.startsWith('http')\n ? doc.url\n : formatAdminURL({\n apiRoute: '',\n path: doc.url as `/${string}`,\n serverURL: serverURL || req.origin,\n })\n\n const file = await downloadFileToBuffer({\n data: { filename: doc.filename, url: fileUrl } as FileData,\n req,\n uploadConfig,\n })\n\n const mimetype = file.mimetype || doc.mimeType\n\n if (!mimetype) {\n throw new FileRetrievalError(req.t, `Unable to determine mimetype for file: ${doc.filename}`)\n }\n\n return {\n data: file.data,\n mimetype,\n }\n }\n\n throw new Error('Unable to retrieve file: missing filename or url')\n}\n"],"names":["FileRetrievalError","getFileByPath","downloadFileToBuffer","formatAdminURL","getFileFromDoc","collectionConfig","doc","req","uploadConfig","upload","disableLocalStorage","staticDir","slug","serverURL","payload","config","isLocalFile","url","startsWith","filename","filePath","file","Error","mimetype","mimeType","t","data","fileUrl","apiRoute","path","origin"],"mappings":"AAEA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,UAAS;AAC3D,SAASC,oBAAoB,QAAQ,mBAAkB;AACvD,SAASC,cAAc,QAAQ,iBAAgB;AAa/C;;;;;;;;CAQC,GACD,OAAO,MAAMC,iBAAiB,OAAO,EAAEC,gBAAgB,EAAEC,GAAG,EAAEC,GAAG,EAAQ;IACvE,MAAMC,eACJ,OAAOH,iBAAiBI,MAAM,KAAK,WAAWJ,iBAAiBI,MAAM,GAAG,CAAC;IAC3E,MAAMC,sBAAsBF,aAAaE,mBAAmB,IAAI;IAChE,MAAMC,YAAYH,aAAaG,SAAS,IAAIN,iBAAiBO,IAAI;IAEjE,MAAMC,YAAYN,IAAIO,OAAO,CAACC,MAAM,CAACF,SAAS;IAC9C,MAAMG,cAAc,AAACH,aAAaP,IAAIW,GAAG,EAAEC,WAAWL,cAAeP,IAAIW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AAClB,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSelect.d.ts","sourceRoot":"","sources":["../../src/utilities/getSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"getSelect.d.ts","sourceRoot":"","sources":["../../src/utilities/getSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAOhD;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,WAAY,MAAM,EAAE,KAAG,iBAyB5C,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIError } from 'payload';
|
|
2
|
-
import { hasUnsupportedFieldPathSegment } from '
|
|
2
|
+
import { hasUnsupportedFieldPathSegment } from 'payload/shared';
|
|
3
3
|
const createSelect = ()=>Object.create(null);
|
|
4
4
|
/**
|
|
5
5
|
* Takes an input of array of string paths in dot notation and returns a select object.
|
|
@@ -12,7 +12,9 @@ const createSelect = ()=>Object.create(null);
|
|
|
12
12
|
const select = createSelect();
|
|
13
13
|
fields.forEach((field)=>{
|
|
14
14
|
const segments = field.split('.');
|
|
15
|
-
if (hasUnsupportedFieldPathSegment(
|
|
15
|
+
if (hasUnsupportedFieldPathSegment({
|
|
16
|
+
segments
|
|
17
|
+
})) {
|
|
16
18
|
throw new APIError('Invalid field path.', 400, null, true);
|
|
17
19
|
}
|
|
18
20
|
let selectRef = select;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/getSelect.ts"],"sourcesContent":["import type { SelectIncludeType } from 'payload'\n\nimport { APIError } from 'payload'\
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/getSelect.ts"],"sourcesContent":["import type { SelectIncludeType } from 'payload'\n\nimport { APIError } from 'payload'\nimport { hasUnsupportedFieldPathSegment } from 'payload/shared'\n\nconst createSelect = (): SelectIncludeType => Object.create(null) as SelectIncludeType\n\n/**\n * Takes an input of array of string paths in dot notation and returns a select object.\n * Used for both export and import to build Payload's select query format.\n *\n * @example\n * getSelect(['id', 'title', 'group.value', 'createdAt', 'updatedAt'])\n * // Returns: { id: true, title: true, group: { value: true }, createdAt: true, updatedAt: true }\n */\nexport const getSelect = (fields: string[]): SelectIncludeType => {\n const select = createSelect()\n\n fields.forEach((field) => {\n const segments = field.split('.')\n\n if (hasUnsupportedFieldPathSegment({ segments })) {\n throw new APIError('Invalid field path.', 400, null, true)\n }\n\n let selectRef = select\n\n segments.forEach((segment, i) => {\n if (i === segments.length - 1) {\n selectRef[segment] = true\n } else {\n if (!Object.prototype.hasOwnProperty.call(selectRef, segment)) {\n selectRef[segment] = createSelect()\n }\n selectRef = selectRef[segment] as SelectIncludeType\n }\n })\n })\n\n return select\n}\n"],"names":["APIError","hasUnsupportedFieldPathSegment","createSelect","Object","create","getSelect","fields","select","forEach","field","segments","split","selectRef","segment","i","length","prototype","hasOwnProperty","call"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,UAAS;AAClC,SAASC,8BAA8B,QAAQ,iBAAgB;AAE/D,MAAMC,eAAe,IAAyBC,OAAOC,MAAM,CAAC;AAE5D;;;;;;;CAOC,GACD,OAAO,MAAMC,YAAY,CAACC;IACxB,MAAMC,SAASL;IAEfI,OAAOE,OAAO,CAAC,CAACC;QACd,MAAMC,WAAWD,MAAME,KAAK,CAAC;QAE7B,IAAIV,+BAA+B;YAAES;QAAS,IAAI;YAChD,MAAM,IAAIV,SAAS,uBAAuB,KAAK,MAAM;QACvD;QAEA,IAAIY,YAAYL;QAEhBG,SAASF,OAAO,CAAC,CAACK,SAASC;YACzB,IAAIA,MAAMJ,SAASK,MAAM,GAAG,GAAG;gBAC7BH,SAAS,CAACC,QAAQ,GAAG;YACvB,OAAO;gBACL,IAAI,CAACV,OAAOa,SAAS,CAACC,cAAc,CAACC,IAAI,CAACN,WAAWC,UAAU;oBAC7DD,SAAS,CAACC,QAAQ,GAAGX;gBACvB;gBACAU,YAAYA,SAAS,CAACC,QAAQ;YAChC;QACF;IACF;IAEA,OAAON;AACT,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setNestedValue.d.ts","sourceRoot":"","sources":["../../src/utilities/setNestedValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setNestedValue.d.ts","sourceRoot":"","sources":["../../src/utilities/setNestedValue.ts"],"names":[],"mappings":"AAoDA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,cAAc,QACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QACtB,MAAM,SACL,OAAO,WACL,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC/B,IAyCF,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIError } from 'payload';
|
|
2
|
-
import { hasUnsupportedFieldPathSegment } from '
|
|
2
|
+
import { hasUnsupportedFieldPathSegment, setOwnProperty } from 'payload/shared';
|
|
3
3
|
const MAX_UNVERIFIED_SPARSE_ARRAY_GAP = 1;
|
|
4
4
|
const createObject = ()=>Object.create(null);
|
|
5
5
|
const isArrayIndex = (part)=>{
|
|
@@ -24,6 +24,9 @@ const getSourceValue = (source, part)=>{
|
|
|
24
24
|
return undefined;
|
|
25
25
|
}
|
|
26
26
|
const key = Array.isArray(source) && isArrayIndex(part) ? Number(part) : part;
|
|
27
|
+
if (!Object.hasOwn(source, key)) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
27
30
|
return source[key];
|
|
28
31
|
};
|
|
29
32
|
/**
|
|
@@ -45,7 +48,9 @@ const getSourceValue = (source, part)=>{
|
|
|
45
48
|
* @param source - The source object used to validate array boundaries.
|
|
46
49
|
*/ export const setNestedValue = (obj, path, value, source)=>{
|
|
47
50
|
const parts = path.split('.');
|
|
48
|
-
if (hasUnsupportedFieldPathSegment(
|
|
51
|
+
if (hasUnsupportedFieldPathSegment({
|
|
52
|
+
segments: parts
|
|
53
|
+
})) {
|
|
49
54
|
throw new APIError('Invalid field path.', 400, null, true);
|
|
50
55
|
}
|
|
51
56
|
const lastPart = parts.pop();
|
|
@@ -59,16 +64,25 @@ const getSourceValue = (source, part)=>{
|
|
|
59
64
|
const currentRecord = current;
|
|
60
65
|
const nextPart = parts[i + 1] ?? lastPart;
|
|
61
66
|
const nextSource = getSourceValue(sourceCurrent, part);
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
const hasOwnNextValue = Object.hasOwn(currentRecord, key);
|
|
68
|
+
const nextValue = hasOwnNextValue ? currentRecord[key] : undefined;
|
|
69
|
+
if (!hasOwnNextValue || typeof nextValue !== 'object' || nextValue === null) {
|
|
70
|
+
setOwnProperty({
|
|
71
|
+
key,
|
|
72
|
+
target: currentRecord,
|
|
73
|
+
value: isArrayIndex(nextPart) ? [] : createObject()
|
|
74
|
+
});
|
|
65
75
|
}
|
|
66
76
|
current = currentRecord[key];
|
|
67
77
|
sourceCurrent = nextSource;
|
|
68
78
|
}
|
|
69
79
|
const lastKey = getPathKey(current, lastPart, sourceCurrent);
|
|
70
80
|
const finalRecord = current;
|
|
71
|
-
|
|
81
|
+
setOwnProperty({
|
|
82
|
+
key: lastKey,
|
|
83
|
+
target: finalRecord,
|
|
84
|
+
value
|
|
85
|
+
});
|
|
72
86
|
};
|
|
73
87
|
|
|
74
88
|
//# sourceMappingURL=setNestedValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/setNestedValue.ts"],"sourcesContent":["import { APIError } from 'payload'\
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/setNestedValue.ts"],"sourcesContent":["import { APIError } from 'payload'\nimport { hasUnsupportedFieldPathSegment, setOwnProperty } from 'payload/shared'\n\nconst MAX_UNVERIFIED_SPARSE_ARRAY_GAP = 1\n\nconst createObject = (): Record<string, unknown> => Object.create(null) as Record<string, unknown>\n\nconst isArrayIndex = (part: string): boolean => {\n if (!/^(?:0|[1-9]\\d*)$/.test(part)) {\n return false\n }\n\n const index = Number(part)\n\n return Number.isSafeInteger(index) && index >= 0\n}\n\nconst getPathKey = (\n target: Record<string, unknown> | unknown[],\n part: string,\n source: unknown,\n): number | string => {\n if (!Array.isArray(target) || !isArrayIndex(part)) {\n return part\n }\n\n const index = Number(part)\n\n if (\n (Array.isArray(source) && index >= source.length) ||\n (!Array.isArray(source) && index > target.length + MAX_UNVERIFIED_SPARSE_ARRAY_GAP)\n ) {\n throw new APIError('Invalid field path.', 400, null, true)\n }\n\n return index\n}\n\nconst getSourceValue = (source: unknown, part: string): unknown => {\n if (source === null || typeof source !== 'object') {\n return undefined\n }\n\n const key = Array.isArray(source) && isArrayIndex(part) ? Number(part) : part\n\n if (!Object.hasOwn(source, key)) {\n return undefined\n }\n\n return (source as Record<number | string, unknown>)[key]\n}\n\n/**\n * Sets a value deeply into a nested object or array, based on a dot-notation path.\n *\n * This function:\n * - Supports array indexing (e.g., \"array.0.field1\")\n * - Creates intermediate arrays/objects as needed\n * - Mutates the target object directly\n *\n * @example\n * const obj = {}\n * setNestedValue(obj, 'group.array.0.field1', 'hello')\n * // Result: { group: { array: [ { field1: 'hello' } ] } }\n *\n * @param obj - The target object to mutate.\n * @param path - A dot-separated string path indicating where to assign the value.\n * @param value - The value to set at the specified path.\n * @param source - The source object used to validate array boundaries.\n */\n\nexport const setNestedValue = (\n obj: Record<string, unknown>,\n path: string,\n value: unknown,\n source?: Record<string, unknown>,\n): void => {\n const parts = path.split('.')\n\n if (hasUnsupportedFieldPathSegment({ segments: parts })) {\n throw new APIError('Invalid field path.', 400, null, true)\n }\n\n const lastPart = parts.pop()\n\n if (lastPart === undefined) {\n return\n }\n\n let current: Record<string, unknown> | unknown[] = obj\n let sourceCurrent: unknown = source\n\n for (const [i, part] of parts.entries()) {\n const key = getPathKey(current, part, sourceCurrent)\n const currentRecord = current as Record<number | string, unknown>\n const nextPart = parts[i + 1] ?? lastPart\n const nextSource = getSourceValue(sourceCurrent, part)\n\n const hasOwnNextValue = Object.hasOwn(currentRecord, key)\n const nextValue = hasOwnNextValue ? currentRecord[key] : undefined\n\n if (!hasOwnNextValue || typeof nextValue !== 'object' || nextValue === null) {\n setOwnProperty({\n key,\n target: currentRecord,\n value: isArrayIndex(nextPart) ? [] : createObject(),\n })\n }\n\n current = currentRecord[key] as Record<string, unknown> | unknown[]\n sourceCurrent = nextSource\n }\n\n const lastKey = getPathKey(current, lastPart, sourceCurrent)\n const finalRecord = current as Record<number | string, unknown>\n\n setOwnProperty({ key: lastKey, target: finalRecord, value })\n}\n"],"names":["APIError","hasUnsupportedFieldPathSegment","setOwnProperty","MAX_UNVERIFIED_SPARSE_ARRAY_GAP","createObject","Object","create","isArrayIndex","part","test","index","Number","isSafeInteger","getPathKey","target","source","Array","isArray","length","getSourceValue","undefined","key","hasOwn","setNestedValue","obj","path","value","parts","split","segments","lastPart","pop","current","sourceCurrent","i","entries","currentRecord","nextPart","nextSource","hasOwnNextValue","nextValue","lastKey","finalRecord"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAS;AAClC,SAASC,8BAA8B,EAAEC,cAAc,QAAQ,iBAAgB;AAE/E,MAAMC,kCAAkC;AAExC,MAAMC,eAAe,IAA+BC,OAAOC,MAAM,CAAC;AAElE,MAAMC,eAAe,CAACC;IACpB,IAAI,CAAC,mBAAmBC,IAAI,CAACD,OAAO;QAClC,OAAO;IACT;IAEA,MAAME,QAAQC,OAAOH;IAErB,OAAOG,OAAOC,aAAa,CAACF,UAAUA,SAAS;AACjD;AAEA,MAAMG,aAAa,CACjBC,QACAN,MACAO;IAEA,IAAI,CAACC,MAAMC,OAAO,CAACH,WAAW,CAACP,aAAaC,OAAO;QACjD,OAAOA;IACT;IAEA,MAAME,QAAQC,OAAOH;IAErB,IACE,AAACQ,MAAMC,OAAO,CAACF,WAAWL,SAASK,OAAOG,MAAM,IAC/C,CAACF,MAAMC,OAAO,CAACF,WAAWL,QAAQI,OAAOI,MAAM,G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a,CAACf,IAAI;QAC5BY,gBAAgBK;IAClB;IAEA,MAAMG,UAAU5B,WAAWmB,SAASF,UAAUG;IAC9C,MAAMS,cAAcV;IAEpB9B,eAAe;QAAEmB,KAAKoB;QAAS3B,QAAQ4B;QAAahB;IAAM;AAC5D,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-import-export",
|
|
3
|
-
"version": "4.0.0-internal.
|
|
3
|
+
"version": "4.0.0-internal.b8a92d2",
|
|
4
4
|
"description": "Import-Export plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
"csv-parse": "5.6.0",
|
|
65
65
|
"csv-stringify": "6.5.2",
|
|
66
66
|
"qs-esm": "8.0.1",
|
|
67
|
-
"@payloadcms/translations": "4.0.0-internal.
|
|
68
|
-
"@payloadcms/ui": "4.0.0-internal.
|
|
67
|
+
"@payloadcms/translations": "4.0.0-internal.b8a92d2",
|
|
68
|
+
"@payloadcms/ui": "4.0.0-internal.b8a92d2"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@payloadcms/eslint-config": "3.28.0",
|
|
72
|
-
"@payloadcms/ui": "4.0.0-internal.
|
|
73
|
-
"payload": "4.0.0-internal.
|
|
72
|
+
"@payloadcms/ui": "4.0.0-internal.b8a92d2",
|
|
73
|
+
"payload": "4.0.0-internal.b8a92d2"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
76
|
+
"payload": "4.0.0-internal.b8a92d2",
|
|
77
|
+
"@payloadcms/ui": "4.0.0-internal.b8a92d2"
|
|
78
78
|
},
|
|
79
79
|
"homepage:": "https://payloadcms.com",
|
|
80
80
|
"scripts": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
84
84
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
85
85
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
86
|
-
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
86
|
+
"copyfiles": "copyfiles -u 1 -e \"**/*.spec.*\" \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
87
87
|
"lint": "eslint .",
|
|
88
88
|
"lint:fix": "eslint . --fix"
|
|
89
89
|
}
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { reduceFields } from './reduceFields.js';
|
|
3
|
-
const values = (result)=>result.map((f)=>f.value);
|
|
4
|
-
describe('reduceFields', ()=>{
|
|
5
|
-
describe('excludeUnsortable', ()=>{
|
|
6
|
-
it('should include array and blocks fields by default', ()=>{
|
|
7
|
-
const fields = [
|
|
8
|
-
{
|
|
9
|
-
name: 'title',
|
|
10
|
-
type: 'text'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'items',
|
|
14
|
-
type: 'array',
|
|
15
|
-
fields: [
|
|
16
|
-
{
|
|
17
|
-
name: 'text',
|
|
18
|
-
type: 'text'
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'layout',
|
|
24
|
-
type: 'blocks',
|
|
25
|
-
blocks: []
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
const result = values(reduceFields({
|
|
29
|
-
fields
|
|
30
|
-
}));
|
|
31
|
-
expect(result).toContain('title');
|
|
32
|
-
expect(result).toContain('items');
|
|
33
|
-
expect(result).toContain('layout');
|
|
34
|
-
});
|
|
35
|
-
it('should exclude array fields when excludeUnsortable is true', ()=>{
|
|
36
|
-
const fields = [
|
|
37
|
-
{
|
|
38
|
-
name: 'title',
|
|
39
|
-
type: 'text'
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'items',
|
|
43
|
-
type: 'array',
|
|
44
|
-
fields: [
|
|
45
|
-
{
|
|
46
|
-
name: 'text',
|
|
47
|
-
type: 'text'
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
const result = values(reduceFields({
|
|
53
|
-
excludeUnsortable: true,
|
|
54
|
-
fields
|
|
55
|
-
}));
|
|
56
|
-
expect(result).toContain('title');
|
|
57
|
-
expect(result).not.toContain('items');
|
|
58
|
-
});
|
|
59
|
-
it('should exclude blocks fields when excludeUnsortable is true', ()=>{
|
|
60
|
-
const fields = [
|
|
61
|
-
{
|
|
62
|
-
name: 'title',
|
|
63
|
-
type: 'text'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'layout',
|
|
67
|
-
type: 'blocks',
|
|
68
|
-
blocks: []
|
|
69
|
-
}
|
|
70
|
-
];
|
|
71
|
-
const result = values(reduceFields({
|
|
72
|
-
excludeUnsortable: true,
|
|
73
|
-
fields
|
|
74
|
-
}));
|
|
75
|
-
expect(result).toContain('title');
|
|
76
|
-
expect(result).not.toContain('layout');
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
describe('disabledFields', ()=>{
|
|
80
|
-
it('should include all fields when disabledFields is empty', ()=>{
|
|
81
|
-
const fields = [
|
|
82
|
-
{
|
|
83
|
-
name: 'title',
|
|
84
|
-
type: 'text'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: 'slug',
|
|
88
|
-
type: 'text'
|
|
89
|
-
}
|
|
90
|
-
];
|
|
91
|
-
const result = values(reduceFields({
|
|
92
|
-
disabledFields: [],
|
|
93
|
-
fields
|
|
94
|
-
}));
|
|
95
|
-
expect(result).toContain('title');
|
|
96
|
-
expect(result).toContain('slug');
|
|
97
|
-
});
|
|
98
|
-
it('should exclude a field whose path is in disabledFields', ()=>{
|
|
99
|
-
const fields = [
|
|
100
|
-
{
|
|
101
|
-
name: 'title',
|
|
102
|
-
type: 'text'
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: 'slug',
|
|
106
|
-
type: 'text'
|
|
107
|
-
}
|
|
108
|
-
];
|
|
109
|
-
const result = values(reduceFields({
|
|
110
|
-
disabledFields: [
|
|
111
|
-
'slug'
|
|
112
|
-
],
|
|
113
|
-
fields
|
|
114
|
-
}));
|
|
115
|
-
expect(result).toContain('title');
|
|
116
|
-
expect(result).not.toContain('slug');
|
|
117
|
-
});
|
|
118
|
-
it('should exclude nested fields whose paths start with a disabled parent path', ()=>{
|
|
119
|
-
const fields = [
|
|
120
|
-
{
|
|
121
|
-
name: 'meta',
|
|
122
|
-
type: 'group',
|
|
123
|
-
fields: [
|
|
124
|
-
{
|
|
125
|
-
name: 'title',
|
|
126
|
-
type: 'text'
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'description',
|
|
130
|
-
type: 'text'
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
];
|
|
135
|
-
const result = values(reduceFields({
|
|
136
|
-
disabledFields: [
|
|
137
|
-
'meta.description'
|
|
138
|
-
],
|
|
139
|
-
fields
|
|
140
|
-
}));
|
|
141
|
-
expect(result).toContain('meta.title');
|
|
142
|
-
expect(result).not.toContain('meta.description');
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
describe('combined excludeUnsortable and disabledFields', ()=>{
|
|
146
|
-
it('should apply both filters simultaneously', ()=>{
|
|
147
|
-
const fields = [
|
|
148
|
-
{
|
|
149
|
-
name: 'title',
|
|
150
|
-
type: 'text'
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
name: 'slug',
|
|
154
|
-
type: 'text'
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'items',
|
|
158
|
-
type: 'array',
|
|
159
|
-
fields: [
|
|
160
|
-
{
|
|
161
|
-
name: 'text',
|
|
162
|
-
type: 'text'
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
];
|
|
167
|
-
const result = values(reduceFields({
|
|
168
|
-
disabledFields: [
|
|
169
|
-
'slug'
|
|
170
|
-
],
|
|
171
|
-
excludeUnsortable: true,
|
|
172
|
-
fields
|
|
173
|
-
}));
|
|
174
|
-
expect(result).toContain('title');
|
|
175
|
-
expect(result).not.toContain('slug');
|
|
176
|
-
expect(result).not.toContain('items');
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
describe('recursive propagation through group sub-fields', ()=>{
|
|
180
|
-
it('should propagate excludeUnsortable into group sub-fields', ()=>{
|
|
181
|
-
const fields = [
|
|
182
|
-
{
|
|
183
|
-
name: 'meta',
|
|
184
|
-
type: 'group',
|
|
185
|
-
fields: [
|
|
186
|
-
{
|
|
187
|
-
name: 'title',
|
|
188
|
-
type: 'text'
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
name: 'tags',
|
|
192
|
-
type: 'array',
|
|
193
|
-
fields: [
|
|
194
|
-
{
|
|
195
|
-
name: 'tag',
|
|
196
|
-
type: 'text'
|
|
197
|
-
}
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
];
|
|
203
|
-
const result = values(reduceFields({
|
|
204
|
-
excludeUnsortable: true,
|
|
205
|
-
fields
|
|
206
|
-
}));
|
|
207
|
-
expect(result).toContain('meta.title');
|
|
208
|
-
expect(result).not.toContain('meta.tags');
|
|
209
|
-
});
|
|
210
|
-
it('should propagate disabledFields into group sub-fields', ()=>{
|
|
211
|
-
const fields = [
|
|
212
|
-
{
|
|
213
|
-
name: 'meta',
|
|
214
|
-
type: 'group',
|
|
215
|
-
fields: [
|
|
216
|
-
{
|
|
217
|
-
name: 'title',
|
|
218
|
-
type: 'text'
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: 'description',
|
|
222
|
-
type: 'text'
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
];
|
|
227
|
-
const result = values(reduceFields({
|
|
228
|
-
disabledFields: [
|
|
229
|
-
'meta.description'
|
|
230
|
-
],
|
|
231
|
-
fields
|
|
232
|
-
}));
|
|
233
|
-
expect(result).toContain('meta.title');
|
|
234
|
-
expect(result).not.toContain('meta.description');
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
//# sourceMappingURL=reduceFields.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FieldsToExport/reduceFields.spec.ts"],"sourcesContent":["import type { ClientField } from 'payload'\n\nimport { describe, expect, it } from 'vitest'\n\nimport { reduceFields } from './reduceFields.js'\n\nconst values = (result: ReturnType<typeof reduceFields>) => result.map((f) => f.value)\n\ndescribe('reduceFields', () => {\n describe('excludeUnsortable', () => {\n it('should include array and blocks fields by default', () => {\n const fields: ClientField[] = [\n { name: 'title', type: 'text' },\n { name: 'items', type: 'array', fields: [{ name: 'text', type: 'text' }] },\n { name: 'layout', type: 'blocks', blocks: [] },\n ]\n\n const result = values(reduceFields({ fields }))\n\n expect(result).toContain('title')\n expect(result).toContain('items')\n expect(result).toContain('layout')\n })\n\n it('should exclude array fields when excludeUnsortable is true', () => {\n const fields: ClientField[] = [\n { name: 'title', type: 'text' },\n { name: 'items', type: 'array', fields: [{ name: 'text', type: 'text' }] },\n ]\n\n const result = values(reduceFields({ excludeUnsortable: true, fields }))\n\n expect(result).toContain('title')\n expect(result).not.toContain('items')\n })\n\n it('should exclude blocks fields when excludeUnsortable is true', () => {\n const fields: ClientField[] = [\n { name: 'title', type: 'text' },\n { name: 'layout', type: 'blocks', blocks: [] },\n ]\n\n const result = values(reduceFields({ excludeUnsortable: true, fields }))\n\n expect(result).toContain('title')\n expect(result).not.toContain('layout')\n })\n })\n\n describe('disabledFields', () => {\n it('should include all fields when disabledFields is empty', () => {\n const fields: ClientField[] = [\n { name: 'title', type: 'text' },\n { name: 'slug', type: 'text' },\n ]\n\n const result = values(reduceFields({ disabledFields: [], fields }))\n\n expect(result).toContain('title')\n expect(result).toContain('slug')\n })\n\n it('should exclude a field whose path is in disabledFields', () => {\n const fields: ClientField[] = [\n { name: 'title', type: 'text' },\n { name: 'slug', type: 'text' },\n ]\n\n const result = values(reduceFields({ disabledFields: ['slug'], fields }))\n\n expect(result).toContain('title')\n expect(result).not.toContain('slug')\n })\n\n it('should exclude nested fields whose paths start with a disabled parent path', () => {\n const fields: ClientField[] = [\n {\n name: 'meta',\n type: 'group',\n fields: [\n { name: 'title', type: 'text' },\n { name: 'description', type: 'text' },\n ],\n },\n ]\n\n const result = values(reduceFields({ disabledFields: ['meta.description'], fields }))\n\n expect(result).toContain('meta.title')\n expect(result).not.toContain('meta.description')\n })\n })\n\n describe('combined excludeUnsortable and disabledFields', () => {\n it('should apply both filters simultaneously', () => {\n const fields: ClientField[] = [\n { name: 'title', type: 'text' },\n { name: 'slug', type: 'text' },\n { name: 'items', type: 'array', fields: [{ name: 'text', type: 'text' }] },\n ]\n\n const result = values(\n reduceFields({ disabledFields: ['slug'], excludeUnsortable: true, fields }),\n )\n\n expect(result).toContain('title')\n expect(result).not.toContain('slug')\n expect(result).not.toContain('items')\n })\n })\n\n describe('recursive propagation through group sub-fields', () => {\n it('should propagate excludeUnsortable into group sub-fields', () => {\n const fields: ClientField[] = [\n {\n name: 'meta',\n type: 'group',\n fields: [\n { name: 'title', type: 'text' },\n { name: 'tags', type: 'array', fields: [{ name: 'tag', type: 'text' }] },\n ],\n },\n ]\n\n const result = values(reduceFields({ excludeUnsortable: true, fields }))\n\n expect(result).toContain('meta.title')\n expect(result).not.toContain('meta.tags')\n })\n\n it('should propagate disabledFields into group sub-fields', () => {\n const fields: ClientField[] = [\n {\n name: 'meta',\n type: 'group',\n fields: [\n { name: 'title', type: 'text' },\n { name: 'description', type: 'text' },\n ],\n },\n ]\n\n const result = values(reduceFields({ disabledFields: ['meta.description'], fields }))\n\n expect(result).toContain('meta.title')\n expect(result).not.toContain('meta.description')\n })\n })\n})\n"],"names":["describe","expect","it","reduceFields","values","result","map","f","value","fields","name","type","blocks","toContain","excludeUnsortable","not","disabledFields"],"mappings":"AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,SAAQ;AAE7C,SAASC,YAAY,QAAQ,oBAAmB;AAEhD,MAAMC,SAAS,CAACC,SAA4CA,OAAOC,GAAG,CAAC,CAACC,IAAMA,EAAEC,KAAK;AAErFR,SAAS,gBAAgB;IACvBA,SAAS,qBAAqB;QAC5BE,GAAG,qDAAqD;YACtD,MAAMO,SAAwB;gBAC5B;oBAAEC,MAAM;oBAASC,MAAM;gBAAO;gBAC9B;oBAAED,MAAM;oBAASC,MAAM;oBAASF,QAAQ;wBAAC;4BAAEC,MAAM;4BAAQC,MAAM;wBAAO;qBAAE;gBAAC;gBACzE;oBAAED,MAAM;oBAAUC,MAAM;oBAAUC,QAAQ,EAAE;gBAAC;aAC9C;YAED,MAAMP,SAASD,OAAOD,aAAa;gBAAEM;YAAO;YAE5CR,OAAOI,QAAQQ,SAAS,CAAC;YACzBZ,OAAOI,QAAQQ,SAAS,CAAC;YACzBZ,OAAOI,QAAQQ,SAAS,CAAC;QAC3B;QAEAX,GAAG,8DAA8D;YAC/D,MAAMO,SAAwB;gBAC5B;oBAAEC,MAAM;oBAASC,MAAM;gBAAO;gBAC9B;oBAAED,MAAM;oBAASC,MAAM;oBAASF,QAAQ;wBAAC;4BAAEC,MAAM;4BAAQC,MAAM;wBAAO;qBAAE;gBAAC;aAC1E;YAED,MAAMN,SAASD,OAAOD,aAAa;gBAAEW,mBAAmB;gBAAML;YAAO;YAErER,OAAOI,QAAQQ,SAAS,CAAC;YACzBZ,OAAOI,QAAQU,GAAG,CAACF,SAAS,CAAC;QAC/B;QAEAX,GAAG,+DAA+D;YAChE,MAAMO,SAAwB;gBAC5B;oBAAEC,MAAM;oBAASC,MAAM;gBAAO;gBAC9B;oBAAED,M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