@modern-js/generator-cases 3.7.2 → 3.7.4
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/index.js +2 -42
- package/dist/esm/index.js +2 -36
- package/dist/esm-node/index.js +2 -38
- package/dist/types/index.d.ts +0 -6
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -36,13 +36,9 @@ __export(src_exports, {
|
|
|
36
36
|
MWAServerValueMap: () => MWAServerValueMap,
|
|
37
37
|
MWASubProjectValueMap: () => MWASubProjectValueMap,
|
|
38
38
|
MWAValueMap: () => MWAValueMap,
|
|
39
|
-
ModuleSubProjectValueMap: () => ModuleSubProjectValueMap,
|
|
40
|
-
ModuleValueMap: () => ModuleValueMap,
|
|
41
39
|
PackageManagerValues: () => PackageManagerValues,
|
|
42
40
|
getMWACases: () => getMWACases,
|
|
43
|
-
getMWANewCases: () => getMWANewCases
|
|
44
|
-
getModuleCases: () => getModuleCases,
|
|
45
|
-
getModuleNewCases: () => getModuleNewCases
|
|
41
|
+
getMWANewCases: () => getMWANewCases
|
|
46
42
|
});
|
|
47
43
|
module.exports = __toCommonJS(src_exports);
|
|
48
44
|
var import_generator_common = require("@modern-js/generator-common");
|
|
@@ -56,10 +52,6 @@ const MWAValueMap = {
|
|
|
56
52
|
language: LanguageValues,
|
|
57
53
|
packageManager: PackageManagerValues
|
|
58
54
|
};
|
|
59
|
-
const ModuleValueMap = {
|
|
60
|
-
language: LanguageValues,
|
|
61
|
-
packageManager: PackageManagerValues
|
|
62
|
-
};
|
|
63
55
|
const getMWACases = (length) => {
|
|
64
56
|
const cases = (0, import_covertable.default)(MWAValueMap, {
|
|
65
57
|
length: length || Object.keys(MWAValueMap).length
|
|
@@ -69,15 +61,6 @@ const getMWACases = (length) => {
|
|
|
69
61
|
solution: import_generator_common.Solution.MWA
|
|
70
62
|
}));
|
|
71
63
|
};
|
|
72
|
-
const getModuleCases = (length) => {
|
|
73
|
-
const cases = (0, import_covertable.default)(ModuleValueMap, {
|
|
74
|
-
length: length || Object.keys(ModuleValueMap).length
|
|
75
|
-
});
|
|
76
|
-
return cases.map((item) => ({
|
|
77
|
-
...item,
|
|
78
|
-
solution: import_generator_common.Solution.Module
|
|
79
|
-
}));
|
|
80
|
-
};
|
|
81
64
|
const getMWAEntryCases = (_length) => {
|
|
82
65
|
return [
|
|
83
66
|
{
|
|
@@ -137,28 +120,9 @@ const getMWANewCases = (length) => {
|
|
|
137
120
|
});
|
|
138
121
|
return cases;
|
|
139
122
|
};
|
|
140
|
-
const getModuleNewCases = () => {
|
|
141
|
-
const cases = [];
|
|
142
|
-
import_generator_common.ModuleActionTypes.forEach((action) => {
|
|
143
|
-
const config = {
|
|
144
|
-
actionType: action
|
|
145
|
-
};
|
|
146
|
-
import_generator_common.ModuleActionTypesMap[action].forEach((option) => {
|
|
147
|
-
const currentConfig = {
|
|
148
|
-
...config,
|
|
149
|
-
[action]: option
|
|
150
|
-
};
|
|
151
|
-
cases.push(currentConfig);
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
return cases;
|
|
155
|
-
};
|
|
156
123
|
const MWASubProjectValueMap = {
|
|
157
124
|
language: LanguageValues
|
|
158
125
|
};
|
|
159
|
-
const ModuleSubProjectValueMap = {
|
|
160
|
-
language: LanguageValues
|
|
161
|
-
};
|
|
162
126
|
// Annotate the CommonJS export names for ESM import in node:
|
|
163
127
|
0 && (module.exports = {
|
|
164
128
|
BFFTypeValues,
|
|
@@ -169,11 +133,7 @@ const ModuleSubProjectValueMap = {
|
|
|
169
133
|
MWAServerValueMap,
|
|
170
134
|
MWASubProjectValueMap,
|
|
171
135
|
MWAValueMap,
|
|
172
|
-
ModuleSubProjectValueMap,
|
|
173
|
-
ModuleValueMap,
|
|
174
136
|
PackageManagerValues,
|
|
175
137
|
getMWACases,
|
|
176
|
-
getMWANewCases
|
|
177
|
-
getModuleCases,
|
|
178
|
-
getModuleNewCases
|
|
138
|
+
getMWANewCases
|
|
179
139
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
|
-
import { ActionElement, ActionFunction, BFFType, BooleanConfig, Framework, Language, MWAActionTypes, MWAActionTypesMap,
|
|
4
|
+
import { ActionElement, ActionFunction, BFFType, BooleanConfig, Framework, Language, MWAActionTypes, MWAActionTypesMap, PackageManager, Solution } from "@modern-js/generator-common";
|
|
5
5
|
import make from "covertable";
|
|
6
6
|
var LanguageValues = Object.values(Language);
|
|
7
7
|
var PackageManagerValues = Object.values(PackageManager);
|
|
@@ -12,10 +12,6 @@ var MWAValueMap = {
|
|
|
12
12
|
language: LanguageValues,
|
|
13
13
|
packageManager: PackageManagerValues
|
|
14
14
|
};
|
|
15
|
-
var ModuleValueMap = {
|
|
16
|
-
language: LanguageValues,
|
|
17
|
-
packageManager: PackageManagerValues
|
|
18
|
-
};
|
|
19
15
|
var getMWACases = function(length) {
|
|
20
16
|
var cases = make(MWAValueMap, {
|
|
21
17
|
length: length || Object.keys(MWAValueMap).length
|
|
@@ -26,16 +22,6 @@ var getMWACases = function(length) {
|
|
|
26
22
|
});
|
|
27
23
|
});
|
|
28
24
|
};
|
|
29
|
-
var getModuleCases = function(length) {
|
|
30
|
-
var cases = make(ModuleValueMap, {
|
|
31
|
-
length: length || Object.keys(ModuleValueMap).length
|
|
32
|
-
});
|
|
33
|
-
return cases.map(function(item) {
|
|
34
|
-
return _object_spread_props(_object_spread({}, item), {
|
|
35
|
-
solution: Solution.Module
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
25
|
var getMWAEntryCases = function(_length) {
|
|
40
26
|
return [
|
|
41
27
|
{
|
|
@@ -87,25 +73,9 @@ var getMWANewCases = function(length) {
|
|
|
87
73
|
});
|
|
88
74
|
return cases;
|
|
89
75
|
};
|
|
90
|
-
var getModuleNewCases = function() {
|
|
91
|
-
var cases = [];
|
|
92
|
-
ModuleActionTypes.forEach(function(action) {
|
|
93
|
-
var config = {
|
|
94
|
-
actionType: action
|
|
95
|
-
};
|
|
96
|
-
ModuleActionTypesMap[action].forEach(function(option) {
|
|
97
|
-
var currentConfig = _object_spread_props(_object_spread({}, config), _define_property({}, action, option));
|
|
98
|
-
cases.push(currentConfig);
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
return cases;
|
|
102
|
-
};
|
|
103
76
|
var MWASubProjectValueMap = {
|
|
104
77
|
language: LanguageValues
|
|
105
78
|
};
|
|
106
|
-
var ModuleSubProjectValueMap = {
|
|
107
|
-
language: LanguageValues
|
|
108
|
-
};
|
|
109
79
|
export {
|
|
110
80
|
BFFTypeValues,
|
|
111
81
|
BooleanConfigValues,
|
|
@@ -115,11 +85,7 @@ export {
|
|
|
115
85
|
MWAServerValueMap,
|
|
116
86
|
MWASubProjectValueMap,
|
|
117
87
|
MWAValueMap,
|
|
118
|
-
ModuleSubProjectValueMap,
|
|
119
|
-
ModuleValueMap,
|
|
120
88
|
PackageManagerValues,
|
|
121
89
|
getMWACases,
|
|
122
|
-
getMWANewCases
|
|
123
|
-
getModuleCases,
|
|
124
|
-
getModuleNewCases
|
|
90
|
+
getMWANewCases
|
|
125
91
|
};
|
package/dist/esm-node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionElement, ActionFunction, BFFType, BooleanConfig, Framework, Language, MWAActionTypes, MWAActionTypesMap,
|
|
1
|
+
import { ActionElement, ActionFunction, BFFType, BooleanConfig, Framework, Language, MWAActionTypes, MWAActionTypesMap, PackageManager, Solution } from "@modern-js/generator-common";
|
|
2
2
|
import make from "covertable";
|
|
3
3
|
const LanguageValues = Object.values(Language);
|
|
4
4
|
const PackageManagerValues = Object.values(PackageManager);
|
|
@@ -9,10 +9,6 @@ const MWAValueMap = {
|
|
|
9
9
|
language: LanguageValues,
|
|
10
10
|
packageManager: PackageManagerValues
|
|
11
11
|
};
|
|
12
|
-
const ModuleValueMap = {
|
|
13
|
-
language: LanguageValues,
|
|
14
|
-
packageManager: PackageManagerValues
|
|
15
|
-
};
|
|
16
12
|
const getMWACases = (length) => {
|
|
17
13
|
const cases = make(MWAValueMap, {
|
|
18
14
|
length: length || Object.keys(MWAValueMap).length
|
|
@@ -22,15 +18,6 @@ const getMWACases = (length) => {
|
|
|
22
18
|
solution: Solution.MWA
|
|
23
19
|
}));
|
|
24
20
|
};
|
|
25
|
-
const getModuleCases = (length) => {
|
|
26
|
-
const cases = make(ModuleValueMap, {
|
|
27
|
-
length: length || Object.keys(ModuleValueMap).length
|
|
28
|
-
});
|
|
29
|
-
return cases.map((item) => ({
|
|
30
|
-
...item,
|
|
31
|
-
solution: Solution.Module
|
|
32
|
-
}));
|
|
33
|
-
};
|
|
34
21
|
const getMWAEntryCases = (_length) => {
|
|
35
22
|
return [
|
|
36
23
|
{
|
|
@@ -90,28 +77,9 @@ const getMWANewCases = (length) => {
|
|
|
90
77
|
});
|
|
91
78
|
return cases;
|
|
92
79
|
};
|
|
93
|
-
const getModuleNewCases = () => {
|
|
94
|
-
const cases = [];
|
|
95
|
-
ModuleActionTypes.forEach((action) => {
|
|
96
|
-
const config = {
|
|
97
|
-
actionType: action
|
|
98
|
-
};
|
|
99
|
-
ModuleActionTypesMap[action].forEach((option) => {
|
|
100
|
-
const currentConfig = {
|
|
101
|
-
...config,
|
|
102
|
-
[action]: option
|
|
103
|
-
};
|
|
104
|
-
cases.push(currentConfig);
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
return cases;
|
|
108
|
-
};
|
|
109
80
|
const MWASubProjectValueMap = {
|
|
110
81
|
language: LanguageValues
|
|
111
82
|
};
|
|
112
|
-
const ModuleSubProjectValueMap = {
|
|
113
|
-
language: LanguageValues
|
|
114
|
-
};
|
|
115
83
|
export {
|
|
116
84
|
BFFTypeValues,
|
|
117
85
|
BooleanConfigValues,
|
|
@@ -121,11 +89,7 @@ export {
|
|
|
121
89
|
MWAServerValueMap,
|
|
122
90
|
MWASubProjectValueMap,
|
|
123
91
|
MWAValueMap,
|
|
124
|
-
ModuleSubProjectValueMap,
|
|
125
|
-
ModuleValueMap,
|
|
126
92
|
PackageManagerValues,
|
|
127
93
|
getMWACases,
|
|
128
|
-
getMWANewCases
|
|
129
|
-
getModuleCases,
|
|
130
|
-
getModuleNewCases
|
|
94
|
+
getMWANewCases
|
|
131
95
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,16 +5,10 @@ export declare const BooleanConfigValues: BooleanConfig[];
|
|
|
5
5
|
export declare const FrameworkValues: Framework[];
|
|
6
6
|
export declare const BFFTypeValues: BFFType[];
|
|
7
7
|
export declare const MWAValueMap: Record<string, string[]>;
|
|
8
|
-
export declare const ModuleValueMap: Record<string, string[]>;
|
|
9
8
|
export declare const getMWACases: (length?: number) => {
|
|
10
9
|
solution: Solution;
|
|
11
10
|
}[];
|
|
12
|
-
export declare const getModuleCases: (length?: number) => {
|
|
13
|
-
solution: Solution;
|
|
14
|
-
}[];
|
|
15
11
|
export declare const MWAServerValueMap: Record<string, string[]>;
|
|
16
12
|
export declare const MWABFFValueMap: Record<string, string[]>;
|
|
17
13
|
export declare const getMWANewCases: (length?: number) => Record<string, string>[];
|
|
18
|
-
export declare const getModuleNewCases: () => Record<string, string>[];
|
|
19
14
|
export declare const MWASubProjectValueMap: Record<string, string[]>;
|
|
20
|
-
export declare const ModuleSubProjectValueMap: Record<string, string[]>;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.7.
|
|
18
|
+
"version": "3.7.4",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@swc/helpers": "0.5.13",
|
|
35
35
|
"covertable": "^2.2.2",
|
|
36
|
-
"@modern-js/generator-common": "3.7.
|
|
36
|
+
"@modern-js/generator-common": "3.7.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "^29",
|
|
40
40
|
"@types/node": "^14",
|
|
41
41
|
"jest": "^29",
|
|
42
42
|
"typescript": "^5",
|
|
43
|
-
"@scripts/
|
|
44
|
-
"@scripts/
|
|
43
|
+
"@scripts/build": "2.62.0",
|
|
44
|
+
"@scripts/jest-config": "2.62.0"
|
|
45
45
|
},
|
|
46
46
|
"sideEffects": false,
|
|
47
47
|
"publishConfig": {
|