@modern-js/entry-generator 3.6.1 → 3.6.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/dist/index.js +707 -731
- package/package.json +10 -10
- package/src/index.ts +11 -7
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.6.
|
|
18
|
+
"version": "3.6.3",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@modern-js/utils": "2.60.
|
|
26
|
+
"@modern-js/utils": "2.60.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@modern-js/codesmith": "2.
|
|
30
|
-
"@modern-js/codesmith-api-app": "2.
|
|
31
|
-
"@modern-js/codesmith-api-handlebars": "2.
|
|
29
|
+
"@modern-js/codesmith": "2.5.2",
|
|
30
|
+
"@modern-js/codesmith-api-app": "2.5.2",
|
|
31
|
+
"@modern-js/codesmith-api-handlebars": "2.5.2",
|
|
32
32
|
"@types/jest": "^29",
|
|
33
33
|
"@types/node": "^14",
|
|
34
34
|
"jest": "^29",
|
|
35
35
|
"typescript": "^5",
|
|
36
|
-
"@modern-js/generator-common": "3.6.
|
|
37
|
-
"@modern-js/
|
|
38
|
-
"@
|
|
39
|
-
"@scripts/
|
|
40
|
-
"@
|
|
36
|
+
"@modern-js/generator-common": "3.6.3",
|
|
37
|
+
"@modern-js/generator-utils": "3.6.3",
|
|
38
|
+
"@scripts/build": "2.60.3",
|
|
39
|
+
"@scripts/jest-config": "2.60.3",
|
|
40
|
+
"@modern-js/plugin-i18n": "2.60.3"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -27,7 +27,9 @@ const handleInput = async (
|
|
|
27
27
|
isTsProject: isTsProject(appDir),
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
generator.logger.debug(
|
|
30
|
+
generator.logger.debug(
|
|
31
|
+
`💡 [Entry Analysis Info]: ${JSON.stringify(analysisInfo)}`,
|
|
32
|
+
);
|
|
31
33
|
|
|
32
34
|
const config = { ...context.config, ...analysisInfo };
|
|
33
35
|
const ans = await appApi.getInputBySchemaFunc(getEntrySchema, config);
|
|
@@ -70,7 +72,7 @@ const refactorSingleEntry = async (
|
|
|
70
72
|
);
|
|
71
73
|
oldFiles.forEach(file => {
|
|
72
74
|
generator.logger.debug(
|
|
73
|
-
|
|
75
|
+
`💡 [Rename Entry Info]: from ${file} to ${file.replace(
|
|
74
76
|
entriesDir,
|
|
75
77
|
path.join(entriesDir, pkgName),
|
|
76
78
|
)}`,
|
|
@@ -91,7 +93,7 @@ export const handleTemplateFile = async (
|
|
|
91
93
|
|
|
92
94
|
if (ans.isSingleEntry) {
|
|
93
95
|
generator.logger.debug(
|
|
94
|
-
|
|
96
|
+
`💡 [Current Entry Info]: Current Entry is Single Entry`,
|
|
95
97
|
);
|
|
96
98
|
await refactorSingleEntry(context, generator);
|
|
97
99
|
}
|
|
@@ -119,9 +121,11 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
|
119
121
|
process.exit(1);
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
generator.logger.debug(
|
|
123
|
-
generator.logger.debug(
|
|
124
|
-
|
|
124
|
+
generator.logger.debug(`🚀 [Start Run Entry Generator]`);
|
|
125
|
+
generator.logger.debug(
|
|
126
|
+
'💡 [Current Config]:',
|
|
127
|
+
JSON.stringify(context.config),
|
|
128
|
+
);
|
|
125
129
|
|
|
126
130
|
merge(context.config, { entriesDir: context.config.entriesDir || 'src' });
|
|
127
131
|
|
|
@@ -133,5 +137,5 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
|
133
137
|
);
|
|
134
138
|
}
|
|
135
139
|
|
|
136
|
-
generator.logger.debug(
|
|
140
|
+
generator.logger.debug(`🌟 [End Run Entry Generator]`);
|
|
137
141
|
};
|