@modern-js/new-action 2.60.4-next.1 → 2.60.4
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/module.js +2 -2
- package/dist/cjs/mwa.js +1 -1
- package/dist/cjs/run.js +1 -1
- package/dist/esm/module.js +2 -2
- package/dist/esm/mwa.js +1 -1
- package/dist/esm/run.js +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +10 -9
- package/dist/index.js +0 -133728
package/dist/cjs/module.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_constants = require("./constants");
|
|
|
30
30
|
var import_utils = require("./utils");
|
|
31
31
|
const ModuleNewAction = async (options) => {
|
|
32
32
|
var _smith_logger, _smith_logger1;
|
|
33
|
-
const { locale = "zh", distTag = "", debug = false, registry
|
|
33
|
+
const { locale = "zh", distTag = "", debug = false, registry, config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
34
34
|
let UserConfig = {};
|
|
35
35
|
try {
|
|
36
36
|
UserConfig = JSON.parse(config);
|
|
@@ -43,7 +43,7 @@ const ModuleNewAction = async (options) => {
|
|
|
43
43
|
});
|
|
44
44
|
const smith = new import_codesmith.CodeSmith({
|
|
45
45
|
debug,
|
|
46
|
-
registryUrl: registry
|
|
46
|
+
registryUrl: registry === "" ? void 0 : registry
|
|
47
47
|
});
|
|
48
48
|
if (!(0, import_utils.alreadyRepo)(cwd)) {
|
|
49
49
|
smith.logger.warn("not valid modern.js repo");
|
package/dist/cjs/mwa.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_constants = require("./constants");
|
|
|
30
30
|
var import_utils = require("./utils");
|
|
31
31
|
const MWANewAction = async (options) => {
|
|
32
32
|
var _smith_logger, _smith_logger1;
|
|
33
|
-
const { locale = "zh", distTag = "", debug = false, registry
|
|
33
|
+
const { locale = "zh", distTag = "", debug = false, registry, config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
34
34
|
let UserConfig = {};
|
|
35
35
|
try {
|
|
36
36
|
UserConfig = JSON.parse(config);
|
package/dist/cjs/run.js
CHANGED
|
@@ -6,7 +6,7 @@ var import_mwa = require("./mwa");
|
|
|
6
6
|
var import_utils = require("./utils");
|
|
7
7
|
const main = async () => {
|
|
8
8
|
const program = new import_commander.Command();
|
|
9
|
-
program.option("--solution <solution>", "solution", "").option("--config <config>", "config", "{}").option("--root-path <rootPath>", "project root path", "").action(async (params) => {
|
|
9
|
+
program.option("--solution <solution>", "solution", "").option("--config <config>", "config", "{}").option("--root-path <rootPath>", "project root path", "").option("--debug", "using debug mode to log something", false).option("--time", "show run generator time log", false).action(async (params) => {
|
|
10
10
|
if (!params.solution) {
|
|
11
11
|
params.solution = (0, import_utils.getSolutionByDependance)();
|
|
12
12
|
}
|
package/dist/esm/module.js
CHANGED
|
@@ -7,7 +7,7 @@ import { enableAlreadyText } from "./constants";
|
|
|
7
7
|
import { alreadyRepo, getGeneratorPath, hasEnabledFunction, usePluginNameExport } from "./utils";
|
|
8
8
|
const ModuleNewAction = async (options) => {
|
|
9
9
|
var _smith_logger, _smith_logger1;
|
|
10
|
-
const { locale = "zh", distTag = "", debug = false, registry
|
|
10
|
+
const { locale = "zh", distTag = "", debug = false, registry, config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
11
11
|
let UserConfig = {};
|
|
12
12
|
try {
|
|
13
13
|
UserConfig = JSON.parse(config);
|
|
@@ -20,7 +20,7 @@ const ModuleNewAction = async (options) => {
|
|
|
20
20
|
});
|
|
21
21
|
const smith = new CodeSmith({
|
|
22
22
|
debug,
|
|
23
|
-
registryUrl: registry
|
|
23
|
+
registryUrl: registry === "" ? void 0 : registry
|
|
24
24
|
});
|
|
25
25
|
if (!alreadyRepo(cwd)) {
|
|
26
26
|
smith.logger.warn("not valid modern.js repo");
|
package/dist/esm/mwa.js
CHANGED
|
@@ -7,7 +7,7 @@ import { enableAlreadyText } from "./constants";
|
|
|
7
7
|
import { alreadyRepo, getGeneratorPath, hasEnabledFunction, usePluginNameExport } from "./utils";
|
|
8
8
|
const MWANewAction = async (options) => {
|
|
9
9
|
var _smith_logger, _smith_logger1;
|
|
10
|
-
const { locale = "zh", distTag = "", debug = false, registry
|
|
10
|
+
const { locale = "zh", distTag = "", debug = false, registry, config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
11
11
|
let UserConfig = {};
|
|
12
12
|
try {
|
|
13
13
|
UserConfig = JSON.parse(config);
|
package/dist/esm/run.js
CHANGED
|
@@ -5,7 +5,7 @@ import { MWANewAction } from "./mwa";
|
|
|
5
5
|
import { getSolutionByDependance } from "./utils";
|
|
6
6
|
const main = async () => {
|
|
7
7
|
const program = new Command();
|
|
8
|
-
program.option("--solution <solution>", "solution", "").option("--config <config>", "config", "{}").option("--root-path <rootPath>", "project root path", "").action(async (params) => {
|
|
8
|
+
program.option("--solution <solution>", "solution", "").option("--config <config>", "config", "{}").option("--root-path <rootPath>", "project root path", "").option("--debug", "using debug mode to log something", false).option("--time", "show run generator time log", false).action(async (params) => {
|
|
9
9
|
if (!params.solution) {
|
|
10
10
|
params.solution = getSolutionByDependance();
|
|
11
11
|
}
|
|
@@ -3,5 +3,5 @@ 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 | undefined>): Promise<boolean>;
|
|
7
7
|
export declare const getSolutionByDependance: (jsonPath?: string) => string | undefined;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.60.4
|
|
18
|
+
"version": "2.60.4",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@swc/helpers": "0.5.13",
|
|
37
37
|
"json5": "2.2.3",
|
|
38
38
|
"commander": "10.0.1",
|
|
39
|
-
"@modern-js/codesmith": "2.6.
|
|
40
|
-
"@modern-js/codesmith-formily": "2.6.
|
|
41
|
-
"@modern-js/codesmith-utils": "2.6.
|
|
42
|
-
"@modern-js/generator-
|
|
43
|
-
"@modern-js/generator-
|
|
39
|
+
"@modern-js/codesmith": "2.6.4",
|
|
40
|
+
"@modern-js/codesmith-formily": "2.6.4",
|
|
41
|
+
"@modern-js/codesmith-utils": "2.6.4",
|
|
42
|
+
"@modern-js/generator-utils": "3.7.0",
|
|
43
|
+
"@modern-js/generator-common": "3.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/jest": "^29",
|
|
@@ -48,13 +48,14 @@
|
|
|
48
48
|
"jest": "^29",
|
|
49
49
|
"ts-node": "^10.9.1",
|
|
50
50
|
"typescript": "^5",
|
|
51
|
-
"@scripts/build": "2.60.
|
|
52
|
-
"@scripts/jest-config": "2.60.
|
|
51
|
+
"@scripts/build": "2.60.4",
|
|
52
|
+
"@scripts/jest-config": "2.60.4"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"registry": "https://registry.npmjs.org/",
|
|
57
|
-
"access": "public"
|
|
57
|
+
"access": "public",
|
|
58
|
+
"provenance": true
|
|
58
59
|
},
|
|
59
60
|
"scripts": {
|
|
60
61
|
"new": "modern-lib new",
|