@modern-js/generator-utils 3.3.0 → 3.3.2
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/types/index.d.ts +15 -15
- package/dist/types/locale/en.d.ts +7 -7
- package/dist/types/locale/index.d.ts +13 -13
- package/dist/types/locale/zh.d.ts +7 -7
- package/dist/types/utils/fsExist.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/package.d.ts +1 -1
- package/dist/types/utils/stripAnsi.d.ts +1 -1
- package/package.json +7 -7
package/dist/types/index.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { Solution } from '@modern-js/generator-common';
|
|
2
2
|
import { GeneratorContext } from '@modern-js/codesmith';
|
|
3
3
|
export * from './utils';
|
|
4
|
-
export { ora, fs, semver, execa, chalk, readTsConfigByFile, getPackageManager, canUseNpm, canUsePnpm, canUseYarn, isReact18 } from '@modern-js/utils';
|
|
4
|
+
export { ora, fs, semver, execa, chalk, readTsConfigByFile, getPackageManager, canUseNpm, canUsePnpm, canUseYarn, isReact18, } from '@modern-js/utils';
|
|
5
5
|
export { i18n } from './locale';
|
|
6
6
|
export declare function getPackageVersion(packageName: string, registry?: string): Promise<string>;
|
|
7
7
|
export declare function getModernVersion(solution: Solution, registry?: string, distTag?: string): Promise<string>;
|
|
8
8
|
export declare function getModernPluginVersion(solution: Solution, packageName: string, options?: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
cwd?: string;
|
|
10
|
+
registry?: string;
|
|
11
|
+
distTag?: string;
|
|
12
12
|
}): Promise<string>;
|
|
13
13
|
export declare function getPackageManagerText(packageManager: 'pnpm' | 'yarn' | 'npm'): string;
|
|
14
14
|
export declare function isTsProject(appDir: string): boolean;
|
|
15
15
|
export declare function getPackageObj(context: GeneratorContext): Promise<any>;
|
|
16
16
|
export declare function getAllPackages(appDir: string): string[];
|
|
17
17
|
export declare function validatePackageName(value: string, packages: string[], options: {
|
|
18
|
-
|
|
18
|
+
isMonorepoSubProject: boolean;
|
|
19
19
|
}): {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
success: boolean;
|
|
21
|
+
error: string;
|
|
22
22
|
} | {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
success: boolean;
|
|
24
|
+
error?: undefined;
|
|
25
25
|
};
|
|
26
26
|
export declare function validatePackagePath(value: string, projectDir: string, options?: {
|
|
27
|
-
|
|
27
|
+
isMwa?: boolean;
|
|
28
28
|
}): {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
success: boolean;
|
|
30
|
+
error: string;
|
|
31
31
|
} | {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
success: boolean;
|
|
33
|
+
error?: undefined;
|
|
34
34
|
};
|
|
35
35
|
export declare function getModuleProjectPath(packagePath: string, isMonorepoSubProject: boolean, isLocalPackages: boolean): string;
|
|
36
36
|
export declare function getMWAProjectPath(packagePath: string, isMonorepoSubProject: boolean): string;
|
|
37
|
-
export declare function getModernConfigFile(appDir: string): Promise<"modern.config.ts" | "modern.config.js">;
|
|
37
|
+
export declare function getModernConfigFile(appDir: string): Promise<"modern.config.ts" | "modern.config.js">;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const EN_LOCALE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
2
|
+
packageName: {
|
|
3
|
+
exit: string;
|
|
4
|
+
};
|
|
5
|
+
packagePath: {
|
|
6
|
+
exit: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { I18n } from '@modern-js/plugin-i18n';
|
|
2
2
|
declare const i18n: I18n;
|
|
3
3
|
declare const localeKeys: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
packageName: {
|
|
5
|
+
exit: string;
|
|
6
|
+
};
|
|
7
|
+
packagePath: {
|
|
8
|
+
exit: string;
|
|
9
|
+
};
|
|
10
10
|
} | {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
packageName: {
|
|
12
|
+
exit: string;
|
|
13
|
+
};
|
|
14
|
+
packagePath: {
|
|
15
|
+
exit: string;
|
|
16
|
+
};
|
|
17
17
|
};
|
|
18
|
-
export { i18n, localeKeys };
|
|
18
|
+
export { i18n, localeKeys };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const ZH_LOCALE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
2
|
+
packageName: {
|
|
3
|
+
exit: string;
|
|
4
|
+
};
|
|
5
|
+
packagePath: {
|
|
6
|
+
exit: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function fileExist(filePath: string): Promise<boolean>;
|
|
1
|
+
export declare function fileExist(filePath: string): Promise<boolean>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './stripAnsi';
|
|
2
|
-
export * from './package';
|
|
2
|
+
export * from './package';
|
|
@@ -6,4 +6,4 @@ export declare function semverDecrease(version: string): string;
|
|
|
6
6
|
* tools 存在 hotfix 版本,从 tools 版本号向下找当前插件版本号
|
|
7
7
|
* 限制只在当前小版本号范围内寻找
|
|
8
8
|
*/
|
|
9
|
-
export declare function getAvailableVersion(packageName: string, currentVersion: string, registry?: string): Promise<string>;
|
|
9
|
+
export declare function getAvailableVersion(packageName: string, currentVersion: string, registry?: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function stripAnsi(string: string): string;
|
|
1
|
+
export declare function stripAnsi(string: string): 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.2",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@swc/helpers": "0.5.3",
|
|
34
|
-
"@modern-js/plugin-i18n": "2.
|
|
35
|
-
"@modern-js/
|
|
36
|
-
"@modern-js/
|
|
34
|
+
"@modern-js/plugin-i18n": "2.42.1",
|
|
35
|
+
"@modern-js/utils": "2.42.1",
|
|
36
|
+
"@modern-js/generator-common": "3.3.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@modern-js/codesmith": "2.3.
|
|
39
|
+
"@modern-js/codesmith": "2.3.1",
|
|
40
40
|
"@types/jest": "^29",
|
|
41
41
|
"@types/node": "^14",
|
|
42
42
|
"jest": "^29",
|
|
43
43
|
"typescript": "^5",
|
|
44
|
-
"@scripts/build": "2.
|
|
45
|
-
"@scripts/jest-config": "2.
|
|
44
|
+
"@scripts/build": "2.42.1",
|
|
45
|
+
"@scripts/jest-config": "2.42.1"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"publishConfig": {
|