dashboard
repositories
filestore
activity
search
login
drone
/
drone_webodm
webodm 部署代码
summary
reflog
commits
tree
docs
forks
compare
blame
|
history
|
raw
fix: 去除版本信息
zhongrj
2025-11-25
b89962006164a462404b79a738bee8cbb6d7fe7e
[drone/drone_webodm.git]
/
app
/
static
/
app
/
js
/
tests
/
utils
/
MockLoader.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const fs = require('fs');
const path = require('path');
module.exports = {
// Load a mock from the <root>/build/mocks directory
load: function(mockPath){
try{
return JSON.parse(fs.readFileSync(
path.join(__dirname, "..", "..", "..", "..", "..", "..", "build", "mocks", mockPath),
'utf8'
));
}catch(e){
throw new Error(`Invalid mock ${path}: ${e.message}`);
}
}
};