diff --git a/messages/deploy.json b/messages/deploy.json index 03db94d91..8d7f9118a 100644 --- a/messages/deploy.json +++ b/messages/deploy.json @@ -78,7 +78,7 @@ "deployCanceled": "The deployment has been canceled by %s.", "deployFailed": "Deploy failed.", "asyncDeployQueued": "Deploy has been queued.", - "asyncDeployCancel": "Run sfdx force:source:deploy:cancel -i %s to cancel the deploy.", - "asyncDeployReport": "Run sfdx force:source:deploy:report -i %s to get the latest status.", + "asyncDeployCancel": "Run sfdx force:source:deploy:cancel -i %s -u %s to cancel the deploy.", + "asyncDeployReport": "Run sfdx force:source:deploy:report -i %s -u %s to get the latest status.", "invalidDeployId": "The provided ID is invalid, deploy IDs must start with '0Af'." } diff --git a/messages/md.deploy.json b/messages/md.deploy.json index ed8dfab88..4c9c2c155 100644 --- a/messages/md.deploy.json +++ b/messages/md.deploy.json @@ -43,5 +43,8 @@ "soapDeploy": "Deploy metadata with SOAP API instead of the default REST API. Because SOAP API has a lower .ZIP file size limit (400 MB uncompressed, 39 MB compressed), Salesforce recommends REST API deployment. This flag provides backwards compatibility with API version 50.0 and earlier when deploy used SOAP API by default." }, "noRestDeploy": "REST deploy is not available for this org. This feature is currently for internal Salesforce use only.", - "deployFailed": "The metadata deploy operation failed." + "deployFailed": "The metadata deploy operation failed.", + "asyncDeployQueued": "Deploy has been queued.", + "asyncDeployCancel": "Run sfdx force:mdapi:deploy:cancel -i %s -u %s to cancel the deploy.", + "asyncDeployReport": "Run sfdx force:mdapi:beta:deploy:report -i %s -u %s to get the latest status." } diff --git a/src/commands/force/mdapi/beta/deploy.ts b/src/commands/force/mdapi/beta/deploy.ts index f232e6dd8..0d19dea4b 100644 --- a/src/commands/force/mdapi/beta/deploy.ts +++ b/src/commands/force/mdapi/beta/deploy.ts @@ -10,14 +10,12 @@ import { Duration, env } from '@salesforce/kit'; import { Messages } from '@salesforce/core'; import { MetadataApiDeploy } from '@salesforce/source-deploy-retrieve'; import { DeployCommand, getVersionMessage, TestLevel } from '../../../../deployCommand'; -import { - DeployAsyncResultFormatter, - DeployCommandAsyncResult, -} from '../../../../formatters/deployAsyncResultFormatter'; -import { MdDeployResultFormatter, MdDeployResult } from '../../../../formatters/mdDeployResultFormatter'; +import { DeployCommandAsyncResult } from '../../../../formatters/source/deployAsyncResultFormatter'; +import { MdDeployResult, MdDeployResultFormatter } from '../../../../formatters/mdapi/mdDeployResultFormatter'; import { ProgressFormatter } from '../../../../formatters/progressFormatter'; import { DeployProgressBarFormatter } from '../../../../formatters/deployProgressBarFormatter'; import { DeployProgressStatusFormatter } from '../../../../formatters/deployProgressStatusFormatter'; +import { MdDeployAsyncResultFormatter } from '../../../../formatters/mdapi/mdDeployAsyncResultFormatter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deploy'); @@ -154,9 +152,10 @@ export class Deploy extends DeployCommand { protected formatResult(): MdDeployResult | DeployCommandAsyncResult { const formatterOptions = { verbose: this.getFlag('verbose', false), + username: this.org.getUsername(), }; const formatter = this.isAsync - ? new DeployAsyncResultFormatter(this.logger, this.ux, formatterOptions, this.asyncDeployResult) + ? new MdDeployAsyncResultFormatter(this.logger, this.ux, formatterOptions, this.asyncDeployResult) : new MdDeployResultFormatter(this.logger, this.ux, formatterOptions, this.deployResult); // Only display results to console when JSON flag is unset. diff --git a/src/commands/force/mdapi/beta/deploy/report.ts b/src/commands/force/mdapi/beta/deploy/report.ts index d8c72bd98..a412072b9 100644 --- a/src/commands/force/mdapi/beta/deploy/report.ts +++ b/src/commands/force/mdapi/beta/deploy/report.ts @@ -10,7 +10,7 @@ import { flags, FlagsConfig } from '@salesforce/command'; import { Duration, env } from '@salesforce/kit'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { MdDeployResult, MdDeployResultFormatter } from '../../../../../formatters/mdDeployResultFormatter'; +import { MdDeployResult, MdDeployResultFormatter } from '../../../../../formatters/mdapi/mdDeployResultFormatter'; import { DeployCommand } from '../../../../../deployCommand'; import { ProgressFormatter } from '../../../../../formatters/progressFormatter'; import { DeployProgressBarFormatter } from '../../../../../formatters/deployProgressBarFormatter'; diff --git a/src/commands/force/source/beta/pull.ts b/src/commands/force/source/beta/pull.ts index b5a1f9789..427fc3cc6 100644 --- a/src/commands/force/source/beta/pull.ts +++ b/src/commands/force/source/beta/pull.ts @@ -19,7 +19,7 @@ import { import { ChangeResult, replaceRenamedCommands, SourceTracking, throwIfInvalid } from '@salesforce/source-tracking'; import { processConflicts } from '../../../../formatters/conflicts'; import { SourceCommand } from '../../../../sourceCommand'; -import { PullResponse, PullResultFormatter } from '../../../../formatters/pullFormatter'; +import { PullResponse, PullResultFormatter } from '../../../../formatters/source/pullFormatter'; Messages.importMessagesDirectory(__dirname); const messages: Messages = Messages.loadMessages('@salesforce/plugin-source', 'pull'); diff --git a/src/commands/force/source/beta/push.ts b/src/commands/force/source/beta/push.ts index 01a9a610b..102e7b90e 100644 --- a/src/commands/force/source/beta/push.ts +++ b/src/commands/force/source/beta/push.ts @@ -13,7 +13,7 @@ import { ComponentStatus, DeployResult, RequestStatus } from '@salesforce/source import { replaceRenamedCommands, SourceTracking, throwIfInvalid } from '@salesforce/source-tracking'; import { getBoolean } from '@salesforce/ts-types'; import { DeployCommand, getVersionMessage } from '../../../../deployCommand'; -import { PushResponse, PushResultFormatter } from '../../../../formatters/pushResultFormatter'; +import { PushResponse, PushResultFormatter } from '../../../../formatters/source/pushResultFormatter'; import { ProgressFormatter } from '../../../../formatters/progressFormatter'; import { DeployProgressBarFormatter } from '../../../../formatters/deployProgressBarFormatter'; import { DeployProgressStatusFormatter } from '../../../../formatters/deployProgressStatusFormatter'; diff --git a/src/commands/force/source/beta/status.ts b/src/commands/force/source/beta/status.ts index b1a7a170f..b4687c4dc 100644 --- a/src/commands/force/source/beta/status.ts +++ b/src/commands/force/source/beta/status.ts @@ -6,16 +6,16 @@ */ import * as os from 'os'; -import { FlagsConfig, flags, SfdxCommand } from '@salesforce/command'; +import { flags, FlagsConfig, SfdxCommand } from '@salesforce/command'; import { Messages } from '@salesforce/core'; import { - SourceTracking, - throwIfInvalid, - replaceRenamedCommands, ChangeResult, + replaceRenamedCommands, + SourceTracking, StatusOutputRow, + throwIfInvalid, } from '@salesforce/source-tracking'; -import { StatusResult, StatusFormatter } from '../../../../formatters/statusFormatter'; +import { StatusFormatter, StatusResult } from '../../../../formatters/source/statusFormatter'; Messages.importMessagesDirectory(__dirname); const messages: Messages = Messages.loadMessages('@salesforce/plugin-source', 'status'); diff --git a/src/commands/force/source/delete.ts b/src/commands/force/source/delete.ts index 3450037e9..e7b2efbe0 100644 --- a/src/commands/force/source/delete.ts +++ b/src/commands/force/source/delete.ts @@ -23,7 +23,7 @@ import { Duration, env } from '@salesforce/kit'; import { DeployCommand, TestLevel } from '../../../deployCommand'; import { ComponentSetBuilder } from '../../../componentSetBuilder'; import { DeployCommandResult, DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { DeleteResultFormatter } from '../../../formatters/deleteResultFormatter'; +import { DeleteResultFormatter } from '../../../formatters/source/deleteResultFormatter'; import { ProgressFormatter } from '../../../formatters/progressFormatter'; import { DeployProgressBarFormatter } from '../../../formatters/deployProgressBarFormatter'; import { DeployProgressStatusFormatter } from '../../../formatters/deployProgressStatusFormatter'; diff --git a/src/commands/force/source/deploy.ts b/src/commands/force/source/deploy.ts index 8e39984d7..f3fc6fc7a 100644 --- a/src/commands/force/source/deploy.ts +++ b/src/commands/force/source/deploy.ts @@ -11,7 +11,10 @@ import { Duration, env } from '@salesforce/kit'; import { DeployCommand, getVersionMessage, TestLevel } from '../../../deployCommand'; import { ComponentSetBuilder } from '../../../componentSetBuilder'; import { DeployCommandResult, DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { DeployAsyncResultFormatter, DeployCommandAsyncResult } from '../../../formatters/deployAsyncResultFormatter'; +import { + DeployAsyncResultFormatter, + DeployCommandAsyncResult, +} from '../../../formatters/source/deployAsyncResultFormatter'; import { ProgressFormatter } from '../../../formatters/progressFormatter'; import { DeployProgressBarFormatter } from '../../../formatters/deployProgressBarFormatter'; import { DeployProgressStatusFormatter } from '../../../formatters/deployProgressStatusFormatter'; @@ -179,6 +182,7 @@ export class Deploy extends DeployCommand { protected formatResult(): DeployCommandResult | DeployCommandAsyncResult { const formatterOptions = { verbose: this.getFlag('verbose', false), + username: this.org.getUsername(), }; const formatter = this.isAsync diff --git a/src/commands/force/source/open.ts b/src/commands/force/source/open.ts index 1f3e2e278..2fec7a475 100644 --- a/src/commands/force/source/open.ts +++ b/src/commands/force/source/open.ts @@ -11,9 +11,9 @@ import * as fs from 'fs'; import * as open from 'open'; import { getString } from '@salesforce/ts-types'; import { flags, FlagsConfig } from '@salesforce/command'; -import { Messages, sfdc, SfdxError, AuthInfo, SfdcUrl } from '@salesforce/core'; -import { SourceComponent, MetadataResolver } from '@salesforce/source-deploy-retrieve'; -import { OpenResultFormatter, OpenCommandResult } from '../../../formatters/openResultFormatter'; +import { AuthInfo, Messages, sfdc, SfdcUrl, SfdxError } from '@salesforce/core'; +import { MetadataResolver, SourceComponent } from '@salesforce/source-deploy-retrieve'; +import { OpenCommandResult, OpenResultFormatter } from '../../../formatters/source/openResultFormatter'; import { SourceCommand } from '../../../sourceCommand'; Messages.importMessagesDirectory(__dirname); diff --git a/src/formatters/mdapi/mdDeployAsyncResultFormatter.ts b/src/formatters/mdapi/mdDeployAsyncResultFormatter.ts new file mode 100644 index 000000000..983b4852c --- /dev/null +++ b/src/formatters/mdapi/mdDeployAsyncResultFormatter.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ + +import { EOL } from 'os'; +import { UX } from '@salesforce/command'; +import { Logger, Messages } from '@salesforce/core'; +import { AsyncResult } from '@salesforce/source-deploy-retrieve'; +import { ResultFormatterOptions } from '../resultFormatter'; +import { DeployAsyncResultFormatter } from '../source/deployAsyncResultFormatter'; + +Messages.importMessagesDirectory(__dirname); +const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deploy'); + +export class MdDeployAsyncResultFormatter extends DeployAsyncResultFormatter { + protected result: AsyncResult; + + public constructor(logger: Logger, ux: UX, options: ResultFormatterOptions, result: AsyncResult) { + super(logger, ux, options, result); + this.result = result; + } + + /** + * Displays async deploy results in human format. + */ + public display(): void { + this.ux.log(messages.getMessage('asyncDeployQueued'), EOL); + this.ux.log(messages.getMessage('asyncDeployCancel', [this.result.id, this.options.username])); + this.ux.log(messages.getMessage('asyncDeployReport', [this.result.id, this.options.username])); + } +} diff --git a/src/formatters/mdDeployResultFormatter.ts b/src/formatters/mdapi/mdDeployResultFormatter.ts similarity index 99% rename from src/formatters/mdDeployResultFormatter.ts rename to src/formatters/mdapi/mdDeployResultFormatter.ts index 42adba453..0b16e66fe 100644 --- a/src/formatters/mdDeployResultFormatter.ts +++ b/src/formatters/mdapi/mdDeployResultFormatter.ts @@ -16,7 +16,7 @@ import { MetadataApiDeployStatus, RequestStatus, } from '@salesforce/source-deploy-retrieve'; -import { ResultFormatter, ResultFormatterOptions, toArray } from './resultFormatter'; +import { ResultFormatter, ResultFormatterOptions, toArray } from '../resultFormatter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deploy'); diff --git a/src/formatters/resultFormatter.ts b/src/formatters/resultFormatter.ts index a9714e3bf..e0b894f4e 100644 --- a/src/formatters/resultFormatter.ts +++ b/src/formatters/resultFormatter.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { UX } from '@salesforce/command'; import { Logger } from '@salesforce/core'; -import { FileResponse, FileProperties, Failures, Successes } from '@salesforce/source-deploy-retrieve'; +import { Failures, FileProperties, FileResponse, Successes } from '@salesforce/source-deploy-retrieve'; import { getNumber } from '@salesforce/ts-types'; export interface ResultFormatterOptions { @@ -16,6 +16,7 @@ export interface ResultFormatterOptions { quiet?: boolean; waitTime?: number; concise?: boolean; + username?: string; } export function toArray(entryOrArray: T | T[] | undefined): T[] { diff --git a/src/formatters/deleteResultFormatter.ts b/src/formatters/source/deleteResultFormatter.ts similarity index 94% rename from src/formatters/deleteResultFormatter.ts rename to src/formatters/source/deleteResultFormatter.ts index b18ef7006..8f67397b3 100644 --- a/src/formatters/deleteResultFormatter.ts +++ b/src/formatters/source/deleteResultFormatter.ts @@ -8,8 +8,8 @@ import { DeployMessage, DeployResult, FileResponse } from '@salesforce/source-de import { UX } from '@salesforce/command'; import { Logger } from '@salesforce/core'; import * as chalk from 'chalk'; -import { DeployCommandResult, DeployResultFormatter } from './deployResultFormatter'; -import { ResultFormatterOptions, toArray } from './resultFormatter'; +import { DeployCommandResult, DeployResultFormatter } from '../deployResultFormatter'; +import { ResultFormatterOptions, toArray } from '../resultFormatter'; export class DeleteResultFormatter extends DeployResultFormatter { public constructor(logger: Logger, ux: UX, options: ResultFormatterOptions, result?: DeployResult) { diff --git a/src/formatters/deployAsyncResultFormatter.ts b/src/formatters/source/deployAsyncResultFormatter.ts similarity index 93% rename from src/formatters/deployAsyncResultFormatter.ts rename to src/formatters/source/deployAsyncResultFormatter.ts index f85b63804..008fa3a1a 100644 --- a/src/formatters/deployAsyncResultFormatter.ts +++ b/src/formatters/source/deployAsyncResultFormatter.ts @@ -10,7 +10,7 @@ import { UX } from '@salesforce/command'; import { Logger, Messages } from '@salesforce/core'; import { cloneJson } from '@salesforce/kit'; import { AsyncResult } from '@salesforce/source-deploy-retrieve'; -import { ResultFormatter, ResultFormatterOptions } from './resultFormatter'; +import { ResultFormatter, ResultFormatterOptions } from '../resultFormatter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-source', 'deploy'); @@ -63,7 +63,7 @@ export class DeployAsyncResultFormatter extends ResultFormatter { */ public display(): void { this.ux.log(messages.getMessage('asyncDeployQueued'), EOL); - this.ux.log(messages.getMessage('asyncDeployCancel', [this.result.id])); - this.ux.log(messages.getMessage('asyncDeployReport', [this.result.id])); + this.ux.log(messages.getMessage('asyncDeployCancel', [this.result.id, this.options.username])); + this.ux.log(messages.getMessage('asyncDeployReport', [this.result.id, this.options.username])); } } diff --git a/src/formatters/openResultFormatter.ts b/src/formatters/source/openResultFormatter.ts similarity index 95% rename from src/formatters/openResultFormatter.ts rename to src/formatters/source/openResultFormatter.ts index ffd601a59..f9f38d08d 100644 --- a/src/formatters/openResultFormatter.ts +++ b/src/formatters/source/openResultFormatter.ts @@ -7,7 +7,7 @@ import { UX } from '@salesforce/command'; import { Logger, Messages, SfdxError } from '@salesforce/core'; -import { ResultFormatter } from './resultFormatter'; +import { ResultFormatter } from '../resultFormatter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-source', 'open'); diff --git a/src/formatters/pullFormatter.ts b/src/formatters/source/pullFormatter.ts similarity index 98% rename from src/formatters/pullFormatter.ts rename to src/formatters/source/pullFormatter.ts index 7d7b6cad7..a78d2f1d7 100644 --- a/src/formatters/pullFormatter.ts +++ b/src/formatters/source/pullFormatter.ts @@ -8,15 +8,15 @@ import { blue, yellow } from 'chalk'; import { UX } from '@salesforce/command'; import { Logger, Messages, SfdxError } from '@salesforce/core'; -import { get, getString, getNumber } from '@salesforce/ts-types'; +import { get, getNumber, getString } from '@salesforce/ts-types'; import { - RetrieveResult, ComponentStatus, FileResponse, RequestStatus, RetrieveMessage, + RetrieveResult, } from '@salesforce/source-deploy-retrieve'; -import { ResultFormatter, ResultFormatterOptions, toArray } from './resultFormatter'; +import { ResultFormatter, ResultFormatterOptions, toArray } from '../resultFormatter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-source', 'pull'); diff --git a/src/formatters/pushResultFormatter.ts b/src/formatters/source/pushResultFormatter.ts similarity index 99% rename from src/formatters/pushResultFormatter.ts rename to src/formatters/source/pushResultFormatter.ts index f96c77b51..cb5f151a2 100644 --- a/src/formatters/pushResultFormatter.ts +++ b/src/formatters/source/pushResultFormatter.ts @@ -9,16 +9,16 @@ import * as chalk from 'chalk'; import { UX } from '@salesforce/command'; import { Logger, Messages, SfdxError } from '@salesforce/core'; import { + ComponentStatus, + DeployMessage, DeployResult, FileResponse, - DeployMessage, - ComponentStatus, MetadataResolver, - VirtualTreeContainer, SourceComponent, + VirtualTreeContainer, } from '@salesforce/source-deploy-retrieve'; import { isString } from '@salesforce/ts-types'; -import { ResultFormatter, ResultFormatterOptions, toArray } from './resultFormatter'; +import { ResultFormatter, ResultFormatterOptions, toArray } from '../resultFormatter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-source', 'push'); diff --git a/src/formatters/statusFormatter.ts b/src/formatters/source/statusFormatter.ts similarity index 96% rename from src/formatters/statusFormatter.ts rename to src/formatters/source/statusFormatter.ts index a988ee718..44acbd9a0 100644 --- a/src/formatters/statusFormatter.ts +++ b/src/formatters/source/statusFormatter.ts @@ -6,7 +6,7 @@ */ import { UX } from '@salesforce/command'; import { Logger, Messages } from '@salesforce/core'; -import { ResultFormatter, ResultFormatterOptions } from './resultFormatter'; +import { ResultFormatter, ResultFormatterOptions } from '../resultFormatter'; Messages.importMessagesDirectory(__dirname); const messages: Messages = Messages.loadMessages('@salesforce/plugin-source', 'status'); diff --git a/test/commands/source/deploy.test.ts b/test/commands/source/deploy.test.ts index 87c805331..6e4e8a9a1 100644 --- a/test/commands/source/deploy.test.ts +++ b/test/commands/source/deploy.test.ts @@ -18,7 +18,7 @@ import { DeployCommandResult, DeployResultFormatter } from '../../../src/formatt import { DeployAsyncResultFormatter, DeployCommandAsyncResult, -} from '../../../src/formatters/deployAsyncResultFormatter'; +} from '../../../src/formatters/source/deployAsyncResultFormatter'; import { ComponentSetBuilder, ComponentSetOptions } from '../../../src/componentSetBuilder'; import { DeployProgressBarFormatter } from '../../../src/formatters/deployProgressBarFormatter'; import { DeployProgressStatusFormatter } from '../../../src/formatters/deployProgressStatusFormatter'; diff --git a/test/commands/source/open.test.ts b/test/commands/source/open.test.ts index 57d47d1fa..35806f103 100644 --- a/test/commands/source/open.test.ts +++ b/test/commands/source/open.test.ts @@ -9,12 +9,12 @@ import * as fs from 'fs'; import { join } from 'path'; import * as sinon from 'sinon'; import { expect } from 'chai'; -import { SourceComponent, MetadataResolver } from '@salesforce/source-deploy-retrieve'; +import { MetadataResolver, SourceComponent } from '@salesforce/source-deploy-retrieve'; import { fromStub, stubInterface, stubMethod } from '@salesforce/ts-sinon'; import { IConfig } from '@oclif/config'; -import { AuthInfo, SfdxProject, Org, MyDomainResolver } from '@salesforce/core'; +import { AuthInfo, MyDomainResolver, Org, SfdxProject } from '@salesforce/core'; import { Open } from '../../../src/commands/force/source/open'; -import { OpenCommandResult } from '../../../src/formatters/openResultFormatter'; +import { OpenCommandResult } from '../../../src/formatters/source/openResultFormatter'; describe('force:source:open', () => { const sandbox = sinon.createSandbox(); diff --git a/test/formatters/mdDeployResultFormatter.test.ts b/test/formatters/mdDeployResultFormatter.test.ts index f621fc3f9..3e1d887ff 100644 --- a/test/formatters/mdDeployResultFormatter.test.ts +++ b/test/formatters/mdDeployResultFormatter.test.ts @@ -11,7 +11,7 @@ import { Logger } from '@salesforce/core'; import { UX } from '@salesforce/command'; import { stubInterface } from '@salesforce/ts-sinon'; import { getDeployResult } from '../commands/source/deployResponses'; -import { MdDeployResultFormatter } from '../../src/formatters/mdDeployResultFormatter'; +import { MdDeployResultFormatter } from '../../src/formatters/mdapi/mdDeployResultFormatter'; describe('mdDeployResultFormatter', () => { const sandbox = sinon.createSandbox(); diff --git a/test/formatters/pushResultFormatter.test.ts b/test/formatters/pushResultFormatter.test.ts index 916a82618..385e5a796 100644 --- a/test/formatters/pushResultFormatter.test.ts +++ b/test/formatters/pushResultFormatter.test.ts @@ -10,7 +10,7 @@ import { UX } from '@salesforce/command'; import * as sinon from 'sinon'; import { stubInterface } from '@salesforce/ts-sinon'; import { getDeployResult } from '../commands/source/deployResponses'; -import { PushResultFormatter } from '../../src/formatters/pushResultFormatter'; +import { PushResultFormatter } from '../../src/formatters/source/pushResultFormatter'; describe('PushResultFormatter', () => { const logger = Logger.childFromRoot('deployTestLogger').useMemoryLogging(); diff --git a/test/formatters/statusResultFormatter.test.ts b/test/formatters/statusResultFormatter.test.ts index ff7f8648e..774f2b78e 100644 --- a/test/formatters/statusResultFormatter.test.ts +++ b/test/formatters/statusResultFormatter.test.ts @@ -9,7 +9,7 @@ import { UX } from '@salesforce/command'; import { stubInterface } from '@salesforce/ts-sinon'; import { expect } from 'chai'; import * as sinon from 'sinon'; -import { StatusResult, StatusFormatter } from '../../src/formatters/statusFormatter'; +import { StatusFormatter, StatusResult } from '../../src/formatters/source/statusFormatter'; const fakeResult: StatusResult[] = [ { diff --git a/test/nuts/mdapi.nut.ts b/test/nuts/mdapi.nut.ts index 9b12b8658..7421285d4 100644 --- a/test/nuts/mdapi.nut.ts +++ b/test/nuts/mdapi.nut.ts @@ -9,14 +9,14 @@ import * as fs from 'fs'; import * as path from 'path'; import { exec } from 'shelljs'; import { expect } from 'chai'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { ComponentSet, SourceComponent } from '@salesforce/source-deploy-retrieve'; import { DescribeMetadataResult } from 'jsforce'; import { create as createArchive } from 'archiver'; import { RetrieveCommandAsyncResult, RetrieveCommandResult } from 'src/formatters/mdapi/retrieveResultFormatter'; import { ConvertCommandResult } from '../../src/formatters/mdapi/convertResultFormatter'; import { DeployCancelCommandResult } from '../../src/formatters/deployCancelResultFormatter'; -import { MdDeployResult } from '../../src/formatters/mdDeployResultFormatter'; +import { MdDeployResult } from '../../src/formatters/mdapi/mdDeployResultFormatter'; let session: TestSession; diff --git a/test/nuts/trackingCommands/basics.nut.ts b/test/nuts/trackingCommands/basics.nut.ts index 520bf24b6..6641f92dd 100644 --- a/test/nuts/trackingCommands/basics.nut.ts +++ b/test/nuts/trackingCommands/basics.nut.ts @@ -9,12 +9,12 @@ import * as path from 'path'; import * as fs from 'fs'; import { expect } from 'chai'; import * as shelljs from 'shelljs'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; -import { StatusResult } from '../../../src/formatters/statusFormatter'; -import { PullResponse } from '../../../src/formatters/pullFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; +import { StatusResult } from '../../../src/formatters/source/statusFormatter'; +import { PullResponse } from '../../../src/formatters/source/pullFormatter'; let session: TestSession; describe('end-to-end-test for tracking with an org (single packageDir)', () => { diff --git a/test/nuts/trackingCommands/conflicts.nut.ts b/test/nuts/trackingCommands/conflicts.nut.ts index 75f86ae25..7b66464e5 100644 --- a/test/nuts/trackingCommands/conflicts.nut.ts +++ b/test/nuts/trackingCommands/conflicts.nut.ts @@ -12,13 +12,13 @@ import * as path from 'path'; import * as fs from 'fs'; import { expect } from 'chai'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; -import { Connection, AuthInfo } from '@salesforce/core'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; +import { AuthInfo, Connection } from '@salesforce/core'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; -import { StatusResult } from '../../../src/formatters/statusFormatter'; -import { PullResponse } from '../../../src/formatters/pullFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; +import { StatusResult } from '../../../src/formatters/source/statusFormatter'; +import { PullResponse } from '../../../src/formatters/source/pullFormatter'; let session: TestSession; describe('conflict detection and resolution', () => { diff --git a/test/nuts/trackingCommands/forceIgnore.nut.ts b/test/nuts/trackingCommands/forceIgnore.nut.ts index 16bd3a66d..be8eedd61 100644 --- a/test/nuts/trackingCommands/forceIgnore.nut.ts +++ b/test/nuts/trackingCommands/forceIgnore.nut.ts @@ -14,13 +14,13 @@ import * as fs from 'fs'; import { expect } from 'chai'; import * as shell from 'shelljs'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; -import { Connection, AuthInfo } from '@salesforce/core'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; +import { AuthInfo, Connection } from '@salesforce/core'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; -import { PullResponse } from '../../../src/formatters/pullFormatter'; -import { StatusResult } from '../../../src/formatters/statusFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; +import { PullResponse } from '../../../src/formatters/source/pullFormatter'; +import { StatusResult } from '../../../src/formatters/source/statusFormatter'; let session: TestSession; const classdir = 'force-app/main/default/classes'; diff --git a/test/nuts/trackingCommands/lwc.nut.ts b/test/nuts/trackingCommands/lwc.nut.ts index 069124c90..6af80dde0 100644 --- a/test/nuts/trackingCommands/lwc.nut.ts +++ b/test/nuts/trackingCommands/lwc.nut.ts @@ -8,10 +8,10 @@ import * as path from 'path'; import * as fs from 'fs'; import { expect } from 'chai'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; -import { StatusResult } from '../../../src/formatters/statusFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; +import { StatusResult } from '../../../src/formatters/source/statusFormatter'; let session: TestSession; let cssPathAbsolute: string; diff --git a/test/nuts/trackingCommands/mpd-non-sequential.nut.ts b/test/nuts/trackingCommands/mpd-non-sequential.nut.ts index 02de43c47..9a289e8bb 100644 --- a/test/nuts/trackingCommands/mpd-non-sequential.nut.ts +++ b/test/nuts/trackingCommands/mpd-non-sequential.nut.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import { AuthInfo, Connection } from '@salesforce/core'; import { expect } from 'chai'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; let session: TestSession; let conn: Connection; diff --git a/test/nuts/trackingCommands/mpd-sequential.nut.ts b/test/nuts/trackingCommands/mpd-sequential.nut.ts index 19f38c980..9687ab554 100644 --- a/test/nuts/trackingCommands/mpd-sequential.nut.ts +++ b/test/nuts/trackingCommands/mpd-sequential.nut.ts @@ -6,11 +6,11 @@ */ import * as path from 'path'; -import { fs, AuthInfo, Connection } from '@salesforce/core'; +import { AuthInfo, Connection, fs } from '@salesforce/core'; import { expect } from 'chai'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; let session: TestSession; let conn: Connection; diff --git a/test/nuts/trackingCommands/remoteChanges.nut.ts b/test/nuts/trackingCommands/remoteChanges.nut.ts index 4bf6328fd..c0a89f410 100644 --- a/test/nuts/trackingCommands/remoteChanges.nut.ts +++ b/test/nuts/trackingCommands/remoteChanges.nut.ts @@ -13,13 +13,13 @@ import * as path from 'path'; import * as fs from 'fs'; import { expect } from 'chai'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; -import { Connection, AuthInfo } from '@salesforce/core'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; +import { AuthInfo, Connection } from '@salesforce/core'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { PushResponse } from '../../../src/formatters/pushResultFormatter'; -import { StatusResult } from '../../../src/formatters/statusFormatter'; -import { PullResponse } from '../../../src/formatters/pullFormatter'; +import { PushResponse } from '../../../src/formatters/source/pushResultFormatter'; +import { StatusResult } from '../../../src/formatters/source/statusFormatter'; +import { PullResponse } from '../../../src/formatters/source/pullFormatter'; let session: TestSession; let conn: Connection; diff --git a/test/nuts/trackingCommands/resetClear.nut.ts b/test/nuts/trackingCommands/resetClear.nut.ts index f23d06e57..836972050 100644 --- a/test/nuts/trackingCommands/resetClear.nut.ts +++ b/test/nuts/trackingCommands/resetClear.nut.ts @@ -11,11 +11,11 @@ import * as path from 'path'; import * as fs from 'fs'; -import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; -import { Connection, AuthInfo } from '@salesforce/core'; +import { AuthInfo, Connection } from '@salesforce/core'; import { replaceRenamedCommands } from '@salesforce/source-tracking'; -import { StatusResult } from '../../../src/formatters/statusFormatter'; +import { StatusResult } from '../../../src/formatters/source/statusFormatter'; import { SourceTrackingClearResult } from '../../../src/commands/force/source/beta/tracking/clear'; let session: TestSession;