Skip to content

[DO NOT MERGE]: add plugin-user and a UT for asserting default org behavior #652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sfdevrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"wireit": {
"test:command-reference": {
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference generate --plugins auth --outputdir test/tmp",
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference generate --plugins auth --plugins user --outputdir test/tmp",
"files": ["src/**/*.ts", "messages/**", "package.json"],
"output": ["test/tmp"]
},
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@oclif/plugin-help": "^6.0.22",
"@salesforce/dev-scripts": "^9.1.2",
"@salesforce/plugin-auth": "^3.6.16",
"@salesforce/plugin-user": "^3.5.11",
"@types/debug": "^4.1.12",
"eslint-plugin-sf-plugin": "^1.18.4",
"oclif": "^4.11.2",
Expand Down Expand Up @@ -57,7 +58,8 @@
},
"devPlugins": [
"@oclif/plugin-help",
"@salesforce/plugin-auth"
"@salesforce/plugin-auth",
"@salesforce/plugin-user"
]
},
"repository": "salesforcecli/plugin-command-reference",
Expand Down Expand Up @@ -157,7 +159,7 @@
]
},
"test:command-reference": {
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference generate --plugins auth --outputdir test/tmp",
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference generate --plugins auth --plugins user --outputdir test/tmp",
"files": [
"src/**/*.ts",
"messages/**",
Expand Down
6 changes: 5 additions & 1 deletion test/unit/endtoend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function loadTestDitamapFile(path: string) {
return readFileSync(join(testFilesPath, path), 'utf8');
}

describe('plugin-auth', () => {
describe('plugin-auth and user', () => {
before(async () => {
try {
await access(testFilesPath);
Expand All @@ -38,6 +38,10 @@ describe('plugin-auth', () => {
after(async () => {
await rm(testFilesPath, { recursive: true });
});
it('produces no [object Object] nonsense for default flags', () => {
const dita = loadTestDitamapFile(join('org', 'cli_reference_org_create_user_unified.xml'));
expect(dita.includes('[object Object]')).to.be.false;
});
it('creates with spaced commands', async () => {
const dita = loadTestDitamapFile(join('org', 'cli_reference_org_login_jwt_unified.xml'));
expect(dita.includes('<title><codeph otherprops="nolang">org login jwt')).to.be.true;
Expand Down
44 changes: 15 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,17 @@
proxy-agent "^6.4.0"
semver "^7.6.0"

"@salesforce/plugin-user@^3.5.11":
version "3.5.11"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-user/-/plugin-user-3.5.11.tgz#839796a7f17562ad9ece2c69d4dfdb5bc033f4d9"
integrity sha512-GA81RgZ5KMBuK2MEsYPCgRJP6U371Zvr0qxZUmXpDiuC8rjp9EqPl/1s4BfFVzB8emQWmFXxejSqCZz5FJh1dg==
dependencies:
"@oclif/core" "^3.26.6"
"@salesforce/core" "^7.3.8"
"@salesforce/kit" "^3.1.0"
"@salesforce/sf-plugins-core" "^9.0.12"
"@salesforce/ts-types" "^2.0.9"

"@salesforce/prettier-config@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@salesforce/prettier-config/-/prettier-config-0.0.3.tgz#ba648d4886bb38adabe073dbea0b3a91b3753bb0"
Expand All @@ -1888,7 +1899,7 @@
resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.9.0.tgz#ba477a112653a20b4edcf989c61c57bdff9aa3ca"
integrity sha512-LiN37zG5ODT6z70sL1fxF7BQwtCX9JOWofSU8iliSNIM+WDEeinnoFtVqPInRSNt8I0RiJxIKCrqstsmQRBNvA==

"@salesforce/sf-plugins-core@^9.0.10", "@salesforce/sf-plugins-core@^9.0.13", "@salesforce/sf-plugins-core@^9.0.7":
"@salesforce/sf-plugins-core@^9.0.10", "@salesforce/sf-plugins-core@^9.0.12", "@salesforce/sf-plugins-core@^9.0.13", "@salesforce/sf-plugins-core@^9.0.7":
version "9.0.14"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-9.0.14.tgz#12a31b81692579ce2ed478bf886a53255ca62c35"
integrity sha512-sxiLFtjfViOOSh6tSZKiKGQUIYZYkrz0S33Qg/s9EtQM0hBCstDUbI+1QqmafnolHQRq2tTYGoj//lko6AzHtA==
Expand Down Expand Up @@ -7377,16 +7388,7 @@ srcset@^5.0.0:
resolved "https://registry.yarnpkg.com/srcset/-/srcset-5.0.0.tgz#9df6c3961b5b44a02532ce6ae4544832609e2e3f"
integrity sha512-SqEZaAEhe0A6ETEa9O1IhSPC7MdvehZtCnTR0AftXk3QhY2UNgb+NApFOUPZILXk/YTDfFxMTNJOBpzrJsEdIA==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -7445,14 +7447,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -7977,7 +7972,7 @@ workerpool@6.2.1:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -7995,15 +7990,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down
Loading