From 7ce0c2cbf38d56aec5adee8e48b160d6b283f7a7 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Mon, 10 Jul 2023 09:36:55 -0600 Subject: [PATCH 1/2] fix: deploy validate doesn\'t require a project --- src/commands/project/deploy/validate.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/commands/project/deploy/validate.ts b/src/commands/project/deploy/validate.ts index c810a903..eb7dcf72 100644 --- a/src/commands/project/deploy/validate.ts +++ b/src/commands/project/deploy/validate.ts @@ -31,7 +31,6 @@ export default class DeployMetadataValidate extends SfCommand public static readonly description = messages.getMessage('description'); public static readonly summary = messages.getMessage('summary'); public static readonly examples = messages.getMessages('examples'); - public static readonly requiresProject = true; public static readonly aliases = ['deploy:metadata:validate']; public static readonly deprecateAliases = true; From 3023081da574c86ce624adef59edf460d38413a5 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Mon, 10 Jul 2023 15:47:07 -0600 Subject: [PATCH 2/2] chore: allow metadata dir operations in more commands --- src/commands/project/deploy/quick.ts | 1 - src/commands/project/deploy/report.ts | 1 - src/commands/project/deploy/resume.ts | 13 +++++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/commands/project/deploy/quick.ts b/src/commands/project/deploy/quick.ts index ffb3e2d6..9fa690ed 100644 --- a/src/commands/project/deploy/quick.ts +++ b/src/commands/project/deploy/quick.ts @@ -24,7 +24,6 @@ export default class DeployMetadataQuick extends SfCommand { public static readonly description = messages.getMessage('description'); public static readonly summary = messages.getMessage('summary'); public static readonly examples = messages.getMessages('examples'); - public static readonly requiresProject = true; public static readonly aliases = ['deploy:metadata:quick']; public static readonly deprecateAliases = true; diff --git a/src/commands/project/deploy/report.ts b/src/commands/project/deploy/report.ts index 7fb09d69..008150d6 100644 --- a/src/commands/project/deploy/report.ts +++ b/src/commands/project/deploy/report.ts @@ -23,7 +23,6 @@ export default class DeployMetadataReport extends SfCommand { public static readonly description = messages.getMessage('description'); public static readonly summary = messages.getMessage('summary'); public static readonly examples = messages.getMessages('examples'); - public static readonly requiresProject = true; public static readonly aliases = ['deploy:metadata:report']; public static readonly deprecateAliases = true; diff --git a/src/commands/project/deploy/resume.ts b/src/commands/project/deploy/resume.ts index 8fa04a86..6078a275 100644 --- a/src/commands/project/deploy/resume.ts +++ b/src/commands/project/deploy/resume.ts @@ -26,7 +26,6 @@ export default class DeployMetadataResume extends SfCommand { public static readonly description = messages.getMessage('description'); public static readonly summary = messages.getMessage('summary'); public static readonly examples = messages.getMessages('examples'); - public static readonly requiresProject = true; public static readonly aliases = ['deploy:metadata:resume']; public static readonly deprecateAliases = true; @@ -93,7 +92,17 @@ export default class DeployMetadataResume extends SfCommand { const wait = flags.wait ?? Duration.minutes(deployOpts.wait); const { deploy } = await executeDeploy( // there will always be conflicts on a resume if anything deployed--the changes on the server are not synced to local - { ...deployOpts, wait, 'dry-run': false, 'ignore-conflicts': true }, + { + ...deployOpts, + wait, + 'dry-run': false, + 'ignore-conflicts': true, + // TODO: isMdapi is generated from 'metadata-dir' flag, but we don't have that flag here + // change the cache value to actually cache the metadata-dir, and if there's a value, it isMdapi + // deployCache~L38, so to tell the executeDeploy method it's ok to not have a project, we spoof a metadata-dir + // in deploy~L140, it checks the if the id is present, so this metadata-dir value is never _really_ used + 'metadata-dir': deployOpts.isMdapi ? { type: 'file', path: 'testing' } : undefined, + }, this.config.bin, this.project, jobId