@modern-js/generator-cases 3.0.0-beta.0 → 3.0.0-beta.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @modern-js/generator-cases
2
2
 
3
+ ## 3.0.0-beta.1
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [dda38c9]
12
+ - @modern-js/generator-common@3.0.0-beta.1
13
+
3
14
  ## 3.0.0-beta.0
4
15
 
5
16
  ### Major Changes
@@ -1,9 +1,6 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
4
  import make from 'covertable';
8
5
  import { Solution, PackageManager, Language, BooleanConfig, MWAActionTypes, MWAActionTypesMap, Framework, BFFType, ActionElement, ActionFunction, ModuleActionTypes, ModuleActionTypesMap, SubSolution } from '@modern-js/generator-common';
9
6
  export const LanguageValues = Object.values(Language);
@@ -46,30 +43,24 @@ export const getMonorepoCases = () => {
46
43
  solution: Solution.Monorepo
47
44
  }));
48
45
  };
49
-
50
46
  const getMWAEntryCases = _length => {
51
47
  return [{
52
48
  name: 'test'
53
49
  }];
54
50
  };
55
-
56
51
  export const MWAServerValueMap = {
57
52
  framework: FrameworkValues
58
53
  };
59
-
60
54
  const getMWAServerCases = () => make(MWAServerValueMap, {
61
55
  length: Object.keys(MWAServerValueMap).length
62
56
  });
63
-
64
57
  export const MWABFFValueMap = {
65
58
  bffType: BFFTypeValues,
66
59
  framework: FrameworkValues
67
60
  };
68
-
69
61
  const getMWABFFCases = length => make(MWABFFValueMap, {
70
62
  length: length || Object.keys(MWABFFValueMap).length
71
63
  });
72
-
73
64
  export const getMWANewCases = length => {
74
65
  const cases = [];
75
66
  MWAActionTypes.forEach(action => {
@@ -78,11 +69,9 @@ export const getMWANewCases = length => {
78
69
  };
79
70
  MWAActionTypesMap[action].forEach(option => {
80
71
  config[action] = option;
81
-
82
72
  const currentConfig = _objectSpread(_objectSpread({}, config), {}, {
83
73
  [action]: option
84
74
  });
85
-
86
75
  if (option === ActionElement.Entry) {
87
76
  const entryCases = getMWAEntryCases(length);
88
77
  entryCases.forEach(c => {
@@ -113,7 +102,6 @@ export const getModuleNewCases = () => {
113
102
  const currentConfig = _objectSpread(_objectSpread({}, config), {}, {
114
103
  [action]: option
115
104
  });
116
-
117
105
  cases.push(currentConfig);
118
106
  });
119
107
  });
@@ -125,7 +113,6 @@ export const MWASubProjectValueMap = {
125
113
  export const ModuleSubProjectValueMap = {
126
114
  language: LanguageValues
127
115
  };
128
-
129
116
  const getMWASubProjectCases = (isTest, length) => {
130
117
  const cases = make(MWASubProjectValueMap, {
131
118
  length: length || Object.keys(MWASubProjectValueMap).length
@@ -136,7 +123,6 @@ const getMWASubProjectCases = (isTest, length) => {
136
123
  solution: isTest ? SubSolution.MWATest : SubSolution.MWA
137
124
  }));
138
125
  };
139
-
140
126
  const getModuleSubProjectCases = (isInner, length) => {
141
127
  const cases = make(ModuleSubProjectValueMap, {
142
128
  length: length || Object.keys(ModuleSubProjectValueMap).length
@@ -147,7 +133,6 @@ const getModuleSubProjectCases = (isInner, length) => {
147
133
  solution: isInner ? SubSolution.InnerModule : SubSolution.Module
148
134
  }));
149
135
  };
150
-
151
136
  export const getMonorepoNewCases = length => {
152
137
  const cases = [...getMWASubProjectCases(false, length), ...getMWASubProjectCases(true, length), ...getModuleSubProjectCases(false, length), ...getModuleSubProjectCases(true, length)];
153
138
  return cases;
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getMonorepoNewCases = exports.getMonorepoCases = exports.getModuleNewCases = exports.getModuleCases = exports.getMWANewCases = exports.getMWACases = exports.PackageManagerValues = exports.MonorepoValueMap = exports.ModuleValueMap = exports.ModuleSubProjectValueMap = exports.MWAValueMap = exports.MWASubProjectValueMap = exports.MWAServerValueMap = exports.MWABFFValueMap = exports.LanguageValues = exports.FrameworkValues = exports.BooleanConfigValues = exports.BFFTypeValues = void 0;
7
-
8
7
  var _covertable = _interopRequireDefault(require("covertable"));
9
-
10
8
  var _generatorCommon = require("@modern-js/generator-common");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
-
16
11
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
-
18
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
-
20
13
  const LanguageValues = Object.values(_generatorCommon.Language);
21
14
  exports.LanguageValues = LanguageValues;
22
15
  const PackageManagerValues = Object.values(_generatorCommon.PackageManager);
@@ -41,7 +34,6 @@ const MonorepoValueMap = {
41
34
  packageManager: PackageManagerValues.filter(packageManager => packageManager !== 'npm')
42
35
  };
43
36
  exports.MonorepoValueMap = MonorepoValueMap;
44
-
45
37
  const getMWACases = length => {
46
38
  const cases = (0, _covertable.default)(MWAValueMap, {
47
39
  length: length || Object.keys(MWAValueMap).length
@@ -50,9 +42,7 @@ const getMWACases = length => {
50
42
  solution: _generatorCommon.Solution.MWA
51
43
  }));
52
44
  };
53
-
54
45
  exports.getMWACases = getMWACases;
55
-
56
46
  const getModuleCases = length => {
57
47
  const cases = (0, _covertable.default)(ModuleValueMap, {
58
48
  length: length || Object.keys(ModuleValueMap).length
@@ -61,9 +51,7 @@ const getModuleCases = length => {
61
51
  solution: _generatorCommon.Solution.Module
62
52
  }));
63
53
  };
64
-
65
54
  exports.getModuleCases = getModuleCases;
66
-
67
55
  const getMonorepoCases = () => {
68
56
  const cases = (0, _covertable.default)(MonorepoValueMap, {
69
57
  length: Object.keys(MonorepoValueMap).length
@@ -72,49 +60,38 @@ const getMonorepoCases = () => {
72
60
  solution: _generatorCommon.Solution.Monorepo
73
61
  }));
74
62
  };
75
-
76
63
  exports.getMonorepoCases = getMonorepoCases;
77
-
78
64
  const getMWAEntryCases = _length => {
79
65
  return [{
80
66
  name: 'test'
81
67
  }];
82
68
  };
83
-
84
69
  const MWAServerValueMap = {
85
70
  framework: FrameworkValues
86
71
  };
87
72
  exports.MWAServerValueMap = MWAServerValueMap;
88
-
89
73
  const getMWAServerCases = () => (0, _covertable.default)(MWAServerValueMap, {
90
74
  length: Object.keys(MWAServerValueMap).length
91
75
  });
92
-
93
76
  const MWABFFValueMap = {
94
77
  bffType: BFFTypeValues,
95
78
  framework: FrameworkValues
96
79
  };
97
80
  exports.MWABFFValueMap = MWABFFValueMap;
98
-
99
81
  const getMWABFFCases = length => (0, _covertable.default)(MWABFFValueMap, {
100
82
  length: length || Object.keys(MWABFFValueMap).length
101
83
  });
102
-
103
84
  const getMWANewCases = length => {
104
85
  const cases = [];
105
-
106
86
  _generatorCommon.MWAActionTypes.forEach(action => {
107
87
  const config = {
108
88
  actionType: action
109
89
  };
110
-
111
90
  _generatorCommon.MWAActionTypesMap[action].forEach(option => {
112
91
  config[action] = option;
113
-
114
92
  const currentConfig = _objectSpread(_objectSpread({}, config), {}, {
115
93
  [action]: option
116
94
  });
117
-
118
95
  if (option === _generatorCommon.ActionElement.Entry) {
119
96
  const entryCases = getMWAEntryCases(length);
120
97
  entryCases.forEach(c => {
@@ -133,32 +110,24 @@ const getMWANewCases = length => {
133
110
  }
134
111
  });
135
112
  });
136
-
137
113
  return cases;
138
114
  };
139
-
140
115
  exports.getMWANewCases = getMWANewCases;
141
-
142
116
  const getModuleNewCases = () => {
143
117
  const cases = [];
144
-
145
118
  _generatorCommon.ModuleActionTypes.forEach(action => {
146
119
  const config = {
147
120
  actionType: action
148
121
  };
149
-
150
122
  _generatorCommon.ModuleActionTypesMap[action].forEach(option => {
151
123
  const currentConfig = _objectSpread(_objectSpread({}, config), {}, {
152
124
  [action]: option
153
125
  });
154
-
155
126
  cases.push(currentConfig);
156
127
  });
157
128
  });
158
-
159
129
  return cases;
160
130
  };
161
-
162
131
  exports.getModuleNewCases = getModuleNewCases;
163
132
  const MWASubProjectValueMap = {
164
133
  language: LanguageValues
@@ -168,7 +137,6 @@ const ModuleSubProjectValueMap = {
168
137
  language: LanguageValues
169
138
  };
170
139
  exports.ModuleSubProjectValueMap = ModuleSubProjectValueMap;
171
-
172
140
  const getMWASubProjectCases = (isTest, length) => {
173
141
  const cases = (0, _covertable.default)(MWASubProjectValueMap, {
174
142
  length: length || Object.keys(MWASubProjectValueMap).length
@@ -179,7 +147,6 @@ const getMWASubProjectCases = (isTest, length) => {
179
147
  solution: isTest ? _generatorCommon.SubSolution.MWATest : _generatorCommon.SubSolution.MWA
180
148
  }));
181
149
  };
182
-
183
150
  const getModuleSubProjectCases = (isInner, length) => {
184
151
  const cases = (0, _covertable.default)(ModuleSubProjectValueMap, {
185
152
  length: length || Object.keys(ModuleSubProjectValueMap).length
@@ -190,10 +157,8 @@ const getModuleSubProjectCases = (isInner, length) => {
190
157
  solution: isInner ? _generatorCommon.SubSolution.InnerModule : _generatorCommon.SubSolution.Module
191
158
  }));
192
159
  };
193
-
194
160
  const getMonorepoNewCases = length => {
195
161
  const cases = [...getMWASubProjectCases(false, length), ...getMWASubProjectCases(true, length), ...getModuleSubProjectCases(false, length), ...getModuleSubProjectCases(true, length)];
196
162
  return cases;
197
163
  };
198
-
199
164
  exports.getMonorepoNewCases = getMonorepoNewCases;
@@ -51,34 +51,28 @@ export var getMonorepoCases = function getMonorepoCases() {
51
51
  });
52
52
  });
53
53
  };
54
-
55
54
  var getMWAEntryCases = function getMWAEntryCases(_length) {
56
55
  return [{
57
56
  name: 'test'
58
57
  }];
59
58
  };
60
-
61
59
  export var MWAServerValueMap = {
62
60
  framework: FrameworkValues
63
61
  };
64
-
65
62
  var getMWAServerCases = function getMWAServerCases() {
66
63
  return make(MWAServerValueMap, {
67
64
  length: Object.keys(MWAServerValueMap).length
68
65
  });
69
66
  };
70
-
71
67
  export var MWABFFValueMap = {
72
68
  bffType: BFFTypeValues,
73
69
  framework: FrameworkValues
74
70
  };
75
-
76
71
  var getMWABFFCases = function getMWABFFCases(length) {
77
72
  return make(MWABFFValueMap, {
78
73
  length: length || Object.keys(MWABFFValueMap).length
79
74
  });
80
75
  };
81
-
82
76
  export var getMWANewCases = function getMWANewCases(length) {
83
77
  var cases = [];
84
78
  MWAActionTypes.forEach(function (action) {
@@ -87,9 +81,7 @@ export var getMWANewCases = function getMWANewCases(length) {
87
81
  };
88
82
  MWAActionTypesMap[action].forEach(function (option) {
89
83
  config[action] = option;
90
-
91
84
  var currentConfig = _objectSpread(_objectSpread({}, config), {}, _defineProperty({}, action, option));
92
-
93
85
  if (option === ActionElement.Entry) {
94
86
  var entryCases = getMWAEntryCases(length);
95
87
  entryCases.forEach(function (c) {
@@ -118,7 +110,6 @@ export var getModuleNewCases = function getModuleNewCases() {
118
110
  };
119
111
  ModuleActionTypesMap[action].forEach(function (option) {
120
112
  var currentConfig = _objectSpread(_objectSpread({}, config), {}, _defineProperty({}, action, option));
121
-
122
113
  cases.push(currentConfig);
123
114
  });
124
115
  });
@@ -130,7 +121,6 @@ export var MWASubProjectValueMap = {
130
121
  export var ModuleSubProjectValueMap = {
131
122
  language: LanguageValues
132
123
  };
133
-
134
124
  var getMWASubProjectCases = function getMWASubProjectCases(isTest, length) {
135
125
  var cases = make(MWASubProjectValueMap, {
136
126
  length: length || Object.keys(MWASubProjectValueMap).length
@@ -143,7 +133,6 @@ var getMWASubProjectCases = function getMWASubProjectCases(isTest, length) {
143
133
  });
144
134
  });
145
135
  };
146
-
147
136
  var getModuleSubProjectCases = function getModuleSubProjectCases(isInner, length) {
148
137
  var cases = make(ModuleSubProjectValueMap, {
149
138
  length: length || Object.keys(ModuleSubProjectValueMap).length
@@ -156,7 +145,6 @@ var getModuleSubProjectCases = function getModuleSubProjectCases(isInner, length
156
145
  });
157
146
  });
158
147
  };
159
-
160
148
  export var getMonorepoNewCases = function getMonorepoNewCases(length) {
161
149
  var cases = [].concat(_toConsumableArray(getMWASubProjectCases(false, length)), _toConsumableArray(getMWASubProjectCases(true, length)), _toConsumableArray(getModuleSubProjectCases(false, length)), _toConsumableArray(getModuleSubProjectCases(true, length)));
162
150
  return cases;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "3.0.0-beta.0",
14
+ "version": "3.0.0-beta.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -30,15 +30,15 @@
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.18.0",
32
32
  "covertable": "^2.2.2",
33
- "@modern-js/generator-common": "3.0.0-beta.0"
33
+ "@modern-js/generator-common": "3.0.0-beta.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jest": "^27",
37
37
  "@types/node": "^14",
38
38
  "typescript": "^4",
39
- "@scripts/build": "2.0.0-beta.0",
40
39
  "jest": "^27",
41
- "@scripts/jest-config": "2.0.0-beta.0"
40
+ "@scripts/build": "2.0.0-beta.1",
41
+ "@scripts/jest-config": "2.0.0-beta.1"
42
42
  },
43
43
  "sideEffects": false,
44
44
  "publishConfig": {