Skip to content

Commit aad3ead

Browse files
committed
Merge remote-tracking branch 'origin/main' into pre/v9-combined-testing
2 parents 08e98c2 + f81499d commit aad3ead

32 files changed

+1289
-937
lines changed

.github/workflows/codeql-advanced.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
6161
steps:
6262
- name: Checkout repository
63-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
63+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6464

6565
# Add any setup steps before running the `github/codeql-action/init` action.
6666
# This includes steps like installing compilers or runtimes (`actions/setup-node`
@@ -70,7 +70,7 @@ jobs:
7070

7171
# Initializes the CodeQL tools for scanning.
7272
- name: Initialize CodeQL
73-
uses: github/codeql-action/init@d3678e237b9c32a6c9bffb3315c335f976f3549f # v3.30.2
73+
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
7474
with:
7575
languages: ${{ matrix.language }}
7676
build-mode: ${{ matrix.build-mode }}
@@ -98,6 +98,6 @@ jobs:
9898
exit 1
9999
100100
- name: Perform CodeQL Analysis
101-
uses: github/codeql-action/analyze@d3678e237b9c32a6c9bffb3315c335f976f3549f # v3.30.2
101+
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
102102
with:
103103
category: "/language:${{matrix.language}}"

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: 'Checkout Repository'
20-
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.3.0
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.3.0
2121
- name: 'Dependency Review'
22-
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
22+
uses: actions/dependency-review-action@40c09b7dc99638e5ddb0bfd91c1673effc064d8a # v4.8.1

.github/workflows/npm_release_cli.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
steps:
2121

2222
- name: Harden the runner (Audit all outbound calls)
23-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
23+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2424
with:
2525
egress-policy: audit
2626

27-
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
27+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2828

29-
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
29+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3030
with:
3131
node-version: 22.14.0
3232

.github/workflows/npm_release_doctor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
steps:
2525

2626
- name: Harden the runner (Audit all outbound calls)
27-
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
27+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2828
with:
2929
egress-policy: audit
3030

31-
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
31+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3232

3333
- name: Setup
3434
run: npm install

.github/workflows/scorecard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
steps:
3434

3535
- name: "Checkout code"
36-
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.3.0
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.3.0
3737
with:
3838
persist-credentials: false
3939

4040
- name: "Run analysis"
41-
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
41+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
4242
with:
4343
results_file: results.sarif
4444
results_format: sarif
@@ -60,14 +60,14 @@ jobs:
6060
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6161
# format to the repository Actions tab.
6262
- name: "Upload artifact"
63-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
63+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6464
with:
6565
name: SARIF file
6666
path: results.sarif
6767
retention-days: 5
6868

6969
# Upload the results to GitHub's code scanning dashboard.
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
71+
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
7272
with:
7373
sarif_file: results.sarif

docs/build-jekyll-md.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -e
44
rm -rf docs-cli
55
npm install --ignore-scripts
66

7-
grunt docs-jekyll
7+
npx grunt docs-jekyll
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<% if (isJekyll) { %>---
2+
title: ns config get
3+
position: 2
4+
---<% } %>
5+
6+
# ns config get
7+
8+
### Description
9+
10+
Prints the value for a specific key from the project's NativeScript configuration.
11+
12+
### Commands
13+
14+
Usage | Synopsis
15+
------|-------
16+
General | `$ ns config get <key>`
17+
18+
### Arguments
19+
20+
* `<key>` — The configuration key in dot-notation. Examples: `ios.id`, `android.codeCache`, `bundler`.
21+
22+
### Examples
23+
24+
* `$ ns config get ios.id`
25+
* `$ ns config get android.codeCache`
26+
* `$ ns config get bundler`
27+
28+
<% if(isHtml) { %>
29+
30+
### Related Commands
31+
32+
Command | Description
33+
----------|----------
34+
[config](config.html) | Lists all configuration values for the current project.
35+
[config set](config-set.html) | Sets the value for the specified configuration key.
36+
<% } %>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<% if (isJekyll) { %>---
2+
title: ns config set
3+
position: 3
4+
---<% } %>
5+
6+
# ns config set
7+
8+
### Description
9+
10+
Sets the value for a specific key in the project's NativeScript configuration.
11+
12+
### Commands
13+
14+
Usage | Synopsis
15+
------|-------
16+
General | `$ ns config set <key> <value>`
17+
18+
### Arguments
19+
20+
* `<key>` — The configuration key in dot-notation. Examples: `ios.id`, `android.codeCache`, `bundler`.
21+
* `<value>` — The value to set. Parsed as JSON when possible (e.g. `true`, `42`, `{ "foo": "bar" }`). Otherwise treated as a string.
22+
23+
### Examples
24+
25+
* `$ ns config set ios.id org.nativescript.myapp`
26+
* `$ ns config set android.codeCache true`
27+
* `$ ns config set bundler vite`
28+
29+
### Notes
30+
31+
* Setting whole objects is not supported. Update individual keys instead. For example, use:
32+
`$ ns config set android.codeCache true`
33+
34+
### Related Commands
35+
36+
Command | Description
37+
----------|----------
38+
[config](config.html) | Lists all configuration values for the current project.
39+
[config get](config-get.html) | Prints the value for the specified configuration key.
40+
<% } %>

docs/man_pages/config/config.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<% if (isJekyll) { %>---
2+
title: ns config
3+
position: 1
4+
---<% } %>
5+
6+
# ns config
7+
8+
### Description
9+
10+
View and manage your project's NativeScript configuration stored in `nativescript.config.(js|ts)` (or legacy `nsconfig.json`).
11+
12+
### Commands
13+
14+
Usage | Synopsis
15+
------|---------
16+
List all config | `$ ns config`
17+
Get a value | `$ ns config get <key>`
18+
Set a value | `$ ns config set <key> <value>`
19+
20+
### Examples
21+
22+
* `$ ns config` — prints all configuration values.
23+
* `$ ns config get ios.id` — prints the iOS bundle identifier.
24+
* `$ ns config set android.codeCache true` — enables Android V8 code cache.
25+
26+
### Notes
27+
28+
* Keys use dot-notation, for example: `ios.id`, `android.codeCache`, `bundler`.
29+
* Values are parsed as JSON when possible. Use quotes for strings with spaces.
30+
31+
<% if(isHtml) { %>
32+
33+
### Related Commands
34+
35+
Command | Description
36+
----------|----------
37+
[config get](config-get.html) | Prints the value for the specified configuration key.
38+
[config set](config-set.html) | Sets the value for the specified configuration key.
39+
<% } %>

lib/commands/debug.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import * as _ from "lodash";
2020

2121
export class DebugPlatformCommand
2222
extends ValidatePlatformCommandBase
23-
implements ICommand {
23+
implements ICommand
24+
{
2425
public allowedParameters: ICommandParameter[] = [];
2526

2627
constructor(
@@ -36,13 +37,13 @@ export class DebugPlatformCommand
3637
private $debugDataService: IDebugDataService,
3738
private $debugController: IDebugController,
3839
private $liveSyncCommandHelper: ILiveSyncCommandHelper,
39-
private $migrateController: IMigrateController
40+
private $migrateController: IMigrateController,
4041
) {
4142
super(
4243
$options,
4344
$platformsDataService,
4445
$platformValidationService,
45-
$projectData
46+
$projectData,
4647
);
4748
$cleanupService.setShouldDispose(false);
4849
}
@@ -66,10 +67,10 @@ export class DebugPlatformCommand
6667
const debugData = this.$debugDataService.getDebugData(
6768
selectedDeviceForDebug.deviceInfo.identifier,
6869
this.$projectData,
69-
debugOptions
70+
debugOptions,
7071
);
7172
await this.$debugController.printDebugInformation(
72-
await this.$debugController.startDebug(debugData)
73+
await this.$debugController.startDebug(debugData),
7374
);
7475
return;
7576
}
@@ -83,7 +84,7 @@ export class DebugPlatformCommand
8384
},
8485
buildPlatform: undefined,
8586
skipNativePrepare: false,
86-
}
87+
},
8788
);
8889
}
8990

@@ -98,17 +99,17 @@ export class DebugPlatformCommand
9899
if (
99100
!this.$platformValidationService.isPlatformSupportedForOS(
100101
this.platform,
101-
this.$projectData
102+
this.$projectData,
102103
)
103104
) {
104105
this.$errors.fail(
105-
`Applications for platform ${this.platform} can not be built on this OS`
106+
`Applications for platform ${this.platform} can not be built on this OS`,
106107
);
107108
}
108109

109110
if (this.$options.release) {
110111
this.$errors.failWithHelp(
111-
"--release flag is not applicable to this command."
112+
"--release flag is not applicable to this command.",
112113
);
113114
}
114115

@@ -138,12 +139,12 @@ export class DebugIOSCommand implements ICommand {
138139
private $sysInfo: ISysInfo,
139140
private $projectData: IProjectData,
140141
$iosDeviceOperations: IIOSDeviceOperations,
141-
$iOSSimulatorLogProvider: Mobile.IiOSSimulatorLogProvider
142+
$iOSSimulatorLogProvider: Mobile.IiOSSimulatorLogProvider,
142143
) {
143144
this.$projectData.initializeProjectData();
144145
// Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
145146
// In case we dispose ios-device-lib, the socket will be closed and the code will fail when the debug application tries to read/send data to device socket.
146-
// That's why the `$ tns debug ios --justlaunch` command will not release the terminal.
147+
// That's why the `$ ns debug ios --justlaunch` command will not release the terminal.
147148
// In case we do not set it to false, the dispose will be called once the command finishes its execution, which will prevent the debugging.
148149
$iosDeviceOperations.setShouldDispose(false);
149150
$iOSSimulatorLogProvider.setShouldDispose(false);
@@ -157,18 +158,18 @@ export class DebugIOSCommand implements ICommand {
157158
if (
158159
!this.$platformValidationService.isPlatformSupportedForOS(
159160
this.$devicePlatformsConstants.iOS,
160-
this.$projectData
161+
this.$projectData,
161162
)
162163
) {
163164
this.$errors.fail(
164-
`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`
165+
`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`,
165166
);
166167
}
167168

168169
const isValidTimeoutOption = this.isValidTimeoutOption();
169170
if (!isValidTimeoutOption) {
170171
this.$errors.fail(
171-
`Timeout option specifies the seconds NativeScript CLI will wait to find the inspector socket port from device's logs. Must be a number.`
172+
`Timeout option specifies the seconds NativeScript CLI will wait to find the inspector socket port from device's logs. Must be a number.`,
172173
);
173174
}
174175

@@ -179,7 +180,7 @@ export class DebugIOSCommand implements ICommand {
179180
macOSWarning.severity === SystemWarningsSeverity.high
180181
) {
181182
this.$errors.fail(
182-
`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`
183+
`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`,
183184
);
184185
}
185186
}
@@ -224,7 +225,7 @@ export class DebugAndroidCommand implements ICommand {
224225
private $devicePlatformsConstants: Mobile.IDevicePlatformsConstants,
225226
private $injector: IInjector,
226227
private $projectData: IProjectData,
227-
private $options: IOptions
228+
private $options: IOptions,
228229
) {
229230
this.$projectData.initializeProjectData();
230231
}

0 commit comments

Comments
 (0)