in src/extension/windows/windowsPlatform.ts [42:106]
public async runApp(enableDebug: boolean = true): Promise<void> {
let extProps: any = {
platform: {
value: PlatformType.Windows,
isPii: false,
},
};
this.projectObserver?.updateRNWindowsProjectState(true);
if (this.runOptions.isDirect) {
extProps.isDirect = {
value: true,
isPii: false,
};
this.projectObserver?.updateRNWindowsHermesProjectState(true);
}
extProps = TelemetryHelper.addPlatformPropertiesToTelemetryProperties(
this.runOptions,
this.runOptions.reactNativeVersions,
extProps,
);
await TelemetryHelper.generate("WindowsPlatform.runApp", extProps, async () => {
const env = GeneralPlatform.getEnvArgument(
process.env,
this.runOptions.env,
this.runOptions.envFile,
);
if (
semver.gte(this.runOptions.reactNativeVersions.reactNativeWindowsVersion, "0.63.0")
) {
this.runArguments.push("--logging");
if (enableDebug) {
this.runOptions.isDirect
? this.runArguments.push("--direct-debugging")
: this.runArguments.push("--remote-debugging");
}
}
if (
!semver.valid(
this.runOptions.reactNativeVersions.reactNativeVersion,
) /* Custom RN implementations should support this flag*/ ||
semver.gte(
this.runOptions.reactNativeVersions.reactNativeVersion,
WindowsPlatform.NO_PACKAGER_VERSION,
)
) {
this.runArguments.push("--no-packager");
}
const runWindowsSpawn = new CommandExecutor(
this.runOptions.nodeModulesRoot,
this.projectPath,
this.logger,
).spawnReactCommand(`run-${this.platformName}`, this.runArguments, { env });
await new OutputVerifier(
() => Promise.resolve(WindowsPlatform.SUCCESS_PATTERNS),
() => Promise.resolve(WindowsPlatform.FAILURE_PATTERNS),
this.platformName,
).process(runWindowsSpawn);
});
}