Skip to content

Commit cf5079b

Browse files
authored
Merge pull request #309 from microsoft/automated/update-api-docs
docs: update API documentation
2 parents 6fb1477 + 4b56171 commit cf5079b

23 files changed

+644
-8
lines changed

websites/api.rushstack.io/data/api_nav.json

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,6 +4009,11 @@
40094009
"label": "loadFromFile",
40104010
"id": "pages/rush-lib.commonversionsconfiguration.loadfromfile"
40114011
},
4012+
{
4013+
"type": "doc",
4014+
"label": "loadFromFileAsync",
4015+
"id": "pages/rush-lib.commonversionsconfiguration.loadfromfileasync"
4016+
},
40124017
{
40134018
"type": "doc",
40144019
"label": "preferredVersions",
@@ -4018,6 +4023,11 @@
40184023
"type": "doc",
40194024
"label": "save",
40204025
"id": "pages/rush-lib.commonversionsconfiguration.save"
4026+
},
4027+
{
4028+
"type": "doc",
4029+
"label": "saveAsync",
4030+
"id": "pages/rush-lib.commonversionsconfiguration.saveasync"
40214031
}
40224032
]
40234033
},
@@ -4889,9 +4899,25 @@
48894899
]
48904900
},
48914901
{
4892-
"type": "doc",
4902+
"type": "category",
48934903
"label": "IGlobalCommand",
4894-
"id": "pages/rush-lib.iglobalcommand"
4904+
"items": [
4905+
{
4906+
"type": "doc",
4907+
"label": "(members)",
4908+
"id": "pages/rush-lib.iglobalcommand"
4909+
},
4910+
{
4911+
"type": "doc",
4912+
"label": "getCustomParametersByLongName",
4913+
"id": "pages/rush-lib.iglobalcommand.getcustomparametersbylongname"
4914+
},
4915+
{
4916+
"type": "doc",
4917+
"label": "setHandled",
4918+
"id": "pages/rush-lib.iglobalcommand.sethandled"
4919+
}
4920+
]
48954921
},
48964922
{
48974923
"type": "category",
@@ -6152,6 +6178,11 @@
61526178
"label": "load",
61536179
"id": "pages/rush-lib.packagejsoneditor.load"
61546180
},
6181+
{
6182+
"type": "doc",
6183+
"label": "loadAsync",
6184+
"id": "pages/rush-lib.packagejsoneditor.loadasync"
6185+
},
61556186
{
61566187
"type": "doc",
61576188
"label": "name",
@@ -6172,6 +6203,11 @@
61726203
"label": "saveIfModified",
61736204
"id": "pages/rush-lib.packagejsoneditor.saveifmodified"
61746205
},
6206+
{
6207+
"type": "doc",
6208+
"label": "saveIfModifiedAsync",
6209+
"id": "pages/rush-lib.packagejsoneditor.saveifmodifiedasync"
6210+
},
61756211
{
61766212
"type": "doc",
61776213
"label": "saveToObject",
@@ -7243,6 +7279,11 @@
72437279
"label": "globalCommandKind",
72447280
"id": "pages/rush-lib.rushconstants.globalcommandkind"
72457281
},
7282+
{
7283+
"type": "doc",
7284+
"label": "globalPluginCommandKind",
7285+
"id": "pages/rush-lib.rushconstants.globalplugincommandkind"
7286+
},
72467287
{
72477288
"type": "doc",
72487289
"label": "hashDelimiter",
@@ -7850,11 +7891,21 @@
78507891
"label": "setDependenciesBeforeCommit",
78517892
"id": "pages/rush-lib.versionpolicy.setdependenciesbeforecommit"
78527893
},
7894+
{
7895+
"type": "doc",
7896+
"label": "setDependenciesBeforeCommitAsync",
7897+
"id": "pages/rush-lib.versionpolicy.setdependenciesbeforecommitasync"
7898+
},
78537899
{
78547900
"type": "doc",
78557901
"label": "setDependenciesBeforePublish",
78567902
"id": "pages/rush-lib.versionpolicy.setdependenciesbeforepublish"
78577903
},
7904+
{
7905+
"type": "doc",
7906+
"label": "setDependenciesBeforePublishAsync",
7907+
"id": "pages/rush-lib.versionpolicy.setdependenciesbeforepublishasync"
7908+
},
78587909
{
78597910
"type": "doc",
78607911
"label": "validate",

websites/api.rushstack.io/docs/pages/rush-lib.commonversionsconfiguration.loadfromfile.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ pagination_next: null
1010

1111
## CommonVersionsConfiguration.loadFromFile() method
1212

13-
Loads the common-versions.json data from the specified file path. If the file has not been created yet, then an empty object is returned.
13+
> Warning: This API is now obsolete.
14+
>
15+
> Use [CommonVersionsConfiguration.loadFromFileAsync()](./rush-lib.commonversionsconfiguration.loadfromfileasync.md) method instead.
16+
>
1417
1518
**Signature:**
1619

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
hide_title: true
3+
custom_edit_url: null
4+
pagination_prev: null
5+
pagination_next: null
6+
---
7+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
8+
9+
[Home](./index.md) &gt; [@microsoft/rush-lib](./rush-lib.md) &gt; [CommonVersionsConfiguration](./rush-lib.commonversionsconfiguration.md) &gt; [loadFromFileAsync](./rush-lib.commonversionsconfiguration.loadfromfileasync.md)
10+
11+
## CommonVersionsConfiguration.loadFromFileAsync() method
12+
13+
Loads the common-versions.json data from the specified file path. If the file has not been created yet, then an empty object is returned.
14+
15+
**Signature:**
16+
17+
```typescript
18+
static loadFromFileAsync(jsonFilePath: string, rushConfiguration?: RushConfiguration): Promise<CommonVersionsConfiguration>;
19+
```
20+
21+
## Parameters
22+
23+
<table><thead><tr><th>
24+
25+
Parameter
26+
27+
28+
</th><th>
29+
30+
Type
31+
32+
33+
</th><th>
34+
35+
Description
36+
37+
38+
</th></tr></thead>
39+
<tbody><tr><td>
40+
41+
jsonFilePath
42+
43+
44+
</td><td>
45+
46+
string
47+
48+
49+
</td><td>
50+
51+
52+
</td></tr>
53+
<tr><td>
54+
55+
rushConfiguration
56+
57+
58+
</td><td>
59+
60+
[RushConfiguration](./rush-lib.rushconfiguration.md)
61+
62+
63+
</td><td>
64+
65+
_(Optional)_
66+
67+
68+
</td></tr>
69+
</tbody></table>
70+
71+
**Returns:**
72+
73+
Promise&lt;[CommonVersionsConfiguration](./rush-lib.commonversionsconfiguration.md)<></>&gt;
74+

websites/api.rushstack.io/docs/pages/rush-lib.commonversionsconfiguration.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,20 @@ Get a sha1 hash of the preferred versions.
206206
`static`
207207

208208

209+
</td><td>
210+
211+
212+
</td></tr>
213+
<tr><td>
214+
215+
[loadFromFileAsync(jsonFilePath, rushConfiguration)](./rush-lib.commonversionsconfiguration.loadfromfileasync.md)
216+
217+
218+
</td><td>
219+
220+
`static`
221+
222+
209223
</td><td>
210224

211225
Loads the common-versions.json data from the specified file path. If the file has not been created yet, then an empty object is returned.
@@ -220,6 +234,18 @@ Loads the common-versions.json data from the specified file path. If the file ha
220234
</td><td>
221235

222236

237+
</td><td>
238+
239+
240+
</td></tr>
241+
<tr><td>
242+
243+
[saveAsync()](./rush-lib.commonversionsconfiguration.saveasync.md)
244+
245+
246+
</td><td>
247+
248+
223249
</td><td>
224250

225251
Writes the "common-versions.json" file to disk, using the filename that was passed to loadFromFile().

websites/api.rushstack.io/docs/pages/rush-lib.commonversionsconfiguration.save.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ pagination_next: null
1010

1111
## CommonVersionsConfiguration.save() method
1212

13-
Writes the "common-versions.json" file to disk, using the filename that was passed to loadFromFile().
13+
> Warning: This API is now obsolete.
14+
>
15+
> Use [CommonVersionsConfiguration.saveAsync()](./rush-lib.commonversionsconfiguration.saveasync.md) method instead.
16+
>
1417
1518
**Signature:**
1619

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: true
3+
custom_edit_url: null
4+
pagination_prev: null
5+
pagination_next: null
6+
---
7+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
8+
9+
[Home](./index.md) &gt; [@microsoft/rush-lib](./rush-lib.md) &gt; [CommonVersionsConfiguration](./rush-lib.commonversionsconfiguration.md) &gt; [saveAsync](./rush-lib.commonversionsconfiguration.saveasync.md)
10+
11+
## CommonVersionsConfiguration.saveAsync() method
12+
13+
Writes the "common-versions.json" file to disk, using the filename that was passed to loadFromFile().
14+
15+
**Signature:**
16+
17+
```typescript
18+
saveAsync(): Promise<boolean>;
19+
```
20+
**Returns:**
21+
22+
Promise&lt;boolean&gt;
23+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
hide_title: true
3+
custom_edit_url: null
4+
pagination_prev: null
5+
pagination_next: null
6+
---
7+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
8+
9+
[Home](./index.md) &gt; [@microsoft/rush-lib](./rush-lib.md) &gt; [IGlobalCommand](./rush-lib.iglobalcommand.md) &gt; [getCustomParametersByLongName](./rush-lib.iglobalcommand.getcustomparametersbylongname.md)
10+
11+
## IGlobalCommand.getCustomParametersByLongName() method
12+
13+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
14+
>
15+
16+
Get a parameter by its long name (e.g. "--output-path") that was defined in command-line.json for this command. If the parameter was not defined or not provided on the command line, this will throw.
17+
18+
**Signature:**
19+
20+
```typescript
21+
getCustomParametersByLongName<TParameter extends CommandLineParameter>(longName: string): TParameter;
22+
```
23+
24+
## Parameters
25+
26+
<table><thead><tr><th>
27+
28+
Parameter
29+
30+
31+
</th><th>
32+
33+
Type
34+
35+
36+
</th><th>
37+
38+
Description
39+
40+
41+
</th></tr></thead>
42+
<tbody><tr><td>
43+
44+
longName
45+
46+
47+
</td><td>
48+
49+
string
50+
51+
52+
</td><td>
53+
54+
55+
</td></tr>
56+
</tbody></table>
57+
58+
**Returns:**
59+
60+
TParameter
61+

websites/api.rushstack.io/docs/pages/rush-lib.iglobalcommand.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,40 @@ export interface IGlobalCommand extends IRushCommand
2222
```
2323
**Extends:** [IRushCommand](./rush-lib.irushcommand.md)
2424
25+
## Methods
26+
27+
<table><thead><tr><th>
28+
29+
Method
30+
31+
32+
</th><th>
33+
34+
Description
35+
36+
37+
</th></tr></thead>
38+
<tbody><tr><td>
39+
40+
[getCustomParametersByLongName(longName)](./rush-lib.iglobalcommand.getcustomparametersbylongname.md)
41+
42+
43+
</td><td>
44+
45+
**_(BETA)_** Get a parameter by its long name (e.g. "--output-path") that was defined in command-line.json for this command. If the parameter was not defined or not provided on the command line, this will throw.
46+
47+
48+
</td></tr>
49+
<tr><td>
50+
51+
[setHandled()](./rush-lib.iglobalcommand.sethandled.md)
52+
53+
54+
</td><td>
55+
56+
**_(BETA)_** Call this from a plugin hook to indicate that the command has been fully handled by the plugin. When set, the default shell command execution will be skipped.
57+
58+
59+
</td></tr>
60+
</tbody></table>
61+

0 commit comments

Comments
 (0)