Skip to content

Commit

Permalink
refactor: import stylings
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Nov 7, 2023
1 parent ac7632e commit c32542e
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions src/baseCommands/user/password/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 * as os from 'node:os';
import { EOL } from 'node:os';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { SfCommand } from '@salesforce/sf-plugins-core';
Expand Down Expand Up @@ -91,9 +91,9 @@ export abstract class UserPasswordGenerateBaseCommand extends SfCommand<Generate
if (passwordData) {
const successMsg = messages.getMessage('success', [passwordData[0].password, passwordData[0].username]);
const viewMsg = messages.getMessage('viewWithCommand', [this.config.bin, passwordData[0].username]);
this.log(`${successMsg}${os.EOL}${viewMsg}`);
this.log(`${successMsg}${EOL}${viewMsg}`);
} else {
this.log(messages.getMessage('successMultiple', [os.EOL]));
this.log(messages.getMessage('successMultiple', [EOL]));
const columnData = {
username: { header: 'USERNAME' },
password: { header: 'PASSWORD' },
Expand Down
6 changes: 3 additions & 3 deletions src/commands/org/create/user.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 * as os from 'node:os';
import * as fs from 'node:fs';
import { EOL } from 'node:os';
import fs from 'node:fs';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import {
Expand Down Expand Up @@ -234,7 +234,7 @@ export class CreateUserCommand extends SfCommand<CreateUserOutput> {
fields.username,
fields.id,
this.flags['target-org'].getOrgId(),
os.EOL,
EOL,
this.config.bin,
fields.username,
]);
Expand Down
6 changes: 3 additions & 3 deletions test/allCommands.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'node:path';
import { join } from 'node:path';
import { expect, use } from 'chai';
import chaiEach from 'chai-each';

Expand All @@ -25,13 +25,13 @@ describe('verifies all commands run successfully ', () => {
before(async () => {
session = await TestSession.create({
project: {
sourceDir: path.join('test', 'df17AppBuilding'),
sourceDir: join('test', 'df17AppBuilding'),
},
devhubAuthStrategy: 'AUTO',
scratchOrgs: [
{
setDefault: true,
config: path.join('config', 'project-scratch-def.json'),
config: join('config', 'project-scratch-def.json'),
tracksSource: false,
},
],
Expand Down
6 changes: 3 additions & 3 deletions test/allCommandsNoJSON.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 * as path from 'node:path';
import { join } from 'node:path';

import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';

Expand All @@ -16,13 +16,13 @@ describe('verifies all commands run successfully (no json)', () => {
session = await TestSession.create({
project: {
// destinationDir: projectPath,
sourceDir: path.join('test', 'df17AppBuilding'),
sourceDir: join('test', 'df17AppBuilding'),
},
devhubAuthStrategy: 'AUTO',
scratchOrgs: [
{
setDefault: true,
config: path.join('config', 'project-scratch-def.json'),
config: join('config', 'project-scratch-def.json'),
tracksSource: false,
},
],
Expand Down
10 changes: 5 additions & 5 deletions test/commands/create.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'node:path';
import { join } from 'node:path';
import { expect } from 'chai';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { AuthInfo, Connection } from '@salesforce/core';
Expand All @@ -20,13 +20,13 @@ describe('creates a user from a file and verifies', () => {
before(async () => {
session = await TestSession.create({
project: {
sourceDir: path.join('test', 'df17AppBuilding'),
sourceDir: join('test', 'df17AppBuilding'),
},
devhubAuthStrategy: 'AUTO',
scratchOrgs: [
{
setDefault: true,
config: path.join('config', 'project-scratch-def.json'),
config: join('config', 'project-scratch-def.json'),
tracksSource: false,
},
],
Expand All @@ -51,7 +51,7 @@ describe('creates a user from a file and verifies', () => {

it('creates a user with set-unique-username without username on commandline', () => {
const output = execCmd<CreateUserOutput>(
`org:create:user --json -f ${path.join('config', 'fileWithUsername.json')} --set-unique-username`,
`org:create:user --json -f ${join('config', 'fileWithUsername.json')} --set-unique-username`,
{
ensureExitCode: 0,
}
Expand All @@ -63,7 +63,7 @@ describe('creates a user from a file and verifies', () => {

it('creates a secondary user with password and permsets assigned', () => {
const output = execCmd<CreateUserOutput>(
`org:create:user --json -a Other -f ${path.join('config', 'complexUser.json')}`,
`org:create:user --json -a Other -f ${join('config', 'complexUser.json')}`,
{ ensureExitCode: 0 }
).jsonOutput;
expect(output?.result).to.have.all.keys(['orgId', 'permissionSetAssignments', 'fields']);
Expand Down
2 changes: 1 addition & 1 deletion test/commands/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* eslint-disable @typescript-eslint/ban-ts-comment */

import * as fs from 'node:fs';
import fs from 'node:fs';
import { AuthInfo, Connection, DefaultUserFields, Logger, Org, User } from '@salesforce/core';
import { Config } from '@oclif/core';
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js';
Expand Down
10 changes: 5 additions & 5 deletions test/commands/permsetlicense/assign.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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 * as path from 'node:path';
import { join } from 'node:path';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { expect } from 'chai';
import { PSLResult } from '../../../src/baseCommands/user/permsetlicense/assign.js';
Expand All @@ -17,13 +17,13 @@ describe('PermissionSetLicense tests', () => {
before(async () => {
session = await TestSession.create({
project: {
sourceDir: path.join('test', 'df17AppBuilding'),
sourceDir: join('test', 'df17AppBuilding'),
},
devhubAuthStrategy: 'AUTO',
scratchOrgs: [
{
setDefault: true,
config: path.join('config', 'project-scratch-def.json'),
config: join('config', 'project-scratch-def.json'),
tracksSource: false,
},
],
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('PermissionSetLicense tests', () => {
expect(originalUsername).to.be.a('string');
// create a second user
const secondUsername = execCmd<CreateUserOutput>(
`org:create:user --json -a Other -f ${path.join('config', 'fullUser.json')}`,
`org:create:user --json -a Other -f ${join('config', 'fullUser.json')}`,
{
ensureExitCode: 0,
}
Expand All @@ -91,7 +91,7 @@ describe('PermissionSetLicense tests', () => {
const originalUsername = session.orgs.get('default')?.username;

const secondUsername = execCmd<CreateUserOutput>(
`org:create:user --json -f ${path.join('config', 'chatterUser.json')}`,
`org:create:user --json -f ${join('config', 'chatterUser.json')}`,
{
ensureExitCode: 0,
}
Expand Down
6 changes: 3 additions & 3 deletions test/forceCommands.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'node:path';
import { join } from 'node:path';
import { expect, use } from 'chai';
import chaiEach from 'chai-each';

Expand All @@ -25,13 +25,13 @@ describe('verifies legacy force commands run successfully ', () => {
before(async () => {
session = await TestSession.create({
project: {
sourceDir: path.join('test', 'df17AppBuilding'),
sourceDir: join('test', 'df17AppBuilding'),
},
devhubAuthStrategy: 'AUTO',
scratchOrgs: [
{
setDefault: true,
config: path.join('config', 'project-scratch-def.json'),
config: join('config', 'project-scratch-def.json'),
tracksSource: false,
},
],
Expand Down

0 comments on commit c32542e

Please sign in to comment.