Skip to content

Commit 77a6b11

Browse files
Merge pull request #277 from salesforcecli/cd/W-9496922
fix: replace sfdx-trust with plugin-trust
2 parents b7df0ac + 24c2a3c commit 77a6b11

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/dependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface Result {
2828

2929
const DEPENDENCIES: Dependency[] = [
3030
{
31-
name: 'sfdx-trust',
31+
name: 'sfdx',
3232
type: 'bin',
3333
condition: (flags): boolean => !!flags.sign,
3434
},

src/repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export class LernaRepo extends Repository {
285285
public verifySignature(packageNames: string[]): void {
286286
const packages = this.packages.filter((pkg) => packageNames.includes(pkg.name));
287287
for (const pkg of packages) {
288-
const cmd = `sfdx-trust plugins:trust:verify --npm ${
288+
const cmd = `sfdx plugins:trust:verify --npm ${
289289
pkg.name
290290
}@${pkg.getNextVersion()} ${this.registry.getRegistryParameter()}`;
291291
this.execCommand(cmd);
@@ -389,7 +389,7 @@ export class SinglePackageRepo extends Repository {
389389
}
390390

391391
public verifySignature(): void {
392-
const cmd = `sfdx-trust plugins:trust:verify --npm ${this.name}@${
392+
const cmd = `sfdx plugins:trust:verify --npm ${this.name}@${
393393
this.nextVersion
394394
} ${this.registry.getRegistryParameter()}`;
395395
this.execCommand(cmd);

test/dependencies.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import { verifyDependencies } from '../src/dependencies';
1313

1414
const $$ = testSetup();
1515

16-
describe('Depedencies', () => {
16+
describe('Dependencies', () => {
1717
it('should pass when all required env variables and bin scripts exist', () => {
1818
$$.SANDBOX.stub(Env.prototype, 'getString').returns('foobar');
1919
$$.SANDBOX.stub(shelljs, 'which').returns('foobar' as shelljs.ShellString);
2020
const validation = verifyDependencies({ sign: true });
2121
expect(validation.failures).to.equal(0);
2222
expect(validation.results).to.deep.equal([
23-
{ name: 'sfdx-trust', type: 'bin', passed: true },
23+
{ name: 'sfdx', type: 'bin', passed: true },
2424
{ name: 'AWS_ACCESS_KEY_ID', type: 'env', passed: true },
2525
{ name: 'AWS_SECRET_ACCESS_KEY', type: 'env', passed: true },
2626
{ name: 'NPM_TOKEN', type: 'env', passed: true },
@@ -34,7 +34,7 @@ describe('Depedencies', () => {
3434
const validation = verifyDependencies({ sign: true });
3535
expect(validation.failures).to.equal(3);
3636
expect(validation.results).to.deep.equal([
37-
{ name: 'sfdx-trust', type: 'bin', passed: true },
37+
{ name: 'sfdx', type: 'bin', passed: true },
3838
{
3939
name: 'AWS_ACCESS_KEY_ID',
4040
type: 'env',
@@ -64,8 +64,8 @@ describe('Depedencies', () => {
6464
expect(validation.failures).to.equal(1);
6565
expect(validation.results).to.deep.equal([
6666
{
67-
message: 'Install sfdx-trust',
68-
name: 'sfdx-trust',
67+
message: 'Install sfdx',
68+
name: 'sfdx',
6969
type: 'bin',
7070
passed: false,
7171
},

test/repository.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ describe('SinglePackageRepo', () => {
284284
execStub = stubMethod($$.SANDBOX, SinglePackageRepo.prototype, 'execCommand').returns('success');
285285
});
286286

287-
it('should use sfdx-trust to verify that the package was signed', async () => {
287+
it('should use plugin-trust to verify that the package was signed', async () => {
288288
const repo = await SinglePackageRepo.create({ ux: uxStub });
289289
repo.verifySignature();
290290
expect(execStub.callCount).to.equal(1);
291-
expect(execStub.firstCall.args[0]).to.include('sfdx-trust');
291+
expect(execStub.firstCall.args[0]).to.include('sfdx plugins:trust:verify');
292292
});
293293
});
294294

@@ -472,10 +472,10 @@ describe('LernaRepo', () => {
472472
);
473473
});
474474

475-
it('should use sfdx-trust to verify that the packages were signed', async () => {
475+
it('should use plugin-trust to verify that the packages were signed', async () => {
476476
const repo = await LernaRepo.create({ ux: uxStub });
477477
repo.verifySignature([pkgName]);
478-
expect(execStub.lastCall.args[0]).to.include('sfdx-trust');
478+
expect(execStub.lastCall.args[0]).to.include('sfdx plugins:trust:verify');
479479
});
480480
});
481481

0 commit comments

Comments
 (0)