From 40042204c52704bc4e596b42c9b3ae0e8a6ff8a2 Mon Sep 17 00:00:00 2001 From: alefesta Date: Wed, 30 Jun 2021 16:31:06 +0200 Subject: [PATCH 01/23] [Installation] - Improve Installation for Windows Users - **What this feature does**: Windows user should be able to use the dagger binary getting a similar experience to the one proposed for Linux in the docs. - **What has been changed**: the feature implement a powershell script similar to `install.sh` logic. More specifically I've updated `install.md` and added `install.ps1` I'm not sure if the URL `releases.dagger.io` is currently pointing at the content of GH repo or something else so the documented steps may need a review. Signed-off-by: alefesta --- docs/install.md | 17 ++++++++++ install.ps1 | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 install.ps1 diff --git a/docs/install.md b/docs/install.md index 22d56aaa..7758b401 100644 --- a/docs/install.md +++ b/docs/install.md @@ -35,6 +35,23 @@ You can then install it globally on your system: sudo mv ./bin/dagger /usr/local/bin ``` +## Option 2 (Windows): Run a shell script + +Since Dagger repository is currently private, we have to use a workaround +to be able to run the script and match the latest release. +This workaround will be removed once the repo will become public. +To generate a personal access token on GitHub follow the guidelines at [Create a personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) + +From a terminal, run the following command: + +```shell +$personalToken= +curl https://releases.dagger.io/dagger/install.ps1 -OutFile install.ps1 ; ./install.ps1 -PersonalToken $personalToken; rm install.ps1 +``` + +We try to move the dagger binary under `C:\Windows\System32` but +in case use missing the necessary permission we'll save everything under `/dagger` + ## Option 3: Download a binary release Open your web browser to [the latest release](https://github.com/dagger/dagger/releases/latest). diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 00000000..d9a1fa84 --- /dev/null +++ b/install.ps1 @@ -0,0 +1,82 @@ +param ( + [Parameter(Mandatory)] $PersonalToken +) +Clear-Host +@" + +--------------------------------------------------------------------------------- +Author: Alessandro Festa +Usage: To run using your GH personal developer token simply use the flag as below +./install.ps1 -PersonalToken 1234567891213 +Dagger executable will be save under the folder "dagger" in your home folder. +--------------------------------------------------------------------------------- + +"@ + +# Since we are already authenticated we may directly download latest version. +$name="dagger" +$base="https://dagger-io.s3.amazonaws.com" +function http_download { + Clear-Host + $version=Get_Version + $version= $version -replace '[""]' + $url = $base + "/" + $name + "/releases/" + $version.substring(1) + "/dagger_" + $version + "_windows_amd64.zip" + $fileName="dagger_" + $version + "_windows_amd64" + + + Invoke-WebRequest -Uri $url -OutFile $env:temp/$fileName.zip -ErrorAction Stop + Expand-Archive -Path $env:temp/$fileName.zip -DestinationPath $env:HOMEPATH/dagger -Force -ErrorVariable ProcessError; + If ($ProcessError) + { + Clear-Host +@" +Whoops apparently we had an issue in unzipping the file, please check +you have the right permission to do so and try to unzip manually the file. +Currently we saved Dagger at your temp folder. +"@ +exit + } else { + Clear-Host + +@" + +Thank You for downloading Dagger! + +----------------------------------------------------- +Dagger has been saved at /dagger/ +Please add dagger.exe to your PATH in order to use it +---------------------------------------------------- + +"@ + } + +} + +function Get_Version { + + $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" + $headers.Add("Authorization", "token $PersonalToken") + $headers.Add("Accept", "application/vnd.github.VERSION.raw") + + $response = Invoke-RestMethod 'https://api.github.com/repos/dagger/dagger/releases/latest' -Method 'GET' -Headers $headers -Body $body -ErrorAction SilentlyContinue -ErrorVariable DownloadError + If ($DownloadError) + { + Clear-Host +@" + +--------------------------------------------------------------------------- +Houston we have a problem! + +Apparently we had an issue in downloading the file, please try again +run the script and if it still fail please open an issue on the Dagger repo. +---------------------------------------------------------------------------- + +"@ +exit + } + + return $response.tag_name| ConvertTo-Json + +} + +http_download \ No newline at end of file From b1ed40ffed9252386d93b0128f778a19d43e808f Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Sat, 12 Jun 2021 17:11:27 +0200 Subject: [PATCH 02/23] Improve #docker.Push definition : - Push to private registry - Output ref and digest - Update doc - Add tests to universe.bats Signed-off-by: Tom Chauveau --- docs/reference/universe/docker/README.md | 18 +++-- stdlib/.dagger/env/docker-pull/.gitignore | 2 + stdlib/.dagger/env/docker-pull/plan/pull.cue | 26 +++++++ stdlib/.dagger/env/docker-pull/values.yaml | 24 +++++++ .../env/docker-push-invalid-creds/.gitignore | 2 + .../docker-push-invalid-creds/plan/push.cue | 34 +++++++++ .../env/docker-push-invalid-creds/values.yaml | 26 +++++++ stdlib/.dagger/env/docker-push/.gitignore | 2 + stdlib/.dagger/env/docker-push/plan/push.cue | 63 +++++++++++++++++ stdlib/.dagger/env/docker-push/values.yaml | 26 +++++++ stdlib/docker/docker.cue | 70 +++++++++++++++++-- stdlib/universe.bats | 17 +++++ 12 files changed, 297 insertions(+), 13 deletions(-) create mode 100644 stdlib/.dagger/env/docker-pull/.gitignore create mode 100644 stdlib/.dagger/env/docker-pull/plan/pull.cue create mode 100644 stdlib/.dagger/env/docker-pull/values.yaml create mode 100644 stdlib/.dagger/env/docker-push-invalid-creds/.gitignore create mode 100644 stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue create mode 100644 stdlib/.dagger/env/docker-push-invalid-creds/values.yaml create mode 100644 stdlib/.dagger/env/docker-push/.gitignore create mode 100644 stdlib/.dagger/env/docker-push/plan/push.cue create mode 100644 stdlib/.dagger/env/docker-push/values.yaml diff --git a/docs/reference/universe/docker/README.md b/docs/reference/universe/docker/README.md index 6ec5f28c..dc00527a 100644 --- a/docs/reference/universe/docker/README.md +++ b/docs/reference/universe/docker/README.md @@ -70,18 +70,24 @@ _No output._ ## docker.#Push -Push a docker image +Push a docker image to remote registry ### docker.#Push Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*ref* | `string` |Remote ref (example: "index.docker.io/alpine:latest") | -|*source* | `dagger.#Artifact` |Image | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*name* | `string` |Remote name (example: "index.docker.io/alpine:latest") | +|*source* | `dagger.#Artifact` |Image source | +|*registry.target* | `*"https://index.docker.io/v1/" \| string` |Remote registry | +|*registry.username* | `string` |Username | +|*registry.secret* | `(string\|bytes)` |Password or secret | ### docker.#Push Outputs -_No output._ +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*out.ref* | `string` |Image ref | +|*out.digest* | `string` |Image digest | ## docker.#Run diff --git a/stdlib/.dagger/env/docker-pull/.gitignore b/stdlib/.dagger/env/docker-pull/.gitignore new file mode 100644 index 00000000..01ec19b0 --- /dev/null +++ b/stdlib/.dagger/env/docker-pull/.gitignore @@ -0,0 +1,2 @@ +# dagger state +state/** diff --git a/stdlib/.dagger/env/docker-pull/plan/pull.cue b/stdlib/.dagger/env/docker-pull/plan/pull.cue new file mode 100644 index 00000000..e0bb462e --- /dev/null +++ b/stdlib/.dagger/env/docker-pull/plan/pull.cue @@ -0,0 +1,26 @@ +package docker + +import ( + "dagger.io/docker" + "dagger.io/dagger/op" + "dagger.io/alpine" +) + +ref: string @dagger(input) + +TestPull: { + pull: docker.#Pull & {from: ref} + + check: #up: [ + op.#Load & {from: alpine.#Image}, + op.#Exec & { + always: true + args: [ + "sh", "-c", """ + grep -q "test" /src/test.txt + """, + ] + mount: "/src": from: pull + }, + ] +} diff --git a/stdlib/.dagger/env/docker-pull/values.yaml b/stdlib/.dagger/env/docker-pull/values.yaml new file mode 100644 index 00000000..bd89b103 --- /dev/null +++ b/stdlib/.dagger/env/docker-pull/values.yaml @@ -0,0 +1,24 @@ +name: docker-pull +inputs: + ref: + text: docker.io/daggerio/ci-test:qhkmeqmhmnqn@sha256:96640793ed325f893608508f1b60b9c19b547c178e45639a249989545894eed4 +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0WFI2ZGFUOWgvNkdlZ3Na + dEE5dTlVQi8vUVJqcHUxWE9GSmdnNmZLMHhRCm1sbFlJbEw1ZVFSVXU4MCtkT09l + dVR1WE5XUkVpSXA3aXN5TzZLaWJRNnMKLS0tIDZINGpzODdXVUdKVVpFMjFUbUFO + SG1raUVNTzZIWDltV1pOS3hySHlJeWcKg3blmstOGcxtPww513+mAEA0MWOXwNAT + 5ngRvG6MraW3g9dhIuUYOwjuJyz1Z07/DBEocSxnjSyw45ZCkM1/9Q== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2021-06-12T15:01:07Z" + mac: ENC[AES256_GCM,data:kmryJiX4cnZTeyRcH+TljCj+m5kEA4yPu0gQkqS3apEolfNFWzkdlvRS2P+9EYO19iT1FxpNRwrs+G9qGeISubc48u2++Yb/mAUU4ilIu8flIPs3s63Ep8FeRv+hI3Govljjbjyds+3mR+o0Iv+KhpKBPDboXyRpWGlIijpBzLQ=,iv:ROAK7qmGn0jWDZp8uPLVbReqdgO9qw8EESkYdPjxLDk=,tag:8CrydkWN9xtJX8yItgjz+A==,type:str] + pgp: [] + encrypted_suffix: secret + version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/.gitignore b/stdlib/.dagger/env/docker-push-invalid-creds/.gitignore new file mode 100644 index 00000000..01ec19b0 --- /dev/null +++ b/stdlib/.dagger/env/docker-push-invalid-creds/.gitignore @@ -0,0 +1,2 @@ +# dagger state +state/** diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue b/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue new file mode 100644 index 00000000..83e283a7 --- /dev/null +++ b/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue @@ -0,0 +1,34 @@ +package docker + +import ( + "dagger.io/docker" + "dagger.io/random" +) + +TestRegistry: { + username: string @dagger(input) + secret: string @dagger(input) +} + +TestPush: { + tag: random.#String & {seed: "docker push and pull should fail"} + + name: "daggerio/ci-test:\(tag.out)" + + image: docker.#ImageFromDockerfile & { + dockerfile: """ + FROM alpine + RUN echo "test" > /test.txt + """ + context: "" + } + + push: docker.#Push & { + "name": name + source: image + registry: { + username: TestRegistry.username + secret: TestRegistry.secret + } + } +} diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml b/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml new file mode 100644 index 00000000..9f227119 --- /dev/null +++ b/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml @@ -0,0 +1,26 @@ +name: docker-push-invalid-creds +inputs: + TestRegistry.secret: + text: ENC[AES256_GCM,data:QOkT,iv:MUV92Llmt8pskd1AUjnvpQ+B3Ws1wLKIuzy7SVhHRME=,tag:StNvPnmz89GcLb1Cro3O9g==,type:str] + TestRegistry.username: + text: john +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3MC9DZGU1Tm5Ta2ttNUph + ZGxZaGxLMklRRWVaVmtzdEdqbnlkYmIvK2hNClVKd2RCak1GYXlvZWQxaHlzQUNw + Y2czeEdXZnQxT2dVQ01GY0NTcGNkMnMKLS0tIGwwa0xXVEZQUVUzdUpOQUJFTUxy + ZzZNNk1xb0F4cWVQRjh4aUJSUzExd2cKl0Ka0Qcc2KNOQjl3Bhnb1sGuJCZ6iDs4 + Hz2EldaxWJHZxuS18uNC38NxufG02ULJqJb2QC4cOzPrTeeKVE6Qlg== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2021-06-12T15:03:49Z" + mac: ENC[AES256_GCM,data:o2fTjTnDgSX4f2jSjs1LSKJ7eTrTmFV44gyZdYCdYnb6eyXpFuT4Bru8ERuJlTvUSc3wx4js14BlxS3T0tX0aBV39ScBlzQOC4Ulyvh4KOKEH9uUl7YmGrFlNH4yQ7DYoezxCqwxlLZGavDaSXUszvKWlcdMsTm3L/4LkfHQzWk=,iv:E1gyYQ0+02bIQguvN0w+wp8RS6uyT17tXp18e5riXmg=,tag:Azjz4ZivYmjC/7eMc6SfSQ==,type:str] + pgp: [] + encrypted_suffix: secret + version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push/.gitignore b/stdlib/.dagger/env/docker-push/.gitignore new file mode 100644 index 00000000..01ec19b0 --- /dev/null +++ b/stdlib/.dagger/env/docker-push/.gitignore @@ -0,0 +1,2 @@ +# dagger state +state/** diff --git a/stdlib/.dagger/env/docker-push/plan/push.cue b/stdlib/.dagger/env/docker-push/plan/push.cue new file mode 100644 index 00000000..60ba10e7 --- /dev/null +++ b/stdlib/.dagger/env/docker-push/plan/push.cue @@ -0,0 +1,63 @@ +package docker + +import ( + "dagger.io/dagger/op" + "dagger.io/dagger" + "dagger.io/docker" + "dagger.io/alpine" + "dagger.io/random" +) + +TestRegistry: { + username: string @dagger(input) + secret: dagger.#Secret @dagger(input) +} + +#TestGetSecret: { + secret: dagger.#Artifact + + out: { + string + + #up: [ + op.#Load & {from: alpine.#Image}, + + op.#Exec & { + always: true + args: ["sh", "-c", "cp /input/secret /secret"] + mount: "/input/secret": "secret": secret + }, + + op.#Export & { + source: "/secret" + }, + ] + } +} + +TestPush: { + tag: random.#String & {seed: "docker push and pull"} + + name: "daggerio/ci-test:\(tag.out)" + + secret: #TestGetSecret & { + secret: TestRegistry.secret + } + + image: docker.#ImageFromDockerfile & { + dockerfile: """ + FROM alpine + RUN echo "test" > /test.txt + """ + context: "" + } + + push: docker.#Push & { + "name": name + source: image + registry: { + username: TestRegistry.username + "secret": secret.out + } + } +} diff --git a/stdlib/.dagger/env/docker-push/values.yaml b/stdlib/.dagger/env/docker-push/values.yaml new file mode 100644 index 00000000..35280cde --- /dev/null +++ b/stdlib/.dagger/env/docker-push/values.yaml @@ -0,0 +1,26 @@ +name: docker-push +inputs: + TestRegistry.secret: + secret: ENC[AES256_GCM,data:ooc+0IjYtX9tkM7q1i4Ws6CorZsWtGQzHbjGx+j892iTZC7Q,iv:asdJzuRAHBRhD/FlkEd1VvX1tIz/qupBL7sMQWxZL5E=,tag:yuTyDx7hZeC+cmHx6tspmQ==,type:str] + TestRegistry.username: + text: daggertest +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrcnpRZ203QzhtKzc3bzF4 + Y002V0JUUnNZMks2VS83SjBOdVZid1dxbTJjCmc5VGtvM3lOejEvQ3VMZ1ZyZElZ + Skd3ZWxRMHdQRHdtZFBYUFMweDFlL28KLS0tIHhHeUh4a2gvb2w3UTEyNFZaK0dS + UjFJYTc1UUUzSFVkZjQ2blRsSGpVdVEKOanMR3+WlAgoDfqTUW7WPW1ytT3NdkTX + 4Rqo49QmnuKFJ9tKoBFQOqgIo8E/lpcOkeIUiy5e/35FvsZ/KFk/pg== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2021-06-12T13:31:57Z" + mac: ENC[AES256_GCM,data:TrLGfqDj3lvZKroaPtlDuR0Ki+yoFDYFqIhW+g7iasVOzvDaqHepX8X/aLiHX+XHdTqGH6ehfu1k1BSaz6xKqqdIai9NIyokgIKXR1F5mRgK/aDhc6x/YvX3dSl79/4zBBblDpYNFhCarQMxeTSFP9GfW+e0+T/z10fHHlQub8o=,iv:Pab2qkZTqP/6j4LV0B97SACQm/UZPMkeahGjZLJ2fFg=,tag:r4IW1WRipuC/MdtwEzzEpA==,type:str] + pgp: [] + encrypted_suffix: secret + version: 3.7.1 diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 4ddc4475..5fcc0384 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -3,6 +3,7 @@ package docker import ( "alpha.dagger.io/dagger" + "alpha.dagger.io/alpine" "alpha.dagger.io/dagger/op" ) @@ -28,18 +29,73 @@ import ( ] } -// Push a docker image +// Push a docker image to remote registry #Push: { - // Remote ref (example: "index.docker.io/alpine:latest") - ref: string @dagger(input) + // Remote name (example: "index.docker.io/alpine:latest") + name: string @dagger(input) - // Image + // Image source source: dagger.#Artifact @dagger(input) - #up: [ - op.#Load & {from: source}, - op.#PushContainer & {"ref": ref}, + // Image registry + registry: { + // Remote registry + target: string | *"https://index.docker.io/v1/" @dagger(input) + + // Username + username: string @dagger(input) + + // Password or secret + secret: string | bytes @dagger(input) + } + + push: #up: [ + op.#Load & {from: source}, + + if registry != _|_ { + op.#DockerLogin & { + target: registry.target + username: registry.username + secret: registry.secret + } + }, + + op.#PushContainer & {ref: name}, + op.#Subdir & {dir: "/dagger"}, ] + + out: { + // Image ref + ref: string @dagger(output) + + // Image digest + digest: string @dagger(output) + + #up: [ + op.#Load & {from: alpine.#Image & { + package: { + bash: true + jq: true + } + }}, + + op.#Exec & { + always: true + args: ["/bin/bash", "-c", #""" + jq --arg key0 'ref' --arg value0 $(cat /dagger/image_ref) \ + --arg key1 'digest' --arg value1 $(cat /dagger/image_digest) \ + '. | .[$key0]=$value0 | .[$key1]=$value1 '<<< '{}' > /out + """#, + ] + mount: "/dagger": from: push + }, + + op.#Export & { + source: "/out" + format: "json" + }, + ] + } } #Run: { diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 2ff76e4a..05f527ba 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -62,6 +62,23 @@ setup() { dagger -e docker-build up } +@test "docker push and pull" { + # Push image + dagger -e docker-push up + + # Get image reference + dagger -e docker-pull input text ref "$(dagger -e docker-push query -c TestPush.push.out.ref | tr -d '\n' | tr -d '\"')" + + # Pull image + dagger -e docker-pull up +} + +@test "docker push and pull: invalid credential" { + # Push image (SHOULD FAIL) + run docker -e docker-push-invalid-creds up + assert_failure +} + @test "docker command: ssh" { dagger -e docker-command-ssh up } From f842f1ed1da9991682cf80883eca8b9afbd3ab5a Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Sat, 12 Jun 2021 17:11:41 +0200 Subject: [PATCH 03/23] Remove old docker push and pull test Signed-off-by: Tom Chauveau --- docs/reference/universe/docker/README.md | 6 +- stdlib/docker/docker.cue | 62 +++++++++--------- stdlib/universe.bats | 4 +- tests/stdlib/docker/push-pull/inputs.yaml | 23 ------- tests/stdlib/docker/push-pull/push-pull.cue | 65 ------------------- .../stdlib/docker/push-pull/testdata/test.txt | 1 - 6 files changed, 35 insertions(+), 126 deletions(-) delete mode 100644 tests/stdlib/docker/push-pull/inputs.yaml delete mode 100644 tests/stdlib/docker/push-pull/push-pull.cue delete mode 100644 tests/stdlib/docker/push-pull/testdata/test.txt diff --git a/docs/reference/universe/docker/README.md b/docs/reference/universe/docker/README.md index dc00527a..09dc0966 100644 --- a/docs/reference/universe/docker/README.md +++ b/docs/reference/universe/docker/README.md @@ -70,7 +70,7 @@ _No output._ ## docker.#Push -Push a docker image to remote registry +Push a docker image to a remote registry ### docker.#Push Inputs @@ -86,8 +86,8 @@ Push a docker image to remote registry | Name | Type | Description | | ------------- |:-------------: |:-------------: | -|*out.ref* | `string` |Image ref | -|*out.digest* | `string` |Image digest | +|*ref* | `string` |Image ref | +|*digest* | `string` |Image digest | ## docker.#Run diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 5fcc0384..0660d74d 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -29,7 +29,7 @@ import ( ] } -// Push a docker image to remote registry +// Push a docker image to a remote registry #Push: { // Remote name (example: "index.docker.io/alpine:latest") name: string @dagger(input) @@ -40,13 +40,13 @@ import ( // Image registry registry: { // Remote registry - target: string | *"https://index.docker.io/v1/" @dagger(input) + target: string | *"https://index.docker.io/v1/" @dagger(input) // Username - username: string @dagger(input) + username: string @dagger(input) // Password or secret - secret: string | bytes @dagger(input) + secret: string | bytes @dagger(input) } push: #up: [ @@ -64,38 +64,36 @@ import ( op.#Subdir & {dir: "/dagger"}, ] - out: { - // Image ref - ref: string @dagger(output) + // Image ref + ref: string @dagger(output) - // Image digest - digest: string @dagger(output) + // Image digest + digest: string @dagger(output) - #up: [ - op.#Load & {from: alpine.#Image & { - package: { - bash: true - jq: true - } - }}, + #up: [ + op.#Load & {from: alpine.#Image & { + package: { + bash: true + jq: true + } + }}, - op.#Exec & { - always: true - args: ["/bin/bash", "-c", #""" - jq --arg key0 'ref' --arg value0 $(cat /dagger/image_ref) \ - --arg key1 'digest' --arg value1 $(cat /dagger/image_digest) \ - '. | .[$key0]=$value0 | .[$key1]=$value1 '<<< '{}' > /out - """#, - ] - mount: "/dagger": from: push - }, + op.#Exec & { + always: true + args: ["/bin/bash", "-c", #""" + jq --arg key0 'ref' --arg value0 $(cat /dagger/image_ref) \ + --arg key1 'digest' --arg value1 $(cat /dagger/image_digest) \ + '. | .[$key0]=$value0 | .[$key1]=$value1 '<<< '{}' > /out + """#, + ] + mount: "/dagger": from: push + }, - op.#Export & { - source: "/out" - format: "json" - }, - ] - } + op.#Export & { + source: "/out" + format: "json" + }, + ] } #Run: { diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 05f527ba..f2761325 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -67,7 +67,7 @@ setup() { dagger -e docker-push up # Get image reference - dagger -e docker-pull input text ref "$(dagger -e docker-push query -c TestPush.push.out.ref | tr -d '\n' | tr -d '\"')" + dagger -e docker-pull input text ref "$(dagger -e docker-push query -c TestPush.push.ref | tr -d '\n' | tr -d '\"')" # Pull image dagger -e docker-pull up @@ -75,7 +75,7 @@ setup() { @test "docker push and pull: invalid credential" { # Push image (SHOULD FAIL) - run docker -e docker-push-invalid-creds up + run dagger -e docker-push-invalid-creds up assert_failure } diff --git a/tests/stdlib/docker/push-pull/inputs.yaml b/tests/stdlib/docker/push-pull/inputs.yaml deleted file mode 100644 index a724329a..00000000 --- a/tests/stdlib/docker/push-pull/inputs.yaml +++ /dev/null @@ -1,23 +0,0 @@ -registry: - username: ENC[AES256_GCM,data:YDDLkr32orAgQw==,iv:ezThCQJv+bVBf8SdfSa2HFoP+eu6IZMPl5xvMOGDcps=,tag:sEV9Sonc9rjDbxXsV+UBIA==,type:str] - secret: ENC[AES256_GCM,data:moBq7PwFdtL/Z58ez+V1gR8QJsFRZEMsF82H/W6aJgf8Xdw8,iv:YAXcRzBoemmef5PBdAOBa5acNPo4BoKH7Ngud/CWYfA=,tag:LFkJvUZdltgHJ8TKVEeS/Q==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGVmQxTXNSeU1scWJvVDFJ - cExOL3AvR1JRRWp0cFFRWGtvQ1VKc2t1SUVFClVCS1hpN1dNTktoaWZ3R09OMFVM - STRyWmtHRVROMW1Oa28yQkMwOHd1UUUKLS0tIE5LL1pEb1dMSEVXTHBsNlJxOTcr - U2FyQUtYcXVVVTlVcW5zRXh5aUk3RUUKGiWb9jSl5xRHQxB56LtNclV5Jhs50sS7 - SAOBWgaYPjLpsI1oxgXf+B1FgBUEt3EMccrWRW85VvnOKOAUAJ53pQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-05-28T20:49:27Z" - mac: ENC[AES256_GCM,data:we6IaVqfT6KZ4s97JbdFCbxL2zotojLRLEbmgwEAfBhz4KAitulRItMn4I6aD1dEIwYGAFtQEcf+Wqz2yT7JC6iz1s2zNtGIaMbxxQZD6EQcJvNmY3vzqC4SKf0cRENGZWI5OscH9VVenTmOAxwwWvp9W4J52d2w9FAD9+vCl/c=,iv:vf8mZwr+z7DjCVHaRbk8jQO9/pso5INy/FmCPq/xlzo=,tag:sgSvlksSOVq5LU0ycAsXxw==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.7.1 diff --git a/tests/stdlib/docker/push-pull/push-pull.cue b/tests/stdlib/docker/push-pull/push-pull.cue deleted file mode 100644 index 5ca34cf8..00000000 --- a/tests/stdlib/docker/push-pull/push-pull.cue +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" - "alpha.dagger.io/docker" - "alpha.dagger.io/random" -) - -source: dagger.#Artifact - -registry: { - username: string - secret: string -} - -TestPushAndPull: { - tag: random.#String & { - seed: "" - } - - ref: "daggerio/ci-test:\(tag.out)" - - // Create image - image: docker.#ImageFromDockerfile & { - dockerfile: """ - FROM alpine - COPY test.txt /test.txt - """ - context: source - } - - // Login - login: #up: [ - op.#DockerLogin & { - registry - }, - ] - - // Push image - push: docker.#Push & { - "ref": ref - source: image - } - - // Push image - pull: docker.#Pull & { - from: push.ref - } - - // Check the content - verify: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - always: true - args: [ - "sh", "-c", """ - grep -q "test" /src/test.txt - """, - ] - mount: "/src": from: pull - }, - ] -} diff --git a/tests/stdlib/docker/push-pull/testdata/test.txt b/tests/stdlib/docker/push-pull/testdata/test.txt deleted file mode 100644 index 30d74d25..00000000 --- a/tests/stdlib/docker/push-pull/testdata/test.txt +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file From 7d1bbcc4160a19675c880c26f0e29051c94b6725 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 18 Jun 2021 22:01:16 +0200 Subject: [PATCH 04/23] Fix docker hub login error when using image ref as target Signed-off-by: Tom Chauveau --- docs/reference/universe/docker/README.md | 13 ++++++------- solver/registryauth.go | 4 +++- stdlib/.dagger/env/docker-pull/values.yaml | 8 +++++--- stdlib/.dagger/env/docker-push/plan/push.cue | 2 +- stdlib/.dagger/env/docker-push/values.yaml | 6 ++++-- stdlib/docker/docker.cue | 20 +++++++++----------- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/docs/reference/universe/docker/README.md b/docs/reference/universe/docker/README.md index 09dc0966..4473c994 100644 --- a/docs/reference/universe/docker/README.md +++ b/docs/reference/universe/docker/README.md @@ -74,13 +74,12 @@ Push a docker image to a remote registry ### docker.#Push Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*name* | `string` |Remote name (example: "index.docker.io/alpine:latest") | -|*source* | `dagger.#Artifact` |Image source | -|*registry.target* | `*"https://index.docker.io/v1/" \| string` |Remote registry | -|*registry.username* | `string` |Username | -|*registry.secret* | `(string\|bytes)` |Password or secret | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*name* | `string` |Remote name (example: "index.docker.io/alpine:latest") | +|*source* | `dagger.#Artifact` |Image source | +|*auth.username* | `string` |Username | +|*auth.secret* | `string` |Password or secret | ### docker.#Push Outputs diff --git a/solver/registryauth.go b/solver/registryauth.go index af17d38e..2c47d49c 100644 --- a/solver/registryauth.go +++ b/solver/registryauth.go @@ -63,7 +63,9 @@ func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.Cred } func parseAuthHost(host string) (*url.URL, error) { - if host == "registry-1.docker.io" { + isDockerHub := !(strings.Contains(host, "amazonaws.com") || strings.Contains(host, "gcr.io") || strings.Contains(host, "microsoft.com")) + + if host == "registry-1.docker.io" || isDockerHub { host = "https://index.docker.io/v1/" } diff --git a/stdlib/.dagger/env/docker-pull/values.yaml b/stdlib/.dagger/env/docker-pull/values.yaml index bd89b103..9637ece1 100644 --- a/stdlib/.dagger/env/docker-pull/values.yaml +++ b/stdlib/.dagger/env/docker-pull/values.yaml @@ -1,7 +1,9 @@ +plan: + module: .dagger/env/docker-pull/plan name: docker-pull inputs: ref: - text: docker.io/daggerio/ci-test:qhkmeqmhmnqn@sha256:96640793ed325f893608508f1b60b9c19b547c178e45639a249989545894eed4 + text: docker.io/daggerio/ci-test:otnlnwqyyxlk@sha256:35fc94d52b4fa53c2caa38ff11e13182e6f88c651eb0846728d1007d931f0d3c sops: kms: [] gcp_kms: [] @@ -17,8 +19,8 @@ sops: SG1raUVNTzZIWDltV1pOS3hySHlJeWcKg3blmstOGcxtPww513+mAEA0MWOXwNAT 5ngRvG6MraW3g9dhIuUYOwjuJyz1Z07/DBEocSxnjSyw45ZCkM1/9Q== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-12T15:01:07Z" - mac: ENC[AES256_GCM,data:kmryJiX4cnZTeyRcH+TljCj+m5kEA4yPu0gQkqS3apEolfNFWzkdlvRS2P+9EYO19iT1FxpNRwrs+G9qGeISubc48u2++Yb/mAUU4ilIu8flIPs3s63Ep8FeRv+hI3Govljjbjyds+3mR+o0Iv+KhpKBPDboXyRpWGlIijpBzLQ=,iv:ROAK7qmGn0jWDZp8uPLVbReqdgO9qw8EESkYdPjxLDk=,tag:8CrydkWN9xtJX8yItgjz+A==,type:str] + lastmodified: "2021-06-18T19:57:47Z" + mac: ENC[AES256_GCM,data:dS7zAl28vERwDOh8OwNmVNrcZ10Ypibl7HylXnJ0+CBGCx3b0C6+/TNgytZFjhhjhOyJbioaTIA/Rra3Okz2Y1beJcP90CfixkIOQvpespIN6yh92SN6m1MbGQzWB0lURnVwHhLlOyIsDK5PaLcbW9mVhwiH4Y2otH+xRNO+8Ls=,iv:1vRlh02EFWYqu2q/AQeHDRcIJIiKxZAp7lspQmPybRI=,tag:0DcXYSoLMAJ/09ZunKkezg==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push/plan/push.cue b/stdlib/.dagger/env/docker-push/plan/push.cue index 60ba10e7..529466ca 100644 --- a/stdlib/.dagger/env/docker-push/plan/push.cue +++ b/stdlib/.dagger/env/docker-push/plan/push.cue @@ -55,7 +55,7 @@ TestPush: { push: docker.#Push & { "name": name source: image - registry: { + auth: { username: TestRegistry.username "secret": secret.out } diff --git a/stdlib/.dagger/env/docker-push/values.yaml b/stdlib/.dagger/env/docker-push/values.yaml index 35280cde..57fea252 100644 --- a/stdlib/.dagger/env/docker-push/values.yaml +++ b/stdlib/.dagger/env/docker-push/values.yaml @@ -1,3 +1,5 @@ +plan: + module: .dagger/env/docker-push/plan name: docker-push inputs: TestRegistry.secret: @@ -19,8 +21,8 @@ sops: UjFJYTc1UUUzSFVkZjQ2blRsSGpVdVEKOanMR3+WlAgoDfqTUW7WPW1ytT3NdkTX 4Rqo49QmnuKFJ9tKoBFQOqgIo8E/lpcOkeIUiy5e/35FvsZ/KFk/pg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-12T13:31:57Z" - mac: ENC[AES256_GCM,data:TrLGfqDj3lvZKroaPtlDuR0Ki+yoFDYFqIhW+g7iasVOzvDaqHepX8X/aLiHX+XHdTqGH6ehfu1k1BSaz6xKqqdIai9NIyokgIKXR1F5mRgK/aDhc6x/YvX3dSl79/4zBBblDpYNFhCarQMxeTSFP9GfW+e0+T/z10fHHlQub8o=,iv:Pab2qkZTqP/6j4LV0B97SACQm/UZPMkeahGjZLJ2fFg=,tag:r4IW1WRipuC/MdtwEzzEpA==,type:str] + lastmodified: "2021-06-18T19:34:53Z" + mac: ENC[AES256_GCM,data:2LqpZGLCgN4d72hZMSs9uuIy0Eh69eP9JfhCcCvnIUg8kXcr5/mThST3Xum1LHJsAwfXIxPQPuz2ZzlcWksgYczNalU+ibTVk6N3nLi4ynrbV5QXaoS2MUmJHx6Y4VsjKHg13DQOysqcCa3+vY3WKxZ/WLgkI0rVOwZMELQBfXo=,iv:LeVFP37Y0rpLJa3IpbHD0N1ZARH139dz434c+uLv+Yo=,tag:yjlfzzcvvFzmVnvBX+8aAg==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 0660d74d..07782226 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -37,31 +37,29 @@ import ( // Image source source: dagger.#Artifact @dagger(input) - // Image registry - registry: { - // Remote registry - target: string | *"https://index.docker.io/v1/" @dagger(input) - + // Registry auth + auth: { // Username username: string @dagger(input) // Password or secret - secret: string | bytes @dagger(input) + secret: string @dagger(input) } push: #up: [ op.#Load & {from: source}, - if registry != _|_ { + if auth != _|_ { op.#DockerLogin & { - target: registry.target - username: registry.username - secret: registry.secret + target: name + username: auth.username + secret: auth.secret } }, op.#PushContainer & {ref: name}, - op.#Subdir & {dir: "/dagger"}, + + op.#Subdir & {dir: "/dagger"}, ] // Image ref From 5468f60e39483a3e9cd1a36f103ff3e579a16395 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Thu, 24 Jun 2021 11:42:34 +0200 Subject: [PATCH 05/23] Normalize reference to login on registry Signed-off-by: Tom Chauveau --- solver/registryauth.go | 11 +++++- stdlib/.dagger/env/docker-pull/values.yaml | 6 +-- stdlib/docker/docker.cue | 46 ++++++++++------------ 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/solver/registryauth.go b/solver/registryauth.go index 2c47d49c..1a51d322 100644 --- a/solver/registryauth.go +++ b/solver/registryauth.go @@ -6,6 +6,7 @@ import ( "strings" "sync" + "github.com/docker/distribution/reference" bkauth "github.com/moby/buildkit/session/auth" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -63,9 +64,15 @@ func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.Cred } func parseAuthHost(host string) (*url.URL, error) { - isDockerHub := !(strings.Contains(host, "amazonaws.com") || strings.Contains(host, "gcr.io") || strings.Contains(host, "microsoft.com")) + if !strings.HasPrefix(host, "http://") && !strings.HasPrefix(host, "https://") && strings.Contains(host, "/") { + ref, err := reference.ParseNormalizedNamed(host) + if err != nil { + return nil, err + } + host = ref.String() + } - if host == "registry-1.docker.io" || isDockerHub { + if strings.Contains(host, "docker.io") { host = "https://index.docker.io/v1/" } diff --git a/stdlib/.dagger/env/docker-pull/values.yaml b/stdlib/.dagger/env/docker-pull/values.yaml index 9637ece1..86e2fe33 100644 --- a/stdlib/.dagger/env/docker-pull/values.yaml +++ b/stdlib/.dagger/env/docker-pull/values.yaml @@ -3,7 +3,7 @@ plan: name: docker-pull inputs: ref: - text: docker.io/daggerio/ci-test:otnlnwqyyxlk@sha256:35fc94d52b4fa53c2caa38ff11e13182e6f88c651eb0846728d1007d931f0d3c + text: docker.io/daggerio/ci-test:xtyzsocvpici@sha256:35fc94d52b4fa53c2caa38ff11e13182e6f88c651eb0846728d1007d931f0d3c sops: kms: [] gcp_kms: [] @@ -19,8 +19,8 @@ sops: SG1raUVNTzZIWDltV1pOS3hySHlJeWcKg3blmstOGcxtPww513+mAEA0MWOXwNAT 5ngRvG6MraW3g9dhIuUYOwjuJyz1Z07/DBEocSxnjSyw45ZCkM1/9Q== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-18T19:57:47Z" - mac: ENC[AES256_GCM,data:dS7zAl28vERwDOh8OwNmVNrcZ10Ypibl7HylXnJ0+CBGCx3b0C6+/TNgytZFjhhjhOyJbioaTIA/Rra3Okz2Y1beJcP90CfixkIOQvpespIN6yh92SN6m1MbGQzWB0lURnVwHhLlOyIsDK5PaLcbW9mVhwiH4Y2otH+xRNO+8Ls=,iv:1vRlh02EFWYqu2q/AQeHDRcIJIiKxZAp7lspQmPybRI=,tag:0DcXYSoLMAJ/09ZunKkezg==,type:str] + lastmodified: "2021-06-24T09:36:46Z" + mac: ENC[AES256_GCM,data:ncBmzJ8Tl1HkI5KUHTQowZVbrczoub1JBWLzK0FD6A2wh5vLVa/KHzcW1N6kXlzNMN7GDSAD8LAiPsW5uQoMDz4uFkrAMtdfXNsZ5jP7dZJawAh1J4PjDhc5vnKLJq7Ps/u1dsECiZWt1tk+R3KH7xGahZXXKCHfib8k3OEkiqQ=,iv:zjeA3oZ9JBE+bOO66R2xmJup7a9bBvDYUhrQg1H9kE0=,tag:Wjdsw5rbPfgQdMXaDAwAAQ==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 07782226..1a37324f 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -3,7 +3,6 @@ package docker import ( "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" "alpha.dagger.io/dagger/op" ) @@ -63,35 +62,30 @@ import ( ] // Image ref - ref: string @dagger(output) + ref: { + string + + #up: [ + op.#Load & {from: push}, + + op.#Export & { + source: "/image_ref" + }, + ] + } @dagger(output) // Image digest - digest: string @dagger(output) + digest: { + string - #up: [ - op.#Load & {from: alpine.#Image & { - package: { - bash: true - jq: true - } - }}, + #up: [ + op.#Load & {from: push}, - op.#Exec & { - always: true - args: ["/bin/bash", "-c", #""" - jq --arg key0 'ref' --arg value0 $(cat /dagger/image_ref) \ - --arg key1 'digest' --arg value1 $(cat /dagger/image_digest) \ - '. | .[$key0]=$value0 | .[$key1]=$value1 '<<< '{}' > /out - """#, - ] - mount: "/dagger": from: push - }, - - op.#Export & { - source: "/out" - format: "json" - }, - ] + op.#Export & { + source: "/image_digest" + }, + ] + } @dagger(output) } #Run: { From 67a982eb0f508c10c4f64ff7a4df8a6a5754e21c Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Sat, 26 Jun 2021 17:06:30 +0200 Subject: [PATCH 06/23] Move push and pull tests plans to docker subpackages Signed-off-by: Tom Chauveau --- stdlib/.dagger/env/docker-pull/values.yaml | 7 ++++--- .../env/docker-push-invalid-creds/values.yaml | 21 +++++++++++-------- stdlib/.dagger/env/docker-push/values.yaml | 7 ++++--- .../plan => docker/tests/pull}/pull.cue | 7 +++---- .../tests/push-invalid-creds}/push.cue | 9 ++++---- .../plan => docker/tests/push}/push.cue | 15 +++++++------ 6 files changed, 34 insertions(+), 32 deletions(-) rename stdlib/{.dagger/env/docker-pull/plan => docker/tests/pull}/pull.cue (73%) rename stdlib/{.dagger/env/docker-push-invalid-creds/plan => docker/tests/push-invalid-creds}/push.cue (78%) rename stdlib/{.dagger/env/docker-push/plan => docker/tests/push}/push.cue (77%) diff --git a/stdlib/.dagger/env/docker-pull/values.yaml b/stdlib/.dagger/env/docker-pull/values.yaml index 86e2fe33..fab47bc2 100644 --- a/stdlib/.dagger/env/docker-pull/values.yaml +++ b/stdlib/.dagger/env/docker-pull/values.yaml @@ -1,5 +1,6 @@ plan: - module: .dagger/env/docker-pull/plan + module: ./docker + package: ./tests/pull name: docker-pull inputs: ref: @@ -19,8 +20,8 @@ sops: SG1raUVNTzZIWDltV1pOS3hySHlJeWcKg3blmstOGcxtPww513+mAEA0MWOXwNAT 5ngRvG6MraW3g9dhIuUYOwjuJyz1Z07/DBEocSxnjSyw45ZCkM1/9Q== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-24T09:36:46Z" - mac: ENC[AES256_GCM,data:ncBmzJ8Tl1HkI5KUHTQowZVbrczoub1JBWLzK0FD6A2wh5vLVa/KHzcW1N6kXlzNMN7GDSAD8LAiPsW5uQoMDz4uFkrAMtdfXNsZ5jP7dZJawAh1J4PjDhc5vnKLJq7Ps/u1dsECiZWt1tk+R3KH7xGahZXXKCHfib8k3OEkiqQ=,iv:zjeA3oZ9JBE+bOO66R2xmJup7a9bBvDYUhrQg1H9kE0=,tag:Wjdsw5rbPfgQdMXaDAwAAQ==,type:str] + lastmodified: "2021-06-26T14:52:40Z" + mac: ENC[AES256_GCM,data:IVEK6NFWEmNv8kRay2wVNhrsXVazVinIYRDLy7DTvaiWXyQYun//joK3QIoKz3dqi9rXeuTd95B13RxVQWKy/8cpmryg4QCwAaCj8erb5FHMRfn5/mAAV3NL5oAoOpKF4lZByrfdrXTJKppGWwYOFy8X693kK3FUzoUpIW2OqXg=,iv:qinwsUefQ7M+0OCTISPdQ9q//xsPitmHeCpdF00BJoo=,tag:reHZ5j0nz9fjAEFpR7IGGQ==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml b/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml index 9f227119..423b44a7 100644 --- a/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml +++ b/stdlib/.dagger/env/docker-push-invalid-creds/values.yaml @@ -1,9 +1,12 @@ +plan: + module: ./docker + package: ./tests/push-invalid-creds name: docker-push-invalid-creds inputs: TestRegistry.secret: - text: ENC[AES256_GCM,data:QOkT,iv:MUV92Llmt8pskd1AUjnvpQ+B3Ws1wLKIuzy7SVhHRME=,tag:StNvPnmz89GcLb1Cro3O9g==,type:str] + text: ENC[AES256_GCM,data:PckymCtA/Q==,iv:to7XhUUcZrWDga7uT4C067BRzHEzmTPDUNAEb2TpS/I=,tag:jUTk8uGd185hmIvi/IHpww==,type:str] TestRegistry.username: - text: john + text: invalid sops: kms: [] gcp_kms: [] @@ -13,14 +16,14 @@ sops: - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3MC9DZGU1Tm5Ta2ttNUph - ZGxZaGxLMklRRWVaVmtzdEdqbnlkYmIvK2hNClVKd2RCak1GYXlvZWQxaHlzQUNw - Y2czeEdXZnQxT2dVQ01GY0NTcGNkMnMKLS0tIGwwa0xXVEZQUVUzdUpOQUJFTUxy - ZzZNNk1xb0F4cWVQRjh4aUJSUzExd2cKl0Ka0Qcc2KNOQjl3Bhnb1sGuJCZ6iDs4 - Hz2EldaxWJHZxuS18uNC38NxufG02ULJqJb2QC4cOzPrTeeKVE6Qlg== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4czBwNGtSdGZqdEZ5WDlM + SHVYOU5zdFl4L2ptZk5rSHgwek1aaDNicENFCkJ4OUIweU5OZTVKalpTSkhYaGxB + RUpHZmVvU3g3Y2tBZnRUcHh0TE52M1EKLS0tIHI1VUt1aUR0a0tDNHJVTHY4eEt1 + VC8wSTZvUE5UaDg2WE1CaGMzR3M1TEkK9v83AVI4lvFgjKCg8UmQrcxarlESWTfV + 2cDdWgoH7ZqgXo5jFv2tn8qQWHKl8eTTeYUWn8GoNVPKrCroax2fiQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-12T15:03:49Z" - mac: ENC[AES256_GCM,data:o2fTjTnDgSX4f2jSjs1LSKJ7eTrTmFV44gyZdYCdYnb6eyXpFuT4Bru8ERuJlTvUSc3wx4js14BlxS3T0tX0aBV39ScBlzQOC4Ulyvh4KOKEH9uUl7YmGrFlNH4yQ7DYoezxCqwxlLZGavDaSXUszvKWlcdMsTm3L/4LkfHQzWk=,iv:E1gyYQ0+02bIQguvN0w+wp8RS6uyT17tXp18e5riXmg=,tag:Azjz4ZivYmjC/7eMc6SfSQ==,type:str] + lastmodified: "2021-06-26T15:00:53Z" + mac: ENC[AES256_GCM,data:ptE3WydZDuethnN5Qh26uAfndRbT+RKz2mktH4s2KyRNeDKgiBfwOVS1xoTxz+nkFoms0Cxac3iaVwZLpZXniQUbOAYY1fzfmyL32bfAUdNFs7P6K0thwSy8r8LJ38GvxHzZW289YVFTGSaJWCapbrcGzl6B7Aj5RcQ+Hhu32K8=,iv:PA2R7Q8y8F//RGnHpOCmxp8jWKXlAZ3Yfo0xbtPfx2E=,tag:EmxBTb9WVrDdOmgDHEDYfg==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-push/values.yaml b/stdlib/.dagger/env/docker-push/values.yaml index 57fea252..46297620 100644 --- a/stdlib/.dagger/env/docker-push/values.yaml +++ b/stdlib/.dagger/env/docker-push/values.yaml @@ -1,5 +1,6 @@ plan: - module: .dagger/env/docker-push/plan + module: ./docker + package: ./tests/push name: docker-push inputs: TestRegistry.secret: @@ -21,8 +22,8 @@ sops: UjFJYTc1UUUzSFVkZjQ2blRsSGpVdVEKOanMR3+WlAgoDfqTUW7WPW1ytT3NdkTX 4Rqo49QmnuKFJ9tKoBFQOqgIo8E/lpcOkeIUiy5e/35FvsZ/KFk/pg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-18T19:34:53Z" - mac: ENC[AES256_GCM,data:2LqpZGLCgN4d72hZMSs9uuIy0Eh69eP9JfhCcCvnIUg8kXcr5/mThST3Xum1LHJsAwfXIxPQPuz2ZzlcWksgYczNalU+ibTVk6N3nLi4ynrbV5QXaoS2MUmJHx6Y4VsjKHg13DQOysqcCa3+vY3WKxZ/WLgkI0rVOwZMELQBfXo=,iv:LeVFP37Y0rpLJa3IpbHD0N1ZARH139dz434c+uLv+Yo=,tag:yjlfzzcvvFzmVnvBX+8aAg==,type:str] + lastmodified: "2021-06-26T14:53:13Z" + mac: ENC[AES256_GCM,data:kxzdmyQwRIVP9D+w9LzRDIZOxDUqpSaGeD/GqaVxnQivEUjVFK5ePAcYV1fzjU4eeO3chIrP8NpvpIKZ1LztQddsPdTj72Yffgc5yq8/dGa3njiM8p9oa5hnZNoxLtyVPgRoNy3ZUZ6YSN9nqCFWW0DCjeSoiDlPX+1Vj/S6PeM=,iv:DhX4N6idS3VBaqau6k9yH+li34hOd3jqBsJJQu/P3Jw=,tag:X+taa7XgRmovR0JkhGpi7g==,type:str] pgp: [] encrypted_suffix: secret version: 3.7.1 diff --git a/stdlib/.dagger/env/docker-pull/plan/pull.cue b/stdlib/docker/tests/pull/pull.cue similarity index 73% rename from stdlib/.dagger/env/docker-pull/plan/pull.cue rename to stdlib/docker/tests/pull/pull.cue index e0bb462e..0f4b0e81 100644 --- a/stdlib/.dagger/env/docker-pull/plan/pull.cue +++ b/stdlib/docker/tests/pull/pull.cue @@ -1,15 +1,14 @@ package docker import ( - "dagger.io/docker" - "dagger.io/dagger/op" - "dagger.io/alpine" + "alpha.dagger.io/dagger/op" + "alpha.dagger.io/alpine" ) ref: string @dagger(input) TestPull: { - pull: docker.#Pull & {from: ref} + pull: #Pull & {from: ref} check: #up: [ op.#Load & {from: alpine.#Image}, diff --git a/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue b/stdlib/docker/tests/push-invalid-creds/push.cue similarity index 78% rename from stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue rename to stdlib/docker/tests/push-invalid-creds/push.cue index 83e283a7..e995aab0 100644 --- a/stdlib/.dagger/env/docker-push-invalid-creds/plan/push.cue +++ b/stdlib/docker/tests/push-invalid-creds/push.cue @@ -1,8 +1,7 @@ package docker import ( - "dagger.io/docker" - "dagger.io/random" + "alpha.dagger.io/random" ) TestRegistry: { @@ -15,7 +14,7 @@ TestPush: { name: "daggerio/ci-test:\(tag.out)" - image: docker.#ImageFromDockerfile & { + image: #ImageFromDockerfile & { dockerfile: """ FROM alpine RUN echo "test" > /test.txt @@ -23,10 +22,10 @@ TestPush: { context: "" } - push: docker.#Push & { + push: #Push & { "name": name source: image - registry: { + auth: { username: TestRegistry.username secret: TestRegistry.secret } diff --git a/stdlib/.dagger/env/docker-push/plan/push.cue b/stdlib/docker/tests/push/push.cue similarity index 77% rename from stdlib/.dagger/env/docker-push/plan/push.cue rename to stdlib/docker/tests/push/push.cue index 529466ca..4f2315b4 100644 --- a/stdlib/.dagger/env/docker-push/plan/push.cue +++ b/stdlib/docker/tests/push/push.cue @@ -1,11 +1,10 @@ package docker import ( - "dagger.io/dagger/op" - "dagger.io/dagger" - "dagger.io/docker" - "dagger.io/alpine" - "dagger.io/random" + "alpha.dagger.io/dagger/op" + "alpha.dagger.io/dagger" + "alpha.dagger.io/alpine" + "alpha.dagger.io/random" ) TestRegistry: { @@ -36,7 +35,7 @@ TestRegistry: { } TestPush: { - tag: random.#String & {seed: "docker push and pull"} + tag: random.#String & {seed: "docker push"} name: "daggerio/ci-test:\(tag.out)" @@ -44,7 +43,7 @@ TestPush: { secret: TestRegistry.secret } - image: docker.#ImageFromDockerfile & { + image: #ImageFromDockerfile & { dockerfile: """ FROM alpine RUN echo "test" > /test.txt @@ -52,7 +51,7 @@ TestPush: { context: "" } - push: docker.#Push & { + push: #Push & { "name": name source: image auth: { From d10f2a49a5f8e6b52713add6e1f40f203cbe33e2 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Mon, 28 Jun 2021 14:48:49 +0200 Subject: [PATCH 07/23] Rename field according to @shykes review Signed-off-by: Tom Chauveau --- docs/reference/universe/docker/README.md | 12 ++++++------ stdlib/docker/docker.cue | 8 ++++---- stdlib/docker/tests/push-invalid-creds/push.cue | 8 +++++--- stdlib/docker/tests/push/push.cue | 8 +++++--- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/reference/universe/docker/README.md b/docs/reference/universe/docker/README.md index 4473c994..29e8a01e 100644 --- a/docs/reference/universe/docker/README.md +++ b/docs/reference/universe/docker/README.md @@ -74,12 +74,12 @@ Push a docker image to a remote registry ### docker.#Push Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*name* | `string` |Remote name (example: "index.docker.io/alpine:latest") | -|*source* | `dagger.#Artifact` |Image source | -|*auth.username* | `string` |Username | -|*auth.secret* | `string` |Password or secret | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*target* | `string` |Remote target (example: "index.docker.io/alpine:latest") | +|*source* | `dagger.#Artifact` |Image source | +|*auth.username* | `string` |Username | +|*auth.secret* | `string` |Password or secret | ### docker.#Push Outputs diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 1a37324f..79e2905a 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -30,8 +30,8 @@ import ( // Push a docker image to a remote registry #Push: { - // Remote name (example: "index.docker.io/alpine:latest") - name: string @dagger(input) + // Remote target (example: "index.docker.io/alpine:latest") + target: string @dagger(input) // Image source source: dagger.#Artifact @dagger(input) @@ -50,13 +50,13 @@ import ( if auth != _|_ { op.#DockerLogin & { - target: name + "target": target username: auth.username secret: auth.secret } }, - op.#PushContainer & {ref: name}, + op.#PushContainer & {ref: target}, op.#Subdir & {dir: "/dagger"}, ] diff --git a/stdlib/docker/tests/push-invalid-creds/push.cue b/stdlib/docker/tests/push-invalid-creds/push.cue index e995aab0..1c5ab6c0 100644 --- a/stdlib/docker/tests/push-invalid-creds/push.cue +++ b/stdlib/docker/tests/push-invalid-creds/push.cue @@ -10,9 +10,11 @@ TestRegistry: { } TestPush: { + // Generate a random string + // Seed is used to force buildkit execution and not simply use a previous generated string. tag: random.#String & {seed: "docker push and pull should fail"} - name: "daggerio/ci-test:\(tag.out)" + target: "daggerio/ci-test:\(tag.out)" image: #ImageFromDockerfile & { dockerfile: """ @@ -23,8 +25,8 @@ TestPush: { } push: #Push & { - "name": name - source: image + "target": target + source: image auth: { username: TestRegistry.username secret: TestRegistry.secret diff --git a/stdlib/docker/tests/push/push.cue b/stdlib/docker/tests/push/push.cue index 4f2315b4..83d7da71 100644 --- a/stdlib/docker/tests/push/push.cue +++ b/stdlib/docker/tests/push/push.cue @@ -35,9 +35,11 @@ TestRegistry: { } TestPush: { + // Generate a random string + // Seed is used to force buildkit execution and not simply use a previous generated string. tag: random.#String & {seed: "docker push"} - name: "daggerio/ci-test:\(tag.out)" + target: "daggerio/ci-test:\(tag.out)" secret: #TestGetSecret & { secret: TestRegistry.secret @@ -52,8 +54,8 @@ TestPush: { } push: #Push & { - "name": name - source: image + "target": target + source: image auth: { username: TestRegistry.username "secret": secret.out From 189fb715ebda66999e32a667de3f5718da81969b Mon Sep 17 00:00:00 2001 From: alefesta Date: Wed, 30 Jun 2021 17:54:12 +0200 Subject: [PATCH 08/23] Updated the Installer and Docs Updated Installer script and Docs accordingly to comments. Now it does not request anymore the personal token to be produced. Signed-off-by: alefesta --- docs/install.md | 8 +------- install.ps1 | 33 ++++++++++++++------------------- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/docs/install.md b/docs/install.md index 7758b401..c489039a 100644 --- a/docs/install.md +++ b/docs/install.md @@ -37,16 +37,10 @@ sudo mv ./bin/dagger /usr/local/bin ## Option 2 (Windows): Run a shell script -Since Dagger repository is currently private, we have to use a workaround -to be able to run the script and match the latest release. -This workaround will be removed once the repo will become public. -To generate a personal access token on GitHub follow the guidelines at [Create a personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) - From a terminal, run the following command: ```shell -$personalToken= -curl https://releases.dagger.io/dagger/install.ps1 -OutFile install.ps1 ; ./install.ps1 -PersonalToken $personalToken; rm install.ps1 +curl https://releases.dagger.io/dagger/install.ps1 -OutFile install.ps1 ; ./install.ps1; rm install.ps1 ``` We try to move the dagger binary under `C:\Windows\System32` but diff --git a/install.ps1 b/install.ps1 index d9a1fa84..8702ec3e 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,14 +1,12 @@ -param ( - [Parameter(Mandatory)] $PersonalToken -) +# param ( +# [Parameter(Mandatory)] $PersonalToken +# ) Clear-Host @" --------------------------------------------------------------------------------- Author: Alessandro Festa -Usage: To run using your GH personal developer token simply use the flag as below -./install.ps1 -PersonalToken 1234567891213 -Dagger executable will be save under the folder "dagger" in your home folder. +Dagger Installation Utility for Windows users --------------------------------------------------------------------------------- "@ @@ -17,11 +15,14 @@ Dagger executable will be save under the folder "dagger" in your home folder. $name="dagger" $base="https://dagger-io.s3.amazonaws.com" function http_download { - Clear-Host $version=Get_Version - $version= $version -replace '[""]' - $url = $base + "/" + $name + "/releases/" + $version.substring(1) + "/dagger_" + $version + "_windows_amd64.zip" - $fileName="dagger_" + $version + "_windows_amd64" + $version=$version -replace '[""]' + $version=$version -replace '\n' + $fileName="dagger_v" + $version + "_windows_amd64" + Clear-Host + $url = $base + "/" + $name + "/releases/" + $version + "/" + $fileName + ".zip" + write-host $url + Pause Invoke-WebRequest -Uri $url -OutFile $env:temp/$fileName.zip -ErrorAction Stop @@ -52,13 +53,8 @@ Please add dagger.exe to your PATH in order to use it } -function Get_Version { - - $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" - $headers.Add("Authorization", "token $PersonalToken") - $headers.Add("Accept", "application/vnd.github.VERSION.raw") - - $response = Invoke-RestMethod 'https://api.github.com/repos/dagger/dagger/releases/latest' -Method 'GET' -Headers $headers -Body $body -ErrorAction SilentlyContinue -ErrorVariable DownloadError +function Get_Version { + $response = Invoke-RestMethod 'http://releases.dagger.io/dagger/latest_version' -Method 'GET' -Body $body -ErrorAction SilentlyContinue -ErrorVariable DownloadError If ($DownloadError) { Clear-Host @@ -74,8 +70,7 @@ run the script and if it still fail please open an issue on the Dagger repo. "@ exit } - - return $response.tag_name| ConvertTo-Json + return $response } From 58a67cf86b30b59bc564c02be6bb5c958de1faa1 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Wed, 30 Jun 2021 18:27:26 +0200 Subject: [PATCH 09/23] Improve parseAuthHost function to work for all ref Signed-off-by: Tom Chauveau --- solver/registryauth.go | 18 +++++++++--------- tests/stdlib.bats | 16 ---------------- 2 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 tests/stdlib.bats diff --git a/solver/registryauth.go b/solver/registryauth.go index 1a51d322..20a4608f 100644 --- a/solver/registryauth.go +++ b/solver/registryauth.go @@ -64,17 +64,17 @@ func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.Cred } func parseAuthHost(host string) (*url.URL, error) { - if !strings.HasPrefix(host, "http://") && !strings.HasPrefix(host, "https://") && strings.Contains(host, "/") { - ref, err := reference.ParseNormalizedNamed(host) - if err != nil { - return nil, err - } - host = ref.String() - } + host = strings.TrimPrefix(host, "http://") + host = strings.TrimPrefix(host, "https://") - if strings.Contains(host, "docker.io") { - host = "https://index.docker.io/v1/" + // Retrieve only the registry + host = strings.SplitN(host, "/", 2)[0] + + ref, err := reference.ParseNormalizedNamed(host) + if err != nil { + return nil, err } + host = ref.String() if !strings.HasPrefix(host, "http://") && !strings.HasPrefix(host, "https://") { host = "https://" + host diff --git a/tests/stdlib.bats b/tests/stdlib.bats deleted file mode 100644 index dcdd715b..00000000 --- a/tests/stdlib.bats +++ /dev/null @@ -1,16 +0,0 @@ -setup() { - load 'helpers' - - common_setup -} - -# FIXME: move to universe/universe.bats -# Assigned to: -# Changes in https://github.com/dagger/dagger/pull/628 -@test "stdlib: docker: push-and-pull" { - skip_unless_secrets_available "$TESTDIR"/stdlib/docker/push-pull/inputs.yaml - - # check that they succeed with the credentials - run "$DAGGER" compute --input-yaml "$TESTDIR"/stdlib/docker/push-pull/inputs.yaml --input-dir source="$TESTDIR"/stdlib/docker/push-pull/testdata "$TESTDIR"/stdlib/docker/push-pull/ - assert_success -} From 8c2488d6fecbd29fd4fabb585614fd79568a14dd Mon Sep 17 00:00:00 2001 From: jffarge Date: Mon, 28 Jun 2021 12:01:29 +0200 Subject: [PATCH 10/23] docs: :arrow_up: on top of core, bump up docusaurus preset-classic + refacto Signed-off-by: jffarge --- website/package.json | 4 +- website/src/components/DocPageCustom.js | 47 ++ website/src/css/custom.scss | 12 +- website/src/theme/DocPage/index.js | 106 ++-- website/src/theme/DocPage/styles.module.css | 26 +- website/src/theme/Heading/index.js | 19 +- website/src/theme/Heading/styles.module.css | 5 + website/yarn.lock | 568 ++++++++++---------- 8 files changed, 411 insertions(+), 376 deletions(-) create mode 100644 website/src/components/DocPageCustom.js diff --git a/website/package.json b/website/package.json index 618e9351..796a78ad 100644 --- a/website/package.json +++ b/website/package.json @@ -16,8 +16,8 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.0", - "@docusaurus/preset-classic": "2.0.0-beta.0", + "@docusaurus/core": "2.0.0-beta.2", + "@docusaurus/preset-classic": "2.0.0-beta.2", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "amplitude-js": "^8.3.1", diff --git a/website/src/components/DocPageCustom.js b/website/src/components/DocPageCustom.js new file mode 100644 index 00000000..97471aac --- /dev/null +++ b/website/src/components/DocPageCustom.js @@ -0,0 +1,47 @@ +import React, { useState, useEffect } from 'react'; +import qs from 'querystringify'; +import isEmpty from 'lodash/isEmpty'; +import { checkUserCollaboratorStatus } from '../api/github' +import Spinner from './Spinner'; +import DocPageAuthentication from './DocPageAuthentication'; +import DocPageRedirect from './DocPageRedirect'; + +function DocPageCustom({ location, userAccessStatus, setUserAccessStatus }) { + const [isLoading, setIsLoading] = useState(true) + const [redirectState, setRedirectState] = useState() + const authQuery = qs.parse(location.search); + + useEffect(async () => { + if (!isEmpty(authQuery) && userAccessStatus === null) { //callback after successful auth with github + const user = await checkUserCollaboratorStatus(authQuery.code); + setUserAccessStatus(user) + if (user?.permission) { + window.localStorage.setItem('user', JSON.stringify(user)); + } + } + setIsLoading(false) + }, []) + + useEffect(() => { + import('amplitude-js').then(amplitude => { + if (userAccessStatus?.login) { + var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { + apiEndpoint: `${window.location.hostname}/t` + }); + amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); + } + }) + }, [location.pathname, userAccessStatus]) + + if (isLoading) return + + if (userAccessStatus?.permission === false) { + return + } + + if (userAccessStatus === null) { + return + } +} + +export default DocPageCustom \ No newline at end of file diff --git a/website/src/css/custom.scss b/website/src/css/custom.scss index 9590a23a..f861fa32 100644 --- a/website/src/css/custom.scss +++ b/website/src/css/custom.scss @@ -80,6 +80,7 @@ h2 { code { margin: 0 1px; + color: var(--ifm-code-color); } .markdown { @@ -139,6 +140,7 @@ h1[class^="docTitle"] { font-weight: bold; display: flex; align-items: center; + margin: 2rem 0 5rem; } #__docusaurus { @@ -170,7 +172,7 @@ h1[class^="docTitle"] { // sidebar @media (min-width: 997px) { - div[class^="docSidebarContainer"] { + aside[class^="docSidebarContainer"] { width: 250px; margin-right: 3rem; @@ -234,11 +236,15 @@ div[class^="codeBlockContainer"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } + + pre { + border-radius: var(--ifm-global-radius); + } } -div[class^="codeBlockLines"] { +code[class^="codeBlockLines"] { background-color: var(--ifm-color-primary-dark) !important; - margin-bottom: 0; + margin: 0; .token-line { color: var(--ifm-color-primary-light) !important; } diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index f0f4037a..56f0c843 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import React, { useState, useEffect, useCallback } from 'react'; +import React, { useState, useCallback } from 'react'; import { MDXProvider } from '@mdx-js/react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import renderRoutes from '@docusaurus/renderRoutes'; @@ -18,21 +18,40 @@ import { translate } from '@docusaurus/Translate'; import clsx from 'clsx'; import styles from './styles.module.css'; import { ThemeClassNames, docVersionSearchTag } from '@docusaurus/theme-common'; -import { Redirect } from "react-router"; -import qs from 'querystringify'; -import isEmpty from 'lodash/isEmpty'; -import { checkUserCollaboratorStatus } from '../../api/github' -import { GithubLoginButton } from 'react-social-login-buttons'; -import Spinner from '../../components/Spinner'; -import DocPageAuthentication from '../../components/DocPageAuthentication'; -import DocPageRedirect from '../../components/DocPageRedirect'; +import DocPageCustom from '../../components/DocPageCustom' import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; +function getSidebar({ versionMetadata, currentDocRoute }) { + function addTrailingSlash(str) { + return str.endsWith('/') ? str : `${str}/`; + } + + function removeTrailingSlash(str) { + return str.endsWith('/') ? str.slice(0, -1) : str; + } + + const { permalinkToSidebar, docsSidebars } = versionMetadata; // With/without trailingSlash, we should always be able to get the appropriate sidebar + // note: docs plugin permalinks currently never have trailing slashes + // trailingSlash is handled globally at the framework level, not plugin level + + const sidebarName = + permalinkToSidebar[currentDocRoute.path] || + permalinkToSidebar[addTrailingSlash(currentDocRoute.path)] || + permalinkToSidebar[removeTrailingSlash(currentDocRoute.path)]; + const sidebar = docsSidebars[sidebarName]; + return { + sidebar, + sidebarName, + }; +} + function DocPageContent({ currentDocRoute, versionMetadata, children }) { const { siteConfig, isClient } = useDocusaurusContext(); - const { pluginId, permalinkToSidebar, docsSidebars, version } = versionMetadata; - const sidebarName = permalinkToSidebar[currentDocRoute.path]; - const sidebar = docsSidebars[sidebarName]; + const { pluginId, version } = versionMetadata; + const { sidebarName, sidebar } = getSidebar({ + versionMetadata, + currentDocRoute, + }); const [hiddenSidebarContainer, setHiddenSidebarContainer] = useState(false); const [hiddenSidebar, setHiddenSidebar] = useState(false); const toggleSidebar = useCallback(() => { @@ -42,7 +61,6 @@ function DocPageContent({ currentDocRoute, versionMetadata, children }) { setHiddenSidebarContainer(!hiddenSidebarContainer); }, [hiddenSidebar]); - return (
{sidebar && ( -
+ }}>
)} -
+ )}
{ - if (typeof window !== "undefined") return JSON.parse(window.localStorage.getItem('user')) - })()) + // DocPage Swizzle + const [userAccessStatus, setUserAccessStatus] = useState((() => { + if (typeof window !== "undefined") return JSON.parse(window.localStorage.getItem('user')) + })()) - useEffect(async () => { - if (!isEmpty(authQuery) && userAccessStatus === null) { //callback after successful auth with github - const user = await checkUserCollaboratorStatus(authQuery.code); - setUserAccessStatus(user) - if (user?.permission) { - if (typeof window !== "undefined") window.localStorage.setItem('user', JSON.stringify(user)); - } - } - setIsLoading(false) - }, []) - - useEffect(() => { - import('amplitude-js').then(amplitude => { - if (userAccessStatus?.login) { - var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { - apiEndpoint: `${window.location.hostname}/t` - }); - amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); - } - }) - }, [location.pathname, userAccessStatus]) - - if (isLoading) return - - if (userAccessStatus?.permission === false) { - return - } - - if (userAccessStatus === null) { - return ( - - ) - } + if (process.env.OAUTH_ENABLE == 'true' && userAccessStatus?.permission !== true && userAgent !== 'Algolia DocSearch Crawler') { + return } - // END CUSTOM DOCPAGE + // End DocPageSwizzle if (!currentDocRoute) { return ; @@ -194,7 +176,9 @@ function DocPage(props) { - {renderRoutes(docRoutes)} + {renderRoutes(docRoutes, { + versionMetadata, + })} ); } diff --git a/website/src/theme/DocPage/styles.module.css b/website/src/theme/DocPage/styles.module.css index 19bfa5fc..4016d714 100644 --- a/website/src/theme/DocPage/styles.module.css +++ b/website/src/theme/DocPage/styles.module.css @@ -7,6 +7,7 @@ :root { --doc-sidebar-width: 300px; + --doc-sidebar-hidden-width: 30px; } :global(.docs-wrapper) { @@ -26,7 +27,7 @@ } .docMainContainerEnhanced { - max-width: none; + max-width: calc(100% - var(--doc-sidebar-hidden-width)); } .docSidebarContainer { @@ -39,7 +40,7 @@ } .docSidebarContainerHidden { - width: 30px; + width: var(--doc-sidebar-hidden-width); cursor: pointer; } @@ -72,27 +73,14 @@ } .docItemWrapperEnhanced { - max-width: calc(var(--ifm-container-width) + var(--doc-sidebar-width)); + max-width: calc( + var(--ifm-container-width) + var(--doc-sidebar-width) + ) !important; } } @media (max-width: 996px) { .docSidebarContainer { - margin-top: 0; - } -} - -@media (min-width: 997px) and (max-width: 1320px) { - .docItemWrapper { - max-width: calc( - var(--ifm-container-width) - var(--doc-sidebar-width) - - var(--ifm-spacing-horizontal) * 2 - ); - } - - .docItemWrapperEnhanced { - max-width: calc( - var(--ifm-container-width) - var(--ifm-spacing-horizontal) * 2 - ); + display: none; } } diff --git a/website/src/theme/Heading/index.js b/website/src/theme/Heading/index.js index 3086abbd..f2a5d6ed 100644 --- a/website/src/theme/Heading/index.js +++ b/website/src/theme/Heading/index.js @@ -14,7 +14,20 @@ import './styles.css'; import styles from './styles.module.css'; import AnchorIcon from "./anchor.svg" -const Heading = (Tag) => +export const MainHeading = function MainHeading({...props}) { + return ( +
+

+ {props.children} +

+
+ ); +}; + +const createAnchorHeading = (Tag) => function TargetComponent({id, ...props}) { const { navbar: {hideOnScroll}, @@ -49,4 +62,8 @@ const Heading = (Tag) => ); }; +const Heading = (headingType) => { + return headingType === 'h1' ? MainHeading : createAnchorHeading(headingType); +}; + export default Heading; diff --git a/website/src/theme/Heading/styles.module.css b/website/src/theme/Heading/styles.module.css index 4e244774..3f94fe99 100644 --- a/website/src/theme/Heading/styles.module.css +++ b/website/src/theme/Heading/styles.module.css @@ -8,3 +8,8 @@ .enhancedAnchor { top: calc(var(--ifm-navbar-height) * -1 - 0.5rem); } + +.h1Heading { + font-size: 3rem; + margin-bottom: calc(var(--ifm-leading-desktop) * var(--ifm-leading)); +} diff --git a/website/yarn.lock b/website/yarn.lock index eef8e303..8d417cc8 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1168,7 +1168,7 @@ resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.0.0-alpha.36.tgz#0af69a86b845974d0f8cab62db0218f66b6ad2d6" integrity sha512-zSN2SXuZPDqQaSFzYa1kOwToukqzhLHG7c66iO+/PlmWb6/RZ5cjTkG6VCJynlohRWea7AqZKWS/ptm8kM2Dmg== -"@docsearch/react@^3.0.0-alpha.33": +"@docsearch/react@^3.0.0-alpha.36": version "3.0.0-alpha.36" resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.0.0-alpha.36.tgz#f2dbd53ba9c389bc19aea89a3ad21782fa6b4bb5" integrity sha512-synYZDHalvMzesFiy7kK+uoz4oTdWSTbe2cU+iiUjwFMyQ+WWjWwGVnvcvk+cjj9pRCVaZo5y5WpqNXq1j8k9Q== @@ -1178,10 +1178,10 @@ "@docsearch/css" "3.0.0-alpha.36" algoliasearch "^4.0.0" -"@docusaurus/core@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.0.tgz#05506ee02e7d40e9f4c8d7b4f918d26d3b191159" - integrity sha512-xWwpuEwFRKJmZvNGOpr/dyRDnx/psckLPsozQTg2hu3u81Wqu9gigWgYK/C2fPlEjxMcVw0/2WH+zwpbyWmF2Q== +"@docusaurus/core@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.2.tgz#92cec7cbf8134a6524f848e2c2209dc71e9f3c87" + integrity sha512-i0jwYyTFkWUhnN5/eky7fkt7reIvNFH5iOyltXyCxn/DrKCGRqC63g3IbFhvLULl007JKp3vBXvwcNK3IpH8Yw== dependencies: "@babel/core" "^7.12.16" "@babel/generator" "^7.12.15" @@ -1193,47 +1193,49 @@ "@babel/runtime" "^7.12.5" "@babel/runtime-corejs3" "^7.12.13" "@babel/traverse" "^7.12.13" - "@docusaurus/cssnano-preset" "2.0.0-beta.0" + "@docusaurus/cssnano-preset" "2.0.0-beta.2" "@docusaurus/react-loadable" "5.5.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" - "@endiliey/static-site-generator-webpack-plugin" "^4.0.0" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-common" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" + "@slorber/static-site-generator-webpack-plugin" "^4.0.0" "@svgr/webpack" "^5.5.0" autoprefixer "^10.2.5" babel-loader "^8.2.2" babel-plugin-dynamic-import-node "2.3.0" - boxen "^5.0.0" - chalk "^4.1.0" + boxen "^5.0.1" + chalk "^4.1.1" chokidar "^3.5.1" - clean-css "^5.1.1" + clean-css "^5.1.2" commander "^5.1.0" - copy-webpack-plugin "^8.1.0" + copy-webpack-plugin "^9.0.0" core-js "^3.9.1" css-loader "^5.1.1" - css-minimizer-webpack-plugin "^2.0.0" - cssnano "^5.0.1" + css-minimizer-webpack-plugin "^3.0.1" + cssnano "^5.0.4" del "^6.0.0" detect-port "^1.3.0" + escape-html "^1.0.3" eta "^1.12.1" express "^4.17.1" file-loader "^6.2.0" - fs-extra "^9.1.0" + fs-extra "^10.0.0" github-slugger "^1.3.0" globby "^11.0.2" html-minifier-terser "^5.1.1" html-tags "^3.1.0" - html-webpack-plugin "^5.2.0" + html-webpack-plugin "^5.3.2" import-fresh "^3.3.0" is-root "^2.1.0" leven "^3.1.0" lodash "^4.17.20" - mini-css-extract-plugin "^1.4.0" + mini-css-extract-plugin "^1.6.0" module-alias "^2.2.2" nprogress "^0.2.0" - postcss "^8.2.10" - postcss-loader "^5.2.0" - prompts "^2.4.0" + postcss "^8.2.15" + postcss-loader "^5.3.0" + prompts "^2.4.1" react-dev-utils "^11.0.1" react-error-overlay "^6.0.9" react-helmet "^6.1.0" @@ -1243,90 +1245,92 @@ react-router-config "^5.1.1" react-router-dom "^5.2.0" resolve-pathname "^3.0.0" - rtl-detect "^1.0.2" + rtl-detect "^1.0.3" semver "^7.3.4" serve-handler "^6.1.3" shelljs "^0.8.4" std-env "^2.2.1" strip-ansi "^6.0.0" - terser-webpack-plugin "^5.1.1" - tslib "^2.1.0" + terser-webpack-plugin "^5.1.3" + tslib "^2.2.0" update-notifier "^5.1.0" url-loader "^4.1.1" - wait-on "^5.2.1" - webpack "^5.28.0" - webpack-bundle-analyzer "^4.4.0" + wait-on "^5.3.0" + webpack "^5.40.0" + webpack-bundle-analyzer "^4.4.2" webpack-dev-server "^3.11.2" - webpack-merge "^5.7.3" + webpack-merge "^5.8.0" webpackbar "^5.0.0-3" -"@docusaurus/cssnano-preset@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.0.tgz#a79223479666059565d60a505bed2bbcac770384" - integrity sha512-gqQHeQCDHZDd5NaiKZwDiyg75sBCqDyAsvmFukkDAty8xE7u9IhzbOQKvCAtwseuvzu2BNN41gnJ8bz7vZzQiw== +"@docusaurus/cssnano-preset@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.2.tgz#2da6ef240c7842f9a56575c8e8c3293c6e857213" + integrity sha512-GNGYkePEYWJkxgFNUBYjEUySKm5FfBbYoQqGWn6KxDN34Qi7o+Wb37zPOiz2pNKBq+qCvXOfCIqblq7n0S/POA== dependencies: - cssnano-preset-advanced "^5.0.0" - postcss "^8.2.10" - postcss-sort-media-queries "^3.8.9" + cssnano-preset-advanced "^5.1.1" + postcss "^8.2.15" + postcss-sort-media-queries "^3.10.11" -"@docusaurus/mdx-loader@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.0.tgz#7a58933994b2face62e34698db2f9c88c53c6d61" - integrity sha512-oQLS2ZeUnqw79CV37glglZpaYgFfA5Az5lT83m5tJfMUZjoK4ehG1XWBeUzWy8QQNI452yAID8jz8jihEQeCcw== +"@docusaurus/mdx-loader@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.2.tgz#6bd42ea069bd0ba57fa0ab5b2b65357c9fa1e88f" + integrity sha512-ZUqwQQY3P9/N2KBt28ADJgQWj98VqKG0+OEQJOiK6bd8uIngLrHvWE0WasBT3zgPK+ljhdRMaQ7TWt1Doot+ZA== dependencies: "@babel/parser" "^7.12.16" "@babel/traverse" "^7.12.13" - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" "@mdx-js/mdx" "^1.6.21" "@mdx-js/react" "^1.6.21" escape-html "^1.0.3" file-loader "^6.2.0" - fs-extra "^9.1.0" + fs-extra "^10.0.0" github-slugger "^1.3.0" - gray-matter "^4.0.2" + gray-matter "^4.0.3" mdast-util-to-string "^2.0.0" remark-emoji "^2.1.0" stringify-object "^3.3.0" unist-util-visit "^2.0.2" url-loader "^4.1.1" - webpack "^5.28.0" + webpack "^5.40.0" -"@docusaurus/plugin-content-blog@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-beta.0.tgz#ea7d3679ab252e8f0e58aaf80f1fc6001c72c755" - integrity sha512-lz63i5k/23RJ3Rk/2fIsYAoD8Wua3b5b0AbH2JoOhQu1iAIQiV8m91Z3XALBSzA3nBtAOIweNI7yzWL+JFSTvw== +"@docusaurus/plugin-content-blog@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-beta.2.tgz#9a529ee6c28deadb61c0ebf1273903d6ef9a7ee6" + integrity sha512-I4q8zwL2GpfBxebDWoKWBrEtV2oiOkrc8cP5JORw5HKKB9zOz99UcggnbanllkCtmj+o4RiuhCQ0vHPFB5ts3Q== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/mdx-loader" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" - chalk "^4.1.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/mdx-loader" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" + chalk "^4.1.1" + escape-string-regexp "^4.0.0" feed "^4.2.2" - fs-extra "^9.1.0" + fs-extra "^10.0.0" globby "^11.0.2" loader-utils "^2.0.0" lodash "^4.17.20" reading-time "^1.3.0" remark-admonitions "^1.2.1" - tslib "^2.1.0" - webpack "^5.28.0" + tslib "^2.2.0" + webpack "^5.40.0" -"@docusaurus/plugin-content-docs@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-beta.0.tgz#a5a1e0e95e499eefee53e4f61aeb99ac4a669648" - integrity sha512-WdDQUh2rRCbfJswVc0vY9EaAspxgziqpVEZja8+BmQR/TZh7HuLplT6GJbiFbE4RvwM3+PwG/jHMPglYDK60kw== +"@docusaurus/plugin-content-docs@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-beta.2.tgz#de14ca5e8428ea937478ce02811384d4e6a61920" + integrity sha512-lx7jC+DqMMio0Hhq3DNNGZKNUAD5n5Sc0T1m5x67iXoRJPwOEmKa+8fEhGV4tmXpTy7EmULpAnS+OxlJDOPhxg== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/mdx-loader" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" - chalk "^4.1.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/mdx-loader" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" + chalk "^4.1.1" combine-promises "^1.1.0" + escape-string-regexp "^4.0.0" execa "^5.0.0" - fs-extra "^9.1.0" + fs-extra "^10.0.0" globby "^11.0.2" import-fresh "^3.2.2" js-yaml "^4.0.0" @@ -1334,81 +1338,82 @@ lodash "^4.17.20" remark-admonitions "^1.2.1" shelljs "^0.8.4" - tslib "^2.1.0" + tslib "^2.2.0" utility-types "^3.10.0" - webpack "^5.28.0" + webpack "^5.40.0" -"@docusaurus/plugin-content-pages@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-beta.0.tgz#1cab3ebe0a08be74576f10c95675291bf84f848e" - integrity sha512-mk5LVVSvn+HJPKBaAs/Pceq/hTGxF2LVBvJEquuQz0NMAW3QdBWaYRRpOrL9CO8v+ygn5RuLslXsyZBsDNuhww== +"@docusaurus/plugin-content-pages@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-beta.2.tgz#d029926156685e651898073cff83a6b401c8de1a" + integrity sha512-Hl8GG6PpAH4AV3i5QxmxggUet/ONl9E7FdfbJ/aKsjqziay2nW6LS66Ug9EchWlEoWKpmgTvRKRKhqAIJkBzXA== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/mdx-loader" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/mdx-loader" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" globby "^11.0.2" lodash "^4.17.20" minimatch "^3.0.4" remark-admonitions "^1.2.1" slash "^3.0.0" tslib "^2.1.0" - webpack "^5.28.0" + webpack "^5.40.0" -"@docusaurus/plugin-debug@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-beta.0.tgz#bee672b8858d88bdb229d4301785ff4692ebd17f" - integrity sha512-m75sZdF8Yccxfih3qfdQg9DucMTrYBnmeTA8GNmdVaK701Ip8t50d1pDJchtu0FSEh6vzVB9C6D2YD5YgVFp8A== +"@docusaurus/plugin-debug@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-beta.2.tgz#c2b25722429b9a0d225b9a899e7f63c9b0bfaef4" + integrity sha512-Lej0Smd6wznFVOmMDQ5SU/cwOYgns63wKC6gRFBWJpZPYhmFsMOSbHTMVkAFJ5cdXeyomx51MkIH43aBytIqXQ== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - react-json-view "^1.21.1" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + react-json-view "^1.21.3" tslib "^2.1.0" -"@docusaurus/plugin-google-analytics@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-beta.0.tgz#ee287fb991202d8e9b792129dcc5542ef3ccd6c9" - integrity sha512-7lHrg1L+adc8VbiaLexa15i4fdq4MRPUTLMxRPAWz+QskhisW89Ryi2/gDmfMNqLblX84Qg2RASa+2gqO4wepw== +"@docusaurus/plugin-google-analytics@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-beta.2.tgz#afa0697b6ed769901fe3bfff27fba399cc552f78" + integrity sha512-hOnmhCoUn1wbMb6kS2HTmVFsMmx7VaAuH+OEJMX1mJ+bAlQg3Btoctvs1BivEl2WGVvV0M5zjHW1+zwZp/QFOw== dependencies: - "@docusaurus/core" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" -"@docusaurus/plugin-google-gtag@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-beta.0.tgz#4836770130cf54ff2cd83affbff9644ee7293e9e" - integrity sha512-V7zaYbhAMv0jexm5H/5sAnoM1GHibcn9QQk5UWC++x1kE0KRuLDZHV+9OyvW5wr0wWFajod/b88SpUpSMF5u+g== +"@docusaurus/plugin-google-gtag@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-beta.2.tgz#7987ab0f956558da32bd884daa63f4d8ad2ffd3c" + integrity sha512-9ugXaVZJF5YOWzKjLevXdSXjfEPndD1Qc46eJ0l43golLXXC+b0u0gdOMms9r+HCK6/OBqTbMKcejWIUBlx0wQ== dependencies: - "@docusaurus/core" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" -"@docusaurus/plugin-sitemap@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-beta.0.tgz#985d4cc3af86499f616ced024ba1fab8329e601d" - integrity sha512-dvmk8Sr+6pBkiKDb7Rjdp0GeFDWPUlayoJWK3fN3g0Fno6uxFfYhNZyXJ+ObyCA7HoW5rzeBMiO+uAja19JXTg== +"@docusaurus/plugin-sitemap@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-beta.2.tgz#96d6f01676c4a4fd9c03e6f45ef7bca5453b2cee" + integrity sha512-tyoqZs52nVoAN7ZxJjGnpF6TUEVmXIpcGWfo0ehuTsNDs1f0XTOpex6Ue5ddXd2cEXht0HfWcL/Ta93R8BDBFw== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" - fs-extra "^9.1.0" - sitemap "^6.3.6" - tslib "^2.1.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-common" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" + fs-extra "^10.0.0" + sitemap "^7.0.0" + tslib "^2.2.0" -"@docusaurus/preset-classic@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-beta.0.tgz#79eb4366e6b5eb7061370019127e40172432d770" - integrity sha512-cFpR0UaAeUt5qVx1bpidhlar6tiRNITIQlxP4bOVsjbxVTZhZ/cNuIz7C+2zFPCuKIflGXdTIQOrucPmd7z51Q== +"@docusaurus/preset-classic@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-beta.2.tgz#a8500ae2bed98d588584b81b00cc449655b0bf7b" + integrity sha512-ZdnCubWLoXrHgneHLQNoecwG3Cr19VBEOFOOebvMRCjGCfwyfJ7smBdx0Igvl7t+r9cAAnQtshPv5k6b4QPFKQ== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/plugin-content-blog" "2.0.0-beta.0" - "@docusaurus/plugin-content-docs" "2.0.0-beta.0" - "@docusaurus/plugin-content-pages" "2.0.0-beta.0" - "@docusaurus/plugin-debug" "2.0.0-beta.0" - "@docusaurus/plugin-google-analytics" "2.0.0-beta.0" - "@docusaurus/plugin-google-gtag" "2.0.0-beta.0" - "@docusaurus/plugin-sitemap" "2.0.0-beta.0" - "@docusaurus/theme-classic" "2.0.0-beta.0" - "@docusaurus/theme-search-algolia" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/plugin-content-blog" "2.0.0-beta.2" + "@docusaurus/plugin-content-docs" "2.0.0-beta.2" + "@docusaurus/plugin-content-pages" "2.0.0-beta.2" + "@docusaurus/plugin-debug" "2.0.0-beta.2" + "@docusaurus/plugin-google-analytics" "2.0.0-beta.2" + "@docusaurus/plugin-google-gtag" "2.0.0-beta.2" + "@docusaurus/plugin-sitemap" "2.0.0-beta.2" + "@docusaurus/theme-classic" "2.0.0-beta.2" + "@docusaurus/theme-search-algolia" "2.0.0-beta.2" "@docusaurus/react-loadable@5.5.0": version "5.5.0" @@ -1417,110 +1422,108 @@ dependencies: prop-types "^15.6.2" -"@docusaurus/theme-classic@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-beta.0.tgz#0ad74264dc592590bd7d8a6f6327cb83bbabc665" - integrity sha512-cBNtwAyg3be7Gk41FazMtgyibAcfuYaGHhGHIDRsXfc/qp3RhbiGiei7tyh200QT0NgKZxiVQy/r4d0mtjC++Q== +"@docusaurus/theme-classic@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-beta.2.tgz#e724b0740aaa17211b8dd86a0a356431837a188b" + integrity sha512-z6hJ3KyH+xmlAv5s+IgUek+eiWfkAwq2GTqCi9X6HdRmMSLxgmW7ikzK2fXVtk0VlhLxn/lBHds6Nvfo0YKCKg== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/plugin-content-blog" "2.0.0-beta.0" - "@docusaurus/plugin-content-docs" "2.0.0-beta.0" - "@docusaurus/plugin-content-pages" "2.0.0-beta.0" - "@docusaurus/theme-common" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/plugin-content-blog" "2.0.0-beta.2" + "@docusaurus/plugin-content-docs" "2.0.0-beta.2" + "@docusaurus/plugin-content-pages" "2.0.0-beta.2" + "@docusaurus/theme-common" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-common" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" "@mdx-js/mdx" "^1.6.21" "@mdx-js/react" "^1.6.21" - chalk "^4.1.0" + chalk "^4.1.1" clsx "^1.1.1" - copy-text-to-clipboard "^3.0.0" - fs-extra "^9.1.0" + copy-text-to-clipboard "^3.0.1" + fs-extra "^10.0.0" globby "^11.0.2" - infima "0.2.0-alpha.23" + infima "0.2.0-alpha.26" lodash "^4.17.20" parse-numeric-range "^1.2.0" - postcss "^8.2.10" - prism-react-renderer "^1.1.1" + postcss "^8.2.15" + prism-react-renderer "^1.2.1" prismjs "^1.23.0" prop-types "^15.7.2" react-router-dom "^5.2.0" rtlcss "^3.1.2" -"@docusaurus/theme-common@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-beta.0.tgz#3674ef6482cc39efa034fd8d8b1c831588896329" - integrity sha512-2rcVmQpvbdAgnzTWuM7Bfpu+2TQm928bhlvxn226jQy7IYz8ySRlIode63HhCtpx03hpdMCkrK6HxhfEcvHjQg== +"@docusaurus/theme-common@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-beta.2.tgz#3fce2348238debb5285a6596c86ecec1e9b584d2" + integrity sha512-4svDbPYpwFCb646rcayK029LANdnIHMhMFX1Out1EWcLmFFfAXY3YtWoX5iW4KEM9ScbxPisz0dKb2BVupJ6MQ== dependencies: - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/plugin-content-blog" "2.0.0-beta.0" - "@docusaurus/plugin-content-docs" "2.0.0-beta.0" - "@docusaurus/plugin-content-pages" "2.0.0-beta.0" - "@docusaurus/types" "2.0.0-beta.0" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/plugin-content-blog" "2.0.0-beta.2" + "@docusaurus/plugin-content-docs" "2.0.0-beta.2" + "@docusaurus/plugin-content-pages" "2.0.0-beta.2" + "@docusaurus/types" "2.0.0-beta.2" tslib "^2.1.0" -"@docusaurus/theme-search-algolia@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-beta.0.tgz#bfdee3981d8da72377b9045459950686d28a01fd" - integrity sha512-/GhgAm4yuwqTXWTsWnqpFYxpjTv+t45Wk8q/LmTVINa+A7b6jkMkch2lygagIt69/ufDm2Uw6eYhgrmF4DJqfQ== +"@docusaurus/theme-search-algolia@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-beta.2.tgz#944d27dde33d25f1b5440a277496b9955f71ca0e" + integrity sha512-bVzZ2GF94BysasqW+PeggP9BBijUFTcnCeIp2BjOkaRnHW1YNfsfhdGArWS/2WKMWi4Y1vu79UDAKR7svCKNjg== dependencies: - "@docsearch/react" "^3.0.0-alpha.33" - "@docusaurus/core" "2.0.0-beta.0" - "@docusaurus/theme-common" "2.0.0-beta.0" - "@docusaurus/utils" "2.0.0-beta.0" - "@docusaurus/utils-validation" "2.0.0-beta.0" + "@docsearch/react" "^3.0.0-alpha.36" + "@docusaurus/core" "2.0.0-beta.2" + "@docusaurus/theme-common" "2.0.0-beta.2" + "@docusaurus/utils" "2.0.0-beta.2" + "@docusaurus/utils-validation" "2.0.0-beta.2" algoliasearch "^4.8.4" algoliasearch-helper "^3.3.4" clsx "^1.1.1" eta "^1.12.1" lodash "^4.17.20" -"@docusaurus/types@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-beta.0.tgz#f473f417bdf690cfd52611ddf6d89ff939d1f2a4" - integrity sha512-z9PI+GbtYwqTXnkX4/a/A6psDX2p8N2uWlN2f4ifrm8WY4WhR9yiTOh0uo0pIqqaUQQvkEq3o5hOXuXLECEs+w== +"@docusaurus/types@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-beta.2.tgz#e51fb1b1110cd5bc7af9e80ea3caa8d1ca8b20e2" + integrity sha512-4lANZLq//nYukGH0TK/EVszq3SVvz2VADXXT5o39Hx1sghkVXhJBb0jX1GaSsn1aUUW6kJr9IbiaZdfifi2bNg== dependencies: commander "^5.1.0" joi "^17.4.0" querystring "0.2.0" - webpack "^5.28.0" - webpack-merge "^5.7.3" + webpack "^5.40.0" + webpack-merge "^5.8.0" -"@docusaurus/utils-validation@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.0.tgz#3e6491c269a397fed29717a1cb69109df9483461" - integrity sha512-ELl/FVJ6xBz35TisZ1NmJhjbiVXDeU++K531PEFPCPmwnQPh7S6hZXdPnR71/Kc3BmuN9X2ZkwGOqNKVfys2Bg== +"@docusaurus/utils-common@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-beta.2.tgz#b3c7ab1bae138ce0c99963e2ff0f276c2a2a4108" + integrity sha512-R2D3wr49kc0TVWQBiKWhM32wsdZQj2ioYT6+eyyKW8f4yRP731TpO1k0pL/c9/UVA5i3Qtei+/3+guFcfxJ7VQ== dependencies: - "@docusaurus/utils" "2.0.0-beta.0" - chalk "^4.1.0" + "@docusaurus/types" "2.0.0-beta.2" + tslib "^2.2.0" + +"@docusaurus/utils-validation@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.2.tgz#4254a0dfd91c5a1fe00cbd1f8e134d8cd5dd963d" + integrity sha512-JMS74ldYsRxoaWXmHrOnvwSZqAMtddbuCd3wrGSWHbJNX9PI6nNqdXJDHjHTyN6kiykU7U4Hhh7D47ICdUSGEQ== + dependencies: + "@docusaurus/utils" "2.0.0-beta.2" + chalk "^4.1.1" joi "^17.4.0" tslib "^2.1.0" -"@docusaurus/utils@2.0.0-beta.0": - version "2.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.0.tgz#6f2690fd6fcd942f0d690db1dffb96742762deb3" - integrity sha512-bvrT1EQu0maavr0Hb/lke9jmpzgVL/9tn5VQtbyahf472eJFY0bQDExllDrHK+l784SUvucqX0iaQeg0q6ySUw== +"@docusaurus/utils@2.0.0-beta.2": + version "2.0.0-beta.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.2.tgz#7746b371d813ed3fc7928de3e524914c0abfd20c" + integrity sha512-4nmfNZhl6zGMI+KJFEjLXWWyniMaESct5Oigqa55RbBXUtRI4isaOOMEjlfY+Q/jrJxQozRSuWKWM81VM3z6Yg== dependencies: - "@docusaurus/types" "2.0.0-beta.0" + "@docusaurus/types" "2.0.0-beta.2" "@types/github-slugger" "^1.3.0" - chalk "^4.1.0" + chalk "^4.1.1" escape-string-regexp "^4.0.0" - fs-extra "^9.1.0" - gray-matter "^4.0.2" + fs-extra "^10.0.0" + gray-matter "^4.0.3" lodash "^4.17.20" resolve-pathname "^3.0.0" - tslib "^2.1.0" - -"@endiliey/static-site-generator-webpack-plugin@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz#94bfe58fd83aeda355de797fcb5112adaca3a6b1" - integrity sha512-3MBqYCs30qk1OBRC697NqhGouYbs71D1B8hrk/AFJC6GwF2QaJOQZtA1JYAaGSe650sZ8r5ppRTtCRXepDWlng== - dependencies: - bluebird "^3.7.1" - cheerio "^0.22.0" - eval "^0.1.4" - url "^0.11.0" - webpack-sources "^1.4.3" + tslib "^2.2.0" "@hapi/hoek@^9.0.0": version "9.2.0" @@ -1800,10 +1803,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08" integrity sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA== -"@types/node@^14.14.28": - version "14.17.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.1.tgz#5e07e0cb2ff793aa7a1b41deae76221e6166049f" - integrity sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw== +"@types/node@^15.0.1": + version "15.12.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.5.tgz#9a78318a45d75c9523d2396131bd3cca54b2d185" + integrity sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg== "@types/parse-json@^4.0.0": version "4.0.0" @@ -2216,11 +2219,6 @@ async@^2.6.2: dependencies: lodash "^4.17.14" -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -2696,7 +2694,7 @@ clean-css@^4.2.3: dependencies: source-map "~0.6.0" -clean-css@^5.1.1: +clean-css@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.1.2.tgz#6ea0da7286b4ddc2469a1b776e2461a5007eed54" integrity sha512-QcaGg9OuMo+0Ds933yLOY+gHPWbxhxqF0HDexmToPf8pczvmvZGYzd+QqWp9/mkucAOKViI+dSFOqoZIvXbeBw== @@ -2939,18 +2937,18 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-text-to-clipboard@^3.0.0: +copy-text-to-clipboard@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz#8cbf8f90e0a47f12e4a24743736265d157bce69c" integrity sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q== -copy-webpack-plugin@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-8.1.1.tgz#3f697e162764925c2f0d235f380676125508fd26" - integrity sha512-rYM2uzRxrLRpcyPqGceRBDpxxUV8vcDqIKxAUKfcnFpcrPxT5+XvhTxv7XLjo5AvEJFPdAE3zCogG2JVahqgSQ== +copy-webpack-plugin@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-9.0.0.tgz#2bf592785d2fcdde9342dfed3676490fe0aa7ce8" + integrity sha512-k8UB2jLIb1Jip2nZbCz83T/XfhfjX6mB1yLJNYKrpYi7FQimfOoFv/0//iT6HV1K8FwUB5yUbCcnpLebJXJTug== dependencies: fast-glob "^3.2.5" - glob-parent "^5.1.1" + glob-parent "^6.0.0" globby "^11.0.3" normalize-path "^3.0.0" p-limit "^3.1.0" @@ -3056,13 +3054,13 @@ css-loader@^5.1.1: schema-utils "^3.0.0" semver "^7.3.5" -css-minimizer-webpack-plugin@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-2.0.0.tgz#3c42f6624ed4cf4780dd963e23ee649e5a25c1a8" - integrity sha512-cG/uc94727tx5pBNtb1Sd7gvUPzwmcQi1lkpfqTpdkuNq75hJCw7bIVsCNijLm4dhDcr1atvuysl2rZqOG8Txw== +css-minimizer-webpack-plugin@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.0.1.tgz#2f866079411d42309a485512642c0cb08b5468ae" + integrity sha512-RGFIv6iZWUPO2T1vE5+5pNCSs2H2xtHYRdfZPiiNH8Of6QOn9BeFnZSoHiQMkmsxOO/JkPe4BpKfs7slFIWcTA== dependencies: cssnano "^5.0.0" - jest-worker "^26.3.0" + jest-worker "^27.0.2" p-limit "^3.0.2" postcss "^8.2.9" schema-utils "^3.0.0" @@ -3141,22 +3139,22 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-advanced@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.1.2.tgz#859bb643e86b32d9fdd5f56ff47f2ec7035da1af" - integrity sha512-Joym8pdrIKqzASYvyTwJ9FpkmEcrYToWKWMGVFSggindrEDOpe+FgNpWhWcv6Z7GDZ4kCC3p7PE/oPSGTc8/kw== +cssnano-preset-advanced@^5.1.1: + version "5.1.3" + resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.1.3.tgz#a2c6cf2fe39108b81e88810e3c399d1c0fe030ea" + integrity sha512-pS4+Q2Hoo/FevZs2JqA2BG8Vn5o5VeXgj+z6kGndKTq3RFYvlKeJ1ZPnLXo9zyYKwmSqWW0rWqtGxxmigIte0Q== dependencies: autoprefixer "^10.2.0" - cssnano-preset-default "^5.1.2" + cssnano-preset-default "^5.1.3" postcss-discard-unused "^5.0.1" postcss-merge-idents "^5.0.1" postcss-reduce-idents "^5.0.1" postcss-zindex "^5.0.1" -cssnano-preset-default@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.2.tgz#5d4877a91769823c5da6bcebd54996ecdf8aca12" - integrity sha512-spilp8LRw0sacuxiN9A/dyyPr6G/WISKMBKcBD4NMoPV0ENx4DeuWvIIrSx9PII2nJIDCO3kywkqTPreECBVOg== +cssnano-preset-default@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" + integrity sha512-qo9tX+t4yAAZ/yagVV3b+QBKeLklQbmgR3wI7mccrDcR+bEk9iHgZN1E7doX68y9ThznLya3RDmR+nc7l6/2WQ== dependencies: css-declaration-sorter "^6.0.3" cssnano-utils "^2.0.1" @@ -3180,9 +3178,9 @@ cssnano-preset-default@^5.1.2: postcss-normalize-string "^5.0.1" postcss-normalize-timing-functions "^5.0.1" postcss-normalize-unicode "^5.0.1" - postcss-normalize-url "^5.0.1" + postcss-normalize-url "^5.0.2" postcss-normalize-whitespace "^5.0.1" - postcss-ordered-values "^5.0.1" + postcss-ordered-values "^5.0.2" postcss-reduce-initial "^5.0.1" postcss-reduce-transforms "^5.0.1" postcss-svgo "^5.0.2" @@ -3193,10 +3191,10 @@ cssnano-utils@^2.0.1: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2" integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== -cssnano@^5.0.0, cssnano@^5.0.1: - version "5.0.5" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.5.tgz#6b8787123bf4cd5a220a2fa6cb5bc036b0854b48" - integrity sha512-L2VtPXnq6rmcMC9vkBOP131sZu3ccRQI27ejKZdmQiPDpUlFkUbpXHgKN+cibeO1U4PItxVZp1zTIn5dHsXoyg== +cssnano@^5.0.0, cssnano@^5.0.4: + version "5.0.6" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.6.tgz#2a91ad34c6521ae31eab3da9c90108ea3093535d" + integrity sha512-NiaLH/7yqGksFGsFNvSRe2IV/qmEBAeDE64dYeD8OBrgp6lE8YoMeQJMtsv5ijo6MPyhuoOvFhI94reahBRDkw== dependencies: cosmiconfig "^7.0.0" cssnano-preset-default "^5.1.2" @@ -4092,12 +4090,11 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== dependencies: - at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" @@ -4188,7 +4185,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0: +glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -4304,7 +4301,7 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== -gray-matter@^4.0.2: +gray-matter@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798" integrity sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q== @@ -4563,10 +4560,10 @@ html-void-elements@^1.0.0: resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483" integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== -html-webpack-plugin@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.3.1.tgz#8797327548e3de438e3494e0c6d06f181a7f20d1" - integrity sha512-rZsVvPXUYFyME0cuGkyOHfx9hmkFa4pWfxY/mdY38PsBEaVNsRoA+Id+8z6DBDgyv3zaw6XQszdF8HLwfQvcdQ== +html-webpack-plugin@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.3.2.tgz#7b04bf80b1f6fe84a6d3f66c8b79d64739321b08" + integrity sha512-HvB33boVNCz2lTyBsSiMffsJ+m0YLIQ+pskblXgN9fnjS1BgEcuAfdInfXfGrkdXV406k9FiDi86eVCDBgJOyQ== dependencies: "@types/html-minifier-terser" "^5.0.0" html-minifier-terser "^5.0.1" @@ -4710,10 +4707,10 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infima@0.2.0-alpha.23: - version "0.2.0-alpha.23" - resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.23.tgz#2c17b473784ae8244fd985f126f9c27a49b24523" - integrity sha512-V0RTjB1otjpH3E2asbydx3gz7ovdSJsuV7r9JTdBggqRilnelTJUcXxLawBQQKsjQi5qPcRTjxnlaV8xyyKhhw== +infima@0.2.0-alpha.26: + version "0.2.0-alpha.26" + resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.26.tgz#8582d40ef01a09dbbde8f0e574f8c61d6bc0992b" + integrity sha512-0/Dt+89mf8xW+9/hKGmynK+WOAsiy0QydVJL0qie6WK57yGIQv+SjJrhMybKndnmkZBQ+Vlt0tWPnTakx8X2Qw== inflight@^1.0.4: version "1.0.6" @@ -5170,15 +5167,6 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -jest-worker@^26.3.0: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - jest-worker@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05" @@ -5705,7 +5693,7 @@ mini-create-react-context@^0.4.0: "@babel/runtime" "^7.12.1" tiny-warning "^1.0.3" -mini-css-extract-plugin@^1.4.0: +mini-css-extract-plugin@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.0.tgz#b4db2525af2624899ed64a23b0016e0036411893" integrity sha512-nPFKI7NSy6uONUo9yn2hIfb9vyYvkFu95qki0e21DQ9uaqNKDP15DGpK0KnV6wDroWxPHtExrdEwx/yDQ8nVRw== @@ -5878,7 +5866,7 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@^4.1.0, normalize-url@^4.5.0: +normalize-url@^4.1.0: version "4.5.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== @@ -6373,7 +6361,7 @@ postcss-discard-unused@^5.0.1: dependencies: postcss-selector-parser "^6.0.5" -postcss-loader@^5.2.0: +postcss-loader@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-5.3.0.tgz#1657f869e48d4fdb018a40771c235e499ee26244" integrity sha512-/+Z1RAmssdiSLgIZwnJHwBMnlABPgF7giYzTN2NOfr9D21IJZ4mQC1R2miwp80zno9M4zMD/umGI8cR+2EL5zw== @@ -6524,13 +6512,13 @@ postcss-normalize-unicode@^5.0.1: browserslist "^4.16.0" postcss-value-parser "^4.1.0" -postcss-normalize-url@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.1.tgz#ffa9fe545935d8b57becbbb7934dd5e245513183" - integrity sha512-hkbG0j58Z1M830/CJ73VsP7gvlG1yF+4y7Fd1w4tD2c7CaA2Psll+pQ6eQhth9y9EaqZSLzamff/D0MZBMbYSg== +postcss-normalize-url@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz#ddcdfb7cede1270740cf3e4dfc6008bd96abc763" + integrity sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ== dependencies: is-absolute-url "^3.0.3" - normalize-url "^4.5.0" + normalize-url "^6.0.1" postcss-value-parser "^4.1.0" postcss-normalize-whitespace@^5.0.1: @@ -6540,10 +6528,10 @@ postcss-normalize-whitespace@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-ordered-values@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.1.tgz#79ef6e2bd267ccad3fc0c4f4a586dfd01c131f64" - integrity sha512-6mkCF5BQ25HvEcDfrMHCLLFHlraBSlOXFnQMHYhSpDO/5jSR1k8LdEXOkv+7+uzW6o6tBYea1Km0wQSRkPJkwA== +postcss-ordered-values@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz#1f351426977be00e0f765b3164ad753dac8ed044" + integrity sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ== dependencies: cssnano-utils "^2.0.1" postcss-value-parser "^4.1.0" @@ -6579,10 +6567,10 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-sort-media-queries@^3.8.9: - version "3.10.11" - resolved "https://registry.yarnpkg.com/postcss-sort-media-queries/-/postcss-sort-media-queries-3.10.11.tgz#9e06c220c752c69d3ea4a6d55ac7d4960e201c4a" - integrity sha512-78Ak5YSnalr+UTdZa2OCSNAxvEnHg3GRqWccStljJW7MqeU0cJtMA5OzaMmn+upM+iI5vykWzibVEAYaaAlSzw== +postcss-sort-media-queries@^3.10.11: + version "3.11.12" + resolved "https://registry.yarnpkg.com/postcss-sort-media-queries/-/postcss-sort-media-queries-3.11.12.tgz#bfc449fadedfe2765ca4566c30b24694635ad182" + integrity sha512-PNhEOWR/btZ0bNNRqqdW4TWxBPQ1mu2I6/Zpco80vBUDSyEjtduUAorY0Vm68rvDlGea3+sgEnQ36iQ1A/gG8Q== dependencies: sort-css-media-queries "1.5.4" @@ -6613,7 +6601,7 @@ postcss-zindex@^5.0.1: resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-5.0.1.tgz#c585724beb69d356af8c7e68847b28d6298ece03" integrity sha512-nwgtJJys+XmmSGoYCcgkf/VczP8Mp/0OfSv3v0+fw0uABY4yxw+eFs0Xp9nAZHIKnS5j+e9ywQ+RD+ONyvl5pA== -postcss@^8.2.10, postcss@^8.2.15, postcss@^8.2.4, postcss@^8.2.9: +postcss@^8.2.15, postcss@^8.2.4, postcss@^8.2.9: version "8.3.0" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.0.tgz#b1a713f6172ca427e3f05ef1303de8b65683325f" integrity sha512-+ogXpdAjWGa+fdYY5BQ96V/6tAo+TdSSIMP5huJBIygdWwKtVoB5JWZ7yUd4xZ8r+8Kvvx4nyg/PQ071H4UtcQ== @@ -6640,7 +6628,7 @@ pretty-time@^1.1.0: resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== -prism-react-renderer@^1.1.1: +prism-react-renderer@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.2.1.tgz#392460acf63540960e5e3caa699d851264e99b89" integrity sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg== @@ -6672,7 +6660,7 @@ prompts@2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prompts@^2.4.0: +prompts@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61" integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ== @@ -6889,7 +6877,7 @@ react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-json-view@^1.21.1: +react-json-view@^1.21.3: version "1.21.3" resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.21.3.tgz#f184209ee8f1bf374fb0c41b0813cff54549c475" integrity sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw== @@ -7323,7 +7311,7 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rtl-detect@^1.0.2: +rtl-detect@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/rtl-detect/-/rtl-detect-1.0.3.tgz#42145b9a4f9cf0b94c4542aba90d57f0d18559bf" integrity sha512-2sMcZO60tL9YDEFe24gqddg3hJ+xSmJFN8IExcQUxeHxQzydQrN6GHPL+yAWgzItXSI7es53hcZC9pJneuZDKA== @@ -7644,12 +7632,12 @@ sisteransi@^1.0.5: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== -sitemap@^6.3.6: - version "6.4.0" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-6.4.0.tgz#b4bc4edf36de742405a7572bc3e467ba484b852e" - integrity sha512-DoPKNc2/apQZTUnfiOONWctwq7s6dZVspxAZe2VPMNtoqNq7HgXRvlRnbIpKjf+8+piQdWncwcy+YhhTGY5USQ== +sitemap@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-7.0.0.tgz#022bef4df8cba42e38e1fe77039f234cab0372b6" + integrity sha512-Ud0jrRQO2k7fEtPAM+cQkBKoMvxQyPKNXKDLn8tRVHxRCsdDQ2JZvw+aZ5IRYYQVAV9iGxEar6boTwZzev+x3g== dependencies: - "@types/node" "^14.14.28" + "@types/node" "^15.0.1" "@types/sax" "^1.2.1" arg "^5.0.0" sax "^1.2.4" @@ -7971,7 +7959,7 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -8032,7 +8020,7 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -terser-webpack-plugin@^5.1.1: +terser-webpack-plugin@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.3.tgz#30033e955ca28b55664f1e4b30a1347e61aa23af" integrity sha512-cxGbMqr6+A2hrIB5ehFIF+F/iST5ZOxvOmy9zih9ySbP1C2oEWQSOUS+2SNBTjzx5xLKO4xnod9eywdfq1Nb9A== @@ -8537,7 +8525,7 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" -wait-on@^5.2.1: +wait-on@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-5.3.0.tgz#584e17d4b3fe7b46ac2b9f8e5e102c005c2776c7" integrity sha512-DwrHrnTK+/0QFaB9a8Ol5Lna3k7WvUR4jzSKmz0YaPBpuN2sACyiPVKVfj6ejnjcajAcvn3wlbTyMIn9AZouOg== @@ -8568,7 +8556,7 @@ web-namespaces@^1.0.0, web-namespaces@^1.1.2: resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== -webpack-bundle-analyzer@^4.4.0: +webpack-bundle-analyzer@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz#39898cf6200178240910d629705f0f3493f7d666" integrity sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ== @@ -8641,10 +8629,10 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@^5.7.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.7.3.tgz#2a0754e1877a25a8bbab3d2475ca70a052708213" - integrity sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA== +webpack-merge@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== dependencies: clone-deep "^4.0.1" wildcard "^2.0.0" @@ -8665,10 +8653,10 @@ webpack-sources@^2.3.0: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.28.0: - version "5.38.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.38.1.tgz#5224c7f24c18e729268d3e3bc97240d6e880258e" - integrity sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g== +webpack@^5.40.0: + version "5.40.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.40.0.tgz#3182cfd324759d715252cf541901a226e57b5061" + integrity sha512-c7f5e/WWrxXWUzQqTBg54vBs5RgcAgpvKE4F4VegVgfo4x660ZxYUF2/hpMkZUnLjgytVTitjeXaN4IPlXCGIw== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" From 2d751c28fa0f5e1ea9070fbf7f88d4a7cfb6c5d1 Mon Sep 17 00:00:00 2001 From: jffarge Date: Thu, 1 Jul 2021 11:02:36 +0200 Subject: [PATCH 11/23] docs: :arrow_up: upgrade dependencies Signed-off-by: jffarge --- website/yarn.lock | 63 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 8 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 8d417cc8..0ee966d0 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1620,6 +1620,17 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@slorber/static-site-generator-webpack-plugin@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.1.tgz#0c8852146441aaa683693deaa5aee2f991d94841" + integrity sha512-PSv4RIVO1Y3kvHxjvqeVisk3E9XFoO04uwYBDWe217MFqKspplYswTuKLiJu0aLORQWzuQjfVsSlLPojwfYsLw== + dependencies: + bluebird "^3.7.1" + cheerio "^0.22.0" + eval "^0.1.4" + url "^0.11.0" + webpack-sources "^1.4.3" + "@svgr/babel-plugin-add-jsx-attribute@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz#81ef61947bb268eb9d50523446f9c638fb355906" @@ -2404,7 +2415,7 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -boxen@^5.0.0: +boxen@^5.0.0, boxen@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.1.tgz#657528bdd3f59a772b8279b831f27ec2c744664b" integrity sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA== @@ -2583,7 +2594,7 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.1.0: +chalk@^4.1.0, chalk@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== @@ -3151,7 +3162,7 @@ cssnano-preset-advanced@^5.1.1: postcss-reduce-idents "^5.0.1" postcss-zindex "^5.0.1" -cssnano-preset-default@^5.1.3: +cssnano-preset-default@^5.1.2, cssnano-preset-default@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" integrity sha512-qo9tX+t4yAAZ/yagVV3b+QBKeLklQbmgR3wI7mccrDcR+bEk9iHgZN1E7doX68y9ThznLya3RDmR+nc7l6/2WQ== @@ -3197,7 +3208,7 @@ cssnano@^5.0.0, cssnano@^5.0.4: integrity sha512-NiaLH/7yqGksFGsFNvSRe2IV/qmEBAeDE64dYeD8OBrgp6lE8YoMeQJMtsv5ijo6MPyhuoOvFhI94reahBRDkw== dependencies: cosmiconfig "^7.0.0" - cssnano-preset-default "^5.1.2" + cssnano-preset-default "^5.1.3" is-resolvable "^1.1.0" csso@^4.0.2, csso@^4.2.0: @@ -4192,6 +4203,13 @@ glob-parent@^5.1.0, glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.0.tgz#f851b59b388e788f3a44d63fab50382b2859c33c" + integrity sha512-Hdd4287VEJcZXUwv1l8a+vXC1GjOQqXe+VS30w/ypihpcnu9M1n3xeYeJu5CBpeEQj2nAab2xxz28GuA3vp4Ww== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -4567,8 +4585,8 @@ html-webpack-plugin@^5.3.2: dependencies: "@types/html-minifier-terser" "^5.0.0" html-minifier-terser "^5.0.1" - lodash "^4.17.20" - pretty-error "^2.1.1" + lodash "^4.17.21" + pretty-error "^3.0.4" tapable "^2.0.0" htmlparser2@^3.10.1, htmlparser2@^3.9.1: @@ -5871,6 +5889,11 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -7501,6 +7524,13 @@ serialize-javascript@^5.0.1: dependencies: randombytes "^2.1.0" +serialize-javascript@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + serve-handler@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" @@ -8020,6 +8050,18 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== +terser-webpack-plugin@^5.1.1: + version "5.1.4" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz#c369cf8a47aa9922bd0d8a94fe3d3da11a7678a1" + integrity sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA== + dependencies: + jest-worker "^27.0.2" + p-limit "^3.1.0" + schema-utils "^3.0.0" + serialize-javascript "^6.0.0" + source-map "^0.6.1" + terser "^5.7.0" + terser-webpack-plugin@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.3.tgz#30033e955ca28b55664f1e4b30a1347e61aa23af" @@ -8162,6 +8204,11 @@ tslib@^2.0.3, tslib@^2.1.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== +tslib@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" + integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" @@ -8667,7 +8714,7 @@ webpack@^5.40.0: browserslist "^4.14.5" chrome-trace-event "^1.0.2" enhanced-resolve "^5.8.0" - es-module-lexer "^0.4.0" + es-module-lexer "^0.6.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" @@ -8678,7 +8725,7 @@ webpack@^5.40.0: neo-async "^2.6.2" schema-utils "^3.0.0" tapable "^2.1.1" - terser-webpack-plugin "^5.1.1" + terser-webpack-plugin "^5.1.3" watchpack "^2.2.0" webpack-sources "^2.3.0" From c941f5c0821abc5df9c23a84345c53182cb4170a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 09:14:34 +0000 Subject: [PATCH 12/23] build(deps): bump prismjs from 1.23.0 to 1.24.0 in /website Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](https://github.com/PrismJS/prism/compare/v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/yarn.lock | 139 ++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 78 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 0ee966d0..af19c762 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2722,15 +2722,6 @@ cli-boxes@^2.2.1: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== -clipboard@^2.0.0: - version "2.0.8" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.8.tgz#ffc6c103dd2967a83005f3f61976aa4655a4cdba" - integrity sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ== - dependencies: - good-listener "^1.2.2" - select "^1.1.2" - tiny-emitter "^2.0.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -3083,7 +3074,7 @@ css-select-base-adapter@^0.1.1: resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== -css-select@^2.0.0, css-select@^2.0.2: +css-select@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== @@ -3104,6 +3095,17 @@ css-select@^3.1.2: domutils "^2.4.3" nth-check "^2.0.0" +css-select@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" + integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== + dependencies: + boolbase "^1.0.0" + css-what "^5.0.0" + domhandler "^4.2.0" + domutils "^2.6.0" + nth-check "^2.0.0" + css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" @@ -3145,6 +3147,11 @@ css-what@^4.0.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233" integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== +css-what@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" + integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== + cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -3162,7 +3169,7 @@ cssnano-preset-advanced@^5.1.1: postcss-reduce-idents "^5.0.1" postcss-zindex "^5.0.1" -cssnano-preset-default@^5.1.2, cssnano-preset-default@^5.1.3: +cssnano-preset-default@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" integrity sha512-qo9tX+t4yAAZ/yagVV3b+QBKeLklQbmgR3wI7mccrDcR+bEk9iHgZN1E7doX68y9ThznLya3RDmR+nc7l6/2WQ== @@ -3347,11 +3354,6 @@ del@^6.0.0: rimraf "^3.0.2" slash "^3.0.0" -delegate@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" - integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== - depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -3431,7 +3433,7 @@ docusaurus2-dotenv@^1.4.0: dependencies: dotenv-webpack "1.7.0" -dom-converter@^0.2: +dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== @@ -3512,6 +3514,15 @@ domutils@^2.4.3: domelementtype "^2.2.0" domhandler "^4.2.0" +domutils@^2.5.2, domutils@^2.6.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442" + integrity sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" @@ -3657,10 +3668,10 @@ es-abstract@^1.17.2, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-module-lexer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.4.1.tgz#dda8c6a14d8f340a24e34331e0fab0cb50438e0e" - integrity sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== +es-module-lexer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.6.0.tgz#e72ab05b7412e62b9be37c37a09bdb6000d706f0" + integrity sha512-f8kcHX1ArhllUtb/wVSyvygoKCznIjnxhLxy7TCvIiMdT7fL4ZDTIKaadMe6eLvOXg6Wk02UeoFgUoZ2EKZZUA== es-to-primitive@^1.2.1: version "1.2.1" @@ -4290,13 +4301,6 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -good-listener@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" - integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= - dependencies: - delegate "^3.1.2" - got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -4589,7 +4593,7 @@ html-webpack-plugin@^5.3.2: pretty-error "^3.0.4" tapable "^2.0.0" -htmlparser2@^3.10.1, htmlparser2@^3.9.1: +htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== @@ -4601,6 +4605,16 @@ htmlparser2@^3.10.1, htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^3.1.1" +htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -6638,13 +6652,13 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -pretty-error@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6" - integrity sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw== +pretty-error@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-3.0.4.tgz#94b1d54f76c1ed95b9c604b9de2194838e5b574e" + integrity sha512-ytLFLfv1So4AO1UkoBF6GXQgJRaKbiSiGFICaOPNwQ3CMvBvXpLRubeQWyPGnsbV/t9ml9qto6IeCsho0aEvwQ== dependencies: lodash "^4.17.20" - renderkid "^2.0.4" + renderkid "^2.0.6" pretty-time@^1.1.0: version "1.1.0" @@ -6657,11 +6671,9 @@ prism-react-renderer@^1.2.1: integrity sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg== prismjs@^1.23.0: - version "1.23.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33" - integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA== - optionalDependencies: - clipboard "^2.0.0" + version "1.24.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.24.0.tgz#0409c30068a6c52c89ef7f1089b3ca4de56be2ac" + integrity sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ== process-nextick-args@~2.0.0: version "2.0.1" @@ -7212,16 +7224,16 @@ remove-trailing-separator@^1.0.1: resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= -renderkid@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.5.tgz#483b1ac59c6601ab30a7a596a5965cabccfdd0a5" - integrity sha512-ccqoLg+HLOHq1vdfYNm4TBeaCDIi1FLt3wGojTDSvdewUv65oTmI3cnT2E4hRjl1gzKZIPK+KZrXzlUYKnR+vQ== +renderkid@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" + integrity sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ== dependencies: - css-select "^2.0.2" - dom-converter "^0.2" - htmlparser2 "^3.10.1" - lodash "^4.17.20" - strip-ansi "^3.0.0" + css-select "^4.1.3" + dom-converter "^0.2.0" + htmlparser2 "^6.1.0" + lodash "^4.17.21" + strip-ansi "^3.0.1" repeat-element@^1.1.2: version "1.1.4" @@ -7457,11 +7469,6 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= - selfsigned@^1.10.8: version "1.10.11" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.11.tgz#24929cd906fe0f44b6d01fb23999a739537acbe9" @@ -7524,13 +7531,6 @@ serialize-javascript@^5.0.1: dependencies: randombytes "^2.1.0" -serialize-javascript@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - serve-handler@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" @@ -7921,7 +7921,7 @@ strip-ansi@6.0.0, strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= @@ -8050,18 +8050,6 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -terser-webpack-plugin@^5.1.1: - version "5.1.4" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz#c369cf8a47aa9922bd0d8a94fe3d3da11a7678a1" - integrity sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA== - dependencies: - jest-worker "^27.0.2" - p-limit "^3.1.0" - schema-utils "^3.0.0" - serialize-javascript "^6.0.0" - source-map "^0.6.1" - terser "^5.7.0" - terser-webpack-plugin@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.3.tgz#30033e955ca28b55664f1e4b30a1347e61aa23af" @@ -8107,11 +8095,6 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -tiny-emitter@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" - integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== - tiny-invariant@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" From 2f710b0ce4fa34a502fda4e7aa4ab2cb2e0fd698 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Thu, 1 Jul 2021 14:08:49 +0200 Subject: [PATCH 13/23] Fix login miss behavior and update op Signed-off-by: Tom Chauveau --- solver/registryauth.go | 24 ++++++++---------------- stdlib/dagger/op/op.cue | 2 +- tests/ops/push-container/main.cue | 1 + 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/solver/registryauth.go b/solver/registryauth.go index 20a4608f..cf2684fa 100644 --- a/solver/registryauth.go +++ b/solver/registryauth.go @@ -2,7 +2,6 @@ package solver import ( "context" - "net/url" "strings" "sync" @@ -41,9 +40,9 @@ func (a *RegistryAuthProvider) Register(server *grpc.Server) { } func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.CredentialsRequest) (*bkauth.CredentialsResponse, error) { - reqURL, err := parseAuthHost(req.Host) - if err != nil { - return nil, err + host := req.Host + if host == "registry-1.docker.io" { + host = "docker.io" } a.m.RLock() @@ -55,7 +54,7 @@ func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.Cred return nil, err } - if u.Host == reqURL.Host { + if u == host { return auth, nil } } @@ -63,23 +62,16 @@ func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.Cred return &bkauth.CredentialsResponse{}, nil } -func parseAuthHost(host string) (*url.URL, error) { +func parseAuthHost(host string) (string, error) { host = strings.TrimPrefix(host, "http://") host = strings.TrimPrefix(host, "https://") - // Retrieve only the registry - host = strings.SplitN(host, "/", 2)[0] - ref, err := reference.ParseNormalizedNamed(host) - if err != nil { - return nil, err - } - host = ref.String() - if !strings.HasPrefix(host, "http://") && !strings.HasPrefix(host, "https://") { - host = "https://" + host + if err != nil { + return "", err } - return url.Parse(host) + return reference.Domain(ref), nil } func (a *RegistryAuthProvider) FetchToken(ctx context.Context, req *bkauth.FetchTokenRequest) (rr *bkauth.FetchTokenResponse, err error) { diff --git a/stdlib/dagger/op/op.cue b/stdlib/dagger/op/op.cue index 8fff9c31..123e48f4 100644 --- a/stdlib/dagger/op/op.cue +++ b/stdlib/dagger/op/op.cue @@ -59,7 +59,7 @@ package op #DockerLogin: { do: "docker-login" - target: string | *"https://index.docker.io/v1/" + target: string username: string // FIXME: should be a #Secret (circular import) secret: string | bytes diff --git a/tests/ops/push-container/main.cue b/tests/ops/push-container/main.cue index 7761c0a7..2b84729b 100644 --- a/tests/ops/push-container/main.cue +++ b/tests/ops/push-container/main.cue @@ -21,6 +21,7 @@ TestPushContainer: { ref: "daggerio/ci-test:\(tag.out)" #up: [ op.#DockerLogin & { + target: ref registry }, op.#WriteFile & { From a4856e7a6b6368ba9a891194b079fe2ebe23eeca Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Thu, 1 Jul 2021 15:48:03 +0200 Subject: [PATCH 14/23] Add new test to docker that push to 2 registry in one plan Signed-off-by: Tom Chauveau --- .../env/docker-push-multi-registry/.gitignore | 2 + .../docker-push-multi-registry/values.yaml | 35 +++++++ .../docker/tests/push-multi-registry/push.cue | 93 +++++++++++++++++++ stdlib/universe.bats | 6 +- 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 stdlib/.dagger/env/docker-push-multi-registry/.gitignore create mode 100644 stdlib/.dagger/env/docker-push-multi-registry/values.yaml create mode 100644 stdlib/docker/tests/push-multi-registry/push.cue diff --git a/stdlib/.dagger/env/docker-push-multi-registry/.gitignore b/stdlib/.dagger/env/docker-push-multi-registry/.gitignore new file mode 100644 index 00000000..01ec19b0 --- /dev/null +++ b/stdlib/.dagger/env/docker-push-multi-registry/.gitignore @@ -0,0 +1,2 @@ +# dagger state +state/** diff --git a/stdlib/.dagger/env/docker-push-multi-registry/values.yaml b/stdlib/.dagger/env/docker-push-multi-registry/values.yaml new file mode 100644 index 00000000..7f35d059 --- /dev/null +++ b/stdlib/.dagger/env/docker-push-multi-registry/values.yaml @@ -0,0 +1,35 @@ +plan: + module: ./docker + package: ./tests/push-multi-registry +name: docker-push-multi-registry +inputs: + TestRemoteAWS.awsConfig.accessKey: + secret: ENC[AES256_GCM,data:Vg+RRHYV5p0twlKtq0zGzokTsXY=,iv:XXEjaZBmS7A+KBZQ/0ZJ4WLH3M5dthg0lq86BhHOt2U=,tag:q6QSQkH9Jz/e4FGlBNllug==,type:str] + TestRemoteAWS.awsConfig.region: + text: us-east-2 + TestRemoteAWS.awsConfig.secretKey: + secret: ENC[AES256_GCM,data:uk5BBJhmc8RadT1FSIsnW+/Rvs8c+kIhshBia+DX+UEWiuPV+RwXfw==,iv:DzXcvUcy3amU7wCA6XFgPvGUAU+dxPZQMHKM94d9PlY=,tag:QDDs4kg6cFPLLGRM6sHzfg==,type:str] + TestRemoteDocker.dockerConfig.secret: + secret: ENC[AES256_GCM,data:bxlKdGBSd2Rxf0Kmw8+QO1h0308rGYPqzUO17Eg4RUh2WQjd,iv:vNZww3t8yBrcmmddJghtJWfkz3G9j2CPGyx9B3e/WK8=,tag:qlUl2dkREcGZxdKeAzPjzQ==,type:str] + TestRemoteDocker.dockerConfig.username: + text: daggertest +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnc1JZMUpTUnFZNVI3RHh3 + a0RtTDNIQ2xjaHJlM0tNbndta1NlMjc2a2dFCkQzV0FpMFBHZUdZb0RMYW1DUGN2 + TlZVQ2dhdWt3OEN5LzZEYXR4QkFSTTAKLS0tIFdaS0Z0dG85QXNNTnpXZ0dFUGpY + Yy81dlJ5cDhCL1VCc0szSE9Dbjh0TUEK+xcj1bHhJr0MR+2QLL0Y+at0/SFXcutx + VpUkCykV3eBV6P9I51+3NeJ/ZMmJ43N2geFFJNeacmn8uQKNxpgGGw== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2021-07-01T13:15:01Z" + mac: ENC[AES256_GCM,data:vpU0XJA/H/ra4BIuReWJAOLvFW4s+xHDAxxSYoU1WkdX68EUb1jbuhEqyDqlhQRn6lf3qSt9kbnbiiw39/mrdBFnwDg5DLjOPT17G/rBiSp9p+1e4mN8hGNp79uen+dDQX7f4NSxZ4nroMVtEuIuBrbFaZUMYVaBYEHjGuw2hgc=,iv:/nW7lpopSsqTwoaPgiHrabtl8aOZtJEezkwBDqi15Tg=,tag:uw3Hj+/t3Y5U0wpK7g+tJg==,type:str] + pgp: [] + encrypted_suffix: secret + version: 3.7.1 diff --git a/stdlib/docker/tests/push-multi-registry/push.cue b/stdlib/docker/tests/push-multi-registry/push.cue new file mode 100644 index 00000000..7b0891c5 --- /dev/null +++ b/stdlib/docker/tests/push-multi-registry/push.cue @@ -0,0 +1,93 @@ +package docker + +import ( + "alpha.dagger.io/aws" + "alpha.dagger.io/aws/ecr" + "alpha.dagger.io/dagger" + "alpha.dagger.io/dagger/op" + "alpha.dagger.io/random" + "alpha.dagger.io/alpine" +) + +// +// /!\ README /!\ +// The objective is to push an image on multiple registries to verify +// that we correctly handle that kind of configuration +// + +TestResources: { + // Generate a random string + // Seed is used to force buildkit execution and not simply use a previous generated string. + suffix: random.#String & {seed: "docker multi registry"} + + image: #ImageFromDockerfile & { + dockerfile: """ + FROM alpine + RUN echo "test" > /test.txt + """ + context: "" + } +} + +TestRemoteAWS: { + awsConfig: aws.#Config + + ecrCreds: ecr.#Credentials & { + config: awsConfig + } + + target: "125635003186.dkr.ecr.\(awsConfig.region).amazonaws.com/dagger-ci:test-ecr-\(TestResources.suffix.out)" + + remoteImg: #Push & { + "target": target + source: TestResources.image + auth: { + username: ecrCreds.username + secret: ecrCreds.secret + } + } +} + +#TestGetSecret: { + secret: dagger.#Artifact + + out: { + string + + #up: [ + op.#Load & {from: alpine.#Image}, + + op.#Exec & { + always: true + args: ["sh", "-c", "cp /input/secret /secret"] + mount: "/input/secret": "secret": secret + }, + + op.#Export & { + source: "/secret" + }, + ] + } +} + +TestRemoteDocker: { + dockerConfig: { + username: string & dagger.#Input + secret: dagger.#Secret & dagger.#Input + } + + secret: #TestGetSecret & { + secret: dockerConfig.secret + } + + target: "daggerio/ci-test:test-docker-\(TestResources.suffix.out)" + + remoteImg: #Push & { + "target": target + source: TestResources.image + auth: { + username: dockerConfig.username + "secret": secret.out + } + } +} diff --git a/stdlib/universe.bats b/stdlib/universe.bats index f2761325..1655a6ef 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -73,7 +73,11 @@ setup() { dagger -e docker-pull up } -@test "docker push and pull: invalid credential" { +@test "docker push: multi registry" { + run dagger -e docker-push-multi-registry up +} + +@test "docker push: invalid credential" { # Push image (SHOULD FAIL) run dagger -e docker-push-invalid-creds up assert_failure From 62d27aa930f557783be06df18d767bda21cc1ef0 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Thu, 1 Jul 2021 17:49:05 +0200 Subject: [PATCH 15/23] Skip push test to avoid data race (must be fix later) Signed-off-by: Tom Chauveau --- stdlib/universe.bats | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 1655a6ef..c03f419b 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -63,6 +63,7 @@ setup() { } @test "docker push and pull" { + skip "An occasional data race condition happen in the CI. Must be fix before execute that test" # Push image dagger -e docker-push up @@ -74,7 +75,8 @@ setup() { } @test "docker push: multi registry" { - run dagger -e docker-push-multi-registry up + skip "An occasional data race condition happen in the CI. Must be fix before execute that test" + run dagger -e docker-push-multi-registry up } @test "docker push: invalid credential" { From d0169727c25a3dc98e6b093a4baac58a0b3b7a47 Mon Sep 17 00:00:00 2001 From: jffarge Date: Mon, 28 Jun 2021 15:41:10 +0200 Subject: [PATCH 16/23] docs: :lipstick: many css improvments + minor fixes Signed-off-by: jffarge --- website/src/css/custom.scss | 61 ++++++++++++++------ website/src/theme/Toggle/Icon_Day-mode.svg | 1 - website/src/theme/Toggle/Icon_Night-mode.svg | 1 - website/src/theme/Toggle/icon_day.svg | 1 + website/src/theme/Toggle/icon_night.svg | 1 + website/src/theme/Toggle/index.js | 4 +- website/src/theme/Toggle/styles.module.css | 6 ++ 7 files changed, 54 insertions(+), 21 deletions(-) delete mode 100644 website/src/theme/Toggle/Icon_Day-mode.svg delete mode 100644 website/src/theme/Toggle/Icon_Night-mode.svg create mode 100644 website/src/theme/Toggle/icon_day.svg create mode 100644 website/src/theme/Toggle/icon_night.svg diff --git a/website/src/css/custom.scss b/website/src/css/custom.scss index f861fa32..afc40e0f 100644 --- a/website/src/css/custom.scss +++ b/website/src/css/custom.scss @@ -10,7 +10,6 @@ /* You can override the default Infima variables here. */ :root { --ifm-background-color: var(--ifm-color-primary-light); - --ifm-code-background: var(--ifm-color-primary-dark); --ifm-code-font-size: 100%; --ifm-code-border-radius: 2rem; @@ -19,7 +18,7 @@ --ifm-code-padding-horizontal: 0.2rem; --ifm-color-primary: #0e2b3d; --ifm-color-primary-dark: #131226; - --ifm-color-primary-darker: rgb(31, 165, 136); + --ifm-color-primary-darker: #0d0c1b; --ifm-color-primary-darkest: rgb(26, 136, 112); --ifm-color-primary-light: #fffef6; --ifm-color-primary-lighter: rgb(102, 212, 189); @@ -39,7 +38,7 @@ --ifm-menu-color: var(--ifm-color-primary-dark); --ifm-menu-color-active: var(--ifm-color-primary-dark); --ifm-menu-color-background-hover: #fdf9d7; - --ifm-menu-color-background-active: #fdf9d7; + --ifm-menu-color-background-active: var(--ifm-menu-color-background-hover); --ifm-menu-link-sublist-icon: url('data:image/svg+xml;utf8,'); --ifm-navbar-height: 6rem; --ifm-navbar-background-color: var(--ifm-color-primary-light); @@ -52,7 +51,7 @@ html[data-theme="dark"] { --ifm-background-color: var(--ifm-color-primary-dark); - --ifm-navbar-background-color: transparent; + --ifm-navbar-background-color: var(--ifm-color-primary-darker); --ifm-menu-color-active: var(--ifm-color-primary-light); --ifm-menu-color-background-active: var(--ifm-color-primary); --ifm-link-color: var(--ifm-color-primary-light); @@ -63,13 +62,14 @@ html[data-theme="dark"] { --ifm-table-stripe-background: #2e526a; --ifm-code-background: var(--ifm-color-primary-dark); --ifm-heading-color: var(--ifm-color-primary-light); + --ifm-blockquote-color: var(--ifm-menu-color-background-hover); + --ifm-color-emphasis-300: var(--ifm-menu-color-background-hover); } /* global */ h1, -h2, -h3 { +h2 { font-family: "Poppins", sans-serif; } @@ -86,7 +86,7 @@ code { .markdown { & > h2 { --ifm-h2-font-size: 1.5rem; - --ifm-h2-vertical-rhythm-top: 3; + --ifm-h2-vertical-rhythm-top: 4; } & > h3 { @@ -94,6 +94,10 @@ code { --ifm-h3-vertical-rhythm-top: 3; } + & > h2 + h3 { + --ifm-h3-vertical-rhythm-top: 2; + } + a { font-weight: bold; text-decoration: underline; @@ -130,9 +134,11 @@ a[class*="menuLinkExternal"]:after { position: absolute; right: var(--ifm-menu-link-padding-horizontal); top: var(--ifm-menu-link-padding-vertical); + height: 1.25rem; + width: 1.25rem; } -h1[class^="docTitle"] { +h1[class^="h1Heading"] { margin-bottom: 3rem; } @@ -141,6 +147,10 @@ h1[class^="docTitle"] { display: flex; align-items: center; margin: 2rem 0 5rem; + + html[data-theme="dark"] & svg path { + fill: var(--ifm-color-primary-light); + } } #__docusaurus { @@ -148,7 +158,7 @@ h1[class^="docTitle"] { padding-bottom: 3rem; html[data-theme="dark"] & { - background: #0d0c1b; + background: var(--ifm-color-primary-darker); } } @@ -232,6 +242,7 @@ div[class^="codeBlockContainer"] { div[class^="codeBlockTitle"] { background-color: var(--ifm-color-primary-dark) !important; + border-bottom: 1px solid #606770; font-family: var(--ifm-font-family-monospace); border-bottom-left-radius: 0; border-bottom-right-radius: 0; @@ -244,6 +255,7 @@ div[class^="codeBlockContainer"] { code[class^="codeBlockLines"] { background-color: var(--ifm-color-primary-dark) !important; + border-radius: 0; margin: 0; .token-line { color: var(--ifm-color-primary-light) !important; @@ -301,19 +313,29 @@ html[data-theme="dark"] .menu { color: var(--ifm-color-primary-light); } + &--active:not(.menu__link--sublist) { + background-color: var(--ifm-color-primary); + color: var(--ifm-color-primary-light); + + html[data-theme="dark"] & { + background-color: var(--ifm-menu-color-background-hover); + color: var(--ifm-color-primary); + } + } + html[data-theme="dark"] &, html[data-theme="dark"] &:not([href]), html[data-theme="dark"] &:focus { color: var(--ifm-color-primary-light); } - html[data-theme="dark"] &:hover { + html[data-theme="dark"] &:not(.menu__link--active):hover { background-color: var(--ifm-color-primary); } - html[data-theme="dark"] &:active { - background-color: var(--ifm-color-primary); - color: var(--ifm-color-primary-light); + html[data-theme="dark"] &:not(.menu__link--active):active { + background-color: var(--ifm-color-primary-light); + color: var(--ifm-color-primary); } &.menu__link--sublist { @@ -325,7 +347,7 @@ html[data-theme="dark"] .menu { } &:hover { - background-color: #fdf9d7; + background-color: var(--ifm-menu-color-background-hover); } html[data-theme="dark"] & { @@ -346,10 +368,16 @@ html[data-theme="dark"] .menu { display: none; } &:before { - content: url("/img/Dagger_Icons_Search.svg"); + content: ""; + background-color: black; + mask: url("/img/Dagger_Icons_Search.svg"); display: block; width: 20px; height: 20px; + + html[data-theme="dark"] & { + background-color: var(--ifm-color-primary-light); + } } } @@ -370,7 +398,6 @@ div[class*="admonition-"] .admonition-icon svg { img[alt="github-contribute"] { display: block; - margin: auto; width: 180px; } @@ -384,7 +411,7 @@ img[alt="github-contribute"] { .admonition-#{$name} .admonition-icon::before { mask: url($path); content: ""; - background-color: $bgColor; + background-color: var(--ifm-color-primary-dark); display: block; width: 22px; height: 22px; diff --git a/website/src/theme/Toggle/Icon_Day-mode.svg b/website/src/theme/Toggle/Icon_Day-mode.svg deleted file mode 100644 index 876ad3b2..00000000 --- a/website/src/theme/Toggle/Icon_Day-mode.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/src/theme/Toggle/Icon_Night-mode.svg b/website/src/theme/Toggle/Icon_Night-mode.svg deleted file mode 100644 index aba67380..00000000 --- a/website/src/theme/Toggle/Icon_Night-mode.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/src/theme/Toggle/icon_day.svg b/website/src/theme/Toggle/icon_day.svg new file mode 100644 index 00000000..06ce769d --- /dev/null +++ b/website/src/theme/Toggle/icon_day.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/src/theme/Toggle/icon_night.svg b/website/src/theme/Toggle/icon_night.svg new file mode 100644 index 00000000..b21b8329 --- /dev/null +++ b/website/src/theme/Toggle/icon_night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/src/theme/Toggle/index.js b/website/src/theme/Toggle/index.js index 65525bc2..64c0ea75 100644 --- a/website/src/theme/Toggle/index.js +++ b/website/src/theme/Toggle/index.js @@ -9,8 +9,8 @@ import { useThemeConfig } from '@docusaurus/theme-common'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import clsx from 'clsx'; import styles from './styles.module.css'; -import DarkIcon from "./Icon_Night-mode.svg" -import LightIcon from "./Icon_Day-mode.svg" +import DarkIcon from "./icon_night.svg" +import LightIcon from "./icon_day.svg" const Dark = ({ icon, style }) => ( diff --git a/website/src/theme/Toggle/styles.module.css b/website/src/theme/Toggle/styles.module.css index 68635249..72423869 100644 --- a/website/src/theme/Toggle/styles.module.css +++ b/website/src/theme/Toggle/styles.module.css @@ -103,3 +103,9 @@ :global(.react-toggle--checked .react-toggle-thumb) { left: 31px; } + +:global(.icon_day_svg__mode), +:global(.icon_night_svg__mode) { + height: 26px; + width: 26px; +} From 86dfbc4a6ba4bf833e98931d78b648539db198eb Mon Sep 17 00:00:00 2001 From: jffarge Date: Thu, 1 Jul 2021 14:29:16 +0200 Subject: [PATCH 17/23] docs: :bug: keep fixing css due to docusaurus update Signed-off-by: jffarge --- website/src/css/custom.scss | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/website/src/css/custom.scss b/website/src/css/custom.scss index afc40e0f..17170f8b 100644 --- a/website/src/css/custom.scss +++ b/website/src/css/custom.scss @@ -129,13 +129,23 @@ p { line-height: 24px; } -a[class*="menuLinkExternal"]:after { - background: url("/img/Dagger_Icons_External-link.svg") no-repeat; - position: absolute; - right: var(--ifm-menu-link-padding-horizontal); - top: var(--ifm-menu-link-padding-vertical); - height: 1.25rem; - width: 1.25rem; +a[target="_blank"]:not(.edit-this-page) { + svg { + display: none; + } + &:after { + background: var(--ifm-color-primary-darker); + mask: url("/img/Dagger_Icons_External-link.svg") no-repeat; + position: absolute; + content:''; + right: var(--ifm-menu-link-padding-horizontal); + top: var(--ifm-menu-link-padding-vertical); + height: 1.25rem; + width: 1.25rem; + } + html[data-theme="dark"] &:after { + background: var(--ifm-color-primary-light); + } } h1[class^="h1Heading"] { From 01ad5e4baa23b2e66d5edcdaaad82f399896a891 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 1 Jul 2021 18:53:07 +0200 Subject: [PATCH 18/23] README: fix Discord link Fixes #770 Signed-off-by: Andrea Luzzardi --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78dad209..f6f84ed4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Using Dagger, software builders can automate the deployment of any application t ## Useful links -- [Join the Dagger community on Discord](https://discord.gg/Rmffpmc) +- [Join the Dagger community on Discord](https://discord.gg/ufnyBtc8uY) - [Install from a binary release](https://docs.dagger.io/install) - [Build from source](https://docs.dagger.io/install#option-4-install-from-source) - [How to contribute](CONTRIBUTING.md) From cc004eb0efd7d4f2e270ad333cbaad81ef732db0 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 1 Jul 2021 18:47:32 +0200 Subject: [PATCH 19/23] ci: run universe tests as a separate CI job Signed-off-by: Andrea Luzzardi --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++--------------- Makefile | 9 ++++----- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1658b159..e7737f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,9 +76,6 @@ jobs: with: go-version: 1.16 - - name: Setup Kind Kubernetes Cluster - uses: helm/kind-action@v1.2.0 - - name: Install Dependencies run: | # SOPS @@ -92,20 +89,33 @@ jobs: mkdir -p ~/.config/dagger echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Integration test run: | - make integration + make core-integration - - name: Publish Test Report - uses: mikepenz/action-junit-report@v2 - if: always() + universe: + name: Universe + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Check out + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v1 with: - report_paths: "tests/*.xml" - github_token: ${{ secrets.GITHUB_TOKEN }} - check_name: "Report" + go-version: 1.16 + + - name: Setup Kind Kubernetes Cluster + uses: helm/kind-action@v1.2.0 + + - name: Import Dagger private key + env: + DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }} + run: | + mkdir -p ~/.config/dagger + echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt + + - name: Universe Test + run: | + make universe-test diff --git a/Makefile b/Makefile index 4d8b86c7..00c5e1e8 100644 --- a/Makefile +++ b/Makefile @@ -41,16 +41,15 @@ check-buildkit-version: || { echo buildkit version mismatch go.mod != util/buildkitd/buildkitd.go ; exit 1; } .PHONY: integration -integration: dagger-debug universe-test - $(shell command -v sops > /dev/null || { echo "You need sops. On macOS: brew install sops"; exit 1; }) - $(shell command -v parallel > /dev/null || { echo "You need gnu parallel. On macOS: brew install parallel"; exit 1; }) +integration: core-integration universe-test + +.PHONY: core-integration +core-integration: dagger-debug yarn --cwd "./tests" install DAGGER_BINARY="../cmd/dagger/dagger-debug" yarn --cwd "./tests" test .PHONY: universe-test universe-test: dagger-debug - $(shell command -v sops > /dev/null || { echo "You need sops. On macOS: brew install sops"; exit 1; }) - $(shell command -v parallel > /dev/null || { echo "You need gnu parallel. On macOS: brew install parallel"; exit 1; }) yarn --cwd "./universe" install DAGGER_BINARY="../cmd/dagger/dagger-debug" yarn --cwd "./universe" test From ecd409951c22f1f7503435ca88a1bca9e0fc4685 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Fri, 2 Jul 2021 01:20:20 +0200 Subject: [PATCH 20/23] docker.#Push: Set auth as optional Signed-off-by: Guillaume de Rouville --- docs/reference/universe/docker/README.md | 10 ++++------ stdlib/docker/docker.cue | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/reference/universe/docker/README.md b/docs/reference/universe/docker/README.md index 29e8a01e..b59545de 100644 --- a/docs/reference/universe/docker/README.md +++ b/docs/reference/universe/docker/README.md @@ -74,12 +74,10 @@ Push a docker image to a remote registry ### docker.#Push Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*target* | `string` |Remote target (example: "index.docker.io/alpine:latest") | -|*source* | `dagger.#Artifact` |Image source | -|*auth.username* | `string` |Username | -|*auth.secret* | `string` |Password or secret | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*target* | `string` |Remote target (example: "index.docker.io/alpine:latest") | +|*source* | `dagger.#Artifact` |Image source | ### docker.#Push Outputs diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 79e2905a..8cacf6ef 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -37,7 +37,7 @@ import ( source: dagger.#Artifact @dagger(input) // Registry auth - auth: { + auth?: { // Username username: string @dagger(input) From 4f37745f6da7fd2e3de6edf42e8e420046c879f6 Mon Sep 17 00:00:00 2001 From: jffarge Date: Fri, 2 Jul 2021 11:44:02 +0200 Subject: [PATCH 21/23] docs: :ambulance: call amplitude when user is logged in Signed-off-by: jffarge --- website/src/components/DocPageCustom.js | 11 ----------- website/src/theme/DocPage/index.js | 13 ++++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/src/components/DocPageCustom.js b/website/src/components/DocPageCustom.js index 97471aac..a7ac4ebb 100644 --- a/website/src/components/DocPageCustom.js +++ b/website/src/components/DocPageCustom.js @@ -22,17 +22,6 @@ function DocPageCustom({ location, userAccessStatus, setUserAccessStatus }) { setIsLoading(false) }, []) - useEffect(() => { - import('amplitude-js').then(amplitude => { - if (userAccessStatus?.login) { - var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { - apiEndpoint: `${window.location.hostname}/t` - }); - amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); - } - }) - }, [location.pathname, userAccessStatus]) - if (isLoading) return if (userAccessStatus?.permission === false) { diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index 56f0c843..506b7ffc 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import React, { useState, useCallback } from 'react'; +import React, { useState, useCallback, useEffect } from 'react'; import { MDXProvider } from '@mdx-js/react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import renderRoutes from '@docusaurus/renderRoutes'; @@ -163,6 +163,17 @@ function DocPage(props) { if (typeof window !== "undefined") return JSON.parse(window.localStorage.getItem('user')) })()) + useEffect(() => { + import('amplitude-js').then(amplitude => { + if (userAccessStatus?.login) { + var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { + apiEndpoint: `${window.location.hostname}/t` + }); + amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); + } + }) + }, [location.pathname, userAccessStatus]) + if (process.env.OAUTH_ENABLE == 'true' && userAccessStatus?.permission !== true && userAgent !== 'Algolia DocSearch Crawler') { return } From 93f3570c79b558e7f8f261c9d8ff7a519ef35d6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 19:27:22 +0000 Subject: [PATCH 22/23] build(deps): bump github.com/spf13/cobra from 1.1.3 to 1.2.1 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.3 to 1.2.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md) - [Commits](https://github.com/spf13/cobra/compare/v1.1.3...v1.2.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e928cafc..abc4d2b1 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 github.com/opentracing/opentracing-go v1.2.0 github.com/rs/zerolog v1.23.0 - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.2.1 github.com/spf13/viper v1.8.1 github.com/stretchr/testify v1.7.0 github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 diff --git a/go.sum b/go.sum index 6ebca3be..1c9df6f7 100644 --- a/go.sum +++ b/go.sum @@ -984,8 +984,8 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= From 6c5b4046736f02fc9221a057e073bf277b7e464b Mon Sep 17 00:00:00 2001 From: Marcos Nils Date: Sun, 4 Jul 2021 06:25:35 -0300 Subject: [PATCH 23/23] Fix 101 use typo in outputs Fixes #780 Signed-off-by: Marcos Lilljedahl --- docs/learn/101-use.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learn/101-use.md b/docs/learn/101-use.md index c0225b07..c25af7c0 100644 --- a/docs/learn/101-use.md +++ b/docs/learn/101-use.md @@ -113,7 +113,7 @@ The inputs are persisted inside the `.dagger` directory and pushed to your git r ### The outputs -The plan defines one or several `outputs`. They can show helpful information at the end of the deployment. That's how we read the deploy `url` at the end of the deployment. Here is the command to list all inputs: +The plan defines one or several `outputs`. They can show helpful information at the end of the deployment. That's how we read the deploy `url` at the end of the deployment. Here is the command to list all outputs: ```shell dagger output list