@contentstack/cli-cm-import 1.7.1 → 1.8.0
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/README.md +1 -1
- package/lib/config/index.js +2 -0
- package/lib/import/module-importer.js +15 -0
- package/lib/import/modules/base-class.d.ts +1 -1
- package/lib/import/modules/base-class.js +31 -1
- package/lib/import/modules/content-types.js +1 -1
- package/lib/import/modules/entries.d.ts +93 -0
- package/lib/import/modules/entries.js +536 -0
- package/lib/import/modules/marketplace-apps.d.ts +5 -2
- package/lib/import/modules/marketplace-apps.js +21 -16
- package/lib/import/modules/workflows.d.ts +41 -0
- package/lib/import/modules/workflows.js +209 -0
- package/lib/import/modules-js/custom-roles.js +1 -1
- package/lib/import/modules-js/entries.js +13 -7
- package/lib/import/modules-js/environments.js +1 -1
- package/lib/import/modules-js/extensions.js +1 -1
- package/lib/import/modules-js/global-fields.js +2 -4
- package/lib/import/modules-js/marketplace-apps.d.ts +6 -4
- package/lib/import/modules-js/marketplace-apps.js +19 -15
- package/lib/import/modules-js/workflows.js +2 -2
- package/lib/types/default-config.d.ts +1 -0
- package/lib/utils/asset-helper.d.ts +1 -1
- package/lib/utils/backup-handler.js +10 -1
- package/lib/utils/entries-helper.d.ts +4 -1
- package/lib/utils/entries-helper.js +322 -2
- package/lib/utils/file-helper.d.ts +1 -0
- package/lib/utils/file-helper.js +5 -1
- package/lib/utils/import-config-handler.js +1 -1
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/index.js +4 -1
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Entries lookup
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.lookupEntries = void 0;
|
|
6
|
+
exports.restoreJsonRteEntryRefs = exports.removeEntryRefsFromJSONRTE = exports.removeUidsFromJsonRteFields = exports.lookupEntries = void 0;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const path = tslib_1.__importStar(require("path"));
|
|
9
9
|
const _ = tslib_1.__importStar(require("lodash"));
|
|
@@ -94,7 +94,7 @@ const lookupEntries = function (data, mappedUids, uidMapperPath) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
const find = function (schema, _entry) {
|
|
97
|
+
const find = function (schema = [], _entry) {
|
|
98
98
|
for (let i = 0, _i = schema.length; i < _i; i++) {
|
|
99
99
|
switch (schema[i].data_type) {
|
|
100
100
|
case 'reference':
|
|
@@ -250,3 +250,323 @@ function findUidsInNewRefFields(entry, uids) {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
+
const removeUidsFromJsonRteFields = (entry, ctSchema) => {
|
|
254
|
+
for (const element of ctSchema) {
|
|
255
|
+
switch (element.data_type) {
|
|
256
|
+
case 'blocks': {
|
|
257
|
+
if (entry[element.uid]) {
|
|
258
|
+
if (element.multiple) {
|
|
259
|
+
entry[element.uid] = entry[element.uid].map((e) => {
|
|
260
|
+
let key = Object.keys(e).pop();
|
|
261
|
+
let subBlock = element.blocks.filter((block) => block.uid === key).pop();
|
|
262
|
+
e[key] = (0, exports.removeUidsFromJsonRteFields)(e[key], subBlock.schema);
|
|
263
|
+
return e;
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
case 'global_field':
|
|
270
|
+
case 'group': {
|
|
271
|
+
if (entry[element.uid]) {
|
|
272
|
+
if (element.multiple) {
|
|
273
|
+
entry[element.uid] = entry[element.uid].map((e) => {
|
|
274
|
+
e = (0, exports.removeUidsFromJsonRteFields)(e, element.schema);
|
|
275
|
+
return e;
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
entry[element.uid] = (0, exports.removeUidsFromJsonRteFields)(entry[element.uid], element.schema);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
case 'json': {
|
|
285
|
+
if (entry[element.uid] && element.field_metadata.rich_text_type) {
|
|
286
|
+
if (element.multiple) {
|
|
287
|
+
entry[element.uid] = entry[element.uid].map((jsonRteData) => {
|
|
288
|
+
delete jsonRteData.uid; // remove uid
|
|
289
|
+
if (_.isObject(jsonRteData.attrs)) {
|
|
290
|
+
jsonRteData.attrs.dirty = true;
|
|
291
|
+
}
|
|
292
|
+
if (!_.isEmpty(jsonRteData.children)) {
|
|
293
|
+
jsonRteData.children = _.map(jsonRteData.children, (child) => removeUidsFromChildren(child));
|
|
294
|
+
}
|
|
295
|
+
return jsonRteData;
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
delete entry[element.uid].uid; // remove uid
|
|
300
|
+
if (entry[element.uid] && _.isObject(entry[element.uid].attrs)) {
|
|
301
|
+
entry[element.uid].attrs.dirty = true;
|
|
302
|
+
}
|
|
303
|
+
if (entry[element.uid] && !_.isEmpty(entry[element.uid].children)) {
|
|
304
|
+
entry[element.uid].children = _.map(entry[element.uid].children, (child) => removeUidsFromChildren(child));
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return entry;
|
|
313
|
+
};
|
|
314
|
+
exports.removeUidsFromJsonRteFields = removeUidsFromJsonRteFields;
|
|
315
|
+
function removeUidsFromChildren(children) {
|
|
316
|
+
if (children.length && children.length > 0) {
|
|
317
|
+
return children.map((child) => {
|
|
318
|
+
if (child.type && child.type.length > 0) {
|
|
319
|
+
delete child.uid; // remove uid
|
|
320
|
+
if (_.isObject(child.attrs)) {
|
|
321
|
+
child.attrs.dirty = true;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (child.children && child.children.length > 0) {
|
|
325
|
+
child.children = removeUidsFromChildren(child.children);
|
|
326
|
+
}
|
|
327
|
+
return child;
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
if (children.type && children.type.length > 0) {
|
|
332
|
+
delete children.uid; // remove uid
|
|
333
|
+
if (_.isObject(children.attrs)) {
|
|
334
|
+
children.attrs.dirty = true;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (children.children && children.children.length > 0) {
|
|
338
|
+
children.children = removeUidsFromChildren(children.children);
|
|
339
|
+
}
|
|
340
|
+
return children;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
const removeEntryRefsFromJSONRTE = (entry, ctSchema) => {
|
|
344
|
+
for (const element of ctSchema) {
|
|
345
|
+
switch (element.data_type) {
|
|
346
|
+
case 'blocks': {
|
|
347
|
+
if (entry[element.uid]) {
|
|
348
|
+
if (element.multiple) {
|
|
349
|
+
entry[element.uid] = entry[element.uid].map((e) => {
|
|
350
|
+
let key = Object.keys(e).pop();
|
|
351
|
+
let subBlock = element.blocks.filter((block) => block.uid === key).pop();
|
|
352
|
+
e[key] = (0, exports.removeEntryRefsFromJSONRTE)(e[key], subBlock.schema);
|
|
353
|
+
return e;
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
case 'global_field':
|
|
360
|
+
case 'group': {
|
|
361
|
+
if (entry[element.uid]) {
|
|
362
|
+
if (element.multiple) {
|
|
363
|
+
entry[element.uid] = entry[element.uid].map((e) => {
|
|
364
|
+
e = (0, exports.removeEntryRefsFromJSONRTE)(e, element.schema);
|
|
365
|
+
return e;
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
entry[element.uid] = (0, exports.removeEntryRefsFromJSONRTE)(entry[element.uid], element.schema);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
case 'json': {
|
|
375
|
+
if (entry[element.uid] && element.field_metadata.rich_text_type) {
|
|
376
|
+
if (element.multiple) {
|
|
377
|
+
entry[element.uid] = entry[element.uid].map((jsonRteData) => {
|
|
378
|
+
// repeated code from else block, will abstract later
|
|
379
|
+
let entryReferences = jsonRteData.children.filter((e) => doEntryReferencesExist(e));
|
|
380
|
+
if (entryReferences.length > 0) {
|
|
381
|
+
jsonRteData.children = jsonRteData.children.filter((e) => !doEntryReferencesExist(e));
|
|
382
|
+
return jsonRteData; // return jsonRteData without entry references
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
return jsonRteData; // return jsonRteData as it is, because there are no entry references
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
let entryReferences = entry[element.uid].children.filter((e) => doEntryReferencesExist(e));
|
|
391
|
+
if (entryReferences.length > 0) {
|
|
392
|
+
entry[element.uid].children = entry[element.uid].children.filter((e) => !doEntryReferencesExist(e));
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return entry;
|
|
401
|
+
};
|
|
402
|
+
exports.removeEntryRefsFromJSONRTE = removeEntryRefsFromJSONRTE;
|
|
403
|
+
function doEntryReferencesExist(element) {
|
|
404
|
+
// checks if the children of p element contain any references
|
|
405
|
+
// only checking one level deep, not recursive
|
|
406
|
+
if (element.length) {
|
|
407
|
+
for (const item of element) {
|
|
408
|
+
if ((item.type === 'p' || item.type === 'a') && item.children && item.children.length > 0) {
|
|
409
|
+
return doEntryReferencesExist(item.children);
|
|
410
|
+
}
|
|
411
|
+
else if (isEntryRef(item)) {
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
if (isEntryRef(element)) {
|
|
418
|
+
return true;
|
|
419
|
+
}
|
|
420
|
+
if ((element.type === 'p' || element.type === 'a') && element.children && element.children.length > 0) {
|
|
421
|
+
return doEntryReferencesExist(element.children);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
function isEntryRef(element) {
|
|
427
|
+
return element.type === 'reference' && element.attrs.type === 'entry';
|
|
428
|
+
}
|
|
429
|
+
const restoreJsonRteEntryRefs = (entry, sourceStackEntry, ctSchema, { mappedAssetUids, mappedAssetUrls }) => {
|
|
430
|
+
// let mappedAssetUids = fileHelper.readFileSync(this.mappedAssetUidPath) || {};
|
|
431
|
+
// let mappedAssetUrls = fileHelper.readFileSync(this.mappedAssetUrlPath) || {};
|
|
432
|
+
for (const element of ctSchema) {
|
|
433
|
+
switch (element.data_type) {
|
|
434
|
+
case 'blocks': {
|
|
435
|
+
if (entry[element.uid]) {
|
|
436
|
+
if (element.multiple) {
|
|
437
|
+
entry[element.uid] = entry[element.uid].map((e, eIndex) => {
|
|
438
|
+
let key = Object.keys(e).pop();
|
|
439
|
+
let subBlock = element.blocks.filter((block) => block.uid === key).pop();
|
|
440
|
+
let sourceStackElement = sourceStackEntry[element.uid][eIndex][key];
|
|
441
|
+
e[key] = (0, exports.restoreJsonRteEntryRefs)(e[key], sourceStackElement, subBlock.schema, {
|
|
442
|
+
mappedAssetUids,
|
|
443
|
+
mappedAssetUrls,
|
|
444
|
+
});
|
|
445
|
+
return e;
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
case 'global_field':
|
|
452
|
+
case 'group': {
|
|
453
|
+
if (entry[element.uid]) {
|
|
454
|
+
if (element.multiple) {
|
|
455
|
+
entry[element.uid] = entry[element.uid].map((e, eIndex) => {
|
|
456
|
+
let sourceStackElement = sourceStackEntry[element.uid][eIndex];
|
|
457
|
+
e = (0, exports.restoreJsonRteEntryRefs)(e, sourceStackElement, element.schema, { mappedAssetUids, mappedAssetUrls });
|
|
458
|
+
return e;
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
let sourceStackElement = sourceStackEntry[element.uid];
|
|
463
|
+
entry[element.uid] = (0, exports.restoreJsonRteEntryRefs)(entry[element.uid], sourceStackElement, element.schema, {
|
|
464
|
+
mappedAssetUids,
|
|
465
|
+
mappedAssetUrls,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
case 'json': {
|
|
472
|
+
if (entry[element.uid] && element.field_metadata.rich_text_type) {
|
|
473
|
+
if (element.multiple) {
|
|
474
|
+
entry[element.uid] = entry[element.uid].map((field, index) => {
|
|
475
|
+
// i am facing a Maximum call stack exceeded issue,
|
|
476
|
+
// probably because of this loop operation
|
|
477
|
+
let entryRefs = sourceStackEntry[element.uid][index].children
|
|
478
|
+
.map((e, i) => {
|
|
479
|
+
return { index: i, value: e };
|
|
480
|
+
})
|
|
481
|
+
.filter((e) => doEntryReferencesExist(e.value))
|
|
482
|
+
.map((e) => {
|
|
483
|
+
// commenting the line below resolved the maximum call stack exceeded issue
|
|
484
|
+
// e.value = this.setDirtyTrue(e.value)
|
|
485
|
+
setDirtyTrue(e.value);
|
|
486
|
+
return e;
|
|
487
|
+
})
|
|
488
|
+
.map((e) => {
|
|
489
|
+
// commenting the line below resolved the maximum call stack exceeded issue
|
|
490
|
+
// e.value = this.resolveAssetRefsInEntryRefsForJsonRte(e, mappedAssetUids, mappedAssetUrls)
|
|
491
|
+
resolveAssetRefsInEntryRefsForJsonRte(e.value, mappedAssetUids, mappedAssetUrls);
|
|
492
|
+
return e;
|
|
493
|
+
});
|
|
494
|
+
if (entryRefs.length > 0) {
|
|
495
|
+
entryRefs.forEach((entryRef) => {
|
|
496
|
+
field.children.splice(entryRef.index, 0, entryRef.value);
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
return field;
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
let entryRefs = sourceStackEntry[element.uid].children
|
|
504
|
+
.map((e, index) => {
|
|
505
|
+
return { index: index, value: e };
|
|
506
|
+
})
|
|
507
|
+
.filter((e) => doEntryReferencesExist(e.value))
|
|
508
|
+
.map((e) => {
|
|
509
|
+
setDirtyTrue(e.value);
|
|
510
|
+
return e;
|
|
511
|
+
})
|
|
512
|
+
.map((e) => {
|
|
513
|
+
resolveAssetRefsInEntryRefsForJsonRte(e.value, mappedAssetUids, mappedAssetUrls);
|
|
514
|
+
return e;
|
|
515
|
+
});
|
|
516
|
+
if (entryRefs.length > 0) {
|
|
517
|
+
entryRefs.forEach((entryRef) => {
|
|
518
|
+
if (!_.isEmpty(entry[element.uid]) && entry[element.uid].children) {
|
|
519
|
+
entry[element.uid].children.splice(entryRef.index, 0, entryRef.value);
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return entry;
|
|
530
|
+
};
|
|
531
|
+
exports.restoreJsonRteEntryRefs = restoreJsonRteEntryRefs;
|
|
532
|
+
function setDirtyTrue(jsonRteChild) {
|
|
533
|
+
// also removing uids in this function
|
|
534
|
+
if (jsonRteChild.type) {
|
|
535
|
+
if (_.isObject(jsonRteChild.attrs)) {
|
|
536
|
+
jsonRteChild.attrs['dirty'] = true;
|
|
537
|
+
}
|
|
538
|
+
delete jsonRteChild.uid;
|
|
539
|
+
if (jsonRteChild.children && jsonRteChild.children.length > 0) {
|
|
540
|
+
jsonRteChild.children = jsonRteChild.children.map((subElement) => this.setDirtyTrue(subElement));
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return jsonRteChild;
|
|
544
|
+
}
|
|
545
|
+
function resolveAssetRefsInEntryRefsForJsonRte(jsonRteChild, mappedAssetUids, mappedAssetUrls) {
|
|
546
|
+
if (jsonRteChild.type) {
|
|
547
|
+
if (jsonRteChild.attrs.type === 'asset') {
|
|
548
|
+
let assetUrl;
|
|
549
|
+
if (mappedAssetUids[jsonRteChild.attrs['asset-uid']]) {
|
|
550
|
+
jsonRteChild.attrs['asset-uid'] = mappedAssetUids[jsonRteChild.attrs['asset-uid']];
|
|
551
|
+
}
|
|
552
|
+
if (jsonRteChild.attrs['display-type'] !== 'link') {
|
|
553
|
+
assetUrl = jsonRteChild.attrs['asset-link'];
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
assetUrl = jsonRteChild.attrs['href'];
|
|
557
|
+
}
|
|
558
|
+
if (mappedAssetUrls[assetUrl]) {
|
|
559
|
+
if (jsonRteChild.attrs['display-type'] !== 'link') {
|
|
560
|
+
jsonRteChild.attrs['asset-link'] = mappedAssetUrls[assetUrl];
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
jsonRteChild.attrs['href'] = mappedAssetUrls[assetUrl];
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (jsonRteChild.children && jsonRteChild.children.length > 0) {
|
|
568
|
+
jsonRteChild.children = jsonRteChild.children.map((subElement) => resolveAssetRefsInEntryRefsForJsonRte(subElement, mappedAssetUids, mappedAssetUrls));
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return jsonRteChild;
|
|
572
|
+
}
|
|
@@ -11,4 +11,5 @@ export declare const makeDirectory: (dir: string) => void;
|
|
|
11
11
|
export declare const readdirSync: (dirPath: string) => any;
|
|
12
12
|
export declare const isFolderExist: (folderPath: string) => Promise<any>;
|
|
13
13
|
export declare const fileExistsSync: (path: string) => boolean;
|
|
14
|
+
export declare const removeDirSync: (path: string) => void;
|
|
14
15
|
export declare const fsUtil: FsUtility;
|
package/lib/utils/file-helper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fsUtil = exports.fileExistsSync = exports.isFolderExist = exports.readdirSync = exports.makeDirectory = exports.writeLargeFile = exports.writeFile = exports.writeFileSync = exports.readLargeFile = exports.readFile = exports.readFileSync = void 0;
|
|
3
|
+
exports.fsUtil = exports.removeDirSync = exports.fileExistsSync = exports.isFolderExist = exports.readdirSync = exports.makeDirectory = exports.writeLargeFile = exports.writeFile = exports.writeFileSync = exports.readLargeFile = exports.readFile = exports.readFileSync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs = tslib_1.__importStar(require("fs"));
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
@@ -137,4 +137,8 @@ const fileExistsSync = function (path) {
|
|
|
137
137
|
return fs.existsSync(path);
|
|
138
138
|
};
|
|
139
139
|
exports.fileExistsSync = fileExistsSync;
|
|
140
|
+
const removeDirSync = function (path) {
|
|
141
|
+
fs.rmdirSync(path, { recursive: true });
|
|
142
|
+
};
|
|
143
|
+
exports.removeDirSync = removeDirSync;
|
|
140
144
|
exports.fsUtil = new cli_utilities_1.FsUtility();
|
|
@@ -53,7 +53,7 @@ const setupConfig = async (importCmdFlags) => {
|
|
|
53
53
|
config.isAuthenticated = (0, cli_utilities_1.isAuthenticated)();
|
|
54
54
|
//Note to support the old key
|
|
55
55
|
config.source_stack = config.apiKey;
|
|
56
|
-
config.importWebhookStatus = importCmdFlags
|
|
56
|
+
config.importWebhookStatus = importCmdFlags['import-webhook-status'];
|
|
57
57
|
config.forceStopMarketplaceAppsPrompt = importCmdFlags.yes;
|
|
58
58
|
if (importCmdFlags['branch']) {
|
|
59
59
|
config.branchName = importCmdFlags['branch'];
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { fsUtil } from './file-helper';
|
|
|
5
5
|
export { default as backupHandler } from './backup-handler';
|
|
6
6
|
export { log, unlinkFileLogger } from './logger';
|
|
7
7
|
export { uploadAssetHelper, lookupAssets } from './asset-helper';
|
|
8
|
-
export { getDeveloperHubUrl, getOrgUid, getConfirmationToCreateApps, createPrivateApp, handleNameConflict, installApp, makeRedirectUrlCall, confirmToCloseProcess, getAllStackSpecificApps, ifAppAlreadyExist, updateAppConfig } from './marketplace-app-helper';
|
|
8
|
+
export { getDeveloperHubUrl, getOrgUid, getConfirmationToCreateApps, createPrivateApp, handleNameConflict, installApp, makeRedirectUrlCall, confirmToCloseProcess, getAllStackSpecificApps, ifAppAlreadyExist, updateAppConfig, } from './marketplace-app-helper';
|
|
9
9
|
export { schemaTemplate, suppressSchemaReference, removeReferenceFields } from './content-type-helper';
|
|
10
10
|
export { lookupExtension } from './extension-helper';
|
|
11
|
-
export { lookupEntries } from './entries-helper';
|
|
11
|
+
export { lookupEntries, removeUidsFromJsonRteFields, removeEntryRefsFromJSONRTE, restoreJsonRteEntryRefs, } from './entries-helper';
|
|
12
12
|
export * from './common-helper';
|
package/lib/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lookupEntries = exports.lookupExtension = exports.removeReferenceFields = exports.suppressSchemaReference = exports.schemaTemplate = exports.updateAppConfig = exports.ifAppAlreadyExist = exports.getAllStackSpecificApps = exports.confirmToCloseProcess = exports.makeRedirectUrlCall = exports.installApp = exports.handleNameConflict = exports.createPrivateApp = exports.getConfirmationToCreateApps = exports.getOrgUid = exports.getDeveloperHubUrl = exports.lookupAssets = exports.uploadAssetHelper = exports.unlinkFileLogger = exports.log = exports.backupHandler = exports.fsUtil = exports.fileHelper = exports.setupImportConfig = exports.interactive = void 0;
|
|
3
|
+
exports.restoreJsonRteEntryRefs = exports.removeEntryRefsFromJSONRTE = exports.removeUidsFromJsonRteFields = exports.lookupEntries = exports.lookupExtension = exports.removeReferenceFields = exports.suppressSchemaReference = exports.schemaTemplate = exports.updateAppConfig = exports.ifAppAlreadyExist = exports.getAllStackSpecificApps = exports.confirmToCloseProcess = exports.makeRedirectUrlCall = exports.installApp = exports.handleNameConflict = exports.createPrivateApp = exports.getConfirmationToCreateApps = exports.getOrgUid = exports.getDeveloperHubUrl = exports.lookupAssets = exports.uploadAssetHelper = exports.unlinkFileLogger = exports.log = exports.backupHandler = exports.fsUtil = exports.fileHelper = exports.setupImportConfig = exports.interactive = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
exports.interactive = tslib_1.__importStar(require("./interactive"));
|
|
6
6
|
var import_config_handler_1 = require("./import-config-handler");
|
|
@@ -36,4 +36,7 @@ var extension_helper_1 = require("./extension-helper");
|
|
|
36
36
|
Object.defineProperty(exports, "lookupExtension", { enumerable: true, get: function () { return extension_helper_1.lookupExtension; } });
|
|
37
37
|
var entries_helper_1 = require("./entries-helper");
|
|
38
38
|
Object.defineProperty(exports, "lookupEntries", { enumerable: true, get: function () { return entries_helper_1.lookupEntries; } });
|
|
39
|
+
Object.defineProperty(exports, "removeUidsFromJsonRteFields", { enumerable: true, get: function () { return entries_helper_1.removeUidsFromJsonRteFields; } });
|
|
40
|
+
Object.defineProperty(exports, "removeEntryRefsFromJSONRTE", { enumerable: true, get: function () { return entries_helper_1.removeEntryRefsFromJSONRTE; } });
|
|
41
|
+
Object.defineProperty(exports, "restoreJsonRteEntryRefs", { enumerable: true, get: function () { return entries_helper_1.restoreJsonRteEntryRefs; } });
|
|
39
42
|
tslib_1.__exportStar(require("./common-helper"), exports);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-import",
|
|
3
3
|
"description": "Contentstack CLI plugin to import content into stack",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "
|
|
9
|
-
"@contentstack/cli-utilities": "
|
|
10
|
-
"@contentstack/management":
|
|
8
|
+
"@contentstack/cli-command": "~1.2.11",
|
|
9
|
+
"@contentstack/cli-utilities": "~1.5.1",
|
|
10
|
+
"@contentstack/management": "~1.10.0",
|
|
11
11
|
"@oclif/config": "^1.18.3",
|
|
12
12
|
"@oclif/core": "^2.9.3",
|
|
13
13
|
"big-json": "^3.2.0",
|
|
@@ -96,4 +96,4 @@
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"repository": "https://github.com/contentstack/cli"
|
|
99
|
-
}
|
|
99
|
+
}
|