@modern-js/generator-common 3.7.2 → 3.7.3

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.
Files changed (42) hide show
  1. package/dist/cjs/common/solution.js +2 -77
  2. package/dist/cjs/index.js +0 -25
  3. package/dist/cjs/locale/en.js +0 -15
  4. package/dist/cjs/locale/zh.js +0 -15
  5. package/dist/cjs/newAction/index.js +1 -3
  6. package/dist/esm/common/solution.js +2 -78
  7. package/dist/esm/index.js +0 -14
  8. package/dist/esm/locale/en.js +0 -15
  9. package/dist/esm/locale/zh.js +0 -15
  10. package/dist/esm/newAction/index.js +0 -1
  11. package/dist/esm-node/common/solution.js +1 -71
  12. package/dist/esm-node/index.js +0 -18
  13. package/dist/esm-node/locale/en.js +0 -15
  14. package/dist/esm-node/locale/zh.js +0 -15
  15. package/dist/esm-node/newAction/index.js +0 -1
  16. package/dist/types/common/solution.d.ts +0 -6
  17. package/dist/types/index.d.ts +0 -5
  18. package/dist/types/locale/en.d.ts +0 -15
  19. package/dist/types/locale/index.d.ts +0 -30
  20. package/dist/types/locale/zh.d.ts +0 -15
  21. package/dist/types/newAction/index.d.ts +0 -1
  22. package/package.json +4 -4
  23. package/dist/cjs/module/index.js +0 -22
  24. package/dist/cjs/module/project.js +0 -50
  25. package/dist/cjs/monorepo/index.js +0 -22
  26. package/dist/cjs/monorepo/project.js +0 -41
  27. package/dist/cjs/newAction/module/index.js +0 -133
  28. package/dist/esm/module/index.js +0 -1
  29. package/dist/esm/module/project.js +0 -25
  30. package/dist/esm/monorepo/index.js +0 -1
  31. package/dist/esm/monorepo/project.js +0 -17
  32. package/dist/esm/newAction/module/index.js +0 -79
  33. package/dist/esm-node/module/index.js +0 -1
  34. package/dist/esm-node/module/project.js +0 -24
  35. package/dist/esm-node/monorepo/index.js +0 -1
  36. package/dist/esm-node/monorepo/project.js +0 -16
  37. package/dist/esm-node/newAction/module/index.js +0 -99
  38. package/dist/types/module/index.d.ts +0 -1
  39. package/dist/types/module/project.d.ts +0 -8
  40. package/dist/types/monorepo/index.d.ts +0 -1
  41. package/dist/types/monorepo/project.d.ts +0 -6
  42. package/dist/types/newAction/module/index.d.ts +0 -13
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.7.2",
18
+ "version": "3.7.3",
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.6.5",
35
35
  "@swc/helpers": "0.5.13",
36
- "@modern-js/plugin-i18n": "2.60.6"
36
+ "@modern-js/plugin-i18n": "2.61.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@modern-js/codesmith": "2.6.5",
@@ -43,8 +43,8 @@
43
43
  "@types/node": "^14",
44
44
  "jest": "^29",
45
45
  "typescript": "^5",
46
- "@scripts/build": "2.60.6",
47
- "@scripts/jest-config": "2.60.6"
46
+ "@scripts/build": "2.61.0",
47
+ "@scripts/jest-config": "2.61.0"
48
48
  },
49
49
  "sideEffects": false,
50
50
  "publishConfig": {
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
- var module_exports = {};
17
- module.exports = __toCommonJS(module_exports);
18
- __reExport(module_exports, require("./project"), module.exports);
19
- // Annotate the CommonJS export names for ESM import in node:
20
- 0 && (module.exports = {
21
- ...require("./project")
22
- });
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var project_exports = {};
20
- __export(project_exports, {
21
- ModuleDefaultConfig: () => ModuleDefaultConfig,
22
- getModuleSchema: () => getModuleSchema,
23
- getModuleSchemaProperties: () => getModuleSchemaProperties
24
- });
25
- module.exports = __toCommonJS(project_exports);
26
- var import_common = require("../common");
27
- const getModuleSchemaProperties = (extra) => {
28
- return {
29
- packageName: (0, import_common.getPackageNameSchema)(extra),
30
- packagePath: (0, import_common.getPackagePathSchema)(extra),
31
- language: (0, import_common.getLanguageSchema)(extra),
32
- packageManager: (0, import_common.getPackageManagerSchema)(extra)
33
- };
34
- };
35
- const getModuleSchema = (extra = {}) => {
36
- return {
37
- type: "object",
38
- properties: getModuleSchemaProperties(extra)
39
- };
40
- };
41
- const ModuleDefaultConfig = {
42
- language: import_common.Language.TS,
43
- packageManager: import_common.PackageManager.Pnpm
44
- };
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- ModuleDefaultConfig,
48
- getModuleSchema,
49
- getModuleSchemaProperties
50
- });
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
- var monorepo_exports = {};
17
- module.exports = __toCommonJS(monorepo_exports);
18
- __reExport(monorepo_exports, require("./project"), module.exports);
19
- // Annotate the CommonJS export names for ESM import in node:
20
- 0 && (module.exports = {
21
- ...require("./project")
22
- });
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var project_exports = {};
20
- __export(project_exports, {
21
- MonorepoDefaultConfig: () => MonorepoDefaultConfig,
22
- getMonorepoSchema: () => getMonorepoSchema
23
- });
24
- module.exports = __toCommonJS(project_exports);
25
- var import_common = require("../common");
26
- const getMonorepoSchema = (extra = {}) => {
27
- return {
28
- type: "object",
29
- properties: {
30
- packageManager: (0, import_common.getPackageManagerSchema)(extra)
31
- }
32
- };
33
- };
34
- const MonorepoDefaultConfig = {
35
- packageManager: import_common.PackageManager.Pnpm
36
- };
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
39
- MonorepoDefaultConfig,
40
- getMonorepoSchema
41
- });
@@ -1,133 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var module_exports = {};
20
- __export(module_exports, {
21
- ModuleActionFunctions: () => ModuleActionFunctions,
22
- ModuleActionFunctionsDependencies: () => ModuleActionFunctionsDependencies,
23
- ModuleActionFunctionsDevDependencies: () => ModuleActionFunctionsDevDependencies,
24
- ModuleActionFunctionsPeerDependencies: () => ModuleActionFunctionsPeerDependencies,
25
- ModuleActionTypes: () => ModuleActionTypes,
26
- ModuleActionTypesMap: () => ModuleActionTypesMap,
27
- ModuleNewActionGenerators: () => ModuleNewActionGenerators,
28
- ModuleNewActionPluginDependence: () => ModuleNewActionPluginDependence,
29
- ModuleNewActionPluginName: () => ModuleNewActionPluginName,
30
- ModuleSpecialSchemaMap: () => ModuleSpecialSchemaMap,
31
- getModuleNewActionSchema: () => getModuleNewActionSchema
32
- });
33
- module.exports = __toCommonJS(module_exports);
34
- var import_locale = require("../../locale");
35
- var import_common = require("../common");
36
- const ModuleActionTypes = [
37
- import_common.ActionType.Function
38
- ];
39
- const ModuleActionFunctions = [
40
- import_common.ActionFunction.TailwindCSS,
41
- import_common.ActionFunction.StorybookV7,
42
- import_common.ActionFunction.RuntimeApi,
43
- import_common.ActionFunction.ModuleDoc
44
- ];
45
- const ModuleActionTypesMap = {
46
- [import_common.ActionType.Function]: ModuleActionFunctions
47
- };
48
- const ModuleSpecialSchemaMap = {};
49
- const getModuleNewActionSchema = () => {
50
- return {
51
- type: "object",
52
- properties: {
53
- actionType: {
54
- type: "string",
55
- title: import_locale.i18n.t(import_locale.localeKeys.action.self),
56
- enum: ModuleActionTypes.map((type) => ({
57
- value: type,
58
- label: import_common.ActionTypeText[type](),
59
- type: [
60
- "string"
61
- ]
62
- }))
63
- },
64
- [import_common.ActionType.Function]: {
65
- type: "string",
66
- title: import_common.ActionTypeQuestionText[import_common.ActionType.Function](),
67
- enum: ModuleActionFunctions.map((func) => ({
68
- value: func,
69
- label: import_common.ActionFunctionText[func]()
70
- })),
71
- "x-reactions": [
72
- {
73
- dependencies: [
74
- "actionType"
75
- ],
76
- fulfill: {
77
- state: {
78
- visible: '{{$deps[0] === "function"}}'
79
- }
80
- }
81
- }
82
- ]
83
- }
84
- }
85
- };
86
- };
87
- const ModuleActionFunctionsDevDependencies = {
88
- [import_common.ActionFunction.StorybookV7]: "@modern-js/storybook",
89
- [import_common.ActionFunction.RuntimeApi]: "@modern-js/runtime",
90
- [import_common.ActionFunction.TailwindCSS]: "tailwindcss",
91
- [import_common.ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
92
- };
93
- const ModuleActionFunctionsPeerDependencies = {
94
- [import_common.ActionFunction.RuntimeApi]: "@modern-js/runtime",
95
- [import_common.ActionFunction.TailwindCSS]: "tailwindcss"
96
- };
97
- const ModuleActionFunctionsDependencies = {
98
- [import_common.ActionFunction.TailwindCSS]: "@modern-js/plugin-tailwindcss"
99
- };
100
- const ModuleNewActionGenerators = {
101
- [import_common.ActionType.Function]: {
102
- [import_common.ActionFunction.TailwindCSS]: "@modern-js/tailwindcss-generator",
103
- [import_common.ActionFunction.StorybookV7]: "@modern-js/storybook-next-generator",
104
- [import_common.ActionFunction.RuntimeApi]: "@modern-js/dependence-generator",
105
- [import_common.ActionFunction.ModuleDoc]: "@modern-js/module-doc-generator"
106
- }
107
- };
108
- const ModuleNewActionPluginName = {
109
- [import_common.ActionType.Function]: {
110
- [import_common.ActionFunction.TailwindCSS]: "tailwindcssPlugin",
111
- [import_common.ActionFunction.ModuleDoc]: "modulePluginDoc"
112
- }
113
- };
114
- const ModuleNewActionPluginDependence = {
115
- [import_common.ActionType.Function]: {
116
- [import_common.ActionFunction.TailwindCSS]: "@modern-js/plugin-tailwindcss",
117
- [import_common.ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
118
- }
119
- };
120
- // Annotate the CommonJS export names for ESM import in node:
121
- 0 && (module.exports = {
122
- ModuleActionFunctions,
123
- ModuleActionFunctionsDependencies,
124
- ModuleActionFunctionsDevDependencies,
125
- ModuleActionFunctionsPeerDependencies,
126
- ModuleActionTypes,
127
- ModuleActionTypesMap,
128
- ModuleNewActionGenerators,
129
- ModuleNewActionPluginDependence,
130
- ModuleNewActionPluginName,
131
- ModuleSpecialSchemaMap,
132
- getModuleNewActionSchema
133
- });
@@ -1 +0,0 @@
1
- export * from "./project";
@@ -1,25 +0,0 @@
1
- import { Language, PackageManager, getLanguageSchema, getPackageManagerSchema, getPackageNameSchema, getPackagePathSchema } from "../common";
2
- var getModuleSchemaProperties = function(extra) {
3
- return {
4
- packageName: getPackageNameSchema(extra),
5
- packagePath: getPackagePathSchema(extra),
6
- language: getLanguageSchema(extra),
7
- packageManager: getPackageManagerSchema(extra)
8
- };
9
- };
10
- var getModuleSchema = function() {
11
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
12
- return {
13
- type: "object",
14
- properties: getModuleSchemaProperties(extra)
15
- };
16
- };
17
- var ModuleDefaultConfig = {
18
- language: Language.TS,
19
- packageManager: PackageManager.Pnpm
20
- };
21
- export {
22
- ModuleDefaultConfig,
23
- getModuleSchema,
24
- getModuleSchemaProperties
25
- };
@@ -1 +0,0 @@
1
- export * from "./project";
@@ -1,17 +0,0 @@
1
- import { PackageManager, getPackageManagerSchema } from "../common";
2
- var getMonorepoSchema = function() {
3
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4
- return {
5
- type: "object",
6
- properties: {
7
- packageManager: getPackageManagerSchema(extra)
8
- }
9
- };
10
- };
11
- var MonorepoDefaultConfig = {
12
- packageManager: PackageManager.Pnpm
13
- };
14
- export {
15
- MonorepoDefaultConfig,
16
- getMonorepoSchema
17
- };
@@ -1,79 +0,0 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
- import { i18n, localeKeys } from "../../locale";
3
- import { ActionFunction, ActionFunctionText, ActionType, ActionTypeQuestionText, ActionTypeText } from "../common";
4
- var ModuleActionTypes = [
5
- ActionType.Function
6
- ];
7
- var ModuleActionFunctions = [
8
- ActionFunction.TailwindCSS,
9
- ActionFunction.StorybookV7,
10
- ActionFunction.RuntimeApi,
11
- ActionFunction.ModuleDoc
12
- ];
13
- var ModuleActionTypesMap = _define_property({}, ActionType.Function, ModuleActionFunctions);
14
- var ModuleSpecialSchemaMap = {};
15
- var getModuleNewActionSchema = function() {
16
- return {
17
- type: "object",
18
- properties: _define_property({
19
- actionType: {
20
- type: "string",
21
- title: i18n.t(localeKeys.action.self),
22
- enum: ModuleActionTypes.map(function(type) {
23
- return {
24
- value: type,
25
- label: ActionTypeText[type](),
26
- type: [
27
- "string"
28
- ]
29
- };
30
- })
31
- }
32
- }, ActionType.Function, {
33
- type: "string",
34
- title: ActionTypeQuestionText[ActionType.Function](),
35
- enum: ModuleActionFunctions.map(function(func) {
36
- return {
37
- value: func,
38
- label: ActionFunctionText[func]()
39
- };
40
- }),
41
- "x-reactions": [
42
- {
43
- dependencies: [
44
- "actionType"
45
- ],
46
- fulfill: {
47
- state: {
48
- visible: '{{$deps[0] === "function"}}'
49
- }
50
- }
51
- }
52
- ]
53
- })
54
- };
55
- };
56
- var _obj;
57
- var ModuleActionFunctionsDevDependencies = (_obj = {}, _define_property(_obj, ActionFunction.StorybookV7, "@modern-js/storybook"), _define_property(_obj, ActionFunction.RuntimeApi, "@modern-js/runtime"), _define_property(_obj, ActionFunction.TailwindCSS, "tailwindcss"), _define_property(_obj, ActionFunction.ModuleDoc, "@modern-js/plugin-rspress"), _obj);
58
- var _obj1;
59
- var ModuleActionFunctionsPeerDependencies = (_obj1 = {}, _define_property(_obj1, ActionFunction.RuntimeApi, "@modern-js/runtime"), _define_property(_obj1, ActionFunction.TailwindCSS, "tailwindcss"), _obj1);
60
- var ModuleActionFunctionsDependencies = _define_property({}, ActionFunction.TailwindCSS, "@modern-js/plugin-tailwindcss");
61
- var _obj2;
62
- var ModuleNewActionGenerators = _define_property({}, ActionType.Function, (_obj2 = {}, _define_property(_obj2, ActionFunction.TailwindCSS, "@modern-js/tailwindcss-generator"), _define_property(_obj2, ActionFunction.StorybookV7, "@modern-js/storybook-next-generator"), _define_property(_obj2, ActionFunction.RuntimeApi, "@modern-js/dependence-generator"), _define_property(_obj2, ActionFunction.ModuleDoc, "@modern-js/module-doc-generator"), _obj2));
63
- var _obj3;
64
- var ModuleNewActionPluginName = _define_property({}, ActionType.Function, (_obj3 = {}, _define_property(_obj3, ActionFunction.TailwindCSS, "tailwindcssPlugin"), _define_property(_obj3, ActionFunction.ModuleDoc, "modulePluginDoc"), _obj3));
65
- var _obj4;
66
- var ModuleNewActionPluginDependence = _define_property({}, ActionType.Function, (_obj4 = {}, _define_property(_obj4, ActionFunction.TailwindCSS, "@modern-js/plugin-tailwindcss"), _define_property(_obj4, ActionFunction.ModuleDoc, "@modern-js/plugin-rspress"), _obj4));
67
- export {
68
- ModuleActionFunctions,
69
- ModuleActionFunctionsDependencies,
70
- ModuleActionFunctionsDevDependencies,
71
- ModuleActionFunctionsPeerDependencies,
72
- ModuleActionTypes,
73
- ModuleActionTypesMap,
74
- ModuleNewActionGenerators,
75
- ModuleNewActionPluginDependence,
76
- ModuleNewActionPluginName,
77
- ModuleSpecialSchemaMap,
78
- getModuleNewActionSchema
79
- };
@@ -1 +0,0 @@
1
- export * from "./project";
@@ -1,24 +0,0 @@
1
- import { Language, PackageManager, getLanguageSchema, getPackageManagerSchema, getPackageNameSchema, getPackagePathSchema } from "../common";
2
- const getModuleSchemaProperties = (extra) => {
3
- return {
4
- packageName: getPackageNameSchema(extra),
5
- packagePath: getPackagePathSchema(extra),
6
- language: getLanguageSchema(extra),
7
- packageManager: getPackageManagerSchema(extra)
8
- };
9
- };
10
- const getModuleSchema = (extra = {}) => {
11
- return {
12
- type: "object",
13
- properties: getModuleSchemaProperties(extra)
14
- };
15
- };
16
- const ModuleDefaultConfig = {
17
- language: Language.TS,
18
- packageManager: PackageManager.Pnpm
19
- };
20
- export {
21
- ModuleDefaultConfig,
22
- getModuleSchema,
23
- getModuleSchemaProperties
24
- };
@@ -1 +0,0 @@
1
- export * from "./project";
@@ -1,16 +0,0 @@
1
- import { PackageManager, getPackageManagerSchema } from "../common";
2
- const getMonorepoSchema = (extra = {}) => {
3
- return {
4
- type: "object",
5
- properties: {
6
- packageManager: getPackageManagerSchema(extra)
7
- }
8
- };
9
- };
10
- const MonorepoDefaultConfig = {
11
- packageManager: PackageManager.Pnpm
12
- };
13
- export {
14
- MonorepoDefaultConfig,
15
- getMonorepoSchema
16
- };
@@ -1,99 +0,0 @@
1
- import { i18n, localeKeys } from "../../locale";
2
- import { ActionFunction, ActionFunctionText, ActionType, ActionTypeQuestionText, ActionTypeText } from "../common";
3
- const ModuleActionTypes = [
4
- ActionType.Function
5
- ];
6
- const ModuleActionFunctions = [
7
- ActionFunction.TailwindCSS,
8
- ActionFunction.StorybookV7,
9
- ActionFunction.RuntimeApi,
10
- ActionFunction.ModuleDoc
11
- ];
12
- const ModuleActionTypesMap = {
13
- [ActionType.Function]: ModuleActionFunctions
14
- };
15
- const ModuleSpecialSchemaMap = {};
16
- const getModuleNewActionSchema = () => {
17
- return {
18
- type: "object",
19
- properties: {
20
- actionType: {
21
- type: "string",
22
- title: i18n.t(localeKeys.action.self),
23
- enum: ModuleActionTypes.map((type) => ({
24
- value: type,
25
- label: ActionTypeText[type](),
26
- type: [
27
- "string"
28
- ]
29
- }))
30
- },
31
- [ActionType.Function]: {
32
- type: "string",
33
- title: ActionTypeQuestionText[ActionType.Function](),
34
- enum: ModuleActionFunctions.map((func) => ({
35
- value: func,
36
- label: ActionFunctionText[func]()
37
- })),
38
- "x-reactions": [
39
- {
40
- dependencies: [
41
- "actionType"
42
- ],
43
- fulfill: {
44
- state: {
45
- visible: '{{$deps[0] === "function"}}'
46
- }
47
- }
48
- }
49
- ]
50
- }
51
- }
52
- };
53
- };
54
- const ModuleActionFunctionsDevDependencies = {
55
- [ActionFunction.StorybookV7]: "@modern-js/storybook",
56
- [ActionFunction.RuntimeApi]: "@modern-js/runtime",
57
- [ActionFunction.TailwindCSS]: "tailwindcss",
58
- [ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
59
- };
60
- const ModuleActionFunctionsPeerDependencies = {
61
- [ActionFunction.RuntimeApi]: "@modern-js/runtime",
62
- [ActionFunction.TailwindCSS]: "tailwindcss"
63
- };
64
- const ModuleActionFunctionsDependencies = {
65
- [ActionFunction.TailwindCSS]: "@modern-js/plugin-tailwindcss"
66
- };
67
- const ModuleNewActionGenerators = {
68
- [ActionType.Function]: {
69
- [ActionFunction.TailwindCSS]: "@modern-js/tailwindcss-generator",
70
- [ActionFunction.StorybookV7]: "@modern-js/storybook-next-generator",
71
- [ActionFunction.RuntimeApi]: "@modern-js/dependence-generator",
72
- [ActionFunction.ModuleDoc]: "@modern-js/module-doc-generator"
73
- }
74
- };
75
- const ModuleNewActionPluginName = {
76
- [ActionType.Function]: {
77
- [ActionFunction.TailwindCSS]: "tailwindcssPlugin",
78
- [ActionFunction.ModuleDoc]: "modulePluginDoc"
79
- }
80
- };
81
- const ModuleNewActionPluginDependence = {
82
- [ActionType.Function]: {
83
- [ActionFunction.TailwindCSS]: "@modern-js/plugin-tailwindcss",
84
- [ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
85
- }
86
- };
87
- export {
88
- ModuleActionFunctions,
89
- ModuleActionFunctionsDependencies,
90
- ModuleActionFunctionsDevDependencies,
91
- ModuleActionFunctionsPeerDependencies,
92
- ModuleActionTypes,
93
- ModuleActionTypesMap,
94
- ModuleNewActionGenerators,
95
- ModuleNewActionPluginDependence,
96
- ModuleNewActionPluginName,
97
- ModuleSpecialSchemaMap,
98
- getModuleNewActionSchema
99
- };
@@ -1 +0,0 @@
1
- export * from './project';
@@ -1,8 +0,0 @@
1
- import type { Schema } from '@modern-js/codesmith-formily';
2
- import { Language, PackageManager } from '../common';
3
- export declare const getModuleSchemaProperties: (extra: Record<string, any>) => Schema['properties'];
4
- export declare const getModuleSchema: (extra?: Record<string, any>) => Schema;
5
- export declare const ModuleDefaultConfig: {
6
- language: Language;
7
- packageManager: PackageManager;
8
- };
@@ -1 +0,0 @@
1
- export * from './project';
@@ -1,6 +0,0 @@
1
- import type { Schema } from '@modern-js/codesmith-formily';
2
- import { PackageManager } from '../common';
3
- export declare const getMonorepoSchema: (extra?: Record<string, any>) => Schema;
4
- export declare const MonorepoDefaultConfig: {
5
- packageManager: PackageManager;
6
- };
@@ -1,13 +0,0 @@
1
- import type { Schema } from '@modern-js/codesmith-formily';
2
- import { ActionFunction, ActionType } from '../common';
3
- export declare const ModuleActionTypes: ActionType[];
4
- export declare const ModuleActionFunctions: ActionFunction[];
5
- export declare const ModuleActionTypesMap: Record<string, string[]>;
6
- export declare const ModuleSpecialSchemaMap: Record<string, Schema>;
7
- export declare const getModuleNewActionSchema: () => Schema;
8
- export declare const ModuleActionFunctionsDevDependencies: Partial<Record<ActionFunction, string>>;
9
- export declare const ModuleActionFunctionsPeerDependencies: Partial<Record<ActionFunction, string>>;
10
- export declare const ModuleActionFunctionsDependencies: Partial<Record<ActionFunction, string>>;
11
- export declare const ModuleNewActionGenerators: Partial<Record<ActionType, Record<string, string>>>;
12
- export declare const ModuleNewActionPluginName: Partial<Record<ActionType, Record<string, string>>>;
13
- export declare const ModuleNewActionPluginDependence: Partial<Record<ActionType, Record<string, string>>>;