nativescript 9.2.0-alpha.1 → 9.2.0-alpha.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.
|
@@ -130,7 +130,7 @@ class CompiledReleaseService {
|
|
|
130
130
|
return this.buildAndroid(projectData, buildData);
|
|
131
131
|
}
|
|
132
132
|
getCompilerPath(projectData) {
|
|
133
|
-
return this.getCompilerBin(projectData, "ns-
|
|
133
|
+
return this.getCompilerBin(projectData, "ns-compiled");
|
|
134
134
|
}
|
|
135
135
|
getCompilerBin(projectData, name) {
|
|
136
136
|
const packageDir = this.getPackageDir(projectData);
|
|
@@ -152,28 +152,17 @@ class CompiledReleaseService {
|
|
|
152
152
|
return packageDir;
|
|
153
153
|
}
|
|
154
154
|
async buildIOS(projectData, buildData) {
|
|
155
|
-
var _a, _b;
|
|
156
155
|
const projectRoot = this.getProjectRoot(projectData, "ios");
|
|
157
156
|
const name = projectData.projectName;
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
: null;
|
|
162
|
-
const workspace = (_a = generated === null || generated === void 0 ? void 0 : generated.workspace) !== null && _a !== void 0 ? _a : null;
|
|
163
|
-
if (!generated) {
|
|
164
|
-
try {
|
|
165
|
-
await this.$childProcess.spawnFromEvent("xcodegen", ["generate", "--quiet"], "close", { cwd: projectRoot, stdio: "inherit" });
|
|
166
|
-
}
|
|
167
|
-
catch (err) {
|
|
168
|
-
this.$errors.fail(err.code === "ENOENT"
|
|
169
|
-
? "The native iOS build generates its Xcode project with XcodeGen. Install it with 'brew install xcodegen'."
|
|
170
|
-
: err.message);
|
|
171
|
-
}
|
|
157
|
+
const marker = path.join(projectRoot, "ns-compiled-project.json");
|
|
158
|
+
if (!this.$fs.exists(marker)) {
|
|
159
|
+
this.$errors.fail(`${path.relative(projectData.projectDir, marker)} is missing: ns-compiled writes it when it compiles the app for iOS.`);
|
|
172
160
|
}
|
|
161
|
+
const generated = this.$fs.readJson(marker);
|
|
173
162
|
const projectArgs = [
|
|
174
|
-
...(workspace
|
|
175
|
-
? ["-workspace", workspace]
|
|
176
|
-
: ["-project",
|
|
163
|
+
...(generated.workspace
|
|
164
|
+
? ["-workspace", generated.workspace]
|
|
165
|
+
: ["-project", generated.project]),
|
|
177
166
|
"-scheme",
|
|
178
167
|
name,
|
|
179
168
|
"-configuration",
|
|
@@ -294,7 +283,7 @@ class CompiledReleaseService {
|
|
|
294
283
|
const logFile = path.join(projectRoot, "build", "compile-errors.log");
|
|
295
284
|
this.$fs.writeFile(logFile, errors.join("\n") + "\n");
|
|
296
285
|
try {
|
|
297
|
-
const result = await this.$childProcess.spawnFromEvent(process.execPath, [this.getCompilerBin(projectData, "ns-
|
|
286
|
+
const result = await this.$childProcess.spawnFromEvent(process.execPath, [this.getCompilerBin(projectData, "ns-compiled-retrace"), "--build-log", projectRoot, logFile], "close", { cwd: projectData.projectDir }, { throwError: false });
|
|
298
287
|
const mapped = result.stdout.split("\n").filter((line, k) => line && line !== errors[k]);
|
|
299
288
|
if (mapped.length) {
|
|
300
289
|
this.$logger.error(`Kotlin errors in your source:\n${mapped.join("\n")}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nativescript",
|
|
3
3
|
"main": "./lib/nativescript-cli-lib.js",
|
|
4
|
-
"version": "9.2.0-alpha.
|
|
4
|
+
"version": "9.2.0-alpha.2",
|
|
5
5
|
"author": "NativeScript <oss@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|