@react-native-windows/cli
Advanced tools
Comparing version 0.0.0-canary.91 to 0.0.0-canary.92
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Thu, 30 Sep 2021 05:06:29 GMT", | ||
"date": "Tue, 05 Oct 2021 05:06:40 GMT", | ||
"tag": "@react-native-windows/cli_v0.0.0-canary.92", | ||
"version": "0.0.0-canary.92", | ||
"comments": { | ||
"prerelease": [ | ||
{ | ||
"comment": "CLI: Default to deploy by layout", | ||
"author": "jthysell@microsoft.com", | ||
"commit": "afb7054ff284e62884bcf987d8a494326aadb8c5", | ||
"package": "@react-native-windows/cli" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 30 Sep 2021 05:06:48 GMT", | ||
"tag": "@react-native-windows/cli_v0.0.0-canary.91", | ||
@@ -8,0 +23,0 @@ "version": "0.0.0-canary.91", |
# Change Log - @react-native-windows/cli | ||
This log was last generated on Thu, 30 Sep 2021 05:06:29 GMT and should not be manually modified. | ||
This log was last generated on Tue, 05 Oct 2021 05:06:40 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 0.0.0-canary.92 | ||
Tue, 05 Oct 2021 05:06:40 GMT | ||
### Changes | ||
- CLI: Default to deploy by layout (jthysell@microsoft.com) | ||
## 0.0.0-canary.91 | ||
Thu, 30 Sep 2021 05:06:29 GMT | ||
Thu, 30 Sep 2021 05:06:48 GMT | ||
@@ -11,0 +19,0 @@ ### Changes |
@@ -75,3 +75,3 @@ "use strict"; | ||
name: '--deploy-from-layout', | ||
description: 'Force deploy from layout, even in release builds', | ||
description: 'Force deploy from layout', | ||
}, | ||
@@ -78,0 +78,0 @@ { |
@@ -40,2 +40,3 @@ "use strict"; | ||
const build = __importStar(require("./build")); | ||
const configUtils = __importStar(require("../../config/configUtils")); | ||
const telemetry_1 = require("@react-native-windows/telemetry"); | ||
@@ -58,2 +59,46 @@ const version_1 = __importDefault(require("./version")); | ||
exports.getBuildConfiguration = getBuildConfiguration; | ||
function shouldDeployByPackage(options, config) { | ||
if (options.deployFromLayout) { | ||
// Force deploy by layout | ||
return false; | ||
} | ||
let hasAppxSigningEnabled = null; | ||
let hasPackageCertificateKeyFile = null; | ||
// TODO: These two properties should really be determined by | ||
// getting the actual values msbuild used during the build, | ||
// but for now we'll try to get them manually | ||
// Check passed in msbuild property overrides | ||
if (options.msbuildprops) { | ||
const msbuildprops = build.parseMsBuildProps(options); | ||
if ('AppxSigningEnabled' in msbuildprops) { | ||
hasAppxSigningEnabled = | ||
msbuildprops.AppxSigningEnabled.toLowerCase() === 'true'; | ||
} | ||
if ('PackageCertificateKeyFile' in msbuildprops) { | ||
hasPackageCertificateKeyFile = true; | ||
} | ||
} | ||
// If at least one override wasn't set, we need to parse the project file | ||
if (hasAppxSigningEnabled === null || hasPackageCertificateKeyFile === null) { | ||
const projectFile = build.getAppProjectFile(options, config); | ||
if (projectFile) { | ||
const projectContents = configUtils.readProjectFile(projectFile); | ||
// Find AppxSigningEnabled | ||
if (hasAppxSigningEnabled === null) { | ||
const appxSigningEnabled = configUtils.tryFindPropertyValue(projectContents, 'AppxSigningEnabled'); | ||
if (appxSigningEnabled !== null) { | ||
hasAppxSigningEnabled = appxSigningEnabled.toLowerCase() === 'true'; | ||
} | ||
} | ||
// Find PackageCertificateKeyFile | ||
if (hasPackageCertificateKeyFile === null) { | ||
const packageCertificateKeyFile = configUtils.tryFindPropertyValue(projectContents, 'PackageCertificateKeyFile'); | ||
if (packageCertificateKeyFile !== null) { | ||
hasPackageCertificateKeyFile = true; | ||
} | ||
} | ||
} | ||
} | ||
return (hasAppxSigningEnabled === true && hasPackageCertificateKeyFile === true); | ||
} | ||
function shouldLaunchApp(options) { | ||
@@ -218,3 +263,4 @@ return options.launch === true; | ||
const appPackageFolder = getAppPackage(options, projectName); | ||
if (options.release && !options.deployFromLayout) { | ||
if (shouldDeployByPackage(options, config)) { | ||
// Deploy by package | ||
await commandWithProgress_1.runPowerShellScriptFunction('Removing old version of the app', windowsStoreAppUtils, `Uninstall-App ${appName}`, verbose, 'RemoveOldAppVersionFailure'); | ||
@@ -225,2 +271,3 @@ const script = glob_1.default.sync(path_1.default.join(appPackageFolder, 'Add-AppDevPackage.ps1'))[0]; | ||
else { | ||
// Deploy from layout | ||
// If we have DeployAppRecipe.exe, use it (start in 16.8.4, earlier 16.8 versions have bugs) | ||
@@ -227,0 +274,0 @@ const appxRecipe = path_1.default.join(path_1.default.dirname(appxManifestPath), `${projectName}.build.appxrecipe`); |
{ | ||
"name": "@react-native-windows/cli", | ||
"version": "0.0.0-canary.91", | ||
"version": "0.0.0-canary.92", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
697980
7037