Skip to content

Commit

Permalink
Merge pull request #896 from salesforcecli/devScripts2023-12-28
Browse files Browse the repository at this point in the history
refactor: devScripts update
  • Loading branch information
svc-cli-bot authored Dec 28, 2023
2 parents ed0d16c + a9abf5a commit bc8b484
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 178 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.15.0",
"@salesforce/core": "^6.4.0",
"@salesforce/core": "^6.4.2",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^5.0.12",
"@salesforce/ts-types": "^2.0.9",
Expand All @@ -16,10 +16,10 @@
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.0.3",
"@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/ts-sinon": "^1.4.19",
"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/authBaseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* 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 { Messages, Global, Mode } from '@salesforce/core';
import chalk from 'chalk';
import { SfCommand } from '@salesforce/sf-plugins-core';
import { Config } from '@oclif/core';

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

function dimMessage(message: string): string {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/list/auth.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 { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { loglevel, SfCommand } from '@salesforce/sf-plugins-core';
import { AuthInfo, Messages, OrgAuthorization } from '@salesforce/core';
type AuthListResult = Omit<OrgAuthorization, 'aliases'> & { alias: string };
export type AuthListResults = AuthListResult[];
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'list');

export default class ListAuth extends SfCommand<AuthListResults> {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/login/access-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* 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 { Flags, loglevel } from '@salesforce/sf-plugins-core';
import { AuthFields, AuthInfo, Messages, matchesAccessToken, SfError, StateAggregator } from '@salesforce/core';
import { env } from '@salesforce/kit';
import { Interfaces } from '@oclif/core';
import { AuthBaseCommand } from '../../../authBaseCommand.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'accesstoken.store');
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/login/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* 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 { AuthFields, AuthInfo, DeviceOauthService, Messages, OAuth2Config } from '@salesforce/core';
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
import { DeviceCodeResponse } from '@salesforce/core/lib/deviceOauthService.js';
import { ux } from '@oclif/core';
import { AuthBaseCommand } from '../../../authBaseCommand.js';
import { Common } from '../../../common.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'device.login');
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/login/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* 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 { Flags, loglevel } from '@salesforce/sf-plugins-core';
import { AuthFields, AuthInfo, AuthRemover, Logger, Messages, SfError } from '@salesforce/core';
import { Interfaces } from '@oclif/core';
import { AuthBaseCommand } from '../../../authBaseCommand.js';
import { Common } from '../../../common.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'jwt.grant');
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/login/sfdx-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* 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 fs from 'node:fs/promises';
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
import { AuthFields, AuthInfo, Messages } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import { parseJson } from '@salesforce/kit';
import { AuthBaseCommand } from '../../../authBaseCommand.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'sfdxurl.store');
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/login/web.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 open, { apps, AppName } from 'open';
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
import { AuthFields, AuthInfo, Logger, Messages, OAuth2Config, SfError, WebOAuthServer } from '@salesforce/core';
Expand All @@ -15,7 +15,7 @@ import { Interfaces } from '@oclif/core';
import { AuthBaseCommand } from '../../../authBaseCommand.js';
import { Common } from '../../../common.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'web.login');
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');

Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/logout.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 os from 'node:os';
import {
AuthInfo,
Expand All @@ -23,7 +23,7 @@ import { Interfaces } from '@oclif/core';
import chalk from 'chalk';
import { AuthBaseCommand } from '../../authBaseCommand.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'logout');
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
type Choice = { name: string; value: OrgAuthorization };
Expand Down
6 changes: 3 additions & 3 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* 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 { Logger, SfdcUrl, SfProject, Messages, SfError } from '@salesforce/core';
import { getString, isObject } from '@salesforce/ts-types';

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

export class Common {
Expand Down
Loading

0 comments on commit bc8b484

Please sign in to comment.