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,72 @@
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
+ // Initialize Messages with the current plugin directory
13
+ core_1.Messages.importMessagesDirectory(__dirname);
14
+ // Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
15
+ // or any library that is using the messages framework can also be loaded this way.
16
+ const messages = core_1.Messages.loadMessages('sfdx-easy-sources', 'org');
17
+ class Org extends command_1.SfdxCommand {
18
+ async run() {
19
+ const name = (this.flags.name || 'world');
20
+ // this.org is guaranteed because requiresUsername=true, as opposed to supportsUsername
21
+ const conn = this.org.getConnection();
22
+ const query = 'Select Name, TrialExpirationDate from Organization';
23
+ // Query the org
24
+ const result = await conn.query(query);
25
+ // Organization will always return one result, but this is an example of throwing an error
26
+ // The output and --json will automatically be handled for you.
27
+ if (!result.records || result.records.length <= 0) {
28
+ throw new core_1.SfError(messages.getMessage('errorNoOrgResults', [this.org.getOrgId()]));
29
+ }
30
+ // Organization always only returns one result
31
+ const orgName = result.records[0].Name;
32
+ const trialExpirationDate = result.records[0].TrialExpirationDate;
33
+ let outputString = `Hello ${name}! This is org: ${orgName}`;
34
+ if (trialExpirationDate) {
35
+ const date = new Date(trialExpirationDate).toDateString();
36
+ outputString = `${outputString} and I will be around until ${date}!`;
37
+ }
38
+ this.ux.log(outputString);
39
+ // this.hubOrg is NOT guaranteed because supportsHubOrgUsername=true, as opposed to requiresHubOrgUsername.
40
+ if (this.hubOrg) {
41
+ const hubOrgId = this.hubOrg.getOrgId();
42
+ this.ux.log(`My hub org id is: ${hubOrgId}`);
43
+ }
44
+ if (this.flags.force && this.args.file) {
45
+ this.ux.log(`You input --force and a file: ${this.args.file}`);
46
+ }
47
+ // Return an object to be displayed with --json
48
+ return { orgId: this.org.getOrgId(), outputString };
49
+ }
50
+ }
51
+ exports.default = Org;
52
+ Org.description = messages.getMessage('commandDescription');
53
+ Org.examples = messages.getMessage('examples').split(os.EOL);
54
+ Org.args = [{ name: 'file' }];
55
+ Org.flagsConfig = {
56
+ // flag with a value (-n, --name=VALUE)
57
+ name: command_1.flags.string({
58
+ char: 'n',
59
+ description: messages.getMessage('nameFlagDescription'),
60
+ }),
61
+ force: command_1.flags.boolean({
62
+ char: 'f',
63
+ description: messages.getMessage('forceFlagDescription'),
64
+ }),
65
+ };
66
+ // Comment this out if your command does not require an org username
67
+ Org.requiresUsername = true;
68
+ // Comment this out if your command does not support a hub org username
69
+ Org.supportsDevhubUsername = true;
70
+ // Set this to true if your command requires a project workspace; 'requiresProject' is false by default
71
+ Org.requiresProject = false;
72
+ //# sourceMappingURL=org.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.js","sourceRoot":"","sources":["../../../src/commands/hello/org.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AACzD,2CAAqD;AAGrD,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAEnE,MAAqB,GAAI,SAAQ,qBAAW;IA4BnC,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,OAAO,CAAW,CAAC;QAEpD,uFAAuF;QACvF,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,oDAAoD,CAAC;QAQnE,gBAAgB;QAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAe,KAAK,CAAC,CAAC;QAErD,0FAA0F;QAC1F,+DAA+D;QAC/D,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;YACjD,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;SACpF;QAED,8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B,eAAW,GAAG;IAC7B,uCAAuC;IACvC,IAAI,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACxD,CAAC;IACF,KAAK,EAAE,eAAK,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KACzD,CAAC;CACH,CAAC;AAEF,oEAAoE;AACnD,oBAAgB,GAAG,IAAI,CAAC;AAEzC,uEAAuE;AACtD,0BAAsB,GAAG,IAAI,CAAC;AAE/C,uGAAuG;AACtF,mBAAe,GAAG,KAAK,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
package/lib/index.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {};
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,kBAAe,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function updatekey(flags: any, file_subpath: any, file_items: any): Promise<{
2
+ outputString: string;
3
+ }>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updatekey = void 0;
4
+ const filesUtils_1 = require("../filesUtils");
5
+ const utils_1 = require("../utils");
6
+ const utils_2 = require("../utils");
7
+ const { Parser, transforms: { unwind } } = require('json2csv');
8
+ const path_1 = require("path");
9
+ const constants_1 = require("../constants/constants");
10
+ const fs = require('fs-extra');
11
+ async function updatekey(flags, file_subpath, file_items) {
12
+ const baseInputDir = (0, path_1.join)((flags.dir || constants_1.DEFAULT_PATH), file_subpath);
13
+ const inputFiles = (flags.input);
14
+ if (!fs.existsSync(baseInputDir)) {
15
+ console.log('Input folder ' + baseInputDir + ' does not exist!');
16
+ return;
17
+ }
18
+ var dirList = [];
19
+ if (inputFiles) {
20
+ dirList = inputFiles.split(',');
21
+ }
22
+ else {
23
+ dirList = fs.readdirSync(baseInputDir, { withFileTypes: true })
24
+ .filter(item => item.isDirectory())
25
+ .map(item => item.name);
26
+ }
27
+ // dir is the file name without the extension
28
+ for (const dir of dirList) {
29
+ console.log('UpdateKey: ' + dir);
30
+ // tag_Section is each file section (applicationVisibilities, classAccess ecc)
31
+ for (const tag_section in file_items) {
32
+ const csvFilePath = (0, path_1.join)(baseInputDir, dir, (0, filesUtils_1.calcCsvFilename)(dir, tag_section));
33
+ if (fs.existsSync(csvFilePath)) {
34
+ var jsonArray = await (0, filesUtils_1.readCsvToJsonArray)(csvFilePath);
35
+ (0, utils_2.generateTagId)(jsonArray, file_items[tag_section].key, file_items[tag_section].headers);
36
+ jsonArray = (0, utils_1.sortByKey)(jsonArray);
37
+ const headers = file_items[tag_section].headers;
38
+ const transforms = [unwind({ paths: headers })];
39
+ const parser = new Parser({ fields: [...(0, utils_1.setDefault)(headers), '_tagid'], transforms });
40
+ const csv = parser.parse(jsonArray);
41
+ try {
42
+ fs.writeFileSync(csvFilePath, csv, { flag: 'w+' });
43
+ // file written successfully
44
+ }
45
+ catch (err) {
46
+ console.error(err);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ var outputString = 'OK';
52
+ return { outputString };
53
+ }
54
+ exports.updatekey = updatekey;
55
+ //# sourceMappingURL=keyupdater.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyupdater.js","sourceRoot":"","sources":["../../../src/utils/commands/keyupdater.ts"],"names":[],"mappings":";;;AAAA,8CAAmE;AACnE,oCAAgD;AAChD,oCAAwC;AACxC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/D,+BAA4B;AAC5B,sDAAsD;AACtD,MA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AErD,IAAA,qBAAa,EAAC,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC;gBACvF,SAAS,GAAG,IAAA,iBAAS,EAAC,SAAS,CAAC,CAAC;gBAEjC,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC;gBAChD,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;gBAChD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,IAAA,kBAAU,EAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;gBACtF,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAEpC,IAAI;oBACA,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;oBACnD,4BAA4B;iBAC/B;gBAAC,OAAO,GAAG,EAAE;oBACV,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACtB;aACJ;SACJ;KAEJ;IAED,IAAI,YAAY,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,YAAY,EAAE,CAAC;AAE5B,CAAC;AArDD,8BAqDC"}
@@ -0,0 +1,3 @@
1
+ export declare function merge(flags: any, file_subpath: any, file_extension: any, file_root_tag: any, file_items: any): Promise<{
2
+ result: string;
3
+ }>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.merge = void 0;
4
+ const fs = require('fs-extra');
5
+ const path_1 = require("path");
6
+ const constants_1 = require("../constants/constants");
7
+ const filesUtils_1 = require("../filesUtils");
8
+ const utils_1 = require("../utils");
9
+ async function merge(flags, file_subpath, file_extension, file_root_tag, file_items) {
10
+ const baseInputDir = (0, path_1.join)((flags.dir || constants_1.DEFAULT_PATH), file_subpath);
11
+ const baseOutputDir = flags.output == null ? baseInputDir : (0, path_1.join)(flags.output, file_subpath);
12
+ const inputProfile = (flags.input);
13
+ if (!fs.existsSync(baseInputDir)) {
14
+ console.log('Input folder ' + baseInputDir + ' does not exist!');
15
+ return;
16
+ }
17
+ var dirList = [];
18
+ if (inputProfile) {
19
+ dirList = inputProfile.split(',');
20
+ }
21
+ else {
22
+ dirList = fs.readdirSync(baseInputDir, { withFileTypes: true })
23
+ .filter(item => item.isDirectory())
24
+ .map(item => item.name);
25
+ }
26
+ if (!fs.existsSync(baseOutputDir)) {
27
+ fs.mkdirSync(baseOutputDir);
28
+ }
29
+ // dir is the file name without the extension
30
+ for (const dir of dirList) {
31
+ console.log('Merging: ' + dir);
32
+ const inputXML = (0, path_1.join)(baseInputDir, dir, dir) + constants_1.XML_PART_EXTENSION;
33
+ const mergedXml = (await (0, filesUtils_1.readXmlFromFile)(inputXML)) ?? {};
34
+ // tag_section is each file section (applicationVisibilities, classAccess ecc)
35
+ for (const tag_section in file_items) {
36
+ const csvFilePath = (0, path_1.join)(baseInputDir, dir, (0, filesUtils_1.calcCsvFilename)(dir, tag_section));
37
+ if (fs.existsSync(csvFilePath)) {
38
+ var jsonArray = await (0, filesUtils_1.readCsvToJsonArray)(csvFilePath);
39
+ jsonArray = (0, utils_1.sortByKey)(jsonArray);
40
+ for (var i in jsonArray) {
41
+ delete jsonArray[i]['_tagid'];
42
+ }
43
+ mergedXml[file_root_tag][tag_section] = (0, utils_1.sortByKey)(jsonArray);
44
+ }
45
+ }
46
+ const outputFile = (0, path_1.join)(baseOutputDir, dir + file_extension);
47
+ (0, filesUtils_1.writeXmlToFile)(outputFile, mergedXml);
48
+ }
49
+ var result = 'OK';
50
+ return { result };
51
+ }
52
+ exports.merge = merge;
53
+ //# sourceMappingURL=merger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merger.js","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C;IAC7C,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACvB,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,YAAY,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,8BAAkB,CAAC;QACnE,MAAM,SAAS,GAAG,CAAC,MAAM,IAAA,4BAAe,EAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAG1D,8EAA8E;QAC9E,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE;YAClC,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,YAAY,EAAE,GAAG,EAAE,IAAA,4BAAe,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;YAC/E,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;gBAC5B,IAAI,SAAS,GAAG,MAAM,IAAA,+BAAkB,EAAC,WAAW,CAAC,CAAA;gBAErD,SAAS,GAAG,IAAA,iBAAS,EAAC,SAAS,CAAC,CAAC;gBAEjC,KAAK,IAAI,CAAC,IAAI,SAAS,EAAE;oBACrB,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;iBAChC;gBACD,SAAS,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,GAAG,IAAA,iBAAS,EAAC,SAAS,CAAC,CAAC;aAChE;SACJ;QAED,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,GAAG,GAAG,cAAc,CAAC,CAAC;QAE7D,IAAA,2BAAc,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC;KACzC;IACD,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAA;AACrB,CAAC;AAlDD,sBAkDC"}
@@ -0,0 +1,3 @@
1
+ export declare function split(flags: any, file_subpath: any, file_extension: any, file_root_tag: any, file_items: any): Promise<{
2
+ outputString: string;
3
+ }>;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.split = void 0;
4
+ const filesUtils_1 = require("../filesUtils");
5
+ const utils_1 = require("../utils");
6
+ const { Parser, transforms: { unwind } } = require('json2csv');
7
+ const path_1 = require("path");
8
+ const fs = require('fs-extra');
9
+ const utils_2 = require("../utils");
10
+ const constants_1 = require("../constants/constants");
11
+ async function split(flags, file_subpath, file_extension, file_root_tag, file_items) {
12
+ const baseInputDir = (0, path_1.join)((flags.dir || constants_1.DEFAULT_PATH), file_subpath);
13
+ const baseOutputDir = flags.output == null ? baseInputDir : (0, path_1.join)(flags.output, file_subpath);
14
+ const inputFiles = (flags.input);
15
+ if (!fs.existsSync(baseInputDir)) {
16
+ console.log('Input folder ' + baseInputDir + ' does not exist!');
17
+ return;
18
+ }
19
+ var fileList = [];
20
+ if (inputFiles) {
21
+ fileList = inputFiles.split(',');
22
+ }
23
+ else {
24
+ fileList = fs.readdirSync(baseInputDir, { withFileTypes: true })
25
+ .filter(item => !item.isDirectory() && item.name.endsWith(file_extension))
26
+ .map(item => item.name);
27
+ }
28
+ for (const fullFilename of fileList) {
29
+ console.log('Splitting: ' + fullFilename);
30
+ const inputFile = (0, path_1.join)(baseInputDir, fullFilename);
31
+ const xmlFileContent = (await (0, filesUtils_1.readXmlFromFile)(inputFile)) ?? {};
32
+ const fileProperties = xmlFileContent[file_root_tag] ?? {};
33
+ const fileName = (0, filesUtils_1.removeExtension)(fullFilename);
34
+ const outputDir = (0, path_1.join)(baseOutputDir, fileName);
35
+ for (const tag_section in file_items) {
36
+ var myjson = fileProperties[tag_section];
37
+ // skip when tag is not found in the xml
38
+ if (myjson == undefined)
39
+ continue;
40
+ // fixes scenarios when the tag is one, since it would be read as object and not array
41
+ if (!Array.isArray(myjson))
42
+ myjson = [myjson];
43
+ // generate _tagId column
44
+ (0, utils_1.generateTagId)(myjson, file_items[tag_section].key, file_items[tag_section].headers);
45
+ // sorts array by _tagid. sorting is made as string
46
+ myjson = (0, utils_2.sortByKey)(myjson);
47
+ const headers = file_items[tag_section].headers;
48
+ const transforms = [unwind({ paths: headers })];
49
+ const parser = new Parser({ fields: [...(0, utils_1.setDefault)(headers), '_tagid'], transforms });
50
+ const csv = parser.parse(myjson);
51
+ const outputFileCSV = (0, path_1.join)(outputDir, (0, filesUtils_1.calcCsvFilename)(fileName, tag_section));
52
+ if (!fs.existsSync(outputDir)) {
53
+ fs.mkdirSync(outputDir, { recursive: true });
54
+ }
55
+ try {
56
+ fs.writeFileSync(outputFileCSV, csv, { flag: 'w+' });
57
+ // file written successfully
58
+ }
59
+ catch (err) {
60
+ console.error(err);
61
+ }
62
+ xmlFileContent[file_root_tag][tag_section] = null;
63
+ }
64
+ if (fs.existsSync(outputDir)) {
65
+ const outputFileXML = (0, path_1.join)(outputDir, fileName + constants_1.XML_PART_EXTENSION);
66
+ (0, filesUtils_1.writeXmlToFile)(outputFileXML, xmlFileContent);
67
+ }
68
+ }
69
+ var outputString = 'OK';
70
+ return { outputString };
71
+ }
72
+ exports.split = split;
73
+ //# sourceMappingURL=splitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitter.js","sourceRoot":"","sources":["../../../src/utils/commands/splitter.ts"],"names":[],"mappings":";;;AAAA,8CAAiG;AACjG,oCAAoD;AACpD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/D,+BAA4B;AAC5B,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/B,oCAAoC;AACpC,sDAA0E;AAEnE,KAAK,UAAU,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU;IAEtF,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,CAAC,KAAK,CAAC,GAAG,IAAI,wBAAY,CAAC,EAAE,YAAY,CAAW,CAAC;IAC/E,MAAM,aAAa,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EAAE,IAAI,EAAE,CAAC,CAAC;gBACrD,4BAA4B;aAC/B;YAAC,OAAO,GAAG,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACtB;YAED,cAAc,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;SAErD;QACD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC1B,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,QAAQ,GAAG,8BAAkB,CAAC,CAAC;YACrE,IAAA,2BAAc,EAAC,aAAa,EAAE,cAAc,CAAC,CAAC;SACjD;KACJ;IAGD,IAAI,YAAY,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,YAAY,EAAE,CAAC;AAE5B,CAAC;AA9ED,sBA8EC"}
@@ -0,0 +1,3 @@
1
+ export declare function upsert(flags: any, file_subpath: any, file_extension: any, file_root_tag: any, file_items: any): Promise<{
2
+ outputString: string;
3
+ }>;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upsert = void 0;
4
+ const filesUtils_1 = require("../filesUtils");
5
+ const utils_1 = require("../utils");
6
+ const { Parser, transforms: { unwind } } = require('json2csv');
7
+ const path_1 = require("path");
8
+ const constants_1 = require("../constants/constants");
9
+ const fs = require('fs-extra');
10
+ async function upsert(flags, file_subpath, file_extension, file_root_tag, file_items) {
11
+ const baseInputDir = (0, path_1.join)((flags.dir || constants_1.DEFAULT_PATH), file_subpath);
12
+ const baseOutputDir = flags.output == null ? baseInputDir : (0, path_1.join)(flags.output, file_subpath);
13
+ const inputFiles = (flags.input);
14
+ if (!fs.existsSync(baseInputDir)) {
15
+ console.log('Input folder ' + baseInputDir + ' does not exist!');
16
+ return;
17
+ }
18
+ var fileList = [];
19
+ if (inputFiles) {
20
+ fileList = inputFiles.split(',');
21
+ }
22
+ else {
23
+ fileList = fs.readdirSync(baseInputDir, { withFileTypes: true })
24
+ .filter(item => !item.isDirectory() && item.name.endsWith(file_extension))
25
+ .map(item => item.name);
26
+ }
27
+ for (const filename of fileList) {
28
+ console.log('Upserting: ' + filename);
29
+ const inputFile = (0, path_1.join)(baseInputDir, filename);
30
+ const xmlFileContent = (await (0, filesUtils_1.readXmlFromFile)(inputFile)) ?? {};
31
+ const fileProperties = xmlFileContent[file_root_tag] ?? {};
32
+ const fileName = (0, filesUtils_1.removeExtension)(filename);
33
+ const outputDir = (0, path_1.join)(baseOutputDir, fileName);
34
+ for (const tag_section in file_items) {
35
+ var jsonArrayNew = fileProperties[tag_section];
36
+ if (jsonArrayNew == undefined)
37
+ continue;
38
+ if (!Array.isArray(jsonArrayNew))
39
+ jsonArrayNew = [jsonArrayNew];
40
+ (0, utils_1.generateTagId)(jsonArrayNew, file_items[tag_section].key, file_items[tag_section].headers);
41
+ const headers = file_items[tag_section].headers;
42
+ const transforms = [unwind({ paths: headers })];
43
+ const parser = new Parser({ fields: [...(0, utils_1.setDefault)(headers), '_tagid'], transforms });
44
+ const outputFile = (0, path_1.join)(outputDir, (0, filesUtils_1.calcCsvFilename)(fileName, tag_section));
45
+ if (!fs.existsSync(outputDir)) {
46
+ fs.mkdirSync(outputDir);
47
+ }
48
+ if (fs.existsSync(outputFile)) {
49
+ const csvFilePath = (0, path_1.join)(baseOutputDir, fileName, (0, filesUtils_1.calcCsvFilename)(fileName, tag_section));
50
+ var jsonMapOld = await (0, filesUtils_1.readCsvToJsonMap)(csvFilePath);
51
+ var jsonMapNew = (0, filesUtils_1.jsonArrayToMap)(jsonArrayNew);
52
+ for (var k in jsonMapNew) {
53
+ jsonMapOld[k] = jsonMapNew[k];
54
+ }
55
+ jsonArrayNew = Object.values(jsonMapOld);
56
+ }
57
+ try {
58
+ jsonArrayNew = (0, utils_1.sortByKey)(jsonArrayNew);
59
+ const csv = parser.parse(jsonArrayNew);
60
+ fs.writeFileSync(outputFile, csv, { flag: 'w+' });
61
+ // file written successfully
62
+ }
63
+ catch (err) {
64
+ console.error(err);
65
+ }
66
+ xmlFileContent[file_root_tag][tag_section] = null;
67
+ }
68
+ const inputFilePart = (0, path_1.join)(baseInputDir, fileName, fileName + constants_1.XML_PART_EXTENSION);
69
+ if (fs.existsSync(inputFilePart)) {
70
+ const xmlFileContentPart = (await (0, filesUtils_1.readXmlFromFile)(inputFilePart)) ?? {};
71
+ const filePropertiesPart = xmlFileContentPart[file_root_tag] ?? {};
72
+ for (var k in fileProperties) {
73
+ filePropertiesPart[k] = fileProperties[k];
74
+ }
75
+ (0, filesUtils_1.writeXmlToFile)(inputFilePart, xmlFileContentPart);
76
+ }
77
+ else {
78
+ (0, filesUtils_1.writeXmlToFile)(inputFilePart, fileProperties);
79
+ }
80
+ }
81
+ var outputString = 'OK';
82
+ return { outputString };
83
+ }
84
+ exports.upsert = upsert;
85
+ //# sourceMappingURL=upserter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upserter.js","sourceRoot":"","sources":["../../../src/utils/commands/upserter.ts"],"names":[],"mappings":";;;AAAA,8CAAmI;AACnI,oCAA+D;AAC/D,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/D,+BAA4B;AAC5B,sDAA0E;AAC1E,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAExB,KAAK,UAAU,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU;IACvF,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,CAAC,KAAK,CAAC,GAAG,IAAI,wBAAY,CAAC,EAAE,YAAY,CAAW,CAAC;IAC/E,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAW,CAAC;IACvG,MAAM,UAAU,GAAG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v";
3
+ export declare const XML_PART_EXTENSION = "-part.xml";
4
+ export declare const DEFAULT_PATH = "./force-app/main/default";
5
+ export declare const SFDX_CMD = "sfdx";
6
+ export declare const PLUGIN_NAME = "sfdx-easy-sources";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PLUGIN_NAME = exports.SFDX_CMD = exports.DEFAULT_PATH = exports.XML_PART_EXTENSION = exports.CSV_EXTENSION = exports.XML_NAMESPACE = void 0;
4
+ exports.XML_NAMESPACE = "http://soap.sforce.com/2006/04/metadata";
5
+ exports.CSV_EXTENSION = '.csv';
6
+ exports.XML_PART_EXTENSION = '-part.xml';
7
+ exports.DEFAULT_PATH = './force-app/main/default';
8
+ exports.SFDX_CMD = 'sfdx';
9
+ exports.PLUGIN_NAME = "sfdx-easy-sources";
10
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,yCAAyC,CAAC;AAE1D,QAAA,aAAa,GAAG,MAAM,CAAC;AACvB,QAAA,kBAAkB,GAAG,WAAW,CAAC;AAEjC,QAAA,YAAY,GAAG,0BAA0B,CAAC;AAE1C,QAAA,QAAQ,GAAG,MAAM,CAAC;AAElB,QAAA,WAAW,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const APPLICATIONS_EXTENSION = ".app-meta.xml";
2
+ export declare const APPLICATIONS_ROOT_TAG = "CustomApplication";
3
+ export declare const PAO_ROOT = "profileActionOverrides";
4
+ export declare const PAO_HEADER: string[];
5
+ export declare const PAO_KEY: string[];
6
+ export declare const APPLICATION_ITEMS: {
7
+ profileActionOverrides: {
8
+ headers: string[];
9
+ key: string[];
10
+ };
11
+ };
12
+ export declare const APPLICATIONS_SUBPATH = "applications";
13
+ export declare const APPLICATIONS_DEFAULT_PATH: string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APPLICATIONS_DEFAULT_PATH = exports.APPLICATIONS_SUBPATH = exports.APPLICATION_ITEMS = exports.PAO_KEY = exports.PAO_HEADER = exports.PAO_ROOT = exports.APPLICATIONS_ROOT_TAG = exports.APPLICATIONS_EXTENSION = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.APPLICATIONS_EXTENSION = ".app-meta.xml";
6
+ exports.APPLICATIONS_ROOT_TAG = "CustomApplication";
7
+ exports.PAO_ROOT = 'profileActionOverrides';
8
+ exports.PAO_HEADER = ['actionName', 'content', 'formFactor', 'pageOrSobjectType', 'recordType', 'type', 'profile'];
9
+ exports.PAO_KEY = ['recordType', 'content', 'profile', 'actionName', 'formFactor'];
10
+ exports.APPLICATION_ITEMS = {
11
+ [exports.PAO_ROOT]: { headers: exports.PAO_HEADER, key: exports.PAO_KEY }
12
+ };
13
+ exports.APPLICATIONS_SUBPATH = 'applications';
14
+ exports.APPLICATIONS_DEFAULT_PATH = constants_1.DEFAULT_PATH + '/' + exports.APPLICATIONS_SUBPATH;
15
+ //# sourceMappingURL=constants_applications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants_applications.js","sourceRoot":"","sources":["../../../src/utils/constants/constants_applications.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE9B,QAAA,sBAAsB,GAAG,eAAe,CAAC;AACzC,QAAA,qBAAqB,GAAG,mBAAmB,CAAC;AAE5C,QAAA,QAAQ,GAAG,wBAAwB,CAAC;AACpC,QAAA,UAAU,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAC,mBAAmB,EAAC,YAAY,EAAC,MAAM,EAAC,SAAS,CAAC,CAAC;AACvG,QAAA,OAAO,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAC,YAAY,EAAC,YAAY,CAAC,CAAC;AAEzE,QAAA,iBAAiB,GAAG;IAC7B,CAAC,gBAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,kBAAU,EAAE,GAAG,EAAE,eAAO,EAAE;CACpD,CAAA;AACY,QAAA,oBAAoB,GAAG,cAAc,CAAC;AACtC,QAAA,yBAAyB,GAAG,wBAAY,GAAG,GAAG,GAAE,4BAAoB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const GVSETS_EXTENSION = ".globalValueSet-meta.xml";
2
+ export declare const GVSETS_ROOT_TAG = "GlobalValueSet";
3
+ export declare const GVSET_ROOT = "customValue";
4
+ export declare const GVSET_HEADER: string[];
5
+ export declare const GVSET_KEY = "fullName";
6
+ export declare const GVSET_ITEMS: {
7
+ customValue: {
8
+ headers: string[];
9
+ key: string;
10
+ };
11
+ };
12
+ export declare const GVSETS_SUBPATH = "globalValueSets";
13
+ export declare const GVSETS_DEFAULT_PATH: string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GVSETS_DEFAULT_PATH = exports.GVSETS_SUBPATH = exports.GVSET_ITEMS = exports.GVSET_KEY = exports.GVSET_HEADER = exports.GVSET_ROOT = exports.GVSETS_ROOT_TAG = exports.GVSETS_EXTENSION = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.GVSETS_EXTENSION = ".globalValueSet-meta.xml";
6
+ exports.GVSETS_ROOT_TAG = "GlobalValueSet";
7
+ exports.GVSET_ROOT = 'customValue';
8
+ exports.GVSET_HEADER = ['fullName', 'default', 'label'];
9
+ exports.GVSET_KEY = 'fullName';
10
+ exports.GVSET_ITEMS = {
11
+ [exports.GVSET_ROOT]: { headers: exports.GVSET_HEADER, key: exports.GVSET_KEY }
12
+ };
13
+ exports.GVSETS_SUBPATH = 'globalValueSets';
14
+ exports.GVSETS_DEFAULT_PATH = constants_1.DEFAULT_PATH + '/' + exports.GVSETS_SUBPATH;
15
+ //# sourceMappingURL=constants_globalvaluesets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants_globalvaluesets.js","sourceRoot":"","sources":["../../../src/utils/constants/constants_globalvaluesets.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE9B,QAAA,gBAAgB,GAAG,0BAA0B,CAAC;AAC9C,QAAA,eAAe,GAAG,gBAAgB,CAAC;AAEnC,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,YAAY,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAChD,QAAA,SAAS,GAAG,UAAU,CAAC;AAEvB,QAAA,WAAW,GAAG;IACvB,CAAC,kBAAU,CAAC,EAAE,EAAE,OAAO,EAAE,oBAAY,EAAE,GAAG,EAAE,iBAAS,EAAE;CAC1D,CAAA;AAEY,QAAA,cAAc,GAAG,iBAAiB,CAAC;AACnC,QAAA,mBAAmB,GAAG,wBAAY,GAAG,GAAG,GAAG,sBAAc,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const GVSETTRANS_EXTENSION = ".globalValueSetTranslation-meta.xml";
2
+ export declare const GVSETTRANS_ROOT_TAG = "GlobalValueSetTranslation";
3
+ export declare const GVSETTRAN_ROOT = "valueTranslation";
4
+ export declare const GVSETTRAN_HEADER: string[];
5
+ export declare const GVSETTRAN_KEY = "masterLabel";
6
+ export declare const GVSETTRAN_ITEMS: {
7
+ valueTranslation: {
8
+ headers: string[];
9
+ key: string;
10
+ };
11
+ };
12
+ export declare const GVSETTRANS_SUBPATH = "globalValueSetTranslations";
13
+ export declare const GVSETTRANS_DEFAULT_PATH: string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GVSETTRANS_DEFAULT_PATH = exports.GVSETTRANS_SUBPATH = exports.GVSETTRAN_ITEMS = exports.GVSETTRAN_KEY = exports.GVSETTRAN_HEADER = exports.GVSETTRAN_ROOT = exports.GVSETTRANS_ROOT_TAG = exports.GVSETTRANS_EXTENSION = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.GVSETTRANS_EXTENSION = ".globalValueSetTranslation-meta.xml";
6
+ exports.GVSETTRANS_ROOT_TAG = "GlobalValueSetTranslation";
7
+ exports.GVSETTRAN_ROOT = 'valueTranslation';
8
+ exports.GVSETTRAN_HEADER = ['masterLabel', 'translation'];
9
+ exports.GVSETTRAN_KEY = 'masterLabel';
10
+ exports.GVSETTRAN_ITEMS = {
11
+ [exports.GVSETTRAN_ROOT]: { headers: exports.GVSETTRAN_HEADER, key: exports.GVSETTRAN_KEY }
12
+ };
13
+ exports.GVSETTRANS_SUBPATH = 'globalValueSetTranslations';
14
+ exports.GVSETTRANS_DEFAULT_PATH = constants_1.DEFAULT_PATH + '/' + exports.GVSETTRANS_SUBPATH;
15
+ //# sourceMappingURL=constants_globalvaluesettranslations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants_globalvaluesettranslations.js","sourceRoot":"","sources":["../../../src/utils/constants/constants_globalvaluesettranslations.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE9B,QAAA,oBAAoB,GAAG,qCAAqC,CAAC;AAC7D,QAAA,mBAAmB,GAAG,2BAA2B,CAAC;AAElD,QAAA,cAAc,GAAG,kBAAkB,CAAC;AACpC,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AAClD,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,eAAe,GAAG;IAC3B,CAAC,sBAAc,CAAC,EAAE,EAAE,OAAO,EAAE,wBAAgB,EAAE,GAAG,EAAE,qBAAa,EAAE;CACtE,CAAA;AAEY,QAAA,kBAAkB,GAAG,4BAA4B,CAAC;AAClD,QAAA,uBAAuB,GAAG,wBAAY,GAAG,GAAG,GAAG,0BAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const LABELS_EXTENSION = ".labels-meta.xml";
2
+ export declare const LABELS_ROOT_TAG = "CustomLabels";
3
+ export declare const LABEL_ROOT = "labels";
4
+ export declare const LABEL_HEADER: string[];
5
+ export declare const LABEL_KEY: string[];
6
+ export declare const LABEL_ITEMS: {
7
+ labels: {
8
+ headers: string[];
9
+ key: string[];
10
+ };
11
+ };
12
+ export declare const LABELS_SUBPATH = "labels";
13
+ export declare const LABELS_DEFAULT_PATH: string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LABELS_DEFAULT_PATH = exports.LABELS_SUBPATH = exports.LABEL_ITEMS = exports.LABEL_KEY = exports.LABEL_HEADER = exports.LABEL_ROOT = exports.LABELS_ROOT_TAG = exports.LABELS_EXTENSION = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.LABELS_EXTENSION = ".labels-meta.xml";
6
+ exports.LABELS_ROOT_TAG = "CustomLabels";
7
+ exports.LABEL_ROOT = 'labels';
8
+ exports.LABEL_HEADER = ['fullName', 'categories', 'language', 'protected', 'shortDescription', 'value'];
9
+ exports.LABEL_KEY = ['fullName', 'language'];
10
+ exports.LABEL_ITEMS = {
11
+ [exports.LABEL_ROOT]: { headers: exports.LABEL_HEADER, key: exports.LABEL_KEY }
12
+ };
13
+ exports.LABELS_SUBPATH = 'labels';
14
+ exports.LABELS_DEFAULT_PATH = constants_1.DEFAULT_PATH + '/' + exports.LABELS_SUBPATH;
15
+ //# sourceMappingURL=constants_labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants_labels.js","sourceRoot":"","sources":["../../../src/utils/constants/constants_labels.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE9B,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AACtC,QAAA,eAAe,GAAG,cAAc,CAAC;AAEjC,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,YAAY,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;AAChG,QAAA,SAAS,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAErC,QAAA,WAAW,GAAG;IACvB,CAAC,kBAAU,CAAC,EAAE,EAAE,OAAO,EAAE,oBAAY,EAAE,GAAG,EAAE,iBAAS,EAAE;CAC1D,CAAA;AAEY,QAAA,cAAc,GAAG,QAAQ,CAAC;AAC1B,QAAA,mBAAmB,GAAG,wBAAY,GAAG,GAAG,GAAG,sBAAc,CAAC"}