@react-native-windows/cli 0.66.0-preview.1 → 0.67.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +283 -5
- package/CHANGELOG.md +122 -4
- package/lib-commonjs/config/configUtils.js +1 -1
- package/lib-commonjs/config/configUtils.js.map +1 -1
- package/lib-commonjs/config/dependencyConfig.js +2 -2
- package/lib-commonjs/config/dependencyConfig.js.map +1 -1
- package/lib-commonjs/config/projectConfig.js +2 -2
- package/lib-commonjs/config/projectConfig.js.map +1 -1
- package/lib-commonjs/e2etest/autolink.test.d.ts +5 -0
- package/lib-commonjs/e2etest/autolink.test.js +94 -13
- package/lib-commonjs/e2etest/autolink.test.js.map +1 -1
- package/lib-commonjs/e2etest/dependencyConfig.test.js +15 -15
- package/lib-commonjs/e2etest/dependencyConfig.test.js.map +1 -1
- package/lib-commonjs/e2etest/projectConfig.test.js +16 -16
- package/lib-commonjs/e2etest/projectConfig.test.js.map +1 -1
- package/lib-commonjs/e2etest/projectConfig.utils.js +4 -4
- package/lib-commonjs/e2etest/projectConfig.utils.js.map +1 -1
- package/lib-commonjs/e2etest/runWindows.test.js +21 -3
- package/lib-commonjs/e2etest/runWindows.test.js.map +1 -1
- package/lib-commonjs/generator-common/index.js +1 -1
- package/lib-commonjs/generator-common/index.js.map +1 -1
- package/lib-commonjs/generator-windows/index.js +23 -51
- package/lib-commonjs/generator-windows/index.js.map +1 -1
- package/lib-commonjs/healthChecks.js +22 -4
- package/lib-commonjs/healthChecks.js.map +1 -1
- package/lib-commonjs/index.js +3 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/runWindows/runWindows.js +29 -26
- package/lib-commonjs/runWindows/runWindows.js.map +1 -1
- package/lib-commonjs/runWindows/runWindowsOptions.d.ts +8 -8
- package/lib-commonjs/runWindows/runWindowsOptions.js +1 -10
- package/lib-commonjs/runWindows/runWindowsOptions.js.map +1 -1
- package/lib-commonjs/runWindows/utils/autolink.d.ts +8 -5
- package/lib-commonjs/runWindows/utils/autolink.js +39 -31
- package/lib-commonjs/runWindows/utils/autolink.js.map +1 -1
- package/lib-commonjs/runWindows/utils/build.js +3 -3
- package/lib-commonjs/runWindows/utils/build.js.map +1 -1
- package/lib-commonjs/runWindows/utils/checkRequirements.js +1 -1
- package/lib-commonjs/runWindows/utils/checkRequirements.js.map +1 -1
- package/lib-commonjs/runWindows/utils/commandWithProgress.d.ts +2 -1
- package/lib-commonjs/runWindows/utils/commandWithProgress.js +5 -4
- package/lib-commonjs/runWindows/utils/commandWithProgress.js.map +1 -1
- package/lib-commonjs/runWindows/utils/deploy.d.ts +1 -1
- package/lib-commonjs/runWindows/utils/deploy.js +80 -29
- package/lib-commonjs/runWindows/utils/deploy.js.map +1 -1
- package/lib-commonjs/runWindows/utils/msbuildtools.js +11 -11
- package/lib-commonjs/runWindows/utils/msbuildtools.js.map +1 -1
- package/lib-commonjs/runWindows/utils/vsInstalls.js +1 -1
- package/lib-commonjs/runWindows/utils/vsInstalls.js.map +1 -1
- package/lib-commonjs/runWindows/utils/vstools.js +4 -5
- package/lib-commonjs/runWindows/utils/vstools.js.map +1 -1
- package/lib-commonjs/runWindows/utils/winappdeploytool.js +4 -4
- package/lib-commonjs/runWindows/utils/winappdeploytool.js.map +1 -1
- package/package.json +13 -10
|
@@ -29,7 +29,7 @@ function vsWhere(args, verbose) {
|
|
|
29
29
|
throw new telemetry_1.CodedError('NoVSWhere', `Unable to find vswhere at ${vsWherePath}`);
|
|
30
30
|
}
|
|
31
31
|
const cmdline = `"${vsWherePath}" ${args.join(' ')} -format json -utf8`;
|
|
32
|
-
const json = JSON.parse(child_process_1.execSync(cmdline).toString('utf8'));
|
|
32
|
+
const json = JSON.parse((0, child_process_1.execSync)(cmdline).toString('utf8'));
|
|
33
33
|
for (const entry of json) {
|
|
34
34
|
entry.prerelease = entry.catalog.productMilestoneIsPreRelease;
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vsInstalls.js","sourceRoot":"","sources":["../../../src/runWindows/utils/vsInstalls.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,+DAA2D;AAC3D,iDAAuC;AACvC,4CAAoB;AACpB,gDAAwB;AAYxB;;;;;GAKG;AACH,SAAS,OAAO,CAAC,IAAc,EAAE,OAAiB;IAChD,gEAAgE;IAChE,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAC3B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAa,EAC7D,gDAAgD,CACjD,CAAC;IAEF,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,0BAA0B,GAAG,WAAW,CAAC,CAAC;KACvD;IAED,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;QAC/B,MAAM,IAAI,sBAAU,CAClB,WAAW,EACX,6BAA6B,WAAW,EAAE,CAC3C,CAAC;KACH;IAED,MAAM,OAAO,GAAG,IAAI,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC;IACxE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAQ,
|
|
1
|
+
{"version":3,"file":"vsInstalls.js","sourceRoot":"","sources":["../../../src/runWindows/utils/vsInstalls.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,+DAA2D;AAC3D,iDAAuC;AACvC,4CAAoB;AACpB,gDAAwB;AAYxB;;;;;GAKG;AACH,SAAS,OAAO,CAAC,IAAc,EAAE,OAAiB;IAChD,gEAAgE;IAChE,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAC3B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAa,EAC7D,gDAAgD,CACjD,CAAC;IAEF,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,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AAgB,mBAAmB,CAAC,IAKnC;IACC,IAAI,QAAQ,GAAG,mBAAmB,CAAC,EAAC,GAAG,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;IAE5D,IAAI,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1C,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC;KAC1D;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;KACpB;SAAM;QACL,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAjBD,kDAiBC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n\nimport {CodedError} from '@react-native-windows/telemetry';\nimport {execSync} from 'child_process';\nimport fs from 'fs';\nimport path from 'path';\n\n/**\n * A subset of the per-instance properties returned by vswhere\n */\ninterface VisualStudioInstallation {\n instanceId: string;\n installationPath: string;\n installationVersion: string;\n prerelease: string;\n}\n\n/**\n * Helper to run vswhere in JSON mode\n *\n * @param args Arguments to pass to vsWhere\n * @param verbose enable verbose logging\n */\nfunction vsWhere(args: string[], verbose?: boolean): any[] {\n // This path is maintained and VS has promised to keep it valid.\n const vsWherePath = path.join(\n process.env['ProgramFiles(x86)'] || process.env.ProgramFiles!,\n '/Microsoft Visual Studio/Installer/vswhere.exe',\n );\n\n if (verbose) {\n console.log('Looking for vswhere at: ' + vsWherePath);\n }\n\n if (!fs.existsSync(vsWherePath)) {\n throw new CodedError(\n 'NoVSWhere',\n `Unable to find vswhere at ${vsWherePath}`,\n );\n }\n\n const cmdline = `\"${vsWherePath}\" ${args.join(' ')} -format json -utf8`;\n const json = JSON.parse(execSync(cmdline).toString('utf8'));\n\n for (const entry of json) {\n entry.prerelease = entry.catalog.productMilestoneIsPreRelease;\n }\n\n return json;\n}\n\n/**\n * Enumerate the installed versions of Visual Studio\n */\nexport function enumerateVsInstalls(opts: {\n requires?: string[];\n version?: string;\n verbose?: boolean;\n latest?: boolean;\n prerelease?: boolean;\n}): VisualStudioInstallation[] {\n const args: string[] = [];\n\n if (opts.version) {\n args.push(`-version [${opts.version},${Number(opts.version) + 1})`);\n }\n\n if (opts.requires) {\n args.push(`-requires ${opts.requires.join(' ')}`);\n }\n\n if (opts.latest) {\n args.push('-latest');\n }\n\n if (opts.prerelease) {\n args.push('-prerelease');\n }\n\n return vsWhere(args, opts.verbose);\n}\n\n/**\n * Find the latest available VS installation that matches the given constraints\n */\nexport function findLatestVsInstall(opts: {\n requires?: string[];\n minVersion?: string;\n verbose?: boolean;\n prerelease?: boolean;\n}): VisualStudioInstallation | null {\n let installs = enumerateVsInstalls({...opts, latest: true});\n\n if (opts.prerelease && installs.length > 0) {\n installs = installs.filter(x => x.prerelease === 'True');\n }\n\n if (installs.length > 0) {\n return installs[0];\n } else {\n return null;\n }\n}\n"]}
|
|
@@ -88,10 +88,9 @@ function addProjectToSolution(slnFile, project, verbose = false, checkMode = fal
|
|
|
88
88
|
if (verbose) {
|
|
89
89
|
console.log(`Processing ${chalk_1.default.bold(path_1.default.basename(project.projectFile))}...`);
|
|
90
90
|
}
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.split('\r\n');
|
|
91
|
+
const originalSlnContents = fs_1.default.readFileSync(slnFile).toString();
|
|
92
|
+
const isCRLF = originalSlnContents.includes('\r\n');
|
|
93
|
+
const slnLines = originalSlnContents.split(isCRLF ? '\r\n' : '\n');
|
|
95
94
|
let contentsChanged = false;
|
|
96
95
|
// Check for the project entry block
|
|
97
96
|
const slnDir = path_1.default.dirname(slnFile);
|
|
@@ -146,7 +145,7 @@ function addProjectToSolution(slnFile, project, verbose = false, checkMode = fal
|
|
|
146
145
|
if (verbose) {
|
|
147
146
|
console.log(`Writing changes to ${chalk_1.default.bold(path_1.default.basename(slnFile))}...`);
|
|
148
147
|
}
|
|
149
|
-
const slnContents = slnLines.join('\r\n');
|
|
148
|
+
const slnContents = slnLines.join(isCRLF ? '\r\n' : '\n');
|
|
150
149
|
fs_1.default.writeFileSync(slnFile, slnContents, {
|
|
151
150
|
encoding: 'utf8',
|
|
152
151
|
flag: 'w',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vstools.js","sourceRoot":"","sources":["../../../src/runWindows/utils/vstools.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AACxB,kDAA0B;AAE1B,+DAA2D;AAE3D,MAAM,0BAA0B,GAAG;IACjC,GAAG,EAAE,wCAAwC;IAC7C,EAAE,EAAE,wCAAwC;CAC7C,CAAC;AAEW,QAAA,yBAAyB,GACpC,wCAAwC,CAAC;AAE3C;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,KAAe,EAAE,KAAe;IAC1D,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAE3C,IAAI,UAAU,IAAI,CAAC,EAAE;YACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACrC,IAAI,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;oBACtC,OAAO,KAAK,CAAC;iBACd;aACF;YACD,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,oBAAoB,CAAC,KAAe,EAAE,KAAe,EAAE,KAAa;IAC3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,KAAK,CAAC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QACnB,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,GAAG,CACT,eAAK,CAAC,MAAM,CACV,GAAG,eAAK,CAAC,IAAI,CAAC,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,uBAAuB,CAC7D,CACF,CAAC;SACH;QAED,IAAI,CAAC,SAAS,EAAE;YACd,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,GAAG,CACT,sBAAsB,eAAK,CAAC,IAAI,CAAC,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,CAC9D,CAAC;aACH;YAED,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC1C,YAAE,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE;gBACrC,QAAQ,EAAE,MAAM;gBAChB,IAAI,EAAE,GAAG;aACV,CAAC,CAAC;SACJ;KACF;SAAM;QACL,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,iBAAiB,eAAK,CAAC,IAAI,CAAC,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;SACrE;KACF;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AA/ID,oDA+IC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n * @format\n */\n\nimport fs from 'fs';\nimport path from 'path';\nimport chalk from 'chalk';\nimport {Project} from '../../config/projectConfig';\nimport {CodedError} from '@react-native-windows/telemetry';\n\nconst projectTypeGuidsByLanguage = {\n cpp: '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}',\n cs: '{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}',\n};\n\nexport const dotNetCoreProjectTypeGuid =\n '{9A19103F-16F7-4668-BE54-9A1E7A4F7556}';\n\n/**\n * Checks is the given block of lines exists within an array of lines.\n * @param lines The array of lines to search.\n * @param block The block of lines to search for.\n * @return True if the block of lines does exist within lines.\n */\nfunction linesContainsBlock(lines: string[], block: string[]): boolean {\n if (block.length > 0) {\n const startIndex = lines.indexOf(block[0]);\n\n if (startIndex >= 0) {\n for (let i = 1; i < block.length; i++) {\n if (lines[startIndex + i] !== block[i]) {\n return false;\n }\n }\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Insert the given block of lines into an array of lines.\n * @param lines The array of lines to insert into.\n * @param block The block of lines to insert.\n * @param index The index to perform the insert.\n */\nfunction insertBlockIntoLines(lines: string[], block: string[], index: number) {\n for (let i = 0; i < block.length; i++) {\n lines.splice(index + i, 0, block[i]);\n }\n}\n\n/**\n * Search through an array of lines for a block of lines starting with startLine and ending with endLine.\n * @param lines The array of lines to search.\n * @param startLine The first line of the block.\n * @param endLine The last line of the block.\n * @param includeStartEnd Include the start and end lines in the result.\n * @return The found block of lines, if found.\n */\nfunction getBlockContentsFromLines(\n lines: string[],\n startLine: string,\n endLine: string,\n includeStartEnd: boolean = true,\n): string[] {\n const startIndex = lines.indexOf(startLine);\n const endIndex = lines.indexOf(endLine, startIndex);\n\n if (startIndex >= 0 && startIndex < endIndex) {\n if (includeStartEnd) {\n return lines.slice(startIndex, endIndex + 1);\n } else if (startIndex + 1 < endIndex) {\n return lines.slice(startIndex + 1, endIndex);\n }\n }\n\n return [];\n}\n\n/**\n * Adds the necessary info from a VS project into a VS solution file so that it will build.\n * @param slnFile The Absolute path to the target VS solution file.\n * @param project The object representing the project info.\n * @param verbose If true, enable verbose logging.\n * @param checkMode It true, don't make any changes.\n * @return Whether any changes were necessary.\n */\nexport function addProjectToSolution(\n slnFile: string,\n project: Project,\n verbose: boolean = false,\n checkMode: boolean = false,\n): boolean {\n if (project.projectLang === null) {\n throw new CodedError(\n 'AddProjectToSolution',\n 'Unable to add project to solution, projectLang is null',\n );\n }\n\n if (project.projectGuid === null) {\n throw new CodedError(\n 'AddProjectToSolution',\n 'Unable to add project to solution, projectGuid is null',\n );\n }\n\n if (verbose) {\n console.log(\n `Processing ${chalk.bold(path.basename(project.projectFile))}...`,\n );\n }\n\n const slnLines = fs\n .readFileSync(slnFile)\n .toString()\n .split('\\r\\n');\n\n let contentsChanged = false;\n\n // Check for the project entry block\n\n const slnDir = path.dirname(slnFile);\n const relProjectFile = path.relative(slnDir, project.projectFile);\n\n const projectTypeGuid =\n 'projectTypeGuid' in project\n ? project.projectTypeGuid!\n : projectTypeGuidsByLanguage[project.projectLang];\n\n const projectGuid = project.projectGuid.toUpperCase();\n\n const projectEntryBlock = [\n `Project(\"${projectTypeGuid}\") = \"${project.projectName}\", \"${relProjectFile}\", \"${projectGuid}\"`,\n 'EndProject',\n ];\n\n if (!linesContainsBlock(slnLines, projectEntryBlock)) {\n if (verbose) {\n console.log(chalk.yellow('Missing project entry block.'));\n }\n\n const globalIndex = slnLines.indexOf('Global');\n insertBlockIntoLines(slnLines, projectEntryBlock, globalIndex);\n contentsChanged = true;\n }\n\n // Check for the project configuration platforms\n\n const slnConfigs = getBlockContentsFromLines(\n slnLines,\n '\\tGlobalSection(SolutionConfigurationPlatforms) = preSolution',\n '\\tEndGlobalSection',\n false,\n ).map(line => line.match(/\\s+([\\w\\s|]+)\\s=/)![1]);\n\n const projectConfigLines: string[] = [];\n\n slnConfigs.forEach(slnConfig => {\n if (!slnConfig.endsWith('|Any CPU')) {\n projectConfigLines.push(\n `\\t\\t${projectGuid}.${slnConfig}.ActiveCfg = ${\n project.projectLang === 'cpp'\n ? slnConfig.replace('x86', 'Win32')\n : slnConfig\n }`,\n );\n projectConfigLines.push(\n `\\t\\t${projectGuid}.${slnConfig}.Build.0 = ${\n project.projectLang === 'cpp'\n ? slnConfig.replace('x86', 'Win32')\n : slnConfig\n }`,\n );\n }\n });\n\n const projectConfigStartIndex = slnLines.indexOf(\n '\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution',\n );\n\n projectConfigLines.forEach(projectConfigLine => {\n if (!slnLines.includes(projectConfigLine)) {\n if (verbose) {\n const configLine = projectConfigLine.substr(\n projectConfigLine.indexOf('= ') + 2,\n );\n console.log(chalk.yellow(`Missing ${configLine} config block.`));\n }\n\n const projectConfigEndIndex = slnLines.indexOf(\n '\\tEndGlobalSection',\n projectConfigStartIndex,\n );\n\n slnLines.splice(projectConfigEndIndex, 0, projectConfigLine);\n contentsChanged = true;\n }\n });\n\n // Write out new solution file if there were changes\n if (contentsChanged) {\n if (verbose) {\n console.log(\n chalk.yellow(\n `${chalk.bold(path.basename(slnFile))} needs to be updated.`,\n ),\n );\n }\n\n if (!checkMode) {\n if (verbose) {\n console.log(\n `Writing changes to ${chalk.bold(path.basename(slnFile))}...`,\n );\n }\n\n const slnContents = slnLines.join('\\r\\n');\n fs.writeFileSync(slnFile, slnContents, {\n encoding: 'utf8',\n flag: 'w',\n });\n }\n } else {\n if (verbose) {\n console.log(`No changes to ${chalk.bold(path.basename(slnFile))}.`);\n }\n }\n\n return contentsChanged;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vstools.js","sourceRoot":"","sources":["../../../src/runWindows/utils/vstools.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AACxB,kDAA0B;AAE1B,+DAA2D;AAE3D,MAAM,0BAA0B,GAAG;IACjC,GAAG,EAAE,wCAAwC;IAC7C,EAAE,EAAE,wCAAwC;CAC7C,CAAC;AAEW,QAAA,yBAAyB,GACpC,wCAAwC,CAAC;AAE3C;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,KAAe,EAAE,KAAe;IAC1D,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAE3C,IAAI,UAAU,IAAI,CAAC,EAAE;YACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACrC,IAAI,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,KAAK,KA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CAAC;SACrE;KACF;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAhJD,oDAgJC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n * @format\n */\n\nimport fs from 'fs';\nimport path from 'path';\nimport chalk from 'chalk';\nimport {Project} from '../../config/projectConfig';\nimport {CodedError} from '@react-native-windows/telemetry';\n\nconst projectTypeGuidsByLanguage = {\n cpp: '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}',\n cs: '{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}',\n};\n\nexport const dotNetCoreProjectTypeGuid =\n '{9A19103F-16F7-4668-BE54-9A1E7A4F7556}';\n\n/**\n * Checks is the given block of lines exists within an array of lines.\n * @param lines The array of lines to search.\n * @param block The block of lines to search for.\n * @return True if the block of lines does exist within lines.\n */\nfunction linesContainsBlock(lines: string[], block: string[]): boolean {\n if (block.length > 0) {\n const startIndex = lines.indexOf(block[0]);\n\n if (startIndex >= 0) {\n for (let i = 1; i < block.length; i++) {\n if (lines[startIndex + i] !== block[i]) {\n return false;\n }\n }\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Insert the given block of lines into an array of lines.\n * @param lines The array of lines to insert into.\n * @param block The block of lines to insert.\n * @param index The index to perform the insert.\n */\nfunction insertBlockIntoLines(lines: string[], block: string[], index: number) {\n for (let i = 0; i < block.length; i++) {\n lines.splice(index + i, 0, block[i]);\n }\n}\n\n/**\n * Search through an array of lines for a block of lines starting with startLine and ending with endLine.\n * @param lines The array of lines to search.\n * @param startLine The first line of the block.\n * @param endLine The last line of the block.\n * @param includeStartEnd Include the start and end lines in the result.\n * @return The found block of lines, if found.\n */\nfunction getBlockContentsFromLines(\n lines: string[],\n startLine: string,\n endLine: string,\n includeStartEnd: boolean = true,\n): string[] {\n const startIndex = lines.indexOf(startLine);\n const endIndex = lines.indexOf(endLine, startIndex);\n\n if (startIndex >= 0 && startIndex < endIndex) {\n if (includeStartEnd) {\n return lines.slice(startIndex, endIndex + 1);\n } else if (startIndex + 1 < endIndex) {\n return lines.slice(startIndex + 1, endIndex);\n }\n }\n\n return [];\n}\n\n/**\n * Adds the necessary info from a VS project into a VS solution file so that it will build.\n * @param slnFile The Absolute path to the target VS solution file.\n * @param project The object representing the project info.\n * @param verbose If true, enable verbose logging.\n * @param checkMode It true, don't make any changes.\n * @return Whether any changes were necessary.\n */\nexport function addProjectToSolution(\n slnFile: string,\n project: Project,\n verbose: boolean = false,\n checkMode: boolean = false,\n): boolean {\n if (project.projectLang === null) {\n throw new CodedError(\n 'AddProjectToSolution',\n 'Unable to add project to solution, projectLang is null',\n );\n }\n\n if (project.projectGuid === null) {\n throw new CodedError(\n 'AddProjectToSolution',\n 'Unable to add project to solution, projectGuid is null',\n );\n }\n\n if (verbose) {\n console.log(\n `Processing ${chalk.bold(path.basename(project.projectFile))}...`,\n );\n }\n\n const originalSlnContents = fs.readFileSync(slnFile).toString();\n\n const isCRLF = originalSlnContents.includes('\\r\\n');\n\n const slnLines = originalSlnContents.split(isCRLF ? '\\r\\n' : '\\n');\n\n let contentsChanged = false;\n\n // Check for the project entry block\n\n const slnDir = path.dirname(slnFile);\n const relProjectFile = path.relative(slnDir, project.projectFile);\n\n const projectTypeGuid =\n 'projectTypeGuid' in project\n ? project.projectTypeGuid!\n : projectTypeGuidsByLanguage[project.projectLang];\n\n const projectGuid = project.projectGuid.toUpperCase();\n\n const projectEntryBlock = [\n `Project(\"${projectTypeGuid}\") = \"${project.projectName}\", \"${relProjectFile}\", \"${projectGuid}\"`,\n 'EndProject',\n ];\n\n if (!linesContainsBlock(slnLines, projectEntryBlock)) {\n if (verbose) {\n console.log(chalk.yellow('Missing project entry block.'));\n }\n\n const globalIndex = slnLines.indexOf('Global');\n insertBlockIntoLines(slnLines, projectEntryBlock, globalIndex);\n contentsChanged = true;\n }\n\n // Check for the project configuration platforms\n\n const slnConfigs = getBlockContentsFromLines(\n slnLines,\n '\\tGlobalSection(SolutionConfigurationPlatforms) = preSolution',\n '\\tEndGlobalSection',\n false,\n ).map(line => line.match(/\\s+([\\w\\s|]+)\\s=/)![1]);\n\n const projectConfigLines: string[] = [];\n\n slnConfigs.forEach(slnConfig => {\n if (!slnConfig.endsWith('|Any CPU')) {\n projectConfigLines.push(\n `\\t\\t${projectGuid}.${slnConfig}.ActiveCfg = ${\n project.projectLang === 'cpp'\n ? slnConfig.replace('x86', 'Win32')\n : slnConfig\n }`,\n );\n projectConfigLines.push(\n `\\t\\t${projectGuid}.${slnConfig}.Build.0 = ${\n project.projectLang === 'cpp'\n ? slnConfig.replace('x86', 'Win32')\n : slnConfig\n }`,\n );\n }\n });\n\n const projectConfigStartIndex = slnLines.indexOf(\n '\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution',\n );\n\n projectConfigLines.forEach(projectConfigLine => {\n if (!slnLines.includes(projectConfigLine)) {\n if (verbose) {\n const configLine = projectConfigLine.substr(\n projectConfigLine.indexOf('= ') + 2,\n );\n console.log(chalk.yellow(`Missing ${configLine} config block.`));\n }\n\n const projectConfigEndIndex = slnLines.indexOf(\n '\\tEndGlobalSection',\n projectConfigStartIndex,\n );\n\n slnLines.splice(projectConfigEndIndex, 0, projectConfigLine);\n contentsChanged = true;\n }\n });\n\n // Write out new solution file if there were changes\n if (contentsChanged) {\n if (verbose) {\n console.log(\n chalk.yellow(\n `${chalk.bold(path.basename(slnFile))} needs to be updated.`,\n ),\n );\n }\n\n if (!checkMode) {\n if (verbose) {\n console.log(\n `Writing changes to ${chalk.bold(path.basename(slnFile))}...`,\n );\n }\n\n const slnContents = slnLines.join(isCRLF ? '\\r\\n' : '\\n');\n fs.writeFileSync(slnFile, slnContents, {\n encoding: 'utf8',\n flag: 'w',\n });\n }\n } else {\n if (verbose) {\n console.log(`No changes to ${chalk.bold(path.basename(slnFile))}.`);\n }\n }\n\n return contentsChanged;\n}\n"]}
|
|
@@ -66,7 +66,7 @@ class WinAppDeployTool {
|
|
|
66
66
|
// [(line), '127.0.0.1', '00000015-b21e-0da9-0000-000000000000', 'Lumia 1520 (RM-940)']
|
|
67
67
|
// The expansion is: IP address, spaces, GUID, spaces, text name
|
|
68
68
|
const LINE_TEST = /^([\d\.]+?)\s+([\da-fA-F\-]+?)\s+(.+)$/m; // eslint-disable-line no-useless-escape
|
|
69
|
-
const result = child_process_1.execSync(`"${this.path}" devices`).toString();
|
|
69
|
+
const result = (0, child_process_1.execSync)(`"${this.path}" devices`).toString();
|
|
70
70
|
const lines = result.split('\r\n');
|
|
71
71
|
const matchedLines = lines.filter(line => LINE_TEST.test(line));
|
|
72
72
|
const devices = matchedLines.map((line, arrayIndex) => {
|
|
@@ -86,7 +86,7 @@ class WinAppDeployTool {
|
|
|
86
86
|
async installAppPackage(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin, verbose = false) {
|
|
87
87
|
const text = `Installing app to ${targetDevice.name}`;
|
|
88
88
|
if (shouldLaunch) {
|
|
89
|
-
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.');
|
|
89
|
+
(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.');
|
|
90
90
|
}
|
|
91
91
|
const args = [
|
|
92
92
|
shouldUpdate ? 'update' : 'install',
|
|
@@ -98,11 +98,11 @@ class WinAppDeployTool {
|
|
|
98
98
|
if (pin) {
|
|
99
99
|
args.push('-pin', pin.toString());
|
|
100
100
|
}
|
|
101
|
-
await commandWithProgress_1.commandWithProgress(commandWithProgress_1.newSpinner(text), text, this.path, args, verbose, 'InstallAppToDeviceFailure');
|
|
101
|
+
await (0, commandWithProgress_1.commandWithProgress)((0, commandWithProgress_1.newSpinner)(text), text, this.path, args, verbose, 'InstallAppToDeviceFailure');
|
|
102
102
|
}
|
|
103
103
|
async uninstallAppPackage(appName, targetDevice, verbose) {
|
|
104
104
|
const text = `Uninstalling app from ${targetDevice.name}`;
|
|
105
|
-
await commandWithProgress_1.commandWithProgress(commandWithProgress_1.newSpinner(text), text, this.path, `uninstall -package ${appName} -ip {$targetDevice.ip}`.split(' '), verbose, 'UninstallAppOnDeviceFailure');
|
|
105
|
+
await (0, commandWithProgress_1.commandWithProgress)((0, commandWithProgress_1.newSpinner)(text), text, this.path, `uninstall -package ${appName} -ip {$targetDevice.ip}`.split(' '), verbose, 'UninstallAppOnDeviceFailure');
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
exports.default = WinAppDeployTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winappdeploytool.js","sourceRoot":"","sources":["../../../src/runWindows/utils/winappdeploytool.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AACxB,iDAAuC;AACvC,+DAA+E;AAC/E,+DAA2D;AAE3D,SAAS,WAAW,CAAC,CAAa,EAAE,CAAa;IAC/C,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC;AACnD,CAAC;AAED,MAAM,UAAU;IACd,YACkB,IAAY,EACZ,IAAY,EACZ,EAAU,EAET,KAAa,EACb,IAAY;QALb,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,OAAE,GAAF,EAAE,CAAQ;QAET,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;IAC5B,CAAC;IAEJ,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC;IACtD,CAAC;CACF;AAED,MAAqB,gBAAgB;IAGnC;QACE,MAAM,gBAAgB,GACpB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QAC/D,IAAI,CAAC,IAAI,GAAG,cAAI,CAAC,IAAI,CACnB,gBAAiB,EACj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yB,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1D,MAAM,IAAA,yCAAmB,EACvB,IAAA,gCAAU,EAAC,IAAI,CAAC,EAChB,IAAI,EACJ,IAAI,CAAC,IAAI,EACT,sBAAsB,OAAO,yBAAyB,CAAC,KAAK,CAAC,GAAG,CAAC,EACjE,OAAO,EACP,6BAA6B,CAC9B,CAAC;IACJ,CAAC;CACF;AArID,mCAqIC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n\nimport fs from 'fs';\nimport path from 'path';\nimport {execSync} from 'child_process';\nimport {newSpinner, commandWithProgress, newWarn} from './commandWithProgress';\nimport {CodedError} from '@react-native-windows/telemetry';\n\nfunction sortDevices(l: DeviceInfo, r: DeviceInfo): number {\n return l.toString().length - r.toString().length;\n}\n\nclass DeviceInfo {\n constructor(\n public readonly name: string,\n public readonly guid: string,\n public readonly ip: string,\n\n private readonly index: number,\n private readonly type: string,\n ) {}\n\n toString() {\n return `${this.index}. ${this.name} (${this.type})`;\n }\n}\n\nexport default class WinAppDeployTool {\n private readonly path: string;\n\n constructor() {\n const programFilesPath =\n process.env['ProgramFiles(x86)'] || process.env.ProgramFiles;\n this.path = path.join(\n programFilesPath!,\n 'Windows Kits',\n '10',\n 'bin',\n 'x86',\n 'WinAppDeployCmd.exe',\n );\n }\n\n get isAvailable() {\n return fs.existsSync(this.path);\n }\n\n findDevice(target: string): DeviceInfo {\n const devices = this.enumerateDevices();\n\n if (devices.length === 0) {\n throw new CodedError('NoDevice', 'No devices found');\n }\n\n if (target === 'emulator') {\n const sortedList = devices.sort(sortDevices);\n for (const sortedItem of sortedList) {\n if (sortedItem.toString().includes(target)) {\n return sortedItem;\n }\n }\n }\n\n if (target === 'device') {\n return devices[0];\n }\n\n const candidateList = devices.filter(device => device.guid === target);\n\n if (candidateList.length > 0) {\n return candidateList[0];\n } else {\n throw new CodedError('NoDevice', 'No devices found');\n }\n }\n\n enumerateDevices(): DeviceInfo[] {\n // 127.0.0.1 00000015-b21e-0da9-0000-000000000000 Lumia 1520 (RM-940)\\r\n // maps to\n // [(line), '127.0.0.1', '00000015-b21e-0da9-0000-000000000000', 'Lumia 1520 (RM-940)']\n // The expansion is: IP address, spaces, GUID, spaces, text name\n const LINE_TEST = /^([\\d\\.]+?)\\s+([\\da-fA-F\\-]+?)\\s+(.+)$/m; // eslint-disable-line no-useless-escape\n\n const result = execSync(`\"${this.path}\" devices`).toString();\n const lines = result.split('\\r\\n');\n const matchedLines = lines.filter(line => LINE_TEST.test(line));\n\n const devices = matchedLines.map((line, arrayIndex) => {\n const match = line.match(LINE_TEST);\n if (!match) {\n throw new CodedError(\n 'InvalidDevicesOutput',\n 'Unexpected format of \"devices\" output',\n );\n }\n\n const ip = match[1];\n const guid = match[2];\n const name = match[3];\n const type = 'device';\n\n const deviceInfo = new DeviceInfo(name, guid, ip, arrayIndex, type);\n return deviceInfo;\n });\n\n return devices;\n }\n\n async installAppPackage(\n pathToAppxPackage: string,\n targetDevice: DeviceInfo,\n shouldLaunch: boolean,\n shouldUpdate: boolean,\n pin: boolean,\n verbose: boolean = false,\n ) {\n const text = `Installing app to ${targetDevice.name}`;\n\n if (shouldLaunch) {\n newWarn(\n 'Cannot launch app with current version of Windows 10 SDK tools. You will have to launch the app after installation is completed.',\n );\n }\n\n const args = [\n shouldUpdate ? 'update' : 'install',\n '-file',\n pathToAppxPackage,\n '-ip',\n targetDevice.ip,\n ];\n\n if (pin) {\n args.push('-pin', pin.toString());\n }\n await commandWithProgress(\n newSpinner(text),\n text,\n this.path,\n args,\n verbose,\n 'InstallAppToDeviceFailure',\n );\n }\n\n async uninstallAppPackage(\n appName: string,\n targetDevice: DeviceInfo,\n verbose: boolean,\n ) {\n const text = `Uninstalling app from ${targetDevice.name}`;\n await commandWithProgress(\n newSpinner(text),\n text,\n this.path,\n `uninstall -package ${appName} -ip {$targetDevice.ip}`.split(' '),\n verbose,\n 'UninstallAppOnDeviceFailure',\n );\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-windows/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0-preview.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
"watch": "rnw-scripts watch"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@react-native-windows/package-utils": "0.
|
|
21
|
-
"@react-native-windows/telemetry": "0.
|
|
20
|
+
"@react-native-windows/package-utils": "0.67.0-preview.1",
|
|
21
|
+
"@react-native-windows/telemetry": "0.67.0-preview.1",
|
|
22
|
+
"@xmldom/xmldom": "^0.7.5",
|
|
22
23
|
"chalk": "^4.1.0",
|
|
23
24
|
"cli-spinners": "^2.2.0",
|
|
24
25
|
"envinfo": "^7.5.0",
|
|
@@ -34,15 +35,14 @@
|
|
|
34
35
|
"uuid": "^3.3.2",
|
|
35
36
|
"xml-formatter": "^2.4.0",
|
|
36
37
|
"xml-parser": "^1.2.1",
|
|
37
|
-
"xmldom": "^0.5.0",
|
|
38
38
|
"xpath": "^0.0.27"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@react-native-community/cli-types": "^5.0.1-alpha.0",
|
|
42
|
-
"@rnw-scripts/eslint-config": "1.1.
|
|
43
|
-
"@rnw-scripts/jest-unittest-config": "1.2.
|
|
44
|
-
"@rnw-scripts/just-task": "2.2.
|
|
45
|
-
"@rnw-scripts/ts-config": "2.0.
|
|
42
|
+
"@rnw-scripts/eslint-config": "1.1.8",
|
|
43
|
+
"@rnw-scripts/jest-unittest-config": "1.2.4",
|
|
44
|
+
"@rnw-scripts/just-task": "2.2.1",
|
|
45
|
+
"@rnw-scripts/ts-config": "2.0.1",
|
|
46
46
|
"@types/chalk": "^2.2.0",
|
|
47
47
|
"@types/jest": "^26.0.20",
|
|
48
48
|
"@types/lodash": "^4.14.168",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"jest": "^26.6.3",
|
|
61
61
|
"just-scripts": "^1.3.3",
|
|
62
62
|
"prettier": "1.19.1",
|
|
63
|
-
"typescript": "^
|
|
63
|
+
"typescript": "^4.4.4"
|
|
64
64
|
},
|
|
65
65
|
"files": [
|
|
66
66
|
"lib-commonjs",
|
|
@@ -75,5 +75,8 @@
|
|
|
75
75
|
]
|
|
76
76
|
},
|
|
77
77
|
"promoteRelease": true,
|
|
78
|
-
"windowsOnly": true
|
|
78
|
+
"windowsOnly": true,
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">= 12.0.0"
|
|
81
|
+
}
|
|
79
82
|
}
|