From a0797aef4c1eea10fd17562c5ec0dcbbca2b2d42 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 22 Nov 2023 08:27:37 -0600 Subject: [PATCH 01/16] chore: bump some deps --- package.json | 8 ++--- yarn.lock | 100 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 69 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index e7db24ac..3a2ba757 100644 --- a/package.json +++ b/package.json @@ -5,17 +5,17 @@ "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { - "@oclif/core": "^3.10.7", - "@salesforce/core": "^6.1.3", + "@oclif/core": "^3.12.0", + "@salesforce/core": "^6.2.0", "@salesforce/kit": "^3.0.15", - "@salesforce/sf-plugins-core": "^5.0.1", + "@salesforce/sf-plugins-core": "^5.0.3", "@salesforce/ts-types": "^2.0.9" }, "devDependencies": { "@oclif/plugin-command-snapshot": "^5.0.2", "@salesforce/cli-plugins-testkit": "^5.0.4", "@salesforce/dev-scripts": "^7.1.1", - "@salesforce/plugin-command-reference": "^3.0.46", + "@salesforce/plugin-command-reference": "^3.0.47", "chai-each": "^0.0.1", "eslint-plugin-sf-plugin": "^1.16.15", "oclif": "^4.0.3", diff --git a/yarn.lock b/yarn.lock index b75b79be..d05a18e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -702,7 +702,7 @@ supports-color "^8.1.1" tslib "^2" -"@oclif/core@^2.15.0", "@oclif/core@^2.9.3", "@oclif/core@^2.9.4": +"@oclif/core@^2.9.3", "@oclif/core@^2.9.4": version "2.15.0" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a" integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA== @@ -736,10 +736,10 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/core@^3.0.4", "@oclif/core@^3.10.7", "@oclif/core@^3.10.8", "@oclif/core@^3.11.0", "@oclif/core@^3.3.1": - version "3.11.0" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.11.0.tgz#dadfac39238af3b717e33b910dde1f1f0fd2105e" - integrity sha512-9A2LhDQATf1vrRqPoO0gGuBrey0jt3kDafC+eazxTNWV2EvlEpgY2587iyrxPK/fL2xg7f+0mtxYaSHdO2k8eg== +"@oclif/core@^3.0.0", "@oclif/core@^3.0.4", "@oclif/core@^3.10.8", "@oclif/core@^3.11.0", "@oclif/core@^3.12.0", "@oclif/core@^3.3.1": + version "3.12.0" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.12.0.tgz#4b38b1b5dab2f7585f89c3927a8a157b258b4bd6" + integrity sha512-mT1Vpd1E20IJ7P6GDYOivylPdTHq/xVgFjeCDjitFW86UAklFM8BEFyFB7KpsTvpmjRbCoda3yU10lSI1224lw== dependencies: ansi-escapes "^4.3.2" ansi-styles "^4.3.0" @@ -747,6 +747,7 @@ chalk "^4.1.2" clean-stack "^3.0.1" cli-progress "^3.12.0" + color "^4.2.3" debug "^4.3.4" ejs "^3.1.9" get-package-type "^0.1.0" @@ -926,7 +927,7 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.3.1", "@salesforce/core@^5.3.17", "@salesforce/core@^5.3.20": +"@salesforce/core@^5.3.20": version "5.3.20" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.20.tgz#4e934d4551bb70423cb1c4115615bc41cffca41e" integrity sha512-y+O6O2c8OYFDrAy2qsG+pAcNxoyL14nmBXcBRRcYA7Huj8ikK+aLJK84PuVAYdQz+hNwImQF+69IWtDkpK4Irg== @@ -950,10 +951,10 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" -"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3": - version "6.1.3" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.1.3.tgz#32e71846cad033e0d2b369ecf0fafb4f76d63ad7" - integrity sha512-M7EQ4+LSXU4ZqD4R5ttY4RqSaYNaNBGDG0KC51IdDfpGtL4kJXeQHdr5HfMfgyCyYNM9LqqfBS7zQTBY1rf+Yg== +"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3", "@salesforce/core@^6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.0.tgz#9bac72c0b48c733cf1d32d19f9775c34d895f207" + integrity sha512-HuggjBCLA18yXYHChnsrPDGbM+fAPx+9NeS7Dkx3/o1VhJ2hok5BUkvdaeoAVex/0Oc2J+KcvX/gqrjY51iOhQ== dependencies: "@salesforce/kit" "^3.0.15" "@salesforce/schemas" "^1.6.1" @@ -967,7 +968,7 @@ jsforce "^2.0.0-beta.28" jsonwebtoken "9.0.2" jszip "3.10.1" - pino "^8.16.1" + pino "^8.16.2" pino-abstract-transport "^1.1.0" pino-pretty "^10.2.3" proper-lockfile "^4.1.2" @@ -1010,7 +1011,7 @@ typescript "^4.9.5" wireit "^0.14.1" -"@salesforce/kit@^3.0.13", "@salesforce/kit@^3.0.15": +"@salesforce/kit@^3.0.15": version "3.0.15" resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-3.0.15.tgz#713df3f5767f874c70a2e731c7cb5ba677989559" integrity sha512-XkA8jsuLvVnyP460dAbU3pBFP2IkmmmsVxMQVifcKKbNWaIBbZBzAfj+vdaQfnvZyflLhsrFT3q2xkb0vHouPg== @@ -1018,15 +1019,15 @@ "@salesforce/ts-types" "^2.0.9" tslib "^2.6.2" -"@salesforce/plugin-command-reference@^3.0.46": - version "3.0.46" - resolved "https://registry.yarnpkg.com/@salesforce/plugin-command-reference/-/plugin-command-reference-3.0.46.tgz#8ade210de4c235fa8daa9b59272481bea61bcd54" - integrity sha512-tUe8pAarH/km7wbRDpKgWc3qCzh52q5FmJpnJbs7wwWnvM5X4MzdpZ/sF/8MT3cS6FkZy//ls796QIC0vvOYsA== +"@salesforce/plugin-command-reference@^3.0.47": + version "3.0.47" + resolved "https://registry.yarnpkg.com/@salesforce/plugin-command-reference/-/plugin-command-reference-3.0.47.tgz#477c3384402ef08458f4259b100447e136384e85" + integrity sha512-A3syaw8bf8Bovne6WDiYOcOeLFKTqf1T+MXlxXPwDkDM0X5squkwVvE6wun7S54Q3n4gCSlCPiAMbJfpF8wwaw== dependencies: - "@oclif/core" "^2.15.0" - "@salesforce/core" "^5.3.17" + "@oclif/core" "^3.0.0" + "@salesforce/core" "^5.3.20" "@salesforce/kit" "^3.0.15" - "@salesforce/sf-plugins-core" "^3.1.28" + "@salesforce/sf-plugins-core" "^4" "@salesforce/ts-types" "^2.0.9" chalk "^4" handlebars "^4.7.8" @@ -1042,32 +1043,33 @@ resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.6.1.tgz#7d1c071e1e509ca9d2d8a6e48ac7447dd67a534d" integrity sha512-eVy947ZMxCJReKJdgfddUIsBIbPTa/i8RwQGwxq4/ss38H5sLOAeSTaun9V7HpJ1hkpDznWKfgzYvjsst9K6ig== -"@salesforce/sf-plugins-core@^3.1.28": - version "3.1.28" - resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-3.1.28.tgz#7714c5b1ce26052bb5cbc524c5990bc52eb601cd" - integrity sha512-Z1fVS/pqLCX/3ESrjvtzyuvDFwXu8qxjqs5Gana0J7RKkhDL0f7w+pz3DR1/YfQPeHK8rk9pFDOKB3tOnXf9Lw== +"@salesforce/sf-plugins-core@^4": + version "4.1.3" + resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-4.1.3.tgz#06fa96fec1903fe945def9303eb8c43058625a3d" + integrity sha512-cia0FRknxeQU0IK5gOxlP2KGxqc5zxwSmHLKJsd5+sUFWpn3Hnun/3rDO94UXIDjuGKV7HK08hQNBKkSLeYaRA== dependencies: - "@oclif/core" "^2.15.0" - "@salesforce/core" "^5.3.1" - "@salesforce/kit" "^3.0.13" - "@salesforce/ts-types" "^2.0.7" + "@oclif/core" "^3.11.0" + "@salesforce/core" "^6.1.0" + "@salesforce/kit" "^3.0.15" + "@salesforce/ts-types" "^2.0.9" + "@types/inquirer" "^8.2.3" chalk "^4" inquirer "^8.2.5" -"@salesforce/sf-plugins-core@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-5.0.1.tgz#16b085eda99e28f2607957954d6ac957a8d0a0eb" - integrity sha512-gKUhAP9DDUlB4bjr0a6bsWiM16hn/n1cW8BglhYHAow8UJ0OQBxx+dfvAO0ftXmfzg82IZdMViiDmQXt0Z+e6A== +"@salesforce/sf-plugins-core@^5.0.3": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-5.0.3.tgz#a771dc887c0a13ac23a5b1c16a6965791914f3aa" + integrity sha512-D+RCUzrYIWpJakNfxtHXJd6LZr6bK4gA4e7jLPR1G1FmDFss13PT7hOdFRxmAqTPbcp1jf65vwYZzu5nbqzmvQ== dependencies: "@oclif/core" "^3.11.0" - "@salesforce/core" "^6.1.0" + "@salesforce/core" "^6.1.3" "@salesforce/kit" "^3.0.15" "@salesforce/ts-types" "^2.0.9" "@types/inquirer" "^8.2.3" chalk "^4" inquirer "^8.2.5" -"@salesforce/ts-types@^2.0.6", "@salesforce/ts-types@^2.0.7", "@salesforce/ts-types@^2.0.9": +"@salesforce/ts-types@^2.0.6", "@salesforce/ts-types@^2.0.9": version "2.0.9" resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-2.0.9.tgz#66bff7b41720065d6b01631b6f6a3ccca02857c5" integrity sha512-boUD9jw5vQpTCPCCmK/NFTWjSuuW+lsaxOynkyNXLW+zxOc4GDjhtKc4j0vWZJQvolpafbyS8ZLFHZJvs12gYA== @@ -2301,16 +2303,32 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + color-support@^1.1.2, color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + colorette@^2.0.7: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" @@ -3988,6 +4006,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -5807,7 +5830,7 @@ pino-std-serializers@^6.0.0: resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz#d9a9b5f2b9a402486a5fc4db0a737570a860aab3" integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA== -pino@^8.16.0, pino@^8.16.1: +pino@^8.16.0, pino@^8.16.2: version "8.16.2" resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.2.tgz#7a906f2d9a8c5b4c57412c9ca95d6820bd2090cd" integrity sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg== @@ -6461,6 +6484,13 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + sinon@10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/sinon/-/sinon-10.0.0.tgz#52279f97e35646ff73d23207d0307977c9b81430" From 6f19448bd4f7dd3f9b2ec17127e51513bf4c5bb4 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 22 Nov 2023 09:42:32 -0600 Subject: [PATCH 02/16] feat: validate org in org create user --- messages/create.md | 12 +++ src/commands/org/create/user.ts | 20 +++- test/commands/create.test.ts | 178 ++++++++++++++++++++++---------- 3 files changed, 152 insertions(+), 58 deletions(-) diff --git a/messages/create.md b/messages/create.md index 053c1d25..964adafd 100644 --- a/messages/create.md +++ b/messages/create.md @@ -75,3 +75,15 @@ See more details about this user by running "%s org user display -o %s". # flags.target-hub.deprecation The --target-dev-hub flag is deprecated and is no longer used by this command. The flag will be removed in API version 57.0 or later. + +# error.nonScratchOrg + +This command only works with scratch orgs. + +# error.jwtHyperforce + +This command does not work using JWT auth when the org is on Hyperforce. + +# error.jwtHyperforce.actions + +- Auth to your DevHub with `org login web` or `org login sfdx-url`. Scratch orgs you create that way will work with `org create user`. diff --git a/src/commands/org/create/user.ts b/src/commands/org/create/user.ts index ccbcbbb5..660386a8 100644 --- a/src/commands/org/create/user.ts +++ b/src/commands/org/create/user.ts @@ -14,6 +14,7 @@ import { DefaultUserFields, Logger, Messages, + Org, REQUIRED_FIELDS, SfError, StateAggregator, @@ -106,7 +107,8 @@ export class CreateUserCommand extends SfCommand { const logger = await Logger.child(this.constructor.name); this.varargs = parseVarArgs({}, argv as string[]); - const conn = flags['target-org'].getConnection(flags['api-version']); + const conn = await getValidatedConnection(flags['target-org'], flags['api-version']); + const defaultUserFields = await DefaultUserFields.create({ templateUser: ensureString(flags['target-org'].getUsername()), }); @@ -315,3 +317,19 @@ const catchCreateUser = async (respBody: Error, fields: UserFields, conn: Connec throw SfError.wrap(errMessage); } }; + +/** the org must be a scratch org AND not use JWT with hyperforce */ +const getValidatedConnection = async (targetOrg: Org, apiVersion?: string): Promise => { + if (!(await targetOrg.determineIfScratch())) { + throw messages.createError('error.nonScratchOrg'); + } + const conn = targetOrg.getConnection(apiVersion); + if ( + conn.getAuthInfo().isJwt() && + // hyperforce sandbox instances end in S like USA254S + targetOrg.getField(Org.Fields.CREATED_ORG_INSTANCE).endsWith('S') + ) { + throw messages.createError('error.jwtHyperforce'); + } + return conn; +}; diff --git a/test/commands/create.test.ts b/test/commands/create.test.ts index 7afa4a2e..6f140c20 100644 --- a/test/commands/create.test.ts +++ b/test/commands/create.test.ts @@ -23,12 +23,8 @@ describe('org:create:user', () => { const $$ = new TestContext(); const testOrg = new MockTestOrgData(); - const devHub = new MockTestOrgData(); + testOrg.isScratchOrg = true; const newUser = new MockTestOrgData(); - devHub.username = 'mydevhub.org'; - devHub.aliases = ['mydevhub']; - devHub.devHubUsername = 'mydevhub.org'; - devHub.isDevHub = true; it('will properly merge fields regardless of capitalization', async () => { // notice the varied capitalization @@ -80,10 +76,19 @@ describe('org:create:user', () => { }); }); - async function prepareStubs(throws: { license?: boolean; duplicate?: boolean } = {}, readsFile?: JsonMap | boolean) { - await $$.stubAuths(testOrg, devHub); + async function prepareStubs( + throws: { + license?: boolean; + duplicate?: boolean; + nonScratch?: boolean; + isJWT?: boolean; + createdOrgInstance?: string; + } = {}, + readsFile?: JsonMap | boolean + ) { + await $$.stubAuths(testOrg); $$.stubUsers({ [testOrg.username]: [] }); - await $$.stubConfig({ 'target-dev-hub': devHub.username, 'target-org': testOrg.username }); + await $$.stubConfig({ 'target-org': testOrg.username }); $$.stubAliases({ testAlias: '1605130295132_test-j6asqt5qoprs@example.com' }); const userInfo = { @@ -111,7 +116,13 @@ describe('org:create:user', () => { username: '1605130295132_test-j6asqt5qoprs@example.com', alias: 'testAlias', }); + $$.SANDBOX.stub(AuthInfo.prototype, 'isJwt').returns(throws.isJWT ? true : false); + $$.SANDBOX.stub(Org.prototype, 'getOrgId').returns(testOrg.orgId); + $$.SANDBOX.stub(Org.prototype, 'getField') + .withArgs(Org.Fields.CREATED_ORG_INSTANCE) + .returns(throws.createdOrgInstance ?? testOrg.orgId); + $$.SANDBOX.stub(Org.prototype, 'determineIfScratch').resolves(throws.nonScratch ? false : true); if (throws.license) { $$.SANDBOX.stub(User.prototype, 'createUser').throws(new Error('LICENSE_LIMIT_EXCEEDED')); @@ -167,8 +178,6 @@ describe('org:create:user', () => { '--json', '--target-org', testOrg.username, - '--target-dev-hub', - 'devhub@test.com', '--definition-file', 'parent/child/file.json', "permsets='permCLI, permCLI2'", @@ -199,10 +208,55 @@ describe('org:create:user', () => { username: '1605130295132_test-j6asqt5qoprs@example.com', }, }; - const createCommand = new CreateUserCommand( - ['--json', '--target-org', testOrg.username, '--target-dev-hub', 'devhub@test.com'], - {} as Config - ); + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + const result = await createCommand.run(); + expect(result).to.deep.equal(expected); + }); + + it('works on hyperforce if non-JWT', async () => { + await prepareStubs({ createdOrgInstance: 'USA100S' }, true); + const expected = { + orgId: testOrg.orgId, + permissionSetAssignments: [], + fields: { + alias: 'testAlias', + email: username, + emailencodingkey: 'UTF-8', + id: newUserId, + languagelocalekey: 'en_US', + lastname: 'User', + localesidkey: 'en_US', + profileid: '12345678', + profilename: 'profileFromArgs', + timezonesidkey: 'America/Los_Angeles', + username: '1605130295132_test-j6asqt5qoprs@example.com', + }, + }; + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + const result = await createCommand.run(); + expect(result).to.deep.equal(expected); + }); + + it('works if JWT but not hyperforce', async () => { + await prepareStubs({ isJWT: true }, true); + const expected = { + orgId: testOrg.orgId, + permissionSetAssignments: [], + fields: { + alias: 'testAlias', + email: username, + emailencodingkey: 'UTF-8', + id: newUserId, + languagelocalekey: 'en_US', + lastname: 'User', + localesidkey: 'en_US', + profileid: '12345678', + profilename: 'profileFromArgs', + timezonesidkey: 'America/Los_Angeles', + username: '1605130295132_test-j6asqt5qoprs@example.com', + }, + }; + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); const result = await createCommand.run(); expect(result).to.deep.equal(expected); }); @@ -232,8 +286,6 @@ describe('org:create:user', () => { '--json', '--target-org', testOrg.username, - '--target-dev-hub', - 'devhub@test.com', '--definition-file', 'parent/child/file.json', 'email=me@my.org', @@ -245,38 +297,58 @@ describe('org:create:user', () => { expect(result).to.deep.equal(expected); }); - it('will handle a failed `createUser` call with a licenseLimitExceeded error', async () => { - await prepareStubs({ license: true }, false); - const createCommand = new CreateUserCommand( - ['--json', '--target-org', testOrg.username, '--target-dev-hub', 'devhub@test.com'], - {} as Config - ); - try { - await createCommand.run(); - expect.fail('should have thrown an error'); - } catch (e) { - assert(e instanceof Error); - expect(e.message).to.equal('There are no available user licenses for the user profile "testName".'); - expect(e.name).to.equal('licenseLimitExceeded'); - } - }); + describe('exceptions', () => { + it('throws if org is not a scratchOrg', async () => { + await prepareStubs({ nonScratch: true }, false); + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + try { + await createCommand.run(); + expect.fail('should have thrown an error'); + } catch (e) { + assert(e instanceof Error); + expect(e.name).to.equal('NonScratchOrgError'); + } + }); - it('will handle a failed `createUser` call with a DuplicateUsername error', async () => { - await prepareStubs({ duplicate: true }, true); - const createCommand = new CreateUserCommand( - ['--json', '--target-org', testOrg.username, '--target-dev-hub', 'devhub@test.com'], - {} as Config - ); - try { - await createCommand.run(); - expect.fail('should have thrown an error'); - } catch (e) { - assert(e instanceof Error); - expect(e.name).to.equal('duplicateUsername'); - expect(e.message).to.equal( - 'The username "1605130295132_test-j6asqt5qoprs@example.com" already exists in this or another Salesforce org. Usernames must be unique across all Salesforce orgs. Try using the --set-unique-username flag to force a unique username by appending the org ID.' - ); - } + it('throws if JWT and hyperforce', async () => { + await prepareStubs({ isJWT: true, createdOrgInstance: 'USA100S' }, false); + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + try { + await createCommand.run(); + expect.fail('should have thrown an error'); + } catch (e) { + assert(e instanceof Error); + expect(e.name).to.equal('JwtHyperforceError'); + } + }); + + it('will handle a failed `createUser` call with a licenseLimitExceeded error', async () => { + await prepareStubs({ license: true }, false); + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + try { + await createCommand.run(); + expect.fail('should have thrown an error'); + } catch (e) { + assert(e instanceof Error); + expect(e.message).to.equal('There are no available user licenses for the user profile "testName".'); + expect(e.name).to.equal('licenseLimitExceeded'); + } + }); + + it('will handle a failed `createUser` call with a DuplicateUsername error', async () => { + await prepareStubs({ duplicate: true }, true); + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + try { + await createCommand.run(); + expect.fail('should have thrown an error'); + } catch (e) { + assert(e instanceof Error); + expect(e.name).to.equal('duplicateUsername'); + expect(e.message).to.equal( + 'The username "1605130295132_test-j6asqt5qoprs@example.com" already exists in this or another Salesforce org. Usernames must be unique across all Salesforce orgs. Try using the --set-unique-username flag to force a unique username by appending the org ID.' + ); + } + }); }); it('will append the org id to the passed username if the setuniqueusername is used', async () => { @@ -299,15 +371,7 @@ describe('org:create:user', () => { }, }; const createCommand = new CreateUserCommand( - [ - '--json', - '--target-org', - testOrg.username, - '--target-dev-hub', - 'devhub@test.com', - 'username=user@cliFlag.com', - '--setuniqueusername', - ], + ['--json', '--target-org', testOrg.username, 'username=user@cliFlag.com', '--setuniqueusername'], {} as Config ); const result = await createCommand.run(); @@ -334,7 +398,7 @@ describe('org:create:user', () => { }, }; const createCommand = new CreateUserCommand( - ['--json', '--target-org', testOrg.username, '--target-dev-hub', 'devhub@test.com', '--setuniqueusername'], + ['--json', '--target-org', testOrg.username, '--setuniqueusername'], {} as Config ); const result = await createCommand.run(); From e686f8eb306e0067f1c85b4946155afa0124737a Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 22 Nov 2023 09:47:16 -0600 Subject: [PATCH 03/16] test: organize test cases --- test/commands/create.test.ts | 158 ++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 78 deletions(-) diff --git a/test/commands/create.test.ts b/test/commands/create.test.ts index 6f140c20..79625ce7 100644 --- a/test/commands/create.test.ts +++ b/test/commands/create.test.ts @@ -213,14 +213,14 @@ describe('org:create:user', () => { expect(result).to.deep.equal(expected); }); - it('works on hyperforce if non-JWT', async () => { - await prepareStubs({ createdOrgInstance: 'USA100S' }, true); + it('will merge fields from the cli args, and the definitionfile correctly, preferring cli args', async () => { + await prepareStubs({}, { generatepassword: true, permsets: ['test1', 'test2'] }); const expected = { orgId: testOrg.orgId, - permissionSetAssignments: [], + permissionSetAssignments: ['test1', 'test2'], fields: { alias: 'testAlias', - email: username, + email: 'me@my.org', emailencodingkey: 'UTF-8', id: newUserId, languagelocalekey: 'en_US', @@ -228,23 +228,35 @@ describe('org:create:user', () => { localesidkey: 'en_US', profileid: '12345678', profilename: 'profileFromArgs', + generatepassword: false, timezonesidkey: 'America/Los_Angeles', username: '1605130295132_test-j6asqt5qoprs@example.com', }, }; - const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + const createCommand = new CreateUserCommand( + [ + '--json', + '--target-org', + testOrg.username, + '--definition-file', + 'parent/child/file.json', + 'email=me@my.org', + 'generatepassword=false', + ], + {} as Config + ); const result = await createCommand.run(); expect(result).to.deep.equal(expected); }); - it('works if JWT but not hyperforce', async () => { - await prepareStubs({ isJWT: true }, true); + it('will append the org id to the passed username if the setuniqueusername is used', async () => { + await prepareStubs({}, true); const expected = { orgId: testOrg.orgId, permissionSetAssignments: [], fields: { alias: 'testAlias', - email: username, + email: 'defaultusername@test.com', emailencodingkey: 'UTF-8', id: newUserId, languagelocalekey: 'en_US', @@ -253,22 +265,25 @@ describe('org:create:user', () => { profileid: '12345678', profilename: 'profileFromArgs', timezonesidkey: 'America/Los_Angeles', - username: '1605130295132_test-j6asqt5qoprs@example.com', + username: `user@cliFlag.com.${testOrg.orgId}`, }, }; - const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + const createCommand = new CreateUserCommand( + ['--json', '--target-org', testOrg.username, 'username=user@cliFlag.com', '--setuniqueusername'], + {} as Config + ); const result = await createCommand.run(); expect(result).to.deep.equal(expected); }); - it('will merge fields from the cli args, and the definitionfile correctly, preferring cli args', async () => { - await prepareStubs({}, { generatepassword: true, permsets: ['test1', 'test2'] }); + it('will not append the org id to the username if the setuniqueusername is used but username was generated by the CLI', async () => { + await prepareStubs({}, true); const expected = { orgId: testOrg.orgId, - permissionSetAssignments: ['test1', 'test2'], + permissionSetAssignments: [], fields: { alias: 'testAlias', - email: 'me@my.org', + email: 'defaultusername@test.com', emailencodingkey: 'UTF-8', id: newUserId, languagelocalekey: 'en_US', @@ -276,27 +291,68 @@ describe('org:create:user', () => { localesidkey: 'en_US', profileid: '12345678', profilename: 'profileFromArgs', - generatepassword: false, timezonesidkey: 'America/Los_Angeles', username: '1605130295132_test-j6asqt5qoprs@example.com', }, }; const createCommand = new CreateUserCommand( - [ - '--json', - '--target-org', - testOrg.username, - '--definition-file', - 'parent/child/file.json', - 'email=me@my.org', - 'generatepassword=false', - ], + ['--json', '--target-org', testOrg.username, '--setuniqueusername'], {} as Config ); const result = await createCommand.run(); expect(result).to.deep.equal(expected); }); + describe('valid hyperforce/jwt combos', () => { + it('works on hyperforce if non-JWT', async () => { + await prepareStubs({ createdOrgInstance: 'USA100S' }, true); + const expected = { + orgId: testOrg.orgId, + permissionSetAssignments: [], + fields: { + alias: 'testAlias', + email: username, + emailencodingkey: 'UTF-8', + id: newUserId, + languagelocalekey: 'en_US', + lastname: 'User', + localesidkey: 'en_US', + profileid: '12345678', + profilename: 'profileFromArgs', + timezonesidkey: 'America/Los_Angeles', + username: '1605130295132_test-j6asqt5qoprs@example.com', + }, + }; + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + const result = await createCommand.run(); + expect(result).to.deep.equal(expected); + }); + + it('works if JWT but not hyperforce', async () => { + await prepareStubs({ isJWT: true }, true); + const expected = { + orgId: testOrg.orgId, + permissionSetAssignments: [], + fields: { + alias: 'testAlias', + email: username, + emailencodingkey: 'UTF-8', + id: newUserId, + languagelocalekey: 'en_US', + lastname: 'User', + localesidkey: 'en_US', + profileid: '12345678', + profilename: 'profileFromArgs', + timezonesidkey: 'America/Los_Angeles', + username: '1605130295132_test-j6asqt5qoprs@example.com', + }, + }; + const createCommand = new CreateUserCommand(['--json', '--target-org', testOrg.username], {} as Config); + const result = await createCommand.run(); + expect(result).to.deep.equal(expected); + }); + }); + describe('exceptions', () => { it('throws if org is not a scratchOrg', async () => { await prepareStubs({ nonScratch: true }, false); @@ -350,58 +406,4 @@ describe('org:create:user', () => { } }); }); - - it('will append the org id to the passed username if the setuniqueusername is used', async () => { - await prepareStubs({}, true); - const expected = { - orgId: testOrg.orgId, - permissionSetAssignments: [], - fields: { - alias: 'testAlias', - email: 'defaultusername@test.com', - emailencodingkey: 'UTF-8', - id: newUserId, - languagelocalekey: 'en_US', - lastname: 'User', - localesidkey: 'en_US', - profileid: '12345678', - profilename: 'profileFromArgs', - timezonesidkey: 'America/Los_Angeles', - username: `user@cliFlag.com.${testOrg.orgId}`, - }, - }; - const createCommand = new CreateUserCommand( - ['--json', '--target-org', testOrg.username, 'username=user@cliFlag.com', '--setuniqueusername'], - {} as Config - ); - const result = await createCommand.run(); - expect(result).to.deep.equal(expected); - }); - - it('will not append the org id to the username if the setuniqueusername is used but username was generated by the CLI', async () => { - await prepareStubs({}, true); - const expected = { - orgId: testOrg.orgId, - permissionSetAssignments: [], - fields: { - alias: 'testAlias', - email: 'defaultusername@test.com', - emailencodingkey: 'UTF-8', - id: newUserId, - languagelocalekey: 'en_US', - lastname: 'User', - localesidkey: 'en_US', - profileid: '12345678', - profilename: 'profileFromArgs', - timezonesidkey: 'America/Los_Angeles', - username: '1605130295132_test-j6asqt5qoprs@example.com', - }, - }; - const createCommand = new CreateUserCommand( - ['--json', '--target-org', testOrg.username, '--setuniqueusername'], - {} as Config - ); - const result = await createCommand.run(); - expect(result).to.deep.equal(expected); - }); }); From 297543e41c75f26cb63158f7ffcdf97aaf472933 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 22 Nov 2023 14:06:31 -0600 Subject: [PATCH 04/16] ci: try without parallel --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a2ba757..5c2872ac 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "prepack": "sf-prepack", "prepare": "sf-install", "test": "wireit", - "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 10", + "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000", "test:only": "wireit", "version": "oclif readme" }, From 20d21ae326da31e488a432564ded6d17fe7b0b95 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 22 Nov 2023 15:30:07 -0600 Subject: [PATCH 05/16] test: back to concurrency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c2872ac..3a2ba757 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "prepack": "sf-prepack", "prepare": "sf-install", "test": "wireit", - "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000", + "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 10", "test:only": "wireit", "version": "oclif readme" }, From 5c0abcfa1693f074cd2b6e2fc74af4a4d215fd1d Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 27 Nov 2023 09:52:58 -0600 Subject: [PATCH 06/16] refactor: use TS, reduce mutation --- src/commands/org/create/user.ts | 4 +-- src/commands/org/display/user.ts | 49 ++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/commands/org/create/user.ts b/src/commands/org/create/user.ts index 660386a8..162e0b26 100644 --- a/src/commands/org/create/user.ts +++ b/src/commands/org/create/user.ts @@ -22,7 +22,7 @@ import { UserFields, } from '@salesforce/core'; import { mapKeys, omit, toBoolean } from '@salesforce/kit'; -import { Dictionary, ensureString, getString, isArray, JsonMap } from '@salesforce/ts-types'; +import { Dictionary, ensureString, getString, JsonMap } from '@salesforce/ts-types'; import { Flags, loglevel, @@ -49,7 +49,7 @@ type FailureMsg = { const permsetsStringToArray = (fieldsPermsets: string | string[] | undefined): string[] => { if (!fieldsPermsets) return []; - return isArray(fieldsPermsets) + return Array.isArray(fieldsPermsets) ? fieldsPermsets : fieldsPermsets.split(',').map((item) => item.replace("'", '').trim()); }; diff --git a/src/commands/org/display/user.ts b/src/commands/org/display/user.ts index 0da3dcf8..db219051 100644 --- a/src/commands/org/display/user.ts +++ b/src/commands/org/display/user.ts @@ -8,7 +8,7 @@ import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import { AuthFields, Connection, Logger, Messages, StateAggregator } from '@salesforce/core'; -import { ensureString, getString } from '@salesforce/ts-types'; +import { ensureString } from '@salesforce/ts-types'; import { loglevel, optionalHubFlagWithDeprecations, @@ -75,7 +75,9 @@ export class DisplayUserCommand extends SfCommand { profileName = 'unknown'; const logger = await Logger.child(this.constructor.name); logger.debug( - `Query for the profile name failed for username: ${username} with message: ${getString(err, 'message')}` + `Query for the profile name failed for username: ${username} with message: ${ + err instanceof Error ? err.message : '' + }` ); } @@ -87,7 +89,11 @@ export class DisplayUserCommand extends SfCommand { } catch (err) { userId = 'unknown'; const logger = await Logger.child(this.constructor.name); - logger.debug(`Query for the user ID failed for username: ${username} with message: ${getString(err, 'message')}`); + logger.debug( + `Query for the user ID failed for username: ${username} with message: ${ + err instanceof Error ? err.message : '' + }` + ); } const result: DisplayUserResult = { @@ -118,24 +124,25 @@ export class DisplayUserCommand extends SfCommand { } private print(result: DisplayUserResult): void { - const columns = { - key: { header: 'key' }, - label: { header: 'label' }, - }; - type TT = { key: string; label: string }; - const tableRow: TT[] = []; - // to get proper capitalization and spacing, enter the rows - tableRow.push({ key: 'Username', label: result.username ?? 'unknown' }); - tableRow.push({ key: 'Profile Name', label: result.profileName }); - tableRow.push({ key: 'Id', label: result.id }); - tableRow.push({ key: 'Org Id', label: result.orgId }); - tableRow.push({ key: 'Access Token', label: result.accessToken ?? '' }); - tableRow.push({ key: 'Instance Url', label: result.instanceUrl ?? '' }); - tableRow.push({ key: 'Login Url', label: result.loginUrl ?? '' }); - if (result.alias) tableRow.push({ key: 'Alias', label: result.alias }); - if (result.password) tableRow.push({ key: 'Password', label: result.password }); - this.styledHeader('User Description'); - this.table(tableRow, columns); + this.table( + // to get proper capitalization and spacing, enter th e rows + [ + { key: 'Username', label: result.username ?? 'unknown' }, + { key: 'Profile Name', label: result.profileName }, + { key: 'Profile Name', label: result.profileName }, + { key: 'Id', label: result.id }, + { key: 'Org Id', label: result.orgId }, + ...(result.accessToken ? [{ key: 'Access Token', label: result.accessToken }] : []), + ...(result.instanceUrl ? [{ key: 'Instance Url', label: result.instanceUrl }] : []), + ...(result.loginUrl ? [{ key: 'Login Url', label: result.loginUrl }] : []), + ...(result.alias ? [{ key: 'Alias', label: result.alias }] : []), + ...(result.password ? [{ key: 'Password', label: result.password }] : []), + ] satisfies Array<{ key: string; label: string }>, + { + key: { header: 'key' }, + label: { header: 'label' }, + } + ); } } From 386493dc43318f6b02609e7e17bb01943f5ac0eb Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 27 Nov 2023 09:59:34 -0600 Subject: [PATCH 07/16] test: try nuts with fixed sfdx-core --- package.json | 5 ++++- yarn.lock | 36 ++++++------------------------------ 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index f5f1e0e9..2ab627d7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^3.12.0", - "@salesforce/core": "^6.2.1", + "@salesforce/core": "^6.2.2-qa.0", "@salesforce/kit": "^3.0.15", "@salesforce/sf-plugins-core": "^5.0.3", "@salesforce/ts-types": "^2.0.9" @@ -44,6 +44,9 @@ "sfdx-plugin" ], "license": "BSD-3-Clause", + "resolutions": { + "@salesforce/core": "^6.2.2-qa.0" + }, "oclif": { "commands": "./lib/commands", "bin": "sf", diff --git a/yarn.lock b/yarn.lock index 5163a634..e969b776 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,34 +927,10 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.3.20": - version "5.3.20" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.20.tgz#4e934d4551bb70423cb1c4115615bc41cffca41e" - integrity sha512-y+O6O2c8OYFDrAy2qsG+pAcNxoyL14nmBXcBRRcYA7Huj8ikK+aLJK84PuVAYdQz+hNwImQF+69IWtDkpK4Irg== - dependencies: - "@salesforce/kit" "^3.0.15" - "@salesforce/schemas" "^1.6.1" - "@salesforce/ts-types" "^2.0.9" - "@types/semver" "^7.5.4" - 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.28" - jsonwebtoken "9.0.2" - jszip "3.10.1" - pino "^8.16.0" - pino-abstract-transport "^1.0.0" - pino-pretty "^10.2.3" - proper-lockfile "^4.1.2" - semver "^7.5.4" - ts-retry-promise "^0.7.1" - -"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.1.tgz#a0b639ae154263292184dcde3f2f88845d5aadaa" - integrity sha512-oXwM1C/CoEGtS8mzmVzk5LV85c5Co5miu0NLBOUGDf8GGlF121SR3bkXoAG05vQA2Ifelb9xXp4FU1BXsCKr3w== +"@salesforce/core@^5.3.20", "@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.2-qa.0": + version "6.2.2-qa.0" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.2-qa.0.tgz#ccd9d0ca0a43bc4290bfb2eab2dca2acf1994419" + integrity sha512-4seIDFkkZFzQwC21FyEh8RXoEx8U/pHbsvjEuCuw5VHLcxrNZ70QMvvw6c82kJLvW4ZxlozD5G9eo8aUr5iK2Q== dependencies: "@salesforce/kit" "^3.0.15" "@salesforce/schemas" "^1.6.1" @@ -1277,7 +1253,7 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.4", "@types/semver@^7.5.6": +"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.6": version "7.5.6" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== @@ -5830,7 +5806,7 @@ pino-std-serializers@^6.0.0: resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz#d9a9b5f2b9a402486a5fc4db0a737570a860aab3" integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA== -pino@^8.16.0, pino@^8.16.2: +pino@^8.16.2: version "8.16.2" resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.2.tgz#7a906f2d9a8c5b4c57412c9ca95d6820bd2090cd" integrity sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg== From 55b7dc0c43602106579aeee95c253a915dc4bb67 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 4 Dec 2023 09:20:03 -0600 Subject: [PATCH 08/16] test: fix nuts via core changes --- package.json | 2 +- yarn.lock | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9cc8186e..f9fa1cb0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^3.12.0", - "@salesforce/core": "^6.2.2-qa.0", + "@salesforce/core": "^6.2.3-qa.0", "@salesforce/kit": "^3.0.15", "@salesforce/sf-plugins-core": "^5.0.5", "@salesforce/ts-types": "^2.0.9" diff --git a/yarn.lock b/yarn.lock index b4bca09d..45b44d44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -951,6 +951,30 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" +"@salesforce/core@^6.2.3-qa.0": + version "6.2.3-qa.0" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.3-qa.0.tgz#e73c9162aa7de77e07569f1d398ad85231b30dc5" + integrity sha512-WiTPVEzAD7XE1OzlTFAEQH/tSf7OkMHOJmBzJLdH6k/plX9qvbeShUbpeo4MiKfG7l4m0DFiwK1OcLfB0Yg4yA== + dependencies: + "@salesforce/kit" "^3.0.15" + "@salesforce/schemas" "^1.6.1" + "@salesforce/ts-types" "^2.0.9" + "@types/semver" "^7.5.6" + 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.16.2" + pino-abstract-transport "^1.1.0" + pino-pretty "^10.2.3" + proper-lockfile "^4.1.2" + semver "^7.5.4" + 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" @@ -4362,7 +4386,7 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -jsforce@^2.0.0-beta.28: +jsforce@^2.0.0-beta.28, jsforce@^2.0.0-beta.29: version "2.0.0-beta.29" resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.29.tgz#0b59b026eb0b90dfb199a53656af32a4c8acc48f" integrity sha512-Fq7xjOYOikyozZZDQNTfzsAdhcO0rUXwtavsjM+cCYUFiCMVOJJavgco303zOsJk3v8sdAYnGgHyKckLIhnyAg== From d47cdd26a5980207e80dc7903b99d49a6523dc31 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 4 Dec 2023 09:34:12 -0600 Subject: [PATCH 09/16] test: new core changes for nut --- package.json | 2 +- yarn.lock | 28 ++-------------------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index f9fa1cb0..2206b689 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ ], "license": "BSD-3-Clause", "resolutions": { - "@salesforce/core": "^6.2.2-qa.0" + "@salesforce/core": "^6.2.3-qa.0" }, "oclif": { "commands": "./lib/commands", diff --git a/yarn.lock b/yarn.lock index 45b44d44..95a0828e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,31 +927,7 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.3.20", "@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.2-qa.0": - version "6.2.2-qa.0" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.2-qa.0.tgz#ccd9d0ca0a43bc4290bfb2eab2dca2acf1994419" - integrity sha512-4seIDFkkZFzQwC21FyEh8RXoEx8U/pHbsvjEuCuw5VHLcxrNZ70QMvvw6c82kJLvW4ZxlozD5G9eo8aUr5iK2Q== - dependencies: - "@salesforce/kit" "^3.0.15" - "@salesforce/schemas" "^1.6.1" - "@salesforce/ts-types" "^2.0.9" - "@types/semver" "^7.5.6" - 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.28" - jsonwebtoken "9.0.2" - jszip "3.10.1" - pino "^8.16.2" - pino-abstract-transport "^1.1.0" - pino-pretty "^10.2.3" - proper-lockfile "^4.1.2" - semver "^7.5.4" - ts-retry-promise "^0.7.1" - -"@salesforce/core@^6.2.3-qa.0": +"@salesforce/core@^5.3.20", "@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.3-qa.0": version "6.2.3-qa.0" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.3-qa.0.tgz#e73c9162aa7de77e07569f1d398ad85231b30dc5" integrity sha512-WiTPVEzAD7XE1OzlTFAEQH/tSf7OkMHOJmBzJLdH6k/plX9qvbeShUbpeo4MiKfG7l4m0DFiwK1OcLfB0Yg4yA== @@ -4386,7 +4362,7 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -jsforce@^2.0.0-beta.28, jsforce@^2.0.0-beta.29: +jsforce@^2.0.0-beta.29: version "2.0.0-beta.29" resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.29.tgz#0b59b026eb0b90dfb199a53656af32a4c8acc48f" integrity sha512-Fq7xjOYOikyozZZDQNTfzsAdhcO0rUXwtavsjM+cCYUFiCMVOJJavgco303zOsJk3v8sdAYnGgHyKckLIhnyAg== From 8d3380d4109546b79c8006c0eb5d7e56821f60b2 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 4 Dec 2023 09:37:51 -0600 Subject: [PATCH 10/16] docs: messages suggestions --- messages/create.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/messages/create.md b/messages/create.md index 964adafd..40f162d3 100644 --- a/messages/create.md +++ b/messages/create.md @@ -78,12 +78,12 @@ The --target-dev-hub flag is deprecated and is no longer used by this command. T # error.nonScratchOrg -This command only works with scratch orgs. +This command works with only scratch orgs. # error.jwtHyperforce -This command does not work using JWT auth when the org is on Hyperforce. +This command doesn't work when authorizing an org using the JWT flow if the org is on Hyperforce. # error.jwtHyperforce.actions -- Auth to your DevHub with `org login web` or `org login sfdx-url`. Scratch orgs you create that way will work with `org create user`. +- Authorize your Dev Hub with either the `org login web` or `org login sfdx-url` command. You can then successfully use the `org create user` command on scratch orgs that you create with your Dev Hub. From d6a2aa17d34e44d1d9473ef09f4c8a8bef04bb9d Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 4 Dec 2023 10:30:17 -0600 Subject: [PATCH 11/16] test: with core fixes --- package.json | 2 +- src/commands/org/create/user.ts | 14 +++++++------- yarn.lock | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 2206b689..b3d141ca 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^3.12.0", - "@salesforce/core": "^6.2.3-qa.0", + "@salesforce/core": "^6.2.3-qa.1", "@salesforce/kit": "^3.0.15", "@salesforce/sf-plugins-core": "^5.0.5", "@salesforce/ts-types": "^2.0.9" diff --git a/src/commands/org/create/user.ts b/src/commands/org/create/user.ts index 162e0b26..143054a2 100644 --- a/src/commands/org/create/user.ts +++ b/src/commands/org/create/user.ts @@ -47,13 +47,6 @@ type FailureMsg = { message: string; }; -const permsetsStringToArray = (fieldsPermsets: string | string[] | undefined): string[] => { - if (!fieldsPermsets) return []; - return Array.isArray(fieldsPermsets) - ? fieldsPermsets - : fieldsPermsets.split(',').map((item) => item.replace("'", '').trim()); -}; - export class CreateUserCommand extends SfCommand { public static strict = false; public static readonly deprecateAliases = true; @@ -333,3 +326,10 @@ const getValidatedConnection = async (targetOrg: Org, apiVersion?: string): Prom } return conn; }; + +const permsetsStringToArray = (fieldsPermsets: string | string[] | undefined): string[] => { + if (!fieldsPermsets) return []; + return Array.isArray(fieldsPermsets) + ? fieldsPermsets + : fieldsPermsets.split(',').map((item) => item.replace("'", '').trim()); +}; diff --git a/yarn.lock b/yarn.lock index 95a0828e..e4f89d62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,10 +927,10 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.3.20", "@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.3-qa.0": - version "6.2.3-qa.0" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.3-qa.0.tgz#e73c9162aa7de77e07569f1d398ad85231b30dc5" - integrity sha512-WiTPVEzAD7XE1OzlTFAEQH/tSf7OkMHOJmBzJLdH6k/plX9qvbeShUbpeo4MiKfG7l4m0DFiwK1OcLfB0Yg4yA== +"@salesforce/core@^5.3.20", "@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.3-qa.0", "@salesforce/core@^6.2.3-qa.1": + version "6.2.3-qa.1" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.3-qa.1.tgz#8defc764cd922fee22cd598ef67900fa25fe903f" + integrity sha512-WntKezbRycZeVE+GpTfjqHPudQg/mYSdBpbklimGbx7fGD0T/t9vZlx2HMUih6PmEoqwnqKMfm/LusE4BuE7Tg== dependencies: "@salesforce/kit" "^3.0.15" "@salesforce/schemas" "^1.6.1" From 2d9476e99a6a00e0c38fe2864c3e79276cc7c3ba Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 4 Dec 2023 10:57:45 -0600 Subject: [PATCH 12/16] chore: put core back to latest, no resolutions --- package.json | 5 +---- yarn.lock | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index b3d141ca..9241c715 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^3.12.0", - "@salesforce/core": "^6.2.3-qa.1", + "@salesforce/core": "^6.2.2", "@salesforce/kit": "^3.0.15", "@salesforce/sf-plugins-core": "^5.0.5", "@salesforce/ts-types": "^2.0.9" @@ -44,9 +44,6 @@ "sfdx-plugin" ], "license": "BSD-3-Clause", - "resolutions": { - "@salesforce/core": "^6.2.3-qa.0" - }, "oclif": { "commands": "./lib/commands", "bin": "sf", diff --git a/yarn.lock b/yarn.lock index e4f89d62..280ffa8b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,10 +927,34 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.3.20", "@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.3-qa.0", "@salesforce/core@^6.2.3-qa.1": - version "6.2.3-qa.1" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.3-qa.1.tgz#8defc764cd922fee22cd598ef67900fa25fe903f" - integrity sha512-WntKezbRycZeVE+GpTfjqHPudQg/mYSdBpbklimGbx7fGD0T/t9vZlx2HMUih6PmEoqwnqKMfm/LusE4BuE7Tg== +"@salesforce/core@^5.3.20": + version "5.3.20" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.20.tgz#4e934d4551bb70423cb1c4115615bc41cffca41e" + integrity sha512-y+O6O2c8OYFDrAy2qsG+pAcNxoyL14nmBXcBRRcYA7Huj8ikK+aLJK84PuVAYdQz+hNwImQF+69IWtDkpK4Irg== + dependencies: + "@salesforce/kit" "^3.0.15" + "@salesforce/schemas" "^1.6.1" + "@salesforce/ts-types" "^2.0.9" + "@types/semver" "^7.5.4" + 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.28" + jsonwebtoken "9.0.2" + jszip "3.10.1" + pino "^8.16.0" + pino-abstract-transport "^1.0.0" + pino-pretty "^10.2.3" + proper-lockfile "^4.1.2" + semver "^7.5.4" + ts-retry-promise "^0.7.1" + +"@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.2": + version "6.2.2" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.2.tgz#c390c7c407e8916ad85a3e300d9d9e4fecfba207" + integrity sha512-R2ptk/+KSWDJOqdInxfzPTLF3V//vFtD4vQcjWIK9NaGCCq4ZwiF2gMpkBcKgDQneLUmva2NcmnzF3c51zQp5A== dependencies: "@salesforce/kit" "^3.0.15" "@salesforce/schemas" "^1.6.1" @@ -1253,7 +1277,7 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.6": +"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.4", "@types/semver@^7.5.6": version "7.5.6" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== @@ -4362,7 +4386,7 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -jsforce@^2.0.0-beta.29: +jsforce@^2.0.0-beta.28, jsforce@^2.0.0-beta.29: version "2.0.0-beta.29" resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.29.tgz#0b59b026eb0b90dfb199a53656af32a4c8acc48f" integrity sha512-Fq7xjOYOikyozZZDQNTfzsAdhcO0rUXwtavsjM+cCYUFiCMVOJJavgco303zOsJk3v8sdAYnGgHyKckLIhnyAg== @@ -5806,7 +5830,7 @@ pino-std-serializers@^6.0.0: resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz#d9a9b5f2b9a402486a5fc4db0a737570a860aab3" integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA== -pino@^8.16.2: +pino@^8.16.0, pino@^8.16.2: version "8.16.2" resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.2.tgz#7a906f2d9a8c5b4c57412c9ca95d6820bd2090cd" integrity sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg== From ce57021aadbdc531693e9637df54a78b3882eb02 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Tue, 5 Dec 2023 11:02:43 -0700 Subject: [PATCH 13/16] chore: merge main --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 67bedd0d..e3d614d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -951,7 +951,7 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" -"@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.1", "@salesforce/core@^6.2.2": +"@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.2": version "6.2.2" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.2.tgz#c390c7c407e8916ad85a3e300d9d9e4fecfba207" integrity sha512-R2ptk/+KSWDJOqdInxfzPTLF3V//vFtD4vQcjWIK9NaGCCq4ZwiF2gMpkBcKgDQneLUmva2NcmnzF3c51zQp5A== From 898eaaa33f0d009916ef1bbb543ca36314a1ee4c Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Tue, 5 Dec 2023 11:51:36 -0700 Subject: [PATCH 14/16] chore: bump core version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 812a03a0..95d63691 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^3.12.0", - "@salesforce/core": "^6.2.2", + "@salesforce/core": "^6.3.0", "@salesforce/kit": "^3.0.15", "@salesforce/sf-plugins-core": "^5.0.5", "@salesforce/ts-types": "^2.0.9" From 0ffe99ecbb79576194f48bb14c9732b9d3c963f3 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Tue, 5 Dec 2023 11:52:33 -0700 Subject: [PATCH 15/16] chore: bump core version with lock file --- yarn.lock | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/yarn.lock b/yarn.lock index e3d614d5..45701125 100644 --- a/yarn.lock +++ b/yarn.lock @@ -975,6 +975,30 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" +"@salesforce/core@^6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.3.0.tgz#94613dcdcf70e8061bbdc4aa9f0f0ad605ebb51e" + integrity sha512-PLPDWRXbLi+ECNER6NHLTK/Ed9tMndmyVbBTE0/vyErXtCCPF6aSNyUmvFT1NrIZRrYA9p/QRHOtYUO7kPG4zg== + dependencies: + "@salesforce/kit" "^3.0.15" + "@salesforce/schemas" "^1.6.1" + "@salesforce/ts-types" "^2.0.9" + "@types/semver" "^7.5.6" + 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.16.2" + pino-abstract-transport "^1.1.0" + pino-pretty "^10.2.3" + proper-lockfile "^4.1.2" + semver "^7.5.4" + 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" From f024e3e8d6bc5a09605b5d4b0e9785047a72206e Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Tue, 5 Dec 2023 11:56:05 -0700 Subject: [PATCH 16/16] chore: bump core version with lock file deduped --- yarn.lock | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/yarn.lock b/yarn.lock index 45701125..8ae053f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -951,31 +951,7 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" -"@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.2": - version "6.2.2" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.2.tgz#c390c7c407e8916ad85a3e300d9d9e4fecfba207" - integrity sha512-R2ptk/+KSWDJOqdInxfzPTLF3V//vFtD4vQcjWIK9NaGCCq4ZwiF2gMpkBcKgDQneLUmva2NcmnzF3c51zQp5A== - dependencies: - "@salesforce/kit" "^3.0.15" - "@salesforce/schemas" "^1.6.1" - "@salesforce/ts-types" "^2.0.9" - "@types/semver" "^7.5.6" - 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.16.2" - pino-abstract-transport "^1.1.0" - pino-pretty "^10.2.3" - proper-lockfile "^4.1.2" - semver "^7.5.4" - ts-retry-promise "^0.7.1" - -"@salesforce/core@^6.3.0": +"@salesforce/core@^6.1.0", "@salesforce/core@^6.2.0", "@salesforce/core@^6.2.2", "@salesforce/core@^6.3.0": version "6.3.0" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.3.0.tgz#94613dcdcf70e8061bbdc4aa9f0f0ad605ebb51e" integrity sha512-PLPDWRXbLi+ECNER6NHLTK/Ed9tMndmyVbBTE0/vyErXtCCPF6aSNyUmvFT1NrIZRrYA9p/QRHOtYUO7kPG4zg==