@modern-js/generator-common 3.3.22 → 3.3.23
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/newAction/module/index.js +2 -3
- package/dist/cjs/newAction/mwa/index.js +4 -7
- package/dist/esm/newAction/module/index.js +1 -5
- package/dist/esm/newAction/mwa/index.js +3 -15
- package/dist/esm-node/newAction/module/index.js +2 -3
- package/dist/esm-node/newAction/mwa/index.js +4 -7
- package/dist/types/newAction/module/index.d.ts +1 -1
- package/dist/types/newAction/mwa/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -47,8 +47,7 @@ const ModuleActionTypesMap = {
|
|
|
47
47
|
[import_common.ActionType.Function]: ModuleActionFunctions
|
|
48
48
|
};
|
|
49
49
|
const ModuleSpecialSchemaMap = {};
|
|
50
|
-
const getModuleNewActionSchema = (
|
|
51
|
-
const { funcMap = {} } = extra;
|
|
50
|
+
const getModuleNewActionSchema = () => {
|
|
52
51
|
return {
|
|
53
52
|
type: "object",
|
|
54
53
|
properties: {
|
|
@@ -66,7 +65,7 @@ const getModuleNewActionSchema = (extra = {}) => {
|
|
|
66
65
|
[import_common.ActionType.Function]: {
|
|
67
66
|
type: "string",
|
|
68
67
|
title: import_common.ActionTypeQuestionText[import_common.ActionType.Function](),
|
|
69
|
-
enum: ModuleActionFunctions.
|
|
68
|
+
enum: ModuleActionFunctions.map((func) => ({
|
|
70
69
|
value: func,
|
|
71
70
|
label: import_common.ActionFunctionText[func]()
|
|
72
71
|
})),
|
|
@@ -67,17 +67,14 @@ const MWAActionTypesMap = {
|
|
|
67
67
|
[import_common2.ActionType.Function]: MWAActionFunctions,
|
|
68
68
|
[import_common2.ActionType.Refactor]: MWAActionReactors
|
|
69
69
|
};
|
|
70
|
-
const getMWANewActionSchema = (
|
|
71
|
-
const { funcMap = {}, refactorMap = {} } = extra;
|
|
72
|
-
const funcs = MWAActionFunctions.filter((func) => !funcMap[func]);
|
|
73
|
-
const refactors = MWAActionReactors.filter((reactor) => !refactorMap[reactor]);
|
|
70
|
+
const getMWANewActionSchema = () => {
|
|
74
71
|
return {
|
|
75
72
|
type: "object",
|
|
76
73
|
properties: {
|
|
77
74
|
actionType: {
|
|
78
75
|
type: "string",
|
|
79
76
|
title: import_locale.i18n.t(import_locale.localeKeys.action.self),
|
|
80
|
-
enum: MWAActionTypes.
|
|
77
|
+
enum: MWAActionTypes.map((type) => ({
|
|
81
78
|
value: type,
|
|
82
79
|
label: import_common2.ActionTypeText[type](),
|
|
83
80
|
type: [
|
|
@@ -108,7 +105,7 @@ const getMWANewActionSchema = (extra = {}) => {
|
|
|
108
105
|
[import_common2.ActionType.Function]: {
|
|
109
106
|
type: "string",
|
|
110
107
|
title: import_common2.ActionTypeQuestionText[import_common2.ActionType.Function](),
|
|
111
|
-
enum:
|
|
108
|
+
enum: MWAActionFunctions.map((func) => ({
|
|
112
109
|
value: func,
|
|
113
110
|
label: import_common2.ActionFunctionText[func]()
|
|
114
111
|
})),
|
|
@@ -128,7 +125,7 @@ const getMWANewActionSchema = (extra = {}) => {
|
|
|
128
125
|
[import_common2.ActionType.Refactor]: {
|
|
129
126
|
type: "string",
|
|
130
127
|
title: import_common2.ActionTypeQuestionText[import_common2.ActionType.Refactor](),
|
|
131
|
-
enum:
|
|
128
|
+
enum: MWAActionReactors.map((refactor) => ({
|
|
132
129
|
value: refactor,
|
|
133
130
|
label: import_common2.ActionRefactorText[refactor]()
|
|
134
131
|
})),
|
|
@@ -14,8 +14,6 @@ var ModuleActionFunctions = [
|
|
|
14
14
|
var ModuleActionTypesMap = _define_property({}, ActionType.Function, ModuleActionFunctions);
|
|
15
15
|
var ModuleSpecialSchemaMap = {};
|
|
16
16
|
var getModuleNewActionSchema = function() {
|
|
17
|
-
var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18
|
-
var _extra_funcMap = extra.funcMap, funcMap = _extra_funcMap === void 0 ? {} : _extra_funcMap;
|
|
19
17
|
return {
|
|
20
18
|
type: "object",
|
|
21
19
|
properties: _define_property({
|
|
@@ -35,9 +33,7 @@ var getModuleNewActionSchema = function() {
|
|
|
35
33
|
}, ActionType.Function, {
|
|
36
34
|
type: "string",
|
|
37
35
|
title: ActionTypeQuestionText[ActionType.Function](),
|
|
38
|
-
enum: ModuleActionFunctions.
|
|
39
|
-
return !funcMap[func];
|
|
40
|
-
}).map(function(func) {
|
|
36
|
+
enum: ModuleActionFunctions.map(function(func) {
|
|
41
37
|
return {
|
|
42
38
|
value: func,
|
|
43
39
|
label: ActionFunctionText[func]()
|
|
@@ -28,14 +28,6 @@ var MWAActionReactors = [
|
|
|
28
28
|
var _obj;
|
|
29
29
|
var MWAActionTypesMap = (_obj = {}, _define_property(_obj, ActionType.Element, MWAActionElements), _define_property(_obj, ActionType.Function, MWAActionFunctions), _define_property(_obj, ActionType.Refactor, MWAActionReactors), _obj);
|
|
30
30
|
var getMWANewActionSchema = function() {
|
|
31
|
-
var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
32
|
-
var _extra_funcMap = extra.funcMap, funcMap = _extra_funcMap === void 0 ? {} : _extra_funcMap, _extra_refactorMap = extra.refactorMap, refactorMap = _extra_refactorMap === void 0 ? {} : _extra_refactorMap;
|
|
33
|
-
var funcs = MWAActionFunctions.filter(function(func) {
|
|
34
|
-
return !funcMap[func];
|
|
35
|
-
});
|
|
36
|
-
var refactors = MWAActionReactors.filter(function(reactor) {
|
|
37
|
-
return !refactorMap[reactor];
|
|
38
|
-
});
|
|
39
31
|
var _obj13;
|
|
40
32
|
return {
|
|
41
33
|
type: "object",
|
|
@@ -43,11 +35,7 @@ var getMWANewActionSchema = function() {
|
|
|
43
35
|
actionType: {
|
|
44
36
|
type: "string",
|
|
45
37
|
title: i18n.t(localeKeys.action.self),
|
|
46
|
-
enum: MWAActionTypes.
|
|
47
|
-
return type === ActionType.Function ? funcs.length > 0 : true;
|
|
48
|
-
}).filter(function(type) {
|
|
49
|
-
return type === ActionType.Refactor ? refactors.length > 0 : true;
|
|
50
|
-
}).map(function(type) {
|
|
38
|
+
enum: MWAActionTypes.map(function(type) {
|
|
51
39
|
return {
|
|
52
40
|
value: type,
|
|
53
41
|
label: ActionTypeText[type](),
|
|
@@ -81,7 +69,7 @@ var getMWANewActionSchema = function() {
|
|
|
81
69
|
}), _define_property(_obj13, ActionType.Function, {
|
|
82
70
|
type: "string",
|
|
83
71
|
title: ActionTypeQuestionText[ActionType.Function](),
|
|
84
|
-
enum:
|
|
72
|
+
enum: MWAActionFunctions.map(function(func) {
|
|
85
73
|
return {
|
|
86
74
|
value: func,
|
|
87
75
|
label: ActionFunctionText[func]()
|
|
@@ -102,7 +90,7 @@ var getMWANewActionSchema = function() {
|
|
|
102
90
|
}), _define_property(_obj13, ActionType.Refactor, {
|
|
103
91
|
type: "string",
|
|
104
92
|
title: ActionTypeQuestionText[ActionType.Refactor](),
|
|
105
|
-
enum:
|
|
93
|
+
enum: MWAActionReactors.map(function(refactor) {
|
|
106
94
|
return {
|
|
107
95
|
value: refactor,
|
|
108
96
|
label: ActionRefactorText[refactor]()
|
|
@@ -14,8 +14,7 @@ const ModuleActionTypesMap = {
|
|
|
14
14
|
[ActionType.Function]: ModuleActionFunctions
|
|
15
15
|
};
|
|
16
16
|
const ModuleSpecialSchemaMap = {};
|
|
17
|
-
const getModuleNewActionSchema = (
|
|
18
|
-
const { funcMap = {} } = extra;
|
|
17
|
+
const getModuleNewActionSchema = () => {
|
|
19
18
|
return {
|
|
20
19
|
type: "object",
|
|
21
20
|
properties: {
|
|
@@ -33,7 +32,7 @@ const getModuleNewActionSchema = (extra = {}) => {
|
|
|
33
32
|
[ActionType.Function]: {
|
|
34
33
|
type: "string",
|
|
35
34
|
title: ActionTypeQuestionText[ActionType.Function](),
|
|
36
|
-
enum: ModuleActionFunctions.
|
|
35
|
+
enum: ModuleActionFunctions.map((func) => ({
|
|
37
36
|
value: func,
|
|
38
37
|
label: ActionFunctionText[func]()
|
|
39
38
|
})),
|
|
@@ -29,17 +29,14 @@ const MWAActionTypesMap = {
|
|
|
29
29
|
[ActionType.Function]: MWAActionFunctions,
|
|
30
30
|
[ActionType.Refactor]: MWAActionReactors
|
|
31
31
|
};
|
|
32
|
-
const getMWANewActionSchema = (
|
|
33
|
-
const { funcMap = {}, refactorMap = {} } = extra;
|
|
34
|
-
const funcs = MWAActionFunctions.filter((func) => !funcMap[func]);
|
|
35
|
-
const refactors = MWAActionReactors.filter((reactor) => !refactorMap[reactor]);
|
|
32
|
+
const getMWANewActionSchema = () => {
|
|
36
33
|
return {
|
|
37
34
|
type: "object",
|
|
38
35
|
properties: {
|
|
39
36
|
actionType: {
|
|
40
37
|
type: "string",
|
|
41
38
|
title: i18n.t(localeKeys.action.self),
|
|
42
|
-
enum: MWAActionTypes.
|
|
39
|
+
enum: MWAActionTypes.map((type) => ({
|
|
43
40
|
value: type,
|
|
44
41
|
label: ActionTypeText[type](),
|
|
45
42
|
type: [
|
|
@@ -70,7 +67,7 @@ const getMWANewActionSchema = (extra = {}) => {
|
|
|
70
67
|
[ActionType.Function]: {
|
|
71
68
|
type: "string",
|
|
72
69
|
title: ActionTypeQuestionText[ActionType.Function](),
|
|
73
|
-
enum:
|
|
70
|
+
enum: MWAActionFunctions.map((func) => ({
|
|
74
71
|
value: func,
|
|
75
72
|
label: ActionFunctionText[func]()
|
|
76
73
|
})),
|
|
@@ -90,7 +87,7 @@ const getMWANewActionSchema = (extra = {}) => {
|
|
|
90
87
|
[ActionType.Refactor]: {
|
|
91
88
|
type: "string",
|
|
92
89
|
title: ActionTypeQuestionText[ActionType.Refactor](),
|
|
93
|
-
enum:
|
|
90
|
+
enum: MWAActionReactors.map((refactor) => ({
|
|
94
91
|
value: refactor,
|
|
95
92
|
label: ActionRefactorText[refactor]()
|
|
96
93
|
})),
|
|
@@ -4,7 +4,7 @@ export declare const ModuleActionTypes: ActionType[];
|
|
|
4
4
|
export declare const ModuleActionFunctions: ActionFunction[];
|
|
5
5
|
export declare const ModuleActionTypesMap: Record<string, string[]>;
|
|
6
6
|
export declare const ModuleSpecialSchemaMap: Record<string, Schema>;
|
|
7
|
-
export declare const getModuleNewActionSchema: (
|
|
7
|
+
export declare const getModuleNewActionSchema: () => Schema;
|
|
8
8
|
export declare const ModuleActionFunctionsDevDependencies: Partial<Record<ActionFunction, string>>;
|
|
9
9
|
export declare const ModuleActionFunctionsPeerDependencies: Partial<Record<ActionFunction, string>>;
|
|
10
10
|
export declare const ModuleActionFunctionsDependencies: Partial<Record<ActionFunction, string>>;
|
|
@@ -6,7 +6,7 @@ export declare const MWAActionFunctions: ActionFunction[];
|
|
|
6
6
|
export declare const MWAActionElements: ActionElement[];
|
|
7
7
|
export declare const MWAActionReactors: ActionRefactor[];
|
|
8
8
|
export declare const MWAActionTypesMap: Record<ActionType, string[]>;
|
|
9
|
-
export declare const getMWANewActionSchema: (
|
|
9
|
+
export declare const getMWANewActionSchema: () => Schema;
|
|
10
10
|
export declare const MWAActionFunctionsDevDependencies: Partial<Record<ActionFunction, string>>;
|
|
11
11
|
export declare const MWAActionFunctionsDependencies: Partial<Record<ActionFunction, string>>;
|
|
12
12
|
export declare const MWAActionFunctionsAppendTypeContent: Partial<Record<ActionFunction, string>>;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.3.
|
|
18
|
+
"version": "3.3.23",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@modern-js/codesmith-formily": "2.3.5",
|
|
35
35
|
"@swc/helpers": "0.5.3",
|
|
36
|
-
"@modern-js/plugin-i18n": "2.
|
|
36
|
+
"@modern-js/plugin-i18n": "2.50.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@modern-js/codesmith": "2.3.5",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@types/node": "^14",
|
|
43
43
|
"jest": "^29",
|
|
44
44
|
"typescript": "^5",
|
|
45
|
-
"@modern-js/utils": "2.
|
|
46
|
-
"@scripts/
|
|
47
|
-
"@scripts/
|
|
45
|
+
"@modern-js/utils": "2.50.0",
|
|
46
|
+
"@scripts/jest-config": "2.50.0",
|
|
47
|
+
"@scripts/build": "2.50.0"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"publishConfig": {
|