Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions lib/commands/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export class PrepareCommand
hasSensitiveValue: false,
},
hmr: { type: OptionType.Boolean, default: false, hasSensitiveValue: false },

skipNative: {
type: OptionType.Boolean,
default: false,
hasSensitiveValue: false,
},
whatever: {
type: OptionType.Boolean,
default: false,
Expand All @@ -38,13 +42,13 @@ export class PrepareCommand
public $platformCommandParameter: ICommandParameter,
public $platformsDataService: IPlatformsDataService,
public $prepareDataService: PrepareDataService,
public $migrateController: IMigrateController
public $migrateController: IMigrateController,
) {
super(
$options,
$platformsDataService,
$platformValidationService,
$projectData
$projectData,
);
this.$projectData.initializeProjectData();
}
Expand All @@ -55,7 +59,7 @@ export class PrepareCommand
const prepareData = this.$prepareDataService.getPrepareData(
this.$projectData.projectDir,
platform,
this.$options
this.$options,
);
await this.$prepareController.prepare(prepareData);
}
Expand All @@ -68,7 +72,7 @@ export class PrepareCommand
this.$options.provision,
this.$options.teamId,
this.$projectData,
platform
platform,
));

if (!this.$options.force) {
Expand Down
7 changes: 6 additions & 1 deletion lib/data/prepare-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PrepareData extends ControllerDataBase {
constructor(
public projectDir: string,
public platform: string,
data: IOptions
data: IOptions,
) {
super(projectDir, platform, data);

Expand Down Expand Up @@ -45,6 +45,11 @@ export class PrepareData extends ControllerDataBase {
}
this.hostProjectPath = data.hostProjectPath;

if (data.skipNative) {
this.nativePrepare = { skipNativePrepare: true };
this.watchNative = false;
}

this.uniqueBundle = !this.watch && data.uniqueBundle ? Date.now() : 0;
}
}
Expand Down
80 changes: 38 additions & 42 deletions lib/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface INodePackageManager {
install(
packageName: string,
pathToSave: string,
config: INodePackageManagerInstallOptions
config: INodePackageManagerInstallOptions,
): Promise<INpmInstallResultInfo>;

/**
Expand All @@ -44,7 +44,7 @@ interface INodePackageManager {
uninstall(
packageName: string,
config?: IDictionary<string | boolean>,
path?: string
path?: string,
): Promise<string>;

/**
Expand Down Expand Up @@ -84,7 +84,7 @@ interface INodePackageManager {
*/
search(
filter: string[],
config: IDictionary<string | boolean>
config: IDictionary<string | boolean>,
): Promise<string>;

/**
Expand Down Expand Up @@ -130,7 +130,7 @@ interface IPerformanceService {
methodInfo: string,
startTime: number,
endTime: number,
args: any[]
args: any[],
): void;

// Will return a reference time in milliseconds
Expand All @@ -141,48 +141,47 @@ interface IPackageInstallationManager {
install(
packageName: string,
packageDir: string,
options?: INpmInstallOptions
options?: INpmInstallOptions,
): Promise<any>;
uninstall(
packageName: string,
packageDir: string,
options?: IDictionary<string | boolean>
options?: IDictionary<string | boolean>,
): Promise<any>;
getLatestVersion(packageName: string): Promise<string>;
getNextVersion(packageName: string): Promise<string>;
getLatestCompatibleVersion(
packageName: string,
referenceVersion?: string
referenceVersion?: string,
): Promise<string>;
getMaxSatisfyingVersion(
packageName: string,
versionRange: string
versionRange: string,
): Promise<string>;
getLatestCompatibleVersionSafe(
packageName: string,
referenceVersion?: string
referenceVersion?: string,
): Promise<string>;
getInspectorFromCache(
inspectorNpmPackageName: string,
projectDir: string
projectDir: string,
): Promise<string>;
clearInspectorCache(): void;
getInstalledDependencyVersion(
packageName: string,
projectDir?: string
projectDir?: string,
): Promise<string>;
getMaxSatisfyingVersionSafe(
packageName: string,
versionIdentifier: string
versionIdentifier: string,
): Promise<string>;
}

/**
* Describes options that can be passed to manipulate package installation.
*/
interface INodePackageManagerInstallOptions
extends INpmInstallConfigurationOptions,
IDictionary<string | boolean> {
extends INpmInstallConfigurationOptions, IDictionary<string | boolean> {
/**
* Destination of the installation.
* @type {string}
Expand Down Expand Up @@ -266,7 +265,7 @@ interface INpmPeerDependencyInfo {
* @type {string}
*/
requires: string;
}
},
];
/**
* Dependencies of the dependency.
Expand Down Expand Up @@ -550,8 +549,7 @@ interface INpmInstallConfigurationOptionsBase {
ignoreScripts: boolean; //npm flag
}

interface INpmInstallConfigurationOptions
extends INpmInstallConfigurationOptionsBase {
interface INpmInstallConfigurationOptions extends INpmInstallConfigurationOptionsBase {
disableNpmInstall: boolean;
}

Expand Down Expand Up @@ -597,7 +595,8 @@ interface ITypingsOptions {
}

interface IOptions
extends IRelease,
extends
IRelease,
IDeviceIdentifier,
IJustLaunch,
IAvd,
Expand All @@ -622,7 +621,7 @@ interface IOptions
argv: IYargArgv;
validateOptions(
commandSpecificDashedOptions?: IDictionary<IDashedOption>,
projectData?: IProjectData
projectData?: IProjectData,
): void;
options: IDictionary<IDashedOption>;
shorthands: string[];
Expand Down Expand Up @@ -709,6 +708,7 @@ interface IOptions
dryRun: boolean;

platformOverride: string;
skipNative: boolean;
uniqueBundle: boolean;
// allow arbitrary options
[optionName: string]: any;
Expand All @@ -719,26 +719,22 @@ interface IEnvOptions {
}

interface IAndroidBuildOptionsSettings
extends IAndroidReleaseOptions,
IRelease,
Partial<IHasAndroidBundle> {}
extends IAndroidReleaseOptions, IRelease, Partial<IHasAndroidBundle> {}

interface IHasAndroidBundle {
androidBundle: boolean;
}

interface IPlatformBuildData
extends IRelease,
IHasUseHotModuleReloadOption,
IBuildConfig,
IEnvOptions {}
extends IRelease, IHasUseHotModuleReloadOption, IBuildConfig, IEnvOptions {}

interface IDeviceEmulator extends IHasEmulatorOption, IDeviceIdentifier {}

interface IRunPlatformOptions extends IJustLaunch, IDeviceEmulator {}

interface IDeployPlatformOptions
extends IAndroidReleaseOptions,
extends
IAndroidReleaseOptions,
IRelease,
IClean,
IDeviceEmulator,
Expand Down Expand Up @@ -834,7 +830,7 @@ interface IAndroidToolsInfo {
*/
validateJavacVersion(
installedJavaVersion: string,
options?: IAndroidToolsInfoOptions
options?: IAndroidToolsInfoOptions,
): boolean;

/**
Expand Down Expand Up @@ -913,14 +909,14 @@ interface IAppDebugSocketProxyFactory extends NodeJS.EventEmitter {
device: Mobile.IiOSDevice,
appId: string,
projectName: string,
projectDir: string
projectDir: string,
): Promise<any>;

ensureWebSocketProxy(
device: Mobile.IiOSDevice,
appId: string,
projectName: string,
projectDir: string
projectDir: string,
): Promise<any>;

removeAllProxies(): void;
Expand All @@ -939,12 +935,12 @@ interface IiOSSocketRequestExecutor {
executeAttachRequest(
device: Mobile.IiOSDevice,
timeout: number,
projectId: string
projectId: string,
): Promise<void>;
executeRefreshRequest(
device: Mobile.IiOSDevice,
timeout: number,
appId: string
appId: string,
): Promise<boolean>;
}

Expand Down Expand Up @@ -995,7 +991,7 @@ interface IProjectNameService {
*/
ensureValidName(
projectName: string,
validateOptions?: { force: boolean }
validateOptions?: { force: boolean },
): Promise<string>;
}

Expand Down Expand Up @@ -1089,7 +1085,7 @@ interface IBundleValidatorHelper {
*/
getBundlerDependencyVersion(
projectData: IProjectData,
bundlerName?: string
bundlerName?: string,
): string;
}

Expand Down Expand Up @@ -1171,7 +1167,7 @@ interface IAssetsGenerationService {
* @returns {Promise<void>}
*/
generateSplashScreens(
splashesGenerationData: IResourceGenerationData
splashesGenerationData: IResourceGenerationData,
): Promise<void>;
}

Expand Down Expand Up @@ -1207,7 +1203,7 @@ interface IPlatformValidationService {
provision: true | string,
teamId: true | string,
projectData: IProjectData,
platform?: string
platform?: string,
): Promise<boolean>;

validatePlatformInstalled(platform: string, projectData: IProjectData): void;
Expand All @@ -1220,35 +1216,35 @@ interface IPlatformValidationService {
*/
isPlatformSupportedForOS(
platform: string,
projectData: IProjectData
projectData: IProjectData,
): boolean;
}

interface IPlatformCommandHelper {
addPlatforms(
platforms: string[],
projectData: IProjectData,
frameworkPath?: string
frameworkPath?: string,
): Promise<void>;
cleanPlatforms(
platforms: string[],
projectData: IProjectData,
frameworkPath: string
frameworkPath: string,
): Promise<void>;
removePlatforms(
platforms: string[],
projectData: IProjectData
projectData: IProjectData,
): Promise<void>;
updatePlatforms(
platforms: string[],
projectData: IProjectData
projectData: IProjectData,
): Promise<void>;
getInstalledPlatforms(projectData: IProjectData): string[];
getAvailablePlatforms(projectData: IProjectData): string[];
getPreparedPlatforms(projectData: IProjectData): string[];
getCurrentPlatformVersion(
platform: string,
projectData: IProjectData
projectData: IProjectData,
): string;
}

Expand Down
Loading
Loading