diff --git a/README.md b/README.md index 74309707..2469fb79 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,35 @@ sfdx plugins -# Command Topics +- [`@salesforce/plugin-trust plugins trust verify`](#salesforceplugin-trust-plugins-trust-verify) -- [`@salesforce/plugin-trust plugins`](docs/plugins.md) - list installed plugins +## `@salesforce/plugin-trust plugins trust verify` + +Validate a digital signature. + +``` +USAGE + $ @salesforce/plugin-trust plugins trust verify -n [--json] [--flags-dir ] [-r ] + +FLAGS + -n, --npm= (required) Specify the npm name. This can include a tag/version. + -r, --registry= The registry name. The behavior is the same as npm. + +GLOBAL FLAGS + --flags-dir= Import flag values from a directory. + --json Format output as json. + +DESCRIPTION + Validate a digital signature. + + Verifies the digital signature on an npm package matches the signature and key stored at the expected URLs. + +EXAMPLES + $ @salesforce/plugin-trust plugins trust verify --npm @scope/npmName --registry https://npm.pkg.github.com + + $ @salesforce/plugin-trust plugins trust verify --npm @scope/npmName +``` + +_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/3.3.18/src/commands/plugins/trust/verify.ts)_ diff --git a/command-snapshot.json b/command-snapshot.json index 0b34639c..3a1e777a 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -1,10 +1,10 @@ [ { - "command": "plugins:trust:verify", - "plugin": "@salesforce/plugin-trust", - "flags": ["json", "loglevel", "npm", "registry"], "alias": [], + "command": "plugins:trust:verify", + "flagAliases": [], "flagChars": ["n", "r"], - "flagAliases": [] + "flags": ["flags-dir", "json", "loglevel", "npm", "registry"], + "plugin": "@salesforce/plugin-trust" } ] diff --git a/package.json b/package.json index e36c9080..ea9e0d55 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dependencies": { "@oclif/core": "^3.26.0", "@salesforce/core": "^6.5.5", - "@salesforce/sf-plugins-core": "^7.1.15", + "@salesforce/sf-plugins-core": "^8.0.1", "got": "^13.0.0", "npm": "10.2.3", "npm-run-path": "^4.0.1", diff --git a/src/commands/plugins/trust/verify.ts b/src/commands/plugins/trust/verify.ts index eebfbc3f..19050941 100644 --- a/src/commands/plugins/trust/verify.ts +++ b/src/commands/plugins/trust/verify.ts @@ -5,8 +5,6 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - - import { SfCommand, Flags, loglevel } from '@salesforce/sf-plugins-core'; import { Messages, SfError, Logger } from '@salesforce/core'; import { @@ -17,7 +15,7 @@ import { import { NpmName } from '../../../shared/NpmName.js'; import { setErrorName } from '../../../shared/errors.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-trust', 'verify'); export interface VerifyResponse { diff --git a/test/tsconfig.json b/test/tsconfig.json index fde34705..a5f451cf 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "@salesforce/dev-config/tsconfig-test-strict-esm", - "include": [ - "./**/*.ts" - ], + "include": ["./**/*.ts"], "compilerOptions": { "skipLibCheck": true } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index c34229b1..ffa8b32e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1777,7 +1777,7 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" -"@salesforce/core@^6.4.1", "@salesforce/core@^6.5.5", "@salesforce/core@^6.6.0", "@salesforce/core@^6.7.0", "@salesforce/core@^6.7.1": +"@salesforce/core@^6.4.1", "@salesforce/core@^6.5.5", "@salesforce/core@^6.7.0", "@salesforce/core@^6.7.1": version "6.7.1" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.7.1.tgz#4dcfb62bc3d488462ea6e9438ff092cf202c1696" integrity sha512-SxscNdH2l+K5LmqH9XrosX+fjhPkMLN3hsG50sWQi7DbaI1Z0FGAKVOmVe6fZZsUsVNThKvZ+159IwwtxHWY6w== @@ -1801,6 +1801,30 @@ semver "^7.6.0" ts-retry-promise "^0.7.1" +"@salesforce/core@^6.7.3": + version "6.7.3" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.7.3.tgz#5d8f30c40ac3cebb898c8e845fe9a067bc729268" + integrity sha512-uU+PuZZGXxByhvnXLH1V3eY5P1caw401dIZ/QvhzYxoP/alPLk7dpChnZNJYH5Rw3dc/AhSPw+eg0cvUyjhP1Q== + dependencies: + "@salesforce/kit" "^3.0.15" + "@salesforce/schemas" "^1.6.1" + "@salesforce/ts-types" "^2.0.9" + "@types/semver" "^7.5.8" + ajv "^8.12.0" + change-case "^4.1.2" + faye "^1.4.0" + form-data "^4.0.0" + js2xmlparser "^4.0.1" + jsforce "^2.0.0-beta.29" + jsonwebtoken "9.0.2" + jszip "3.10.1" + pino "^8.19.0" + pino-abstract-transport "^1.1.0" + pino-pretty "^10.3.1" + proper-lockfile "^4.1.2" + semver "^7.6.0" + ts-retry-promise "^0.7.1" + "@salesforce/dev-config@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@salesforce/dev-config/-/dev-config-4.1.0.tgz#e529576466d074e7a5f1441236510fef123da01e" @@ -1907,15 +1931,15 @@ chalk "^4" inquirer "^8.2.5" -"@salesforce/sf-plugins-core@^7.1.15": - version "7.1.15" - resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-7.1.15.tgz#4d6033d56d78cf6046abfce96c119a8a60ee7c07" - integrity sha512-dQSSIHEpeFIadkWqZE24068m01vy31hVJdGWYvgscTnNrR30jIC5fXRevYvGG0l+8vVEJkCYYnJFQabUjSw3Eg== +"@salesforce/sf-plugins-core@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-8.0.1.tgz#f155cddfd7695aab0d8264848b634b2a91cdbf2c" + integrity sha512-R6SqJ1XqSINSWdZruKtC2SKGnLBh7KbFI7+qS0FYlyPU4IlWoa+AZkGwWvlczuSOumqnlhT95rNKwZTS5rJugA== dependencies: "@inquirer/confirm" "^2.0.17" "@inquirer/password" "^1.1.16" "@oclif/core" "^3.23.0" - "@salesforce/core" "^6.6.0" + "@salesforce/core" "^6.7.3" "@salesforce/kit" "^3.0.15" "@salesforce/ts-types" "^2.0.9" chalk "^5.3.0"