File tree Expand file tree Collapse file tree 6 files changed +2751
-120
lines changed Expand file tree Collapse file tree 6 files changed +2751
-120
lines changed Original file line number Diff line number Diff line change 22
22
"@semantic-release/changelog" : " ^5.0.0" ,
23
23
"@semantic-release/git" : " ^9.0.0" ,
24
24
"husky" : " ^4.2.3" ,
25
+ "salesforcedx" : " ^48.4.1" ,
25
26
"semantic-release" : " ^17.0.4"
26
27
},
27
28
"engines" : {
49
50
}
50
51
},
51
52
"devPlugins" : [
52
- " @oclif/plugin-help"
53
+ " @oclif/plugin-help" ,
54
+ " salesforcedx"
53
55
]
54
56
},
55
57
"repository" : " forcedotcom/plugin-command-reference" ,
62
64
"format" : " yarn sfdx-format" ,
63
65
"lint" : " yarn sfdx-lint" ,
64
66
"postpack" : " rm -f oclif.manifest.json" ,
67
+ "pretest" : " ./bin/run commandreference:generate --plugins salesforcedx --outputdir test/tmp" ,
65
68
"posttest" : " tslint -p test -t stylish" ,
66
69
"prepack" : " yarn sfdx-build" ,
67
70
"test" : " yarn sfdx-test" ,
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ export class Command extends Ditamap {
26
26
if ( ! flag . longDescription ) {
27
27
events . emit (
28
28
'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.`
32
32
) ;
33
33
}
34
34
return Object . assign ( flag , {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export class MainTopicIntro extends Ditamap {
23
23
trailblazerCommunityName = community . name ;
24
24
}
25
25
26
- if ( ! subTopicMeta . longDescription ) {
26
+ if ( ! subTopicMeta . longDescription && ! subTopicMeta . external ) {
27
27
events . emit (
28
28
'warning' ,
29
29
`No long description for topic ${ chalk . bold (
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class Docs {
48
48
public async populateTopic ( topic : string , subtopics : Dictionary < Dictionary | Dictionary [ ] > ) {
49
49
const topicMeta = ensureJsonMap ( this . topicMeta [ topic ] ) ;
50
50
let description = asString ( topicMeta . longDescription ) ;
51
- if ( ! description ) {
51
+ if ( ! description && ! topicMeta . external ) {
52
52
description = asString ( topicMeta . description ) ;
53
53
if ( ! description ) {
54
54
events . emit (
Original file line number Diff line number Diff line change @@ -25,15 +25,13 @@ function loadTestDitamapFile(path: string) {
25
25
return readFileSync ( join ( testFilesPath , path ) , 'utf8' ) ;
26
26
}
27
27
28
- describe . skip ( 'salesforcedx' , ( ) => {
28
+ describe ( 'salesforcedx' , ( ) => {
29
29
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
+ }
37
35
} ) ;
38
36
after ( async ( ) => {
39
37
await fs . remove ( testFilesPath ) ;
You can’t perform that action at this time.
0 commit comments