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
|
@@ -32,13 +32,13 @@ export function git(options = { output: false, displayCommand: true }) {
|
|
|
32
32
|
stdout.on('data', (data) => {
|
|
33
33
|
logCommand();
|
|
34
34
|
if (options.output) {
|
|
35
|
-
uxLog(this, c.italic(c.grey(data)));
|
|
35
|
+
uxLog("other", this, c.italic(c.grey(data)));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
stderr.on('data', (data) => {
|
|
39
39
|
logCommand();
|
|
40
40
|
if (options.output) {
|
|
41
|
-
uxLog(this, c.italic(c.yellow(data)));
|
|
41
|
+
uxLog("other", this, c.italic(c.yellow(data)));
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
function logCommand() {
|
|
@@ -50,7 +50,7 @@ export function git(options = { output: false, displayCommand: true }) {
|
|
|
50
50
|
if (WebSocketClient.isAlive()) {
|
|
51
51
|
WebSocketClient.sendCommandSubCommandStartMessage(command + ' ' + gitArgsStr, process.cwd(), options);
|
|
52
52
|
}
|
|
53
|
-
uxLog(this, `[command] ${c.bold(c.bgWhite(c.blue(command + ' ' + gitArgsStr)))}`);
|
|
53
|
+
uxLog("other", this, `[command] ${c.bold(c.bgWhite(c.blue(command + ' ' + gitArgsStr)))}`);
|
|
54
54
|
if (WebSocketClient.isAlive()) {
|
|
55
55
|
WebSocketClient.sendCommandSubCommandEndMessage(command + ' ' + gitArgsStr, process.cwd(), options, true, '');
|
|
56
56
|
}
|
|
@@ -101,7 +101,7 @@ export async function getGitRepoUrl() {
|
|
|
101
101
|
export async function gitHasLocalUpdates(options = { show: false }) {
|
|
102
102
|
const changes = await git().status();
|
|
103
103
|
if (options.show) {
|
|
104
|
-
uxLog(this, c.cyan(JSON.stringify(changes)));
|
|
104
|
+
uxLog("action", this, c.cyan(JSON.stringify(changes)));
|
|
105
105
|
}
|
|
106
106
|
return changes.files.length > 0;
|
|
107
107
|
}
|
|
@@ -120,7 +120,7 @@ export async function checkSfdxPlugin(pluginName) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
if (!(pluginsStdout || '').includes(pluginName)) {
|
|
123
|
-
uxLog(this, c.yellow(`[dependencies] Installing SF CLI plugin ${c.green(pluginName)}... \nIf is stays stuck for too long, please run ${c.green(`sf plugins install ${pluginName}`)})`));
|
|
123
|
+
uxLog("warning", this, c.yellow(`[dependencies] Installing SF CLI plugin ${c.green(pluginName)}... \nIf is stays stuck for too long, please run ${c.green(`sf plugins install ${pluginName}`)})`));
|
|
124
124
|
const installCommand = `echo y|sf plugins install ${pluginName}`;
|
|
125
125
|
await execCommand(installCommand, this, { fail: true, output: false });
|
|
126
126
|
}
|
|
@@ -141,7 +141,7 @@ export async function checkAppDependency(appName) {
|
|
|
141
141
|
await setConfig('user', { installedApps: installedApps });
|
|
142
142
|
})
|
|
143
143
|
.catch(() => {
|
|
144
|
-
uxLog(this, c.red(`You need ${c.bold(appName)} to be locally installed to run this command.\n${dependenciesInstallLink[appName] || ''}`));
|
|
144
|
+
uxLog("error", this, c.red(`You need ${c.bold(appName)} to be locally installed to run this command.\n${dependenciesInstallLink[appName] || ''}`));
|
|
145
145
|
process.exit();
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -235,7 +235,7 @@ export async function ensureGitRepository(options = { init: false, clone: false,
|
|
|
235
235
|
resolve(null);
|
|
236
236
|
});
|
|
237
237
|
});
|
|
238
|
-
uxLog(this, `Git repository cloned. ${c.yellow('Please run again the same command :)')}`);
|
|
238
|
+
uxLog("other", this, `Git repository cloned. ${c.yellow('Please run again the same command :)')}`);
|
|
239
239
|
process.exit(0);
|
|
240
240
|
}
|
|
241
241
|
else {
|
|
@@ -362,8 +362,8 @@ export async function checkGitClean(options) {
|
|
|
362
362
|
await execCommand('git stash', this, { output: true, fail: true });
|
|
363
363
|
}
|
|
364
364
|
catch (e) {
|
|
365
|
-
uxLog(this, c.yellow(c.bold("You might need to run the following command in Powershell launched as Administrator")));
|
|
366
|
-
uxLog(this, c.yellow(c.bold("git config --system core.longpaths true")));
|
|
365
|
+
uxLog("warning", this, c.yellow(c.bold("You might need to run the following command in Powershell launched as Administrator")));
|
|
366
|
+
uxLog("warning", this, c.yellow(c.bold("git config --system core.longpaths true")));
|
|
367
367
|
throw e;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
@@ -441,7 +441,7 @@ export async function interactiveGitAdd(options = { filter: [], groups: [] }) {
|
|
|
441
441
|
.map((fileStatus) => fileStatus.path.replace('"', '')));
|
|
442
442
|
}
|
|
443
443
|
if (filesFiltered.length > 0) {
|
|
444
|
-
uxLog(this, c.grey('The following list of files has not been proposed for selection\n' +
|
|
444
|
+
uxLog("log", this, c.grey('The following list of files has not been proposed for selection\n' +
|
|
445
445
|
filesFiltered
|
|
446
446
|
.map((fileStatus) => {
|
|
447
447
|
return ` - (${getGitWorkingDirLabel(fileStatus.working_dir)}) ${getSfdxFileLabel(fileStatus.path)}`;
|
|
@@ -489,12 +489,12 @@ export async function interactiveGitAdd(options = { filter: [], groups: [] }) {
|
|
|
489
489
|
}
|
|
490
490
|
// exit
|
|
491
491
|
else {
|
|
492
|
-
uxLog(this, 'Cancelled by user');
|
|
492
|
+
uxLog("other", this, 'Cancelled by user');
|
|
493
493
|
process.exit(0);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
else {
|
|
497
|
-
uxLog(this, c.cyan('There is no new file to commit'));
|
|
497
|
+
uxLog("action", this, c.cyan('There is no new file to commit'));
|
|
498
498
|
}
|
|
499
499
|
return result;
|
|
500
500
|
}
|
|
@@ -580,7 +580,7 @@ export async function execCommand(command, commandThis, options = {
|
|
|
580
580
|
spinner = ora({ text: commandLog, spinner: 'moon' }).start();
|
|
581
581
|
}
|
|
582
582
|
else {
|
|
583
|
-
uxLog(this, commandLog);
|
|
583
|
+
uxLog("other", this, commandLog);
|
|
584
584
|
}
|
|
585
585
|
if (WebSocketClient.isAlive()) {
|
|
586
586
|
WebSocketClient.sendCommandSubCommandStartMessage(command, execOptions.cwd || process.cwd(), options);
|
|
@@ -612,9 +612,9 @@ export async function execCommand(command, commandThis, options = {
|
|
|
612
612
|
if (options.retry.tryCount <= (options.retry.retryMaxAttempts || 1) &&
|
|
613
613
|
(options.retry.retryStringConstraint == null ||
|
|
614
614
|
(e.stdout + e.stderr).includes(options.retry.retryStringConstraint))) {
|
|
615
|
-
uxLog(commandThis, c.yellow(`Retry command: ${options.retry.tryCount} on ${options.retry.retryMaxAttempts || 1}`));
|
|
615
|
+
uxLog("warning", commandThis, c.yellow(`Retry command: ${options.retry.tryCount} on ${options.retry.retryMaxAttempts || 1}`));
|
|
616
616
|
if (options.retry.retryDelay) {
|
|
617
|
-
uxLog(this, `Waiting ${options.retry.retryDelay} seconds before retrying command`);
|
|
617
|
+
uxLog("other", this, `Waiting ${options.retry.retryDelay} seconds before retrying command`);
|
|
618
618
|
await new Promise((resolve) => setTimeout(resolve, options.retry.retryDelay * 1000));
|
|
619
619
|
}
|
|
620
620
|
return await execCommand(command, commandThis, options);
|
|
@@ -631,7 +631,7 @@ export async function execCommand(command, commandThis, options = {
|
|
|
631
631
|
}
|
|
632
632
|
// Display output if requested, for better user understanding of the logs
|
|
633
633
|
if (options.output || options.debug) {
|
|
634
|
-
uxLog(commandThis, c.italic(c.grey(shortenLogLines(commandResult.stdout))));
|
|
634
|
+
uxLog("other", commandThis, c.italic(c.grey(shortenLogLines(commandResult.stdout))));
|
|
635
635
|
}
|
|
636
636
|
// Return status 0 if not --json
|
|
637
637
|
if (!command.includes('--json')) {
|
|
@@ -648,7 +648,7 @@ export async function execCommand(command, commandThis, options = {
|
|
|
648
648
|
throw new SfError(c.red(`[sfdx-hardis][ERROR] Command failed: ${commandResult}`));
|
|
649
649
|
}
|
|
650
650
|
if (commandResult.stderr && commandResult.stderr.length > 2) {
|
|
651
|
-
uxLog(this, '[sfdx-hardis][WARNING] stderr: ' + c.yellow(commandResult.stderr));
|
|
651
|
+
uxLog("other", this, '[sfdx-hardis][WARNING] stderr: ' + c.yellow(commandResult.stderr));
|
|
652
652
|
}
|
|
653
653
|
return parsedResult;
|
|
654
654
|
}
|
|
@@ -690,7 +690,7 @@ export function elapseEnd(text, commandThis = this) {
|
|
|
690
690
|
if (elapseAll[text]) {
|
|
691
691
|
const elapsed = Number(process.hrtime.bigint() - elapseAll[text]);
|
|
692
692
|
const ms = elapsed / 1000000;
|
|
693
|
-
uxLog(commandThis, c.grey(c.italic(text + ' ' + moment().startOf('day').milliseconds(ms).format('H:mm:ss.SSS'))));
|
|
693
|
+
uxLog("log", commandThis, c.grey(c.italic(text + ' ' + moment().startOf('day').milliseconds(ms).format('H:mm:ss.SSS'))));
|
|
694
694
|
delete elapseAll[text];
|
|
695
695
|
}
|
|
696
696
|
}
|
|
@@ -735,7 +735,7 @@ export async function filterPackageXml(packageXmlFile, packageXmlFileOut, option
|
|
|
735
735
|
const manifest = await xml2js.parseStringPromise(initialFileContent);
|
|
736
736
|
// Keep only namespaces
|
|
737
737
|
if ((options.keepOnlyNamespaces || []).length > 0) {
|
|
738
|
-
uxLog(this, c.grey(`Keeping items from namespaces ${options.keepOnlyNamespaces.join(',')} ...`));
|
|
738
|
+
uxLog("log", this, c.grey(`Keeping items from namespaces ${options.keepOnlyNamespaces.join(',')} ...`));
|
|
739
739
|
manifest.Package.types = manifest.Package.types.map((type) => {
|
|
740
740
|
type.members = type.members.filter((member) => {
|
|
741
741
|
const containsNamespace = options.keepOnlyNamespaces.filter((ns) => member.startsWith(ns) || member.includes(`${ns}__`)).length > 0;
|
|
@@ -749,7 +749,7 @@ export async function filterPackageXml(packageXmlFile, packageXmlFileOut, option
|
|
|
749
749
|
}
|
|
750
750
|
// Remove namespaces
|
|
751
751
|
if ((options.removeNamespaces || []).length > 0) {
|
|
752
|
-
uxLog(this, c.grey(`Removing items from namespaces ${options.removeNamespaces.join(',')} ...`));
|
|
752
|
+
uxLog("log", this, c.grey(`Removing items from namespaces ${options.removeNamespaces.join(',')} ...`));
|
|
753
753
|
manifest.Package.types = manifest.Package.types.map((type) => {
|
|
754
754
|
type.members = type.members.filter((member) => {
|
|
755
755
|
const startsWithNamespace = options.removeNamespaces.filter((ns) => member.startsWith(ns)).length > 0;
|
|
@@ -793,7 +793,7 @@ export async function filterPackageXml(packageXmlFile, packageXmlFileOut, option
|
|
|
793
793
|
destructiveType.members[0] === '*');
|
|
794
794
|
});
|
|
795
795
|
if (wildcardDestructiveTypes.length > 0) {
|
|
796
|
-
uxLog(this, c.grey(`Removed ${type.name[0]} type`));
|
|
796
|
+
uxLog("log", this, c.grey(`Removed ${type.name[0]} type`));
|
|
797
797
|
}
|
|
798
798
|
return wildcardDestructiveTypes.length === 0;
|
|
799
799
|
});
|
|
@@ -825,10 +825,10 @@ export async function filterPackageXml(packageXmlFile, packageXmlFileOut, option
|
|
|
825
825
|
// Remove metadata types (named, and empty ones)
|
|
826
826
|
manifest.Package.types = manifest.Package.types.filter((type) => {
|
|
827
827
|
if (options.keepMetadataTypes.includes(type.name[0])) {
|
|
828
|
-
uxLog(this, c.grey('kept ' + type.name[0]));
|
|
828
|
+
uxLog("log", this, c.grey('kept ' + type.name[0]));
|
|
829
829
|
return true;
|
|
830
830
|
}
|
|
831
|
-
uxLog(this, c.grey('removed ' + type.name[0]));
|
|
831
|
+
uxLog("log", this, c.grey('removed ' + type.name[0]));
|
|
832
832
|
return false;
|
|
833
833
|
});
|
|
834
834
|
}
|
|
@@ -898,7 +898,7 @@ export async function catchMatches(catcher, file, fileText, commandThis) {
|
|
|
898
898
|
catcherLabel,
|
|
899
899
|
});
|
|
900
900
|
if (commandThis.debug) {
|
|
901
|
-
uxLog(commandThis, `[${fileName}]: Match [${matches}] occurrences of [${catcher.type}/${catcher.name}] with catcher [${catcherLabel}]`);
|
|
901
|
+
uxLog("other", commandThis, `[${fileName}]: Match [${matches}] occurrences of [${catcher.type}/${catcher.name}] with catcher [${catcherLabel}]`);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
}
|
|
@@ -960,8 +960,8 @@ export function arrayUniqueByKeys(array, keysIn) {
|
|
|
960
960
|
return array.filter((el) => !keys.has(buildKey(el)) && keys.add(buildKey(el)));
|
|
961
961
|
}
|
|
962
962
|
// Generate output files
|
|
963
|
-
export async function generateReports(resultSorted, columns, commandThis, options = { logFileName: null, logLabel: '
|
|
964
|
-
const logLabel = options.logLabel || '
|
|
963
|
+
export async function generateReports(resultSorted, columns, commandThis, options = { logFileName: null, logLabel: 'Report' }) {
|
|
964
|
+
const logLabel = options.logLabel || 'Report';
|
|
965
965
|
let logFileName = options.logFileName || null;
|
|
966
966
|
if (!logFileName) {
|
|
967
967
|
logFileName = 'sfdx-hardis-' + commandThis.id.substr(commandThis.id.lastIndexOf(':') + 1);
|
|
@@ -982,10 +982,10 @@ export async function generateReports(resultSorted, columns, commandThis, option
|
|
|
982
982
|
if (!WebSocketClient.isAliveWithLwcUI()) {
|
|
983
983
|
WebSocketClient.requestOpenFile(reportFile);
|
|
984
984
|
}
|
|
985
|
-
WebSocketClient.sendReportFileMessage(reportFile,
|
|
985
|
+
WebSocketClient.sendReportFileMessage(reportFile, `${logLabel} (CSV)`, "report");
|
|
986
986
|
}
|
|
987
987
|
catch (e) {
|
|
988
|
-
uxLog(commandThis, c.yellow(`[sfdx-hardis] Error opening file in VsCode: ${e.message}`));
|
|
988
|
+
uxLog("warning", commandThis, c.yellow(`[sfdx-hardis] Error opening file in VsCode: ${e.message}`));
|
|
989
989
|
}
|
|
990
990
|
const excel = csvStringify(resultSorted, {
|
|
991
991
|
delimiter: '\t',
|
|
@@ -993,23 +993,25 @@ export async function generateReports(resultSorted, columns, commandThis, option
|
|
|
993
993
|
columns,
|
|
994
994
|
});
|
|
995
995
|
await fs.writeFile(reportFileExcel, excel, 'utf8');
|
|
996
|
-
WebSocketClient.sendReportFileMessage(reportFileExcel,
|
|
997
|
-
uxLog(commandThis, c.cyan(logLabel));
|
|
998
|
-
uxLog(commandThis, c.grey(c.cyan(`- CSV: ${reportFile}`)));
|
|
999
|
-
uxLog(commandThis, c.grey(c.cyan(`- XLS: ${reportFileExcel}`)));
|
|
996
|
+
WebSocketClient.sendReportFileMessage(reportFileExcel, `${logLabel} (CSV)`, "report");
|
|
997
|
+
uxLog("action", commandThis, c.cyan(logLabel));
|
|
998
|
+
uxLog("log", commandThis, c.grey(c.cyan(`- CSV: ${reportFile}`)));
|
|
999
|
+
uxLog("log", commandThis, c.grey(c.cyan(`- XLS: ${reportFileExcel}`)));
|
|
1000
1000
|
return [
|
|
1001
1001
|
{ type: 'csv', file: reportFile },
|
|
1002
1002
|
{ type: 'xls', file: reportFileExcel },
|
|
1003
1003
|
];
|
|
1004
1004
|
}
|
|
1005
|
-
export function uxLog(commandThis, textInit, sensitive = false) {
|
|
1005
|
+
export function uxLog(logType, commandThis, textInit, sensitive = false) {
|
|
1006
1006
|
const text = textInit.includes('[sfdx-hardis]') ? textInit : '[sfdx-hardis]' + (textInit.startsWith('[') ? '' : ' ') + textInit;
|
|
1007
|
+
// Console log
|
|
1007
1008
|
if (commandThis?.ux) {
|
|
1008
1009
|
commandThis.ux.log(text);
|
|
1009
1010
|
}
|
|
1010
1011
|
else if (!(globalThis?.processArgv || process?.argv || "").includes('--json')) {
|
|
1011
1012
|
console.log(text);
|
|
1012
1013
|
}
|
|
1014
|
+
// File log
|
|
1013
1015
|
if (globalThis.hardisLogFileStream) {
|
|
1014
1016
|
if (sensitive) {
|
|
1015
1017
|
globalThis.hardisLogFileStream.write('OBFUSCATED LOG LINE\n');
|
|
@@ -1018,18 +1020,12 @@ export function uxLog(commandThis, textInit, sensitive = false) {
|
|
|
1018
1020
|
globalThis.hardisLogFileStream.write(stripAnsi(text) + '\n');
|
|
1019
1021
|
}
|
|
1020
1022
|
}
|
|
1023
|
+
// VsCode sfdx-hardis log
|
|
1021
1024
|
if (WebSocketClient.isAlive() && !text.includes('[command]') && !text.includes('[NotifProvider]')) {
|
|
1022
1025
|
if (sensitive) {
|
|
1023
1026
|
WebSocketClient.sendCommandLogLineMessage('OBFUSCATED LOG LINE');
|
|
1024
1027
|
}
|
|
1025
1028
|
else {
|
|
1026
|
-
// Get ANSI color codes by extracting characters before the first space
|
|
1027
|
-
const greyAnsi = c.grey(' ').split(' ')[0];
|
|
1028
|
-
const cyanAnsi = c.cyan(' ').split(' ')[0];
|
|
1029
|
-
const yellowAnsi = c.yellow(' ').split(' ')[0];
|
|
1030
|
-
const redAnsi = c.red(' ').split(' ')[0];
|
|
1031
|
-
const greenAnsi = c.green(' ').split(' ')[0];
|
|
1032
|
-
let logType = null;
|
|
1033
1029
|
let isQuestion = false;
|
|
1034
1030
|
let textToSend = textInit;
|
|
1035
1031
|
if (textInit.includes("Look up in VsCode")) {
|
|
@@ -1037,23 +1033,8 @@ export function uxLog(commandThis, textInit, sensitive = false) {
|
|
|
1037
1033
|
textToSend = textInit.split("Look up in VsCode")[0].trim();
|
|
1038
1034
|
isQuestion = true;
|
|
1039
1035
|
}
|
|
1040
|
-
if (textInit.startsWith(greyAnsi)) {
|
|
1041
|
-
logType = 'log';
|
|
1042
|
-
}
|
|
1043
|
-
else if (textInit.startsWith(cyanAnsi)) {
|
|
1044
|
-
logType = 'action';
|
|
1045
|
-
}
|
|
1046
|
-
else if (textInit.startsWith(yellowAnsi)) {
|
|
1047
|
-
logType = 'warning';
|
|
1048
|
-
}
|
|
1049
|
-
else if (textInit.startsWith(redAnsi)) {
|
|
1050
|
-
logType = 'error';
|
|
1051
|
-
}
|
|
1052
|
-
else if (textInit.startsWith(greenAnsi)) {
|
|
1053
|
-
logType = 'success';
|
|
1054
|
-
}
|
|
1055
1036
|
// Send message to WebSocket client
|
|
1056
|
-
if (logType) {
|
|
1037
|
+
if (logType !== "other") {
|
|
1057
1038
|
WebSocketClient.sendCommandLogLineMessage(textToSend, logType, isQuestion);
|
|
1058
1039
|
}
|
|
1059
1040
|
}
|
|
@@ -1101,7 +1082,7 @@ export function uxLogTable(commandThis, tableData, columnsOrder = []) {
|
|
|
1101
1082
|
})
|
|
1102
1083
|
.join(' | '));
|
|
1103
1084
|
const tableString = [header, separator, ...rows].join('\n');
|
|
1104
|
-
uxLog(commandThis, c.italic("\n" + tableString));
|
|
1085
|
+
uxLog("other", commandThis, c.italic("\n" + tableString));
|
|
1105
1086
|
// Send table to WebSocket client
|
|
1106
1087
|
if (WebSocketClient.isAliveWithLwcUI()) {
|
|
1107
1088
|
const maxLen = 20;
|
|
@@ -1135,9 +1116,9 @@ export async function copyLocalSfdxInfo() {
|
|
|
1135
1116
|
dereference: true,
|
|
1136
1117
|
overwrite: true,
|
|
1137
1118
|
});
|
|
1138
|
-
// uxLog(this, `[cache] Copied SF CLI cache in ${TMP_COPY_FOLDER} for later reuse`);
|
|
1119
|
+
// uxLog("other", this, `[cache] Copied SF CLI cache in ${TMP_COPY_FOLDER} for later reuse`);
|
|
1139
1120
|
// const files = fs.readdirSync(TMP_COPY_FOLDER, {withFileTypes: true}).map(item => item.name);
|
|
1140
|
-
// uxLog(this, '[cache]' + JSON.stringify(files));
|
|
1121
|
+
// uxLog("other", this, '[cache]' + JSON.stringify(files));
|
|
1141
1122
|
}
|
|
1142
1123
|
}
|
|
1143
1124
|
// Restore only once local Sfdx folder
|
|
@@ -1150,15 +1131,15 @@ export async function restoreLocalSfdxInfo() {
|
|
|
1150
1131
|
dereference: true,
|
|
1151
1132
|
overwrite: false,
|
|
1152
1133
|
});
|
|
1153
|
-
// uxLog(this, '[cache] Restored cache for CI');
|
|
1134
|
+
// uxLog("other", this, '[cache] Restored cache for CI');
|
|
1154
1135
|
// const files = fs.readdirSync(SFDX_LOCAL_FOLDER, {withFileTypes: true}).map(item => item.name);
|
|
1155
|
-
// uxLog(this, '[cache]' + JSON.stringify(files));
|
|
1136
|
+
// uxLog("other", this, '[cache]' + JSON.stringify(files));
|
|
1156
1137
|
RESTORED = true;
|
|
1157
1138
|
}
|
|
1158
1139
|
}
|
|
1159
1140
|
// Generate SSL certificate in temporary folder and copy the key in project directory
|
|
1160
1141
|
export async function generateSSLCertificate(branchName, folder, commandThis, conn, options) {
|
|
1161
|
-
uxLog(commandThis, c.cyan('Generating SSL certificate...'));
|
|
1142
|
+
uxLog("action", commandThis, c.cyan('Generating SSL certificate...'));
|
|
1162
1143
|
const tmpDir = await createTempDir();
|
|
1163
1144
|
const prevDir = process.cwd();
|
|
1164
1145
|
process.chdir(tmpDir);
|
|
@@ -1190,10 +1171,10 @@ export async function generateSSLCertificate(branchName, folder, commandThis, co
|
|
|
1190
1171
|
description: 'Creates a Connected App required for CI/CD authentication. Choose yes if you are unsure.',
|
|
1191
1172
|
});
|
|
1192
1173
|
if (confirmResponse.value === true) {
|
|
1193
|
-
uxLog(commandThis, c.cyan('Please configure both below variables in your CI/CD platform:'));
|
|
1194
|
-
uxLog(commandThis, c.grey(c.cyanBright(`${c.green(c.bold(`- SFDX_CLIENT_ID_${branchName.toUpperCase()}`))} with value ${c.bold(c.green(consumerKey))}`)), true);
|
|
1195
|
-
uxLog(commandThis, c.grey(c.cyanBright(`${c.green(c.bold(`- SFDX_CLIENT_KEY_${branchName.toUpperCase()}`))} with value ${c.bold(c.green(encryptionKey))}`)), true);
|
|
1196
|
-
uxLog(commandThis, c.grey(c.yellow(`Help to configure CI variables is here: ${CONSTANTS.DOC_URL_ROOT}/salesforce-ci-cd-setup-auth/`)));
|
|
1174
|
+
uxLog("action", commandThis, c.cyan('Please configure both below variables in your CI/CD platform:'));
|
|
1175
|
+
uxLog("log", commandThis, c.grey(c.cyanBright(`${c.green(c.bold(`- SFDX_CLIENT_ID_${branchName.toUpperCase()}`))} with value ${c.bold(c.green(consumerKey))}`)), true);
|
|
1176
|
+
uxLog("log", commandThis, c.grey(c.cyanBright(`${c.green(c.bold(`- SFDX_CLIENT_KEY_${branchName.toUpperCase()}`))} with value ${c.bold(c.green(encryptionKey))}`)), true);
|
|
1177
|
+
uxLog("log", commandThis, c.grey(c.yellow(`Help to configure CI variables is here: ${CONSTANTS.DOC_URL_ROOT}/salesforce-ci-cd-setup-auth/`)));
|
|
1197
1178
|
await prompts({
|
|
1198
1179
|
type: 'confirm',
|
|
1199
1180
|
message: c.cyanBright('Please confirm when variables have been set'),
|
|
@@ -1263,8 +1244,8 @@ export async function generateSSLCertificate(branchName, folder, commandThis, co
|
|
|
1263
1244
|
await fs.writeFile(path.join(connectedAppDir, `${promptResponses.appName}.connectedApp`), connectedAppMetadata);
|
|
1264
1245
|
// Deploy metadatas
|
|
1265
1246
|
try {
|
|
1266
|
-
uxLog(commandThis, c.cyan(`Deploying Connected App ${c.bold(promptResponses.appName)} into target org ${options.targetUsername || ''} ...`));
|
|
1267
|
-
uxLog(commandThis, c.grey(c.yellow(`If you have an upload error, PLEASE READ THE MESSAGE AFTER, that will explain how to manually create the connected app, and don't forget the CERTIFICATE file :)`)));
|
|
1247
|
+
uxLog("action", commandThis, c.cyan(`Deploying Connected App ${c.bold(promptResponses.appName)} into target org ${options.targetUsername || ''} ...`));
|
|
1248
|
+
uxLog("log", commandThis, c.grey(c.yellow(`If you have an upload error, PLEASE READ THE MESSAGE AFTER, that will explain how to manually create the connected app, and don't forget the CERTIFICATE file :)`)));
|
|
1268
1249
|
const isProduction = await isProductionOrg(options.targetUsername || null, { conn: conn });
|
|
1269
1250
|
const deployRes = await deployMetadatas({
|
|
1270
1251
|
deployDir: tmpDirMd,
|
|
@@ -1272,14 +1253,14 @@ export async function generateSSLCertificate(branchName, folder, commandThis, co
|
|
|
1272
1253
|
targetUsername: options.targetUsername ? options.targetUsername : null,
|
|
1273
1254
|
});
|
|
1274
1255
|
console.assert(deployRes.status === 0, c.red('[sfdx-hardis] Failed to deploy metadatas'));
|
|
1275
|
-
uxLog(commandThis, c.cyan(`Successfully deployed ${c.green(promptResponses.appName)} Connected App`));
|
|
1256
|
+
uxLog("action", commandThis, c.cyan(`Successfully deployed ${c.green(promptResponses.appName)} Connected App`));
|
|
1276
1257
|
await fs.remove(tmpDirMd);
|
|
1277
1258
|
await fs.remove(crtFile);
|
|
1278
1259
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1279
1260
|
}
|
|
1280
1261
|
catch (e) {
|
|
1281
|
-
uxLog(commandThis, c.red('Error pushing ConnectedApp metadata. Maybe the app name is already taken ?\nYou may try again with another connected app name'));
|
|
1282
|
-
uxLog(commandThis, c.yellow(`
|
|
1262
|
+
uxLog("error", commandThis, c.red('Error pushing ConnectedApp metadata. Maybe the app name is already taken ?\nYou may try again with another connected app name'));
|
|
1263
|
+
uxLog("warning", commandThis, c.yellow(`
|
|
1283
1264
|
${c.bold('MANUAL INSTRUCTIONS')}
|
|
1284
1265
|
If this is a Test class issue (production env), you may have to create manually connected app ${promptResponses.appName}:
|
|
1285
1266
|
- Follow instructions here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connected_app.htm
|
|
@@ -1294,11 +1275,11 @@ If this is a Test class issue (production env), you may have to create manually
|
|
|
1294
1275
|
}
|
|
1295
1276
|
else {
|
|
1296
1277
|
// Tell infos to install manually
|
|
1297
|
-
uxLog(commandThis, c.cyan('Now you can configure the SF CLI connected app'));
|
|
1298
|
-
uxLog(commandThis, c.grey(`Follow instructions here: ${c.bold('https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connected_app.htm')}`));
|
|
1299
|
-
uxLog(commandThis, c.grey(`Use ${c.green(crtFile)} as certificate on Connected App configuration page, ${c.bold(`then delete ${crtFile} for security`)}`));
|
|
1300
|
-
uxLog(commandThis, c.grey(`- configure CI variable ${c.green(`SFDX_CLIENT_ID_${branchName.toUpperCase()}`)} with value of ConsumerKey on Connected App configuration page`));
|
|
1301
|
-
uxLog(commandThis, c.grey(`- configure CI variable ${c.green(`SFDX_CLIENT_KEY_${branchName.toUpperCase()}`)} with value ${c.green(encryptionKey)} key`));
|
|
1278
|
+
uxLog("action", commandThis, c.cyan('Now you can configure the SF CLI connected app'));
|
|
1279
|
+
uxLog("log", commandThis, c.grey(`Follow instructions here: ${c.bold('https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connected_app.htm')}`));
|
|
1280
|
+
uxLog("log", commandThis, c.grey(`Use ${c.green(crtFile)} as certificate on Connected App configuration page, ${c.bold(`then delete ${crtFile} for security`)}`));
|
|
1281
|
+
uxLog("log", commandThis, c.grey(`- configure CI variable ${c.green(`SFDX_CLIENT_ID_${branchName.toUpperCase()}`)} with value of ConsumerKey on Connected App configuration page`));
|
|
1282
|
+
uxLog("log", commandThis, c.grey(`- configure CI variable ${c.green(`SFDX_CLIENT_KEY_${branchName.toUpperCase()}`)} with value ${c.green(encryptionKey)} key`));
|
|
1302
1283
|
}
|
|
1303
1284
|
}
|
|
1304
1285
|
export async function isMonitoringJob() {
|
|
@@ -1324,7 +1305,7 @@ const ansiPattern = [
|
|
|
1324
1305
|
const ansiRegex = new RegExp(ansiPattern, 'g');
|
|
1325
1306
|
export function stripAnsi(str) {
|
|
1326
1307
|
if (typeof str !== 'string') {
|
|
1327
|
-
uxLog(this, c.yellow('Warning: stripAnsi expects a string'));
|
|
1308
|
+
uxLog("warning", this, c.yellow('Warning: stripAnsi expects a string'));
|
|
1328
1309
|
return '';
|
|
1329
1310
|
}
|
|
1330
1311
|
return str.replace(ansiRegex, '');
|
|
@@ -1353,11 +1334,11 @@ export function replaceJsonInString(inputString, jsonObject) {
|
|
|
1353
1334
|
return stripAnsi(inputString).replace(jsonMatch[0], jsonString);
|
|
1354
1335
|
}
|
|
1355
1336
|
catch (err) {
|
|
1356
|
-
uxLog(this, c.yellow('Warning: unable to replace JSON in string:' + err.message));
|
|
1337
|
+
uxLog("warning", this, c.yellow('Warning: unable to replace JSON in string:' + err.message));
|
|
1357
1338
|
return inputString;
|
|
1358
1339
|
}
|
|
1359
1340
|
}
|
|
1360
|
-
uxLog(this, c.yellow('Warning: unable to find json to replace in string'));
|
|
1341
|
+
uxLog("warning", this, c.yellow('Warning: unable to find json to replace in string'));
|
|
1361
1342
|
return inputString;
|
|
1362
1343
|
}
|
|
1363
1344
|
// Ugly hack but no choice
|