Skip to content

Commit

Permalink
chore: updates from devScripts (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-cli-bot authored Dec 28, 2023
1 parent 460d500 commit 526a032
Show file tree
Hide file tree
Showing 31 changed files with 163 additions and 211 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@oclif/core": "^3.13.1",
"@salesforce/apex-node": "^2.1.7",
"@salesforce/core": "^6.4.0",
"@salesforce/core": "^6.4.2",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^5.0.10",
"@salesforce/source-deploy-retrieve": "^10.2.1",
Expand All @@ -20,7 +20,7 @@
"@oclif/plugin-command-snapshot": "^5.0.5",
"@oclif/plugin-help": "^6.0.7",
"@salesforce/cli-plugins-testkit": "^5.1.2",
"@salesforce/dev-scripts": "^8.1.2",
"@salesforce/dev-scripts": "^8.1.3",
"@salesforce/plugin-command-reference": "^3.0.56",
"@salesforce/plugin-info": "^2.6.50",
"@salesforce/source-testkit": "^2.1.76",
Expand All @@ -29,7 +29,7 @@
"archiver": "^5.3.2",
"chai-each": "^0.0.1",
"cross-env": "^7.0.3",
"eslint-plugin-sf-plugin": "^1.16.15",
"eslint-plugin-sf-plugin": "^1.17.0",
"fast-glob": "^3.3.1",
"oclif": "^4.0.4",
"shx": "0.3.4",
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/mdapi/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 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 { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Duration, env } from '@salesforce/kit';
import { Lifecycle, Messages, Org } from '@salesforce/core';
import { AsyncResult, DeployVersionData, MetadataApiDeploy } from '@salesforce/source-deploy-retrieve';
Expand All @@ -32,7 +32,7 @@ import { DeployProgressStatusFormatter } from '../../../formatters/deployProgres
import { MdDeployAsyncResultFormatter } from '../../../formatters/mdapi/mdDeployAsyncResultFormatter.js';
import { ResultFormatterOptions } from '../../../formatters/resultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deploy');
const deployMessages = Messages.loadMessages('@salesforce/plugin-source', 'deployCommand');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/mdapi/deploy/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 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 { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Connection, Messages, SfError } from '@salesforce/core';
import { Duration } from '@salesforce/kit';
import { RequestStatus } from '@salesforce/source-deploy-retrieve';
Expand All @@ -23,7 +23,7 @@ import {
DeployCancelResultFormatter,
} from '../../../../formatters/deployCancelResultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.cancel');

const replacement = 'project deploy cancel';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/mdapi/deploy/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 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 { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages, Org } from '@salesforce/core';
import { Duration, env } from '@salesforce/kit';
import { RequestStatus } from '@salesforce/source-deploy-retrieve';
Expand All @@ -24,7 +24,7 @@ import { ProgressFormatter } from '../../../../formatters/progressFormatter.js';
import { DeployProgressBarFormatter } from '../../../../formatters/deployProgressBarFormatter.js';
import { DeployProgressStatusFormatter } from '../../../../formatters/deployProgressStatusFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deployreport');

const replacement = 'project deploy report';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/mdapi/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 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 { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Lifecycle, Messages, Org, SfError, SfProject } from '@salesforce/core';
import { Duration } from '@salesforce/kit';
import {
Expand All @@ -32,7 +32,7 @@ import {
RetrieveResultFormatter,
} from '../../../formatters/mdapi/retrieveResultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.retrieve');
const spinnerMessages = Messages.loadMessages('@salesforce/plugin-source', 'spinner');
const retrieveMessages = Messages.loadMessages('@salesforce/plugin-source', 'retrieve');
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/mdapi/retrieve/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 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 { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages, Org, SfError } from '@salesforce/core';
import { Duration } from '@salesforce/kit';
import { MetadataApiRetrieve, MetadataApiRetrieveStatus, RetrieveResult } from '@salesforce/source-deploy-retrieve';
Expand All @@ -25,7 +25,7 @@ import {
RetrieveResultFormatter,
} from '../../../../formatters/mdapi/retrieveResultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.retrieve');
const spinnerMessages = Messages.loadMessages('@salesforce/plugin-source', 'spinner');
export type ReportCommandResult = RetrieveCommandResult | RetrieveCommandAsyncResult;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Lifecycle, Messages, Org } from '@salesforce/core';
import { Duration, env } from '@salesforce/kit';
import { SourceTracking } from '@salesforce/source-tracking';
Expand Down Expand Up @@ -37,7 +37,7 @@ import { DeployProgressStatusFormatter } from '../../../formatters/deployProgres
import { filterConflictsByComponentSet, trackingSetup, updateTracking } from '../../../trackingFunctions.js';
import { ResultFormatterOptions } from '../../../formatters/resultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)

const messages = Messages.loadMessages('@salesforce/plugin-source', 'deploy');
const deployMessages = Messages.loadMessages('@salesforce/plugin-source', 'deployCommand');
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/deploy/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 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 { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages, SfError } from '@salesforce/core';
import { Duration } from '@salesforce/kit';
import { RequestStatus } from '@salesforce/source-deploy-retrieve';
Expand All @@ -23,7 +23,7 @@ import {
DeployCancelResultFormatter,
} from '../../../../formatters/deployCancelResultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'cancel');

const replacement = 'project deploy cancel';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/deploy/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages, SfProject } from '@salesforce/core';

import { Duration, env } from '@salesforce/kit';
Expand All @@ -30,7 +30,7 @@ import { DeployProgressBarFormatter } from '../../../../formatters/deployProgres
import { DeployProgressStatusFormatter } from '../../../../formatters/deployProgressStatusFormatter.js';
import { ResultFormatterOptions } from '../../../../formatters/resultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'report');

const replacement = 'project deploy report';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Duration } from '@salesforce/kit';
import { Lifecycle, Messages } from '@salesforce/core';
import { FileResponse, RequestStatus, RetrieveVersionData, RetrieveResult } from '@salesforce/source-deploy-retrieve';
Expand All @@ -23,7 +23,7 @@ import { SourceCommand } from '../../../sourceCommand.js';
import { PullResponse, PullResultFormatter } from '../../../formatters/source/pullFormatter.js';
import { trackingSetup, updateTracking } from '../../../trackingFunctions.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'pull');
const retrieveMessages = Messages.loadMessages('@salesforce/plugin-source', 'retrieve');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Duration, env } from '@salesforce/kit';
import { Lifecycle, Messages } from '@salesforce/core';
import { ComponentStatus, DeployResult, DeployVersionData, RequestStatus } from '@salesforce/source-deploy-retrieve';
Expand All @@ -27,7 +27,7 @@ import { DeployProgressBarFormatter } from '../../../formatters/deployProgressBa
import { DeployProgressStatusFormatter } from '../../../formatters/deployProgressStatusFormatter.js';
import { trackingSetup, updateTracking } from '../../../trackingFunctions.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'push');
const deployMessages = Messages.loadMessages('@salesforce/plugin-source', 'deployCommand');

Expand Down
4 changes: 2 additions & 2 deletions src/commands/force/source/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { dirname, join, resolve } from 'node:path';
import fs from 'node:fs';

import { fileURLToPath } from 'node:url';

import { Lifecycle, Messages, SfError, SfProject } from '@salesforce/core';
import { Duration } from '@salesforce/kit';
import {
Expand Down Expand Up @@ -39,7 +39,7 @@ import {
import { filterConflictsByComponentSet, trackingSetup, updateTracking } from '../../../trackingFunctions.js';
import { promisesQueue } from '../../../promiseQueue.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'retrieve');
const spinnerMessages = Messages.loadMessages('@salesforce/plugin-source', 'spinner');
const retrieveMessages = Messages.loadMessages('@salesforce/plugin-source', 'retrieve');
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages } from '@salesforce/core';
import { ChangeResult, StatusOutputRow } from '@salesforce/source-tracking';
import { Interfaces } from '@oclif/core';
Expand All @@ -26,7 +26,7 @@ import {
} from '../../../formatters/source/statusFormatter.js';
import { trackingSetup } from '../../../trackingFunctions.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'status');

export type StatusCommandResult = StatusResult[];
Expand Down
4 changes: 2 additions & 2 deletions src/deployCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';

import {
AsyncResult,
ComponentSet,
Expand Down Expand Up @@ -43,7 +43,7 @@ import { transformCoverageToApexCoverage, transformDeployTestsResultsToTestResul

export type TestLevel = 'NoTestRun' | 'RunSpecifiedTests' | 'RunLocalTests' | 'RunAllTestsInOrg';

Messages.importMessagesDirectory(path.dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'deployCommand');
export const reportsFormatters = Object.keys(DefaultReportOptions);

Expand Down
6 changes: 3 additions & 3 deletions src/formatters/deployReportResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { MetadataApiDeployStatus, RequestStatus } from '@salesforce/source-deploy-retrieve';
import { SfError, Messages } from '@salesforce/core';
import { DeployResultFormatter } from './deployResultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
export type DeployReportCommandResult = MetadataApiDeployStatus;

export class DeployReportResultFormatter extends DeployResultFormatter {
Expand Down
6 changes: 3 additions & 3 deletions src/formatters/deployResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

import path from 'node:path';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import chalk from 'chalk';

import { Messages, SfError } from '@salesforce/core';
Expand All @@ -29,7 +29,7 @@ import { ResultFormatter, ResultFormatterOptions } from './resultFormatter.js';
import { MdDeployResult } from './mdapi/mdDeployResultFormatter.js';
import { maybePrintCodeCoverageTable } from './codeCoverageTable.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'deploy');

export type DeployCommandResult = {
Expand Down
6 changes: 3 additions & 3 deletions src/formatters/mdapi/mdDeployAsyncResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

import { EOL } from 'node:os';

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages } from '@salesforce/core';
import { AsyncResult } from '@salesforce/source-deploy-retrieve';
import { Ux } from '@salesforce/sf-plugins-core';
import { ResultFormatterOptions } from '../resultFormatter.js';
import { DeployAsyncResultFormatter } from '../source/deployAsyncResultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deploy');

export class MdDeployAsyncResultFormatter extends DeployAsyncResultFormatter {
Expand Down
6 changes: 3 additions & 3 deletions src/formatters/mdapi/mdDeployResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import chalk from 'chalk';
import { getNumber } from '@salesforce/ts-types';
import { Messages, SfError } from '@salesforce/core';
Expand All @@ -23,7 +23,7 @@ import { Ux } from '@salesforce/sf-plugins-core';
import { CoverageResultsFileInfo, ResultFormatter, ResultFormatterOptions } from '../resultFormatter.js';
import { maybePrintCodeCoverageTable } from '../codeCoverageTable.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'md.deploy');

export type MdDeployResult = {
Expand Down
6 changes: 3 additions & 3 deletions src/formatters/retrieveFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages, SfError } from '@salesforce/core';
import { get } from '@salesforce/ts-types';
import {
Expand All @@ -20,7 +20,7 @@ import { ensureArray } from '@salesforce/kit';
import { Ux } from '@salesforce/sf-plugins-core';
import chalk from 'chalk';
import { ResultFormatter, ResultFormatterOptions } from './resultFormatter.js';
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)

export abstract class RetrieveFormatter extends ResultFormatter {
protected warnings: RetrieveMessage[];
Expand Down
6 changes: 3 additions & 3 deletions src/formatters/source/deployAsyncResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

import { EOL } from 'node:os';

import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';


import { Messages } from '@salesforce/core';
import { cloneJson } from '@salesforce/kit';
import { AsyncResult } from '@salesforce/source-deploy-retrieve';
import { Ux } from '@salesforce/sf-plugins-core';
import { ResultFormatter, ResultFormatterOptions } from '../resultFormatter.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-source', 'deploy');

export interface DeployCommandAsyncResult extends DeployAsyncStatus {
Expand Down
Loading

0 comments on commit 526a032

Please sign in to comment.