@wzyjs/cli 0.0.32 → 0.0.33
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.
|
@@ -2,7 +2,7 @@ export declare const createRender: (dist: string) => void;
|
|
|
2
2
|
export declare const buildServer: (cwd: string, outDir: string) => Promise<void>;
|
|
3
3
|
export declare const writeConfig: (outDir: string, productionConfig: any) => () => void;
|
|
4
4
|
export declare const getProductionConfig: (root: string) => {
|
|
5
|
-
routes:
|
|
5
|
+
routes: import("@midwayjs/hooks/internal").MidwayRoute[] | undefined;
|
|
6
6
|
};
|
|
7
7
|
export declare const executePromise: (promise: Promise<any>) => Promise<{
|
|
8
8
|
result: any;
|
|
@@ -28,13 +28,8 @@ const buildServer = async (cwd, outDir) => {
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
core.addPlugin(cli_plugin_build_1.BuildPlugin);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
await core.invoke();
|
|
34
|
-
}
|
|
35
|
-
catch (err) {
|
|
36
|
-
console.log(666, 'err', err);
|
|
37
|
-
}
|
|
31
|
+
await core.ready();
|
|
32
|
+
await core.invoke();
|
|
38
33
|
};
|
|
39
34
|
exports.buildServer = buildServer;
|
|
40
35
|
const writeConfig = (outDir, productionConfig) => {
|
|
@@ -23,7 +23,7 @@ const replaceContentInFile = (filePath, targetContent, replacement) => {
|
|
|
23
23
|
exports.default = (cli) => {
|
|
24
24
|
cli.command('hack', 'cli工具')
|
|
25
25
|
.action(() => {
|
|
26
|
-
console.log(666, path.resolve(__dirname));
|
|
26
|
+
console.log(666, path.resolve(__dirname), process.cwd());
|
|
27
27
|
replaceContentInFile('/Users/wangzhenyu/Code/work/libs/cli/node_modules/@umijs/preset-umi/dist/libs/scan.js', 'exportsFields: []', `exportsFields: ['exports'],
|
|
28
28
|
conditionNames: ["import", "require"]`);
|
|
29
29
|
replaceContentInFile('/Users/wangzhenyu/Code/work/libs/cli/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js', 'paths = fieldProcessor(remainingRequest, this.conditionNames);', `paths = fieldProcessor(remainingRequest, this.conditionNames);
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wzyjs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "description",
|
|
5
5
|
"author": "wzy",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"@midwayjs/bootstrap": "^3.7.1",
|
|
21
21
|
"@midwayjs/cli-plugin-build": "^1.3.14",
|
|
22
22
|
"@midwayjs/command-core": "^1.3.14",
|
|
23
|
+
"@midwayjs/hooks": "^3.1.6",
|
|
24
|
+
"@midwayjs/rpc": "^3.1.6",
|
|
23
25
|
"@umijs/plugins": "^4.0.28",
|
|
24
26
|
"cac": "^6.7.14",
|
|
25
27
|
"fs-extra": "^10.1.0",
|
|
@@ -35,7 +37,8 @@
|
|
|
35
37
|
"@types/react-router-dom": "^4.3.1"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
|
38
|
-
"@midwayjs/hooks": "^3.1.6"
|
|
40
|
+
"@midwayjs/hooks": "^3.1.6",
|
|
41
|
+
"@midwayjs/rpc": "^3.1.6"
|
|
39
42
|
},
|
|
40
43
|
"publishConfig": {
|
|
41
44
|
"access": "public"
|