add route for app module micro
This commit is contained in:
@@ -11,7 +11,12 @@ export type InstallAppOpts = {
|
||||
path?: string;
|
||||
key?: string;
|
||||
};
|
||||
export const appCheck = async (opts: InstallAppOpts) => {
|
||||
/**
|
||||
* 检测路径是否存在
|
||||
* @param opts
|
||||
* @returns
|
||||
*/
|
||||
export const appPathCheck = async (opts: InstallAppOpts) => {
|
||||
const { key } = opts;
|
||||
const directory = path.join(appsPath, key);
|
||||
if (fileIsExist(directory)) {
|
||||
@@ -55,7 +60,5 @@ export const installApp = async (opts: InstallAppOpts) => {
|
||||
app.key = key;
|
||||
fs.writeFileSync(pkgs, JSON.stringify(pkg, null, 2));
|
||||
// fs.unlinkSync(filePath);
|
||||
return { path: filePath };
|
||||
return { path: filePath, pkg };
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user