Compare commits

...
37 Commits
Author SHA1 Message Date
CrazyMax 5bddaa4323 Merge pull request #66 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.21.1
build(deps): bump @docker/actions-toolkit from 0.18.0 to 0.21.1
2024-04-25 11:39:39 +02:00
CrazyMax 17819a1af9 chore: update generated content 2024-04-25 11:23:13 +02:00
dependabot[bot] d20884258e build(deps): bump @docker/actions-toolkit from 0.18.0 to 0.21.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.18.0 to 0.21.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.18.0...v0.21.1)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25 09:06:09 +00:00
CrazyMax b74351ab97 Merge pull request #68 from MatthewCane/truncate-rundir-path-name
truncate runDir path name
2024-04-25 10:33:54 +02:00
CrazyMax 0f5a011c3d Merge pull request #69 from crazy-max/pin-macos-vers
ci: pin to macos-13
2024-04-25 10:33:11 +02:00
CrazyMax 99cad45695 readme: instruction for macos arm runners 2024-04-25 10:32:43 +02:00
CrazyMax aceee1722e ci: pin to macos-13 2024-04-25 10:32:43 +02:00
Matthew Cane 0cb459c59a chore: update generated content 2024-04-24 13:24:26 +01:00
Matthew Cane 81886c7276 Truncate runDir path name 2024-04-24 11:49:01 +01:00
CrazyMax fdc6583d4e Merge pull request #64 from crazy-max/ci-codecov-token
ci: set CODECOV_TOKEN
2024-04-08 09:49:45 +02:00
CrazyMax a4b15f09d5 ci: set CODECOV_TOKEN 2024-04-08 09:48:20 +02:00
CrazyMax c2351bbd0b Merge pull request #59 from crazy-max/ci-concurrency
ci: concurrency checks
2024-02-29 16:41:57 +01:00
CrazyMax c14b6e1c32 ci: concurrency checks 2024-02-29 16:40:39 +01:00
CrazyMax f1d16883d0 Merge pull request #58 from crazy-max/set-host
set-host input to set DOCKER_HOST env var
2024-02-29 16:39:12 +01:00
CrazyMax 5de1d6bef5 chore: update generated content 2024-02-29 16:37:35 +01:00
CrazyMax 7d4fd999a5 set-host input to set DOCKER_HOST env var 2024-02-29 16:37:34 +01:00
CrazyMax 38c07112bd Merge pull request #57 from crazy-max/sock-output
sock output to get docker socket path
2024-02-29 16:31:31 +01:00
CrazyMax c6f8a8a2ba ci: bump default docker version 2024-02-29 16:30:20 +01:00
CrazyMax 2960188cea chore: update generated content 2024-02-29 16:26:07 +01:00
CrazyMax 8e060aa468 sock output to get docker socket path 2024-02-29 16:20:43 +01:00
CrazyMax fc6fa62ba9 Merge pull request #56 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.18.0
build(deps): bump @docker/actions-toolkit from 0.16.1 to 0.18.0
2024-02-29 16:16:29 +01:00
CrazyMax 7864da88cb chore: update generated content 2024-02-29 16:05:35 +01:00
dependabot[bot] 36eedea576 build(deps): bump @docker/actions-toolkit from 0.16.1 to 0.18.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.16.1 to 0.18.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.16.1...v0.18.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 15:03:59 +00:00
CrazyMax 95a170fa60 Merge pull request #52 from crazy-max/dependabot/github_actions/codecov/codecov-action-4
build(deps): bump codecov/codecov-action from 3 to 4
2024-02-02 09:44:29 +01:00
dependabot[bot] 1ea15ee881 build(deps): bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 10:21:57 +00:00
CrazyMax 729d91c21f Merge pull request #51 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.16.1
build(deps): bump @docker/actions-toolkit from 0.16.0 to 0.16.1
2024-01-26 10:50:18 +01:00
dependabot[bot] c553dd0c3f build(deps): bump @docker/actions-toolkit from 0.16.0 to 0.16.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 10:16:31 +00:00
CrazyMax a307846a9f Merge pull request #50 from crazy-max/bump
bump to v3
2023-12-18 11:10:50 +01:00
CrazyMax 57929789e6 bump to v3 2023-12-18 11:10:28 +01:00
CrazyMax d9be6cade4 Merge pull request #49 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.16.0
build(deps): bump @docker/actions-toolkit from 0.14.0 to 0.16.0
2023-12-18 11:03:33 +01:00
CrazyMax e1c24ba1f0 switch to lima 2023-12-18 10:41:37 +01:00
CrazyMax 979d352bf6 chore: update generated content 2023-12-18 10:41:22 +01:00
dependabot[bot] db8a75eba6 build(deps): bump @docker/actions-toolkit from 0.14.0 to 0.16.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.14.0 to 0.16.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.14.0...v0.16.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 09:38:10 +00:00
CrazyMax 69b561f709 Merge pull request #46 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.14.0
build(deps): bump @docker/actions-toolkit from 0.13.0 to 0.14.0
2023-11-17 04:06:41 -08:00
CrazyMax c33ee55bce ci: add macos-13 to the matrix 2023-11-17 12:06:05 +01:00
CrazyMax 12e445b81b chore: update generated content 2023-11-17 11:58:43 +01:00
dependabot[bot] 60457dabd3 build(deps): bump @docker/actions-toolkit from 0.13.0 to 0.14.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-17 10:54:57 +00:00
14 changed files with 1050 additions and 274 deletions

No files matched your search

+46 -10
View File
@@ -1,5 +1,9 @@
name: ci
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
@@ -13,7 +17,7 @@ on:
pull_request:
env:
DOCKER_VERSION: v23.0.6
DOCKER_VERSION: v24.0.9
jobs:
main:
@@ -23,7 +27,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
version:
- pinned
@@ -56,7 +61,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
steps:
-
@@ -66,7 +72,7 @@ jobs:
name: Set up Docker
uses: ./
with:
version: v23.0.0-rc.4
version: v24.0.0-rc.4
channel: test
-
name: Dump context
@@ -80,7 +86,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
steps:
-
@@ -109,7 +116,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
steps:
-
@@ -130,8 +138,9 @@ jobs:
if: always()
uses: crazy-max/ghaction-dump-context@v2
colima-start-args:
runs-on: macos-latest
lima-start-args:
#runs-on: macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
runs-on: macos-13
steps:
-
name: Checkout
@@ -140,7 +149,7 @@ jobs:
name: Set up Docker
uses: ./
env:
COLIMA_START_ARGS: --cpu 4 --memory 8 --disk 32 --dns 1.1.1.1 --dns 8.8.8.8 --dns-host example.com=1.2.3.4
LIMA_START_ARGS: --cpus 4 --memory 8
build-linux:
runs-on: ubuntu-latest
@@ -181,7 +190,14 @@ jobs:
uses: crazy-max/ghaction-dump-context@v2
build-macos:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- macos-12
steps:
-
name: Checkout
@@ -242,3 +258,23 @@ jobs:
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v2
set-host:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker
uses: ./
with:
set-host: true
-
name: List contexts
run: |
docker context ls
-
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v2
+6 -1
View File
@@ -1,5 +1,9 @@
name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -21,6 +25,7 @@ jobs:
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
+4
View File
@@ -1,5 +1,9 @@
name: validate
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
+24 -9
View File
@@ -9,6 +9,11 @@
GitHub Action to set up (download and install) [Docker CE](https://docs.docker.com/engine/).
Works on Linux, macOS and Windows.
> [!WARNING]
> Does not work on macOS runners with ARM architecture (no nested virtualization):
> * https://github.com/crazy-max/ghaction-setup-docker/pull/53
> * https://github.com/docker/actions-toolkit/issues/317
![Screenshot](.github/setup-docker-action.png)
___
@@ -16,9 +21,10 @@ ___
* [Usage](#usage)
* [Quick start](#quick-start)
* [Daemon configuration](#daemon-configuration)
* [Define custom `colima start` arguments (macOS)](#define-custom-colima-start-arguments-macos)
* [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos)
* [Customizing](#customizing)
* [inputs](#inputs)
* [outputs](#outputs)
* [Contributing](#contributing)
* [License](#license)
@@ -38,7 +44,7 @@ jobs:
steps:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
uses: crazy-max/ghaction-setup-docker@v3
```
### Daemon configuration
@@ -60,7 +66,7 @@ jobs:
steps:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
uses: crazy-max/ghaction-setup-docker@v3
with:
daemon-config: |
{
@@ -71,10 +77,10 @@ jobs:
}
```
### Define custom `colima start` arguments (macOS)
### Define custom `limactl start` arguments (macOS)
You can define custom [`colima start` arguments](https://github.com/abiosoft/colima#customizing-the-vm)
using the `COLIMA_START_ARGS` environment variable to customize the VM:
You can define custom [`limactl start` arguments](https://lima-vm.io/docs/reference/limactl_start/)
using the `LIMA_START_ARGS` environment variable to customize the VM:
```yaml
name: ci
@@ -88,16 +94,16 @@ jobs:
steps:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
uses: crazy-max/ghaction-setup-docker@v3
env:
COLIMA_START_ARGS: --cpu 4 --memory 8 --disk 32
LIMA_START_ARGS: --cpus 4 --memory 8
```
## Customizing
### inputs
Following inputs can be used as `step.with` keys
The following inputs can be used as `step.with` keys
| Name | Type | Default | Description |
|-----------------|--------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|
@@ -105,6 +111,15 @@ Following inputs can be used as `step.with` keys
| `channel` | String | `stable` | Docker CE [channel](https://download.docker.com/linux/static/) (e.g, `stable`, `edge` or `test`). |
| `daemon-config` | String | | [Docker daemon JSON configuration](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) |
| `context` | String | `setup-docker-action` | Docker context name. |
| `set-host` | Bool | `false` | Set `DOCKER_HOST` environment variable to docker socket path. |
### outputs
The following outputs are available
| Name | Type | Description |
|--------|--------|--------------------|
| `sock` | String | Docker socket path |
## Contributing
-56
View File
@@ -1,56 +0,0 @@
# Troubleshooting
## macOS: `qemu[stderr]: qemu-system-x86_64: Unknown Error`
Colima may fail to start with the following error:
```
time="2023-08-26T06:30:33Z" level=info msg="[hostagent] Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.lima/colima/serial*.log\")"
time="2023-08-26T06:30:34Z" level=info msg="SSH Local Port: 49209"
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 3: \"ssh\""
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Driver stopped due to error: \"exit status 255\""
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Shutting down the host agent"
time="2023-08-26T06:30:34Z" level=warning msg="[hostagent] failed to exit SSH master"
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Shutting down QEMU with ACPI"
time="2023-08-26T06:30:34Z" level=warning msg="[hostagent] failed to open the QMP socket \"/Users/runner/.lima/colima/qmp.sock\", forcibly killing QEMU"
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] QEMU has already exited"
time="2023-08-26T06:30:34Z" level=fatal msg="exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see \"/Users/runner/.lima/colima/ha.stderr.log\")"
time="2023-08-26T06:30:34Z" level=fatal msg="error starting vm: error at 'creating and starting': exit status 1"
```
```
{"level":"debug","msg":"executing [ssh-keygen -t ed25519 -q -N -f /Users/runner/.lima/_config/user]","time":"2023-08-26T07:16:40Z"}
{"level":"debug","msg":"Creating iso file /Users/runner/.lima/colima/cidata.iso","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"Using /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/diskfs_iso3418167253 as workspace","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"QEMU version 8.0.4 detected","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"firmware candidates = [/Users/runner/.local/share/qemu/edk2-x86_64-code.fd /Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd /usr/share/OVMF/OVMF_CODE.fd /usr/share/qemu/ovmf-x86_64-code.bin /usr/share/edk2-ovmf/x64/OVMF_CODE.fd]","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.lima/colima/serial*.log\")","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"qCmd.Args: [/Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/bin/qemu-system-x86_64 -m 2048 -cpu host,-pdpe1gb -machine q35,accel=hvf -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/runner/.lima/colima/basedisk,format=raw,media=cdrom,readonly=on -drive file=/Users/runner/.lima/colima/diffdisk,if=virtio,discard=on -drive id=cdrom0,if=none,format=raw,readonly=on,file=/Users/runner/.lima/colima/cidata.iso -device virtio-scsi-pci,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=cdrom0 -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:49168-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:be:6e:dd -device virtio-rng-pci -display none -device virtio-vga -device virtio-keyboard-pci -device virtio-mouse-pci -device qemu-xhci,id=usb-bus -parallel none -chardev socket,id=char-serial,path=/Users/runner/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/runner/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-serial-virtio,path=/Users/runner/.lima/colima/serialv.sock,server=on,wait=off,logfile=/Users/runner/.lima/colima/serialv.log -device virtio-serial-pci,id=virtio-serial0,max_ports=1 -device virtconsole,chardev=char-serial-virtio,id=console0 -virtfs local,mount_tag=mount0,path=/Users/runner,security_model=none -virtfs local,mount_tag=mount1,path=/tmp/colima,security_model=none -chardev socket,id=char-qmp,path=/Users/runner/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/runner/.lima/colima/qemu.pid]","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 3: \"ssh\"","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/runner/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=runner -o ControlMaster=auto -o ControlPath=\"/Users/runner/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 49168 127.0.0.1 -- /bin/bash]","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49168: Connection refused\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49168: Connection refused\\r\\n\": exit status 255","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"qemu[stderr]: qemu-system-x86_64: Unknown Error","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Driver stopped due to error: \"exit status 255\"","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Shutting down the host agent","time":"2023-08-26T07:16:44Z"}
{"level":"debug","msg":"shutting down the SSH master","time":"2023-08-26T07:16:44Z"}
{"level":"debug","msg":"executing ssh for exiting the master: /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/runner/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=runner -o ControlMaster=auto -o ControlPath=\"/Users/runner/.lima/colima/ssh.sock\" -o ControlPersist=5m -O exit -p 49168 127.0.0.1]","time":"2023-08-26T07:16:44Z"}
{"error":"failed to execute `ssh -O exit -p 49168 127.0.0.1`, out=\"Control socket connect(/Users/runner/.lima/colima/ssh.sock): No such file or directory\\r\\n\": exit status 255","level":"warning","msg":"failed to exit SSH master","time":"2023-08-26T07:16:44Z"}
{"level":"info","msg":"Shutting down QEMU with ACPI","time":"2023-08-26T07:16:44Z"}
{"error":"dial unix /Users/runner/.lima/colima/qmp.sock: connect: connection refused","level":"warning","msg":"failed to open the QMP socket \"/Users/runner/.lima/colima/qmp.sock\", forcibly killing QEMU","time":"2023-08-26T07:16:44Z"}
{"level":"info","msg":"QEMU has already exited","time":"2023-08-26T07:16:44Z"}
```
To fix this issue you can replace the existing signature of QEMU binary with
the required entitlements as suggested in https://github.com/abiosoft/colima/issues/786#issuecomment-1693629650.
This can be done within this action by setting the env var `SIGN_QEMU_BINARY=1`:
```yaml
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
env:
SIGN_QEMU_BINARY: 1
```
+12 -5
View File
@@ -17,38 +17,45 @@ describe('getInputs', () => {
[
0,
new Map<string, string>([
['version', 'v23.0.1'],
['version', 'v24.0.8'],
['set-host', 'false'],
]),
{
version: 'v23.0.1',
version: 'v24.0.8',
channel: '',
context: '',
daemonConfig: '',
setHost: false
} as context.Inputs
],
[
1,
new Map<string, string>([
['version', 'v23.0.0-rc.4'],
['version', 'v24.0.0-rc.4'],
['channel', 'test'],
['context', 'foo'],
['daemon-config', `{"debug":true,"features":{"containerd-snapshotter":true}}`],
['set-host', 'false'],
]),
{
version: 'v23.0.0-rc.4',
version: 'v24.0.0-rc.4',
channel: 'test',
context: 'foo',
daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}`,
setHost: false
} as context.Inputs
],
[
2,
new Map<string, string>([]),
new Map<string, string>([
['set-host', 'true'],
]),
{
version: 'latest',
channel: '',
context: '',
daemonConfig: '',
setHost: true
} as context.Inputs
]
])(
+9 -1
View File
@@ -8,7 +8,7 @@ branding:
inputs:
version:
description: 'Docker CE version. (e.g, v23.0.1)'
description: 'Docker CE version. (e.g, v24.0.9)'
required: false
default: 'latest'
channel:
@@ -20,6 +20,14 @@ inputs:
context:
description: 'Docker context name. (default setup-docker-action)'
required: false
set-host:
description: 'Set DOCKER_HOST environment variable to docker socket path'
default: 'false'
required: false
outputs:
sock:
description: "Docker socket path"
runs:
using: 'node20'
Generated Vendored
+19 -5
View File
@@ -1,10 +1,24 @@
require('./sourcemap-register.js');(()=>{var r={7351:function(r,A,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(r,A,s,i){if(i===undefined)i=s;Object.defineProperty(r,i,{enumerable:true,get:function(){return A[s]}})}:function(r,A,s,i){if(i===undefined)i=s;r[i]=A[s]});var a=this&&this.__setModuleDefault||(Object.create?function(r,A){Object.defineProperty(r,"default",{enumerable:true,value:A})}:function(r,A){r["default"]=A});var c=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var A={};if(r!=null)for(var s in r)if(s!=="default"&&Object.hasOwnProperty.call(r,s))i(A,r,s);a(A,r);return A};Object.defineProperty(A,"__esModule",{value:true});A.issue=A.issueCommand=void 0;const l=c(s(2037));const u=s(5278);function issueCommand(r,A,s){const i=new Command(r,A,s);process.stdout.write(i.toString()+l.EOL)}A.issueCommand=issueCommand;function issue(r,A=""){issueCommand(r,{},A)}A.issue=issue;const g="::";class Command{constructor(r,A,s){if(!r){r="missing.command"}this.command=r;this.properties=A;this.message=s}toString(){let r=g+this.command;if(this.properties&&Object.keys(this.properties).length>0){r+=" ";let A=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(A){A=false}else{r+=","}r+=`${s}=${escapeProperty(i)}`}}}}r+=`${g}${escapeData(this.message)}`;return r}}function escapeData(r){return u.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(r){return u.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(r,A,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(r,A,s,i){if(i===undefined)i=s;Object.defineProperty(r,i,{enumerable:true,get:function(){return A[s]}})}:function(r,A,s,i){if(i===undefined)i=s;r[i]=A[s]});var a=this&&this.__setModuleDefault||(Object.create?function(r,A){Object.defineProperty(r,"default",{enumerable:true,value:A})}:function(r,A){r["default"]=A});var c=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var A={};if(r!=null)for(var s in r)if(s!=="default"&&Object.hasOwnProperty.call(r,s))i(A,r,s);a(A,r);return A};var l=this&&this.__awaiter||function(r,A,s,i){function adopt(r){return r instanceof s?r:new s((function(A){A(r)}))}return new(s||(s=Promise))((function(s,a){function fulfilled(r){try{step(i.next(r))}catch(r){a(r)}}function rejected(r){try{step(i["throw"](r))}catch(r){a(r)}}function step(r){r.done?s(r.value):adopt(r.value).then(fulfilled,rejected)}step((i=i.apply(r,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.getIDToken=A.getState=A.saveState=A.group=A.endGroup=A.startGroup=A.info=A.notice=A.warning=A.error=A.debug=A.isDebug=A.setFailed=A.setCommandEcho=A.setOutput=A.getBooleanInput=A.getMultilineInput=A.getInput=A.addPath=A.setSecret=A.exportVariable=A.ExitCode=void 0;const u=s(7351);const g=s(717);const h=s(5278);const d=c(s(2037));const p=c(s(1017));const E=s(8041);var C;(function(r){r[r["Success"]=0]="Success";r[r["Failure"]=1]="Failure"})(C=A.ExitCode||(A.ExitCode={}));function exportVariable(r,A){const s=h.toCommandValue(A);process.env[r]=s;const i=process.env["GITHUB_ENV"]||"";if(i){return g.issueFileCommand("ENV",g.prepareKeyValueMessage(r,A))}u.issueCommand("set-env",{name:r},s)}A.exportVariable=exportVariable;function setSecret(r){u.issueCommand("add-mask",{},r)}A.setSecret=setSecret;function addPath(r){const A=process.env["GITHUB_PATH"]||"";if(A){g.issueFileCommand("PATH",r)}else{u.issueCommand("add-path",{},r)}process.env["PATH"]=`${r}${p.delimiter}${process.env["PATH"]}`}A.addPath=addPath;function getInput(r,A){const s=process.env[`INPUT_${r.replace(/ /g,"_").toUpperCase()}`]||"";if(A&&A.required&&!s){throw new Error(`Input required and not supplied: ${r}`)}if(A&&A.trimWhitespace===false){return s}return s.trim()}A.getInput=getInput;function getMultilineInput(r,A){const s=getInput(r,A).split("\n").filter((r=>r!==""));if(A&&A.trimWhitespace===false){return s}return s.map((r=>r.trim()))}A.getMultilineInput=getMultilineInput;function getBooleanInput(r,A){const s=["true","True","TRUE"];const i=["false","False","FALSE"];const a=getInput(r,A);if(s.includes(a))return true;if(i.includes(a))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${r}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}A.getBooleanInput=getBooleanInput;function setOutput(r,A){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return g.issueFileCommand("OUTPUT",g.prepareKeyValueMessage(r,A))}process.stdout.write(d.EOL);u.issueCommand("set-output",{name:r},h.toCommandValue(A))}A.setOutput=setOutput;function setCommandEcho(r){u.issue("echo",r?"on":"off")}A.setCommandEcho=setCommandEcho;function setFailed(r){process.exitCode=C.Failure;error(r)}A.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}A.isDebug=isDebug;functiLine truncated
require('./sourcemap-register.js');(()=>{var e={27799:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.restoreCache=t.isFeatureAvailable=t.ReserveCacheError=t.ValidationError=void 0;const o=s(r(70448));const c=s(r(71017));const l=s(r(91518));const p=s(r(98245));const d=r(56490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,r,i,n=false){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const s=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(s));if(s.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of s){checkKey(e)}const a=yield l.getCompressionMethod();let u="";try{const t=yield p.getCacheEntry(s,e,{compressionMethod:a,enableCrossOsArchive:n});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}if(i===null||i===void 0?void 0:i.lookupOnly){o.info("Lookup only - skipping download");return t.cacheKey}u=c.join(yield l.createTempDirectory(),l.getCacheFileName(a));o.debug(`Archive Path: ${u}`);yield p.downloadCache(t.archiveLocation,u,i);if(o.isDebug()){yield(0,d.listTar)(u,a)}const r=l.getArchiveFileSizeInBytes(u);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(u,a);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield l.unlinkFile(u)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var n,s,u,A,m;return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=yield l.getCompressionMethod();let h=-1;const g=yield l.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(g)}`);if(g.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const E=yield l.createTempDirectory();const y=c.join(E,l.getCacheFileName(a));o.debug(`Archive Path: ${y}`);try{yield(0,d.createTar)(E,g,a);if(o.isDebug()){yield(0,d.listTar)(y,a)}const c=10*1024*1024*1024;const C=l.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${C}`);if(C>c&&!l.isGhes()){throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:a,enableCrossOsArchive:i,cacheSize:C});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){h=(s=b===null||b===void 0?void 0:b.result)===null||s===void 0?void 0:s.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((A=(u=b===null||b===void 0?void 0:b.error)===null||u===void 0?void 0:u.message)!==null&&A!==void 0?A:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(m=b===null||b===void 0?void Line truncated
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function isObject(r){return Object.prototype.toString.call(r)==="[object Object]"}function isPlainObject(r){var A,s;if(isObject(r)===false)return false;A=r.constructor;if(A===undefined)return true;s=A.prototype;if(isObject(s)===false)return false;if(s.hasOwnProperty("isPrototypeOf")===false){return false}return true}A.isPlainObject=isPlainObject},1917:(r,A,s)=>{"use strict";var i=s(1161);var a=s(8866);function renamed(r,A){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. "+"Use yaml."+A+" instead, which is now safe by default.")}}r.exports.Type=s(6073);r.exports.Schema=s(1082);r.exports.FAILSAFE_SCHEMA=s(8562);r.exports.JSON_SCHEMA=s(1035);r.exports.CORE_SCHEMA=s(2011);r.exports.DEFAULT_SCHEMA=s(8759);r.exports.load=i.load;r.exports.loadAll=i.loadAll;r.exports.dump=a.dump;r.exports.YAMLException=s(8179);r.exports.types={binary:s(7900),float:s(2705),map:s(6150),null:s(721),pairs:s(6860),set:s(9548),timestamp:s(9212),bool:s(4993),int:s(1615),merge:s(6104),omap:s(9046),seq:s(7283),str:s(3619)};r.exports.safeLoad=renamed("safeLoad","load");r.exports.safeLoadAll=renamed("safeLoadAll","loadAll");r.exports.safeDump=renamed("safeDump","dump")},6829:r=>{"use strict";function isNothing(r){return typeof r==="undefined"||r===null}function isObject(r){return typeof r==="object"&&r!==null}function toArray(r){if(Array.isArray(r))return r;else if(isNothing(r))return[];return[r]}function extend(r,A){var s,i,a,c;if(A){c=Object.keys(A);for(s=0,i=c.length;s<i;s+=1){a=c[s];r[a]=A[a]}}return r}function repeat(r,A){var s="",i;for(i=0;i<A;i+=1){s+=r}return s}function isNegativeZero(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}r.exports.isNothing=isNothing;r.exports.isObject=isObject;r.exports.toArray=toArray;r.exports.repeat=repeat;r.exports.isNegativeZero=isNegativeZero;r.exports.extend=extend},8866:(r,A,s)=>{"use strict";var i=s(6829);var a=s(8179);var c=s(8759);var l=Object.prototype.toString;var u=Object.prototype.hasOwnProperty;var g=65279;var h=9;var d=10;var p=13;var E=32;var C=33;var I=34;var Q=35;var B=37;var m=38;var y=39;var w=42;var b=44;var R=45;var k=58;var v=61;var S=62;var D=63;var _=64;var T=91;var N=93;var F=96;var L=123;var U=124;var M=125;var O={};O[0]="\\0";O[7]="\\a";O[8]="\\b";O[9]="\\t";O[10]="\\n";O[11]="\\v";O[12]="\\f";O[13]="\\r";O[27]="\\e";O[34]='\\"';O[92]="\\\\";O[133]="\\N";O[160]="\\_";O[8232]="\\L";O[8233]="\\P";var G=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var P=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(r,A){var s,i,a,c,l,g,h;if(A===null)return{};s={};i=Object.keys(A);for(a=0,c=i.length;a<c;a+=1){l=i[a];g=String(A[l]);if(l.slice(0,2)==="!!"){l="tag:yaml.org,2002:"+l.slice(2)}h=r.compiledTypeMap["fallback"][l];if(h&&u.call(h.styleAliases,g)){g=h.styleAliases[g]}s[l]=g}return s}function encodeHex(r){var A,s,c;A=r.toString(16).toUpperCase();if(r<=255){s="x";c=2}else if(r<=65535){s="u";c=4}else if(r<=4294967295){s="U";c=8}else{throw new a("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+s+i.repeat("0",c-A.length)+A}var x=1,H=2;function State(r){this.schema=r["schema"]||c;this.indent=Math.max(1,r["indent"]||2);this.noArrayIndent=r["noArrayIndent"]||false;this.skipInvalid=r["skipInvalid"]||false;this.flowLevel=i.isNothing(r["flowLevel"])?-1:r["flowLevel"];this.styleMap=compileStyleMap(this.schema,r["styles"]||null);this.sortKeys=r["sortKeys"]||false;this.lineWidth=r["lineWidth"]||80;this.noRefs=r["noRefs"]||false;this.noCompatMode=r["noCompatMode"]||false;this.condenseFlow=r["condenseFlow"]||false;this.quotingType=r["quotingType"]==='"'?H:x;this.forceQuotes=r["forceQuotes"]||false;this.replacer=typeof r["replacer"]==="function"?r["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(r,A){var s=i.repeat(" ",A),a=0,c=-1,l="",u,g=r.length;while(a<g){c=r.indexOf("\n",a);if(c===-1){u=r.slice(a);a=g}else{u=r.slice(a,c+1);a=c+1}if(u.length&&u!=="\n")l+=s;l+=u}return l}function generateNextLine(r,A){return"\n"+i.repeat(" ",r.indent*A)}function testImplicitResolving(r,A){var s,i,a;for(s=0,i=r.implicitTypes.length;s<i;s+=1){a=r.implicitTypes[s];if(a.resolve(A)){return true}}return false}function isWhitespace(r){return r===E||r===h}function isPrintable(r){return 32<=r&&r<=126||161<=r&&r<=55295&&r!==8232&&r!==8233||57344<=r&&r<=65533&&r!==g||65536<=r&&r<=1114111}function isNsCharOrWhitespace(r){return isPrintable(r)&&r!==g&&r!==p&&r!==d}function isPlainSafe(r,A,s){var i=isNsCharOrWhitespace(r);var a=i&&!isWhitespace(r);return(s?i:i&&r!==b&&r!==T&&r!==N&&r!==L&&r!==M)&&r!==Q&&!(A===k&&!a)||isNsCharOrWhitespace(A)&&!isWhitespace(A)&&r===Q||A===k&&a}function isPlainSafeFirst(r){return isPrintable(r)&&r!==g&&!isWhitespace(r)&&r!==R&&r!==D&&r!==k&&r!==b&&r!==T&&r!==N&&r!==L&&r!==M&&r!==Q&&r!==m&&r!==w&&r!==C&&r!==U&&r!==v&&r!==S&&r!=Line truncated
*/function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;r=t.prototype;if(isObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}t.isPlainObject=isPlainObject},47426:(e,t,r)=>{
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/
e.exports=r(53765)},43583:(e,t,r)=>{"use strict";
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/var i=r(47426);var n=r(71017).extname;var s=/^\s*([^;\s]*)(?:;|\s|$)/;var a=/^text\//i;t.charset=charset;t.charsets={lookup:charset};t.contentType=contentType;t.extension=extension;t.extensions=Object.create(null);t.lookup=lookup;t.types=Object.create(null);populateMaps(t.extensions,t.types);function charset(e){if(!e||typeof e!=="string"){return false}var t=s.exec(e);var r=t&&i[t[1].toLowerCase()];if(r&&r.charset){return r.charset}if(t&&a.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var r=e.indexOf("/")===-1?t.lookup(e):e;if(!r){return false}if(r.indexOf("charset")===-1){var i=t.charset(r);if(i)r+="; charset="+i.toLowerCase()}return r}function extension(e){if(!e||typeof e!=="string"){return false}var r=s.exec(e);var i=r&&t.extensions[r[1].toLowerCase()];if(!i||!i.length){return false}return i[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var r=n("x."+e).toLowerCase().substr(1);if(!r){return false}return t.types[r]||false}function populateMaps(e,t){var r=["nginx","apache",undefined,"iana"];Object.keys(i).forEach((function forEachMimeType(n){var s=i[n];var a=s.extensions;if(!a||!a.length){return}e[n]=a;for(var o=0;o<a.length;o++){var c=a[o];if(t[c]){var l=r.indexOf(i[t[c]].source);var p=r.indexOf(s.source);if(t[c]!=="application/octet-stream"&&(l>p||l===p&&t[c].substr(0,12)==="application/")){continue}}t[c]=n}}))}},83973:(e,t,r)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var i=function(){try{return r(71017)}catch(e){}}()||{sep:"/"};minimatch.sep=i.sep;var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var s=r(33717);var a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var o="[^/]";var c=o+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var p="(?:(?!(?:\\/|^)\\.).)*?";var d=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var u=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){t=t||{};var r={};Object.keys(e).forEach((function(t){r[t]=e[t]}));Object.keys(t).forEach((function(e){r[e]=t[e]}));return r}minimatch.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}var t=minimatch;var r=function minimatch(r,i,n){return t(r,i,ext(e,n))};r.Minimatch=function Minimatch(r,i){return new t.Minimatch(r,ext(e,i))};r.Minimatch.defaults=function defaults(r){return t.defaults(ext(e,r)).Minimatch};r.filter=function filter(r,i){return t.filter(r,ext(e,i))};r.defaults=function defaults(r){return t.defaults(ext(e,r))};r.makeRe=function makeRe(r,i){return t.makeRe(r,ext(e,i))};r.braceExpand=function braceExpand(r,i){return t.braceExpand(r,ext(e,i))};r.match=function(r,i,n){return t.match(r,i,ext(e,n))};return r};Minimatch.defaults=function(e){return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){assertValidPattern(t);if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}assertValidPattern(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,r);r=this.globParts=r.map((function(e){return e.split(u)}));this.debug(this.pattern,r);r=r.map((function(e,t,r){return e.map(this.parse,this)}),this);this.debug(this.pattern,r);r=r.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var i=0;if(r.nonegate)return;for(var n=0,s=e.length;n<s&&e.charAt(n)==="!";n++){t=!t;i++}if(i)this.pattern=e.substr(i);this.negate=t}minimatch.braceExpand=function(e,t){return braceExpand(e,t)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(e,t){if(!t){if(this instanceof Minimatch){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;assertValidPattern(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return s(e)}var A=1024*64;var assertValidPattern=function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>A){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var m={};function parse(e,t){assertValidPattern(e);var r=this.options;if(e==="**"){if(!r.noglobstar)return n;else e=Line truncated
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var r=16384;var i=[];var n;var s;var a=-1;var o=arguments.length;if(!o){return""}var c="";while(++a<o){var l=Number(arguments[a]);if(!isFinite(l)||l<0||l>1114111||t(l)!==l){throw RangeError("Invalid code point: "+l)}if(l<=65535){i.push(l)}else{l-=65536;n=(l>>10)+55296;s=l%1024+56320;i.push(n,s)}if(a+1===o||i.length>r){c+=e.apply(null,i);i.length=0}}return c};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},26375:(e,t,r)=>{var i=r(12344);var n=Object.prototype.hasOwnProperty;var s=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=s?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,t){var r=new ArraySet;for(var i=0,n=e.length;i<n;i++){r.add(e[i],t)}return r};ArraySet.prototype.size=function ArraySet_size(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length};ArraySet.prototype.add=function ArraySet_add(e,t){var r=s?e:i.toSetString(e);var a=s?this.has(e):n.call(this._set,r);var o=this._array.length;if(!a||t){this._array.push(e)}if(!a){if(s){this._set.set(e,o)}else{this._set[r]=o}}};ArraySet.prototype.has=function ArraySet_has(e){if(s){return this._set.has(e)}else{var t=i.toSetString(e);return n.call(this._set,t)}};ArraySet.prototype.indexOf=function ArraySet_indexOf(e){if(s){var t=this._set.get(e);if(t>=0){return t}}else{var r=i.toSetString(e);if(n.call(this._set,r)){return this._set[r]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e<this._array.length){return this._array[e]}throw new Error("No element indexed by "+e)};ArraySet.prototype.toArray=function ArraySet_toArray(){return this._array.slice()};t.I=ArraySet},10975:(e,t,r)=>{var i=r(6156);var n=5;var s=1<<n;var a=s-1;var o=s;function toVLQSigned(e){return e<0?(-e<<1)+1:(e<<1)+0}function fromVLQSigned(e){var t=(e&1)===1;var r=e>>1;return t?-r:r}t.encode=function base64VLQ_encode(e){var t="";var r;var s=toVLQSigned(e);do{r=s&a;s>>>=n;if(s>0){r|=o}t+=i.encode(r)}while(s>0);return t};t.decode=function base64VLQ_decode(e,t,r){var s=e.length;var c=0;var l=0;var p,d;do{if(t>=s){throw new Error("Expected more digits in base 64 VLQ value.")}d=i.decode(e.charCodeAt(t++));if(d===-1){throw new Error("Invalid base64 digit: "+e.charAt(t-1))}p=!!(d&o);d&=a;c=c+(d<<l);l+=n}while(p);r.value=fromVLQSigned(c);r.rest=t}},6156:(e,t)=>{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length){return r[e]}throw new TypeError("Must be between 0 and 63: "+e)};t.decode=function(e){var t=65;var r=90;var i=97;var n=122;var s=48;var a=57;var o=43;var c=47;var l=26;var p=52;if(t<=e&&e<=r){return e-t}if(i<=e&&e<=n){return e-i+l}if(s<=e&&e<=a){return e-s+p}if(e==o){return 62}if(e==c){return 63}return-1}},33600:(e,t)=>{t.GREATEST_LOWER_BOUND=1;t.LEAST_UPPER_BOUND=2;function recursiveSearch(e,r,i,n,s,a){var o=Math.floor((r-e)/2)+e;var c=s(i,n[o],true);if(c===0){return o}else if(c>0){if(r-o>1){return recursiveSearch(o,r,i,n,s,a)}if(a==t.LEAST_UPPER_BOUND){return r<n.length?r:-1}else{return o}}else{if(o-e>1){return recursiveSearch(e,o,i,n,s,a)}if(a==t.LEAST_UPPER_BOUND){return o}else{return e<0?-1:e}}}t.search=function search(e,r,i,n){if(r.length===0){return-1}var s=recursiveSearch(-1,r.length,e,r,i,n||t.GREATEST_LOWER_BOUND);if(s<0){return-1}while(s-1>=0){if(i(r[s],r[s-1],true)!==0){break}--s}return s}},86817:(e,t,r)=>{var i=r(12344);function generatedPositionAfter(e,t){var r=e.generatedLine;var n=t.generatedLine;var s=e.generatedColumn;var a=t.generatedColumn;return n>r||n==r&&a>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,t){this._array.forEach(e,t)};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(i.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};t.H=MappingList},73254:(e,t)=>{function swap(e,t,r){var i=e[t];e[t]=e[r];e[r]=i}function randomIntInRange(e,t){return Math.round(e+Math.random()*(t-e))}function doQuickSort(e,t,r,i){if(r<i){var n=randomIntInRange(r,i);var s=r-1;swap(e,n,i);var a=e[i];for(var o=r;o<i;o++){if(t(e[o],a)<=0){s+=1;swap(e,s,o)}}swap(e,s+1,o);var c=s+1;doQuickSort(e,t,r,c-1);doQuickSort(e,t,c+1,i)}}t.U=function(e,t){doQuickSort(e,t,0,e.length-1)}},75155:(e,t,r)=>{var i;var n=r(12344);var s=r(33600);var a=r(26375).I;var o=r(10975);var c=r(73254).U;function SourceMapConsuLine truncated
/*!
* Tmp
*
@@ -12,7 +26,7 @@ require('./sourcemap-register.js');(()=>{var r={7351:function(r,A,s){"use strict
*
* MIT Licensed
*/
const i=s(7147);const a=s(2037);const c=s(1017);const l=s(6113);const u={fs:i.constants,os:a.constants};const g=s(4959);const h="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",d=/XXXXXX/,p=3,E=(u.O_CREAT||u.fs.O_CREAT)|(u.O_EXCL||u.fs.O_EXCL)|(u.O_RDWR||u.fs.O_RDWR),C=a.platform()==="win32",I=u.EBADF||u.os.errno.EBADF,Q=u.ENOENT||u.os.errno.ENOENT,B=448,m=384,y="exit",w=[],b=i.rmdirSync.bind(i),R=g.sync;let k=false;function tmpName(r,A){const s=_parseArguments(r,A),a=s[0],c=s[1];try{_assertAndSanitizeOptions(a)}catch(r){return c(r)}let l=a.tries;(function _getUniqueName(){try{const r=_generateTmpName(a);i.stat(r,(function(A){if(!A){if(l-- >0)return _getUniqueName();return c(new Error("Could not get a unique tmp filename, max tries reached "+r))}c(null,r)}))}catch(r){c(r)}})()}function tmpNameSync(r){const A=_parseArguments(r),s=A[0];_assertAndSanitizeOptions(s);let a=s.tries;do{const r=_generateTmpName(s);try{i.statSync(r)}catch(A){return r}}while(a-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(r,A){const s=_parseArguments(r,A),a=s[0],c=s[1];tmpName(a,(function _tmpNameCreated(r,A){if(r)return c(r);i.open(A,E,a.mode||m,(function _fileCreated(r,s){if(r)return c(r);if(a.discardDescriptor){return i.close(s,(function _discardCallback(r){return c(r,A,undefined,_prepareTmpFileRemoveCallback(A,-1,a,false))}))}else{const r=a.discardDescriptor||a.detachDescriptor;c(null,A,s,_prepareTmpFileRemoveCallback(A,r?-1:s,a,false))}}))}))}function fileSync(r){const A=_parseArguments(r),s=A[0];const a=s.discardDescriptor||s.detachDescriptor;const c=tmpNameSync(s);var l=i.openSync(c,E,s.mode||m);if(s.discardDescriptor){i.closeSync(l);l=undefined}return{name:c,fd:l,removeCallback:_prepareTmpFileRemoveCallback(c,a?-1:l,s,true)}}function dir(r,A){const s=_parseArguments(r,A),a=s[0],c=s[1];tmpName(a,(function _tmpNameCreated(r,A){if(r)return c(r);i.mkdir(A,a.mode||B,(function _dirCreated(r){if(r)return c(r);c(null,A,_prepareTmpDirRemoveCallback(A,a,false))}))}))}function dirSync(r){const A=_parseArguments(r),s=A[0];const a=tmpNameSync(s);i.mkdirSync(a,s.mode||B);return{name:a,removeCallback:_prepareTmpDirRemoveCallback(a,s,true)}}function _removeFileAsync(r,A){const _handler=function(r){if(r&&!_isENOENT(r)){return A(r)}A()};if(0<=r[0])i.close(r[0],(function(){i.unlink(r[1],_handler)}));else i.unlink(r[1],_handler)}function _removeFileSync(r){let A=null;try{if(0<=r[0])i.closeSync(r[0])}catch(r){if(!_isEBADF(r)&&!_isENOENT(r))throw r}finally{try{i.unlinkSync(r[1])}catch(r){if(!_isENOENT(r))A=r}}if(A!==null){throw A}}function _prepareTmpFileRemoveCallback(r,A,s,i){const a=_prepareRemoveCallback(_removeFileSync,[A,r],i);const c=_prepareRemoveCallback(_removeFileAsync,[A,r],i,a);if(!s.keep)w.unshift(a);return i?a:c}function _prepareTmpDirRemoveCallback(r,A,s){const a=A.unsafeCleanup?g:i.rmdir.bind(i);const c=A.unsafeCleanup?R:b;const l=_prepareRemoveCallback(c,r,s);const u=_prepareRemoveCallback(a,r,s,l);if(!A.keep)w.unshift(l);return s?l:u}function _prepareRemoveCallback(r,A,s,i){let a=false;return function _cleanupCallback(c){if(!a){const l=i||_cleanupCallback;const u=w.indexOf(l);if(u>=0)w.splice(u,1);a=true;if(s||r===b||r===R){return r(A)}else{return r(A,c||function(){})}}}}function _garbageCollector(){if(!k)return;while(w.length){try{w[0]()}catch(r){}}}function _randomChars(r){let A=[],s=null;try{s=l.randomBytes(r)}catch(A){s=l.pseudoRandomBytes(r)}for(var i=0;i<r;i++){A.push(h[s[i]%h.length])}return A.join("")}function _isBlank(r){return r===null||_isUndefined(r)||!r.trim()}function _isUndefined(r){return typeof r==="undefined"}function _parseArguments(r,A){if(typeof r==="function"){return[{},r]}if(_isUndefined(r)){return[{},A]}const s={};for(const A of Object.getOwnPropertyNames(r)){s[A]=r[A]}return[s,A]}function _generateTmpName(r){const A=r.tmpdir;if(!_isUndefined(r.name))return c.join(A,r.dir,r.name);if(!_isUndefined(r.template))return c.join(A,r.dir,r.template).replace(d,_randomChars(6));const s=[r.prefix?r.prefix:"tmp","-",process.pid,"-",_randomChars(12),r.postfix?"-"+r.postfix:""].join("");return c.join(A,r.dir,s)}function _assertAndSanitizeOptions(r){r.tmpdir=_getTmpDir(r);const A=r.tmpdir;if(!_isUndefined(r.name))_assertIsRelative(r.name,"name",A);if(!_isUndefined(r.dir))_assertIsRelative(r.dir,"dir",A);if(!_isUndefined(r.template)){_assertIsRelative(r.template,"template",A);if(!r.template.match(d))throw new Error(`Invalid template, found "${r.template}".`)}if(!_isUndefined(r.tries)&&isNaN(r.tries)||r.tries<0)throw new Error(`Invalid tries, found "${r.tries}".`);r.tries=_isUndefined(r.name)?r.tries||p:1;r.keep=!!r.keep;r.detachDescriptor=!!r.detachDescriptor;r.discardDescriptor=!!r.discardDescriptor;r.unsafeCleanup=!!r.unsafeCleanup;r.dir=_isUndefined(r.dir)?"":c.relative(A,_resolvePath(r.dir,A));r.template=_isUndefined(r.template)?undefined:c.relative(A,_resolvePath(r.template,A));r.template=_isBlank(r.template)?undefined:c.relative(r.dir,r.template);r.naLine truncated
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=r=>r.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=r=>r.replace(/\r?\n|\r/g,"\r\n");const i=new TextEncoder;const a=[];const c=new Uint8Array([13,10]);p=0;let l=false;for(const[A,u]of r){if(typeof u==="string"){const r=i.encode(s+`; name="${escape(normalizeLinefeeds(A))}"`+`\r\n\r\n${normalizeLinefeeds(u)}\r\n`);a.push(r);p+=r.byteLength}else{const r=i.encode(`${s}; name="${escape(normalizeLinefeeds(A))}"`+(u.name?`; filename="${escape(u.name)}"`:"")+"\r\n"+`Content-Type: ${u.type||"application/octet-stream"}\r\n\r\n`);a.push(r,u,c);if(typeof u.size==="number"){p+=r.byteLength+u.size+c.byteLength}else{l=true}}}const u=i.encode(`--${A}--`);a.push(u);p+=u.byteLength;if(l){p=null}d=r;h=async function*(){for(const r of a){if(r.stream){yield*r.stream()}else{yield r}}};E="multipart/form-data; boundary="+A}else if(l(r)){d=r;p=r.size;if(r.type){E=r.type}}else if(typeof r[Symbol.asyncIterator]==="function"){if(A){throw new TypeError("keepalive")}if(a.isDisturbed(r)||r.locked){throw new TypeError("Response body object should not be disturbed or locked")}i=r instanceof _?r:c(r)}if(typeof d==="string"||a.isBuffer(d)){p=Buffer.byteLength(d)}if(h!=null){let A;i=new _({async start(){A=h(r)[Symbol.asyncIterator]()},async pull(r){const{value:s,done:a}=await A.next();if(a){queueMicrotask((()=>{r.close()}))}else{if(!b(i)){r.enqueue(new Uint8Array(s))}}return r.desiredSize>0},async cancel(r){await A.return()},type:undefined})}const C={stream:i,source:d,length:p};return[C,E]}function safelyExtractBody(r,A=false){if(!_){_=s(5356).ReadableStream}if(r instanceof _){w(!a.isDisturbed(r),"The body has already been consumed.");w(!r.locked,"The stream is locked.")}return extractBody(r,A)}function cloneBody(r){const[A,s]=r.stream.tee();const i=Q(s,{transfer:[s]});const[,a]=i.tee();r.stream=A;return{stream:a,length:r.length,source:r.source}}async function*consumeBody(r){if(r){if(R(r)){yield r}else{const A=r.stream;if(a.isDisturbed(A)){throw new TypeError("The body has already been consumed.")}if(A.locked){throw new TypeError("The stream is locked.")}A[y]=true;yield*A}}}function throwIfAborted(r){if(r.aborted){throw new I("The operation was aborted.","AbortError")}}function bodyMixinMethods(r){const A={blob(){return specConsumeBody(this,(r=>{let A=bodyMimeType(this);if(A==="failure"){A=""}else if(A){A=D(A)}return new B([r],{type:A})}),r)},arrayBuffer(){return specConsumeBody(this,(r=>new Uint8Array(r).buffer),r)},text(){return specConsumeBody(this,utf8DecodeBytes,r)},json(){return specConsumeBody(this,parseJSONFromBytes,r)},async formData(){C.brandCheck(this,r);throwIfAborted(this[E]);const A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){const r={};for(const[A,s]of this.headers)r[A.toLowerCase()]=s;const A=new p;let s;try{s=new i({headers:r,preservePath:true})}catch(r){throw new I(`${r}`,"AbortError")}s.on("field",((r,s)=>{A.append(r,s)}));s.on("file",((r,s,i,a,c)=>{const l=[];if(a==="base64"||a.toLowerCase()==="base64"){let a="";s.on("data",(r=>{a+=r.toString().replace(/[\r\n]/gm,"");const A=a.length-a.length%4;l.push(Buffer.from(a.slice(0,A),"base64"));a=a.slice(A)}));s.on("end",(()=>{l.push(Buffer.from(a,"base64"));A.append(r,new T(l,i,{type:c}))}))}else{s.on("data",(r=>{l.push(r)}));s.on("end",(()=>{A.append(r,new T(l,i,{type:c}))}))}}));const a=new Promise(((r,A)=>{s.on("finish",r);s.on("error",(r=>A(new TypeError(r))))}));if(this.body!==null)for await(const r of consumeBody(this[E].body))s.write(r);s.end();await a;return A}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let A="";const s=new TextDecoder("utf-8",{ignoreBOM:true});for await(const r of consumeBody(this[E].body)){if(!R(r)){throw new TypeError("Expected Uint8Array chunk")}A+=s.decode(r,{stream:true})}A+=s.decode();r=new URLSearchParams(A)}catch(r){throw Object.assign(new TypeError,{cause:r})}const A=new p;for(const[s,i]of r){A.append(s,i)}return A}else{await Promise.resolve();throwIfAborted(this[E]);throw C.errors.exception({header:`${r.name}.formData`,message:"Could not parse content as FormData."})}}};return A}function mixinBody(r){Object.assign(r.prototype,bodyMixinMethods(r))}async function specConsumeBody(r,A,s){C.brandCheck(r,s);throwIfAborted(r[E]);if(bodyUnusable(r[E].body)){throw new TypeError("Body is unusable")}const i=h();const errorSteps=r=>i.reject(r);const successSteps=r=>{try{i.resolve(A(r))}catch(r){errorSteps(r)}};if(r[E].body==null){successSteps(new Uint8Array);return i.promise}await d(r[E].body,successSteps,errorSteps);return i.promise}function bodyUnusable(r){return r!=null&&(r.stream.locked||a.isDisturbed(r.stream))}function utf8DecodeBytes(r){if(r.length===0){return""}if(r[0]===239&&r[1]===187&&r[2]===191){r=r.subarray(3)}const A=(new TextDecoder).decode(r);return A}function parseJSONFromBytes(r){return JSON.parse(utf8DecodeBytes(r))}function bodyMimeType(r){const{heaLine truncated
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */c[a-4]=this.maskKey[0];c[a-3]=this.maskKey[1];c[a-2]=this.maskKey[2];c[a-1]=this.maskKey[3];c[1]=s;if(s===126){c.writeUInt16BE(A,2)}else if(s===127){c[2]=c[3]=0;c.writeUIntBE(A,4,6)}c[1]|=128;for(let r=0;r<A;r++){c[a+r]=this.frameData[r]^this.maskKey[r%4]}return c}}r.exports={WebsocketFrameSend:WebsocketFrameSend}},1688:(r,A,s)=>{"use strict";const{Writable:i}=s(2781);const a=s(7643);const{parserStates:c,opcodes:l,states:u,emptyBuffer:g}=s(9188);const{kReadyState:h,kSentClose:d,kResponse:p,kReceivedClose:E}=s(7578);const{isValidStatusCode:C,failWebsocketConnection:I,websocketMessageReceived:Q}=s(5515);const{WebsocketFrameSend:B}=s(5444);const m={};m.ping=a.channel("undici:websocket:ping");m.pong=a.channel("undici:websocket:pong");class ByteParser extends i{#o=[];#i=0;#a=c.INFO;#c={};#l=[];constructor(r){super();this.ws=r}_write(r,A,s){this.#o.push(r);this.#i+=r.length;this.run(s)}run(r){while(true){if(this.#a===c.INFO){if(this.#i<2){return r()}const A=this.consume(2);this.#c.fin=(A[0]&128)!==0;this.#c.opcode=A[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==l.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==l.BINARY&&this.#c.opcode!==l.TEXT){I(this.ws,"Invalid frame type was fragmented.");return}const s=A[1]&127;if(s<=125){this.#c.payloadLength=s;this.#a=c.READ_DATA}else if(s===126){this.#a=c.PAYLOADLENGTH_16}else if(s===127){this.#a=c.PAYLOADLENGTH_64}if(this.#c.fragmented&&s>125){I(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===l.PING||this.#c.opcode===l.PONG||this.#c.opcode===l.CLOSE)&&s>125){I(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===l.CLOSE){if(s===1){I(this.ws,"Received close frame with a 1-byte body.");return}const r=this.consume(s);this.#c.closeInfo=this.parseCloseBody(false,r);if(!this.ws[d]){const r=Buffer.allocUnsafe(2);r.writeUInt16BE(this.#c.closeInfo.code,0);const A=new B(r);this.ws[p].socket.write(A.createFrame(l.CLOSE),(r=>{if(!r){this.ws[d]=true}}))}this.ws[h]=u.CLOSING;this.ws[E]=true;this.end();return}else if(this.#c.opcode===l.PING){const A=this.consume(s);if(!this.ws[E]){const r=new B(A);this.ws[p].socket.write(r.createFrame(l.PONG));if(m.ping.hasSubscribers){m.ping.publish({payload:A})}}this.#a=c.INFO;if(this.#i>0){continue}else{r();return}}else if(this.#c.opcode===l.PONG){const A=this.consume(s);if(m.pong.hasSubscribers){m.pong.publish({payload:A})}if(this.#i>0){continue}else{r();return}}}else if(this.#a===c.PAYLOADLENGTH_16){if(this.#i<2){return r()}const A=this.consume(2);this.#c.payloadLength=A.readUInt16BE(0);this.#a=c.READ_DATA}else if(this.#a===c.PAYLOADLENGTH_64){if(this.#i<8){return r()}const A=this.consume(8);const s=A.readUInt32BE(0);if(s>2**31-1){I(this.ws,"Received payload length > 2^31 bytes.");return}const i=A.readUInt32BE(4);this.#c.payloadLength=(s<<8)+i;this.#a=c.READ_DATA}else if(this.#a===c.READ_DATA){if(this.#i<this.#c.payloadLength){return r()}else if(this.#i>=this.#c.payloadLength){const r=this.consume(this.#c.payloadLength);this.#l.push(r);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===l.CONTINUATION){const r=Buffer.concat(this.#l);Q(this.ws,this.#c.originalOpcode,r);this.#c={};this.#l.length=0}this.#a=c.INFO}}if(this.#i>0){continue}else{r();break}}}consume(r){if(r>this.#i){return null}else if(r===0){return g}if(this.#o[0].length===r){this.#i-=this.#o[0].length;return this.#o.shift()}const A=Buffer.allocUnsafe(r);let s=0;while(s!==r){const i=this.#o[0];const{length:a}=i;if(a+s===r){A.set(this.#o.shift(),s);break}else if(a+s>r){A.set(i.subarray(0,r-s),s);this.#o[0]=i.subarray(r-s);break}else{A.set(this.#o.shift(),s);s+=i.length}}this.#i-=r;return A}parseCloseBody(r,A){let s;if(A.length>=2){s=A.readUInt16BE(0)}if(r){if(!C(s)){return null}return{code:s}}let i=A.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191){i=i.subarray(3)}if(s!==undefined&&!C(s)){return null}try{i=new TextDecoder("utf-8",{fatal:true}).decode(i)}catch{return null}return{code:s,reason:i}}get closingInfo(){return this.#c.closeInfo}}r.exports={ByteParser:ByteParser}},7578:r=>{"use strict";r.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}},5515:(r,A,s)=>{"use strict";const{kReadyState:i,kController:a,kResponse:c,kBinaryType:l,kWebSocketURL:u}=s(7578);const{states:g,opcodes:h}=s(9188);const{MessageEvent:d,ErrorEvent:p}=s(2611);function isEstablished(r){return r[i]===g.OPEN}function isClosing(r){return r[i]===g.CLOSING}function isClosed(r){return r[i]===g.CLOSED}function fireEvent(r,A,s=Event,i){const a=new s(r,i);A.dispatchEvent(a)}function websocketMessageReceived(r,A,s){if(r[i]!==g.OPEN){return}let a;if(A===h.TEXT){try{a=new TextDecoder("utf-8",{fatal:true}).decode(s)Line truncated
const i=r(57147);const n=r(22037);const s=r(71017);const a=r(6113);const o={fs:i.constants,os:n.constants};const c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,p=3,d=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),u=n.platform()==="win32",A=o.EBADF||o.os.errno.EBADF,m=o.ENOENT||o.os.errno.ENOENT,h=448,g=384,E="exit",y=[],C=i.rmdirSync.bind(i);let b=false;function rimraf(e,t){return i.rm(e,{recursive:true},t)}function FN_RIMRAF_SYNC(e){return i.rmSync(e,{recursive:true})}function tmpName(e,t){const r=_parseArguments(e,t),n=r[0],s=r[1];try{_assertAndSanitizeOptions(n)}catch(e){return s(e)}let a=n.tries;(function _getUniqueName(){try{const e=_generateTmpName(n);i.stat(e,(function(t){if(!t){if(a-- >0)return _getUniqueName();return s(new Error("Could not get a unique tmp filename, max tries reached "+e))}s(null,e)}))}catch(e){s(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),r=t[0];_assertAndSanitizeOptions(r);let n=r.tries;do{const e=_generateTmpName(r);try{i.statSync(e)}catch(t){return e}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const r=_parseArguments(e,t),n=r[0],s=r[1];tmpName(n,(function _tmpNameCreated(e,t){if(e)return s(e);i.open(t,d,n.mode||g,(function _fileCreated(e,r){if(e)return s(e);if(n.discardDescriptor){return i.close(r,(function _discardCallback(e){return s(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,n,false))}))}else{const e=n.discardDescriptor||n.detachDescriptor;s(null,t,r,_prepareTmpFileRemoveCallback(t,e?-1:r,n,false))}}))}))}function fileSync(e){const t=_parseArguments(e),r=t[0];const n=r.discardDescriptor||r.detachDescriptor;const s=tmpNameSync(r);var a=i.openSync(s,d,r.mode||g);if(r.discardDescriptor){i.closeSync(a);a=undefined}return{name:s,fd:a,removeCallback:_prepareTmpFileRemoveCallback(s,n?-1:a,r,true)}}function dir(e,t){const r=_parseArguments(e,t),n=r[0],s=r[1];tmpName(n,(function _tmpNameCreated(e,t){if(e)return s(e);i.mkdir(t,n.mode||h,(function _dirCreated(e){if(e)return s(e);s(null,t,_prepareTmpDirRemoveCallback(t,n,false))}))}))}function dirSync(e){const t=_parseArguments(e),r=t[0];const n=tmpNameSync(r);i.mkdirSync(n,r.mode||h);return{name:n,removeCallback:_prepareTmpDirRemoveCallback(n,r,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])i.close(e[0],(function(){i.unlink(e[1],_handler)}));else i.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])i.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{i.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,r,i){const n=_prepareRemoveCallback(_removeFileSync,[t,e],i);const s=_prepareRemoveCallback(_removeFileAsync,[t,e],i,n);if(!r.keep)y.unshift(n);return i?n:s}function _prepareTmpDirRemoveCallback(e,t,r){const n=t.unsafeCleanup?rimraf:i.rmdir.bind(i);const s=t.unsafeCleanup?FN_RIMRAF_SYNC:C;const a=_prepareRemoveCallback(s,e,r);const o=_prepareRemoveCallback(n,e,r,a);if(!t.keep)y.unshift(a);return r?a:o}function _prepareRemoveCallback(e,t,r,i){let n=false;return function _cleanupCallback(s){if(!n){const a=i||_cleanupCallback;const o=y.indexOf(a);if(o>=0)y.splice(o,1);n=true;if(r||e===C||e===FN_RIMRAF_SYNC){return e(t)}else{return e(t,s||function(){})}}}}function _garbageCollector(){if(!b)return;while(y.length){try{y[0]()}catch(e){}}}function _randomChars(e){let t=[],r=null;try{r=a.randomBytes(e)}catch(t){r=a.pseudoRandomBytes(e)}for(var i=0;i<e;i++){t.push(c[r[i]%c.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const r={};for(const t of Object.getOwnPropertyNames(e)){r[t]=e[t]}return[r,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return s.join(t,e.dir,e.name);if(!_isUndefined(e.template))return s.join(t,e.dir,e.template).replace(l,_randomChars(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.postfix:""].join("");return s.join(t,e.dir,r)}function _assertAndSanitizeOptions(e){e.tmpdir=_getTmpDir(e);const t=e.tmpdir;if(!_isUndefined(e.name))_assertIsRelative(e.name,"name",t);if(!_isUndefined(e.dir))_assertIsRelative(e.dir,"dir",t);if(!_isUndefined(e.template)){_assertIsRelative(e.template,"template",t);if(!e.template.match(l))throw new Error(`Invalid template, found "${e.template}".`)}if(!_isUndefined(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=_isUndefined(e.name)?e.tries||p:1;e.keep=!!e.keep;e.detachDescriptor=!!e.detachDescriptor;e.discardDescriptor=!!e.discardDescriptor;e.unsafeCleanup=!!e.unsafeCleanup;e.dir=_isUndefined(e.dir)?"":s.relative(t,_resolvePath(e.dir,t));e.template=_isUndefined(e.template)Line truncated
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=e=>e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=e=>e.replace(/\r?\n|\r/g,"\r\n");const i=new TextEncoder;const n=[];const s=new Uint8Array([13,10]);d=0;let a=false;for(const[t,o]of e){if(typeof o==="string"){const e=i.encode(r+`; name="${escape(normalizeLinefeeds(t))}"`+`\r\n\r\n${normalizeLinefeeds(o)}\r\n`);n.push(e);d+=e.byteLength}else{const e=i.encode(`${r}; name="${escape(normalizeLinefeeds(t))}"`+(o.name?`; filename="${escape(o.name)}"`:"")+"\r\n"+`Content-Type: ${o.type||"application/octet-stream"}\r\n\r\n`);n.push(e,o,s);if(typeof o.size==="number"){d+=e.byteLength+o.size+s.byteLength}else{a=true}}}const o=i.encode(`--${t}--`);n.push(o);d+=o.byteLength;if(a){d=null}p=e;l=async function*(){for(const e of n){if(e.stream){yield*e.stream()}else{yield e}}};u="multipart/form-data; boundary="+t}else if(a(e)){p=e;d=e.size;if(e.type){u=e.type}}else if(typeof e[Symbol.asyncIterator]==="function"){if(t){throw new TypeError("keepalive")}if(n.isDisturbed(e)||e.locked){throw new TypeError("Response body object should not be disturbed or locked")}i=e instanceof S?e:s(e)}if(typeof p==="string"||n.isBuffer(p)){d=Buffer.byteLength(p)}if(l!=null){let t;i=new S({async start(){t=l(e)[Symbol.asyncIterator]()},async pull(e){const{value:r,done:n}=await t.next();if(n){queueMicrotask((()=>{e.close()}))}else{if(!b(i)){e.enqueue(new Uint8Array(r))}}return e.desiredSize>0},async cancel(e){await t.return()},type:undefined})}const A={stream:i,source:p,length:d};return[A,u]}function safelyExtractBody(e,t=false){if(!S){S=r(35356).ReadableStream}if(e instanceof S){C(!n.isDisturbed(e),"The body has already been consumed.");C(!e.locked,"The stream is locked.")}return extractBody(e,t)}function cloneBody(e){const[t,r]=e.stream.tee();const i=h(r,{transfer:[r]});const[,n]=i.tee();e.stream=t;return{stream:n,length:e.length,source:e.source}}async function*consumeBody(e){if(e){if(v(e)){yield e}else{const t=e.stream;if(n.isDisturbed(t)){throw new TypeError("The body has already been consumed.")}if(t.locked){throw new TypeError("The stream is locked.")}t[y]=true;yield*t}}}function throwIfAborted(e){if(e.aborted){throw new m("The operation was aborted.","AbortError")}}function bodyMixinMethods(e){const t={blob(){return specConsumeBody(this,(e=>{let t=bodyMimeType(this);if(t==="failure"){t=""}else if(t){t=Q(t)}return new g([e],{type:t})}),e)},arrayBuffer(){return specConsumeBody(this,(e=>new Uint8Array(e).buffer),e)},text(){return specConsumeBody(this,utf8DecodeBytes,e)},json(){return specConsumeBody(this,parseJSONFromBytes,e)},async formData(){A.brandCheck(this,e);throwIfAborted(this[u]);const t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){const e={};for(const[t,r]of this.headers)e[t.toLowerCase()]=r;const t=new d;let r;try{r=new i({headers:e,preservePath:true})}catch(e){throw new m(`${e}`,"AbortError")}r.on("field",((e,r)=>{t.append(e,r)}));r.on("file",((e,r,i,n,s)=>{const a=[];if(n==="base64"||n.toLowerCase()==="base64"){let n="";r.on("data",(e=>{n+=e.toString().replace(/[\r\n]/gm,"");const t=n.length-n.length%4;a.push(Buffer.from(n.slice(0,t),"base64"));n=n.slice(t)}));r.on("end",(()=>{a.push(Buffer.from(n,"base64"));t.append(e,new x(a,i,{type:s}))}))}else{r.on("data",(e=>{a.push(e)}));r.on("end",(()=>{t.append(e,new x(a,i,{type:s}))}))}}));const n=new Promise(((e,t)=>{r.on("finish",e);r.on("error",(e=>t(new TypeError(e))))}));if(this.body!==null)for await(const e of consumeBody(this[u].body))r.write(e);r.end();await n;return t}else if(/application\/x-www-form-urlencoded/.test(t)){let e;try{let t="";const r=new TextDecoder("utf-8",{ignoreBOM:true});for await(const e of consumeBody(this[u].body)){if(!v(e)){throw new TypeError("Expected Uint8Array chunk")}t+=r.decode(e,{stream:true})}t+=r.decode();e=new URLSearchParams(t)}catch(e){throw Object.assign(new TypeError,{cause:e})}const t=new d;for(const[r,i]of e){t.append(r,i)}return t}else{await Promise.resolve();throwIfAborted(this[u]);throw A.errors.exception({header:`${e.name}.formData`,message:"Could not parse content as FormData."})}}};return t}function mixinBody(e){Object.assign(e.prototype,bodyMixinMethods(e))}async function specConsumeBody(e,t,r){A.brandCheck(e,r);throwIfAborted(e[u]);if(bodyUnusable(e[u].body)){throw new TypeError("Body is unusable")}const i=l();const errorSteps=e=>i.reject(e);const successSteps=e=>{try{i.resolve(t(e))}catch(e){errorSteps(e)}};if(e[u].body==null){successSteps(new Uint8Array);return i.promise}await p(e[u].body,successSteps,errorSteps);return i.promise}function bodyUnusable(e){return e!=null&&(e.stream.locked||n.isDisturbed(e.stream))}function utf8DecodeBytes(e){if(e.length===0){return""}if(e[0]===239&&e[1]===187&&e[2]===191){e=e.subarray(3)}const t=(new TextDecoder).decode(e);return t}function parseJSONFromBytes(e){return JSON.parse(utf8DecodeBytes(e))}function bodyMimeType(e){const{heLine truncated
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */s[n-4]=this.maskKey[0];s[n-3]=this.maskKey[1];s[n-2]=this.maskKey[2];s[n-1]=this.maskKey[3];s[1]=r;if(r===126){s.writeUInt16BE(t,2)}else if(r===127){s[2]=s[3]=0;s.writeUIntBE(t,4,6)}s[1]|=128;for(let e=0;e<t;e++){s[n+e]=this.frameData[e]^this.maskKey[e%4]}return s}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},11688:(e,t,r)=>{"use strict";const{Writable:i}=r(12781);const n=r(67643);const{parserStates:s,opcodes:a,states:o,emptyBuffer:c}=r(19188);const{kReadyState:l,kSentClose:p,kResponse:d,kReceivedClose:u}=r(37578);const{isValidStatusCode:A,failWebsocketConnection:m,websocketMessageReceived:h}=r(25515);const{WebsocketFrameSend:g}=r(25444);const E={};E.ping=n.channel("undici:websocket:ping");E.pong=n.channel("undici:websocket:pong");class ByteParser extends i{#a=[];#o=0;#c=s.INFO;#l={};#p=[];constructor(e){super();this.ws=e}_write(e,t,r){this.#a.push(e);this.#o+=e.length;this.run(r)}run(e){while(true){if(this.#c===s.INFO){if(this.#o<2){return e()}const t=this.consume(2);this.#l.fin=(t[0]&128)!==0;this.#l.opcode=t[0]&15;this.#l.originalOpcode??=this.#l.opcode;this.#l.fragmented=!this.#l.fin&&this.#l.opcode!==a.CONTINUATION;if(this.#l.fragmented&&this.#l.opcode!==a.BINARY&&this.#l.opcode!==a.TEXT){m(this.ws,"Invalid frame type was fragmented.");return}const r=t[1]&127;if(r<=125){this.#l.payloadLength=r;this.#c=s.READ_DATA}else if(r===126){this.#c=s.PAYLOADLENGTH_16}else if(r===127){this.#c=s.PAYLOADLENGTH_64}if(this.#l.fragmented&&r>125){m(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#l.opcode===a.PING||this.#l.opcode===a.PONG||this.#l.opcode===a.CLOSE)&&r>125){m(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#l.opcode===a.CLOSE){if(r===1){m(this.ws,"Received close frame with a 1-byte body.");return}const e=this.consume(r);this.#l.closeInfo=this.parseCloseBody(false,e);if(!this.ws[p]){const e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#l.closeInfo.code,0);const t=new g(e);this.ws[d].socket.write(t.createFrame(a.CLOSE),(e=>{if(!e){this.ws[p]=true}}))}this.ws[l]=o.CLOSING;this.ws[u]=true;this.end();return}else if(this.#l.opcode===a.PING){const t=this.consume(r);if(!this.ws[u]){const e=new g(t);this.ws[d].socket.write(e.createFrame(a.PONG));if(E.ping.hasSubscribers){E.ping.publish({payload:t})}}this.#c=s.INFO;if(this.#o>0){continue}else{e();return}}else if(this.#l.opcode===a.PONG){const t=this.consume(r);if(E.pong.hasSubscribers){E.pong.publish({payload:t})}if(this.#o>0){continue}else{e();return}}}else if(this.#c===s.PAYLOADLENGTH_16){if(this.#o<2){return e()}const t=this.consume(2);this.#l.payloadLength=t.readUInt16BE(0);this.#c=s.READ_DATA}else if(this.#c===s.PAYLOADLENGTH_64){if(this.#o<8){return e()}const t=this.consume(8);const r=t.readUInt32BE(0);if(r>2**31-1){m(this.ws,"Received payload length > 2^31 bytes.");return}const i=t.readUInt32BE(4);this.#l.payloadLength=(r<<8)+i;this.#c=s.READ_DATA}else if(this.#c===s.READ_DATA){if(this.#o<this.#l.payloadLength){return e()}else if(this.#o>=this.#l.payloadLength){const e=this.consume(this.#l.payloadLength);this.#p.push(e);if(!this.#l.fragmented||this.#l.fin&&this.#l.opcode===a.CONTINUATION){const e=Buffer.concat(this.#p);h(this.ws,this.#l.originalOpcode,e);this.#l={};this.#p.length=0}this.#c=s.INFO}}if(this.#o>0){continue}else{e();break}}}consume(e){if(e>this.#o){return null}else if(e===0){return c}if(this.#a[0].length===e){this.#o-=this.#a[0].length;return this.#a.shift()}const t=Buffer.allocUnsafe(e);let r=0;while(r!==e){const i=this.#a[0];const{length:n}=i;if(n+r===e){t.set(this.#a.shift(),r);break}else if(n+r>e){t.set(i.subarray(0,e-r),r);this.#a[0]=i.subarray(e-r);break}else{t.set(this.#a.shift(),r);r+=i.length}}this.#o-=e;return t}parseCloseBody(e,t){let r;if(t.length>=2){r=t.readUInt16BE(0)}if(e){if(!A(r)){return null}return{code:r}}let i=t.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191){i=i.subarray(3)}if(r!==undefined&&!A(r)){return null}try{i=new TextDecoder("utf-8",{fatal:true}).decode(i)}catch{return null}return{code:r,reason:i}}get closingInfo(){return this.#l.closeInfo}}e.exports={ByteParser:ByteParser}},37578:e=>{"use strict";e.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}},25515:(e,t,r)=>{"use strict";const{kReadyState:i,kController:n,kResponse:s,kBinaryType:a,kWebSocketURL:o}=r(37578);const{states:c,opcodes:l}=r(19188);const{MessageEvent:p,ErrorEvent:d}=r(52611);function isEstablished(e){return e[i]===c.OPEN}function isClosing(e){return e[i]===c.CLOSING}function isClosed(e){return e[i]===c.CLOSED}function fireEvent(e,t,r=Event,i){const n=new r(e,i);t.dispatchEvent(n)}function websocketMessageReceived(e,t,r){if(e[i]!==c.OPEN){return}let n;if(t===l.TEXT){try{n=new TextDecoder("utf-8",{fatal:trueLine truncated
//# sourceMappingURL=index.js.map
Generated Vendored
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","defineProperty","enumerable","get","__setModuleDefault","v","value","__importStar","mod","__esModule","result","hasOwnProperty","call","exports","issue","issueCommand","os","__webpack_require__","utils_1","command","properties","message","cmd","Command","process","stdout","write","toString","EOL","name","CMD_STRING","constructor","cmdStr","keys","length","first","key","val","escapeProperty","escapeData","s","toCommandValue","replace","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","getIDToken","getState","saveState","group","endGroup","startGroup","info","notice","warning","error","debug","isDebug","setFailed","setCommandEcho","setOutput","getBooleanInput","getMultilineInput","getInput","addPath","setSecret","exportVariable","ExitCode","command_1","file_command_1","path","oidc_utils_1","convertedVal","env","filePath","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","options","toUpperCase","required","Error","trimWhitespace","trim","inputs","split","filter","x","map","input","trueValue","falseValue","includes","TypeError","enabled","exitCode","Failure","toCommandProperties","fn","aud","OidcClient","summary_1","summary","summary_2","markdownSummary","path_utils_1","toPosixPath","toWin32Path","toPlatformPath","fs","uuid_1","existsSync","appendFileSync","encoding","v4","convertedValue","http_client_1","auth_1","core_1","createHttpClient","allowRetry","maxRetry","requestOptions","allowRetries","maxRetries","HttpClient","BearerCredentialHandler","getRequestToken","token","getIDTokenUrl","runtimeUrl","getCall","id_token_url","_a","httpclient","res","getJson","catch","statusCode","id_token","audience","encodedAudience","encodeURIComponent","pth","sep","SUMMARY_DOCS_URL","SUMMARY_ENV_VAR","os_1","fs_1","access","appendFile","writeFile","promises","Summary","_buffer","_filePath","pathFromEnv","constants","R_OK","W_OK","wrap","tag","content","attrs","htmlAttrs","entries","join","overwrite","writeFunc","emptyBuffer","clear","stringify","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","assign","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","data","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","allowedTag","addSeparator","addBreak","addQuote","cite","addLink","href","_summary","String","JSON","annotationProperties","title","file","line","startLine","endLine","col","startColumn","endColumn","_v","default","_v2","_v3","_v4","_nil","_version","_validate","_stringify","_parse","_interopRequireDefault","obj","_crypto","md5","bytes","Array","isArray","Buffer","from","createHash","update","digest","_default","parse","uuid","arr","Uint8Array","parseInt","slice","rng","rnds8Pool","poolPtr","randomFillSync","sha1","byteToHex","i","push","substr","offset","toLowerCase","_rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v1","buf","b","node","clockseq","seedBytes","random","msecs","Date","now","nsecs","dt","tl","tmh","n","_md","v3","URL","DNS","stringToBytes","str","unescape","charCodeAt","version","hashfunc","generateUUID","namespace","set","err","rnds","_sha","v5","_regex","validate","test","getExecOutput","exec","string_decoder_1","tr","commandLine","args","commandArgs","argStringToArray","toolPath","concat","runner","ToolRunner","_b","stderr","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","listeners","originalStdErrListener","stdErrListener","stdOutListener","end","events","child","io","ioUtil","timers_1","IS_WINDOWS","platform","EventEmitter","super","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","a","windowsVerbatimArguments","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","indexOf","substring","argline","_endsWith","endsWith","upperToolPath","arg","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","char","some","reverse","quoteHit","_cloneExecOptions","cwd","silent","failOnStdErr","ignoreReturnCode","delay","outStream","errStream","_getSpawnOptions","argv0","isRooted","which","optionsNonNull","state","ExecState","on","exists","fileName","cp","spawn","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","emit","removeAllListeners","stdin","argString","inQuotes","escaped","append","c","charAt","timeout","_setResult","setTimeout","HandleTimeout","clearTimeout","Context","_c","payload","GITHUB_EVENT_PATH","readFileSync","eventName","GITHUB_EVENT_NAME","sha","GITHUB_SHA","ref","GITHUB_REF","workflow","GITHUB_WORKFLOW","action","GITHUB_ACTION","actor","GITHUB_ACTOR","job","GITHUB_JOB","runNumber","GITHUB_RUN_NUMBER","runId","GITHUB_RUN_ID","apiUrl","GITHUB_API_URL","serverUrl","Line truncated
{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","exports","saveCache","restoreCache","isFeatureAvailable","ReserveCacheError","ValidationError","core","__webpack_require__","path","utils","cacheHttpClient","tar_1","Error","constructor","message","super","name","setPrototypeOf","checkPaths","paths","length","checkKey","key","regex","test","process","env","primaryKey","restoreKeys","options","enableCrossOsArchive","keys","debug","JSON","stringify","compressionMethod","getCompressionMethod","archivePath","cacheEntry","getCacheEntry","archiveLocation","lookupOnly","info","cacheKey","join","createTempDirectory","getCacheFileName","downloadCache","isDebug","listTar","archiveFileSize","getArchiveFileSizeInBytes","Math","round","extractTar","error","typedError","warning","unlinkFile","_a","_b","_c","_d","_e","cacheId","cachePaths","resolvePaths","archiveFolder","createTar","fileSizeLimit","isGhes","reserveCacheResponse","reserveCache","cacheSize","statusCode","getCacheVersion","http_client_1","auth_1","crypto","fs","url_1","downloadUtils_1","options_1","requestUtils_1","versionSalt","getCacheApiUrl","resource","baseUrl","url","createAcceptHeader","type","apiVersion","getRequestOptions","requestOptions","headers","Accept","createHttpClient","token","bearerCredentialHandler","BearerCredentialHandler","HttpClient","components","slice","push","platform","createHash","update","digest","httpClient","version","encodeURIComponent","response","retryTypedResponse","getJson","printCachesListForDiagnostics","isSuccessStatusCode","cacheResult","cacheDownloadUrl","setSecret","cacheListResult","totalCount","artifactCaches","cacheVersion","scope","creationTime","archiveUrl","URL","downloadOptions","getDownloadOptions","hostname","endsWith","useAzureSdk","downloadCacheStorageSDK","concurrentBlobDownloads","downloadCacheHttpClientConcurrent","downloadCacheHttpClient","reserveCacheRequest","postJson","getContentRange","start","end","uploadChunk","resourceUrl","openStream","additionalHeaders","uploadChunkResponse","retryHttpClientResponse","sendStream","uploadFile","fileSize","toString","fd","openSync","uploadOptions","getUploadOptions","concurrency","assertDefined","uploadConcurrency","maxChunkSize","uploadChunkSize","parallelUploads","Array","offset","all","map","chunkSize","min","createReadStream","autoClose","on","closeSync","commitCache","filesize","commitCacheRequest","size","commitCacheResponse","__asyncValues","Symbol","asyncIterator","TypeError","i","__values","iterator","verb","n","settle","d","getGnuTarPathOnWindows","exec","glob","io","semver","util","uuid_1","constants_1","IS_WINDOWS","tempDirectory","baseLocation","dest","v4","mkdirP","filePath","statSync","patterns","e_1","workspace","cwd","globber","implicitDescendants","_f","globGenerator","_g","file","relativeFile","relative","replace","RegExp","sep","e_1_1","return","promisify","unlink","getVersion","app","additionalArgs","versionOutput","ignoreReturnCode","silent","listeners","stdout","data","stderr","err","trim","clean","CompressionMethod","Gzip","ZstdWithoutLong","CacheFilename","Zstd","existsSync","GnuTarPathOnWindows","toLowerCase","includes","which","ghUrl","trimEnd","toUpperCase","isGitHubHost","isGheHost","ManifestFilename","TarFilename","SystemTarPathOnWindows","SocketTimeout","DefaultRetryDelay","DefaultRetryAttempts","ArchiveToolType","DownloadProgress","storage_blob_1","buffer","stream","abort_controller_1","pipeResponseToStream","output","pipeline","contentLength","segmentIndex","segmentSize","segmentOffset","receivedBytes","displayedComplete","startTime","Date","now","nextSegment","setReceivedBytes","getTransferredBytes","isDone","display","transferredBytes","percentage","toFixed","elapsedTime","downloadSpeed","onProgress","progress","loadedBytes","startDisplayTimer","delayInMs","displayCallback","timeoutHandle","setTimeout","stopDisplayTimer","clearTimeout","writeStream","createWriteStream","downloadResponse","socket","destroy","contentLengthHeader","expectedLength","parseInt","actualLength","archiveDescriptor","promises","open","socketTimeout","timeoutInMs","keepAlive","res","request","lengthHeader","Number","isNaN","downloads","blockSize","count","promiseGetter","downloadSegmentRetry","reverse","actives","bytesDownloaded","progressFn","activeDownloads","nextDownload","waitAndWrite","segment","race","values","write","pop","downloadConcurrency","dispose","close","retries","failures","timeout","promiseWithTimeout","downloadSegment","partRes","Range","readBodyBuffer","client","BlockBlobClient","retryOptions","tryTimeoutInMs","properties"Line truncated
Generated Vendored
+817 -147
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -27,7 +27,7 @@
"packageManager": "yarn@3.6.3",
"dependencies": {
"@actions/core": "^1.10.1",
"@docker/actions-toolkit": "^0.13.0",
"@docker/actions-toolkit": "^0.21.1",
"uuid": "^9.0.1"
},
"devDependencies": {
+3 -1
View File
@@ -5,6 +5,7 @@ export interface Inputs {
channel: string;
daemonConfig?: string;
context: string;
setHost: boolean;
}
export function getInputs(): Inputs {
@@ -12,6 +13,7 @@ export function getInputs(): Inputs {
version: core.getInput('version') || 'latest',
channel: core.getInput('channel'),
daemonConfig: core.getInput('daemon-config'),
context: core.getInput('context')
context: core.getInput('context'),
setHost: core.getBooleanInput('set-host')
};
}
+13 -2
View File
@@ -13,7 +13,7 @@ actionsToolkit.run(
// main
async () => {
const input: context.Inputs = context.getInputs();
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4()}`);
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4().slice(0, 8)}`);
if (input.context == 'default') {
throw new Error(`'default' context cannot be used.`);
@@ -34,7 +34,18 @@ actionsToolkit.run(
}
if (toolDir) {
stateHelper.setRunDir(runDir);
await install.install();
const sockPath = await install.install();
await core.group(`Setting outputs`, async () => {
core.info(`sock=${sockPath}`);
core.setOutput('sock', sockPath);
});
if (input.setHost) {
await core.group(`Setting Docker host`, async () => {
core.exportVariable('DOCKER_HOST', sockPath);
core.info(`DOCKER_HOST=${sockPath}`);
});
}
}
await core.group(`Docker info`, async () => {
+95 -35
View File
@@ -12,9 +12,9 @@ __metadata:
languageName: node
linkType: hard
"@actions/cache@npm:^3.2.2":
version: 3.2.2
resolution: "@actions/cache@npm:3.2.2"
"@actions/cache@npm:^3.2.4":
version: 3.2.4
resolution: "@actions/cache@npm:3.2.4"
dependencies:
"@actions/core": ^1.10.0
"@actions/exec": ^1.0.1
@@ -24,9 +24,9 @@ __metadata:
"@azure/abort-controller": ^1.1.0
"@azure/ms-rest-js": ^2.6.0
"@azure/storage-blob": ^12.13.0
semver: ^6.1.0
semver: ^6.3.1
uuid: ^3.3.3
checksum: 1dc43a66596b98a7d4ad9f3a3e92b24186e28a42486fac311c7f99c2883d0387a6078d76b31c5ca3af30bb2b929c6f8e5f352e315bcce4fb9cae5d5f2f1f5fad
checksum: 5bf5f7541bea4906b553440a9ffee5699e11dfb729365c6cb0bbd37e147a1a0993369fdad16bfa3e2b01ec7fa57dac66276278bfd4a389009246a75ea953e61d
languageName: node
linkType: hard
@@ -100,6 +100,16 @@ __metadata:
languageName: node
linkType: hard
"@actions/http-client@npm:^2.2.1":
version: 2.2.1
resolution: "@actions/http-client@npm:2.2.1"
dependencies:
tunnel: ^0.0.6
undici: ^5.25.4
checksum: c51c003cd697289136c0e81c0f9b8e57a9bb1a038dc7c9a91a71c02f4ae5e27ef7d3e305aefa7c815604049209d114c06e9991a5c5eaa055508519329267f962
languageName: node
linkType: hard
"@actions/io@npm:^1.0.1, @actions/io@npm:^1.1.1, @actions/io@npm:^1.1.3":
version: 1.1.3
resolution: "@actions/io@npm:1.1.3"
@@ -900,27 +910,26 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:^0.13.0":
version: 0.13.0
resolution: "@docker/actions-toolkit@npm:0.13.0"
"@docker/actions-toolkit@npm:^0.21.1":
version: 0.21.1
resolution: "@docker/actions-toolkit@npm:0.21.1"
dependencies:
"@actions/cache": ^3.2.2
"@actions/cache": ^3.2.4
"@actions/core": ^1.10.1
"@actions/exec": ^1.1.1
"@actions/github": ^6.0.0
"@actions/http-client": ^2.2.0
"@actions/http-client": ^2.2.1
"@actions/io": ^1.1.3
"@actions/tool-cache": ^2.0.1
"@octokit/core": ^5.0.1
"@octokit/plugin-rest-endpoint-methods": ^10.0.1
"@octokit/core": ^5.1.0
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
async-retry: ^1.3.3
csv-parse: ^5.5.2
csv-parse: ^5.5.5
handlebars: ^4.7.8
js-yaml: ^4.1.0
jwt-decode: ^3.1.2
semver: ^7.5.4
tmp: ^0.2.1
checksum: 2ca7433a45e34c45db653bcda166d0fd39f6899e2199b6d41bcba64c4e7c541fe95042e6eaad7452a942691b290eb9ab299687144dd92f75d34640c60a7e5b05
jwt-decode: ^4.0.0
semver: ^7.6.0
tmp: ^0.2.3
checksum: 12cbf288853a23b5304faacf10ad373d6fe518ff25c53fd55d804149eadf7a120d8a2ed8ff5266fab1bb0ffcaf18d1358c19d50ff6765276d42a3306545c947b
languageName: node
linkType: hard
@@ -1417,6 +1426,21 @@ __metadata:
languageName: node
linkType: hard
"@octokit/core@npm:^5.1.0":
version: 5.1.0
resolution: "@octokit/core@npm:5.1.0"
dependencies:
"@octokit/auth-token": ^4.0.0
"@octokit/graphql": ^7.0.0
"@octokit/request": ^8.0.2
"@octokit/request-error": ^5.0.0
"@octokit/types": ^12.0.0
before-after-hook: ^2.2.0
universal-user-agent: ^6.0.0
checksum: 170d16f5577df484116238ce04e2dbd6b45d8e96b4680fee657ae22fcafb311af8df8a14ae80610f41c1a85493c927910698019a761914ff4b0323ddbabcc9a4
languageName: node
linkType: hard
"@octokit/endpoint@npm:^9.0.0":
version: 9.0.1
resolution: "@octokit/endpoint@npm:9.0.1"
@@ -1446,6 +1470,13 @@ __metadata:
languageName: node
linkType: hard
"@octokit/openapi-types@npm:^20.0.0":
version: 20.0.0
resolution: "@octokit/openapi-types@npm:20.0.0"
checksum: 23ff7613750f8b5790a0cbed5a2048728a7909e50d726932831044908357a932c7fc0613fb7b86430a49d31b3d03a180632ea5dd936535bfbc1176391a199e96
languageName: node
linkType: hard
"@octokit/plugin-paginate-rest@npm:^9.0.0":
version: 9.0.0
resolution: "@octokit/plugin-paginate-rest@npm:9.0.0"
@@ -1457,7 +1488,7 @@ __metadata:
languageName: node
linkType: hard
"@octokit/plugin-rest-endpoint-methods@npm:^10.0.0, @octokit/plugin-rest-endpoint-methods@npm:^10.0.1":
"@octokit/plugin-rest-endpoint-methods@npm:^10.0.0":
version: 10.0.1
resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.0.1"
dependencies:
@@ -1468,6 +1499,17 @@ __metadata:
languageName: node
linkType: hard
"@octokit/plugin-rest-endpoint-methods@npm:^10.4.0":
version: 10.4.0
resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.4.0"
dependencies:
"@octokit/types": ^12.6.0
peerDependencies:
"@octokit/core": ">=5"
checksum: 8ee155825c7ea1dd2991a50d5b3f205988b8ea19af4bebbd91c55bb7b78c4e2215956d578671496a4a86df19ff2d5405ce37ee35c9c6c188dc9a199c045c30be
languageName: node
linkType: hard
"@octokit/request-error@npm:^5.0.0":
version: 5.0.1
resolution: "@octokit/request-error@npm:5.0.1"
@@ -1501,6 +1543,15 @@ __metadata:
languageName: node
linkType: hard
"@octokit/types@npm:^12.6.0":
version: 12.6.0
resolution: "@octokit/types@npm:12.6.0"
dependencies:
"@octokit/openapi-types": ^20.0.0
checksum: 850235f425584499a2266d5c585c1c2462ae11e25c650567142f3342cb9ce589c8c8fed87705811ca93271fd28c68e1fa77b88b67b97015d7b63d269fa46ed05
languageName: node
linkType: hard
"@opentelemetry/api@npm:^1.0.1":
version: 1.4.1
resolution: "@opentelemetry/api@npm:1.4.1"
@@ -2590,10 +2641,10 @@ __metadata:
languageName: node
linkType: hard
"csv-parse@npm:^5.5.2":
version: 5.5.2
resolution: "csv-parse@npm:5.5.2"
checksum: de2eb0c29b049783ef101b7eb843456200dc9a4fc9f4b400473bb0521b41aadb77af560cf4edc49bac65cc457b32596519860120181b26ec3b372109ddf8e8ea
"csv-parse@npm:^5.5.5":
version: 5.5.5
resolution: "csv-parse@npm:5.5.5"
checksum: 9e76b3dc3dbbf0a9b1c3529843e3891f0da23d094bdb0540a3d8f4083d00110dd545399f9cf510498def6c1fc7012cc6bc00046d281f16d705add64099467973
languageName: node
linkType: hard
@@ -2720,7 +2771,7 @@ __metadata:
resolution: "docker-setup-docker@workspace:."
dependencies:
"@actions/core": ^1.10.1
"@docker/actions-toolkit": ^0.13.0
"@docker/actions-toolkit": ^0.21.1
"@types/node": ^20.6.0
"@typescript-eslint/eslint-plugin": ^6.6.0
"@typescript-eslint/parser": ^6.6.0
@@ -4417,10 +4468,10 @@ __metadata:
languageName: node
linkType: hard
"jwt-decode@npm:^3.1.2":
version: 3.1.2
resolution: "jwt-decode@npm:3.1.2"
checksum: 20a4b072d44ce3479f42d0d2c8d3dabeb353081ba4982e40b83a779f2459a70be26441be6c160bfc8c3c6eadf9f6380a036fbb06ac5406b5674e35d8c4205eeb
"jwt-decode@npm:^4.0.0":
version: 4.0.0
resolution: "jwt-decode@npm:4.0.0"
checksum: 390e2edcb31a92e86c8cbdd1edeea4c0d62acd371f8a8f0a8878e499390c0ecf4c658b365c4e941e4ef37d0170e4ca650aaa49f99a45c0b9695a235b210154b0
languageName: node
linkType: hard
@@ -5272,7 +5323,7 @@ __metadata:
languageName: node
linkType: hard
"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2":
"rimraf@npm:^3.0.2":
version: 3.0.2
resolution: "rimraf@npm:3.0.2"
dependencies:
@@ -5351,6 +5402,17 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.6.0":
version: 7.6.0
resolution: "semver@npm:7.6.0"
dependencies:
lru-cache: ^6.0.0
bin:
semver: bin/semver.js
checksum: 7427f05b70786c696640edc29fdd4bc33b2acf3bbe1740b955029044f80575fc664e1a512e4113c3af21e767154a94b4aa214bf6cd6e42a1f6dba5914e0b208c
languageName: node
linkType: hard
"set-blocking@npm:^2.0.0":
version: 2.0.0
resolution: "set-blocking@npm:2.0.0"
@@ -5642,12 +5704,10 @@ __metadata:
languageName: node
linkType: hard
"tmp@npm:^0.2.1":
version: 0.2.1
resolution: "tmp@npm:0.2.1"
dependencies:
rimraf: ^3.0.0
checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e
"tmp@npm:^0.2.3":
version: 0.2.3
resolution: "tmp@npm:0.2.3"
checksum: 73b5c96b6e52da7e104d9d44afb5d106bb1e16d9fa7d00dbeb9e6522e61b571fbdb165c756c62164be9a3bbe192b9b268c236d370a2a0955c7689cd2ae377b95
languageName: node
linkType: hard