sfdx-easy-sources 0.1.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/README.md +158 -0
- package/lib/commands/easysources/allmeta/merge.d.ts +15 -0
- package/lib/commands/easysources/allmeta/merge.js +47 -0
- package/lib/commands/easysources/allmeta/merge.js.map +1 -0
- package/lib/commands/easysources/allmeta/split.d.ts +11 -0
- package/lib/commands/easysources/allmeta/split.js +42 -0
- package/lib/commands/easysources/allmeta/split.js.map +1 -0
- package/lib/commands/easysources/allmeta/upsert.d.ts +11 -0
- package/lib/commands/easysources/allmeta/upsert.js +42 -0
- package/lib/commands/easysources/allmeta/upsert.js.map +1 -0
- package/lib/commands/easysources/applications/merge.d.ts +15 -0
- package/lib/commands/easysources/applications/merge.js +48 -0
- package/lib/commands/easysources/applications/merge.js.map +1 -0
- package/lib/commands/easysources/applications/split.d.ts +12 -0
- package/lib/commands/easysources/applications/split.js +47 -0
- package/lib/commands/easysources/applications/split.js.map +1 -0
- package/lib/commands/easysources/applications/updatekey.d.ts +11 -0
- package/lib/commands/easysources/applications/updatekey.js +43 -0
- package/lib/commands/easysources/applications/updatekey.js.map +1 -0
- package/lib/commands/easysources/applications/upsert.d.ts +15 -0
- package/lib/commands/easysources/applications/upsert.js +48 -0
- package/lib/commands/easysources/applications/upsert.js.map +1 -0
- package/lib/commands/easysources/globalvaluesets/merge.d.ts +15 -0
- package/lib/commands/easysources/globalvaluesets/merge.js +48 -0
- package/lib/commands/easysources/globalvaluesets/merge.js.map +1 -0
- package/lib/commands/easysources/globalvaluesets/split.d.ts +12 -0
- package/lib/commands/easysources/globalvaluesets/split.js +47 -0
- package/lib/commands/easysources/globalvaluesets/split.js.map +1 -0
- package/lib/commands/easysources/globalvaluesets/updatekey.d.ts +11 -0
- package/lib/commands/easysources/globalvaluesets/updatekey.js +43 -0
- package/lib/commands/easysources/globalvaluesets/updatekey.js.map +1 -0
- package/lib/commands/easysources/globalvaluesets/upsert.d.ts +15 -0
- package/lib/commands/easysources/globalvaluesets/upsert.js +48 -0
- package/lib/commands/easysources/globalvaluesets/upsert.js.map +1 -0
- package/lib/commands/easysources/globalvaluesettranslations/merge.d.ts +15 -0
- package/lib/commands/easysources/globalvaluesettranslations/merge.js +48 -0
- package/lib/commands/easysources/globalvaluesettranslations/merge.js.map +1 -0
- package/lib/commands/easysources/globalvaluesettranslations/split.d.ts +12 -0
- package/lib/commands/easysources/globalvaluesettranslations/split.js +47 -0
- package/lib/commands/easysources/globalvaluesettranslations/split.js.map +1 -0
- package/lib/commands/easysources/globalvaluesettranslations/updatekey.d.ts +11 -0
- package/lib/commands/easysources/globalvaluesettranslations/updatekey.js +43 -0
- package/lib/commands/easysources/globalvaluesettranslations/updatekey.js.map +1 -0
- package/lib/commands/easysources/globalvaluesettranslations/upsert.d.ts +15 -0
- package/lib/commands/easysources/globalvaluesettranslations/upsert.js +48 -0
- package/lib/commands/easysources/globalvaluesettranslations/upsert.js.map +1 -0
- package/lib/commands/easysources/labels/merge.d.ts +14 -0
- package/lib/commands/easysources/labels/merge.js +44 -0
- package/lib/commands/easysources/labels/merge.js.map +1 -0
- package/lib/commands/easysources/labels/split.d.ts +11 -0
- package/lib/commands/easysources/labels/split.js +43 -0
- package/lib/commands/easysources/labels/split.js.map +1 -0
- package/lib/commands/easysources/labels/updatekey.d.ts +10 -0
- package/lib/commands/easysources/labels/updatekey.js +39 -0
- package/lib/commands/easysources/labels/updatekey.js.map +1 -0
- package/lib/commands/easysources/labels/upsert.d.ts +14 -0
- package/lib/commands/easysources/labels/upsert.js +44 -0
- package/lib/commands/easysources/labels/upsert.js.map +1 -0
- package/lib/commands/easysources/permissionsets/delete.d.ts +16 -0
- package/lib/commands/easysources/permissionsets/delete.js +104 -0
- package/lib/commands/easysources/permissionsets/delete.js.map +1 -0
- package/lib/commands/easysources/permissionsets/merge.d.ts +15 -0
- package/lib/commands/easysources/permissionsets/merge.js +48 -0
- package/lib/commands/easysources/permissionsets/merge.js.map +1 -0
- package/lib/commands/easysources/permissionsets/split.d.ts +12 -0
- package/lib/commands/easysources/permissionsets/split.js +47 -0
- package/lib/commands/easysources/permissionsets/split.js.map +1 -0
- package/lib/commands/easysources/permissionsets/updatekey.d.ts +11 -0
- package/lib/commands/easysources/permissionsets/updatekey.js +43 -0
- package/lib/commands/easysources/permissionsets/updatekey.js.map +1 -0
- package/lib/commands/easysources/permissionsets/upsert.d.ts +15 -0
- package/lib/commands/easysources/permissionsets/upsert.js +48 -0
- package/lib/commands/easysources/permissionsets/upsert.js.map +1 -0
- package/lib/commands/easysources/profiles/delete.d.ts +16 -0
- package/lib/commands/easysources/profiles/delete.js +104 -0
- package/lib/commands/easysources/profiles/delete.js.map +1 -0
- package/lib/commands/easysources/profiles/merge.d.ts +15 -0
- package/lib/commands/easysources/profiles/merge.js +48 -0
- package/lib/commands/easysources/profiles/merge.js.map +1 -0
- package/lib/commands/easysources/profiles/split.d.ts +12 -0
- package/lib/commands/easysources/profiles/split.js +47 -0
- package/lib/commands/easysources/profiles/split.js.map +1 -0
- package/lib/commands/easysources/profiles/updatekey.d.ts +11 -0
- package/lib/commands/easysources/profiles/updatekey.js +43 -0
- package/lib/commands/easysources/profiles/updatekey.js.map +1 -0
- package/lib/commands/easysources/profiles/upsert.d.ts +15 -0
- package/lib/commands/easysources/profiles/upsert.js +48 -0
- package/lib/commands/easysources/profiles/upsert.js.map +1 -0
- package/lib/commands/easysources/recordtypes/delete.d.ts +17 -0
- package/lib/commands/easysources/recordtypes/delete.js +129 -0
- package/lib/commands/easysources/recordtypes/delete.js.map +1 -0
- package/lib/commands/easysources/recordtypes/merge.d.ts +16 -0
- package/lib/commands/easysources/recordtypes/merge.js +110 -0
- package/lib/commands/easysources/recordtypes/merge.js.map +1 -0
- package/lib/commands/easysources/recordtypes/split.d.ts +13 -0
- package/lib/commands/easysources/recordtypes/split.js +125 -0
- package/lib/commands/easysources/recordtypes/split.js.map +1 -0
- package/lib/commands/easysources/recordtypes/updatekey.d.ts +12 -0
- package/lib/commands/easysources/recordtypes/updatekey.js +104 -0
- package/lib/commands/easysources/recordtypes/updatekey.js.map +1 -0
- package/lib/commands/easysources/recordtypes/upsert.d.ts +16 -0
- package/lib/commands/easysources/recordtypes/upsert.js +144 -0
- package/lib/commands/easysources/recordtypes/upsert.js.map +1 -0
- package/lib/commands/hello/org.d.ts +17 -0
- package/lib/commands/hello/org.js +72 -0
- package/lib/commands/hello/org.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/commands/keyupdater.d.ts +3 -0
- package/lib/utils/commands/keyupdater.js +55 -0
- package/lib/utils/commands/keyupdater.js.map +1 -0
- package/lib/utils/commands/merger.d.ts +3 -0
- package/lib/utils/commands/merger.js +53 -0
- package/lib/utils/commands/merger.js.map +1 -0
- package/lib/utils/commands/splitter.d.ts +3 -0
- package/lib/utils/commands/splitter.js +73 -0
- package/lib/utils/commands/splitter.js.map +1 -0
- package/lib/utils/commands/upserter.d.ts +3 -0
- package/lib/utils/commands/upserter.js +85 -0
- package/lib/utils/commands/upserter.js.map +1 -0
- package/lib/utils/constants/constants.d.ts +6 -0
- package/lib/utils/constants/constants.js +10 -0
- package/lib/utils/constants/constants.js.map +1 -0
- package/lib/utils/constants/constants_applications.d.ts +13 -0
- package/lib/utils/constants/constants_applications.js +15 -0
- package/lib/utils/constants/constants_applications.js.map +1 -0
- package/lib/utils/constants/constants_globalvaluesets.d.ts +13 -0
- package/lib/utils/constants/constants_globalvaluesets.js +15 -0
- package/lib/utils/constants/constants_globalvaluesets.js.map +1 -0
- package/lib/utils/constants/constants_globalvaluesettranslations.d.ts +13 -0
- package/lib/utils/constants/constants_globalvaluesettranslations.js +15 -0
- package/lib/utils/constants/constants_globalvaluesettranslations.js.map +1 -0
- package/lib/utils/constants/constants_labels.d.ts +13 -0
- package/lib/utils/constants/constants_labels.js +15 -0
- package/lib/utils/constants/constants_labels.js.map +1 -0
- package/lib/utils/constants/constants_permissionsets.d.ts +83 -0
- package/lib/utils/constants/constants_permissionsets.js +55 -0
- package/lib/utils/constants/constants_permissionsets.js.map +1 -0
- package/lib/utils/constants/constants_profiles.d.ts +83 -0
- package/lib/utils/constants/constants_profiles.js +68 -0
- package/lib/utils/constants/constants_profiles.js.map +1 -0
- package/lib/utils/constants/constants_recordtypes.d.ts +13 -0
- package/lib/utils/constants/constants_recordtypes.js +15 -0
- package/lib/utils/constants/constants_recordtypes.js.map +1 -0
- package/lib/utils/filesUtils.d.ts +9 -0
- package/lib/utils/filesUtils.js +75 -0
- package/lib/utils/filesUtils.js.map +1 -0
- package/lib/utils/performance.d.ts +9 -0
- package/lib/utils/performance.js +22 -0
- package/lib/utils/performance.js.map +1 -0
- package/lib/utils/utils.d.ts +5 -0
- package/lib/utils/utils.js +84 -0
- package/lib/utils/utils.js.map +1 -0
- package/lib/utils/utils_recordtypes.d.ts +2 -0
- package/lib/utils/utils_recordtypes.js +37 -0
- package/lib/utils/utils_recordtypes.js.map +1 -0
- package/lib/utils/xmlFormatter.d.ts +4 -0
- package/lib/utils/xmlFormatter.js +18 -0
- package/lib/utils/xmlFormatter.js.map +1 -0
- package/messages/all_merge.json +11 -0
- package/messages/all_split.json +12 -0
- package/messages/all_upsert.json +11 -0
- package/messages/applications_merge.json +12 -0
- package/messages/applications_split.json +15 -0
- package/messages/applications_updatekey.json +11 -0
- package/messages/applications_upsert.json +12 -0
- package/messages/globalvaluesets_merge.json +12 -0
- package/messages/globalvaluesets_split.json +15 -0
- package/messages/globalvaluesets_updatekey.json +11 -0
- package/messages/globalvaluesets_upsert.json +12 -0
- package/messages/globalvaluesettranslations_merge.json +12 -0
- package/messages/globalvaluesettranslations_split.json +15 -0
- package/messages/globalvaluesettranslations_updatekey.json +11 -0
- package/messages/globalvaluesettranslations_upsert.json +12 -0
- package/messages/labels_merge.json +11 -0
- package/messages/labels_split.json +12 -0
- package/messages/labels_updatekey.json +10 -0
- package/messages/labels_upsert.json +11 -0
- package/messages/org.json +10 -0
- package/messages/permissionsets_delete.json +23 -0
- package/messages/permissionsets_merge.json +12 -0
- package/messages/permissionsets_split.json +15 -0
- package/messages/permissionsets_updatekey.json +11 -0
- package/messages/permissionsets_upsert.json +12 -0
- package/messages/profiles_delete.json +23 -0
- package/messages/profiles_merge.json +12 -0
- package/messages/profiles_split.json +15 -0
- package/messages/profiles_updatekey.json +11 -0
- package/messages/profiles_upsert.json +12 -0
- package/messages/recordtypes_delete.json +16 -0
- package/messages/recordtypes_merge.json +15 -0
- package/messages/recordtypes_split.json +16 -0
- package/messages/recordtypes_updatekey.json +13 -0
- package/messages/recordtypes_upsert.json +15 -0
- package/oclif.manifest.json +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
* Licensed under the BSD 3-Clause license.
|
|
7
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const fs = require('fs-extra');
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
const performance_1 = require("../../../utils/performance");
|
|
15
|
+
const { Parser, transforms: { unwind } } = require('json2csv');
|
|
16
|
+
const constants_profiles_1 = require("../../../utils/constants/constants_profiles");
|
|
17
|
+
const filesUtils_1 = require("../../../utils/filesUtils");
|
|
18
|
+
const utils_1 = require("../../../utils/utils");
|
|
19
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
20
|
+
// Initialize Messages with the current plugin directory
|
|
21
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
22
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
23
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
24
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'profiles_delete');
|
|
25
|
+
class Delete extends command_1.SfdxCommand {
|
|
26
|
+
async run() {
|
|
27
|
+
performance_1.default.getInstance().start();
|
|
28
|
+
const type = this.flags.type;
|
|
29
|
+
const tagid = this.flags.tagid;
|
|
30
|
+
if (!type)
|
|
31
|
+
throw new core_1.SfError(messages.getMessage('errorNoTypeFlag'));
|
|
32
|
+
if (!tagid)
|
|
33
|
+
throw new core_1.SfError(messages.getMessage('errorNoTagIdFlag'));
|
|
34
|
+
if (!Object.keys(constants_profiles_1.PROFILE_ITEMS).includes(type))
|
|
35
|
+
throw new core_1.SfError(messages.getMessage('errorNoValidTypeFlag'));
|
|
36
|
+
const baseInputDir = (0, path_1.join)((this.flags.dir || constants_1.DEFAULT_PATH), constants_profiles_1.PROFILES_SUBPATH);
|
|
37
|
+
const inputProfile = (this.flags.input);
|
|
38
|
+
if (!fs.existsSync(baseInputDir)) {
|
|
39
|
+
console.log('Input folder ' + baseInputDir + ' does not exist!');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
var dirList = [];
|
|
43
|
+
if (inputProfile) {
|
|
44
|
+
dirList = inputProfile.split(',');
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
dirList = fs.readdirSync(baseInputDir, { withFileTypes: true })
|
|
48
|
+
.filter(item => item.isDirectory())
|
|
49
|
+
.map(item => item.name);
|
|
50
|
+
}
|
|
51
|
+
// dir is the profile name without the extension
|
|
52
|
+
for (const dir of dirList) {
|
|
53
|
+
console.log('Deleting on: ' + dir);
|
|
54
|
+
// type is a profile section (applicationVisibilities, classAccess ecc)
|
|
55
|
+
const csvFilePath = (0, path_1.join)(baseInputDir, dir, (0, filesUtils_1.calcCsvFilename)(dir, type));
|
|
56
|
+
if (fs.existsSync(csvFilePath)) {
|
|
57
|
+
var jsonMap = await (0, filesUtils_1.readCsvToJsonMap)(csvFilePath);
|
|
58
|
+
for (var k of tagid.split(',')) {
|
|
59
|
+
delete jsonMap[k];
|
|
60
|
+
}
|
|
61
|
+
var jsonArray = Object.values(jsonMap);
|
|
62
|
+
const headers = constants_profiles_1.PROFILE_ITEMS[type].headers;
|
|
63
|
+
const transforms = [unwind({ paths: headers })];
|
|
64
|
+
const parser = new Parser({ fields: [...headers, '_tagid'], transforms });
|
|
65
|
+
jsonArray = (0, utils_1.sortByKey)(jsonArray);
|
|
66
|
+
const csv = parser.parse(jsonArray);
|
|
67
|
+
try {
|
|
68
|
+
fs.writeFileSync(csvFilePath, csv, { flag: 'w+' });
|
|
69
|
+
// file written successfully
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
console.error(err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
performance_1.default.getInstance().end();
|
|
77
|
+
var outputString = 'OK';
|
|
78
|
+
return { outputString };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.default = Delete;
|
|
82
|
+
Delete.description = messages.getMessage('commandDescription');
|
|
83
|
+
Delete.examples = messages.getMessage('examples').split(os.EOL);
|
|
84
|
+
Delete.args = [{ name: 'file' }];
|
|
85
|
+
Delete.flagsConfig = {
|
|
86
|
+
// flag with a value (-n, --name=VALUE)
|
|
87
|
+
dir: command_1.flags.string({
|
|
88
|
+
char: 'd',
|
|
89
|
+
description: messages.getMessage('dirFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
90
|
+
}),
|
|
91
|
+
input: command_1.flags.string({
|
|
92
|
+
char: 'i',
|
|
93
|
+
description: messages.getMessage('inputFlagDescription'),
|
|
94
|
+
}),
|
|
95
|
+
type: command_1.flags.string({
|
|
96
|
+
char: 't',
|
|
97
|
+
description: messages.getMessage('typeFlagDescription'),
|
|
98
|
+
}),
|
|
99
|
+
tagid: command_1.flags.string({
|
|
100
|
+
char: 'k',
|
|
101
|
+
description: messages.getMessage('tagidFlagDescription'),
|
|
102
|
+
})
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/easysources/profiles/delete.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAAqD;AAErD,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/B,+BAA4B;AAC5B,4DAAqD;AACrD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/D,oFAA8F;AAC9F,0DAA6E;AAC7E,gDAAgD;AAChD,kEAAkE;AAGlE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAE/E,MAAqB,MAAO,SAAQ,qBAAW;IA2BpC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAa,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,cAAO,CAAC,QA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QACd,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,wBAAY,CAAC,CAAC;KACzE,CAAC;IACF,KAAK,EAAE,eAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KAC3D,CAAC;IACF,IAAI,EAAE,eAAK,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KAC1D,CAAC;IACF,KAAK,EAAE,eAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KAC3D,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Merge extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
protected static flagsConfig: {
|
|
10
|
+
dir: flags.Discriminated<flags.String>;
|
|
11
|
+
input: flags.Discriminated<flags.String>;
|
|
12
|
+
output: flags.Discriminated<flags.String>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<AnyJson>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
* Licensed under the BSD 3-Clause license.
|
|
7
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const performance_1 = require("../../../utils/performance");
|
|
13
|
+
const constants_profiles_1 = require("../../../utils/constants/constants_profiles");
|
|
14
|
+
const merger_1 = require("../../../utils/commands/merger");
|
|
15
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
16
|
+
// Initialize Messages with the current plugin directory
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
19
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
20
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'profiles_merge');
|
|
21
|
+
class Merge extends command_1.SfdxCommand {
|
|
22
|
+
async run() {
|
|
23
|
+
performance_1.default.getInstance().start();
|
|
24
|
+
var result = await (0, merger_1.merge)(this.flags, constants_profiles_1.PROFILES_SUBPATH, constants_profiles_1.PROFILES_EXTENSION, constants_profiles_1.PROFILES_ROOT_TAG, constants_profiles_1.PROFILE_ITEMS);
|
|
25
|
+
performance_1.default.getInstance().end();
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = Merge;
|
|
30
|
+
Merge.description = messages.getMessage('commandDescription');
|
|
31
|
+
Merge.examples = messages.getMessage('examples').split(os.EOL);
|
|
32
|
+
Merge.args = [{ name: 'file' }];
|
|
33
|
+
Merge.flagsConfig = {
|
|
34
|
+
// flag with a value (-n, --name=VALUE)
|
|
35
|
+
dir: command_1.flags.string({
|
|
36
|
+
char: 'd',
|
|
37
|
+
description: messages.getMessage('dirFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
38
|
+
}),
|
|
39
|
+
input: command_1.flags.string({
|
|
40
|
+
char: 'i',
|
|
41
|
+
description: messages.getMessage('inputFlagDescription'),
|
|
42
|
+
}),
|
|
43
|
+
output: command_1.flags.string({
|
|
44
|
+
char: 'o',
|
|
45
|
+
description: messages.getMessage('outputFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/commands/easysources/profiles/merge.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,oFAAqI;AACrI,2DAAuD;AACvD,kEAAkE;AAKlE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAE9E,MAAqB,KAAM,SAAQ,qBAAW;IAuBnC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,MAAM,GAAG,MAAM,IAAA,cAAK,EAAC,IAAI,CAAC,KAAK,EAAE,qCAAgB,EAAE,uCAAkB,EAAE,sCAAiB,EAAE,kCAAa,CAAC,CAAC;QAE7G,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAElB,CAAC;;AA/BL,wBAgCC;AA/BiB,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;AAEzD,UAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEvB,iBAAW,GAAG;IAC3B,uCAAuC;IACvC,GAAG,EAAE,eAAK,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,wBAAY,CAAC,CAAC;KACzE,CAAC;IACF,KAAK,EAAE,eAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,wBAAY,CAAC,CAAC;KAC5E,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Split extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
protected static flagsConfig: {
|
|
7
|
+
dir: flags.Discriminated<flags.String>;
|
|
8
|
+
input: flags.Discriminated<flags.String>;
|
|
9
|
+
output: flags.Discriminated<flags.String>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<AnyJson>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
* Licensed under the BSD 3-Clause license.
|
|
7
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const constants_profiles_1 = require("../../../utils/constants/constants_profiles");
|
|
13
|
+
const performance_1 = require("../../../utils/performance");
|
|
14
|
+
const splitter_1 = require("../../../utils/commands/splitter");
|
|
15
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
16
|
+
// Initialize Messages with the current plugin directory
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
19
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
20
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'profiles_split');
|
|
21
|
+
class Split extends command_1.SfdxCommand {
|
|
22
|
+
async run() {
|
|
23
|
+
performance_1.default.getInstance().start();
|
|
24
|
+
var result = await (0, splitter_1.split)(this.flags, constants_profiles_1.PROFILES_SUBPATH, constants_profiles_1.PROFILES_EXTENSION, constants_profiles_1.PROFILES_ROOT_TAG, constants_profiles_1.PROFILE_ITEMS);
|
|
25
|
+
performance_1.default.getInstance().end();
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = Split;
|
|
30
|
+
Split.description = messages.getMessage('commandDescription');
|
|
31
|
+
Split.examples = messages.getMessage('examples').split(os.EOL);
|
|
32
|
+
Split.flagsConfig = {
|
|
33
|
+
// flag with a value (-n, --name=VALUE)
|
|
34
|
+
dir: command_1.flags.string({
|
|
35
|
+
char: 'd',
|
|
36
|
+
description: messages.getMessage('dirFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
37
|
+
}),
|
|
38
|
+
input: command_1.flags.string({
|
|
39
|
+
char: 'i',
|
|
40
|
+
description: messages.getMessage('inputFlagDescription'),
|
|
41
|
+
}),
|
|
42
|
+
output: command_1.flags.string({
|
|
43
|
+
char: 'o',
|
|
44
|
+
description: messages.getMessage('outputFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=split.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split.js","sourceRoot":"","sources":["../../../../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AAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,wBAAY,CAAC,CAAC;KAC5E,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class UpdateKey extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
protected static flagsConfig: {
|
|
7
|
+
dir: flags.Discriminated<flags.String>;
|
|
8
|
+
input: flags.Discriminated<flags.String>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<AnyJson>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
* Licensed under the BSD 3-Clause license.
|
|
7
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const performance_1 = require("../../../utils/performance");
|
|
13
|
+
const constants_profiles_1 = require("../../../utils/constants/constants_profiles");
|
|
14
|
+
const keyupdater_1 = require("../../../utils/commands/keyupdater");
|
|
15
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
16
|
+
// Initialize Messages with the current plugin directory
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
19
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
20
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'profiles_updatekey');
|
|
21
|
+
class UpdateKey extends command_1.SfdxCommand {
|
|
22
|
+
async run() {
|
|
23
|
+
performance_1.default.getInstance().start();
|
|
24
|
+
var result = await (0, keyupdater_1.updatekey)(this.flags, constants_profiles_1.PROFILES_SUBPATH, constants_profiles_1.PROFILE_ITEMS);
|
|
25
|
+
performance_1.default.getInstance().end();
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = UpdateKey;
|
|
30
|
+
UpdateKey.description = messages.getMessage('commandDescription');
|
|
31
|
+
UpdateKey.examples = messages.getMessage('examples').split(os.EOL);
|
|
32
|
+
UpdateKey.flagsConfig = {
|
|
33
|
+
// flag with a value (-n, --name=VALUE)
|
|
34
|
+
dir: command_1.flags.string({
|
|
35
|
+
char: 'd',
|
|
36
|
+
description: messages.getMessage('dirFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
37
|
+
}),
|
|
38
|
+
input: command_1.flags.string({
|
|
39
|
+
char: 'i',
|
|
40
|
+
description: messages.getMessage('inputFlagDescription'),
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=updatekey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updatekey.js","sourceRoot":"","sources":["../../../../src/commands/easysources/profiles/updatekey.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,oFAA8F;AAC9F,mEAA+D;AAC/D,kEAAkE;AAElE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;AAElF,MAAqB,SAAU,SAAQ,qBAAW;IAmBvC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,MAAM,GAAG,MAAM,IAAA,sBAAS,EAAC,IAAI,CAAC,KAAK,EAAE,qCAAgB,EAAE,kCAAa,CAAC,CAAC;QAE1E,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAClB,CAAC;;AA1BL,4BA2BC;AA1BiB,qBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,kBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAGtD,qBAAW,GAAG;IAC3B,uCAAuC;IACvC,GAAG,EAAE,eAAK,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,wBAAY,CAAC,CAAC;KACzE,CAAC;IACF,KAAK,EAAE,eAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KAC3D,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Upsert extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
protected static flagsConfig: {
|
|
10
|
+
dir: flags.Discriminated<flags.String>;
|
|
11
|
+
input: flags.Discriminated<flags.String>;
|
|
12
|
+
output: flags.Discriminated<flags.String>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<AnyJson>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
* Licensed under the BSD 3-Clause license.
|
|
7
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const constants_profiles_1 = require("../../../utils/constants/constants_profiles");
|
|
13
|
+
const performance_1 = require("../../../utils/performance");
|
|
14
|
+
const upserter_1 = require("../../../utils/commands/upserter");
|
|
15
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
16
|
+
// Initialize Messages with the current plugin directory
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
19
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
20
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'profiles_upsert');
|
|
21
|
+
class Upsert extends command_1.SfdxCommand {
|
|
22
|
+
async run() {
|
|
23
|
+
performance_1.default.getInstance().start();
|
|
24
|
+
var result = await (0, upserter_1.upsert)(this.flags, constants_profiles_1.PROFILES_SUBPATH, constants_profiles_1.PROFILES_EXTENSION, constants_profiles_1.PROFILES_ROOT_TAG, constants_profiles_1.PROFILE_ITEMS);
|
|
25
|
+
performance_1.default.getInstance().end();
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = Upsert;
|
|
30
|
+
Upsert.description = messages.getMessage('commandDescription');
|
|
31
|
+
Upsert.examples = messages.getMessage('examples').split(os.EOL);
|
|
32
|
+
Upsert.args = [{ name: 'file' }];
|
|
33
|
+
Upsert.flagsConfig = {
|
|
34
|
+
// flag with a value (-n, --name=VALUE)
|
|
35
|
+
dir: command_1.flags.string({
|
|
36
|
+
char: 'd',
|
|
37
|
+
description: messages.getMessage('dirFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
38
|
+
}),
|
|
39
|
+
input: command_1.flags.string({
|
|
40
|
+
char: 'i',
|
|
41
|
+
description: messages.getMessage('inputFlagDescription'),
|
|
42
|
+
}),
|
|
43
|
+
output: command_1.flags.string({
|
|
44
|
+
char: 'o',
|
|
45
|
+
description: messages.getMessage('outputFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=upsert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../src/commands/easysources/profiles/upsert.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,oFAAqI;AACrI,4DAAqD;AACrD,+DAA0D;AAC1D,kEAAkE;AAElE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAE/E,MAAqB,MAAO,SAAQ,qBAAW;IAyBpC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,MAAM,GAAG,MAAM,IAAA,iBAAM,EAAC,IAAI,CAAC,KAAK,EAAE,qCAAgB,EAAE,uCAAkB,EAAE,sCAAiB,EAAE,kCAAa,CAAC,CAAC;QAE9G,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAClB,CAAC;;AAhCL,yBAiCC;AAhCiB,kBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,eAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAGzD,WAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEvB,kBAAW,GAAG;IAC3B,uCAAuC;IACvC,GAAG,EAAE,eAAK,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,wBAAY,CAAC,CAAC;KACzE,CAAC;IACF,KAAK,EAAE,eAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,wBAAY,CAAC,CAAC;KAC5E,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Delete extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
protected static flagsConfig: {
|
|
10
|
+
dir: flags.Discriminated<flags.String>;
|
|
11
|
+
object: flags.Discriminated<flags.String>;
|
|
12
|
+
recordtype: flags.Discriminated<flags.String>;
|
|
13
|
+
picklist: flags.Discriminated<flags.String>;
|
|
14
|
+
apiname: flags.Discriminated<flags.String>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<AnyJson>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
* Licensed under the BSD 3-Clause license.
|
|
7
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const fs = require('fs-extra');
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
const performance_1 = require("../../../utils/performance");
|
|
15
|
+
const { Parser, transforms: { unwind } } = require('json2csv');
|
|
16
|
+
const constants_1 = require("../../../utils/constants/constants");
|
|
17
|
+
const filesUtils_1 = require("../../../utils/filesUtils");
|
|
18
|
+
const utils_1 = require("../../../utils/utils");
|
|
19
|
+
const constants_recordtypes_1 = require("../../../utils/constants/constants_recordtypes");
|
|
20
|
+
// Initialize Messages with the current plugin directory
|
|
21
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
22
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
23
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
24
|
+
const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'recordtypes_delete');
|
|
25
|
+
class Delete extends command_1.SfdxCommand {
|
|
26
|
+
async run() {
|
|
27
|
+
performance_1.default.getInstance().start();
|
|
28
|
+
const picklist = this.flags.picklist;
|
|
29
|
+
const apiname = (this.flags.apiname);
|
|
30
|
+
if (!picklist)
|
|
31
|
+
throw new core_1.SfError(messages.getMessage('errorNoPicklistFlag'));
|
|
32
|
+
const baseInputDir = (0, path_1.join)((this.flags.dir || constants_recordtypes_1.RECORDTYPES_DEFAULT_PATH), constants_recordtypes_1.RECORDTYPES_SUBPATH);
|
|
33
|
+
const inputObject = (this.flags.object);
|
|
34
|
+
const inputRecordType = (this.flags.recordtype);
|
|
35
|
+
if (!fs.existsSync(baseInputDir)) {
|
|
36
|
+
console.log('Input folder ' + baseInputDir + ' does not exist!');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
var objectList = [];
|
|
40
|
+
if (inputObject) {
|
|
41
|
+
objectList = inputObject.split(',');
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
objectList = fs.readdirSync(baseInputDir, { withFileTypes: true })
|
|
45
|
+
.filter(item => item.isDirectory())
|
|
46
|
+
.map(item => item.name);
|
|
47
|
+
}
|
|
48
|
+
for (const obj of objectList) {
|
|
49
|
+
var recordTypeList = [];
|
|
50
|
+
if (inputRecordType) {
|
|
51
|
+
recordTypeList = inputRecordType.split(',');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
recordTypeList = fs.readdirSync((0, path_1.join)(baseInputDir, obj, 'recordTypes'), { withFileTypes: true })
|
|
55
|
+
.filter(item => item.isDirectory())
|
|
56
|
+
.map(item => item.name);
|
|
57
|
+
}
|
|
58
|
+
// dir is the recordtype name without the extension
|
|
59
|
+
for (const dir of recordTypeList) {
|
|
60
|
+
console.log('Deleting on: ' + (0, path_1.join)(obj, dir));
|
|
61
|
+
const csvFilePath = (0, path_1.join)(baseInputDir, obj, 'recordTypes', dir, (0, filesUtils_1.calcCsvFilename)(dir, constants_recordtypes_1.RECORDTYPES_PICKVAL_ROOT));
|
|
62
|
+
console.log(csvFilePath);
|
|
63
|
+
if (fs.existsSync(csvFilePath)) {
|
|
64
|
+
var jsonMap = await (0, filesUtils_1.readCsvToJsonMap)(csvFilePath);
|
|
65
|
+
if (apiname) {
|
|
66
|
+
for (var ap of apiname.split(',')) {
|
|
67
|
+
delete jsonMap[(0, path_1.join)(picklist, ap)];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
for (var key of Object.keys(jsonMap)) {
|
|
72
|
+
console.log(key);
|
|
73
|
+
console.log(jsonMap[key]);
|
|
74
|
+
console.log(picklist);
|
|
75
|
+
if (jsonMap[key].picklist === picklist) {
|
|
76
|
+
console.log(key);
|
|
77
|
+
delete jsonMap[key];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
var jsonArray = Object.values(jsonMap);
|
|
82
|
+
const headers = constants_recordtypes_1.RECORDTYPE_ITEMS[constants_recordtypes_1.RECORDTYPES_PICKVAL_ROOT].headers;
|
|
83
|
+
const transforms = [unwind({ paths: headers })];
|
|
84
|
+
const parser = new Parser({ fields: [...(0, utils_1.setDefault)(headers), '_tagid'], transforms });
|
|
85
|
+
jsonArray = (0, utils_1.sortByKey)(jsonArray);
|
|
86
|
+
const csv = parser.parse(jsonArray);
|
|
87
|
+
try {
|
|
88
|
+
fs.writeFileSync(csvFilePath, csv, { flag: 'w+' });
|
|
89
|
+
// file written successfully
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
console.error(err);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
performance_1.default.getInstance().end();
|
|
98
|
+
var outputString = 'OK';
|
|
99
|
+
return { outputString };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.default = Delete;
|
|
103
|
+
Delete.description = messages.getMessage('commandDescription');
|
|
104
|
+
Delete.examples = messages.getMessage('examples').split(os.EOL);
|
|
105
|
+
Delete.args = [{ name: 'file' }];
|
|
106
|
+
Delete.flagsConfig = {
|
|
107
|
+
// flag with a value (-n, --name=VALUE)
|
|
108
|
+
dir: command_1.flags.string({
|
|
109
|
+
char: 'd',
|
|
110
|
+
description: messages.getMessage('dirFlagDescription', [constants_1.DEFAULT_PATH]),
|
|
111
|
+
}),
|
|
112
|
+
object: command_1.flags.string({
|
|
113
|
+
char: 's',
|
|
114
|
+
description: messages.getMessage('objectFlagDescription'),
|
|
115
|
+
}),
|
|
116
|
+
recordtype: command_1.flags.string({
|
|
117
|
+
char: 'r',
|
|
118
|
+
description: messages.getMessage('recordtypeFlagDescription'),
|
|
119
|
+
}),
|
|
120
|
+
picklist: command_1.flags.string({
|
|
121
|
+
char: 'p',
|
|
122
|
+
description: messages.getMessage('picklistFlagDescription'),
|
|
123
|
+
}),
|
|
124
|
+
apiname: command_1.flags.string({
|
|
125
|
+
char: 'k',
|
|
126
|
+
description: messages.getMessage('apinameFlagDescription'),
|
|
127
|
+
})
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/easysources/recordtypes/delete.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAAqD;AAErD,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/B,+BAA4B;AAC5B,4DAAqD;AACrD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE/D,kEAAkE;AAElE,0DAA6E;AAC7E,gDAA4D;AAE5D,0FAA2J;AAG3J,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;AAElF,MAAqB,MAAO,SAAQ,qBAAW;IA+BpC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QACrC,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAW,CAAC;QAC/C,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAE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CAAC;KACzE,CAAC;IACF,MAAM,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KAC5D,CAAC;IACF,UAAU,EAAE,eAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;KAChE,CAAC;IACF,QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;KAC9D,CAAC;IACF,OAAO,EAAE,eAAK,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;KAC7D,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Merge extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
protected static flagsConfig: {
|
|
10
|
+
dir: flags.Discriminated<flags.String>;
|
|
11
|
+
object: flags.Discriminated<flags.String>;
|
|
12
|
+
recordtype: flags.Discriminated<flags.String>;
|
|
13
|
+
output: flags.Discriminated<flags.String>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<AnyJson>;
|
|
16
|
+
}
|