Skip to content

Commit 8330028

Browse files
committed
fix: update plugin-trust
1 parent 4001ff5 commit 8330028

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@salesforce/command": "^3.0.5",
1414
"@salesforce/core": "^2.23.2",
1515
"@salesforce/kit": "^1.3.3",
16-
"@salesforce/plugin-trust": "^1.0.6",
16+
"@salesforce/plugin-trust": "^1.0.7",
1717
"@salesforce/ts-types": "^1.4.3",
1818
"@types/semver": "^7.3.6",
1919
"@types/sinon": "10.0.2",

src/commands/npm/lerna/release.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as os from 'os';
99
import * as chalk from 'chalk';
1010
import { flags, FlagsConfig, SfdxCommand } from '@salesforce/command';
1111
import { Messages, SfdxError } from '@salesforce/core';
12+
import { exec } from 'shelljs';
1213
import { PackageInfo } from '../../../repository';
1314
import { verifyDependencies } from '../../../dependencies';
1415
import { Access, isMonoRepo, LernaRepo } from '../../../repository';
@@ -140,7 +141,7 @@ export default class Release extends SfdxCommand {
140141
const pkgs = lernaRepo.getPkgInfo(this.flags.sign);
141142

142143
for (const pkg of pkgs) {
143-
await this.verifySign(pkg);
144+
this.verifySign(pkg);
144145
}
145146
}
146147

@@ -151,13 +152,14 @@ export default class Release extends SfdxCommand {
151152
});
152153
}
153154

154-
protected async verifySign(pkgInfo: PackageInfo): Promise<void> {
155+
protected verifySign(pkgInfo: PackageInfo): void {
155156
const cmd = 'plugins:trust:verify';
156157
const argv = `--npm ${pkgInfo.name}@${pkgInfo.nextVersion} ${pkgInfo.registryParam}`;
157158

158159
this.ux.log(chalk.dim(`sf-release ${cmd} ${argv}`) + os.EOL);
159160
try {
160-
await this.config.runCommand(cmd, argv.split(' '));
161+
const result = exec(`DEBUG=sfdx:* ${this.config.root}/bin/run ${cmd} ${argv}`);
162+
if (result.code !== 0) throw new SfdxError(result.stderr, 'FailedCommandExecution');
161163
} catch (err) {
162164
throw new SfdxError(err, 'FailedCommandExecution');
163165
}

src/commands/npm/package/release.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default class Release extends SfdxCommand {
128128
try {
129129
if (this.flags.sign && this.flags.verify && !this.flags.dryrun) {
130130
pkg.printStage('Verify Signed Packaged');
131-
await this.verifySign(pkg.getPkgInfo());
131+
this.verifySign(pkg.getPkgInfo());
132132
}
133133
} finally {
134134
if (!this.flags.dryrun) {
@@ -145,15 +145,14 @@ export default class Release extends SfdxCommand {
145145
};
146146
}
147147

148-
// eslint-disable-next-line @typescript-eslint/require-await
149-
protected async verifySign(pkgInfo: PackageInfo): Promise<void> {
148+
protected verifySign(pkgInfo: PackageInfo): void {
150149
const cmd = 'plugins:trust:verify';
151150
const argv = `--npm ${pkgInfo.name}@${pkgInfo.nextVersion} ${pkgInfo.registryParam}`;
152151

153152
this.ux.log(chalk.dim(`sf-release ${cmd} ${argv}`) + os.EOL);
154153
try {
155-
// await this.config.runCommand(cmd, argv.split(' '));
156-
exec(`DEBUG=sfdx:* ${this.config.root}/bin/run ${cmd} ${argv}`);
154+
const result = exec(`DEBUG=sfdx:* ${this.config.root}/bin/run ${cmd} ${argv}`);
155+
if (result.code !== 0) throw new SfdxError(result.stderr, 'FailedCommandExecution');
157156
} catch (err) {
158157
throw new SfdxError(err, 'FailedCommandExecution');
159158
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,10 +902,10 @@
902902
handlebars "^4.7.3"
903903
tslib "^1"
904904

905-
"@salesforce/plugin-trust@^1.0.6":
906-
version "1.0.6"
907-
resolved "https://registry.yarnpkg.com/@salesforce/plugin-trust/-/plugin-trust-1.0.6.tgz#5539cc985b7d5923c829785ff51a9bbaf1556925"
908-
integrity sha512-G4kQVy3UjKGf2J4Tn0h/aWtATj2Rv/g6nwpyZep7jBQUo4Sqs/CLuCfUdifM/+pDnJcaZPAr2WPxebttzFzHHg==
905+
"@salesforce/plugin-trust@^1.0.7":
906+
version "1.0.7"
907+
resolved "https://registry.npmjs.org/@salesforce/plugin-trust/-/plugin-trust-1.0.7.tgz#6708f52636a3be98584fe30a2e8751679c12ded0"
908+
integrity sha512-WKBLprbqfg0FUlTpOKV8xl5UEsMjdGIqRovHG33RfPHDyhgVmwhWk9fQ3T9IE2Vr2kP+u9vezhFVg5NyYLIoXQ==
909909
dependencies:
910910
"@oclif/config" "^1.17.0"
911911
"@salesforce/command" "^3.0.5"

0 commit comments

Comments
 (0)