File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 "@semantic-release/changelog" : " ^5.0.0" ,
2323 "@semantic-release/git" : " ^9.0.0" ,
2424 "husky" : " ^4.2.3" ,
25+ "salesforcedx" : " ^48.4.1" ,
2526 "semantic-release" : " ^17.0.4"
2627 },
2728 "engines" : {
4950 }
5051 },
5152 "devPlugins" : [
52- " @oclif/plugin-help"
53+ " @oclif/plugin-help" ,
54+ " salesforcedx"
5355 ]
5456 },
5557 "repository" : " forcedotcom/plugin-command-reference" ,
6264 "format" : " yarn sfdx-format" ,
6365 "lint" : " yarn sfdx-lint" ,
6466 "postpack" : " rm -f oclif.manifest.json" ,
67+ "pretest" : " ./bin/run commandreference:generate --plugins salesforcedx --outputdir test/tmp" ,
6568 "posttest" : " tslint -p test -t stylish" ,
6669 "prepack" : " yarn sfdx-build" ,
6770 "test" : " yarn sfdx-test" ,
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ export class Command extends Ditamap {
2626 if ( ! flag . longDescription ) {
2727 events . emit (
2828 'warning' ,
29- `No flag longDescription for command ${ chalk . bold (
30- command . id
31- ) } on flag ${ flagName } . That command owner must add the longDescription to the flag definition.`
29+ `No flag longDescription for command " ${ chalk . bold ( command . id ) } " on flag " ${ chalk . bold (
30+ flagName
31+ ) } " . That command owner must add the longDescription to the flag definition.`
3232 ) ;
3333 }
3434 return Object . assign ( flag , {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export class MainTopicIntro extends Ditamap {
2323 trailblazerCommunityName = community . name ;
2424 }
2525
26- if ( ! subTopicMeta . longDescription ) {
26+ if ( ! subTopicMeta . longDescription && ! subTopicMeta . external ) {
2727 events . emit (
2828 'warning' ,
2929 `No long description for topic ${ chalk . bold (
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class Docs {
4848 public async populateTopic ( topic : string , subtopics : Dictionary < Dictionary | Dictionary [ ] > ) {
4949 const topicMeta = ensureJsonMap ( this . topicMeta [ topic ] ) ;
5050 let description = asString ( topicMeta . longDescription ) ;
51- if ( ! description ) {
51+ if ( ! description && ! topicMeta . external ) {
5252 description = asString ( topicMeta . description ) ;
5353 if ( ! description ) {
5454 events . emit (
Original file line number Diff line number Diff line change @@ -25,15 +25,13 @@ function loadTestDitamapFile(path: string) {
2525 return readFileSync ( join ( testFilesPath , path ) , 'utf8' ) ;
2626}
2727
28- describe . skip ( 'salesforcedx' , ( ) => {
28+ describe ( 'salesforcedx' , ( ) => {
2929 before ( async ( ) => {
30- await require ( '@oclif/command' ) . run ( [
31- 'commandreference:generate' ,
32- '--plugins' ,
33- 'salesforcedx' ,
34- '--outputdir' ,
35- testFilesPath
36- ] ) ;
30+ try {
31+ await fs . access ( testFilesPath ) ;
32+ } catch ( e ) {
33+ throw new Error ( 'Could not read generated test docs. Ensure the "pretest" has run or run it manually.' ) ;
34+ }
3735 } ) ;
3836 after ( async ( ) => {
3937 await fs . remove ( testFilesPath ) ;
You can’t perform that action at this time.
0 commit comments