File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 178
178
},
179
179
"version" : {
180
180
"type" : " string" ,
181
- "description" : " The version specification as used for the simple form"
181
+ "description" : " The version specification as used for the simple form or the commit hash of the git repository specified in \" repository \" "
182
182
},
183
183
"path" : {
184
184
"type" : " string" ,
185
185
"description" : " Use a folder to source a package from"
186
+ },
187
+ "repository" : {
188
+ "type" : " string" ,
189
+ "description" : " Path to a git repository with a leading `git+` prefix like `git+https://github.com/dlang-community/gitcompatibledubpackage.git`"
190
+ }
191
+ },
192
+ "oneOf" : [
193
+ {
194
+ "required" : [" path" ]
195
+ },
196
+ {
197
+ "required" : [" version" ]
198
+ },
199
+ {
200
+ "required" : [" repository" , " version" ]
186
201
}
187
- }
202
+ ]
188
203
}
189
204
]
190
205
},
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ function pad3(n: number) {
39
39
function completeDubVersion ( info : SDLCompletionInfo ) : SDLCompletionResult {
40
40
if ( ! info . currentSDLObject . values || info . currentSDLObject . values . length != 1 )
41
41
return [ ] ;
42
+ if ( info . currentSDLObject . attributes . repository )
43
+ return [ ] ; // no autocompletion of version when repository is set
42
44
var packageName = info . currentSDLObject . values [ 0 ] . value ;
43
45
return new Promise ( ( resolve ) => {
44
46
getPackageInfo ( packageName ) . then ( json => {
@@ -317,7 +319,7 @@ const buildSettings: CompletionTagMap = {
317
319
} ,
318
320
attributes : {
319
321
version : {
320
- description : "The version specification as used for the simple form" ,
322
+ description : "The version specification as used for the simple form or the commit hash of the git repository specified in \"repository\" " ,
321
323
values : {
322
324
type : "string" ,
323
325
pattern : {
@@ -331,6 +333,12 @@ const buildSettings: CompletionTagMap = {
331
333
type : "string"
332
334
}
333
335
} ,
336
+ repository : {
337
+ description : "Path to a git repository with a leading `git+` prefix like `git+https://github.com/dlang-community/gitcompatibledubpackage.git`" ,
338
+ values : {
339
+ type : "string"
340
+ }
341
+ } ,
334
342
optional : {
335
343
description : "Indicates an optional dependency" ,
336
344
values : {
You can’t perform that action at this time.
0 commit comments