Migrate androidContainerUtility*
Summary: Both util and internals. Reviewed By: danielbuechele Differential Revision: D16710453 fbshipit-source-id: e98972920084ce4d6bf083a48a442ab44c8e5f3e
This commit is contained in:
committed by
Facebook Github Bot
parent
beba2799d2
commit
7bb241bf63
@@ -10,7 +10,7 @@
|
|||||||
* opaque types will ensure the commands are only ever run on validated
|
* opaque types will ensure the commands are only ever run on validated
|
||||||
* arguments.
|
* arguments.
|
||||||
*/
|
*/
|
||||||
import {getAdbClient} from './adbClient.tsx';
|
import {getAdbClient} from './adbClient';
|
||||||
import {UnsupportedError} from './metrics';
|
import {UnsupportedError} from './metrics';
|
||||||
const adbkit = require('adbkit-fb');
|
const adbkit = require('adbkit-fb');
|
||||||
|
|
||||||
@@ -19,10 +19,10 @@ const appNotDebuggableRegex = /debuggable/;
|
|||||||
const operationNotPermittedRegex = /not permitted/;
|
const operationNotPermittedRegex = /not permitted/;
|
||||||
const logTag = 'androidContainerUtility';
|
const logTag = 'androidContainerUtility';
|
||||||
|
|
||||||
export opaque type AppName = string;
|
export type AppName = string;
|
||||||
export opaque type Command = string;
|
export type Command = string;
|
||||||
export opaque type FilePath = string;
|
export type FilePath = string;
|
||||||
export opaque type FileContent = string;
|
export type FileContent = string;
|
||||||
|
|
||||||
export function validateAppName(app: string): Promise<AppName> {
|
export function validateAppName(app: string): Promise<AppName> {
|
||||||
if (app.match(allowedAppNameRegex)) {
|
if (app.match(allowedAppNameRegex)) {
|
||||||
Reference in New Issue
Block a user