@modern-js/generator-cases 3.3.24 → 3.4.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/index.js +2 -49
- package/dist/esm/index.js +2 -49
- package/dist/esm-node/index.js +2 -46
- package/dist/types/index.d.ts +0 -5
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -39,14 +39,11 @@ __export(src_exports, {
|
|
|
39
39
|
MWAValueMap: () => MWAValueMap,
|
|
40
40
|
ModuleSubProjectValueMap: () => ModuleSubProjectValueMap,
|
|
41
41
|
ModuleValueMap: () => ModuleValueMap,
|
|
42
|
-
MonorepoValueMap: () => MonorepoValueMap,
|
|
43
42
|
PackageManagerValues: () => PackageManagerValues,
|
|
44
43
|
getMWACases: () => getMWACases,
|
|
45
44
|
getMWANewCases: () => getMWANewCases,
|
|
46
45
|
getModuleCases: () => getModuleCases,
|
|
47
|
-
getModuleNewCases: () => getModuleNewCases
|
|
48
|
-
getMonorepoCases: () => getMonorepoCases,
|
|
49
|
-
getMonorepoNewCases: () => getMonorepoNewCases
|
|
46
|
+
getModuleNewCases: () => getModuleNewCases
|
|
50
47
|
});
|
|
51
48
|
module.exports = __toCommonJS(src_exports);
|
|
52
49
|
var import_covertable = __toESM(require("covertable"));
|
|
@@ -66,9 +63,6 @@ const ModuleValueMap = {
|
|
|
66
63
|
language: LanguageValues,
|
|
67
64
|
packageManager: PackageManagerValues
|
|
68
65
|
};
|
|
69
|
-
const MonorepoValueMap = {
|
|
70
|
-
packageManager: PackageManagerValues.filter((packageManager) => packageManager !== "npm")
|
|
71
|
-
};
|
|
72
66
|
const getMWACases = (length) => {
|
|
73
67
|
const cases = (0, import_covertable.default)(MWAValueMap, {
|
|
74
68
|
length: length || Object.keys(MWAValueMap).length
|
|
@@ -87,15 +81,6 @@ const getModuleCases = (length) => {
|
|
|
87
81
|
solution: import_generator_common.Solution.Module
|
|
88
82
|
}));
|
|
89
83
|
};
|
|
90
|
-
const getMonorepoCases = () => {
|
|
91
|
-
const cases = (0, import_covertable.default)(MonorepoValueMap, {
|
|
92
|
-
length: Object.keys(MonorepoValueMap).length
|
|
93
|
-
});
|
|
94
|
-
return cases.map((item) => ({
|
|
95
|
-
...item,
|
|
96
|
-
solution: import_generator_common.Solution.Monorepo
|
|
97
|
-
}));
|
|
98
|
-
};
|
|
99
84
|
const getMWAEntryCases = (_length) => {
|
|
100
85
|
return [
|
|
101
86
|
{
|
|
@@ -177,35 +162,6 @@ const MWASubProjectValueMap = {
|
|
|
177
162
|
const ModuleSubProjectValueMap = {
|
|
178
163
|
language: LanguageValues
|
|
179
164
|
};
|
|
180
|
-
const getMWASubProjectCases = (length) => {
|
|
181
|
-
const cases = (0, import_covertable.default)(MWASubProjectValueMap, {
|
|
182
|
-
length: length || Object.keys(MWASubProjectValueMap).length
|
|
183
|
-
});
|
|
184
|
-
return cases.map((item) => ({
|
|
185
|
-
...item,
|
|
186
|
-
packageName: Object.values(item).join("-"),
|
|
187
|
-
packagePath: Object.values(item).join("-"),
|
|
188
|
-
solution: import_generator_common.SubSolution.MWA
|
|
189
|
-
}));
|
|
190
|
-
};
|
|
191
|
-
const getModuleSubProjectCases = (length) => {
|
|
192
|
-
const cases = (0, import_covertable.default)(ModuleSubProjectValueMap, {
|
|
193
|
-
length: length || Object.keys(ModuleSubProjectValueMap).length
|
|
194
|
-
});
|
|
195
|
-
return cases.map((item) => ({
|
|
196
|
-
...item,
|
|
197
|
-
packageName: Object.values(item).join("-"),
|
|
198
|
-
packagePath: Object.values(item).join("-"),
|
|
199
|
-
solution: import_generator_common.SubSolution.Module
|
|
200
|
-
}));
|
|
201
|
-
};
|
|
202
|
-
const getMonorepoNewCases = (length) => {
|
|
203
|
-
const cases = [
|
|
204
|
-
...getMWASubProjectCases(length),
|
|
205
|
-
...getModuleSubProjectCases(length)
|
|
206
|
-
];
|
|
207
|
-
return cases;
|
|
208
|
-
};
|
|
209
165
|
// Annotate the CommonJS export names for ESM import in node:
|
|
210
166
|
0 && (module.exports = {
|
|
211
167
|
BFFTypeValues,
|
|
@@ -219,12 +175,9 @@ const getMonorepoNewCases = (length) => {
|
|
|
219
175
|
MWAValueMap,
|
|
220
176
|
ModuleSubProjectValueMap,
|
|
221
177
|
ModuleValueMap,
|
|
222
|
-
MonorepoValueMap,
|
|
223
178
|
PackageManagerValues,
|
|
224
179
|
getMWACases,
|
|
225
180
|
getMWANewCases,
|
|
226
181
|
getModuleCases,
|
|
227
|
-
getModuleNewCases
|
|
228
|
-
getMonorepoCases,
|
|
229
|
-
getMonorepoNewCases
|
|
182
|
+
getModuleNewCases
|
|
230
183
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
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 { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
5
4
|
import make from "covertable";
|
|
6
|
-
import { Solution, PackageManager, Language, BooleanConfig, MWAActionTypes, MWAActionTypesMap, Framework, BFFType, ActionElement, ActionFunction, ModuleActionTypes, ModuleActionTypesMap,
|
|
5
|
+
import { Solution, PackageManager, Language, BooleanConfig, MWAActionTypes, MWAActionTypesMap, Framework, BFFType, ActionElement, ActionFunction, ModuleActionTypes, ModuleActionTypesMap, BuildTools } from "@modern-js/generator-common";
|
|
7
6
|
var LanguageValues = Object.values(Language);
|
|
8
7
|
var PackageManagerValues = Object.values(PackageManager);
|
|
9
8
|
var BooleanConfigValues = Object.values(BooleanConfig);
|
|
@@ -19,11 +18,6 @@ var ModuleValueMap = {
|
|
|
19
18
|
language: LanguageValues,
|
|
20
19
|
packageManager: PackageManagerValues
|
|
21
20
|
};
|
|
22
|
-
var MonorepoValueMap = {
|
|
23
|
-
packageManager: PackageManagerValues.filter(function(packageManager) {
|
|
24
|
-
return packageManager !== "npm";
|
|
25
|
-
})
|
|
26
|
-
};
|
|
27
21
|
var getMWACases = function(length) {
|
|
28
22
|
var cases = make(MWAValueMap, {
|
|
29
23
|
length: length || Object.keys(MWAValueMap).length
|
|
@@ -44,16 +38,6 @@ var getModuleCases = function(length) {
|
|
|
44
38
|
});
|
|
45
39
|
});
|
|
46
40
|
};
|
|
47
|
-
var getMonorepoCases = function() {
|
|
48
|
-
var cases = make(MonorepoValueMap, {
|
|
49
|
-
length: Object.keys(MonorepoValueMap).length
|
|
50
|
-
});
|
|
51
|
-
return cases.map(function(item) {
|
|
52
|
-
return _object_spread_props(_object_spread({}, item), {
|
|
53
|
-
solution: Solution.Monorepo
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
41
|
var getMWAEntryCases = function(_length) {
|
|
58
42
|
return [
|
|
59
43
|
{
|
|
@@ -124,34 +108,6 @@ var MWASubProjectValueMap = {
|
|
|
124
108
|
var ModuleSubProjectValueMap = {
|
|
125
109
|
language: LanguageValues
|
|
126
110
|
};
|
|
127
|
-
var getMWASubProjectCases = function(length) {
|
|
128
|
-
var cases = make(MWASubProjectValueMap, {
|
|
129
|
-
length: length || Object.keys(MWASubProjectValueMap).length
|
|
130
|
-
});
|
|
131
|
-
return cases.map(function(item) {
|
|
132
|
-
return _object_spread_props(_object_spread({}, item), {
|
|
133
|
-
packageName: Object.values(item).join("-"),
|
|
134
|
-
packagePath: Object.values(item).join("-"),
|
|
135
|
-
solution: SubSolution.MWA
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
var getModuleSubProjectCases = function(length) {
|
|
140
|
-
var cases = make(ModuleSubProjectValueMap, {
|
|
141
|
-
length: length || Object.keys(ModuleSubProjectValueMap).length
|
|
142
|
-
});
|
|
143
|
-
return cases.map(function(item) {
|
|
144
|
-
return _object_spread_props(_object_spread({}, item), {
|
|
145
|
-
packageName: Object.values(item).join("-"),
|
|
146
|
-
packagePath: Object.values(item).join("-"),
|
|
147
|
-
solution: SubSolution.Module
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
var getMonorepoNewCases = function(length) {
|
|
152
|
-
var cases = _to_consumable_array(getMWASubProjectCases(length)).concat(_to_consumable_array(getModuleSubProjectCases(length)));
|
|
153
|
-
return cases;
|
|
154
|
-
};
|
|
155
111
|
export {
|
|
156
112
|
BFFTypeValues,
|
|
157
113
|
BooleanConfigValues,
|
|
@@ -164,12 +120,9 @@ export {
|
|
|
164
120
|
MWAValueMap,
|
|
165
121
|
ModuleSubProjectValueMap,
|
|
166
122
|
ModuleValueMap,
|
|
167
|
-
MonorepoValueMap,
|
|
168
123
|
PackageManagerValues,
|
|
169
124
|
getMWACases,
|
|
170
125
|
getMWANewCases,
|
|
171
126
|
getModuleCases,
|
|
172
|
-
getModuleNewCases
|
|
173
|
-
getMonorepoCases,
|
|
174
|
-
getMonorepoNewCases
|
|
127
|
+
getModuleNewCases
|
|
175
128
|
};
|
package/dist/esm-node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import make from "covertable";
|
|
2
|
-
import { Solution, PackageManager, Language, BooleanConfig, MWAActionTypes, MWAActionTypesMap, Framework, BFFType, ActionElement, ActionFunction, ModuleActionTypes, ModuleActionTypesMap,
|
|
2
|
+
import { Solution, PackageManager, Language, BooleanConfig, MWAActionTypes, MWAActionTypesMap, Framework, BFFType, ActionElement, ActionFunction, ModuleActionTypes, ModuleActionTypesMap, BuildTools } from "@modern-js/generator-common";
|
|
3
3
|
const LanguageValues = Object.values(Language);
|
|
4
4
|
const PackageManagerValues = Object.values(PackageManager);
|
|
5
5
|
const BooleanConfigValues = Object.values(BooleanConfig);
|
|
@@ -15,9 +15,6 @@ const ModuleValueMap = {
|
|
|
15
15
|
language: LanguageValues,
|
|
16
16
|
packageManager: PackageManagerValues
|
|
17
17
|
};
|
|
18
|
-
const MonorepoValueMap = {
|
|
19
|
-
packageManager: PackageManagerValues.filter((packageManager) => packageManager !== "npm")
|
|
20
|
-
};
|
|
21
18
|
const getMWACases = (length) => {
|
|
22
19
|
const cases = make(MWAValueMap, {
|
|
23
20
|
length: length || Object.keys(MWAValueMap).length
|
|
@@ -36,15 +33,6 @@ const getModuleCases = (length) => {
|
|
|
36
33
|
solution: Solution.Module
|
|
37
34
|
}));
|
|
38
35
|
};
|
|
39
|
-
const getMonorepoCases = () => {
|
|
40
|
-
const cases = make(MonorepoValueMap, {
|
|
41
|
-
length: Object.keys(MonorepoValueMap).length
|
|
42
|
-
});
|
|
43
|
-
return cases.map((item) => ({
|
|
44
|
-
...item,
|
|
45
|
-
solution: Solution.Monorepo
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
36
|
const getMWAEntryCases = (_length) => {
|
|
49
37
|
return [
|
|
50
38
|
{
|
|
@@ -126,35 +114,6 @@ const MWASubProjectValueMap = {
|
|
|
126
114
|
const ModuleSubProjectValueMap = {
|
|
127
115
|
language: LanguageValues
|
|
128
116
|
};
|
|
129
|
-
const getMWASubProjectCases = (length) => {
|
|
130
|
-
const cases = make(MWASubProjectValueMap, {
|
|
131
|
-
length: length || Object.keys(MWASubProjectValueMap).length
|
|
132
|
-
});
|
|
133
|
-
return cases.map((item) => ({
|
|
134
|
-
...item,
|
|
135
|
-
packageName: Object.values(item).join("-"),
|
|
136
|
-
packagePath: Object.values(item).join("-"),
|
|
137
|
-
solution: SubSolution.MWA
|
|
138
|
-
}));
|
|
139
|
-
};
|
|
140
|
-
const getModuleSubProjectCases = (length) => {
|
|
141
|
-
const cases = make(ModuleSubProjectValueMap, {
|
|
142
|
-
length: length || Object.keys(ModuleSubProjectValueMap).length
|
|
143
|
-
});
|
|
144
|
-
return cases.map((item) => ({
|
|
145
|
-
...item,
|
|
146
|
-
packageName: Object.values(item).join("-"),
|
|
147
|
-
packagePath: Object.values(item).join("-"),
|
|
148
|
-
solution: SubSolution.Module
|
|
149
|
-
}));
|
|
150
|
-
};
|
|
151
|
-
const getMonorepoNewCases = (length) => {
|
|
152
|
-
const cases = [
|
|
153
|
-
...getMWASubProjectCases(length),
|
|
154
|
-
...getModuleSubProjectCases(length)
|
|
155
|
-
];
|
|
156
|
-
return cases;
|
|
157
|
-
};
|
|
158
117
|
export {
|
|
159
118
|
BFFTypeValues,
|
|
160
119
|
BooleanConfigValues,
|
|
@@ -167,12 +126,9 @@ export {
|
|
|
167
126
|
MWAValueMap,
|
|
168
127
|
ModuleSubProjectValueMap,
|
|
169
128
|
ModuleValueMap,
|
|
170
|
-
MonorepoValueMap,
|
|
171
129
|
PackageManagerValues,
|
|
172
130
|
getMWACases,
|
|
173
131
|
getMWANewCases,
|
|
174
132
|
getModuleCases,
|
|
175
|
-
getModuleNewCases
|
|
176
|
-
getMonorepoCases,
|
|
177
|
-
getMonorepoNewCases
|
|
133
|
+
getModuleNewCases
|
|
178
134
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,20 +7,15 @@ export declare const BFFTypeValues: BFFType[];
|
|
|
7
7
|
export declare const BuildToolsValues: BuildTools[];
|
|
8
8
|
export declare const MWAValueMap: Record<string, string[]>;
|
|
9
9
|
export declare const ModuleValueMap: Record<string, string[]>;
|
|
10
|
-
export declare const MonorepoValueMap: Record<string, string[]>;
|
|
11
10
|
export declare const getMWACases: (length?: number) => {
|
|
12
11
|
solution: Solution;
|
|
13
12
|
}[];
|
|
14
13
|
export declare const getModuleCases: (length?: number) => {
|
|
15
14
|
solution: Solution;
|
|
16
15
|
}[];
|
|
17
|
-
export declare const getMonorepoCases: () => {
|
|
18
|
-
solution: Solution;
|
|
19
|
-
}[];
|
|
20
16
|
export declare const MWAServerValueMap: Record<string, string[]>;
|
|
21
17
|
export declare const MWABFFValueMap: Record<string, string[]>;
|
|
22
18
|
export declare const getMWANewCases: (length?: number) => Record<string, string>[];
|
|
23
19
|
export declare const getModuleNewCases: () => Record<string, string>[];
|
|
24
20
|
export declare const MWASubProjectValueMap: Record<string, string[]>;
|
|
25
21
|
export declare const ModuleSubProjectValueMap: Record<string, string[]>;
|
|
26
|
-
export declare const getMonorepoNewCases: (length?: number) => Record<string, string>[];
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.4.0",
|
|
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
|
"covertable": "^2.2.2",
|
|
35
35
|
"@swc/helpers": "0.5.3",
|
|
36
|
-
"@modern-js/generator-common": "3.
|
|
36
|
+
"@modern-js/generator-common": "3.4.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "^29",
|
|
40
40
|
"@types/node": "^14",
|
|
41
41
|
"typescript": "^5",
|
|
42
42
|
"jest": "^29",
|
|
43
|
-
"@scripts/build": "2.
|
|
44
|
-
"@scripts/jest-config": "2.
|
|
43
|
+
"@scripts/build": "2.53.0",
|
|
44
|
+
"@scripts/jest-config": "2.53.0"
|
|
45
45
|
},
|
|
46
46
|
"sideEffects": false,
|
|
47
47
|
"publishConfig": {
|