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.104 to 0.0.0-canary.105

2

lib-commonjs/config/dependencyConfig.js

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

let errorFound = false;
alwaysRequired.forEach(item => {
alwaysRequired.forEach((item) => {
if (!(item in project)) {

@@ -135,0 +135,0 @@ project[item] = `Error: ${item} is required for each project in react-native.config`;

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

.readdirSync(current)
.map(child => walk(path_1.default.join(current, child)));
.map((child) => walk(path_1.default.join(current, child)));
const result = [];

@@ -55,3 +55,3 @@ return result.concat.apply([current], files);

content = mustache_1.default.render(content, replacements);
(replacements.regExpPatternsToRemove || []).forEach(regexPattern => {
(replacements.regExpPatternsToRemove || []).forEach((regexPattern) => {
content = content.replace(new RegExp(regexPattern, 'g'), '');

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

else {
Object.keys(replacements).forEach(regex => {
Object.keys(replacements).forEach((regex) => {
content = content.replace(new RegExp(regex, 'g'), replacements[regex]);

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

if (shouldOverwrite === 'overwrite') {
copyBinaryFile(srcPath, destPath, err => {
copyBinaryFile(srcPath, destPath, (err) => {
if (err) {

@@ -164,3 +164,3 @@ throw err;

const readStream = fs_1.default.createReadStream(srcPath);
readStream.on('error', err => {
readStream.on('error', (err) => {
done(err);

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

});
writeStream.on('error', err => {
writeStream.on('error', (err) => {
done(err);

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

@@ -56,6 +56,3 @@ "use strict";

if (projectType === 'lib') {
namespace = namespace
.split(/[.:]+/)
.map(pascalCase)
.join('.');
namespace = namespace.split(/[.:]+/).map(pascalCase).join('.');
}

@@ -62,0 +59,0 @@ (0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir));

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

const sdks = msbuildtools_1.default.getAllAvailableUAPVersions();
sdks.forEach(version => console.log(' ' + version));
sdks.forEach((version) => console.log(' ' + version));
}

@@ -125,0 +125,0 @@ catch (ex) {

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

description: 'Override the root directory for the windows build which contains the windows folder.',
default: config => config.root,
default: (config) => config.root,
},

@@ -24,0 +24,0 @@ {

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

];
alwaysRequired.forEach(item => {
alwaysRequired.forEach((item) => {
if (!(item in this.windowsAppConfig) ||

@@ -179,3 +179,3 @@ this.windowsAppConfig[item] === null) {

];
projectRequired.forEach(item => {
projectRequired.forEach((item) => {
if (!(item in windowsAppProjectConfig) ||

@@ -209,10 +209,10 @@ windowsAppProjectConfig[item] === null) {

for (const dependencyName of Object.keys(windowsDependencies)) {
windowsDependencies[dependencyName].projects.forEach(project => {
windowsDependencies[dependencyName].projects.forEach((project) => {
if (project.directDependency) {
cppIncludes += `\n\n// Includes from ${dependencyName}`;
project.cppHeaders.forEach(header => {
project.cppHeaders.forEach((header) => {
cppIncludes += `\n#include <${header}>`;
});
cppPackageProviders += `\n // IReactPackageProviders from ${dependencyName}`;
project.cppPackageProviders.forEach(packageProvider => {
project.cppPackageProviders.forEach((packageProvider) => {
cppPackageProviders += `\n packageProviders.Append(winrt::${packageProvider}());`;

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

generateCSAutolinking(templateRoot, projectLang, projectDir) {
const { csUsingNamespaces, csReactPackageProviders, } = this.getCsReplacements();
const { csUsingNamespaces, csReactPackageProviders } = this.getCsReplacements();
const csFileName = 'AutolinkedNativeModules.g.cs';

@@ -249,10 +249,10 @@ const srcCsFile = path_1.default.join(templateRoot, `${projectLang}-app`, 'src', csFileName);

for (const dependencyName of Object.keys(windowsDependencies)) {
windowsDependencies[dependencyName].projects.forEach(project => {
windowsDependencies[dependencyName].projects.forEach((project) => {
if (project.directDependency) {
csUsingNamespaces += `\n\n// Namespaces from ${dependencyName}`;
project.csNamespaces.forEach(namespace => {
project.csNamespaces.forEach((namespace) => {
csUsingNamespaces += `\nusing ${namespace};`;
});
csReactPackageProviders += `\n // IReactPackageProviders from ${dependencyName}`;
project.csPackageProviders.forEach(packageProvider => {
project.csPackageProviders.forEach((packageProvider) => {
csReactPackageProviders += `\n packageProviders.Add(new ${packageProvider}());`;

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

for (const dependencyName of Object.keys(this.dependenciesConfig)) {
const windowsDependency = this
.dependenciesConfig[dependencyName].platforms.windows;
const windowsDependency = this.dependenciesConfig[dependencyName].platforms.windows;
if (windowsDependency) {

@@ -286,3 +285,3 @@ verboseMessage(`${chalk_1.default.bold(dependencyName)} has Windows implementation, config:`, this.options.logging);

}
windowsDependency.projects.forEach(project => {
windowsDependency.projects.forEach((project) => {
const itemsToCheck = [

@@ -292,3 +291,3 @@ 'projectFile',

];
itemsToCheck.forEach(item => {
itemsToCheck.forEach((item) => {
dependencyIsValid = !!(dependencyIsValid &&

@@ -345,3 +344,3 @@ item in project &&

for (const dependencyName of Object.keys(windowsDependencies)) {
windowsDependencies[dependencyName].projects.forEach(project => {
windowsDependencies[dependencyName].projects.forEach((project) => {
if (project.directDependency) {

@@ -383,3 +382,3 @@ const dependencyProjectFile = path_1.default.join(windowsDependencies[dependencyName].folder, windowsDependencies[dependencyName].sourceDir, project.projectFile);

for (const dependencyName of Object.keys(windowsDependencies)) {
windowsDependencies[dependencyName].projects.forEach(project => {
windowsDependencies[dependencyName].projects.forEach((project) => {
if (project.directDependency && project.projectLang === 'cs') {

@@ -397,3 +396,3 @@ csModuleNames.push(project.projectName);

// Process dependency projects
windowsDependencies[dependencyName].projects.forEach(project => {
windowsDependencies[dependencyName].projects.forEach((project) => {
const dependencyProjectFile = path_1.default.join(windowsDependencies[dependencyName].folder, windowsDependencies[dependencyName].sourceDir, project.projectFile);

@@ -427,3 +426,3 @@ projectsForSolution.push({

let changesNecessary = false;
projectsForSolution.forEach(project => {
projectsForSolution.forEach((project) => {
const contentsChanged = vstools.addProjectToSolution(solutionFile, project, this.options.logging, this.options.check);

@@ -522,4 +521,4 @@ changesNecessary = changesNecessary || contentsChanged;

const id = idAttr.value;
const keepPkg = keepPkgs.find(pkg => pkg.id === id);
if (removePkgs.find(pkg => pkg.id === id)) {
const keepPkg = keepPkgs.find((pkg) => pkg.id === id);
if (removePkgs.find((pkg) => pkg.id === id)) {
nodesToRemove.push(packageElement);

@@ -532,7 +531,7 @@ changed = true;

packageElement.setAttribute('version', keepPkg.version);
keepPkgs = keepPkgs.filter(pkg => pkg.id !== keepPkg.id);
keepPkgs = keepPkgs.filter((pkg) => pkg.id !== keepPkg.id);
}
}
nodesToRemove.forEach(pkg => packagesConfig.content.documentElement.removeChild(pkg));
keepPkgs.forEach(keepPkg => {
nodesToRemove.forEach((pkg) => packagesConfig.content.documentElement.removeChild(pkg));
keepPkgs.forEach((keepPkg) => {
const newPkg = packagesConfig.content.createElement('package');

@@ -539,0 +538,0 @@ Object.entries(keepPkg).forEach(([attr, value]) => {

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

const allVersions = msbuildtools_1.default.getAllAvailableUAPVersions();
if (!allVersions.some(v => v.gte(minVersion))) {
if (!allVersions.some((v) => v.gte(minVersion))) {
throw new telemetry_1.CodedError('MinSDKVersionNotMet', 'Must have a minimum Windows SDK version 10.0.19041.0 installed');

@@ -23,0 +23,0 @@ }

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

const requiredVersion = getMinimalRequiredVersionFor('windowssdk', windowsTargetVersion);
const hasSdkInstalled = installedSdks.some(installedSdk => installedSdk.eq(requiredVersion));
const hasSdkInstalled = installedSdks.some((installedSdk) => installedSdk.eq(requiredVersion));
if (hasSdkInstalled) {

@@ -62,0 +62,0 @@ return shortenVersion(requiredVersion);

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

if (!verbose) {
cp.stdout.on('data', chunk => {
cp.stdout.on('data', (chunk) => {
const text = chunk.toString();
setSpinnerText(spinner, taskDoingName + ': ', text);
});
cp.stderr.on('data', chunk => {
cp.stderr.on('data', (chunk) => {
const text = chunk.toString();

@@ -90,3 +90,3 @@ if (!firstErrorLine) {

}
cp.on('error', e => {
cp.on('error', (e) => {
if (verbose) {

@@ -99,3 +99,3 @@ console.error(chalk_1.default.red(e.toString()));

reject(ce);
}).on('close', code => {
}).on('close', (code) => {
if (code === 0) {

@@ -102,0 +102,0 @@ spinner.succeed(taskDoingName);

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

else if (appPackageCandidates.length > 1) {
const filteredAppPackageCandidates = appPackageCandidates.filter(x => x.includes(projectName));
const filteredAppPackageCandidates = appPackageCandidates.filter((x) => x.includes(projectName));
if (filteredAppPackageCandidates.length >= 1) {

@@ -130,3 +130,3 @@ appPackage = filteredAppPackageCandidates[0];

if (result.length > 1 && projectName) {
const newFilteredGlobs = result.filter(x => x.includes(projectName));
const newFilteredGlobs = result.filter((x) => x.includes(projectName));
if (newFilteredGlobs.length >= 1) {

@@ -172,3 +172,3 @@ (0, commandWithProgress_1.newWarn)(`More than one app package found: ${result}`);

else {
const filteredGlobs = globs.filter(x => x.includes(projectName));
const filteredGlobs = globs.filter((x) => x.includes(projectName));
appxPath = filteredGlobs[0];

@@ -214,3 +214,3 @@ if (filteredGlobs.length > 1) {

const shouldLaunch = shouldLaunchApp(options);
const identity = appxManifest.root.children.filter(x => {
const identity = appxManifest.root.children.filter((x) => {
return x.name === 'mp:PhoneIdentity';

@@ -251,3 +251,3 @@ })[0];

const appxManifest = parseAppxManifest(appxManifestPath);
const identity = appxManifest.root.children.filter(x => {
const identity = appxManifest.root.children.filter((x) => {
return x.name === 'Identity';

@@ -307,5 +307,5 @@ })[0];

function startServerInNewWindow(options, verbose) {
return new Promise(resolve => {
return new Promise((resolve) => {
http_1.default
.get('http://localhost:8081/status', res => {
.get('http://localhost:8081/status', (res) => {
if (res.statusCode === 200) {

@@ -312,0 +312,0 @@ (0, commandWithProgress_1.newSuccess)('React-Native Server already started');

@@ -62,7 +62,4 @@ "use strict";

const cmd = `"${path_1.default.join(this.msbuildPath(), 'msbuild.exe')}" "${slnFile}" /t:Clean`;
const results = child_process_1.default
.execSync(cmd)
.toString()
.split(os_1.EOL);
results.forEach(result => console.log(chalk_1.default.white(result)));
const results = child_process_1.default.execSync(cmd).toString().split(os_1.EOL);
results.forEach((result) => console.log(chalk_1.default.white(result)));
}

@@ -103,3 +100,3 @@ async buildProject(slnFile, buildType, buildArch, msBuildProps, verbose, target, buildLogDirectory, singleproc) {

}
Object.keys(msBuildProps).forEach(key => {
Object.keys(msBuildProps).forEach((key) => {
args.push(`/p:${key}=${msBuildProps[key]}`);

@@ -189,5 +186,5 @@ });

.ls(uapFolderPath)
.filter(uapDir => shelljs_1.default.test('-d', path_1.default.join(uapFolderPath, uapDir)))
.filter((uapDir) => shelljs_1.default.test('-d', path_1.default.join(uapFolderPath, uapDir)))
.map(version_1.default.tryParse)
.forEach(version => version && results.push(version));
.forEach((version) => version && results.push(version));
return results;

@@ -194,0 +191,0 @@ }

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

if (VERSION_EXPRESSION.test(str)) {
const versionArray = str.split('.').map(x => parseInt(x, 10));
const versionArray = str.split('.').map((x) => parseInt(x, 10));
return new Version(versionArray[0], versionArray[1], versionArray[2], versionArray[3]);

@@ -106,0 +106,0 @@ }

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

if (opts.prerelease && installs.length > 0) {
installs = installs.filter(x => x.prerelease === 'True');
installs = installs.filter((x) => x.prerelease === 'True');
}

@@ -67,0 +67,0 @@ if (installs.length > 0) {

@@ -115,5 +115,5 @@ "use strict";

// Check for the project configuration platforms
const slnConfigs = getBlockContentsFromLines(slnLines, '\tGlobalSection(SolutionConfigurationPlatforms) = preSolution', '\tEndGlobalSection', false).map(line => line.match(/\s+([\w\s|]+)\s=/)[1]);
const slnConfigs = getBlockContentsFromLines(slnLines, '\tGlobalSection(SolutionConfigurationPlatforms) = preSolution', '\tEndGlobalSection', false).map((line) => line.match(/\s+([\w\s|]+)\s=/)[1]);
const projectConfigLines = [];
slnConfigs.forEach(slnConfig => {
slnConfigs.forEach((slnConfig) => {
if (!slnConfig.endsWith('|Any CPU')) {

@@ -129,3 +129,3 @@ projectConfigLines.push(`\t\t${projectGuid}.${slnConfig}.ActiveCfg = ${project.projectLang === 'cpp'

const projectConfigStartIndex = slnLines.indexOf('\tGlobalSection(ProjectConfigurationPlatforms) = postSolution');
projectConfigLines.forEach(projectConfigLine => {
projectConfigLines.forEach((projectConfigLine) => {
if (!slnLines.includes(projectConfigLine)) {

@@ -132,0 +132,0 @@ if (verbose) {

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

}
const candidateList = devices.filter(device => device.guid === target);
const candidateList = devices.filter((device) => device.guid === target);
if (candidateList.length > 0) {

@@ -72,3 +72,3 @@ return candidateList[0];

const lines = result.split('\r\n');
const matchedLines = lines.filter(line => LINE_TEST.test(line));
const matchedLines = lines.filter((line) => LINE_TEST.test(line));
const devices = matchedLines.map((line, arrayIndex) => {

@@ -75,0 +75,0 @@ const match = line.match(LINE_TEST);

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

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

"dependencies": {
"@react-native-windows/fs": "^1.0.0",
"@react-native-windows/package-utils": "^0.0.0-canary.23",
"@react-native-windows/telemetry": "^0.0.0-canary.29",
"@react-native-windows/fs": "^1.0.1",
"@react-native-windows/package-utils": "^0.0.0-canary.24",
"@react-native-windows/telemetry": "^0.0.0-canary.30",
"@xmldom/xmldom": "^0.7.5",

@@ -44,5 +44,5 @@ "chalk": "^4.1.0",

"@react-native-community/cli-types": "^5.0.1-alpha.0",
"@rnw-scripts/eslint-config": "1.1.9",
"@rnw-scripts/jest-unittest-config": "1.2.4",
"@rnw-scripts/just-task": "2.2.1",
"@rnw-scripts/eslint-config": "1.1.10",
"@rnw-scripts/jest-unittest-config": "1.2.5",
"@rnw-scripts/just-task": "2.2.2",
"@rnw-scripts/ts-config": "2.0.1",

@@ -62,6 +62,6 @@ "@types/chalk": "^2.2.0",

"babel-jest": "^26.3.0",
"eslint": "7.12.0",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"just-scripts": "^1.3.3",
"prettier": "1.19.1",
"prettier": "^2.4.1",
"typescript": "^4.4.4"

@@ -68,0 +68,0 @@ },

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