├── .eslintignore ├── .eslintrc.json ├── .gitattributes ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── react-native-build-test.yml │ └── test.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.json ├── .releaserc ├── CHANGELOG.md ├── CODEOWNERS ├── LICENSE ├── README.md ├── __tests__ └── main.test.ts ├── action.yml ├── dist ├── restore │ ├── index.js │ ├── index.js.map │ ├── lib.d.ts │ ├── licenses.txt │ ├── restore.d.ts │ ├── save.d.ts │ └── sourcemap-register.js └── save │ ├── index.js │ ├── index.js.map │ ├── lib.d.ts │ ├── licenses.txt │ ├── restore.d.ts │ ├── save.d.ts │ └── sourcemap-register.js ├── docs └── Buildcache_Example_Improvement.png ├── jest.config.js ├── package.json ├── src ├── lib.ts ├── restore.ts └── save.ts ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ 4 | jest.config.js 5 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["jest", "@typescript-eslint"], 3 | "extends": ["plugin:github/recommended"], 4 | "parser": "@typescript-eslint/parser", 5 | "parserOptions": { 6 | "ecmaVersion": 9, 7 | "sourceType": "module", 8 | "project": "./tsconfig.json" 9 | }, 10 | "rules": { 11 | "eslint-comments/no-use": "off", 12 | "import/no-namespace": "off", 13 | "no-unused-vars": "off", 14 | "@typescript-eslint/no-unused-vars": "error", 15 | "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], 16 | "@typescript-eslint/no-require-imports": "error", 17 | "@typescript-eslint/array-type": "error", 18 | "@typescript-eslint/await-thenable": "error", 19 | "@typescript-eslint/ban-ts-comment": "error", 20 | "camelcase": "off", 21 | "@typescript-eslint/consistent-type-assertions": "error", 22 | "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], 23 | "@typescript-eslint/func-call-spacing": ["error", "never"], 24 | "@typescript-eslint/no-array-constructor": "error", 25 | "@typescript-eslint/no-empty-interface": "error", 26 | "@typescript-eslint/no-explicit-any": "error", 27 | "@typescript-eslint/no-extraneous-class": "error", 28 | "@typescript-eslint/no-for-in-array": "error", 29 | "@typescript-eslint/no-inferrable-types": "error", 30 | "@typescript-eslint/no-misused-new": "error", 31 | "@typescript-eslint/no-namespace": "error", 32 | "@typescript-eslint/no-non-null-assertion": "warn", 33 | "@typescript-eslint/no-unnecessary-qualifier": "error", 34 | "@typescript-eslint/no-unnecessary-type-assertion": "error", 35 | "@typescript-eslint/no-useless-constructor": "error", 36 | "@typescript-eslint/no-var-requires": "error", 37 | "@typescript-eslint/prefer-for-of": "warn", 38 | "@typescript-eslint/prefer-function-type": "warn", 39 | "@typescript-eslint/prefer-includes": "error", 40 | "@typescript-eslint/prefer-string-starts-ends-with": "error", 41 | "@typescript-eslint/promise-function-async": "error", 42 | "@typescript-eslint/require-array-sort-compare": "error", 43 | "@typescript-eslint/restrict-plus-operands": "error", 44 | "semi": "off", 45 | "@typescript-eslint/semi": ["error", "never"], 46 | "@typescript-eslint/type-annotation-spacing": "error", 47 | "@typescript-eslint/unbound-method": "error", 48 | "i18n-text/no-en": "off" 49 | }, 50 | "env": { 51 | "node": true, 52 | "es6": true, 53 | "jest/globals": true 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | dist/** -diff linguist-generated=true -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['http://paypal.me/jameschardy', 'https://venmo.com/JamesCHardy'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Enable version updates for npm 4 | - package-ecosystem: 'npm' 5 | # Look for `package.json` and `lock` files in the `root` directory 6 | directory: '/' 7 | allow: 8 | - dependency-type: 'production' 9 | # Check the npm registry for updates every day (weekdays) 10 | schedule: 11 | interval: 'daily' 12 | 13 | - package-ecosystem: "github-actions" 14 | # Workflow files stored in the 15 | # default location of `.github/workflows` 16 | directory: "/" 17 | schedule: 18 | interval: "daily" 19 | -------------------------------------------------------------------------------- /.github/workflows/react-native-build-test.yml: -------------------------------------------------------------------------------- 1 | name: "react-native-build" 2 | on: # rebuild any PRs and main branch changes 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | - "releases/*" 8 | 9 | jobs: 10 | compile: 11 | runs-on: macos-11 12 | timeout-minutes: 60 13 | env: 14 | BUILDCACHE_DIR: ../custom_buildcache_dir # will override default location 15 | BUILDCACHE_LOG_FILE: ../custom_buildcache.log # will override default location 16 | BUILDCACHE_DEBUG: 3 # will override default of 2 17 | BUILDCACHE_MAX_CACHE_SIZE: 234567890 # will override default of 500000000 18 | BUILDCACHE_MAX_LOCAL_ENTRY_SIZE: 34567890 # Not used by buildache-action, but will pass through... 19 | steps: 20 | - uses: styfle/cancel-workflow-action@0.11.0 21 | with: 22 | all_but_latest: true 23 | 24 | - uses: actions/checkout@v3 25 | with: 26 | fetch-depth: 50 27 | 28 | - uses: ./ 29 | with: 30 | install_dir: ../custom_install_location # demonstrate override of default location 31 | cache_key: react-native-compile # demonstrate putting custom key component in cache key 32 | upload_buildcache_log: true # demonstrate buildcache upload 33 | 34 | - uses: actions/setup-node@v3 35 | with: 36 | node-version: 16 37 | 38 | - uses: maxim-lobanov/setup-xcode@v1 39 | with: 40 | xcode-version: latest-stable 41 | 42 | - uses: ruby/setup-ruby@v1 43 | with: 44 | ruby-version: 3.0.2 45 | 46 | - name: Update Ruby build tools 47 | uses: nick-invision/retry@v2 48 | with: 49 | timeout_minutes: 10 50 | retry_wait_seconds: 60 51 | max_attempts: 3 52 | command: gem update cocoapods 53 | 54 | - name: Get yarn cache directory path 55 | id: yarn-cache-dir-path 56 | run: echo "::set-output name=dir::$(yarn cache dir)" 57 | 58 | - uses: actions/cache@v3 59 | name: Yarn Cache 60 | id: yarn-cache 61 | with: 62 | path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 63 | key: ${{ runner.os }}-yarn-${{ github.run_id }}-v1 64 | restore-keys: ${{ runner.os }}-yarn 65 | 66 | - name: Create React Native Demo 67 | uses: nick-invision/retry@v2 68 | with: 69 | timeout_minutes: 10 70 | retry_wait_seconds: 60 71 | max_attempts: 3 72 | command: npx react-native init demo --skip-install 73 | 74 | - uses: actions/cache@v3 75 | name: Cache Pods 76 | id: pods-cache 77 | with: 78 | path: demo/ios/Pods 79 | key: ${{ runner.os }}-pods-v2-${{ github.run_id }} 80 | restore-keys: ${{ runner.os }}-pods-v2 81 | 82 | - name: Install Demo dependencies 83 | uses: nick-invision/retry@v2 84 | with: 85 | timeout_minutes: 10 86 | retry_wait_seconds: 60 87 | max_attempts: 3 88 | command: pushd demo && yarn 89 | 90 | - name: Install Pods 91 | uses: nick-invision/retry@v2 92 | with: 93 | timeout_minutes: 10 94 | retry_wait_seconds: 60 95 | max_attempts: 3 96 | command: pushd demo/ios && pod install 97 | 98 | - name: Build iOS App 99 | run: | 100 | which clang 101 | export SKIP_BUNDLING=1 102 | set -o pipefail 103 | xcodebuild CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ -workspace demo/ios/demo.xcworkspace -scheme demo -configuration Debug -sdk iphonesimulator -derivedDataPath demo/ios/build -UseModernBuildSystem=YES 104 | shell: bash 105 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: 'build-test' 2 | on: # rebuild any PRs and main branch changes 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | - 'releases/*' 8 | 9 | jobs: 10 | build: # make sure build/ci work properly 11 | env: 12 | GITHUB_TOKEN: '${{ github.token }}' 13 | runs-on: ubuntu-22.04 14 | steps: 15 | - uses: actions/checkout@v3 16 | - run: | 17 | yarn 18 | - run: | 19 | yarn all 20 | build-ubuntu-20-04: # make sure build/ci work properly 21 | env: 22 | GITHUB_TOKEN: '${{ github.token }}' 23 | ACTION_BUILDCACHE_TAG: "v0.27.6" 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v3 27 | - run: | 28 | yarn 29 | - run: | 30 | yarn all 31 | test: # make sure the action works on a clean machine without building 32 | runs-on: ${{ matrix.os }} 33 | strategy: 34 | matrix: 35 | os: [ubuntu-22.04, macos-latest, windows-latest] 36 | steps: 37 | - uses: actions/checkout@v3 38 | - uses: ./ 39 | with: 40 | cache_key: build-test-${{ matrix.os }} 41 | test-ubuntu-20-04: # make sure the action works on a clean machine without building 42 | # https://github.com/mbitsnbites/buildcache/issues/291 43 | runs-on: ${{ matrix.os }} 44 | strategy: 45 | matrix: 46 | os: [ubuntu-latest] 47 | steps: 48 | - uses: actions/checkout@v3 49 | - uses: ./ 50 | with: 51 | cache_key: build-test-${{ matrix.os }} 52 | buildcache_tag: v0.27.6 53 | 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | 4 | # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | *.lcov 28 | 29 | # nyc test coverage 30 | .nyc_output 31 | 32 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 33 | .grunt 34 | 35 | # Bower dependency directory (https://bower.io/) 36 | bower_components 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (https://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | jspm_packages/ 46 | 47 | # TypeScript v1 declaration files 48 | typings/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | .env.test 71 | 72 | # parcel-bundler cache (https://parceljs.org/) 73 | .cache 74 | 75 | # next.js build output 76 | .next 77 | 78 | # nuxt.js build output 79 | .nuxt 80 | 81 | # vuepress build output 82 | .vuepress/dist 83 | 84 | # Serverless directories 85 | .serverless/ 86 | 87 | # FuseBox cache 88 | .fusebox/ 89 | 90 | # DynamoDB Local files 91 | .dynamodb/ 92 | 93 | # OS metadata 94 | .DS_Store 95 | Thumbs.db 96 | 97 | # Ignore built ts files 98 | __tests__/runner/* 99 | lib/**/* 100 | demo/ 101 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": true, 9 | "arrowParens": "avoid" 10 | } 11 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "debug": true, 3 | "branches": [ 4 | {name: "main"} 5 | ], 6 | "repositoryUrl": "git@github.com:mikehardy/buildcache-action.git", 7 | "plugins": [ 8 | ["@semantic-release/commit-analyzer", { 9 | "preset": "conventionalcommits" 10 | }], 11 | ["@semantic-release/release-notes-generator", { 12 | "preset": "conventionalcommits" 13 | }], 14 | [ 15 | "@semantic-release/changelog", 16 | { 17 | "changelogFile": "CHANGELOG.md" 18 | } 19 | ] 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [2.1.0](https://github.com/mikehardy/buildcache-action/compare/v2.0.0...v2.1.0) (2022-10-21) 2 | 3 | 4 | ### Features 5 | 6 | * add config option to explicitly set the buildcache tag to use ([#105](https://github.com/mikehardy/buildcache-action/issues/105)) ([1db83fb](https://github.com/mikehardy/buildcache-action/commit/1db83fb06b0da378aa7db7a1110923b904417cbc)) 7 | 8 | ## [2.0.0](https://github.com/mikehardy/buildcache-action/compare/v1.3.0...v2.0.0) (2022-10-12) 9 | 10 | 11 | ### ⚠ BREAKING CHANGES 12 | 13 | * **deps:** use node16 14 | 15 | ### Bug Fixes 16 | 17 | * **deps:** use node16 ([38afb35](https://github.com/mikehardy/buildcache-action/commit/38afb357c4bd1834789044c3259a6748c06ef891)), closes [#100](https://github.com/mikehardy/buildcache-action/issues/100) 18 | 19 | # [1.3.0](https://github.com/mikehardy/buildcache-action/compare/v1.2.2...v1.3.0) (2022-06-26) 20 | 21 | 22 | ### Features 23 | 24 | * avoid storing empty/no-change caches + add toggle to skip cache store ([8ddbf68](https://github.com/mikehardy/buildcache-action/commit/8ddbf681fc4e39327c7939600be3f3d7f0c676e8)) 25 | 26 | ## [1.2.2](https://github.com/mikehardy/buildcache-action/compare/v1.2.1...v1.2.2) (2021-07-21) 27 | 28 | 29 | ### Bug Fixes 30 | 31 | * consistently use path.join for joining paths ([7dc69af](https://github.com/mikehardy/buildcache-action/commit/7dc69af28e45a330d45204a54587dead618923da)) 32 | * Support relative paths for BUILDCACHE_DIR and BUILDCACHE_LOG_FILE ([bbc03f8](https://github.com/mikehardy/buildcache-action/commit/bbc03f80b4f90a7bebcb0eab4ab6a859f4e4f5ff)), closes [#35](https://github.com/mikehardy/buildcache-action/issues/35) 33 | * unset BUILDCACHE_IMPERSONATE for stats-related runs ([0c876e7](https://github.com/mikehardy/buildcache-action/commit/0c876e72ba9b99872d4d5d7ee7d7def6e4449697)), closes [#31](https://github.com/mikehardy/buildcache-action/issues/31) 34 | * use BUILDCACHE_DIR as root of log file also on restore ([ae162c6](https://github.com/mikehardy/buildcache-action/commit/ae162c61371c109cfc905c1d329cbdcf82590b6d)) 35 | * use unlink instead of rmRF for the log file ([19bd1cf](https://github.com/mikehardy/buildcache-action/commit/19bd1cfbda458bae1b5a9294b0cee888b4bd254e)) 36 | 37 | # CHANGELOG 38 | 39 | ## 1.2.1 40 | 41 | - docs: a lot of work on documentation so the project is easy to understand and integrate 42 | 43 | ## 1.2.0 44 | 45 | - feat: allow complete config control via environment variables defined/used by buildcache 46 | 47 | ## 1.1.1 48 | 49 | - fix: all log from action prefixed with `buildcache: ` 50 | - docs: added example integration / stats from react-native-vision-camera 51 | - chore: deprecate `key`, encourage use of less ambiguous `cache_key` 52 | - test: lots of test improvements to verify behavior: check the repo actions logs if curious 53 | 54 | ## 1.1.0 55 | 56 | - feat: add input param to zero stats before a run, defaults to true 57 | - feat: upload buildcache.log in the action via parameter, defaults false 58 | 59 | ## 1.0.0 60 | 61 | - initial release, hey, buildcache can work in yoru github action with no fuss 62 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @actions/actions-runtime 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2018 GitHub, Inc. and contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Archived - feel free to fork! 2 | 3 | With apologies, I no longer use buildcache at all (ccache started working with react-native compiles shortly after I tried buildcache, so I started using ccache) 4 | 5 | I helped document ccache integration here https://reactnative.dev/docs/build-speed#use-a-compiler-cache 6 | 7 | As such I have no particular interest in this software and will not be maintaining it. Please feel free to fork it and continue development if you like 8 | 9 | # Accelerate builds using buildcache 10 | 11 | Use this GitHub Action to accelerate compilation in your GitHub workflows using [buildcache](https://github.com/mbitsnbites/buildcache) 12 | 13 | ![Compilation Improvement Example](./docs/Buildcache_Example_Improvement.png) 14 | 15 | ## Usage 16 | 17 | 1. Workflow integration 18 | 1. Build integration 19 | 1. ?? 20 | 1. Profit 21 | 22 | ### Workflow Integration 23 | 24 | #### Default Style 25 | 26 | The defaults fit most projects well. 27 | 28 | The defaults definitely fit react-native projects well. 29 | 30 | ```yaml 31 | jobs: 32 | ios: 33 | runs-on: macos-latest # also runs on ubuntu and windows 34 | steps: 35 | - uses: mikehardy/buildcache-action@v2 36 | ``` 37 | 38 | - 500MB cache, cache is in `$GITHUB_WORKSPACE`, just needs build integration and you're set! 39 | 40 | When using with `actions/checkout@v2`, add this action as a step after the checkout, or the `buildcache` binary will be clobbered in the post-job cleanup of the checkout action: 41 | 42 | ```yaml 43 | steps: 44 | - uses: actions/checkout@v3 45 | - uses: mikehardy/buildcache-action@v2 46 | ``` 47 | #### Customize if you need to 48 | 49 | All [buildcache options](https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md) are available to override via environment variables set in the workflow env area 50 | 51 | A few options are used internally by this action, but if you override them this action will respect the override you have set. 52 | 53 | ```yaml 54 | jobs: 55 | ios: 56 | env: # overrides: https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md 57 | BUILDCACHE_DIR: ../.buildcache # optional: Put the cache somewhere else 58 | BUILDCACHE_DEBUG: 2 # optional: If you need more logging? 59 | BUILDCACHE_MAX_CACHE_SIZE: 1000000000 # optional: Need a bigger cache? 60 | BUILDCACHE_LOG_FILE: ../buildcache.log # optional: Log where you like 61 | runs-on: macos-latest 62 | steps: 63 | - uses: mikehardy/buildcache-action@v2 64 | with: 65 | cache_key: ${{ matrix.os }} # optional: separate caches maybe? 66 | upload_buildcache_log: 'true' # optional: 100% cache misses? Find out why 67 | zero_buildcache_stats: 'false' # optional: lifetime vs per-run stats? 68 | ``` 69 | 70 | ### Build Integration 71 | 72 | buildcache is available now, but is unused until you call `clang` and`clang++` wrapped by buildcache. 73 | 74 | Xcode puts `clang` and `clang++` on your `PATH` (in `/usr/bin`), and this action puts buildcache wrappers for it in your `PATH` first, before the normal Xcode ones. 75 | 76 | This `PATH` manipulation is the key to an easy build integration. 77 | 78 | You may rely on calling `clang` and `clang++` from `PATH` at all times, instead of via fully-specified paths. In environments where buildcache is availble, it will work. In environments that do not have buildcache, _it will still work_ 79 | 80 | #### Minimal change: override compiler on command line 81 | 82 | If you want to isolate the integration to the Github Actions CI environment, run your Xcode build using specific overrides. 83 | 84 | ```sh 85 | xcodebuild CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ ` 86 | ``` 87 | 88 | Here is [a real example of a project integrating it](https://github.com/cuvent/react-native-vision-camera/pull/131/files) this way 89 | 90 | #### Maximum change: allow buildcache use everywhere 91 | 92 | After seeing the acceleration, you may want to use buildcache locally as well (I do!) 93 | 94 | This is possible if you change your project definition to override the compiler to use the value from `PATH` all the time. This should be backwards-compatible - it should still work on machines that do not have buildcache installed, but it is more intrusive because it changes your Xcode project file. 95 | 96 | You can may do this via a `Podfile` hook like this: 97 | 98 | ```ruby 99 | installer.pods_project.targets.each do |target| 100 | target.build_configurations.each do |config| 101 | config.build_settings["CC"] = "clang" 102 | config.build_settings["LD"] = "clang" 103 | config.build_settings["CXX"] = "clang++" 104 | config.build_settings["LDPLUSPLUS"] = "clang++" 105 | end 106 | end 107 | 108 | ``` 109 | 110 | ## Verification 111 | 112 | How do you know it is working? 113 | 114 | The overall buid time should make it obvious, but the real test is your cache hit/miss rate. 115 | 116 | To verify things are working using the default configuration, look at the output of the workflow run, expand the "Post buildcache" step and check the statistics printed out. If you you "Re-run jobs" using the GitHub Actions web interface to re-run a job a second time, you _should_ see 100% hit rate, on quite a few objects. 117 | 118 | The output of this repositories [react-native compile test action](https://github.com/mikehardy/buildcache-action/actions/workflows/react-native-build-test.yml) are a good example. 119 | 120 | If you need more information, the default `BUILDCACHE_DEBUG` level of `2` is likely enough, you just need to add the `upload_buildcache_log` flag to your workflow integration and set it to `true`, then you may examine the actual output of buildcache as it worked, using the logfile attached as an artifact to the workflow run. If that still is not enough you may need a debug level of `1` See [Debugging Buildcache](https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md#debugging) for more information. 121 | 122 | In practice, that is all I have needed to do to be certain the integration was successful in other projects. 123 | 124 | ## Benchmarks - 40-50% improvement 125 | 126 | iOS compile performance improvements of approximately 40-50% may be expected when using this action 127 | 128 | - macos-latest, warm cache, react-native-firebase app with all modules: 5min 52s (vs 10min) 129 | - macos-latest, warm cache, react-native 0.64 demo app without Flipper: 2min 55s (vs 5min 20s) 130 | - macos-latest, warm cache, react-native-vision-camera: [7min 13s (vs 13min 13s)](https://github.com/mrousavy/react-native-vision-camera/pull/131#issuecomment-832687144) 131 | 132 | The _first_ build - the "cold" cache case - will be slower by around 15%, since buildcache has overhead to determine if it can use the cached object or not. On the cache miss case it then delegates to the compiler and stores the object for the next run which takes longer than a normal compile call. 133 | 134 | If you experience low cache hit rates on a project with a largely static codebase (i.e., one that should be very cacheable and 2 runs with nearly no changes do not cache for some reason), you should definitely increase the debugging level for the buildcache log and examine stats output before and after each run. A common and easy fix may be as simple as increasing your cache size. 135 | 136 | ## Implementation Details 137 | 138 | ### Approach 139 | 140 | This action does these things - if they interact poorly with your project, perhaps they could be altered slightly and made to work better if you propose a PR: 141 | 142 | - fetches the latest version of [buildcache](https://github.com/mbitsnbites/buildcache) 143 | - installs it in your project directory as `buiildcache/bin/buildcache` 144 | - makes symoblic links from `buildcache` to `clang` and `clang++` 145 | - adds that directory to your `$GITHUB_PATH` for future steps 146 | - configures the cache directory (defaults to `.buildcache` in your project directory if not set via environment variable) 147 | - configures buildcache storage limit (defaults to 500MB if not set via environment variable) 148 | - restores previous caches, and at the end saves the current one 149 | - turns on `BUILDCACHE_DEBUG=2` if not set in environment variable 150 | - will upload debug log if `BUILDCACHE_DEBUG` is not -1 and if `upload_buildcache_log` is true 151 | - zeros cache stats by default after restore, so you get clean stats per-run, `zero_buildcache_stats` can disable it 152 | 153 | ### Things that don't work 154 | 155 | - Direct mode did not work in testing when compiling react-native apps. Dependency files aren't created, but are needed. Direct mode is not enabled. 156 | - `ccache` did not work when compiling react-native apps. It can't handle "multiple source files" so cache misses all the time. 157 | - copying `buildcache` to `clang` and `clang++`, it has to be symbolic links. This means this is not quite a drop-in replacement on windows 158 | 159 | ## Contributing 160 | 161 | If you set up a personal access token on GitHub, then export it as well as a couple other items, the whole thing runs well from a local mac for development. 162 | 163 | ```bash 164 | export GITHUB_TOKEN=PERSONALACCESSTOKENHERE 165 | ``` 166 | 167 | I usually have two terminals open side by side, one with `yarn build-watch` and one to run `yarn test` 168 | 169 | PRs are welcome. This action is new and is in the "works for me" and "works for react-native-firebase" state, so it _is_ useful, but maybe not generic enough to be useful for others yet. 170 | 171 | ## Inspiration + Gratitude 172 | 173 | I work on [react-native-firebase](https://rnfirebase.io) and [FlutterFire](https://github.com/FirebaseExtended/flutterfire/) for [Invertase](https://invertase.io) and they have a truly inspiring dedication to automated testing. I sincerely love it, but...CI is slow for iOS testing! 174 | 175 | I was inspired to try iOS compile acceleration after seeing [Codified](https://getcodified.com/services/) applying ccache with 10-20% improvements to CI Xcode builds, but it wasn't packaged up or redistributable 176 | 177 | I then found [ccache-action](https://github.com/hendrikmuhs/ccache-action) - Henrik has done a great job there! Unfortunately in my testing with react-native projets ccache did not speed things up much because ccache misses cache on "multiple_source_files" compile calls, and that is seemingly all react-native projects do. `ccache-action` was the inspiration for this action though, thanks Hendrik! 178 | 179 | Then I found [buildcache](https://github.com/mbitsnbites/buildcache) and saw with a quick test I could achieve nearly 50% performance improvements 180 | 181 | Combining the motivation to try it, the template of the idea already existing with ccache, and the good performance of buildcache and here we are. 182 | -------------------------------------------------------------------------------- /__tests__/main.test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | import * as process from 'process' 3 | import * as cp from 'child_process' 4 | import * as path from 'path' 5 | import * as rimraf from 'rimraf' 6 | import * as fs from 'fs' 7 | import { getInstallDir } from '../src/lib' 8 | 9 | jest.setTimeout(40000) 10 | 11 | const cachePath = path.join(__dirname, 'runner', 'CACHE') 12 | const tempPath = path.join(__dirname, 'runner', 'TEMP') 13 | const ghWorkspace = path.join(__dirname, 'runner', 'WORKSPACE') 14 | const buildcacheDir = path.join(ghWorkspace, '.buildcache', 'cache') 15 | 16 | // Set temp and tool directories before importing (used to set global state) 17 | process.env['RUNNER_TEMP'] = tempPath 18 | process.env['RUNNER_TOOL_CACHE'] = cachePath 19 | process.env['GITHUB_WORKSPACE'] = ghWorkspace 20 | process.env['BUILDCACHE_DIR'] = buildcacheDir 21 | 22 | beforeEach(() => { 23 | rimraf.sync(cachePath) 24 | rimraf.sync(tempPath) 25 | rimraf.sync(ghWorkspace) 26 | 27 | fs.mkdirSync(ghWorkspace, { recursive: true }) 28 | }) 29 | 30 | // test('downloads latest buildcache', async () => { 31 | // await expect(downloadLatest()).rejects.toThrow('Unable to download') 32 | // }) 33 | 34 | type Input = { [key: string]: string } 35 | 36 | function mapInputToEnv(input: Input): NodeJS.ProcessEnv { 37 | const result: NodeJS.ProcessEnv = {} 38 | for (let key in input) { 39 | result[`INPUT_${key.toUpperCase()}`] = input[key] 40 | } 41 | return result 42 | } 43 | 44 | test('test bundled restore runs', async () => { 45 | const np = process.execPath 46 | 47 | const installDir = await getInstallDir() 48 | const PATH = `${installDir}/buildcache/bin:${process.env['PATH']}` 49 | const options = { 50 | env: { 51 | ...process.env, 52 | PATH, 53 | ...mapInputToEnv({ 54 | buildcache_tag: process.env['ACTION_BUILDCACHE_TAG'] || 'latest' 55 | }) 56 | } 57 | } 58 | 59 | const rp = path.join(__dirname, '..', 'dist', 'restore', 'index.js') 60 | console.log(cp.execFileSync(np, ['--trace-warnings', rp], options).toString()) 61 | 62 | // assert that the binary is in ghWorkspace/buildcache/bin/buildcache 63 | // assert that the symbolic links to clang and clang++ are there 64 | // assert that ghWorkspace/buildcache/bin is in GITHUB_PATH 65 | // assert that config items are in GITHUB_ENV 66 | 67 | const sp = path.join(__dirname, '..', 'dist', 'save', 'index.js') 68 | console.log(cp.execFileSync(np, ['--trace-warnings', sp], options).toString()) 69 | }) 70 | 71 | describe('save cache', () => { 72 | const np = process.execPath 73 | const rp = path.join(__dirname, '..', 'dist', 'restore', 'index.js') 74 | const sp = path.join(__dirname, '..', 'dist', 'save', 'index.js') 75 | let PATH: string 76 | let cc: string 77 | 78 | beforeAll(async () => { 79 | const installDir = await getInstallDir() 80 | PATH = `${installDir}/buildcache/bin:${process.env['PATH']}` 81 | cc = path.join(installDir, 'buildcache', 'bin', 'clang++') 82 | }) 83 | 84 | async function restore(input: Input = {}) { 85 | const options = { 86 | env: { 87 | ...process.env, 88 | PATH, 89 | ...mapInputToEnv(input) 90 | } 91 | } 92 | 93 | const o = cp.execFileSync(np, ['--trace-warnings', rp], options).toString() 94 | console.log(o) 95 | return o 96 | } 97 | 98 | async function save(input: Input = {}) { 99 | const options = { 100 | env: { 101 | ...process.env, 102 | PATH, 103 | ...mapInputToEnv(input) 104 | } 105 | } 106 | 107 | const o = cp.execFileSync(np, ['--trace-warnings', sp], options).toString() 108 | console.log(o) 109 | return o 110 | } 111 | 112 | async function compile(file: string) { 113 | const options = { 114 | env: { 115 | ...process.env, 116 | PATH 117 | }, 118 | cwd: ghWorkspace 119 | } 120 | 121 | const o = cp 122 | .execFileSync(cc, [file, '-c', '-o', `${file}.o`], options) 123 | .toString() 124 | console.log(o) 125 | return o 126 | } 127 | 128 | describe('with new file to compile', () => { 129 | let file: string 130 | 131 | beforeEach(() => { 132 | file = Math.random().toString().substring(2) + '.cc' 133 | fs.writeFileSync(path.join(ghWorkspace, file), 'int main() {}') 134 | }) 135 | 136 | test('it should store cache', async () => { 137 | const input = { 138 | buildcache_tag: process.env['ACTION_BUILDCACHE_TAG'] || 'latest' 139 | } 140 | await restore(input) 141 | await compile(file) 142 | const o = await save() 143 | 144 | expect(o).toMatch(/buildcache: saving cache with key /) 145 | }) 146 | 147 | test('it should not store cache if save_cache is false', async () => { 148 | const input = { 149 | save_cache: 'false', 150 | buildcache_tag: process.env['ACTION_BUILDCACHE_TAG'] || 'latest' 151 | } 152 | await restore(input) 153 | await compile(file) 154 | const o = await save(input) 155 | 156 | expect(o.split('\n')).toContain('buildcache: not saving cache.') 157 | }) 158 | 159 | test('it should not store cache if it is empty', async () => { 160 | const input = { 161 | buildcache_tag: process.env['ACTION_BUILDCACHE_TAG'] || 'latest' 162 | } 163 | await restore(input) 164 | const o = await save() 165 | 166 | expect(o.split('\n')).toContain('buildcache: not saving empty cache.') 167 | }) 168 | 169 | describe('with entries already cached', () => { 170 | beforeEach(async () => { 171 | const input = { 172 | buildcache_tag: process.env['ACTION_BUILDCACHE_TAG'] || 'latest' 173 | } 174 | // add entries to cache 175 | await restore(input) 176 | await compile(file) 177 | await save() 178 | 179 | rimraf.sync(path.join(ghWorkspace, 'buildcache')) 180 | }) 181 | 182 | test('it should not store cache if nothing was added', async () => { 183 | const input = { 184 | zero_buildcache_stats: 'true', 185 | buildcache_tag: process.env['ACTION_BUILDCACHE_TAG'] || 'latest' 186 | } 187 | await restore(input) 188 | await compile(file) 189 | const o = await save() 190 | 191 | expect(o.split('\n')).toContain( 192 | 'buildcache: not saving unmodified cache.' 193 | ) 194 | }) 195 | }) 196 | }) 197 | }) 198 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'buildcache-action' 2 | description: 'GitHub Action that installs and configures buildcache to accelerate compilation' 3 | author: 'Mike Hardy' 4 | inputs: 5 | cache_key: 6 | description: 'An additional string to use in the cache key' 7 | required: false 8 | key: 9 | description: 'deprecated: synonym for `cache_key`, use cache_key. Will be removed in v2' 10 | required: false 11 | save_cache: 12 | description: 'Set to false not to save the cache at the end of the job' 13 | required: false 14 | access_token: 15 | required: false 16 | description: 'Your GitHub Access Token to fetch buildcache latest build, defaults to: {{ github.token }}' 17 | default: '${{ github.token }}' 18 | install_dir: 19 | required: false 20 | description: 'Where to install buildcache, GITHUB_WORKSPACE by default. Will be exported on PATH' 21 | default: '${{ github.workspace }}' 22 | upload_buildcache_log: 23 | required: false 24 | default: false 25 | description: 'If set to true, any buildcache log create during the run will be uploaded as an artifact' 26 | zero_buildcache_stats: 27 | required: false 28 | default: true 29 | description: 'Defaults to true, will print stats on restore, then zero them for run-specific stats on save' 30 | buildcache_tag: 31 | required: false 32 | default: "latest" 33 | description: "Explicitly provide the tag for the release of buildcache to be used. ie. `v0.27.7`" 34 | runs: 35 | using: 'node16' 36 | main: 'dist/restore/index.js' 37 | post: 'dist/save/index.js' 38 | branding: 39 | icon: 'archive' 40 | color: 'gray-dark' 41 | -------------------------------------------------------------------------------- /dist/restore/lib.d.ts: -------------------------------------------------------------------------------- 1 | export interface Stats { 2 | entries: number; 3 | misses: number; 4 | } 5 | export declare function printConfig(): Promise; 6 | export declare function printStats(): Promise; 7 | export declare function zeroStats(): Promise; 8 | export declare function getEnvVar(key: string, defaultValue: string, quiet?: boolean): string; 9 | export declare function getAccessToken(): string; 10 | export declare function getInstallDir(): Promise; 11 | export declare function getCacheDir(): Promise; 12 | export declare function getCacheKeys(): { 13 | base: string; 14 | withInput: string; 15 | unique: string; 16 | }; 17 | -------------------------------------------------------------------------------- /dist/restore/restore.d.ts: -------------------------------------------------------------------------------- 1 | export declare function downloadLatest(accessToken: string): Promise; 2 | export declare function install(sourcePath: string): Promise; 3 | declare function run(): Promise; 4 | export default run; 5 | -------------------------------------------------------------------------------- /dist/restore/save.d.ts: -------------------------------------------------------------------------------- 1 | declare function run(): Promise; 2 | export default run; 3 | -------------------------------------------------------------------------------- /dist/restore/sourcemap-register.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},284:(e,r,n)=>{e=n.nmd(e);var t=n(596).SourceMapConsumer;var o=n(622);var i;try{i=n(747);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(process.version)?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);if(process.stderr._handle&&process.stderr._handle.setBlocking){process.stderr._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);process.exit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var _=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},837:(e,r,n)=>{var t=n(983);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(537);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},740:(e,r,n)=>{var t=n(983);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},226:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(983);var i=n(164);var a=n(837).I;var u=n(215);var s=n(226).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(215);var o=n(983);var i=n(837).I;var a=n(740).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},990:(e,r,n)=>{var t;var o=n(341).h;var i=n(983);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},596:(e,r,n)=>{n(341).h;r.SourceMapConsumer=n(327).SourceMapConsumer;n(990)},747:e=>{"use strict";e.exports=require("fs")},622:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};(()=>{__webpack_require__(284).install()})();module.exports=n})(); -------------------------------------------------------------------------------- /dist/save/lib.d.ts: -------------------------------------------------------------------------------- 1 | export interface Stats { 2 | entries: number; 3 | misses: number; 4 | } 5 | export declare function printConfig(): Promise; 6 | export declare function printStats(): Promise; 7 | export declare function zeroStats(): Promise; 8 | export declare function getEnvVar(key: string, defaultValue: string, quiet?: boolean): string; 9 | export declare function getAccessToken(): string; 10 | export declare function getInstallDir(): Promise; 11 | export declare function getCacheDir(): Promise; 12 | export declare function getCacheKeys(): { 13 | base: string; 14 | withInput: string; 15 | unique: string; 16 | }; 17 | -------------------------------------------------------------------------------- /dist/save/licenses.txt: -------------------------------------------------------------------------------- 1 | @actions/artifact 2 | MIT 3 | The MIT License (MIT) 4 | 5 | Copyright 2019 GitHub 6 | 7 | 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: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | 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. 12 | 13 | @actions/cache 14 | MIT 15 | The MIT License (MIT) 16 | 17 | Copyright 2019 GitHub 18 | 19 | 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: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | 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. 24 | 25 | @actions/core 26 | MIT 27 | The MIT License (MIT) 28 | 29 | Copyright 2019 GitHub 30 | 31 | 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: 32 | 33 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 34 | 35 | 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. 36 | 37 | @actions/exec 38 | MIT 39 | The MIT License (MIT) 40 | 41 | Copyright 2019 GitHub 42 | 43 | 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: 44 | 45 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 46 | 47 | 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. 48 | 49 | @actions/glob 50 | MIT 51 | The MIT License (MIT) 52 | 53 | Copyright 2019 GitHub 54 | 55 | 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: 56 | 57 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 58 | 59 | 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. 60 | 61 | @actions/http-client 62 | MIT 63 | Actions Http Client for Node.js 64 | 65 | Copyright (c) GitHub, Inc. 66 | 67 | All rights reserved. 68 | 69 | MIT License 70 | 71 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 72 | associated documentation files (the "Software"), to deal in the Software without restriction, 73 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 74 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 75 | subject to the following conditions: 76 | 77 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 78 | 79 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 80 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 81 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 82 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 83 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 84 | 85 | 86 | @actions/io 87 | MIT 88 | The MIT License (MIT) 89 | 90 | Copyright 2019 GitHub 91 | 92 | 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: 93 | 94 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 95 | 96 | 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. 97 | 98 | @azure/abort-controller 99 | MIT 100 | The MIT License (MIT) 101 | 102 | Copyright (c) 2020 Microsoft 103 | 104 | Permission is hereby granted, free of charge, to any person obtaining a copy 105 | of this software and associated documentation files (the "Software"), to deal 106 | in the Software without restriction, including without limitation the rights 107 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 108 | copies of the Software, and to permit persons to whom the Software is 109 | furnished to do so, subject to the following conditions: 110 | 111 | The above copyright notice and this permission notice shall be included in all 112 | copies or substantial portions of the Software. 113 | 114 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 115 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 116 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 117 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 118 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 119 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 120 | SOFTWARE. 121 | 122 | 123 | @azure/core-asynciterator-polyfill 124 | MIT 125 | MIT License 126 | 127 | Copyright (c) Microsoft Corporation. All rights reserved. 128 | 129 | Permission is hereby granted, free of charge, to any person obtaining a copy 130 | of this software and associated documentation files (the "Software"), to deal 131 | in the Software without restriction, including without limitation the rights 132 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 133 | copies of the Software, and to permit persons to whom the Software is 134 | furnished to do so, subject to the following conditions: 135 | 136 | The above copyright notice and this permission notice shall be included in all 137 | copies or substantial portions of the Software. 138 | 139 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 140 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 141 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 142 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 143 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 144 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 145 | SOFTWARE 146 | 147 | 148 | @azure/core-auth 149 | MIT 150 | The MIT License (MIT) 151 | 152 | Copyright (c) 2020 Microsoft 153 | 154 | Permission is hereby granted, free of charge, to any person obtaining a copy 155 | of this software and associated documentation files (the "Software"), to deal 156 | in the Software without restriction, including without limitation the rights 157 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 158 | copies of the Software, and to permit persons to whom the Software is 159 | furnished to do so, subject to the following conditions: 160 | 161 | The above copyright notice and this permission notice shall be included in all 162 | copies or substantial portions of the Software. 163 | 164 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 165 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 166 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 167 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 168 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 169 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 170 | SOFTWARE. 171 | 172 | 173 | @azure/core-http 174 | MIT 175 | The MIT License (MIT) 176 | 177 | Copyright (c) 2020 Microsoft 178 | 179 | Permission is hereby granted, free of charge, to any person obtaining a copy 180 | of this software and associated documentation files (the "Software"), to deal 181 | in the Software without restriction, including without limitation the rights 182 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 183 | copies of the Software, and to permit persons to whom the Software is 184 | furnished to do so, subject to the following conditions: 185 | 186 | The above copyright notice and this permission notice shall be included in all 187 | copies or substantial portions of the Software. 188 | 189 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 190 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 191 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 192 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 193 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 194 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 195 | SOFTWARE. 196 | 197 | 198 | @azure/core-lro 199 | MIT 200 | The MIT License (MIT) 201 | 202 | Copyright (c) 2020 Microsoft 203 | 204 | Permission is hereby granted, free of charge, to any person obtaining a copy 205 | of this software and associated documentation files (the "Software"), to deal 206 | in the Software without restriction, including without limitation the rights 207 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 208 | copies of the Software, and to permit persons to whom the Software is 209 | furnished to do so, subject to the following conditions: 210 | 211 | The above copyright notice and this permission notice shall be included in all 212 | copies or substantial portions of the Software. 213 | 214 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 215 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 216 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 217 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 218 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 219 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 220 | SOFTWARE. 221 | 222 | 223 | @azure/core-paging 224 | MIT 225 | The MIT License (MIT) 226 | 227 | Copyright (c) 2020 Microsoft 228 | 229 | Permission is hereby granted, free of charge, to any person obtaining a copy 230 | of this software and associated documentation files (the "Software"), to deal 231 | in the Software without restriction, including without limitation the rights 232 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 233 | copies of the Software, and to permit persons to whom the Software is 234 | furnished to do so, subject to the following conditions: 235 | 236 | The above copyright notice and this permission notice shall be included in all 237 | copies or substantial portions of the Software. 238 | 239 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 240 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 241 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 242 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 243 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 244 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 245 | SOFTWARE. 246 | 247 | 248 | @azure/core-tracing 249 | MIT 250 | The MIT License (MIT) 251 | 252 | Copyright (c) 2020 Microsoft 253 | 254 | Permission is hereby granted, free of charge, to any person obtaining a copy 255 | of this software and associated documentation files (the "Software"), to deal 256 | in the Software without restriction, including without limitation the rights 257 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 258 | copies of the Software, and to permit persons to whom the Software is 259 | furnished to do so, subject to the following conditions: 260 | 261 | The above copyright notice and this permission notice shall be included in all 262 | copies or substantial portions of the Software. 263 | 264 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 265 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 266 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 267 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 268 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 269 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 270 | SOFTWARE. 271 | 272 | 273 | @azure/logger 274 | MIT 275 | The MIT License (MIT) 276 | 277 | Copyright (c) 2020 Microsoft 278 | 279 | Permission is hereby granted, free of charge, to any person obtaining a copy 280 | of this software and associated documentation files (the "Software"), to deal 281 | in the Software without restriction, including without limitation the rights 282 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 283 | copies of the Software, and to permit persons to whom the Software is 284 | furnished to do so, subject to the following conditions: 285 | 286 | The above copyright notice and this permission notice shall be included in all 287 | copies or substantial portions of the Software. 288 | 289 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 290 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 291 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 292 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 293 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 294 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 295 | SOFTWARE. 296 | 297 | 298 | @azure/storage-blob 299 | MIT 300 | The MIT License (MIT) 301 | 302 | Copyright (c) 2020 Microsoft 303 | 304 | Permission is hereby granted, free of charge, to any person obtaining a copy 305 | of this software and associated documentation files (the "Software"), to deal 306 | in the Software without restriction, including without limitation the rights 307 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 308 | copies of the Software, and to permit persons to whom the Software is 309 | furnished to do so, subject to the following conditions: 310 | 311 | The above copyright notice and this permission notice shall be included in all 312 | copies or substantial portions of the Software. 313 | 314 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 315 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 316 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 317 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 318 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 319 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 320 | SOFTWARE. 321 | 322 | 323 | @opentelemetry/api 324 | Apache-2.0 325 | Apache License 326 | Version 2.0, January 2004 327 | http://www.apache.org/licenses/ 328 | 329 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 330 | 331 | 1. Definitions. 332 | 333 | "License" shall mean the terms and conditions for use, reproduction, 334 | and distribution as defined by Sections 1 through 9 of this document. 335 | 336 | "Licensor" shall mean the copyright owner or entity authorized by 337 | the copyright owner that is granting the License. 338 | 339 | "Legal Entity" shall mean the union of the acting entity and all 340 | other entities that control, are controlled by, or are under common 341 | control with that entity. For the purposes of this definition, 342 | "control" means (i) the power, direct or indirect, to cause the 343 | direction or management of such entity, whether by contract or 344 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 345 | outstanding shares, or (iii) beneficial ownership of such entity. 346 | 347 | "You" (or "Your") shall mean an individual or Legal Entity 348 | exercising permissions granted by this License. 349 | 350 | "Source" form shall mean the preferred form for making modifications, 351 | including but not limited to software source code, documentation 352 | source, and configuration files. 353 | 354 | "Object" form shall mean any form resulting from mechanical 355 | transformation or translation of a Source form, including but 356 | not limited to compiled object code, generated documentation, 357 | and conversions to other media types. 358 | 359 | "Work" shall mean the work of authorship, whether in Source or 360 | Object form, made available under the License, as indicated by a 361 | copyright notice that is included in or attached to the work 362 | (an example is provided in the Appendix below). 363 | 364 | "Derivative Works" shall mean any work, whether in Source or Object 365 | form, that is based on (or derived from) the Work and for which the 366 | editorial revisions, annotations, elaborations, or other modifications 367 | represent, as a whole, an original work of authorship. For the purposes 368 | of this License, Derivative Works shall not include works that remain 369 | separable from, or merely link (or bind by name) to the interfaces of, 370 | the Work and Derivative Works thereof. 371 | 372 | "Contribution" shall mean any work of authorship, including 373 | the original version of the Work and any modifications or additions 374 | to that Work or Derivative Works thereof, that is intentionally 375 | submitted to Licensor for inclusion in the Work by the copyright owner 376 | or by an individual or Legal Entity authorized to submit on behalf of 377 | the copyright owner. For the purposes of this definition, "submitted" 378 | means any form of electronic, verbal, or written communication sent 379 | to the Licensor or its representatives, including but not limited to 380 | communication on electronic mailing lists, source code control systems, 381 | and issue tracking systems that are managed by, or on behalf of, the 382 | Licensor for the purpose of discussing and improving the Work, but 383 | excluding communication that is conspicuously marked or otherwise 384 | designated in writing by the copyright owner as "Not a Contribution." 385 | 386 | "Contributor" shall mean Licensor and any individual or Legal Entity 387 | on behalf of whom a Contribution has been received by Licensor and 388 | subsequently incorporated within the Work. 389 | 390 | 2. Grant of Copyright License. Subject to the terms and conditions of 391 | this License, each Contributor hereby grants to You a perpetual, 392 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 393 | copyright license to reproduce, prepare Derivative Works of, 394 | publicly display, publicly perform, sublicense, and distribute the 395 | Work and such Derivative Works in Source or Object form. 396 | 397 | 3. Grant of Patent License. Subject to the terms and conditions of 398 | this License, each Contributor hereby grants to You a perpetual, 399 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 400 | (except as stated in this section) patent license to make, have made, 401 | use, offer to sell, sell, import, and otherwise transfer the Work, 402 | where such license applies only to those patent claims licensable 403 | by such Contributor that are necessarily infringed by their 404 | Contribution(s) alone or by combination of their Contribution(s) 405 | with the Work to which such Contribution(s) was submitted. If You 406 | institute patent litigation against any entity (including a 407 | cross-claim or counterclaim in a lawsuit) alleging that the Work 408 | or a Contribution incorporated within the Work constitutes direct 409 | or contributory patent infringement, then any patent licenses 410 | granted to You under this License for that Work shall terminate 411 | as of the date such litigation is filed. 412 | 413 | 4. Redistribution. You may reproduce and distribute copies of the 414 | Work or Derivative Works thereof in any medium, with or without 415 | modifications, and in Source or Object form, provided that You 416 | meet the following conditions: 417 | 418 | (a) You must give any other recipients of the Work or 419 | Derivative Works a copy of this License; and 420 | 421 | (b) You must cause any modified files to carry prominent notices 422 | stating that You changed the files; and 423 | 424 | (c) You must retain, in the Source form of any Derivative Works 425 | that You distribute, all copyright, patent, trademark, and 426 | attribution notices from the Source form of the Work, 427 | excluding those notices that do not pertain to any part of 428 | the Derivative Works; and 429 | 430 | (d) If the Work includes a "NOTICE" text file as part of its 431 | distribution, then any Derivative Works that You distribute must 432 | include a readable copy of the attribution notices contained 433 | within such NOTICE file, excluding those notices that do not 434 | pertain to any part of the Derivative Works, in at least one 435 | of the following places: within a NOTICE text file distributed 436 | as part of the Derivative Works; within the Source form or 437 | documentation, if provided along with the Derivative Works; or, 438 | within a display generated by the Derivative Works, if and 439 | wherever such third-party notices normally appear. The contents 440 | of the NOTICE file are for informational purposes only and 441 | do not modify the License. You may add Your own attribution 442 | notices within Derivative Works that You distribute, alongside 443 | or as an addendum to the NOTICE text from the Work, provided 444 | that such additional attribution notices cannot be construed 445 | as modifying the License. 446 | 447 | You may add Your own copyright statement to Your modifications and 448 | may provide additional or different license terms and conditions 449 | for use, reproduction, or distribution of Your modifications, or 450 | for any such Derivative Works as a whole, provided Your use, 451 | reproduction, and distribution of the Work otherwise complies with 452 | the conditions stated in this License. 453 | 454 | 5. Submission of Contributions. Unless You explicitly state otherwise, 455 | any Contribution intentionally submitted for inclusion in the Work 456 | by You to the Licensor shall be under the terms and conditions of 457 | this License, without any additional terms or conditions. 458 | Notwithstanding the above, nothing herein shall supersede or modify 459 | the terms of any separate license agreement you may have executed 460 | with Licensor regarding such Contributions. 461 | 462 | 6. Trademarks. This License does not grant permission to use the trade 463 | names, trademarks, service marks, or product names of the Licensor, 464 | except as required for reasonable and customary use in describing the 465 | origin of the Work and reproducing the content of the NOTICE file. 466 | 467 | 7. Disclaimer of Warranty. Unless required by applicable law or 468 | agreed to in writing, Licensor provides the Work (and each 469 | Contributor provides its Contributions) on an "AS IS" BASIS, 470 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 471 | implied, including, without limitation, any warranties or conditions 472 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 473 | PARTICULAR PURPOSE. You are solely responsible for determining the 474 | appropriateness of using or redistributing the Work and assume any 475 | risks associated with Your exercise of permissions under this License. 476 | 477 | 8. Limitation of Liability. In no event and under no legal theory, 478 | whether in tort (including negligence), contract, or otherwise, 479 | unless required by applicable law (such as deliberate and grossly 480 | negligent acts) or agreed to in writing, shall any Contributor be 481 | liable to You for damages, including any direct, indirect, special, 482 | incidental, or consequential damages of any character arising as a 483 | result of this License or out of the use or inability to use the 484 | Work (including but not limited to damages for loss of goodwill, 485 | work stoppage, computer failure or malfunction, or any and all 486 | other commercial damages or losses), even if such Contributor 487 | has been advised of the possibility of such damages. 488 | 489 | 9. Accepting Warranty or Additional Liability. While redistributing 490 | the Work or Derivative Works thereof, You may choose to offer, 491 | and charge a fee for, acceptance of support, warranty, indemnity, 492 | or other liability obligations and/or rights consistent with this 493 | License. However, in accepting such obligations, You may act only 494 | on Your own behalf and on Your sole responsibility, not on behalf 495 | of any other Contributor, and only if You agree to indemnify, 496 | defend, and hold each Contributor harmless for any liability 497 | incurred by, or claims asserted against, such Contributor by reason 498 | of your accepting any such warranty or additional liability. 499 | 500 | END OF TERMS AND CONDITIONS 501 | 502 | APPENDIX: How to apply the Apache License to your work. 503 | 504 | To apply the Apache License to your work, attach the following 505 | boilerplate notice, with the fields enclosed by brackets "[]" 506 | replaced with your own identifying information. (Don't include 507 | the brackets!) The text should be enclosed in the appropriate 508 | comment syntax for the file format. We also recommend that a 509 | file or class name and description of purpose be included on the 510 | same "printed page" as the copyright notice for easier 511 | identification within third-party archives. 512 | 513 | Copyright [yyyy] [name of copyright owner] 514 | 515 | Licensed under the Apache License, Version 2.0 (the "License"); 516 | you may not use this file except in compliance with the License. 517 | You may obtain a copy of the License at 518 | 519 | http://www.apache.org/licenses/LICENSE-2.0 520 | 521 | Unless required by applicable law or agreed to in writing, software 522 | distributed under the License is distributed on an "AS IS" BASIS, 523 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 524 | See the License for the specific language governing permissions and 525 | limitations under the License. 526 | 527 | 528 | @vercel/ncc 529 | MIT 530 | Copyright 2018 ZEIT, Inc. 531 | 532 | 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: 533 | 534 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 535 | 536 | 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. 537 | 538 | asynckit 539 | MIT 540 | The MIT License (MIT) 541 | 542 | Copyright (c) 2016 Alex Indigo 543 | 544 | Permission is hereby granted, free of charge, to any person obtaining a copy 545 | of this software and associated documentation files (the "Software"), to deal 546 | in the Software without restriction, including without limitation the rights 547 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 548 | copies of the Software, and to permit persons to whom the Software is 549 | furnished to do so, subject to the following conditions: 550 | 551 | The above copyright notice and this permission notice shall be included in all 552 | copies or substantial portions of the Software. 553 | 554 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 555 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 556 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 557 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 558 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 559 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 560 | SOFTWARE. 561 | 562 | 563 | balanced-match 564 | MIT 565 | (MIT) 566 | 567 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 568 | 569 | Permission is hereby granted, free of charge, to any person obtaining a copy of 570 | this software and associated documentation files (the "Software"), to deal in 571 | the Software without restriction, including without limitation the rights to 572 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 573 | of the Software, and to permit persons to whom the Software is furnished to do 574 | so, subject to the following conditions: 575 | 576 | The above copyright notice and this permission notice shall be included in all 577 | copies or substantial portions of the Software. 578 | 579 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 580 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 581 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 582 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 583 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 584 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 585 | SOFTWARE. 586 | 587 | 588 | brace-expansion 589 | MIT 590 | MIT License 591 | 592 | Copyright (c) 2013 Julian Gruber 593 | 594 | Permission is hereby granted, free of charge, to any person obtaining a copy 595 | of this software and associated documentation files (the "Software"), to deal 596 | in the Software without restriction, including without limitation the rights 597 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 598 | copies of the Software, and to permit persons to whom the Software is 599 | furnished to do so, subject to the following conditions: 600 | 601 | The above copyright notice and this permission notice shall be included in all 602 | copies or substantial portions of the Software. 603 | 604 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 605 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 606 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 607 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 608 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 609 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 610 | SOFTWARE. 611 | 612 | 613 | combined-stream 614 | MIT 615 | Copyright (c) 2011 Debuggable Limited 616 | 617 | Permission is hereby granted, free of charge, to any person obtaining a copy 618 | of this software and associated documentation files (the "Software"), to deal 619 | in the Software without restriction, including without limitation the rights 620 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 621 | copies of the Software, and to permit persons to whom the Software is 622 | furnished to do so, subject to the following conditions: 623 | 624 | The above copyright notice and this permission notice shall be included in 625 | all copies or substantial portions of the Software. 626 | 627 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 628 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 629 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 630 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 631 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 632 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 633 | THE SOFTWARE. 634 | 635 | 636 | concat-map 637 | MIT 638 | This software is released under the MIT license: 639 | 640 | Permission is hereby granted, free of charge, to any person obtaining a copy of 641 | this software and associated documentation files (the "Software"), to deal in 642 | the Software without restriction, including without limitation the rights to 643 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 644 | the Software, and to permit persons to whom the Software is furnished to do so, 645 | subject to the following conditions: 646 | 647 | The above copyright notice and this permission notice shall be included in all 648 | copies or substantial portions of the Software. 649 | 650 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 651 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 652 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 653 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 654 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 655 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 656 | 657 | 658 | delayed-stream 659 | MIT 660 | Copyright (c) 2011 Debuggable Limited 661 | 662 | Permission is hereby granted, free of charge, to any person obtaining a copy 663 | of this software and associated documentation files (the "Software"), to deal 664 | in the Software without restriction, including without limitation the rights 665 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 666 | copies of the Software, and to permit persons to whom the Software is 667 | furnished to do so, subject to the following conditions: 668 | 669 | The above copyright notice and this permission notice shall be included in 670 | all copies or substantial portions of the Software. 671 | 672 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 673 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 674 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 675 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 676 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 677 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 678 | THE SOFTWARE. 679 | 680 | 681 | form-data 682 | MIT 683 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 684 | 685 | Permission is hereby granted, free of charge, to any person obtaining a copy 686 | of this software and associated documentation files (the "Software"), to deal 687 | in the Software without restriction, including without limitation the rights 688 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 689 | copies of the Software, and to permit persons to whom the Software is 690 | furnished to do so, subject to the following conditions: 691 | 692 | The above copyright notice and this permission notice shall be included in 693 | all copies or substantial portions of the Software. 694 | 695 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 696 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 697 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 698 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 699 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 700 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 701 | THE SOFTWARE. 702 | 703 | 704 | fs.realpath 705 | ISC 706 | The ISC License 707 | 708 | Copyright (c) Isaac Z. Schlueter and Contributors 709 | 710 | Permission to use, copy, modify, and/or distribute this software for any 711 | purpose with or without fee is hereby granted, provided that the above 712 | copyright notice and this permission notice appear in all copies. 713 | 714 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 715 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 716 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 717 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 718 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 719 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 720 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 721 | 722 | ---- 723 | 724 | This library bundles a version of the `fs.realpath` and `fs.realpathSync` 725 | methods from Node.js v0.10 under the terms of the Node.js MIT license. 726 | 727 | Node's license follows, also included at the header of `old.js` which contains 728 | the licensed code: 729 | 730 | Copyright Joyent, Inc. and other Node contributors. 731 | 732 | Permission is hereby granted, free of charge, to any person obtaining a 733 | copy of this software and associated documentation files (the "Software"), 734 | to deal in the Software without restriction, including without limitation 735 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 736 | and/or sell copies of the Software, and to permit persons to whom the 737 | Software is furnished to do so, subject to the following conditions: 738 | 739 | The above copyright notice and this permission notice shall be included in 740 | all copies or substantial portions of the Software. 741 | 742 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 743 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 744 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 745 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 746 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 747 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 748 | DEALINGS IN THE SOFTWARE. 749 | 750 | 751 | glob 752 | ISC 753 | The ISC License 754 | 755 | Copyright (c) Isaac Z. Schlueter and Contributors 756 | 757 | Permission to use, copy, modify, and/or distribute this software for any 758 | purpose with or without fee is hereby granted, provided that the above 759 | copyright notice and this permission notice appear in all copies. 760 | 761 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 762 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 763 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 764 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 765 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 766 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 767 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 768 | 769 | ## Glob Logo 770 | 771 | Glob's logo created by Tanya Brassie , licensed 772 | under a Creative Commons Attribution-ShareAlike 4.0 International License 773 | https://creativecommons.org/licenses/by-sa/4.0/ 774 | 775 | 776 | inflight 777 | ISC 778 | The ISC License 779 | 780 | Copyright (c) Isaac Z. Schlueter 781 | 782 | Permission to use, copy, modify, and/or distribute this software for any 783 | purpose with or without fee is hereby granted, provided that the above 784 | copyright notice and this permission notice appear in all copies. 785 | 786 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 787 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 788 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 789 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 790 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 791 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 792 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 793 | 794 | 795 | inherits 796 | ISC 797 | The ISC License 798 | 799 | Copyright (c) Isaac Z. Schlueter 800 | 801 | Permission to use, copy, modify, and/or distribute this software for any 802 | purpose with or without fee is hereby granted, provided that the above 803 | copyright notice and this permission notice appear in all copies. 804 | 805 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 806 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 807 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 808 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 809 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 810 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 811 | PERFORMANCE OF THIS SOFTWARE. 812 | 813 | 814 | 815 | mime-db 816 | MIT 817 | 818 | The MIT License (MIT) 819 | 820 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 821 | 822 | Permission is hereby granted, free of charge, to any person obtaining a copy 823 | of this software and associated documentation files (the "Software"), to deal 824 | in the Software without restriction, including without limitation the rights 825 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 826 | copies of the Software, and to permit persons to whom the Software is 827 | furnished to do so, subject to the following conditions: 828 | 829 | The above copyright notice and this permission notice shall be included in 830 | all copies or substantial portions of the Software. 831 | 832 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 833 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 834 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 835 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 836 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 837 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 838 | THE SOFTWARE. 839 | 840 | 841 | mime-types 842 | MIT 843 | (The MIT License) 844 | 845 | Copyright (c) 2014 Jonathan Ong 846 | Copyright (c) 2015 Douglas Christopher Wilson 847 | 848 | Permission is hereby granted, free of charge, to any person obtaining 849 | a copy of this software and associated documentation files (the 850 | 'Software'), to deal in the Software without restriction, including 851 | without limitation the rights to use, copy, modify, merge, publish, 852 | distribute, sublicense, and/or sell copies of the Software, and to 853 | permit persons to whom the Software is furnished to do so, subject to 854 | the following conditions: 855 | 856 | The above copyright notice and this permission notice shall be 857 | included in all copies or substantial portions of the Software. 858 | 859 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 860 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 861 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 862 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 863 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 864 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 865 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 866 | 867 | 868 | minimatch 869 | ISC 870 | The ISC License 871 | 872 | Copyright (c) Isaac Z. Schlueter and Contributors 873 | 874 | Permission to use, copy, modify, and/or distribute this software for any 875 | purpose with or without fee is hereby granted, provided that the above 876 | copyright notice and this permission notice appear in all copies. 877 | 878 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 879 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 880 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 881 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 882 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 883 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 884 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 885 | 886 | 887 | node-fetch 888 | MIT 889 | The MIT License (MIT) 890 | 891 | Copyright (c) 2016 David Frank 892 | 893 | Permission is hereby granted, free of charge, to any person obtaining a copy 894 | of this software and associated documentation files (the "Software"), to deal 895 | in the Software without restriction, including without limitation the rights 896 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 897 | copies of the Software, and to permit persons to whom the Software is 898 | furnished to do so, subject to the following conditions: 899 | 900 | The above copyright notice and this permission notice shall be included in all 901 | copies or substantial portions of the Software. 902 | 903 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 904 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 905 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 906 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 907 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 908 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 909 | SOFTWARE. 910 | 911 | 912 | 913 | once 914 | ISC 915 | The ISC License 916 | 917 | Copyright (c) Isaac Z. Schlueter and Contributors 918 | 919 | Permission to use, copy, modify, and/or distribute this software for any 920 | purpose with or without fee is hereby granted, provided that the above 921 | copyright notice and this permission notice appear in all copies. 922 | 923 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 924 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 925 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 926 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 927 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 928 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 929 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 930 | 931 | 932 | path-is-absolute 933 | MIT 934 | The MIT License (MIT) 935 | 936 | Copyright (c) Sindre Sorhus (sindresorhus.com) 937 | 938 | Permission is hereby granted, free of charge, to any person obtaining a copy 939 | of this software and associated documentation files (the "Software"), to deal 940 | in the Software without restriction, including without limitation the rights 941 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 942 | copies of the Software, and to permit persons to whom the Software is 943 | furnished to do so, subject to the following conditions: 944 | 945 | The above copyright notice and this permission notice shall be included in 946 | all copies or substantial portions of the Software. 947 | 948 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 949 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 950 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 951 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 952 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 953 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 954 | THE SOFTWARE. 955 | 956 | 957 | psl 958 | MIT 959 | The MIT License (MIT) 960 | 961 | Copyright (c) 2017 Lupo Montero lupomontero@gmail.com 962 | 963 | 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: 964 | 965 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 966 | 967 | 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. 968 | 969 | 970 | rimraf 971 | ISC 972 | The ISC License 973 | 974 | Copyright (c) Isaac Z. Schlueter and Contributors 975 | 976 | Permission to use, copy, modify, and/or distribute this software for any 977 | purpose with or without fee is hereby granted, provided that the above 978 | copyright notice and this permission notice appear in all copies. 979 | 980 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 981 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 982 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 983 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 984 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 985 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 986 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 987 | 988 | 989 | sax 990 | ISC 991 | The ISC License 992 | 993 | Copyright (c) Isaac Z. Schlueter and Contributors 994 | 995 | Permission to use, copy, modify, and/or distribute this software for any 996 | purpose with or without fee is hereby granted, provided that the above 997 | copyright notice and this permission notice appear in all copies. 998 | 999 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1000 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1001 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1002 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1003 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1004 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 1005 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1006 | 1007 | ==== 1008 | 1009 | `String.fromCodePoint` by Mathias Bynens used according to terms of MIT 1010 | License, as follows: 1011 | 1012 | Copyright Mathias Bynens 1013 | 1014 | Permission is hereby granted, free of charge, to any person obtaining 1015 | a copy of this software and associated documentation files (the 1016 | "Software"), to deal in the Software without restriction, including 1017 | without limitation the rights to use, copy, modify, merge, publish, 1018 | distribute, sublicense, and/or sell copies of the Software, and to 1019 | permit persons to whom the Software is furnished to do so, subject to 1020 | the following conditions: 1021 | 1022 | The above copyright notice and this permission notice shall be 1023 | included in all copies or substantial portions of the Software. 1024 | 1025 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1026 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1027 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1028 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 1029 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 1030 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 1031 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1032 | 1033 | 1034 | semver 1035 | ISC 1036 | The ISC License 1037 | 1038 | Copyright (c) Isaac Z. Schlueter and Contributors 1039 | 1040 | Permission to use, copy, modify, and/or distribute this software for any 1041 | purpose with or without fee is hereby granted, provided that the above 1042 | copyright notice and this permission notice appear in all copies. 1043 | 1044 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1045 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1046 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1047 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1048 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1049 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 1050 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1051 | 1052 | 1053 | tmp 1054 | MIT 1055 | The MIT License (MIT) 1056 | 1057 | Copyright (c) 2014 KARASZI István 1058 | 1059 | Permission is hereby granted, free of charge, to any person obtaining a copy 1060 | of this software and associated documentation files (the "Software"), to deal 1061 | in the Software without restriction, including without limitation the rights 1062 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1063 | copies of the Software, and to permit persons to whom the Software is 1064 | furnished to do so, subject to the following conditions: 1065 | 1066 | The above copyright notice and this permission notice shall be included in all 1067 | copies or substantial portions of the Software. 1068 | 1069 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1070 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1071 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1072 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1073 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1074 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1075 | SOFTWARE. 1076 | 1077 | 1078 | tmp-promise 1079 | MIT 1080 | 1081 | tough-cookie 1082 | BSD-3-Clause 1083 | Copyright (c) 2015, Salesforce.com, Inc. 1084 | All rights reserved. 1085 | 1086 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1087 | 1088 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1089 | 1090 | 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. 1091 | 1092 | 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. 1093 | 1094 | 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. 1095 | 1096 | 1097 | tr46 1098 | MIT 1099 | 1100 | tslib 1101 | 0BSD 1102 | Copyright (c) Microsoft Corporation. 1103 | 1104 | Permission to use, copy, modify, and/or distribute this software for any 1105 | purpose with or without fee is hereby granted. 1106 | 1107 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 1108 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1109 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 1110 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 1111 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 1112 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 1113 | PERFORMANCE OF THIS SOFTWARE. 1114 | 1115 | tunnel 1116 | MIT 1117 | The MIT License (MIT) 1118 | 1119 | Copyright (c) 2012 Koichi Kobayashi 1120 | 1121 | Permission is hereby granted, free of charge, to any person obtaining a copy 1122 | of this software and associated documentation files (the "Software"), to deal 1123 | in the Software without restriction, including without limitation the rights 1124 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1125 | copies of the Software, and to permit persons to whom the Software is 1126 | furnished to do so, subject to the following conditions: 1127 | 1128 | The above copyright notice and this permission notice shall be included in 1129 | all copies or substantial portions of the Software. 1130 | 1131 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1132 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1133 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1134 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1135 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1136 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1137 | THE SOFTWARE. 1138 | 1139 | 1140 | universalify 1141 | MIT 1142 | (The MIT License) 1143 | 1144 | Copyright (c) 2017, Ryan Zimmerman 1145 | 1146 | Permission is hereby granted, free of charge, to any person obtaining a copy of 1147 | this software and associated documentation files (the 'Software'), to deal in 1148 | the Software without restriction, including without limitation the rights to 1149 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 1150 | the Software, and to permit persons to whom the Software is furnished to do so, 1151 | subject to the following conditions: 1152 | 1153 | The above copyright notice and this permission notice shall be included in all 1154 | copies or substantial portions of the Software. 1155 | 1156 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1157 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 1158 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 1159 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 1160 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1161 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1162 | 1163 | 1164 | uuid 1165 | MIT 1166 | The MIT License (MIT) 1167 | 1168 | Copyright (c) 2010-2020 Robert Kieffer and other contributors 1169 | 1170 | 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: 1171 | 1172 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 1173 | 1174 | 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. 1175 | 1176 | 1177 | webidl-conversions 1178 | BSD-2-Clause 1179 | # The BSD 2-Clause License 1180 | 1181 | Copyright (c) 2014, Domenic Denicola 1182 | All rights reserved. 1183 | 1184 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1185 | 1186 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1187 | 1188 | 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. 1189 | 1190 | 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. 1191 | 1192 | 1193 | whatwg-url 1194 | MIT 1195 | The MIT License (MIT) 1196 | 1197 | Copyright (c) 2015–2016 Sebastian Mayr 1198 | 1199 | Permission is hereby granted, free of charge, to any person obtaining a copy 1200 | of this software and associated documentation files (the "Software"), to deal 1201 | in the Software without restriction, including without limitation the rights 1202 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1203 | copies of the Software, and to permit persons to whom the Software is 1204 | furnished to do so, subject to the following conditions: 1205 | 1206 | The above copyright notice and this permission notice shall be included in 1207 | all copies or substantial portions of the Software. 1208 | 1209 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1210 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1211 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1212 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1213 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1214 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1215 | THE SOFTWARE. 1216 | 1217 | 1218 | wrappy 1219 | ISC 1220 | The ISC License 1221 | 1222 | Copyright (c) Isaac Z. Schlueter and Contributors 1223 | 1224 | Permission to use, copy, modify, and/or distribute this software for any 1225 | purpose with or without fee is hereby granted, provided that the above 1226 | copyright notice and this permission notice appear in all copies. 1227 | 1228 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1229 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1230 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1231 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1232 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1233 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 1234 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1235 | 1236 | 1237 | xml2js 1238 | MIT 1239 | Copyright 2010, 2011, 2012, 2013. All rights reserved. 1240 | 1241 | Permission is hereby granted, free of charge, to any person obtaining a copy 1242 | of this software and associated documentation files (the "Software"), to 1243 | deal in the Software without restriction, including without limitation the 1244 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 1245 | sell copies of the Software, and to permit persons to whom the Software is 1246 | furnished to do so, subject to the following conditions: 1247 | 1248 | The above copyright notice and this permission notice shall be included in 1249 | all copies or substantial portions of the Software. 1250 | 1251 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1252 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1253 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1254 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1255 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1256 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 1257 | IN THE SOFTWARE. 1258 | 1259 | 1260 | xmlbuilder 1261 | MIT 1262 | The MIT License (MIT) 1263 | 1264 | Copyright (c) 2013 Ozgur Ozcitak 1265 | 1266 | Permission is hereby granted, free of charge, to any person obtaining a copy 1267 | of this software and associated documentation files (the "Software"), to deal 1268 | in the Software without restriction, including without limitation the rights 1269 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1270 | copies of the Software, and to permit persons to whom the Software is 1271 | furnished to do so, subject to the following conditions: 1272 | 1273 | The above copyright notice and this permission notice shall be included in 1274 | all copies or substantial portions of the Software. 1275 | 1276 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1277 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1278 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1279 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1280 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1281 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1282 | THE SOFTWARE. 1283 | -------------------------------------------------------------------------------- /dist/save/restore.d.ts: -------------------------------------------------------------------------------- 1 | export declare function downloadLatest(accessToken: string): Promise; 2 | export declare function install(sourcePath: string): Promise; 3 | declare function run(): Promise; 4 | export default run; 5 | -------------------------------------------------------------------------------- /dist/save/save.d.ts: -------------------------------------------------------------------------------- 1 | declare function run(): Promise; 2 | export default run; 3 | -------------------------------------------------------------------------------- /dist/save/sourcemap-register.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},284:(e,r,n)=>{e=n.nmd(e);var t=n(596).SourceMapConsumer;var o=n(622);var i;try{i=n(747);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(process.version)?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);if(process.stderr._handle&&process.stderr._handle.setBlocking){process.stderr._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);process.exit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var _=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},837:(e,r,n)=>{var t=n(983);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(537);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},740:(e,r,n)=>{var t=n(983);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},226:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(983);var i=n(164);var a=n(837).I;var u=n(215);var s=n(226).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(215);var o=n(983);var i=n(837).I;var a=n(740).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},990:(e,r,n)=>{var t;var o=n(341).h;var i=n(983);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},596:(e,r,n)=>{n(341).h;r.SourceMapConsumer=n(327).SourceMapConsumer;n(990)},747:e=>{"use strict";e.exports=require("fs")},622:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};(()=>{__webpack_require__(284).install()})();module.exports=n})(); -------------------------------------------------------------------------------- /docs/Buildcache_Example_Improvement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehardy/buildcache-action/a50b89d53bb0a8da7b8d4c69f0bc0f0527b7b5c6/docs/Buildcache_Example_Improvement.png -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testEnvironment: 'node', 5 | testMatch: ['**/*.test.ts'], 6 | testRunner: 'jest-circus/runner', 7 | transform: { 8 | '^.+\\.ts$': 'ts-jest' 9 | }, 10 | verbose: true 11 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "buildcache-action", 3 | "version": "1.2.2", 4 | "private": false, 5 | "description": "GitHub Action that installs and configures buildcache to accelerate compilation", 6 | "main": "dist/restore/index.js", 7 | "scripts": { 8 | "build": "tsc", 9 | "build-watch": "tsc-watch --onSuccess \"yarn package\"", 10 | "clean": "yarn rimraf __tests__/runner ./dist ./lib ./demo", 11 | "format": "prettier --write **/*.ts", 12 | "format-check": "prettier --check **/*.ts", 13 | "lint": "eslint src/**/*.ts", 14 | "package-file": "ncc build --target es2020 --source-map --license licenses.txt -o", 15 | "package-restore": "yarn package-file dist/restore src/restore.ts", 16 | "package-save": "yarn package-file dist/save src/save.ts", 17 | "package": "yarn package-restore && yarn package-save", 18 | "test": "jest", 19 | "test-watch": "jest --watch", 20 | "all": "yarn build && yarn format-check && yarn lint && yarn package && yarn test", 21 | "shipit": "npx semantic-release", 22 | "move-v2-tag": "git tag -d v2 && git push origin :refs/tags/v2 && git tag v2 && git push --tags" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "git+https://github.com/mikehardy/buildcache-action.git" 27 | }, 28 | "keywords": [ 29 | "actions", 30 | "node", 31 | "build", 32 | "compile", 33 | "cache", 34 | "buildcache" 35 | ], 36 | "author": "Mike Hardy ", 37 | "license": "MIT", 38 | "dependencies": { 39 | "@actions/artifact": "^1.1.1", 40 | "@actions/cache": "^3.2.1", 41 | "@actions/core": "^1.10.0", 42 | "@actions/exec": "^1.1.1", 43 | "@actions/github": "^5.1.1", 44 | "@actions/tool-cache": "^2.0.1" 45 | }, 46 | "devDependencies": { 47 | "@semantic-release/changelog": "^6.0.0", 48 | "@types/jest": "^27.0.2", 49 | "@types/node": "^16.10.2", 50 | "@types/rimraf": "^3.0.2", 51 | "@typescript-eslint/parser": "^4.32.0", 52 | "@vercel/ncc": "^0.31.1", 53 | "conventional-changelog-conventionalcommits": "^5.0.0", 54 | "eslint": "^7.32.0", 55 | "eslint-plugin-github": "^4.3.0", 56 | "eslint-plugin-jest": "^24.5.0", 57 | "eslint-plugin-prettier": "^4.0.0", 58 | "jest": "^27.2.4", 59 | "jest-circus": "^27.2.4", 60 | "js-yaml": "^4.1.0", 61 | "np": "^7.5.0", 62 | "prettier": "2.4.1", 63 | "rimraf": "^3.0.2", 64 | "semantic-release": "^18.0.0", 65 | "ts-jest": "^27.0.5", 66 | "tsc-watch": "^4.5.0", 67 | "typescript": "^4.4.3" 68 | }, 69 | "engines": { 70 | "node": ">=14.17.0" 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/lib.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as exec from '@actions/exec' 3 | import * as io from '@actions/io' 4 | import * as path from 'path' 5 | 6 | export interface Stats { 7 | entries: number 8 | misses: number 9 | } 10 | 11 | async function execBuildCacheWithoutImpersonation( 12 | arg: string, 13 | options?: {} 14 | ): Promise { 15 | const env = { ...process.env } as exec.ExecOptions['env'] 16 | delete env?.BUILDCACHE_IMPERSONATE 17 | await exec.exec('buildcache', [arg], { ...options, env }) 18 | } 19 | 20 | export async function printConfig(): Promise { 21 | await execBuildCacheWithoutImpersonation('-c') 22 | } 23 | 24 | export async function printStats(): Promise { 25 | let output = '' 26 | await execBuildCacheWithoutImpersonation('-s', { 27 | listeners: { 28 | stdout: (data: Buffer) => { 29 | output += data.toString() 30 | } 31 | } 32 | }) 33 | 34 | const get = (name: string, def: string): string => { 35 | return output.match(RegExp(`^ ${name}:\\s*(\\d+)$`, 'm'))?.[1] || def 36 | } 37 | 38 | return { 39 | entries: parseInt(get(`Entries in cache`, '-1')), 40 | misses: parseInt(get(`Misses`, '-1')) 41 | } 42 | } 43 | 44 | export async function zeroStats(): Promise { 45 | await execBuildCacheWithoutImpersonation('-z') 46 | } 47 | 48 | export function getEnvVar( 49 | key: string, 50 | defaultValue: string, 51 | quiet = false 52 | ): string { 53 | if (!quiet) { 54 | core.debug(`buildcache: getEnvVar value of ${key}? '${process.env[key]}'`) 55 | } 56 | return process.env[key] ?? defaultValue 57 | } 58 | 59 | // returns the current access token or fails if undefined 60 | export function getAccessToken(): string { 61 | // Attempt to take GITHUB_TOKEN from env first, otherwise take action.yaml key 62 | const githubToken = getEnvVar( 63 | 'GITHUB_TOKEN', 64 | core.getInput('access_token'), 65 | true 66 | ) 67 | if (!githubToken || githubToken === '') { 68 | throw new Error( 69 | 'GITHUB_TOKEN environment variable or access_token action parameter must be provided' 70 | ) 71 | } 72 | return githubToken 73 | } 74 | 75 | export async function getInstallDir(): Promise { 76 | let installDir = core.getInput('install_dir') 77 | if (!installDir || installDir === '') { 78 | installDir = getEnvVar('GITHUB_WORKSPACE', '') 79 | } 80 | if (!installDir || installDir === '') { 81 | throw new Error('install_dir not specified or empty') 82 | } 83 | await io.mkdirP(installDir) 84 | return installDir 85 | } 86 | 87 | export async function getCacheDir(): Promise { 88 | return path.resolve( 89 | await getInstallDir(), 90 | getEnvVar('BUILDCACHE_DIR', '.buildcache') 91 | ) 92 | } 93 | 94 | export function getCacheKeys(): { 95 | base: string 96 | withInput: string 97 | unique: string 98 | } { 99 | const base = 'buildcache' 100 | 101 | // TODO - remove `key` here and from action.yaml in v2, deprecated as of v1.1.1 102 | const inputKey = core.getInput('cache_key') ?? core.getInput('key') 103 | let withInput = base 104 | if (inputKey) { 105 | withInput = `${base}-${inputKey}` 106 | } 107 | 108 | // Key generation is important. Always specify a unique primary key to github because caches are immutable. 109 | // A unique primary key means a new cache with updated contents will be saved for future runs. 110 | // But specifying a good base restore key means a previous cache will be restored as fallback 111 | // https://github.com/actions/cache/issues/342#issuecomment-673371329 112 | const unique = `${withInput}-${new Date().toISOString()}` 113 | 114 | return { 115 | base, 116 | withInput, 117 | unique 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /src/restore.ts: -------------------------------------------------------------------------------- 1 | import * as cache from '@actions/cache' 2 | import * as core from '@actions/core' 3 | import * as exec from '@actions/exec' 4 | import * as github from '@actions/github' 5 | import * as io from '@actions/io' 6 | import * as path from 'path' 7 | import * as toolcache from '@actions/tool-cache' 8 | 9 | import { 10 | getAccessToken, 11 | getCacheDir, 12 | getCacheKeys, 13 | getEnvVar, 14 | getInstallDir, 15 | printConfig, 16 | printStats, 17 | zeroStats 18 | } from './lib' 19 | 20 | // Downloads the latest buildcache release for this OS 21 | // accessToken is a valid github token to access APIs 22 | // returns path to the downloaded file 23 | export async function downloadLatest(accessToken: string): Promise { 24 | // Determine correct file name 25 | let filename = 'buildcache-macos.zip' // our default 26 | switch (process.platform) { 27 | case 'win32': 28 | filename = 'buildcache-windows.zip' 29 | break 30 | case 'linux': 31 | filename = 'buildcache-linux.tar.gz' 32 | break 33 | } 34 | core.info(`buildcache: release file based on runner os is ${filename}`) 35 | 36 | // Grab the releases page for the for the buildcache project 37 | const octokit = github.getOctokit(accessToken) 38 | 39 | // Should we get the latest, or has the user provided a tag? 40 | const buildcacheTag = core.getInput('buildcache_tag') 41 | let releaseInfo 42 | if (!buildcacheTag || buildcacheTag.toLowerCase() === 'latest') { 43 | releaseInfo = await octokit.rest.repos.getLatestRelease({ 44 | owner: 'mbitsnbites', 45 | repo: 'buildcache' 46 | }) 47 | } else { 48 | releaseInfo = await octokit.rest.repos.getReleaseByTag({ 49 | owner: 'mbitsnbites', 50 | repo: 'buildcache', 51 | tag: buildcacheTag 52 | }) 53 | if (!releaseInfo) { 54 | throw new Error( 55 | `Unable to find a buildcache release with tag '${buildcacheTag}'` 56 | ) 57 | } 58 | } 59 | 60 | // core.info(`Got release info: ${JSON.stringify(releaseInfo, null, 2)}`) 61 | const buildCacheReleaseUrl = `https://github.com/mbitsnbites/buildcache/releases/download/${releaseInfo.data.tag_name}/${filename}` 62 | 63 | if (!buildCacheReleaseUrl) { 64 | throw new Error('Unable to determine release URL for buildcache') 65 | } 66 | core.info(`buildcache: installing from ${buildCacheReleaseUrl}`) 67 | const buildcacheReleasePath = await toolcache.downloadTool( 68 | buildCacheReleaseUrl 69 | ) 70 | core.info(`buildcache: download path ${buildcacheReleasePath}`) 71 | return buildcacheReleasePath 72 | } 73 | 74 | export async function install(sourcePath: string): Promise { 75 | const destPath = await getInstallDir() 76 | await io.mkdirP(destPath) 77 | 78 | let buildcacheFolder 79 | switch (process.platform) { 80 | case 'linux': 81 | buildcacheFolder = await toolcache.extractTar(sourcePath, destPath) 82 | break 83 | case 'win32': 84 | case 'darwin': 85 | default: 86 | buildcacheFolder = await toolcache.extractZip(sourcePath, destPath) 87 | break 88 | } 89 | core.info(`buildcache: unpacked folder ${buildcacheFolder}`) 90 | 91 | const buildcacheBinFolder = path.resolve( 92 | buildcacheFolder, 93 | 'buildcache', 94 | 'bin' 95 | ) 96 | const buildcacheBinPath = path.join(buildcacheBinFolder, 'buildcache') 97 | // windows has different filename and cannot do symbolic links 98 | if (process.platform !== 'win32') { 99 | await exec.exec('ln', [ 100 | '-s', 101 | buildcacheBinPath, 102 | path.join(buildcacheBinFolder, 'clang') 103 | ]) 104 | await exec.exec('ln', [ 105 | '-s', 106 | buildcacheBinPath, 107 | path.join(buildcacheBinFolder, 'clang++') 108 | ]) 109 | } 110 | core.addPath(buildcacheBinFolder) 111 | } 112 | 113 | async function configure(): Promise { 114 | // Set up the environment by putting our path in there 115 | const cacheDir = await getCacheDir() 116 | core.exportVariable('BUILDCACHE_DIR', cacheDir) 117 | core.exportVariable( 118 | 'BUILDCACHE_MAX_CACHE_SIZE', 119 | getEnvVar('BUILDCACHE_MAX_CACHE_SIZE', '500000000') 120 | ) 121 | core.exportVariable('BUILDCACHE_DEBUG', getEnvVar('BUILDCACHE_DEBUG', '2')) 122 | core.exportVariable( 123 | 'BUILDCACHE_LOG_FILE', 124 | path.resolve(cacheDir, getEnvVar('BUILDCACHE_LOG_FILE', 'buildcache.log')) 125 | ) 126 | } 127 | 128 | async function restore(): Promise { 129 | const paths = [await getCacheDir()] 130 | 131 | // withInput restores immutable cache from previous runs, unique creates fresh upload post-run 132 | const { withInput, unique } = getCacheKeys() 133 | const restoreKeys = [withInput] 134 | 135 | try { 136 | const restoredWith = await cache.restoreCache(paths, unique, restoreKeys) 137 | if (restoredWith) { 138 | core.info(`buildcache: restored from cache key "${restoredWith}".`) 139 | } else { 140 | core.info( 141 | `buildcache: no cache for key ${unique} or ${withInput} - cold cache or invalid key` 142 | ) 143 | } 144 | } catch (e) { 145 | core.warning(`buildcache: caching not working: ${e}`) 146 | } 147 | } 148 | 149 | async function run(): Promise { 150 | try { 151 | const downloadPath = await downloadLatest(getAccessToken()) 152 | await install(downloadPath) 153 | await configure() 154 | await restore() 155 | await printConfig() 156 | await printStats() 157 | const zeroStatsFlag = core.getInput('zero_buildcache_stats') 158 | if (zeroStatsFlag && zeroStatsFlag === 'true') { 159 | core.info( 160 | 'buildcache: zeroing stats - stats display in cleanup task will be for this run only.' 161 | ) 162 | await zeroStats() 163 | } 164 | } catch (e) { 165 | core.error(`buildcache: failure during restore: ${e}`) 166 | core.setFailed(e as Error) 167 | } 168 | } 169 | 170 | run() 171 | 172 | export default run 173 | -------------------------------------------------------------------------------- /src/save.ts: -------------------------------------------------------------------------------- 1 | import * as artifact from '@actions/artifact' 2 | import * as cache from '@actions/cache' 3 | import * as core from '@actions/core' 4 | import * as fs from 'fs' 5 | import * as path from 'path' 6 | 7 | import { Stats, getCacheDir, getCacheKeys, getEnvVar, printStats } from './lib' 8 | 9 | async function save(stats: Stats): Promise { 10 | const { unique } = getCacheKeys() 11 | 12 | const cacheDir = await getCacheDir() 13 | const paths = [cacheDir] 14 | 15 | const saveCache = core.getInput('save_cache') 16 | if (saveCache === 'false') { 17 | core.info('buildcache: not saving cache.') 18 | } else if (stats.entries === 0) { 19 | core.info('buildcache: not saving empty cache.') 20 | } else if (stats.misses === 0) { 21 | core.info('buildcache: not saving unmodified cache.') 22 | } else { 23 | core.info(`buildcache: saving cache with key "${unique}".`) 24 | try { 25 | await cache.saveCache(paths, unique) 26 | } catch (e) { 27 | core.warning(`buildcache: caching not working: ${e}`) 28 | } 29 | } 30 | } 31 | 32 | async function uploadBuildLog(): Promise { 33 | const artifactClient = artifact.create() 34 | const artifactName = 'buildcache_log' 35 | 36 | const cacheDir = await getCacheDir() 37 | const logFile = path.resolve( 38 | cacheDir, 39 | getEnvVar('BUILDCACHE_LOG_FILE', 'buildcache.log') 40 | ) 41 | const files = [logFile] 42 | // FIXME this won't strip the leading directories off custom log file locations correctly! 43 | // It still has the built in assumption that the log file is located inside the cache directory 44 | const rootDirectory = cacheDir 45 | const options = { 46 | continueOnError: false 47 | } 48 | 49 | const uploadFlag = core.getInput('upload_buildcache_log') 50 | if (uploadFlag && uploadFlag === 'true') { 51 | try { 52 | const uploadResponse = await artifactClient.uploadArtifact( 53 | artifactName, 54 | files, 55 | rootDirectory, 56 | options 57 | ) 58 | core.info( 59 | `buildcache: uploaded buildcache.log file (consumed ${uploadResponse.size} bytes of artifact storage)` 60 | ) 61 | } catch (e) { 62 | core.warning(`buildcache: unable to upload buildlog: ${e}`) 63 | } 64 | } 65 | try { 66 | await fs.promises.unlink(logFile) 67 | } catch (e) { 68 | core.warning(`buildcache: unable to delete buildcache.log ${e}`) 69 | } 70 | } 71 | 72 | async function run(): Promise { 73 | const stats = await printStats() 74 | await uploadBuildLog() 75 | await save(stats) 76 | } 77 | 78 | run() 79 | 80 | export default run 81 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, 5 | "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, 6 | "moduleResolution": "node", 7 | "outDir": "./lib" /* Redirect output structure to the directory. */, 8 | "rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, 9 | "strict": true /* Enable all strict type-checking options. */, 10 | "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, 11 | "noUnusedLocals": true, 12 | "noUnusedParameters": true, 13 | "noImplicitReturns": true, 14 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 15 | }, 16 | "exclude": ["node_modules", "./lib", "__tests__", "./dist"] 17 | } 18 | 19 | // { 20 | // "compilerOptions": { 21 | // "noEmitOnError": false, 22 | // "diagnostics": true, 23 | // "lib": ["esnext"], 24 | 25 | // "target": "es2020", 26 | 27 | // "resolveJsonModule": true, 28 | // "moduleResolution": "node", 29 | // "module": "esnext", 30 | // "esModuleInterop": true, 31 | 32 | // "strict": true, 33 | // "skipLibCheck": true, 34 | // "noUnusedLocals": true, 35 | // "noUnusedParameters": true, 36 | // "noImplicitReturns": true 37 | // }, 38 | // "exclude": ["dist"] 39 | // } 40 | --------------------------------------------------------------------------------