sfdx-hardis 6.0.4-beta202508131002.0 → 6.0.6-beta202508141313.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/lib/commands/hardis/cache/clear.js +2 -1
- package/lib/commands/hardis/cache/clear.js.map +1 -1
- package/lib/commands/hardis/config/get.js +1 -1
- package/lib/commands/hardis/config/get.js.map +1 -1
- package/lib/commands/hardis/doc/extract/permsetgroups.js +5 -5
- package/lib/commands/hardis/doc/extract/permsetgroups.js.map +1 -1
- package/lib/commands/hardis/doc/fieldusage.js +5 -5
- package/lib/commands/hardis/doc/fieldusage.js.map +1 -1
- package/lib/commands/hardis/doc/flow2markdown.js +2 -2
- package/lib/commands/hardis/doc/flow2markdown.js.map +1 -1
- package/lib/commands/hardis/doc/mkdocs-to-cf.js +19 -19
- package/lib/commands/hardis/doc/mkdocs-to-cf.js.map +1 -1
- package/lib/commands/hardis/doc/mkdocs-to-salesforce.js +12 -12
- package/lib/commands/hardis/doc/mkdocs-to-salesforce.js.map +1 -1
- package/lib/commands/hardis/doc/override-prompts.js +14 -14
- package/lib/commands/hardis/doc/override-prompts.js.map +1 -1
- package/lib/commands/hardis/doc/plugin/generate.js +4 -4
- package/lib/commands/hardis/doc/plugin/generate.js.map +1 -1
- package/lib/commands/hardis/doc/project2markdown.js +40 -40
- package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
- package/lib/commands/hardis/git/pull-requests/extract.js +1 -1
- package/lib/commands/hardis/git/pull-requests/extract.js.map +1 -1
- package/lib/commands/hardis/lint/access.js +7 -7
- package/lib/commands/hardis/lint/access.js.map +1 -1
- package/lib/commands/hardis/lint/metadatastatus.js +1 -1
- package/lib/commands/hardis/lint/metadatastatus.js.map +1 -1
- package/lib/commands/hardis/lint/missingattributes.js +1 -1
- package/lib/commands/hardis/lint/missingattributes.js.map +1 -1
- package/lib/commands/hardis/lint/unusedmetadatas.js +13 -13
- package/lib/commands/hardis/lint/unusedmetadatas.js.map +1 -1
- package/lib/commands/hardis/mdapi/deploy.js +3 -3
- package/lib/commands/hardis/mdapi/deploy.js.map +1 -1
- package/lib/commands/hardis/misc/custom-label-translations.js +18 -18
- package/lib/commands/hardis/misc/custom-label-translations.js.map +1 -1
- package/lib/commands/hardis/misc/purge-references.js +2 -2
- package/lib/commands/hardis/misc/purge-references.js.map +1 -1
- package/lib/commands/hardis/misc/servicenow-report.js +8 -8
- package/lib/commands/hardis/misc/servicenow-report.js.map +1 -1
- package/lib/commands/hardis/misc/toml2csv.js +16 -16
- package/lib/commands/hardis/misc/toml2csv.js.map +1 -1
- package/lib/commands/hardis/org/community/update.js +5 -5
- package/lib/commands/hardis/org/community/update.js.map +1 -1
- package/lib/commands/hardis/org/configure/data.js +5 -5
- package/lib/commands/hardis/org/configure/data.js.map +1 -1
- package/lib/commands/hardis/org/configure/files.js +1 -1
- package/lib/commands/hardis/org/configure/files.js.map +1 -1
- package/lib/commands/hardis/org/configure/monitoring.js +11 -11
- package/lib/commands/hardis/org/configure/monitoring.js.map +1 -1
- package/lib/commands/hardis/org/create.js +7 -7
- package/lib/commands/hardis/org/create.js.map +1 -1
- package/lib/commands/hardis/org/data/delete.js +1 -1
- package/lib/commands/hardis/org/data/delete.js.map +1 -1
- package/lib/commands/hardis/org/data/export.js +1 -1
- package/lib/commands/hardis/org/data/export.js.map +1 -1
- package/lib/commands/hardis/org/data/import.js +1 -1
- package/lib/commands/hardis/org/data/import.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/audittrail.js +14 -14
- package/lib/commands/hardis/org/diagnose/audittrail.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/instanceupgrade.js +3 -3
- package/lib/commands/hardis/org/diagnose/instanceupgrade.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/legacyapi.js +17 -17
- package/lib/commands/hardis/org/diagnose/legacyapi.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/licenses.js +2 -2
- package/lib/commands/hardis/org/diagnose/licenses.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/releaseupdates.js +3 -3
- package/lib/commands/hardis/org/diagnose/releaseupdates.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/unused-apex-classes.js +7 -7
- package/lib/commands/hardis/org/diagnose/unused-apex-classes.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/unused-connected-apps.js +7 -7
- package/lib/commands/hardis/org/diagnose/unused-connected-apps.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/unusedlicenses.js +10 -10
- package/lib/commands/hardis/org/diagnose/unusedlicenses.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/unusedusers.js +3 -3
- package/lib/commands/hardis/org/diagnose/unusedusers.js.map +1 -1
- package/lib/commands/hardis/org/files/export.js +1 -1
- package/lib/commands/hardis/org/files/export.js.map +1 -1
- package/lib/commands/hardis/org/files/import.js +1 -1
- package/lib/commands/hardis/org/files/import.js.map +1 -1
- package/lib/commands/hardis/org/fix/listviewmine.js +1 -1
- package/lib/commands/hardis/org/fix/listviewmine.js.map +1 -1
- package/lib/commands/hardis/org/generate/packagexmlfull.js +3 -3
- package/lib/commands/hardis/org/generate/packagexmlfull.js.map +1 -1
- package/lib/commands/hardis/org/monitor/all.js +10 -10
- package/lib/commands/hardis/org/monitor/all.js.map +1 -1
- package/lib/commands/hardis/org/monitor/backup.js +22 -22
- package/lib/commands/hardis/org/monitor/backup.js.map +1 -1
- package/lib/commands/hardis/org/monitor/limits.js +4 -4
- package/lib/commands/hardis/org/monitor/limits.js.map +1 -1
- package/lib/commands/hardis/org/multi-org-query.js +8 -8
- package/lib/commands/hardis/org/multi-org-query.js.map +1 -1
- package/lib/commands/hardis/org/purge/apexlog.js +2 -2
- package/lib/commands/hardis/org/purge/apexlog.js.map +1 -1
- package/lib/commands/hardis/org/purge/flow.js +14 -14
- package/lib/commands/hardis/org/purge/flow.js.map +1 -1
- package/lib/commands/hardis/org/retrieve/packageconfig.js +3 -3
- package/lib/commands/hardis/org/retrieve/packageconfig.js.map +1 -1
- package/lib/commands/hardis/org/retrieve/sources/analytics.js +3 -3
- package/lib/commands/hardis/org/retrieve/sources/analytics.js.map +1 -1
- package/lib/commands/hardis/org/retrieve/sources/dx.js +11 -11
- package/lib/commands/hardis/org/retrieve/sources/dx.js.map +1 -1
- package/lib/commands/hardis/org/retrieve/sources/dx2.js +2 -2
- package/lib/commands/hardis/org/retrieve/sources/dx2.js.map +1 -1
- package/lib/commands/hardis/org/retrieve/sources/metadata.js +16 -16
- package/lib/commands/hardis/org/retrieve/sources/metadata.js.map +1 -1
- package/lib/commands/hardis/org/retrieve/sources/retrofit.js +11 -11
- package/lib/commands/hardis/org/retrieve/sources/retrofit.js.map +1 -1
- package/lib/commands/hardis/org/select.js +2 -2
- package/lib/commands/hardis/org/select.js.map +1 -1
- package/lib/commands/hardis/org/test/apex.js +8 -8
- package/lib/commands/hardis/org/test/apex.js.map +1 -1
- package/lib/commands/hardis/org/user/activateinvalid.js +7 -7
- package/lib/commands/hardis/org/user/activateinvalid.js.map +1 -1
- package/lib/commands/hardis/org/user/freeze.js +10 -10
- package/lib/commands/hardis/org/user/freeze.js.map +1 -1
- package/lib/commands/hardis/org/user/unfreeze.js +10 -10
- package/lib/commands/hardis/org/user/unfreeze.js.map +1 -1
- package/lib/commands/hardis/package/create.js +1 -1
- package/lib/commands/hardis/package/create.js.map +1 -1
- package/lib/commands/hardis/package/install.js +1 -1
- package/lib/commands/hardis/package/install.js.map +1 -1
- package/lib/commands/hardis/package/mergexml.js +1 -1
- package/lib/commands/hardis/package/mergexml.js.map +1 -1
- package/lib/commands/hardis/package/version/create.js +2 -2
- package/lib/commands/hardis/package/version/create.js.map +1 -1
- package/lib/commands/hardis/package/version/promote.js +3 -3
- package/lib/commands/hardis/package/version/promote.js.map +1 -1
- package/lib/commands/hardis/project/audit/apiversion.js +8 -8
- package/lib/commands/hardis/project/audit/apiversion.js.map +1 -1
- package/lib/commands/hardis/project/audit/callincallout.js +2 -2
- package/lib/commands/hardis/project/audit/callincallout.js.map +1 -1
- package/lib/commands/hardis/project/audit/duplicatefiles.js +4 -4
- package/lib/commands/hardis/project/audit/duplicatefiles.js.map +1 -1
- package/lib/commands/hardis/project/audit/remotesites.js +2 -2
- package/lib/commands/hardis/project/audit/remotesites.js.map +1 -1
- package/lib/commands/hardis/project/clean/emptyitems.js +3 -3
- package/lib/commands/hardis/project/clean/emptyitems.js.map +1 -1
- package/lib/commands/hardis/project/clean/filter-xml-content.js +14 -14
- package/lib/commands/hardis/project/clean/filter-xml-content.js.map +1 -1
- package/lib/commands/hardis/project/clean/flowpositions.js +3 -3
- package/lib/commands/hardis/project/clean/flowpositions.js.map +1 -1
- package/lib/commands/hardis/project/clean/hiddenitems.js +3 -3
- package/lib/commands/hardis/project/clean/hiddenitems.js.map +1 -1
- package/lib/commands/hardis/project/clean/listviews.js +3 -3
- package/lib/commands/hardis/project/clean/listviews.js.map +1 -1
- package/lib/commands/hardis/project/clean/manageditems.js +2 -2
- package/lib/commands/hardis/project/clean/manageditems.js.map +1 -1
- package/lib/commands/hardis/project/clean/minimizeprofiles.js +4 -4
- package/lib/commands/hardis/project/clean/minimizeprofiles.js.map +1 -1
- package/lib/commands/hardis/project/clean/orgmissingitems.js +5 -5
- package/lib/commands/hardis/project/clean/orgmissingitems.js.map +1 -1
- package/lib/commands/hardis/project/clean/references.js +8 -8
- package/lib/commands/hardis/project/clean/references.js.map +1 -1
- package/lib/commands/hardis/project/clean/retrievefolders.js +1 -1
- package/lib/commands/hardis/project/clean/retrievefolders.js.map +1 -1
- package/lib/commands/hardis/project/clean/sensitive-metadatas.js +3 -3
- package/lib/commands/hardis/project/clean/sensitive-metadatas.js.map +1 -1
- package/lib/commands/hardis/project/clean/standarditems.js +5 -5
- package/lib/commands/hardis/project/clean/standarditems.js.map +1 -1
- package/lib/commands/hardis/project/clean/systemdebug.js +2 -2
- package/lib/commands/hardis/project/clean/systemdebug.js.map +1 -1
- package/lib/commands/hardis/project/clean/xml.js +5 -5
- package/lib/commands/hardis/project/clean/xml.js.map +1 -1
- package/lib/commands/hardis/project/configure/auth.js +3 -3
- package/lib/commands/hardis/project/configure/auth.js.map +1 -1
- package/lib/commands/hardis/project/convert/profilestopermsets.js +2 -2
- package/lib/commands/hardis/project/convert/profilestopermsets.js.map +1 -1
- package/lib/commands/hardis/project/create.js +4 -4
- package/lib/commands/hardis/project/create.js.map +1 -1
- package/lib/commands/hardis/project/deploy/notify.js +4 -4
- package/lib/commands/hardis/project/deploy/notify.js.map +1 -1
- package/lib/commands/hardis/project/deploy/smart.js +25 -25
- package/lib/commands/hardis/project/deploy/smart.js.map +1 -1
- package/lib/commands/hardis/project/deploy/sources/metadata.js +7 -7
- package/lib/commands/hardis/project/deploy/sources/metadata.js.map +1 -1
- package/lib/commands/hardis/project/fix/profiletabs.js +2 -2
- package/lib/commands/hardis/project/fix/profiletabs.js.map +1 -1
- package/lib/commands/hardis/project/fix/v53flexipages.js +4 -4
- package/lib/commands/hardis/project/fix/v53flexipages.js.map +1 -1
- package/lib/commands/hardis/project/generate/bypass.js +20 -20
- package/lib/commands/hardis/project/generate/bypass.js.map +1 -1
- package/lib/commands/hardis/project/generate/flow-git-diff.js +2 -2
- package/lib/commands/hardis/project/generate/flow-git-diff.js.map +1 -1
- package/lib/commands/hardis/project/generate/gitdelta.js +3 -3
- package/lib/commands/hardis/project/generate/gitdelta.js.map +1 -1
- package/lib/commands/hardis/project/lint.js +3 -3
- package/lib/commands/hardis/project/lint.js.map +1 -1
- package/lib/commands/hardis/project/metadata/findduplicates.js +7 -7
- package/lib/commands/hardis/project/metadata/findduplicates.js.map +1 -1
- package/lib/commands/hardis/scratch/create.js +14 -14
- package/lib/commands/hardis/scratch/create.js.map +1 -1
- package/lib/commands/hardis/scratch/delete.js +1 -1
- package/lib/commands/hardis/scratch/delete.js.map +1 -1
- package/lib/commands/hardis/scratch/pool/create.js +3 -3
- package/lib/commands/hardis/scratch/pool/create.js.map +1 -1
- package/lib/commands/hardis/scratch/pool/localauth.js +1 -1
- package/lib/commands/hardis/scratch/pool/localauth.js.map +1 -1
- package/lib/commands/hardis/scratch/pool/refresh.js +13 -13
- package/lib/commands/hardis/scratch/pool/refresh.js.map +1 -1
- package/lib/commands/hardis/scratch/pool/reset.js +4 -4
- package/lib/commands/hardis/scratch/pool/reset.js.map +1 -1
- package/lib/commands/hardis/scratch/pool/view.js +4 -4
- package/lib/commands/hardis/scratch/pool/view.js.map +1 -1
- package/lib/commands/hardis/scratch/pull.js +3 -2
- package/lib/commands/hardis/scratch/pull.js.map +1 -1
- package/lib/commands/hardis/source/deploy.js +3 -3
- package/lib/commands/hardis/source/deploy.js.map +1 -1
- package/lib/commands/hardis/source/push.js +3 -3
- package/lib/commands/hardis/source/push.js.map +1 -1
- package/lib/commands/hardis/source/retrieve.js +3 -3
- package/lib/commands/hardis/source/retrieve.js.map +1 -1
- package/lib/commands/hardis/work/new.js +16 -16
- package/lib/commands/hardis/work/new.js.map +1 -1
- package/lib/commands/hardis/work/refresh.js +12 -12
- package/lib/commands/hardis/work/refresh.js.map +1 -1
- package/lib/commands/hardis/work/resetselection.js +3 -3
- package/lib/commands/hardis/work/resetselection.js.map +1 -1
- package/lib/commands/hardis/work/save.js +35 -29
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/lib/common/aiProvider/agentforceProvider.js +5 -5
- package/lib/common/aiProvider/agentforceProvider.js.map +1 -1
- package/lib/common/aiProvider/index.js +6 -6
- package/lib/common/aiProvider/index.js.map +1 -1
- package/lib/common/aiProvider/langchainProvider.js +7 -7
- package/lib/common/aiProvider/langchainProvider.js.map +1 -1
- package/lib/common/aiProvider/openaiProvider.js +5 -5
- package/lib/common/aiProvider/openaiProvider.js.map +1 -1
- package/lib/common/aiProvider/promptTemplates.js +4 -4
- package/lib/common/aiProvider/promptTemplates.js.map +1 -1
- package/lib/common/docBuilder/docBuilderPackageXml.js +3 -3
- package/lib/common/docBuilder/docBuilderPackageXml.js.map +1 -1
- package/lib/common/docBuilder/docBuilderRoles.js +2 -2
- package/lib/common/docBuilder/docBuilderRoles.js.map +1 -1
- package/lib/common/docBuilder/docBuilderRoot.js +4 -4
- package/lib/common/docBuilder/docBuilderRoot.js.map +1 -1
- package/lib/common/docBuilder/docUtils.js +7 -7
- package/lib/common/docBuilder/docUtils.js.map +1 -1
- package/lib/common/docBuilder/objectModelBuilder.js +1 -1
- package/lib/common/docBuilder/objectModelBuilder.js.map +1 -1
- package/lib/common/gitProvider/azureDevops.js +31 -31
- package/lib/common/gitProvider/azureDevops.js.map +1 -1
- package/lib/common/gitProvider/bitbucket.js +16 -16
- package/lib/common/gitProvider/bitbucket.js.map +1 -1
- package/lib/common/gitProvider/gitProviderRoot.js +10 -10
- package/lib/common/gitProvider/gitProviderRoot.js.map +1 -1
- package/lib/common/gitProvider/github.js +11 -11
- package/lib/common/gitProvider/github.js.map +1 -1
- package/lib/common/gitProvider/gitlab.js +6 -6
- package/lib/common/gitProvider/gitlab.js.map +1 -1
- package/lib/common/gitProvider/index.js +14 -14
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/gitProvider/utilsMarkdown.js +2 -2
- package/lib/common/gitProvider/utilsMarkdown.js.map +1 -1
- package/lib/common/keyValueProviders/localtest.js +1 -1
- package/lib/common/keyValueProviders/localtest.js.map +1 -1
- package/lib/common/keyValueProviders/salesforce.js +4 -4
- package/lib/common/keyValueProviders/salesforce.js.map +1 -1
- package/lib/common/metadata-utils/index.js +18 -18
- package/lib/common/metadata-utils/index.js.map +1 -1
- package/lib/common/notifProvider/apiProvider.js +12 -12
- package/lib/common/notifProvider/apiProvider.js.map +1 -1
- package/lib/common/notifProvider/emailProvider.js +3 -3
- package/lib/common/notifProvider/emailProvider.js.map +1 -1
- package/lib/common/notifProvider/index.js +6 -6
- package/lib/common/notifProvider/index.js.map +1 -1
- package/lib/common/notifProvider/notifProviderRoot.js +1 -1
- package/lib/common/notifProvider/notifProviderRoot.js.map +1 -1
- package/lib/common/notifProvider/slackProvider.js +3 -3
- package/lib/common/notifProvider/slackProvider.js.map +1 -1
- package/lib/common/notifProvider/teamsProvider.js +2 -2
- package/lib/common/notifProvider/teamsProvider.js.map +1 -1
- package/lib/common/ticketProvider/azureBoardsProvider.js +8 -8
- package/lib/common/ticketProvider/azureBoardsProvider.js.map +1 -1
- package/lib/common/ticketProvider/index.js +1 -1
- package/lib/common/ticketProvider/index.js.map +1 -1
- package/lib/common/ticketProvider/jiraProvider.js +12 -12
- package/lib/common/ticketProvider/jiraProvider.js.map +1 -1
- package/lib/common/ticketProvider/ticketProviderRoot.js +2 -2
- package/lib/common/ticketProvider/ticketProviderRoot.js.map +1 -1
- package/lib/common/utils/apiUtils.js +37 -19
- package/lib/common/utils/apiUtils.js.map +1 -1
- package/lib/common/utils/authUtils.js +9 -9
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/classUtils.js +4 -4
- package/lib/common/utils/classUtils.js.map +1 -1
- package/lib/common/utils/dataUtils.js +8 -8
- package/lib/common/utils/dataUtils.js.map +1 -1
- package/lib/common/utils/deployTipJson.js +2 -2
- package/lib/common/utils/deployTipJson.js.map +1 -1
- package/lib/common/utils/deployTips.js +2 -2
- package/lib/common/utils/deployTips.js.map +1 -1
- package/lib/common/utils/deployUtils.js +89 -89
- package/lib/common/utils/deployUtils.js.map +1 -1
- package/lib/common/utils/emailUtils.js +3 -3
- package/lib/common/utils/emailUtils.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +5 -1
- package/lib/common/utils/filesUtils.js +48 -48
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/gitUtils.js +12 -12
- package/lib/common/utils/gitUtils.js.map +1 -1
- package/lib/common/utils/index.d.ts +2 -1
- package/lib/common/utils/index.js +60 -79
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/markdownUtils.js +2 -2
- package/lib/common/utils/markdownUtils.js.map +1 -1
- package/lib/common/utils/mermaidUtils.js +19 -19
- package/lib/common/utils/mermaidUtils.js.map +1 -1
- package/lib/common/utils/orgConfigUtils.js +8 -8
- package/lib/common/utils/orgConfigUtils.js.map +1 -1
- package/lib/common/utils/orgUtils.js +21 -21
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/common/utils/poolUtils.js +13 -13
- package/lib/common/utils/poolUtils.js.map +1 -1
- package/lib/common/utils/profileUtils.js +1 -1
- package/lib/common/utils/profileUtils.js.map +1 -1
- package/lib/common/utils/projectUtils.js +9 -9
- package/lib/common/utils/projectUtils.js.map +1 -1
- package/lib/common/utils/prompts.js +62 -12
- package/lib/common/utils/prompts.js.map +1 -1
- package/lib/common/utils/workaroundUtils.js +2 -2
- package/lib/common/utils/workaroundUtils.js.map +1 -1
- package/lib/common/utils/wrapUtils.js +3 -3
- package/lib/common/utils/wrapUtils.js.map +1 -1
- package/lib/common/utils/xmlUtils.js +10 -10
- package/lib/common/utils/xmlUtils.js.map +1 -1
- package/lib/common/websocketClient.d.ts +1 -1
- package/lib/common/websocketClient.js +7 -6
- package/lib/common/websocketClient.js.map +1 -1
- package/lib/config/index.js +3 -3
- package/lib/config/index.js.map +1 -1
- package/lib/hooks/finally/notify.js +2 -2
- package/lib/hooks/finally/notify.js.map +1 -1
- package/lib/hooks/prerun/check-dependencies.js +7 -7
- package/lib/hooks/prerun/check-dependencies.js.map +1 -1
- package/oclif.manifest.json +607 -607
- package/package.json +1 -1
|
@@ -56,12 +56,12 @@ export async function forceSourcePush(scratchOrgAlias, commandThis, debug = fals
|
|
|
56
56
|
// Manage beta/legacy boza
|
|
57
57
|
const stdOut = e.stdout + e.stderr;
|
|
58
58
|
if (stdOut.includes(`getaddrinfo EAI_AGAIN`)) {
|
|
59
|
-
uxLog(this, c.red(c.bold('The error has been caused by your unstable internet connection. Please Try again !')));
|
|
59
|
+
uxLog("error", this, c.red(c.bold('The error has been caused by your unstable internet connection. Please Try again !')));
|
|
60
60
|
}
|
|
61
61
|
// Analyze errors
|
|
62
62
|
const { errLog } = await analyzeDeployErrorLogs(stdOut, true, {});
|
|
63
|
-
uxLog(commandThis, c.red('Sadly there has been push error(s)'));
|
|
64
|
-
uxLog(this, c.red('\n' + errLog));
|
|
63
|
+
uxLog("error", commandThis, c.red('Sadly there has been push error(s)'));
|
|
64
|
+
uxLog("error", this, c.red('\n' + errLog));
|
|
65
65
|
elapseEnd('project:deploy:start');
|
|
66
66
|
killBoringExitHandlers();
|
|
67
67
|
throw new SfError('Deployment failure. Check messages above');
|
|
@@ -89,18 +89,18 @@ export async function forceSourcePull(scratchOrgAlias, debug = false) {
|
|
|
89
89
|
}));
|
|
90
90
|
// Sort files by Type then Name
|
|
91
91
|
sortArray(files, { by: ['Type', 'Name'], order: ['asc', 'asc'] });
|
|
92
|
-
uxLog(this, c.green('Successfully pulled sources from scratch org / source-tracked sandbox'));
|
|
92
|
+
uxLog("action", this, c.green('Successfully pulled sources from scratch org / source-tracked sandbox'));
|
|
93
93
|
// Display as a table
|
|
94
94
|
if (files.length > 0) {
|
|
95
95
|
// Use the uxLogTable utility for consistent table output
|
|
96
96
|
uxLogTable(this, files, ['Type', 'Name', 'State']);
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
|
-
uxLog(this, c.grey('No files pulled.'));
|
|
99
|
+
uxLog("log", this, c.grey('No files pulled.'));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
else {
|
|
103
|
-
uxLog(this, c.red('Pull command did not return expected results'));
|
|
103
|
+
uxLog("error", this, c.red('Pull command did not return expected results'));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
catch (e) {
|
|
@@ -108,8 +108,8 @@ export async function forceSourcePull(scratchOrgAlias, debug = false) {
|
|
|
108
108
|
const stdOut = e.stdout + e.stderr;
|
|
109
109
|
// Analyze errors
|
|
110
110
|
const { errLog } = await analyzeDeployErrorLogs(stdOut, true, {});
|
|
111
|
-
uxLog(this, c.red('Sadly there has been pull error(s)'));
|
|
112
|
-
uxLog(this, c.red('\n' + errLog));
|
|
111
|
+
uxLog("error", this, c.red('Sadly there has been pull error(s)'));
|
|
112
|
+
uxLog("error", this, c.red('\n' + errLog));
|
|
113
113
|
// List unknown elements from output
|
|
114
114
|
const forceIgnoreElements = [...stdOut.matchAll(/Entity of type '(.*)' named '(.*)' cannot be found/gm)];
|
|
115
115
|
if (forceIgnoreElements.length > 0 && !isCI) {
|
|
@@ -132,7 +132,7 @@ export async function forceSourcePull(scratchOrgAlias, debug = false) {
|
|
|
132
132
|
const forceIgnoreLines = forceIgnore.replace('\r\n', '\n').split('\n');
|
|
133
133
|
forceIgnoreLines.push(...forceIgnoreRes.value);
|
|
134
134
|
await fs.writeFile(forceIgnoreFile, forceIgnoreLines.join('\n') + '\n');
|
|
135
|
-
uxLog(this, 'Updated .forceignore file');
|
|
135
|
+
uxLog("log", this, 'Updated .forceignore file');
|
|
136
136
|
return await forceSourcePull(scratchOrgAlias, debug);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -142,7 +142,7 @@ export async function forceSourcePull(scratchOrgAlias, debug = false) {
|
|
|
142
142
|
// Check if some items has to be forced-retrieved because SF CLI does not detect updates
|
|
143
143
|
const config = await getConfig('project');
|
|
144
144
|
if (config.autoRetrieveWhenPull) {
|
|
145
|
-
uxLog(this, c.cyan('Retrieving additional sources that are usually forgotten by sf project:retrieve:start ...'));
|
|
145
|
+
uxLog("action", this, c.cyan('Retrieving additional sources that are usually forgotten by sf project:retrieve:start ...'));
|
|
146
146
|
const metadataConstraint = config.autoRetrieveWhenPull.join(', ');
|
|
147
147
|
const retrieveCommand = `sf project retrieve start -m "${metadataConstraint}" -o ${scratchOrgAlias} --wait 60`;
|
|
148
148
|
await execCommand(retrieveCommand, this, {
|
|
@@ -153,10 +153,10 @@ export async function forceSourcePull(scratchOrgAlias, debug = false) {
|
|
|
153
153
|
}
|
|
154
154
|
// If there are SharingRules, retrieve all of them to avoid the previous one are deleted (SF Cli strange/buggy behavior)
|
|
155
155
|
if (pullCommandResult?.stdout?.includes("SharingRules")) {
|
|
156
|
-
uxLog(this, c.cyan('Detected Sharing Rules in the pull: retrieving the whole of them to avoid silly overrides !'));
|
|
156
|
+
uxLog("action", this, c.cyan('Detected Sharing Rules in the pull: retrieving the whole of them to avoid silly overrides !'));
|
|
157
157
|
const sharingRulesNamesMatches = [...pullCommandResult.stdout.matchAll(/([^ \\/]+)\.sharingRules-meta\.xml/gm)];
|
|
158
158
|
for (const match of sharingRulesNamesMatches) {
|
|
159
|
-
uxLog(this, c.grey(`Retrieve the whole ${match[1]} SharingRules...`));
|
|
159
|
+
uxLog("log", this, c.grey(`Retrieve the whole ${match[1]} SharingRules...`));
|
|
160
160
|
const retrieveCommand = `sf project retrieve start -m "SharingRules:${match[1]}" -o ${scratchOrgAlias} --wait 60`;
|
|
161
161
|
await execCommand(retrieveCommand, this, {
|
|
162
162
|
fail: true,
|
|
@@ -183,24 +183,24 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
183
183
|
await isPackageXmlEmpty(options.postDestructiveChanges)));
|
|
184
184
|
// Special case: both package.xml and destructive changes files exist but are empty
|
|
185
185
|
if (packageXmlIsEmpty && hasEmptyDestructiveChanges && !hasDestructiveChanges) {
|
|
186
|
-
uxLog(this, c.cyan('Both package.xml and destructive changes files exist but are empty. Nothing to deploy.'));
|
|
186
|
+
uxLog("action", this, c.cyan('Both package.xml and destructive changes files exist but are empty. Nothing to deploy.'));
|
|
187
187
|
return { messages: [], quickDeploy, deployXmlCount: 0 };
|
|
188
188
|
}
|
|
189
189
|
// If we have empty package.xml and no destructive changes, there's nothing to do
|
|
190
190
|
if (packageXmlIsEmpty && !hasDestructiveChanges) {
|
|
191
|
-
uxLog(this, 'No deployment or destructive changes to perform');
|
|
191
|
+
uxLog("other", this, 'No deployment or destructive changes to perform');
|
|
192
192
|
return { messages: [], quickDeploy, deployXmlCount: 0 };
|
|
193
193
|
}
|
|
194
194
|
// If we have empty package.xml but destructive changes, log it
|
|
195
195
|
if (packageXmlIsEmpty && hasDestructiveChanges) {
|
|
196
|
-
uxLog(this, c.cyan('Package.xml is empty, but destructive changes are present. Will proceed with deployment of destructive changes.'));
|
|
196
|
+
uxLog("action", this, c.cyan('Package.xml is empty, but destructive changes are present. Will proceed with deployment of destructive changes.'));
|
|
197
197
|
}
|
|
198
198
|
const splitDeployments = await buildDeploymentPackageXmls(packageXmlFile, check, debugMode, options);
|
|
199
199
|
const messages = [];
|
|
200
200
|
let deployXmlCount = splitDeployments.length;
|
|
201
201
|
// If no deployments are planned but we have destructive changes, add a deployment with the existing package.xml
|
|
202
202
|
if (deployXmlCount === 0 && hasDestructiveChanges) {
|
|
203
|
-
uxLog(this, c.cyan('Creating deployment for destructive changes...'));
|
|
203
|
+
uxLog("action", this, c.cyan('Creating deployment for destructive changes...'));
|
|
204
204
|
splitDeployments.push({
|
|
205
205
|
label: 'package-for-destructive-changes',
|
|
206
206
|
packageXmlFile: packageXmlFile,
|
|
@@ -209,7 +209,7 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
209
209
|
deployXmlCount = 1;
|
|
210
210
|
}
|
|
211
211
|
else if (deployXmlCount === 0) {
|
|
212
|
-
uxLog(this, 'No deployment to perform');
|
|
212
|
+
uxLog("other", this, 'No deployment to perform');
|
|
213
213
|
return { messages, quickDeploy, deployXmlCount };
|
|
214
214
|
}
|
|
215
215
|
// Replace quick actions with dummy content in case we have dependencies between Flows & QuickActions
|
|
@@ -217,8 +217,8 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
217
217
|
// Run deployment pre-commands
|
|
218
218
|
await executePrePostCommands('commandsPreDeploy', { success: true, checkOnly: check, conn: options.conn, extraCommands: options.extraCommands });
|
|
219
219
|
// Process items of deployment plan
|
|
220
|
-
uxLog(this, c.cyan('Processing split deployments build from deployment plan...'));
|
|
221
|
-
uxLog(this, c.whiteBright(JSON.stringify(splitDeployments, null, 2)));
|
|
220
|
+
uxLog("action", this, c.cyan('Processing split deployments build from deployment plan...'));
|
|
221
|
+
uxLog("other", this, c.whiteBright(JSON.stringify(splitDeployments, null, 2)));
|
|
222
222
|
for (const deployment of splitDeployments) {
|
|
223
223
|
elapseStart(`deploy ${deployment.label}`);
|
|
224
224
|
// Skip this deployment if package.xml is empty AND it's not a special destructive changes deployment
|
|
@@ -226,7 +226,7 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
226
226
|
const isDestructiveChangesDeployment = deployment.label === 'package-for-destructive-changes';
|
|
227
227
|
const packageXmlEmpty = await isPackageXmlEmpty(deployment.packageXmlFile, { ignoreStandaloneParentItems: true });
|
|
228
228
|
if (packageXmlEmpty && !isDestructiveChangesDeployment && !hasDestructiveChanges) {
|
|
229
|
-
uxLog(commandThis, c.
|
|
229
|
+
uxLog("log", commandThis, c.grey(`Skipped ${c.bold(deployment.label)} deployment because package.xml is empty or contains only standalone parent items.\n${c.grey(c.italic('This may be related to filtering using package-no-overwrite.xml or packageDeployOnChange.xml'))}`));
|
|
230
230
|
deployXmlCount--;
|
|
231
231
|
elapseEnd(`deploy ${deployment.label}`);
|
|
232
232
|
continue;
|
|
@@ -234,18 +234,18 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
234
234
|
let message = '';
|
|
235
235
|
// Wait before deployment item process if necessary
|
|
236
236
|
if (deployment.waitBefore) {
|
|
237
|
-
uxLog(commandThis, `Waiting ${deployment.waitBefore} seconds before deployment according to deployment plan`);
|
|
237
|
+
uxLog("log", commandThis, `Waiting ${deployment.waitBefore} seconds before deployment according to deployment plan`);
|
|
238
238
|
await new Promise((resolve) => setTimeout(resolve, deployment.waitBefore * 1000));
|
|
239
239
|
}
|
|
240
240
|
// Deployment of type package.xml file
|
|
241
241
|
if (deployment.packageXmlFile) {
|
|
242
242
|
const nbDeployedItems = await countPackageXmlItems(deployment.packageXmlFile);
|
|
243
243
|
if (nbDeployedItems === 0 && !hasDestructiveChanges) {
|
|
244
|
-
uxLog(commandThis, c.yellow(`Skipping deployment of ${c.bold(deployment.label)} because package.xml is empty and there are no destructive changes.`));
|
|
244
|
+
uxLog("warning", commandThis, c.yellow(`Skipping deployment of ${c.bold(deployment.label)} because package.xml is empty and there are no destructive changes.`));
|
|
245
245
|
elapseEnd(`deploy ${deployment.label}`);
|
|
246
246
|
continue;
|
|
247
247
|
}
|
|
248
|
-
uxLog(commandThis, c.cyan(`${check ? 'Simulating deployment of' : 'Deploying'} ${c.bold(deployment.label)} package: ${deployment.packageXmlFile} (${nbDeployedItems} items)${hasDestructiveChanges ? ' with destructive changes' : ''}...`));
|
|
248
|
+
uxLog("action", commandThis, c.cyan(`${check ? 'Simulating deployment of' : 'Deploying'} ${c.bold(deployment.label)} package: ${deployment.packageXmlFile} (${nbDeployedItems} items)${hasDestructiveChanges ? ' with destructive changes' : ''}...`));
|
|
249
249
|
// Try QuickDeploy
|
|
250
250
|
if (check === false && (process.env?.SFDX_HARDIS_QUICK_DEPLOY || '') !== 'false') {
|
|
251
251
|
const deploymentCheckId = await GitProvider.getDeploymentCheckId();
|
|
@@ -262,18 +262,18 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
262
262
|
fail: false,
|
|
263
263
|
});
|
|
264
264
|
if (quickDeployRes.status === 0) {
|
|
265
|
-
uxLog(commandThis, c.green(`Successfully processed QuickDeploy for deploymentId ${deploymentCheckId}`));
|
|
266
|
-
uxLog(commandThis, c.yellow('If you do not want to use QuickDeploy feature, define env variable SFDX_HARDIS_QUICK_DEPLOY=false'));
|
|
265
|
+
uxLog("success", commandThis, c.green(`Successfully processed QuickDeploy for deploymentId ${deploymentCheckId}`));
|
|
266
|
+
uxLog("warning", commandThis, c.yellow('If you do not want to use QuickDeploy feature, define env variable SFDX_HARDIS_QUICK_DEPLOY=false'));
|
|
267
267
|
quickDeploy = true;
|
|
268
268
|
continue;
|
|
269
269
|
}
|
|
270
270
|
else {
|
|
271
|
-
uxLog(commandThis, c.yellow(`Unable to perform QuickDeploy for deploymentId ${deploymentCheckId}.\n${quickDeployRes.errorMessage}.`));
|
|
272
|
-
uxLog(commandThis, c.green("Switching back to effective deployment not using QuickDeploy: that's ok :)"));
|
|
271
|
+
uxLog("warning", commandThis, c.yellow(`Unable to perform QuickDeploy for deploymentId ${deploymentCheckId}.\n${quickDeployRes.errorMessage}.`));
|
|
272
|
+
uxLog("success", commandThis, c.green("Switching back to effective deployment not using QuickDeploy: that's ok :)"));
|
|
273
273
|
const isProdOrg = await isProductionOrg(options.targetUsername || "", options);
|
|
274
274
|
if (!isProdOrg) {
|
|
275
275
|
testlevel = 'NoTestRun';
|
|
276
|
-
uxLog(commandThis, c.green('Note: run with NoTestRun to improve perfs as we had previously succeeded to simulate the deployment'));
|
|
276
|
+
uxLog("success", commandThis, c.green('Note: run with NoTestRun to improve perfs as we had previously succeeded to simulate the deployment'));
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -310,14 +310,14 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
310
310
|
retry: deployment.retry || null,
|
|
311
311
|
});
|
|
312
312
|
if (deployRes.status === 0) {
|
|
313
|
-
uxLog(commandThis, c.grey(shortenLogLines(JSON.stringify(deployRes))));
|
|
313
|
+
uxLog("log", commandThis, c.grey(shortenLogLines(JSON.stringify(deployRes))));
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
catch (e) {
|
|
317
317
|
await generateApexCoverageOutputFile();
|
|
318
318
|
// Special handling for "nothing to deploy" error with destructive changes
|
|
319
319
|
if ((e.stdout + e.stderr).includes("No local changes to deploy") && hasDestructiveChanges) {
|
|
320
|
-
uxLog(commandThis, c.yellow(c.bold('Received "Nothing to Deploy" error, but destructive changes are present. ' +
|
|
320
|
+
uxLog("warning", commandThis, c.yellow(c.bold('Received "Nothing to Deploy" error, but destructive changes are present. ' +
|
|
321
321
|
'This can happen when only destructive changes are being deployed.')));
|
|
322
322
|
// Create a minimal response to avoid terminal freeze
|
|
323
323
|
deployRes = {
|
|
@@ -387,14 +387,14 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
387
387
|
if (deployRes.status === 0) {
|
|
388
388
|
message =
|
|
389
389
|
`[sfdx-hardis] Successfully ${check ? 'checked deployment of' : 'deployed'} ${c.bold(deployment.label)} to target Salesforce org - ` + extraInfo;
|
|
390
|
-
uxLog(commandThis, c.green(message));
|
|
390
|
+
uxLog("success", commandThis, c.green(message));
|
|
391
391
|
if (deployRes?.testCoverageNotBlockingActivated === true) {
|
|
392
|
-
uxLog(commandThis, c.yellow('There is a code coverage issue, but the check is passing by design because you configured testCoverageNotBlocking: true in your branch .sfdx-hardis.yml'));
|
|
392
|
+
uxLog("warning", commandThis, c.yellow('There is a code coverage issue, but the check is passing by design because you configured testCoverageNotBlocking: true in your branch .sfdx-hardis.yml'));
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
else {
|
|
396
396
|
message = `[sfdx-hardis] Unable to deploy ${c.bold(deployment.label)} to target Salesforce org - ` + extraInfo;
|
|
397
|
-
uxLog(commandThis, c.red(c.bold(deployRes.errorMessage)));
|
|
397
|
+
uxLog("error", commandThis, c.red(c.bold(deployRes.errorMessage)));
|
|
398
398
|
await displayDeploymentLink(deployRes.errorMessage, options);
|
|
399
399
|
}
|
|
400
400
|
// Restore quickActions after deployment of main package
|
|
@@ -410,7 +410,7 @@ export async function smartDeploy(packageXmlFile, check = false, testlevel = 'Ru
|
|
|
410
410
|
}
|
|
411
411
|
// Wait after deployment item process if necessary
|
|
412
412
|
if (deployment.waitAfter) {
|
|
413
|
-
uxLog(commandThis, `Waiting ${deployment.waitAfter} seconds after deployment according to deployment plan`);
|
|
413
|
+
uxLog("log", commandThis, `Waiting ${deployment.waitAfter} seconds after deployment according to deployment plan`);
|
|
414
414
|
await new Promise((resolve) => setTimeout(resolve, deployment.waitAfter * 1000));
|
|
415
415
|
}
|
|
416
416
|
messages.push(message);
|
|
@@ -428,17 +428,17 @@ async function handleDeployError(e, check, branchConfig, commandThis, options, d
|
|
|
428
428
|
(output.includes('=== Test Success') || output.includes('Test Success [')) &&
|
|
429
429
|
!output.includes('Test Failures') &&
|
|
430
430
|
(output.includes('=== Apex Code Coverage') || output.includes("Failing: 0"))) {
|
|
431
|
-
uxLog(commandThis, c.yellow(c.bold('Deployment status: Deploy check success & Ignored test coverage error')));
|
|
431
|
+
uxLog("warning", commandThis, c.yellow(c.bold('Deployment status: Deploy check success & Ignored test coverage error')));
|
|
432
432
|
return { status: 0, stdout: e.stdout, stderr: e.stderr, testCoverageNotBlockingActivated: true };
|
|
433
433
|
}
|
|
434
434
|
// Handle Effective error
|
|
435
435
|
const { errLog } = await analyzeDeployErrorLogs(output, true, { check: check });
|
|
436
|
-
uxLog(commandThis, c.red(c.bold('Sadly there has been Deployment error(s)')));
|
|
436
|
+
uxLog("error", commandThis, c.red(c.bold('Sadly there has been Deployment error(s)')));
|
|
437
437
|
if (process.env?.SFDX_HARDIS_DEPLOY_ERR_COLORS === 'false') {
|
|
438
|
-
uxLog(this, '\n' + errLog);
|
|
438
|
+
uxLog("other", this, '\n' + errLog);
|
|
439
439
|
}
|
|
440
440
|
else {
|
|
441
|
-
uxLog(this, c.red('\n' + errLog));
|
|
441
|
+
uxLog("error", this, c.red('\n' + errLog));
|
|
442
442
|
}
|
|
443
443
|
await displayDeploymentLink(output, options);
|
|
444
444
|
elapseEnd(`deploy ${deployment.label}`);
|
|
@@ -494,7 +494,7 @@ async function getDeploymentId(rawLog) {
|
|
|
494
494
|
globalThis.pullRequestDeploymentId = deploymentId;
|
|
495
495
|
return deploymentId;
|
|
496
496
|
}
|
|
497
|
-
uxLog(this, c.yellow(`Unable to find deploymentId in logs \n${c.grey(rawLog)}`));
|
|
497
|
+
uxLog("warning", this, c.yellow(`Unable to find deploymentId in logs \n${c.grey(rawLog)}`));
|
|
498
498
|
return null;
|
|
499
499
|
}
|
|
500
500
|
// Display deployment link in target org
|
|
@@ -512,14 +512,14 @@ async function displayDeploymentLink(rawLog, options) {
|
|
|
512
512
|
fail: true,
|
|
513
513
|
output: false,
|
|
514
514
|
});
|
|
515
|
-
uxLog(this, c.yellowBright(`Open deployment status page in org with url: ${c.bold(c.greenBright(openRes?.result?.url))}`));
|
|
515
|
+
uxLog("warning", this, c.yellowBright(`Open deployment status page in org with url: ${c.bold(c.greenBright(openRes?.result?.url))}`));
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
// In some case we can not deploy the whole package.xml, so let's split it before :)
|
|
519
519
|
async function buildDeploymentPackageXmls(packageXmlFile, check, debugMode, options = {}) {
|
|
520
520
|
// Check for empty package.xml
|
|
521
521
|
if (await isPackageXmlEmpty(packageXmlFile)) {
|
|
522
|
-
uxLog(this, 'Empty package.xml: nothing to deploy');
|
|
522
|
+
uxLog("other", this, 'Empty package.xml: nothing to deploy');
|
|
523
523
|
return [];
|
|
524
524
|
}
|
|
525
525
|
const deployOncePackageXml = await buildDeployOncePackageXml(debugMode, options);
|
|
@@ -540,7 +540,7 @@ async function buildDeploymentPackageXmls(packageXmlFile, check, debugMode, opti
|
|
|
540
540
|
// Work on deploymentPlan packages before deploying them
|
|
541
541
|
const skipSplitPackages = (process.env.SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES || 'true') !== 'false';
|
|
542
542
|
if (skipSplitPackages === true) {
|
|
543
|
-
uxLog(this, c.yellow('Do not split package.xml, as SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES=false has not been found in ENV vars'));
|
|
543
|
+
uxLog("warning", this, c.yellow('Do not split package.xml, as SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES=false has not been found in ENV vars'));
|
|
544
544
|
}
|
|
545
545
|
else {
|
|
546
546
|
for (const deploymentItem of config.deploymentPlan.packages) {
|
|
@@ -599,7 +599,7 @@ async function applyPackageXmlFiltering(packageXml, deployOncePackageXml, deploy
|
|
|
599
599
|
// package-no-overwrite.xml items are deployed only if they are not in the target org
|
|
600
600
|
async function buildDeployOncePackageXml(debugMode = false, options = {}) {
|
|
601
601
|
if (process.env.SKIP_PACKAGE_DEPLOY_ONCE === 'true') {
|
|
602
|
-
uxLog(this, c.yellow("Skipped package-no-overwrite.xml management because of env variable SKIP_PACKAGE_DEPLOY_ONCE='true'"));
|
|
602
|
+
uxLog("warning", this, c.yellow("Skipped package-no-overwrite.xml management because of env variable SKIP_PACKAGE_DEPLOY_ONCE='true'"));
|
|
603
603
|
return null;
|
|
604
604
|
}
|
|
605
605
|
// Get default package-no-overwrite
|
|
@@ -613,15 +613,15 @@ async function buildDeployOncePackageXml(debugMode = false, options = {}) {
|
|
|
613
613
|
if (!fs.existsSync(packageNoOverwrite)) {
|
|
614
614
|
throw new SfError(`packageNoOverwritePath property or PACKAGE_NO_OVERWRITE_PATH leads not existing file ${packageNoOverwrite}`);
|
|
615
615
|
}
|
|
616
|
-
uxLog(this, c.grey(`Using custom package-no-overwrite file defined at ${packageNoOverwrite}`));
|
|
616
|
+
uxLog("log", this, c.grey(`Using custom package-no-overwrite file defined at ${packageNoOverwrite}`));
|
|
617
617
|
}
|
|
618
618
|
if (fs.existsSync(packageNoOverwrite)) {
|
|
619
|
-
uxLog(this, c.cyan('Handling package-no-overwrite.xml...'));
|
|
619
|
+
uxLog("action", this, c.cyan('Handling package-no-overwrite.xml...'));
|
|
620
620
|
// If package-no-overwrite.xml is not empty, build target org package.xml and remove its content from packageOnce.xml
|
|
621
621
|
if (!(await isPackageXmlEmpty(packageNoOverwrite))) {
|
|
622
622
|
const tmpDir = await createTempDir();
|
|
623
623
|
// Build target org package.xml
|
|
624
|
-
uxLog(this, c.cyan(`Generating full package.xml from target org to identify its items matching with package-no-overwrite.xml ...`));
|
|
624
|
+
uxLog("action", this, c.cyan(`Generating full package.xml from target org to identify its items matching with package-no-overwrite.xml ...`));
|
|
625
625
|
const targetOrgPackageXml = path.join(tmpDir, 'packageTargetOrg.xml');
|
|
626
626
|
await buildOrgManifest(options.targetUsername, targetOrgPackageXml, options.conn);
|
|
627
627
|
let calculatedPackageNoOverwrite = path.join(tmpDir, 'package-no-overwrite.xml');
|
|
@@ -633,7 +633,7 @@ async function buildDeployOncePackageXml(debugMode = false, options = {}) {
|
|
|
633
633
|
});
|
|
634
634
|
await fs.copy(calculatedPackageNoOverwrite, path.join(tmpDir, 'calculated-package-no-overwrite.xml'));
|
|
635
635
|
calculatedPackageNoOverwrite = path.join(tmpDir, 'calculated-package-no-overwrite.xml');
|
|
636
|
-
uxLog(this, c.grey(`calculated-package-no-overwrite.xml with only items that already exist in target org: ${calculatedPackageNoOverwrite}`));
|
|
636
|
+
uxLog("log", this, c.grey(`calculated-package-no-overwrite.xml with only items that already exist in target org: ${calculatedPackageNoOverwrite}`));
|
|
637
637
|
// Check if there is still something in calculated-package-no-overwrite.xml
|
|
638
638
|
if (!(await isPackageXmlEmpty(calculatedPackageNoOverwrite))) {
|
|
639
639
|
return calculatedPackageNoOverwrite;
|
|
@@ -645,7 +645,7 @@ async function buildDeployOncePackageXml(debugMode = false, options = {}) {
|
|
|
645
645
|
// packageDeployOnChange.xml items are deployed only if they have changed in target org
|
|
646
646
|
export async function buildDeployOnChangePackageXml(debugMode, options = {}) {
|
|
647
647
|
if (process.env.SKIP_PACKAGE_DEPLOY_ON_CHANGE === 'true') {
|
|
648
|
-
uxLog(this, c.yellow("Skipped packageDeployOnChange.xml management because of env variable SKIP_PACKAGE_DEPLOY_ON_CHANGE='true'"));
|
|
648
|
+
uxLog("warning", this, c.yellow("Skipped packageDeployOnChange.xml management because of env variable SKIP_PACKAGE_DEPLOY_ON_CHANGE='true'"));
|
|
649
649
|
return null;
|
|
650
650
|
}
|
|
651
651
|
// Check if packageDeployOnChange.xml is defined
|
|
@@ -663,7 +663,7 @@ export async function buildDeployOnChangePackageXml(debugMode, options = {}) {
|
|
|
663
663
|
// Do not call delta if no updated file has been retrieved
|
|
664
664
|
const hasGitLocalUpdates = await gitHasLocalUpdates();
|
|
665
665
|
if (hasGitLocalUpdates === false) {
|
|
666
|
-
uxLog(this, c.grey('No diff retrieved from packageDeployOnChange.xml'));
|
|
666
|
+
uxLog("log", this, c.grey('No diff retrieved from packageDeployOnChange.xml'));
|
|
667
667
|
return null;
|
|
668
668
|
}
|
|
669
669
|
// "Temporarily" commit updates so sfdx-git-delta can build diff package.xml
|
|
@@ -688,17 +688,17 @@ export async function buildDeployOnChangePackageXml(debugMode, options = {}) {
|
|
|
688
688
|
debugMode: debugMode,
|
|
689
689
|
keepEmptyTypes: false,
|
|
690
690
|
});
|
|
691
|
-
uxLog(this, c.grey(`packageDeployOnChange.xml filtered to keep only metadatas that have changed: ${packageXmlDeployOnChangeToUse}`));
|
|
691
|
+
uxLog("log", this, c.grey(`packageDeployOnChange.xml filtered to keep only metadatas that have changed: ${packageXmlDeployOnChangeToUse}`));
|
|
692
692
|
// Return result
|
|
693
693
|
return packageXmlDeployOnChangeToUse;
|
|
694
694
|
}
|
|
695
695
|
// Remove content of a package.xml file from another package.xml file
|
|
696
696
|
export async function removePackageXmlContent(packageXmlFile, packageXmlFileToRemove, removedOnly = false, options = { debugMode: false, keepEmptyTypes: false }) {
|
|
697
697
|
if (removedOnly === false) {
|
|
698
|
-
uxLog(this, c.cyan(`Removing ${c.green(path.basename(packageXmlFileToRemove))} items from ${c.green(path.basename(packageXmlFile))}...`));
|
|
698
|
+
uxLog("action", this, c.cyan(`Removing ${c.green(path.basename(packageXmlFileToRemove))} items from ${c.green(path.basename(packageXmlFile))}...`));
|
|
699
699
|
}
|
|
700
700
|
else {
|
|
701
|
-
uxLog(this, c.cyan(`Keeping ${c.green(path.basename(packageXmlFileToRemove))} items matching with ${c.green(path.basename(packageXmlFile))} (and remove the rest)...`));
|
|
701
|
+
uxLog("action", this, c.cyan(`Keeping ${c.green(path.basename(packageXmlFileToRemove))} items matching with ${c.green(path.basename(packageXmlFile))} (and remove the rest)...`));
|
|
702
702
|
}
|
|
703
703
|
await removePackageXmlFilesContent(packageXmlFile, packageXmlFileToRemove, {
|
|
704
704
|
outputXmlFile: packageXmlFile,
|
|
@@ -711,7 +711,7 @@ export async function removePackageXmlContent(packageXmlFile, packageXmlFileToRe
|
|
|
711
711
|
export async function deployDestructiveChanges(packageDeletedXmlFile, options = { debug: false, check: false }, commandThis) {
|
|
712
712
|
// Create empty deployment file because of SF CLI limitation
|
|
713
713
|
// cf https://gist.github.com/benahm/b590ecf575ff3c42265425233a2d727e
|
|
714
|
-
uxLog(commandThis, c.cyan(`Deploying destructive changes from file ${path.resolve(packageDeletedXmlFile)}`));
|
|
714
|
+
uxLog("action", commandThis, c.cyan(`Deploying destructive changes from file ${path.resolve(packageDeletedXmlFile)}`));
|
|
715
715
|
const tmpDir = await createTempDir();
|
|
716
716
|
const emptyPackageXmlFile = path.join(tmpDir, 'package.xml');
|
|
717
717
|
await fs.writeFile(emptyPackageXmlFile, `<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -737,9 +737,9 @@ export async function deployDestructiveChanges(packageDeletedXmlFile, options =
|
|
|
737
737
|
}
|
|
738
738
|
catch (e) {
|
|
739
739
|
const { errLog } = await analyzeDeployErrorLogs(e.stdout + e.stderr, true, {});
|
|
740
|
-
uxLog(this, c.red('Sadly there has been destruction error(s)'));
|
|
741
|
-
uxLog(this, c.red('\n' + errLog));
|
|
742
|
-
uxLog(this, c.yellow(c.bold('That could be a false positive, as in real deployment, the package.xml deployment will be committed before the use of destructiveChanges.xml')));
|
|
740
|
+
uxLog("error", this, c.red('Sadly there has been destruction error(s)'));
|
|
741
|
+
uxLog("error", this, c.red('\n' + errLog));
|
|
742
|
+
uxLog("warning", this, c.yellow(c.bold('That could be a false positive, as in real deployment, the package.xml deployment will be committed before the use of destructiveChanges.xml')));
|
|
743
743
|
killBoringExitHandlers();
|
|
744
744
|
throw new SfError('Error while deploying destructive changes');
|
|
745
745
|
}
|
|
@@ -747,11 +747,11 @@ export async function deployDestructiveChanges(packageDeletedXmlFile, options =
|
|
|
747
747
|
let deleteMsg = '';
|
|
748
748
|
if (deployDeleteRes.status === 0) {
|
|
749
749
|
deleteMsg = `[sfdx-hardis] Successfully ${options.check ? 'checked deployment of' : 'deployed'} destructive changes to Salesforce org`;
|
|
750
|
-
uxLog(commandThis, c.green(deleteMsg));
|
|
750
|
+
uxLog("success", commandThis, c.green(deleteMsg));
|
|
751
751
|
}
|
|
752
752
|
else {
|
|
753
753
|
deleteMsg = '[sfdx-hardis] Unable to deploy destructive changes to Salesforce org';
|
|
754
|
-
uxLog(commandThis, c.red(deployDeleteRes.errorMessage));
|
|
754
|
+
uxLog("error", commandThis, c.red(deployDeleteRes.errorMessage));
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
export async function deployMetadatas(options = {
|
|
@@ -782,7 +782,7 @@ export async function deployMetadatas(options = {
|
|
|
782
782
|
catch (e) {
|
|
783
783
|
// workaround if --soapdeploy is not available
|
|
784
784
|
if (JSON.stringify(e).includes('--soapdeploy') && !options.tryOnce === true) {
|
|
785
|
-
uxLog(this, c.yellow("This may be a error with a workaround... let's try it :)"));
|
|
785
|
+
uxLog("warning", this, c.yellow("This may be a error with a workaround... let's try it :)"));
|
|
786
786
|
try {
|
|
787
787
|
deployRes = await execCommand(deployCommand.replace(' --soapdeploy', ''), this, {
|
|
788
788
|
output: true,
|
|
@@ -793,7 +793,7 @@ export async function deployMetadatas(options = {
|
|
|
793
793
|
catch (e2) {
|
|
794
794
|
if (JSON.stringify(e2).includes('NoTestRun')) {
|
|
795
795
|
// Another workaround: try running tests
|
|
796
|
-
uxLog(this, c.yellow("This may be again an error with a workaround... let's make a last attempt :)"));
|
|
796
|
+
uxLog("warning", this, c.yellow("This may be again an error with a workaround... let's make a last attempt :)"));
|
|
797
797
|
deployRes = await execCommand(deployCommand.replace(' --soapdeploy', '').replace('NoTestRun', 'RunLocalTests'), this, {
|
|
798
798
|
output: true,
|
|
799
799
|
debug: options.debug,
|
|
@@ -816,7 +816,7 @@ let quickActionsBackUpFolder;
|
|
|
816
816
|
// Replace QuickAction content with Dummy content that will always pass
|
|
817
817
|
async function replaceQuickActionsWithDummy() {
|
|
818
818
|
if (process.env.CI_DEPLOY_QUICK_ACTIONS_DUMMY === 'true') {
|
|
819
|
-
uxLog(this, c.cyan('Replacing QuickActions content with Dummy content that will always pass...'));
|
|
819
|
+
uxLog("action", this, c.cyan('Replacing QuickActions content with Dummy content that will always pass...'));
|
|
820
820
|
quickActionsBackUpFolder = await createTempDir();
|
|
821
821
|
const patternQuickActions = process.cwd() + '/force-app/' + `**/quickActions/*__c.*.quickAction-meta.xml`;
|
|
822
822
|
const matchQuickActions = await glob(patternQuickActions, { cwd: process.cwd(), ignore: GLOB_IGNORE_PATTERNS });
|
|
@@ -833,7 +833,7 @@ async function replaceQuickActionsWithDummy() {
|
|
|
833
833
|
<type>LightningComponent</type>
|
|
834
834
|
<width>100</width>
|
|
835
835
|
</QuickAction>`);
|
|
836
|
-
uxLog(this, c.grey('Backuped and replaced ' + quickActionFile));
|
|
836
|
+
uxLog("log", this, c.grey('Backuped and replaced ' + quickActionFile));
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
}
|
|
@@ -850,7 +850,7 @@ async function restoreQuickActions() {
|
|
|
850
850
|
.resolve(quickActionFile)
|
|
851
851
|
.replace(path.resolve(quickActionsBackUpFolder), path.resolve(process.cwd()));
|
|
852
852
|
await fs.copy(quickActionFile, prevFileName);
|
|
853
|
-
uxLog(this, c.grey('Restored ' + quickActionFile));
|
|
853
|
+
uxLog("log", this, c.grey('Restored ' + quickActionFile));
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
}
|
|
@@ -859,7 +859,7 @@ export async function buildOrgManifest(targetOrgUsernameAlias, packageXmlOutputF
|
|
|
859
859
|
// Manage file name
|
|
860
860
|
if (packageXmlOutputFile === null) {
|
|
861
861
|
const tmpDir = await createTempDir();
|
|
862
|
-
uxLog(this, c.cyan(`Generating full package.xml from target org ${targetOrgUsernameAlias}...`));
|
|
862
|
+
uxLog("action", this, c.cyan(`Generating full package.xml from target org ${targetOrgUsernameAlias}...`));
|
|
863
863
|
packageXmlOutputFile = path.join(tmpDir, 'packageTargetOrg.xml');
|
|
864
864
|
}
|
|
865
865
|
const manifestName = path.basename(packageXmlOutputFile);
|
|
@@ -905,7 +905,7 @@ export async function buildOrgManifest(targetOrgUsernameAlias, packageXmlOutputF
|
|
|
905
905
|
}
|
|
906
906
|
// Add Elements that are not returned by SF CLI command
|
|
907
907
|
if (conn) {
|
|
908
|
-
uxLog(this, c.grey('Looking for package.xml elements that are not returned by manifest create command...'));
|
|
908
|
+
uxLog("log", this, c.grey('Looking for package.xml elements that are not returned by manifest create command...'));
|
|
909
909
|
const mdTypes = [{ type: 'ListView' }, { type: 'CustomLabel' }];
|
|
910
910
|
const mdList = await conn.metadata.list(mdTypes, getApiVersion());
|
|
911
911
|
const parsedPackageXml = await parseXmlFile(packageXmlFull);
|
|
@@ -948,7 +948,7 @@ export async function buildOrgManifest(targetOrgUsernameAlias, packageXmlOutputF
|
|
|
948
948
|
for (const recipeId of waveRecipeTypeMembers) {
|
|
949
949
|
if (!waveDataFlowType.members.includes(recipeId)) {
|
|
950
950
|
waveDataFlowType.members.push(recipeId);
|
|
951
|
-
uxLog(this, c.grey(`- Added WaveDataflow ${recipeId} to match WaveRecipe ${recipeId}`));
|
|
951
|
+
uxLog("log", this, c.grey(`- Added WaveDataflow ${recipeId} to match WaveRecipe ${recipeId}`));
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
954
|
sortCrossPlatform(waveDataFlowType.members);
|
|
@@ -968,13 +968,13 @@ export async function buildOrgManifest(targetOrgUsernameAlias, packageXmlOutputF
|
|
|
968
968
|
];
|
|
969
969
|
const typesToRemove = parsedPackageXml.Package.types.filter(type => filteredTypes.includes(type.name[0]));
|
|
970
970
|
if (typesToRemove.length > 0) {
|
|
971
|
-
uxLog(this, c.grey(`Force filtering out metadata types from org-generated package.xml: ${typesToRemove.map(type => type.name[0]).join(', ')}`));
|
|
971
|
+
uxLog("log", this, c.grey(`Force filtering out metadata types from org-generated package.xml: ${typesToRemove.map(type => type.name[0]).join(', ')}`));
|
|
972
972
|
parsedPackageXml.Package.types = parsedPackageXml.Package.types.filter((type) => !filteredTypes.includes(type.name[0]));
|
|
973
973
|
}
|
|
974
974
|
await writeXmlFile(packageXmlFull, parsedPackageXml);
|
|
975
975
|
}
|
|
976
976
|
const nbRetrievedItems = await countPackageXmlItems(packageXmlFull);
|
|
977
|
-
uxLog(this, c.cyan(`Full org package.xml contains ${c.bold(nbRetrievedItems)} items`));
|
|
977
|
+
uxLog("action", this, c.cyan(`Full org package.xml contains ${c.bold(nbRetrievedItems)} items`));
|
|
978
978
|
return packageXmlFull;
|
|
979
979
|
}
|
|
980
980
|
/**
|
|
@@ -991,31 +991,31 @@ export async function createEmptyPackageXml() {
|
|
|
991
991
|
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
992
992
|
<version>${getApiVersion()}</version>
|
|
993
993
|
</Package>`, 'utf8');
|
|
994
|
-
uxLog(this, c.grey(`Created empty package.xml at ${emptyPackageXmlPath}`));
|
|
994
|
+
uxLog("log", this, c.grey(`Created empty package.xml at ${emptyPackageXmlPath}`));
|
|
995
995
|
return emptyPackageXmlPath;
|
|
996
996
|
}
|
|
997
997
|
export async function executePrePostCommands(property, options) {
|
|
998
998
|
const branchConfig = await getConfig('branch');
|
|
999
999
|
const commands = [...(branchConfig[property] || []), ...(options.extraCommands || [])];
|
|
1000
1000
|
if (commands.length === 0) {
|
|
1001
|
-
uxLog(this, c.grey(`No ${property} found to run`));
|
|
1001
|
+
uxLog("log", this, c.grey(`No ${property} found to run`));
|
|
1002
1002
|
return;
|
|
1003
1003
|
}
|
|
1004
|
-
uxLog(this, c.cyan(`Processing ${property} found in .sfdx-hardis.yml configuration...`));
|
|
1004
|
+
uxLog("action", this, c.cyan(`Processing ${property} found in .sfdx-hardis.yml configuration...`));
|
|
1005
1005
|
for (const cmd of commands) {
|
|
1006
1006
|
// If if skipIfError is true and deployment failed
|
|
1007
1007
|
if (options.success === false && cmd.skipIfError === true) {
|
|
1008
|
-
uxLog(this, c.yellow(`Skipping skipIfError=true command [${cmd.id}]: ${cmd.label}`));
|
|
1008
|
+
uxLog("warning", this, c.yellow(`Skipping skipIfError=true command [${cmd.id}]: ${cmd.label}`));
|
|
1009
1009
|
continue;
|
|
1010
1010
|
}
|
|
1011
1011
|
// Skip if we are in another context than the requested one
|
|
1012
1012
|
const cmdContext = cmd.context || "all";
|
|
1013
1013
|
if (cmdContext === "check-deployment-only" && options.checkOnly === false) {
|
|
1014
|
-
uxLog(this, c.grey(`Skipping check-deployment-only command as we are in process deployment mode [${cmd.id}]: ${cmd.label}`));
|
|
1014
|
+
uxLog("log", this, c.grey(`Skipping check-deployment-only command as we are in process deployment mode [${cmd.id}]: ${cmd.label}`));
|
|
1015
1015
|
continue;
|
|
1016
1016
|
}
|
|
1017
1017
|
if (cmdContext === "process-deployment-only" && options.checkOnly === true) {
|
|
1018
|
-
uxLog(this, c.grey(`Skipping process-deployment-only command as we are in check deployment mode [${cmd.id}]: ${cmd.label}`));
|
|
1018
|
+
uxLog("log", this, c.grey(`Skipping process-deployment-only command as we are in check deployment mode [${cmd.id}]: ${cmd.label}`));
|
|
1019
1019
|
continue;
|
|
1020
1020
|
}
|
|
1021
1021
|
const runOnlyOnceByOrg = cmd.runOnlyOnceByOrg || false;
|
|
@@ -1024,12 +1024,12 @@ export async function executePrePostCommands(property, options) {
|
|
|
1024
1024
|
const commandTraceQuery = `SELECT Id,CreatedDate FROM SfdxHardisTrace__c WHERE Type__c='${property}' AND Key__c='${cmd.id}' LIMIT 1`;
|
|
1025
1025
|
const commandTraceRes = await soqlQuery(commandTraceQuery, options.conn);
|
|
1026
1026
|
if (commandTraceRes?.records?.length > 0) {
|
|
1027
|
-
uxLog(this, c.grey(`Skipping command [${cmd.id}]: ${cmd.label} because it has been defined with runOnlyOnceByOrg and has already been run on ${commandTraceRes.records[0].CreatedDate}`));
|
|
1027
|
+
uxLog("log", this, c.grey(`Skipping command [${cmd.id}]: ${cmd.label} because it has been defined with runOnlyOnceByOrg and has already been run on ${commandTraceRes.records[0].CreatedDate}`));
|
|
1028
1028
|
continue;
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
// Run command
|
|
1032
|
-
uxLog(this, c.cyan(`Running [${cmd.id}]: ${cmd.label}`));
|
|
1032
|
+
uxLog("action", this, c.cyan(`Running [${cmd.id}]: ${cmd.label}`));
|
|
1033
1033
|
const commandRes = await execCommand(cmd.command, this, { fail: false, output: true });
|
|
1034
1034
|
if (commandRes.status === 0 && runOnlyOnceByOrg) {
|
|
1035
1035
|
const hardisTraceRecord = {
|
|
@@ -1039,10 +1039,10 @@ export async function executePrePostCommands(property, options) {
|
|
|
1039
1039
|
};
|
|
1040
1040
|
const insertRes = await options.conn.insert("SfdxHardisTrace__c", [hardisTraceRecord]);
|
|
1041
1041
|
if (insertRes[0].success) {
|
|
1042
|
-
uxLog(this, c.green(`Stored SfdxHardisTrace__c entry ${insertRes[0].id} with command [${cmd.id}] so it is not run again in the future (runOnlyOnceByOrg: true)`));
|
|
1042
|
+
uxLog("success", this, c.green(`Stored SfdxHardisTrace__c entry ${insertRes[0].id} with command [${cmd.id}] so it is not run again in the future (runOnlyOnceByOrg: true)`));
|
|
1043
1043
|
}
|
|
1044
1044
|
else {
|
|
1045
|
-
uxLog(this, c.red(`Error storing SfdxHardisTrace__c entry :` + JSON.stringify(insertRes, null, 2)));
|
|
1045
|
+
uxLog("error", this, c.red(`Error storing SfdxHardisTrace__c entry :` + JSON.stringify(insertRes, null, 2)));
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
@@ -1061,8 +1061,8 @@ export async function extractOrgCoverageFromLog(stdout) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
catch (e) {
|
|
1064
|
-
uxLog(this, c.yellow(`Warning: unable to convert ${orgCoverage} into string`));
|
|
1065
|
-
uxLog(this, c.
|
|
1064
|
+
uxLog("warning", this, c.yellow(`Warning: unable to convert ${orgCoverage} into string`));
|
|
1065
|
+
uxLog("error", this, c.grey(e.message));
|
|
1066
1066
|
}
|
|
1067
1067
|
/* jscpd:ignore-end */
|
|
1068
1068
|
// Get from output file whose name has been found in text output
|
|
@@ -1101,10 +1101,10 @@ export async function extractOrgCoverageFromLog(stdout) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
orgCoverage = (coveredLocationsNb / numLocationsNb) * 100;
|
|
1104
|
-
uxLog(this, c.yellow("Code coverage has been calculated manually, if the number seems strange to you, you better use option \"--coverage-formatters json-summary\""));
|
|
1104
|
+
uxLog("warning", this, c.yellow("Code coverage has been calculated manually, if the number seems strange to you, you better use option \"--coverage-formatters json-summary\""));
|
|
1105
1105
|
return orgCoverage.toFixed(2);
|
|
1106
1106
|
}
|
|
1107
|
-
uxLog(this, c.italic(c.grey('Unable to get org coverage from results. Maybe try to add --coverage-formatters json-summary to your call to sf project deploy start ?')));
|
|
1107
|
+
uxLog("warning", this, c.italic(c.grey('Unable to get org coverage from results. Maybe try to add --coverage-formatters json-summary to your call to sf project deploy start ?')));
|
|
1108
1108
|
return null;
|
|
1109
1109
|
}
|
|
1110
1110
|
function getCoverageFromJsonFile(jsonFile) {
|
|
@@ -1117,8 +1117,8 @@ function getCoverageFromJsonFile(jsonFile) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
catch (e) {
|
|
1120
|
-
uxLog(this, c.yellow(`Warning: unable to convert ${orgCoverage} into string`));
|
|
1121
|
-
uxLog(this, c.
|
|
1120
|
+
uxLog("warning", this, c.yellow(`Warning: unable to convert ${orgCoverage} into string`));
|
|
1121
|
+
uxLog("error", this, c.grey(e.message));
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
return null;
|
|
@@ -1155,13 +1155,13 @@ export async function checkDeploymentOrgCoverage(orgCoverage, options) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
else {
|
|
1157
1157
|
await updatePullRequestResultCoverage('valid', orgCoverage, minCoverage, options);
|
|
1158
|
-
uxLog(this, c.cyan(`[apextest] Test run ${codeCoverageText} ${c.bold(c.green(orgCoverage))}% is greater than ${c.bold(minCoverage)}%`));
|
|
1158
|
+
uxLog("action", this, c.cyan(`[apextest] Test run ${codeCoverageText} ${c.bold(c.green(orgCoverage))}% is greater than ${c.bold(minCoverage)}%`));
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
async function checkDeploymentErrors(e, options, commandThis = null) {
|
|
1162
1162
|
const { errLog } = await analyzeDeployErrorLogs(e.stdout + e.stderr, true, options);
|
|
1163
|
-
uxLog(commandThis, c.red(c.bold('Sadly there has been Metadata deployment error(s)...')));
|
|
1164
|
-
uxLog(this, c.red('\n' + errLog));
|
|
1163
|
+
uxLog("error", commandThis, c.red(c.bold('Sadly there has been Metadata deployment error(s)...')));
|
|
1164
|
+
uxLog("error", this, c.red('\n' + errLog));
|
|
1165
1165
|
await displayDeploymentLink(e.stdout + e.stderr, options);
|
|
1166
1166
|
// Post pull requests comments if necessary
|
|
1167
1167
|
if (options.check) {
|
|
@@ -1216,14 +1216,14 @@ export async function generateApexCoverageOutputFile() {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
if (coverageObject !== null) {
|
|
1218
1218
|
await fs.writeFile(coverageFileName, JSON.stringify(coverageObject, null, 2), 'utf8');
|
|
1219
|
-
uxLog(this, c.grey(`Written Apex coverage results in file ${coverageFileName}`));
|
|
1219
|
+
uxLog("log", this, c.grey(`Written Apex coverage results in file ${coverageFileName}`));
|
|
1220
1220
|
if (WebSocketClient.isAliveWithLwcUI()) {
|
|
1221
1221
|
WebSocketClient.sendReportFileMessage(coverageFileName, "Coverage Results JSON", "report");
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
catch (e) {
|
|
1226
|
-
uxLog(this, c.red(`Error while generating Apex coverage output file: ${e.message}`));
|
|
1226
|
+
uxLog("error", this, c.red(`Error while generating Apex coverage output file: ${e.message}`));
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
//# sourceMappingURL=deployUtils.js.map
|