yeoman-generator 8.1.2 → 8.2.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/actions/help.d.ts +14 -1
- package/dist/actions/lifecycle.d.ts +14 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +15 -15
- package/dist/types.d.ts +29 -26
- package/package.json +22 -23
package/dist/actions/help.d.ts
CHANGED
|
@@ -22,7 +22,20 @@ export declare class HelpMixin {
|
|
|
22
22
|
*
|
|
23
23
|
* @param description
|
|
24
24
|
*/
|
|
25
|
-
desc(this: BaseGenerator, description: string): BaseGenerator<Record<any, any>, import("../types.js").BaseOptions,
|
|
25
|
+
desc(this: BaseGenerator, description: string): BaseGenerator<Record<any, any>, import("../types.js").BaseOptions, {
|
|
26
|
+
unique?: true | "argument" | "namespace" | undefined;
|
|
27
|
+
tasksMatchingPriority?: boolean | undefined;
|
|
28
|
+
taskPrefix?: string | undefined;
|
|
29
|
+
skipParseOptions?: boolean | undefined;
|
|
30
|
+
disableInGeneratorOptionsSupport?: boolean | undefined;
|
|
31
|
+
customPriorities?: import("../types.js").Priority[] | undefined;
|
|
32
|
+
inheritTasks?: boolean | undefined;
|
|
33
|
+
configTransform?: import("../types.js").StorageTransform<Record<string, any>> | undefined;
|
|
34
|
+
uniqueBy?: string | undefined;
|
|
35
|
+
uniqueGlobally?: boolean | undefined;
|
|
36
|
+
customCommitTask?: (() => Promise<void> | void) | undefined;
|
|
37
|
+
customInstallTask?: (boolean | import("@yeoman/types").InstallTask | "ask") | undefined;
|
|
38
|
+
}, Record<any, any>, Record<any, any>, Record<any, any>>;
|
|
26
39
|
/**
|
|
27
40
|
* Get help text for arguments
|
|
28
41
|
* @returns Text of options in formatted table
|
|
@@ -145,6 +145,19 @@ export declare abstract class TasksMixin {
|
|
|
145
145
|
*/
|
|
146
146
|
queueTransformStream(this: BaseGeneratorImpl, options?: GeneratorPipelineOptions & {
|
|
147
147
|
priorityToQueue?: string;
|
|
148
|
-
}, ...transforms: Array<FileTransform<MemFsEditorFile>>): BaseGeneratorImpl<Record<any, any>, BaseOptions,
|
|
148
|
+
}, ...transforms: Array<FileTransform<MemFsEditorFile>>): BaseGeneratorImpl<Record<any, any>, BaseOptions, {
|
|
149
|
+
unique?: true | "argument" | "namespace" | undefined;
|
|
150
|
+
tasksMatchingPriority?: boolean | undefined;
|
|
151
|
+
taskPrefix?: string | undefined;
|
|
152
|
+
skipParseOptions?: boolean | undefined;
|
|
153
|
+
disableInGeneratorOptionsSupport?: boolean | undefined;
|
|
154
|
+
customPriorities?: Priority[] | undefined;
|
|
155
|
+
inheritTasks?: boolean | undefined;
|
|
156
|
+
configTransform?: import("../types.js").StorageTransform<Record<string, any>> | undefined;
|
|
157
|
+
uniqueBy?: string | undefined;
|
|
158
|
+
uniqueGlobally?: boolean | undefined;
|
|
159
|
+
customCommitTask?: (() => Promise<void> | void) | undefined;
|
|
160
|
+
customInstallTask?: (boolean | import("@yeoman/types").InstallTask | "ask") | undefined;
|
|
161
|
+
}, Record<any, any>, Record<any, any>, Record<any, any>>;
|
|
149
162
|
}
|
|
150
163
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { type SimpleGit } from 'simple-git';
|
|
1
|
+
import { CheckRepoActions, CleanOptions, type SimpleGit, type SimpleGitOptions } from 'simple-git';
|
|
2
2
|
import { BaseGenerator } from './generator.js';
|
|
3
3
|
import type { BaseFeatures, BaseOptions } from './types.js';
|
|
4
4
|
export type * from './types.js';
|
|
5
5
|
export type * from './questions.js';
|
|
6
6
|
export type * from './util/storage.js';
|
|
7
7
|
export { default as Storage } from './util/storage.js';
|
|
8
|
+
type SimpleGitWithConstants = SimpleGit & {
|
|
9
|
+
CheckRepoActions: typeof CheckRepoActions;
|
|
10
|
+
CleanOptions: typeof CleanOptions;
|
|
11
|
+
};
|
|
8
12
|
export default class Generator<C extends Record<any, any> = Record<any, any>, O extends BaseOptions = BaseOptions, F extends BaseFeatures = BaseFeatures> extends BaseGenerator<C, O, F> {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
constructor(arguments_?: string[], options?: O, features?: F);
|
|
14
|
+
get simpleGit(): SimpleGitWithConstants;
|
|
15
|
+
createSimpleGit(options?: Partial<SimpleGitOptions>): SimpleGitWithConstants;
|
|
12
16
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
|
-
import { simpleGit } from 'simple-git';
|
|
2
|
+
import { CheckRepoActions, CleanOptions, simpleGit } from 'simple-git';
|
|
3
3
|
import { BaseGenerator } from './generator.js';
|
|
4
|
-
import { DESTINATION_ROOT_CHANGE_EVENT } from './constants.js';
|
|
5
4
|
export { default as Storage } from './util/storage.js';
|
|
6
5
|
export default class Generator extends BaseGenerator {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
super(...args);
|
|
6
|
+
constructor(arguments_, options, features) {
|
|
7
|
+
super(arguments_, options, features);
|
|
10
8
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
9
|
// @ts-expect-error
|
|
12
10
|
this._queues = {};
|
|
@@ -20,15 +18,17 @@ export default class Generator extends BaseGenerator {
|
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
get simpleGit() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
21
|
+
return this.createSimpleGit();
|
|
22
|
+
}
|
|
23
|
+
createSimpleGit(options) {
|
|
24
|
+
const git = simpleGit({ baseDir: this.destinationPath(), ...options }).env({
|
|
25
|
+
HOME: process.env.HOME,
|
|
26
|
+
PATH: process.env.PATH,
|
|
27
|
+
LANG: 'C',
|
|
28
|
+
LC_ALL: 'C',
|
|
29
|
+
});
|
|
30
|
+
git.CheckRepoActions = CheckRepoActions;
|
|
31
|
+
git.CleanOptions = CleanOptions;
|
|
32
|
+
return git;
|
|
33
33
|
}
|
|
34
34
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
} from '@yeoman/types';
|
|
8
8
|
import type { PipelineOptions } from 'mem-fs';
|
|
9
9
|
import type { MemFsEditorFile } from 'mem-fs-editor';
|
|
10
|
-
import type { JsonValue } from 'type-fest';
|
|
10
|
+
import type { JsonValue, Merge } from 'type-fest';
|
|
11
11
|
import type Storage from './util/storage.js';
|
|
12
12
|
import type Generator from './index.js';
|
|
13
13
|
|
|
@@ -77,40 +77,43 @@ export type Task<TaskContext = any> = TaskOptions & {
|
|
|
77
77
|
taskName: string;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
// Use Merge to override local features by official features from @yeoman/types when they are available.
|
|
81
|
+
export type BaseFeatures = Merge<
|
|
82
|
+
{
|
|
83
|
+
/** UniqueBy calculation method */
|
|
84
|
+
unique?: true | 'argument' | 'namespace';
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
/** Only queue methods that matches a priority. */
|
|
87
|
+
tasksMatchingPriority?: boolean;
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
/** Tasks methods starts with prefix. Allows api methods (non tasks) without prefix. */
|
|
90
|
+
taskPrefix?: string;
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/** Provides a custom install task. Environment built-in task will not be executed */
|
|
94
|
-
customInstallTask?: boolean | ((...args: any[]) => void | Promise<void>);
|
|
92
|
+
// Provided by @yeoman/types since v1.11.0
|
|
93
|
+
/** Provides a custom install task. Environment built-in task will not be executed */
|
|
94
|
+
customInstallTask?: boolean | ((...args: any[]) => void | Promise<void>);
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
// Provided by @yeoman/types since v1.11.0
|
|
97
|
+
/** Provides a custom commit task. */
|
|
98
|
+
customCommitTask?: boolean | ((...args: any[]) => void | Promise<void>);
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
/** Disable args/options parsing. Whenever options/arguments are provided parsed like using commander based parsing. */
|
|
101
|
+
skipParseOptions?: boolean;
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
/** Disable args/options support. Whenever options/arguments are provided parsed like using commander based parsing. */
|
|
104
|
+
disableInGeneratorOptionsSupport?: boolean;
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
/** Custom priorities for more fine tuned workflows. */
|
|
107
|
+
customPriorities?: Priority[];
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
/** Inherit tasks from parent prototypes, implies tasksMatchingPriority */
|
|
110
|
+
inheritTasks?: boolean;
|
|
110
111
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
112
|
+
/** Transform the configuration before reading. */
|
|
113
|
+
configTransform?: StorageTransform<Record<string, any>>;
|
|
114
|
+
},
|
|
115
|
+
FeaturesApi
|
|
116
|
+
>;
|
|
114
117
|
|
|
115
118
|
export type BaseOptions = OptionsApi & {
|
|
116
119
|
destinationRoot?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yeoman-generator",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Rails-inspired generator system that provides scaffolding for your apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"development",
|
|
@@ -45,53 +45,52 @@
|
|
|
45
45
|
"doc:prettier": "prettier $npm_package_config_doc_path$DOC_FOLDER --write --ignore-path .prettierignore-doc",
|
|
46
46
|
"fix": "eslint . --fix && prettier . --write",
|
|
47
47
|
"prepare": "npm run build",
|
|
48
|
-
"pretest": "eslint . && prettier . --check && npm run build",
|
|
48
|
+
"pretest": "eslint . && prettier . --check && npm run build && tsc -p tsconfig.spec.json",
|
|
49
49
|
"test": "vitest run --coverage"
|
|
50
50
|
},
|
|
51
51
|
"config": {
|
|
52
52
|
"doc_path": "../yeoman-generator-doc/"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@types/debug": "^4.1.
|
|
55
|
+
"@types/debug": "^4.1.13",
|
|
56
56
|
"@types/lodash-es": "^4.17.12",
|
|
57
|
-
"@yeoman/namespace": "^1.0
|
|
57
|
+
"@yeoman/namespace": "^2.1.0",
|
|
58
58
|
"chalk": "^5.6.2",
|
|
59
59
|
"debug": "^4.4.3",
|
|
60
60
|
"execa": "^9.6.1",
|
|
61
61
|
"latest-version": "^9.0.0",
|
|
62
|
-
"lodash-es": "^4.
|
|
63
|
-
"mem-fs-editor": "^12.0.
|
|
62
|
+
"lodash-es": "^4.18.1",
|
|
63
|
+
"mem-fs-editor": "^12.0.4",
|
|
64
64
|
"minimist": "^1.2.8",
|
|
65
65
|
"read-package-up": "^12.0.0",
|
|
66
66
|
"semver": "^7.7.4",
|
|
67
|
-
"simple-git": "^3.
|
|
67
|
+
"simple-git": "^3.36.0",
|
|
68
68
|
"sort-keys": "^6.0.0",
|
|
69
69
|
"text-table": "^0.2.0",
|
|
70
|
-
"type-fest": "^5.
|
|
70
|
+
"type-fest": "^5.6.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/ejs": "^3.1.5",
|
|
74
74
|
"@types/minimist": "^1.2.5",
|
|
75
|
-
"@types/
|
|
75
|
+
"@types/node": "^24.12.2",
|
|
76
|
+
"@types/picomatch": "^4.0.3",
|
|
76
77
|
"@types/semver": "^7.7.1",
|
|
77
|
-
"@types/sinon": "^21.0.0",
|
|
78
78
|
"@types/text-table": "^0.2.5",
|
|
79
|
-
"@
|
|
79
|
+
"@typescript-eslint/parser": "^8.59.1",
|
|
80
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
80
81
|
"@yeoman/adapter": "^4.0.2",
|
|
81
|
-
"@yeoman/eslint": "1.
|
|
82
|
-
"@yeoman/transform": "^2.1.
|
|
83
|
-
"@yeoman/types": "^1.
|
|
82
|
+
"@yeoman/eslint": "1.1.0",
|
|
83
|
+
"@yeoman/transform": "^2.1.1",
|
|
84
|
+
"@yeoman/types": "^1.11.0",
|
|
84
85
|
"cpy-cli": "^7.0.0",
|
|
85
|
-
"ejs": "^5.0.
|
|
86
|
-
"eslint": "
|
|
86
|
+
"ejs": "^5.0.2",
|
|
87
|
+
"eslint": "10.2.1",
|
|
87
88
|
"jsdoc": "^4.0.5",
|
|
88
|
-
"prettier": "3.8.
|
|
89
|
-
"prettier-plugin-packagejson": "3.0.
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"yeoman-assert": "^3.1.1",
|
|
94
|
-
"yeoman-environment": "^6.0.0",
|
|
89
|
+
"prettier": "3.8.3",
|
|
90
|
+
"prettier-plugin-packagejson": "3.0.2",
|
|
91
|
+
"typescript": "6.0.3",
|
|
92
|
+
"vitest": "^4.1.5",
|
|
93
|
+
"yeoman-environment": "^6.0.1",
|
|
95
94
|
"yeoman-test": "^11.3.1"
|
|
96
95
|
},
|
|
97
96
|
"peerDependencies": {
|