@modern-js/new-action 2.40.0 → 2.42.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.
@@ -61,7 +61,7 @@ const ModuleNewAction = async (options) => {
61
61
  }
62
62
  });
63
63
  if (!hasOption) {
64
- smith.logger.warn("no option can be enabled");
64
+ smith.logger.warn("No option can be enabled, exit 1.", funcMap);
65
65
  process.exit(1);
66
66
  }
67
67
  const ans = await formilyAPI.getInputBySchemaFunc(import_generator_common.getModuleNewActionSchema, {
@@ -107,7 +107,8 @@ const ModuleNewAction = async (options) => {
107
107
  } : {},
108
108
  pluginName: import_generator_common.ModuleNewActionPluginName[actionType][action],
109
109
  pluginDependence: import_generator_common.ModuleNewActionPluginDependence[actionType][action],
110
- shouldUsePluginNameExport
110
+ shouldUsePluginNameExport,
111
+ isModuleProject: true
111
112
  });
112
113
  const task = [
113
114
  {
@@ -38,7 +38,7 @@ const ModuleNewAction = async (options) => {
38
38
  }
39
39
  });
40
40
  if (!hasOption) {
41
- smith.logger.warn("no option can be enabled");
41
+ smith.logger.warn("No option can be enabled, exit 1.", funcMap);
42
42
  process.exit(1);
43
43
  }
44
44
  const ans = await formilyAPI.getInputBySchemaFunc(getModuleNewActionSchema, {
@@ -84,7 +84,8 @@ const ModuleNewAction = async (options) => {
84
84
  } : {},
85
85
  pluginName: ModuleNewActionPluginName[actionType][action],
86
86
  pluginDependence: ModuleNewActionPluginDependence[actionType][action],
87
- shouldUsePluginNameExport
87
+ shouldUsePluginNameExport,
88
+ isModuleProject: true
88
89
  });
89
90
  const task = [
90
91
  {
@@ -1,4 +1,4 @@
1
1
  export * from './utils';
2
2
  export * from './mwa';
3
3
  export * from './module';
4
- export * from './monorepo';
4
+ export * from './monorepo';
@@ -1,11 +1,11 @@
1
1
  interface IModuleNewActionOption {
2
- locale?: string;
3
- distTag?: string;
4
- debug?: boolean;
5
- registry?: string;
6
- config?: string;
7
- cwd?: string;
8
- needInstall?: boolean;
2
+ locale?: string;
3
+ distTag?: string;
4
+ debug?: boolean;
5
+ registry?: string;
6
+ config?: string;
7
+ cwd?: string;
8
+ needInstall?: boolean;
9
9
  }
10
10
  export declare const ModuleNewAction: (options: IModuleNewActionOption) => Promise<void>;
11
- export {};
11
+ export {};
@@ -1,12 +1,12 @@
1
1
  interface IMonorepoNewActionOption {
2
- locale?: string;
3
- distTag?: string;
4
- debug?: boolean;
5
- registry?: string;
6
- config?: string;
7
- plugin?: string[];
8
- cwd?: string;
9
- needInstall?: boolean;
2
+ locale?: string;
3
+ distTag?: string;
4
+ debug?: boolean;
5
+ registry?: string;
6
+ config?: string;
7
+ plugin?: string[];
8
+ cwd?: string;
9
+ needInstall?: boolean;
10
10
  }
11
11
  export declare const MonorepoNewAction: (options: IMonorepoNewActionOption) => Promise<void>;
12
- export {};
12
+ export {};
@@ -1,11 +1,11 @@
1
1
  interface IMWANewActionOption {
2
- locale?: string;
3
- distTag?: string;
4
- debug?: boolean;
5
- registry?: string;
6
- config?: string;
7
- cwd?: string;
8
- needInstall?: boolean;
2
+ locale?: string;
3
+ distTag?: string;
4
+ debug?: boolean;
5
+ registry?: string;
6
+ config?: string;
7
+ cwd?: string;
8
+ needInstall?: boolean;
9
9
  }
10
10
  export declare const MWANewAction: (options: IMWANewActionOption) => Promise<void>;
11
- export {};
11
+ export {};
@@ -3,4 +3,4 @@ export declare function alreadyRepo(cwd?: string): boolean;
3
3
  export declare const readJson: (jsonPath: string) => any;
4
4
  export declare function hasEnabledFunction(action: ActionFunction | ActionRefactor, dependencies: Record<string, string>, devDependencies: Record<string, string>, peerDependencies: Record<string, string>, cwd: string): any;
5
5
  export declare function getGeneratorPath(generator: string, distTag: string): string;
6
- export declare function usePluginNameExport(solution: Solution, options: Record<string, string>): Promise<boolean>;
6
+ export declare function usePluginNameExport(solution: Solution, options: Record<string, string>): Promise<boolean>;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.40.0",
18
+ "version": "2.42.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -30,20 +30,20 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@modern-js/codesmith": "2.3.0",
34
- "@modern-js/codesmith-formily": "2.3.0",
35
- "@swc/helpers": "0.5.1",
36
- "@modern-js/generator-common": "3.2.11",
37
- "@modern-js/generator-utils": "3.2.11",
38
- "@modern-js/utils": "2.40.0"
33
+ "@modern-js/codesmith": "2.3.1",
34
+ "@modern-js/codesmith-formily": "2.3.1",
35
+ "@swc/helpers": "0.5.3",
36
+ "@modern-js/generator-common": "3.3.1",
37
+ "@modern-js/generator-utils": "3.3.1",
38
+ "@modern-js/utils": "2.42.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/jest": "^29",
42
42
  "@types/node": "^14",
43
43
  "jest": "^29",
44
44
  "typescript": "^5",
45
- "@scripts/build": "2.40.0",
46
- "@scripts/jest-config": "2.40.0"
45
+ "@scripts/build": "2.42.0",
46
+ "@scripts/jest-config": "2.42.0"
47
47
  },
48
48
  "sideEffects": false,
49
49
  "publishConfig": {