Skip to content

Commit

Permalink
Merge pull request #180 from salesforcecli/mdonnalley/update-deps
Browse files Browse the repository at this point in the history
feat: use latest sf-plugins-core and oclif/core
  • Loading branch information
mdonnalley authored Jan 30, 2023
2 parents c10a391 + d9cb8cc commit bdc8a1e
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 45 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022, Salesforce.com, Inc.
Copyright (c) 2023, Salesforce.com, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^1.23.1",
"@oclif/core": "^2.0.7",
"@salesforce/core": "^3.32.12",
"@salesforce/sf-plugins-core": "^1.17.0",
"@salesforce/sf-plugins-core": "^2.0.1",
"tslib": "^2"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^3.2.15",
"@oclif/test": "^2.2.17",
"@oclif/test": "^2.3.3",
"@salesforce/cli-plugins-testkit": "^3.2.12",
"@salesforce/dev-config": "^3.1.0",
"@salesforce/dev-scripts": "^3.1.0",
Expand Down Expand Up @@ -120,4 +120,4 @@
"publishConfig": {
"access": "public"
}
}
}
6 changes: 3 additions & 3 deletions schemas/alias-set.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"type": "string"
},
"cause": {
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
"$ref": "#/definitions/alias-1283098157-0-211-1283098157-0-1533943985149"
},
"fullStack": {
"type": "string"
Expand Down Expand Up @@ -86,15 +86,15 @@
"additionalProperties": false,
"description": "A generalized sfdx error which also contains an action. The action is used in the CLI to help guide users past the error.\n\nTo throw an error in a synchronous function you must either pass the error message and actions directly to the constructor, e.g.\n\n``` // To load a message bundle (Note that __dirname should contain a messages folder) Messages.importMessagesDirectory(__dirname); const messages = Messages.load('myPackageName', 'myBundleName');\n\n// To throw a non-bundle based error: throw new SfError(message.getMessage('myError'), 'MyErrorName'); ```"
},
"alias-1501530572-0-211-1501530572-0-1533943985149": {
"alias-1283098157-0-211-1283098157-0-1533943985149": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"cause": {
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
"$ref": "#/definitions/alias-1283098157-0-211-1283098157-0-1533943985149"
},
"fullStack": {
"type": "string"
Expand Down
6 changes: 3 additions & 3 deletions schemas/alias-unset.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"type": "string"
},
"cause": {
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
"$ref": "#/definitions/alias-1283098157-0-211-1283098157-0-1533943985149"
},
"fullStack": {
"type": "string"
Expand Down Expand Up @@ -86,15 +86,15 @@
"additionalProperties": false,
"description": "A generalized sfdx error which also contains an action. The action is used in the CLI to help guide users past the error.\n\nTo throw an error in a synchronous function you must either pass the error message and actions directly to the constructor, e.g.\n\n``` // To load a message bundle (Note that __dirname should contain a messages folder) Messages.importMessagesDirectory(__dirname); const messages = Messages.load('myPackageName', 'myBundleName');\n\n// To throw a non-bundle based error: throw new SfError(message.getMessage('myError'), 'MyErrorName'); ```"
},
"alias-1501530572-0-211-1501530572-0-1533943985149": {
"alias-1283098157-0-211-1283098157-0-1533943985149": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"cause": {
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
"$ref": "#/definitions/alias-1283098157-0-211-1283098157-0-1533943985149"
},
"fullStack": {
"type": "string"
Expand Down
4 changes: 2 additions & 2 deletions src/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { SfError } from '@salesforce/core';
import { CliUx } from '@oclif/core';
import { ux } from '@oclif/core';
import { SfCommand } from '@salesforce/sf-plugins-core';

export type AliasResult = {
Expand All @@ -26,7 +26,7 @@ export abstract class AliasCommand<T> extends SfCommand<T> {
return;
}

const columns: CliUx.Table.table.Columns<AliasResult> = {
const columns: ux.Table.table.Columns<AliasResult> = {
alias: { header: 'Alias' },
value: { header: 'Value' },
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/alias/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class AliasSet extends AliasCommand<AliasResults> {

if (!argv.length) throw messages.createError('error.ArgumentsRequired');

const parsed = parseVarArgs(args, argv);
const parsed = parseVarArgs(args, argv as string[]);

const results = Object.entries(parsed).map(([alias, value]) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/alias/unset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class AliasUnset extends AliasCommand<AliasResults> {
const stateAggregator = await StateAggregator.getInstance();
const aliases = stateAggregator.aliases.getAll();

const toRemove = flags.all ? Object.keys(aliases) : argv;
const toRemove = flags.all ? Object.keys(aliases) : (argv as string[]);

if (toRemove.length === 0) {
if (flags.all) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Get extends ConfigCommand<ConfigResponses> {
} else {
const aggregator = await ConfigAggregator.create();

argv.forEach((configName) => {
(argv as string[]).forEach((configName) => {
try {
this.pushSuccess(aggregator.getInfo(configName, true));
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Set extends ConfigCommand<ConfigResponses> {

if (!argv.length) throw messages.createError('error.ArgumentsRequired');

const parsed = parseVarArgs(args, argv);
const parsed = parseVarArgs(args, argv as string[]);

for (const name of Object.keys(parsed)) {
const value = parsed[name];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/config/unset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class UnSet extends ConfigCommand<ConfigResponses> {
const config: Config = await Config.create(Config.getDefaultOptions(flags.global));

await config.read();
argv.forEach((key) => {
(argv as string[]).forEach((key) => {
try {
config.unset(key);
this.responses.push({ name: key, success: true });
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { SfCommand } from '@salesforce/sf-plugins-core';
import { CliUx } from '@oclif/core';
import { ux } from '@oclif/core';
import { ConfigInfo, OrgConfigProperties, SfError, SfdxPropertyKeys } from '@salesforce/core';
import { toHelpSection } from '@salesforce/sf-plugins-core';

Expand Down Expand Up @@ -63,7 +63,7 @@ export abstract class ConfigCommand<T> extends SfCommand<T> {
return;
}

const columns: CliUx.Table.table.Columns<Msg> = {
const columns: ux.Table.table.Columns<Msg> = {
name: { header: 'Name' },
};

Expand Down
1 change: 1 addition & 0 deletions test/commands/config/get.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ describe('config:get', () => {
root: mockPluginRoot,
hooks: {},
pjson: require(path.resolve(mockPluginRoot, 'package.json')),
name: 'sfdx-cli-ts-plugin',
commands: [],
} as Plugin);
})
Expand Down
115 changes: 90 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,12 @@
tslib "^2.3.1"

"@oclif/core@^1.19.0", "@oclif/core@^1.20.3", "@oclif/core@^1.20.4", "@oclif/core@^1.22.0", "@oclif/core@^1.23.1", "@oclif/core@^1.6.3":
version "1.23.1"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.23.1.tgz#bebbbc4e02a4c1a4216d64165f892037f8a1e14a"
integrity sha512-nz7wVGesJ1Qg74p1KNKluZpQ3Z042mqdaRlczEI4Xwqj5s9jjdDBCDHNkiGzV4UAKzicVzipNj6qqhyUWKYnaA==
version "1.26.1"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.26.1.tgz#26e46c96143d3e2b1dd9bd558ae1653fe9a4f3fa"
integrity sha512-g+OWJcM7JOVI53caTEtq0BB1nPotWctRLUyFODPgvDqXhVR7QED+Qz3LwFAMD8dt7/Ar2ZNq15U3bnpnOv453A==
dependencies:
"@oclif/linewrap" "^1.0.0"
"@oclif/screen" "^3.0.3"
"@oclif/screen" "^3.0.4"
ansi-escapes "^4.3.2"
ansi-styles "^4.3.0"
cardinal "^2.1.1"
Expand Down Expand Up @@ -771,7 +771,7 @@
widest-line "^3.1.0"
wrap-ansi "^7.0.0"

"@oclif/core@^2.0.3":
"@oclif/core@^2.0.3", "@oclif/core@^2.0.7":
version "2.0.7"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.0.7.tgz#a17a85dfa105dda120fbc5647432010feaa97a9e"
integrity sha512-pj7hIH8SBeH3qha47fmyqdaBdNVEqesRgnKFh8Ytdb4S41/4BYOiQuyQGuvnKgvicH6DMxp4FbM9EQEW46V9xw==
Expand Down Expand Up @@ -941,18 +941,18 @@
resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.4.tgz#b740f68609dfae8aa71c3a6cab15d816407ba493"
integrity sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw==

"@oclif/screen@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-3.0.3.tgz#e679ad10535e31d333f809f7a71335cc9aef1e55"
integrity sha512-KX8gMYA9ujBPOd1HFsV9e0iEx7Uoj8AG/3YsW4TtWQTg4lJvr82qNm7o/cFQfYRIt+jw7Ew/4oL4A22zOT+IRA==
"@oclif/screen@^3.0.4":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-3.0.4.tgz#663db0ecaf23f3184e7f01886ed578060e4a7f1c"
integrity sha512-IMsTN1dXEXaOSre27j/ywGbBjrzx0FNd1XmuhCWCB9NTPrhWI1Ifbz+YLSEcstfQfocYsrbrIessxXb2oon4lA==

"@oclif/test@^2.2.17":
version "2.2.17"
resolved "https://registry.yarnpkg.com/@oclif/test/-/test-2.2.17.tgz#82a1cec2321552e3bcc2cbc30546bbceaacdde6d"
integrity sha512-biReDlW5a6YkiJoMPa4tQYWQ8sXkBBMD94P7/NgqAL06wE62x4cyK8V55hcbV10QPe82IUl0w3Zx09zYsoLUyQ==
"@oclif/test@^2.3.3":
version "2.3.3"
resolved "https://registry.yarnpkg.com/@oclif/test/-/test-2.3.3.tgz#ac9e546c58edb8c1a0767fe9e4b556af71a0154a"
integrity sha512-7cT12WxuNTcbON3dRxu3D8GNOqv/cCKkH3d39Dsa+QQFtFPzhQysaW27QdwivTRPSauD+3jQfmScb2qd1l6Dig==
dependencies:
"@oclif/core" "^1.22.0"
fancy-test "^2.0.10"
"@oclif/core" "^2.0.3"
fancy-test "^2.0.12"

"@octokit/auth-token@^2.4.4":
version "2.5.0"
Expand Down Expand Up @@ -1105,6 +1105,29 @@
jsonwebtoken "9.0.0"
ts-retry-promise "^0.7.0"

"@salesforce/core@^3.33.1":
version "3.33.1"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.33.1.tgz#3dd0a44ba22763e8e0c2c97df03393e5c2c845d9"
integrity sha512-jaed8rK+NhSxB6MjYUN8f/2VkvtbFN/Ce/l6JvgFE+cvOf2g+lPv1pSsnKKlaSiiYcXkOvIRDT9d9ns1RLJzUw==
dependencies:
"@salesforce/bunyan" "^2.0.0"
"@salesforce/kit" "^1.8.0"
"@salesforce/schemas" "^1.4.0"
"@salesforce/ts-types" "^1.7.2"
"@types/graceful-fs" "^4.1.5"
"@types/semver" "^7.3.13"
ajv "^8.11.2"
archiver "^5.3.0"
change-case "^4.1.2"
debug "^3.2.7"
faye "^1.4.0"
form-data "^4.0.0"
graceful-fs "^4.2.9"
js2xmlparser "^4.0.1"
jsforce "^2.0.0-beta.19"
jsonwebtoken "9.0.0"
ts-retry-promise "^0.7.0"

"@salesforce/dev-config@^3.0.0", "@salesforce/dev-config@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@salesforce/dev-config/-/dev-config-3.1.0.tgz#8eb5b35860ff60d1c1dc3fd9329b01a28475d5b9"
Expand Down Expand Up @@ -1158,6 +1181,15 @@
shx "^0.3.3"
tslib "^2.2.0"

"@salesforce/kit@^1.8.3":
version "1.8.3"
resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.8.3.tgz#b590b78a8618494c51534598a7eb0683ba0da3f2"
integrity sha512-p+0tWR2pyCAIjZwDXGhrYFPuLckX9fP3Xa6Jync9POeQBfDGyK9CRd1eaiWj+6BeDS9kwvgm5M6o+OptIEhEjw==
dependencies:
"@salesforce/ts-types" "^1.7.2"
shx "^0.3.3"
tslib "^2.2.0"

"@salesforce/plugin-command-reference@^2.2.8":
version "2.2.8"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-command-reference/-/plugin-command-reference-2.2.8.tgz#b75571df46ad5210ce5170cb42de57cd6965ff84"
Expand Down Expand Up @@ -1185,7 +1217,7 @@
resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.4.0.tgz#7dff427c8059895d8108176047aee600703c82d6"
integrity sha512-BJ25uphssN42Zy6kksheFHMTLiR98AAHe/Wxnv0T4dYxtrEbUjSXVAGKZqfewJPFXA4xB5gxC+rQZtfz6xKCFg==

"@salesforce/sf-plugins-core@^1.17.0", "@salesforce/sf-plugins-core@^1.9.0":
"@salesforce/sf-plugins-core@^1.9.0":
version "1.17.0"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-1.17.0.tgz#e99d82fdf31856656d0e69008542fba8e588ef4c"
integrity sha512-7gyztRJ/YGm4Lyb8BD6OrVo9+aSwjfVz0SGutSQYg9CZCJyvEgtuKi5RGsL4thnGK++X4BFg3P70w9E9y2XH1g==
Expand All @@ -1197,6 +1229,18 @@
chalk "^4"
inquirer "^8.2.3"

"@salesforce/sf-plugins-core@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-2.0.1.tgz#079d6cc200ea53ce7fb60aafb5eaf5f2b48e46c9"
integrity sha512-vT4Y9n/4lStSWrfMAlgQB/XzwJAYK6ibcsFykHNCl86NCoebVGzg5KDIxYjHpidrt2PG/nPk7NL9iBtTH/p8Yg==
dependencies:
"@oclif/core" "^2.0.7"
"@salesforce/core" "^3.33.1"
"@salesforce/kit" "^1.8.3"
"@salesforce/ts-types" "^1.7.1"
chalk "^4"
inquirer "^8.2.5"

"@salesforce/ts-sinon@^1.4.4":
version "1.4.4"
resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.4.tgz#ee7039f7eb6c488d58b0a3365e7196e9b1b1ebb4"
Expand Down Expand Up @@ -3503,18 +3547,18 @@ extract-stack@^2.0.0:
resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-2.0.0.tgz#11367bc865bfcd9bc0db3123e5edb57786f11f9b"
integrity sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ==

fancy-test@^2.0.10:
version "2.0.10"
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.10.tgz#4c96b34cb15ad49693634fd1df9a28bb2086253f"
integrity sha512-gt2C/1DrFLyXNEkPHpltol0osCFEj5c3TFs3gu4EhIbnKEU9AW+lK0pWf1wRXhKs/FtcijnfODaO90d1HlTulQ==
fancy-test@^2.0.12:
version "2.0.12"
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.12.tgz#a93cd92ffc23f70b069c39f19940d34f64c6ca67"
integrity sha512-S7qVQNaViLTMzn71huZvrUCV59ldq+enQ1EQOkdNbl4q4Om97gwqbYKvZoglsnzCWRRFaFP+qHynpdqaLdiZqg==
dependencies:
"@types/chai" "*"
"@types/lodash" "*"
"@types/node" "*"
"@types/sinon" "*"
lodash "^4.17.13"
mock-stdin "^1.0.0"
nock "^13.0.0"
nock "^13.3.0"
stdout-stderr "^0.1.9"

fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
Expand Down Expand Up @@ -4353,6 +4397,27 @@ inquirer@^8.0.0, inquirer@^8.2.3:
through "^2.3.6"
wrap-ansi "^7.0.0"

inquirer@^8.2.5:
version "8.2.5"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.5.tgz#d8654a7542c35a9b9e069d27e2df4858784d54f8"
integrity sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==
dependencies:
ansi-escapes "^4.2.1"
chalk "^4.1.1"
cli-cursor "^3.1.0"
cli-width "^3.0.0"
external-editor "^3.0.3"
figures "^3.0.0"
lodash "^4.17.21"
mute-stream "0.0.8"
ora "^5.4.1"
run-async "^2.4.0"
rxjs "^7.5.5"
string-width "^4.1.0"
strip-ansi "^6.0.0"
through "^2.3.6"
wrap-ansi "^7.0.0"

internal-slot@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c"
Expand Down Expand Up @@ -5564,10 +5629,10 @@ no-case@^3.0.4:
lower-case "^2.0.2"
tslib "^2.0.3"

nock@^13.0.0:
version "13.2.9"
resolved "https://registry.yarnpkg.com/nock/-/nock-13.2.9.tgz#4faf6c28175d36044da4cfa68e33e5a15086ad4c"
integrity sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA==
nock@^13.3.0:
version "13.3.0"
resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768"
integrity sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg==
dependencies:
debug "^4.1.0"
json-stringify-safe "^5.0.1"
Expand Down

0 comments on commit bdc8a1e

Please sign in to comment.