Skip to content

Commit 78732ea

Browse files
committed
Merge branch 'main' into new_big_merge_test
2 parents c3db9c2 + 8948c23 commit 78732ea

File tree

218 files changed

+20576
-32846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+20576
-32846
lines changed

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: monthly
12+
time: "23:00"
13+
open-pull-requests-limit: 10
14+
ignore:
15+
- dependency-name: "*"
16+
update-types: ["version-update:semver-major"]
17+
18+
- package-ecosystem: npm
19+
directory: /packages/doctor
20+
schedule:
21+
interval: monthly
22+
time: "23:00"
23+
open-pull-requests-limit: 10
24+
ignore:
25+
- dependency-name: "*"
26+
update-types: ["version-update:semver-major"]
27+
28+
- package-ecosystem: npm
29+
directory: /packages/nativescript-envinfo
30+
schedule:
31+
interval: monthly
32+
time: "23:00"
33+
open-pull-requests-limit: 10
34+
ignore:
35+
- dependency-name: "*"
36+
update-types: ["version-update:semver-major"]
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main", "release" ]
17+
pull_request:
18+
branches: [ "main", "release" ]
19+
schedule:
20+
- cron: '21 2 * * 1'
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
analyze:
27+
name: Analyze (${{ matrix.language }})
28+
# Runner size impacts CodeQL analysis time. To learn more, please see:
29+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
30+
# - https://gh.io/supported-runners-and-hardware-resources
31+
# - https://gh.io/using-larger-runners (GitHub.com only)
32+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
33+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
34+
permissions:
35+
# required for all workflows
36+
security-events: write
37+
38+
# required to fetch internal or private CodeQL packs
39+
packages: read
40+
41+
# only required for workflows in private repositories
42+
actions: read
43+
contents: read
44+
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
include:
49+
- language: actions
50+
build-mode: none
51+
- language: javascript-typescript
52+
build-mode: none
53+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
54+
# Use `c-cpp` to analyze code written in C, C++ or both
55+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
56+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
57+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
58+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
59+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
60+
# 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
61+
steps:
62+
- name: Checkout repository
63+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
64+
65+
# Add any setup steps before running the `github/codeql-action/init` action.
66+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
67+
# or others). This is typically only required for manual builds.
68+
# - name: Setup runtime (example)
69+
# uses: actions/setup-example@v1
70+
71+
# Initializes the CodeQL tools for scanning.
72+
- name: Initialize CodeQL
73+
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
74+
with:
75+
languages: ${{ matrix.language }}
76+
build-mode: ${{ matrix.build-mode }}
77+
# If you wish to specify custom queries, you can do so here or in a config file.
78+
# By default, queries listed here will override any specified in a config file.
79+
# Prefix the list here with "+" to use these queries and those in the config file.
80+
81+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
82+
# queries: security-extended,security-and-quality
83+
84+
# If the analyze step fails for one of the languages you are analyzing with
85+
# "We were unable to automatically build your code", modify the matrix above
86+
# to set the build mode to "manual" for that language. Then modify this step
87+
# to build your code.
88+
# ℹ️ Command-line programs to run using the OS shell.
89+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
90+
- if: matrix.build-mode == 'manual'
91+
shell: bash
92+
run: |
93+
echo 'If you are using a "manual" build mode for one or more of the' \
94+
'languages you are analyzing, replace this with the commands to build' \
95+
'your code, for example:'
96+
echo ' make bootstrap'
97+
echo ' make release'
98+
exit 1
99+
100+
- name: Perform CodeQL Analysis
101+
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
102+
with:
103+
category: "/language:${{matrix.language}}"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
dependency-review:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 'Checkout Repository'
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.3.0
21+
- name: 'Dependency Review'
22+
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,77 @@
11
name: 'nativescript -> npm'
22

33
on:
4-
push:
5-
branches: [ 'main' ]
6-
paths-ignore:
7-
- 'packages/**'
84
workflow_dispatch:
5+
inputs:
6+
bump_version:
7+
description: 'Bump Version'
8+
required: true
9+
default: true
10+
type: boolean
11+
next_version:
12+
description: 'Next Version with Next tag'
13+
required: true
14+
default: false
15+
type: boolean
916

10-
env:
11-
NPM_TAG: 'next'
17+
permissions:
18+
contents: read
1219

1320
jobs:
1421
release:
1522
runs-on: macos-latest
1623

1724
steps:
18-
- uses: actions/checkout@v2
25+
26+
- name: Harden the runner (Audit all outbound calls)
27+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
28+
with:
29+
egress-policy: audit
30+
31+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1932

20-
- uses: actions/setup-node@v3
33+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2134
with:
22-
node-version: 18
35+
node-version: 22.14.0
2336

2437
- name: Setup
2538
run: npm i --ignore-scripts --legacy-peer-deps --no-package-lock
2639

40+
- name: Bump Standard Version
41+
if: github.event.inputs.bump_version == 'true'
42+
run: |
43+
npm run release
44+
2745
- name: Generate Version
2846
run: |
29-
echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV
47+
echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);") >> $GITHUB_ENV
3048
3149
- name: Bump Version
50+
if: github.event.inputs.next_version == 'true'
3251
run: npm version $NPM_VERSION
3352

3453
- name: Build nativescript
3554
run: npm pack
36-
37-
- name: Publish nativescript
55+
56+
- name: npm ENV
3857
env:
3958
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
59+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
60+
61+
- name: Publish next nativescript version
62+
if: github.event.inputs.next_version == 'true'
4063
run: |
41-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
4264
echo "Publishing nativescript@$NPM_VERSION to NPM with tag $NPM_TAG..."
43-
npm publish nativescript-$NPM_VERSION.tgz --tag $NPM_TAG
65+
npm publish akylas-nativescript-cli-$NPM_VERSION.tgz --tag $NPM_TAG
66+
67+
- name: Publish nativescript
68+
if: github.event.inputs.next_version == 'false'
69+
run: |
70+
echo "Publishing nativescript@$NPM_VERSION to NPM..."
71+
npm publish akylas-nativescript-cli-$NPM_VERSION.tgz
72+
73+
- name: Push to git
74+
if: github.event.inputs.bump_version == 'true'
75+
run: |
76+
git push origin --tags
77+
git push origin

.github/workflows/npm_release_doctor.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@ defaults:
1414
env:
1515
NPM_TAG: 'next'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
release:
1922
runs-on: ubuntu-latest
2023

2124
steps:
22-
- uses: actions/checkout@v2
25+
26+
- name: Harden the runner (Audit all outbound calls)
27+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
28+
with:
29+
egress-policy: audit
30+
31+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2332

2433
- name: Setup
2534
run: npm install

.github/workflows/scorecard.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
# To guarantee Maintained check is occasionally updated. See
7+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
8+
schedule:
9+
- cron: '20 7 * * 2'
10+
push:
11+
branches: ["main"]
12+
13+
# Declare default permissions as read only.
14+
permissions: read-all
15+
16+
jobs:
17+
analysis:
18+
name: Scorecard analysis
19+
runs-on: ubuntu-latest
20+
permissions:
21+
# Needed to upload the results to code-scanning dashboard.
22+
security-events: write
23+
# Needed to publish results and get a badge (see publish_results below).
24+
id-token: write
25+
contents: read
26+
actions: read
27+
# To allow GraphQL ListCommits to work
28+
issues: read
29+
pull-requests: read
30+
# To detect SAST tools
31+
checks: read
32+
33+
steps:
34+
35+
- name: "Checkout code"
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.3.0
37+
with:
38+
persist-credentials: false
39+
40+
- name: "Run analysis"
41+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
42+
with:
43+
results_file: results.sarif
44+
results_format: sarif
45+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
46+
# - you want to enable the Branch-Protection check on a *public* repository, or
47+
# - you are installing Scorecards on a *private* repository
48+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
49+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
50+
51+
# Public repositories:
52+
# - Publish results to OpenSSF REST API for easy access by consumers
53+
# - Allows the repository to include the Scorecard badge.
54+
# - See https://github.com/ossf/scorecard-action#publishing-results.
55+
# For private repositories:
56+
# - `publish_results` will always be set to `false`, regardless
57+
# of the value entered here.
58+
publish_results: true
59+
60+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
61+
# format to the repository Actions tab.
62+
- name: "Upload artifact"
63+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
64+
with:
65+
name: SARIF file
66+
path: results.sarif
67+
retention-days: 5
68+
69+
# Upload the results to GitHub's code scanning dashboard.
70+
- name: "Upload to code-scanning"
71+
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
72+
with:
73+
sarif_file: results.sarif

.prettierrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{
2-
"useTabs": true
2+
"useTabs": true,
3+
"overrides": [
4+
{
5+
"files": "*.json",
6+
"options": {
7+
"useTabs": false
8+
}
9+
}
10+
]
311
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files.exclude": {
44
"**/.git": true,
55
"**/.DS_Store": true,
6-
"**/*.js": { "when": "$(basename).ts"},
6+
// "**/*.js": { "when": "$(basename).ts"},
77
"**/*.js.map": true,
88
"**/.husky/_": true
99
}

0 commit comments

Comments
 (0)