url handler downloads

Summary:
Adding support for downloading archived Flipper data using a URL handler.
A URL looks like `flipper://import/?url=` and will download the file specified in the url param. While downloading the file, a spinner is shown in the app's titlebar.

Reviewed By: jknoxville

Differential Revision: D14262763

fbshipit-source-id: 6538fc78c07a48cef7b71b3f7bdbcb712d054593
This commit is contained in:
Daniel Büchele
2019-03-01 04:27:27 -08:00
committed by Facebook Github Bot
parent 3e336d2349
commit 79124891a9
10 changed files with 164 additions and 80 deletions

33
flow-typed/npm/query-string_v6.x.x.js vendored Normal file
View File

@@ -0,0 +1,33 @@
// flow-typed signature: 9096718d5c8abc7d9ae9aadbe0ce565a
// flow-typed version: 6d8676cf5a/query-string_v6.x.x/flow_>=v0.32.x
declare module 'query-string' {
declare type ArrayFormat = 'none' | 'bracket' | 'index'
declare type ParseOptions = {|
arrayFormat?: ArrayFormat,
|}
declare type StringifyOptions = {|
arrayFormat?: ArrayFormat,
encode?: boolean,
strict?: boolean,
sort?: false | <A, B>(A, B) => number,
|}
declare type ObjectParameter = string | number | boolean | null | void;
declare type ObjectParameters = {
[string]: ObjectParameter | $ReadOnlyArray<ObjectParameter>
}
declare type QueryParameters = {
[string]: string | Array<string> | null
}
declare module.exports: {
extract(str: string): string,
parse(str: string, opts?: ParseOptions): QueryParameters,
parseUrl(str: string, opts?: ParseOptions): { url: string, query: QueryParameters },
stringify(obj: ObjectParameters, opts?: StringifyOptions): string,
}
}