@modern-js/generator-common 3.4.17 → 3.6.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/cjs/locale/en.js +0 -5
- package/dist/cjs/locale/zh.js +0 -5
- package/dist/cjs/mwa/common.js +0 -19
- package/dist/cjs/mwa/project.js +2 -5
- package/dist/esm/locale/en.js +0 -5
- package/dist/esm/locale/zh.js +0 -5
- package/dist/esm/mwa/common.js +0 -20
- package/dist/esm/mwa/project.js +2 -5
- package/dist/esm-node/locale/en.js +0 -5
- package/dist/esm-node/locale/zh.js +0 -5
- package/dist/esm-node/mwa/common.js +0 -17
- package/dist/esm-node/mwa/project.js +2 -5
- package/dist/types/locale/en.d.ts +0 -5
- package/dist/types/locale/index.d.ts +0 -10
- package/dist/types/locale/zh.d.ts +0 -5
- package/dist/types/mwa/common.d.ts +0 -5
- package/dist/types/mwa/project.d.ts +0 -2
- package/package.json +9 -9
package/dist/cjs/locale/en.js
CHANGED
|
@@ -104,11 +104,6 @@ const EN_LOCALE = {
|
|
|
104
104
|
func: "Function",
|
|
105
105
|
framework: "Framework"
|
|
106
106
|
}
|
|
107
|
-
},
|
|
108
|
-
buildTools: {
|
|
109
|
-
self: "Please select the bundler:",
|
|
110
|
-
webpack: "webpack",
|
|
111
|
-
rspack: "Rspack (experimental)"
|
|
112
107
|
}
|
|
113
108
|
};
|
|
114
109
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/cjs/locale/zh.js
CHANGED
package/dist/cjs/mwa/common.js
CHANGED
|
@@ -18,10 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var common_exports = {};
|
|
20
20
|
__export(common_exports, {
|
|
21
|
-
BuildTools: () => BuildTools,
|
|
22
21
|
Framework: () => Framework,
|
|
23
22
|
FrameworkAppendTypeContent: () => FrameworkAppendTypeContent,
|
|
24
|
-
getBuildToolsSchema: () => getBuildToolsSchema,
|
|
25
23
|
getFrameworkSchema: () => getFrameworkSchema
|
|
26
24
|
});
|
|
27
25
|
module.exports = __toCommonJS(common_exports);
|
|
@@ -31,11 +29,6 @@ var Framework;
|
|
|
31
29
|
Framework2["Express"] = "express";
|
|
32
30
|
Framework2["Koa"] = "koa";
|
|
33
31
|
})(Framework || (Framework = {}));
|
|
34
|
-
var BuildTools;
|
|
35
|
-
(function(BuildTools2) {
|
|
36
|
-
BuildTools2["Webpack"] = "webpack";
|
|
37
|
-
BuildTools2["Rspack"] = "rspack";
|
|
38
|
-
})(BuildTools || (BuildTools = {}));
|
|
39
32
|
const getFrameworkSchema = (_extra = {}) => {
|
|
40
33
|
return {
|
|
41
34
|
type: "string",
|
|
@@ -46,25 +39,13 @@ const getFrameworkSchema = (_extra = {}) => {
|
|
|
46
39
|
}))
|
|
47
40
|
};
|
|
48
41
|
};
|
|
49
|
-
const getBuildToolsSchema = (_extra = {}) => {
|
|
50
|
-
return {
|
|
51
|
-
type: "string",
|
|
52
|
-
title: import_locale.i18n.t(import_locale.localeKeys.buildTools.self),
|
|
53
|
-
enum: Object.values(BuildTools).map((tool) => ({
|
|
54
|
-
value: tool,
|
|
55
|
-
label: import_locale.i18n.t(import_locale.localeKeys.buildTools[tool])
|
|
56
|
-
}))
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
42
|
const FrameworkAppendTypeContent = {
|
|
60
43
|
["express"]: `/// <reference types='@modern-js/plugin-express/types' />`,
|
|
61
44
|
["koa"]: `/// <reference types='@modern-js/plugin-koa/types' />`
|
|
62
45
|
};
|
|
63
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
47
|
0 && (module.exports = {
|
|
65
|
-
BuildTools,
|
|
66
48
|
Framework,
|
|
67
49
|
FrameworkAppendTypeContent,
|
|
68
|
-
getBuildToolsSchema,
|
|
69
50
|
getFrameworkSchema
|
|
70
51
|
});
|
package/dist/cjs/mwa/project.js
CHANGED
|
@@ -24,14 +24,12 @@ __export(project_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(project_exports);
|
|
26
26
|
var import_common = require("../common");
|
|
27
|
-
var import_common2 = require("./common");
|
|
28
27
|
const getMWASchemaProperties = (extra) => {
|
|
29
28
|
return {
|
|
30
29
|
packageName: (0, import_common.getPackageNameSchema)(extra),
|
|
31
30
|
packagePath: (0, import_common.getPackagePathSchema)(extra),
|
|
32
31
|
language: (0, import_common.getLanguageSchema)(extra),
|
|
33
|
-
packageManager: (0, import_common.getPackageManagerSchema)(extra)
|
|
34
|
-
buildTools: (0, import_common2.getBuildToolsSchema)(extra)
|
|
32
|
+
packageManager: (0, import_common.getPackageManagerSchema)(extra)
|
|
35
33
|
};
|
|
36
34
|
};
|
|
37
35
|
const getMWASchema = (extra = {}) => {
|
|
@@ -43,8 +41,7 @@ const getMWASchema = (extra = {}) => {
|
|
|
43
41
|
const MWADefaultConfig = {
|
|
44
42
|
language: import_common.Language.TS,
|
|
45
43
|
packageManager: import_common.PackageManager.Pnpm,
|
|
46
|
-
needModifyMWAConfig: import_common.BooleanConfig.NO
|
|
47
|
-
buildTools: import_common2.BuildTools.Webpack
|
|
44
|
+
needModifyMWAConfig: import_common.BooleanConfig.NO
|
|
48
45
|
};
|
|
49
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
47
|
0 && (module.exports = {
|
package/dist/esm/locale/en.js
CHANGED
package/dist/esm/locale/zh.js
CHANGED
package/dist/esm/mwa/common.js
CHANGED
|
@@ -5,11 +5,6 @@ var Framework;
|
|
|
5
5
|
Framework2["Express"] = "express";
|
|
6
6
|
Framework2["Koa"] = "koa";
|
|
7
7
|
})(Framework || (Framework = {}));
|
|
8
|
-
var BuildTools;
|
|
9
|
-
(function(BuildTools2) {
|
|
10
|
-
BuildTools2["Webpack"] = "webpack";
|
|
11
|
-
BuildTools2["Rspack"] = "rspack";
|
|
12
|
-
})(BuildTools || (BuildTools = {}));
|
|
13
8
|
var getFrameworkSchema = function() {
|
|
14
9
|
var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
15
10
|
return {
|
|
@@ -23,25 +18,10 @@ var getFrameworkSchema = function() {
|
|
|
23
18
|
})
|
|
24
19
|
};
|
|
25
20
|
};
|
|
26
|
-
var getBuildToolsSchema = function() {
|
|
27
|
-
var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
28
|
-
return {
|
|
29
|
-
type: "string",
|
|
30
|
-
title: i18n.t(localeKeys.buildTools.self),
|
|
31
|
-
enum: Object.values(BuildTools).map(function(tool) {
|
|
32
|
-
return {
|
|
33
|
-
value: tool,
|
|
34
|
-
label: i18n.t(localeKeys.buildTools[tool])
|
|
35
|
-
};
|
|
36
|
-
})
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
21
|
var _obj;
|
|
40
22
|
var FrameworkAppendTypeContent = (_obj = {}, _define_property(_obj, "express", "/// <reference types='@modern-js/plugin-express/types' />"), _define_property(_obj, "koa", "/// <reference types='@modern-js/plugin-koa/types' />"), _obj);
|
|
41
23
|
export {
|
|
42
|
-
BuildTools,
|
|
43
24
|
Framework,
|
|
44
25
|
FrameworkAppendTypeContent,
|
|
45
|
-
getBuildToolsSchema,
|
|
46
26
|
getFrameworkSchema
|
|
47
27
|
};
|
package/dist/esm/mwa/project.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { BooleanConfig, Language, PackageManager, getLanguageSchema, getPackageManagerSchema, getPackageNameSchema, getPackagePathSchema } from "../common";
|
|
2
|
-
import { BuildTools, getBuildToolsSchema } from "./common";
|
|
3
2
|
var getMWASchemaProperties = function(extra) {
|
|
4
3
|
return {
|
|
5
4
|
packageName: getPackageNameSchema(extra),
|
|
6
5
|
packagePath: getPackagePathSchema(extra),
|
|
7
6
|
language: getLanguageSchema(extra),
|
|
8
|
-
packageManager: getPackageManagerSchema(extra)
|
|
9
|
-
buildTools: getBuildToolsSchema(extra)
|
|
7
|
+
packageManager: getPackageManagerSchema(extra)
|
|
10
8
|
};
|
|
11
9
|
};
|
|
12
10
|
var getMWASchema = function() {
|
|
@@ -19,8 +17,7 @@ var getMWASchema = function() {
|
|
|
19
17
|
var MWADefaultConfig = {
|
|
20
18
|
language: Language.TS,
|
|
21
19
|
packageManager: PackageManager.Pnpm,
|
|
22
|
-
needModifyMWAConfig: BooleanConfig.NO
|
|
23
|
-
buildTools: BuildTools.Webpack
|
|
20
|
+
needModifyMWAConfig: BooleanConfig.NO
|
|
24
21
|
};
|
|
25
22
|
export {
|
|
26
23
|
MWADefaultConfig,
|
|
@@ -4,11 +4,6 @@ var Framework;
|
|
|
4
4
|
Framework2["Express"] = "express";
|
|
5
5
|
Framework2["Koa"] = "koa";
|
|
6
6
|
})(Framework || (Framework = {}));
|
|
7
|
-
var BuildTools;
|
|
8
|
-
(function(BuildTools2) {
|
|
9
|
-
BuildTools2["Webpack"] = "webpack";
|
|
10
|
-
BuildTools2["Rspack"] = "rspack";
|
|
11
|
-
})(BuildTools || (BuildTools = {}));
|
|
12
7
|
const getFrameworkSchema = (_extra = {}) => {
|
|
13
8
|
return {
|
|
14
9
|
type: "string",
|
|
@@ -19,24 +14,12 @@ const getFrameworkSchema = (_extra = {}) => {
|
|
|
19
14
|
}))
|
|
20
15
|
};
|
|
21
16
|
};
|
|
22
|
-
const getBuildToolsSchema = (_extra = {}) => {
|
|
23
|
-
return {
|
|
24
|
-
type: "string",
|
|
25
|
-
title: i18n.t(localeKeys.buildTools.self),
|
|
26
|
-
enum: Object.values(BuildTools).map((tool) => ({
|
|
27
|
-
value: tool,
|
|
28
|
-
label: i18n.t(localeKeys.buildTools[tool])
|
|
29
|
-
}))
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
17
|
const FrameworkAppendTypeContent = {
|
|
33
18
|
["express"]: `/// <reference types='@modern-js/plugin-express/types' />`,
|
|
34
19
|
["koa"]: `/// <reference types='@modern-js/plugin-koa/types' />`
|
|
35
20
|
};
|
|
36
21
|
export {
|
|
37
|
-
BuildTools,
|
|
38
22
|
Framework,
|
|
39
23
|
FrameworkAppendTypeContent,
|
|
40
|
-
getBuildToolsSchema,
|
|
41
24
|
getFrameworkSchema
|
|
42
25
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { BooleanConfig, Language, PackageManager, getLanguageSchema, getPackageManagerSchema, getPackageNameSchema, getPackagePathSchema } from "../common";
|
|
2
|
-
import { BuildTools, getBuildToolsSchema } from "./common";
|
|
3
2
|
const getMWASchemaProperties = (extra) => {
|
|
4
3
|
return {
|
|
5
4
|
packageName: getPackageNameSchema(extra),
|
|
6
5
|
packagePath: getPackagePathSchema(extra),
|
|
7
6
|
language: getLanguageSchema(extra),
|
|
8
|
-
packageManager: getPackageManagerSchema(extra)
|
|
9
|
-
buildTools: getBuildToolsSchema(extra)
|
|
7
|
+
packageManager: getPackageManagerSchema(extra)
|
|
10
8
|
};
|
|
11
9
|
};
|
|
12
10
|
const getMWASchema = (extra = {}) => {
|
|
@@ -18,8 +16,7 @@ const getMWASchema = (extra = {}) => {
|
|
|
18
16
|
const MWADefaultConfig = {
|
|
19
17
|
language: Language.TS,
|
|
20
18
|
packageManager: PackageManager.Pnpm,
|
|
21
|
-
needModifyMWAConfig: BooleanConfig.NO
|
|
22
|
-
buildTools: BuildTools.Webpack
|
|
19
|
+
needModifyMWAConfig: BooleanConfig.NO
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
22
|
MWADefaultConfig,
|
|
@@ -84,11 +84,6 @@ declare const localeKeys: {
|
|
|
84
84
|
framework: string;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
buildTools: {
|
|
88
|
-
self: string;
|
|
89
|
-
webpack: string;
|
|
90
|
-
rspack: string;
|
|
91
|
-
};
|
|
92
87
|
} | {
|
|
93
88
|
solution: {
|
|
94
89
|
self: string;
|
|
@@ -173,10 +168,5 @@ declare const localeKeys: {
|
|
|
173
168
|
framework: string;
|
|
174
169
|
};
|
|
175
170
|
};
|
|
176
|
-
buildTools: {
|
|
177
|
-
self: string;
|
|
178
|
-
webpack: string;
|
|
179
|
-
rspack: string;
|
|
180
|
-
};
|
|
181
171
|
};
|
|
182
172
|
export { i18n, localeKeys };
|
|
@@ -3,10 +3,5 @@ export declare enum Framework {
|
|
|
3
3
|
Express = "express",
|
|
4
4
|
Koa = "koa"
|
|
5
5
|
}
|
|
6
|
-
export declare enum BuildTools {
|
|
7
|
-
Webpack = "webpack",
|
|
8
|
-
Rspack = "rspack"
|
|
9
|
-
}
|
|
10
6
|
export declare const getFrameworkSchema: (_extra?: Record<string, any>) => Schema;
|
|
11
|
-
export declare const getBuildToolsSchema: (_extra?: Record<string, any>) => Schema;
|
|
12
7
|
export declare const FrameworkAppendTypeContent: Record<Framework, string>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { Schema } from '@modern-js/codesmith-formily';
|
|
2
2
|
import { BooleanConfig, Language, PackageManager } from '../common';
|
|
3
|
-
import { BuildTools } from './common';
|
|
4
3
|
export declare const getMWASchemaProperties: (extra: Record<string, any>) => Schema['properties'];
|
|
5
4
|
export declare const getMWASchema: (extra?: Record<string, any>) => Schema;
|
|
6
5
|
export declare const MWADefaultConfig: {
|
|
7
6
|
language: Language;
|
|
8
7
|
packageManager: PackageManager;
|
|
9
8
|
needModifyMWAConfig: BooleanConfig;
|
|
10
|
-
buildTools: BuildTools;
|
|
11
9
|
};
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.6.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@modern-js/codesmith-formily": "2.4.
|
|
35
|
-
"@swc/helpers": "0.5.
|
|
36
|
-
"@modern-js/plugin-i18n": "2.
|
|
34
|
+
"@modern-js/codesmith-formily": "2.4.2",
|
|
35
|
+
"@swc/helpers": "0.5.13",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.60.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@modern-js/codesmith": "2.4.
|
|
40
|
-
"@modern-js/codesmith-api-app": "2.4.
|
|
39
|
+
"@modern-js/codesmith": "2.4.2",
|
|
40
|
+
"@modern-js/codesmith-api-app": "2.4.2",
|
|
41
41
|
"@types/jest": "^29",
|
|
42
42
|
"@types/node": "^14",
|
|
43
43
|
"jest": "^29",
|
|
44
44
|
"typescript": "^5",
|
|
45
|
-
"@modern-js/utils": "2.
|
|
46
|
-
"@scripts/build": "2.
|
|
47
|
-
"@scripts/jest-config": "2.
|
|
45
|
+
"@modern-js/utils": "2.60.0",
|
|
46
|
+
"@scripts/build": "2.60.0",
|
|
47
|
+
"@scripts/jest-config": "2.60.0"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"publishConfig": {
|