sfdx-easy-sources 0.2.10 → 0.3.2
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/lib/commands/easysources/allmeta/merge.d.ts +3 -3
- package/lib/commands/easysources/allmeta/merge.js +14 -13
- package/lib/commands/easysources/allmeta/merge.js.map +1 -1
- package/lib/commands/easysources/allmeta/retrieve.d.ts +31 -0
- package/lib/commands/easysources/allmeta/retrieve.js +393 -0
- package/lib/commands/easysources/allmeta/retrieve.js.map +1 -0
- package/lib/commands/easysources/allmeta/split.d.ts +3 -2
- package/lib/commands/easysources/allmeta/split.js +14 -9
- package/lib/commands/easysources/allmeta/split.js.map +1 -1
- package/lib/commands/easysources/allmeta/upsert.d.ts +3 -2
- package/lib/commands/easysources/allmeta/upsert.js +14 -9
- package/lib/commands/easysources/allmeta/upsert.js.map +1 -1
- package/lib/commands/easysources/applications/merge.d.ts +2 -2
- package/lib/commands/easysources/applications/merge.js +9 -9
- package/lib/commands/easysources/applications/merge.js.map +1 -1
- package/lib/commands/easysources/applications/split.d.ts +2 -2
- package/lib/commands/easysources/applications/split.js +9 -9
- package/lib/commands/easysources/applications/split.js.map +1 -1
- package/lib/commands/easysources/applications/updatekey.d.ts +1 -1
- package/lib/commands/easysources/applications/updatekey.js +5 -5
- package/lib/commands/easysources/applications/updatekey.js.map +1 -1
- package/lib/commands/easysources/applications/upsert.d.ts +2 -2
- package/lib/commands/easysources/applications/upsert.js +9 -9
- package/lib/commands/easysources/applications/upsert.js.map +1 -1
- package/lib/commands/easysources/globalvaluesets/merge.d.ts +2 -2
- package/lib/commands/easysources/globalvaluesets/merge.js +7 -7
- package/lib/commands/easysources/globalvaluesets/merge.js.map +1 -1
- package/lib/commands/easysources/globalvaluesets/split.d.ts +2 -2
- package/lib/commands/easysources/globalvaluesets/split.js +7 -7
- package/lib/commands/easysources/globalvaluesets/split.js.map +1 -1
- package/lib/commands/easysources/globalvaluesets/updatekey.d.ts +1 -1
- package/lib/commands/easysources/globalvaluesets/updatekey.js +3 -3
- package/lib/commands/easysources/globalvaluesets/updatekey.js.map +1 -1
- package/lib/commands/easysources/globalvaluesets/upsert.d.ts +2 -2
- package/lib/commands/easysources/globalvaluesets/upsert.js +7 -7
- package/lib/commands/easysources/globalvaluesets/upsert.js.map +1 -1
- package/lib/commands/easysources/globalvaluesettranslations/merge.d.ts +2 -2
- package/lib/commands/easysources/globalvaluesettranslations/merge.js +7 -7
- package/lib/commands/easysources/globalvaluesettranslations/merge.js.map +1 -1
- package/lib/commands/easysources/globalvaluesettranslations/split.d.ts +2 -2
- package/lib/commands/easysources/globalvaluesettranslations/split.js +7 -7
- package/lib/commands/easysources/globalvaluesettranslations/split.js.map +1 -1
- package/lib/commands/easysources/globalvaluesettranslations/updatekey.d.ts +1 -1
- package/lib/commands/easysources/globalvaluesettranslations/updatekey.js +3 -3
- package/lib/commands/easysources/globalvaluesettranslations/updatekey.js.map +1 -1
- package/lib/commands/easysources/globalvaluesettranslations/upsert.d.ts +2 -2
- package/lib/commands/easysources/globalvaluesettranslations/upsert.js +7 -7
- package/lib/commands/easysources/globalvaluesettranslations/upsert.js.map +1 -1
- package/lib/commands/easysources/labels/merge.d.ts +2 -2
- package/lib/commands/easysources/labels/merge.js +6 -6
- package/lib/commands/easysources/labels/merge.js.map +1 -1
- package/lib/commands/easysources/labels/split.d.ts +2 -2
- package/lib/commands/easysources/labels/split.js +6 -6
- package/lib/commands/easysources/labels/split.js.map +1 -1
- package/lib/commands/easysources/labels/updatekey.d.ts +1 -1
- package/lib/commands/easysources/labels/updatekey.js +3 -3
- package/lib/commands/easysources/labels/updatekey.js.map +1 -1
- package/lib/commands/easysources/labels/upsert.d.ts +2 -2
- package/lib/commands/easysources/labels/upsert.js +6 -6
- package/lib/commands/easysources/labels/upsert.js.map +1 -1
- package/lib/commands/easysources/permissionsets/delete.d.ts +1 -1
- package/lib/commands/easysources/permissionsets/delete.js +7 -5
- package/lib/commands/easysources/permissionsets/delete.js.map +1 -1
- package/lib/commands/easysources/permissionsets/merge.d.ts +2 -2
- package/lib/commands/easysources/permissionsets/merge.js +7 -7
- package/lib/commands/easysources/permissionsets/merge.js.map +1 -1
- package/lib/commands/easysources/permissionsets/split.d.ts +2 -2
- package/lib/commands/easysources/permissionsets/split.js +7 -7
- package/lib/commands/easysources/permissionsets/split.js.map +1 -1
- package/lib/commands/easysources/permissionsets/updatekey.d.ts +1 -1
- package/lib/commands/easysources/permissionsets/updatekey.js +3 -3
- package/lib/commands/easysources/permissionsets/updatekey.js.map +1 -1
- package/lib/commands/easysources/permissionsets/upsert.d.ts +2 -2
- package/lib/commands/easysources/permissionsets/upsert.js +7 -7
- package/lib/commands/easysources/permissionsets/upsert.js.map +1 -1
- package/lib/commands/easysources/profiles/delete.d.ts +1 -1
- package/lib/commands/easysources/profiles/delete.js +6 -4
- package/lib/commands/easysources/profiles/delete.js.map +1 -1
- package/lib/commands/easysources/profiles/merge.d.ts +2 -2
- package/lib/commands/easysources/profiles/merge.js +7 -7
- package/lib/commands/easysources/profiles/merge.js.map +1 -1
- package/lib/commands/easysources/profiles/split.d.ts +2 -2
- package/lib/commands/easysources/profiles/split.js +7 -7
- package/lib/commands/easysources/profiles/split.js.map +1 -1
- package/lib/commands/easysources/profiles/updatekey.d.ts +1 -1
- package/lib/commands/easysources/profiles/updatekey.js +3 -3
- package/lib/commands/easysources/profiles/updatekey.js.map +1 -1
- package/lib/commands/easysources/profiles/upsert.d.ts +2 -2
- package/lib/commands/easysources/profiles/upsert.js +7 -7
- package/lib/commands/easysources/profiles/upsert.js.map +1 -1
- package/lib/commands/easysources/recordtypes/delete.d.ts +1 -1
- package/lib/commands/easysources/recordtypes/delete.js +6 -4
- package/lib/commands/easysources/recordtypes/delete.js.map +1 -1
- package/lib/commands/easysources/recordtypes/merge.d.ts +2 -2
- package/lib/commands/easysources/recordtypes/merge.js +11 -9
- package/lib/commands/easysources/recordtypes/merge.js.map +1 -1
- package/lib/commands/easysources/recordtypes/split.d.ts +2 -2
- package/lib/commands/easysources/recordtypes/split.js +11 -9
- package/lib/commands/easysources/recordtypes/split.js.map +1 -1
- package/lib/commands/easysources/recordtypes/updatekey.d.ts +1 -1
- package/lib/commands/easysources/recordtypes/updatekey.js +6 -4
- package/lib/commands/easysources/recordtypes/updatekey.js.map +1 -1
- package/lib/commands/easysources/recordtypes/upsert.d.ts +2 -2
- package/lib/commands/easysources/recordtypes/upsert.js +11 -9
- package/lib/commands/easysources/recordtypes/upsert.js.map +1 -1
- package/lib/commands/easysources/settings/init.d.ts +11 -0
- package/lib/commands/easysources/settings/init.js +36 -0
- package/lib/commands/easysources/settings/init.js.map +1 -0
- package/lib/utils/commands/keyupdater.js +3 -1
- package/lib/utils/commands/keyupdater.js.map +1 -1
- package/lib/utils/commands/merger.js +4 -2
- package/lib/utils/commands/merger.js.map +1 -1
- package/lib/utils/commands/splitter.js +4 -2
- package/lib/utils/commands/splitter.js.map +1 -1
- package/lib/utils/commands/upserter.js +7 -3
- package/lib/utils/commands/upserter.js.map +1 -1
- package/lib/utils/commands/utils.d.ts +4 -0
- package/lib/utils/commands/utils.js +89 -0
- package/lib/utils/commands/utils.js.map +1 -0
- package/lib/utils/constants/constants.d.ts +4 -1
- package/lib/utils/constants/constants.js +6 -2
- package/lib/utils/constants/constants.js.map +1 -1
- package/lib/utils/constants/constants_applications.d.ts +9 -3
- package/lib/utils/constants/constants_applications.js +4 -3
- package/lib/utils/constants/constants_applications.js.map +1 -1
- package/lib/utils/constants/constants_globalvaluesets.d.ts +1 -1
- package/lib/utils/constants/constants_globalvaluesets.js +2 -2
- package/lib/utils/constants/constants_globalvaluesets.js.map +1 -1
- package/lib/utils/constants/constants_globalvaluesettranslations.d.ts +9 -3
- package/lib/utils/constants/constants_globalvaluesettranslations.js +4 -3
- package/lib/utils/constants/constants_globalvaluesettranslations.js.map +1 -1
- package/lib/utils/constants/constants_labels.d.ts +1 -1
- package/lib/utils/constants/constants_labels.js +2 -2
- package/lib/utils/constants/constants_labels.js.map +1 -1
- package/lib/utils/constants/constants_permissionsets.d.ts +1 -20
- package/lib/utils/constants/constants_permissionsets.js +7 -6
- package/lib/utils/constants/constants_permissionsets.js.map +1 -1
- package/lib/utils/constants/constants_profiles.d.ts +1 -1
- package/lib/utils/constants/constants_profiles.js +2 -2
- package/lib/utils/constants/constants_profiles.js.map +1 -1
- package/lib/utils/constants/constants_recordtypes.d.ts +1 -1
- package/lib/utils/constants/constants_recordtypes.js +2 -2
- package/lib/utils/constants/constants_recordtypes.js.map +1 -1
- package/lib/utils/constants/constants_sourcesdownload.d.ts +21 -0
- package/lib/utils/constants/constants_sourcesdownload.js +67 -0
- package/lib/utils/constants/constants_sourcesdownload.js.map +1 -0
- package/lib/utils/filesUtils.d.ts +3 -0
- package/lib/utils/filesUtils.js +26 -1
- package/lib/utils/filesUtils.js.map +1 -1
- package/lib/utils/localSettings.d.ts +6 -0
- package/lib/utils/localSettings.js +20 -0
- package/lib/utils/localSettings.js.map +1 -0
- package/lib/utils/utils.d.ts +0 -2
- package/lib/utils/utils.js +1 -21
- package/lib/utils/utils.js.map +1 -1
- package/messages/all_merge.json +4 -3
- package/messages/all_split.json +5 -4
- package/messages/all_upsert.json +4 -3
- package/messages/allmeta_retrieve.json +20 -0
- package/messages/applications_merge.json +3 -3
- package/messages/applications_split.json +6 -6
- package/messages/applications_updatekey.json +2 -2
- package/messages/applications_upsert.json +3 -3
- package/messages/globalvaluesets_merge.json +3 -3
- package/messages/globalvaluesets_split.json +6 -6
- package/messages/globalvaluesets_updatekey.json +2 -2
- package/messages/globalvaluesets_upsert.json +3 -3
- package/messages/globalvaluesettranslations_merge.json +3 -3
- package/messages/globalvaluesettranslations_split.json +6 -6
- package/messages/globalvaluesettranslations_updatekey.json +2 -2
- package/messages/globalvaluesettranslations_upsert.json +3 -3
- package/messages/labels_merge.json +3 -3
- package/messages/labels_split.json +4 -4
- package/messages/labels_updatekey.json +2 -2
- package/messages/labels_upsert.json +3 -3
- package/messages/permissionsets_delete.json +1 -1
- package/messages/permissionsets_merge.json +3 -3
- package/messages/permissionsets_split.json +6 -6
- package/messages/permissionsets_updatekey.json +1 -1
- package/messages/permissionsets_upsert.json +3 -3
- package/messages/profiles_delete.json +1 -1
- package/messages/profiles_merge.json +3 -3
- package/messages/profiles_split.json +6 -6
- package/messages/profiles_updatekey.json +1 -1
- package/messages/profiles_upsert.json +3 -3
- package/messages/recordtypes_delete.json +2 -2
- package/messages/recordtypes_merge.json +5 -5
- package/messages/recordtypes_split.json +6 -6
- package/messages/recordtypes_updatekey.json +3 -3
- package/messages/recordtypes_upsert.json +5 -5
- package/messages/settings_init.json +7 -0
- package/oclif.manifest.json +1 -1
- package/package.json +25 -4
|
@@ -7,9 +7,9 @@ export default class Merge extends SfdxCommand {
|
|
|
7
7
|
name: string;
|
|
8
8
|
}[];
|
|
9
9
|
protected static flagsConfig: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"sf-xml": flags.Discriminated<flags.String>;
|
|
11
|
+
"es-csv": flags.Discriminated<flags.String>;
|
|
12
|
+
sequencial: flags.Discriminated<flags.Boolean<boolean>>;
|
|
13
13
|
};
|
|
14
14
|
run(): Promise<AnyJson>;
|
|
15
15
|
}
|
|
@@ -11,16 +11,16 @@ const command_1 = require("@salesforce/command");
|
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
12
|
const performance_1 = require("../../../utils/performance");
|
|
13
13
|
const constants_1 = require("../../../utils/constants/constants");
|
|
14
|
-
const utils_1 = require("../../../utils/utils");
|
|
14
|
+
const utils_1 = require("../../../utils/commands/utils");
|
|
15
15
|
// Initialize Messages with the current plugin directory
|
|
16
16
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
17
17
|
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
18
18
|
// or any library that is using the messages framework can also be loaded this way.
|
|
19
|
-
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', '
|
|
19
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'all_merge');
|
|
20
20
|
class Merge extends command_1.SfdxCommand {
|
|
21
21
|
async run() {
|
|
22
22
|
performance_1.default.getInstance().start();
|
|
23
|
-
await (0, utils_1.bulkExecuteCommands)(this.flags, 'merge');
|
|
23
|
+
await (0, utils_1.bulkExecuteCommands)(this.flags, 'merge', this.flags.sequencial);
|
|
24
24
|
performance_1.default.getInstance().end();
|
|
25
25
|
return 'OK';
|
|
26
26
|
}
|
|
@@ -31,17 +31,18 @@ Merge.examples = messages.getMessage('examples').split(os.EOL);
|
|
|
31
31
|
Merge.args = [{ name: 'file' }];
|
|
32
32
|
Merge.flagsConfig = {
|
|
33
33
|
// flag with a value (-n, --name=VALUE)
|
|
34
|
-
|
|
35
|
-
char: '
|
|
36
|
-
description: messages.getMessage('
|
|
34
|
+
"sf-xml": command_1.flags.string({
|
|
35
|
+
char: 'x',
|
|
36
|
+
description: messages.getMessage('sfXmlFlagDescription', [constants_1.DEFAULT_SFXML_PATH]),
|
|
37
37
|
}),
|
|
38
|
-
|
|
39
|
-
char: '
|
|
40
|
-
description: messages.getMessage('
|
|
38
|
+
"es-csv": command_1.flags.string({
|
|
39
|
+
char: 'c',
|
|
40
|
+
description: messages.getMessage('esCsvFlagDescription', [constants_1.DEFAULT_ESCSV_PATH]),
|
|
41
|
+
}),
|
|
42
|
+
sequencial: command_1.flags.boolean({
|
|
43
|
+
char: 's',
|
|
44
|
+
description: messages.getMessage('sequencialFlagDescription', ["false"]),
|
|
45
|
+
default: false
|
|
41
46
|
}),
|
|
42
|
-
output: command_1.flags.string({
|
|
43
|
-
char: 'o',
|
|
44
|
-
description: messages.getMessage('outputFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
45
|
-
})
|
|
46
47
|
};
|
|
47
48
|
//# sourceMappingURL=merge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/commands/easysources/allmeta/merge.ts"],"names":[],"mappings":";;AAAA;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QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,8BAAkB,CAAC,CAAC;KACjF,CAAC;IACF,UAAU,EAAE,eAAK,CAAC,OAAO,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,CAAC,CAAC;QACxE,OAAO,EAAE,KAAK;KACjB,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Retrieve extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
protected static flagsConfig: {
|
|
7
|
+
manifest: flags.Discriminated<flags.String>;
|
|
8
|
+
"sf-xml": flags.Discriminated<flags.String>;
|
|
9
|
+
"es-csv": flags.Discriminated<flags.String>;
|
|
10
|
+
orgname: flags.Discriminated<flags.String>;
|
|
11
|
+
"dont-retrieve": flags.Discriminated<flags.Boolean<boolean>>;
|
|
12
|
+
resnumb: flags.Discriminated<flags.String>;
|
|
13
|
+
"log-dir": flags.Discriminated<flags.String>;
|
|
14
|
+
"split-merge": flags.Discriminated<flags.Boolean<boolean>>;
|
|
15
|
+
clean: flags.Discriminated<flags.Boolean<boolean>>;
|
|
16
|
+
sequencial: flags.Discriminated<flags.Boolean<boolean>>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<AnyJson>;
|
|
19
|
+
}
|
|
20
|
+
export declare function splitCustomObjectTranslation(typeItemsMap: any, typesToDelete: any, objWeights: any, resourcesNum: any): Map<string, string[]>[];
|
|
21
|
+
export declare function splitChunksWithFixedTypes(typeItemsMap: any, typesToDelete: any, objWeights: any, resourcesNum: any, FIXED_TYPES: any, RELATED_TYPES: any): Map<string, string[]>[];
|
|
22
|
+
export declare function getTempPackageFilename(type: any, i: any): string;
|
|
23
|
+
export declare function writeChunkPackages(chunks: any, baseInputDir: any, type: any, counter: any): Promise<any[]>;
|
|
24
|
+
export declare function retrieveChunks(chunks: any, orgname: any, baseInputDir: any, type: any, filenames: any, logdir: any): Promise<void>;
|
|
25
|
+
export declare function writePackageXmlFile(dir: any, filename: any, obj: any): Promise<void>;
|
|
26
|
+
export declare function toPackageXml(map: any): {
|
|
27
|
+
Package: {};
|
|
28
|
+
};
|
|
29
|
+
export declare function splitTypeItemsToChunks(typeItemsMap: any, typeItemsMapChunkInit: any, objWeights: any, resourcesNum: any): Map<string, string[]>[];
|
|
30
|
+
export declare function jsonArrayToMap(jsonArray: any): Map<string, string[]>;
|
|
31
|
+
export declare function getSizeOfMapElements(map: any): number;
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSizeOfMapElements = exports.jsonArrayToMap = exports.splitTypeItemsToChunks = exports.toPackageXml = exports.writePackageXmlFile = exports.retrieveChunks = exports.writeChunkPackages = exports.getTempPackageFilename = exports.splitChunksWithFixedTypes = exports.splitCustomObjectTranslation = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const os = require("os");
|
|
11
|
+
const command_1 = require("@salesforce/command");
|
|
12
|
+
const core_1 = require("@salesforce/core");
|
|
13
|
+
const performance_1 = require("../../../utils/performance");
|
|
14
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
15
|
+
const path_1 = require("path");
|
|
16
|
+
const constants_sourcesdownload_1 = require("../../../utils/constants/constants_sourcesdownload");
|
|
17
|
+
const filesUtils_1 = require("../../../utils/filesUtils");
|
|
18
|
+
const utils_1 = require("../../../utils/commands/utils");
|
|
19
|
+
const utils_2 = require("../../../utils/commands/utils");
|
|
20
|
+
const localSettings_1 = require("../../../utils/localSettings");
|
|
21
|
+
const fs = require('fs-extra');
|
|
22
|
+
const _ = require('lodash');
|
|
23
|
+
const settings = (0, localSettings_1.loadSettings)();
|
|
24
|
+
// Initialize Messages with the current plugin directory
|
|
25
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
26
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
27
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
28
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'allmeta_retrieve');
|
|
29
|
+
class Retrieve extends command_1.SfdxCommand {
|
|
30
|
+
async run() {
|
|
31
|
+
performance_1.default.getInstance().start();
|
|
32
|
+
// * STEP 0 - Set variables
|
|
33
|
+
var orgname = this.flags.orgname;
|
|
34
|
+
var manifest = this.flags.manifest;
|
|
35
|
+
var manifestDir = (0, path_1.join)('.', 'manifest');
|
|
36
|
+
var retrieve = !this.flags["dont-retrieve"];
|
|
37
|
+
var splitmerge = this.flags["split-merge"];
|
|
38
|
+
var clean = this.flags.clean;
|
|
39
|
+
const resourcesNum = this.flags.resnumb || constants_sourcesdownload_1.RESOURCES_MAXNUM;
|
|
40
|
+
if (manifest == null && !fs.existsSync(manifestDir)) {
|
|
41
|
+
fs.mkdirSync(manifestDir, { recursive: true });
|
|
42
|
+
}
|
|
43
|
+
const logdir = this.flags['log-dir'] || settings['easysources-log-path'] || constants_1.DEFAULT_LOG_PATH;
|
|
44
|
+
const xmldir = this.flags['sf-xml'] || settings['salesforce-xml-path'] || constants_1.DEFAULT_SFXML_PATH;
|
|
45
|
+
const csvdir = this.flags['es-csv'] || settings['easysources-csv-path'] || constants_1.DEFAULT_ESCSV_PATH;
|
|
46
|
+
if (!fs.existsSync(logdir)) {
|
|
47
|
+
fs.mkdirSync(logdir, { recursive: true });
|
|
48
|
+
}
|
|
49
|
+
// * STEP 0.1
|
|
50
|
+
if (clean) {
|
|
51
|
+
await Promise.all([
|
|
52
|
+
(0, filesUtils_1.cleanDir)(xmldir),
|
|
53
|
+
(0, filesUtils_1.cleanDir)(logdir),
|
|
54
|
+
(0, filesUtils_1.cleanDir)(csvdir)
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
// * STEP 1 - Retrieve AllMeta Package and/or read it
|
|
58
|
+
if (manifest == null) {
|
|
59
|
+
await (0, utils_1.retrieveAllMetadataPackage)(orgname, manifestDir);
|
|
60
|
+
}
|
|
61
|
+
if (manifest != null) {
|
|
62
|
+
manifestDir = manifest.substring(0, manifest.lastIndexOf('/'));
|
|
63
|
+
}
|
|
64
|
+
const inputFile = manifest || (0, path_1.join)(manifestDir, constants_sourcesdownload_1.DEFAULT_PACKAGE_EXT);
|
|
65
|
+
const xmlFileContent = (await (0, filesUtils_1.readXmlFromFile)(inputFile)) ?? {};
|
|
66
|
+
const typesProperties = xmlFileContent[constants_sourcesdownload_1.TYPES_ROOT_TAG] ?? {};
|
|
67
|
+
const typeItemsList = typesProperties[constants_sourcesdownload_1.TYPES_PICKVAL_ROOT];
|
|
68
|
+
var typeItemsMap = jsonArrayToMap(typeItemsList);
|
|
69
|
+
// * STEP 1.1 - Calculate objects weight
|
|
70
|
+
const strFileContent = await (0, filesUtils_1.readStringFromFile)(inputFile);
|
|
71
|
+
var objWeights = {};
|
|
72
|
+
if (typeItemsMap.has('CustomObject')) {
|
|
73
|
+
for (const member of typeItemsMap.get('CustomObject')) {
|
|
74
|
+
var str = member + ".";
|
|
75
|
+
objWeights[member] = (strFileContent.split(str) || []).length; // should be -1, but we count also the customObject itself as +1
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// * STEP 2 - Start chunkization
|
|
79
|
+
var typeItemsMapChunks = [];
|
|
80
|
+
var typesToDelete = [];
|
|
81
|
+
// * STEP 2.1 - profiles chunkization
|
|
82
|
+
var profileChunks = splitChunksWithFixedTypes(typeItemsMap, typesToDelete, objWeights, resourcesNum, constants_sourcesdownload_1.PROFILE_FIX_TYPE, constants_sourcesdownload_1.PROFILE_REL_TYPES);
|
|
83
|
+
console.log('Profile chunks size: ' + profileChunks.length);
|
|
84
|
+
// * STEP 2.2 - permset chunkization
|
|
85
|
+
var permsetChunks = splitChunksWithFixedTypes(typeItemsMap, typesToDelete, objWeights, resourcesNum, constants_sourcesdownload_1.PERMSET_FIX_TYPE, constants_sourcesdownload_1.PROFILE_REL_TYPES);
|
|
86
|
+
console.log('Permset chunks size: ' + permsetChunks.length);
|
|
87
|
+
// * STEP 2.3 - translation chunkization
|
|
88
|
+
var translationChunks = splitChunksWithFixedTypes(typeItemsMap, typesToDelete, objWeights, resourcesNum, constants_sourcesdownload_1.TRANSL_FIX_TYPES, constants_sourcesdownload_1.TRANSL_REL_TYPES);
|
|
89
|
+
console.log('Translation chunks size: ' + translationChunks.length);
|
|
90
|
+
if (translationChunks.length > 1) {
|
|
91
|
+
// should always be one... but just in case
|
|
92
|
+
console.log('WARNING: translation chunks size is greater than 1! This situation was not expected at the moment of writing this code.');
|
|
93
|
+
}
|
|
94
|
+
// * STEP 2.4 - customObjectTranslation chunkization
|
|
95
|
+
// for customObjectTranslation we need to split the chunks in a different way
|
|
96
|
+
// the idea is to have some fixed types, and to cycle on every couple Object/CustomObjectTranslation
|
|
97
|
+
var customObjectTranslationChunks = splitCustomObjectTranslation(typeItemsMap, typesToDelete, objWeights, resourcesNum);
|
|
98
|
+
console.log('CustomObjectTranslation chunks size: ' + customObjectTranslationChunks.length);
|
|
99
|
+
// * STEP 2.5 - delete already retrieved types
|
|
100
|
+
var membersToDeleteUniq = [...new Set(typesToDelete)];
|
|
101
|
+
for (var type of membersToDeleteUniq) {
|
|
102
|
+
typeItemsMap.delete(type);
|
|
103
|
+
}
|
|
104
|
+
// * STEP 2.4 - general chunkization
|
|
105
|
+
// the general chunkization applies to all, except profiles / permsets // // except objects (and childrens..)
|
|
106
|
+
// we split the package in various chunks, in a sequencial way, each of resourcesNum number of members (except the last chunk)
|
|
107
|
+
// at the end each item of typeItemsMapChunks will be a package
|
|
108
|
+
typeItemsMapChunks.push(...splitTypeItemsToChunks(typeItemsMap, null, objWeights, resourcesNum));
|
|
109
|
+
console.log('Other chunks size: ' + typeItemsMapChunks.length);
|
|
110
|
+
// * STEP 3 - write chunk packages
|
|
111
|
+
var counter = { val: 0 };
|
|
112
|
+
var translFiles = await writeChunkPackages(translationChunks, manifestDir, 'translations', counter);
|
|
113
|
+
var cotFiles = await writeChunkPackages(customObjectTranslationChunks, manifestDir, 'customobjtranslations', counter);
|
|
114
|
+
var profFiles = await writeChunkPackages(profileChunks, manifestDir, 'profiles', counter);
|
|
115
|
+
var permsFiles = await writeChunkPackages(permsetChunks, manifestDir, 'permissionsets', counter);
|
|
116
|
+
var otherFiles = await writeChunkPackages(typeItemsMapChunks, manifestDir, null, counter);
|
|
117
|
+
// * STEP 4 - retrieve chunk packages
|
|
118
|
+
if (retrieve) {
|
|
119
|
+
await Promise.all([
|
|
120
|
+
retrieveChunks(translationChunks, orgname, manifestDir, 'translations', translFiles, logdir),
|
|
121
|
+
retrieveChunks(customObjectTranslationChunks, orgname, manifestDir, 'customobjtranslations', cotFiles, logdir),
|
|
122
|
+
retrieveChunks(profileChunks, orgname, manifestDir, 'profiles', profFiles, logdir),
|
|
123
|
+
retrieveChunks(permsetChunks, orgname, manifestDir, 'permissionsets', permsFiles, logdir),
|
|
124
|
+
retrieveChunks(typeItemsMapChunks, orgname, manifestDir, null, otherFiles, logdir)
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
// * STEP 5 - Split and merge
|
|
128
|
+
if (splitmerge) {
|
|
129
|
+
await (0, utils_1.bulkExecuteCommands)(this.flags, 'split', this.flags.sequencial);
|
|
130
|
+
await (0, utils_1.bulkExecuteCommands)(this.flags, 'merge', this.flags.sequencial);
|
|
131
|
+
}
|
|
132
|
+
performance_1.default.getInstance().end();
|
|
133
|
+
return 'OK';
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.default = Retrieve;
|
|
137
|
+
Retrieve.description = messages.getMessage('commandDescription');
|
|
138
|
+
Retrieve.examples = messages.getMessage('examples').split(os.EOL);
|
|
139
|
+
Retrieve.flagsConfig = {
|
|
140
|
+
// flag with a value (-n, --name=VALUE)
|
|
141
|
+
manifest: command_1.flags.string({
|
|
142
|
+
char: 'm',
|
|
143
|
+
description: messages.getMessage('manifestFlagDescription', [""]),
|
|
144
|
+
}),
|
|
145
|
+
"sf-xml": command_1.flags.string({
|
|
146
|
+
char: 'x',
|
|
147
|
+
description: messages.getMessage('sfXmlFlagDescription', [constants_1.DEFAULT_SFXML_PATH]),
|
|
148
|
+
}),
|
|
149
|
+
"es-csv": command_1.flags.string({
|
|
150
|
+
char: 'c',
|
|
151
|
+
description: messages.getMessage('esCsvFlagDescription', [constants_1.DEFAULT_ESCSV_PATH]),
|
|
152
|
+
}),
|
|
153
|
+
orgname: command_1.flags.string({
|
|
154
|
+
char: 'r',
|
|
155
|
+
description: messages.getMessage('orgFlagDescription', [""]),
|
|
156
|
+
required: true
|
|
157
|
+
}),
|
|
158
|
+
"dont-retrieve": command_1.flags.boolean({
|
|
159
|
+
char: 'k',
|
|
160
|
+
description: messages.getMessage('dontRetrieveFlagDescription', ["false"]),
|
|
161
|
+
default: false
|
|
162
|
+
}),
|
|
163
|
+
resnumb: command_1.flags.string({
|
|
164
|
+
char: 'n',
|
|
165
|
+
description: messages.getMessage('resnumbFlagDescription', [constants_sourcesdownload_1.RESOURCES_MAXNUM]),
|
|
166
|
+
}),
|
|
167
|
+
"log-dir": command_1.flags.string({
|
|
168
|
+
char: 'l',
|
|
169
|
+
description: messages.getMessage('logdirFlagDescription', [constants_1.DEFAULT_LOG_PATH]),
|
|
170
|
+
}),
|
|
171
|
+
"split-merge": command_1.flags.boolean({
|
|
172
|
+
char: 't',
|
|
173
|
+
description: messages.getMessage('splitMergeFlagDescription', ["false"]),
|
|
174
|
+
default: false
|
|
175
|
+
}),
|
|
176
|
+
clean: command_1.flags.boolean({
|
|
177
|
+
char: 'e',
|
|
178
|
+
description: messages.getMessage('cleanFlagDescription', ["false"]),
|
|
179
|
+
default: false
|
|
180
|
+
}),
|
|
181
|
+
sequencial: command_1.flags.boolean({
|
|
182
|
+
char: 's',
|
|
183
|
+
description: messages.getMessage('sequencialFlagDescription', ["false"]),
|
|
184
|
+
default: false
|
|
185
|
+
}),
|
|
186
|
+
};
|
|
187
|
+
function splitCustomObjectTranslation(typeItemsMap, typesToDelete, objWeights, resourcesNum) {
|
|
188
|
+
// create fixed items
|
|
189
|
+
var typeItemsFix = new Map();
|
|
190
|
+
for (var type of constants_sourcesdownload_1.CUSTOBJTRANSL_FIX_TYPES) {
|
|
191
|
+
if (typeItemsMap.has(type)) {
|
|
192
|
+
typeItemsFix.set(type, typeItemsMap.get(type));
|
|
193
|
+
typesToDelete.push(type);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
var typeItemsMapChunks = [];
|
|
197
|
+
// initialize variables
|
|
198
|
+
var typeItemsMapChunkInit = typeItemsFix;
|
|
199
|
+
var typeItemsMapChunk = _.cloneDeep(typeItemsMapChunkInit);
|
|
200
|
+
var currNum = getSizeOfMapElements(typeItemsMapChunk);
|
|
201
|
+
for (const customobject of typeItemsMap.get(constants_sourcesdownload_1.CUSTOMOBJECT_TYPE)) {
|
|
202
|
+
var increment = objWeights[customobject];
|
|
203
|
+
currNum = currNum + increment;
|
|
204
|
+
// if we reach the maximum number of resources
|
|
205
|
+
if (currNum > resourcesNum) {
|
|
206
|
+
// 1 - we save the part map
|
|
207
|
+
typeItemsMapChunks.push(typeItemsMapChunk);
|
|
208
|
+
// 2 - we refresh the variables
|
|
209
|
+
typeItemsMapChunk = _.cloneDeep(typeItemsMapChunkInit);
|
|
210
|
+
currNum = getSizeOfMapElements(typeItemsMapChunk) + increment;
|
|
211
|
+
}
|
|
212
|
+
// accumulate each member entry
|
|
213
|
+
for (const customobjecttranslation of typeItemsMap.get(constants_sourcesdownload_1.CUSTOMOBJECTTRANSL_TYPE)) {
|
|
214
|
+
var found = false;
|
|
215
|
+
if (customobjecttranslation.startsWith(customobject + '-')) {
|
|
216
|
+
if (!found) {
|
|
217
|
+
var memberArray = typeItemsMapChunk.get(constants_sourcesdownload_1.CUSTOMOBJECT_TYPE) || [];
|
|
218
|
+
memberArray.push(customobject);
|
|
219
|
+
typeItemsMapChunk.set(constants_sourcesdownload_1.CUSTOMOBJECT_TYPE, memberArray);
|
|
220
|
+
found = true;
|
|
221
|
+
}
|
|
222
|
+
var memberArray = typeItemsMapChunk.get(constants_sourcesdownload_1.CUSTOMOBJECTTRANSL_TYPE) || [];
|
|
223
|
+
memberArray.push(customobjecttranslation);
|
|
224
|
+
typeItemsMapChunk.set(constants_sourcesdownload_1.CUSTOMOBJECTTRANSL_TYPE, memberArray);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// accumulate the metadata type at the end of the list of members
|
|
229
|
+
typeItemsMapChunks.push(typeItemsMapChunk);
|
|
230
|
+
typesToDelete.push(constants_sourcesdownload_1.CUSTOMOBJECT_TYPE);
|
|
231
|
+
typesToDelete.push(constants_sourcesdownload_1.CUSTOMOBJECTTRANSL_TYPE);
|
|
232
|
+
return typeItemsMapChunks;
|
|
233
|
+
}
|
|
234
|
+
exports.splitCustomObjectTranslation = splitCustomObjectTranslation;
|
|
235
|
+
function splitChunksWithFixedTypes(typeItemsMap, typesToDelete, objWeights, resourcesNum, FIXED_TYPES, RELATED_TYPES) {
|
|
236
|
+
// if(typeItemsMap.has(FIXED_TYPES)){
|
|
237
|
+
// create related items
|
|
238
|
+
var typeItemsRelated = new Map();
|
|
239
|
+
for (var relatedType of RELATED_TYPES) {
|
|
240
|
+
if (typeItemsMap.has(relatedType)) {
|
|
241
|
+
typeItemsRelated.set(relatedType, typeItemsMap.get(relatedType));
|
|
242
|
+
typesToDelete.push(relatedType);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
typesToDelete.push(...FIXED_TYPES);
|
|
246
|
+
// create fixed items
|
|
247
|
+
var typeItemsFix = new Map();
|
|
248
|
+
for (var type of FIXED_TYPES) {
|
|
249
|
+
if (typeItemsMap.has(type)) {
|
|
250
|
+
typeItemsFix.set(type, typeItemsMap.get(type));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// perform chunkization
|
|
254
|
+
return splitTypeItemsToChunks(typeItemsRelated, typeItemsFix, objWeights, resourcesNum);
|
|
255
|
+
// typeItemsMapChunks.push(...profileChunks);
|
|
256
|
+
// } else {
|
|
257
|
+
// return [];
|
|
258
|
+
// }
|
|
259
|
+
}
|
|
260
|
+
exports.splitChunksWithFixedTypes = splitChunksWithFixedTypes;
|
|
261
|
+
function getTempPackageFilename(type, i) {
|
|
262
|
+
var type = type == null ? 'all' : type;
|
|
263
|
+
return 'packageTemp_' + i + '_' + type + '.xml';
|
|
264
|
+
}
|
|
265
|
+
exports.getTempPackageFilename = getTempPackageFilename;
|
|
266
|
+
async function writeChunkPackages(chunks, baseInputDir, type, counter) {
|
|
267
|
+
var filenames = [];
|
|
268
|
+
for (var typeItemsMapChunk of chunks) {
|
|
269
|
+
counter['val'] = counter['val'] + 1;
|
|
270
|
+
var filename = getTempPackageFilename(type, counter['val']);
|
|
271
|
+
filenames.push(filename);
|
|
272
|
+
await writePackageXmlFile(baseInputDir, filename, typeItemsMapChunk);
|
|
273
|
+
}
|
|
274
|
+
return filenames;
|
|
275
|
+
}
|
|
276
|
+
exports.writeChunkPackages = writeChunkPackages;
|
|
277
|
+
async function retrieveChunks(chunks, orgname, baseInputDir, type, filenames, logdir) {
|
|
278
|
+
var isFirst = true;
|
|
279
|
+
for (var filename of filenames) {
|
|
280
|
+
await (0, utils_1.retrievePackage)(orgname, baseInputDir, filename, logdir);
|
|
281
|
+
if (type != null && constants_sourcesdownload_1.TYPES_TO_SPLIT.includes(type) && chunks.length > 1) {
|
|
282
|
+
if (isFirst) {
|
|
283
|
+
isFirst = false;
|
|
284
|
+
await (0, utils_2.executeCommand)(this.flags, 'split', type);
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
await (0, utils_2.executeCommand)(this.flags, 'upsert', type);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (type != null && chunks.length > 1) {
|
|
292
|
+
await (0, utils_2.executeCommand)(this.flags, 'merge', type);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
exports.retrieveChunks = retrieveChunks;
|
|
296
|
+
async function writePackageXmlFile(dir, filename, obj) {
|
|
297
|
+
await (0, filesUtils_1.writeXmlToFile)((0, path_1.join)(dir, filename), toPackageXml(obj));
|
|
298
|
+
}
|
|
299
|
+
exports.writePackageXmlFile = writePackageXmlFile;
|
|
300
|
+
function toPackageXml(map) {
|
|
301
|
+
var pkg = {};
|
|
302
|
+
pkg['$'] = { xmlns: 'http://soap.sforce.com/2006/04/metadata' };
|
|
303
|
+
var types = [];
|
|
304
|
+
for (var [key, value] of map) {
|
|
305
|
+
var type = {};
|
|
306
|
+
type['members'] = value;
|
|
307
|
+
type['name'] = key;
|
|
308
|
+
types.push(type);
|
|
309
|
+
}
|
|
310
|
+
pkg['types'] = types;
|
|
311
|
+
pkg['version'] = constants_sourcesdownload_1.PACKAGE_VERSION;
|
|
312
|
+
return { Package: pkg };
|
|
313
|
+
}
|
|
314
|
+
exports.toPackageXml = toPackageXml;
|
|
315
|
+
function splitTypeItemsToChunks(typeItemsMap, typeItemsMapChunkInit, objWeights, resourcesNum) {
|
|
316
|
+
var typeItemsMapChunks = [];
|
|
317
|
+
// initialize variables
|
|
318
|
+
typeItemsMapChunkInit = typeItemsMapChunkInit == null ? new Map() : typeItemsMapChunkInit;
|
|
319
|
+
var typeItemsMapChunk = _.cloneDeep(typeItemsMapChunkInit);
|
|
320
|
+
var currNum = getSizeOfMapElements(typeItemsMapChunk);
|
|
321
|
+
// loop on each metadata type
|
|
322
|
+
if (typeItemsMap != null && typeItemsMap.size > 0) {
|
|
323
|
+
for (const [name, members] of typeItemsMap) {
|
|
324
|
+
var membersPart = [];
|
|
325
|
+
// loop on each member of the given metadata type
|
|
326
|
+
for (const member of members) {
|
|
327
|
+
var increment;
|
|
328
|
+
// since the customObject also downloads other subresources, to avoid hitting numResources
|
|
329
|
+
// the customObject weight is the one calculated in the STEP 1.1
|
|
330
|
+
if (name == 'CustomObject' && objWeights[member] != null) {
|
|
331
|
+
increment = objWeights[member];
|
|
332
|
+
}
|
|
333
|
+
else if (constants_sourcesdownload_1.OBJECT_SUBPART_SKIP.includes(name)
|
|
334
|
+
&& objWeights.hasOwnProperty(member.substring(0, member.indexOf('.')))) {
|
|
335
|
+
// but we can optimize the process by removing the subparts that are automatically downloaded with the customObject
|
|
336
|
+
// this would improve scenarios where objects folder has more than 10000 resources
|
|
337
|
+
// TODO should be investigated later
|
|
338
|
+
// IDEA: add another if: if name == 'one type i want to skip' and member.substring(0, indexOf(.))
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
increment = 1;
|
|
343
|
+
}
|
|
344
|
+
currNum = currNum + increment;
|
|
345
|
+
// if we reach the maximum number of resources:
|
|
346
|
+
if (currNum > resourcesNum) {
|
|
347
|
+
// 1 - we save the part map
|
|
348
|
+
if (membersPart.length > 0) {
|
|
349
|
+
typeItemsMapChunk.set(name, membersPart);
|
|
350
|
+
}
|
|
351
|
+
typeItemsMapChunks.push(typeItemsMapChunk);
|
|
352
|
+
// 2 - we refresh the variables
|
|
353
|
+
typeItemsMapChunk = _.cloneDeep(typeItemsMapChunkInit);
|
|
354
|
+
currNum = getSizeOfMapElements(typeItemsMapChunk) + increment;
|
|
355
|
+
membersPart = [];
|
|
356
|
+
}
|
|
357
|
+
// accumulate each member entry
|
|
358
|
+
membersPart.push(member);
|
|
359
|
+
}
|
|
360
|
+
// accumulate the metadata type at the end of the list of members
|
|
361
|
+
typeItemsMapChunk.set(name, membersPart);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
// save the last chunk of the map
|
|
365
|
+
if (typeItemsMapChunk.size > 0) {
|
|
366
|
+
typeItemsMapChunks.push(typeItemsMapChunk);
|
|
367
|
+
}
|
|
368
|
+
return typeItemsMapChunks;
|
|
369
|
+
}
|
|
370
|
+
exports.splitTypeItemsToChunks = splitTypeItemsToChunks;
|
|
371
|
+
function jsonArrayToMap(jsonArray) {
|
|
372
|
+
if (!Array.isArray(jsonArray))
|
|
373
|
+
jsonArray = [jsonArray];
|
|
374
|
+
const myMap = new Map(jsonArray.map(object => {
|
|
375
|
+
return [object['name'],
|
|
376
|
+
Array.isArray(object['members']) ? object['members'] : [object['members']]];
|
|
377
|
+
}));
|
|
378
|
+
return myMap;
|
|
379
|
+
}
|
|
380
|
+
exports.jsonArrayToMap = jsonArrayToMap;
|
|
381
|
+
function getSizeOfMapElements(map) {
|
|
382
|
+
if (map == null) {
|
|
383
|
+
return 0;
|
|
384
|
+
}
|
|
385
|
+
var size = 0;
|
|
386
|
+
for (var [key, value] of map) {
|
|
387
|
+
key; // dummy use, if not throws error
|
|
388
|
+
size += value.length;
|
|
389
|
+
}
|
|
390
|
+
return size;
|
|
391
|
+
}
|
|
392
|
+
exports.getSizeOfMapElements = getSizeOfMapElements;
|
|
393
|
+
//# sourceMappingURL=retrieve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve.js","sourceRoot":"","sources":["../../../../src/commands/easysources/allmeta/retrieve.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,kEAA8G;AAC9G,+BAA4B;AAC5B,kGAAqW;AACrW,0DAA0G;AAC1G,yDAAiH;AACjH,yDAA+D;AAC/D,gEAA4D;AAC5D,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/B,MAAM,C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,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;SAE5C;KACJ;IAED,iCAAiC;IACjC,IAAG,iBAAiB,CAAC,IAAI,GAAG,CAAC,EAAC;QAC1B,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;KAC9C;IAED,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AAnED,wDAmEC;AAED,SAAgB,cAAc,CAAC,SAAS;IACvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;QAAE,SAAS,GAAG,CAAC,SAAS,CAAC,CAAA;IAEtD,MAAM,KAAK,GAAG,IAAI,GAAG,CACd,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;YACb,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzF,CAAC,CAAC,CACoB,CAAC;IAE9B,OAAO,KAAK,CAAC;AACd,CAAC;AAXD,wCAWC;AAED,SAAgB,oBAAoB,CAAC,GAAG;IACpC,IAAG,GAAG,IAAI,IAAI,EAAC;QACX,OAAO,CAAC,CAAC;KACZ;IACD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAI,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAG,EAAC;QACxB,GAAG,CAAC,CAAC,iCAAiC;QACtC,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC;KACxB;IACD,OAAO,IAAI,CAAC;AAEhB,CAAC;AAXD,oDAWC"}
|
|
@@ -4,8 +4,9 @@ export default class Split extends SfdxCommand {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static examples: string[];
|
|
6
6
|
protected static flagsConfig: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
"sf-xml": flags.Discriminated<flags.String>;
|
|
8
|
+
"es-csv": flags.Discriminated<flags.String>;
|
|
9
|
+
sequencial: flags.Discriminated<flags.Boolean<boolean>>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<AnyJson>;
|
|
11
12
|
}
|
|
@@ -11,16 +11,16 @@ const command_1 = require("@salesforce/command");
|
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
12
|
const performance_1 = require("../../../utils/performance");
|
|
13
13
|
const constants_1 = require("../../../utils/constants/constants");
|
|
14
|
-
const utils_1 = require("../../../utils/utils");
|
|
14
|
+
const utils_1 = require("../../../utils/commands/utils");
|
|
15
15
|
// Initialize Messages with the current plugin directory
|
|
16
16
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
17
17
|
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
18
18
|
// or any library that is using the messages framework can also be loaded this way.
|
|
19
|
-
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', '
|
|
19
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'all_split');
|
|
20
20
|
class Split extends command_1.SfdxCommand {
|
|
21
21
|
async run() {
|
|
22
22
|
performance_1.default.getInstance().start();
|
|
23
|
-
await (0, utils_1.bulkExecuteCommands)(this.flags, 'split');
|
|
23
|
+
await (0, utils_1.bulkExecuteCommands)(this.flags, 'split', this.flags.sequencial);
|
|
24
24
|
performance_1.default.getInstance().end();
|
|
25
25
|
return 'OK';
|
|
26
26
|
}
|
|
@@ -30,13 +30,18 @@ Split.description = messages.getMessage('commandDescription');
|
|
|
30
30
|
Split.examples = messages.getMessage('examples').split(os.EOL);
|
|
31
31
|
Split.flagsConfig = {
|
|
32
32
|
// flag with a value (-n, --name=VALUE)
|
|
33
|
-
|
|
34
|
-
char: '
|
|
35
|
-
description: messages.getMessage('
|
|
33
|
+
"sf-xml": command_1.flags.string({
|
|
34
|
+
char: 'x',
|
|
35
|
+
description: messages.getMessage('sfXmlFlagDescription', [constants_1.DEFAULT_SFXML_PATH]),
|
|
36
36
|
}),
|
|
37
|
-
|
|
38
|
-
char: '
|
|
39
|
-
description: messages.getMessage('
|
|
37
|
+
"es-csv": command_1.flags.string({
|
|
38
|
+
char: 'c',
|
|
39
|
+
description: messages.getMessage('esCsvFlagDescription', [constants_1.DEFAULT_ESCSV_PATH]),
|
|
40
|
+
}),
|
|
41
|
+
sequencial: command_1.flags.boolean({
|
|
42
|
+
char: 's',
|
|
43
|
+
description: messages.getMessage('sequencialFlagDescription', ["false"]),
|
|
44
|
+
default: false
|
|
40
45
|
}),
|
|
41
46
|
};
|
|
42
47
|
//# sourceMappingURL=split.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split.js","sourceRoot":"","sources":["../../../../src/commands/easysources/allmeta/split.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"split.js","sourceRoot":"","sources":["../../../../src/commands/easysources/allmeta/split.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,kEAA4F;AAC5F,yDAAoE;AAIpE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;AAEzE,MAAqB,KAAM,SAAQ,qBAAW;IAwBnC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,MAAM,IAAA,2BAAmB,EAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAEtE,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAEhC,OAAO,IAAI,CAAC;IAChB,CAAC;;AAhCL,wBAiCC;AAhCiB,iBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,cAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAGtD,iBAAW,GAAG;IAC3B,uCAAuC;IACvC,QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,8BAAkB,CAAC,CAAC;KACjF,CAAC;IACF,QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,8BAAkB,CAAC,CAAC;KACjF,CAAC;IACF,UAAU,EAAE,eAAK,CAAC,OAAO,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,CAAC,CAAC;QACxE,OAAO,EAAE,KAAK;KACjB,CAAC;CACL,CAAC"}
|
|
@@ -4,8 +4,9 @@ export default class Split extends SfdxCommand {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static examples: string[];
|
|
6
6
|
protected static flagsConfig: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
"sf-xml": flags.Discriminated<flags.String>;
|
|
8
|
+
"es-csv": flags.Discriminated<flags.String>;
|
|
9
|
+
sequencial: flags.Discriminated<flags.Boolean<boolean>>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<AnyJson>;
|
|
11
12
|
}
|