@react-native-windows/cli 0.73.1 → 0.74.0-preview.1
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/lib-commonjs/commands/autolinkWindows/autolinkWindows.d.ts +87 -87
- package/lib-commonjs/commands/autolinkWindows/autolinkWindows.js +654 -654
- package/lib-commonjs/commands/autolinkWindows/autolinkWindowsOptions.d.ts +14 -14
- package/lib-commonjs/commands/autolinkWindows/autolinkWindowsOptions.js +32 -32
- package/lib-commonjs/commands/codegenWindows/codegenWindows.d.ts +27 -27
- package/lib-commonjs/commands/codegenWindows/codegenWindows.js +205 -205
- package/lib-commonjs/commands/codegenWindows/codegenWindowsOptions.d.ts +12 -12
- package/lib-commonjs/commands/codegenWindows/codegenWindowsOptions.js +22 -22
- package/lib-commonjs/commands/config/configUtils.d.ts +123 -123
- package/lib-commonjs/commands/config/configUtils.js +380 -380
- package/lib-commonjs/commands/config/dependencyConfig.d.ts +37 -37
- package/lib-commonjs/commands/config/dependencyConfig.js +227 -227
- package/lib-commonjs/commands/config/projectConfig.d.ts +27 -27
- package/lib-commonjs/commands/config/projectConfig.js +180 -180
- package/lib-commonjs/commands/healthCheck/healthCheckList.d.ts +6 -6
- package/lib-commonjs/commands/healthCheck/healthCheckList.js +20 -20
- package/lib-commonjs/commands/healthCheck/healthCheckList.js.map +1 -1
- package/lib-commonjs/commands/healthCheck/healthChecks.d.ts +7 -7
- package/lib-commonjs/commands/healthCheck/healthChecks.js +123 -123
- package/lib-commonjs/commands/initWindows/initWindows.d.ts +46 -46
- package/lib-commonjs/commands/initWindows/initWindows.js +243 -243
- package/lib-commonjs/commands/initWindows/initWindowsOptions.d.ts +15 -15
- package/lib-commonjs/commands/initWindows/initWindowsOptions.js +37 -37
- package/lib-commonjs/commands/runWindows/runWindows.d.ts +10 -10
- package/lib-commonjs/commands/runWindows/runWindows.js +321 -321
- package/lib-commonjs/commands/runWindows/runWindowsOptions.d.ts +56 -56
- package/lib-commonjs/commands/runWindows/runWindowsOptions.js +132 -132
- package/lib-commonjs/e2etest/autolink.test.d.ts +6 -6
- package/lib-commonjs/e2etest/autolink.test.js +366 -366
- package/lib-commonjs/e2etest/dependencyConfig.test.d.ts +6 -6
- package/lib-commonjs/e2etest/dependencyConfig.test.js +129 -129
- package/lib-commonjs/e2etest/healthChecks.test.d.ts +6 -6
- package/lib-commonjs/e2etest/healthChecks.test.js +30 -30
- package/lib-commonjs/e2etest/initWindows.test.d.ts +6 -6
- package/lib-commonjs/e2etest/initWindows.test.js +42 -42
- package/lib-commonjs/e2etest/projectConfig.test.d.ts +6 -6
- package/lib-commonjs/e2etest/projectConfig.test.js +110 -110
- package/lib-commonjs/e2etest/projectConfig.utils.d.ts +8 -8
- package/lib-commonjs/e2etest/projectConfig.utils.js +76 -76
- package/lib-commonjs/e2etest/runWindows.test.d.ts +6 -6
- package/lib-commonjs/e2etest/runWindows.test.js +60 -60
- package/lib-commonjs/e2etest/typesUpToDate.test.d.ts +6 -0
- package/lib-commonjs/e2etest/typesUpToDate.test.js +21 -0
- package/lib-commonjs/e2etest/typesUpToDate.test.js.map +1 -0
- package/lib-commonjs/generator-common/index.d.ts +39 -39
- package/lib-commonjs/generator-common/index.js +242 -242
- package/lib-commonjs/generator-windows/index.d.ts +10 -10
- package/lib-commonjs/generator-windows/index.js +316 -316
- package/lib-commonjs/index.d.ts +50 -50
- package/lib-commonjs/index.js +77 -77
- package/lib-commonjs/utils/build.d.ts +12 -12
- package/lib-commonjs/utils/build.js +84 -84
- package/lib-commonjs/utils/checkRequirements.d.ts +6 -6
- package/lib-commonjs/utils/checkRequirements.js +69 -69
- package/lib-commonjs/utils/commandWithProgress.d.ts +21 -21
- package/lib-commonjs/utils/commandWithProgress.js +149 -149
- package/lib-commonjs/utils/deploy.d.ts +12 -12
- package/lib-commonjs/utils/deploy.js +353 -353
- package/lib-commonjs/utils/info.d.ts +6 -6
- package/lib-commonjs/utils/info.js +28 -28
- package/lib-commonjs/utils/msbuildtools.d.ts +28 -28
- package/lib-commonjs/utils/msbuildtools.js +273 -273
- package/lib-commonjs/utils/msbuildtools.js.map +1 -1
- package/lib-commonjs/utils/pathHelpers.d.ts +9 -9
- package/lib-commonjs/utils/pathHelpers.js +36 -36
- package/lib-commonjs/utils/telemetryHelpers.d.ts +29 -29
- package/lib-commonjs/utils/telemetryHelpers.js +120 -120
- package/lib-commonjs/utils/version.d.ts +19 -19
- package/lib-commonjs/utils/version.js +109 -109
- package/lib-commonjs/utils/vsInstalls.d.ts +34 -34
- package/lib-commonjs/utils/vsInstalls.js +99 -99
- package/lib-commonjs/utils/vstools.d.ts +16 -16
- package/lib-commonjs/utils/vstools.js +189 -189
- package/lib-commonjs/utils/winappdeploytool.d.ts +24 -24
- package/lib-commonjs/utils/winappdeploytool.js +108 -108
- package/package.json +16 -16
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* @format
|
|
5
|
-
*/
|
|
6
|
-
import { dependencyConfigWindows } from './commands/config/dependencyConfig';
|
|
7
|
-
import { projectConfigWindows } from './commands/config/projectConfig';
|
|
8
|
-
/**
|
|
9
|
-
* Project generation options
|
|
10
|
-
*
|
|
11
|
-
* _
|
|
12
|
-
* | |
|
|
13
|
-
* __| | __ _ _ __ __ _ ___ _ __
|
|
14
|
-
* / _` |/ _` | '_ \ / _` |/ _ \ '__|
|
|
15
|
-
* | (_| | (_| | | | | (_| | __/ |
|
|
16
|
-
* \__,_|\__,_|_| |_|\__, |\___|_|
|
|
17
|
-
* __/ |
|
|
18
|
-
* |___/
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* Properties on this interface must remain stable, as new versions of
|
|
22
|
-
* react-native-windows-init may be used with local-cli dating back to 0.61.
|
|
23
|
-
* All existing arguments must work correctly when changing this interface.
|
|
24
|
-
*/
|
|
25
|
-
export interface GenerateOptions {
|
|
26
|
-
overwrite: boolean;
|
|
27
|
-
language: 'cpp' | 'cs';
|
|
28
|
-
projectType: 'app' | 'lib';
|
|
29
|
-
experimentalNuGetDependency: boolean;
|
|
30
|
-
nuGetTestVersion?: string;
|
|
31
|
-
nuGetTestFeed?: string;
|
|
32
|
-
useWinUI3: boolean;
|
|
33
|
-
useHermes: boolean;
|
|
34
|
-
useDevMode: boolean;
|
|
35
|
-
verbose: boolean;
|
|
36
|
-
telemetry: boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Simple utility for running the Windows generator.
|
|
40
|
-
*
|
|
41
|
-
* @param projectDir root project directory (i.e. contains index.js)
|
|
42
|
-
* @param name name of the root JS module for this app
|
|
43
|
-
* @param ns namespace for the project
|
|
44
|
-
* @param options command line options container
|
|
45
|
-
*/
|
|
46
|
-
export declare function generateWindows(projectDir: string, name: string, ns: string, options: GenerateOptions): Promise<void>;
|
|
47
|
-
export declare const commands: import("@react-native-community/cli-types").Command
|
|
48
|
-
export declare const dependencyConfig: typeof dependencyConfigWindows;
|
|
49
|
-
export declare const projectConfig: typeof projectConfigWindows;
|
|
50
|
-
export * from './commands/healthCheck/healthChecks';
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import { dependencyConfigWindows } from './commands/config/dependencyConfig';
|
|
7
|
+
import { projectConfigWindows } from './commands/config/projectConfig';
|
|
8
|
+
/**
|
|
9
|
+
* Project generation options
|
|
10
|
+
*
|
|
11
|
+
* _
|
|
12
|
+
* | |
|
|
13
|
+
* __| | __ _ _ __ __ _ ___ _ __
|
|
14
|
+
* / _` |/ _` | '_ \ / _` |/ _ \ '__|
|
|
15
|
+
* | (_| | (_| | | | | (_| | __/ |
|
|
16
|
+
* \__,_|\__,_|_| |_|\__, |\___|_|
|
|
17
|
+
* __/ |
|
|
18
|
+
* |___/
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* Properties on this interface must remain stable, as new versions of
|
|
22
|
+
* react-native-windows-init may be used with local-cli dating back to 0.61.
|
|
23
|
+
* All existing arguments must work correctly when changing this interface.
|
|
24
|
+
*/
|
|
25
|
+
export interface GenerateOptions {
|
|
26
|
+
overwrite: boolean;
|
|
27
|
+
language: 'cpp' | 'cs';
|
|
28
|
+
projectType: 'app' | 'lib';
|
|
29
|
+
experimentalNuGetDependency: boolean;
|
|
30
|
+
nuGetTestVersion?: string;
|
|
31
|
+
nuGetTestFeed?: string;
|
|
32
|
+
useWinUI3: boolean;
|
|
33
|
+
useHermes: boolean;
|
|
34
|
+
useDevMode: boolean;
|
|
35
|
+
verbose: boolean;
|
|
36
|
+
telemetry: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Simple utility for running the Windows generator.
|
|
40
|
+
*
|
|
41
|
+
* @param projectDir root project directory (i.e. contains index.js)
|
|
42
|
+
* @param name name of the root JS module for this app
|
|
43
|
+
* @param ns namespace for the project
|
|
44
|
+
* @param options command line options container
|
|
45
|
+
*/
|
|
46
|
+
export declare function generateWindows(projectDir: string, name: string, ns: string, options: GenerateOptions): Promise<void>;
|
|
47
|
+
export declare const commands: import("@react-native-community/cli-types").Command[];
|
|
48
|
+
export declare const dependencyConfig: typeof dependencyConfigWindows;
|
|
49
|
+
export declare const projectConfig: typeof projectConfigWindows;
|
|
50
|
+
export * from './commands/healthCheck/healthChecks';
|
package/lib-commonjs/index.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
-
}) : function(o, v) {
|
|
21
|
-
o["default"] = v;
|
|
22
|
-
});
|
|
23
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
|
-
if (mod && mod.__esModule) return mod;
|
|
25
|
-
var result = {};
|
|
26
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
27
|
-
__setModuleDefault(result, mod);
|
|
28
|
-
return result;
|
|
29
|
-
};
|
|
30
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
31
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
32
|
-
};
|
|
33
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.projectConfig = exports.dependencyConfig = exports.commands = exports.generateWindows = void 0;
|
|
38
|
-
const fs_1 = __importDefault(require("@react-native-windows/fs"));
|
|
39
|
-
const path_1 = __importDefault(require("path"));
|
|
40
|
-
const generator_windows_1 = require("./generator-windows");
|
|
41
|
-
const pathHelpers = __importStar(require("./utils/pathHelpers"));
|
|
42
|
-
const autolinkWindows_1 = require("./commands/autolinkWindows/autolinkWindows");
|
|
43
|
-
const codegenWindows_1 = require("./commands/codegenWindows/codegenWindows");
|
|
44
|
-
const initWindows_1 = require("./commands/initWindows/initWindows");
|
|
45
|
-
const runWindows_1 = require("./commands/runWindows/runWindows");
|
|
46
|
-
const dependencyConfig_1 = require("./commands/config/dependencyConfig");
|
|
47
|
-
const projectConfig_1 = require("./commands/config/projectConfig");
|
|
48
|
-
/**
|
|
49
|
-
* Simple utility for running the Windows generator.
|
|
50
|
-
*
|
|
51
|
-
* @param projectDir root project directory (i.e. contains index.js)
|
|
52
|
-
* @param name name of the root JS module for this app
|
|
53
|
-
* @param ns namespace for the project
|
|
54
|
-
* @param options command line options container
|
|
55
|
-
*/
|
|
56
|
-
async function generateWindows(projectDir, name, ns, options) {
|
|
57
|
-
if (!fs_1.default.existsSync(projectDir)) {
|
|
58
|
-
fs_1.default.mkdirSync(projectDir);
|
|
59
|
-
}
|
|
60
|
-
await (0, generator_windows_1.installScriptsAndDependencies)(options);
|
|
61
|
-
const rnwPackage = pathHelpers.resolveRnwRoot(projectDir);
|
|
62
|
-
const templateRoot = path_1.default.join(rnwPackage, 'template');
|
|
63
|
-
await (0, generator_windows_1.copyProjectTemplateAndReplace)(templateRoot, projectDir, name, ns, options);
|
|
64
|
-
}
|
|
65
|
-
exports.generateWindows = generateWindows;
|
|
66
|
-
// Assert the interface here doesn't change for the reasons above
|
|
67
|
-
const assertStableInterface = true;
|
|
68
|
-
assertStableInterface;
|
|
69
|
-
exports.commands = [
|
|
70
|
-
autolinkWindows_1.autolinkCommand,
|
|
71
|
-
codegenWindows_1.codegenCommand,
|
|
72
|
-
initWindows_1.initCommand,
|
|
73
|
-
runWindows_1.runWindowsCommand,
|
|
74
|
-
];
|
|
75
|
-
exports.dependencyConfig = dependencyConfig_1.dependencyConfigWindows;
|
|
76
|
-
exports.projectConfig = projectConfig_1.projectConfigWindows;
|
|
77
|
-
__exportStar(require("./commands/healthCheck/healthChecks"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
|
+
if (mod && mod.__esModule) return mod;
|
|
25
|
+
var result = {};
|
|
26
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
27
|
+
__setModuleDefault(result, mod);
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
31
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
32
|
+
};
|
|
33
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.projectConfig = exports.dependencyConfig = exports.commands = exports.generateWindows = void 0;
|
|
38
|
+
const fs_1 = __importDefault(require("@react-native-windows/fs"));
|
|
39
|
+
const path_1 = __importDefault(require("path"));
|
|
40
|
+
const generator_windows_1 = require("./generator-windows");
|
|
41
|
+
const pathHelpers = __importStar(require("./utils/pathHelpers"));
|
|
42
|
+
const autolinkWindows_1 = require("./commands/autolinkWindows/autolinkWindows");
|
|
43
|
+
const codegenWindows_1 = require("./commands/codegenWindows/codegenWindows");
|
|
44
|
+
const initWindows_1 = require("./commands/initWindows/initWindows");
|
|
45
|
+
const runWindows_1 = require("./commands/runWindows/runWindows");
|
|
46
|
+
const dependencyConfig_1 = require("./commands/config/dependencyConfig");
|
|
47
|
+
const projectConfig_1 = require("./commands/config/projectConfig");
|
|
48
|
+
/**
|
|
49
|
+
* Simple utility for running the Windows generator.
|
|
50
|
+
*
|
|
51
|
+
* @param projectDir root project directory (i.e. contains index.js)
|
|
52
|
+
* @param name name of the root JS module for this app
|
|
53
|
+
* @param ns namespace for the project
|
|
54
|
+
* @param options command line options container
|
|
55
|
+
*/
|
|
56
|
+
async function generateWindows(projectDir, name, ns, options) {
|
|
57
|
+
if (!fs_1.default.existsSync(projectDir)) {
|
|
58
|
+
fs_1.default.mkdirSync(projectDir);
|
|
59
|
+
}
|
|
60
|
+
await (0, generator_windows_1.installScriptsAndDependencies)(options);
|
|
61
|
+
const rnwPackage = pathHelpers.resolveRnwRoot(projectDir);
|
|
62
|
+
const templateRoot = path_1.default.join(rnwPackage, 'template');
|
|
63
|
+
await (0, generator_windows_1.copyProjectTemplateAndReplace)(templateRoot, projectDir, name, ns, options);
|
|
64
|
+
}
|
|
65
|
+
exports.generateWindows = generateWindows;
|
|
66
|
+
// Assert the interface here doesn't change for the reasons above
|
|
67
|
+
const assertStableInterface = true;
|
|
68
|
+
assertStableInterface;
|
|
69
|
+
exports.commands = [
|
|
70
|
+
autolinkWindows_1.autolinkCommand,
|
|
71
|
+
codegenWindows_1.codegenCommand,
|
|
72
|
+
initWindows_1.initCommand,
|
|
73
|
+
runWindows_1.runWindowsCommand,
|
|
74
|
+
];
|
|
75
|
+
exports.dependencyConfig = dependencyConfig_1.dependencyConfigWindows;
|
|
76
|
+
exports.projectConfig = projectConfig_1.projectConfigWindows;
|
|
77
|
+
__exportStar(require("./commands/healthCheck/healthChecks"), exports);
|
|
78
78
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* @format
|
|
5
|
-
*/
|
|
6
|
-
import MSBuildTools from './msbuildtools';
|
|
7
|
-
import { RunWindowsOptions, BuildConfig, BuildArch } from '../commands/runWindows/runWindowsOptions';
|
|
8
|
-
import { Config } from '@react-native-community/cli-types';
|
|
9
|
-
export declare function buildSolution(buildTools: MSBuildTools, slnFile: string, buildType: BuildConfig, buildArch: BuildArch, msBuildProps: Record<string, string>, verbose: boolean, target: 'build' | 'deploy', buildLogDirectory?: string, singleproc?: boolean): Promise<void>;
|
|
10
|
-
export declare function getAppSolutionFile(options: RunWindowsOptions, config: Config): string | null;
|
|
11
|
-
export declare function getAppProjectFile(options: RunWindowsOptions, config: Config): string | null;
|
|
12
|
-
export declare function parseMsBuildProps(options: RunWindowsOptions): Record<string, string>;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import MSBuildTools from './msbuildtools';
|
|
7
|
+
import { RunWindowsOptions, BuildConfig, BuildArch } from '../commands/runWindows/runWindowsOptions';
|
|
8
|
+
import { Config } from '@react-native-community/cli-types';
|
|
9
|
+
export declare function buildSolution(buildTools: MSBuildTools, slnFile: string, buildType: BuildConfig, buildArch: BuildArch, msBuildProps: Record<string, string>, verbose: boolean, target: 'build' | 'deploy', buildLogDirectory?: string, singleproc?: boolean): Promise<void>;
|
|
10
|
+
export declare function getAppSolutionFile(options: RunWindowsOptions, config: Config): string | null;
|
|
11
|
+
export declare function getAppProjectFile(options: RunWindowsOptions, config: Config): string | null;
|
|
12
|
+
export declare function parseMsBuildProps(options: RunWindowsOptions): Record<string, string>;
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.parseMsBuildProps = exports.getAppProjectFile = exports.getAppSolutionFile = exports.buildSolution = void 0;
|
|
12
|
-
const path_1 = __importDefault(require("path"));
|
|
13
|
-
const msbuildtools_1 = __importDefault(require("./msbuildtools"));
|
|
14
|
-
const version_1 = __importDefault(require("./version"));
|
|
15
|
-
const commandWithProgress_1 = require("./commandWithProgress");
|
|
16
|
-
const telemetry_1 = require("@react-native-windows/telemetry");
|
|
17
|
-
async function buildSolution(buildTools, slnFile, buildType, buildArch, msBuildProps, verbose, target, buildLogDirectory, singleproc) {
|
|
18
|
-
const minVersion = new version_1.default(10, 0, 19041, 0);
|
|
19
|
-
const allVersions = msbuildtools_1.default.getAllAvailableUAPVersions();
|
|
20
|
-
if (!allVersions.some(v => v.gte(minVersion))) {
|
|
21
|
-
throw new telemetry_1.CodedError('MinSDKVersionNotMet', 'Must have a minimum Windows SDK version 10.0.19041.0 installed');
|
|
22
|
-
}
|
|
23
|
-
await buildTools.buildProject(slnFile, buildType, buildArch, msBuildProps, verbose, target, buildLogDirectory, singleproc);
|
|
24
|
-
}
|
|
25
|
-
exports.buildSolution = buildSolution;
|
|
26
|
-
const configErrorString = 'Error: ';
|
|
27
|
-
function getAppSolutionFile(options, config) {
|
|
28
|
-
// Use the solution file if specified
|
|
29
|
-
if (options.sln) {
|
|
30
|
-
return path_1.default.join(options.root, options.sln);
|
|
31
|
-
}
|
|
32
|
-
// Check the answer from react-native config
|
|
33
|
-
const windowsAppConfig = config.project.windows;
|
|
34
|
-
if (!windowsAppConfig) {
|
|
35
|
-
throw new telemetry_1.CodedError('NoWindowsConfig', "Couldn't determine Windows app config");
|
|
36
|
-
}
|
|
37
|
-
const configSolutionFile = windowsAppConfig.solutionFile;
|
|
38
|
-
if (configSolutionFile.startsWith(configErrorString)) {
|
|
39
|
-
(0, commandWithProgress_1.newError)(configSolutionFile.substr(configErrorString.length) +
|
|
40
|
-
' Optionally, use --sln {slnFile}.');
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return path_1.default.join(windowsAppConfig.folder, windowsAppConfig.sourceDir, configSolutionFile);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.getAppSolutionFile = getAppSolutionFile;
|
|
48
|
-
function getAppProjectFile(options, config) {
|
|
49
|
-
// Use the project file if specified
|
|
50
|
-
if (options.proj) {
|
|
51
|
-
return path_1.default.join(options.root, options.proj);
|
|
52
|
-
}
|
|
53
|
-
// Check the answer from react-native config
|
|
54
|
-
const windowsAppConfig = config.project.windows;
|
|
55
|
-
const configProject = windowsAppConfig.project;
|
|
56
|
-
if (typeof configProject === 'string' &&
|
|
57
|
-
configProject.startsWith(configErrorString)) {
|
|
58
|
-
(0, commandWithProgress_1.newError)(configProject.substr(configErrorString.length) +
|
|
59
|
-
' Optionally, use --proj {projFile}.');
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
const configProjectFile = configProject.projectFile;
|
|
64
|
-
if (configProjectFile.startsWith(configErrorString)) {
|
|
65
|
-
(0, commandWithProgress_1.newError)(configProjectFile.substr(configErrorString.length) +
|
|
66
|
-
' Optionally, use --proj {projFile}.');
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return path_1.default.join(windowsAppConfig.folder, windowsAppConfig.sourceDir, configProjectFile);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.getAppProjectFile = getAppProjectFile;
|
|
73
|
-
function parseMsBuildProps(options) {
|
|
74
|
-
const result = {};
|
|
75
|
-
if (options.msbuildprops) {
|
|
76
|
-
const props = options.msbuildprops.split(',');
|
|
77
|
-
for (const prop of props) {
|
|
78
|
-
const propAssignment = prop.split('=');
|
|
79
|
-
result[propAssignment[0]] = propAssignment[1];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
exports.parseMsBuildProps = parseMsBuildProps;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.parseMsBuildProps = exports.getAppProjectFile = exports.getAppSolutionFile = exports.buildSolution = void 0;
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const msbuildtools_1 = __importDefault(require("./msbuildtools"));
|
|
14
|
+
const version_1 = __importDefault(require("./version"));
|
|
15
|
+
const commandWithProgress_1 = require("./commandWithProgress");
|
|
16
|
+
const telemetry_1 = require("@react-native-windows/telemetry");
|
|
17
|
+
async function buildSolution(buildTools, slnFile, buildType, buildArch, msBuildProps, verbose, target, buildLogDirectory, singleproc) {
|
|
18
|
+
const minVersion = new version_1.default(10, 0, 19041, 0);
|
|
19
|
+
const allVersions = msbuildtools_1.default.getAllAvailableUAPVersions();
|
|
20
|
+
if (!allVersions.some(v => v.gte(minVersion))) {
|
|
21
|
+
throw new telemetry_1.CodedError('MinSDKVersionNotMet', 'Must have a minimum Windows SDK version 10.0.19041.0 installed');
|
|
22
|
+
}
|
|
23
|
+
await buildTools.buildProject(slnFile, buildType, buildArch, msBuildProps, verbose, target, buildLogDirectory, singleproc);
|
|
24
|
+
}
|
|
25
|
+
exports.buildSolution = buildSolution;
|
|
26
|
+
const configErrorString = 'Error: ';
|
|
27
|
+
function getAppSolutionFile(options, config) {
|
|
28
|
+
// Use the solution file if specified
|
|
29
|
+
if (options.sln) {
|
|
30
|
+
return path_1.default.join(options.root, options.sln);
|
|
31
|
+
}
|
|
32
|
+
// Check the answer from react-native config
|
|
33
|
+
const windowsAppConfig = config.project.windows;
|
|
34
|
+
if (!windowsAppConfig) {
|
|
35
|
+
throw new telemetry_1.CodedError('NoWindowsConfig', "Couldn't determine Windows app config");
|
|
36
|
+
}
|
|
37
|
+
const configSolutionFile = windowsAppConfig.solutionFile;
|
|
38
|
+
if (configSolutionFile.startsWith(configErrorString)) {
|
|
39
|
+
(0, commandWithProgress_1.newError)(configSolutionFile.substr(configErrorString.length) +
|
|
40
|
+
' Optionally, use --sln {slnFile}.');
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return path_1.default.join(windowsAppConfig.folder, windowsAppConfig.sourceDir, configSolutionFile);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.getAppSolutionFile = getAppSolutionFile;
|
|
48
|
+
function getAppProjectFile(options, config) {
|
|
49
|
+
// Use the project file if specified
|
|
50
|
+
if (options.proj) {
|
|
51
|
+
return path_1.default.join(options.root, options.proj);
|
|
52
|
+
}
|
|
53
|
+
// Check the answer from react-native config
|
|
54
|
+
const windowsAppConfig = config.project.windows;
|
|
55
|
+
const configProject = windowsAppConfig.project;
|
|
56
|
+
if (typeof configProject === 'string' &&
|
|
57
|
+
configProject.startsWith(configErrorString)) {
|
|
58
|
+
(0, commandWithProgress_1.newError)(configProject.substr(configErrorString.length) +
|
|
59
|
+
' Optionally, use --proj {projFile}.');
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const configProjectFile = configProject.projectFile;
|
|
64
|
+
if (configProjectFile.startsWith(configErrorString)) {
|
|
65
|
+
(0, commandWithProgress_1.newError)(configProjectFile.substr(configErrorString.length) +
|
|
66
|
+
' Optionally, use --proj {projFile}.');
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return path_1.default.join(windowsAppConfig.folder, windowsAppConfig.sourceDir, configProjectFile);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.getAppProjectFile = getAppProjectFile;
|
|
73
|
+
function parseMsBuildProps(options) {
|
|
74
|
+
const result = {};
|
|
75
|
+
if (options.msbuildprops) {
|
|
76
|
+
const props = options.msbuildprops.split(',');
|
|
77
|
+
for (const prop of props) {
|
|
78
|
+
const propAssignment = prop.split('=');
|
|
79
|
+
result[propAssignment[0]] = propAssignment[1];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
exports.parseMsBuildProps = parseMsBuildProps;
|
|
85
85
|
//# sourceMappingURL=build.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* @format
|
|
5
|
-
*/
|
|
6
|
-
export declare function isWinSdkPresent(target: string): string;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
export declare function isWinSdkPresent(target: string): string;
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.isWinSdkPresent = void 0;
|
|
12
|
-
const telemetry_1 = require("@react-native-windows/telemetry");
|
|
13
|
-
const child_process_1 = require("child_process");
|
|
14
|
-
const path_1 = __importDefault(require("path"));
|
|
15
|
-
const shelljs_1 = __importDefault(require("shelljs"));
|
|
16
|
-
const version_1 = __importDefault(require("./version"));
|
|
17
|
-
const REQUIRED_VERSIONS = {
|
|
18
|
-
'10.0': {
|
|
19
|
-
os: new version_1.default(6, 3),
|
|
20
|
-
msbuild: new version_1.default(14, 0),
|
|
21
|
-
visualstudio: new version_1.default(14, 0),
|
|
22
|
-
windowssdk: new version_1.default(10, 0),
|
|
23
|
-
phonesdk: new version_1.default(10, 0),
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
function shortenVersion(version) {
|
|
27
|
-
return /^(\d+(?:\.\d+)?)/.exec(version.toString())[1];
|
|
28
|
-
}
|
|
29
|
-
function getMinimalRequiredVersionFor(requirement, windowsTargetVersion) {
|
|
30
|
-
return REQUIRED_VERSIONS[windowsTargetVersion][requirement];
|
|
31
|
-
}
|
|
32
|
-
function getInstalledWindowsSdks() {
|
|
33
|
-
const installedSdks = [];
|
|
34
|
-
const execString = 'reg query "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows" /s /v InstallationFolder /reg:32';
|
|
35
|
-
let output;
|
|
36
|
-
try {
|
|
37
|
-
output = (0, child_process_1.execSync)(execString).toString();
|
|
38
|
-
}
|
|
39
|
-
catch (e) {
|
|
40
|
-
return installedSdks;
|
|
41
|
-
}
|
|
42
|
-
const re = /\\Microsoft SDKs\\Windows\\v(\d+\.\d+)\s*InstallationFolder\s+REG_SZ\s+(.*)/gim;
|
|
43
|
-
let match;
|
|
44
|
-
while ((match = re.exec(output))) {
|
|
45
|
-
const sdkPath = match[2];
|
|
46
|
-
if (shelljs_1.default.test('-e', path_1.default.join(sdkPath, 'SDKManifest.xml'))) {
|
|
47
|
-
const sdkVersion = version_1.default.tryParse(match[1]);
|
|
48
|
-
if (!sdkVersion) {
|
|
49
|
-
throw new telemetry_1.CodedError('BadSDKVersionFormat', `Unexpected SDK version format for '${match[1]}'`);
|
|
50
|
-
}
|
|
51
|
-
installedSdks.push(sdkVersion);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return installedSdks;
|
|
55
|
-
}
|
|
56
|
-
function checkWinSdk(windowsTargetVersion) {
|
|
57
|
-
const installedSdks = getInstalledWindowsSdks();
|
|
58
|
-
const requiredVersion = getMinimalRequiredVersionFor('windowssdk', windowsTargetVersion);
|
|
59
|
-
const hasSdkInstalled = installedSdks.some(installedSdk => installedSdk.eq(requiredVersion));
|
|
60
|
-
if (hasSdkInstalled) {
|
|
61
|
-
return shortenVersion(requiredVersion);
|
|
62
|
-
}
|
|
63
|
-
const shortenedVersion = shortenVersion(requiredVersion);
|
|
64
|
-
throw new telemetry_1.CodedError('NoSDK', `Windows SDK not found. Ensure that you have installed Windows ${shortenedVersion} SDK along with Visual Studio or install Windows ${shortenedVersion} SDK separately from https://dev.windows.com/en-us/downloads`);
|
|
65
|
-
}
|
|
66
|
-
function isWinSdkPresent(target) {
|
|
67
|
-
return checkWinSdk(target);
|
|
68
|
-
}
|
|
69
|
-
exports.isWinSdkPresent = isWinSdkPresent;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.isWinSdkPresent = void 0;
|
|
12
|
+
const telemetry_1 = require("@react-native-windows/telemetry");
|
|
13
|
+
const child_process_1 = require("child_process");
|
|
14
|
+
const path_1 = __importDefault(require("path"));
|
|
15
|
+
const shelljs_1 = __importDefault(require("shelljs"));
|
|
16
|
+
const version_1 = __importDefault(require("./version"));
|
|
17
|
+
const REQUIRED_VERSIONS = {
|
|
18
|
+
'10.0': {
|
|
19
|
+
os: new version_1.default(6, 3),
|
|
20
|
+
msbuild: new version_1.default(14, 0),
|
|
21
|
+
visualstudio: new version_1.default(14, 0),
|
|
22
|
+
windowssdk: new version_1.default(10, 0),
|
|
23
|
+
phonesdk: new version_1.default(10, 0),
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
function shortenVersion(version) {
|
|
27
|
+
return /^(\d+(?:\.\d+)?)/.exec(version.toString())[1];
|
|
28
|
+
}
|
|
29
|
+
function getMinimalRequiredVersionFor(requirement, windowsTargetVersion) {
|
|
30
|
+
return REQUIRED_VERSIONS[windowsTargetVersion][requirement];
|
|
31
|
+
}
|
|
32
|
+
function getInstalledWindowsSdks() {
|
|
33
|
+
const installedSdks = [];
|
|
34
|
+
const execString = 'reg query "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows" /s /v InstallationFolder /reg:32';
|
|
35
|
+
let output;
|
|
36
|
+
try {
|
|
37
|
+
output = (0, child_process_1.execSync)(execString).toString();
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
return installedSdks;
|
|
41
|
+
}
|
|
42
|
+
const re = /\\Microsoft SDKs\\Windows\\v(\d+\.\d+)\s*InstallationFolder\s+REG_SZ\s+(.*)/gim;
|
|
43
|
+
let match;
|
|
44
|
+
while ((match = re.exec(output))) {
|
|
45
|
+
const sdkPath = match[2];
|
|
46
|
+
if (shelljs_1.default.test('-e', path_1.default.join(sdkPath, 'SDKManifest.xml'))) {
|
|
47
|
+
const sdkVersion = version_1.default.tryParse(match[1]);
|
|
48
|
+
if (!sdkVersion) {
|
|
49
|
+
throw new telemetry_1.CodedError('BadSDKVersionFormat', `Unexpected SDK version format for '${match[1]}'`);
|
|
50
|
+
}
|
|
51
|
+
installedSdks.push(sdkVersion);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return installedSdks;
|
|
55
|
+
}
|
|
56
|
+
function checkWinSdk(windowsTargetVersion) {
|
|
57
|
+
const installedSdks = getInstalledWindowsSdks();
|
|
58
|
+
const requiredVersion = getMinimalRequiredVersionFor('windowssdk', windowsTargetVersion);
|
|
59
|
+
const hasSdkInstalled = installedSdks.some(installedSdk => installedSdk.eq(requiredVersion));
|
|
60
|
+
if (hasSdkInstalled) {
|
|
61
|
+
return shortenVersion(requiredVersion);
|
|
62
|
+
}
|
|
63
|
+
const shortenedVersion = shortenVersion(requiredVersion);
|
|
64
|
+
throw new telemetry_1.CodedError('NoSDK', `Windows SDK not found. Ensure that you have installed Windows ${shortenedVersion} SDK along with Visual Studio or install Windows ${shortenedVersion} SDK separately from https://dev.windows.com/en-us/downloads`);
|
|
65
|
+
}
|
|
66
|
+
function isWinSdkPresent(target) {
|
|
67
|
+
return checkWinSdk(target);
|
|
68
|
+
}
|
|
69
|
+
exports.isWinSdkPresent = isWinSdkPresent;
|
|
70
70
|
//# sourceMappingURL=checkRequirements.js.map
|