@akylas/nativescript-cli 8.8.5 → 8.8.7

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/.d.ts CHANGED
@@ -338,6 +338,7 @@
338
338
  /// <reference path="services/apple-portal/apple-portal-cookie-service.ts" />
339
339
  /// <reference path="services/apple-portal/apple-portal-session-service.ts" />
340
340
  /// <reference path="services/apple-portal/definitions.d.ts" />
341
+ /// <reference path="services/apple-portal/srp/srp-wrapper.ts" />
341
342
  /// <reference path="services/assets-generation/assets-generation-service.ts" />
342
343
  /// <reference path="services/build-artifacts-service.ts" />
343
344
  /// <reference path="services/build-data-service.ts" />
@@ -34,8 +34,7 @@ class PublishIOS {
34
34
  (await this.$prompter.getString("Apple ID", { allowEmpty: false }));
35
35
  const password = args[1] || (await this.$prompter.getPassword("Apple ID password"));
36
36
  const user = await this.$applePortalSessionService.createUserSession({ username, password }, {
37
- applicationSpecificPassword: this.$options
38
- .appleApplicationSpecificPassword,
37
+ applicationSpecificPassword: this.$options.appleApplicationSpecificPassword,
39
38
  sessionBase64: this.$options.appleSessionBase64,
40
39
  requireInteractiveConsole: true,
41
40
  requireApplicationSpecificPassword: true,
@@ -56,9 +55,8 @@ class PublishIOS {
56
55
  if (mobileProvisionIdentifier) {
57
56
  this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
58
57
  mobileProvisionIdentifier);
59
- this.$options.forDevice = true;
60
58
  this.$options.provision = mobileProvisionIdentifier;
61
- const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, watch: false });
59
+ const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, buildForAppStore: true, watch: false });
62
60
  ipaFilePath = await this.$buildController.prepareAndBuild(buildData);
63
61
  }
64
62
  else {
@@ -71,8 +69,7 @@ class PublishIOS {
71
69
  await this.$itmsTransporterService.upload({
72
70
  credentials: { username, password },
73
71
  user,
74
- applicationSpecificPassword: this.$options
75
- .appleApplicationSpecificPassword,
72
+ applicationSpecificPassword: this.$options.appleApplicationSpecificPassword,
76
73
  ipaFilePath,
77
74
  shouldExtractIpa: !!this.$options.ipa,
78
75
  verboseLogging: this.$logger.getLevel() === "TRACE",
@@ -154,7 +154,7 @@ class CreateProjectCommand {
154
154
  this.$logger.printMarkdown(`# Let’s create a NativeScript app!`);
155
155
  this.$logger.printMarkdown(`
156
156
  Answer the following questions to help us build the right app for you. (Note: you
157
- can skip this prompt next time using the --template option, or the --ng, --react, --vue, --svelte, --ts, or --js flags.)
157
+ can skip this prompt next time using the --template option, or using --ng, --react, --solid, --svelte, --vue, --ts, or --js flags.)
158
158
  `);
159
159
  }
160
160
  }
@@ -296,6 +296,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
296
296
  value: constants.RESERVED_TEMPLATE_NAMES.solid,
297
297
  description: CreateProjectCommand.HelloWorldTemplateDescription,
298
298
  },
299
+ {
300
+ key: `${CreateProjectCommand.HelloWorldTemplateKey} using TypeScript`,
301
+ value: constants.RESERVED_TEMPLATE_NAMES.solidts,
302
+ description: `${CreateProjectCommand.HelloWorldTemplateDescription} using TypeScript`,
303
+ },
299
304
  {
300
305
  key: CreateProjectCommand.BlankVisionTemplateKey,
301
306
  value: "@nativescript/template-blank-solid-vision",
@@ -18,7 +18,7 @@ const cli_layout_1 = require("./layouts/cli-layout");
18
18
  const constants_1 = require("../../constants");
19
19
  const yok_1 = require("../yok");
20
20
  const color_1 = require("../../color");
21
- const TerminalRenderer = require("marked-terminal");
21
+ const markedTerminal = require("marked-terminal").markedTerminal;
22
22
  class Logger {
23
23
  constructor($config) {
24
24
  this.$config = $config;
@@ -123,7 +123,7 @@ class Logger {
123
123
  },
124
124
  },
125
125
  };
126
- marked_1.marked.setOptions({ renderer: new TerminalRenderer(opts) });
126
+ marked_1.marked.use(markedTerminal(opts));
127
127
  const formattedMessage = (0, marked_1.marked)(util.format.apply(null, args));
128
128
  this.info(formattedMessage, { [constants_1.LoggerConfigData.skipNewLine]: true });
129
129
  }
@@ -15,27 +15,29 @@ class AndroidIniFileParser {
15
15
  const encoding = this.getAvdEncoding(iniFilePath);
16
16
  const contents = this.$fs.readText(iniFilePath, encoding).split("\n");
17
17
  return _.reduce(contents, (result, line) => {
18
+ var _a, _b;
18
19
  const parsedLine = line.split("=");
19
- const key = parsedLine[0];
20
+ const key = (_a = parsedLine[0]) === null || _a === void 0 ? void 0 : _a.trim();
21
+ const value = (_b = parsedLine[1]) === null || _b === void 0 ? void 0 : _b.trim();
20
22
  switch (key) {
21
23
  case "target":
22
- result.target = parsedLine[1];
24
+ result.target = value;
23
25
  result.targetNum = this.readTargetNum(result.target);
24
26
  break;
25
27
  case "path":
26
28
  case "AvdId":
27
- result[_.lowerFirst(key)] = parsedLine[1];
29
+ result[_.lowerFirst(key)] = value;
28
30
  break;
29
31
  case "hw.device.name":
30
- result.device = parsedLine[1];
32
+ result.device = value;
31
33
  break;
32
34
  case "avd.ini.displayname":
33
- result.displayName = parsedLine[1];
35
+ result.displayName = value;
34
36
  break;
35
37
  case "abi.type":
36
38
  case "skin.name":
37
39
  case "sdcard.size":
38
- result[key.split(".")[0]] = parsedLine[1];
40
+ result[key.split(".")[0]] = value;
39
41
  break;
40
42
  }
41
43
  return result;
@@ -143,7 +143,7 @@ class LogcatHelper {
143
143
  "ActivityManager",
144
144
  ];
145
145
  if (appId) {
146
- logcatCommand.push(`--regex=START.*${appId}`);
146
+ logcatCommand.push(`--regex=Start.*${appId}`);
147
147
  }
148
148
  const appStartTrackingStream = await adb.executeCommand(logcatCommand, {
149
149
  returnChildProcess: true,
package/lib/constants.js CHANGED
@@ -146,6 +146,7 @@ exports.RESERVED_TEMPLATE_NAMES = {
146
146
  reactjs: "@nativescript/template-blank-react",
147
147
  solid: "@nativescript/template-blank-solid",
148
148
  solidjs: "@nativescript/template-blank-solid",
149
+ solidts: "@nativescript/template-blank-solid-ts",
149
150
  svelte: "@nativescript/template-blank-svelte",
150
151
  vision: "@nativescript/template-hello-world-ts-vision",
151
152
  "vision-vue": "@nativescript/template-blank-vue-vision",
@@ -97,7 +97,7 @@ class PrepareController extends events_1.EventEmitter {
97
97
  platform: prepareData.platform.toLowerCase(),
98
98
  };
99
99
  }
100
- await this.writeRuntimePackageJson(projectData, platformData);
100
+ await this.writeRuntimePackageJson(projectData, platformData, prepareData);
101
101
  await this.$projectChangesService.savePrepareInfo(platformData, projectData, prepareData);
102
102
  this.$logger.info(`Project successfully prepared (${prepareData.platform.toLowerCase()})`);
103
103
  return result;
@@ -228,7 +228,7 @@ class PrepareController extends events_1.EventEmitter {
228
228
  .concat(pluginsPackageJsonFiles);
229
229
  return patterns;
230
230
  }
231
- async writeRuntimePackageJson(projectData, platformData) {
231
+ async writeRuntimePackageJson(projectData, platformData, prepareData = null) {
232
232
  var _a, _b;
233
233
  const configInfo = this.$projectConfigService.detectProjectConfigs(projectData.projectDir);
234
234
  if (configInfo.usingNSConfig) {
@@ -303,6 +303,9 @@ class PrepareController extends events_1.EventEmitter {
303
303
  catch (error) {
304
304
  this.$logger.trace("Failed to read emitted package.json. Error is: ", error);
305
305
  }
306
+ if (prepareData === null || prepareData === void 0 ? void 0 : prepareData.uniqueBundle) {
307
+ packageData.main = `${packageData.main}.${prepareData.uniqueBundle}`;
308
+ }
306
309
  this.$fs.writeJson(packagePath, packageData);
307
310
  }
308
311
  emitPrepareEvent(filesChangeEventData) {
@@ -33,6 +33,7 @@ class PrepareData extends controller_data_base_1.ControllerDataBase {
33
33
  this.watchNative = data.watchNative;
34
34
  }
35
35
  this.hostProjectPath = data.hostProjectPath;
36
+ this.uniqueBundle = !this.watch && data.uniqueBundle ? Date.now() : 0;
36
37
  }
37
38
  }
38
39
  exports.PrepareData = PrepareData;
@@ -711,7 +711,7 @@ interface IOptions
711
711
  dryRun: boolean;
712
712
 
713
713
  platformOverride: string;
714
-
714
+ uniqueBundle: boolean;
715
715
  // allow arbitrary options
716
716
  [optionName: string]: any;
717
717
  }
@@ -14,6 +14,8 @@ declare global {
14
14
 
15
15
  // embedding
16
16
  hostProjectPath?: string;
17
+
18
+ uniqueBundle: number;
17
19
  }
18
20
 
19
21
  interface IiOSCodeSigningData {
@@ -35,6 +35,25 @@ class ShiftA {
35
35
  this.willBlockKeyCommandExecution = true;
36
36
  this.isInteractive = true;
37
37
  }
38
+ getAndroidStudioPath() {
39
+ const os = (0, os_1.platform)();
40
+ if (os === "darwin") {
41
+ const possibleStudioPaths = [
42
+ "/Applications/Android Studio.app",
43
+ `${process.env.HOME}/Applications/Android Studio.app`,
44
+ ];
45
+ return possibleStudioPaths.find((p) => fs.existsSync(p)) || null;
46
+ }
47
+ else if (os === "win32") {
48
+ const studioPath = path.join("C:", "Program Files", "Android", "Android Studio", "bin", "studio64.exe");
49
+ return fs.existsSync(studioPath) ? studioPath : null;
50
+ }
51
+ else if (os === "linux") {
52
+ const studioPath = "/usr/local/android-studio/bin/studio.sh";
53
+ return fs.existsSync(studioPath) ? studioPath : null;
54
+ }
55
+ return null;
56
+ }
38
57
  async execute() {
39
58
  this.$liveSyncCommandHelper.validatePlatform(this.platform);
40
59
  this.$projectData.initializeProjectData();
@@ -46,28 +65,20 @@ class ShiftA {
46
65
  process.stdin.resume();
47
66
  }
48
67
  }
49
- const os = (0, os_1.platform)();
50
- if (os === "darwin") {
51
- const possibleStudioPaths = [
52
- "/Applications/Android Studio.app",
53
- `${process.env.HOME}/Applications/Android Studio.app`,
54
- ];
55
- const studioPath = possibleStudioPaths.find((p) => {
56
- this.$logger.trace(`Checking for Android Studio at ${p}`);
57
- return fs.existsSync(p);
58
- });
68
+ let studioPath = null;
69
+ studioPath = process.env.NATIVESCRIPT_ANDROID_STUDIO_PATH;
70
+ if (!studioPath) {
71
+ studioPath = this.getAndroidStudioPath();
59
72
  if (!studioPath) {
60
- this.$logger.error("Android Studio is not installed, or not in a standard location.");
73
+ this.$logger.error("Android Studio is not installed, or is not in a standard location. Use NATIVESCRIPT_ANDROID_STUDIO_PATH.");
61
74
  return;
62
75
  }
76
+ }
77
+ const os = (0, os_1.platform)();
78
+ if (os === "darwin") {
63
79
  this.$childProcess.exec(`open -a "${studioPath}" ${androidDir}`);
64
80
  }
65
81
  else if (os === "win32") {
66
- const studioPath = path.join("C:", "Program Files", "Android", "Android Studio", "bin", "studio64.exe");
67
- if (!fs.existsSync(studioPath)) {
68
- this.$logger.error("Android Studio is not installed");
69
- return;
70
- }
71
82
  const child = this.$childProcess.spawn(studioPath, [androidDir], {
72
83
  detached: true,
73
84
  stdio: "ignore",
@@ -75,11 +86,7 @@ class ShiftA {
75
86
  child.unref();
76
87
  }
77
88
  else if (os === "linux") {
78
- if (!fs.existsSync(`/usr/local/android-studio/bin/studio.sh`)) {
79
- this.$logger.error("Android Studio is not installed");
80
- return;
81
- }
82
- this.$childProcess.exec(`/usr/local/android-studio/bin/studio.sh ${androidDir}`);
89
+ this.$childProcess.exec(`${studioPath} ${androidDir}`);
83
90
  }
84
91
  }
85
92
  }
package/lib/options.js CHANGED
@@ -227,6 +227,7 @@ class Options {
227
227
  default: true,
228
228
  },
229
229
  dryRun: { type: "boolean", hasSensitiveValue: false },
230
+ uniqueBundle: { type: "boolean", hasSensitiveValue: false },
230
231
  };
231
232
  }
232
233
  get optionNames() {
@@ -21,7 +21,7 @@ class ApplePortalApplicationService {
21
21
  async getApplicationsByProvider(contentProviderId) {
22
22
  const webSessionCookie = await this.$applePortalSessionService.createWebSession(contentProviderId);
23
23
  const summaries = [];
24
- await this.getApplicationsByUrl(webSessionCookie, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions,prices", summaries);
24
+ await this.getApplicationsByUrl(webSessionCookie, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions", summaries);
25
25
  return { summaries: summaries };
26
26
  }
27
27
  async getApplicationsByUrl(webSessionCookie, url, summaries) {
@@ -4,6 +4,7 @@ exports.ApplePortalSessionService = void 0;
4
4
  const helpers_1 = require("../../common/helpers");
5
5
  const yok_1 = require("../../common/yok");
6
6
  const crypto = require("crypto");
7
+ const srp_wrapper_1 = require("./srp/srp-wrapper");
7
8
  class ApplePortalSessionService {
8
9
  constructor($applePortalCookieService, $errors, $httpClient, $logger, $prompter) {
9
10
  this.$applePortalCookieService = $applePortalCookieService;
@@ -123,26 +124,41 @@ For more details how to set up your environment, please execute "ns publish ios
123
124
  return result;
124
125
  }
125
126
  async loginCore(credentials) {
127
+ const wrapper = new srp_wrapper_1.GSASRPAuthenticator(credentials.username);
128
+ const initData = await wrapper.getInit();
126
129
  const loginConfig = await this.getLoginConfig();
127
- const loginUrl = `${loginConfig.authServiceUrl}/auth/signin`;
130
+ const loginUrl = `${loginConfig.authServiceUrl}/auth/signin/init`;
128
131
  const headers = {
129
132
  "Content-Type": "application/json",
130
133
  "X-Requested-With": "XMLHttpRequest",
131
134
  "X-Apple-Widget-Key": loginConfig.authServiceKey,
132
135
  Accept: "application/json, text/javascript",
133
136
  };
134
- const body = {
135
- accountName: credentials.username,
136
- password: credentials.password,
137
- rememberMe: true,
138
- };
139
- const loginResponse = await this.$httpClient.httpRequest({
137
+ const initResponse = await this.$httpClient.httpRequest({
140
138
  url: loginUrl,
141
139
  method: "POST",
142
- body,
140
+ body: initData,
143
141
  headers,
144
142
  });
145
- this.$applePortalCookieService.updateUserSessionCookie(loginResponse.headers["set-cookie"]);
143
+ const body = JSON.parse(initResponse.response.body);
144
+ const completeData = await wrapper.getComplete(credentials.password, body);
145
+ const hashcash = await this.fetchHashcash(loginConfig.authServiceUrl, loginConfig.authServiceKey);
146
+ const completeUrl = `${loginConfig.authServiceUrl}/auth/signin/complete?isRememberMeEnabled=false`;
147
+ const completeHeaders = {
148
+ "Content-Type": "application/json",
149
+ "X-Requested-With": "XMLHttpRequest",
150
+ "X-Apple-Widget-Key": loginConfig.authServiceKey,
151
+ Accept: "application/json, text/javascript",
152
+ "X-Apple-HC": hashcash || "",
153
+ };
154
+ const completeResponse = await this.$httpClient.httpRequest({
155
+ url: completeUrl,
156
+ method: "POST",
157
+ completeHeaders,
158
+ body: completeData,
159
+ headers: completeHeaders,
160
+ });
161
+ this.$applePortalCookieService.updateUserSessionCookie(completeResponse.headers["set-cookie"]);
146
162
  }
147
163
  async getLoginConfig() {
148
164
  let config = null;
@@ -158,6 +174,17 @@ For more details how to set up your environment, please execute "ns publish ios
158
174
  }
159
175
  return config || this.defaultLoginConfig;
160
176
  }
177
+ async fetchHashcash(authServiceUrl, authServiceKey) {
178
+ const loginUrl = `${authServiceUrl}/auth/signin?widgetKey=${authServiceKey}`;
179
+ const response = await this.$httpClient.httpRequest({
180
+ url: loginUrl,
181
+ method: "GET",
182
+ });
183
+ const headers = response.headers;
184
+ const bits = headers["X-Apple-HC-Bits"];
185
+ const challenge = headers["X-Apple-HC-Challenge"];
186
+ return makeHashCash(bits, challenge);
187
+ }
161
188
  async handleTwoFactorAuthentication(scnt, xAppleIdSessionId, authServiceKey, hashcash) {
162
189
  const headers = {
163
190
  scnt: scnt,
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GSASRPAuthenticator = void 0;
4
+ const js_srp_1 = require("@foxt/js-srp");
5
+ const crypto = require("crypto");
6
+ let srp = new js_srp_1.Srp(js_srp_1.Mode.GSA, js_srp_1.Hash.SHA256, 2048);
7
+ const stringToU8Array = (str) => new TextEncoder().encode(str);
8
+ const base64ToU8Array = (str) => Uint8Array.from(Buffer.from(str, "base64"));
9
+ class GSASRPAuthenticator {
10
+ constructor(username) {
11
+ this.username = username;
12
+ this.srpClient = undefined;
13
+ }
14
+ async derivePassword(protocol, password, salt, iterations) {
15
+ let passHash = new Uint8Array(await js_srp_1.util.hash(srp.h, stringToU8Array(password)));
16
+ if (protocol == "s2k_fo") {
17
+ passHash = stringToU8Array(js_srp_1.util.toHex(passHash));
18
+ }
19
+ let imported = await crypto.subtle.importKey("raw", passHash, { name: "PBKDF2" }, false, ["deriveBits"]);
20
+ let derived = await crypto.subtle.deriveBits({
21
+ name: "PBKDF2",
22
+ hash: { name: "SHA-256" },
23
+ iterations,
24
+ salt,
25
+ }, imported, 256);
26
+ return new Uint8Array(derived);
27
+ }
28
+ async getInit() {
29
+ if (this.srpClient)
30
+ throw new Error("Already initialized");
31
+ this.srpClient = await srp.newClient(stringToU8Array(this.username), new Uint8Array());
32
+ let a = Buffer.from(js_srp_1.util.bytesFromBigint(this.srpClient.A)).toString("base64");
33
+ return {
34
+ a,
35
+ protocols: ["s2k", "s2k_fo"],
36
+ accountName: this.username,
37
+ };
38
+ }
39
+ async getComplete(password, serverData) {
40
+ if (!this.srpClient)
41
+ throw new Error("Not initialized");
42
+ if (serverData.protocol != "s2k" && serverData.protocol != "s2k_fo")
43
+ throw new Error("Unsupported protocol " + serverData.protocol);
44
+ let salt = base64ToU8Array(serverData.salt);
45
+ let serverPub = base64ToU8Array(serverData.b);
46
+ let iterations = serverData.iteration;
47
+ let derived = await this.derivePassword(serverData.protocol, password, salt, iterations);
48
+ this.srpClient.p = derived;
49
+ await this.srpClient.generate(salt, serverPub);
50
+ let m1 = Buffer.from(this.srpClient._M).toString("base64");
51
+ let M2 = await this.srpClient.generateM2();
52
+ let m2 = Buffer.from(M2).toString("base64");
53
+ return {
54
+ accountName: this.username,
55
+ m1,
56
+ m2,
57
+ c: serverData.c,
58
+ };
59
+ }
60
+ }
61
+ exports.GSASRPAuthenticator = GSASRPAuthenticator;
@@ -77,7 +77,9 @@ class ExportOptionsPlistService {
77
77
  `;
78
78
  }
79
79
  if (provision) {
80
- plistTemplate += ` <key>provisioningProfiles</key>
80
+ plistTemplate += ` <key>signingStyle</key>
81
+ <string>manual</string>
82
+ <key>provisioningProfiles</key>
81
83
  <dict>
82
84
  <key>${projectData.projectIdentifiers.ios}</key>
83
85
  <string>${provision}</string>
@@ -85,7 +87,7 @@ class ExportOptionsPlistService {
85
87
  </dict>`;
86
88
  }
87
89
  plistTemplate += ` <key>method</key>
88
- <string>app-store</string>
90
+ <string>app-store-connect</string>
89
91
  <key>uploadBitcode</key>
90
92
  <false/>
91
93
  <key>compileBitcode</key>
@@ -178,6 +178,18 @@ class IOSSigningService {
178
178
  getPbxProjPath(projectData, projectRoot) {
179
179
  return path.join(this.$xcprojService.getXcodeprojPath(projectData, projectRoot), "project.pbxproj");
180
180
  }
181
+ readTeamIdFromFile(projectRoot) {
182
+ try {
183
+ const filePath = path.join(projectRoot, "teamid");
184
+ if (this.$fs.exists(filePath)) {
185
+ return this.$fs.readText(filePath);
186
+ }
187
+ }
188
+ catch (e) {
189
+ this.$logger.trace("Unable to read file: teamid. Error is: ", e);
190
+ }
191
+ return undefined;
192
+ }
181
193
  async getDevelopmentTeam(projectData, projectRoot, teamId) {
182
194
  teamId = teamId || this.readXCConfigDevelopmentTeam(projectData);
183
195
  if (!teamId) {
@@ -196,30 +208,40 @@ class IOSSigningService {
196
208
  if (!helpers.isInteractive()) {
197
209
  this.$errors.fail(`Unable to determine default development team. Available development teams are: ${_.map(teams, (team) => team.id)}. Specify team in app/App_Resources/iOS/build.xcconfig file in the following way: DEVELOPMENT_TEAM = <team id>`);
198
210
  }
199
- const choices = [];
200
- for (const team of teams) {
201
- choices.push(team.name + " (" + team.id + ")");
211
+ const fromFile = this.readTeamIdFromFile(projectRoot);
212
+ if (fromFile) {
213
+ const idFromFile = teams.find((value) => value.id === fromFile);
214
+ if (idFromFile) {
215
+ teamId = idFromFile.id;
216
+ this.$logger.info(`Team Id resolved from file: '${teamId}'.`);
217
+ }
202
218
  }
203
- const choice = await this.$prompter.promptForChoice("Found multiple development teams, select one:", choices);
204
- teamId = teams[choices.indexOf(choice)].id;
205
- const choicesPersist = [
206
- "Yes, set the DEVELOPMENT_TEAM setting in build.xcconfig file.",
207
- "Yes, persist the team id in platforms folder.",
208
- "No, don't persist this setting.",
209
- ];
210
- const choicePersist = await this.$prompter.promptForChoice("Do you want to make teamId: " +
211
- teamId +
212
- " a persistent choice for your app?", choicesPersist);
213
- switch (choicesPersist.indexOf(choicePersist)) {
214
- case 0:
215
- const xcconfigFile = path.join(projectData.appResourcesDirectoryPath, "iOS", constants_1.BUILD_XCCONFIG_FILE_NAME);
216
- this.$fs.appendFile(xcconfigFile, "\nDEVELOPMENT_TEAM = " + teamId + "\n");
217
- break;
218
- case 1:
219
- this.$fs.writeFile(path.join(projectRoot, "teamid"), teamId);
220
- break;
221
- default:
222
- break;
219
+ if (!teamId) {
220
+ const choices = [];
221
+ for (const team of teams) {
222
+ choices.push(team.name + " (" + team.id + ")");
223
+ }
224
+ const choice = await this.$prompter.promptForChoice("Found multiple development teams, select one:", choices);
225
+ teamId = teams[choices.indexOf(choice)].id;
226
+ const choicesPersist = [
227
+ "Yes, set the DEVELOPMENT_TEAM setting in build.xcconfig file.",
228
+ "Yes, persist the team id in platforms folder.",
229
+ "No, don't persist this setting.",
230
+ ];
231
+ const choicePersist = await this.$prompter.promptForChoice("Do you want to make teamId: " +
232
+ teamId +
233
+ " a persistent choice for your app?", choicesPersist);
234
+ switch (choicesPersist.indexOf(choicePersist)) {
235
+ case 0:
236
+ const xcconfigFile = path.join(projectData.appResourcesDirectoryPath, "iOS", constants_1.BUILD_XCCONFIG_FILE_NAME);
237
+ this.$fs.appendFile(xcconfigFile, "\nDEVELOPMENT_TEAM = " + teamId + "\n");
238
+ break;
239
+ case 1:
240
+ this.$fs.writeFile(path.join(projectRoot, "teamid"), teamId);
241
+ break;
242
+ default:
243
+ break;
244
+ }
223
245
  }
224
246
  }
225
247
  }
@@ -55,6 +55,7 @@ class XcodebuildService {
55
55
  async createDistributionArchive(platformData, projectData, buildConfig) {
56
56
  const archivePath = path.join(platformData.getBuildOutputPath(buildConfig), projectData.projectName + ".xcarchive");
57
57
  const output = await this.$exportOptionsPlistService.createDistributionExportOptionsPlist(archivePath, projectData, buildConfig);
58
+ const provision = buildConfig.provision || buildConfig.mobileProvisionIdentifier;
58
59
  const args = [
59
60
  "-exportArchive",
60
61
  "-archivePath",
@@ -63,6 +64,7 @@ class XcodebuildService {
63
64
  output.exportFileDir,
64
65
  "-exportOptionsPlist",
65
66
  output.exportOptionsPlistFilePath,
67
+ provision ? "" : "-allowProvisioningUpdates",
66
68
  ];
67
69
  await this.$xcodebuildCommandService.executeCommand(args, {
68
70
  cwd: platformData.projectRoot,
@@ -352,7 +352,6 @@ class ProjectDataService {
352
352
  }
353
353
  getInstalledRuntimePackage(projectDir, platform) {
354
354
  var _a, _b, _c, _d;
355
- console.log('getInstalledRuntimePackage');
356
355
  let packageName = [];
357
356
  if (platform === "ios") {
358
357
  packageName.push((_a = this.$projectData.nsConfig.ios) === null || _a === void 0 ? void 0 : _a.runtimePackageName, constants.SCOPED_IOS_RUNTIME_NAME, constants.TNS_IOS_RUNTIME_NAME);
@@ -203,6 +203,9 @@ class WebpackCompilerService extends events_1.EventEmitter {
203
203
  options.env = Object.assign(process.env, {
204
204
  NATIVESCRIPT_WEBPACK_ENV: JSON.stringify(envData)
205
205
  });
206
+ if (this.$hostInfo.isWindows) {
207
+ Object.assign(options.env, { APPDATA: process.env.appData });
208
+ }
206
209
  if (this.$options.hostProjectPath) {
207
210
  Object.assign(options.env, {
208
211
  USER_PROJECT_PLATFORMS_ANDROID: this.$options.hostProjectPath,
@@ -241,6 +244,9 @@ class WebpackCompilerService extends events_1.EventEmitter {
241
244
  if (envData.sourceMap === "true" || envData.sourceMap === "false") {
242
245
  envData.sourceMap = envData.sourceMap === "true";
243
246
  }
247
+ if (prepareData.uniqueBundle > 0) {
248
+ envData.uniqueBundle = prepareData.uniqueBundle;
249
+ }
244
250
  return envData;
245
251
  }
246
252
  async buildEnvCommandLineParams(envData, platformData, projectData, prepareData) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akylas/nativescript-cli",
3
3
  "main": "./lib/nativescript-cli-lib.js",
4
- "version": "8.8.5",
4
+ "version": "8.8.7",
5
5
  "author": "NativeScript <support@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {
@@ -56,12 +56,13 @@
56
56
  "mobile"
57
57
  ],
58
58
  "dependencies": {
59
+ "@foxt/js-srp": "^0.0.3-patch2",
59
60
  "@nativescript/doctor": "2.0.15",
60
61
  "@nativescript/schematics-executor": "0.0.2",
61
62
  "@npmcli/arborist": "^7.2.0",
62
63
  "@npmcli/move-file": "^2.0.1",
63
64
  "@rigor789/resolve-package-path": "1.0.7",
64
- "@rigor789/trapezedev-project": "7.1.1",
65
+ "@rigor789/trapezedev-project": "7.1.2",
65
66
  "ansi-colors": "^4.1.3",
66
67
  "archiver": "^7.0.1",
67
68
  "axios": "1.7.7",
@@ -76,13 +77,13 @@
76
77
  "esprima": "4.0.1",
77
78
  "font-finder": "1.1.0",
78
79
  "glob": "11.0.0",
79
- "ios-device-lib": "0.9.3",
80
- "ios-mobileprovision-finder": "1.1.0",
80
+ "ios-device-lib": "0.9.4",
81
+ "ios-mobileprovision-finder": "1.2.1",
81
82
  "ios-sim-portable": "4.5.0",
82
83
  "jimp": "0.22.10",
83
84
  "lodash": "4.17.21",
84
85
  "log4js": "6.9.1",
85
- "marked": "14.1.3",
86
+ "marked": "13.0.3",
86
87
  "marked-terminal": "7.1.0",
87
88
  "minimatch": "10.0.1",
88
89
  "mkdirp": "3.0.1",
@@ -1 +0,0 @@
1
- {"@jsdevtools/coverage-istanbul-loader":"3.0.5","karma":"6.4.4","karma-coverage":"2.2.1","karma-nativescript-launcher":"0.4.0","mocha":"10.7.3","karma-mocha":"2.0.1","karma-chai":"0.1.0","karma-jasmine":"4.0.2","karma-qunit":"4.2.1","@types/karma-chai":"0.1.7","@types/mocha":"10.0.9","@types/jasmine":"5.1.4","@types/qunit":"2.19.10","nyc":"17.1.0"}