@webiny/api-page-builder-import-export 0.0.0-unstable.97a151f74d → 0.0.0-unstable.98511f29f1
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/client.d.ts +2 -2
- package/client.js +2 -6
- package/client.js.map +1 -1
- package/export/combine/blocksHandler.d.ts +6 -0
- package/export/combine/blocksHandler.js +99 -0
- package/export/combine/blocksHandler.js.map +1 -0
- package/export/combine/formsHandler.d.ts +6 -0
- package/export/combine/formsHandler.js +99 -0
- package/export/combine/formsHandler.js.map +1 -0
- package/{exportPages → export}/combine/index.d.ts +3 -2
- package/export/combine/index.js +42 -0
- package/export/combine/index.js.map +1 -0
- package/export/combine/pagesHandler.d.ts +6 -0
- package/export/combine/pagesHandler.js +99 -0
- package/export/combine/pagesHandler.js.map +1 -0
- package/export/combine/templatesHandler.d.ts +6 -0
- package/export/combine/templatesHandler.js +99 -0
- package/export/combine/templatesHandler.js.map +1 -0
- package/export/process/blocksHandler.d.ts +6 -0
- package/export/process/blocksHandler.js +167 -0
- package/export/process/blocksHandler.js.map +1 -0
- package/export/process/exporters/BlockExporter.d.ts +13 -0
- package/export/process/exporters/BlockExporter.js +81 -0
- package/export/process/exporters/BlockExporter.js.map +1 -0
- package/export/process/exporters/FormExporter.d.ts +9 -0
- package/export/process/exporters/FormExporter.js +34 -0
- package/export/process/exporters/FormExporter.js.map +1 -0
- package/export/process/exporters/PageExporter.d.ts +11 -0
- package/export/process/exporters/PageExporter.js +58 -0
- package/export/process/exporters/PageExporter.js.map +1 -0
- package/export/process/exporters/PageTemplateExporter.d.ts +11 -0
- package/export/process/exporters/PageTemplateExporter.js +56 -0
- package/export/process/exporters/PageTemplateExporter.js.map +1 -0
- package/export/process/formsHandler.d.ts +6 -0
- package/export/process/formsHandler.js +187 -0
- package/export/process/formsHandler.js.map +1 -0
- package/{exportPages → export}/process/index.d.ts +4 -6
- package/export/process/index.js +39 -0
- package/export/process/index.js.map +1 -0
- package/export/process/pagesHandler.d.ts +6 -0
- package/export/process/pagesHandler.js +189 -0
- package/export/process/pagesHandler.js.map +1 -0
- package/export/process/templatesHandler.d.ts +6 -0
- package/export/process/templatesHandler.js +166 -0
- package/export/process/templatesHandler.js.map +1 -0
- package/{exportPages → export}/s3Stream.d.ts +5 -2
- package/{exportPages → export}/s3Stream.js +1 -20
- package/export/s3Stream.js.map +1 -0
- package/export/utils.d.ts +2 -0
- package/export/utils.js +35 -0
- package/export/utils.js.map +1 -0
- package/{exportPages → export}/zipper.d.ts +6 -5
- package/{exportPages → export}/zipper.js +38 -49
- package/export/zipper.js.map +1 -0
- package/graphql/crud/blocks.crud.d.ts +4 -0
- package/graphql/crud/blocks.crud.js +130 -0
- package/graphql/crud/blocks.crud.js.map +1 -0
- package/graphql/crud/forms.crud.d.ts +4 -0
- package/graphql/crud/forms.crud.js +134 -0
- package/graphql/crud/forms.crud.js.map +1 -0
- package/graphql/crud/importExportTasks.crud.d.ts +5 -0
- package/graphql/crud/{pageImportExportTasks.crud.js → importExportTasks.crud.js} +92 -139
- package/graphql/crud/importExportTasks.crud.js.map +1 -0
- package/graphql/crud/pages.crud.d.ts +3 -2
- package/graphql/crud/pages.crud.js +50 -59
- package/graphql/crud/pages.crud.js.map +1 -1
- package/graphql/crud/templates.crud.d.ts +4 -0
- package/graphql/crud/templates.crud.js +128 -0
- package/graphql/crud/templates.crud.js.map +1 -0
- package/graphql/crud.d.ts +2 -2
- package/graphql/crud.js +5 -7
- package/graphql/crud.js.map +1 -1
- package/graphql/graphql/blocks.gql.d.ts +4 -0
- package/graphql/graphql/blocks.gql.js +52 -0
- package/graphql/graphql/blocks.gql.js.map +1 -0
- package/graphql/graphql/forms.gql.d.ts +4 -0
- package/graphql/graphql/forms.gql.js +60 -0
- package/graphql/graphql/forms.gql.js.map +1 -0
- package/graphql/graphql/importExportTasks.gql.d.ts +4 -0
- package/graphql/graphql/{pageImportExportTasks.gql.js → importExportTasks.gql.js} +18 -23
- package/graphql/graphql/importExportTasks.gql.js.map +1 -0
- package/graphql/graphql/pages.gql.d.ts +2 -2
- package/graphql/graphql/pages.gql.js +4 -15
- package/graphql/graphql/pages.gql.js.map +1 -1
- package/graphql/graphql/templates.gql.d.ts +4 -0
- package/graphql/graphql/templates.gql.js +52 -0
- package/graphql/graphql/templates.gql.js.map +1 -0
- package/graphql/graphql/utils/resolve.d.ts +1 -1
- package/graphql/graphql/utils/resolve.js +0 -3
- package/graphql/graphql/utils/resolve.js.map +1 -1
- package/graphql/graphql.js +5 -6
- package/graphql/graphql.js.map +1 -1
- package/graphql/index.d.ts +2 -2
- package/graphql/index.js +0 -5
- package/graphql/index.js.map +1 -1
- package/graphql/types.d.ts +82 -23
- package/graphql/types.js.map +1 -1
- package/import/constants.d.ts +3 -0
- package/import/constants.js +14 -0
- package/import/constants.js.map +1 -0
- package/import/create/blocksHandler.d.ts +3 -0
- package/import/create/blocksHandler.js +99 -0
- package/import/create/blocksHandler.js.map +1 -0
- package/import/create/formsHandler.d.ts +3 -0
- package/import/create/formsHandler.js +103 -0
- package/import/create/formsHandler.js.map +1 -0
- package/{importPages → import}/create/index.d.ts +7 -5
- package/import/create/index.js +42 -0
- package/import/create/index.js.map +1 -0
- package/import/create/pagesHandler.d.ts +3 -0
- package/import/create/pagesHandler.js +103 -0
- package/import/create/pagesHandler.js.map +1 -0
- package/import/create/templatesHandler.d.ts +3 -0
- package/import/create/templatesHandler.js +99 -0
- package/import/create/templatesHandler.js.map +1 -0
- package/import/process/blocks/blocksHandler.d.ts +3 -0
- package/import/process/blocks/blocksHandler.js +168 -0
- package/import/process/blocks/blocksHandler.js.map +1 -0
- package/import/process/blocks/importBlock.d.ts +11 -0
- package/import/process/blocks/importBlock.js +106 -0
- package/import/process/blocks/importBlock.js.map +1 -0
- package/import/process/forms/formsHandler.d.ts +3 -0
- package/import/process/forms/formsHandler.js +176 -0
- package/import/process/forms/formsHandler.js.map +1 -0
- package/import/process/forms/importForm.d.ts +9 -0
- package/import/process/forms/importForm.js +43 -0
- package/import/process/forms/importForm.js.map +1 -0
- package/{importPages → import}/process/index.d.ts +5 -3
- package/import/process/index.js +39 -0
- package/import/process/index.js.map +1 -0
- package/import/process/pages/importPage.d.ts +11 -0
- package/import/process/pages/importPage.js +92 -0
- package/import/process/pages/importPage.js.map +1 -0
- package/import/process/pages/pagesHandler.d.ts +3 -0
- package/import/process/pages/pagesHandler.js +183 -0
- package/import/process/pages/pagesHandler.js.map +1 -0
- package/import/process/templates/importTemplate.d.ts +11 -0
- package/import/process/templates/importTemplate.js +66 -0
- package/import/process/templates/importTemplate.js.map +1 -0
- package/import/process/templates/templatesHandler.d.ts +3 -0
- package/import/process/templates/templatesHandler.js +170 -0
- package/import/process/templates/templatesHandler.js.map +1 -0
- package/import/utils/deleteS3Folder.d.ts +1 -0
- package/import/utils/deleteS3Folder.js +19 -0
- package/import/utils/deleteS3Folder.js.map +1 -0
- package/import/utils/extractAndUploadZipFileContents.d.ts +7 -0
- package/import/utils/extractAndUploadZipFileContents.js +122 -0
- package/import/utils/extractAndUploadZipFileContents.js.map +1 -0
- package/import/utils/extractZipAndUploadToS3.d.ts +2 -0
- package/import/utils/extractZipAndUploadToS3.js +98 -0
- package/import/utils/extractZipAndUploadToS3.js.map +1 -0
- package/import/utils/getFileNameWithoutExt.d.ts +1 -0
- package/import/utils/getFileNameWithoutExt.js +11 -0
- package/import/utils/getFileNameWithoutExt.js.map +1 -0
- package/import/utils/index.d.ts +9 -0
- package/import/utils/index.js +104 -0
- package/import/utils/index.js.map +1 -0
- package/import/utils/initialStats.d.ts +7 -0
- package/import/utils/initialStats.js +16 -0
- package/import/utils/initialStats.js.map +1 -0
- package/import/utils/prepareDataDirMap.d.ts +6 -0
- package/import/utils/prepareDataDirMap.js +29 -0
- package/import/utils/prepareDataDirMap.js.map +1 -0
- package/import/utils/updateFilesInData.d.ts +8 -0
- package/import/utils/updateFilesInData.js +49 -0
- package/import/utils/updateFilesInData.js.map +1 -0
- package/import/utils/uploadAssets.d.ts +10 -0
- package/import/utils/uploadAssets.js +87 -0
- package/import/utils/uploadAssets.js.map +1 -0
- package/import/utils/uploadFilesFromS3.d.ts +3 -0
- package/import/utils/uploadFilesFromS3.js +19 -0
- package/import/utils/uploadFilesFromS3.js.map +1 -0
- package/mockSecurity.js +0 -3
- package/mockSecurity.js.map +1 -1
- package/package.json +34 -37
- package/types.d.ts +83 -65
- package/types.js +69 -22
- package/types.js.map +1 -1
- package/exportPages/combine/index.js +0 -114
- package/exportPages/combine/index.js.map +0 -1
- package/exportPages/process/index.js +0 -208
- package/exportPages/process/index.js.map +0 -1
- package/exportPages/s3Stream.js.map +0 -1
- package/exportPages/utils.d.ts +0 -13
- package/exportPages/utils.js +0 -113
- package/exportPages/utils.js.map +0 -1
- package/exportPages/zipper.js.map +0 -1
- package/graphql/crud/pageImportExportTasks.crud.d.ts +0 -5
- package/graphql/crud/pageImportExportTasks.crud.js.map +0 -1
- package/graphql/graphql/pageImportExportTasks.gql.d.ts +0 -4
- package/graphql/graphql/pageImportExportTasks.gql.js.map +0 -1
- package/importPages/create/index.js +0 -118
- package/importPages/create/index.js.map +0 -1
- package/importPages/process/index.js +0 -185
- package/importPages/process/index.js.map +0 -1
- package/importPages/utils.d.ts +0 -50
- package/importPages/utils.js +0 -570
- package/importPages/utils.js.map +0 -1
@@ -0,0 +1,87 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.uploadAssets = void 0;
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
9
|
+
var _utils = require("@webiny/utils");
|
10
|
+
var _uploadFilesFromS = require("./uploadFilesFromS3");
|
11
|
+
function notAPreviouslyImportedFile(importedImages) {
|
12
|
+
return file => {
|
13
|
+
return !importedImages.some(existingImportedImage => existingImportedImage.meta.originalKey === file.key);
|
14
|
+
};
|
15
|
+
}
|
16
|
+
function notAnExistingFile(existingFiles) {
|
17
|
+
return file => {
|
18
|
+
return !existingFiles.some(existingFile => existingFile.key === file.key);
|
19
|
+
};
|
20
|
+
}
|
21
|
+
const uploadAssets = async params => {
|
22
|
+
const {
|
23
|
+
context,
|
24
|
+
files,
|
25
|
+
fileUploadsData
|
26
|
+
} = params;
|
27
|
+
const oldIdToNewFileMap = new Map();
|
28
|
+
|
29
|
+
/**
|
30
|
+
* This function contains logic of file download from S3.
|
31
|
+
* Current we're not mocking zip file download from S3 in tests at the moment.
|
32
|
+
* So, we're manually mocking it in case of test just by returning an empty object.
|
33
|
+
*/
|
34
|
+
if (process.env.NODE_ENV === "test") {
|
35
|
+
return oldIdToNewFileMap;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Check if the requested files were already imported in the past.
|
39
|
+
const [importedImages] = await context.fileManager.listFiles({
|
40
|
+
where: {
|
41
|
+
meta: {
|
42
|
+
originalKey_in: files.map(file => file.key)
|
43
|
+
}
|
44
|
+
}
|
45
|
+
});
|
46
|
+
|
47
|
+
// Link files that were already imported.
|
48
|
+
for (const importedImage of importedImages) {
|
49
|
+
const fileBeingImported = files.find(file => file.key === importedImage.meta.originalKey);
|
50
|
+
if (fileBeingImported) {
|
51
|
+
oldIdToNewFileMap.set(fileBeingImported.id, importedImage);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
// Check if files with such IDs already exist.
|
56
|
+
const [existingFiles] = await context.fileManager.listFiles({
|
57
|
+
where: {
|
58
|
+
id_in: files.map(file => file.id)
|
59
|
+
}
|
60
|
+
});
|
61
|
+
const newFilesToImport = files.filter(notAnExistingFile(existingFiles)).filter(notAPreviouslyImportedFile(importedImages));
|
62
|
+
|
63
|
+
// A map of temporary file keys (created during ZIP upload) to permanent file keys.
|
64
|
+
const uploadFileMap = new Map();
|
65
|
+
|
66
|
+
// Array of file inputs, to insert into the DB.
|
67
|
+
const createFilesInput = [];
|
68
|
+
for (const toImport of newFilesToImport) {
|
69
|
+
// We generate a new file id, key, and add `meta.originalKey` property to prevent duplicates on future imports.
|
70
|
+
const id = (0, _utils.mdbid)();
|
71
|
+
const newKey = `${id}/${toImport.key.replace(`${toImport.id}/`, "")}`;
|
72
|
+
const newFile = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, toImport), {}, {
|
73
|
+
id,
|
74
|
+
key: newKey,
|
75
|
+
meta: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, toImport.meta), {}, {
|
76
|
+
originalKey: toImport.key
|
77
|
+
})
|
78
|
+
});
|
79
|
+
createFilesInput.push(newFile);
|
80
|
+
oldIdToNewFileMap.set(toImport.id, newFile);
|
81
|
+
uploadFileMap.set(fileUploadsData.assets[toImport.key], newFile);
|
82
|
+
}
|
83
|
+
await (0, _uploadFilesFromS.uploadFilesFromS3)(uploadFileMap);
|
84
|
+
await context.fileManager.createFilesInBatch(createFilesInput);
|
85
|
+
return oldIdToNewFileMap;
|
86
|
+
};
|
87
|
+
exports.uploadAssets = uploadAssets;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_utils","require","_uploadFilesFromS","notAPreviouslyImportedFile","importedImages","file","some","existingImportedImage","meta","originalKey","key","notAnExistingFile","existingFiles","existingFile","uploadAssets","params","context","files","fileUploadsData","oldIdToNewFileMap","Map","process","env","NODE_ENV","fileManager","listFiles","where","originalKey_in","map","importedImage","fileBeingImported","find","set","id","id_in","newFilesToImport","filter","uploadFileMap","createFilesInput","toImport","mdbid","newKey","replace","newFile","_objectSpread2","default","push","assets","uploadFilesFromS3","createFilesInBatch","exports"],"sources":["uploadAssets.ts"],"sourcesContent":["import { mdbid } from \"@webiny/utils\";\nimport { PbImportExportContext } from \"~/graphql/types\";\nimport { File, FileInput } from \"@webiny/api-file-manager/types\";\nimport { UploadFileMap, uploadFilesFromS3 } from \"~/import/utils/uploadFilesFromS3\";\nimport { FileUploadsData } from \"~/types\";\n\ninterface UploadAssetsParams {\n context: PbImportExportContext;\n files: File[];\n fileUploadsData: FileUploadsData;\n}\n\nfunction notAPreviouslyImportedFile(importedImages: File[]) {\n return (file: File) => {\n return !importedImages.some(\n existingImportedImage => existingImportedImage.meta.originalKey === file.key\n );\n };\n}\n\nfunction notAnExistingFile(existingFiles: File[]) {\n return (file: File) => {\n return !existingFiles.some(existingFile => existingFile.key === file.key);\n };\n}\n\nexport const uploadAssets = async (params: UploadAssetsParams) => {\n const { context, files, fileUploadsData } = params;\n\n const oldIdToNewFileMap = new Map<string, FileInput>();\n\n /**\n * This function contains logic of file download from S3.\n * Current we're not mocking zip file download from S3 in tests at the moment.\n * So, we're manually mocking it in case of test just by returning an empty object.\n */\n if (process.env.NODE_ENV === \"test\") {\n return oldIdToNewFileMap;\n }\n\n // Check if the requested files were already imported in the past.\n const [importedImages] = await context.fileManager.listFiles({\n where: { meta: { originalKey_in: files.map(file => file.key) } }\n });\n\n // Link files that were already imported.\n for (const importedImage of importedImages) {\n const fileBeingImported = files.find(file => file.key === importedImage.meta.originalKey);\n\n if (fileBeingImported) {\n oldIdToNewFileMap.set(fileBeingImported.id, importedImage);\n }\n }\n\n // Check if files with such IDs already exist.\n const [existingFiles] = await context.fileManager.listFiles({\n where: { id_in: files.map(file => file.id) }\n });\n\n const newFilesToImport = files\n .filter(notAnExistingFile(existingFiles))\n .filter(notAPreviouslyImportedFile(importedImages));\n\n // A map of temporary file keys (created during ZIP upload) to permanent file keys.\n const uploadFileMap: UploadFileMap = new Map();\n\n // Array of file inputs, to insert into the DB.\n const createFilesInput: FileInput[] = [];\n\n for (const toImport of newFilesToImport) {\n // We generate a new file id, key, and add `meta.originalKey` property to prevent duplicates on future imports.\n const id = mdbid();\n const newKey = `${id}/${toImport.key.replace(`${toImport.id}/`, \"\")}`;\n const newFile: FileInput = {\n ...toImport,\n id,\n key: newKey,\n meta: { ...toImport.meta, originalKey: toImport.key }\n };\n\n createFilesInput.push(newFile);\n oldIdToNewFileMap.set(toImport.id, newFile);\n uploadFileMap.set(fileUploadsData.assets[toImport.key], newFile);\n }\n\n await uploadFilesFromS3(uploadFileMap);\n\n await context.fileManager.createFilesInBatch(createFilesInput);\n\n return oldIdToNewFileMap;\n};\n"],"mappings":"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"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.uploadFilesFromS3 = uploadFilesFromS3;
|
7
|
+
var _s3Stream = require("../../export/s3Stream");
|
8
|
+
async function uploadFilesFromS3(fileMap) {
|
9
|
+
const promises = [];
|
10
|
+
for (const [source, target] of Array.from(fileMap.entries())) {
|
11
|
+
// Read file.
|
12
|
+
const readStream = _s3Stream.s3Stream.readStream(source);
|
13
|
+
const ws = _s3Stream.s3Stream.writeStream(target.key, target.type);
|
14
|
+
readStream.pipe(ws.streamPassThrough);
|
15
|
+
promises.push(ws.streamPassThroughUploadPromise);
|
16
|
+
console.log(`Successfully queued file "${target.key}"`);
|
17
|
+
}
|
18
|
+
return Promise.all(promises);
|
19
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_s3Stream","require","uploadFilesFromS3","fileMap","promises","source","target","Array","from","entries","readStream","s3Stream","ws","writeStream","key","type","pipe","streamPassThrough","push","streamPassThroughUploadPromise","console","log","Promise","all"],"sources":["uploadFilesFromS3.ts"],"sourcesContent":["import { s3Stream } from \"~/export/s3Stream\";\nimport { FileInput } from \"@webiny/api-file-manager/types\";\n\nexport type UploadFileMap = Map<string, FileInput>;\n\nexport async function uploadFilesFromS3(fileMap: UploadFileMap) {\n const promises = [];\n for (const [source, target] of Array.from(fileMap.entries())) {\n // Read file.\n const readStream = s3Stream.readStream(source);\n\n const ws = s3Stream.writeStream(target.key, target.type);\n readStream.pipe(ws.streamPassThrough);\n promises.push(ws.streamPassThroughUploadPromise);\n\n console.log(`Successfully queued file \"${target.key}\"`);\n }\n\n return Promise.all(promises);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAKO,eAAeC,iBAAiBA,CAACC,OAAsB,EAAE;EAC5D,MAAMC,QAAQ,GAAG,EAAE;EACnB,KAAK,MAAM,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIC,KAAK,CAACC,IAAI,CAACL,OAAO,CAACM,OAAO,CAAC,CAAC,CAAC,EAAE;IAC1D;IACA,MAAMC,UAAU,GAAGC,kBAAQ,CAACD,UAAU,CAACL,MAAM,CAAC;IAE9C,MAAMO,EAAE,GAAGD,kBAAQ,CAACE,WAAW,CAACP,MAAM,CAACQ,GAAG,EAAER,MAAM,CAACS,IAAI,CAAC;IACxDL,UAAU,CAACM,IAAI,CAACJ,EAAE,CAACK,iBAAiB,CAAC;IACrCb,QAAQ,CAACc,IAAI,CAACN,EAAE,CAACO,8BAA8B,CAAC;IAEhDC,OAAO,CAACC,GAAG,CAAE,6BAA4Bf,MAAM,CAACQ,GAAI,GAAE,CAAC;EAC3D;EAEA,OAAOQ,OAAO,CAACC,GAAG,CAACnB,QAAQ,CAAC;AAChC"}
|
package/mockSecurity.js
CHANGED
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.mockSecurity = void 0;
|
7
|
-
|
8
7
|
const mockSecurity = (identity, context) => {
|
9
|
-
context.security.disableAuthorization();
|
10
8
|
context.security.setIdentity(identity);
|
11
9
|
};
|
12
|
-
|
13
10
|
exports.mockSecurity = mockSecurity;
|
package/mockSecurity.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["mockSecurity","identity","context","security","
|
1
|
+
{"version":3,"names":["mockSecurity","identity","context","security","setIdentity","exports"],"sources":["mockSecurity.ts"],"sourcesContent":["import { SecurityContext, SecurityIdentity } from \"@webiny/api-security/types\";\n\nexport const mockSecurity = (identity: SecurityIdentity, context: SecurityContext) => {\n context.security.setIdentity(identity);\n};\n"],"mappings":";;;;;;AAEO,MAAMA,YAAY,GAAGA,CAACC,QAA0B,EAAEC,OAAwB,KAAK;EAClFA,OAAO,CAACC,QAAQ,CAACC,WAAW,CAACH,QAAQ,CAAC;AAC1C,CAAC;AAACI,OAAA,CAAAL,YAAA,GAAAA,YAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@webiny/api-page-builder-import-export",
|
3
|
-
"version": "0.0.0-unstable.
|
3
|
+
"version": "0.0.0-unstable.98511f29f1",
|
4
4
|
"main": "index.js",
|
5
5
|
"keywords": [
|
6
6
|
"pbie:base"
|
@@ -14,53 +14,50 @@
|
|
14
14
|
"author": "Webiny Ltd",
|
15
15
|
"license": "MIT",
|
16
16
|
"dependencies": {
|
17
|
-
"@babel/runtime": "7.
|
17
|
+
"@babel/runtime": "7.22.6",
|
18
18
|
"@commodo/fields": "1.1.2-beta.20",
|
19
|
-
"@webiny/api": "0.0.0-unstable.
|
20
|
-
"@webiny/api-file-manager": "0.0.0-unstable.
|
21
|
-
"@webiny/api-
|
22
|
-
"@webiny/api-
|
23
|
-
"@webiny/
|
24
|
-
"@webiny/
|
25
|
-
"@webiny/handler
|
26
|
-
"@webiny/handler-
|
27
|
-
"@webiny/
|
28
|
-
"@webiny/
|
19
|
+
"@webiny/api": "0.0.0-unstable.98511f29f1",
|
20
|
+
"@webiny/api-file-manager": "0.0.0-unstable.98511f29f1",
|
21
|
+
"@webiny/api-form-builder": "0.0.0-unstable.98511f29f1",
|
22
|
+
"@webiny/api-page-builder": "0.0.0-unstable.98511f29f1",
|
23
|
+
"@webiny/api-security": "0.0.0-unstable.98511f29f1",
|
24
|
+
"@webiny/error": "0.0.0-unstable.98511f29f1",
|
25
|
+
"@webiny/handler": "0.0.0-unstable.98511f29f1",
|
26
|
+
"@webiny/handler-aws": "0.0.0-unstable.98511f29f1",
|
27
|
+
"@webiny/handler-graphql": "0.0.0-unstable.98511f29f1",
|
28
|
+
"@webiny/utils": "0.0.0-unstable.98511f29f1",
|
29
|
+
"@webiny/validation": "0.0.0-unstable.98511f29f1",
|
29
30
|
"archiver": "5.3.1",
|
30
31
|
"commodo-fields-object": "1.0.6",
|
31
32
|
"dot-prop-immutable": "2.1.1",
|
32
33
|
"fs-extra": "9.1.0",
|
33
34
|
"load-json-file": "6.2.0",
|
34
35
|
"lodash": "4.17.21",
|
35
|
-
"
|
36
|
-
"node-fetch": "2.6.7",
|
36
|
+
"node-fetch": "2.6.9",
|
37
37
|
"stream": "0.0.2",
|
38
38
|
"uniqid": "5.4.0",
|
39
39
|
"yauzl": "2.10.0"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@babel/cli": "
|
43
|
-
"@babel/core": "
|
44
|
-
"@babel/plugin-proposal-export-default-from": "
|
45
|
-
"@babel/preset-env": "
|
46
|
-
"@babel/preset-typescript": "
|
47
|
-
"@types/archiver": "
|
48
|
-
"@types/node-fetch": "
|
49
|
-
"@types/yauzl": "
|
50
|
-
"@webiny/api-
|
51
|
-
"@webiny/api-
|
52
|
-
"@webiny/api-
|
53
|
-
"@webiny/api-
|
54
|
-
"@webiny/
|
55
|
-
"@webiny/
|
56
|
-
"@webiny/
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"jest-dynalite": "^3.2.0",
|
62
|
-
"rimraf": "^3.0.2",
|
63
|
-
"ttypescript": "^1.5.12",
|
42
|
+
"@babel/cli": "7.22.6",
|
43
|
+
"@babel/core": "7.22.8",
|
44
|
+
"@babel/plugin-proposal-export-default-from": "7.18.10",
|
45
|
+
"@babel/preset-env": "7.22.7",
|
46
|
+
"@babel/preset-typescript": "7.22.5",
|
47
|
+
"@types/archiver": "5.3.1",
|
48
|
+
"@types/node-fetch": "2.6.2",
|
49
|
+
"@types/yauzl": "2.10.0",
|
50
|
+
"@webiny/api-authentication": "0.0.0-unstable.98511f29f1",
|
51
|
+
"@webiny/api-dynamodb-to-elasticsearch": "0.0.0-unstable.98511f29f1",
|
52
|
+
"@webiny/api-tenancy": "0.0.0-unstable.98511f29f1",
|
53
|
+
"@webiny/api-wcp": "0.0.0-unstable.98511f29f1",
|
54
|
+
"@webiny/cli": "0.0.0-unstable.98511f29f1",
|
55
|
+
"@webiny/db": "0.0.0-unstable.98511f29f1",
|
56
|
+
"@webiny/project-utils": "0.0.0-unstable.98511f29f1",
|
57
|
+
"jest": "29.5.0",
|
58
|
+
"jest-dynalite": "3.6.1",
|
59
|
+
"rimraf": "3.0.2",
|
60
|
+
"ttypescript": "1.5.15",
|
64
61
|
"typescript": "4.7.4"
|
65
62
|
},
|
66
63
|
"publishConfig": {
|
@@ -78,5 +75,5 @@
|
|
78
75
|
]
|
79
76
|
}
|
80
77
|
},
|
81
|
-
"gitHead": "
|
78
|
+
"gitHead": "98511f29f1e1fc7d03ed0d1379d0a0aeff6dae84"
|
82
79
|
}
|
package/types.d.ts
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
export * from "./graphql/types";
|
2
|
-
export declare enum
|
2
|
+
export declare enum ExportRevisionType {
|
3
3
|
PUBLISHED = "published",
|
4
4
|
LATEST = "latest"
|
5
5
|
}
|
6
|
-
export declare enum
|
6
|
+
export declare enum ImportExportTaskStatus {
|
7
7
|
PENDING = "pending",
|
8
8
|
PROCESSING = "processing",
|
9
9
|
COMPLETED = "completed",
|
10
10
|
FAILED = "failed"
|
11
11
|
}
|
12
|
-
export interface
|
13
|
-
[
|
14
|
-
[
|
15
|
-
[
|
16
|
-
[
|
12
|
+
export interface ImportExportTaskStats {
|
13
|
+
[ImportExportTaskStatus.PENDING]: number;
|
14
|
+
[ImportExportTaskStatus.PROCESSING]: number;
|
15
|
+
[ImportExportTaskStatus.COMPLETED]: number;
|
16
|
+
[ImportExportTaskStatus.FAILED]: number;
|
17
17
|
total: number;
|
18
18
|
}
|
19
19
|
interface CreatedBy {
|
@@ -21,12 +21,12 @@ interface CreatedBy {
|
|
21
21
|
type: string;
|
22
22
|
displayName: string | null;
|
23
23
|
}
|
24
|
-
export interface
|
24
|
+
export interface ImportExportTask {
|
25
25
|
id: string;
|
26
26
|
parent: string;
|
27
|
-
status:
|
27
|
+
status: ImportExportTaskStatus;
|
28
28
|
data: Record<string, any>;
|
29
|
-
stats:
|
29
|
+
stats: ImportExportTaskStats;
|
30
30
|
error: Record<string, any>;
|
31
31
|
input: Record<string, any>;
|
32
32
|
createdOn: string;
|
@@ -45,9 +45,9 @@ export interface MetaResponse {
|
|
45
45
|
}
|
46
46
|
/**
|
47
47
|
* @category StorageOperations
|
48
|
-
* @category
|
48
|
+
* @category ImportExportTaskStorageOperations
|
49
49
|
*/
|
50
|
-
export interface
|
50
|
+
export interface ImportExportTaskStorageOperationsGetParams {
|
51
51
|
where: {
|
52
52
|
id: string;
|
53
53
|
tenant: string;
|
@@ -56,9 +56,9 @@ export interface PageImportExportTaskStorageOperationsGetParams {
|
|
56
56
|
}
|
57
57
|
/**
|
58
58
|
* @category StorageOperations
|
59
|
-
* @category
|
59
|
+
* @category ImportExportTaskStorageOperations
|
60
60
|
*/
|
61
|
-
export interface
|
61
|
+
export interface ImportExportTaskStorageOperationsListParams {
|
62
62
|
where: {
|
63
63
|
tenant: string;
|
64
64
|
locale: string;
|
@@ -69,41 +69,38 @@ export interface PageImportExportTaskStorageOperationsListParams {
|
|
69
69
|
}
|
70
70
|
/**
|
71
71
|
* @category StorageOperations
|
72
|
-
* @category
|
72
|
+
* @category ImportExportTaskStorageOperations
|
73
73
|
*/
|
74
|
-
export declare type
|
75
|
-
PageImportExportTask[],
|
76
|
-
MetaResponse
|
77
|
-
];
|
74
|
+
export declare type ImportExportTaskStorageOperationsListResponse = [ImportExportTask[], MetaResponse];
|
78
75
|
/**
|
79
76
|
* @category StorageOperations
|
80
|
-
* @category
|
77
|
+
* @category ImportExportTaskStorageOperations
|
81
78
|
*/
|
82
|
-
export interface
|
79
|
+
export interface ImportExportTaskStorageOperationsCreateParams {
|
83
80
|
input: Record<string, any>;
|
84
|
-
task:
|
81
|
+
task: ImportExportTask;
|
85
82
|
}
|
86
83
|
/**
|
87
84
|
* @category StorageOperations
|
88
|
-
* @category
|
85
|
+
* @category ImportExportTaskStorageOperations
|
89
86
|
*/
|
90
|
-
export interface
|
87
|
+
export interface ImportExportTaskStorageOperationsUpdateParams {
|
91
88
|
input: Record<string, any>;
|
92
|
-
original:
|
93
|
-
task:
|
89
|
+
original: ImportExportTask;
|
90
|
+
task: ImportExportTask;
|
94
91
|
}
|
95
92
|
/**
|
96
93
|
* @category StorageOperations
|
97
|
-
* @category
|
94
|
+
* @category ImportExportTaskStorageOperations
|
98
95
|
*/
|
99
|
-
export interface
|
100
|
-
task:
|
96
|
+
export interface ImportExportTaskStorageOperationsDeleteParams {
|
97
|
+
task: ImportExportTask;
|
101
98
|
}
|
102
99
|
/**
|
103
100
|
* @category StorageOperations
|
104
|
-
* @category
|
101
|
+
* @category ImportExportTaskStorageOperations
|
105
102
|
*/
|
106
|
-
export interface
|
103
|
+
export interface ImportExportTaskStorageOperationsGetSubTaskParams {
|
107
104
|
where: {
|
108
105
|
id: string;
|
109
106
|
parent: string;
|
@@ -113,14 +110,14 @@ export interface PageImportExportTaskStorageOperationsGetSubTaskParams {
|
|
113
110
|
}
|
114
111
|
/**
|
115
112
|
* @category StorageOperations
|
116
|
-
* @category
|
113
|
+
* @category ImportExportTaskStorageOperations
|
117
114
|
*/
|
118
|
-
export interface
|
115
|
+
export interface ImportExportTaskStorageOperationsListSubTaskParams {
|
119
116
|
where: {
|
120
117
|
tenant: string;
|
121
118
|
locale: string;
|
122
119
|
parent: string;
|
123
|
-
status:
|
120
|
+
status: ImportExportTaskStatus;
|
124
121
|
createdBy?: string;
|
125
122
|
};
|
126
123
|
sort?: string[];
|
@@ -129,65 +126,86 @@ export interface PageImportExportTaskStorageOperationsListSubTaskParams {
|
|
129
126
|
}
|
130
127
|
/**
|
131
128
|
* @category StorageOperations
|
132
|
-
* @category
|
129
|
+
* @category ImportExportTaskStorageOperations
|
133
130
|
*/
|
134
|
-
export declare type
|
135
|
-
|
131
|
+
export declare type ImportExportTaskStorageOperationsListSubTaskResponse = [
|
132
|
+
ImportExportTask[],
|
136
133
|
MetaResponse
|
137
134
|
];
|
138
135
|
/**
|
139
136
|
* @category StorageOperations
|
140
|
-
* @category
|
137
|
+
* @category ImportExportTaskStorageOperations
|
141
138
|
*/
|
142
|
-
export interface
|
139
|
+
export interface ImportExportTaskStorageOperationsCreateSubTaskParams {
|
143
140
|
input: Record<string, any>;
|
144
|
-
subTask:
|
141
|
+
subTask: ImportExportTask;
|
145
142
|
}
|
146
143
|
/**
|
147
144
|
* @category StorageOperations
|
148
|
-
* @category
|
145
|
+
* @category ImportExportTaskStorageOperations
|
149
146
|
*/
|
150
|
-
export interface
|
147
|
+
export interface ImportExportTaskStorageOperationsUpdateSubTaskParams {
|
151
148
|
input: Record<string, any>;
|
152
|
-
original:
|
153
|
-
subTask:
|
149
|
+
original: ImportExportTask;
|
150
|
+
subTask: ImportExportTask;
|
154
151
|
}
|
155
152
|
/**
|
156
153
|
* @category StorageOperations
|
157
|
-
* @category
|
154
|
+
* @category ImportExportTaskStorageOperations
|
158
155
|
*/
|
159
|
-
export interface
|
156
|
+
export interface ImportExportTaskStorageOperationsUpdateTaskStatsParams {
|
160
157
|
input: {
|
161
|
-
prevStatus:
|
162
|
-
nextStatus:
|
158
|
+
prevStatus: ImportExportTaskStatus;
|
159
|
+
nextStatus: ImportExportTaskStatus;
|
163
160
|
};
|
164
|
-
original:
|
161
|
+
original: ImportExportTask;
|
165
162
|
}
|
166
163
|
/**
|
167
164
|
* @category StorageOperations
|
168
|
-
* @category
|
165
|
+
* @category ImportExportTaskStorageOperations
|
169
166
|
*/
|
170
|
-
export interface
|
167
|
+
export interface ImportExportTaskStorageOperations {
|
168
|
+
/**
|
169
|
+
* Get a single import export task item by given params.
|
170
|
+
*/
|
171
|
+
getTask(params: ImportExportTaskStorageOperationsGetParams): Promise<ImportExportTask | null>;
|
171
172
|
/**
|
172
|
-
* Get
|
173
|
+
* Get all import export tasks by given params.
|
173
174
|
*/
|
174
|
-
|
175
|
+
listTasks(params: ImportExportTaskStorageOperationsListParams): Promise<ImportExportTaskStorageOperationsListResponse>;
|
176
|
+
createTask(params: ImportExportTaskStorageOperationsCreateParams): Promise<ImportExportTask>;
|
177
|
+
updateTask(params: ImportExportTaskStorageOperationsUpdateParams): Promise<ImportExportTask>;
|
178
|
+
deleteTask(params: ImportExportTaskStorageOperationsDeleteParams): Promise<ImportExportTask>;
|
179
|
+
updateTaskStats(params: ImportExportTaskStorageOperationsUpdateTaskStatsParams): Promise<ImportExportTask>;
|
175
180
|
/**
|
176
|
-
* Get
|
181
|
+
* Get a single import export sub-task item by given params.
|
177
182
|
*/
|
178
|
-
|
179
|
-
createTask(params: PageImportExportTaskStorageOperationsCreateParams): Promise<PageImportExportTask>;
|
180
|
-
updateTask(params: PageImportExportTaskStorageOperationsUpdateParams): Promise<PageImportExportTask>;
|
181
|
-
deleteTask(params: PageImportExportTaskStorageOperationsDeleteParams): Promise<PageImportExportTask>;
|
182
|
-
updateTaskStats(params: PageImportExportTaskStorageOperationsUpdateTaskStatsParams): Promise<PageImportExportTask>;
|
183
|
+
getSubTask(params: ImportExportTaskStorageOperationsGetSubTaskParams): Promise<ImportExportTask | null>;
|
183
184
|
/**
|
184
|
-
* Get
|
185
|
+
* Get all import export sub-tasks by given params.
|
185
186
|
*/
|
186
|
-
|
187
|
+
listSubTasks(params: ImportExportTaskStorageOperationsListSubTaskParams): Promise<ImportExportTaskStorageOperationsListSubTaskResponse>;
|
188
|
+
createSubTask(params: ImportExportTaskStorageOperationsCreateSubTaskParams): Promise<ImportExportTask>;
|
189
|
+
updateSubTask(params: ImportExportTaskStorageOperationsUpdateSubTaskParams): Promise<ImportExportTask>;
|
190
|
+
}
|
191
|
+
export interface FileUploadsData {
|
192
|
+
/**
|
193
|
+
* Location of export data file. Export data contains the relevant entity data (block, page, template), and an
|
194
|
+
* array of file objects, exported from the DB, that need to be imported.
|
195
|
+
*
|
196
|
+
* Example:
|
197
|
+
* 'IMPORTS/8lf6y7xp5/8lf6x9v68-header-1/8lf6x9v69-header-1/Header #1.json'
|
198
|
+
*/
|
199
|
+
data: string;
|
187
200
|
/**
|
188
|
-
*
|
201
|
+
* Example:
|
202
|
+
* '8ldspraka-9l9iaffak-1.jpeg': 'IMPORTS/8lf6y7xp5/8lf6x9v68-header-1/assets/8ldspraka-9l9iaffak-1.jpeg',
|
203
|
+
* '8ldwyq8ao-pb-editor-page-element-rzfKWtdTWN.png': 'IMPORTS/8lf6y7xp5/8lf6x9v69-header-1/assets/8ldwyq8ao-pb-editor-page-element-rzfKWtdTWN.png'
|
189
204
|
*/
|
190
|
-
|
191
|
-
|
192
|
-
|
205
|
+
assets: Record<string, string>;
|
206
|
+
}
|
207
|
+
export interface ImportData {
|
208
|
+
assets: Record<string, string>;
|
209
|
+
data: string;
|
210
|
+
key: string;
|
193
211
|
}
|
package/types.js
CHANGED
@@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
var _exportNames = {
|
7
|
-
|
8
|
-
|
7
|
+
ExportRevisionType: true,
|
8
|
+
ImportExportTaskStatus: true
|
9
9
|
};
|
10
|
-
exports.
|
11
|
-
|
10
|
+
exports.ImportExportTaskStatus = exports.ExportRevisionType = void 0;
|
12
11
|
var _types = require("./graphql/types");
|
13
|
-
|
14
12
|
Object.keys(_types).forEach(function (key) {
|
15
13
|
if (key === "default" || key === "__esModule") return;
|
16
14
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -23,20 +21,69 @@ Object.keys(_types).forEach(function (key) {
|
|
23
21
|
});
|
24
22
|
});
|
25
23
|
// Entities.
|
26
|
-
let
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
let ExportRevisionType = /*#__PURE__*/function (ExportRevisionType) {
|
25
|
+
ExportRevisionType["PUBLISHED"] = "published";
|
26
|
+
ExportRevisionType["LATEST"] = "latest";
|
27
|
+
return ExportRevisionType;
|
28
|
+
}({});
|
29
|
+
exports.ExportRevisionType = ExportRevisionType;
|
30
|
+
let ImportExportTaskStatus = /*#__PURE__*/function (ImportExportTaskStatus) {
|
31
|
+
ImportExportTaskStatus["PENDING"] = "pending";
|
32
|
+
ImportExportTaskStatus["PROCESSING"] = "processing";
|
33
|
+
ImportExportTaskStatus["COMPLETED"] = "completed";
|
34
|
+
ImportExportTaskStatus["FAILED"] = "failed";
|
35
|
+
return ImportExportTaskStatus;
|
36
|
+
}({});
|
37
|
+
/**
|
38
|
+
* @category StorageOperations
|
39
|
+
* @category ImportExportTaskStorageOperations
|
40
|
+
*/
|
41
|
+
/**
|
42
|
+
* @category StorageOperations
|
43
|
+
* @category ImportExportTaskStorageOperations
|
44
|
+
*/
|
45
|
+
/**
|
46
|
+
* @category StorageOperations
|
47
|
+
* @category ImportExportTaskStorageOperations
|
48
|
+
*/
|
49
|
+
/**
|
50
|
+
* @category StorageOperations
|
51
|
+
* @category ImportExportTaskStorageOperations
|
52
|
+
*/
|
53
|
+
/**
|
54
|
+
* @category StorageOperations
|
55
|
+
* @category ImportExportTaskStorageOperations
|
56
|
+
*/
|
57
|
+
/**
|
58
|
+
* @category StorageOperations
|
59
|
+
* @category ImportExportTaskStorageOperations
|
60
|
+
*/
|
61
|
+
/**
|
62
|
+
* @category StorageOperations
|
63
|
+
* @category ImportExportTaskStorageOperations
|
64
|
+
*/
|
65
|
+
/**
|
66
|
+
* @category StorageOperations
|
67
|
+
* @category ImportExportTaskStorageOperations
|
68
|
+
*/
|
69
|
+
/**
|
70
|
+
* @category StorageOperations
|
71
|
+
* @category ImportExportTaskStorageOperations
|
72
|
+
*/
|
73
|
+
/**
|
74
|
+
* @category StorageOperations
|
75
|
+
* @category ImportExportTaskStorageOperations
|
76
|
+
*/
|
77
|
+
/**
|
78
|
+
* @category StorageOperations
|
79
|
+
* @category ImportExportTaskStorageOperations
|
80
|
+
*/
|
81
|
+
/**
|
82
|
+
* @category StorageOperations
|
83
|
+
* @category ImportExportTaskStorageOperations
|
84
|
+
*/
|
85
|
+
/**
|
86
|
+
* @category StorageOperations
|
87
|
+
* @category ImportExportTaskStorageOperations
|
88
|
+
*/
|
89
|
+
exports.ImportExportTaskStatus = ImportExportTaskStatus;
|