@w5s/dev 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -390
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -250
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -250
- package/dist/index.js +2 -379
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +0 -6
- package/src/block.ts +0 -153
- package/src/directory.ts +0 -73
- package/src/exec.ts +0 -73
- package/src/file.ts +0 -99
- package/src/json.ts +0 -58
- package/src/yarnConfig.ts +0 -61
- package/src/yarnVersion.ts +0 -56
package/dist/index.d.cts
CHANGED
|
@@ -1,45 +1,5 @@
|
|
|
1
1
|
import { ESLint } from "eslint";
|
|
2
2
|
|
|
3
|
-
//#region src/directory.d.ts
|
|
4
|
-
interface DirectoryOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Directory path
|
|
7
|
-
*/
|
|
8
|
-
readonly path: string;
|
|
9
|
-
/**
|
|
10
|
-
* Directory target state
|
|
11
|
-
*/
|
|
12
|
-
readonly state: 'present' | 'absent';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Ensure directory is present/absent
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* await directory({
|
|
20
|
-
* path: 'foo/bar',
|
|
21
|
-
* state: 'present',
|
|
22
|
-
* })
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @param options
|
|
26
|
-
*/
|
|
27
|
-
declare function directory(options: DirectoryOptions): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Ensure directory is present/absent
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* await directorySync({
|
|
34
|
-
* path: 'foo/bar',
|
|
35
|
-
* state: 'present',
|
|
36
|
-
* })
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @param options
|
|
40
|
-
*/
|
|
41
|
-
declare function directorySync(options: DirectoryOptions): void;
|
|
42
|
-
//#endregion
|
|
43
3
|
//#region src/ESLintConfig.d.ts
|
|
44
4
|
declare namespace ESLintConfig {
|
|
45
5
|
/**
|
|
@@ -66,103 +26,6 @@ declare namespace ESLintConfig {
|
|
|
66
26
|
function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
67
27
|
}
|
|
68
28
|
//#endregion
|
|
69
|
-
//#region src/block.d.ts
|
|
70
|
-
interface BlockOptions {
|
|
71
|
-
/**
|
|
72
|
-
* The marker builder function that will take either `markerBegin` or `markerEnd`
|
|
73
|
-
*
|
|
74
|
-
* @default '# ${mark} MANAGED BLOCK'
|
|
75
|
-
*/
|
|
76
|
-
marker?: (mark: 'Begin' | 'End') => string;
|
|
77
|
-
/**
|
|
78
|
-
* File path
|
|
79
|
-
*/
|
|
80
|
-
path: string;
|
|
81
|
-
/**
|
|
82
|
-
* Block content to insert
|
|
83
|
-
*/
|
|
84
|
-
block: string;
|
|
85
|
-
/**
|
|
86
|
-
* Insert position
|
|
87
|
-
*/
|
|
88
|
-
insertPosition?: ['before', 'BeginningOfFile' | RegExp] | ['after', 'EndOfFile' | RegExp];
|
|
89
|
-
/**
|
|
90
|
-
* Block target state
|
|
91
|
-
*/
|
|
92
|
-
state?: 'present' | 'absent';
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Replace asynchronously a block in file that follows pattern :
|
|
96
|
-
*
|
|
97
|
-
* marker(markerBegin)
|
|
98
|
-
* ...
|
|
99
|
-
* marker(markerEnd)
|
|
100
|
-
*
|
|
101
|
-
* @param options
|
|
102
|
-
*/
|
|
103
|
-
declare function block(options: BlockOptions): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Replace synchronously a block in file that follows pattern :
|
|
106
|
-
*
|
|
107
|
-
* marker(markerBegin)
|
|
108
|
-
* ...
|
|
109
|
-
* marker(markerEnd)
|
|
110
|
-
*
|
|
111
|
-
* @param options
|
|
112
|
-
*/
|
|
113
|
-
declare function blockSync(options: BlockOptions): void;
|
|
114
|
-
//#endregion
|
|
115
|
-
//#region src/file.d.ts
|
|
116
|
-
interface FileOptions {
|
|
117
|
-
/**
|
|
118
|
-
* File path
|
|
119
|
-
*/
|
|
120
|
-
readonly path: string;
|
|
121
|
-
/**
|
|
122
|
-
* File target state
|
|
123
|
-
*/
|
|
124
|
-
readonly state: 'present' | 'absent';
|
|
125
|
-
/**
|
|
126
|
-
* File content mapping function
|
|
127
|
-
*
|
|
128
|
-
*/
|
|
129
|
-
readonly update?: ((content: string) => string | undefined) | undefined;
|
|
130
|
-
/**
|
|
131
|
-
* File encoding
|
|
132
|
-
*/
|
|
133
|
-
readonly encoding?: BufferEncoding;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Ensure file is present/absent with content initialized or modified with `update
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```ts
|
|
140
|
-
* await file({
|
|
141
|
-
* path: 'foo/bar',
|
|
142
|
-
* state: 'present',
|
|
143
|
-
* update: (content) => content + '_test', // This will append '_test' after current content
|
|
144
|
-
* })
|
|
145
|
-
* ```
|
|
146
|
-
*
|
|
147
|
-
* @param options
|
|
148
|
-
*/
|
|
149
|
-
declare function file(options: FileOptions): Promise<void>;
|
|
150
|
-
/**
|
|
151
|
-
* Ensure file is present/absent with content initialized or modified with `update
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```ts
|
|
155
|
-
* fileSync({
|
|
156
|
-
* path: 'foo/bar',
|
|
157
|
-
* state: 'present',
|
|
158
|
-
* update: (content) => content + '_test', // This will append '_test' after current content
|
|
159
|
-
* })
|
|
160
|
-
* ```
|
|
161
|
-
*
|
|
162
|
-
* @param options
|
|
163
|
-
*/
|
|
164
|
-
declare function fileSync(options: FileOptions): void;
|
|
165
|
-
//#endregion
|
|
166
29
|
//#region src/interopDefault.d.ts
|
|
167
30
|
/**
|
|
168
31
|
* Resolves a module or promise-like object, returning the default export if available.
|
|
@@ -214,41 +77,6 @@ interface LanguageIdMap {
|
|
|
214
77
|
*/
|
|
215
78
|
type LanguageId = keyof LanguageIdMap;
|
|
216
79
|
//#endregion
|
|
217
|
-
//#region src/json.d.ts
|
|
218
|
-
type JSONValue = null | number | string | boolean | JSONValue[] | {
|
|
219
|
-
[key: string]: JSONValue;
|
|
220
|
-
};
|
|
221
|
-
interface JSONOption<V = JSONValue> {
|
|
222
|
-
/**
|
|
223
|
-
* File path
|
|
224
|
-
*/
|
|
225
|
-
readonly path: string;
|
|
226
|
-
/**
|
|
227
|
-
* File target state
|
|
228
|
-
*/
|
|
229
|
-
readonly state: 'present' | 'absent';
|
|
230
|
-
/**
|
|
231
|
-
* File content mapping function
|
|
232
|
-
*/
|
|
233
|
-
readonly update?: ((content: V | undefined) => V | undefined) | undefined;
|
|
234
|
-
/**
|
|
235
|
-
* File encoding
|
|
236
|
-
*/
|
|
237
|
-
readonly encoding?: BufferEncoding;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Ensure file is present/absent asynchronously with content value initialized or modified with `update`
|
|
241
|
-
*
|
|
242
|
-
* @param options
|
|
243
|
-
*/
|
|
244
|
-
declare function json<Value>(options: JSONOption<Value>): Promise<void>;
|
|
245
|
-
/**
|
|
246
|
-
* Ensure file is present/absent synchronously with content value initialized or modified with `update`
|
|
247
|
-
*
|
|
248
|
-
* @param options
|
|
249
|
-
*/
|
|
250
|
-
declare function jsonSync<Value>(options: JSONOption<Value>): void;
|
|
251
|
-
//#endregion
|
|
252
80
|
//#region src/meta.d.ts
|
|
253
81
|
declare const meta: Readonly<{
|
|
254
82
|
name: string;
|
|
@@ -359,82 +187,5 @@ declare const ProjectScript: {
|
|
|
359
187
|
};
|
|
360
188
|
type ProjectScript = (typeof ProjectScript)[keyof typeof ProjectScript];
|
|
361
189
|
//#endregion
|
|
362
|
-
|
|
363
|
-
interface YarnConfigOptions {
|
|
364
|
-
/**
|
|
365
|
-
* Configuration key
|
|
366
|
-
*/
|
|
367
|
-
readonly key: string;
|
|
368
|
-
/**
|
|
369
|
-
* Option target state
|
|
370
|
-
*/
|
|
371
|
-
readonly state: 'present' | 'absent';
|
|
372
|
-
/**
|
|
373
|
-
* File content mapping function
|
|
374
|
-
*
|
|
375
|
-
*/
|
|
376
|
-
readonly update?: ((content: string) => string | undefined) | undefined;
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Synchronous version of {@link yarnConfig}
|
|
380
|
-
*
|
|
381
|
-
* @param options
|
|
382
|
-
* @example
|
|
383
|
-
* yarnConfigSync({
|
|
384
|
-
* key: 'nodeLinker',
|
|
385
|
-
* state: 'present',
|
|
386
|
-
* update: (content) => content.replace('node-modules', 'hoisted'),
|
|
387
|
-
* })
|
|
388
|
-
*/
|
|
389
|
-
declare function yarnConfigSync(options: YarnConfigOptions): void;
|
|
390
|
-
/**
|
|
391
|
-
* Set/Unset yarn configuration value
|
|
392
|
-
*
|
|
393
|
-
* @param options
|
|
394
|
-
* @example
|
|
395
|
-
* await yarnConfig({
|
|
396
|
-
* key: 'nodeLinker',
|
|
397
|
-
* state: 'present',
|
|
398
|
-
* update: (content) => content.replace('node-modules', 'hoisted'),
|
|
399
|
-
* })
|
|
400
|
-
*/
|
|
401
|
-
declare function yarnConfig(options: YarnConfigOptions): Promise<void>;
|
|
402
|
-
//#endregion
|
|
403
|
-
//#region src/yarnVersion.d.ts
|
|
404
|
-
type YarnVersionKind = 'berry' | 'classic';
|
|
405
|
-
interface YarnVersionOptions {
|
|
406
|
-
/**
|
|
407
|
-
* Option target state
|
|
408
|
-
*/
|
|
409
|
-
readonly state: 'present' | 'absent';
|
|
410
|
-
/**
|
|
411
|
-
* Version mapping function
|
|
412
|
-
*
|
|
413
|
-
*/
|
|
414
|
-
readonly update?: (() => YarnVersionKind | undefined) | undefined;
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Synchronous version of {@link yarnVersion}
|
|
418
|
-
*
|
|
419
|
-
* @param options
|
|
420
|
-
* @example
|
|
421
|
-
* yarnVersionSync({
|
|
422
|
-
* state: 'present',
|
|
423
|
-
* update: () => 'berry', // or 'classic'
|
|
424
|
-
* })
|
|
425
|
-
*/
|
|
426
|
-
declare function yarnVersionSync(options: YarnVersionOptions): void;
|
|
427
|
-
/**
|
|
428
|
-
* Set/Unset yarn configuration value
|
|
429
|
-
*
|
|
430
|
-
* @param options
|
|
431
|
-
* @example
|
|
432
|
-
* await yarnVersion({
|
|
433
|
-
* state: 'present',
|
|
434
|
-
* update: () => 'berry', // or 'classic'
|
|
435
|
-
* })
|
|
436
|
-
*/
|
|
437
|
-
declare function yarnVersion(options: YarnVersionOptions): Promise<void>;
|
|
438
|
-
//#endregion
|
|
439
|
-
export { BlockOptions, DirectoryOptions, ESLintConfig, FileOptions, JSONOption, JSONValue, LanguageId, LanguageIdMap, Project, ProjectScript, YarnConfigOptions, YarnVersionKind, YarnVersionOptions, block, blockSync, directory, directorySync, file, fileSync, interopDefault, json, jsonSync, meta, yarnConfig, yarnConfigSync, yarnVersion, yarnVersionSync };
|
|
190
|
+
export { ESLintConfig, LanguageId, LanguageIdMap, Project, ProjectScript, interopDefault, meta };
|
|
440
191
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/ESLintConfig.ts","../src/interopDefault.ts","../src/LanguageId.ts","../src/meta.ts","../src/Project.ts","../src/ProjectScript.ts"],"mappings":";;;kBAgBiB,YAAA;;AAAjB;;;WAKkB,MAAA,CAAA,GAAU,OAAA,EAAS,MAAA,CAAO,UAAA,KAAe,MAAA,CAAO,UAAA;EAAP;;;;;EAAA,SAgCzC,KAAA,CAAM,OAAA;EAhCN;;;;;;;;;;EAAA,SA8CA,WAAA,CAAY,KAAA,EAAO,MAAA,eAAqB,GAAA,EAAK,MAAA,mBAAyB,MAAA;AAAA;;;;;;AAnDxF;;;;;;;;;;;;;;;;;iBCMgB,cAAA,GAAA,CAAkB,CAAA,EAAG,WAAA,CAAY,CAAA,IAAK,OAAA,CAAQ,CAAA;EAAY,OAAA;AAAA,IAAqB,CAAA,GAAI,CAAA;AAAA,iBACnF,cAAA,GAAA,CAAkB,CAAA,EAAG,CAAA,GAAI,CAAA;EAAY,OAAA;AAAA,IAAqB,CAAA,GAAI,CAAA;;;UCvB7D,aAAA;EACf,GAAA;EACA,OAAA;EACA,UAAA;EACA,eAAA;EACA,IAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;EACA,UAAA;EACA,eAAA;EACA,GAAA;EACA,IAAA;AAAA;;;;KAMU,UAAA,SAAmB,aAAA;;;cCrBlB,IAAA,EAAI,QAAA;;;;;;;kBCOA,OAAA;;AJSjB;;OILc,SAAA;EJUuB;;;EAAA,KILvB,iBAAA,WAA4B,UAAA,YAAsB,SAAA;EJmD8B;;;;;;;;EAAA,SIzC5E,WAAA,CAAA;EJyCA;;;;;;;;;;;EAAA,SIRA,eAAA,CAAgB,SAAA,EAAW,UAAA,cAAwB,SAAA;EHrCvC;;;;;;;;EAAA,SGsDZ,gBAAA,CAAA;EHtDa;;;;;;;;EAAA,SGyEb,kBAAA,CAAA;EHzEiF;;;AACnG;;;;;EADmG,SGkGjF,OAAA,CAAA;EHjG6D;;;;;;;;;EAAA,SG8G7D,mBAAA,CAAoB,UAAA,WAAqB,SAAA,KAAc,MAAA;EH9GM;;;;;ACvB/E;;;;EDuB+E,SG2H7D,gBAAA,CAAiB,UAAA,WAAqB,SAAA;AAAA;;;;;;cC/I3C,aAAA;EAAA;;;;;;;;;;;;;;;;KAiBD,aAAA,WAAwB,aAAA,eAA4B,aAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,5 @@
|
|
|
1
1
|
import { ESLint } from "eslint";
|
|
2
2
|
|
|
3
|
-
//#region src/directory.d.ts
|
|
4
|
-
interface DirectoryOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Directory path
|
|
7
|
-
*/
|
|
8
|
-
readonly path: string;
|
|
9
|
-
/**
|
|
10
|
-
* Directory target state
|
|
11
|
-
*/
|
|
12
|
-
readonly state: 'present' | 'absent';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Ensure directory is present/absent
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* await directory({
|
|
20
|
-
* path: 'foo/bar',
|
|
21
|
-
* state: 'present',
|
|
22
|
-
* })
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @param options
|
|
26
|
-
*/
|
|
27
|
-
declare function directory(options: DirectoryOptions): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Ensure directory is present/absent
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* await directorySync({
|
|
34
|
-
* path: 'foo/bar',
|
|
35
|
-
* state: 'present',
|
|
36
|
-
* })
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @param options
|
|
40
|
-
*/
|
|
41
|
-
declare function directorySync(options: DirectoryOptions): void;
|
|
42
|
-
//#endregion
|
|
43
3
|
//#region src/ESLintConfig.d.ts
|
|
44
4
|
declare namespace ESLintConfig {
|
|
45
5
|
/**
|
|
@@ -66,103 +26,6 @@ declare namespace ESLintConfig {
|
|
|
66
26
|
function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
67
27
|
}
|
|
68
28
|
//#endregion
|
|
69
|
-
//#region src/block.d.ts
|
|
70
|
-
interface BlockOptions {
|
|
71
|
-
/**
|
|
72
|
-
* The marker builder function that will take either `markerBegin` or `markerEnd`
|
|
73
|
-
*
|
|
74
|
-
* @default '# ${mark} MANAGED BLOCK'
|
|
75
|
-
*/
|
|
76
|
-
marker?: (mark: 'Begin' | 'End') => string;
|
|
77
|
-
/**
|
|
78
|
-
* File path
|
|
79
|
-
*/
|
|
80
|
-
path: string;
|
|
81
|
-
/**
|
|
82
|
-
* Block content to insert
|
|
83
|
-
*/
|
|
84
|
-
block: string;
|
|
85
|
-
/**
|
|
86
|
-
* Insert position
|
|
87
|
-
*/
|
|
88
|
-
insertPosition?: ['before', 'BeginningOfFile' | RegExp] | ['after', 'EndOfFile' | RegExp];
|
|
89
|
-
/**
|
|
90
|
-
* Block target state
|
|
91
|
-
*/
|
|
92
|
-
state?: 'present' | 'absent';
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Replace asynchronously a block in file that follows pattern :
|
|
96
|
-
*
|
|
97
|
-
* marker(markerBegin)
|
|
98
|
-
* ...
|
|
99
|
-
* marker(markerEnd)
|
|
100
|
-
*
|
|
101
|
-
* @param options
|
|
102
|
-
*/
|
|
103
|
-
declare function block(options: BlockOptions): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Replace synchronously a block in file that follows pattern :
|
|
106
|
-
*
|
|
107
|
-
* marker(markerBegin)
|
|
108
|
-
* ...
|
|
109
|
-
* marker(markerEnd)
|
|
110
|
-
*
|
|
111
|
-
* @param options
|
|
112
|
-
*/
|
|
113
|
-
declare function blockSync(options: BlockOptions): void;
|
|
114
|
-
//#endregion
|
|
115
|
-
//#region src/file.d.ts
|
|
116
|
-
interface FileOptions {
|
|
117
|
-
/**
|
|
118
|
-
* File path
|
|
119
|
-
*/
|
|
120
|
-
readonly path: string;
|
|
121
|
-
/**
|
|
122
|
-
* File target state
|
|
123
|
-
*/
|
|
124
|
-
readonly state: 'present' | 'absent';
|
|
125
|
-
/**
|
|
126
|
-
* File content mapping function
|
|
127
|
-
*
|
|
128
|
-
*/
|
|
129
|
-
readonly update?: ((content: string) => string | undefined) | undefined;
|
|
130
|
-
/**
|
|
131
|
-
* File encoding
|
|
132
|
-
*/
|
|
133
|
-
readonly encoding?: BufferEncoding;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Ensure file is present/absent with content initialized or modified with `update
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```ts
|
|
140
|
-
* await file({
|
|
141
|
-
* path: 'foo/bar',
|
|
142
|
-
* state: 'present',
|
|
143
|
-
* update: (content) => content + '_test', // This will append '_test' after current content
|
|
144
|
-
* })
|
|
145
|
-
* ```
|
|
146
|
-
*
|
|
147
|
-
* @param options
|
|
148
|
-
*/
|
|
149
|
-
declare function file(options: FileOptions): Promise<void>;
|
|
150
|
-
/**
|
|
151
|
-
* Ensure file is present/absent with content initialized or modified with `update
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```ts
|
|
155
|
-
* fileSync({
|
|
156
|
-
* path: 'foo/bar',
|
|
157
|
-
* state: 'present',
|
|
158
|
-
* update: (content) => content + '_test', // This will append '_test' after current content
|
|
159
|
-
* })
|
|
160
|
-
* ```
|
|
161
|
-
*
|
|
162
|
-
* @param options
|
|
163
|
-
*/
|
|
164
|
-
declare function fileSync(options: FileOptions): void;
|
|
165
|
-
//#endregion
|
|
166
29
|
//#region src/interopDefault.d.ts
|
|
167
30
|
/**
|
|
168
31
|
* Resolves a module or promise-like object, returning the default export if available.
|
|
@@ -214,41 +77,6 @@ interface LanguageIdMap {
|
|
|
214
77
|
*/
|
|
215
78
|
type LanguageId = keyof LanguageIdMap;
|
|
216
79
|
//#endregion
|
|
217
|
-
//#region src/json.d.ts
|
|
218
|
-
type JSONValue = null | number | string | boolean | JSONValue[] | {
|
|
219
|
-
[key: string]: JSONValue;
|
|
220
|
-
};
|
|
221
|
-
interface JSONOption<V = JSONValue> {
|
|
222
|
-
/**
|
|
223
|
-
* File path
|
|
224
|
-
*/
|
|
225
|
-
readonly path: string;
|
|
226
|
-
/**
|
|
227
|
-
* File target state
|
|
228
|
-
*/
|
|
229
|
-
readonly state: 'present' | 'absent';
|
|
230
|
-
/**
|
|
231
|
-
* File content mapping function
|
|
232
|
-
*/
|
|
233
|
-
readonly update?: ((content: V | undefined) => V | undefined) | undefined;
|
|
234
|
-
/**
|
|
235
|
-
* File encoding
|
|
236
|
-
*/
|
|
237
|
-
readonly encoding?: BufferEncoding;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Ensure file is present/absent asynchronously with content value initialized or modified with `update`
|
|
241
|
-
*
|
|
242
|
-
* @param options
|
|
243
|
-
*/
|
|
244
|
-
declare function json<Value>(options: JSONOption<Value>): Promise<void>;
|
|
245
|
-
/**
|
|
246
|
-
* Ensure file is present/absent synchronously with content value initialized or modified with `update`
|
|
247
|
-
*
|
|
248
|
-
* @param options
|
|
249
|
-
*/
|
|
250
|
-
declare function jsonSync<Value>(options: JSONOption<Value>): void;
|
|
251
|
-
//#endregion
|
|
252
80
|
//#region src/meta.d.ts
|
|
253
81
|
declare const meta: Readonly<{
|
|
254
82
|
name: string;
|
|
@@ -359,82 +187,5 @@ declare const ProjectScript: {
|
|
|
359
187
|
};
|
|
360
188
|
type ProjectScript = (typeof ProjectScript)[keyof typeof ProjectScript];
|
|
361
189
|
//#endregion
|
|
362
|
-
|
|
363
|
-
interface YarnConfigOptions {
|
|
364
|
-
/**
|
|
365
|
-
* Configuration key
|
|
366
|
-
*/
|
|
367
|
-
readonly key: string;
|
|
368
|
-
/**
|
|
369
|
-
* Option target state
|
|
370
|
-
*/
|
|
371
|
-
readonly state: 'present' | 'absent';
|
|
372
|
-
/**
|
|
373
|
-
* File content mapping function
|
|
374
|
-
*
|
|
375
|
-
*/
|
|
376
|
-
readonly update?: ((content: string) => string | undefined) | undefined;
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Synchronous version of {@link yarnConfig}
|
|
380
|
-
*
|
|
381
|
-
* @param options
|
|
382
|
-
* @example
|
|
383
|
-
* yarnConfigSync({
|
|
384
|
-
* key: 'nodeLinker',
|
|
385
|
-
* state: 'present',
|
|
386
|
-
* update: (content) => content.replace('node-modules', 'hoisted'),
|
|
387
|
-
* })
|
|
388
|
-
*/
|
|
389
|
-
declare function yarnConfigSync(options: YarnConfigOptions): void;
|
|
390
|
-
/**
|
|
391
|
-
* Set/Unset yarn configuration value
|
|
392
|
-
*
|
|
393
|
-
* @param options
|
|
394
|
-
* @example
|
|
395
|
-
* await yarnConfig({
|
|
396
|
-
* key: 'nodeLinker',
|
|
397
|
-
* state: 'present',
|
|
398
|
-
* update: (content) => content.replace('node-modules', 'hoisted'),
|
|
399
|
-
* })
|
|
400
|
-
*/
|
|
401
|
-
declare function yarnConfig(options: YarnConfigOptions): Promise<void>;
|
|
402
|
-
//#endregion
|
|
403
|
-
//#region src/yarnVersion.d.ts
|
|
404
|
-
type YarnVersionKind = 'berry' | 'classic';
|
|
405
|
-
interface YarnVersionOptions {
|
|
406
|
-
/**
|
|
407
|
-
* Option target state
|
|
408
|
-
*/
|
|
409
|
-
readonly state: 'present' | 'absent';
|
|
410
|
-
/**
|
|
411
|
-
* Version mapping function
|
|
412
|
-
*
|
|
413
|
-
*/
|
|
414
|
-
readonly update?: (() => YarnVersionKind | undefined) | undefined;
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Synchronous version of {@link yarnVersion}
|
|
418
|
-
*
|
|
419
|
-
* @param options
|
|
420
|
-
* @example
|
|
421
|
-
* yarnVersionSync({
|
|
422
|
-
* state: 'present',
|
|
423
|
-
* update: () => 'berry', // or 'classic'
|
|
424
|
-
* })
|
|
425
|
-
*/
|
|
426
|
-
declare function yarnVersionSync(options: YarnVersionOptions): void;
|
|
427
|
-
/**
|
|
428
|
-
* Set/Unset yarn configuration value
|
|
429
|
-
*
|
|
430
|
-
* @param options
|
|
431
|
-
* @example
|
|
432
|
-
* await yarnVersion({
|
|
433
|
-
* state: 'present',
|
|
434
|
-
* update: () => 'berry', // or 'classic'
|
|
435
|
-
* })
|
|
436
|
-
*/
|
|
437
|
-
declare function yarnVersion(options: YarnVersionOptions): Promise<void>;
|
|
438
|
-
//#endregion
|
|
439
|
-
export { BlockOptions, DirectoryOptions, ESLintConfig, FileOptions, JSONOption, JSONValue, LanguageId, LanguageIdMap, Project, ProjectScript, YarnConfigOptions, YarnVersionKind, YarnVersionOptions, block, blockSync, directory, directorySync, file, fileSync, interopDefault, json, jsonSync, meta, yarnConfig, yarnConfigSync, yarnVersion, yarnVersionSync };
|
|
190
|
+
export { ESLintConfig, LanguageId, LanguageIdMap, Project, ProjectScript, interopDefault, meta };
|
|
440
191
|
//# sourceMappingURL=index.d.ts.map
|