nativescript 8.6.0-vision.3 → 8.6.0-vision.5
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/README.md +1 -1
- package/docs/man_pages/cloud/cloud-setup.md +9 -9
- package/docs/man_pages/device/device-android.md +3 -3
- package/docs/man_pages/device/device-ios.md +5 -5
- package/docs/man_pages/device/device-list-applications.md +4 -4
- package/docs/man_pages/device/device-log.md +4 -4
- package/docs/man_pages/device/device-run.md +5 -5
- package/docs/man_pages/device/device.md +5 -5
- package/docs/man_pages/env-configuration/setup.md +3 -3
- package/docs/man_pages/general/autocomplete-disable.md +3 -3
- package/docs/man_pages/general/autocomplete-enable.md +3 -3
- package/docs/man_pages/general/autocomplete-status.md +3 -3
- package/docs/man_pages/general/autocomplete.md +6 -6
- package/docs/man_pages/general/error-reporting.md +3 -3
- package/docs/man_pages/general/extension-install.md +3 -3
- package/docs/man_pages/general/extension-uninstall.md +3 -3
- package/docs/man_pages/general/extension.md +3 -3
- package/docs/man_pages/general/help.md +6 -6
- package/docs/man_pages/general/info.md +3 -3
- package/docs/man_pages/general/migrate.md +3 -3
- package/docs/man_pages/general/package-manager-get.md +3 -3
- package/docs/man_pages/general/package-manager-set.md +3 -3
- package/docs/man_pages/general/package-manager.md +3 -3
- package/docs/man_pages/general/proxy-clear.md +3 -3
- package/docs/man_pages/general/proxy-set.md +3 -3
- package/docs/man_pages/general/proxy.md +3 -3
- package/docs/man_pages/general/update.md +5 -5
- package/docs/man_pages/general/usage-reporting.md +3 -3
- package/docs/man_pages/lib-management/plugin-add.md +4 -4
- package/docs/man_pages/lib-management/plugin-build.md +3 -3
- package/docs/man_pages/lib-management/plugin-create.md +7 -7
- package/docs/man_pages/lib-management/plugin-install.md +4 -4
- package/docs/man_pages/lib-management/plugin-remove.md +4 -4
- package/docs/man_pages/lib-management/plugin-update.md +3 -3
- package/docs/man_pages/lib-management/plugin.md +4 -4
- package/docs/man_pages/project/configuration/generate.md +3 -3
- package/docs/man_pages/project/configuration/install.md +6 -6
- package/docs/man_pages/project/configuration/platform-add.md +11 -11
- package/docs/man_pages/project/configuration/platform-clean.md +6 -6
- package/docs/man_pages/project/configuration/platform-remove.md +5 -5
- package/docs/man_pages/project/configuration/platform-update.md +11 -11
- package/docs/man_pages/project/configuration/platform.md +3 -3
- package/docs/man_pages/project/configuration/prepare.md +5 -5
- package/docs/man_pages/project/configuration/resources/resources-generate-icons.md +4 -4
- package/docs/man_pages/project/configuration/resources/resources-generate-splashes.md +4 -4
- package/docs/man_pages/project/configuration/resources/resources-update.md +5 -5
- package/docs/man_pages/project/creation/create.md +4 -4
- package/docs/man_pages/project/testing/build-android.md +4 -4
- package/docs/man_pages/project/testing/build-ios.md +6 -6
- package/docs/man_pages/project/testing/build.md +5 -5
- package/docs/man_pages/project/testing/debug-android.md +9 -9
- package/docs/man_pages/project/testing/debug-ios.md +11 -11
- package/docs/man_pages/project/testing/debug.md +4 -4
- package/docs/man_pages/project/testing/deploy.md +8 -8
- package/docs/man_pages/project/testing/dev-test-android.md +5 -5
- package/docs/man_pages/project/testing/dev-test-ios.md +7 -7
- package/docs/man_pages/project/testing/preview.md +4 -4
- package/docs/man_pages/project/testing/run-android.md +7 -7
- package/docs/man_pages/project/testing/run-ios.md +11 -11
- package/docs/man_pages/project/testing/run.md +7 -7
- package/docs/man_pages/project/testing/test-android.md +7 -7
- package/docs/man_pages/project/testing/test-init.md +3 -3
- package/docs/man_pages/project/testing/test-ios.md +9 -9
- package/docs/man_pages/project/testing/test.md +4 -4
- package/docs/man_pages/publishing/apple-login.md +3 -3
- package/docs/man_pages/publishing/appstore-upload.md +7 -7
- package/docs/man_pages/publishing/appstore.md +5 -5
- package/docs/man_pages/publishing/publish-ios.md +7 -7
- package/docs/man_pages/publishing/publish.md +6 -6
- package/docs/man_pages/start.md +2 -1
- package/lib/.d.ts +8 -0
- package/lib/bootstrap.js +4 -0
- package/lib/color.js +6 -1
- package/lib/commands/clean.js +4 -4
- package/lib/commands/run.js +7 -3
- package/lib/commands/start.js +33 -0
- package/lib/commands/typings.js +3 -3
- package/lib/common/definitions/config.d.ts +1 -0
- package/lib/common/definitions/key-commands.d.ts +61 -0
- package/lib/common/definitions/yok.d.ts +5 -0
- package/lib/common/header.js +30 -0
- package/lib/common/mobile/mobile-core/devices-service.js +11 -13
- package/lib/common/yok.js +25 -0
- package/lib/config.js +1 -0
- package/lib/controllers/migrate-controller.js +5 -5
- package/lib/controllers/prepare-controller.js +41 -4
- package/lib/controllers/run-controller.js +5 -0
- package/lib/definitions/livesync.d.ts +3 -0
- package/lib/definitions/prepare.d.ts +3 -0
- package/lib/definitions/project.d.ts +2 -0
- package/lib/definitions/run.d.ts +4 -1
- package/lib/definitions/start-service.d.ts +13 -0
- package/lib/helpers/key-command-helper.js +119 -0
- package/lib/helpers/livesync-command-helper.js +49 -18
- package/lib/key-commands/bootstrap.js +15 -0
- package/lib/key-commands/index.js +291 -0
- package/lib/services/android-plugin-build-service.js +6 -5
- package/lib/services/apple-portal/apple-portal-session-service.js +1 -1
- package/lib/services/build-artifacts-service.js +1 -1
- package/lib/services/ios-project-service.js +10 -10
- package/lib/services/livesync/android-livesync-tool.js +1 -1
- package/lib/services/plugins-service.js +2 -1
- package/lib/services/start-service.js +104 -0
- package/lib/services/webpack/webpack-compiler-service.js +9 -4
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
- package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
- package/node_modules/balanced-match/README.md +6 -0
- package/node_modules/balanced-match/index.js +3 -0
- package/node_modules/balanced-match/package.json +3 -4
- package/node_modules/rimraf/CHANGELOG.md +65 -0
- package/node_modules/stringify-package/CHANGELOG.md +16 -0
- package/package.json +4 -3
- package/node_modules/balanced-match/.npmignore +0 -5
- /package/node_modules/{brace-expansion → rimraf/node_modules/brace-expansion}/LICENSE +0 -0
- /package/node_modules/{brace-expansion → rimraf/node_modules/brace-expansion}/README.md +0 -0
- /package/node_modules/{brace-expansion → rimraf/node_modules/brace-expansion}/index.js +0 -0
- /package/node_modules/{brace-expansion → rimraf/node_modules/brace-expansion}/package.json +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.QuestionMark = exports.N = exports.C = exports.W = exports.CtrlC = exports.ShiftR = exports.R = exports.ShiftI = exports.I = exports.ShiftA = exports.A = void 0;
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const os_1 = require("os");
|
|
15
|
+
const path = require("path");
|
|
16
|
+
const color_1 = require("../color");
|
|
17
|
+
const yok_1 = require("../common/yok");
|
|
18
|
+
class A {
|
|
19
|
+
constructor($startService) {
|
|
20
|
+
this.$startService = $startService;
|
|
21
|
+
this.key = "a";
|
|
22
|
+
this.platform = "Android";
|
|
23
|
+
this.description = "Run android app";
|
|
24
|
+
}
|
|
25
|
+
execute() {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
this.$startService.runAndroid();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
canExecute(processType) {
|
|
31
|
+
return processType === "start";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.A = A;
|
|
35
|
+
class ShiftA {
|
|
36
|
+
constructor($logger, $liveSyncCommandHelper, $childProcess, $projectData) {
|
|
37
|
+
this.$logger = $logger;
|
|
38
|
+
this.$liveSyncCommandHelper = $liveSyncCommandHelper;
|
|
39
|
+
this.$childProcess = $childProcess;
|
|
40
|
+
this.$projectData = $projectData;
|
|
41
|
+
this.key = "A";
|
|
42
|
+
this.platform = "Android";
|
|
43
|
+
this.description = "Open android project in Android Studio";
|
|
44
|
+
this.willBlockKeyCommandExecution = true;
|
|
45
|
+
}
|
|
46
|
+
execute() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
this.$liveSyncCommandHelper.validatePlatform(this.platform);
|
|
49
|
+
this.$projectData.initializeProjectData();
|
|
50
|
+
const androidDir = `${this.$projectData.platformsDir}/android`;
|
|
51
|
+
if (!fs.existsSync(androidDir)) {
|
|
52
|
+
const prepareCommand = yok_1.injector.resolveCommand("prepare");
|
|
53
|
+
yield prepareCommand.execute([this.platform]);
|
|
54
|
+
process.stdin.resume();
|
|
55
|
+
}
|
|
56
|
+
const os = (0, os_1.platform)();
|
|
57
|
+
if (os === "darwin") {
|
|
58
|
+
const possibleStudioPaths = [
|
|
59
|
+
"/Applications/Android Studio.app",
|
|
60
|
+
`${process.env.HOME}/Applications/Android Studio.app`,
|
|
61
|
+
];
|
|
62
|
+
const studioPath = possibleStudioPaths.find((p) => {
|
|
63
|
+
this.$logger.trace(`Checking for Android Studio at ${p}`);
|
|
64
|
+
return fs.existsSync(p);
|
|
65
|
+
});
|
|
66
|
+
if (!studioPath) {
|
|
67
|
+
this.$logger.error("Android Studio is not installed, or not in a standard location.");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.$childProcess.exec(`open -a "${studioPath}" ${androidDir}`);
|
|
71
|
+
}
|
|
72
|
+
else if (os === "win32") {
|
|
73
|
+
const studioPath = path.join("C:", "Program Files", "Android", "Android Studio", "bin", "studio64.exe");
|
|
74
|
+
if (!fs.existsSync(studioPath)) {
|
|
75
|
+
this.$logger.error("Android Studio is not installed");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.$childProcess.exec(`"${studioPath}" "${androidDir}"`);
|
|
79
|
+
}
|
|
80
|
+
else if (os === "linux") {
|
|
81
|
+
if (!fs.existsSync(`/usr/local/android-studio/bin/studio.sh`)) {
|
|
82
|
+
this.$logger.error("Android Studio is not installed");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.$childProcess.exec(`/usr/local/android-studio/bin/studio.sh ${androidDir}`);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.ShiftA = ShiftA;
|
|
91
|
+
class I {
|
|
92
|
+
constructor($startService) {
|
|
93
|
+
this.$startService = $startService;
|
|
94
|
+
this.key = "i";
|
|
95
|
+
this.platform = "iOS";
|
|
96
|
+
this.description = "Run iOS app";
|
|
97
|
+
}
|
|
98
|
+
execute() {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
this.$startService.runIOS();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
canExecute(processType) {
|
|
104
|
+
return processType === "start";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.I = I;
|
|
108
|
+
class ShiftI {
|
|
109
|
+
constructor($logger, $childProcess, $projectData) {
|
|
110
|
+
this.$logger = $logger;
|
|
111
|
+
this.$childProcess = $childProcess;
|
|
112
|
+
this.$projectData = $projectData;
|
|
113
|
+
this.key = "I";
|
|
114
|
+
this.platform = "iOS";
|
|
115
|
+
this.description = "Open iOS project in Xcode";
|
|
116
|
+
this.willBlockKeyCommandExecution = true;
|
|
117
|
+
}
|
|
118
|
+
execute() {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
this.$projectData.initializeProjectData();
|
|
121
|
+
const iosDir = path.resolve(this.$projectData.platformsDir, "ios");
|
|
122
|
+
const xcprojectFile = path.resolve(iosDir);
|
|
123
|
+
if (!fs.existsSync(iosDir)) {
|
|
124
|
+
const prepareCommand = yok_1.injector.resolveCommand("prepare");
|
|
125
|
+
yield prepareCommand.execute(["ios"]);
|
|
126
|
+
process.stdin.resume();
|
|
127
|
+
}
|
|
128
|
+
const os = (0, os_1.platform)();
|
|
129
|
+
if (os === "darwin") {
|
|
130
|
+
if (!fs.existsSync("/Applications/Xcode.app")) {
|
|
131
|
+
this.$logger.error("Xcode is not installed");
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.$childProcess.exec(`open ${xcprojectFile}`);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.ShiftI = ShiftI;
|
|
140
|
+
class R {
|
|
141
|
+
constructor($liveSyncCommandHelper) {
|
|
142
|
+
this.$liveSyncCommandHelper = $liveSyncCommandHelper;
|
|
143
|
+
this.key = "r";
|
|
144
|
+
this.platform = "all";
|
|
145
|
+
this.description = "Rebuild native app if needed and restart";
|
|
146
|
+
this.willBlockKeyCommandExecution = true;
|
|
147
|
+
}
|
|
148
|
+
execute(platform) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
const devices = yield this.$liveSyncCommandHelper.getDeviceInstances(platform);
|
|
151
|
+
yield this.$liveSyncCommandHelper.executeLiveSyncOperation(devices, platform, {
|
|
152
|
+
restartLiveSync: true,
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.R = R;
|
|
158
|
+
class ShiftR {
|
|
159
|
+
constructor($liveSyncCommandHelper) {
|
|
160
|
+
this.$liveSyncCommandHelper = $liveSyncCommandHelper;
|
|
161
|
+
this.key = "R";
|
|
162
|
+
this.platform = "all";
|
|
163
|
+
this.description = "Force rebuild native app and restart";
|
|
164
|
+
this.willBlockKeyCommandExecution = true;
|
|
165
|
+
}
|
|
166
|
+
execute(platform) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const devices = yield this.$liveSyncCommandHelper.getDeviceInstances(platform);
|
|
169
|
+
yield this.$liveSyncCommandHelper.executeLiveSyncOperation(devices, platform, {
|
|
170
|
+
skipNativePrepare: false,
|
|
171
|
+
forceRebuildNativeApp: true,
|
|
172
|
+
restartLiveSync: true,
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
exports.ShiftR = ShiftR;
|
|
178
|
+
class CtrlC {
|
|
179
|
+
constructor() {
|
|
180
|
+
this.key = "\u0003";
|
|
181
|
+
this.platform = "all";
|
|
182
|
+
this.willBlockKeyCommandExecution = false;
|
|
183
|
+
}
|
|
184
|
+
execute() {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
process.exit();
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.CtrlC = CtrlC;
|
|
191
|
+
class W {
|
|
192
|
+
constructor($prepareController) {
|
|
193
|
+
this.$prepareController = $prepareController;
|
|
194
|
+
this.key = "w";
|
|
195
|
+
this.platform = "all";
|
|
196
|
+
this.description = "Toggle file watcher";
|
|
197
|
+
this.willBlockKeyCommandExecution = true;
|
|
198
|
+
}
|
|
199
|
+
execute() {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
try {
|
|
202
|
+
const paused = yield this.$prepareController.toggleFileWatcher();
|
|
203
|
+
process.stdout.write(paused
|
|
204
|
+
? color_1.color.gray("Paused watching file changes... Press 'w' to resume.")
|
|
205
|
+
: color_1.color.bgGreen("Resumed watching file changes"));
|
|
206
|
+
}
|
|
207
|
+
catch (e) { }
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
exports.W = W;
|
|
212
|
+
class C {
|
|
213
|
+
constructor($childProcess, $liveSyncCommandHelper) {
|
|
214
|
+
this.$childProcess = $childProcess;
|
|
215
|
+
this.$liveSyncCommandHelper = $liveSyncCommandHelper;
|
|
216
|
+
this.key = "c";
|
|
217
|
+
this.platform = "all";
|
|
218
|
+
this.description = "Clean project";
|
|
219
|
+
this.willBlockKeyCommandExecution = true;
|
|
220
|
+
}
|
|
221
|
+
execute() {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
yield this.$liveSyncCommandHelper.stop();
|
|
224
|
+
const clean = this.$childProcess.spawn("ns", ["clean"]);
|
|
225
|
+
clean.stdout.on("data", (data) => {
|
|
226
|
+
process.stdout.write(data);
|
|
227
|
+
if (data.toString().includes("Project successfully cleaned.") ||
|
|
228
|
+
data.toString().includes("Project unsuccessfully cleaned.")) {
|
|
229
|
+
clean.kill("SIGINT");
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
exports.C = C;
|
|
236
|
+
class N {
|
|
237
|
+
constructor() {
|
|
238
|
+
this.key = "n";
|
|
239
|
+
this.platform = "all";
|
|
240
|
+
this.description = "Install dependencies";
|
|
241
|
+
this.willBlockKeyCommandExecution = true;
|
|
242
|
+
}
|
|
243
|
+
execute(platform) {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
const install = yok_1.injector.resolveCommand("install");
|
|
246
|
+
yield install.execute([]);
|
|
247
|
+
process.stdin.resume();
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
exports.N = N;
|
|
252
|
+
class QuestionMark {
|
|
253
|
+
constructor($keyCommandHelper) {
|
|
254
|
+
this.$keyCommandHelper = $keyCommandHelper;
|
|
255
|
+
this.key = "?";
|
|
256
|
+
this.platform = "all";
|
|
257
|
+
this.description = "Show this help";
|
|
258
|
+
this.willBlockKeyCommandExecution = true;
|
|
259
|
+
}
|
|
260
|
+
execute(platform_) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
let platform;
|
|
263
|
+
switch (platform_.toLowerCase()) {
|
|
264
|
+
case "android":
|
|
265
|
+
platform = "Android";
|
|
266
|
+
break;
|
|
267
|
+
case "ios":
|
|
268
|
+
platform = "iOS";
|
|
269
|
+
break;
|
|
270
|
+
default:
|
|
271
|
+
platform = "all";
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
this.$keyCommandHelper.printCommands(platform);
|
|
275
|
+
process.stdin.resume();
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
exports.QuestionMark = QuestionMark;
|
|
280
|
+
yok_1.injector.registerKeyCommand("a", A);
|
|
281
|
+
yok_1.injector.registerKeyCommand("i", I);
|
|
282
|
+
yok_1.injector.registerKeyCommand("A", ShiftA);
|
|
283
|
+
yok_1.injector.registerKeyCommand("I", ShiftI);
|
|
284
|
+
yok_1.injector.registerKeyCommand("r", R);
|
|
285
|
+
yok_1.injector.registerKeyCommand("R", ShiftR);
|
|
286
|
+
yok_1.injector.registerKeyCommand("w", W);
|
|
287
|
+
yok_1.injector.registerKeyCommand("c", C);
|
|
288
|
+
yok_1.injector.registerKeyCommand("A", ShiftA);
|
|
289
|
+
yok_1.injector.registerKeyCommand("n", N);
|
|
290
|
+
yok_1.injector.registerKeyCommand("?", QuestionMark);
|
|
291
|
+
yok_1.injector.registerKeyCommand("\u0003", CtrlC);
|
|
@@ -44,7 +44,7 @@ class AndroidPluginBuildService {
|
|
|
44
44
|
this.$watchIgnoreListService = $watchIgnoreListService;
|
|
45
45
|
}
|
|
46
46
|
getAndroidSourceDirectories(source) {
|
|
47
|
-
const directories = [constants_1.RESOURCES_DIR, "java", constants_1.ASSETS_DIR, "jniLibs"];
|
|
47
|
+
const directories = [constants_1.RESOURCES_DIR, "java", constants_1.ASSETS_DIR, "jniLibs", "cpp"];
|
|
48
48
|
const resultArr = [];
|
|
49
49
|
this.$fs.enumerateFilesInDirectorySync(source, (file, stat) => {
|
|
50
50
|
if (stat.isDirectory() &&
|
|
@@ -310,7 +310,7 @@ class AndroidPluginBuildService {
|
|
|
310
310
|
return null;
|
|
311
311
|
}
|
|
312
312
|
if (installedRuntimePackageJSON.version_info) {
|
|
313
|
-
const { gradle, gradleAndroid
|
|
313
|
+
const { gradle, gradleAndroid } = installedRuntimePackageJSON.version_info;
|
|
314
314
|
return {
|
|
315
315
|
gradleVersion: gradle,
|
|
316
316
|
gradleAndroidPluginVersion: gradleAndroid,
|
|
@@ -449,9 +449,10 @@ class AndroidPluginBuildService {
|
|
|
449
449
|
validateTargetSdk: true,
|
|
450
450
|
projectDir: pluginBuildSettings.projectDir,
|
|
451
451
|
});
|
|
452
|
-
pluginBuildSettings.androidToolsInfo =
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
pluginBuildSettings.androidToolsInfo =
|
|
453
|
+
this.$androidToolsInfo.getToolsInfo({
|
|
454
|
+
projectDir: pluginBuildSettings.projectDir,
|
|
455
|
+
});
|
|
455
456
|
}
|
|
456
457
|
const gradlew = (_a = pluginBuildSettings.gradlePath) !== null && _a !== void 0 ? _a : (this.$hostInfo.isWindows ? "gradlew.bat" : "./gradlew");
|
|
457
458
|
const localArgs = [
|
|
@@ -123,7 +123,7 @@ This password will be used for the iTunes Transporter, which is used to upload y
|
|
|
123
123
|
!(0, helpers_1.isInteractive)()) {
|
|
124
124
|
this.$errors
|
|
125
125
|
.fail(`Your account has two-factor authentication enabled, but your console is not interactive.
|
|
126
|
-
For more details how to set up your environment, please execute "
|
|
126
|
+
For more details how to set up your environment, please execute "ns publish ios --help".`);
|
|
127
127
|
}
|
|
128
128
|
const headers = (err && err.response && err.response.headers) || {};
|
|
129
129
|
result.scnt = headers.scnt;
|
|
@@ -26,7 +26,7 @@ class BuildArtifactsService {
|
|
|
26
26
|
const applicationPackage = this.getLatestApplicationPackage(outputPath, platformData.getValidBuildOutputData(buildOutputOptions));
|
|
27
27
|
const packageFile = applicationPackage.packageName;
|
|
28
28
|
if (!packageFile || !this.$fs.exists(packageFile)) {
|
|
29
|
-
this.$errors.fail(`Unable to find built application. Try '
|
|
29
|
+
this.$errors.fail(`Unable to find built application. Try 'ns build ${platformData.platformNameLowerCase}'.`);
|
|
30
30
|
}
|
|
31
31
|
return packageFile;
|
|
32
32
|
});
|
|
@@ -270,8 +270,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
270
270
|
}
|
|
271
271
|
isDynamicFramework(frameworkPath) {
|
|
272
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
-
const
|
|
274
|
-
const isDynamicFrameworkBundle = (bundlePath) => __awaiter(this, void 0, void 0, function* () {
|
|
273
|
+
const isDynamicFrameworkBundle = (bundlePath, frameworkName) => __awaiter(this, void 0, void 0, function* () {
|
|
275
274
|
const frameworkBinaryPath = path.join(bundlePath, frameworkName);
|
|
276
275
|
const fileResult = (yield this.$childProcess.spawnFromEvent("file", [frameworkBinaryPath], "close")).stdout;
|
|
277
276
|
const isDynamicallyLinked = _.includes(fileResult, "dynamically linked");
|
|
@@ -279,20 +278,20 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
279
278
|
});
|
|
280
279
|
if (path.extname(frameworkPath) === ".xcframework") {
|
|
281
280
|
let isDynamic = true;
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
for (const subDir of subDirs) {
|
|
286
|
-
const singlePlatformFramework = path.join(subDir, frameworkName + ".framework");
|
|
281
|
+
const plistJson = this.$plistParser.parseFileSync(path.join(frameworkPath, "Info.plist"));
|
|
282
|
+
for (const library of plistJson.AvailableLibraries) {
|
|
283
|
+
const singlePlatformFramework = path.join(frameworkPath, library.LibraryIdentifier, library.LibraryPath);
|
|
287
284
|
if (this.$fs.exists(singlePlatformFramework)) {
|
|
288
|
-
|
|
285
|
+
const frameworkName = path.basename(singlePlatformFramework, path.extname(singlePlatformFramework));
|
|
286
|
+
isDynamic = yield isDynamicFrameworkBundle(singlePlatformFramework, frameworkName);
|
|
289
287
|
break;
|
|
290
288
|
}
|
|
291
289
|
}
|
|
292
290
|
return isDynamic;
|
|
293
291
|
}
|
|
294
292
|
else {
|
|
295
|
-
|
|
293
|
+
const frameworkName = path.basename(frameworkPath, path.extname(frameworkPath));
|
|
294
|
+
return yield isDynamicFrameworkBundle(frameworkPath, frameworkName);
|
|
296
295
|
}
|
|
297
296
|
});
|
|
298
297
|
}
|
|
@@ -302,7 +301,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
302
301
|
this.validateFramework(frameworkPath);
|
|
303
302
|
const project = this.createPbxProj(projectData);
|
|
304
303
|
const frameworkAddOptions = { customFramework: true };
|
|
305
|
-
|
|
304
|
+
const dynamic = yield this.isDynamicFramework(frameworkPath);
|
|
305
|
+
if (dynamic) {
|
|
306
306
|
frameworkAddOptions["embed"] = true;
|
|
307
307
|
frameworkAddOptions["sign"] = true;
|
|
308
308
|
}
|
|
@@ -282,7 +282,7 @@ class AndroidLivesyncTool {
|
|
|
282
282
|
this.$logger.trace("In Android LiveSync tool, lastKnownError is: ", lastKnownError);
|
|
283
283
|
this.$logger.info(color_1.color.yellow(`Application ${configuration.appIdentifier} is not running on device ${configuration.deviceIdentifier}.`));
|
|
284
284
|
this.$logger.info(color_1.color.cyan(`This issue may be caused by:
|
|
285
|
-
* crash at startup (try \`
|
|
285
|
+
* crash at startup (try \`ns debug android --debug-brk\` to check why it crashes)
|
|
286
286
|
* different application identifier in your package.json and in your gradle files (check your identifier in \`package.json\` and in all *.gradle files in your App_Resources directory)
|
|
287
287
|
* device is locked
|
|
288
288
|
* manual closing of the application`));
|
|
@@ -130,10 +130,11 @@ class PluginsService {
|
|
|
130
130
|
if (!oldPluginNativeHashes ||
|
|
131
131
|
this.$filesHashService.hasChangesInShasums(oldPluginNativeHashes, currentPluginNativeHashes)) {
|
|
132
132
|
yield platformData.platformProjectService.preparePluginNativeCode(pluginData, projectData);
|
|
133
|
+
const updatedPluginNativeHashes = yield this.getPluginNativeHashes(pluginPlatformsFolderPath);
|
|
133
134
|
this.setPluginNativeHashes({
|
|
134
135
|
pathToPluginsBuildFile,
|
|
135
136
|
pluginData,
|
|
136
|
-
currentPluginNativeHashes,
|
|
137
|
+
currentPluginNativeHashes: updatedPluginNativeHashes,
|
|
137
138
|
allPluginsNativeHashes,
|
|
138
139
|
});
|
|
139
140
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const yok_1 = require("../common/yok");
|
|
13
|
+
class StartService {
|
|
14
|
+
constructor($keyCommandHelper, $childProcess, $devicePlatformsConstants, $projectData, $logger, $staticConfig) {
|
|
15
|
+
this.$keyCommandHelper = $keyCommandHelper;
|
|
16
|
+
this.$childProcess = $childProcess;
|
|
17
|
+
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
18
|
+
this.$projectData = $projectData;
|
|
19
|
+
this.$logger = $logger;
|
|
20
|
+
this.$staticConfig = $staticConfig;
|
|
21
|
+
this.verbose = false;
|
|
22
|
+
}
|
|
23
|
+
toggleVerbose() {
|
|
24
|
+
this.verbose = true;
|
|
25
|
+
this.$logger.info(this.verbose ? `Verbose logging enabled` : `Verbose logging disabled`);
|
|
26
|
+
}
|
|
27
|
+
format(data, platform) {
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
runForPlatform(platform) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const platformLowerCase = platform.toLowerCase();
|
|
33
|
+
this[platformLowerCase] = this.$childProcess.spawn("node", [this.$staticConfig.cliBinPath, "run", platform.toLowerCase()], {
|
|
34
|
+
cwd: this.$projectData.projectDir,
|
|
35
|
+
stdio: ["ipc"],
|
|
36
|
+
env: Object.assign({ FORCE_COLOR: 1, HIDE_HEADER: true, NS_IS_INTERACTIVE: true }, process.env),
|
|
37
|
+
});
|
|
38
|
+
this[platformLowerCase].stdout.on("data", (data) => {
|
|
39
|
+
process.stdout.write(this.format(data, platform));
|
|
40
|
+
});
|
|
41
|
+
this[platformLowerCase].stderr.on("data", (data) => {
|
|
42
|
+
process.stderr.write(this.format(data, platform));
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
runIOS() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
this.runForPlatform(this.$devicePlatformsConstants.iOS);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
runAndroid() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
this.runForPlatform(this.$devicePlatformsConstants.Android);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
stopIOS() {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
if (this.ios) {
|
|
59
|
+
this.ios.kill("SIGINT");
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
stopAndroid() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
if (this.android) {
|
|
66
|
+
this.android.kill("SIGINT");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
start() {
|
|
71
|
+
this.addKeyCommandOverrides();
|
|
72
|
+
this.$keyCommandHelper.attachKeyCommands("all", "start");
|
|
73
|
+
this.$keyCommandHelper.printCommands("all");
|
|
74
|
+
}
|
|
75
|
+
addKeyCommandOverrides() {
|
|
76
|
+
const keys = ["w", "r", "R"];
|
|
77
|
+
for (let key of keys) {
|
|
78
|
+
this.$keyCommandHelper.addOverride(key, () => __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
(_a = this.ios) === null || _a === void 0 ? void 0 : _a.send(key);
|
|
81
|
+
(_b = this.android) === null || _b === void 0 ? void 0 : _b.send(key);
|
|
82
|
+
return false;
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
this.$keyCommandHelper.addOverride("c", () => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
yield this.stopIOS();
|
|
87
|
+
yield this.stopAndroid();
|
|
88
|
+
const clean = this.$childProcess.spawn("node", [
|
|
89
|
+
this.$staticConfig.cliBinPath,
|
|
90
|
+
"clean",
|
|
91
|
+
]);
|
|
92
|
+
clean.stdout.on("data", (data) => {
|
|
93
|
+
process.stdout.write(data);
|
|
94
|
+
if (data.toString().includes("Project successfully cleaned.") ||
|
|
95
|
+
data.toString().includes("Project unsuccessfully cleaned.")) {
|
|
96
|
+
clean.kill("SIGINT");
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return false;
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.default = StartService;
|
|
104
|
+
yok_1.injector.register("startService", StartService);
|
|
@@ -52,6 +52,12 @@ class WebpackCompilerService extends events_1.EventEmitter {
|
|
|
52
52
|
prepareData.watch = true;
|
|
53
53
|
try {
|
|
54
54
|
const childProcess = yield this.startWebpackProcess(platformData, projectData, prepareData);
|
|
55
|
+
childProcess.stdout.on("data", function (data) {
|
|
56
|
+
process.stdout.write(data);
|
|
57
|
+
});
|
|
58
|
+
childProcess.stderr.on("data", function (data) {
|
|
59
|
+
process.stderr.write(data);
|
|
60
|
+
});
|
|
55
61
|
childProcess.on("message", (message) => {
|
|
56
62
|
this.$logger.trace("Message from webpack", message);
|
|
57
63
|
if (typeof message === "object" &&
|
|
@@ -72,7 +78,8 @@ class WebpackCompilerService extends events_1.EventEmitter {
|
|
|
72
78
|
if (message.emittedFiles) {
|
|
73
79
|
if (isFirstWebpackWatchCompilation) {
|
|
74
80
|
isFirstWebpackWatchCompilation = false;
|
|
75
|
-
this.expectedHashes[platformData.platformNameLowerCase] =
|
|
81
|
+
this.expectedHashes[platformData.platformNameLowerCase] =
|
|
82
|
+
prepareData.hmr ? message.hash : "";
|
|
76
83
|
return;
|
|
77
84
|
}
|
|
78
85
|
const previousHash = this.expectedHashes[platformData.platformNameLowerCase];
|
|
@@ -206,9 +213,7 @@ class WebpackCompilerService extends events_1.EventEmitter {
|
|
|
206
213
|
if (prepareData.watch) {
|
|
207
214
|
args.push("--watch");
|
|
208
215
|
}
|
|
209
|
-
const stdio = prepareData.watch
|
|
210
|
-
? ["inherit", "inherit", "inherit", "ipc"]
|
|
211
|
-
: "inherit";
|
|
216
|
+
const stdio = prepareData.watch ? ["ipc"] : "inherit";
|
|
212
217
|
const childProcess = this.$childProcess.spawn(process.execPath, args, {
|
|
213
218
|
cwd: projectData.projectDir,
|
|
214
219
|
stdio,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changers Lorgs!
|
|
2
|
+
|
|
3
|
+
## 1.0
|
|
4
|
+
|
|
5
|
+
Full rewrite. Essentially a brand new module.
|
|
6
|
+
|
|
7
|
+
- Return a promise instead of taking a callback.
|
|
8
|
+
- Use native `fs.mkdir(path, { recursive: true })` when available.
|
|
9
|
+
- Drop support for outdated Node.js versions. (Technically still works on
|
|
10
|
+
Node.js v8, but only 10 and above are officially supported.)
|
|
11
|
+
|
|
12
|
+
## 0.x
|
|
13
|
+
|
|
14
|
+
Original and most widely used recursive directory creation implementation
|
|
15
|
+
in JavaScript, dating back to 2010.
|
|
@@ -66,6 +66,12 @@ With [npm](https://npmjs.org) do:
|
|
|
66
66
|
npm install balanced-match
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
## Security contact information
|
|
70
|
+
|
|
71
|
+
To report a security vulnerability, please use the
|
|
72
|
+
[Tidelift security contact](https://tidelift.com/security).
|
|
73
|
+
Tidelift will coordinate the fix and disclosure.
|
|
74
|
+
|
|
69
75
|
## License
|
|
70
76
|
|
|
71
77
|
(MIT)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balanced-match",
|
|
3
3
|
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git://github.com/juliangruber/balanced-match.git"
|
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
"homepage": "https://github.com/juliangruber/balanced-match",
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"test": "
|
|
13
|
-
"bench": "
|
|
12
|
+
"test": "tape test/test.js",
|
|
13
|
+
"bench": "matcha test/bench.js"
|
|
14
14
|
},
|
|
15
|
-
"dependencies": {},
|
|
16
15
|
"devDependencies": {
|
|
17
16
|
"matcha": "^0.7.0",
|
|
18
17
|
"tape": "^4.6.0"
|