@salesforce/plugin-omnistudio-migration-tool 2.0.0-rc.6 → 2.0.0-rc.61

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 (252) hide show
  1. package/README.md +165 -73
  2. package/lib/commands/omnistudio/migration/assess.d.ts +23 -15
  3. package/lib/commands/omnistudio/migration/assess.js +250 -89
  4. package/lib/commands/omnistudio/migration/assess.js.map +1 -1
  5. package/lib/commands/omnistudio/migration/clean.d.ts +13 -0
  6. package/lib/commands/omnistudio/migration/clean.js +162 -0
  7. package/lib/commands/omnistudio/migration/clean.js.map +1 -0
  8. package/lib/commands/omnistudio/migration/info.d.ts +10 -16
  9. package/lib/commands/omnistudio/migration/info.js +53 -35
  10. package/lib/commands/omnistudio/migration/info.js.map +1 -1
  11. package/lib/commands/omnistudio/migration/migrate.d.ts +78 -18
  12. package/lib/commands/omnistudio/migration/migrate.js +461 -175
  13. package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
  14. package/lib/error/deploymentErrors.d.ts +15 -0
  15. package/lib/error/deploymentErrors.js +35 -0
  16. package/lib/error/deploymentErrors.js.map +1 -0
  17. package/lib/error/errorInterfaces.d.ts +5 -0
  18. package/lib/error/errorInterfaces.js +9 -1
  19. package/lib/error/errorInterfaces.js.map +1 -1
  20. package/lib/javascripts/reportGeneratorUtility.js +585 -22
  21. package/lib/migration/ApexNamespaceRegistry.d.ts +49 -0
  22. package/lib/migration/ApexNamespaceRegistry.js +130 -0
  23. package/lib/migration/ApexNamespaceRegistry.js.map +1 -0
  24. package/lib/migration/CustomCssRegistry.d.ts +117 -0
  25. package/lib/migration/CustomCssRegistry.js +234 -0
  26. package/lib/migration/CustomCssRegistry.js.map +1 -0
  27. package/lib/migration/NameMappingRegistry.d.ts +134 -0
  28. package/lib/migration/NameMappingRegistry.js +411 -0
  29. package/lib/migration/NameMappingRegistry.js.map +1 -0
  30. package/lib/migration/base.d.ts +8 -6
  31. package/lib/migration/base.js +25 -8
  32. package/lib/migration/base.js.map +1 -1
  33. package/lib/migration/customLabels.d.ts +70 -0
  34. package/lib/migration/customLabels.js +177 -0
  35. package/lib/migration/customLabels.js.map +1 -0
  36. package/lib/migration/dataraptor.d.ts +13 -0
  37. package/lib/migration/dataraptor.js +205 -80
  38. package/lib/migration/dataraptor.js.map +1 -1
  39. package/lib/migration/deployer.d.ts +14 -0
  40. package/lib/migration/deployer.js +105 -0
  41. package/lib/migration/deployer.js.map +1 -0
  42. package/lib/migration/flexcard.d.ts +256 -6
  43. package/lib/migration/flexcard.js +1808 -268
  44. package/lib/migration/flexcard.js.map +1 -1
  45. package/lib/migration/globalautonumber.d.ts +8 -8
  46. package/lib/migration/globalautonumber.js +49 -24
  47. package/lib/migration/globalautonumber.js.map +1 -1
  48. package/lib/migration/interfaces.d.ts +14 -0
  49. package/lib/migration/interfaces.js.map +1 -1
  50. package/lib/migration/metadataobjnamecheck.js.map +1 -1
  51. package/lib/migration/omniscript.d.ts +218 -4
  52. package/lib/migration/omniscript.js +1709 -247
  53. package/lib/migration/omniscript.js.map +1 -1
  54. package/lib/migration/omniscriptInstance.d.ts +90 -0
  55. package/lib/migration/omniscriptInstance.js +755 -0
  56. package/lib/migration/omniscriptInstance.js.map +1 -0
  57. package/lib/migration/postMigrate.d.ts +20 -4
  58. package/lib/migration/postMigrate.js +199 -12
  59. package/lib/migration/postMigrate.js.map +1 -1
  60. package/lib/migration/premigrate.d.ts +51 -0
  61. package/lib/migration/premigrate.js +325 -0
  62. package/lib/migration/premigrate.js.map +1 -0
  63. package/lib/migration/related/ApexMigration.d.ts +3 -0
  64. package/lib/migration/related/ApexMigration.js +222 -56
  65. package/lib/migration/related/ApexMigration.js.map +1 -1
  66. package/lib/migration/related/ExperienceSiteMigration.d.ts +30 -5
  67. package/lib/migration/related/ExperienceSiteMigration.js +263 -73
  68. package/lib/migration/related/ExperienceSiteMigration.js.map +1 -1
  69. package/lib/migration/related/FlexipageMigration.d.ts +5 -5
  70. package/lib/migration/related/FlexipageMigration.js +60 -38
  71. package/lib/migration/related/FlexipageMigration.js.map +1 -1
  72. package/lib/migration/related/LwcMigration.js +45 -26
  73. package/lib/migration/related/LwcMigration.js.map +1 -1
  74. package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js +48 -32
  75. package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js.map +1 -1
  76. package/lib/styles/reportGenerator.css +241 -16
  77. package/lib/templates/assessmentReport.template +78 -8
  78. package/lib/templates/dashboard.template +86 -57
  79. package/lib/templates/migrationReport.template +151 -0
  80. package/lib/utils/OmnistudioSettingsPrefManager.d.ts +14 -0
  81. package/lib/utils/OmnistudioSettingsPrefManager.js +112 -0
  82. package/lib/utils/OmnistudioSettingsPrefManager.js.map +1 -0
  83. package/lib/utils/XMLUtil.js +2 -1
  84. package/lib/utils/XMLUtil.js.map +1 -1
  85. package/lib/utils/apex/executor/AnonymousApexRunner.d.ts +1 -1
  86. package/lib/utils/apex/parser/apexparser.d.ts +8 -1
  87. package/lib/utils/apex/parser/apexparser.js +79 -13
  88. package/lib/utils/apex/parser/apexparser.js.map +1 -1
  89. package/lib/utils/config/ExistingRecordCleanupService.d.ts +30 -0
  90. package/lib/utils/config/ExistingRecordCleanupService.js +266 -0
  91. package/lib/utils/config/ExistingRecordCleanupService.js.map +1 -0
  92. package/lib/utils/config/OmniStudioMetadataCleanupService.d.ts +36 -0
  93. package/lib/utils/config/OmniStudioMetadataCleanupService.js +123 -0
  94. package/lib/utils/config/OmniStudioMetadataCleanupService.js.map +1 -0
  95. package/lib/utils/config/SpecialCharacterRecordCleanupService.d.ts +17 -0
  96. package/lib/utils/config/SpecialCharacterRecordCleanupService.js +186 -0
  97. package/lib/utils/config/SpecialCharacterRecordCleanupService.js.map +1 -0
  98. package/lib/utils/constants/documentRegistry.d.ts +9 -17
  99. package/lib/utils/constants/documentRegistry.js +9 -17
  100. package/lib/utils/constants/documentRegistry.js.map +1 -1
  101. package/lib/utils/constants/stringContants.d.ts +78 -0
  102. package/lib/utils/constants/stringContants.js +91 -4
  103. package/lib/utils/constants/stringContants.js.map +1 -1
  104. package/lib/utils/customLabels.d.ts +35 -0
  105. package/lib/utils/customLabels.js +100 -0
  106. package/lib/utils/customLabels.js.map +1 -0
  107. package/lib/utils/dataModelService.d.ts +18 -0
  108. package/lib/utils/dataModelService.js +72 -0
  109. package/lib/utils/dataModelService.js.map +1 -0
  110. package/lib/utils/file/fileUtil.d.ts +3 -1
  111. package/lib/utils/file/fileUtil.js +30 -13
  112. package/lib/utils/file/fileUtil.js.map +1 -1
  113. package/lib/utils/flexipage/flexiPageTransformer.js +119 -23
  114. package/lib/utils/flexipage/flexiPageTransformer.js.map +1 -1
  115. package/lib/utils/formula/FormulaUtil.d.ts +1 -1
  116. package/lib/utils/formula/FormulaUtil.js +17 -9
  117. package/lib/utils/formula/FormulaUtil.js.map +1 -1
  118. package/lib/utils/formula/Stack.js.map +1 -1
  119. package/lib/utils/generatePackageXml.d.ts +6 -2
  120. package/lib/utils/generatePackageXml.js +73 -33
  121. package/lib/utils/generatePackageXml.js.map +1 -1
  122. package/lib/utils/index.d.ts +1 -0
  123. package/lib/utils/index.js +1 -0
  124. package/lib/utils/index.js.map +1 -1
  125. package/lib/utils/interfaces.d.ts +69 -8
  126. package/lib/utils/json/jsonutil.js.map +1 -1
  127. package/lib/utils/logger/fileLogger.js +17 -7
  128. package/lib/utils/logger/fileLogger.js.map +1 -1
  129. package/lib/utils/logger.d.ts +3 -3
  130. package/lib/utils/logger.js +10 -6
  131. package/lib/utils/logger.js.map +1 -1
  132. package/lib/utils/logging/debugtimer.js.map +1 -1
  133. package/lib/utils/lwcparser/fileutils/FileDiffUtil.js +30 -22
  134. package/lib/utils/lwcparser/fileutils/FileDiffUtil.js.map +1 -1
  135. package/lib/utils/lwcparser/fileutils/FileProcessorFactory.js.map +1 -1
  136. package/lib/utils/lwcparser/fileutils/HtmlFileProcessor.js.map +1 -1
  137. package/lib/utils/lwcparser/fileutils/JavascriptFileProcessor.js.map +1 -1
  138. package/lib/utils/lwcparser/fileutils/XmlFileProcessor.js.map +1 -1
  139. package/lib/utils/lwcparser/htmlParser/HTMLParser.js +29 -10
  140. package/lib/utils/lwcparser/htmlParser/HTMLParser.js.map +1 -1
  141. package/lib/utils/lwcparser/jsParser/JavaScriptParser.js +29 -11
  142. package/lib/utils/lwcparser/jsParser/JavaScriptParser.js.map +1 -1
  143. package/lib/utils/lwcparser/xmlParser/XmlParser.js +19 -8
  144. package/lib/utils/lwcparser/xmlParser/XmlParser.js.map +1 -1
  145. package/lib/utils/net/index.d.ts +5 -0
  146. package/lib/utils/net/index.js +40 -2
  147. package/lib/utils/net/index.js.map +1 -1
  148. package/lib/utils/omniscriptPackageManager.d.ts +31 -0
  149. package/lib/utils/omniscriptPackageManager.js +215 -0
  150. package/lib/utils/omniscriptPackageManager.js.map +1 -0
  151. package/lib/utils/orgPreferences.d.ts +25 -0
  152. package/lib/utils/orgPreferences.js +124 -8
  153. package/lib/utils/orgPreferences.js.map +1 -1
  154. package/lib/utils/orgUtils/index.d.ts +12 -5
  155. package/lib/utils/orgUtils/index.js +52 -22
  156. package/lib/utils/orgUtils/index.js.map +1 -1
  157. package/lib/utils/projectPathUtil.d.ts +1 -1
  158. package/lib/utils/projectPathUtil.js +27 -10
  159. package/lib/utils/projectPathUtil.js.map +1 -1
  160. package/lib/utils/promptUtil.d.ts +11 -1
  161. package/lib/utils/promptUtil.js +92 -0
  162. package/lib/utils/promptUtil.js.map +1 -1
  163. package/lib/utils/query/index.d.ts +1 -0
  164. package/lib/utils/query/index.js +18 -1
  165. package/lib/utils/query/index.js.map +1 -1
  166. package/lib/utils/recordPrioritization.d.ts +44 -0
  167. package/lib/utils/recordPrioritization.js +69 -0
  168. package/lib/utils/recordPrioritization.js.map +1 -0
  169. package/lib/utils/reportGenerator/reportInterfaces.d.ts +12 -0
  170. package/lib/utils/reportGenerator/reportUtil.d.ts +6 -1
  171. package/lib/utils/reportGenerator/reportUtil.js +22 -7
  172. package/lib/utils/reportGenerator/reportUtil.js.map +1 -1
  173. package/lib/utils/resultsbuilder/ApexAssessmentReporter.d.ts +1 -0
  174. package/lib/utils/resultsbuilder/ApexAssessmentReporter.js +40 -17
  175. package/lib/utils/resultsbuilder/ApexAssessmentReporter.js.map +1 -1
  176. package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.d.ts +13 -0
  177. package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.js +179 -0
  178. package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.js.map +1 -0
  179. package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.d.ts +27 -0
  180. package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.js +262 -0
  181. package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.js.map +1 -0
  182. package/lib/utils/resultsbuilder/DRAssessmentReporter.js +38 -70
  183. package/lib/utils/resultsbuilder/DRAssessmentReporter.js.map +1 -1
  184. package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.d.ts +14 -0
  185. package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.js +143 -0
  186. package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.js.map +1 -0
  187. package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js +46 -85
  188. package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js.map +1 -1
  189. package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.d.ts +1 -0
  190. package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.js +37 -19
  191. package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.js.map +1 -1
  192. package/lib/utils/resultsbuilder/GlobalAutoNumberAssessmentReporter.js +22 -14
  193. package/lib/utils/resultsbuilder/GlobalAutoNumberAssessmentReporter.js.map +1 -1
  194. package/lib/utils/resultsbuilder/IPAssessmentReporter.js +38 -71
  195. package/lib/utils/resultsbuilder/IPAssessmentReporter.js.map +1 -1
  196. package/lib/utils/resultsbuilder/LWCAssessmentReporter.d.ts +14 -0
  197. package/lib/utils/resultsbuilder/LWCAssessmentReporter.js +143 -139
  198. package/lib/utils/resultsbuilder/LWCAssessmentReporter.js.map +1 -1
  199. package/lib/utils/resultsbuilder/OSAssessmentReporter.js +41 -88
  200. package/lib/utils/resultsbuilder/OSAssessmentReporter.js.map +1 -1
  201. package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.d.ts +12 -0
  202. package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.js +109 -0
  203. package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.js.map +1 -0
  204. package/lib/utils/resultsbuilder/assessmentReporter.d.ts +16 -6
  205. package/lib/utils/resultsbuilder/assessmentReporter.js +96 -152
  206. package/lib/utils/resultsbuilder/assessmentReporter.js.map +1 -1
  207. package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.d.ts +104 -0
  208. package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.js +380 -0
  209. package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.js.map +1 -0
  210. package/lib/utils/resultsbuilder/index.d.ts +37 -1
  211. package/lib/utils/resultsbuilder/index.js +582 -151
  212. package/lib/utils/resultsbuilder/index.js.map +1 -1
  213. package/lib/utils/resultsbuilder/reportingHelper.d.ts +2 -7
  214. package/lib/utils/resultsbuilder/reportingHelper.js +0 -43
  215. package/lib/utils/resultsbuilder/reportingHelper.js.map +1 -1
  216. package/lib/utils/sfcli/project/sfProject.d.ts +29 -0
  217. package/lib/utils/sfcli/project/sfProject.js +220 -2
  218. package/lib/utils/sfcli/project/sfProject.js.map +1 -1
  219. package/lib/utils/shell/cli.js +20 -14
  220. package/lib/utils/shell/cli.js.map +1 -1
  221. package/lib/utils/storageUtil.d.ts +14 -1
  222. package/lib/utils/storageUtil.js +31 -1
  223. package/lib/utils/storageUtil.js.map +1 -1
  224. package/lib/utils/stringUtils.d.ts +24 -0
  225. package/lib/utils/stringUtils.js +76 -9
  226. package/lib/utils/stringUtils.js.map +1 -1
  227. package/lib/utils/templateParser/__tests__/test.js +1 -2
  228. package/lib/utils/templateParser/__tests__/test.js.map +1 -1
  229. package/lib/utils/templateParser/generate.d.ts +1 -1
  230. package/lib/utils/templateParser/generate.js.map +1 -1
  231. package/lib/utils/templateParser/model/elementNode.d.ts +2 -2
  232. package/lib/utils/templateParser/model/elementNode.js +11 -2
  233. package/lib/utils/templateParser/model/elementNode.js.map +1 -1
  234. package/lib/utils/templateParser/model/nodeTypes.js +1 -1
  235. package/lib/utils/templateParser/model/nodeTypes.js.map +1 -1
  236. package/lib/utils/templateParser/util.d.ts +2 -2
  237. package/lib/utils/templateParser/util.js.map +1 -1
  238. package/lib/utils/validatorService.d.ts +14 -0
  239. package/lib/utils/validatorService.js +136 -0
  240. package/lib/utils/validatorService.js.map +1 -0
  241. package/messages/assess.json +220 -103
  242. package/messages/clean.json +40 -0
  243. package/messages/info.json +2 -1
  244. package/messages/migrate.json +314 -102
  245. package/oclif.manifest.json +1 -1
  246. package/package.json +49 -13
  247. package/lib/commands/basecommand.d.ts +0 -8
  248. package/lib/commands/basecommand.js +0 -13
  249. package/lib/commands/basecommand.js.map +0 -1
  250. package/lib/utils/OmniGlobalAutoNumberPrefManager.d.ts +0 -40
  251. package/lib/utils/OmniGlobalAutoNumberPrefManager.js +0 -65
  252. package/lib/utils/OmniGlobalAutoNumberPrefManager.js.map +0 -1
package/package.json CHANGED
@@ -1,31 +1,33 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-omnistudio-migration-tool",
3
3
  "description": "This SFDX plugin migrates FlexCard, OmniScript, DataRaptor, and Integration Procedure custom objects to standard objects.",
4
- "version": "2.0.0-rc.6",
4
+ "version": "2.0.0-rc.61",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
8
  "@apexdevtools/apex-parser": "^4.1.0",
9
+ "@babel/parser": "^7.25.6",
10
+ "@babel/traverse": "^7.25.6",
9
11
  "@babel/types": "^7.25.6",
10
12
  "@oclif/command": "^1",
11
13
  "@oclif/config": "^1",
12
14
  "@oclif/errors": "^1",
13
- "@salesforce/command": "^4.2.1",
14
- "@salesforce/core": "^2.37.1",
15
+ "@salesforce/core": "^8.23.4",
16
+ "@salesforce/sf-plugins-core": "1.22.3",
15
17
  "@types/jsdom": "^21.1.7",
16
18
  "@types/lodash.chunk": "^4.2.9",
17
19
  "@types/shelljs": "^0.8.15",
18
- "jsdom": "^25.0.0",
19
- "lodash.chunk": "^4.2.0",
20
+ "@xmldom/xmldom": "^0.9.8",
20
21
  "cli-progress": "^3.12.0",
21
22
  "diff": "^5.1.0",
23
+ "jsdom": "^25.0.0",
24
+ "jszip": "^3.10.1",
25
+ "lodash.chunk": "^4.2.0",
22
26
  "open": "^8.4.2",
23
27
  "shelljs": "^0.8.5",
24
- "tslib": "^2",
25
- "xmldom": "^0.6.0"
28
+ "tslib": "^2"
26
29
  },
27
30
  "devDependencies": {
28
- "@babel/parser": "^7.25.6",
29
31
  "@oclif/dev-cli": "^1",
30
32
  "@oclif/plugin-command-snapshot": "^3.3.15",
31
33
  "@oclif/plugin-help": "^3",
@@ -36,7 +38,8 @@
36
38
  "@salesforce/prettier-config": "^0.0.3",
37
39
  "@salesforce/ts-sinon": "^1",
38
40
  "@types/babel__traverse": "^7.20.6",
39
- "@types/jsforce": "^1.11.5",
41
+ "@types/jsforce": "^1.11.6",
42
+ "@types/xmldom": "^0.1.34",
40
43
  "@typescript-eslint/eslint-plugin": "^4.2.0",
41
44
  "@typescript-eslint/parser": "^4.2.0",
42
45
  "chai": "^4.4.1",
@@ -60,7 +63,40 @@
60
63
  "puppeteer": "^24.12.1",
61
64
  "sinon": "10.0.0",
62
65
  "ts-node": "^10.9.2",
63
- "typescript": "^4.9.5"
66
+ "typescript": "^5.4.5"
67
+ },
68
+ "resolutions": {
69
+ "nanoid": "^3.3.8",
70
+ "marked": "^4.0.10",
71
+ "semver": "^7.5.2",
72
+ "jsonwebtoken": "^9.0.2",
73
+ "jws": "^3.2.3",
74
+ "js-yaml": "^4.1.1",
75
+ "form-data": "^4.0.4",
76
+ "trim-newlines": "^3.0.1",
77
+ "minimatch": "^3.0.5",
78
+ "tough-cookie": "^4.1.3",
79
+ "ansi-regex": "^4.1.1",
80
+ "json5": "^2.2.2",
81
+ "braces": "^3.0.3",
82
+ "ejs": "^3.1.10",
83
+ "micromatch": "^4.0.8",
84
+ "path-to-regexp": "^1.9.0",
85
+ "@babel/runtime-corejs3": "^7.26.10",
86
+ "@babel/runtime": "^7.26.10",
87
+ "@babel/helpers": "^7.26.10",
88
+ "cross-spawn": "^7.0.5",
89
+ "tar-fs": "^2.1.3",
90
+ "brace-expansion": "^2.0.2",
91
+ "tmp": "^0.2.4",
92
+ "request": "^2.88.2",
93
+ "lodash.template": "^4.5.0",
94
+ "@babel/types": "^7.25.6",
95
+ "@babel/traverse": "^7.25.6",
96
+ "@babel/parser": "^7.25.6",
97
+ "@babel/core": "^7.25.6",
98
+ "@babel/template": "^7.25.6",
99
+ "xml2js": "^0.5.0"
64
100
  },
65
101
  "engines": {
66
102
  "node": ">=12.0.0"
@@ -78,7 +114,7 @@
78
114
  "license": "BSD-3-Clause",
79
115
  "oclif": {
80
116
  "commands": "./lib/commands",
81
- "bin": "sfdx",
117
+ "bin": "sf",
82
118
  "topics": {
83
119
  "omnistudio": {
84
120
  "subtopics": {
@@ -128,7 +164,7 @@
128
164
  }
129
165
  },
130
166
  "sfdx": {
131
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/2.0.0-rc.6.crt",
132
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/2.0.0-rc.6.sig"
167
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/2.0.0-rc.61.crt",
168
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/2.0.0-rc.61.sig"
133
169
  }
134
170
  }
@@ -1,8 +0,0 @@
1
- import { SfdxCommand } from '@salesforce/command';
2
- import { AnyJson } from '@salesforce/ts-types';
3
- export default abstract class OmniStudioBaseCommand extends SfdxCommand {
4
- protected static requiresUsername: boolean;
5
- protected static supportsDevhubUsername: boolean;
6
- protected static requiresProject: boolean;
7
- run(): Promise<AnyJson>;
8
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@salesforce/command");
4
- class OmniStudioBaseCommand extends command_1.SfdxCommand {
5
- run() {
6
- return null;
7
- }
8
- }
9
- exports.default = OmniStudioBaseCommand;
10
- OmniStudioBaseCommand.requiresUsername = true;
11
- OmniStudioBaseCommand.supportsDevhubUsername = false;
12
- OmniStudioBaseCommand.requiresProject = false;
13
- //# sourceMappingURL=basecommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"basecommand.js","sourceRoot":"","sources":["../../src/commands/basecommand.ts"],"names":[],"mappings":";;AAAA,iDAAkD;AAGlD,MAA8B,qBAAsB,SAAQ,qBAAW;IAK9D,GAAG;QACR,OAAO,IAAI,CAAC;IACd,CAAC;;AAPH,wCAQC;AAPkB,sCAAgB,GAAG,IAAI,CAAC;AACxB,4CAAsB,GAAG,KAAK,CAAC;AAC/B,qCAAe,GAAG,KAAK,CAAC"}
@@ -1,40 +0,0 @@
1
- import { Connection, Messages } from '@salesforce/core';
2
- /**
3
- * Manager class for handling OmniGlobalAutoNumberPref org preference operations.
4
- *
5
- * Provides functionality to check and enable the Global Auto Number preference in Salesforce orgs.
6
- * Uses metadata API to read and update OmniStudioSettings metadata.
7
- * Controls whether the new Global Auto Number functionality is available in the org.
8
- *
9
- */
10
- export declare class OmniGlobalAutoNumberPrefManager {
11
- private connection;
12
- private messages;
13
- constructor(connection: Connection, messages: Messages);
14
- /**
15
- * Checks if the Global Auto Number preference is enabled in the current org.
16
- *
17
- * Queries the OmniStudioSettings metadata to determine the current state of the preference.
18
- * Reads the enableOmniGlobalAutoNumberPref setting from metadata API.
19
- * Determines whether the Global Auto Number functionality is already active.
20
- *
21
- * @returns {Promise<boolean>} True if the preference is enabled, false otherwise
22
- *
23
- * @throws {Error} When metadata read operation fails (logged and returns false)
24
- *
25
- */
26
- isEnabled(): Promise<boolean>;
27
- /**
28
- * Enables the Global Auto Number preference in the current org.
29
- *
30
- * Updates the OmniStudioSettings metadata to enable the Global Auto Number functionality.
31
- * Uses metadata API to set enableOmniGlobalAutoNumberPref to 'true'.
32
- * Activates the new Global Auto Number functionality after migration is complete.
33
- *
34
- * @returns {Promise<any>} Metadata update result containing success status and any errors
35
- *
36
- * @throws {Error} When metadata update operation fails
37
- *
38
- */
39
- enable(): Promise<any>;
40
- }
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OmniGlobalAutoNumberPrefManager = void 0;
4
- const logger_1 = require("./logger");
5
- /**
6
- * Manager class for handling OmniGlobalAutoNumberPref org preference operations.
7
- *
8
- * Provides functionality to check and enable the Global Auto Number preference in Salesforce orgs.
9
- * Uses metadata API to read and update OmniStudioSettings metadata.
10
- * Controls whether the new Global Auto Number functionality is available in the org.
11
- *
12
- */
13
- class OmniGlobalAutoNumberPrefManager {
14
- constructor(connection, messages) {
15
- this.connection = connection;
16
- this.messages = messages;
17
- }
18
- /**
19
- * Checks if the Global Auto Number preference is enabled in the current org.
20
- *
21
- * Queries the OmniStudioSettings metadata to determine the current state of the preference.
22
- * Reads the enableOmniGlobalAutoNumberPref setting from metadata API.
23
- * Determines whether the Global Auto Number functionality is already active.
24
- *
25
- * @returns {Promise<boolean>} True if the preference is enabled, false otherwise
26
- *
27
- * @throws {Error} When metadata read operation fails (logged and returns false)
28
- *
29
- */
30
- async isEnabled() {
31
- try {
32
- const result = (await this.connection.metadata.read('OmniStudioSettings', ['OmniStudio']));
33
- return (result === null || result === void 0 ? void 0 : result.enableOmniGlobalAutoNumberPref) === 'true' || false;
34
- }
35
- catch (error) {
36
- const errMsg = error instanceof Error ? error.message : String(error);
37
- logger_1.Logger.error(this.messages.getMessage('errorCheckingGlobalAutoNumber', [errMsg]));
38
- return false;
39
- }
40
- }
41
- /**
42
- * Enables the Global Auto Number preference in the current org.
43
- *
44
- * Updates the OmniStudioSettings metadata to enable the Global Auto Number functionality.
45
- * Uses metadata API to set enableOmniGlobalAutoNumberPref to 'true'.
46
- * Activates the new Global Auto Number functionality after migration is complete.
47
- *
48
- * @returns {Promise<any>} Metadata update result containing success status and any errors
49
- *
50
- * @throws {Error} When metadata update operation fails
51
- *
52
- */
53
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- async enable() {
55
- const result = await this.connection.metadata.update('OmniStudioSettings', [
56
- {
57
- fullName: 'OmniStudio',
58
- enableOmniGlobalAutoNumberPref: 'true',
59
- },
60
- ]);
61
- return result;
62
- }
63
- }
64
- exports.OmniGlobalAutoNumberPrefManager = OmniGlobalAutoNumberPrefManager;
65
- //# sourceMappingURL=OmniGlobalAutoNumberPrefManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OmniGlobalAutoNumberPrefManager.js","sourceRoot":"","sources":["../../src/utils/OmniGlobalAutoNumberPrefManager.ts"],"names":[],"mappings":";;;AAEA,qCAAkC;AAElC;;;;;;;GAOG;AACH,MAAa,+BAA+B;IAI1C,YAAmB,UAAsB,EAAE,QAAkB;QAC3D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,SAAS;QACpB,IAAI;YACF,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,YAAY,CAAC,CAAC,CAAiB,CAAC;YAC3G,OAAO,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,8BAA8B,MAAK,MAAM,IAAI,KAAK,CAAC;SACnE;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACtE,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,+BAA+B,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAClF,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,8DAA8D;IACvD,KAAK,CAAC,MAAM;QACjB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE;YACzE;gBACE,QAAQ,EAAE,YAAY;gBACtB,8BAA8B,EAAE,MAAM;aACvB;SAClB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAtDD,0EAsDC"}