Since v0.9.0 of BuildKit (BuildX v0.7.0) you can provide a subdirectory
to the default Git context.
Closes#460Closes#528
Signed-off-by: Jim Brännlund <jimbrannlund@fastmail.com>
Fill in title, description and url labels based on the repository information.
Use repository clone URL from `github.event` instead of an undocumented variable.
Fix licenses label to follow SPDX License Expressions.
Signed-off-by: itchyny <itchyny@hatena.ne.jp>
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Contributions to this project are [released](https://docs.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license)
to the public under the [project's open source license](LICENSE).
## Submitting a pull request
1. [Fork](https://github.com/docker/build-push-action/fork) and clone the repository
2. Configure and install the dependencies: `yarn install`
3. Create a new branch: `git checkout -b my-branch-name`
4. Make your changes
5. Make sure the tests pass: `docker buildx bake test`
6. Format code and build javascript artifacts: `docker buildx bake pre-checkin`
7. Validate all code has correctly formatted and built: `docker buildx bake validate`
8. Push to your fork and [submit a pull request](https://github.com/docker/build-push-action/compare)
9. Pat your self on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Make sure the `README.md` and any other relevant **documentation are kept up-to-date**.
- We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as **separate pull requests**.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
## Resources
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
If this is a security issue please report it to the [Docker Security team](mailto:security@docker.com).
Before submitting a bug report, check out the [Troubleshooting doc](https://github.com/docker/build-push-action/blob/master/TROUBLESHOOTING.md).
- type:checkboxes
attributes:
label:Contributing guidelines
description:>
Make sure you've read the contributing guidelines before proceeding.
options:
- label:I've read the [contributing guidelines](https://github.com/docker/build-push-action/blob/master/.github/CONTRIBUTING.md) and wholeheartedly agree
required:true
- type:checkboxes
attributes:
label:"I've found a bug, and:"
description:|
Make sure that your request fulfills all of the following requirements.
If one requirement cannot be satisfied, explain in detail why.
options:
- label:The documentation does not mention anything about my problem
- label:There are no open or closed issues that are related to my problem
- type:textarea
attributes:
label:Description
description:>
Provide a brief description of the bug in 1-2 sentences.
validations:
required:true
- type:textarea
attributes:
label:Expected behaviour
description:>
Describe precisely what you'd expect to happen.
validations:
required:true
- type:textarea
attributes:
label:Actual behaviour
description:>
Describe precisely what is actually happening.
validations:
required:true
- type:input
attributes:
label:Repository URL
description:>
Enter the URL of the repository where you are experiencing the
issue. If your repository is private, provide a link to a minimal
repository that reproduces the issue.
- type:input
attributes:
label:Workflow run URL
description:>
Enter the URL of the GitHub Action workflow run, if public.
- type:textarea
attributes:
label:YAML workflow
description:|
Provide the YAML of the workflow that's causing the issue.
**Required** Docker repository to tag the image with.
In the examples below we are also using 3 other actions:
### `username`
* [`setup-buildx`](https://github.com/docker/setup-buildx-action) action will
create and boot a builder using by default the [`docker-container` driver](https://docs.docker.com/build/building/drivers/docker-container/).
This is **not required but recommended** using it to be able to build
multi-platform images, export cache, etc.
* [`setup-qemu`](https://github.com/docker/setup-qemu-action) action can be
useful if you want to add emulation support with QEMU to be able to build
against more platforms.
* [`login`](https://github.com/docker/login-action) action will take care to
log in against a Docker registry.
Username used to log in to a Docker registry. If not set then no login will occur.
### Git context
### `password`
By default, this action uses the [Git context](https://docs.docker.com/engine/reference/commandline/build/#git-repositories),
so you don't need to use the [`actions/checkout`](https://github.com/actions/checkout/)
action to check out the repository as this will be done directly by [BuildKit](https://github.com/moby/buildkit).
Password or personal access token used to log in to a Docker registry. If not set then no login will occur.
### `registry`
Server address of Docker registry. If not set then will default to Docker Hub.
### `tags`
Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags.
Example:
The git reference will be based on the [event that triggered your workflow](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
and will result in the following context: `https://github.com/<owner>/<repo>.git#<ref>`.
```yaml
tags:tag1,tag2
name:ci
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on:ubuntu-latest
steps:
-
name:Set up QEMU
uses:docker/setup-qemu-action@v2
-
name:Set up Docker Buildx
uses:docker/setup-buildx-action@v2
-
name:Login to Docker Hub
uses:docker/login-action@v2
with:
username:${{ secrets.DOCKERHUB_USERNAME }}
password:${{ secrets.DOCKERHUB_TOKEN }}
-
name:Build and push
uses:docker/build-push-action@v4
with:
push:true
tags:user/app:latest
```
### `tag_with_ref`
Be careful because **any file mutation in the steps that precede the build step
will be ignored, including processing of the `.dockerignore` file** since
the context is based on the Git reference. However, you can use the
[Path context](#path-context) using the [`context` input](#inputs) alongside
the [`actions/checkout`](https://github.com/actions/checkout/) action to remove
this restriction.
Boolean value. Defaults to `false`.
Automatically tags the built image with the git reference. The format of the tag depends on the type of git reference with all forward slashes replaced with `-`.
For pushes to a branch the reference will be `refs/heads/{branch-name}` and the tag will be `{branch-name}`. If `{branch-name}` is master then the tag will be `latest`.
For pull requests the reference will be `refs/pull/{pull-request}` and the tag will be `pr-{pull-request}`.
For git tags the reference will be `refs/tags/{git-tag}` and the tag will be `{git-tag}`.
Examples:
|Git Reference|Image tag|
|---|---|
|`refs/heads/master`|`latest`|
|`refs/heads/mybranch`|`mybranch`|
|`refs/heads/my/branch`|`my-branch`|
|`refs/pull/2/merge`|`pr-2-merge`|
|`refs/tags/v1.0.0`|`v1.0.0`|
### `tag_with_sha`
Boolean value. Defaults to `false`.
Automatically tags the built image with the git short SHA prefixed with `sha-`.
Path to the Dockerfile. Defaults to `{path}/Dockerfile`
Note when set this path is **not** relative to the `path` input but is instead relative to the current working directory.
### `target`
Sets the target stage to build.
### `always_pull`
Boolean value. Defaults to `false`.
Always attempt to pull a newer version of the image.
### `build_args`
Comma-delimited list of build-time variables.
Example:
Default Git context can also be provided using the [Handlebars template](https://handlebarsjs.com/guide/)
expression `{{defaultContext}}`. Here we can use it to provide a subdirectory
to the default Git context:
```yaml
build_args:arg1=value1,arg2=value2
-
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name:Set up Docker Buildx
uses:docker/setup-buildx-action@v2
-
name:Build and push
uses:docker/build-push-action@v4
with:
context:"{{defaultContext}}:mysubdir"
push:true
tags:user/app:latest
```
### `cache_froms`
> **Warning**
>
> Subdirectory for Git context is available from [BuildKit v0.9.0](https://github.com/moby/buildkit/releases/tag/v0.9.0).
> If you're using the `docker` builder (default if `setup-buildx-action` not used),
> then BuildKit in Docker Engine will be used. As Docker Engine < v22.x.x embeds
> Buildkit 0.8.2 at the moment, it does not support this feature. It's therefore
> required to use the `setup-buildx-action` at the moment.
Comma-delimited list of images to consider as cache sources.
Example:
```yaml
cache_froms:myorg/baseimage:latest
```
### `labels`
Comma-delimited list of labels to add to the built image.
Example:
Building from the current repository automatically uses the [GitHub Token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication),
so it does not need to be passed. If you want to authenticate against another
private repository, you have to use a [secret](https://docs.docker.com/build/ci/github-actions/secrets)
named `GIT_AUTH_TOKEN` to be able to authenticate against it with Buildx:
Adds labels with git repository information to the built image based on the standards set out in https://github.com/opencontainers/image-spec/blob/master/annotations.md.
The labels are:
|Label key|Example value|Description|
|---|---|---|
|`org.opencontainers.image.created`|`2020-03-06T23:00:00Z`|Date and time on which the image was built (string, date-time as defined by RFC 3339).|
|`org.opencontainers.image.source`|`https://github.com/myorg/myrepository`|URL to the GitHub repository.|
|`org.opencontainers.image.revision`|`676cae2f85471aeff6776463c72881ebd902dcf9`|The full git SHA of this commit.|
### `push`
Boolean value. Defaults to `true`.
Whether to push the built image.
## Example usage
The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, log in to Docker Hub using GitHub secrets, and push the image to the Docker Hub repository `myorg/myrepository`:
### Path context
```yaml
steps:
- name:Checkout code
uses:actions/checkout@v2
name:ci
- name:Build and push Docker images
uses:docker/build-push-action@v1
with:
username:${{ secrets.DOCKER_USERNAME }}
password:${{ secrets.DOCKER_PASSWORD }}
repository:myorg/myrepository
tags:latest
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on:ubuntu-latest
steps:
-
name:Checkout
uses:actions/checkout@v3
-
name:Set up QEMU
uses:docker/setup-qemu-action@v2
-
name:Set up Docker Buildx
uses:docker/setup-buildx-action@v2
-
name:Login to Docker Hub
uses:docker/login-action@v2
with:
username:${{ secrets.DOCKERHUB_USERNAME }}
password:${{ secrets.DOCKERHUB_TOKEN }}
-
name:Build and push
uses:docker/build-push-action@v4
with:
context:.
push:true
tags:user/app:latest
```
The following will build the root Dockerfile, tag the image with the git reference and SHA as described above, log in to Docker Hub using GitHub secrets, and push the image to the Docker Hub repository `myorg/myrepository`:
| `build-args` | List | List of [build-time variables](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-arg) |
| `build-contexts` | List | List of additional [build contexts](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context) (e.g., `name=path`) |
| `cache-from` | List | List of [external cache sources](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-from) (e.g., `type=local,src=path/to/dir`) |
| `cache-to` | List | List of [cache export destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-to) (e.g., `type=local,dest=path/to/dir`) |
| `cgroup-parent` | String | Optional [parent cgroup](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) for the container used in the build |
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
| `labels` | List | List of metadata for an image |
| `load` | Bool | [Load](https://docs.docker.com/engine/reference/commandline/buildx_build/#load) is a shorthand for `--output=type=docker` (default `false`) |
| `network` | String | Set the networking mode for the `RUN` instructions during build |
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
| `no-cache-filters` | List/CSV | Do not cache specified stages |
| `outputs`¹ | List | List of [output destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#output) (format: `type=local,dest=path`) |
| `platforms` | List/CSV | List of [target platforms](https://docs.docker.com/engine/reference/commandline/buildx_build/#platform) for build |
| `provenance` | Bool/String | Generate [provenance](https://docs.docker.com/build/attestations/slsa-provenance/) attestation for the build (shorthand for `--attest=type=provenance`) |
| `pull` | Bool | Always attempt to pull all referenced images (default `false`) |
| `push` | Bool | [Push](https://docs.docker.com/engine/reference/commandline/buildx_build/#push) is a shorthand for `--output=type=registry` (default `false`) |
| `sbom` | Bool/String | Generate [SBOM](https://docs.docker.com/build/attestations/sbom/) attestation for the build (shorthand for `--attest=type=sbom`) |
| `secrets` | List | List of [secrets](https://docs.docker.com/engine/reference/commandline/buildx_build/#secret) to expose to the build (e.g., `key=string`, `GIT_AUTH_TOKEN=mytoken`) |
| `secret-files` | List | List of [secret files](https://docs.docker.com/engine/reference/commandline/buildx_build/#secret) to expose to the build (e.g., `key=filename`, `MY_SECRET=./secret.txt`) |
| `ssh` | List | List of [SSH agent socket or keys](https://docs.docker.com/engine/reference/commandline/buildx_build/#ssh) to expose to the build |
| `tags` | List/CSV | List of tags |
| `target` | String | Sets the target stage to build |
| `ulimit` | List | [Ulimit](https://docs.docker.com/engine/reference/commandline/buildx_build/#ulimit) options (e.g., `nofile=1024:1024`) |
| `github-token` | String | GitHub Token used to authenticate against a repository for [Git context](#git-context) (default `${{ github.token }}`) |
The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, log in to Google Container Registry using GitHub secrets (where `DOCKER_PASSWORD` is a [JSON key](https://cloud.google.com/container-registry/docs/advanced-authentication#json-key)), and push the image to the GCR repository `myorg/myrepository`:
```yaml
steps:
- name:Checkout code
uses:actions/checkout@v2
> **Note**
>
> * ¹ multiple `outputs` are [not yet supported](https://github.com/moby/buildkit/issues/1555)
- name:Build and push Docker images
uses:docker/build-push-action@v1
with:
username:_json_key
password:${{ secrets.DOCKER_PASSWORD }}
registry:gcr.io
repository:myorg/myrepository
tags:latest
```
### outputs
Following outputs are available
| Name | Type | Description |
|------------|---------|-----------------------|
| `imageid` | String | Image ID |
| `digest` | String | Image digest |
| `metadata` | JSON | Build result metadata |
## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
## Contributing
Want to contribute? Awesome! You can find information about contributing to
this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
Sometimes when your workflows are heavy consumers of disk storage, it can happen that build-push-action declares that the built image is loaded, but then not found in the following workflow steps.
- You can use the following solution as workaround, to free space on disk before building docker image using the following workflow step
```yaml
# Free disk space
- name:Free Disk space
shell:bash
run:|
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
```
- Another workaround can be to call `docker/setup-buildx-action` with docker driver
```yaml
name:Set up Docker Buildx
uses:docker/setup-buildx-action@v2
with:
driver:docker
```
More details in the [related issue](https://github.com/docker/build-push-action/issues/321)
require('./sourcemap-register.js');(()=>{var__webpack_modules__={7799:function(r,i,a){"use strict";vars=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;varp=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"inp?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){returni[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});varp=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});varl=this&&this.__importStar||function(r){if(r&&r.__esModule)returnr;vari={};if(r!=null)for(varainr)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);returni};varc=this&&this.__awaiter||function(r,i,a,s){functionadopt(r){returnrinstanceofa?r:newa((function(i){i(r)}))}returnnew(a||(a=Promise))((function(a,p){functionfulfilled(r){try{step(s.next(r))}catch(r){p(r)}}functionrejected(r){try{step(s["throw"](r))}catch(r){p(r)}}functionstep(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.saveCache=i.restoreCache=i.isFeatureAvailable=i.ReserveCacheError=i.ValidationError=void0;constd=l(a(2186));constu=l(a(1017));constm=l(a(1518));consth=l(a(8245));constg=a(3434);classValidationErrorextendsError{constructor(r){super(r);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}i.ValidationError=ValidationError;classReserveCacheErrorextendsError{constructor(r){super(r);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}i.ReserveCacheError=ReserveCacheError;functioncheckPaths(r){if(!r||r.length===0){thrownewValidationError(`Path Validation Error: At least one directory or file path is required`)}}functioncheckKey(r){if(r.length>512){thrownewValidationError(`Key Validation Error: ${r} cannot be larger than 512 characters.`)}consti=/^[^,]*$/;if(!i.test(r)){thrownewValidationError(`Key Validation Error: ${r} cannot contain commas.`)}}functionisFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}i.isFeatureAvailable=isFeatureAvailable;functionrestoreCache(r,i,a,s,p=false){returnc(this,void0,void0,(function*(){checkPaths(r);a=a||[];constl=[i,...a];d.debug("Resolved Keys:");d.debug(JSON.stringify(l));if(l.length>10){thrownewValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(constrofl){checkKey(r)}constc=yieldm.getCompressionMethod();lety="";try{consti=yieldh.getCacheEntry(l,r,{compressionMethod:c,enableCrossOsArchive:p});if(!(i===null||i===void0?void0:i.archiveLocation)){returnundefined}if(s===null||s===void0?void0:s.lookupOnly){d.info("Lookup only - skipping download");returni.cacheKey}y=u.join(yieldm.createTempDirectory(),m.getCacheFileName(c));d.debug(`Archive Path: ${y}`);yieldh.downloadCache(i.archiveLocation,y,s);if(d.isDebug()){yield(0,g.listTar)(y,c)}consta=m.getArchiveFileSizeInBytes(y);d.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield(0,g.extractTar)(y,c);d.info("Cache restored successfully");returni.cacheKey}catch(r){consti=r;if(i.name===ValidationError.name){throwr}else{d.warning(`Failed to restore: ${r.message}`)}}finally{try{yieldm.unlinkFile(y)}catch(r){d.debug(`Failed to delete archive: ${r}`)}}returnundefined}))}i.restoreCache=restoreCache;functionsaveCache(r,i,a,s=false){varp,l,y,v,b;returnc(this,void0,void0,(function*(){checkPaths(r);checkKey(i);constc=yieldm.getCompressionMethod();letx=-1;constw=yieldm.resolvePaths(r);d.debug("Cache Paths:");d.debug(`${JSON.stringify(w)}`);if(w.length===0){thrownewError(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}constS=yieldm.createTempDirectory();const_=u.join(S,m.getCacheFileName(c));d.debug(`Archive Path: ${_}`);try{yield(0,g.createTar)(S,w,c);if(d.isDebug()){yield(0,g.listTar)(_,c)}constu=10*1024*1024*1024;constE=m.getArchiveFileSizeInBytes(_);d.debug(`File Size: ${E}`);if(E>u&&!m.isGhes()){thrownewError(`Cache size of ~${Math.round(E/(1024*1024))} MB (${E} B) is over the 10GB limit, not saving cache.`)}d.debug("Reserving Cache");constT=yieldh.reserveCache(i,r,{compressionMethod:c,enableCrossOsArchive:s,cacheSize:E});if((p=T===null||T===void0?void0:T.result)===null||p===void0?void0:p.cacheId){x=(l=T===null||T===void0?void0:T.result)===null||l===void0?void0:l.cacheId}elseif((T===null||T===void0?void0:T.statusCode)===400){thrownewError((v=(y=T===null||T===void0?void0:T.error)===null||y===void0?void0:y.message)!==null&&v!==void0?v:`Cache size of ~${Math.round(E/(1024*1024))} MB (${E} B) is over the data cap limit, not saving cache.`)}else{thrownewReserveCacheError(`Unable to reserve cache with key ${i}, another job may be creating this cache. More details: ${(b=T===null||T===Line truncated
*/function isObject(r){return Object.prototype.toString.call(r)==="[object Object]"}function isPlainObject(r){var i,a;if(isObject(r)===false)return false;i=r.constructor;if(i===undefined)return true;a=i.prototype;if(isObject(a)===false)return false;if(a.hasOwnProperty("isPrototypeOf")===false){return false}return true}r.exports=isPlainObject},4329:r=>{"use strict";function e(r){this.message=r}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var i=String(r).replace(/=+$/,"");if(i.length%4==1)thrownewe("'atob' failed: The string to be decoded is not correctly encoded.");for(vara,s,p=0,l=0,c="";s=i.charAt(l++);~s&&(a=p%4?64*a+s:s,p++%4)?c+=String.fromCharCode(255&a>>(-2*p&6)):0)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);returnc};functiont(r){vara=r.replace(/-/g,"+").replace(/_/g,"/");switch(a.length%4){case0:break;case2:a+="==";break;case3:a+="=";break;default:throw"Illegal base64url string!"}try{returnfunction(r){returndecodeURIComponent(i(r).replace(/(.)/g,(function(r,i){vara=i.charCodeAt(0).toString(16).toUpperCase();returna.length<2&&(a="0"+a),"%"+a})))}(a)}catch(r){returni(a)}}functionn(r){this.message=r}functiono(r,i){if("string"!=typeofr)thrownewn("Invalid token specified");vara=!0===(i=i||{}).header?0:1;try{returnJSON.parse(t(r.split(".")[a]))}catch(r){thrownewn("Invalid token specified: "+r.message)}}n.prototype=newError,n.prototype.name="InvalidTokenError";consta=o;a.default=o,a.InvalidTokenError=n,r.exports=a},7426:(r,i,a)=>{
/*!
*mime-db
*Copyright(c)2014JonathanOng
*Copyright(c)2015-2022DouglasChristopherWilson
*MITLicensed
*/
r.exports=a(3765)},3583:(r,i,a)=>{"use strict";
/*!
*mime-types
*Copyright(c)2014JonathanOng
*Copyright(c)2015DouglasChristopherWilson
*MITLicensed
*/var s=a(7426);var p=a(1017).extname;var l=/^\s*([^;\s]*)(?:;|\s|$)/;varc=/^text\//i;i.charset=charset;i.charsets={lookup:charset};i.contentType=contentType;i.extension=extension;i.extensions=Object.create(null);i.lookup=lookup;i.types=Object.create(null);populateMaps(i.extensions,i.types);functioncharset(r){if(!r||typeofr!=="string"){returnfalse}vari=l.exec(r);vara=i&&s[i[1].toLowerCase()];if(a&&a.charset){returna.charset}if(i&&c.test(i[1])){return"UTF-8"}returnfalse}functioncontentType(r){if(!r||typeofr!=="string"){returnfalse}vara=r.indexOf("/")===-1?i.lookup(r):r;if(!a){returnfalse}if(a.indexOf("charset")===-1){vars=i.charset(a);if(s)a+="; charset="+s.toLowerCase()}returna}functionextension(r){if(!r||typeofr!=="string"){returnfalse}vara=l.exec(r);vars=a&&i.extensions[a[1].toLowerCase()];if(!s||!s.length){returnfalse}returns[0]}functionlookup(r){if(!r||typeofr!=="string"){returnfalse}vara=p("x."+r).toLowerCase().substr(1);if(!a){returnfalse}returni.types[a]||false}functionpopulateMaps(r,i){vara=["nginx","apache",undefined,"iana"];Object.keys(s).forEach((functionforEachMimeType(p){varl=s[p];varc=l.extensions;if(!c||!c.length){return}r[p]=c;for(vard=0;d<c.length;d++){varu=c[d];if(i[u]){varm=a.indexOf(s[i[u]].source);varh=a.indexOf(l.source);if(i[u]!=="application/octet-stream"&&(m>h||m===h&&i[u].substr(0,12)==="application/")){continue}}i[u]=p}}))}},3973:(r,i,a)=>{r.exports=minimatch;minimatch.Minimatch=Minimatch;vars=function(){try{returna(1017)}catch(r){}}()||{sep:"/"};minimatch.sep=s.sep;varp=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};varl=a(3717);varc={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};vard="[^/]";varu=d+"*?";varm="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";varh="(?:(?!(?:\\/|^)\\.).)*?";varg=charSet("().*{}+?[]^$\\!");functioncharSet(r){returnr.split("").reduce((function(r,i){r[i]=true;returnr}),{})}vary=/\/+/;minimatch.filter=filter;functionfilter(r,i){i=i||{};returnfunction(a,s,p){returnminimatch(a,r,i)}}functionext(r,i){i=i||{};vara={};Object.keys(r).forEach((function(i){a[i]=r[i]}));Object.keys(i).forEach((function(r){a[r]=i[r]}));returna}minimatch.defaults=function(r){if(!r||typeofr!=="object"||!Object.keys(r).length){returnminimatch}vari=minimatch;vara=functionminimatch(a,s,p){returni(a,s,ext(r,p))};a.Minimatch=functionMinimatch(a,s){returnnewi.Minimatch(a,ext(r,s))};a.Minimatch.defaults=functiondefaults(a){returni.defaults(ext(r,a)).Minimatch};a.filter=functionfilter(a,s){returni.filter(a,ext(r,s))};a.defaults=functiondefaults(a){returni.defaults(ext(r,a))};a.makeRe=functionmakeRe(a,s){returni.makeRe(a,ext(r,s))};a.braceExpand=functionbraceExpand(a,s){returni.braceExpand(a,ext(r,s))};a.match=function(a,s,p){returni.match(a,s,ext(r,p))};returna};Minimatch.defaults=function(r){returnminimatch.defaults(r).Minimatch};functionminimatch(r,i,a){assertValidPattern(i);if(!a)a={};if(!a.nocomment&&i.charAt(0)==="#"){returnfalse}returnnewMinimatch(i,a).match(r)}functionMinimatch(r,i){if(!(thisinstanceofMinimatch)){returnnewMinimatch(r,i)}assertValidPattern(r);if(!i)i={};r=r.trim();if(!i.allowWindowsEscape&&s.sep!=="/"){r=r.split(s.sep).join("/")}this.options=i;this.set=[];this.pattern=r;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!i.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;functionmake(){varr=this.pattern;vari=this.options;if(!i.nocomment&&r.charAt(0)==="#"){this.comment=true;return}if(!r){this.empty=true;return}this.parseNegate();vara=this.globSet=this.braceExpand();if(i.debug)this.debug=functiondebug(){console.error.apply(console,arguments)};this.debug(this.pattern,a);a=this.globParts=a.map((function(r){returnr.split(y)}));this.debug(this.pattern,a);a=a.map((function(r,i,a){returnr.map(this.parse,this)}),this);this.debug(this.pattern,a);a=a.filter((function(r){returnr.indexOf(false)===-1}));this.debug(this.pattern,a);this.set=a}Minimatch.prototype.parseNegate=parseNegate;functionparseNegate(){varr=this.pattern;vari=false;vara=this.options;vars=0;if(a.nonegate)return;for(varp=0,l=r.length;p<l&&r.charAt(p)==="!";p++){i=!i;s++}if(s)this.pattern=r.substr(s);this.negate=i}minimatch.braceExpand=function(r,i){returnbraceExpand(r,i)};Minimatch.prototype.braceExpand=braceExpand;functionbraceExpand(r,i){if(!i){if(thisinstanceofMinimatch){i=this.options}else{i={}}}r=typeofr==="undefined"?this.pattern:r;assertValidPattern(r);if(i.nobrace||!/\{(?:(?!\{).)*\}/.test(r)){return[r]}returnl(r)}varv=1024*64;varassertValidPattern=function(r){if(typeofr!=="string"){thrownewTypeError("invalid pattern")}if(r.length>v){thrownewTypeError("pattern is too long")}};Minimatch.prototype.parse=parse;varb={};functionparse(r,i){assertValidPattern(r);vara=this.options;if(r==="**"){if(!a.noglobstar)returnp;elser="*"}iLine truncated
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){varr=String.fromCharCode;vari=Math.floor;varfromCodePoint=function(){vara=16384;vars=[];varp;varl;varc=-1;vard=arguments.length;if(!d){return""}varu="";while(++c<d){varm=Number(arguments[c]);if(!isFinite(m)||m<0||m>1114111||i(m)!==m){throwRangeError("Invalid code point: "+m)}if(m<=65535){s.push(m)}else{m-=65536;p=(m>>10)+55296;l=m%1024+56320;s.push(p,l)}if(c+1===d||s.length>a){u+=r.apply(null,s);s.length=0}}returnu};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:i)},5911:(r,i)=>{i=r.exports=SemVer;vara;if(typeofprocess==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){a=function(){varr=Array.prototype.slice.call(arguments,0);r.unshift("SEMVER");console.log.apply(console,r)}}else{a=function(){}}i.SEMVER_SPEC_VERSION="2.0.0";vars=256;varp=Number.MAX_SAFE_INTEGER||9007199254740991;varl=16;varc=s-6;vard=i.re=[];varu=i.safeRe=[];varm=i.src=[];varh=i.tokens={};varg=0;functiontok(r){h[r]=g++}vary="[a-zA-Z0-9-]";varv=[["\\s",1],["\\d",s],[y,c]];functionmakeSafeRe(r){for(vari=0;i<v.length;i++){vara=v[i][0];vars=v[i][1];r=r.split(a+"*").join(a+"{0,"+s+"}").split(a+"+").join(a+"{1,"+s+"}")}returnr}tok("NUMERICIDENTIFIER");m[h.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");m[h.NUMERICIDENTIFIERLOOSE]="\\d+";tok("NONNUMERICIDENTIFIER");m[h.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+y+"*";tok("MAINVERSION");m[h.MAINVERSION]="("+m[h.NUMERICIDENTIFIER]+")\\."+"("+m[h.NUMERICIDENTIFIER]+")\\."+"("+m[h.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");m[h.MAINVERSIONLOOSE]="("+m[h.NUMERICIDENTIFIERLOOSE]+")\\."+"("+m[h.NUMERICIDENTIFIERLOOSE]+")\\."+"("+m[h.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");m[h.PRERELEASEIDENTIFIER]="(?:"+m[h.NUMERICIDENTIFIER]+"|"+m[h.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");m[h.PRERELEASEIDENTIFIERLOOSE]="(?:"+m[h.NUMERICIDENTIFIERLOOSE]+"|"+m[h.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");m[h.PRERELEASE]="(?:-("+m[h.PRERELEASEIDENTIFIER]+"(?:\\."+m[h.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");m[h.PRERELEASELOOSE]="(?:-?("+m[h.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+m[h.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");m[h.BUILDIDENTIFIER]=y+"+";tok("BUILD");m[h.BUILD]="(?:\\+("+m[h.BUILDIDENTIFIER]+"(?:\\."+m[h.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");m[h.FULLPLAIN]="v?"+m[h.MAINVERSION]+m[h.PRERELEASE]+"?"+m[h.BUILD]+"?";m[h.FULL]="^"+m[h.FULLPLAIN]+"$";tok("LOOSEPLAIN");m[h.LOOSEPLAIN]="[v=\\s]*"+m[h.MAINVERSIONLOOSE]+m[h.PRERELEASELOOSE]+"?"+m[h.BUILD]+"?";tok("LOOSE");m[h.LOOSE]="^"+m[h.LOOSEPLAIN]+"$";tok("GTLT");m[h.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");m[h.XRANGEIDENTIFIERLOOSE]=m[h.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");m[h.XRANGEIDENTIFIER]=m[h.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");m[h.XRANGEPLAIN]="[v=\\s]*("+m[h.XRANGEIDENTIFIER]+")"+"(?:\\.("+m[h.XRANGEIDENTIFIER]+")"+"(?:\\.("+m[h.XRANGEIDENTIFIER]+")"+"(?:"+m[h.PRERELEASE]+")?"+m[h.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");m[h.XRANGEPLAINLOOSE]="[v=\\s]*("+m[h.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+m[h.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+m[h.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+m[h.PRERELEASELOOSE]+")?"+m[h.BUILD]+"?"+")?)?";tok("XRANGE");m[h.XRANGE]="^"+m[h.GTLT]+"\\s*"+m[h.XRANGEPLAIN]+"$";tok("XRANGELOOSE");m[h.XRANGELOOSE]="^"+m[h.GTLT]+"\\s*"+m[h.XRANGEPLAINLOOSE]+"$";tok("COERCE");m[h.COERCE]="(^|[^\\d])"+"(\\d{1,"+l+"})"+"(?:\\.(\\d{1,"+l+"}))?"+"(?:\\.(\\d{1,"+l+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");d[h.COERCERTL]=newRegExp(m[h.COERCE],"g");u[h.COERCERTL]=newRegExp(makeSafeRe(m[h.COERCE]),"g");tok("LONETILDE");m[h.LONETILDE]="(?:~>?)";tok("TILDETRIM");m[h.TILDETRIM]="(\\s*)"+m[h.LONETILDE]+"\\s+";d[h.TILDETRIM]=newRegExp(m[h.TILDETRIM],"g");u[h.TILDETRIM]=newRegExp(makeSafeRe(m[h.TILDETRIM]),"g");varb="$1~";tok("TILDE");m[h.TILDE]="^"+m[h.LONETILDE]+m[h.XRANGEPLAIN]+"$";tok("TILDELOOSE");m[h.TILDELOOSE]="^"+m[h.LONETILDE]+m[h.XRANGEPLAINLOOSE]+"$";tok("LONECARET");m[h.LONECARET]="(?:\\^)";tok("CARETTRIM");m[h.CARETTRIM]="(\\s*)"+m[h.LONECARET]+"\\s+";d[h.CARETTRIM]=newRegExp(m[h.CARETTRIM],"g");u[h.CARETTRIM]=newRegExp(makeSafeRe(m[h.CARETTRIM]),"g");varx="$1^";tok("CARET");m[h.CARET]="^"+m[h.LONECARET]+m[h.XRANGEPLAIN]+"$";tok("CARETLOOSE");m[h.CARETLOOSE]="^"+m[h.LONECARET]+m[h.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");m[h.COMPARATORLOOSE]="^"+m[h.GTLT]+"\\s*("+m[h.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");m[h.COMPARATOR]="^"+m[h.GTLT]+"\\s*("+m[h.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");m[h.COMPARATORTRIM]="(\\s*)"+m[h.GTLT]+"\\s*("+m[h.LOOSEPLAIN]+"|"+m[h.XRANGEPLAIN]+")";d[h.COMPARATORTRIM]=newRegExp(m[h.COMPARATORTRIM],"g");u[h.COMPARATORTRIM]=newRegExp(makeSafeRe(m[h.COMPARATORTRIM]),"g");varw="$1$2$3";tok("HYPLine truncated
consts=a(7147);constp=a(2037);constl=a(1017);constc=a(6113);constd={fs:s.constants,os:p.constants};constu=a(4959);constm="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",h=/XXXXXX/,g=3,y=(d.O_CREAT||d.fs.O_CREAT)|(d.O_EXCL||d.fs.O_EXCL)|(d.O_RDWR||d.fs.O_RDWR),v=p.platform()==="win32",b=d.EBADF||d.os.errno.EBADF,x=d.ENOENT||d.os.errno.ENOENT,w=448,S=384,_="exit",E=[],T=s.rmdirSync.bind(s),N=u.sync;letP=false;functiontmpName(r,i){consta=_parseArguments(r,i),p=a[0],l=a[1];try{_assertAndSanitizeOptions(p)}catch(r){returnl(r)}letc=p.tries;(function_getUniqueName(){try{constr=_generateTmpName(p);s.stat(r,(function(i){if(!i){if(c-->0)return_getUniqueName();returnl(newError("Could not get a unique tmp filename, max tries reached "+r))}l(null,r)}))}catch(r){l(r)}})()}functiontmpNameSync(r){consti=_parseArguments(r),a=i[0];_assertAndSanitizeOptions(a);letp=a.tries;do{constr=_generateTmpName(a);try{s.statSync(r)}catch(i){returnr}}while(p-->0);thrownewError("Could not get a unique tmp filename, max tries reached")}functionfile(r,i){consta=_parseArguments(r,i),p=a[0],l=a[1];tmpName(p,(function_tmpNameCreated(r,i){if(r)returnl(r);s.open(i,y,p.mode||S,(function_fileCreated(r,a){if(r)returnl(r);if(p.discardDescriptor){returns.close(a,(function_discardCallback(r){returnl(r,i,undefined,_prepareTmpFileRemoveCallback(i,-1,p,false))}))}else{constr=p.discardDescriptor||p.detachDescriptor;l(null,i,a,_prepareTmpFileRemoveCallback(i,r?-1:a,p,false))}}))}))}functionfileSync(r){consti=_parseArguments(r),a=i[0];constp=a.discardDescriptor||a.detachDescriptor;constl=tmpNameSync(a);varc=s.openSync(l,y,a.mode||S);if(a.discardDescriptor){s.closeSync(c);c=undefined}return{name:l,fd:c,removeCallback:_prepareTmpFileRemoveCallback(l,p?-1:c,a,true)}}functiondir(r,i){consta=_parseArguments(r,i),p=a[0],l=a[1];tmpName(p,(function_tmpNameCreated(r,i){if(r)returnl(r);s.mkdir(i,p.mode||w,(function_dirCreated(r){if(r)returnl(r);l(null,i,_prepareTmpDirRemoveCallback(i,p,false))}))}))}functiondirSync(r){consti=_parseArguments(r),a=i[0];constp=tmpNameSync(a);s.mkdirSync(p,a.mode||w);return{name:p,removeCallback:_prepareTmpDirRemoveCallback(p,a,true)}}function_removeFileAsync(r,i){const_handler=function(r){if(r&&!_isENOENT(r)){returni(r)}i()};if(0<=r[0])s.close(r[0],(function(){s.unlink(r[1],_handler)}));elses.unlink(r[1],_handler)}function_removeFileSync(r){leti=null;try{if(0<=r[0])s.closeSync(r[0])}catch(r){if(!_isEBADF(r)&&!_isENOENT(r))throwr}finally{try{s.unlinkSync(r[1])}catch(r){if(!_isENOENT(r))i=r}}if(i!==null){throwi}}function_prepareTmpFileRemoveCallback(r,i,a,s){constp=_prepareRemoveCallback(_removeFileSync,[i,r],s);constl=_prepareRemoveCallback(_removeFileAsync,[i,r],s,p);if(!a.keep)E.unshift(p);returns?p:l}function_prepareTmpDirRemoveCallback(r,i,a){constp=i.unsafeCleanup?u:s.rmdir.bind(s);constl=i.unsafeCleanup?N:T;constc=_prepareRemoveCallback(l,r,a);constd=_prepareRemoveCallback(p,r,a,c);if(!i.keep)E.unshift(c);returna?c:d}function_prepareRemoveCallback(r,i,a,s){letp=false;returnfunction_cleanupCallback(l){if(!p){constc=s||_cleanupCallback;constd=E.indexOf(c);if(d>=0)E.splice(d,1);p=true;if(a||r===T||r===N){returnr(i)}else{returnr(i,l||function(){})}}}}function_garbageCollector(){if(!P)return;while(E.length){try{E[0]()}catch(r){}}}function_randomChars(r){leti=[],a=null;try{a=c.randomBytes(r)}catch(i){a=c.pseudoRandomBytes(r)}for(vars=0;s<r;s++){i.push(m[a[s]%m.length])}returni.join("")}function_isBlank(r){returnr===null||_isUndefined(r)||!r.trim()}function_isUndefined(r){returntypeofr==="undefined"}function_parseArguments(r,i){if(typeofr==="function"){return[{},r]}if(_isUndefined(r)){return[{},i]}consta={};for(constiofObject.getOwnPropertyNames(r)){a[i]=r[i]}return[a,i]}function_generateTmpName(r){consti=r.tmpdir;if(!_isUndefined(r.name))returnl.join(i,r.dir,r.name);if(!_isUndefined(r.template))returnl.join(i,r.dir,r.template).replace(h,_randomChars(6));consta=[r.prefix?r.prefix:"tmp","-",process.pid,"-",_randomChars(12),r.postfix?"-"+r.postfix:""].join("");returnl.join(i,r.dir,a)}function_assertAndSanitizeOptions(r){r.tmpdir=_getTmpDir(r);consti=r.tmpdir;if(!_isUndefined(r.name))_assertIsRelative(r.name,"name",i);if(!_isUndefined(r.dir))_assertIsRelative(r.dir,"dir",i);if(!_isUndefined(r.template)){_assertIsRelative(r.template,"template",i);if(!r.template.match(h))thrownewError(`Invalid template, found "${r.template}".`)}if(!_isUndefined(r.tries)&&isNaN(r.tries)||r.tries<0)thrownewError(`Invalid tries, found "${r.tries}".`);r.tries=_isUndefined(r.name)?r.tries||g:1;r.keep=!!r.keep;r.detachDescriptor=!!r.detachDescriptor;r.discardDescriptor=!!r.discardDescriptor;r.unsafeCleanup=!!r.unsafeCleanup;r.dir=_isUndefined(r.dir)?"":l.relative(i,_resolvePath(r.dir,i));r.template=_isUndefined(r.template)?undefined:l.relative(i,_resolvePath(r.template,i));r.template=_isBlank(r.template)?undefined:l.relative(r.dir,r.template);r.naLine truncated
(()=>{vare={650:e=>{varr=Object.prototype.toString;varn=typeofBuffer.alloc==="function"&&typeofBuffer.allocUnsafe==="function"&&typeofBuffer.from==="function";functionisArrayBuffer(e){returnr.call(e).slice(8,-1)==="ArrayBuffer"}functionfromArrayBuffer(e,r,t){r>>>=0;varo=e.byteLength-r;if(o<0){thrownewRangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){thrownewRangeError("'length' is out of bounds")}}returnn?Buffer.from(e.slice(r,r+t)):newBuffer(newUint8Array(e.slice(r,r+t)))}functionfromString(e,r){if(typeofr!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){thrownewTypeError('"encoding" must be a valid string encoding')}returnn?Buffer.from(e,r):newBuffer(e,r)}functionbufferFrom(e,r,t){if(typeofe==="number"){thrownewTypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){returnfromArrayBuffer(e,r,t)}if(typeofe==="string"){returnfromString(e,r)}returnn?Buffer.from(e):newBuffer(e)}e.exports=bufferFrom},274:(e,r,n)=>{vart=n(339);varo=Object.prototype.hasOwnProperty;vari=typeofMap!=="undefined";functionArraySet(){this._array=[];this._set=i?newMap:Object.create(null)}ArraySet.fromArray=functionArraySet_fromArray(e,r){varn=newArraySet;for(vart=0,o=e.length;t<o;t++){n.add(e[t],r)}returnn};ArraySet.prototype.size=functionArraySet_size(){returni?this._set.size:Object.getOwnPropertyNames(this._set).length};ArraySet.prototype.add=functionArraySet_add(e,r){varn=i?e:t.toSetString(e);vara=i?this.has(e):o.call(this._set,n);varu=this._array.length;if(!a||r){this._array.push(e)}if(!a){if(i){this._set.set(e,u)}else{this._set[n]=u}}};ArraySet.prototype.has=functionArraySet_has(e){if(i){returnthis._set.has(e)}else{varr=t.toSetString(e);returno.call(this._set,r)}};ArraySet.prototype.indexOf=functionArraySet_indexOf(e){if(i){varr=this._set.get(e);if(r>=0){returnr}}else{varn=t.toSetString(e);if(o.call(this._set,n)){returnthis._set[n]}}thrownewError('"'+e+'" is not in the set.')};ArraySet.prototype.at=functionArraySet_at(e){if(e>=0&&e<this._array.length){returnthis._array[e]}thrownewError("No element indexed by "+e)};ArraySet.prototype.toArray=functionArraySet_toArray(){returnthis._array.slice()};r.I=ArraySet},449:(e,r,n)=>{vart=n(190);varo=5;vari=1<<o;vara=i-1;varu=i;functiontoVLQSigned(e){returne<0?(-e<<1)+1:(e<<1)+0}functionfromVLQSigned(e){varr=(e&1)===1;varn=e>>1;returnr?-n:n}r.encode=functionbase64VLQ_encode(e){varr="";varn;vari=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);returnr};r.decode=functionbase64VLQ_decode(e,r,n){vari=e.length;vars=0;varl=0;varc,p;do{if(r>=i){thrownewError("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){thrownewError("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<<l);l+=o}while(c);n.value=fromVLQSigned(s);n.rest=r}},190:(e,r)=>{varn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e<n.length){returnn[e]}thrownewTypeError("Must be between 0 and 63: "+e)};r.decode=function(e){varr=65;varn=90;vart=97;varo=122;vari=48;vara=57;varu=43;vars=47;varl=26;varc=52;if(r<=e&&e<=n){returne-r}if(t<=e&&e<=o){returne-t+l}if(i<=e&&e<=a){returne-i+c}if(e==u){return62}if(e==s){return63}return-1}},345:(e,r)=>{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;functionrecursiveSearch(e,n,t,o,i,a){varu=Math.floor((n-e)/2)+e;vars=i(t,o[u],true);if(s===0){returnu}elseif(s>0){if(n-u>1){returnrecursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){returnn<o.length?n:-1}else{returnu}}else{if(u-e>1){returnrecursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){returnu}else{returne<0?-1:e}}}r.search=functionsearch(e,n,t,o){if(n.length===0){return-1}vari=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}returni}},680:(e,r,n)=>{vart=n(339);functiongeneratedPositionAfter(e,r){varn=e.generatedLine;varo=r.generatedLine;vari=e.generatedColumn;vara=r.generatedColumn;returno>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}functionMappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=functionMappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=functionMappingList_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=functionMappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}returnthis._array};r.H=MappingList},758:(e,r)=>{functionswap(e,r,n){vart=e[r];e[r]=e[n];e[n]=t}functionrandomIntInRange(e,r){returnMath.round(e+Math.random()*(r-e))}functiondoQuickSort(e,r,n,t){if(n<t){varo=randomIntInRange(n,t);vari=n-1;swap(e,o,t);vara=e[t];for(varu=n;u<t;u++){if(r(e[u],Line truncated
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.