Compare commits

...
Author SHA1 Message Date
Will Schurman 8a4545e407 Update README.md
Fix links
2024-05-10 13:07:50 -07:00
Will Schurman 1aade4c555 Update README.md (#279) 2024-04-25 10:22:42 -07:00
Will Schurman 2bbae854d4 Update README.md (#278) 2024-04-22 12:36:24 -07:00
Will Schurman 1b1cb379f1 [continuous-deploy-fingerprint] Exclude expired builds from continuous deploy for development (#277) 2024-04-19 09:34:22 -07:00
Will Schurman b54de34e8d [continuous-deploy-fingerprint] Add more debug info, clean up output in non-debug, fix build parsing (#274) 2024-04-19 08:35:27 -07:00
Will Schurman bc61229346 Update README.md (#273) 2024-04-18 12:19:12 -07:00
Will Schurman ec8dc84b62 Add continuous-deploy-fingerprint action (#269) 2024-04-16 23:08:47 -07:00
Zachary Ebenfeld f6f3acfa27 docs(preview): fix typo in readme 2024-04-10 13:58:49 +02:00
Kudo Chien 0db524a726 [fingerprint] add saving-db-branch (#264) 2024-03-05 22:19:29 +08:00
Kudo Chien 2c58ed4848 [fingerprint] support customized input previous-git-commit (#263)
# Why

on expo/expo repos, we need the custom base commit because we don't run fingerprint for every commit. this pr added the advanced and customized `previous-git-commit` input
2024-02-27 23:47:44 +08:00
Nick 42a964bd6f [fingerprint] Fix fingerprint action reference in example PR Labeler (#255) 2024-02-27 23:46:47 +08:00
Hirbod cea45074d9 [fingerprint] add support for private repos to README (#257) 2024-02-27 20:53:29 +08:00
Mateus Craveiro 47703a0179 [fingerprint] fix typo (#260) 2024-02-27 20:52:28 +08:00
Mateus Craveiro 526dc5f131 [fingerprint] Fix example command (#261) 2024-02-27 20:52:02 +08:00
Kudo Chien 190a2cdf2b [fingerprint] add previous and current git commit to outputs (#262) 2024-02-27 20:50:53 +08:00
Will Schurman 15896ae746 [fingerprint] Add current and previous fingerprint to step outputs (#253) 2024-01-24 13:47:29 -08:00
Expo CI c7b66a9c32 chore: create new release 8.2.1
## [8.2.1](https://github.com/expo/expo-github-action/compare/8.2.0...8.2.1) (2024-01-15)

### Bug fixes

* **preview:** filter slugs with special characters to match dev clients `exp+<slug>` scheme ([#252](https://github.com/expo/expo-github-action/issues/252)) ([b8a9be8](https://github.com/expo/expo-github-action/commit/b8a9be8336bf5609f8e299a8486f9a2bf7073f8a))
2024-01-15 12:35:54 +00:00
Cedric van Putten b8a9be8336 fix(preview): filter slugs with special characters to match dev clients exp+<slug> scheme (#252)
* test(preview): add tests for eas update qr code urls

* fix(preview): use same filtering of `slug` as done in `expo-dev-client`

* chore: rebuild actions
2024-01-15 13:28:27 +01:00
Expo CI b547b4d94a chore: create new release 8.2.0
## [8.2.0](https://github.com/expo/expo-github-action/compare/8.1.0...8.2.0) (2023-12-02)

### New features

* **preview:** add `qr-target` and use proper QR codes for `expo-go` and `dev-build` ([#247](https://github.com/expo/expo-github-action/issues/247)) ([54efbfd](https://github.com/expo/expo-github-action/commit/54efbfdf1d130888a5f13b73fb7adc85edeb8855))

### Documentation changes

* **preview:** clarify the branch and workflow trigger relations ([#246](https://github.com/expo/expo-github-action/issues/246)) ([ccfad6f](https://github.com/expo/expo-github-action/commit/ccfad6f148eaa709959a64b1be216481f4ca54ff))
2023-12-02 15:49:36 +00:00
Cedric van Putten 54efbfdf1d feature(preview): add qr-target and use proper QR codes for expo-go and dev-build (#247)
* fix(preview): use app slug to generate proper EAS Update preview

* ci(test): remove faulty implemented test case for app schemes

* chore: add jest snapshot workaround for prettier v2

See https://jestjs.io/docs/configuration/\#prettierpath-string

* chore(preview): rebuild preview subaction

* fix(preview): allow users to force EAS Update QR codes to Expo Go

* refactor(preview): use `qr-target` with automatically inferred value instead of `expo-go`

* chore: rebuild files

* refactor(preview): use `dev-build` instead of `dev-client` and validate input

* chore: rebuild files

* test(preview): add e2e test for infered `dev-build` qr code
2023-12-02 16:48:22 +01:00
Cedric van Putten ccfad6f148 docs(preview): clarify the branch and workflow trigger relations (#246) 2023-11-27 09:44:36 +01:00
Expo CI 6a82be3e3e chore: create new release 8.1.0
## [8.1.0](https://github.com/expo/expo-github-action/compare/8.0.0...8.1.0) (2023-11-24)

### New features

* add fingerprint integration ([#231](https://github.com/expo/expo-github-action/issues/231)) ([e6622e0](https://github.com/expo/expo-github-action/commit/e6622e076de31220ec97e3d7494de70cf1ab85b2))
* add readme for preview-build and fingerprint action ([#232](https://github.com/expo/expo-github-action/issues/232)) ([acc171b](https://github.com/expo/expo-github-action/commit/acc171bb5e34cd76bf152307e562bb49e7743b94)), closes [/github.com/expo/expo-github-action/pull/231#pullrequestreview-1628540314](https://github.com/expo//github.com/expo/expo-github-action/pull/231/issues/pullrequestreview-1628540314)
* **preview:** add update manifest permalinks to the output ([#245](https://github.com/expo/expo-github-action/issues/245)) ([331a5ab](https://github.com/expo/expo-github-action/commit/331a5abc4196b7590363c2b3ec842a0a17f98fa2))

### Bug fixes

* **preview:** allow multiple `app.json` schemes ([#244](https://github.com/expo/expo-github-action/issues/244)) ([42d64cf](https://github.com/expo/expo-github-action/commit/42d64cf92010d7210784c0f30bcaa611d8bae55d))

### Code changes

* update error handling to node 20 standards ([#243](https://github.com/expo/expo-github-action/issues/243)) ([65ee055](https://github.com/expo/expo-github-action/commit/65ee05557f89a7804e36b2d3fe4f3d33aea7011a))
* update workflows and repository to use Bun ([#241](https://github.com/expo/expo-github-action/issues/241)) ([7f1c170](https://github.com/expo/expo-github-action/commit/7f1c170873ddbadfb0ba311dd94b43d14c795ee3))
* upgrade all actions to run on node 20 ([#242](https://github.com/expo/expo-github-action/issues/242)) ([b3e5355](https://github.com/expo/expo-github-action/commit/b3e53555d9effcab01011226c5e811c263a449cb))

### Other chores

* **ci:** update release flow with new service account ([#238](https://github.com/expo/expo-github-action/issues/238)) ([e289d93](https://github.com/expo/expo-github-action/commit/e289d93e119801f899eb2b94d80d92718172dba3))
* update release workflow actions ([#239](https://github.com/expo/expo-github-action/issues/239)) ([57dcabe](https://github.com/expo/expo-github-action/commit/57dcabe749340c8c995ee0334cd7c547c35770d0))

### Documentation changes

* add link to breaking change pull request ([9e1a8c8](https://github.com/expo/expo-github-action/commit/9e1a8c8343d0f9405717e103c71e2e3ce9286bbc))
* fix changelog link in readme ([185932d](https://github.com/expo/expo-github-action/commit/185932d43cd424c08c2d530a3cedad352d66e78e))
* update example to use `eas-version` ([#222](https://github.com/expo/expo-github-action/issues/222)) ([7bc946c](https://github.com/expo/expo-github-action/commit/7bc946c5f6b768b1a1858c1722b3aac4e0064c23))
2023-11-24 19:29:42 +00:00
Cedric van Putten 020be2c617 ci(release): fix release workflow github context 2023-11-24 20:20:43 +01:00
Cedric van Putten 331a5abc41 feature(preview): add update manifest permalinks to the output (#245) 2023-11-24 19:09:35 +01:00
Cedric van Putten 42d64cf920 fix(preview): allow multiple app.json schemes (#244)
* ci: add multiple schemes to the e2e tests of preview qr codes

* refactor: update to `@expo/config@8`

* fix(preview): allow multiple app schemes in `app.json` and add `app-scheme` as option

* chore: rebuild files

* ci: add test using custom app scheme in preview action
2023-11-24 18:58:35 +01:00
Cedric van Putten 65ee05557f refactor: update error handling to node 20 standards (#243)
* refactor: update error handling to node 20 standards

* chore: rebuild files
2023-11-24 18:03:01 +01:00
Cedric van Putten b3e53555d9 refactor: upgrade all actions to run on node 20 (#242) 2023-11-24 17:39:41 +01:00
Cedric van Putten 7f1c170873 refactor: update workflows and repository to use Bun (#241)
* ci(test): test bun as setup packager in e2e

* ci(test): use bun in e2e tests to create projects

* ci(test): move `node` and `bun` to dedicated environment action

* ci(test): prevent installing bun on windows

* ci(test): simplify matrix setup

* ci: update other workflows to use bun

* ci: fully move over to bun

* refactor: upgrade eslint and prettier packages

* fix: resolve all linting issues

* fix: add `sqlite3` as trusted dependency

* chore: rebuild files

* chore: upgrade typescript to `5.3.2`

* docs: add `bun` as `packager` option to readme

This is now tested in our e2e tests as well, and seems to work nicely

* chore: update build script and built files

* ci(test): update matrix to ignore cache on windows
2023-11-24 17:30:03 +01:00
Cedric van Putten 57dcabe749 chore: update release workflow actions (#239)
* chore: update release workflow actions

* chore: update review workflow actions

* chore: update test workflow actions
2023-11-21 14:53:22 +01:00
Cedric van Putten e289d93e11 chore(ci): update release flow with new service account (#238) 2023-11-17 22:15:51 +01:00
Kudo Chien 9d16a997a4 doc: fix typo for fingerprint readme (#233) 2023-09-22 22:15:43 +08:00
Kudo ChienandCedric van Putten acc171bb5e feature: add readme for preview-build and fingerprint action (#232)
following up with https://github.com/expo/expo-github-action/pull/231#pullrequestreview-1628540314 to add READMEs

---------

Co-authored-by: Cedric van Putten <[email protected]>
2023-09-21 00:40:58 +08:00
Kudo Chien e6622e076d feature: add fingerprint integration (#231)
# Why

to dogfood `@expo/fingerprint`, this pr tries to the fingerprint integration.
close [ENG-8599](https://linear.app/expo/issue/ENG-8599/integrate-expofingerprint-to-expo-github-action)

# How

this pr introduces two new actions, mainly designed for pull requests.

## fingerprint

the action will check the fingerprint from the pr head commit against base commit and just output the fingerprint diff. this could be used for something like [pr labeler](https://github.com/Kudo/eas-app/blob/main/.github/workflows/pr-labeler.yml).

## preview-build

the action will check the fingerprint from the pr head commit against base commit and create eas builds if necessary. [example workflow](https://github.com/Kudo/eas-app/blob/main/.github/workflows/pr-preview-eas-build.yml)
2023-09-21 00:39:56 +08:00
Jon Samp 7bc946c5f6 docs: update example to use eas-version (#222) 2023-06-14 23:54:52 +02:00
Cedric van Putten 9e1a8c8343 docs: add link to breaking change pull request 2023-02-24 18:48:39 +01:00
Cedric van Putten 185932d43c docs: fix changelog link in readme 2023-02-20 11:46:33 -08:00
Cedric van Putten ecd71323ef test: create tag on latest version of repo 2023-02-20 18:04:49 +01:00
semantic-release-bot 4479f0b369 chore: create new release 8.0.0
## [8.0.0](https://github.com/expo/expo-github-action/compare/7.2.1...8.0.0) (2023-02-20)

### ⚠ BREAKING CHANGES

* **preview-comment:** add deprecation notice with blog post (#207)

### New features

* **preview:** add eas update preview sub-action ([#206](https://github.com/expo/expo-github-action/issues/206)) ([f4d6037](https://github.com/expo/expo-github-action/commit/f4d6037f42d672db10e7818c8bd1211fb26a27b3))

### Code changes

* **preview-comment:** add deprecation notice with blog post ([#207](https://github.com/expo/expo-github-action/issues/207)) ([d2b3e6c](https://github.com/expo/expo-github-action/commit/d2b3e6c7848afe984ee32bfad1b05aac374a79e3))

### Other chores

* bump http-cache-semantics from 4.1.0 to 4.1.1 ([#205](https://github.com/expo/expo-github-action/issues/205)) ([b1a8c06](https://github.com/expo/expo-github-action/commit/b1a8c06f1cd42cf6b9dde48c88d08a9421d8768c))

### Documentation changes

* **preview-comment:** emphasize that this sub-action is now deprecated ([f4af238](https://github.com/expo/expo-github-action/commit/f4af2383c1d07f127157450bc44c34e0378587ac))
* update examples for v8 ([#210](https://github.com/expo/expo-github-action/issues/210)) ([3d1cf9a](https://github.com/expo/expo-github-action/commit/3d1cf9ab88f78450c67865a77c36e04be7a0517c))
* update the readme with new examples ([#208](https://github.com/expo/expo-github-action/issues/208)) ([ae5d1a1](https://github.com/expo/expo-github-action/commit/ae5d1a19547903399b413298b87a86df814c5b9b))
2023-02-20 16:58:13 +00:00
Cedric van Putten 3d1cf9ab88 docs: update examples for v8 (#210)
* docs: update examples to v8

* docs: update node to v18 in examples
2023-02-20 17:53:42 +01:00
Cedric van Putten f4af2383c1 docs(preview-comment): emphasize that this sub-action is now deprecated 2023-02-20 16:43:09 +01:00
Cedric van Putten a4f63fcf18 test: make test workflows easier to read (#209) 2023-02-20 15:23:33 +01:00
69 changed files with 452455 additions and 50163 deletions

No files matched your search

+1 -1
View File
@@ -3,4 +3,4 @@
* text=auto
# These files are text and should be normalized (Convert crlf => lf)
build/** text eol=lf
build/** text eol=lf linguist-generated=true
+25
View File
@@ -0,0 +1,25 @@
name: Setup Runtime
description: Prepare Runtime in GitHub Actions
inputs:
bun-version:
description: Version of Bun to use
default: latest # TODO(cedric): replace with fixed major version after fixing https://github.com/oven-sh/setup-bun/issues/37
node-version:
description: Version of Node to use
default: 20.x
runs:
using: composite
steps:
- name: 🏗 Setup Bun
if: ${{ runner.os != 'Windows' }}
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ inputs.bun-version }}
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
+34 -27
View File
@@ -11,7 +11,7 @@ on:
concurrency:
group: release
cancel-in-progress: true
cancel-in-progress: false
jobs:
dryrun:
@@ -19,19 +19,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 📦 Install dependencies
run: yarn install --frozen-lockfile
run: bun install
- name: 📋 Dry-running release
run: yarn semantic-release --dry-run
run: bun semantic-release --dry-run
env:
GITHUB_TOKEN: ${{ github.token }}
@@ -40,43 +37,48 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
- name: 🏗 Setup Node
uses: actions/setup-node@v3
uses: actions/checkout@v4
with:
node-version: 16.x
cache: yarn
token: ${{ secrets.EXPOBOT_GITHUB_TOKEN }}
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 📦 Install dependencies
run: yarn install --frozen-lockfile
run: bun install
- name: 📋 Release code
run: yarn semantic-release
run: bun semantic-release
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.EXPOBOT_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: Expo CI
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: Expo CI
GIT_COMMITTER_EMAIL: [email protected]
tags:
needs: publish
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
- name: 🏗 Setup Node
uses: actions/setup-node@v3
uses: actions/checkout@v4
with:
node-version: 16.x
cache: yarn
token: ${{ secrets.EXPOBOT_GITHUB_TOKEN }}
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 👷 Force repo to latest
run: git fetch --all && git pull
- name: 📦 Install dependencies
run: yarn install --frozen-lockfile
run: bun install
- name: 📦 Install semver
run: yarn add --dev semver
run: bun add --dev semver
- name: 🕵️ Resolve major version
uses: actions/github-script@v6
uses: actions/github-script@v7
id: version
with:
result-encoding: string
@@ -85,6 +87,11 @@ jobs:
const { version } = require('./package.json')
return semver.major(version)
- name: 👷 Configure git
run: |
git config user.name "Expo CI"
git config user.email "[email protected]"
- name: 🧹 Clean repo
run: git clean . -xdf && git reset --hard HEAD && git pull && git fetch --tags
+9 -15
View File
@@ -7,43 +7,37 @@ on:
types: [opened, synchronize]
concurrency:
group: review-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
node: [16.x]
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 📦 Install dependencies
run: yarn install --frozen-lockfile --check-files
run: bun install
- name: ✅ Lint code
run: yarn lint --max-warnings=0
run: bun run lint --max-warnings=0
- name: 🧪 Test code
run: yarn test
run: bun run test
- name: 👷 Build code
run: yarn clean && yarn build
run: bun run clean && bun run build
- name: 🕵️ Validate build
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol build/ | wc -l)" -gt "0" ]; then
echo "⚠️ Build is outdated"
echo " > run 'yarn clean', 'yarn build', and commit changes"
echo " > run 'bun run clean', 'bun run build', and commit changes"
git diff
exit 1
fi
+86 -37
View File
@@ -10,7 +10,7 @@ on:
workflow_dispatch:
concurrency:
group: test-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
env:
@@ -20,37 +20,34 @@ jobs:
setup:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
cache:
- with-cache
- without-cache
packager:
- yarn
include:
- os: ubuntu-latest
cache: without-cache
packager: npm
- os: windows-latest
cache: without-cache
packager: npm
- os: macos-latest
cache: without-cache
packager: npm
runs-on: ${{ matrix.os }}
os: [ubuntu, windows, macos]
cache: [cache, no-cache]
packager: [bun, npm, yarn]
exclude:
# Mac can't unpack caches that fast
- os: macos
cache: cache
# Windows can't unpack caches that fast
- os: windows
cache: cache
# Bun isn't supported on Windows (yet)
- os: windows
packager: bun
runs-on: ${{ matrix.os }}-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 🏗 Setup Expo
uses: ./
with:
eas-version: latest
eas-cache: ${{ matrix.cache == 'with-cache' }}
eas-cache: ${{ matrix.cache == 'cache' }}
expo-version: latest
expo-cache: ${{ matrix.cache == 'with-cache' }}
expo-cache: ${{ matrix.cache == 'cache' }}
packager: ${{ matrix.packager }}
token: ${{ secrets.EXPO_TOKEN }}
@@ -72,28 +69,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 🏗 Setup EAS
uses: ./
with:
eas-version: latest
packager: bun
token: ${{ secrets.EXPO_TOKEN }}
- name: 🏗 Setup project
run: yarn create expo-app ./temp
run: bun create expo ./temp --template blank
- name: 🏗 Setup `expo-dev-client`
working-directory: ./temp
run: bun expo install expo-dev-client
- name: 👷 Configure project
working-directory: ./temp
run: |
eas init --id ${{ secrets.EXPO_PROJECT_ID }} --force --non-interactive
echo $(jq '.expo.runtimeVersion.policy = "sdkVersion"' app.json) > app.json
echo $(jq '.expo.scheme = ["expogithubaction", "ega"]' app.json) > app.json
- name: 🚀 Create preview (without comment)
if: ${{ env.hasAuth == 'true' }}
@@ -108,7 +108,7 @@ jobs:
- name: 🧪 Comment has content
if: ${{ env.hasAuth == 'true' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const comment = `${{ steps.no-comment.outputs.comment }}`
@@ -130,7 +130,7 @@ jobs:
- name: 🧪 Single QR has content
if: ${{ env.hasAuth == 'true' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const comment = `${{ steps.single-qr.outputs.comment }}`
@@ -160,7 +160,7 @@ jobs:
- name: 🧪 Multi QR has content
if: ${{ env.hasAuth == 'true' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const comment = `${{ steps.multi-qr.outputs.comment }}`
@@ -169,21 +169,70 @@ jobs:
throw new Error('Message output is empty');
}
- name: 🚀 Create preview (with "dev-build" QR target)
if: ${{ env.hasAuth == 'true' }}
uses: ./preview
id: dev-build-qr
env:
EXPO_TEST_GITHUB_PULL: 206
with:
working-directory: ./temp
command: eas update --branch test --message "This is a test"
comment: false
- name: 🧪 Comment has "dev-build" QR
if: ${{ env.hasAuth == 'true' }}
uses: actions/github-script@v7
with:
script: |
const qrUrl = `${{ steps.dev-build-qr.outputs.qr }}`
if (!qrUrl || !qrUrl.includes('appScheme')) {
console.log({ qrUrl });
throw new Error('QR URL is missing "appScheme" to point to a dev build');
}
- name: 🚀 Create preview (with "expo-go" QR target from input)
if: ${{ env.hasAuth == 'true' }}
uses: ./preview
id: expo-go-qr
env:
EXPO_TEST_GITHUB_PULL: 206
with:
working-directory: ./temp
qr-target: expo-go
command: eas update --branch test --message "This is a test"
comment: false
- name: 🧪 Comment has "expo-go" QR code
if: ${{ env.hasAuth == 'true' }}
uses: actions/github-script@v7
with:
script: |
const qrUrl = `${{ steps.expo-go-qr.outputs.qr }}`
if (!qrUrl || qrUrl.includes('appScheme')) {
console.log({ qrUrl });
throw new Error('QR URL points to a dev build, not Expo Go');
}
preview-comment:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 🏗 Setup Expo
uses: ./
with:
eas-version: latest
expo-version: latest
packager: bun
token: ${{ secrets.EXPO_TOKEN }}
- name: 🏗 Setup project
run: expo init -t blank ./temp
run: bun create expo ./temp --template blank
- name: 🧪 Without commenting
if: ${{ env.hasAuth == 'true' }}
@@ -195,7 +244,7 @@ jobs:
- name: 🧪 Output has content
if: ${{ env.hasAuth == 'true' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const message = `${{ steps.preview.outputs.message }}`
+2 -1
View File
@@ -7,8 +7,9 @@
# Node
node_modules
npm-debug.log
yarn-error.log
package-lock.json
yarn-error.log
yarn.lock
# Ruby
.direnv
+81
View File
@@ -1,3 +1,84 @@
## [8.2.1](https://github.com/expo/expo-github-action/compare/8.2.0...8.2.1) (2024-01-15)
### Bug fixes
* **preview:** filter slugs with special characters to match dev clients `exp+<slug>` scheme ([#252](https://github.com/expo/expo-github-action/issues/252)) ([b8a9be8](https://github.com/expo/expo-github-action/commit/b8a9be8336bf5609f8e299a8486f9a2bf7073f8a))
## [8.2.0](https://github.com/expo/expo-github-action/compare/8.1.0...8.2.0) (2023-12-02)
### New features
* **preview:** add `qr-target` and use proper QR codes for `expo-go` and `dev-build` ([#247](https://github.com/expo/expo-github-action/issues/247)) ([54efbfd](https://github.com/expo/expo-github-action/commit/54efbfdf1d130888a5f13b73fb7adc85edeb8855))
### Documentation changes
* **preview:** clarify the branch and workflow trigger relations ([#246](https://github.com/expo/expo-github-action/issues/246)) ([ccfad6f](https://github.com/expo/expo-github-action/commit/ccfad6f148eaa709959a64b1be216481f4ca54ff))
## [8.1.0](https://github.com/expo/expo-github-action/compare/8.0.0...8.1.0) (2023-11-24)
### New features
* add fingerprint integration ([#231](https://github.com/expo/expo-github-action/issues/231)) ([e6622e0](https://github.com/expo/expo-github-action/commit/e6622e076de31220ec97e3d7494de70cf1ab85b2))
* add readme for preview-build and fingerprint action ([#232](https://github.com/expo/expo-github-action/issues/232)) ([acc171b](https://github.com/expo/expo-github-action/commit/acc171bb5e34cd76bf152307e562bb49e7743b94)), closes [/github.com/expo/expo-github-action/pull/231#pullrequestreview-1628540314](https://github.com/expo//github.com/expo/expo-github-action/pull/231/issues/pullrequestreview-1628540314)
* **preview:** add update manifest permalinks to the output ([#245](https://github.com/expo/expo-github-action/issues/245)) ([331a5ab](https://github.com/expo/expo-github-action/commit/331a5abc4196b7590363c2b3ec842a0a17f98fa2))
### Bug fixes
* **preview:** allow multiple `app.json` schemes ([#244](https://github.com/expo/expo-github-action/issues/244)) ([42d64cf](https://github.com/expo/expo-github-action/commit/42d64cf92010d7210784c0f30bcaa611d8bae55d))
### Code changes
* update error handling to node 20 standards ([#243](https://github.com/expo/expo-github-action/issues/243)) ([65ee055](https://github.com/expo/expo-github-action/commit/65ee05557f89a7804e36b2d3fe4f3d33aea7011a))
* update workflows and repository to use Bun ([#241](https://github.com/expo/expo-github-action/issues/241)) ([7f1c170](https://github.com/expo/expo-github-action/commit/7f1c170873ddbadfb0ba311dd94b43d14c795ee3))
* upgrade all actions to run on node 20 ([#242](https://github.com/expo/expo-github-action/issues/242)) ([b3e5355](https://github.com/expo/expo-github-action/commit/b3e53555d9effcab01011226c5e811c263a449cb))
### Other chores
* **ci:** update release flow with new service account ([#238](https://github.com/expo/expo-github-action/issues/238)) ([e289d93](https://github.com/expo/expo-github-action/commit/e289d93e119801f899eb2b94d80d92718172dba3))
* update release workflow actions ([#239](https://github.com/expo/expo-github-action/issues/239)) ([57dcabe](https://github.com/expo/expo-github-action/commit/57dcabe749340c8c995ee0334cd7c547c35770d0))
### Documentation changes
* add link to breaking change pull request ([9e1a8c8](https://github.com/expo/expo-github-action/commit/9e1a8c8343d0f9405717e103c71e2e3ce9286bbc))
* fix changelog link in readme ([185932d](https://github.com/expo/expo-github-action/commit/185932d43cd424c08c2d530a3cedad352d66e78e))
* update example to use `eas-version` ([#222](https://github.com/expo/expo-github-action/issues/222)) ([7bc946c](https://github.com/expo/expo-github-action/commit/7bc946c5f6b768b1a1858c1722b3aac4e0064c23))
## [8.0.0](https://github.com/expo/expo-github-action/compare/7.2.1...8.0.0) (2023-02-20)
### ⚠ BREAKING CHANGES
* **preview-comment:** add deprecation notice with blog post ([#207](https://github.com/expo/expo-github-action/issues/207))
### New features
* **preview:** add eas update preview sub-action ([#206](https://github.com/expo/expo-github-action/issues/206)) ([f4d6037](https://github.com/expo/expo-github-action/commit/f4d6037f42d672db10e7818c8bd1211fb26a27b3))
### Code changes
* **preview-comment:** add deprecation notice with blog post ([#207](https://github.com/expo/expo-github-action/issues/207)) ([d2b3e6c](https://github.com/expo/expo-github-action/commit/d2b3e6c7848afe984ee32bfad1b05aac374a79e3))
### Other chores
* bump http-cache-semantics from 4.1.0 to 4.1.1 ([#205](https://github.com/expo/expo-github-action/issues/205)) ([b1a8c06](https://github.com/expo/expo-github-action/commit/b1a8c06f1cd42cf6b9dde48c88d08a9421d8768c))
### Documentation changes
* **preview-comment:** emphasize that this sub-action is now deprecated ([f4af238](https://github.com/expo/expo-github-action/commit/f4af2383c1d07f127157450bc44c34e0378587ac))
* update examples for v8 ([#210](https://github.com/expo/expo-github-action/issues/210)) ([3d1cf9a](https://github.com/expo/expo-github-action/commit/3d1cf9ab88f78450c67865a77c36e04be7a0517c))
* update the readme with new examples ([#208](https://github.com/expo/expo-github-action/issues/208)) ([ae5d1a1](https://github.com/expo/expo-github-action/commit/ae5d1a19547903399b413298b87a86df814c5b9b))
## [7.2.1](https://github.com/expo/expo-github-action/compare/7.2.0...7.2.1) (2023-01-04)
+13 -11
View File
@@ -25,7 +25,7 @@
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#things-to-know"><b>Caveats</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="/blob/main/CHANGELOG.md"><b>Changelog</b></a>
<a href="./CHANGELOG.md"><b>Changelog</b></a>
</p>
<br />
@@ -49,7 +49,7 @@ Here is a summary of all the input options you can use.
| **expo-cache** | `true` | If it should use the GitHub actions cache ([read more](#using-the-built-in-cache)) |
| **eas-version** | - | EAS CLI version to install _(skips when omitted)_ |
| **eas-cache** | `true` | If it should use the GitHub actions cache ([read more](#using-the-built-in-cache)) |
| **packager** | `yarn` | Package manager to use _(e.g. `yarn` or `npm`)_ |
| **packager** | `yarn` | Package manager to use _(e.g. `bun`, `yarn`, or `npm`)_ |
| **token** | - | Token of your Expo account - [get your token][link-expo-token] _(use with [secrets][link-actions-secrets])_ |
| **patch-watchers** | `true` | If it should patch the `fs.inotify.*` limits on Ubuntu ([read more](#enospc-errors-on-linux)) |
@@ -84,11 +84,11 @@ jobs:
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -123,11 +123,11 @@ jobs:
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -159,22 +159,24 @@ jobs:
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: 📦 Install dependencies
run: yarn install
- name: 🚀 Create preview
uses: expo/expo-github-action/preview@v7
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto
# `github.event.pull_request.head.ref` is only available on `pull_request` triggers.
# Use your own, or keep the automatically infered branch name from `--auto`, when using different triggers.
command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}
```
## Things to know
+1 -1
View File
@@ -6,7 +6,7 @@ branding:
icon: terminal
color: gray-dark
runs:
using: node16
using: node20
main: build/setup/index.js
inputs:
expo-version:
+29101 -8745
View File
File diff suppressed because it is too large. Load diff
+47
View File
@@ -83,6 +83,28 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
@@ -666,6 +688,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
File diff suppressed because it is too large. Load diff
+835
View File
@@ -0,0 +1,835 @@
@actions/core
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/exec
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/github
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/http-client
MIT
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/io
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/tool-cache
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/core
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/endpoint
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/graphql
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/plugin-paginate-rest
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/plugin-rest-endpoint-methods
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/request
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/request-error
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
before-after-hook
Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Gregor Martynus and other contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
deprecation
ISC
The ISC License
Copyright (c) Gregor Martynus and contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
encoding
MIT
Copyright (c) 2012-2014 Andris Reinman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
iconv-lite
MIT
Copyright (c) 2011 Alexander Shtuchkin
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
is-plain-object
MIT
The MIT License (MIT)
Copyright (c) 2014-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
lru-cache
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
node-fetch
MIT
The MIT License (MIT)
Copyright (c) 2016 David Frank
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
once
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
safer-buffer
MIT
MIT License
Copyright (c) 2018 Nikita Skovoroda <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
semver
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
tr46
MIT
tunnel
MIT
The MIT License (MIT)
Copyright (c) 2012 Koichi Kobayashi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
uuid
MIT
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
webidl-conversions
BSD-2-Clause
# The BSD 2-Clause License
Copyright (c) 2014, Domenic Denicola
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
whatwg-url
MIT
The MIT License (MIT)
Copyright (c) 2015–2016 Sebastian Mayr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
wrappy
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
yallist
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+91660
View File
File diff suppressed because it is too large. Load diff
+1598
View File
File diff suppressed because it is too large. Load diff
+91643
View File
File diff suppressed because it is too large. Load diff
+1598
View File
File diff suppressed because it is too large. Load diff
+92311
View File
File diff suppressed because it is too large. Load diff
+1598
View File
File diff suppressed because it is too large. Load diff
+29045 -8690
View File
File diff suppressed because it is too large. Load diff
+47
View File
@@ -83,6 +83,28 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
@@ -666,6 +688,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
+29944 -9232
View File
File diff suppressed because it is too large. Load diff
+47
View File
@@ -83,6 +83,28 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
@@ -685,6 +707,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
+34691 -15799
View File
File diff suppressed because it is too large. Load diff
+521 -69
View File
@@ -34,6 +34,18 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/github
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/glob
MIT
The MIT License (MIT)
@@ -120,31 +132,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@azure/core-asynciterator-polyfill
MIT
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
@azure/core-auth
MIT
The MIT License (MIT)
@@ -345,6 +332,200 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/core
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/endpoint
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/graphql
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/plugin-paginate-rest
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/plugin-rest-endpoint-methods
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/request
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/request-error
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@opentelemetry/api
Apache-2.0
Apache License
@@ -600,6 +781,211 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
before-after-hook
Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Gregor Martynus and other contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
brace-expansion
MIT
MIT License
@@ -693,6 +1079,25 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
deprecation
ISC
The ISC License
Copyright (c) Gregor Martynus and contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
encoding
MIT
Copyright (c) 2012-2014 Andris Reinman
@@ -761,12 +1166,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
mime-db
is-plain-object
MIT
The MIT License (MIT)
Copyright (c) 2014 Jonathan Ong [email protected]
Copyright (c) 2014-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -787,6 +1191,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
mime-db
MIT
(The MIT License)
Copyright (c) 2014 Jonathan Ong <[email protected]>
Copyright (c) 2015-2022 Douglas Christopher Wilson <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
mime-types
MIT
(The MIT License)
@@ -859,17 +1290,23 @@ SOFTWARE.
psl
MIT
The MIT License (MIT)
once
ISC
The ISC License
Copyright (c) 2017 Lupo Montero [email protected]
Copyright (c) Isaac Z. Schlueter and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
safer-buffer
@@ -901,7 +1338,7 @@ sax
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -920,7 +1357,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
`String.fromCodePoint` by Mathias Bynens used according to terms of MIT
License, as follows:
Copyright Mathias Bynens <https://mathiasbynens.be/>
Copyright (c) 2010-2022 Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -961,22 +1398,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
tough-cookie
BSD-3-Clause
Copyright (c) 2015, Salesforce.com, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
tr46
MIT
@@ -1020,28 +1441,40 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
universalify
undici
MIT
(The MIT License)
MIT License
Copyright (c) 2017, Ryan Zimmerman <[email protected]>
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
uuid
@@ -1098,6 +1531,25 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
wrappy
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
xml2js
MIT
Copyright 2010, 2011, 2012, 2013. All rights reserved.
Executable
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -77,11 +77,11 @@ jobs:
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn
- name: 🏗 Setup Expo
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
eas-version: latest
expo-version: latest
@@ -91,7 +91,7 @@ jobs:
run: yarn install
- name: 🤖 Run expo bot
uses: expo/expo-github-action/command@v7
uses: expo/expo-github-action/command@v8
```
## Things to know
+1 -1
View File
@@ -6,7 +6,7 @@ branding:
icon: message-circle
color: gray-dark
runs:
using: node16
using: node20
main: ../build/command/index.js
inputs:
github-token:
+162
View File
@@ -0,0 +1,162 @@
<div align="center">
<h1>continuous-deploy-fingerprint</h1>
<p>Continuously deploys an Expo project using EAS Build and EAS Update in combination with fingerprint runtime versions</p>
</div>
<p align="center">
<a href="https://github.com/expo/expo-github-action/releases" title="Latest release">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=49505A">
<img alt="Latest release" src="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=D1D5DA" />
</picture>
</a>
<a href="https://github.com/expo/expo-github-action/actions" title="Workflow status">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=49505A">
<img alt="Workflow status" src="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=D1D5DA" />
</picture>
</a>
</p>
<p align="center">
<a href="#usage"><b>Usage</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#available-outputs"><b>Outputs</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#example-workflows"><b>Examples</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#caveats"><b>Caveats</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md"><b>Changelog</b></a>
</p>
<br />
> **Warning**
> This sub action is still in development and might change without notice. It is not yet ready for use.
## Overview
`continuous-deploy-fingerprint` is a GitHub Action continuously deploys an Expo project using the expo-updates fingerprint runtime version policy. When run, it performs the following tasks in order, once for each platform:
1. Check current fingerprint of the project.
2. Check for EAS builds with specified profile matching that fingerprint.
3. If an EAS build doesn't exist, start one.
4. Publish an update on EAS update.
5. If run on a PR, post a comment indicating what was done.
### Configuration options
This action is customizable through variables defined in the [`action.yml`](action.yml).
Here is a summary of all the input options you can use.
| variable | default | description |
| ---------------------------------- | ---------------- | ----------------------------------------------------------------------- |
| **profile** | (required) | The EAS Build profile to use |
| **branch** | (required) | The EAS Update branch on which to publish |
| **working-directory** | - | The relative directory of your Expo app |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |
And the action will generate these [outputs](#available-outputs) for other actions to do something based on what this action did.
### Available outputs
In case you want to reuse this action for other purpose, this action will set the following action outputs.
| output name | description |
| ------------------------ | ------------------------------ |
| **ios-fingerprint** | The iOS fingerprint of the current commit. |
| **android-fingerprint** | The Android fingerprint of the current commit. |
| **android-build-id** | ID for Android EAS Build if one was started. |
| **ios-build-id** | ID for iOS EAS Build if one was started. |
| **update-output** | The output (JSON) from the `eas update` command. |
## Caveats
### GitHub tokens
When using the GitHub API, you always need to be authenticated.
This action tries to auto-authenticate using the [Automatic token authentication][link-gha-token] from GitHub.
You can overwrite the token by adding the `GITHUB_TOKEN` environment variable or add the **github-token** input.
## Example workflows
Before diving into the workflow examples, you should know the basics of GitHub Actions.
You can read more about this in the [GitHub Actions documentation][link-actions].
### Continuously deploy after tests on main branch and pull requests
This workflow continuously deploys:
- main branch -> production EAS Build profile and EAS Update branch
- PR branches -> development EAS Build profile and EAS Update branch
This means that every commit landed to main will go out to users on production. If a new build is created, it will need to be manually submitted to the app stores.
Pull requests also do a build if necessary and display a QR code to scan to preview the latest commit on the PR.
```yml
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: 📦 Install dependencies
run: yarn install
- name: 🧪 Run tests
run: yarn test
continuously-deploy:
needs: test
runs-on: ubuntu-latest
concurrency: continuous-deploy-fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }}
permissions:
contents: read # Allow checkout
pull-requests: write # Allow comments on PRs
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: 📦 Install dependencies
run: yarn install
- name: 🏗 Setup EAS
uses: expo/expo-github-action@main
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Continuously Deploy
uses: expo/expo-github-action/continuous-deploy-fingerprint@main
with:
profile: ${{ github.event_name != 'pull_request' && 'production' || 'development' }}
branch: ${{ github.event_name != 'pull_request' && 'production' || 'development' }}
```
<div align="center">
<br />
with :heart:&nbsp;<strong>Expo</strong>
<br />
</div>
[link-actions]: https://help.github.com/en/categories/automating-your-workflow-with-github-actions
[link-gha-token]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
+37
View File
@@ -0,0 +1,37 @@
---
name: Expo GitHub Action - Continuous Deploy Fingerprint
author: Expo
description: Continuously deploy an Expo project using EAS Build and EAS Update with fingerprint.
branding:
icon: smartphone
color: gray-dark
runs:
using: node20
main: ../build/continuous-deploy-fingerprint/index.js
inputs:
profile:
description: The EAS Build profile to use, must have EAS Update channel specified in eas.json
required: true
branch:
description: The EAS Update branch on which to publish.
required: true
github-token:
description: GitHub token to use when commenting on PR
required: false
default: ${{ github.token }}
working-directory:
description: The relative directory of your Expo app
required: false
default: ${{ github.workspace }}
outputs:
android-fingerprint:
description: The Android fingerprint of the current commit.
ios-fingerprint:
description: The iOS fingerprint of the current commit.
android-build-id:
description: ID for Android EAS Build if one was started
ios-build-id:
description: ID for iOS EAS Build if one was started.
update-output:
description: The output (JSON) from the `eas update` command
+205
View File
@@ -0,0 +1,205 @@
<div align="center">
<h1>fingerprint</h1>
<p>Checking project fingerprinting for pull requests using <a href="https://www.npmjs.com/package/@expo/fingerprint"><code>@expo/fingerprint</code></a></p>
</div>
<p align="center">
<a href="https://github.com/expo/expo-github-action/releases" title="Latest release">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=49505A">
<img alt="Latest release" src="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=D1D5DA" />
</picture>
</a>
<a href="https://github.com/expo/expo-github-action/actions" title="Workflow status">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=49505A">
<img alt="Workflow status" src="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=D1D5DA" />
</picture>
</a>
</p>
<p align="center">
<a href="#usage"><b>Usage</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#available-outputs"><b>Outputs</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#example-workflows"><b>Examples</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#caveats"><b>Caveats</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md"><b>Changelog</b></a>
</p>
<br />
> **Warning**
> This sub action is experimental and might change without notice. Use it at your own risk
## Overview
`fingerprint` is a GitHub Action that checks project fingerprinting for pull requests using [`@expo/fingerprint`](https://www.npmjs.com/package/@expo/fingerprint). When a pull request is updated, you can use this action to check the fingerprint integrity. If a pull request is fingerprint compatible, it means there are no changes from native code and be Over-The-Air updates compatible. Otherwise, if fingerprint changed, it means the project has native code changes.
This action is designed to be used in conjunction with the `@expo/fingerprint` package, which generates a unique fingerprint for each pull request based on the contents of the code. By using fingerprinting, this action can determine if a pull request has already been built, and reuse the existing build instead of creating a new one.
## Usage
To use this action, add the following code to your workflow:
```yaml
on:
push:
# REQUIRED: push main(default) branch is necessary for this action to update its fingerprint database
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
<JOB_NAME>:
runs-on: <RUNNER>
# REQUIRED: limit concurrency when pushing main(default) branch to prevent conflict for this action to update its fingerprint database
concurrency: fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }}
permissions:
# REQUIRED: Allow comments of PRs
pull-requests: write # Allow comments on PRs
# REQUIRED: Allow updating fingerprint in action caches
actions: write
steps:
- name: Check fingerprint
uses: expo/expo-github-action/fingerprint@main
```
### Configuration options
This action is customizable through variables defined in the [`action.yml`](action.yml).
Here is a summary of all the input options you can use.
| variable | default | description |
| ---------------------------------- | ---------------- | ----------------------------------------------------------------------- |
| **working-directory** | - | The relative directory of your Expo app |
| **packager** | `yarn` | The package manager used to install the fingerprint tools |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |
| **fingerprint-version** | `latest` | `@expo/fingerprint` version to install |
| **fingerprint-installation-cache** | `true` | If the `@expo/fingerprint` should be cached to speed up installation |
| **fingerprint-db-cache-key** | `fingerprint-db` | A cache key to use for saving the fingerprint database |
And the action will generate these [outputs](#available-outputs) for other actions to do something based on current project fingerprint
### Available outputs
In case you want to reuse this action for other purpose, this action will set the following action outputs.
| output name | description |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **previous-fingerprint** | The fingerprint of the base commit if it has been computed previously. May be null if it has not been computed previously. |
| **current-fingerprint** | The fingerprint of the current commit. |
| **previous-git-commit** | The Git hash for the base commit. |
| **current-git-commit** | The Git hash for the current commit. |
| **fingerprint-diff** | The diff between the current and the previous fingerprint. It is a JSON array of fingerprint diff. If the fingerprint does not change in between, the result diff will be an empty array `[]` |
## Example workflows
Here's an example workflow that uses this action to comment pull requests and add `Fingerprint:compatible` and `Fingerprint:changed` labels
```yaml
name: PR Labeler
on:
push:
# REQUIRED: push main(default) branch is necessary for this action to update its fingerprint database
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
fingerprint:
runs-on: ubuntu-latest
# REQUIRED: limit concurrency when pushing main(default) branch to prevent conflict for this action to update its fingerprint database
concurrency: fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }}
permissions:
# REQUIRED: Allow comments of PRs
pull-requests: write # Allow comments on PRs
# REQUIRED: Allow updating fingerprint in action caches
actions: write
# OPTIONAL: Allow reading of repo contents for private projects
# contents: read
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v3
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: 📦 Install dependencies
run: yarn install
- name: Check fingerprint
id: fingerprint
uses: expo/expo-github-action/fingerprint@main
- uses: actions/github-script@v6
if: ${{ github.event_name == 'pull_request' && steps.fingerprint.outputs.fingerprint-diff == '[]' }}
with:
script: |
try {
await github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ['Fingerprint:changed']
})
} catch (e) {
if (e.status != 404) {
throw e;
}
}
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Fingerprint:compatible']
})
- uses: actions/github-script@v6
if: ${{ github.event_name == 'pull_request' && steps.fingerprint.outputs.fingerprint-diff != '[]' }}
with:
script: |
try {
await github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ['Fingerprint:compatible']
})
} catch (e) {
if (e.status != 404) {
throw e;
}
}
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Fingerprint:changed']
})
```
This workflow listens for pull request events and generates a fingerprint for each pull request. Based on the `fingerprint-diff` output, the example then use GitHub API to add/remove labels based on fingerprint compatible state.
## Caveats
### GitHub tokens
When using the GitHub API, you always need to be authenticated.
This action tries to auto-authenticate using the [Automatic token authentication][link-gha-token] from GitHub.
You can overwrite the token by adding the `GITHUB_TOKEN` environment variable or add the **github-token** input.
<div align="center">
<br />
with :heart:&nbsp;<strong>Expo</strong>
<br />
</div>
+56
View File
@@ -0,0 +1,56 @@
---
name: Expo GitHub Action - Fingerprint
author: Expo
description: Check project fingerprint
branding:
icon: smartphone
color: gray-dark
runs:
using: node20
main: ../build/fingerprint/index.js
post: ../build/fingerprint-post/index.js
post-if: success()
inputs:
packager:
description: The package manager used to install the fingerprint tools
default: yarn
github-token:
description: GitHub token to use when commenting on PR
required: false
default: ${{ github.token }}
working-directory:
description: The relative directory of your Expo app
required: false
default: ${{ github.workspace }}
fingerprint-version:
description: Fingerprint version to install
required: false
default: latest
fingerprint-installation-cache:
description: If fingerprint should be cached to speed up installation
default: true
fingerprint-db-cache-key:
description: A cache key to use for saving the fingerprint database
required: false
default: fingerprint-db
previous-git-commit:
description: The Git hash for the base commit
required: false
current-git-commit:
description: The Git hash for the current commit
required: false
saving-db-branch:
description: The branch for saving the fingerprint database. Defaults to the repository's default branch
required: false
outputs:
previous-fingerprint:
description: The fingerprint of the previous commit. May be null if it has never previously been computed
current-fingerprint:
description: The fingerprint of the current commit
previous-git-commit:
description: The Git hash for the base commit
current-git-commit:
description: The Git hash for the current commit
fingerprint-diff:
description: The diff between the current and the previous fingerprint
+2 -1
View File
@@ -1,8 +1,9 @@
/** @type {import('@jest/types').Config.InitialOptions} */
/** @type {import('jest').Config} */
module.exports = {
verbose: true,
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
prettierPath: require.resolve('jest-snapshot-prettier'),
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
transform: {
+34 -3
View File
@@ -1,12 +1,39 @@
const spawn = require('@expo/spawn-async');
const ncc = require('@vercel/ncc');
const fs = require('fs');
const { boolish } = require('getenv');
const path = require('path');
build();
// For some entries, we need to specify externals for ncc to leave their require() as-it.
const EXTERNAL_REQUIRES = {
fingerprint: ['@expo/fingerprint', 'module', 'sqlite3'],
'fingerprint-post': ['@expo/fingerprint', 'module', 'sqlite3'],
'preview-build': ['@expo/fingerprint', 'module', 'sqlite3'],
};
const actionsDir = path.resolve(__dirname, 'src/actions');
const buildDir = path.resolve(__dirname, 'build');
const modulesDir = path.resolve(__dirname, 'node_modules');
prebuild().then(() => build());
async function prebuild() {
if (!boolish(process.env.CI, false)) {
return console.log('Skipped CI environment simulation');
}
console.log('Preparing build in simulated CI environment');
await fs.promises.rm(buildDir, { force: true, recursive: true });
await fs.promises.rm(modulesDir, { force: true, recursive: true });
await spawn('bun', ['install', '--frozen-lockfile'], { stdio: 'inherit', env: { ...process.env, CI: true } });
console.log();
}
async function build() {
const actionsDir = path.resolve(__dirname, 'src/actions');
const buildDir = path.resolve(__dirname, 'build');
console.log('Building actions');
const actions = fs
.readdirSync(actionsDir, { withFileTypes: true })
@@ -22,10 +49,14 @@ async function build() {
console.log(`✓ ${path.relative(__dirname, action.file)}`);
}
console.log();
console.log('All actions built');
}
async function compile(entry) {
const { code, map, assets } = await ncc(entry, {
externals: EXTERNAL_REQUIRES[path.parse(entry).name] ?? [],
cache: false,
license: 'license.txt',
quiet: true,
+18 -10
View File
@@ -1,7 +1,7 @@
{
"private": true,
"name": "expo-github-action",
"version": "7.2.1",
"version": "8.2.1",
"description": "Expo CLI in your GitHub Actions workflow",
"main": "build/index.js",
"repository": {
@@ -27,28 +27,36 @@
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.2",
"@actions/tool-cache": "^2.0.1",
"semver": "^7.3.8"
"semver": "^7.3.8",
"uuid": "^8.3.2"
},
"devDependencies": {
"@expo/config": "^7.0.3",
"@expo/config": "^8.1.2",
"@expo/fingerprint": "^0.1.0",
"@expo/spawn-async": "^1.7.2",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@tsconfig/node16": "^1.0.3",
"@tsconfig/node20": "^20.1.2",
"@types/jest": "^29.2.5",
"@types/node": "^16.18.11",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"@types/uuid": "^9.0.3",
"@vercel/ncc": "^0.36.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"eslint": "^8.31.0",
"eslint-config-universe": "^11.1.1",
"eslint": "^8.54.0",
"eslint-config-universe": "^12.0.0",
"getenv": "^1.0.0",
"jest": "^29.3.1",
"prettier": "^2.8.1",
"jest-snapshot-prettier": "npm:prettier@^2.8.8",
"prettier": "^3.1.0",
"semantic-release": "^19.0.5",
"sqlite3": "^5.1.6",
"ts-jest": "^29.0.3",
"typescript": "^4.9.4"
"typescript": "^5.3.2"
},
"trustedDependencies": [
"sqlite3"
],
"eslintConfig": {
"extends": "universe/node",
"ignorePatterns": [
+183
View File
@@ -0,0 +1,183 @@
<div align="center">
<h1>preview-build</h1>
<p>Checking project fingerprinting for pull requests using <a href="https://www.npmjs.com/package/@expo/fingerprint"><code>@expo/fingerprint</code></a></p>
</div>
<p align="center">
<a href="https://github.com/expo/expo-github-action/releases" title="Latest release">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=49505A">
<img alt="Latest release" src="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=D1D5DA" />
</picture>
</a>
<a href="https://github.com/expo/expo-github-action/actions" title="Workflow status">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=49505A">
<img alt="Workflow status" src="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=D1D5DA" />
</picture>
</a>
</p>
<p align="center">
<a href="#usage"><b>Usage</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#available-outputs"><b>Outputs</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#example-workflows"><b>Examples</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="#caveats"><b>Caveats</b></a>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;
<a href="https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md"><b>Changelog</b></a>
</p>
<br />
> **Warning**
> This sub action is experimental and might change without notice. Use it at your own risk
## Overview
`preview-build` is a GitHub Action that creates new EAS Builds for pull requests using [`@expo/fingerprint`](https://www.npmjs.com/package/@expo/fingerprint). When a pull request is updated, you can use this action to check the fingerprint integrity. If a pull request is fingerprint compatible, it means there are no changes from native code and be EAS Update compatible. Otherwise, if fingerprint changed, it means native code changed and the action will create new EAS Builds.
This action is designed to be used in conjunction with the `@expo/fingerprint` package, which generates a unique fingerprint for each pull request based on the contents of the code. By using fingerprinting, this action can determine if a pull request has already been built, and reuse the existing build instead of creating a new one.
## Usage
To use this action, add the following code to your workflow:
```yaml
on:
push:
# REQUIRED: push main(default) branch is necessary for this action to update its fingerprint database
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
<JOB_NAME>:
runs-on: <RUNNER>
# REQUIRED: limit concurrency when pushing main(default) branch to prevent conflict for this action to update its fingerprint database
concurrency: fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }}
permissions:
# REQUIRED: Allow comments of PRs
pull-requests: write # Allow comments on PRs
# REQUIRED: Allow updating fingerprint in acton caches
actions: write
# Following permissions are required for private repos
contents: read
packages: write
steps:
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Create preview builds if fingerprint changed
uses: expo/expo-github-action/preview-build@main
with:
command: eas build --profile development --platform all
```
### Configuration options
This action is customizable through variables defined in the [`action.yml`](action.yml).
Here is a summary of all the input options you can use.
| variable | default | description |
| ---------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **command** | - | EAS CLI command to run when creating builds |
| **comment** | `true` | If the action should summarize the EAS Update information as comment on a pull request |
| **comment-id** | _[see code][code-defaults]_ | unique id template to prevent duplicate comments ([read more](#preventing-duplicate-comments)) |
| **working-directory** | - | The relative directory of your Expo app |
| **packager** | `yarn` | The package manager used to install the fingerprint tools |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |
| **fingerprint-version** | `latest` | `@expo/fingerprint` version to install |
| **fingerprint-installation-cache** | `true` | If the `@expo/fingerprint` should be cached to speed up installation |
| **fingerprint-db-cache-key** | `fingerprint-db` | A cache key to use for saving the fingerprint database |
| **eas-build-message** | Will retrieve from the Git branch HEAD message | A short message describing the build that will pass to `eas build --message` |
### Available outputs
In case you want to reuse this action for other purpose, this action will set the following action outputs.
| output name | description |
| --------------------- | ------------------------------------------------------------------------------------------------- |
| **projectId** | The resolved EAS project ID |
| **commentId** | The unique comment ID to prevent duplicate comments ([read more](#preventing-duplicate-comments)) |
| **comment** | The comment with information about the updates |
| **gitCommitHash** | Git commit hash that was found when creating this build |
| **androidBuildId** | EAS Build ID for Android |
| **androidLink** | Absolute URL to Android build on expo.dev |
| **androidAppVersion** | Version of the Android app |
| **iosBuildId** | EAS Build ID for iOS |
| **iosLink** | Absolute URL to iOS build on expo.dev |
| **iosAppVersion** | Version of the iOS app |
## Example workflows
Here's an example workflow that uses this action to comment pull requests and create EAS Builds if fingerprint changed
```yaml
name: Build preview for pull requests
on:
push:
# REQUIRED: push main(default) branch is necessary for this action to update its fingerprint database
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
# REQUIRED: limit concurrency when pushing main(default) branch to prevent conflict for this action to update its fingerprint database
concurrency: fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }}
permissions:
# REQUIRED: Allow comments of PRs
pull-requests: write # Allow comments on PRs
# REQUIRED: Allow updating fingerprint in acton caches
actions: write
# Following permissions are required for private repos
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install
- name: Create preview builds if needed
uses: expo/expo-github-action/preview-build@main
with:
command: eas build --profile development --platform all
```
This workflow listens for pull request events and generates a fingerprint for each pull request. It then uses this action to create an EAS Build for the pull request, and deploys the build using another action.
## Caveats
### Preventing duplicate comments
When automating these preview comments, you have to be careful not to spam a pull request on every successful run.
Every comment contains a generated **message-id** to identify previously made comments and update them instead of creating a new comment.
### GitHub tokens
When using the GitHub API, you always need to be authenticated.
This action tries to auto-authenticate using the [Automatic token authentication][link-gha-token] from GitHub.
You can overwrite the token by adding the `GITHUB_TOKEN` environment variable or add the **github-token** input.
<div align="center">
<br />
with :heart:&nbsp;<strong>Expo</strong>
<br />
</div>
+77
View File
@@ -0,0 +1,77 @@
---
name: Expo GitHub Action - Preview EAS Build for Pull Requests
author: Expo
description: Create Expo previews with EAS Build
branding:
icon: smartphone
color: gray-dark
runs:
using: node20
main: ../build/preview-build/index.js
inputs:
command:
description: EAS CLI command to run when creating builds
required: true
comment:
description: If the action should summarize the EAS Build information as comment on a pull request
required: false
default: true
comment-id:
description: unique id template to prevent duplicate comments
working-directory:
description: The relative directory of your Expo app
required: false
default: ${{ github.workspace }}
packager:
description: The package manager used to install the fingerprint tools
default: yarn
github-token:
description: GitHub token to use when commenting on PR
required: false
default: ${{ github.token }}
fingerprint-version:
description: Fingerprint version to install
required: false
default: latest
fingerprint-installation-cache:
description: If fingerprint should be cached to speed up installation
default: true
fingerprint-db-cache-key:
description: A cache key to use for saving the fingerprint database
required: false
default: fingerprint-db
eas-build-message:
description: A short message describing the build
previous-git-commit:
description: The Git hash for the base commit
required: false
current-git-commit:
description: The Git hash for the current commit
required: false
saving-db-branch:
description: The branch for saving the fingerprint database. Defaults to the repository's default branch
required: false
outputs:
projectId:
description: The resolved EAS project ID
commentId:
description: The unique comment ID to prevent duplicate comments
comment:
description: The comment with information about the build
gitCommitHash:
description: Git commit hash that was found when creating this build
androidBuildId:
description: EAS Build ID
androidLink:
description: Absolute URL to platform-independent build on expo.dev
androidAppVersion:
description: Version of the app
iosBuildId:
description: EAS Build ID
iosLink:
description: Absolute URL to platform-independent build on expo.dev
iosAppVersion:
description: iOS build number
+7 -6
View File
@@ -32,6 +32,7 @@
<br />
> **Warning**
> Expo publish is deprecated, but will be supported until 2024. ([read more](https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378))
## What's inside?
@@ -103,11 +104,11 @@ jobs:
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn
- name: 🏗 Setup Expo
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -119,7 +120,7 @@ jobs:
run: expo publish --release-channel=pr-${{ github.event.number }} --non-interactive
- name: 💬 Comment in preview
uses: expo/expo-github-action/preview-comment@v7
uses: expo/expo-github-action/preview-comment@v8
with:
channel: pr-${{ github.event.number }}
```
@@ -148,11 +149,11 @@ jobs:
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn
- name: 🏗 Setup Expo
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -164,7 +165,7 @@ jobs:
run: expo publish --release-channel=production --non-interactive
- name: 👷 Create preview comment
uses: expo/expo-github-action/preview-comment@v7
uses: expo/expo-github-action/preview-comment@v8
id: preview
with:
comment: false
+1 -1
View File
@@ -6,7 +6,7 @@ branding:
icon: message-circle
color: gray-dark
runs:
using: node16
using: node20
main: ../build/preview-comment/index.js
inputs:
project:
+62 -39
View File
@@ -42,27 +42,29 @@ It can help speed up the review process by letting the reviewer load the app dir
This action is customizable through variables defined in the [`action.yml`](action.yml).
Here is a summary of all the input options you can use.
| variable | default | description |
| --------------------- | --------------------------- | ---------------------------------------------------------------------------------------------- |
| **command** | - | EAS CLI command to run when creating updates |
| **working-directory** | - | The relative directory of your Expo app |
| **comment** | `true` | If the action should summarize the EAS Update information as comment on a pull request |
| **comment-id** | _[see code][code-defaults]_ | unique id template to prevent duplicate comments ([read more](#preventing-duplicate-comments)) |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |
| variable | default | description |
| --------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **command** | - | EAS CLI command to run when creating updates |
| **working-directory** | - | The relative directory of your Expo app |
| **comment** | `true` | If the action should summarize the EAS Update information as comment on a pull request |
| **comment-id** | _[see code][code-defaults]_ | Unique id template to prevent duplicate comments ([read more](#preventing-duplicate-comments)) |
| **qr-target** | _inferred from project_ | Either `dev-build` or `expo-go`, affects how the EAS Update is opened through the QR code. <br /> Defaults to `dev-build` when `expo-dev-client` is detected within the project. |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |
## Available outputs
There are a few variables available that you can use to set up your own notifications.
These variables are strings; some may be empty because of your project configuration.
| output name | description |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| **projectId** | The resolved EAS project ID |
| **projectName** | The name of your project ([read more](https://docs.expo.dev/versions/latest/config/app/#name)) |
| **projectSlug** | The slug of your project ([read more](https://docs.expo.dev/versions/latest/config/app/#slug)) |
| **projectScheme** | The (custom) app scheme ([read more](https://docs.expo.dev/versions/latest/config/app/#scheme)) |
| **commentId** | The unique comment ID to prevent duplicate comments ([read more](#preventing-duplicate-comments)) |
| **comment** | The comment with information about the updates |
| output name | description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **projectId** | The resolved EAS project ID |
| **projectName** | The name of your project ([read more](https://docs.expo.dev/versions/latest/config/app/#name)) |
| **projectSlug** | The slug of your project ([read more](https://docs.expo.dev/versions/latest/config/app/#slug)) |
| **projectScheme** | The longest (custom) app scheme ([read more](https://docs.expo.dev/versions/latest/config/app/#scheme)) |
| **projectSchemes** | All (custom) app schemes in order of longest to shortest, as JSON string ([read more](https://docs.expo.dev/versions/latest/config/app/#scheme)) |
| **commentId** | The unique comment ID to prevent duplicate comments ([read more](#preventing-duplicate-comments)) |
| **comment** | The comment with information about the updates |
### Update information
@@ -84,30 +86,32 @@ Some of the EAS Update variables can be shared for all platforms if the [runtime
These variables contain Android-specific update information.
When skipping the Android update, these variables are empty strings.
| output name | description |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **androidId** | Android-specific update id |
| **androidGroupId** | Update group ID that contains one or more platform-specific updates |
| **androidBranchName** | Branch name that was used when creating this update ([read more](https://docs.expo.dev/eas-update/getting-started/#publish-an-update)) |
| **androidMessage** | Custom message to describe the Android-specific update |
| **androidRuntimeVersion** | Runtime version used for the Android-specific update ([read more](https://docs.expo.dev/eas-update/runtime-versions/)) |
| **androidQR** | Absolute URL to the QR code to load this Android-specific update |
| **androidLink** | Absolute URL to the Android-specific update on [expo.dev](https://expo.dev) |
| output name | description |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **androidId** | Android-specific update id |
| **androidGroupId** | Update group ID that contains one or more platform-specific updates |
| **androidBranchName** | Branch name that was used when creating this update ([read more](https://docs.expo.dev/eas-update/getting-started/#publish-an-update)) |
| **andriodManifestPermalink** | Absolute URL to the Android-specific update manifest |
| **androidMessage** | Custom message to describe the Android-specific update |
| **androidRuntimeVersion** | Runtime version used for the Android-specific update ([read more](https://docs.expo.dev/eas-update/runtime-versions/)) |
| **androidQR** | Absolute URL to the QR code to load this Android-specific update |
| **androidLink** | Absolute URL to the Android-specific update on [expo.dev](https://expo.dev) |
#### iOS-specific update information
These variables contain iOS-specific update information.
When skipping the iOS update, these variables are empty strings.
| output name | description |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **iosId** | iOS-specific update id |
| **iosGroupId** | Update group ID that contains one or more platform-specific updates |
| **iosBranchName** | Branch name that was used when creating this update ([read more](https://docs.expo.dev/eas-update/getting-started/#publish-an-update)) |
| **iosMessage** | Custom message to describe the iOS-specific update |
| **iosRuntimeVersion** | Runtime version used for the iOS-specific update ([read more](https://docs.expo.dev/eas-update/runtime-versions/)) |
| **iosQR** | Absolute URL to the QR code to load this iOS-specific update |
| **iosLink** | Absolute URL to the iOS-specific update on [expo.dev](https://expo.dev) |
| output name | description |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **iosId** | iOS-specific update id |
| **iosGroupId** | Update group ID that contains one or more platform-specific updates |
| **iosBranchName** | Branch name that was used when creating this update ([read more](https://docs.expo.dev/eas-update/getting-started/#publish-an-update)) |
| **iosManifestPermalink** | Absolute URL to the ios-specific update manifest |
| **iosMessage** | Custom message to describe the iOS-specific update |
| **iosRuntimeVersion** | Runtime version used for the iOS-specific update ([read more](https://docs.expo.dev/eas-update/runtime-versions/)) |
| **iosQR** | Absolute URL to the QR code to load this iOS-specific update |
| **iosLink** | Absolute URL to the iOS-specific update on [expo.dev](https://expo.dev) |
## Example workflows
@@ -120,7 +124,13 @@ You can read more about this in the [GitHub Actions documentation][link-actions]
### Create previews on pull requests
This workflow creates a new EAS Update every time a pull request is created or updated.
Since we're using the `--auto` flag, the EAS branch will be named after the GitHub branch, and the message for the update will match the commit's message.
We are using the `--auto`, together with the `--branch`, flag in this example.
- `--auto` will automatically create an update using the current git commit message and git branch.
- `--branch` will overwrite this value inferred from git with our own value.
> **Warning**
> GitHub Actions might use a temporary merge branch for PRs. To avoid using this merge branch for our update, we overwrite the branch name from `--auto` with our own `--branch` value.
```yml
on:
@@ -142,7 +152,7 @@ jobs:
cache: yarn
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -151,9 +161,11 @@ jobs:
run: yarn install
- name: 🚀 Create preview
uses: expo/expo-github-action/preview@v7
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto
# `github.event.pull_request.head.ref` is only available on `pull_request` triggers.
# Use your own, or keep the automatically infered branch name from `--auto`, when using different triggers.
command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}
```
### Sending preview information elsewhere
@@ -182,7 +194,7 @@ jobs:
cache: yarn
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -191,9 +203,11 @@ jobs:
run: yarn install
- name: 🚀 Create preview
uses: expo/expo-github-action/preview@v7
uses: expo/expo-github-action/preview@v8
id: preview
with:
# In this example, we use the `push` trigger which will always use the branch name that was pushed to.
# By using `--auto` we both use the git commit message and branch name for the update.
command: eas update --auto
comment: false
@@ -213,6 +227,13 @@ jobs:
When automating these preview comments, you have to be careful not to spam a pull request on every successful run.
Every comment contains a generated **message-id** to identify previously made comments and update them instead of creating a new comment.
### Update branch and workflow triggers
GitHub Actions uses slightly different checkout logic for different workflow triggers.
When using the `push` trigger, GitHub Actions checks out the branch that was pushed to.
But for [`pull_request` triggers][link-gha-trigger-pull], GitHub Actions might use a temporary branch name.
This affects in what "branch" your EAS Update is created when using the `--auto` flag.
### GitHub tokens
When using the GitHub API, you always need to be authenticated.
@@ -228,3 +249,5 @@ You can overwrite the token by adding the `GITHUB_TOKEN` environment variable or
[code-defaults]: ../src/actions/preview.ts#L10
[link-actions]: https://help.github.com/en/categories/automating-your-workflow-with-github-actions
[link-gha-token]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
[link-gha-trigger-pull]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
[link-gha-trigger-push]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
+9 -1
View File
@@ -6,7 +6,7 @@ branding:
icon: smartphone
color: gray-dark
runs:
using: node16
using: node20
main: ../build/preview/index.js
inputs:
command:
@@ -18,6 +18,9 @@ inputs:
default: true
comment-id:
description: unique id template to prevent duplicate comments
qr-target:
description: How the EAS Update is opened through the QR code, either `dev-build` or `expo-go`. Defaults to `dev-build` if `expo-dev-client` is used in project.
required: false
working-directory:
description: The relative directory of your Expo app
required: false
@@ -26,6 +29,11 @@ inputs:
description: GitHub token to use when commenting on PR
required: false
default: ${{ github.token }}
# Below are deprecated and won't be supported anymore
app-scheme:
deprecated: true
description: The (custom) app scheme to use when creating the preview QR code
required: false
outputs:
projectId:
description: The resolved EAS project ID
@@ -0,0 +1,337 @@
import { getInput, info, isDebug, setFailed, setOutput } from '@actions/core';
import { getExecOutput } from '@actions/exec';
import { which } from '@actions/io';
import { ExpoConfig } from '@expo/config';
import { createDetails, getQrTarget, getSchemesInOrderFromConfig } from '../comment';
import { EasUpdate, getUpdateGroupQr, getUpdateGroupWebsite } from '../eas';
import { AppPlatform, BuildInfo, appPlatformEmojis, getBuildLogsUrl } from '../expo';
import { createIssueComment, hasPullContext, pullContext } from '../github';
import { loadProjectConfig } from '../project';
import { executeAction } from '../worker';
export function collectContinuousDeployFingerprintInput() {
return {
profile: getInput('profile'),
branch: getInput('branch'),
githubToken: getInput('github-token'),
workingDirectory: getInput('working-directory'),
};
}
executeAction(continuousDeployFingerprintAction);
export async function continuousDeployFingerprintAction(input = collectContinuousDeployFingerprintInput()) {
const isInPullRequest = hasPullContext();
const config = await loadProjectConfig(input.workingDirectory);
const projectId = config.extra?.eas?.projectId;
if (!projectId) {
return setFailed(`Missing 'extra.eas.projectId' in app.json or app.config.js.`);
}
const androidFingerprintHash = await getFingerprintHashForPlatformAsync({
cwd: input.workingDirectory,
platform: 'android',
});
const iosFingerprintHash = await getFingerprintHashForPlatformAsync({ cwd: input.workingDirectory, platform: 'ios' });
info(`Android fingerprint: ${androidFingerprintHash}`);
info(`iOS fingerprint: ${iosFingerprintHash}`);
info('Looking for builds with matching runtime version (fingerprint)...');
let androidBuildInfo = await getBuildInfoWithFingerprintAsync({
cwd: input.workingDirectory,
platform: 'android',
profile: input.profile,
fingerprintHash: androidFingerprintHash,
excludeExpiredBuilds: isInPullRequest,
});
if (androidBuildInfo) {
info(`Existing Android build found with matching fingerprint: ${androidBuildInfo.id}`);
} else {
info(`No existing Android build found for fingerprint, starting a new build...`);
androidBuildInfo = await createEASBuildAsync({
cwd: input.workingDirectory,
platform: 'android',
profile: input.profile,
});
}
let iosBuildInfo = await getBuildInfoWithFingerprintAsync({
cwd: input.workingDirectory,
platform: 'ios',
profile: input.profile,
fingerprintHash: iosFingerprintHash,
excludeExpiredBuilds: isInPullRequest,
});
if (iosBuildInfo) {
info(`Existing iOS build found with matching fingerprint: ${iosBuildInfo.id}`);
} else {
info(`No existing iOS build found for fingerprint, starting a new build...`);
iosBuildInfo = await createEASBuildAsync({ cwd: input.workingDirectory, platform: 'ios', profile: input.profile });
}
const builds = [androidBuildInfo, iosBuildInfo];
info(`Publishing EAS Update...`);
const updates = await publishEASUpdatesAsync({
cwd: input.workingDirectory,
branch: input.branch,
});
if (!isInPullRequest) {
info(`Skipped comment: action was not run from a pull request`);
} else {
const messageId = `continuous-deploy-fingerprint-projectId:${projectId}`;
const messageBody = createSummaryForUpdatesAndBuilds({ config, projectId, updates, builds, options: input });
await createIssueComment({
...pullContext(),
token: input.githubToken,
id: messageId,
body: messageBody,
});
}
setOutput('android-fingerprint', androidFingerprintHash);
setOutput('ios-fingerprint', iosFingerprintHash);
setOutput('android-build-id', androidBuildInfo.id);
setOutput('ios-build-id', iosBuildInfo.id);
setOutput('update-output', updates);
}
async function getFingerprintHashForPlatformAsync({
cwd,
platform,
}: {
cwd: string;
platform: 'ios' | 'android';
}): Promise<string> {
try {
const extraArgs = isDebug() ? ['--debug'] : [];
const { stdout } = await getExecOutput(
'npx',
['expo-updates', 'fingerprint:generate', '--platform', platform, ...extraArgs],
{
cwd,
silent: !isDebug(),
}
);
const { hash } = JSON.parse(stdout);
if (!hash || typeof hash !== 'string') {
throw new Error(`Invalid fingerprint output: ${stdout}`);
}
return hash;
} catch (error: unknown) {
throw new Error(`Could not get fingerprint for project: ${String(error)}`);
}
}
async function getBuildInfoWithFingerprintAsync({
cwd,
platform,
profile,
fingerprintHash,
excludeExpiredBuilds,
}: {
cwd: string;
platform: 'ios' | 'android';
profile: string;
fingerprintHash: string;
excludeExpiredBuilds: boolean;
}): Promise<BuildInfo | null> {
let stdout: string;
try {
const execOutput = await getExecOutput(
await which('eas', true),
[
'build:list',
'--platform',
platform,
'--status',
'finished',
'--buildProfile',
profile,
'--runtimeVersion',
fingerprintHash,
'--limit',
'1',
'--json',
'--non-interactive',
],
{
cwd,
silent: !isDebug(),
}
);
stdout = execOutput.stdout;
} catch (error: unknown) {
throw new Error(`Could not list project builds: ${String(error)}`);
}
const builds = JSON.parse(stdout);
if (!builds || !Array.isArray(builds)) {
throw new Error(`Could not get EAS builds for project`);
}
if (!builds[0]) {
return null;
}
const build = builds[0] as BuildInfo;
if (excludeExpiredBuilds) {
// if the build is expired or will expire within the next day,
// return null to trigger a new build
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
if (tomorrow > new Date(build.expirationDate)) {
return null;
}
}
return build;
}
async function createEASBuildAsync({
cwd,
profile,
platform,
}: {
cwd: string;
profile: string;
platform: 'ios' | 'android';
}): Promise<BuildInfo> {
let stdout: string;
try {
const extraArgs = isDebug() ? ['--build-logger-level', 'debug'] : [];
const execOutput = await getExecOutput(
await which('eas', true),
['build', '--profile', profile, '--platform', platform, '--non-interactive', '--json', '--no-wait', ...extraArgs],
{
cwd,
silent: !isDebug(),
}
);
stdout = execOutput.stdout;
} catch (error: unknown) {
throw new Error(`Could not run command eas build: ${String(error)}`);
}
return JSON.parse(stdout)[0];
}
async function publishEASUpdatesAsync({ cwd, branch }: { cwd: string; branch: string }): Promise<EasUpdate[]> {
let stdout: string;
try {
const execOutput = await getExecOutput(
await which('eas', true),
['update', '--auto', '--branch', branch, '--non-interactive', '--json'],
{
cwd,
silent: !isDebug(),
}
);
stdout = execOutput.stdout;
} catch (error: unknown) {
throw new Error(`Could not create a new EAS Update: ${String(error)}`);
}
return JSON.parse(stdout);
}
function createSummaryForUpdatesAndBuilds({
config,
projectId,
updates,
builds,
options,
}: {
config: ExpoConfig;
projectId: string;
updates: EasUpdate[];
builds: BuildInfo[];
options: { qrTarget?: 'expo-go' | 'dev-build' | 'dev-client'; workingDirectory: string };
}) {
const appSlug = config.slug;
const qrTarget = getQrTarget(options);
const appSchemes = getSchemesInOrderFromConfig(config) || [];
const androidBuild = builds.find(build => build.platform === AppPlatform.Android);
const iosBuild = builds.find(build => build.platform === AppPlatform.Ios);
const androidUpdate = updates.find(update => update.platform === 'android');
const iosUpdate = updates.find(update => update.platform === 'ios');
const getBuildLink = (build: BuildInfo | undefined) =>
build ? `[Build Permalink](${getBuildLogsUrl(build)})` : 'n/a';
const getUpdateLink = (update: EasUpdate | undefined) =>
update ? `[Update Permalink](${getUpdateGroupWebsite({ projectId, updateGroupId: update.group })})` : 'n/a';
const getUpdateQRURL = (update: EasUpdate | undefined) =>
update ? getUpdateGroupQr({ projectId, updateGroupId: update.group, appSlug, qrTarget }) : null;
const getBuildDetails = (build: BuildInfo | undefined) =>
build
? getBuildLink(build) +
'<br />' +
createDetails({
summary: 'Details',
details: [
`Distribution: \`${build.distribution}\``,
`Build profile: \`${build.buildProfile}\``,
`Runtime version: \`${build.runtimeVersion}\``,
`App version: \`${build.appVersion}\``,
`Git commit: \`${build.gitCommitHash}\``,
].join('<br />'),
delim: '',
})
: 'n/a';
const getUpdateDetails = (update: EasUpdate | undefined) =>
update
? getUpdateLink(update) +
'<br />' +
createDetails({
summary: 'Details',
details: [
`Branch: \`${update.branch}\``,
`Runtime version: \`${update.runtimeVersion}\``,
`Git commit: \`${update.gitCommitHash}\``,
].join('<br />'),
delim: '',
})
: 'n/a';
const androidQRURL = getUpdateQRURL(androidUpdate);
const iosQRURL = getUpdateQRURL(iosUpdate);
const androidQr = androidQRURL
? `<a href="${androidQRURL}"><img src="${androidQRURL}" width="250px" height="250px" /></a>`
: null;
const iosQr = iosQRURL ? `<a href="${iosQRURL}"><img src="${iosQRURL}" width="250px" height="250px" /></a>` : null;
const platformName = `Platform${updates.length === 1 ? '' : 's'}`;
const platformValue = updates
.map(update => update.platform)
.sort((a, b) => a.localeCompare(b))
.map(platform => `**${platform}**`)
.join(', ');
const schemesMessage = appSchemes[0] ? `- Scheme → **${appSchemes.join('**, **')}**` : '';
return `🚀 Expo continuous deployment is ready!
- Project → **${appSlug}**
- ${platformName} → ${platformValue}
${schemesMessage}
&nbsp; | ${appPlatformEmojis[AppPlatform.Android]} Android | ${appPlatformEmojis[AppPlatform.Ios]} iOS
--- | --- | ---
Fingerprint | ${androidBuild?.runtimeVersion ?? 'n/a'} | ${iosBuild?.runtimeVersion ?? 'n/a'}
Build Details | ${getBuildDetails(androidBuild)} | ${getBuildDetails(iosBuild)}
Update Details | ${getUpdateDetails(androidUpdate)} | ${getUpdateDetails(iosUpdate)}
Update QR | ${androidQr ?? 'n/a'} | ${iosQr ?? 'n/a'}
`;
}
+27
View File
@@ -0,0 +1,27 @@
import { info } from '@actions/core';
import assert from 'assert';
import { deleteCacheAsync } from '../cacher';
import { collectFingerprintActionInput, saveDbToCacheAsync } from '../fingerprint';
import { getRepoDefaultBranch, isPushBranchContext } from '../github';
import { executeAction } from '../worker';
executeAction(runAction);
export async function runAction(input = collectFingerprintActionInput()) {
const targetBranch = input.savingDbBranch ?? getRepoDefaultBranch();
assert(targetBranch);
if (!isPushBranchContext(targetBranch)) {
return;
}
info(`Saving fingerprint database to ${targetBranch} branch.`);
try {
const ref = process.env.GITHUB_REF;
assert(ref != null, 'GITHUB_REF is not defined');
await deleteCacheAsync(input.githubToken, input.fingerprintDbCacheKey, ref);
} catch (e) {
info(`Failed to delete the cache: ${e}`);
}
await saveDbToCacheAsync(input.fingerprintDbCacheKey);
}
+24
View File
@@ -0,0 +1,24 @@
import { setOutput } from '@actions/core';
import {
createFingerprintOutputAsync,
collectFingerprintActionInput,
createFingerprintDbManagerAsync,
} from '../fingerprint';
import { executeAction } from '../worker';
executeAction(runAction);
export async function runAction(input = collectFingerprintActionInput()) {
const dbManager = await createFingerprintDbManagerAsync(input.packager, input.fingerprintDbCacheKey);
const { currentFingerprint, previousFingerprint, diff } = await createFingerprintOutputAsync(dbManager, input);
await dbManager.upsertFingerprintByGitCommitHashAsync(input.currentGitCommitHash, {
fingerprint: currentFingerprint,
});
setOutput('previous-fingerprint', previousFingerprint);
setOutput('current-fingerprint', currentFingerprint);
setOutput('previous-git-commit', input.previousGitCommitHash);
setOutput('current-git-commit', input.currentGitCommitHash);
setOutput('fingerprint-diff', diff);
}
+398
View File
@@ -0,0 +1,398 @@
import { getBooleanInput, getInput, setOutput, group, setFailed, info } from '@actions/core';
import { context } from '@actions/github';
import type { ExpoConfig } from '@expo/config';
import type { Fingerprint, FingerprintSource } from '@expo/fingerprint';
import assert from 'assert';
import { validate as isValidUUID } from 'uuid';
import { deleteCacheAsync } from '../cacher';
import { createDetails } from '../comment';
import {
createEasBuildFromRawCommandAsync,
BuildInfo,
getBuildLogsUrl,
appPlatformEmojis,
cancelEasBuildAsync,
queryEasBuildInfoAsync,
} from '../expo';
import {
FingerprintDbManager,
collectFingerprintActionInput,
createFingerprintDbManagerAsync,
createFingerprintOutputAsync,
saveDbToCacheAsync,
} from '../fingerprint';
import {
createIssueComment,
fetchIssueComment,
getGitCommandMessageAsync,
getPullRequestFromGitCommitShaAsync,
getRepoDefaultBranch,
hasPullContext,
isPushBranchContext,
pullContext,
} from '../github';
import { loadProjectConfig } from '../project';
import { template } from '../utils';
import { executeAction } from '../worker';
export const MESSAGE_ID = 'projectId:previewBuild:{projectId}';
export function collectPreviewBuildActionInput() {
return {
...collectFingerprintActionInput(),
command: getInput('command'),
shouldComment: !getInput('comment') || getBooleanInput('comment'),
commentId: getInput('comment-id') || MESSAGE_ID,
easBuildMessage: getInput('eas-build-message'),
};
}
executeAction(previewAction);
export async function previewAction(input = collectPreviewBuildActionInput()) {
const config = await loadProjectConfig(input.workingDirectory);
if (!config.extra?.eas?.projectId) {
return setFailed(
'Missing "extra.eas.projectId" in app.json or app.config.js. Please run `eas build:configure` first.'
);
}
if (!hasPullContext()) {
handleNonPullRequest(config, input);
return;
}
const dbManager = await createFingerprintDbManagerAsync(input.packager, input.fingerprintDbCacheKey);
const { currentFingerprint, diff } = await createFingerprintOutputAsync(dbManager, input);
if (diff.length === 0) {
info('Fingerprint is compatible, no new builds are required.');
await maybeUpdateFingerprintDbAsync({
dbManager,
githubToken: input.githubToken,
fingerprintDbCacheKey: input.fingerprintDbCacheKey,
savingDbBranch: input.savingDbBranch,
gitCommitHash: input.currentGitCommitHash,
manyBuilds: [{ fingerprint: currentFingerprint }],
});
await maybeCancelPreviousBuildsAsync(config, input);
const variables = getVariables(config, []);
const messageId = template(input.commentId, variables);
const latestEasEntity = await dbManager.getLatestEasEntityFromFingerprintAsync(currentFingerprint.hash);
const latestEasBuildInfo = latestEasEntity?.easBuildId
? await queryEasBuildInfoAsync(input.workingDirectory, latestEasEntity.easBuildId)
: null;
const messageBody = createMessageBodyFingerprintCompatible(latestEasBuildInfo);
await maybeCreateCommentAsync(input, messageId, messageBody);
setOutputs(variables, messageId, messageBody);
return;
}
info('Fingerprint is changed, creating new builds...');
info(`Fingerprint diff: ${JSON.stringify(diff, null, 2)}`);
await maybeCancelPreviousBuildsAsync(config, input);
const command = sanitizeCommand(input.command);
const buildMessage =
input.easBuildMessage ||
(await getGitCommandMessageAsync({ token: input.githubToken }, input.currentGitCommitHash));
const args = ['--message', buildMessage];
const builds = await group(`Run eas ${command}"`, () =>
createEasBuildFromRawCommandAsync(input.workingDirectory, command, args)
);
await maybeUpdateFingerprintDbAsync({
dbManager,
githubToken: input.githubToken,
fingerprintDbCacheKey: input.fingerprintDbCacheKey,
savingDbBranch: input.savingDbBranch,
gitCommitHash: input.currentGitCommitHash,
manyBuilds: builds.map(build => ({
easBuildId: build.id,
fingerprint: currentFingerprint,
})),
});
const variables = getVariables(config, builds);
const messageId = template(input.commentId, variables);
const messageBody = createMessageBodyInBuilding(builds, diff, input);
await maybeCreateCommentAsync(input, messageId, messageBody);
setOutputs(variables, messageId, messageBody);
}
/**
* Validate and sanitize the command that creates the update.
* It also ensures that the command starts with `eas ...` to make sure we can run it.
*/
function sanitizeCommand(input: string): string {
let command = input.trim();
if (!command.startsWith('eas')) {
throw new Error(`The command must start with "eas", received "${command}"`);
} else {
command = command.replace(/^eas/, '').trim();
}
return command;
}
async function maybeCancelPreviousBuildsAsync(
config: ExpoConfig,
input: ReturnType<typeof collectPreviewBuildActionInput>
) {
const variables = getVariables(config, []);
const messageId = template(input.commentId, variables);
const comment = await fetchIssueComment({
...pullContext(),
token: input.githubToken,
id: messageId,
});
if (!comment?.body) {
return [];
}
const easBuildIds = parseCommentForEasMetadata(comment.body);
for (const buildId of easBuildIds) {
info(`Canceling previous build: ${buildId}`);
await cancelEasBuildAsync(input.workingDirectory, buildId);
}
}
//#region Comments
async function maybeCreateCommentAsync(
input: ReturnType<typeof collectPreviewBuildActionInput>,
messageId: string,
messageBody: string
) {
if (!input.shouldComment) {
info(`Skipped comment: 'comment' is disabled`);
} else if (!hasPullContext()) {
info(`Skipped comment: action was not ran from a pull request`);
} else {
await createIssueComment({
...pullContext(),
token: input.githubToken,
id: messageId,
body: messageBody,
});
}
}
function setOutputs(variables: ReturnType<typeof getVariables>, messageId: string, messageBody: string) {
for (const [name, value] of Object.entries(variables)) {
setOutput(name, value);
}
setOutput('commentId', messageId);
setOutput('comment', messageBody);
}
/**
* Generate useful variables for the message body, and as step outputs.
*/
export function getVariables(config: ExpoConfig, builds: BuildInfo[]) {
const projectId: string = config.extra?.eas?.projectId;
const android = builds.find(build => build.platform === 'ANDROID');
const ios = builds.find(build => build.platform === 'IOS');
const gitCommitHash = android?.gitCommitHash || ios?.gitCommitHash || '';
return {
projectId,
gitCommitHash,
androidBuildId: android?.id || '',
androidLink: android != null ? getBuildLogsUrl(android) : '',
androidAppVersion: android?.appVersion || '',
iosBuildId: ios?.id || '',
iosLink: ios != null ? getBuildLogsUrl(ios) : '',
iosAppVersion: ios?.appVersion || '',
};
}
function createMessageBodyInBuilding(
builds: BuildInfo[],
fingerprintDiff: FingerprintSource[],
input: ReturnType<typeof collectPreviewBuildActionInput>
) {
const tableRows: string[] = [];
for (const build of builds) {
let name;
if (build.platform === 'ANDROID') {
name = `${appPlatformEmojis.ANDROID} Android build`;
} else if (build.platform === 'IOS') {
name = `${appPlatformEmojis.IOS} iOS build`;
} else {
name = 'Unknown build';
}
const buildPageURL = getBuildLogsUrl(build);
const details = createDetails({
summary: 'Details',
details: [
`Distribution: \`${build.distribution}\``,
`Build profile: \`${build.buildProfile}\``,
`SDK version: \`${build.sdkVersion}\``,
`App version: \`${build.appVersion}\``,
].join('<br>'),
delim: '',
});
tableRows.push(`| ${name} | [View build page](${buildPageURL}) | ${details} |`);
}
return [
createCommentForEasMetadata(builds),
'',
`Fingerprint is changed, new EAS Build(s) are now in pipeline.`,
'',
`Build with commit ${input.currentGitCommitHash}`,
'',
'| Name | Build | Details |',
'| :-- | :-- | :-- |',
...tableRows,
'',
createDetails({
summary: 'Fingerprint diff',
details: ['```json', JSON.stringify(fingerprintDiff, null, 2), '```'].join('\n'),
}),
'',
`> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview-build#example-workflows)`,
].join('\n');
}
function createMessageBodyFingerprintCompatible(latestEasBuildInfo: BuildInfo | null) {
const easBuildMessage =
latestEasBuildInfo != null
? `Latest compatible build on EAS found. You can download the build from the [EAS build page](${getBuildLogsUrl(
latestEasBuildInfo
)}).`
: '';
return [
`Fingerprint is compatible, no new builds are required.`,
easBuildMessage,
'',
`> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview-build#example-workflows)`,
].join('\n');
}
function createCommentForEasMetadata(builds: BuildInfo[]) {
if (builds.length === 0) {
return '';
}
const easBuildIds = JSON.stringify(builds.map(build => build.id));
return `<!-- EAS_BUILD_IDS=${easBuildIds} -->`;
}
function parseCommentForEasMetadata(comment: string): string[] {
const match = comment.match(/<!-- EAS_BUILD_IDS=(.*) -->/);
if (match == null) {
return [];
}
let metadata;
try {
metadata = JSON.parse(match[1]);
} catch {}
if (Array.isArray(metadata)) {
return metadata
.map(value => (typeof value === 'string' && isValidUUID(value) ? value : null))
.filter((value): value is string => !!value);
}
return [];
}
//#endregion
async function maybeUpdateFingerprintDbAsync(params: {
dbManager: FingerprintDbManager;
githubToken: string;
fingerprintDbCacheKey: string;
gitCommitHash: string;
savingDbBranch: string | undefined;
manyBuilds: {
easBuildId?: string;
fingerprint: Fingerprint;
}[];
}) {
const targetBranch = params.savingDbBranch ?? getRepoDefaultBranch();
assert(targetBranch);
if (!isPushBranchContext(targetBranch)) {
return;
}
for (const build of params.manyBuilds) {
await params.dbManager.upsertFingerprintByGitCommitHashAsync(params.gitCommitHash, {
easBuildId: build.easBuildId,
fingerprint: build.fingerprint,
});
}
try {
const ref = process.env.GITHUB_REF;
assert(ref != null, 'GITHUB_REF is not defined');
await deleteCacheAsync(params.githubToken, params.fingerprintDbCacheKey, ref);
} catch (e) {
info(`Failed to delete the cache: ${e}`);
}
await saveDbToCacheAsync(params.fingerprintDbCacheKey);
}
//#region Non pull request context
async function handleNonPullRequest(config: ExpoConfig, input: ReturnType<typeof collectPreviewBuildActionInput>) {
info('Non pull request context, skipping comment.');
const targetBranch = input.savingDbBranch ?? getRepoDefaultBranch();
assert(targetBranch);
if (!isPushBranchContext(targetBranch)) {
return;
}
info(`Updating fingerprint database for the ${targetBranch} branch push event.`);
const dbManager = await createFingerprintDbManagerAsync(input.packager, input.fingerprintDbCacheKey);
const { currentFingerprint } = await createFingerprintOutputAsync(dbManager, input);
const associatedPRs = await getPullRequestFromGitCommitShaAsync(
{ token: input.githubToken },
input.currentGitCommitHash
);
const easBuildIds = (
await Promise.all(associatedPRs.map(pr => queryEasBuildIdsFromPrAsync(pr.prNumber, config, input)))
).flat();
let manyBuilds: { easBuildId?: string; fingerprint: Fingerprint }[];
if (easBuildIds.length > 0) {
manyBuilds = easBuildIds.map(easBuildId => ({
easBuildId,
fingerprint: currentFingerprint,
}));
info(`Found EAS build IDs in associated PRs: ${easBuildIds.join(', ')}`);
} else {
manyBuilds = [{ fingerprint: currentFingerprint }];
info('No EAS build IDs found in associated PRs, creating a fingerprint entry without EAS build ID.');
}
await maybeUpdateFingerprintDbAsync({
dbManager,
githubToken: input.githubToken,
fingerprintDbCacheKey: input.fingerprintDbCacheKey,
savingDbBranch: input.savingDbBranch,
gitCommitHash: input.currentGitCommitHash,
manyBuilds,
});
const variables = getVariables(config, []);
setOutputs(variables, '', '');
}
async function queryEasBuildIdsFromPrAsync(
prNumber: number,
config: ExpoConfig,
input: ReturnType<typeof collectPreviewBuildActionInput>
): Promise<string[]> {
const variables = getVariables(config, []);
const messageId = template(input.commentId, variables);
const comment = await fetchIssueComment({
...context.repo,
number: prNumber,
token: input.githubToken,
id: messageId,
});
if (!comment?.body) {
return [];
}
return parseCommentForEasMetadata(comment.body);
}
//#endregion
+24 -9
View File
@@ -1,6 +1,7 @@
import { getBooleanInput, getInput, setOutput, group, setFailed, info } from '@actions/core';
import { ExpoConfig } from '@expo/config';
import { getQrTarget, getSchemesInOrderFromConfig } from '../comment';
import { assertEasVersion, createUpdate, EasUpdate, getUpdateGroupQr, getUpdateGroupWebsite } from '../eas';
import { createIssueComment, hasPullContext, pullContext } from '../github';
import { loadProjectConfig } from '../project';
@@ -10,12 +11,19 @@ import { executeAction } from '../worker';
export const MESSAGE_ID = 'projectId:{projectId}';
export function previewInput() {
const qrTarget = getInput('qr-target') || undefined;
if (qrTarget && !['expo-go', 'dev-client'].includes(qrTarget)) {
throw new Error(`Invalid QR code target: "${qrTarget}", expected "expo-go" or "dev-build"`);
}
return {
command: getInput('command'),
shouldComment: !getInput('comment') || getBooleanInput('comment'),
commentId: getInput('comment-id') || MESSAGE_ID,
workingDirectory: getInput('working-directory'),
githubToken: getInput('github-token'),
// Note, `dev-build` is prefered, but `dev-client` is supported to aovid confusion
qrTarget: qrTarget as undefined | 'expo-go' | 'dev-build' | 'dev-client',
};
}
@@ -42,7 +50,7 @@ export async function previewAction(input = previewInput()) {
return setFailed(`Missing 'extra.eas.projectId' in app.json or app.config.js.`);
}
const variables = getVariables(config, updates);
const variables = getVariables(config, updates, input);
const messageId = template(input.commentId, variables);
const messageBody = createSummary(updates, variables);
@@ -95,22 +103,27 @@ function sanitizeCommand(input: string): string {
/**
* Generate useful variables for the message body, and as step outputs.
*/
export function getVariables(config: ExpoConfig, updates: EasUpdate[]) {
export function getVariables(config: ExpoConfig, updates: EasUpdate[], options: ReturnType<typeof previewInput>) {
const projectId: string = config.extra?.eas?.projectId;
const android = updates.find(update => update.platform === 'android');
const ios = updates.find(update => update.platform === 'ios');
const appSchemes = getSchemesInOrderFromConfig(config) || [];
const appSlug = config.slug;
const qrTarget = getQrTarget(options);
return {
// EAS / Expo specific
projectId,
projectName: config.name,
projectSlug: config.slug,
projectScheme: config.scheme || '',
projectSlug: appSlug,
projectScheme: appSchemes[0] || '', // This is the longest scheme from one or more custom app schemes
projectSchemes: JSON.stringify(appSchemes), // These are all custom app schemes, in order from longest to shortest as JSON
// Shared update properties
// Note, only use these properties when the update groups are identical
groupId: updates[0].group,
runtimeVersion: updates[0].runtimeVersion,
qr: getUpdateGroupQr({ projectId, updateGroupId: updates[0].group, appScheme: config.scheme }),
qr: getUpdateGroupQr({ projectId, updateGroupId: updates[0].group, appSlug, qrTarget }),
link: getUpdateGroupWebsite({ projectId, updateGroupId: updates[0].group }),
// These are safe to access regardless of the update groups
branchName: updates[0].branch,
@@ -121,17 +134,19 @@ export function getVariables(config: ExpoConfig, updates: EasUpdate[]) {
androidId: android?.id || '',
androidGroupId: android?.group || '',
androidBranchName: android?.branch || '',
androidManifestPermalink: android?.manifestPermalink || '',
androidMessage: android?.message || '',
androidRuntimeVersion: android?.runtimeVersion || '',
androidQR: android ? getUpdateGroupQr({ projectId, updateGroupId: android.group, appScheme: config.scheme }) : '',
androidQR: android ? getUpdateGroupQr({ projectId, updateGroupId: android.group, appSlug, qrTarget }) : '',
androidLink: android ? getUpdateGroupWebsite({ projectId, updateGroupId: android.group }) : '',
// iOS update
iosId: ios?.id || '',
iosGroupId: ios?.group || '',
iosBranchName: ios?.branch || '',
iosManifestPermalink: ios?.manifestPermalink || '',
iosMessage: ios?.message || '',
iosRuntimeVersion: ios?.runtimeVersion || '',
iosQR: ios ? getUpdateGroupQr({ projectId, updateGroupId: ios.group, appScheme: config.scheme }) : '',
iosQR: ios ? getUpdateGroupQr({ projectId, updateGroupId: ios.group, appSlug, qrTarget }) : '',
iosLink: ios ? getUpdateGroupWebsite({ projectId, updateGroupId: ios.group }) : '',
};
}
@@ -157,13 +172,13 @@ function createSummaryHeader(updates: EasUpdate[], vars: ReturnType<typeof getVa
.map(platform => `**${platform}**`)
.join(', ');
const appScheme = vars.projectScheme ? `- Scheme → **${vars.projectScheme}**` : '';
const appSchemes = vars.projectScheme ? `- Scheme → **${JSON.parse(vars.projectSchemes).join('**, **')}**` : '';
return `🚀 Expo preview is ready!
- Project → **${vars.projectSlug}**
- ${platformName} → ${platformValue}
${appScheme}`.trim();
${appSchemes}`.trim();
}
function createSingleQrSummary(updates: EasUpdate[], vars: ReturnType<typeof getVariables>) {
+1 -1
View File
@@ -58,7 +58,7 @@ export async function setupAction(input = setupInput()) {
}
async function installCli(name: string, version: string, packager: string, useCache = true) {
let cliPath = findTool(name, version) || undefined;
let cliPath = findTool(name, version) || null;
if (!cliPath && useCache) {
cliPath = await restoreFromCache(name, version, packager);
+47 -19
View File
@@ -1,7 +1,9 @@
import { saveCache, restoreCache, ReserveCacheError, isFeatureAvailable } from '@actions/cache';
import { warning } from '@actions/core';
import { context } from '@actions/github';
import os from 'os';
import { githubApi } from './github';
import { toolPath } from './worker';
/**
@@ -20,41 +22,67 @@ export function cacheKey(name: string, version: string, manager: string): string
}
/**
* Restore a tool from the remote cache.
* This will install the tool back into the local tool cache.
* Restore a directory from the remote cache.
*/
export async function restoreFromCache(name: string, version: string, manager: string) {
const dir = toolPath(name, version)!;
export async function restoreCacheAsync(cachePath: string, cacheKey: string): Promise<string | null> {
if (!cacheIsAvailable()) {
warning(`Skipped restoring from remote cache, not available.`);
return undefined;
return null;
}
try {
if (await restoreCache([dir], cacheKey(name, version, manager))) {
return dir;
if (await restoreCache([cachePath], cacheKey)) {
return cachePath;
}
} catch (error) {
handleCacheError(error);
}
return null;
}
/**
* Save a directory to the remote cache.
*/
export async function saveCacheAsync(cachePath: string, cacheKey: string): Promise<void> {
if (!cacheIsAvailable()) {
warning(`Skipped saving to remote cache, not available.`);
return;
}
try {
await saveCache([cachePath], cacheKey);
} catch (error) {
handleCacheError(error);
}
}
/**
* Delete a cache key from the remote cache.
* Note that is not using the official API from @actions/cache but using the GitHub API directly.
*/
export async function deleteCacheAsync(githubToken: string, cacheKey: string, ref: string): Promise<void> {
const github = githubApi({ token: githubToken });
await github.rest.actions.deleteActionsCacheByKey({
...context.repo,
key: cacheKey,
ref,
});
}
/**
* Restore a tool from the remote cache.
* This will install the tool back into the local tool cache.
*/
export function restoreFromCache(name: string, version: string, manager: string) {
return restoreCacheAsync(toolPath(name, version), cacheKey(name, version, manager));
}
/**
* Save a tool to the remote cache.
* This will fetch the tool from the local tool cache.
*/
export async function saveToCache(name: string, version: string, manager: string) {
if (!cacheIsAvailable()) {
warning(`Skipped saving to remote cache, not available.`);
return undefined;
}
try {
await saveCache([toolPath(name, version)], cacheKey(name, version, manager));
} catch (error) {
handleCacheError(error);
}
export function saveToCache(name: string, version: string, manager: string) {
return saveCacheAsync(toolPath(name, version), cacheKey(name, version, manager));
}
/**
+57
View File
@@ -0,0 +1,57 @@
import { debug } from '@actions/core';
import { ExpoConfig } from '@expo/config';
import { projectAppType } from './expo';
export function getQrTarget(input: { qrTarget?: 'expo-go' | 'dev-build' | 'dev-client'; workingDirectory: string }) {
if (!input.qrTarget) {
const appType = projectAppType(input.workingDirectory);
debug(`Using inferred QR code target: "${appType}"`);
return appType;
}
switch (input.qrTarget) {
// Note, `dev-build` is prefered, but `dev-client` is supported to aovid confusion
case 'dev-client':
case 'dev-build':
debug(`Using QR code target: "dev-build"`);
return 'dev-build';
case 'expo-go':
debug(`Using QR code target: "expo-go"`);
return 'expo-go';
default:
throw new Error(`Invalid QR code target: "${input.qrTarget}", expected "expo-go" or "dev-build"`);
}
}
/**
* Retrieve the app schemes, in correct priority order, from project config.
* - If the scheme is a string, return `[scheme]`.
* - If the scheme is an array, return the schemes sorted by length, longest first.
* - If the scheme is empty/incorrect, return an empty array.
*/
export function getSchemesInOrderFromConfig(config: ExpoConfig) {
if (typeof config.scheme === 'string') {
return [config.scheme];
}
if (Array.isArray(config.scheme)) {
return config.scheme.sort((a, b) => b.length - a.length);
}
return [];
}
export function createDetails({
summary,
details,
delim = '\n',
}: {
summary: string;
details: string;
delim?: string;
}): string {
return `<details><summary>${summary}</summary>${delim.repeat(2)}${details}${delim}</details>`;
}
+11 -8
View File
@@ -4,8 +4,6 @@ import type { Platform } from '@expo/config';
import semver from 'semver';
import { URL } from 'url';
import { errorMessage } from './utils';
export interface EasUpdate {
/** The unique ID of the platform specific update */
id: string;
@@ -60,8 +58,8 @@ export async function createUpdate(cwd: string, command: string): Promise<EasUpd
({ stdout } = await getExecOutput((await which('eas', true)) + ` ${command}`, undefined, {
cwd,
}));
} catch (error) {
throw new Error(`Could not create a new EAS Update, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not create a new EAS Update`, { cause: error });
}
return JSON.parse(stdout);
@@ -73,16 +71,21 @@ export async function createUpdate(cwd: string, command: string): Promise<EasUpd
export function getUpdateGroupQr({
projectId,
updateGroupId,
appScheme,
appSlug,
qrTarget,
}: {
projectId: string;
updateGroupId: string;
appScheme?: string;
appSlug: string;
qrTarget: 'expo-go' | 'dev-build';
}): string {
const url = new URL('https://qr.expo.dev/eas-update');
if (appScheme) {
url.searchParams.append('appScheme', appScheme);
if (qrTarget === 'dev-build') {
// While the parameter is called `appScheme`, it's actually the app's slug
// This should only be added when using dev clients as target
// See: https://github.com/expo/expo/blob/8ae75dde393e5d2393d446227a1fe2482c75eec3/packages/expo-dev-client/plugin/src/getDefaultScheme.ts#L17
url.searchParams.append('appScheme', appSlug.replace(/[^A-Za-z0-9+\-.]/g, ''));
}
url.searchParams.append('projectId', projectId);
+95 -11
View File
@@ -2,10 +2,9 @@ import { info, exportVariable } from '@actions/core';
import { exec, getExecOutput } from '@actions/exec';
import { which } from '@actions/io';
import { ok as assert } from 'assert';
import path from 'path';
import { URL } from 'url';
import { errorMessage } from './utils';
export type CliName = 'expo' | 'eas';
export type Command = {
@@ -35,12 +34,15 @@ export type BuildInfo = {
name: string;
};
};
releaseChannel: string;
channel: string;
releaseChannel?: string;
distribution: string;
buildProfile: string;
runtimeVersion?: string;
sdkVersion: string;
appVersion: string;
gitCommitHash: string;
expirationDate: string;
};
export const appPlatformDisplayNames: Record<AppPlatform, string> = {
@@ -97,8 +99,8 @@ export async function projectOwner(cli: CliName = 'expo'): Promise<string> {
try {
({ stdout } = await getExecOutput(await which(cli), ['whoami'], { silent: true }));
} catch (error) {
throw new Error(`Could not fetch the project owner, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not fetch the project owner`, { cause: error });
}
if (!stdout) {
@@ -118,8 +120,8 @@ export async function runCommand(cmd: Command) {
({ stderr, stdout } = await getExecOutput(await which(cmd.cli), cmd.args.concat('--non-interactive'), {
silent: false,
}));
} catch (error) {
throw new Error(`Could not run command ${cmd.args.join(' ')}, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not run command ${cmd.args.join(' ')}`, { cause: error });
}
return [stdout.trim(), stderr.trim()];
@@ -133,13 +135,72 @@ export async function easBuild(cmd: Command): Promise<BuildInfo[]> {
({ stdout } = await getExecOutput(await which('eas', true), args, {
silent: false,
}));
} catch (error) {
throw new Error(`Could not run command eas build, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not run command eas build`, { cause: error });
}
return JSON.parse(stdout);
}
/**
* Create an new EAS build using the user-provided command.
*/
export async function createEasBuildFromRawCommandAsync(
cwd: string,
command: string,
extraArgs: string[] = []
): Promise<BuildInfo[]> {
let stdout = '';
let cmd = command;
if (!cmd.includes('--json')) {
cmd += ' --json';
}
if (!cmd.includes('--non-interactive')) {
cmd += ' --non-interactive';
}
if (!cmd.includes('--no-wait')) {
cmd += ' --no-wait';
}
try {
({ stdout } = await getExecOutput((await which('eas', true)) + ` ${cmd}`, extraArgs, {
cwd,
}));
} catch (error: unknown) {
throw new Error(`Could not run command eas build`, { cause: error });
}
return JSON.parse(stdout);
}
/**
* Cancel an EAS build.
*/
export async function cancelEasBuildAsync(cwd: string, buildId: string): Promise<void> {
try {
await getExecOutput(await which('eas', true), ['build:cancel', buildId], { cwd });
} catch (error: unknown) {
info(`Failed to cancel build ${buildId}: ${String(error)}`);
}
}
/**
* Query the EAS BuildInfo from given buildId.
*/
export async function queryEasBuildInfoAsync(cwd: string, buildId: string): Promise<BuildInfo | null> {
try {
const { stdout } = await getExecOutput(await which('eas', true), ['build:view', buildId, '--json'], {
cwd,
silent: true,
});
return JSON.parse(stdout);
} catch (error: unknown) {
info(`Failed to query eas build ${buildId}: ${String(error)}`);
}
return null;
}
/**
* Try to resolve the project info, by running 'expo config --type prebuild'.
*/
@@ -151,14 +212,37 @@ export async function projectInfo(dir: string): Promise<ProjectInfo> {
cwd: dir,
silent: true,
}));
} catch (error) {
throw new Error(`Could not fetch the project info from ${dir}, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not fetch the project info from ${dir}`, { cause: error });
}
const { name, slug, owner } = JSON.parse(stdout);
return { name, slug, owner };
}
/**
* Determine if the current project is using `dev-build` or `expo-go`.
* This is based on the `@expo/cli` check to enable dev client mode.
*
* @see https://github.com/expo/expo/blob/190a80f393bc730eb3f300df52d82b701e4b8ff5/packages/%40expo/cli/src/utils/analytics/getDevClientProperties.ts#L12-L15
*/
export function projectAppType(dir: string): 'expo-go' | 'dev-build' {
const packageFile = path.resolve(dir, 'package.json');
let packageJson: any = {};
try {
packageJson = require(packageFile);
} catch (error: unknown) {
throw new Error(`Could not load the project package file in: ${packageFile}`, { cause: error });
}
if (packageJson?.dependencies?.['expo-dev-client'] || packageJson?.devDependencies?.['expo-dev-client']) {
return 'dev-build';
}
return 'expo-go';
}
/**
* Create a QR code for an update on project, with an optional release channel.
*/
+197
View File
@@ -0,0 +1,197 @@
import type { Fingerprint as FingerprintType, FingerprintSource } from '@expo/fingerprint';
import { openDatabaseAsync, Database } from '../sqlite';
export type FingerprintDbEntity = Camelize<RawFingerprintDbEntity> & {
fingerprint: FingerprintType;
};
export class FingerprintDbManager {
constructor(private dbPath: string) {}
public async initAsync(): Promise<Database> {
const db = await openDatabaseAsync(this.dbPath);
await db.runAsync(
`CREATE TABLE IF NOT EXISTS ${FingerprintDbManager.TABLE_NAME} (${FingerprintDbManager.SCHEMA.join(', ')})`
);
for (const index of FingerprintDbManager.INDEXES) {
await db.runAsync(index);
}
for (const extraStatement of FingerprintDbManager.EXTRA_CREATE_DB_STATEMENTS) {
await db.runAsync(extraStatement);
}
await db.runAsync(`PRAGMA fingerprint_schema_version = ${FingerprintDbManager.SCHEMA_VERSION}`);
this.db = db;
return db;
}
public async upsertFingerprintByGitCommitHashAsync(
gitCommitHash: string,
params: {
easBuildId?: string;
fingerprint: FingerprintType;
}
): Promise<void> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const easBuildId = params.easBuildId ?? '';
const fingerprintString = JSON.stringify(params.fingerprint);
await this.db.runAsync(
`INSERT INTO ${FingerprintDbManager.TABLE_NAME} (git_commit_hash, eas_build_id, fingerprint_hash, fingerprint) VALUES (?, ?, ?, json(?)) \
ON CONFLICT(git_commit_hash) DO UPDATE SET eas_build_id = ?, fingerprint_hash = ?, fingerprint = json(?)`,
gitCommitHash,
easBuildId,
params.fingerprint.hash,
fingerprintString,
easBuildId,
params.fingerprint.hash,
fingerprintString
);
}
public async queryEasBuildIdsFromFingerprintAsync(fingerprintHash: string): Promise<string[]> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const rows = await this.db.allAsync<{ eas_build_id: string }>(
`SELECT eas_build_id FROM ${FingerprintDbManager.TABLE_NAME} WHERE fingerprint_hash = ?`,
fingerprintHash
);
return rows.map(row => row['eas_build_id']);
}
/**
* Get the latest entity from the fingerprint hash where the eas_build_id is not null.
*/
public async getLatestEasEntityFromFingerprintAsync(fingerprintHash: string): Promise<FingerprintDbEntity | null> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const row = await this.db.getAsync<RawFingerprintDbEntity>(
`SELECT * FROM ${FingerprintDbManager.TABLE_NAME}
WHERE eas_build_id IS NOT NULL AND eas_build_id != "" AND fingerprint_hash = ?
ORDER BY updated_at DESC LIMIT 1`,
fingerprintHash
);
return row ? FingerprintDbManager.serialize(row) : null;
}
public async getEntityFromGitCommitHashAsync(gitCommitHash: string): Promise<FingerprintDbEntity | null> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const row = await this.db.getAsync<RawFingerprintDbEntity>(
`SELECT * FROM ${FingerprintDbManager.TABLE_NAME} WHERE git_commit_hash = ?`,
gitCommitHash
);
return row ? FingerprintDbManager.serialize(row) : null;
}
public async getFirstEntityFromFingerprintHashAsync(fingerprintHash: string): Promise<FingerprintDbEntity | null> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const row = await this.db.getAsync<RawFingerprintDbEntity>(
`SELECT * FROM ${FingerprintDbManager.TABLE_NAME} WHERE fingerprint_hash = ?`,
fingerprintHash
);
return row ? FingerprintDbManager.serialize(row) : null;
}
public async queryEntitiesFromFingerprintHashAsync(fingerprintHash: string): Promise<FingerprintDbEntity[]> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const rows = await this.db.allAsync<RawFingerprintDbEntity>(
`SELECT * FROM ${FingerprintDbManager.TABLE_NAME} WHERE fingerprint_hash = ?`,
fingerprintHash
);
return rows.map(row => FingerprintDbManager.serialize(row));
}
public async getFingerprintSourcesAsync(fingerprintHash: string): Promise<FingerprintSource[] | null> {
if (!this.db) {
throw new Error('Database not initialized. Call initAsync() first.');
}
const row = await this.db.getAsync<{ sources: string }>(
`SELECT json_extract(fingerprint, '$.sources') as sources FROM ${FingerprintDbManager.TABLE_NAME} WHERE fingerprint_hash = ?`,
fingerprintHash
);
const result = row?.['sources'];
if (!result) {
return null;
}
return JSON.parse(result);
}
public async closeAsync(): Promise<void> {
this.db?.closeAsync();
}
//#region private
private static readonly SCHEMA_VERSION = 0;
private static readonly TABLE_NAME = 'fingerprint';
private static readonly SCHEMA = [
'id INTEGER PRIMARY KEY AUTOINCREMENT',
'eas_build_id TEXT',
'git_commit_hash TEXT NOT NULL',
'fingerprint_hash TEXT NOT NULL',
'fingerprint TEXT NOT NULL',
"created_at TEXT NOT NULL DEFAULT (DATETIME('now', 'utc'))",
"updated_at TEXT NOT NULL DEFAULT (DATETIME('now', 'utc'))",
];
private static readonly INDEXES = [
`CREATE UNIQUE INDEX IF NOT EXISTS idx_git_commit_hash ON ${this.TABLE_NAME} (git_commit_hash)`,
`CREATE INDEX IF NOT EXISTS idx_fingerprint_hash ON ${this.TABLE_NAME} (fingerprint_hash)`,
];
private static readonly EXTRA_CREATE_DB_STATEMENTS = [
`CREATE TRIGGER IF NOT EXISTS update_fingerprint_updated_at AFTER UPDATE ON ${this.TABLE_NAME}
BEGIN
UPDATE ${this.TABLE_NAME} SET updated_at = DATETIME('now', 'utc') WHERE id = NEW.id;
END`,
];
private db: Database | null = null;
private static serialize(rawEntity: RawFingerprintDbEntity): FingerprintDbEntity {
return {
id: rawEntity.id,
easBuildId: rawEntity.eas_build_id,
gitCommitHash: rawEntity.git_commit_hash,
fingerprintHash: rawEntity.fingerprint_hash,
fingerprint: JSON.parse(rawEntity.fingerprint),
createdAt: rawEntity.created_at,
updatedAt: rawEntity.updated_at,
};
}
//#endregion
}
interface RawFingerprintDbEntity {
id: number;
eas_build_id: string | null;
git_commit_hash: string;
fingerprint_hash: string;
fingerprint: string;
created_at: string;
updated_at: string;
}
//#region TypeScript utilities
// https://stackoverflow.com/a/63715429
type CamelizeString<T extends PropertyKey, C extends string = ''> = T extends string
? string extends T
? string
: T extends `${infer F}_${infer R}`
? CamelizeString<Capitalize<R>, `${C}${F}`>
: `${C}${T}`
: T;
type Camelize<T> = { [K in keyof T as CamelizeString<K>]: T[K] };
//#endregion
+155
View File
@@ -0,0 +1,155 @@
import { getBooleanInput, getInput, group, info } from '@actions/core';
import { context as githubContext } from '@actions/github';
import { mkdirP } from '@actions/io';
import type * as Fingerprint from '@expo/fingerprint';
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import { FingerprintDbEntity, FingerprintDbManager } from './FingerprintDbManager';
import { restoreCacheAsync, restoreFromCache, saveCacheAsync, saveToCache } from '../cacher';
import { installPackage, resolvePackage } from '../packager';
import { installSQLiteAsync } from '../sqlite';
import { addGlobalNodeSearchPath, findTool, installToolFromPackage } from '../worker';
export * from './FingerprintDbManager';
export interface FingerprintOutput {
currentFingerprint: Fingerprint.Fingerprint;
previousFingerprint: Fingerprint.Fingerprint | null;
diff: Fingerprint.FingerprintSource[];
}
/**
* Shared logic to create a fingerprint diff for fingerprint actions
*/
export async function createFingerprintOutputAsync(
dbManager: FingerprintDbManager,
input: ReturnType<typeof collectFingerprintActionInput>
): Promise<FingerprintOutput> {
await installFingerprintAsync(input.fingerprintVersion, input.packager, input.fingerprintInstallationCache);
const fingerprint = require('@expo/fingerprint') as typeof import('@expo/fingerprint');
const currentFingerprint = await fingerprint.createFingerprintAsync(input.workingDirectory);
let previousFingerprint: FingerprintDbEntity | null = null;
if (input.previousGitCommitHash) {
previousFingerprint = await dbManager.getEntityFromGitCommitHashAsync(input.previousGitCommitHash);
}
const diff =
previousFingerprint != null
? await fingerprint.diffFingerprints(previousFingerprint.fingerprint, currentFingerprint)
: await fingerprint.diffFingerprints({ sources: [], hash: '' }, currentFingerprint);
return {
currentFingerprint,
previousFingerprint: previousFingerprint?.fingerprint ?? null,
diff,
};
}
/**
* Create a FingerprintDbManager instance
*/
export async function createFingerprintDbManagerAsync(
packager: string,
cacheKey: string
): Promise<FingerprintDbManager> {
await installSQLiteAsync(packager);
const dbPath = await getDbPathAsync();
const cacheHit = (await restoreDbFromCacheAsync(cacheKey)) != null;
if (cacheHit) {
info(`Restored fingerprint database from cache - cacheKey[${cacheKey}]`);
} else {
info(`Missing fingerprint database from cache - will create a new database - cacheKey[${cacheKey}]`);
}
const dbManager = new FingerprintDbManager(dbPath);
await dbManager.initAsync();
return dbManager;
}
/**
* Common inputs for fingerprint actions
*/
export function collectFingerprintActionInput() {
return {
packager: getInput('packager') || 'yarn',
githubToken: getInput('github-token'),
workingDirectory: getInput('working-directory'),
fingerprintVersion: getInput('fingerprint-version') || 'latest',
fingerprintInstallationCache:
!getInput('fingerprint-installation-cache') || getBooleanInput('fingerprint-installation-cache'),
fingerprintDbCacheKey: getInput('fingerprint-db-cache-key'),
previousGitCommitHash:
getInput('previous-git-commit') ||
(githubContext.eventName === 'pull_request'
? githubContext.payload.pull_request?.base?.sha
: githubContext.payload.before),
currentGitCommitHash:
getInput('current-git-commit') ||
(githubContext.eventName === 'pull_request' ? githubContext.payload.pull_request?.head?.sha : githubContext.sha),
savingDbBranch: getInput('saving-db-branch') || undefined,
};
}
/**
* Install @expo/fingerprint based on given input
*/
export async function installFingerprintAsync(
fingerprintVersion: string,
packager: string,
useCache: boolean = true
): Promise<string> {
const packageName = '@expo/fingerprint';
const version = await resolvePackage(packageName, fingerprintVersion);
const message = useCache
? `Installing ${packageName} (${version}) from cache or with ${packager}`
: `Installing ${packageName} (${version}) with ${packager}`;
return await group(message, async () => {
let libRoot = findTool(packageName, version) || null;
if (!libRoot && useCache) {
libRoot = await restoreFromCache(packageName, version, packager);
}
if (!libRoot) {
libRoot = await installPackage(packageName, version, packager);
if (useCache) {
await saveToCache(packageName, version, packager);
}
}
installToolFromPackage(libRoot);
addGlobalNodeSearchPath(path.join(libRoot, 'node_modules'));
return libRoot;
});
}
/**
* Restore database from the remote cache.
* This will install the tool back into the local tool cache.
*/
export async function restoreDbFromCacheAsync(cacheKey: string) {
return restoreCacheAsync(path.dirname(await getDbPathAsync()), cacheKey);
}
/**
* Save database to the remote cache.
* This will fetch from the local tool cache.
*/
export async function saveDbToCacheAsync(cacheKey: string) {
info(`Saving fingerprint database to cache: ${cacheKey}`);
return saveCacheAsync(path.dirname(await getDbPathAsync()), cacheKey);
}
/**
* Get the path to the fingerprint database
*/
async function getDbPathAsync(): Promise<string> {
assert(process.env['RUNNER_TOOL_CACHE'], 'Could not resolve the local tool cache, RUNNER_TOOL_CACHE not defined');
const result = path.join(process.env['RUNNER_TOOL_CACHE'], 'fingerprint-storage', 'fingerprint.db');
const dir = path.dirname(result);
if (!(await fs.promises.stat(dir).catch(() => null))) {
await mkdirP(dir);
}
return result;
}
+46 -1
View File
@@ -1,7 +1,7 @@
import { getOctokit, context } from '@actions/github';
import { ok as assert } from 'assert';
type IssueContext = typeof context['issue'];
type IssueContext = (typeof context)['issue'];
type IssueCommentContext = IssueContext & {
comment_id?: number;
@@ -141,3 +141,48 @@ export function issueComment() {
},
] as const;
}
/**
* Get the commit message for a specific commit hash.
*/
export async function getGitCommandMessageAsync(options: AuthContext, gitCommitHash: string): Promise<string> {
const github = githubApi({ token: options.token });
const result = await github.rest.git.getCommit({
...context.repo,
commit_sha: gitCommitHash,
});
return result.data.message;
}
/**
* Get the default branch for the repository.
*/
export function getRepoDefaultBranch(): string | undefined {
return context.payload?.repository?.default_branch;
}
/**
* True if the current event is a push to the target branch.
*
* @param targetBranch The branch to compare against.
*/
export function isPushBranchContext(targetBranch: string) {
return context.eventName === 'push' && context.ref === `refs/heads/${targetBranch}`;
}
/**
* Get the pull request information that associated with a specific commit hash.
*/
export async function getPullRequestFromGitCommitShaAsync(options: AuthContext, gitCommitHash: string) {
const github = githubApi({ token: options.token });
const results = await github.rest.repos.listPullRequestsAssociatedWithCommit({
...context.repo,
commit_sha: gitCommitHash,
});
return results.data.map(pr => ({
id: pr.id,
prNumber: pr.number,
prHeadCommitSha: pr.head.sha,
mergeCommitSha: pr.merge_commit_sha,
}));
}
+2 -3
View File
@@ -1,7 +1,6 @@
import { exec, getExecOutput } from '@actions/exec';
import { mkdirP } from '@actions/io';
import { errorMessage } from './utils';
import { cacheTool, tempPath } from './worker';
/**
@@ -14,8 +13,8 @@ export async function resolvePackage(name: string, range: string): Promise<strin
try {
({ stdout } = await getExecOutput('npm', ['info', `${name}@${range}`, 'version', '--json'], { silent: true }));
} catch (error) {
throw new Error(`Could not resolve ${name}@${range}, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not resolve ${name}@${range}`, { cause: error });
}
// thanks npm, for returning a "" json string value for invalid versions
+2 -4
View File
@@ -1,8 +1,6 @@
import { getExecOutput } from '@actions/exec';
import { ExpoConfig } from '@expo/config';
import { errorMessage } from './utils';
/**
* Load the Expo app project config in the given directory.
* This runs `expo config` command instead of using `@expo/config` directly,
@@ -16,8 +14,8 @@ export async function loadProjectConfig(cwd: string): Promise<ExpoConfig> {
cwd,
silent: true,
}));
} catch (error) {
throw new Error(`Could not fetch the project info from ${cwd}, reason:\n${errorMessage(error)}`);
} catch (error: unknown) {
throw new Error(`Could not fetch the project info from ${cwd}`, { cause: error });
}
return JSON.parse(stdout);
+72
View File
@@ -0,0 +1,72 @@
import { group } from '@actions/core';
import assert from 'assert';
import path from 'path';
import type sqlite3Types from 'sqlite3';
import { promisify } from 'util';
import { restoreFromCache, saveToCache } from './cacher';
import { installPackage, resolvePackage } from './packager';
import { addGlobalNodeSearchPath, findTool } from './worker';
/**
* A database object with async methods.
*/
export interface Database extends sqlite3Types.Database {
closeAsync: () => Promise<void>;
runAsync: (sql: string, ...params: any[]) => Promise<sqlite3Types.RunResult>;
execAsync: (sql: string) => Promise<void>;
prepareAsync: (sql: string, ...params: any[]) => Promise<sqlite3Types.Statement>;
getAsync: <T>(sql: string, ...params: any[]) => Promise<T>;
allAsync: <T>(sql: string, ...params: any[]) => Promise<T[]>;
}
/**
* Open a database and return a promise that resolves to a database object.
*/
export function openDatabaseAsync(filename: string): Promise<Database> {
return new Promise<sqlite3Types.Database>((resolve, reject) => {
const sqlite3 = require('sqlite3') as typeof import('sqlite3');
const db = new sqlite3.Database(filename, err => {
if (err) {
reject(err);
} else {
resolve(db);
}
});
}).then(db => {
return {
...db,
closeAsync: promisify(db.close.bind(db)),
runAsync: promisify(db.run.bind(db)),
execAsync: promisify(db.exec.bind(db)),
prepareAsync: promisify(db.prepare.bind(db)),
getAsync: promisify(db.get.bind(db)),
allAsync: promisify(db.all.bind(db)),
} as Database;
});
}
/**
* Install the sqlite3
*/
export async function installSQLiteAsync(packager: string): Promise<string> {
const sqliteVersion = require('../package.json').devDependencies.sqlite3;
assert(sqliteVersion);
const packageName = 'sqlite3';
const version = await resolvePackage(packageName, sqliteVersion);
const message = `Installing ${packageName} (${version}) from cache or with ${packager}`;
return await group(message, async () => {
let libRoot = findTool(packageName, version) || null;
if (!libRoot) {
libRoot = await restoreFromCache(packageName, version, packager);
}
if (!libRoot) {
libRoot = await installPackage(packageName, version, packager);
await saveToCache(packageName, version, packager);
}
addGlobalNodeSearchPath(path.join(libRoot, 'node_modules'));
return libRoot;
});
}
-12
View File
@@ -9,15 +9,3 @@ export function template(template: string, replacements: Record<string, string>)
}
return result;
}
export function errorMessage(error: Error | unknown): string {
if (error instanceof Error) {
return error.message;
}
if (typeof error === 'string') {
return error;
}
return 'Unknown error';
}
+13 -3
View File
@@ -4,8 +4,6 @@ import { ok as assert } from 'assert';
import os from 'os';
import path from 'path';
import { errorMessage } from './utils';
export { find as findTool, cacheDir as cacheTool } from '@actions/tool-cache';
/**
@@ -56,7 +54,7 @@ export async function patchWatchers(): Promise<void> {
} catch (error) {
warning(`Looks like we can't patch watchers/inotify limits, you might encouter the 'ENOSPC' error.`);
warning('For more info: https://github.com/expo/expo-github-action/issues/20, encountered error:');
warning(errorMessage(error));
warning(String(error));
}
}
@@ -74,3 +72,15 @@ export function toolPath(name: string, version: string): string {
assert(process.env['RUNNER_TOOL_CACHE'], 'Could not resolve the local tool cache, RUNNER_TOOL_CACHE not defined');
return path.join(process.env['RUNNER_TOOL_CACHE'], name, version, os.arch());
}
/**
* Add extra `searchPath` to the global search path for require()
*/
export function addGlobalNodeSearchPath(searchPath: string) {
const nodePath = process.env['NODE_PATH'] || '';
const delimiter = process.platform === 'win32' ? ';' : ':';
const nodePaths = nodePath.split(delimiter);
nodePaths.push(searchPath);
process.env['NODE_PATH'] = nodePaths.join(delimiter);
require('module').Module._initPaths();
}
+68 -44
View File
@@ -1,8 +1,14 @@
import { ExpoConfig } from '@expo/config';
import { createSummary, getVariables } from '../../src/actions/preview';
import { createSummary, getVariables, previewInput } from '../../src/actions/preview';
import { EasUpdate } from '../../src/eas';
jest.mock('../../src/expo');
const fakeOptions = {
qrTarget: 'dev-client',
} as unknown as ReturnType<typeof previewInput>;
const fakeExpoConfig = {
slug: 'fake-project',
extra: {
@@ -40,7 +46,8 @@ const fakeUpdatesMultiple = fakeUpdatesSingle.map(update => ({ ...update, group:
describe(createSummary, () => {
describe('single update group', () => {
it('returns expected message for both platforms', () => {
expect(createSummary(fakeUpdatesSingle, getVariables(fakeExpoConfig, fakeUpdatesSingle))).toMatchInlineSnapshot(`
expect(createSummary(fakeUpdatesSingle, getVariables(fakeExpoConfig, fakeUpdatesSingle, fakeOptions)))
.toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
@@ -48,25 +55,25 @@ describe(createSummary, () => {
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
it('returns expected message for both platforms with custom app scheme', () => {
const customSchemeConfig = { ...fakeExpoConfig, scheme: 'expogithubaction' };
expect(createSummary(fakeUpdatesSingle, getVariables(customSchemeConfig, fakeUpdatesSingle)))
const customSchemeConfig = { ...fakeExpoConfig, scheme: ['ega', 'expogithubaction'] };
expect(createSummary(fakeUpdatesSingle, getVariables(customSchemeConfig, fakeUpdatesSingle, fakeOptions)))
.toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platforms → **android**, **ios**
- Scheme → **expogithubaction**
- Scheme → **expogithubaction**, **ega**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?appScheme=expogithubaction&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=expogithubaction&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
@@ -74,7 +81,7 @@ describe(createSummary, () => {
it('returns expected message for android only', () => {
const fakeUpdate = fakeUpdatesSingle.filter(update => update.platform === 'android');
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate))).toMatchInlineSnapshot(`
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate, fakeOptions))).toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
@@ -82,7 +89,7 @@ describe(createSummary, () => {
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
@@ -90,7 +97,7 @@ describe(createSummary, () => {
it('returns expected message for ios only', () => {
const fakeUpdate = fakeUpdatesSingle.filter(update => update.platform === 'ios');
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate))).toMatchInlineSnapshot(`
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate, fakeOptions))).toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
@@ -98,7 +105,7 @@ describe(createSummary, () => {
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
@@ -107,7 +114,56 @@ describe(createSummary, () => {
describe('mutliple update groups', () => {
it('returns expected message for both platforms', () => {
expect(createSummary(fakeUpdatesMultiple, getVariables(fakeExpoConfig, fakeUpdatesMultiple)))
expect(createSummary(fakeUpdatesMultiple, getVariables(fakeExpoConfig, fakeUpdatesMultiple, fakeOptions)))
.toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platforms → **android**, **ios**
Android <br /> _(exposdk:47.0.0)_ <br /> **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-fake-android-id)** | iOS <br /> _(exposdk:47.0.0)_ <br /> **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-fake-ios-id)**
--- | ---
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-fake-android-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-fake-android-id" width="250px" height="250px" /></a> | <a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-fake-ios-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-fake-ios-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
it('returns expected message for android only', () => {
const fakeUpdate = fakeUpdatesSingle.filter(update => update.platform === 'android');
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate, fakeOptions))).toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platform → **android**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
it('returns expected message for ios only', () => {
const fakeUpdate = fakeUpdatesSingle.filter(update => update.platform === 'ios');
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate, fakeOptions))).toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platform → **ios**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?appScheme=fake-project&projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
it('returns Expo Go compatible QR code when forced', () => {
const customOptions: typeof fakeOptions = { ...fakeOptions, qrTarget: 'expo-go' };
expect(createSummary(fakeUpdatesMultiple, getVariables(fakeExpoConfig, fakeUpdatesMultiple, customOptions)))
.toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
@@ -121,37 +177,5 @@ describe(createSummary, () => {
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
it('returns expected message for android only', () => {
const fakeUpdate = fakeUpdatesSingle.filter(update => update.platform === 'android');
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate))).toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platform → **android**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
it('returns expected message for ios only', () => {
const fakeUpdate = fakeUpdatesSingle.filter(update => update.platform === 'ios');
expect(createSummary(fakeUpdate, getVariables(fakeExpoConfig, fakeUpdate))).toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platform → **ios**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
> Learn more about [𝝠 Expo Github Action](https://github.com/expo/expo-github-action/tree/main/preview#example-workflows)"
`);
});
});
});
+3 -3
View File
@@ -1,9 +1,9 @@
import * as cache from '@actions/cache';
import os from 'os';
import { resetEnv, setEnv } from './utils';
import { cacheKey, restoreFromCache, saveToCache } from '../src/cacher';
import { toolPath } from '../src/worker';
import { resetEnv, setEnv } from './utils';
jest.mock('@actions/cache');
jest.mock('@actions/core');
@@ -34,7 +34,7 @@ describe(restoreFromCache, () => {
it('skips when cache is unavailable', async () => {
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
jest.mocked(cache.restoreCache).mockRejectedValue(new Error('Cache service url not found'));
await expect(restoreFromCache('expo-cli', '5.0.3', 'yarn')).resolves.toBeUndefined();
await expect(restoreFromCache('expo-cli', '5.0.3', 'yarn')).resolves.toBeNull();
});
it('throws when cache has unexpected error', async () => {
@@ -52,7 +52,7 @@ describe(restoreFromCache, () => {
it('returns nothing when cache is empty', async () => {
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
jest.mocked(cache.restoreCache).mockResolvedValue(undefined);
await expect(restoreFromCache('eas-cli', '0.46.2', 'npm')).resolves.toBeUndefined();
await expect(restoreFromCache('eas-cli', '0.46.2', 'npm')).resolves.toBeNull();
});
});
+57
View File
@@ -0,0 +1,57 @@
import { ExpoConfig } from '@expo/config';
import { getQrTarget, getSchemesInOrderFromConfig } from '../src/comment';
import { projectAppType } from '../src/expo';
jest.mock('../src/expo');
const fakeOptions = {
workingDirectory: '',
};
describe(getQrTarget, () => {
it('returns `dev-build` for `qr-target: dev-build`', () => {
expect(getQrTarget({ ...fakeOptions, qrTarget: 'dev-build' })).toBe('dev-build');
});
it('returns `dev-build` for `qr-target: dev-client`', () => {
expect(getQrTarget({ ...fakeOptions, qrTarget: 'dev-client' })).toBe('dev-build');
});
it('returns `expo-go` for `qr-target: expo-go`', () => {
expect(getQrTarget({ ...fakeOptions, qrTarget: 'expo-go' })).toBe('expo-go');
});
it('throws for unknown `qr-target`', () => {
expect(() => getQrTarget({ ...fakeOptions, qrTarget: 'unknown' } as any)).toThrow(
`Invalid QR code target: "unknown", expected "expo-go" or "dev-build"`
);
});
it('returns infered `dev-build` when input is omitted', () => {
jest.mocked(projectAppType).mockReturnValue('dev-build');
expect(getQrTarget({ ...fakeOptions, qrTarget: undefined })).toBe('dev-build');
});
it('returns infered `expo-go` when input is omitted', () => {
jest.mocked(projectAppType).mockReturnValue('expo-go');
expect(getQrTarget({ ...fakeOptions, qrTarget: undefined })).toBe('expo-go');
});
});
describe(getSchemesInOrderFromConfig, () => {
it('returns empty array when not defined', () => {
expect(getSchemesInOrderFromConfig({} as ExpoConfig)).toEqual([]);
});
it('returns scheme as array when defined as string', () => {
expect(getSchemesInOrderFromConfig({ scheme: 'ega' } as ExpoConfig)).toEqual(['ega']);
});
it('returns schemes in order when defined as array', () => {
expect(getSchemesInOrderFromConfig({ scheme: ['ega', 'expogithubaction'] } as ExpoConfig)).toEqual([
'expogithubaction',
'ega',
]);
});
});
+36
View File
@@ -0,0 +1,36 @@
import { getUpdateGroupQr } from '../src/eas';
describe(getUpdateGroupQr, () => {
it('returns url for expo-go', () => {
expect(
getUpdateGroupQr({
qrTarget: 'expo-go',
projectId: 'projectId',
updateGroupId: 'updateGroupId',
appSlug: 'appslug',
})
).toBe('https://qr.expo.dev/eas-update?projectId=projectId&groupId=updateGroupId');
});
it('returns url for dev-build', () => {
expect(
getUpdateGroupQr({
qrTarget: 'dev-build',
projectId: 'projectId',
updateGroupId: 'updateGroupId',
appSlug: 'appslug',
})
).toBe('https://qr.expo.dev/eas-update?appScheme=appslug&projectId=projectId&groupId=updateGroupId');
});
it('returns url for dev-build, with `_` in appSlug', () => {
expect(
getUpdateGroupQr({
qrTarget: 'dev-build',
projectId: 'projectId',
updateGroupId: 'updateGroupId',
appSlug: 'hello_world',
})
).toBe('https://qr.expo.dev/eas-update?appScheme=helloworld&projectId=projectId&groupId=updateGroupId');
});
});
@@ -0,0 +1,174 @@
import type { FingerprintSource } from '@expo/fingerprint';
import { FingerprintDbManager } from '../../src/fingerprint/FingerprintDbManager';
describe(FingerprintDbManager, () => {
let fingerprintDbManager: FingerprintDbManager;
beforeEach(async () => {
fingerprintDbManager = new FingerprintDbManager(':memory:');
await fingerprintDbManager.initAsync();
});
afterEach(async () => {
await fingerprintDbManager.closeAsync();
});
it('queryEasBuildIdsFromFingerprintAsync', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: 'id1',
fingerprint: { sources: [], hash: 'hash1' },
});
expect(await fingerprintDbManager.queryEasBuildIdsFromFingerprintAsync('nonExistedId')).toEqual([]);
expect(await fingerprintDbManager.queryEasBuildIdsFromFingerprintAsync('hash1')).toEqual(['id1']);
});
it('getFingerprintSourcesAsync', async () => {
const sources: FingerprintSource[] = [
{
type: 'file',
filePath: './assets/icon.png',
reasons: ['expoConfigExternalFile'],
hash: '3f71f5a8458c06b83424cc33e1f2481f601199ea',
},
{
type: 'dir',
filePath: 'node_modules/expo',
reasons: ['expoAutolinkingIos', 'expoAutolinkingAndroid'],
hash: 'ae5d1bd2395e8766c1a1394ce948bf6003b4fd25',
},
{
type: 'contents',
id: 'packageJson:scripts',
contents: '{"start":"expo start","android":"expo run:android","ios":"expo run:ios","web":"expo start --web"}',
reasons: ['packageJson:scripts'],
hash: '119dec73c92445762a48c9455d9f34a643be8cf0',
},
];
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: 'id1',
fingerprint: { sources, hash: 'hash1' },
});
expect(await fingerprintDbManager.getFingerprintSourcesAsync('nonExistedId')).toBe(null);
expect(await fingerprintDbManager.getFingerprintSourcesAsync('hash1')).toEqual(sources);
});
it('getEntityFromGitCommitHashAsync', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: 'id1',
fingerprint: { sources: [], hash: 'hash1' },
});
expect(await fingerprintDbManager.getEntityFromGitCommitHashAsync('nonExistedHash')).toBe(null);
const result = await fingerprintDbManager.getEntityFromGitCommitHashAsync('gitHash');
expect(result?.easBuildId).toEqual('id1');
expect(result?.gitCommitHash).toEqual('gitHash');
expect(result?.fingerprintHash).toEqual('hash1');
expect(result?.fingerprint).toEqual({ sources: [], hash: 'hash1' });
});
it('getFirstEntityFromFingerprintHashAsync', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash1', {
fingerprint: {
sources: [],
hash: 'hash1',
},
});
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash2', {
easBuildId: 'id1',
fingerprint: { sources: [], hash: 'hash1' },
});
const result = await fingerprintDbManager.getFirstEntityFromFingerprintHashAsync('hash1');
expect(result?.gitCommitHash).toBe('gitHash1');
});
it('queryEntitiesFromFingerprintHashAsync', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash1', {
fingerprint: {
sources: [],
hash: 'hash1',
},
});
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash2', {
easBuildId: 'id1',
fingerprint: { sources: [], hash: 'hash1' },
});
const results = await fingerprintDbManager.queryEntitiesFromFingerprintHashAsync('hash1');
expect(results.length).toBe(2);
expect(results[0].gitCommitHash).toBe('gitHash1');
expect(results[1].gitCommitHash).toBe('gitHash2');
});
it('upsertFingerprintByGitCommitHashAsync should update existing data', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: '',
fingerprint: { sources: [], hash: 'hash1' },
});
let result = await fingerprintDbManager.getEntityFromGitCommitHashAsync('gitHash');
expect(result?.fingerprintHash).toEqual('hash1');
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: 'easBuildId',
fingerprint: { sources: [], hash: 'hash2' },
});
result = await fingerprintDbManager.getEntityFromGitCommitHashAsync('gitHash');
expect(result?.easBuildId).toEqual('easBuildId');
expect(result?.fingerprintHash).toEqual('hash2');
expect(result?.fingerprint).toEqual({ sources: [], hash: 'hash2' });
});
it('createdAt value should be auto generated', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: '',
fingerprint: { sources: [], hash: 'hash1' },
});
const result = await fingerprintDbManager.getEntityFromGitCommitHashAsync('gitHash');
expect(result?.createdAt).not.toBe(null);
});
it('updatedAt value should be auto updated', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: '',
fingerprint: { sources: [], hash: 'hash1' },
});
let result = await fingerprintDbManager.getEntityFromGitCommitHashAsync('gitHash');
expect(result?.updatedAt).not.toBe(null);
const previousUpdatedAt = result?.updatedAt;
await delayAsync(1000);
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash', {
easBuildId: 'buildId',
fingerprint: { sources: [], hash: 'hash2' },
});
result = await fingerprintDbManager.getEntityFromGitCommitHashAsync('gitHash');
expect(result?.updatedAt).not.toEqual(previousUpdatedAt);
});
it('getLatestEasEntityFromFingerprintAsync should return the latest entity', async () => {
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash2', {
easBuildId: '',
fingerprint: { sources: [], hash: 'hash1' },
});
await delayAsync(1000);
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash1', {
easBuildId: 'buildId',
fingerprint: { sources: [], hash: 'hash1' },
});
await delayAsync(1000);
await fingerprintDbManager.upsertFingerprintByGitCommitHashAsync('gitHash3', {
easBuildId: '',
fingerprint: { sources: [], hash: 'hash1' },
});
const result = await fingerprintDbManager.getLatestEasEntityFromFingerprintAsync('hash1');
expect(result?.gitCommitHash).toEqual('gitHash1');
});
});
async function delayAsync(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
}
+1 -1
View File
@@ -1,7 +1,7 @@
import * as github from '@actions/github';
import { githubApi, pullContext } from '../src/github';
import { setEnv, resetEnv } from './utils';
import { githubApi, pullContext } from '../src/github';
jest.mock('@actions/github');
+36
View File
@@ -0,0 +1,36 @@
import { openDatabaseAsync, Database } from '../src/sqlite';
describe(openDatabaseAsync, () => {
let db: Database;
beforeAll(async () => {
db = await openDatabaseAsync(':memory:');
});
afterAll(async () => {
await db.closeAsync();
});
it('should be able to create a table', async () => {
await db.runAsync('CREATE TABLE lorem (info TEXT)');
await db.runAsync('INSERT INTO lorem VALUES (?)', 'ipsum');
const results = await db.allAsync<{ info: string }>('SELECT * FROM lorem');
expect(results).toEqual([{ info: 'ipsum' }]);
await db.runAsync('DROP TABLE lorem');
});
it('should return first row result from `getAsync`', async () => {
await db.runAsync('CREATE TABLE lorem (info TEXT)');
await db.runAsync('INSERT INTO lorem VALUES (?), (?), (?)', '1', '2', '3');
const results = await db.getAsync<{ info: string }>('SELECT * FROM lorem');
expect(results).toEqual({ info: '1' });
await db.runAsync('DROP TABLE lorem');
});
it('should support array results from `allAsync`', async () => {
await db.runAsync('CREATE TABLE lorem (info TEXT)');
await db.runAsync('INSERT INTO lorem VALUES (?), (?), (?)', '1', '2', '3');
const results = await db.allAsync<{ info: string }>('SELECT * FROM lorem');
expect(results).toEqual([{ info: '1' }, { info: '2' }, { info: '3' }]);
await db.runAsync('DROP TABLE lorem');
});
});
+1 -1
View File
@@ -3,8 +3,8 @@ import * as exec from '@actions/exec';
import os from 'os';
import path from 'path';
import { tempPath, toolPath, installToolFromPackage, patchWatchers, executeAction } from '../src/worker';
import { resetEnv, setEnv, setPlatform, resetPlatform } from './utils';
import { tempPath, toolPath, installToolFromPackage, patchWatchers, executeAction } from '../src/worker';
jest.mock('@actions/core');
jest.mock('@actions/exec');
+4 -2
View File
@@ -1,8 +1,10 @@
{
"extends": "@tsconfig/node16",
"extends": "@tsconfig/node20",
"compilerOptions": {
"outDir": "./build",
"rootDir": "./src"
"rootDir": "./src",
"module": "CommonJS",
"moduleResolution": "node"
},
"exclude": [
"build",
-7348
View File
File diff suppressed because it is too large. Load diff