mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:46:45 +00:00
fix(core): change proxied agent methods to native (#654)
This commit is contained in:
parent
a60759b2eb
commit
b215f92ecc
@ -98,7 +98,6 @@ class DatabaseVersion {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const [result] = (await this.db.sequelize.query(dialects[dialect].sql)) as any;
|
const [result] = (await this.db.sequelize.query(dialects[dialect].sql)) as any;
|
||||||
console.log(`db version: ${dialects[dialect].get(result?.[0]?.version)}`);
|
|
||||||
return semver.satisfies(dialects[dialect].get(result?.[0]?.version), versions[dialect]);
|
return semver.satisfies(dialects[dialect].get(result?.[0]?.version), versions[dialect]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,9 +121,7 @@ export class MockServer extends Application {
|
|||||||
return proxy;
|
return proxy;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return (...args: any[]) => {
|
return agent[method];
|
||||||
return agent[method](...args);
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return proxy as any;
|
return proxy as any;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
export function requireModule(module: any) {
|
export function requireModule(m: any) {
|
||||||
if (typeof module === 'string') {
|
if (typeof m === 'string') {
|
||||||
module = require(module);
|
m = require(m);
|
||||||
}
|
}
|
||||||
if (typeof module !== 'object') {
|
if (typeof m !== 'object') {
|
||||||
return module;
|
return m;
|
||||||
}
|
}
|
||||||
return module.__esModule ? module.default : module;
|
return m.__esModule ? m.default : m;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default requireModule;
|
export default requireModule;
|
||||||
|
Loading…
Reference in New Issue
Block a user