Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-windows/cli

Package Overview
Dependencies
Maintainers
2
Versions
417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-windows/cli - npm Package Compare versions

Comparing version 0.0.0-canary.94 to 0.0.0-canary.95

29

CHANGELOG.json

@@ -5,3 +5,30 @@ {

{
"date": "Sat, 09 Oct 2021 05:06:17 GMT",
"date": "Thu, 21 Oct 2021 05:07:06 GMT",
"tag": "@react-native-windows/cli_v0.0.0-canary.95",
"version": "0.0.0-canary.95",
"comments": {
"prerelease": [
{
"author": "30809111+acoates-ms@users.noreply.github.com",
"package": "@react-native-windows/cli",
"comment": "Update to typescript 4",
"commit": "8a0ffecdcf5e68d950f20380fdf62295edb352b6"
},
{
"author": "beachball",
"package": "@react-native-windows/cli",
"comment": "Bump @react-native-windows/package-utils to v0.0.0-canary.22",
"commit": "8a0ffecdcf5e68d950f20380fdf62295edb352b6"
},
{
"author": "beachball",
"package": "@react-native-windows/cli",
"comment": "Bump @react-native-windows/telemetry to v0.0.0-canary.24",
"commit": "8a0ffecdcf5e68d950f20380fdf62295edb352b6"
}
]
}
},
{
"date": "Sat, 09 Oct 2021 05:06:48 GMT",
"tag": "@react-native-windows/cli_v0.0.0-canary.94",

@@ -8,0 +35,0 @@ "version": "0.0.0-canary.94",

# Change Log - @react-native-windows/cli
This log was last generated on Sat, 09 Oct 2021 05:06:17 GMT and should not be manually modified.
This log was last generated on Thu, 21 Oct 2021 05:07:06 GMT and should not be manually modified.
<!-- Start content -->
## 0.0.0-canary.95
Thu, 21 Oct 2021 05:07:06 GMT
### Changes
- Update to typescript 4 (30809111+acoates-ms@users.noreply.github.com)
- Bump @react-native-windows/package-utils to v0.0.0-canary.22
- Bump @react-native-windows/telemetry to v0.0.0-canary.24
## 0.0.0-canary.94
Sat, 09 Oct 2021 05:06:17 GMT
Sat, 09 Oct 2021 05:06:48 GMT

@@ -11,0 +21,0 @@ ### Changes

4

lib-commonjs/config/dependencyConfig.js

@@ -22,3 +22,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -47,3 +47,3 @@ return result;

function dependencyConfigWindows(folder, userConfig = {}) {
if (os_1.platform() !== 'win32') {
if ((0, os_1.platform)() !== 'win32') {
return null;

@@ -50,0 +50,0 @@ }

@@ -22,3 +22,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -49,3 +49,3 @@ return result;

var _a;
if (os_1.platform() !== 'win32') {
if ((0, os_1.platform)() !== 'win32') {
return null;

@@ -52,0 +52,0 @@ }

@@ -83,3 +83,3 @@ "use strict";

const folder = path_1.default.resolve('src/e2etest/projects/', 'WithWinUI3');
await projectConfig_utils_1.ensureWinUI3Project(folder);
await (0, projectConfig_utils_1.ensureWinUI3Project)(folder);
expect(() => {

@@ -214,3 +214,3 @@ autolink.validateRequiredProjectProperties();

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
const al = new AutolinkTest({ windows: config }, {}, {

@@ -240,3 +240,3 @@ check: false,

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
config.useWinUI3 = false;

@@ -267,3 +267,3 @@ const al = new AutolinkTest({ windows: config }, {}, {

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
delete config.useWinUI3;

@@ -294,3 +294,3 @@ const al = new AutolinkTest({ windows: config }, {}, {

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
delete config.useWinUI3;

@@ -321,3 +321,3 @@ const al = new AutolinkTest({ windows: config }, {}, {

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
delete config.useWinUI3;

@@ -349,3 +349,3 @@ const al = new AutolinkTest({ windows: config }, {}, {

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
const al = new AutolinkTest({ windows: config }, {}, {

@@ -352,0 +352,0 @@ check: false,

@@ -45,6 +45,6 @@ "use strict";

};
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cpp-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCppApp.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cpp-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCppApp.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'SimpleCppApp');
await tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cpp-app/proj/MyApp.vcxproj'), path_1.default.join(projDir, 'SimpleCppApp.vcxproj'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cpp-app/proj/MyApp.vcxproj'), path_1.default.join(projDir, 'SimpleCppApp.vcxproj'), replacements, null);
}),

@@ -62,6 +62,6 @@ // New C++ project based on the template

};
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cpp-lib/proj/MyLib.sln'), path_1.default.join(windowsDir, 'SimpleCppLib.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cpp-lib/proj/MyLib.sln'), path_1.default.join(windowsDir, 'SimpleCppLib.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'SimpleCppLib');
await tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cpp-lib/proj/MyLib.vcxproj'), path_1.default.join(projDir, 'SimpleCppLib.vcxproj'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cpp-lib/proj/MyLib.vcxproj'), path_1.default.join(projDir, 'SimpleCppLib.vcxproj'), replacements, null);
}),

@@ -79,6 +79,6 @@ // New C# app project based on the template

};
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cs-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCSharpApp.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cs-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCSharpApp.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'SimpleCSharpApp');
await tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cs-app/proj/MyApp.csproj'), path_1.default.join(projDir, 'SimpleCSharpApp.csproj'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cs-app/proj/MyApp.csproj'), path_1.default.join(projDir, 'SimpleCSharpApp.csproj'), replacements, null);
}),

@@ -96,6 +96,6 @@ // New C# project based on the template

};
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cs-lib/proj/MyLib.sln'), path_1.default.join(windowsDir, 'SimpleCSharpLib.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cs-lib/proj/MyLib.sln'), path_1.default.join(windowsDir, 'SimpleCSharpLib.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'SimpleCSharpLib');
await tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(templateRoot, 'cs-lib/proj/MyLib.csproj'), path_1.default.join(projDir, 'SimpleCSharpLib.csproj'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(templateRoot, 'cs-lib/proj/MyLib.csproj'), path_1.default.join(projDir, 'SimpleCSharpLib.csproj'), replacements, null);
}),

@@ -111,3 +111,3 @@ project('WithIndirectDependency'),

const userConfig = null;
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toBeNull();
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toBeNull();
});

@@ -123,6 +123,6 @@ // Tests the result given a windows project config in react-native.config.js

if (name === 'BlankLib') {
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toMatchSnapshot();
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toMatchSnapshot();
}
else if (name.endsWith('App')) {
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toMatchSnapshot({
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toMatchSnapshot({
folder: expect.stringContaining(name),

@@ -137,3 +137,3 @@ projects: expect.arrayContaining([

else {
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toMatchSnapshot({
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toMatchSnapshot({
folder: expect.stringContaining(name),

@@ -151,6 +151,6 @@ });

if (name === 'BlankLib') {
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toMatchSnapshot();
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toMatchSnapshot();
}
else if (name.endsWith('App')) {
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toMatchSnapshot({
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toMatchSnapshot({
folder: expect.stringContaining(name),

@@ -165,3 +165,3 @@ projects: expect.arrayContaining([

else {
expect(dependencyConfig_1.dependencyConfigWindows(folder, userConfig)).toMatchSnapshot({
expect((0, dependencyConfig_1.dependencyConfigWindows)(folder, userConfig)).toMatchSnapshot({
folder: expect.stringContaining(name),

@@ -168,0 +168,0 @@ });

@@ -26,3 +26,3 @@ "use strict";

const windowsDir = path_1.default.join(folder, 'windows');
await projectConfig_utils_1.tryMkdir(windowsDir);
await (0, projectConfig_utils_1.tryMkdir)(windowsDir);
}),

@@ -32,3 +32,3 @@ // New C++ project based on the template

const windowsDir = path_1.default.join(folder, 'windows');
await projectConfig_utils_1.tryMkdir(windowsDir);
await (0, projectConfig_utils_1.tryMkdir)(windowsDir);
const replacements = {

@@ -41,6 +41,6 @@ name: 'SimpleCppApp',

};
await generator_common_1.copyAndReplace(path_1.default.join(projectConfig_utils_1.templateRoot, 'cpp-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCppApp.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(projectConfig_utils_1.templateRoot, 'cpp-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCppApp.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'SimpleCppApp');
await projectConfig_utils_1.tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(projectConfig_utils_1.templateRoot, 'cpp-app/proj/MyApp.vcxproj'), path_1.default.join(projDir, 'SimpleCppApp.vcxproj'), replacements, null);
await (0, projectConfig_utils_1.tryMkdir)(projDir);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(projectConfig_utils_1.templateRoot, 'cpp-app/proj/MyApp.vcxproj'), path_1.default.join(projDir, 'SimpleCppApp.vcxproj'), replacements, null);
}),

@@ -50,3 +50,3 @@ // New C# project based on the template

const windowsDir = path_1.default.join(folder, 'windows');
await projectConfig_utils_1.tryMkdir(windowsDir);
await (0, projectConfig_utils_1.tryMkdir)(windowsDir);
const replacements = {

@@ -59,9 +59,9 @@ name: 'SimpleCSharpApp',

};
await generator_common_1.copyAndReplace(path_1.default.join(projectConfig_utils_1.templateRoot, 'cs-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCSharpApp.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(projectConfig_utils_1.templateRoot, 'cs-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'SimpleCSharpApp.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'SimpleCSharpApp');
await projectConfig_utils_1.tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(projectConfig_utils_1.templateRoot, 'cs-app/proj/MyApp.csproj'), path_1.default.join(projDir, 'SimpleCSharpApp.csproj'), replacements, null);
await (0, projectConfig_utils_1.tryMkdir)(projDir);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(projectConfig_utils_1.templateRoot, 'cs-app/proj/MyApp.csproj'), path_1.default.join(projDir, 'SimpleCSharpApp.csproj'), replacements, null);
}),
project('WithWinUI3', async (folder) => {
await projectConfig_utils_1.ensureWinUI3Project(folder);
await (0, projectConfig_utils_1.ensureWinUI3Project)(folder);
}),

@@ -80,3 +80,3 @@ project('WithIndirectDependency'),

const userConfig = null;
expect(projectConfig_1.projectConfigWindows(folder, userConfig)).toBeNull();
expect((0, projectConfig_1.projectConfigWindows)(folder, userConfig)).toBeNull();
});

@@ -92,6 +92,6 @@ // Tests the result given a windows project config in react-native.config.js

if (name === 'BlankApp') {
expect(projectConfig_1.projectConfigWindows(folder, userConfig)).toMatchSnapshot();
expect((0, projectConfig_1.projectConfigWindows)(folder, userConfig)).toMatchSnapshot();
}
else {
expect(projectConfig_1.projectConfigWindows(folder, userConfig)).toMatchSnapshot({
expect((0, projectConfig_1.projectConfigWindows)(folder, userConfig)).toMatchSnapshot({
folder: expect.stringContaining(name),

@@ -109,6 +109,6 @@ });

if (name === 'BlankApp') {
expect(projectConfig_1.projectConfigWindows(folder, userConfig)).toMatchSnapshot();
expect((0, projectConfig_1.projectConfigWindows)(folder, userConfig)).toMatchSnapshot();
}
else {
expect(projectConfig_1.projectConfigWindows(folder, userConfig)).toMatchSnapshot({
expect((0, projectConfig_1.projectConfigWindows)(folder, userConfig)).toMatchSnapshot({
folder: expect.stringContaining(name),

@@ -121,3 +121,3 @@ });

const rnc = require(path_1.default.join(folder, 'react-native.config.js'));
const config = projectConfig_1.projectConfigWindows(folder, rnc.project.windows);
const config = (0, projectConfig_1.projectConfigWindows)(folder, rnc.project.windows);
const al = new autolink_1.AutolinkWindows({ windows: config }, {}, {

@@ -124,0 +124,0 @@ check: false,

@@ -55,10 +55,10 @@ "use strict";

};
await generator_common_1.copyAndReplace(path_1.default.join(exports.templateRoot, 'cpp-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'WithWinUI3.sln'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(exports.templateRoot, 'cpp-app/proj/MyApp.sln'), path_1.default.join(windowsDir, 'WithWinUI3.sln'), replacements, null);
const projDir = path_1.default.join(windowsDir, 'WithWinUI3');
await tryMkdir(projDir);
await generator_common_1.copyAndReplace(path_1.default.join(exports.templateRoot, 'cpp-app/proj/MyApp.vcxproj'), path_1.default.join(projDir, 'WithWinUI3.vcxproj'), replacements, null);
await generator_common_1.copyAndReplace(path_1.default.join(exports.templateRoot, 'cpp-app/proj/packages.config'), path_1.default.join(projDir, 'packages.config'), replacements, null);
await generator_common_1.copyAndReplace(path_1.default.join(exports.templateRoot, 'shared-app/proj/ExperimentalFeatures.props'), path_1.default.join(windowsDir, 'ExperimentalFeatures.props'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(exports.templateRoot, 'cpp-app/proj/MyApp.vcxproj'), path_1.default.join(projDir, 'WithWinUI3.vcxproj'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(exports.templateRoot, 'cpp-app/proj/packages.config'), path_1.default.join(projDir, 'packages.config'), replacements, null);
await (0, generator_common_1.copyAndReplace)(path_1.default.join(exports.templateRoot, 'shared-app/proj/ExperimentalFeatures.props'), path_1.default.join(windowsDir, 'ExperimentalFeatures.props'), replacements, null);
}
exports.ensureWinUI3Project = ensureWinUI3Project;
//# sourceMappingURL=projectConfig.utils.js.map

@@ -11,4 +11,4 @@ "use strict";

test('getAnonymizedProjectName - Project Exists', async () => {
const fooName = await runWindows_1.getAnonymizedProjectName(`${__dirname}/projects/FooPackage`);
const barName = await runWindows_1.getAnonymizedProjectName(`${__dirname}/projects/BarPackage`);
const fooName = await (0, runWindows_1.getAnonymizedProjectName)(`${__dirname}/projects/FooPackage`);
const barName = await (0, runWindows_1.getAnonymizedProjectName)(`${__dirname}/projects/BarPackage`);
expect(typeof fooName).toBe('string');

@@ -21,3 +21,3 @@ expect(typeof barName).toBe('string');

test('getAnonymizedProjectName - Project Doesnt Exist', async () => {
const emptyPackageName = await runWindows_1.getAnonymizedProjectName(`${__dirname}/projects/BlankApp`);
const emptyPackageName = await (0, runWindows_1.getAnonymizedProjectName)(`${__dirname}/projects/BlankApp`);
expect(emptyPackageName).toBeNull();

@@ -24,0 +24,0 @@ });

@@ -228,3 +228,3 @@ "use strict";

`You can see the new version here: ${absoluteSrcFilePath}`);
const { shouldReplace } = await prompts_1.default([
const { shouldReplace } = await (0, prompts_1.default)([
{

@@ -231,0 +231,0 @@ name: 'shouldReplace',

@@ -61,7 +61,7 @@ "use strict";

}
generator_common_1.createDir(path_1.default.join(destPath, windowsDir));
generator_common_1.createDir(path_1.default.join(destPath, windowsDir, newProjectName));
(0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir));
(0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir, newProjectName));
if (projectType === 'app') {
generator_common_1.createDir(path_1.default.join(destPath, windowsDir, newProjectName, bundleDir));
generator_common_1.createDir(path_1.default.join(destPath, windowsDir, newProjectName, 'BundleBuilder'));
(0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir, newProjectName, bundleDir));
(0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir, newProjectName, 'BundleBuilder'));
}

@@ -85,3 +85,3 @@ const language = options.language;

let mainComponentName = newProjectName;
const appJsonPath = await find_up_1.default('app.json', { cwd: destPath });
const appJsonPath = await (0, find_up_1.default)('app.json', { cwd: destPath });
if (appJsonPath) {

@@ -95,7 +95,7 @@ mainComponentName = JSON.parse(fs_1.default.readFileSync(appJsonPath, 'utf8')).name;

const winuiPropsPath = resolveRnwPath('PropertySheets/WinUI.props');
const winuiProps = configUtils_1.readProjectFile(winuiPropsPath);
const winui3Version = configUtils_1.findPropertyValue(winuiProps, 'WinUI3Version', winuiPropsPath);
const winui2xVersion = configUtils_1.findPropertyValue(winuiProps, 'WinUI2xVersion', winuiPropsPath);
const winuiProps = (0, configUtils_1.readProjectFile)(winuiPropsPath);
const winui3Version = (0, configUtils_1.findPropertyValue)(winuiProps, 'WinUI3Version', winuiPropsPath);
const winui2xVersion = (0, configUtils_1.findPropertyValue)(winuiProps, 'WinUI2xVersion', winuiPropsPath);
const jsEnginePropsPath = resolveRnwPath('PropertySheets/JSengine.props');
const hermesVersion = configUtils_1.findPropertyValue(configUtils_1.readProjectFile(jsEnginePropsPath), 'HermesVersion', jsEnginePropsPath);
const hermesVersion = (0, configUtils_1.findPropertyValue)((0, configUtils_1.readProjectFile)(jsEnginePropsPath), 'HermesVersion', jsEnginePropsPath);
const csNugetPackages = [

@@ -186,3 +186,3 @@ {

autolinkCppIncludes: '',
autolinkCppPackageProviders: '\n UNREFERENCED_PARAMETER(packageProviders);',
autolinkCppPackageProviders: '\n UNREFERENCED_PARAMETER(packageProviders);', // CODESYNC: vnext\local-cli\runWindows\utils\autolink.js
};

@@ -227,3 +227,3 @@ const commonMappings = projectType === 'app'

for (const mapping of commonMappings) {
await generator_common_1.copyAndReplaceWithChangedCallback(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceWithChangedCallback)(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
}

@@ -247,3 +247,3 @@ if (language === 'cs') {

for (const mapping of csMappings) {
await generator_common_1.copyAndReplaceWithChangedCallback(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceWithChangedCallback)(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
}

@@ -288,3 +288,3 @@ }

for (const mapping of cppMappings) {
await generator_common_1.copyAndReplaceWithChangedCallback(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceWithChangedCallback)(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
}

@@ -306,3 +306,3 @@ }

for (const mapping of sharedProjMappings) {
await generator_common_1.copyAndReplaceWithChangedCallback(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceWithChangedCallback)(mapping.from, destPath, mapping.to, templateVars, options.overwrite);
}

@@ -312,11 +312,11 @@ }

if (fs_1.default.existsSync(path_1.default.join(sharedPath, 'assets'))) {
await generator_common_1.copyAndReplaceAll(path_1.default.join(sharedPath, 'assets'), destPath, path_1.default.join(windowsDir, newProjectName, 'Assets'), templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceAll)(path_1.default.join(sharedPath, 'assets'), destPath, path_1.default.join(windowsDir, newProjectName, 'Assets'), templateVars, options.overwrite);
}
// shared src
if (fs_1.default.existsSync(path_1.default.join(sharedPath, 'src'))) {
await generator_common_1.copyAndReplaceAll(path_1.default.join(sharedPath, 'src'), destPath, path_1.default.join(windowsDir, newProjectName), templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceAll)(path_1.default.join(sharedPath, 'src'), destPath, path_1.default.join(windowsDir, newProjectName), templateVars, options.overwrite);
}
// src
if (fs_1.default.existsSync(path_1.default.join(srcPath, 'src'))) {
await generator_common_1.copyAndReplaceAll(path_1.default.join(srcPath, 'src'), destPath, path_1.default.join(windowsDir, newProjectName), templateVars, options.overwrite);
await (0, generator_common_1.copyAndReplaceAll)(path_1.default.join(srcPath, 'src'), destPath, path_1.default.join(windowsDir, newProjectName), templateVars, options.overwrite);
}

@@ -341,7 +341,7 @@ if (projectType === 'app') {

});
const rnwPackage = await package_utils_1.findPackage('react-native-windows');
const rnwPackage = await (0, package_utils_1.findPackage)('react-native-windows');
if (!rnwPackage) {
throw new Error('Could not locate the package for react-native-windows');
}
const rnPackage = await package_utils_1.findPackage('react-native');
const rnPackage = await (0, package_utils_1.findPackage)('react-native');
if (!rnPackage) {

@@ -352,6 +352,6 @@ throw new Error('Could not locate the package for react-native');

// an explict dep because we require it directly.
const cliPackage = await package_utils_1.findPackage('@react-native-community/cli', {
const cliPackage = await (0, package_utils_1.findPackage)('@react-native-community/cli', {
searchPath: rnPackage.path,
});
const metroConfigPackage = await package_utils_1.findPackage('metro-config', {
const metroConfigPackage = await (0, package_utils_1.findPackage)('metro-config', {
searchPath: (cliPackage === null || cliPackage === void 0 ? void 0 : cliPackage.path) || rnPackage.path,

@@ -367,3 +367,4 @@ });

const rnPeerDependency = rnwPackage.json.peerDependencies['react-native'];
if (!semver_1.default.satisfies(rnPackage.json.version, rnPeerDependency) && ((_a = projectPackage.json.dependencies) === null || _a === void 0 ? void 0 : _a['react-native'])) {
if (!semver_1.default.satisfies(rnPackage.json.version, rnPeerDependency) &&
((_a = projectPackage.json.dependencies) === null || _a === void 0 ? void 0 : _a['react-native'])) {
console.log(chalk_1.default.green('Installing a compatible version of react-native:'));

@@ -370,0 +371,0 @@ console.log(chalk_1.default.white(` ${rnPeerDependency}`));

@@ -38,3 +38,3 @@ "use strict";

const rnwDepScriptPath = path_1.default.join(path_1.default.dirname(require.resolve('react-native-windows/package.json', { paths: [process.cwd()] })), 'Scripts/rnw-dependencies.ps1');
const rnwDeps = child_process_1.execSync(`${commandWithProgress_1.powershell} -ExecutionPolicy Unrestricted -NoProfile "${rnwDepScriptPath}" -NoPrompt -ListChecks`, { stdio: 'pipe' });
const rnwDeps = (0, child_process_1.execSync)(`${commandWithProgress_1.powershell} -ExecutionPolicy Unrestricted -NoProfile "${rnwDepScriptPath}" -NoPrompt -ListChecks`, { stdio: 'pipe' });
const deps = rnwDeps.toString().trim().split('\n');

@@ -41,0 +41,0 @@ return [

@@ -15,3 +15,3 @@ "use strict";

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -58,3 +58,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

}
await generator_windows_1.installScriptsAndDependencies(options);
await (0, generator_windows_1.installScriptsAndDependencies)(options);
const rnwPackage = path_1.default.dirname(require.resolve('react-native-windows/package.json', {

@@ -64,3 +64,3 @@ paths: [projectDir],

const templateRoot = path_1.default.join(rnwPackage, 'template');
await generator_windows_1.copyProjectTemplateAndReplace(templateRoot, projectDir, name, ns, options);
await (0, generator_windows_1.copyProjectTemplateAndReplace)(templateRoot, projectDir, name, ns, options);
}

@@ -67,0 +67,0 @@ catch (e) {

@@ -22,3 +22,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -70,3 +70,3 @@ return result;

catch (_a) { }
commandWithProgress_1.newWarn(`Could not determine ${pkgName} version`);
(0, commandWithProgress_1.newWarn)(`Could not determine ${pkgName} version`);
return '';

@@ -111,5 +111,6 @@ }

}
catch (e) {
catch (err) {
const e = err;
telemetry_1.Telemetry.trackException(e);
commandWithProgress_1.newError('Unable to print environment info.\n' + e.toString());
(0, commandWithProgress_1.newError)('Unable to print environment info.\n' + e.toString());
return setExitProcessWithError(e, options.logging);

@@ -130,3 +131,3 @@ }

const rnwDependenciesPath = path_1.default.join(path_1.default.dirname(rnwPkgJsonPath), 'scripts/rnw-dependencies.ps1');
commandWithProgress_1.newError(`It is possible your installation is missing required software dependencies. Dependencies can be automatically installed by running ${rnwDependenciesPath} from an elevated PowerShell prompt.\nFor more information, go to http://aka.ms/rnw-deps`);
(0, commandWithProgress_1.newError)(`It is possible your installation is missing required software dependencies. Dependencies can be automatically installed by running ${rnwDependenciesPath} from an elevated PowerShell prompt.\nFor more information, go to http://aka.ms/rnw-deps`);
}

@@ -163,9 +164,9 @@ return setExitProcessWithError(e, options.logging);

'cli-version': getPkgVersion('@react-native-windows/cli'),
msftInternal: telemetry_1.isMSFTInternal(),
msftInternal: (0, telemetry_1.isMSFTInternal)(),
durationInSecs: process.uptime(),
success: runWindowsError === undefined,
phase: runWindowsPhase,
totalMem: os_1.totalmem(),
diskFree: telemetry_1.getDiskFreeSpace(__dirname),
cpus: os_1.cpus().length,
totalMem: (0, os_1.totalmem)(),
diskFree: (0, telemetry_1.getDiskFreeSpace)(__dirname),
cpus: (0, os_1.cpus)().length,
project: await getAnonymizedProjectName(config.root),

@@ -199,3 +200,3 @@ hasRunRnwDependencies: hasRunRnwDependencies,

if (verbose) {
commandWithProgress_1.newInfo('Verbose: ON');
(0, commandWithProgress_1.newInfo)('Verbose: ON');
}

@@ -208,3 +209,3 @@ // Get the solution file

catch (e) {
commandWithProgress_1.newError(`Couldn't get app solution information. ${e.message}`);
(0, commandWithProgress_1.newError)(`Couldn't get app solution information. ${e.message}`);
throw e;

@@ -225,7 +226,7 @@ }

else {
commandWithProgress_1.newInfo('Autolink step is skipped');
(0, commandWithProgress_1.newInfo)('Autolink step is skipped');
}
}
catch (e) {
commandWithProgress_1.newError(`Autolinking failed. ${e.message}`);
(0, commandWithProgress_1.newError)(`Autolinking failed. ${e.message}`);
throw e;

@@ -239,10 +240,10 @@ }

catch (error) {
commandWithProgress_1.newWarn('No public VS release found');
(0, commandWithProgress_1.newWarn)('No public VS release found');
// Try prerelease
try {
commandWithProgress_1.newInfo('Trying pre-release VS');
(0, commandWithProgress_1.newInfo)('Trying pre-release VS');
buildTools = msbuildtools_1.default.findAvailableVersion(options.arch, verbose, true);
}
catch (e) {
commandWithProgress_1.newError(e.message);
(0, commandWithProgress_1.newError)(e.message);
throw error;

@@ -254,3 +255,3 @@ }

if (!slnFile) {
commandWithProgress_1.newError('Visual Studio Solution file not found. Maybe run "npx react-native-windows-init" first?');
(0, commandWithProgress_1.newError)('Visual Studio Solution file not found. Maybe run "npx react-native-windows-init" first?');
throw new telemetry_1.CodedError('NoSolution', 'Cannot find solution file');

@@ -268,3 +269,3 @@ }

catch (e) {
commandWithProgress_1.newError(`Build failed with message ${e.message}. Check your build configuration.`);
(0, commandWithProgress_1.newError)(`Build failed with message ${e.message}. Check your build configuration.`);
if (e.logfile) {

@@ -277,3 +278,3 @@ console.log('See', chalk_1.default.bold(e.logfile));

else {
commandWithProgress_1.newInfo('Build step is skipped');
(0, commandWithProgress_1.newInfo)('Build step is skipped');
}

@@ -286,3 +287,3 @@ if (shouldLaunchPackager(options)) {

if (!slnFile) {
commandWithProgress_1.newError('Visual Studio Solution file not found. Maybe run "npx react-native-windows-init" first?');
(0, commandWithProgress_1.newError)('Visual Studio Solution file not found. Maybe run "npx react-native-windows-init" first?');
throw new telemetry_1.CodedError('NoSolution', 'Cannot find solution file');

@@ -300,3 +301,3 @@ }

catch (e) {
commandWithProgress_1.newError(`Failed to deploy${e ? `: ${e.message}` : ''}`);
(0, commandWithProgress_1.newError)(`Failed to deploy${e ? `: ${e.message}` : ''}`);
throw e;

@@ -306,3 +307,3 @@ }

else {
commandWithProgress_1.newInfo('Deploy step is skipped');
(0, commandWithProgress_1.newInfo)('Deploy step is skipped');
}

@@ -309,0 +310,0 @@ }

@@ -22,3 +22,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -579,3 +579,3 @@ return result;

const startTime = perf_hooks_1.performance.now();
const spinner = commandWithProgress_1.newSpinner(options.check ? 'Checking auto-linked files...' : 'Auto-linking...');
const spinner = (0, commandWithProgress_1.newSpinner)(options.check ? 'Checking auto-linked files...' : 'Auto-linking...');
try {

@@ -582,0 +582,0 @@ const autolink = new AutolinkWindows(config.project, config.dependencies, options);

@@ -39,3 +39,3 @@ "use strict";

if (configSolutionFile.startsWith(configErrorString)) {
commandWithProgress_1.newError(configSolutionFile.substr(configErrorString.length) +
(0, commandWithProgress_1.newError)(configSolutionFile.substr(configErrorString.length) +
' Optionally, use --sln {slnFile}.');

@@ -59,3 +59,3 @@ return null;

configProject.startsWith(configErrorString)) {
commandWithProgress_1.newError(configProject.substr(configErrorString.length) +
(0, commandWithProgress_1.newError)(configProject.substr(configErrorString.length) +
' Optionally, use --proj {projFile}.');

@@ -67,3 +67,3 @@ return null;

if (configProjectFile.startsWith(configErrorString)) {
commandWithProgress_1.newError(configProjectFile.substr(configErrorString.length) +
(0, commandWithProgress_1.newError)(configProjectFile.substr(configErrorString.length) +
' Optionally, use --proj {projFile}.');

@@ -70,0 +70,0 @@ return null;

@@ -37,3 +37,3 @@ "use strict";

try {
output = child_process_1.execSync(execString).toString();
output = (0, child_process_1.execSync)(execString).toString();
}

@@ -40,0 +40,0 @@ catch (e) {

@@ -11,3 +11,3 @@ /**

export declare function runPowerShellScriptFunction(taskDescription: string, script: string | null, funcName: string, verbose: boolean, errorCategory: CodedErrorType): Promise<void>;
export declare function commandWithProgress(spinner: ora.Ora, taskDoingName: string, command: string, args: string[], verbose: boolean, errorCategory: CodedErrorType): Promise<unknown>;
export declare function commandWithProgress(spinner: ora.Ora, taskDoingName: string, command: string, args: string[], verbose: boolean, errorCategory: CodedErrorType): Promise<void>;
export declare function newError(text: string): void;

@@ -14,0 +14,0 @@ export declare function newWarn(text: string): void;

@@ -41,3 +41,3 @@ "use strict";

};
return ora_1.default(options).start();
return (0, ora_1.default)(options).start();
}

@@ -70,3 +70,3 @@ exports.newSpinner = newSpinner;

}
const cp = child_process_1.spawn(command, args, spawnOptions);
const cp = (0, child_process_1.spawn)(command, args, spawnOptions);
let firstErrorLine = null;

@@ -73,0 +73,0 @@ if (!verbose) {

@@ -22,3 +22,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -125,3 +125,3 @@ return result;

// in the latest vs, Release is removed
commandWithProgress_1.newWarn('No package found in *_Release_* folder, removing the _Release_ prefix and checking again');
(0, commandWithProgress_1.newWarn)('No package found in *_Release_* folder, removing the _Release_ prefix and checking again');
const rootGlob = `${options.root}/windows/{*/AppPackages,AppPackages/*}`;

@@ -133,3 +133,3 @@ const newGlob = `${rootGlob}/*_${options.arch === 'x86' ? '{Win32,x86}' : options.arch}_Test`;

if (newFilteredGlobs.length >= 1) {
commandWithProgress_1.newWarn(`More than one app package found: ${result}`);
(0, commandWithProgress_1.newWarn)(`More than one app package found: ${result}`);
}

@@ -151,3 +151,3 @@ appPackage = newFilteredGlobs[0];

const windowsStoreAppUtilsPath = path_1.default.resolve(__dirname, '..', '..', '..', 'powershell', 'WindowsStoreAppUtils.ps1');
child_process_1.execSync(`${commandWithProgress_1.powershell} -NoProfile Unblock-File "${windowsStoreAppUtilsPath}"`);
(0, child_process_1.execSync)(`${commandWithProgress_1.powershell} -NoProfile Unblock-File "${windowsStoreAppUtilsPath}"`);
popd();

@@ -177,4 +177,4 @@ return windowsStoreAppUtilsPath;

if (filteredGlobs.length > 1) {
commandWithProgress_1.newWarn(`More than one appxmanifest for ${projectName}: ${filteredGlobs.join(',')}`);
commandWithProgress_1.newWarn(`Choosing ${appxPath}`);
(0, commandWithProgress_1.newWarn)(`More than one appxmanifest for ${projectName}: ${filteredGlobs.join(',')}`);
(0, commandWithProgress_1.newWarn)(`Choosing ${appxPath}`);
}

@@ -188,3 +188,3 @@ }

function parseAppxManifest(appxManifestPath) {
return xml_parser_1.default(fs_1.default.readFileSync(appxManifestPath, 'utf8'));
return (0, xml_parser_1.default)(fs_1.default.readFileSync(appxManifestPath, 'utf8'));
}

@@ -226,3 +226,3 @@ function getAppxManifest(options, projectName) {

catch (e) {
commandWithProgress_1.newWarn('Failed to uninstall app from ' + device.name);
(0, commandWithProgress_1.newWarn)('Failed to uninstall app from ' + device.name);
}

@@ -234,3 +234,3 @@ const appxFile = glob_1.default.sync(path_1.default.join(appPackageFolder, '*.appx'))[0];

catch (e) {
if (e.message.indexOf('Error code 2148734208 for command') !== -1) {
if (e.message.includes('Error code 2148734208 for command')) {
await deployTool.installAppPackage(appxFile, device, shouldLaunch, true, verbose);

@@ -267,9 +267,9 @@ }

}
await commandWithProgress_1.runPowerShellScriptFunction('Enabling Developer Mode', windowsStoreAppUtils, 'EnableDevMode', verbose, 'EnableDevModeFailure');
await (0, commandWithProgress_1.runPowerShellScriptFunction)('Enabling Developer Mode', windowsStoreAppUtils, 'EnableDevMode', verbose, 'EnableDevModeFailure');
const appPackageFolder = getAppPackage(options, projectName);
if (shouldDeployByPackage(options, config)) {
// Deploy by package
await commandWithProgress_1.runPowerShellScriptFunction('Removing old version of the app', windowsStoreAppUtils, `Uninstall-App ${appName}`, verbose, 'RemoveOldAppVersionFailure');
await (0, commandWithProgress_1.runPowerShellScriptFunction)('Removing old version of the app', windowsStoreAppUtils, `Uninstall-App ${appName}`, verbose, 'RemoveOldAppVersionFailure');
const script = glob_1.default.sync(path_1.default.join(appPackageFolder, 'Add-AppDevPackage.ps1'))[0];
await commandWithProgress_1.runPowerShellScriptFunction('Installing new version of the app', windowsStoreAppUtils, `Install-App "${script}" -Force`, verbose, 'InstallAppFailure');
await (0, commandWithProgress_1.runPowerShellScriptFunction)('Installing new version of the app', windowsStoreAppUtils, `Install-App "${script}" -Force`, verbose, 'InstallAppFailure');
}

@@ -284,7 +284,7 @@ else {

fs_1.default.existsSync(deployAppxRecipeExePath)) {
await commandWithProgress_1.commandWithProgress(commandWithProgress_1.newSpinner('Deploying'), `Deploying ${appxRecipe}`, deployAppxRecipeExePath, [appxRecipe], verbose, 'DeployRecipeFailure');
await (0, commandWithProgress_1.commandWithProgress)((0, commandWithProgress_1.newSpinner)('Deploying'), `Deploying ${appxRecipe}`, deployAppxRecipeExePath, [appxRecipe], verbose, 'DeployRecipeFailure');
}
else {
// Install the app package's dependencies before attempting to deploy.
await commandWithProgress_1.runPowerShellScriptFunction('Installing dependent framework packages', windowsStoreAppUtils, `Install-AppDependencies ${appxManifestPath} ${appPackageFolder} ${options.arch}`, verbose, 'InstallAppDependenciesFailure');
await (0, commandWithProgress_1.runPowerShellScriptFunction)('Installing dependent framework packages', windowsStoreAppUtils, `Install-AppDependencies ${appxManifestPath} ${appPackageFolder} ${options.arch}`, verbose, 'InstallAppDependenciesFailure');
await build.buildSolution(buildTools, slnFile,

@@ -294,3 +294,3 @@ /* options.release ? 'Release' : */ 'Debug', options.arch, { DeployLayout: 'true' }, verbose, 'deploy', options.buildLogDirectory);

}
const appFamilyName = child_process_1.execSync(`${commandWithProgress_1.powershell} -NoProfile -c $(Get-AppxPackage -Name ${appName}).PackageFamilyName`)
const appFamilyName = (0, child_process_1.execSync)(`${commandWithProgress_1.powershell} -NoProfile -c $(Get-AppxPackage -Name ${appName}).PackageFamilyName`)
.toString()

@@ -302,9 +302,9 @@ .trim();

const loopbackText = 'Verifying loopbackExempt';
const loopbackSpinner = commandWithProgress_1.newSpinner(loopbackText);
await commandWithProgress_1.commandWithProgress(loopbackSpinner, loopbackText, 'CheckNetIsolation', `LoopbackExempt -a -n=${appFamilyName}`.split(' '), verbose, 'CheckNetIsolationFailure');
const loopbackSpinner = (0, commandWithProgress_1.newSpinner)(loopbackText);
await (0, commandWithProgress_1.commandWithProgress)(loopbackSpinner, loopbackText, 'CheckNetIsolation', `LoopbackExempt -a -n=${appFamilyName}`.split(' '), verbose, 'CheckNetIsolationFailure');
if (shouldLaunchApp(options)) {
await commandWithProgress_1.runPowerShellScriptFunction('Starting the app', windowsStoreAppUtils, `Start-Locally ${appName} ${args}`, verbose, 'AppStartupFailure');
await (0, commandWithProgress_1.runPowerShellScriptFunction)('Starting the app', windowsStoreAppUtils, `Start-Locally ${appName} ${args}`, verbose, 'AppStartupFailure');
}
else {
commandWithProgress_1.newInfo('Skip the step to start the app');
(0, commandWithProgress_1.newInfo)('Skip the step to start the app');
}

@@ -318,6 +318,6 @@ }

if (res.statusCode === 200) {
commandWithProgress_1.newSuccess('React-Native Server already started');
(0, commandWithProgress_1.newSuccess)('React-Native Server already started');
}
else {
commandWithProgress_1.newError('React-Native Server not responding');
(0, commandWithProgress_1.newError)('React-Native Server not responding');
}

@@ -334,3 +334,3 @@ resolve();

function launchServer(options, verbose) {
commandWithProgress_1.newSuccess('Starting the React-Native Server');
(0, commandWithProgress_1.newSuccess)('Starting the React-Native Server');
const opts = {

@@ -341,4 +341,4 @@ cwd: options.root,

};
child_process_1.spawn('cmd.exe', ['/C', 'start npx --no-install react-native start'], opts);
(0, child_process_1.spawn)('cmd.exe', ['/C', 'start npx --no-install react-native start'], opts);
}
//# sourceMappingURL=deploy.js.map

@@ -22,3 +22,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -70,5 +70,5 @@ return result;

async buildProject(slnFile, buildType, buildArch, msBuildProps, verbose, target, buildLogDirectory, singleproc) {
commandWithProgress_1.newSuccess(`Found Solution: ${slnFile}`);
commandWithProgress_1.newInfo(`Build configuration: ${buildType}`);
commandWithProgress_1.newInfo(`Build platform: ${buildArch}`);
(0, commandWithProgress_1.newSuccess)(`Found Solution: ${slnFile}`);
(0, commandWithProgress_1.newInfo)(`Build configuration: ${buildType}`);
(0, commandWithProgress_1.newInfo)(`Build platform: ${buildArch}`);
const verbosityOption = verbose ? 'normal' : 'minimal';

@@ -93,3 +93,3 @@ const logPrefix = path_1.default.join(buildLogDirectory || os_2.default.tmpdir(), `msbuild_${process.pid}_${target}`);

// parallel builds on machines with >16GB of memory to avoid OOM errors
const highMemory = os_1.totalmem() > 16 * 1024 * 1024 * 1024;
const highMemory = (0, os_1.totalmem)() > 16 * 1024 * 1024 * 1024;
const enableParallelBuilds = singleproc === false || highMemory;

@@ -112,3 +112,3 @@ if (enableParallelBuilds) {

catch (e) {
commandWithProgress_1.newError(e.message);
(0, commandWithProgress_1.newError)(e.message);
throw e;

@@ -120,5 +120,5 @@ }

const progressName = target === 'deploy' ? 'Deploying Solution' : 'Building Solution';
const spinner = commandWithProgress_1.newSpinner(progressName);
const spinner = (0, commandWithProgress_1.newSpinner)(progressName);
try {
await commandWithProgress_1.commandWithProgress(spinner, progressName, path_1.default.join(this.msbuildPath(), 'msbuild.exe'), [slnFile].concat(args), verbose, 'MSBuildError');
await (0, commandWithProgress_1.commandWithProgress)(spinner, progressName, path_1.default.join(this.msbuildPath(), 'msbuild.exe'), [slnFile].concat(args), verbose, 'MSBuildError');
}

@@ -148,3 +148,3 @@ catch (e) {

const minVersion = process.env.VisualStudioVersion || '16.7';
const vsInstallation = vsInstalls_1.findLatestVsInstall({
const vsInstallation = (0, vsInstalls_1.findLatestVsInstall)({
requires,

@@ -165,3 +165,3 @@ minVersion,

if (fs_1.default.existsSync(toolsPath)) {
commandWithProgress_1.newSuccess(`Found compatible MSBuild at ${toolsPath} (${vsInstallation.installationVersion})`);
(0, commandWithProgress_1.newSuccess)(`Found compatible MSBuild at ${toolsPath} (${vsInstallation.installationVersion})`);
return new MSBuildTools(minVersion, vsInstallation.installationPath, vsInstallation.installationVersion);

@@ -215,3 +215,3 @@ }

try {
output = child_process_2.execSync(execString).toString();
output = (0, child_process_2.execSync)(execString).toString();
}

@@ -218,0 +218,0 @@ catch (e) {

@@ -32,3 +32,3 @@ "use strict";

const cmdline = `"${vsWherePath}" ${args.join(' ')} -format json -utf8`;
const json = JSON.parse(child_process_1.execSync(cmdline).toString('utf8'));
const json = JSON.parse((0, child_process_1.execSync)(cmdline).toString('utf8'));
for (const entry of json) {

@@ -35,0 +35,0 @@ entry.prerelease = entry.catalog.productMilestoneIsPreRelease;

@@ -69,3 +69,3 @@ "use strict";

const LINE_TEST = /^([\d\.]+?)\s+([\da-fA-F\-]+?)\s+(.+)$/m; // eslint-disable-line no-useless-escape
const result = child_process_1.execSync(`"${this.path}" devices`).toString();
const result = (0, child_process_1.execSync)(`"${this.path}" devices`).toString();
const lines = result.split('\r\n');

@@ -90,3 +90,3 @@ const matchedLines = lines.filter(line => LINE_TEST.test(line));

if (shouldLaunch) {
commandWithProgress_1.newWarn('Cannot launch app with current version of Windows 10 SDK tools. You will have to launch the app after installation is completed.');
(0, commandWithProgress_1.newWarn)('Cannot launch app with current version of Windows 10 SDK tools. You will have to launch the app after installation is completed.');
}

@@ -103,7 +103,7 @@ const args = [

}
await commandWithProgress_1.commandWithProgress(commandWithProgress_1.newSpinner(text), text, this.path, args, verbose, 'InstallAppToDeviceFailure');
await (0, commandWithProgress_1.commandWithProgress)((0, commandWithProgress_1.newSpinner)(text), text, this.path, args, verbose, 'InstallAppToDeviceFailure');
}
async uninstallAppPackage(appName, targetDevice, verbose) {
const text = `Uninstalling app from ${targetDevice.name}`;
await commandWithProgress_1.commandWithProgress(commandWithProgress_1.newSpinner(text), text, this.path, `uninstall -package ${appName} -ip {$targetDevice.ip}`.split(' '), verbose, 'UninstallAppOnDeviceFailure');
await (0, commandWithProgress_1.commandWithProgress)((0, commandWithProgress_1.newSpinner)(text), text, this.path, `uninstall -package ${appName} -ip {$targetDevice.ip}`.split(' '), verbose, 'UninstallAppOnDeviceFailure');
}

@@ -110,0 +110,0 @@ }

{
"name": "@react-native-windows/cli",
"version": "0.0.0-canary.94",
"version": "0.0.0-canary.95",
"license": "MIT",

@@ -20,4 +20,4 @@ "main": "lib-commonjs/index.js",

"dependencies": {
"@react-native-windows/package-utils": "^0.0.0-canary.21",
"@react-native-windows/telemetry": "^0.0.0-canary.23",
"@react-native-windows/package-utils": "^0.0.0-canary.22",
"@react-native-windows/telemetry": "^0.0.0-canary.24",
"@xmldom/xmldom": "^0.7.5",

@@ -64,3 +64,3 @@ "chalk": "^4.1.0",

"prettier": "1.19.1",
"typescript": "^3.8.3"
"typescript": "^4.4.4"
},

@@ -67,0 +67,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc