Add uploading to internal cloud storage
Summary: Design doc: https://docs.google.com/document/d/1HLCFl46RfqG0o1mSt8SWrwf_HMfOCRg_oENioc1rkvQ/edit# We'll use it in the subsequent diff to automatically upload a universal export Reviewed By: passy Differential Revision: D40585810 fbshipit-source-id: 5b409d716c2ead040865130d379d4f593cb68483
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5d921966fb
commit
970c03d942
@@ -55,6 +55,7 @@ import {assertNotNull} from './comms/Utilities';
|
||||
import {mkdirp} from 'fs-extra';
|
||||
import {flipperDataFolder, flipperSettingsFolder} from './utils/paths';
|
||||
import {DebuggableDevice} from './devices/DebuggableDevice';
|
||||
import {jfUpload} from './fb-stubs/jf';
|
||||
|
||||
const {access, copyFile, mkdir, unlink, stat, readlink, readFile, writeFile} =
|
||||
promises;
|
||||
@@ -535,6 +536,13 @@ export class FlipperServerImpl implements FlipperServer {
|
||||
return internGraphGETAPIRequest(endpoint, params, options, token);
|
||||
},
|
||||
'intern-upload-scribe-logs': sendScribeLogs,
|
||||
'intern-cloud-upload': async (path) => {
|
||||
const uploadRes = await jfUpload(path);
|
||||
if (!uploadRes) {
|
||||
throw new Error('Upload failed');
|
||||
}
|
||||
return uploadRes;
|
||||
},
|
||||
shutdown: async () => {
|
||||
process.exit(0);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user