@yeoman/types 0.1.1 → 0.1.3
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": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common API for yeoman's generator/environment stack",
|
|
6
6
|
"keywords": [
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"access": "public",
|
|
51
51
|
"registry": "https://registry.npmjs.org/"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "ea9353672f5eaac702e0e024f954f43f193ca627"
|
|
54
54
|
}
|
|
@@ -33,6 +33,13 @@ export type BaseEnvironmentOptions = GeneratorBaseOptions & {
|
|
|
33
33
|
sharedFs?: Store;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
export type ApplyTransformsOptions = {
|
|
37
|
+
name?: string;
|
|
38
|
+
log?: boolean;
|
|
39
|
+
stream?: ReturnType<Store['stream']>;
|
|
40
|
+
streamOptions: Parameters<Store['stream']>[0];
|
|
41
|
+
};
|
|
42
|
+
|
|
36
43
|
export type BaseEnvironment<A = InputOutputAdapter, S extends Store = Store> = {
|
|
37
44
|
cwd: string;
|
|
38
45
|
adapter: A;
|
|
@@ -40,7 +47,7 @@ export type BaseEnvironment<A = InputOutputAdapter, S extends Store = Store> = {
|
|
|
40
47
|
|
|
41
48
|
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
42
49
|
|
|
43
|
-
applyTransforms(transformStreams: Transform[],
|
|
50
|
+
applyTransforms(transformStreams: Transform[], options?: ApplyTransformsOptions): Promise<void>;
|
|
44
51
|
|
|
45
52
|
create<G extends BaseGenerator = BaseGenerator>(
|
|
46
53
|
namespaceOrPath: string | GetGeneratorConstructor<G>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BaseEnvironment } from '../environment/environment.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { GeneratorFeatures } from './generator-features.js';
|
|
3
|
+
import type { GeneratorOptions } from './generator-options.js';
|
|
4
4
|
|
|
5
5
|
export type EnvironmentGenerator = {
|
|
6
6
|
readonly env: BaseEnvironment;
|
|
@@ -5,5 +5,5 @@ export type GetGeneratorOptions<T extends BaseGenerator = BaseGenerator> = T ext
|
|
|
5
5
|
export type GetGeneratorFeatures<T extends BaseGenerator = BaseGenerator> = T extends BaseGenerator<any, infer features> ? features : never;
|
|
6
6
|
|
|
7
7
|
export type GetGeneratorConstructor<T extends BaseGenerator = BaseGenerator> =
|
|
8
|
-
| (new (args: string[], options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) =>
|
|
9
|
-
| (new (options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) =>
|
|
8
|
+
| (new (args: string[], options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) => T)
|
|
9
|
+
| (new (options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) => T);
|