Skip to content

Commit

Permalink
fix(deps): devScripts update (#646)
Browse files Browse the repository at this point in the history
* chore: updates from devScripts

* chore: snapshot

* test: test what it says it's going to test

* chore: bump core

* style: remove comments

---------

Co-authored-by: mshanemc <[email protected]>
  • Loading branch information
svc-cli-bot and mshanemc authored Jun 5, 2023
1 parent 27ed803 commit 275dddd
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 162 deletions.
1 change: 1 addition & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"require": "ts-node/register,source-map-support/register",
"watch-extensions": "ts",
"watch-files": ["src", "test"],
"recursive": true,
"reporter": "spec",
"timeout": 5000
Expand Down
44 changes: 35 additions & 9 deletions command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,41 @@
"target-dev-hub",
"target-org"
],
"alias": []
"alias": [],
"flagChars": ["c", "l", "o", "u", "v"],
"flagAliases": ["apiversion", "onbehalfof", "targetdevhubusername", "targetusername"]
},
{
"command": "force:user:permset:assign",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "on-behalf-of", "perm-set-name", "target-org"],
"alias": []
"alias": [],
"flagChars": ["n", "o", "u"],
"flagAliases": ["apiversion", "onbehalfof", "permsetname", "targetusername"]
},
{
"command": "force:user:permsetlicense:assign",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "name", "on-behalf-of", "target-org"],
"alias": []
"alias": [],
"flagChars": ["b", "n", "u"],
"flagAliases": ["apiversion", "onbehalfof", "perm-set-license", "psl", "targetusername"]
},
{
"command": "org:assign:permset",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
"alias": []
"alias": [],
"flagChars": ["b", "n", "o"],
"flagAliases": ["onbehalfof", "permsetname"]
},
{
"command": "org:assign:permsetlicense",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
"alias": []
"alias": [],
"flagChars": ["b", "n", "o"],
"flagAliases": ["onbehalfof", "perm-set-license", "psl"]
},
{
"command": "org:create:user",
Expand All @@ -51,24 +61,40 @@
"target-dev-hub",
"target-org"
],
"alias": ["force:user:create"]
"alias": ["force:user:create"],
"flagChars": ["a", "f", "o", "s", "v"],
"flagAliases": [
"apiversion",
"definitionfile",
"setalias",
"setuniqueusername",
"targetdevhubusername",
"targetusername",
"u"
]
},
{
"command": "org:display:user",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "target-dev-hub", "target-org"],
"alias": ["force:user:display"]
"alias": ["force:user:display"],
"flagChars": ["o", "v"],
"flagAliases": ["apiversion", "targetdevhubusername", "targetusername", "u"]
},
{
"command": "org:generate:password",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "complexity", "json", "length", "on-behalf-of", "target-org"],
"alias": []
"alias": [],
"flagChars": ["b", "c", "l", "o"],
"flagAliases": ["onbehalfof"]
},
{
"command": "org:list:users",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "target-dev-hub", "target-org"],
"alias": ["force:user:list"]
"alias": ["force:user:list"],
"flagChars": ["o", "v"],
"flagAliases": ["apiversion", "targetusername", "u"]
}
]
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^2.8.2",
"@salesforce/core": "^4.0.1",
"@salesforce/core": "^4.1.0",
"@salesforce/kit": "^3.0.2",
"@salesforce/sf-plugins-core": "^3.0.2",
"@salesforce/ts-types": "^2.0.2",
"tslib": "^2"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^3.3.15",
"@salesforce/cli-plugins-testkit": "^3.4.0",
"@oclif/plugin-command-snapshot": "^4.0.2",
"@salesforce/cli-plugins-testkit": "^4.0.1",
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^5.3.0",
"@salesforce/plugin-command-reference": "^2.4.4",
"@salesforce/dev-scripts": "^5.4.2",
"@salesforce/plugin-command-reference": "^3.0.2",
"@salesforce/plugin-source": "^2.10.12",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "^1.4.7",
Expand All @@ -33,18 +33,18 @@
"eslint-config-salesforce": "^2.0.1",
"eslint-config-salesforce-license": "^0.2.0",
"eslint-config-salesforce-typescript": "^1.1.1",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^43.0.5",
"eslint-plugin-sf-plugin": "^1.15.5",
"eslint-plugin-sf-plugin": "^1.15.6",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"oclif": "^3.9.0",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.0",
"shx": "0.3.4",
"sinon": "10.0.0",
"sinon": "^15.1.0",
"ts-node": "^10.0.0",
"typescript": "^4.9.5",
"wireit": "^0.9.5"
Expand Down Expand Up @@ -244,4 +244,4 @@
"output": []
}
}
}
}
42 changes: 25 additions & 17 deletions test/commands/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,23 @@ describe('org:create:user', () => {

it('will properly merge fields regardless of capitalization', async () => {
// notice the varied capitalization
$$.SANDBOX.stub(fs.promises, 'readFile').resolves(
JSON.stringify({
id: originalUserId,
Username: '[email protected]',
Alias: 'testAlias',
Email: username,
EmailEncodingKey: 'UTF-8',
LanguageLocaleKey: 'en_US',
localeSidKey: 'en_US',
ProfileId: '00e2D000000bNexWWR',
LastName: 'User',
timeZoneSidKey: 'America/Los_Angeles',
permsets: ['permset1', 'permset2'],
})
);
$$.SANDBOX.stub(fs.promises, 'readFile')
.withArgs('testing')
.resolves(
JSON.stringify({
id: originalUserId,
Username: '[email protected]',
Alias: 'testAlias',
Email: username,
EmailEncodingKey: 'UTF-8',
LanguageLocaleKey: 'en_US',
localeSidKey: 'en_US',
ProfileId: '00e2D000000bNexWWR',
LastName: 'User',
timeZoneSidKey: 'America/Los_Angeles',
permsets: ['permset1', 'permset2'],
})
);

const createCommand = new CreateUserCommand(['-f', 'userConfig.json'], {} as Config);

Expand Down Expand Up @@ -131,7 +133,11 @@ describe('org:create:user', () => {
if (readsFile) {
$$.SANDBOXES.CONNECTION.stub(Connection.prototype, 'singleRecordQuery').resolves({ Id: '12345678' });
$$.SANDBOX.stub(Logger.prototype, 'debug');
$$.SANDBOX.stub(fs.promises, 'readFile').resolves(JSON.stringify(readsFile));
if (typeof readsFile !== 'boolean') {
const fsStub = $$.SANDBOX.stub(fs.promises, 'readFile');
fsStub.withArgs('parent/child/file.json').resolves(JSON.stringify(readsFile));
fsStub.callThrough();
}
}
}

Expand All @@ -151,7 +157,7 @@ describe('org:create:user', () => {
localesidkey: 'en_US',
generatepassword: true,
profileid: '12345678',
profilename: 'profileFromArgs',
profilename: 'profileFromFile',
timezonesidkey: 'America/Los_Angeles',
username: '[email protected]',
},
Expand All @@ -163,6 +169,8 @@ describe('org:create:user', () => {
testOrg.username,
'--target-dev-hub',
'[email protected]',
'--definition-file',
'parent/child/file.json',
"permsets='permCLI, permCLI2'",
'generatepassword=true',
],
Expand Down
Loading

0 comments on commit 275dddd

Please sign in to comment.