@yeoman/types 1.0.1 → 1.1.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeoman/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common API for yeoman's generator/environment stack",
|
|
6
6
|
"keywords": [
|
|
@@ -56,5 +56,9 @@
|
|
|
56
56
|
"access": "public",
|
|
57
57
|
"registry": "https://registry.npmjs.org/"
|
|
58
58
|
},
|
|
59
|
-
"
|
|
59
|
+
"acceptDependencies": {
|
|
60
|
+
"mem-fs": "^4.0.0-beta.1",
|
|
61
|
+
"mem-fs-editor": ">=10.0.2"
|
|
62
|
+
},
|
|
63
|
+
"gitHead": "5a0ce8f3457005bfb1617ac9548fe935192d8498"
|
|
60
64
|
}
|
|
@@ -42,6 +42,10 @@ type Task<TaskResultType> =
|
|
|
42
42
|
| ((adapter: InputOutputAdapter) => PromiseLike<TaskResultType>)
|
|
43
43
|
| ((adapter: InputOutputAdapter) => TaskResultType);
|
|
44
44
|
|
|
45
|
+
export type ProgressCallback<ReturnType> = (progress: { step: (prefix: string, message: string, ...args: any[]) => void }) => ReturnType;
|
|
46
|
+
export type ProgressOptions = { disabled?: boolean; name?: string };
|
|
47
|
+
|
|
45
48
|
export type QueuedAdapter = InputOutputAdapter & {
|
|
46
49
|
queue<TaskResultType>(fn: Task<TaskResultType>): Promise<void | TaskResultType>;
|
|
50
|
+
progress<ResultType>(fn: ProgressCallback<ResultType>, options?: ProgressOptions): Promise<void | ResultType>;
|
|
47
51
|
};
|
|
@@ -27,6 +27,11 @@ export type BaseEnvironmentOptions<A extends InputOutputAdapter = InputOutputAda
|
|
|
27
27
|
*/
|
|
28
28
|
cwd?: string | undefined;
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* The working-directory for logs.
|
|
32
|
+
*/
|
|
33
|
+
logCwd?: string | undefined;
|
|
34
|
+
|
|
30
35
|
/**
|
|
31
36
|
* A value indicating whether the experimental features should be enabled.
|
|
32
37
|
*/
|
|
@@ -62,6 +67,10 @@ export type BaseEnvironment<A = InputOutputAdapter, S extends Store<MemFsEditorF
|
|
|
62
67
|
cwd: string;
|
|
63
68
|
adapter: A;
|
|
64
69
|
sharedFs: S;
|
|
70
|
+
/**
|
|
71
|
+
* The working-directory for logs.
|
|
72
|
+
*/
|
|
73
|
+
logCwd: string;
|
|
65
74
|
|
|
66
75
|
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
67
76
|
on(eventName: string | symbol, listener: (...args: any[]) => void): unknown;
|