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.
Files changed (197) hide show
  1. package/README.md +158 -0
  2. package/lib/commands/easysources/allmeta/merge.d.ts +15 -0
  3. package/lib/commands/easysources/allmeta/merge.js +47 -0
  4. package/lib/commands/easysources/allmeta/merge.js.map +1 -0
  5. package/lib/commands/easysources/allmeta/split.d.ts +11 -0
  6. package/lib/commands/easysources/allmeta/split.js +42 -0
  7. package/lib/commands/easysources/allmeta/split.js.map +1 -0
  8. package/lib/commands/easysources/allmeta/upsert.d.ts +11 -0
  9. package/lib/commands/easysources/allmeta/upsert.js +42 -0
  10. package/lib/commands/easysources/allmeta/upsert.js.map +1 -0
  11. package/lib/commands/easysources/applications/merge.d.ts +15 -0
  12. package/lib/commands/easysources/applications/merge.js +48 -0
  13. package/lib/commands/easysources/applications/merge.js.map +1 -0
  14. package/lib/commands/easysources/applications/split.d.ts +12 -0
  15. package/lib/commands/easysources/applications/split.js +47 -0
  16. package/lib/commands/easysources/applications/split.js.map +1 -0
  17. package/lib/commands/easysources/applications/updatekey.d.ts +11 -0
  18. package/lib/commands/easysources/applications/updatekey.js +43 -0
  19. package/lib/commands/easysources/applications/updatekey.js.map +1 -0
  20. package/lib/commands/easysources/applications/upsert.d.ts +15 -0
  21. package/lib/commands/easysources/applications/upsert.js +48 -0
  22. package/lib/commands/easysources/applications/upsert.js.map +1 -0
  23. package/lib/commands/easysources/globalvaluesets/merge.d.ts +15 -0
  24. package/lib/commands/easysources/globalvaluesets/merge.js +48 -0
  25. package/lib/commands/easysources/globalvaluesets/merge.js.map +1 -0
  26. package/lib/commands/easysources/globalvaluesets/split.d.ts +12 -0
  27. package/lib/commands/easysources/globalvaluesets/split.js +47 -0
  28. package/lib/commands/easysources/globalvaluesets/split.js.map +1 -0
  29. package/lib/commands/easysources/globalvaluesets/updatekey.d.ts +11 -0
  30. package/lib/commands/easysources/globalvaluesets/updatekey.js +43 -0
  31. package/lib/commands/easysources/globalvaluesets/updatekey.js.map +1 -0
  32. package/lib/commands/easysources/globalvaluesets/upsert.d.ts +15 -0
  33. package/lib/commands/easysources/globalvaluesets/upsert.js +48 -0
  34. package/lib/commands/easysources/globalvaluesets/upsert.js.map +1 -0
  35. package/lib/commands/easysources/globalvaluesettranslations/merge.d.ts +15 -0
  36. package/lib/commands/easysources/globalvaluesettranslations/merge.js +48 -0
  37. package/lib/commands/easysources/globalvaluesettranslations/merge.js.map +1 -0
  38. package/lib/commands/easysources/globalvaluesettranslations/split.d.ts +12 -0
  39. package/lib/commands/easysources/globalvaluesettranslations/split.js +47 -0
  40. package/lib/commands/easysources/globalvaluesettranslations/split.js.map +1 -0
  41. package/lib/commands/easysources/globalvaluesettranslations/updatekey.d.ts +11 -0
  42. package/lib/commands/easysources/globalvaluesettranslations/updatekey.js +43 -0
  43. package/lib/commands/easysources/globalvaluesettranslations/updatekey.js.map +1 -0
  44. package/lib/commands/easysources/globalvaluesettranslations/upsert.d.ts +15 -0
  45. package/lib/commands/easysources/globalvaluesettranslations/upsert.js +48 -0
  46. package/lib/commands/easysources/globalvaluesettranslations/upsert.js.map +1 -0
  47. package/lib/commands/easysources/labels/merge.d.ts +14 -0
  48. package/lib/commands/easysources/labels/merge.js +44 -0
  49. package/lib/commands/easysources/labels/merge.js.map +1 -0
  50. package/lib/commands/easysources/labels/split.d.ts +11 -0
  51. package/lib/commands/easysources/labels/split.js +43 -0
  52. package/lib/commands/easysources/labels/split.js.map +1 -0
  53. package/lib/commands/easysources/labels/updatekey.d.ts +10 -0
  54. package/lib/commands/easysources/labels/updatekey.js +39 -0
  55. package/lib/commands/easysources/labels/updatekey.js.map +1 -0
  56. package/lib/commands/easysources/labels/upsert.d.ts +14 -0
  57. package/lib/commands/easysources/labels/upsert.js +44 -0
  58. package/lib/commands/easysources/labels/upsert.js.map +1 -0
  59. package/lib/commands/easysources/permissionsets/delete.d.ts +16 -0
  60. package/lib/commands/easysources/permissionsets/delete.js +104 -0
  61. package/lib/commands/easysources/permissionsets/delete.js.map +1 -0
  62. package/lib/commands/easysources/permissionsets/merge.d.ts +15 -0
  63. package/lib/commands/easysources/permissionsets/merge.js +48 -0
  64. package/lib/commands/easysources/permissionsets/merge.js.map +1 -0
  65. package/lib/commands/easysources/permissionsets/split.d.ts +12 -0
  66. package/lib/commands/easysources/permissionsets/split.js +47 -0
  67. package/lib/commands/easysources/permissionsets/split.js.map +1 -0
  68. package/lib/commands/easysources/permissionsets/updatekey.d.ts +11 -0
  69. package/lib/commands/easysources/permissionsets/updatekey.js +43 -0
  70. package/lib/commands/easysources/permissionsets/updatekey.js.map +1 -0
  71. package/lib/commands/easysources/permissionsets/upsert.d.ts +15 -0
  72. package/lib/commands/easysources/permissionsets/upsert.js +48 -0
  73. package/lib/commands/easysources/permissionsets/upsert.js.map +1 -0
  74. package/lib/commands/easysources/profiles/delete.d.ts +16 -0
  75. package/lib/commands/easysources/profiles/delete.js +104 -0
  76. package/lib/commands/easysources/profiles/delete.js.map +1 -0
  77. package/lib/commands/easysources/profiles/merge.d.ts +15 -0
  78. package/lib/commands/easysources/profiles/merge.js +48 -0
  79. package/lib/commands/easysources/profiles/merge.js.map +1 -0
  80. package/lib/commands/easysources/profiles/split.d.ts +12 -0
  81. package/lib/commands/easysources/profiles/split.js +47 -0
  82. package/lib/commands/easysources/profiles/split.js.map +1 -0
  83. package/lib/commands/easysources/profiles/updatekey.d.ts +11 -0
  84. package/lib/commands/easysources/profiles/updatekey.js +43 -0
  85. package/lib/commands/easysources/profiles/updatekey.js.map +1 -0
  86. package/lib/commands/easysources/profiles/upsert.d.ts +15 -0
  87. package/lib/commands/easysources/profiles/upsert.js +48 -0
  88. package/lib/commands/easysources/profiles/upsert.js.map +1 -0
  89. package/lib/commands/easysources/recordtypes/delete.d.ts +17 -0
  90. package/lib/commands/easysources/recordtypes/delete.js +129 -0
  91. package/lib/commands/easysources/recordtypes/delete.js.map +1 -0
  92. package/lib/commands/easysources/recordtypes/merge.d.ts +16 -0
  93. package/lib/commands/easysources/recordtypes/merge.js +110 -0
  94. package/lib/commands/easysources/recordtypes/merge.js.map +1 -0
  95. package/lib/commands/easysources/recordtypes/split.d.ts +13 -0
  96. package/lib/commands/easysources/recordtypes/split.js +125 -0
  97. package/lib/commands/easysources/recordtypes/split.js.map +1 -0
  98. package/lib/commands/easysources/recordtypes/updatekey.d.ts +12 -0
  99. package/lib/commands/easysources/recordtypes/updatekey.js +104 -0
  100. package/lib/commands/easysources/recordtypes/updatekey.js.map +1 -0
  101. package/lib/commands/easysources/recordtypes/upsert.d.ts +16 -0
  102. package/lib/commands/easysources/recordtypes/upsert.js +144 -0
  103. package/lib/commands/easysources/recordtypes/upsert.js.map +1 -0
  104. package/lib/commands/hello/org.d.ts +17 -0
  105. package/lib/commands/hello/org.js +72 -0
  106. package/lib/commands/hello/org.js.map +1 -0
  107. package/lib/index.d.ts +2 -0
  108. package/lib/index.js +4 -0
  109. package/lib/index.js.map +1 -0
  110. package/lib/utils/commands/keyupdater.d.ts +3 -0
  111. package/lib/utils/commands/keyupdater.js +55 -0
  112. package/lib/utils/commands/keyupdater.js.map +1 -0
  113. package/lib/utils/commands/merger.d.ts +3 -0
  114. package/lib/utils/commands/merger.js +53 -0
  115. package/lib/utils/commands/merger.js.map +1 -0
  116. package/lib/utils/commands/splitter.d.ts +3 -0
  117. package/lib/utils/commands/splitter.js +73 -0
  118. package/lib/utils/commands/splitter.js.map +1 -0
  119. package/lib/utils/commands/upserter.d.ts +3 -0
  120. package/lib/utils/commands/upserter.js +85 -0
  121. package/lib/utils/commands/upserter.js.map +1 -0
  122. package/lib/utils/constants/constants.d.ts +6 -0
  123. package/lib/utils/constants/constants.js +10 -0
  124. package/lib/utils/constants/constants.js.map +1 -0
  125. package/lib/utils/constants/constants_applications.d.ts +13 -0
  126. package/lib/utils/constants/constants_applications.js +15 -0
  127. package/lib/utils/constants/constants_applications.js.map +1 -0
  128. package/lib/utils/constants/constants_globalvaluesets.d.ts +13 -0
  129. package/lib/utils/constants/constants_globalvaluesets.js +15 -0
  130. package/lib/utils/constants/constants_globalvaluesets.js.map +1 -0
  131. package/lib/utils/constants/constants_globalvaluesettranslations.d.ts +13 -0
  132. package/lib/utils/constants/constants_globalvaluesettranslations.js +15 -0
  133. package/lib/utils/constants/constants_globalvaluesettranslations.js.map +1 -0
  134. package/lib/utils/constants/constants_labels.d.ts +13 -0
  135. package/lib/utils/constants/constants_labels.js +15 -0
  136. package/lib/utils/constants/constants_labels.js.map +1 -0
  137. package/lib/utils/constants/constants_permissionsets.d.ts +83 -0
  138. package/lib/utils/constants/constants_permissionsets.js +55 -0
  139. package/lib/utils/constants/constants_permissionsets.js.map +1 -0
  140. package/lib/utils/constants/constants_profiles.d.ts +83 -0
  141. package/lib/utils/constants/constants_profiles.js +68 -0
  142. package/lib/utils/constants/constants_profiles.js.map +1 -0
  143. package/lib/utils/constants/constants_recordtypes.d.ts +13 -0
  144. package/lib/utils/constants/constants_recordtypes.js +15 -0
  145. package/lib/utils/constants/constants_recordtypes.js.map +1 -0
  146. package/lib/utils/filesUtils.d.ts +9 -0
  147. package/lib/utils/filesUtils.js +75 -0
  148. package/lib/utils/filesUtils.js.map +1 -0
  149. package/lib/utils/performance.d.ts +9 -0
  150. package/lib/utils/performance.js +22 -0
  151. package/lib/utils/performance.js.map +1 -0
  152. package/lib/utils/utils.d.ts +5 -0
  153. package/lib/utils/utils.js +84 -0
  154. package/lib/utils/utils.js.map +1 -0
  155. package/lib/utils/utils_recordtypes.d.ts +2 -0
  156. package/lib/utils/utils_recordtypes.js +37 -0
  157. package/lib/utils/utils_recordtypes.js.map +1 -0
  158. package/lib/utils/xmlFormatter.d.ts +4 -0
  159. package/lib/utils/xmlFormatter.js +18 -0
  160. package/lib/utils/xmlFormatter.js.map +1 -0
  161. package/messages/all_merge.json +11 -0
  162. package/messages/all_split.json +12 -0
  163. package/messages/all_upsert.json +11 -0
  164. package/messages/applications_merge.json +12 -0
  165. package/messages/applications_split.json +15 -0
  166. package/messages/applications_updatekey.json +11 -0
  167. package/messages/applications_upsert.json +12 -0
  168. package/messages/globalvaluesets_merge.json +12 -0
  169. package/messages/globalvaluesets_split.json +15 -0
  170. package/messages/globalvaluesets_updatekey.json +11 -0
  171. package/messages/globalvaluesets_upsert.json +12 -0
  172. package/messages/globalvaluesettranslations_merge.json +12 -0
  173. package/messages/globalvaluesettranslations_split.json +15 -0
  174. package/messages/globalvaluesettranslations_updatekey.json +11 -0
  175. package/messages/globalvaluesettranslations_upsert.json +12 -0
  176. package/messages/labels_merge.json +11 -0
  177. package/messages/labels_split.json +12 -0
  178. package/messages/labels_updatekey.json +10 -0
  179. package/messages/labels_upsert.json +11 -0
  180. package/messages/org.json +10 -0
  181. package/messages/permissionsets_delete.json +23 -0
  182. package/messages/permissionsets_merge.json +12 -0
  183. package/messages/permissionsets_split.json +15 -0
  184. package/messages/permissionsets_updatekey.json +11 -0
  185. package/messages/permissionsets_upsert.json +12 -0
  186. package/messages/profiles_delete.json +23 -0
  187. package/messages/profiles_merge.json +12 -0
  188. package/messages/profiles_split.json +15 -0
  189. package/messages/profiles_updatekey.json +11 -0
  190. package/messages/profiles_upsert.json +12 -0
  191. package/messages/recordtypes_delete.json +16 -0
  192. package/messages/recordtypes_merge.json +15 -0
  193. package/messages/recordtypes_split.json +16 -0
  194. package/messages/recordtypes_updatekey.json +13 -0
  195. package/messages/recordtypes_upsert.json +15 -0
  196. package/oclif.manifest.json +1 -0
  197. package/package.json +76 -0
@@ -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 splitter_1 = require("../../../utils/commands/splitter");
14
+ const constants_labels_1 = require("../../../utils/constants/constants_labels");
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_labels_1.LABELS_SUBPATH, constants_labels_1.LABELS_EXTENSION, constants_labels_1.LABELS_ROOT_TAG, constants_labels_1.LABEL_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
+ output: command_1.flags.string({
39
+ char: 'o',
40
+ description: messages.getMessage('outputFlagDescription', [constants_1.DEFAULT_PATH]),
41
+ }),
42
+ };
43
+ //# sourceMappingURL=split.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split.js","sourceRoot":"","sources":["../../../../src/commands/easysources/labels/split.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,+DAAyD;AACzD,gFAA2H;AAC3H,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,gBAAgB,CAAC,CAAC;AAE9E,MAAqB,KAAM,SAAQ,qBAAW;IAmBnC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,MAAM,GAAG,MAAM,IAAA,gBAAK,EAAC,IAAI,CAAC,KAAK,EAAE,iCAAc,EAAE,mCAAgB,EAAE,kCAAe,EAAE,8BAAW,CAAC,CAAC;QAErG,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAClB,CAAC;;AA1BL,wBA2BC;AA1BiB,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,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,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,10 @@
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
+ };
9
+ run(): Promise<AnyJson>;
10
+ }
@@ -0,0 +1,39 @@
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 keyupdater_1 = require("../../../utils/commands/keyupdater");
14
+ const constants_labels_1 = require("../../../utils/constants/constants_labels");
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_labels_1.LABELS_SUBPATH, constants_labels_1.LABEL_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
+ };
39
+ //# sourceMappingURL=updatekey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatekey.js","sourceRoot":"","sources":["../../../../src/commands/easysources/labels/updatekey.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,mEAA+D;AAC/D,gFAAuF;AACvF,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;IAevC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,MAAM,GAAG,MAAM,IAAA,sBAAS,EAAC,IAAI,CAAC,KAAK,EAAE,iCAAc,EAAE,8BAAW,CAAC,CAAC;QAEtE,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAClB,CAAC;;AAtBL,4BAuBC;AAtBiB,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;CACL,CAAC"}
@@ -0,0 +1,14 @@
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
+ output: flags.Discriminated<flags.String>;
12
+ };
13
+ run(): Promise<AnyJson>;
14
+ }
@@ -0,0 +1,44 @@
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 upserter_1 = require("../../../utils/commands/upserter");
14
+ const constants_labels_1 = require("../../../utils/constants/constants_labels");
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_labels_1.LABELS_SUBPATH, constants_labels_1.LABELS_EXTENSION, constants_labels_1.LABELS_ROOT_TAG, constants_labels_1.LABEL_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
+ output: command_1.flags.string({
40
+ char: 'o',
41
+ description: messages.getMessage('outputFlagDescription', [constants_1.DEFAULT_PATH]),
42
+ })
43
+ };
44
+ //# sourceMappingURL=upsert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../src/commands/easysources/labels/up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B,EAAE,CAAC,wBAAY,CAAC,CAAC;KAC5E,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 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
+ input: flags.Discriminated<flags.String>;
12
+ type: flags.Discriminated<flags.String>;
13
+ tagid: flags.Discriminated<flags.String>;
14
+ };
15
+ run(): Promise<AnyJson>;
16
+ }
@@ -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_permissionsets_1 = require("../../../utils/constants/constants_permissionsets");
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', 'permissionsets_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_permissionsets_1.PERMSET_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_permissionsets_1.PERMSETS_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, type) + constants_1.CSV_EXTENSION;
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_permissionsets_1.PERMSET_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/permissionsets/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,gGAAkG;AAClG,0DAA4D;AAC5D,gDAAgD;AAChD,kEAAiF;AAGjF,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAErF,MAAqB,MAAO,SAAQ,qBAAW;IA2BpC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,MAAM,IAAI,GAAG,IAAI,CAAC,K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I,CAAA;QACvB,OAAO,EAAE,YAAY,EAAE,CAAC;IAC5B,CAAC;;AA1FL,yBA2FC;AA1FiB,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;AAEzD,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,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_permissionsets_1 = require("../../../utils/constants/constants_permissionsets");
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', 'permissionsets_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_permissionsets_1.PERMSETS_SUBPATH, constants_permissionsets_1.PERMSETS_EXTENSION, constants_permissionsets_1.PERMSETS_ROOT_TAG, constants_permissionsets_1.PERMSET_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/permissionsets/merge.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,gGAA2I;AAC3I,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,sBAAsB,CAAC,CAAC;AAEpF,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,2CAAgB,EAAE,6CAAkB,EAAE,4CAAiB,EAAE,wCAAa,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_permissionsets_1 = require("../../../utils/constants/constants_permissionsets");
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', 'permissionsets_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_permissionsets_1.PERMSETS_SUBPATH, constants_permissionsets_1.PERMSETS_EXTENSION, constants_permissionsets_1.PERMSETS_ROOT_TAG, constants_permissionsets_1.PERMSET_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":["../../../../src/commands/easysources/permissionsets/split.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,gGAA2I;AAC3I,4DAAqD;AACrD,+DAAyD;AACzD,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,sBAAsB,CAAC,CAAC;AAEpF,MAAqB,KAAM,SAAQ,qBAAW;IAuBnC,KAAK,CAAC,GAAG;QACZ,qBAAW,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC;QAElC,IAAI,MAAM,GAAG,MAAM,IAAA,gBAAK,EAAC,IAAI,CAAC,KAAK,EAAE,2CAAgB,EAAE,6CAAkB,EAAE,4CAAiB,EAAE,wCAAa,CAAE,CAAC;QAE9G,qBAAW,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAClB,CAAC;;AA9BL,wBA+BC;AA9BiB,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,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,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_permissionsets_1 = require("../../../utils/constants/constants_permissionsets");
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', 'permissionsets_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_permissionsets_1.PERMSETS_SUBPATH, constants_permissionsets_1.PERMSET_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/permissionsets/updatekey.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,4DAAqD;AACrD,gGAAoG;AACpG,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,0BAA0B,CAAC,CAAC;AAExF,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,2CAAgB,EAAE,wCAAa,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_permissionsets_1 = require("../../../utils/constants/constants_permissionsets");
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', 'permissionsets_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_permissionsets_1.PERMSETS_SUBPATH, constants_permissionsets_1.PERMSETS_EXTENSION, constants_permissionsets_1.PERMSETS_ROOT_TAG, constants_permissionsets_1.PERMSET_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/permissionsets/upsert.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAA4C;AAE5C,gGAA0I;AAC1I,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,uBAAuB,CAAC,CAAC;AAErF,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,2CAAgB,EAAE,6CAAkB,EAAE,4CAAiB,EAAE,wCAAa,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,16 @@
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
+ input: flags.Discriminated<flags.String>;
12
+ type: flags.Discriminated<flags.String>;
13
+ tagid: flags.Discriminated<flags.String>;
14
+ };
15
+ run(): Promise<AnyJson>;
16
+ }