Skip to content

Commit

Permalink
chore: updates from devScripts
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-cli-bot committed Dec 28, 2023
1 parent af778cd commit 79ba656
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 144 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.0.5",
"@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",
"@types/color-convert": "^2.0.3",
"eslint-plugin-sf-plugin": "^1.16.15",
"eslint-plugin-sf-plugin": "^1.17.0",
"oclif": "^4.1.0",
"shx": "^0.3.4",
"ts-node": "^10.9.2",
Expand Down
6 changes: 3 additions & 3 deletions src/commands/apex/get/log.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { LogService } from '@salesforce/apex-node';
import {
Flags,
Expand All @@ -18,7 +18,7 @@ import {
import { Messages } from '@salesforce/core';
import { colorLogs } from '../../../utils.js';

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

export type LogGetResult = Array<{ log: string } | string>;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/apex/get/test.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { TestService } from '@salesforce/apex-node';
import {
Flags,
Expand All @@ -19,7 +19,7 @@ import { Messages } from '@salesforce/core';
import { RunResult, TestReporter } from '../../../reporters/index.js';
import { resultFormat } from '../../../utils.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-apex', 'report');
export default class Test extends SfCommand<RunResult> {
public static readonly summary = messages.getMessage('summary');
Expand Down
6 changes: 3 additions & 3 deletions src/commands/apex/list/log.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { LogRecord, LogService } from '@salesforce/apex-node';
import {
SfCommand,
Expand All @@ -16,7 +16,7 @@ import {
} from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';

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

export type LogListResult = LogRecord[];
Expand Down
6 changes: 3 additions & 3 deletions src/commands/apex/run.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { ApexExecuteOptions, ExecuteService } from '@salesforce/apex-node';
import {
Flags,
Expand All @@ -17,7 +17,7 @@ import {
import { Messages, SfError } from '@salesforce/core';
import RunReporter from '../../reporters/runReporter.js';

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

export type ExecuteResult = {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/apex/run/test.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { CancellationTokenSource, TestLevel, TestResult, TestRunIdResult, TestService } from '@salesforce/apex-node';
import {
arrayWithDeprecation,
Expand All @@ -22,7 +22,7 @@ import { Duration } from '@salesforce/kit';
import { RunResult, TestReporter } from '../../../reporters/index.js';
import { resultFormat } from '../../../utils.js';

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

export const TestLevelValues = ['RunLocalTests', 'RunAllTestsInOrg', 'RunSpecifiedTests'];
Expand Down
6 changes: 3 additions & 3 deletions src/commands/apex/tail/log.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { LogService } from '@salesforce/apex-node';
import {
Flags,
Expand All @@ -18,7 +18,7 @@ import {
import { Connection, Messages } from '@salesforce/core';
import { colorizeLog } from '../../../legacyColorization.js';

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

export default class Log extends SfCommand<void> {
Expand Down
6 changes: 3 additions & 3 deletions src/reporters/runReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import os from 'node:os';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { ExecuteAnonymousResponse } from '@salesforce/apex-node';
import { Messages } from '@salesforce/core';
import { colorError, colorSuccess } from '../utils.js';
import { ExecuteResult } from '../commands/apex/run.js';

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

export default class RunReporter {
Expand Down
6 changes: 3 additions & 3 deletions src/reporters/testReporter.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import {
HumanReporter,
JUnitReporter,
Expand All @@ -22,7 +22,7 @@ import { Duration } from '@salesforce/kit';
import { FAILURE_EXIT_CODE } from '../utils.js';
import { JsonReporter, RunResult } from './jsonReporter.js';

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

export class TestReporter {
Expand Down
2 changes: 1 addition & 1 deletion test/commands/apex/run/test.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
testRunWithFailuresResult,
} from '../../../testData.js';

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

let logStub: sinon.SinonStub;
Expand Down
Loading

0 comments on commit 79ba656

Please sign in to comment.