From ad090fd1ff9a8cf88a84e58fef67904d1c394785 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 14 Apr 2022 15:58:01 +0200 Subject: [PATCH 01/53] pass skylink from request context to /user/limits --- docker/nginx/libs/skynet/account.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/nginx/libs/skynet/account.lua b/docker/nginx/libs/skynet/account.lua index 56c99897..709d8130 100644 --- a/docker/nginx/libs/skynet/account.lua +++ b/docker/nginx/libs/skynet/account.lua @@ -76,9 +76,16 @@ function _M.get_account_limits() if ngx.var.account_limits == "" then local httpc = require("resty.http").new() + local uri = "http://10.10.10.70:3000/user/limits" + + -- include skylink if it is available in the context of request + -- todo: this should not rely on skylink variable to be defined + if ngx.var.skylink ~= nil and ngx.var.skylink ~= "" then + uri = uri .. "/" .. ngx.var.skylink + end -- 10.10.10.70 points to accounts service (alias not available when using resty-http) - local res, err = httpc:request_uri("http://10.10.10.70:3000/user/limits?unit=byte", { + local res, err = httpc:request_uri(uri .. "?unit=byte", { headers = auth_headers, }) From 8a0bbfc2999ac61305b4a35def6092e01c58195e Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Fri, 15 Apr 2022 12:50:07 -0400 Subject: [PATCH 02/53] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 337f9791..e2c1714f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Latest Setup Documentation Latest Skynet Webportal setup documentation and the setup process Skynet Labs -supports is located at https://docs.siasky.net/webportal-management/overview. +supports is located at https://portal-docs.skynetlabs.com/. Some scripts and setup documentation contained in this repository (`skynet-webportal`) may be outdated and generally should not be used. From 07f5352bf081d960ada7bf19e61f42a60a3813cc Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Fri, 15 Apr 2022 12:50:26 -0400 Subject: [PATCH 03/53] Update README.md --- setup-scripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-scripts/README.md b/setup-scripts/README.md index 1d032795..d5237e09 100644 --- a/setup-scripts/README.md +++ b/setup-scripts/README.md @@ -2,7 +2,7 @@ > :warning: This documentation is outdated and should be used for reference only. Portal setup documentation is located at -https://docs.siasky.net/webportal-management/overview. +https://portal-docs.skynetlabs.com/. This directory contains a setup guide and scripts that will install and configure some basic requirements for running a Skynet Portal. The assumption is From 7863faa701dda307b4f32a4026245831188767f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:13:40 +0000 Subject: [PATCH 04/53] build(deps): bump gatsby-plugin-image in /packages/website Bumps [gatsby-plugin-image](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-image) from 2.11.1 to 2.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-image/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-image@2.12.1/packages/gatsby-plugin-image) --- updated-dependencies: - dependency-name: gatsby-plugin-image dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 945de31f..b100c42d 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -15,7 +15,7 @@ "framer-motion": "6.2.10", "gatsby": "4.12.1", "gatsby-background-image": "1.6.0", - "gatsby-plugin-image": "2.11.1", + "gatsby-plugin-image": "2.12.1", "gatsby-plugin-manifest": "4.11.1", "gatsby-plugin-postcss": "5.12.1", "gatsby-plugin-react-helmet": "5.10.0", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 9ffd42ed..3d40f151 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -3339,7 +3339,7 @@ babel-plugin-polyfill-regenerator@^0.3.0: dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" -babel-plugin-remove-graphql-queries@^4.11.1, babel-plugin-remove-graphql-queries@^4.12.1: +babel-plugin-remove-graphql-queries@^4.12.1: version "4.12.1" resolved "https://registry.yarnpkg.com/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-4.12.1.tgz#08e7531ed3c61aaa3c2f083ddce8040844e611d4" integrity sha512-z4Z0VkDpmoIW3cihPYEb+HJMgwa+RF77LnpgAC6y6ozS76ci3ENqfIry/vvdD6auys5TG3xYZ0eHpdPobXzhfA== @@ -6292,24 +6292,24 @@ gatsby-parcel-config@^0.3.1: "@parcel/transformer-raw" "^2.3.2" "@parcel/transformer-react-refresh-wrap" "^2.3.2" -gatsby-plugin-image@2.11.1: - version "2.11.1" - resolved "https://registry.yarnpkg.com/gatsby-plugin-image/-/gatsby-plugin-image-2.11.1.tgz#1e800b65e8c18cc524c5855b9dbdb907745fdb0c" - integrity sha512-4tfDdcczBVOL6ELKNWuXQ9h1V/5DhBMIVHmr6FPwm8xgL8ARqfQMXX2mzUjpNiu7WDiMlm9cWrTQQaZAARhAwg== +gatsby-plugin-image@2.12.1: + version "2.12.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-image/-/gatsby-plugin-image-2.12.1.tgz#302324125a1e018ff669772495f4b291bd00a832" + integrity sha512-Azofblt5ZSk2NqCOrBI1WijcJw6dVHCKz85lz6J7qB3Fvy+YVjs/vbUODlXUwi3926Q5m7C2zdH0MQrk4T0DDQ== dependencies: "@babel/code-frame" "^7.14.0" "@babel/parser" "^7.15.5" "@babel/runtime" "^7.15.4" "@babel/traverse" "^7.15.4" babel-jsx-utils "^1.1.0" - babel-plugin-remove-graphql-queries "^4.11.1" + babel-plugin-remove-graphql-queries "^4.12.1" camelcase "^5.3.1" chokidar "^3.5.2" common-tags "^1.8.2" fs-extra "^10.0.0" - gatsby-core-utils "^3.11.1" + gatsby-core-utils "^3.12.1" objectFitPolyfill "^2.3.5" - prop-types "^15.7.2" + prop-types "^15.8.1" gatsby-plugin-manifest@4.11.1: version "4.11.1" From b9046189e2817dffda9bc0f1563521d5d802a8d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:13:50 +0000 Subject: [PATCH 05/53] build(deps): bump nanoid from 3.3.2 to 3.3.3 in /packages/website Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.2...3.3.3) --- updated-dependencies: - dependency-name: nanoid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 945de31f..d1eac3e2 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -29,7 +29,7 @@ "gbimage-bridge": "0.2.1", "http-status-codes": "2.2.0", "ms": "2.1.3", - "nanoid": "3.3.2", + "nanoid": "3.3.3", "normalize.css": "8.0.1", "path-browserify": "1.0.1", "polished": "4.2.1", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 9ffd42ed..3dcbec79 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -8858,10 +8858,10 @@ nano-css@^5.3.1: stacktrace-js "^2.0.2" stylis "^4.0.6" -nanoid@3.3.2, nanoid@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.2.tgz#c89622fafb4381cd221421c69ec58547a1eec557" - integrity sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA== +nanoid@3.3.3, nanoid@^3.3.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== nanomatch@^1.2.9: version "1.2.13" From 4eb5683168688e223f274a872797ff78ad3bc8c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:14:02 +0000 Subject: [PATCH 06/53] build(deps): bump framer-motion in /packages/website Bumps [framer-motion](https://github.com/framer/motion) from 6.2.10 to 6.3.0. - [Release notes](https://github.com/framer/motion/releases) - [Changelog](https://github.com/framer/motion/blob/main/CHANGELOG.md) - [Commits](https://github.com/framer/motion/compare/v6.2.10...v6.3.0) --- updated-dependencies: - dependency-name: framer-motion dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 945de31f..a5b1a586 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -12,7 +12,7 @@ "classnames": "2.3.1", "copy-text-to-clipboard": "3.0.1", "crypto-browserify": "3.12.0", - "framer-motion": "6.2.10", + "framer-motion": "6.3.0", "gatsby": "4.12.1", "gatsby-background-image": "1.6.0", "gatsby-plugin-image": "2.11.1", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 9ffd42ed..fcddda72 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6068,10 +6068,10 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -framer-motion@6.2.10: - version "6.2.10" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.2.10.tgz#7fb300d4c559f0991be5499f99d055a04851fcb3" - integrity sha512-nfkpA5r3leVOYJH0YXV1cMOLNJuAoznR3Cswet5wCIDi7AZwS62N+u0EmGSNG1JHtglDo5erqyamc55M2XICvA== +framer-motion@6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.3.0.tgz#0e50ef04b4fa070fca7d04bc32fb1d64027b7ea7" + integrity sha512-Nm6l2cemuFeSC1fmq9R32sCQs1eplOuZ3r14/PxRDewpE3NUr+ul5ulGRRzk8K0Aa5p76Tedi3sfCUaTPa5fRg== dependencies: framesync "6.0.1" hey-listen "^1.0.8" From 48067ac1016b955cb6e4ecfca9ff5f049ae1145a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:14:13 +0000 Subject: [PATCH 07/53] build(deps): bump polished from 4.2.1 to 4.2.2 in /packages/website Bumps [polished](https://github.com/styled-components/polished) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/styled-components/polished/releases) - [Commits](https://github.com/styled-components/polished/compare/v4.2.1...v4.2.2) --- updated-dependencies: - dependency-name: polished dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 945de31f..a2db5944 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -32,7 +32,7 @@ "nanoid": "3.3.2", "normalize.css": "8.0.1", "path-browserify": "1.0.1", - "polished": "4.2.1", + "polished": "4.2.2", "postcss": "8.4.12", "prop-types": "15.8.1", "react": "17.0.2", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 9ffd42ed..0098cc19 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -9609,10 +9609,10 @@ pngjs@^3.0.0, pngjs@^3.3.3: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== -polished@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/polished/-/polished-4.2.1.tgz#e38cdf4244b3bea63f77b0f8ab2335e22a66bd08" - integrity sha512-vRkUnHBwVX7kIeCzCghcLCWoDenV+sV7lkItnmTc7bb6Uzbe8ogU1FxqEW8+dXCxUX8YW8vusQ0HTk2yES7bfQ== +polished@4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/polished/-/polished-4.2.2.tgz#2529bb7c3198945373c52e34618c8fe7b1aa84d1" + integrity sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ== dependencies: "@babel/runtime" "^7.17.8" From 075f1aa113b322fd3ce8a6242be662bfe3524f88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:15:15 +0000 Subject: [PATCH 08/53] build(deps): bump next from 12.1.4 to 12.1.5 in /packages/dashboard Bumps [next](https://github.com/vercel/next.js) from 12.1.4 to 12.1.5. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v12.1.4...v12.1.5) --- updated-dependencies: - dependency-name: next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 2 +- packages/dashboard/yarn.lock | 138 ++++++++++++++++---------------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 86f4e5b7..e06e8d53 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -20,7 +20,7 @@ "formik": "2.2.9", "http-status-codes": "2.2.0", "ky": "0.30.0", - "next": "12.1.4", + "next": "12.1.5", "normalize.css": "8.0.1", "pretty-bytes": "6.0.0", "react": "17.0.2", diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index c315e931..3b617f13 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -77,10 +77,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@next/env@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.4.tgz#5af629b43075281ecd7f87938802b7cf5b67e94b" - integrity sha512-7gQwotJDKnfMxxXd8xJ2vsX5AzyDxO3zou0+QOXX8/unypA6icw5+wf6A62yKZ6qQ4UZHHxS68pb6UV+wNneXg== +"@next/env@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.5.tgz#a21ba6708022d630402ca2b340316e69a0296dfc" + integrity sha512-+34yUJslfJi7Lyx6ELuN8nWcOzi27izfYnZIC1Dqv7kmmfiBVxgzR3BXhlvEMTKC2IRJhXVs2FkMY+buQe3k7Q== "@next/eslint-plugin-next@12.1.4": version "12.1.4" @@ -89,65 +89,65 @@ dependencies: glob "7.1.7" -"@next/swc-android-arm-eabi@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.4.tgz#c3dae178b7c15ad627d2e9b8dfb38caecb5c4ac7" - integrity sha512-FJg/6a3s2YrUaqZ+/DJZzeZqfxbbWrynQMT1C5wlIEq9aDLXCFpPM/PiOyJh0ahxc0XPmi6uo38Poq+GJTuKWw== +"@next/swc-android-arm-eabi@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.5.tgz#36729ab3dfd7743e82cfe536b43254dcb146620c" + integrity sha512-SKnGTdYcoN04Y2DvE0/Y7/MjkA+ltsmbuH/y/hR7Ob7tsj+8ZdOYuk+YvW1B8dY20nDPHP58XgDTSm2nA8BzzA== -"@next/swc-android-arm64@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.4.tgz#f320d60639e19ecffa1f9034829f2d95502a9a51" - integrity sha512-LXraazvQQFBgxIg3Htny6G5V5he9EK7oS4jWtMdTGIikmD/OGByOv8ZjLuVLZLtVm3UIvaAiGtlQSLecxJoJDw== +"@next/swc-android-arm64@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.5.tgz#52578f552305c92d0b9b81d603c9643fb71e0835" + integrity sha512-YXiqgQ/9Rxg1dXp6brXbeQM1JDx9SwUY/36JiE+36FXqYEmDYbxld9qkX6GEzkc5rbwJ+RCitargnzEtwGW0mw== -"@next/swc-darwin-arm64@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.4.tgz#fd578278312613eddcf3aee26910100509941b63" - integrity sha512-SSST/dBymecllZxcqTCcSTCu5o1NKk9I+xcvhn/O9nH6GWjgvGgGkNqLbCarCa0jJ1ukvlBA138FagyrmZ/4rQ== +"@next/swc-darwin-arm64@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.5.tgz#3d5b53211484c72074f4975ba0ec2b1107db300e" + integrity sha512-y8mhldb/WFZ6lFeowkGfi0cO/lBdiBqDk4T4LZLvCpoQp4Or/NzUN6P5NzBQZ5/b4oUHM/wQICEM+1wKA4qIVw== -"@next/swc-darwin-x64@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.4.tgz#ace5f80d8c8348efe194f6d7074c6213c52b3944" - integrity sha512-p1lwdX0TVjaoDXQVuAkjtxVBbCL/urgxiMCBwuPDO7TikpXtSRivi+mIzBj5q7ypgICFmIAOW3TyupXeoPRAnA== +"@next/swc-darwin-x64@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.5.tgz#adcabb732d226453777c0d37d58eaff9328b66fd" + integrity sha512-wqJ3X7WQdTwSGi0kIDEmzw34QHISRIQ5uvC+VXmsIlCPFcMA+zM5723uh8NfuKGquDMiEMS31a83QgkuHMYbwQ== -"@next/swc-linux-arm-gnueabihf@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.4.tgz#2bf2c83863635f19c71c226a2df936e001cce29c" - integrity sha512-67PZlgkCn3TDxacdVft0xqDCL7Io1/C4xbAs0+oSQ0xzp6OzN2RNpuKjHJrJgKd0DsE1XZ9sCP27Qv0591yfyg== +"@next/swc-linux-arm-gnueabihf@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.5.tgz#82a7cde67482b756bc65fbebf1dfa8a782074e93" + integrity sha512-WnhdM5duONMvt2CncAl+9pim0wBxDS2lHoo7ub/o/i1bRbs11UTzosKzEXVaTDCUkCX2c32lIDi1WcN2ZPkcdw== -"@next/swc-linux-arm64-gnu@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.4.tgz#d577190f641c9b4b463719dd6b8953b6ba9be8d9" - integrity sha512-OnOWixhhw7aU22TQdQLYrgpgFq0oA1wGgnjAiHJ+St7MLj82KTDyM9UcymAMbGYy6nG/TFOOHdTmRMtCRNOw0g== +"@next/swc-linux-arm64-gnu@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.5.tgz#f82ca014504950aab751e81f467492e9be0bad5d" + integrity sha512-Jq2H68yQ4bLUhR/XQnbw3LDW0GMQn355qx6rU36BthDLeGue7YV7MqNPa8GKvrpPocEMW77nWx/1yI6w6J07gw== -"@next/swc-linux-arm64-musl@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.4.tgz#e70ffe70393d8f9242deecdb282ce5a8fd588b14" - integrity sha512-UoRMzPZnsAavdWtVylYxH8DNC7Uy0i6RrvNwT4PyQVdfANBn2omsUkcH5lgS2O7oaz0nAYLk1vqyZDO7+tJotA== +"@next/swc-linux-arm64-musl@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.5.tgz#f811ec9f4b12a978426c284c95ab2f515ddf7f9e" + integrity sha512-KgPjwdbhDqXI7ghNN8V/WAiLquc9Ebe8KBrNNEL0NQr+yd9CyKJ6KqjayVkmX+hbHzbyvbui/5wh/p3CZQ9xcQ== -"@next/swc-linux-x64-gnu@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.4.tgz#91498a130387fb1961902f2bee55863f8e910cff" - integrity sha512-nM+MA/frxlTLUKLJKorctdI20/ugfHRjVEEkcLp/58LGG7slNaP1E5d5dRA1yX6ISjPcQAkywas5VlGCg+uTvA== +"@next/swc-linux-x64-gnu@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.5.tgz#d44857257e6d20dc841998951d584ab1f25772c3" + integrity sha512-O2ErUTvCJ6DkNTSr9pbu1n3tcqykqE/ebty1rwClzIYdOgpB3T2MfEPP+K7GhUR87wmN/hlihO9ch7qpVFDGKw== -"@next/swc-linux-x64-musl@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.4.tgz#78057b03c148c121553d41521ad38f6c732762ff" - integrity sha512-GoRHxkuW4u4yKw734B9SzxJwVdyEJosaZ62P7ifOwcujTxhgBt3y76V2nNUrsSuopcKI2ZTDjaa+2wd5zyeXbA== +"@next/swc-linux-x64-musl@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.5.tgz#3cc523abadc9a2a6de680593aff06e71cc29ecef" + integrity sha512-1eIlZmlO/VRjxxzUBcVosf54AFU3ltAzHi+BJA+9U/lPxCYIsT+R4uO3QksRzRjKWhVQMRjEnlXyyq5SKJm7BA== -"@next/swc-win32-arm64-msvc@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.4.tgz#05bbaabacac23b8edf6caa99eb86b17550a09051" - integrity sha512-6TQkQze0ievXwHJcVUrIULwCYVe3ccX6T0JgZ1SiMeXpHxISN7VJF/O8uSCw1JvXZYZ6ud0CJ7nfC5HXivgfPg== +"@next/swc-win32-arm64-msvc@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.5.tgz#c62232d869f1f9b22e8f24e4e7f05307c20f30ca" + integrity sha512-oromsfokbEuVb0CBLLE7R9qX3KGXucZpsojLpzUh1QJjuy1QkrPJncwr8xmWQnwgtQ6ecMWXgXPB+qtvizT9Tw== -"@next/swc-win32-ia32-msvc@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.4.tgz#8fd2fb48f04a2802e51fc320878bf6b411c1c866" - integrity sha512-CsbX/IXuZ5VSmWCpSetG2HD6VO5FTsO39WNp2IR2Ut/uom9XtLDJAZqjQEnbUTLGHuwDKFjrIO3LkhtROXLE/g== +"@next/swc-win32-ia32-msvc@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.5.tgz#2bd9b28a9ba730d12a493e7d9d18e150fe89d496" + integrity sha512-a/51L5KzBpeZSW9LbekMo3I3Cwul+V+QKwbEIMA+Qwb2qrlcn1L9h3lt8cHqNTFt2y72ce6aTwDTw1lyi5oIRA== -"@next/swc-win32-x64-msvc@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.4.tgz#a72ed44c9b1f850986a30fe36c59e01f8a79b5f3" - integrity sha512-JtYuWzKXKLDMgE/xTcFtCm1MiCIRaAc5XYZfYX3n/ZWSI1SJS/GMm+Su0SAHJgRFavJh6U/p998YwO/iGTIgqQ== +"@next/swc-win32-x64-msvc@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.5.tgz#02f377e4d41eaaacf265e34bab9bacd8efc4a351" + integrity sha512-/SoXW1Ntpmpw3AXAzfDRaQidnd8kbZ2oSni8u5z0yw6t4RwJvmdZy1eOaAADRThWKV+2oU90++LSnXJIwBRWYQ== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1686,28 +1686,28 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -next@12.1.4: - version "12.1.4" - resolved "https://registry.yarnpkg.com/next/-/next-12.1.4.tgz#597a9bdec7aec778b442c4f6d41afd2c64a54b23" - integrity sha512-DA4g97BM4Z0nKtDvCTm58RxdvoQyYzeg0AeVbh0N4Y/D8ELrNu47lQeEgRGF8hV4eQ+Sal90zxrJQQG/mPQ8CQ== +next@12.1.5: + version "12.1.5" + resolved "https://registry.yarnpkg.com/next/-/next-12.1.5.tgz#7a07687579ddce61ee519493e1c178d83abac063" + integrity sha512-YGHDpyfgCfnT5GZObsKepmRnne7Kzp7nGrac07dikhutWQug7hHg85/+sPJ4ZW5Q2pDkb+n0FnmLkmd44htIJQ== dependencies: - "@next/env" "12.1.4" + "@next/env" "12.1.5" caniuse-lite "^1.0.30001283" postcss "8.4.5" styled-jsx "5.0.1" optionalDependencies: - "@next/swc-android-arm-eabi" "12.1.4" - "@next/swc-android-arm64" "12.1.4" - "@next/swc-darwin-arm64" "12.1.4" - "@next/swc-darwin-x64" "12.1.4" - "@next/swc-linux-arm-gnueabihf" "12.1.4" - "@next/swc-linux-arm64-gnu" "12.1.4" - "@next/swc-linux-arm64-musl" "12.1.4" - "@next/swc-linux-x64-gnu" "12.1.4" - "@next/swc-linux-x64-musl" "12.1.4" - "@next/swc-win32-arm64-msvc" "12.1.4" - "@next/swc-win32-ia32-msvc" "12.1.4" - "@next/swc-win32-x64-msvc" "12.1.4" + "@next/swc-android-arm-eabi" "12.1.5" + "@next/swc-android-arm64" "12.1.5" + "@next/swc-darwin-arm64" "12.1.5" + "@next/swc-darwin-x64" "12.1.5" + "@next/swc-linux-arm-gnueabihf" "12.1.5" + "@next/swc-linux-arm64-gnu" "12.1.5" + "@next/swc-linux-arm64-musl" "12.1.5" + "@next/swc-linux-x64-gnu" "12.1.5" + "@next/swc-linux-x64-musl" "12.1.5" + "@next/swc-win32-arm64-msvc" "12.1.5" + "@next/swc-win32-ia32-msvc" "12.1.5" + "@next/swc-win32-x64-msvc" "12.1.5" node-releases@^2.0.2: version "2.0.2" From de824d5c3546876d132748dacb1abe48fab328c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:15:28 +0000 Subject: [PATCH 09/53] build(deps): bump dayjs from 1.11.0 to 1.11.1 in /packages/dashboard Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.11.0...v1.11.1) --- updated-dependencies: - dependency-name: dayjs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 2 +- packages/dashboard/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 86f4e5b7..d5f1e5fb 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -14,7 +14,7 @@ "@stripe/stripe-js": "1.27.0", "classnames": "2.3.1", "copy-text-to-clipboard": "^3.0.1", - "dayjs": "1.11.0", + "dayjs": "1.11.1", "express-jwt": "6.1.1", "fast-levenshtein": "3.0.0", "formik": "2.2.9", diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index c315e931..f0f1fe47 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -624,10 +624,10 @@ damerau-levenshtein@^1.0.7: resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz#64368003512a1a6992593741a09a9d31a836f55d" integrity sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw== -dayjs@1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.0.tgz#009bf7ef2e2ea2d5db2e6583d2d39a4b5061e805" - integrity sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug== +dayjs@1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.1.tgz#90b33a3dda3417258d48ad2771b415def6545eb0" + integrity sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA== debug@^2.6.9: version "2.6.9" From 67f798a0dd630d2bb15f87457674e6cbee6bd1b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:15:44 +0000 Subject: [PATCH 10/53] build(deps-dev): bump eslint-config-next in /packages/dashboard Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 12.1.4 to 12.1.5. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/commits/v12.1.5/packages/eslint-config-next) --- updated-dependencies: - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 2 +- packages/dashboard/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 86f4e5b7..94a07c1f 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -36,7 +36,7 @@ "@tailwindcss/typography": "0.5.2", "autoprefixer": "10.4.4", "eslint": "8.13.0", - "eslint-config-next": "12.1.4", + "eslint-config-next": "12.1.5", "postcss": "8.4.12", "prettier": "2.6.2", "tailwindcss": "3.0.23" diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index c315e931..602ac01f 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -82,10 +82,10 @@ resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.4.tgz#5af629b43075281ecd7f87938802b7cf5b67e94b" integrity sha512-7gQwotJDKnfMxxXd8xJ2vsX5AzyDxO3zou0+QOXX8/unypA6icw5+wf6A62yKZ6qQ4UZHHxS68pb6UV+wNneXg== -"@next/eslint-plugin-next@12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.4.tgz#9c52637af8eecab24dac3f2e5098376f6fc2dff4" - integrity sha512-BRy565KVK6Cdy8LHaHTiwctLqBu/RT84RLpESug70BDJzBlV8QBvODyx/j7wGhvYqp9kvstM05lyb6JaTkSCcQ== +"@next/eslint-plugin-next@12.1.5": + version "12.1.5" + resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.5.tgz#273885b35e6bbcd40ff1436d2a8d0ec03fb6f6ef" + integrity sha512-Cnb8ERC5bNKBFrnMH6203sp/b0Y78QRx1XsFu+86oBtDBmQmOFoHu7teQjHm69ER73XKK3aGaeoLiXacHoUFsg== dependencies: glob "7.1.7" @@ -786,12 +786,12 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-next@12.1.4: - version "12.1.4" - resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-12.1.4.tgz#939ea2ff33034763300bf1e62482cea91212d274" - integrity sha512-Uj0jrVjoQbg9qerxRjSHoOOv3PEzoZxpb8G9LYct25fsflP8xIiUq0l4WEu2KSB5owuLv5hie7wSMqPEsHj+bQ== +eslint-config-next@12.1.5: + version "12.1.5" + resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-12.1.5.tgz#658cc61194a32dfd917a3db199351396ea5db1d1" + integrity sha512-P+DCt5ti63KhC0qNLzrAmPcwRGq8pYqgcf/NNr1E+WjCrMkWdCAXkIANTquo+kcO1adR2k1lTo5GCrNUtKy4hQ== dependencies: - "@next/eslint-plugin-next" "12.1.4" + "@next/eslint-plugin-next" "12.1.5" "@rushstack/eslint-patch" "1.0.8" "@typescript-eslint/parser" "5.10.1" eslint-import-resolver-node "0.3.4" From dac20c400c9cbea49df04df8c8df9b534a7b2154 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:16:06 +0000 Subject: [PATCH 11/53] build(deps): bump stripe from 8.216.0 to 8.217.0 in /packages/dashboard Bumps [stripe](https://github.com/stripe/stripe-node) from 8.216.0 to 8.217.0. - [Release notes](https://github.com/stripe/stripe-node/releases) - [Changelog](https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-node/compare/v8.216.0...v8.217.0) --- updated-dependencies: - dependency-name: stripe dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 2 +- packages/dashboard/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 86f4e5b7..300d23bd 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -27,7 +27,7 @@ "react-dom": "17.0.2", "react-toastify": "8.2.0", "skynet-js": "3.0.2", - "stripe": "8.216.0", + "stripe": "8.217.0", "swr": "1.3.0", "yup": "0.32.11" }, diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index c315e931..b5277ea8 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -2248,10 +2248,10 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stripe@8.216.0: - version "8.216.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.216.0.tgz#23c047498526d13a238c3aca7b4dc8cbbd522e46" - integrity sha512-LY8cNGizEnklIa4T82l6mZW0HS4cfzo1hNuhT+ZR9PBkmYcSUbg3ilUBVF0FCd4RP+NA44VEVfoSTTZ1Gg5+rQ== +stripe@8.217.0: + version "8.217.0" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.217.0.tgz#5e8ae744e0e8fca6e7c1d50c131ec3d77dff0999" + integrity sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA== dependencies: "@types/node" ">=8.1.0" qs "^6.10.3" From 35df124ccc425f1ddac57293c8fe767e65f91632 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:06:51 +0000 Subject: [PATCH 12/53] build(deps): bump @stripe/react-stripe-js in /packages/dashboard Bumps [@stripe/react-stripe-js](https://github.com/stripe/react-stripe-js) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/stripe/react-stripe-js/releases) - [Changelog](https://github.com/stripe/react-stripe-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/react-stripe-js/compare/v1.7.1...v1.7.2) --- updated-dependencies: - dependency-name: "@stripe/react-stripe-js" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 4 ++-- packages/dashboard/yarn.lock | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 86f4e5b7..b8dfcd5d 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -10,7 +10,7 @@ "dependencies": { "@fontsource/sora": "4.5.5", "@fontsource/source-sans-pro": "4.5.6", - "@stripe/react-stripe-js": "1.7.1", + "@stripe/react-stripe-js": "1.7.2", "@stripe/stripe-js": "1.27.0", "classnames": "2.3.1", "copy-text-to-clipboard": "^3.0.1", @@ -27,7 +27,7 @@ "react-dom": "17.0.2", "react-toastify": "8.2.0", "skynet-js": "3.0.2", - "stripe": "8.216.0", + "stripe": "8.217.0", "swr": "1.3.0", "yup": "0.32.11" }, diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index c315e931..b850803b 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -175,10 +175,10 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.8.tgz#be3e914e84eacf16dbebd311c0d0b44aa1174c64" integrity sha512-ZK5v4bJwgXldAUA8r3q9YKfCwOqoHTK/ZqRjSeRXQrBXWouoPnS4MQtgC4AXGiiBuUu5wxrRgTlv0ktmM4P1Aw== -"@stripe/react-stripe-js@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.7.1.tgz#6e1db8f4a0eaf2193b153173d4aa7c38b681310d" - integrity sha512-GiUPoMo0xVvmpRD6JR9JAhAZ0W3ZpnYZNi0KE+91+tzrSFVpChKZbeSsJ5InlZhHFk9NckJCt1wOYBTqNsvt3A== +"@stripe/react-stripe-js@1.7.2": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.7.2.tgz#87cc5464378fb28bc7390702415cf70f13a46bcd" + integrity sha512-IAVg2nPUPoSwI//XDRCO7D8mGeK4+N3Xg63fYZHmlfEWAuFVcuaqJKTT67uzIdKYZhHZ/NMdZw/ttz+GOjP/rQ== dependencies: prop-types "^15.7.2" @@ -2248,10 +2248,10 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stripe@8.216.0: - version "8.216.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.216.0.tgz#23c047498526d13a238c3aca7b4dc8cbbd522e46" - integrity sha512-LY8cNGizEnklIa4T82l6mZW0HS4cfzo1hNuhT+ZR9PBkmYcSUbg3ilUBVF0FCd4RP+NA44VEVfoSTTZ1Gg5+rQ== +stripe@8.217.0: + version "8.217.0" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.217.0.tgz#5e8ae744e0e8fca6e7c1d50c131ec3d77dff0999" + integrity sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA== dependencies: "@types/node" ">=8.1.0" qs "^6.10.3" From 07f56fad02ca100d6178e4705319b4a618f49576 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:07:12 +0000 Subject: [PATCH 13/53] build(deps-dev): bump tailwindcss in /packages/dashboard Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.0.23 to 3.0.24. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...v3.0.24) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 4 +- packages/dashboard/yarn.lock | 204 ++++++-------------------------- 2 files changed, 37 insertions(+), 171 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 86f4e5b7..70a78e7f 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -27,7 +27,7 @@ "react-dom": "17.0.2", "react-toastify": "8.2.0", "skynet-js": "3.0.2", - "stripe": "8.216.0", + "stripe": "8.217.0", "swr": "1.3.0", "yup": "0.32.11" }, @@ -39,6 +39,6 @@ "eslint-config-next": "12.1.4", "postcss": "8.4.12", "prettier": "2.6.2", - "tailwindcss": "3.0.23" + "tailwindcss": "3.0.24" } } diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index c315e931..236c3733 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -2,27 +2,6 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== - dependencies: - "@babel/highlight" "^7.14.5" - -"@babel/helper-validator-identifier@^7.14.5": - version "7.15.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" - integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== - -"@babel/highlight@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" - integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== - dependencies: - "@babel/helper-validator-identifier" "^7.14.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@babel/runtime-corejs3@^7.10.2": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.16.3.tgz#1e25de4fa994c57c18e5fdda6cc810dac70f5590" @@ -218,11 +197,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.1.tgz#f3647623199ca920960006b3dccf633ea905f243" integrity sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@typescript-eslint/parser@5.10.1": version "5.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.10.1.tgz#4ce9633cc33fc70bc13786cb793c1a76fe5ad6bd" @@ -311,13 +285,6 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -513,16 +480,7 @@ caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001317: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz#eb4da4eb3ecdd409f7ba1907820061d56096e88f" integrity sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw== -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.2: +chalk@^4.0.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -555,13 +513,6 @@ clsx@^1.1.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -569,11 +520,6 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - color-name@^1.1.4, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" @@ -594,17 +540,6 @@ core-js-pure@^3.19.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.19.1.tgz#edffc1fc7634000a55ba05e95b3f0fe9587a5aa4" integrity sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ== -cosmiconfig@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" - integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -729,13 +664,6 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" @@ -776,11 +704,6 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -1213,11 +1136,6 @@ has-bigints@^1.0.1: resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1264,13 +1182,6 @@ ignore@^5.1.4, ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -import-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92" - integrity sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg== - dependencies: - import-from "^3.0.0" - import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -1279,13 +1190,6 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -import-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" - integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== - dependencies: - resolve-from "^5.0.0" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -1313,11 +1217,6 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -1434,7 +1333,7 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +"js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -1446,11 +1345,6 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -1534,15 +1428,10 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lilconfig@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd" - integrity sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg== - -lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +lilconfig@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== locate-path@^2.0.0: version "2.0.0" @@ -1734,10 +1623,10 @@ object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-hash@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" - integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.11.0" @@ -1839,16 +1728,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - path-browserify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" @@ -1896,13 +1775,12 @@ postcss-js@^4.0.0: dependencies: camelcase-css "^2.0.1" -postcss-load-config@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.0.tgz#d39c47091c4aec37f50272373a6a648ef5e97829" - integrity sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g== +postcss-load-config@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" + integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== dependencies: - import-cwd "^3.0.0" - lilconfig "^2.0.3" + lilconfig "^2.0.5" yaml "^1.10.2" postcss-nested@5.0.6: @@ -1912,10 +1790,10 @@ postcss-nested@5.0.6: dependencies: postcss-selector-parser "^6.0.6" -postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9: - version "6.0.9" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f" - integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== +postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.6: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -1925,7 +1803,7 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@8.4.12, postcss@^8.4.6: +postcss@8.4.12, postcss@^8.4.12: version "8.4.12" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== @@ -2075,11 +1953,6 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.22.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" @@ -2248,10 +2121,10 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stripe@8.216.0: - version "8.216.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.216.0.tgz#23c047498526d13a238c3aca7b4dc8cbbd522e46" - integrity sha512-LY8cNGizEnklIa4T82l6mZW0HS4cfzo1hNuhT+ZR9PBkmYcSUbg3ilUBVF0FCd4RP+NA44VEVfoSTTZ1Gg5+rQ== +stripe@8.217.0: + version "8.217.0" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.217.0.tgz#5e8ae744e0e8fca6e7c1d50c131ec3d77dff0999" + integrity sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA== dependencies: "@types/node" ">=8.1.0" qs "^6.10.3" @@ -2261,13 +2134,6 @@ styled-jsx@5.0.1: resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.1.tgz#78fecbbad2bf95ce6cd981a08918ce4696f5fc80" integrity sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw== -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -2285,29 +2151,29 @@ swr@1.3.0: resolved "https://registry.yarnpkg.com/swr/-/swr-1.3.0.tgz#c6531866a35b4db37b38b72c45a63171faf9f4e8" integrity sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw== -tailwindcss@3.0.23: - version "3.0.23" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.23.tgz#c620521d53a289650872a66adfcb4129d2200d10" - integrity sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA== +tailwindcss@3.0.24: + version "3.0.24" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.24.tgz#22e31e801a44a78a1d9a81ecc52e13b69d85704d" + integrity sha512-H3uMmZNWzG6aqmg9q07ZIRNIawoiEcNFKDfL+YzOPuPsXuDXxJxB9icqzLgdzKNwjG3SAro2h9SYav8ewXNgig== dependencies: arg "^5.0.1" - chalk "^4.1.2" chokidar "^3.5.3" color-name "^1.1.4" - cosmiconfig "^7.0.1" detective "^5.2.0" didyoumean "^1.2.2" dlv "^1.1.3" fast-glob "^3.2.11" glob-parent "^6.0.2" is-glob "^4.0.3" + lilconfig "^2.0.5" normalize-path "^3.0.0" - object-hash "^2.2.0" - postcss "^8.4.6" + object-hash "^3.0.0" + picocolors "^1.0.0" + postcss "^8.4.12" postcss-js "^4.0.0" - postcss-load-config "^3.1.0" + postcss-load-config "^3.1.4" postcss-nested "5.0.6" - postcss-selector-parser "^6.0.9" + postcss-selector-parser "^6.0.10" postcss-value-parser "^4.2.0" quick-lru "^5.1.1" resolve "^1.22.0" @@ -2456,7 +2322,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.10.2: +yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== From 31cf7445b6c4c77ab93e6871d9125176411c4251 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:07:55 +0000 Subject: [PATCH 14/53] build(deps): bump skynet-js in /packages/health-check Bumps [skynet-js](https://github.com/SkynetLabs/skynet-js) from 4.0.19-beta to 4.1.0. - [Release notes](https://github.com/SkynetLabs/skynet-js/releases) - [Changelog](https://github.com/SkynetLabs/skynet-js/blob/master/CHANGELOG-BETA.md) - [Commits](https://github.com/SkynetLabs/skynet-js/compare/v4.0.19-beta...v4.1.0) --- updated-dependencies: - dependency-name: skynet-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/health-check/package.json | 2 +- packages/health-check/yarn.lock | 77 +++++++++++++++++------------- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/packages/health-check/package.json b/packages/health-check/package.json index 9c6e2025..117ced46 100644 --- a/packages/health-check/package.json +++ b/packages/health-check/package.json @@ -13,7 +13,7 @@ "http-status-codes": "^2.2.0", "lodash": "^4.17.21", "lowdb": "^1.0.0", - "skynet-js": "^4.0.19-beta", + "skynet-js": "^4.1.0", "write-file-atomic": "^4.0.1", "yargs": "^17.4.1" }, diff --git a/packages/health-check/yarn.lock b/packages/health-check/yarn.lock index 4343388e..15cf315c 100644 --- a/packages/health-check/yarn.lock +++ b/packages/health-check/yarn.lock @@ -515,6 +515,19 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@skynetlabs/tus-js-client@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@skynetlabs/tus-js-client/-/tus-js-client-2.3.0.tgz#a14fd4197e2bc4ce8be724967a0e4c17d937cb64" + integrity sha512-piGvPlJh+Bu3Qf08bDlc/TnFLXE81KnFoPgvnsddNwTSLyyspxPFxJmHO5ki6SYyOl3HmUtGPoix+r2M2UpFEA== + dependencies: + buffer-from "^0.1.1" + combine-errors "^3.0.3" + is-stream "^2.0.0" + js-base64 "^2.6.1" + lodash.throttle "^4.1.1" + proper-lockfile "^2.0.1" + url-parse "^1.4.3" + "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" @@ -736,17 +749,24 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= +async-mutex@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.3.2.tgz#1485eda5bda1b0ec7c8df1ac2e815757ad1831df" + integrity sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA== + dependencies: + tslib "^2.3.1" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -axios@^0.24.0: - version "0.24.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" - integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== +axios@^0.26.0: + version "0.26.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== dependencies: - follow-redirects "^1.14.4" + follow-redirects "^1.14.8" babel-jest@^27.5.1: version "27.5.1" @@ -1407,10 +1427,10 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -follow-redirects@^1.14.4: - version "1.14.8" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" - integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== +follow-redirects@^1.14.8: + version "1.14.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== form-data@^3.0.0: version "3.0.1" @@ -2410,10 +2430,10 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" - integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== mimic-fn@^2.1.0: version "2.1.0" @@ -2896,24 +2916,25 @@ sjcl@^1.0.8: resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a" integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ== -skynet-js@^4.0.19-beta: - version "4.0.19-beta" - resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.19-beta.tgz#d4c640898c79cf69e45aa1c3c1ed5c80aa1aeced" - integrity sha512-d8/q3E3OjUxgCCAW28gNFvbahj0ks8ym122XTopbRyvAZKk9+/Z4ians9v8Tov36Z4k/un+Ilw/0i6DtM8c8Dw== +skynet-js@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.1.0.tgz#eccb84d04e9f42aa4f86ecb24fb4d59ed21e44cc" + integrity sha512-VmUjJ9QnLpfuQA2j7vzFh8JvukjQlX4QLGw1HY3VyslFPj92vPpyO8gqjPfzgbkR05TXL7CbdqZoLZr/RBDZPw== dependencies: - axios "^0.24.0" + "@skynetlabs/tus-js-client" "^2.3.0" + async-mutex "^0.3.2" + axios "^0.26.0" base32-decode "^1.0.0" base32-encode "^1.1.1" base64-js "^1.3.1" blakejs "^1.1.0" buffer "^6.0.1" - mime "^2.5.2" + mime "^3.0.0" path-browserify "^1.0.1" post-me "^0.4.5" randombytes "^2.1.0" sjcl "^1.0.8" skynet-mysky-utils "^0.3.0" - tus-js-client "^2.2.0" tweetnacl "^1.0.3" url-join "^4.0.1" url-parse "^1.5.1" @@ -3120,18 +3141,10 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" -tus-js-client@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tus-js-client/-/tus-js-client-2.3.0.tgz#5d76145476cea46a4e7c045a0054637cddf8dc39" - integrity sha512-I4cSwm6N5qxqCmBqenvutwSHe9ntf81lLrtf6BmLpG2v4wTl89atCQKqGgqvkodE6Lx+iKIjMbaXmfvStTg01g== - dependencies: - buffer-from "^0.1.1" - combine-errors "^3.0.3" - is-stream "^2.0.0" - js-base64 "^2.6.1" - lodash.throttle "^4.1.1" - proper-lockfile "^2.0.1" - url-parse "^1.4.3" +tslib@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== tweetnacl@^1.0.3: version "1.0.3" From 9441c6d2e873fc4e43e3729da9d32f6cf66c9272 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:10:53 +0000 Subject: [PATCH 15/53] build(deps): bump skynet-js in /packages/website Bumps [skynet-js](https://github.com/SkynetLabs/skynet-js) from 4.0.26-beta to 4.1.0. - [Release notes](https://github.com/SkynetLabs/skynet-js/releases) - [Changelog](https://github.com/SkynetLabs/skynet-js/blob/master/CHANGELOG-BETA.md) - [Commits](https://github.com/SkynetLabs/skynet-js/compare/v4.0.26-beta...v4.1.0) --- updated-dependencies: - dependency-name: skynet-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 191e3f54..1ec5fef9 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -40,7 +40,7 @@ "react-dropzone": "12.0.5", "react-helmet": "6.1.0", "react-use": "17.3.2", - "skynet-js": "4.0.26-beta", + "skynet-js": "4.1.0", "stream-browserify": "3.0.0", "swr": "1.2.2" }, diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index d5a1b5be..30097510 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -11017,10 +11017,10 @@ sjcl@^1.0.8: resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a" integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ== -skynet-js@4.0.26-beta: - version "4.0.26-beta" - resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.26-beta.tgz#5b6e924a0efa5fd6ee2c00760e1d4ce92d1ba0a9" - integrity sha512-YPqjNyqL6AhS9jMLyJ5PoilDZ7f2YFrqqhXUnzLBrjmWxICxcDeRu2GJh9MGCJUZ2Cv35IlG1ch4eiqFbs1wqA== +skynet-js@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.1.0.tgz#eccb84d04e9f42aa4f86ecb24fb4d59ed21e44cc" + integrity sha512-VmUjJ9QnLpfuQA2j7vzFh8JvukjQlX4QLGw1HY3VyslFPj92vPpyO8gqjPfzgbkR05TXL7CbdqZoLZr/RBDZPw== dependencies: "@skynetlabs/tus-js-client" "^2.3.0" async-mutex "^0.3.2" From 8e14d33a172baac3ae07a8f7766978405f147540 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 19 Apr 2022 11:20:24 +0200 Subject: [PATCH 16/53] run lua unit tests only when lua path has modified files --- .github/workflows/nginx-lua-unit-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nginx-lua-unit-tests.yml b/.github/workflows/nginx-lua-unit-tests.yml index 6c9fba83..5af9c101 100644 --- a/.github/workflows/nginx-lua-unit-tests.yml +++ b/.github/workflows/nginx-lua-unit-tests.yml @@ -7,7 +7,11 @@ on: push: branches: - master + paths: + - docker/nginx/libs/** pull_request: + paths: + - docker/nginx/libs/** jobs: test: From 3973cfc057e511448f0ec1f28452f83104af67d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:27:29 +0000 Subject: [PATCH 17/53] build(deps): bump gatsby-plugin-react-helmet in /packages/website Bumps [gatsby-plugin-react-helmet](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-react-helmet) from 5.10.0 to 5.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-react-helmet/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-react-helmet@5.12.1/packages/gatsby-plugin-react-helmet) --- updated-dependencies: - dependency-name: gatsby-plugin-react-helmet dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 1ec5fef9..6d97a10c 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -18,7 +18,7 @@ "gatsby-plugin-image": "2.12.1", "gatsby-plugin-manifest": "4.11.1", "gatsby-plugin-postcss": "5.12.1", - "gatsby-plugin-react-helmet": "5.10.0", + "gatsby-plugin-react-helmet": "5.12.1", "gatsby-plugin-robots-txt": "1.7.1", "gatsby-plugin-sharp": "4.12.1", "gatsby-plugin-sitemap": "5.11.1", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 30097510..b61e7f93 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6347,10 +6347,10 @@ gatsby-plugin-postcss@5.12.1: "@babel/runtime" "^7.15.4" postcss-loader "^4.3.0" -gatsby-plugin-react-helmet@5.10.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-5.10.0.tgz#d6491d35d4b4e3bb36631c1a93f4e53913f42cbb" - integrity sha512-QcypYLqnwKoD84f9c6Yfajs/sLfVmxPSOPWwHaK+3NG1IjmmQrL42qn2CP6gs29WznGzrThGeGiwIVdA5x31JA== +gatsby-plugin-react-helmet@5.12.1: + version "5.12.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-5.12.1.tgz#98205abb73cd7a522f2891b3a42514ae2b41ca57" + integrity sha512-lW9uRpkccSj0NC41dunFM4AoDuQockgpWHcvLivzGWMnWYtGWPNci7zy8+NUL1+6CchQqWTr0LZEeGYgpHym+w== dependencies: "@babel/runtime" "^7.15.4" From 455fce5511065b640229a3747fbee1d2568b47e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:28:30 +0000 Subject: [PATCH 18/53] build(deps): bump gatsby-plugin-manifest in /packages/website Bumps [gatsby-plugin-manifest](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-manifest) from 4.11.1 to 4.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-manifest@4.12.1/packages/gatsby-plugin-manifest) --- updated-dependencies: - dependency-name: gatsby-plugin-manifest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 1ec5fef9..2374ac68 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -16,7 +16,7 @@ "gatsby": "4.12.1", "gatsby-background-image": "1.6.0", "gatsby-plugin-image": "2.12.1", - "gatsby-plugin-manifest": "4.11.1", + "gatsby-plugin-manifest": "4.12.1", "gatsby-plugin-postcss": "5.12.1", "gatsby-plugin-react-helmet": "5.10.0", "gatsby-plugin-robots-txt": "1.7.1", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 30097510..431f98db 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6209,7 +6209,7 @@ gatsby-cli@^4.12.1: yoga-layout-prebuilt "^1.10.0" yurnalist "^2.1.0" -gatsby-core-utils@^3.10.1, gatsby-core-utils@^3.11.1, gatsby-core-utils@^3.12.1, gatsby-core-utils@^3.8.2: +gatsby-core-utils@^3.10.1, gatsby-core-utils@^3.12.1, gatsby-core-utils@^3.8.2: version "3.12.1" resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.12.1.tgz#590ec08de7168b086b7d49128732b9ada95b985f" integrity sha512-jBG1MfR6t2MZNIl8LQ3Cwc92F6uFNcEC091IK+qKVy9FNT0+WzcKQ6Olip6u1NSvCatfrg1FqrH0K78a6lmnLQ== @@ -6311,16 +6311,16 @@ gatsby-plugin-image@2.12.1: objectFitPolyfill "^2.3.5" prop-types "^15.8.1" -gatsby-plugin-manifest@4.11.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/gatsby-plugin-manifest/-/gatsby-plugin-manifest-4.11.1.tgz#fb3061c2e989acb2634719c1e8645fd1388f4b3b" - integrity sha512-m5cdi6KBc8+zmnlIfEh92sXpFEUfjuCrjM5BKc8e6v0jxJS0CqVrZOyT12mT2yq9H12UrkzFx1qaI8e2/IJiGA== +gatsby-plugin-manifest@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-manifest/-/gatsby-plugin-manifest-4.12.1.tgz#25342272c03fdce95901eb42a3ece09f12e4be4a" + integrity sha512-AZ0vtO/+khtpum4VUX/Gj/oRer6ckcEfVU/DNd3QlpG7ucHSzHKSwSLP6F5kevCHo7DS4hCMV8RixPlcv0ePWA== dependencies: "@babel/runtime" "^7.15.4" - gatsby-core-utils "^3.11.1" - gatsby-plugin-utils "^3.5.1" + gatsby-core-utils "^3.12.1" + gatsby-plugin-utils "^3.6.1" semver "^7.3.5" - sharp "^0.30.1" + sharp "^0.30.3" gatsby-plugin-page-creator@^4.12.1: version "4.12.1" @@ -6415,7 +6415,7 @@ gatsby-plugin-typescript@^4.12.1: "@babel/runtime" "^7.15.4" babel-plugin-remove-graphql-queries "^4.12.1" -gatsby-plugin-utils@^3.5.1, gatsby-plugin-utils@^3.6.1: +gatsby-plugin-utils@^3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/gatsby-plugin-utils/-/gatsby-plugin-utils-3.6.1.tgz#31d742e1aded08439ad42959880821e1fc9740cd" integrity sha512-Ebk98v4mxaDWjGFl6VBeNv1zjeJ7UCQ29UTabzY2BpztvUCBHfLVQdMmuaAgzPRn+A3SFVOGpcl++CF0IEl+7A== From 409406832f51e13d18ed2bf56dbbf4ab14f9543d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:28:42 +0000 Subject: [PATCH 19/53] build(deps): bump swr from 1.2.2 to 1.3.0 in /packages/website Bumps [swr](https://github.com/vercel/swr) from 1.2.2 to 1.3.0. - [Release notes](https://github.com/vercel/swr/releases) - [Commits](https://github.com/vercel/swr/compare/1.2.2...1.3.0) --- updated-dependencies: - dependency-name: swr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 1ec5fef9..41728886 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -42,7 +42,7 @@ "react-use": "17.3.2", "skynet-js": "4.1.0", "stream-browserify": "3.0.0", - "swr": "1.2.2" + "swr": "1.3.0" }, "devDependencies": { "@tailwindcss/typography": "0.5.2", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 30097510..acebe829 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -11637,10 +11637,10 @@ svgo@^2.5.0, svgo@^2.7.0: picocolors "^1.0.0" stable "^0.1.8" -swr@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/swr/-/swr-1.2.2.tgz#6cae09928d30593a7980d80f85823e57468fac5d" - integrity sha512-ky0BskS/V47GpW8d6RU7CPsr6J8cr7mQD6+do5eky3bM0IyJaoi3vO8UhvrzJaObuTlGhPl2szodeB2dUd76Xw== +swr@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/swr/-/swr-1.3.0.tgz#c6531866a35b4db37b38b72c45a63171faf9f4e8" + integrity sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw== symbol-observable@^1.0.4: version "1.2.0" From 8dca68f154e107ba430865b8630eb7abbece6c78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:28:59 +0000 Subject: [PATCH 20/53] build(deps-dev): bump cypress from 9.5.2 to 9.5.4 in /packages/website Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.2 to 9.5.4. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/v9.5.2...v9.5.4) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 1ec5fef9..9850c333 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -48,7 +48,7 @@ "@tailwindcss/typography": "0.5.2", "autoprefixer": "10.4.4", "cross-env": "7.0.3", - "cypress": "9.5.2", + "cypress": "9.5.4", "prettier": "2.6.2", "tailwindcss": "3.0.24" }, diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 30097510..6d6bd923 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -4613,10 +4613,10 @@ custom-error-instance@2.1.1: resolved "https://registry.yarnpkg.com/custom-error-instance/-/custom-error-instance-2.1.1.tgz#3cf6391487a6629a6247eb0ca0ce00081b7e361a" integrity sha1-PPY5FIemYppiR+sMoM4ACBt+Nho= -cypress@9.5.2: - version "9.5.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.2.tgz#8fb6ee4a890fbc35620800810bf6fb11995927bd" - integrity sha512-gYiQYvJozMzDOriUV1rCt6CeRM/pRK4nhwGJj3nJQyX2BoUdTCVwp30xDMKc771HiNVhBtgj5o5/iBdVDVXQUg== +cypress@9.5.4: + version "9.5.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.4.tgz#49d9272f62eba12f2314faf29c2a865610e87550" + integrity sha512-6AyJAD8phe7IMvOL4oBsI9puRNOWxZjl8z1lgixJMcgJ85JJmyKeP6uqNA0dI1z14lmJ7Qklf2MOgP/xdAqJ/Q== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -4650,7 +4650,7 @@ cypress@9.5.2: listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" - minimist "^1.2.5" + minimist "^1.2.6" ospath "^1.2.2" pretty-bytes "^5.6.0" proxy-from-env "1.0.0" @@ -8755,7 +8755,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== From 8736e1ff312e90bfa1e9b3de9d34a1e5d6de3ab0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:29:59 +0000 Subject: [PATCH 21/53] build(deps): bump gatsby-transformer-sharp in /packages/website Bumps [gatsby-transformer-sharp](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-transformer-sharp) from 4.10.0 to 4.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-sharp/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-transformer-sharp@4.12.1/packages/gatsby-transformer-sharp) --- updated-dependencies: - dependency-name: gatsby-transformer-sharp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 1ec5fef9..1cdf41f5 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -24,7 +24,7 @@ "gatsby-plugin-sitemap": "5.11.1", "gatsby-plugin-svgr": "3.0.0-beta.0", "gatsby-source-filesystem": "4.10.1", - "gatsby-transformer-sharp": "4.10.0", + "gatsby-transformer-sharp": "4.12.1", "gatsby-transformer-yaml": "4.11.0", "gbimage-bridge": "0.2.1", "http-status-codes": "2.2.0", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 30097510..1fb7369d 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6482,19 +6482,19 @@ gatsby-telemetry@^3.12.1: lodash "^4.17.21" node-fetch "^2.6.7" -gatsby-transformer-sharp@4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/gatsby-transformer-sharp/-/gatsby-transformer-sharp-4.10.0.tgz#9db793a219d0fa85b7d33cb37b32aba63df4c58a" - integrity sha512-Gp9eRkGQOrkoD+yJgK2ZdXuVbet/opxdEnuTZ6BhLEVhfTwOnMEaui6ZqO0cKJ7/NYlptO38p+C5cyizC0FRYA== +gatsby-transformer-sharp@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/gatsby-transformer-sharp/-/gatsby-transformer-sharp-4.12.1.tgz#e26dc3540e97fc1c802518967c1e8d8a4ed96fae" + integrity sha512-14AGG10Jf7ZBWxJDN2jSupAsBofoGU+p7+QJRzDrKdJrzp9v/yO/1xPB+r7UxtlW0l8cqPT6UyCITvJbWTDaww== dependencies: "@babel/runtime" "^7.15.4" bluebird "^3.7.2" common-tags "^1.8.2" fs-extra "^10.0.0" potrace "^2.1.8" - probe-image-size "^7.0.0" + probe-image-size "^7.2.3" semver "^7.3.5" - sharp "^0.30.1" + sharp "^0.30.3" gatsby-transformer-yaml@4.11.0: version "4.11.0" @@ -9983,7 +9983,7 @@ pretty-error@^2.1.2: lodash "^4.17.20" renderkid "^2.0.4" -probe-image-size@^7.0.0, probe-image-size@^7.2.3: +probe-image-size@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/probe-image-size/-/probe-image-size-7.2.3.tgz#d49c64be540ec8edea538f6f585f65a9b3ab4309" integrity sha512-HubhG4Rb2UH8YtV4ba0Vp5bQ7L78RTONYu/ujmCu5nBI8wGv24s4E9xSKBi0N1MowRpxk76pFCpJtW0KPzOK0w== From 3d6f5b57eabfafcbb6240f83e90a4d80285ab009 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:39:06 +0000 Subject: [PATCH 22/53] build(deps): bump gatsby-plugin-sitemap in /packages/website Bumps [gatsby-plugin-sitemap](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-sitemap) from 5.11.1 to 5.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-sitemap/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-sitemap@5.12.1/packages/gatsby-plugin-sitemap) --- updated-dependencies: - dependency-name: gatsby-plugin-sitemap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 6 +++--- packages/website/yarn.lock | 40 +++++++++++++++++------------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 1ec5fef9..38c541a0 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -16,12 +16,12 @@ "gatsby": "4.12.1", "gatsby-background-image": "1.6.0", "gatsby-plugin-image": "2.12.1", - "gatsby-plugin-manifest": "4.11.1", + "gatsby-plugin-manifest": "4.12.1", "gatsby-plugin-postcss": "5.12.1", "gatsby-plugin-react-helmet": "5.10.0", "gatsby-plugin-robots-txt": "1.7.1", "gatsby-plugin-sharp": "4.12.1", - "gatsby-plugin-sitemap": "5.11.1", + "gatsby-plugin-sitemap": "5.12.1", "gatsby-plugin-svgr": "3.0.0-beta.0", "gatsby-source-filesystem": "4.10.1", "gatsby-transformer-sharp": "4.10.0", @@ -48,7 +48,7 @@ "@tailwindcss/typography": "0.5.2", "autoprefixer": "10.4.4", "cross-env": "7.0.3", - "cypress": "9.5.2", + "cypress": "9.5.4", "prettier": "2.6.2", "tailwindcss": "3.0.24" }, diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 30097510..0a1f2daa 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -4613,10 +4613,10 @@ custom-error-instance@2.1.1: resolved "https://registry.yarnpkg.com/custom-error-instance/-/custom-error-instance-2.1.1.tgz#3cf6391487a6629a6247eb0ca0ce00081b7e361a" integrity sha1-PPY5FIemYppiR+sMoM4ACBt+Nho= -cypress@9.5.2: - version "9.5.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.2.tgz#8fb6ee4a890fbc35620800810bf6fb11995927bd" - integrity sha512-gYiQYvJozMzDOriUV1rCt6CeRM/pRK4nhwGJj3nJQyX2BoUdTCVwp30xDMKc771HiNVhBtgj5o5/iBdVDVXQUg== +cypress@9.5.4: + version "9.5.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.4.tgz#49d9272f62eba12f2314faf29c2a865610e87550" + integrity sha512-6AyJAD8phe7IMvOL4oBsI9puRNOWxZjl8z1lgixJMcgJ85JJmyKeP6uqNA0dI1z14lmJ7Qklf2MOgP/xdAqJ/Q== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -4650,7 +4650,7 @@ cypress@9.5.2: listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" - minimist "^1.2.5" + minimist "^1.2.6" ospath "^1.2.2" pretty-bytes "^5.6.0" proxy-from-env "1.0.0" @@ -6209,7 +6209,7 @@ gatsby-cli@^4.12.1: yoga-layout-prebuilt "^1.10.0" yurnalist "^2.1.0" -gatsby-core-utils@^3.10.1, gatsby-core-utils@^3.11.1, gatsby-core-utils@^3.12.1, gatsby-core-utils@^3.8.2: +gatsby-core-utils@^3.10.1, gatsby-core-utils@^3.12.1, gatsby-core-utils@^3.8.2: version "3.12.1" resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.12.1.tgz#590ec08de7168b086b7d49128732b9ada95b985f" integrity sha512-jBG1MfR6t2MZNIl8LQ3Cwc92F6uFNcEC091IK+qKVy9FNT0+WzcKQ6Olip6u1NSvCatfrg1FqrH0K78a6lmnLQ== @@ -6311,16 +6311,16 @@ gatsby-plugin-image@2.12.1: objectFitPolyfill "^2.3.5" prop-types "^15.8.1" -gatsby-plugin-manifest@4.11.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/gatsby-plugin-manifest/-/gatsby-plugin-manifest-4.11.1.tgz#fb3061c2e989acb2634719c1e8645fd1388f4b3b" - integrity sha512-m5cdi6KBc8+zmnlIfEh92sXpFEUfjuCrjM5BKc8e6v0jxJS0CqVrZOyT12mT2yq9H12UrkzFx1qaI8e2/IJiGA== +gatsby-plugin-manifest@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-manifest/-/gatsby-plugin-manifest-4.12.1.tgz#25342272c03fdce95901eb42a3ece09f12e4be4a" + integrity sha512-AZ0vtO/+khtpum4VUX/Gj/oRer6ckcEfVU/DNd3QlpG7ucHSzHKSwSLP6F5kevCHo7DS4hCMV8RixPlcv0ePWA== dependencies: "@babel/runtime" "^7.15.4" - gatsby-core-utils "^3.11.1" - gatsby-plugin-utils "^3.5.1" + gatsby-core-utils "^3.12.1" + gatsby-plugin-utils "^3.6.1" semver "^7.3.5" - sharp "^0.30.1" + sharp "^0.30.3" gatsby-plugin-page-creator@^4.12.1: version "4.12.1" @@ -6387,14 +6387,14 @@ gatsby-plugin-sharp@4.12.1: svgo "1.3.2" uuid "3.4.0" -gatsby-plugin-sitemap@5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/gatsby-plugin-sitemap/-/gatsby-plugin-sitemap-5.11.1.tgz#863397fe9dd5aab89bda8db09ef9b877c960150e" - integrity sha512-tt92KLUDS+eCrqSA5oYieDGjXLyUDXfYKEwLhYKXk7KlMMjporFJWVrc4Ba8WD04bUWVnzc2rqr19/zQI0ZIpQ== +gatsby-plugin-sitemap@5.12.1: + version "5.12.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-sitemap/-/gatsby-plugin-sitemap-5.12.1.tgz#782a926a558d31663d4a8e66b9466c86df278568" + integrity sha512-Njdx91OF4xiFqHSSA3Yrnzxm4qu4xHyrhkiwQniFncoIGMI6IXqk9aDoxo3E1jZDWGPsI/2gzdcd8dBNQq9juA== dependencies: "@babel/runtime" "^7.15.4" common-tags "^1.8.2" - minimatch "^3.0.4" + minimatch "^3.1.2" sitemap "^7.0.0" gatsby-plugin-svgr@3.0.0-beta.0: @@ -6415,7 +6415,7 @@ gatsby-plugin-typescript@^4.12.1: "@babel/runtime" "^7.15.4" babel-plugin-remove-graphql-queries "^4.12.1" -gatsby-plugin-utils@^3.5.1, gatsby-plugin-utils@^3.6.1: +gatsby-plugin-utils@^3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/gatsby-plugin-utils/-/gatsby-plugin-utils-3.6.1.tgz#31d742e1aded08439ad42959880821e1fc9740cd" integrity sha512-Ebk98v4mxaDWjGFl6VBeNv1zjeJ7UCQ29UTabzY2BpztvUCBHfLVQdMmuaAgzPRn+A3SFVOGpcl++CF0IEl+7A== @@ -8755,7 +8755,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== From 11324290353126df2110b1e66d060be397056d4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:46:26 +0000 Subject: [PATCH 23/53] build(deps): bump gatsby-transformer-yaml in /packages/website Bumps [gatsby-transformer-yaml](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-transformer-yaml) from 4.11.0 to 4.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-yaml/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-transformer-yaml@4.12.1/packages/gatsby-transformer-yaml) --- updated-dependencies: - dependency-name: gatsby-transformer-yaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 509fa80d..ad6ffb6e 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -25,7 +25,7 @@ "gatsby-plugin-svgr": "3.0.0-beta.0", "gatsby-source-filesystem": "4.10.1", "gatsby-transformer-sharp": "4.12.1", - "gatsby-transformer-yaml": "4.11.0", + "gatsby-transformer-yaml": "4.12.1", "gbimage-bridge": "0.2.1", "http-status-codes": "2.2.0", "ms": "2.1.3", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index da81d6f5..059884f7 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6496,10 +6496,10 @@ gatsby-transformer-sharp@4.12.1: semver "^7.3.5" sharp "^0.30.3" -gatsby-transformer-yaml@4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/gatsby-transformer-yaml/-/gatsby-transformer-yaml-4.11.0.tgz#900bf446ce7aece9253f46244519ccb5bd8cf7f2" - integrity sha512-GTCkULgOxbyRbovO9VHi0P+7iv/fEQG3uBeKiJyvMRUDD4bIQ9uIdT7hZ1RPwctu9dpt9T/X7kx+CShRzmELYw== +gatsby-transformer-yaml@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/gatsby-transformer-yaml/-/gatsby-transformer-yaml-4.12.1.tgz#0c372c25304d3305b3dcdc2b39c08e059d8f3d74" + integrity sha512-mpliK4YDMDBUe+g6JO6B8qhQffbBLoJI9q/4ja4YSbY/Jaj2tv/tkhepuwxOMuUwmQcBRu+OQ5J0RNiCI1aUcQ== dependencies: "@babel/runtime" "^7.15.4" js-yaml "^3.14.1" @@ -10911,7 +10911,7 @@ shallow-compare@^1.2.2: resolved "https://registry.yarnpkg.com/shallow-compare/-/shallow-compare-1.2.2.tgz#fa4794627bf455a47c4f56881d8a6132d581ffdb" integrity sha512-LUMFi+RppPlrHzbqmFnINTrazo0lPNwhcgzuAXVVcfy/mqPDrQmHAyz5bvV0gDAuRFrk804V0HpQ6u9sZ0tBeg== -sharp@^0.30.1, sharp@^0.30.3: +sharp@^0.30.3: version "0.30.3" resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.30.3.tgz#315a1817423a4d1cde5119a21c99c234a7a6fb37" integrity sha512-rjpfJFK58ZOFSG8sxYSo3/JQb4ej095HjXp9X7gVu7gEn1aqSG8TCW29h/Rr31+PXrFADo1H/vKfw0uhMQWFtg== From 316eb3bef9aa22ba241b93bd1cfe0aa19cec9be4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:47:08 +0000 Subject: [PATCH 24/53] build(deps): bump gatsby-source-filesystem in /packages/website Bumps [gatsby-source-filesystem](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-source-filesystem) from 4.10.1 to 4.12.1. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-filesystem/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@4.12.1/packages/gatsby-source-filesystem) --- updated-dependencies: - dependency-name: gatsby-source-filesystem dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 509fa80d..daba4ea1 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -23,7 +23,7 @@ "gatsby-plugin-sharp": "4.12.1", "gatsby-plugin-sitemap": "5.12.1", "gatsby-plugin-svgr": "3.0.0-beta.0", - "gatsby-source-filesystem": "4.10.1", + "gatsby-source-filesystem": "4.12.1", "gatsby-transformer-sharp": "4.12.1", "gatsby-transformer-yaml": "4.11.0", "gbimage-bridge": "0.2.1", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index da81d6f5..e48536bb 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6209,7 +6209,7 @@ gatsby-cli@^4.12.1: yoga-layout-prebuilt "^1.10.0" yurnalist "^2.1.0" -gatsby-core-utils@^3.10.1, gatsby-core-utils@^3.12.1, gatsby-core-utils@^3.8.2: +gatsby-core-utils@^3.12.1, gatsby-core-utils@^3.8.2: version "3.12.1" resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.12.1.tgz#590ec08de7168b086b7d49128732b9ada95b985f" integrity sha512-jBG1MfR6t2MZNIl8LQ3Cwc92F6uFNcEC091IK+qKVy9FNT0+WzcKQ6Olip6u1NSvCatfrg1FqrH0K78a6lmnLQ== @@ -6445,16 +6445,16 @@ gatsby-sharp@^0.6.1: "@types/sharp" "^0.30.0" sharp "^0.30.3" -gatsby-source-filesystem@4.10.1: - version "4.10.1" - resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-4.10.1.tgz#c513fadb3cedb138ff28ba351ffd264524a0c28d" - integrity sha512-qdOWS234l6QyEN0M8tfdGQF530pK9nSiaT1JfSzZV7Bl9psX9SdsuOtfZ2AV0QVt1BQB7C53E/BNGaxMLCcnUg== +gatsby-source-filesystem@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-4.12.1.tgz#86f45cc047b0b9ca06b5e4ef5c48e69fa3ec2206" + integrity sha512-lbtKa7oR2Q+8Qa8gZych/JaRBeoIW/dk4rfy13DOrSgUJK9gZFkpLuFQ471Z0JiHitDPswienBW60HjYvymOCw== dependencies: "@babel/runtime" "^7.15.4" chokidar "^3.5.2" file-type "^16.5.3" fs-extra "^10.0.0" - gatsby-core-utils "^3.10.1" + gatsby-core-utils "^3.12.1" got "^9.6.0" md5-file "^5.0.0" mime "^2.5.2" @@ -10911,7 +10911,7 @@ shallow-compare@^1.2.2: resolved "https://registry.yarnpkg.com/shallow-compare/-/shallow-compare-1.2.2.tgz#fa4794627bf455a47c4f56881d8a6132d581ffdb" integrity sha512-LUMFi+RppPlrHzbqmFnINTrazo0lPNwhcgzuAXVVcfy/mqPDrQmHAyz5bvV0gDAuRFrk804V0HpQ6u9sZ0tBeg== -sharp@^0.30.1, sharp@^0.30.3: +sharp@^0.30.3: version "0.30.3" resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.30.3.tgz#315a1817423a4d1cde5119a21c99c234a7a6fb37" integrity sha512-rjpfJFK58ZOFSG8sxYSo3/JQb4ej095HjXp9X7gVu7gEn1aqSG8TCW29h/Rr31+PXrFADo1H/vKfw0uhMQWFtg== From 0e480051a307f17350352b3edcdd92dc7b8a43c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wypch=C5=82o?= Date: Tue, 19 Apr 2022 11:55:41 +0200 Subject: [PATCH 25/53] change weekly dependabot schedule to monthly --- .github/dependabot.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 05669038..beb0a9e2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,48 +3,48 @@ updates: - package-ecosystem: npm directory: "/packages/dashboard" schedule: - interval: weekly + interval: monthly - package-ecosystem: npm directory: "/packages/dnslink-api" schedule: - interval: weekly + interval: monthly - package-ecosystem: npm directory: "/packages/handshake-api" schedule: - interval: weekly + interval: monthly - package-ecosystem: npm directory: "/packages/health-check" schedule: - interval: weekly + interval: monthly - package-ecosystem: npm directory: "/packages/website" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/docker/nginx" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/docker/sia" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/packages/dashboard" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/packages/dnslink-api" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/packages/handshake-api" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/packages/health-check" schedule: - interval: weekly + interval: monthly - package-ecosystem: docker directory: "/packages/website" schedule: - interval: weekly + interval: monthly From fe227f4449e221a155785cbdc351058f99f74e00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:59:57 +0000 Subject: [PATCH 26/53] build(deps): bump stripe from 8.217.0 to 8.218.0 in /packages/dashboard Bumps [stripe](https://github.com/stripe/stripe-node) from 8.217.0 to 8.218.0. - [Release notes](https://github.com/stripe/stripe-node/releases) - [Changelog](https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-node/compare/v8.217.0...v8.218.0) --- updated-dependencies: - dependency-name: stripe dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 2 +- packages/dashboard/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 89bc5af2..6dd91ade 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -27,7 +27,7 @@ "react-dom": "17.0.2", "react-toastify": "8.2.0", "skynet-js": "3.0.2", - "stripe": "8.217.0", + "stripe": "8.218.0", "swr": "1.3.0", "yup": "0.32.11" }, diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index 1034a786..2d85e0a1 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -2121,10 +2121,10 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stripe@8.217.0: - version "8.217.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.217.0.tgz#5e8ae744e0e8fca6e7c1d50c131ec3d77dff0999" - integrity sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA== +stripe@8.218.0: + version "8.218.0" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.218.0.tgz#c63e751acd1ab4ef833a65e3d7713f8565d71d81" + integrity sha512-cH0CAep/x+N39dnfVKJxRpgPF5ggMR26Ckn0VkHH1rtFUspJzAEu4yTApSEszD2mirMK1gD42+oihJ1uJmbnUw== dependencies: "@types/node" ">=8.1.0" qs "^6.10.3" From f433287bb690d360f00bccfb03c5d0e5be37dd17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Tue, 19 Apr 2022 13:16:57 +0200 Subject: [PATCH 27/53] Dashboard v2 - fixes + publishing under /v2 path (#2008) * fix(dashboard-v2): fix current usage graph on portals without Stripe configured * ops(dashboard-v2): publish new dashboard under /v2 prefix * ops(dashboard-v2): fix SkynetClient on multi-server portals * fix(dashboard-v2): fix skylinks validation for sponsor keys * ops(dashboard-v2): don't actually launch the new dashboard yet :) * chore(dashboard-v2): cleanup console.log call * fix(dashboard-v2): always set portal domain for SkynetClient --- docker/nginx/conf.d/server/server.account | 5 +++++ packages/dashboard-v2/gatsby-config.js | 1 + packages/dashboard-v2/package.json | 4 ++-- .../components/AvatarUploader/AvatarUploader.js | 6 +++--- .../src/components/CurrentUsage/CurrentUsage.js | 10 ++++++++-- .../src/components/CurrentUsage/GraphBar.js | 4 ++-- .../src/components/CurrentUsage/UsageGraph.js | 4 +++- .../src/components/forms/AddSponsorKeyForm.js | 2 +- .../src/contexts/plans/PlansProvider.js | 15 ++++++++++++--- packages/dashboard-v2/src/layouts/AuthLayout.js | 7 +++++-- .../dashboard-v2/src/layouts/DashboardLayout.js | 4 +++- .../src/pages/settings/developer-settings.js | 4 +++- .../dashboard-v2/src/pages/settings/export.js | 4 +++- .../src/pages/settings/notifications.js | 7 ++++--- 14 files changed, 55 insertions(+), 22 deletions(-) diff --git a/docker/nginx/conf.d/server/server.account b/docker/nginx/conf.d/server/server.account index 127ba4bf..9d444296 100644 --- a/docker/nginx/conf.d/server/server.account +++ b/docker/nginx/conf.d/server/server.account @@ -3,6 +3,11 @@ listen 443 ssl http2; include /etc/nginx/conf.d/include/ssl-settings; include /etc/nginx/conf.d/include/init-optional-variables; +# Uncomment to launch new Dashboard under /v2 path +# location /v2 { +# proxy_pass http://dashboard-v2:9000; +# } + location / { proxy_pass http://dashboard:3000; } diff --git a/packages/dashboard-v2/gatsby-config.js b/packages/dashboard-v2/gatsby-config.js index 0e269557..d087fa65 100644 --- a/packages/dashboard-v2/gatsby-config.js +++ b/packages/dashboard-v2/gatsby-config.js @@ -11,6 +11,7 @@ module.exports = { title: `Account Dashboard`, siteUrl: `https://account.${GATSBY_PORTAL_DOMAIN}`, }, + pathPrefix: "/v2", trailingSlash: "never", plugins: [ "gatsby-plugin-image", diff --git a/packages/dashboard-v2/package.json b/packages/dashboard-v2/package.json index 694a6129..80070815 100644 --- a/packages/dashboard-v2/package.json +++ b/packages/dashboard-v2/package.json @@ -11,8 +11,8 @@ "develop": "gatsby develop", "develop:secure": "dotenv -e .env.development -- gatsby develop --https -p=443", "start": "gatsby develop", - "build": "gatsby build", - "serve": "gatsby serve", + "build": "gatsby build --prefix-paths", + "serve": "gatsby serve --prefix-paths", "clean": "gatsby clean", "lint": "eslint .", "prettier": "prettier .", diff --git a/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js b/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js index 2a3e400d..f97ca2d5 100644 --- a/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js +++ b/packages/dashboard-v2/src/components/AvatarUploader/AvatarUploader.js @@ -3,14 +3,14 @@ import { useEffect, useState } from "react"; import { useUser } from "../../contexts/user"; // import { SimpleUploadIcon } from "../Icons"; -const AVATAR_PLACEHOLDER = "/images/avatar-placeholder.svg"; +import avatarPlaceholder from "../../../static/images/avatar-placeholder.svg"; export const AvatarUploader = (props) => { const { user } = useUser(); - const [imageUrl, setImageUrl] = useState(AVATAR_PLACEHOLDER); + const [imageUrl, setImageUrl] = useState(avatarPlaceholder); useEffect(() => { - setImageUrl(user.avatarUrl ?? AVATAR_PLACEHOLDER); + setImageUrl(user.avatarUrl ?? avatarPlaceholder); }, [user]); return ( diff --git a/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js b/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js index 3947638d..f9dbbc36 100644 --- a/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js +++ b/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js @@ -1,6 +1,7 @@ import { useEffect, useMemo, useState } from "react"; import fileSize from "pretty-bytes"; import { Link } from "gatsby"; +import cn from "classnames"; import useSWR from "swr"; import { useUser } from "../../contexts/user"; @@ -62,7 +63,9 @@ const ErrorMessage = () => ( ); export default function CurrentUsage() { + const { activePlan, plans } = useActivePlan(); const { usage, error, loading } = useUsageData(); + const nextPlan = useMemo(() => plans.find(({ tier }) => tier > activePlan?.tier), [plans, activePlan]); const storageUsage = size(usage.storageUsed); const storageLimit = size(usage.storageLimit); const filesUsedLabel = useMemo(() => ({ value: usage.filesUsed, unit: "files" }), [usage.filesUsed]); @@ -89,7 +92,7 @@ export default function CurrentUsage() { {storageLimit.text} - +
@@ -97,7 +100,10 @@ export default function CurrentUsage() { UPGRADE {" "} diff --git a/packages/dashboard-v2/src/components/CurrentUsage/GraphBar.js b/packages/dashboard-v2/src/components/CurrentUsage/GraphBar.js index 1afab541..fd9a015e 100644 --- a/packages/dashboard-v2/src/components/CurrentUsage/GraphBar.js +++ b/packages/dashboard-v2/src/components/CurrentUsage/GraphBar.js @@ -21,11 +21,11 @@ const BarLabel = styled.span.attrs({ `} `; -export const GraphBar = ({ value, limit, label }) => { +export const GraphBar = ({ value, limit, label, className }) => { const percentage = typeof limit !== "number" || limit === 0 ? 0 : (value / limit) * 100; return ( -
+
diff --git a/packages/dashboard-v2/src/components/CurrentUsage/UsageGraph.js b/packages/dashboard-v2/src/components/CurrentUsage/UsageGraph.js index 3f6f23c2..de4e7e46 100644 --- a/packages/dashboard-v2/src/components/CurrentUsage/UsageGraph.js +++ b/packages/dashboard-v2/src/components/CurrentUsage/UsageGraph.js @@ -1,9 +1,11 @@ import styled from "styled-components"; +import usageGraphBg from "../../../static/images/usage-graph-bg.svg"; + export const UsageGraph = styled.div.attrs({ className: "w-full my-3 grid grid-flow-row grid-rows-2", })` height: 146px; - background: url(/images/usage-graph-bg.svg) no-repeat; + background: url(${usageGraphBg}) no-repeat; background-size: cover; `; diff --git a/packages/dashboard-v2/src/components/forms/AddSponsorKeyForm.js b/packages/dashboard-v2/src/components/forms/AddSponsorKeyForm.js index 0f8b8c62..236cdc9b 100644 --- a/packages/dashboard-v2/src/components/forms/AddSponsorKeyForm.js +++ b/packages/dashboard-v2/src/components/forms/AddSponsorKeyForm.js @@ -80,7 +80,7 @@ export const AddSponsorKeyForm = forwardRef(({ onSuccess }, ref) => { json: { name, public: "true", - skylinks: [...skylinks, nextSkylink].filter(Boolean).map(parseSkylink), + skylinks: [...skylinks, nextSkylink].filter(Boolean).map((skylink) => parseSkylink(skylink)), }, }) .json(); diff --git a/packages/dashboard-v2/src/contexts/plans/PlansProvider.js b/packages/dashboard-v2/src/contexts/plans/PlansProvider.js index 135c9bcb..7c6579ad 100644 --- a/packages/dashboard-v2/src/contexts/plans/PlansProvider.js +++ b/packages/dashboard-v2/src/contexts/plans/PlansProvider.js @@ -19,7 +19,14 @@ const aggregatePlansAndLimits = (plans, limits, { includeFreePlan }) => { // Decorate each plan with its corresponding limits data, if available. if (limits?.length) { - return sortedPlans.map((plan) => ({ ...plan, limits: limits[plan.tier] || null })); + return limits.map((limitsDescriptor, index) => { + const asssociatedPlan = sortedPlans.find((plan) => plan.tier === index) || {}; + + return { + ...asssociatedPlan, + limits: limitsDescriptor || null, + }; + }); } // If we don't have the limits data yet, set just return the plans. @@ -40,10 +47,12 @@ export const PlansProvider = ({ children }) => { if (plansError || limitsError) { setLoading(false); setError(plansError || limitsError); - } else if (rawPlans) { + } else if (rawPlans || limits) { setLoading(false); setPlans( - aggregatePlansAndLimits(rawPlans, limits?.userLimits, { includeFreePlan: !settings.isSubscriptionRequired }) + aggregatePlansAndLimits(rawPlans || [], limits?.userLimits, { + includeFreePlan: !settings.isSubscriptionRequired, + }) ); } }, [rawPlans, limits, plansError, limitsError, settings.isSubscriptionRequired]); diff --git a/packages/dashboard-v2/src/layouts/AuthLayout.js b/packages/dashboard-v2/src/layouts/AuthLayout.js index 8141e606..323e4319 100644 --- a/packages/dashboard-v2/src/layouts/AuthLayout.js +++ b/packages/dashboard-v2/src/layouts/AuthLayout.js @@ -3,10 +3,13 @@ import styled from "styled-components"; import { UserProvider } from "../contexts/user"; +import skynetLogo from "../../static/images/logo-black-text.svg"; +import authBg from "../../static/images/auth-bg.svg"; + const Layout = styled.div.attrs({ className: "min-h-screen w-screen bg-black flex", })` - background-image: url(/images/auth-bg.svg); + background-image: url(${authBg}); background-repeat: no-repeat; background-position: center center; `; @@ -36,7 +39,7 @@ const AuthLayout =
- Skynet + Skynet
{children}
diff --git a/packages/dashboard-v2/src/layouts/DashboardLayout.js b/packages/dashboard-v2/src/layouts/DashboardLayout.js index 633057eb..8ac7c393 100644 --- a/packages/dashboard-v2/src/layouts/DashboardLayout.js +++ b/packages/dashboard-v2/src/layouts/DashboardLayout.js @@ -7,10 +7,12 @@ import { Footer } from "../components/Footer"; import { UserProvider, useUser } from "../contexts/user"; import { FullScreenLoadingIndicator } from "../components/LoadingIndicator"; +import dashboardBg from "../../static/images/dashboard-bg.svg"; + const Wrapper = styled.div.attrs({ className: "min-h-screen overflow-hidden", })` - background-image: url(/images/dashboard-bg.svg); + background-image: url(${dashboardBg}); background-position: center -280px; background-repeat: no-repeat; `; diff --git a/packages/dashboard-v2/src/pages/settings/developer-settings.js b/packages/dashboard-v2/src/pages/settings/developer-settings.js index cb58ab51..3f1917c1 100644 --- a/packages/dashboard-v2/src/pages/settings/developer-settings.js +++ b/packages/dashboard-v2/src/pages/settings/developer-settings.js @@ -10,6 +10,8 @@ import { AddSponsorKeyForm } from "../../components/forms/AddSponsorKeyForm"; import { Metadata } from "../../components/Metadata"; import HighlightedLink from "../../components/HighlightedLink"; +import apiKeysImg from "../../../static/images/api-keys.svg"; + const DeveloperSettingsPage = () => { const { data: allKeys = [], mutate: reloadKeys, error } = useSWR("user/apikeys"); const apiKeys = allKeys.filter(({ public: isPublic }) => isPublic === "false"); @@ -103,7 +105,7 @@ const DeveloperSettingsPage = () => {
- +
diff --git a/packages/dashboard-v2/src/pages/settings/export.js b/packages/dashboard-v2/src/pages/settings/export.js index 437f2b2f..aeb8aed3 100644 --- a/packages/dashboard-v2/src/pages/settings/export.js +++ b/packages/dashboard-v2/src/pages/settings/export.js @@ -6,6 +6,8 @@ import { Switch } from "../../components/Switch"; import { Button } from "../../components/Button"; import { Metadata } from "../../components/Metadata"; +import exportImg from "../../../static/images/import-export.svg"; + const useExportOptions = () => { const [pinnedFiles, setPinnedFiles] = useState(false); const [uploadHistory, setUploadHistory] = useState(false); @@ -65,7 +67,7 @@ const ExportPage = () => {
- +
diff --git a/packages/dashboard-v2/src/pages/settings/notifications.js b/packages/dashboard-v2/src/pages/settings/notifications.js index fc109d5c..5467f3a5 100644 --- a/packages/dashboard-v2/src/pages/settings/notifications.js +++ b/packages/dashboard-v2/src/pages/settings/notifications.js @@ -1,11 +1,12 @@ import * as React from "react"; -import { StaticImage } from "gatsby-plugin-image"; import UserSettingsLayout from "../../layouts/UserSettingsLayout"; import { Switch } from "../../components/Switch"; import { Metadata } from "../../components/Metadata"; +import inboxImg from "../../../static/images/inbox.svg"; + const NotificationsPage = () => { return ( <> @@ -37,8 +38,8 @@ const NotificationsPage = () => { -
- +
+
From abf202ca54dffaf49e5df21e90ed2a25335c0e4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 15:05:11 +0000 Subject: [PATCH 28/53] build(deps): bump express-jwt from 6.1.1 to 6.1.2 in /packages/dashboard Bumps [express-jwt](https://github.com/auth0/express-jwt) from 6.1.1 to 6.1.2. - [Release notes](https://github.com/auth0/express-jwt/releases) - [Changelog](https://github.com/auth0/express-jwt/blob/master/CHANGELOG.md) - [Commits](https://github.com/auth0/express-jwt/compare/v6.1.1...v6.1.2) --- updated-dependencies: - dependency-name: express-jwt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/dashboard/package.json | 2 +- packages/dashboard/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 6dd91ade..a10f5b26 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -15,7 +15,7 @@ "classnames": "2.3.1", "copy-text-to-clipboard": "^3.0.1", "dayjs": "1.11.1", - "express-jwt": "6.1.1", + "express-jwt": "6.1.2", "fast-levenshtein": "3.0.0", "formik": "2.2.9", "http-status-codes": "2.2.0", diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index 2d85e0a1..f4e7ce67 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -357,10 +357,10 @@ ast-types-flow@^0.0.7: resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= -async@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= +async@^3.2.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" + integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== autoprefixer@10.4.4: version "10.4.4" @@ -920,12 +920,12 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -express-jwt@6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/express-jwt/-/express-jwt-6.1.1.tgz#2b157fb4fa33c2d367ee71c61b5aca762de39657" - integrity sha512-m8gkY04v5jtiFZn6bYQINYX/DVXq1DVb5nIW7H8l87qJ4BBvtQKFRpxyRE31odct7OPfHdT+B8678zJHhlMrpw== +express-jwt@6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/express-jwt/-/express-jwt-6.1.2.tgz#4a6cc11d1dcff6f23126dd79ec5b2b441333e78b" + integrity sha512-l5dlf5lNM/1EODMsJGfHn1VnrhhsUYEetzrKFStJZLjFQXtR+HGdBiW+jUNZ+ISsFe+h7Wl/hQKjLrY2TX0Qkg== dependencies: - async "^1.5.0" + async "^3.2.2" express-unless "^1.0.0" jsonwebtoken "^8.1.0" lodash "^4.17.21" From de7e7879b7b9be86084013bb0f4ac3c4d6958505 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 10:48:53 +0200 Subject: [PATCH 29/53] use dashboard dockerhub image --- docker-compose.accounts.yml | 12 ++++++------ packages/dashboard-v2/Dockerfile | 14 +++++++++----- packages/dashboard/Dockerfile | 15 ++++++++++----- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index 3c2c46a9..47668b60 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -55,9 +55,11 @@ services: - mongo dashboard: - build: - context: ./packages/dashboard - dockerfile: Dockerfile + # uncomment "build" and comment out "image" to build from sources + # build: + # context: https://github.com/SkynetLabs/skynet-webportal.git#master + # dockerfile: ./packages/dashboard/Dockerfile + image: skynetlabs/dashboard container_name: dashboard restart: unless-stopped logging: *default-logging @@ -77,9 +79,7 @@ services: - mongo dashboard-v2: - build: - context: ./packages/dashboard-v2 - dockerfile: Dockerfile + build: packages/dashboard-v2/Dockerfile container_name: dashboard-v2 restart: unless-stopped logging: *default-logging diff --git a/packages/dashboard-v2/Dockerfile b/packages/dashboard-v2/Dockerfile index 70790cfa..4c834e0c 100644 --- a/packages/dashboard-v2/Dockerfile +++ b/packages/dashboard-v2/Dockerfile @@ -2,13 +2,17 @@ FROM node:16.14.2-alpine WORKDIR /usr/app -COPY package.json yarn.lock ./ +COPY packages/dashboard-v2/package.json \ + packages/dashboard-v2/yarn.lock \ + ./ RUN yarn --frozen-lockfile -COPY static ./static -COPY src ./src -COPY gatsby*.js ./ -COPY postcss.config.js tailwind.config.js ./ +COPY packages/dashboard-v2/static ./static +COPY packages/dashboard-v2/src ./src +COPY packages/dashboard-v2/gatsby*.js \ + packages/dashboard-v2/postcss.config.js \ + packages/dashboard-v2/tailwind.config.js \ + ./ CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"] diff --git a/packages/dashboard/Dockerfile b/packages/dashboard/Dockerfile index 39707664..25f584b3 100644 --- a/packages/dashboard/Dockerfile +++ b/packages/dashboard/Dockerfile @@ -2,14 +2,19 @@ FROM node:16.14.2-alpine WORKDIR /usr/app -COPY package.json yarn.lock ./ +COPY packages/dashboard/package.json \ + packages/dashboard/yarn.lock \ + ./ ENV NEXT_TELEMETRY_DISABLED 1 RUN yarn --frozen-lockfile -COPY public ./public -COPY src ./src -COPY styles ./styles -COPY .eslintrc.json postcss.config.js tailwind.config.js ./ +COPY packages/dashboard/public ./public +COPY packages/dashboard/src ./src +COPY packages/dashboard/styles ./styles +COPY packages/dashboard/.eslintrc.json \ + packages/dashboard/postcss.config.js \ + packages/dashboard/tailwind.config.js \ + ./ CMD ["sh", "-c", "env | grep -E 'NEXT_PUBLIC|STRIPE|ACCOUNTS' > .env.local && yarn build && yarn start"] From 68bd26f17e4726e2e1134e0bf0d1016ef45d3ee5 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 11:27:34 +0200 Subject: [PATCH 30/53] fix context on dasboard-v2 container --- docker-compose.accounts.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index 47668b60..b154bac7 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -79,7 +79,9 @@ services: - mongo dashboard-v2: - build: packages/dashboard-v2/Dockerfile + build: + context: . + dockerfile: packages/dashboard-v2/Dockerfile container_name: dashboard-v2 restart: unless-stopped logging: *default-logging From 98306b473c00af6f0ff2b6870cd0deffd90938f8 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 14:22:50 +0200 Subject: [PATCH 31/53] use official nginx entrypoint with envsubst and custom restart script --- docker-compose.yml | 8 +- docker/nginx/Dockerfile | 41 +- .../conf.d.templates/server.account.conf | 45 - .../server.account.conf.template | 39 + docker/nginx/conf.d.templates/server.api.conf | 43 - .../conf.d.templates/server.api.conf.template | 39 + ...link.conf => server.dnslink.conf.template} | 8 +- docker/nginx/conf.d.templates/server.hns.conf | 45 - .../conf.d.templates/server.hns.conf.template | 41 + .../conf.d.templates/server.skylink.conf | 43 - .../server.skylink.conf.template | 39 + .../20-envsubst-on-templates.sh | 36 + .../40-reload-every-x-hours.sh | 20 + .../50-generate-local-certificate.sh | 18 + docker/nginx/docker-entrypoint.sh | 42 + docker/nginx/mo | 1106 ----------------- docker/nginx/nginx.conf | 3 + 17 files changed, 307 insertions(+), 1309 deletions(-) delete mode 100644 docker/nginx/conf.d.templates/server.account.conf create mode 100644 docker/nginx/conf.d.templates/server.account.conf.template delete mode 100644 docker/nginx/conf.d.templates/server.api.conf create mode 100644 docker/nginx/conf.d.templates/server.api.conf.template rename docker/nginx/conf.d.templates/{server.dnslink.conf => server.dnslink.conf.template} (71%) delete mode 100644 docker/nginx/conf.d.templates/server.hns.conf create mode 100644 docker/nginx/conf.d.templates/server.hns.conf.template delete mode 100644 docker/nginx/conf.d.templates/server.skylink.conf create mode 100644 docker/nginx/conf.d.templates/server.skylink.conf.template create mode 100755 docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh create mode 100755 docker/nginx/docker-entrypoint.d/40-reload-every-x-hours.sh create mode 100755 docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh create mode 100755 docker/nginx/docker-entrypoint.sh delete mode 100755 docker/nginx/mo diff --git a/docker-compose.yml b/docker-compose.yml index 5838f136..d92b14fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,9 +54,11 @@ services: - ./docker/data/certbot:/etc/letsencrypt nginx: - build: - context: ./docker/nginx - dockerfile: Dockerfile + # uncomment "build" and comment out "image" to build from sources + # build: + # context: https://github.com/SkynetLabs/skynet-webportal.git#master + # dockerfile: ./docker/nginx/Dockerfile + image: skynetlabs/nginx container_name: nginx restart: unless-stopped logging: *default-logging diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile index eca1e3d8..12b27712 100644 --- a/docker/nginx/Dockerfile +++ b/docker/nginx/Dockerfile @@ -2,25 +2,26 @@ FROM openresty/openresty:1.19.9.1-focal WORKDIR / -RUN luarocks install lua-resty-http && \ - luarocks install hasher && \ - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ - -subj '/CN=local-certificate' \ - -keyout /etc/ssl/local-certificate.key \ - -out /etc/ssl/local-certificate.crt +RUN apt-get update && apt-get --no-install-recommends install bc=1.07.1-2build1 && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + luarocks install lua-resty-http && \ + luarocks install hasher -COPY mo ./ -COPY libs /etc/nginx/libs -COPY conf.d /etc/nginx/conf.d -COPY conf.d.templates /etc/nginx/conf.d.templates -COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf +# reload nginx every 6 hours (for reloading certificates) +ENV NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS 6 -CMD [ "bash", "-c", \ - "./mo < /etc/nginx/conf.d.templates/server.account.conf > /etc/nginx/conf.d/server.account.conf ; \ - ./mo < /etc/nginx/conf.d.templates/server.api.conf > /etc/nginx/conf.d/server.api.conf; \ - ./mo < /etc/nginx/conf.d.templates/server.dnslink.conf > /etc/nginx/conf.d/server.dnslink.conf; \ - ./mo < /etc/nginx/conf.d.templates/server.hns.conf > /etc/nginx/conf.d/server.hns.conf; \ - ./mo < /etc/nginx/conf.d.templates/server.skylink.conf > /etc/nginx/conf.d/server.skylink.conf ; \ - while :; do sleep 6h & wait ${!}; /usr/local/openresty/bin/openresty -s reload; done & \ - /usr/local/openresty/bin/openresty '-g daemon off;'" \ - ] +# copy entrypoint and entrypoint scripts +COPY docker/nginx/docker-entrypoint.sh / +COPY docker/nginx/docker-entrypoint.d /docker-entrypoint.d + +# copy nginx configuration files and libraries +COPY docker/nginx/libs /etc/nginx/libs +COPY docker/nginx/conf.d /etc/nginx/conf.d +COPY docker/nginx/conf.d.templates /etc/nginx/templates +COPY docker/nginx/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf + +ENTRYPOINT ["/docker-entrypoint.sh"] + +STOPSIGNAL SIGQUIT + +CMD ["nginx", "-g", "daemon off;"] diff --git a/docker/nginx/conf.d.templates/server.account.conf b/docker/nginx/conf.d.templates/server.account.conf deleted file mode 100644 index af3b7c4d..00000000 --- a/docker/nginx/conf.d.templates/server.account.conf +++ /dev/null @@ -1,45 +0,0 @@ -{{#ACCOUNTS_ENABLED}} - {{#PORTAL_DOMAIN}} - server { - server_name account.{{PORTAL_DOMAIN}}; # example: account.siasky.net - - include /etc/nginx/conf.d/server/server.http; - } - - server { - server_name account.{{PORTAL_DOMAIN}}; # example: account.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{PORTAL_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { - -- fall back to portal domain if server domain is not defined - if "{{SERVER_DOMAIN}}" == "" then - return "{{PORTAL_DOMAIN}}" - end - return "{{SERVER_DOMAIN}}" - } - - include /etc/nginx/conf.d/server/server.account; - } - {{/PORTAL_DOMAIN}} - - {{#SERVER_DOMAIN}} - server { - server_name account.{{SERVER_DOMAIN}}; # example: account.eu-ger-1.siasky.net - - include /etc/nginx/conf.d/server/server.http; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } - } - - server { - server_name account.{{SERVER_DOMAIN}}; # example: account.eu-ger-1.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{SERVER_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { return "{{SERVER_DOMAIN}}" } - - include /etc/nginx/conf.d/server/server.account; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } - } - {{/SERVER_DOMAIN}} -{{/ACCOUNTS_ENABLED}} diff --git a/docker/nginx/conf.d.templates/server.account.conf.template b/docker/nginx/conf.d.templates/server.account.conf.template new file mode 100644 index 00000000..64de6523 --- /dev/null +++ b/docker/nginx/conf.d.templates/server.account.conf.template @@ -0,0 +1,39 @@ +server { + server_name account.${PORTAL_DOMAIN}; # example: account.siasky.net + + include /etc/nginx/conf.d/server/server.http; +} + +server { + server_name account.${PORTAL_DOMAIN}; # example: account.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${PORTAL_DOMAIN}" } + set_by_lua_block $skynet_server_domain { + -- fall back to portal domain if server domain is not defined + if "${SERVER_DOMAIN}" == "" then + return "${PORTAL_DOMAIN}" + end + return "${SERVER_DOMAIN}" + } + + include /etc/nginx/conf.d/server/server.account; +} + +server { + server_name account.${SERVER_DOMAIN}; # example: account.eu-ger-1.siasky.net + + include /etc/nginx/conf.d/server/server.http; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} + +server { + server_name account.${SERVER_DOMAIN}; # example: account.eu-ger-1.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } + + include /etc/nginx/conf.d/server/server.account; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} diff --git a/docker/nginx/conf.d.templates/server.api.conf b/docker/nginx/conf.d.templates/server.api.conf deleted file mode 100644 index 591212ba..00000000 --- a/docker/nginx/conf.d.templates/server.api.conf +++ /dev/null @@ -1,43 +0,0 @@ -{{#PORTAL_DOMAIN}} -server { - server_name {{PORTAL_DOMAIN}}; # example: siasky.net - - include /etc/nginx/conf.d/server/server.http; -} - -server { - server_name {{PORTAL_DOMAIN}}; # example: siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{PORTAL_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { - -- fall back to portal domain if server domain is not defined - if "{{SERVER_DOMAIN}}" == "" then - return "{{PORTAL_DOMAIN}}" - end - return "{{SERVER_DOMAIN}}" - } - - include /etc/nginx/conf.d/server/server.api; -} -{{/PORTAL_DOMAIN}} - -{{#SERVER_DOMAIN}} -server { - server_name {{SERVER_DOMAIN}}; # example: eu-ger-1.siasky.net - - include /etc/nginx/conf.d/server/server.http; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } -} - -server { - server_name {{SERVER_DOMAIN}}; # example: eu-ger-1.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{SERVER_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { return "{{SERVER_DOMAIN}}" } - - include /etc/nginx/conf.d/server/server.api; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } -} -{{/SERVER_DOMAIN}} diff --git a/docker/nginx/conf.d.templates/server.api.conf.template b/docker/nginx/conf.d.templates/server.api.conf.template new file mode 100644 index 00000000..7d36ff08 --- /dev/null +++ b/docker/nginx/conf.d.templates/server.api.conf.template @@ -0,0 +1,39 @@ +server { + server_name ${PORTAL_DOMAIN}; # example: siasky.net + + include /etc/nginx/conf.d/server/server.http; +} + +server { + server_name ${PORTAL_DOMAIN}; # example: siasky.net + + set_by_lua_block $skynet_portal_domain { return "${PORTAL_DOMAIN}" } + set_by_lua_block $skynet_server_domain { + -- fall back to portal domain if server domain is not defined + if "${SERVER_DOMAIN}" == "" then + return "${PORTAL_DOMAIN}" + end + return "${SERVER_DOMAIN}" + } + + include /etc/nginx/conf.d/server/server.api; +} + +server { + server_name ${SERVER_DOMAIN}; # example: eu-ger-1.siasky.net + + include /etc/nginx/conf.d/server/server.http; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} + +server { + server_name ${SERVER_DOMAIN}; # example: eu-ger-1.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } + + include /etc/nginx/conf.d/server/server.api; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} diff --git a/docker/nginx/conf.d.templates/server.dnslink.conf b/docker/nginx/conf.d.templates/server.dnslink.conf.template similarity index 71% rename from docker/nginx/conf.d.templates/server.dnslink.conf rename to docker/nginx/conf.d.templates/server.dnslink.conf.template index d42ee245..95c623b6 100644 --- a/docker/nginx/conf.d.templates/server.dnslink.conf +++ b/docker/nginx/conf.d.templates/server.dnslink.conf.template @@ -12,13 +12,13 @@ server { ssl_certificate /etc/ssl/local-certificate.crt; ssl_certificate_key /etc/ssl/local-certificate.key; - set_by_lua_block $skynet_portal_domain { return "{{PORTAL_DOMAIN}}" } + set_by_lua_block $skynet_portal_domain { return "${PORTAL_DOMAIN}" } set_by_lua_block $skynet_server_domain { -- fall back to portal domain if server domain is not defined - if "{{SERVER_DOMAIN}}" == "" then - return "{{PORTAL_DOMAIN}}" + if "${SERVER_DOMAIN}" == "" then + return "${PORTAL_DOMAIN}" end - return "{{SERVER_DOMAIN}}" + return "${SERVER_DOMAIN}" } include /etc/nginx/conf.d/server/server.dnslink; diff --git a/docker/nginx/conf.d.templates/server.hns.conf b/docker/nginx/conf.d.templates/server.hns.conf deleted file mode 100644 index 0e4f21f3..00000000 --- a/docker/nginx/conf.d.templates/server.hns.conf +++ /dev/null @@ -1,45 +0,0 @@ -{{#PORTAL_DOMAIN}} -server { - server_name *.hns.{{PORTAL_DOMAIN}}; # example: *.hns.siasky.net - - include /etc/nginx/conf.d/server/server.http; -} - -server { - server_name *.hns.{{PORTAL_DOMAIN}}; # example: *.hns.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{PORTAL_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { - -- fall back to portal domain if server domain is not defined - if "{{SERVER_DOMAIN}}" == "" then - return "{{PORTAL_DOMAIN}}" - end - return "{{SERVER_DOMAIN}}" - } - - proxy_set_header Host {{PORTAL_DOMAIN}}; - include /etc/nginx/conf.d/server/server.hns; -} -{{/PORTAL_DOMAIN}} - -{{#SERVER_DOMAIN}} -server { - server_name *.hns.{{SERVER_DOMAIN}}; # example: *.hns.eu-ger-1.siasky.net - - include /etc/nginx/conf.d/server/server.http; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } -} - -server { - server_name *.hns.{{SERVER_DOMAIN}}; # example: *.hns.eu-ger-1.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{SERVER_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { return "{{SERVER_DOMAIN}}" } - - proxy_set_header Host {{SERVER_DOMAIN}}; - include /etc/nginx/conf.d/server/server.hns; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } -} -{{/SERVER_DOMAIN}} diff --git a/docker/nginx/conf.d.templates/server.hns.conf.template b/docker/nginx/conf.d.templates/server.hns.conf.template new file mode 100644 index 00000000..7067ce4d --- /dev/null +++ b/docker/nginx/conf.d.templates/server.hns.conf.template @@ -0,0 +1,41 @@ +server { + server_name *.hns.${PORTAL_DOMAIN}; # example: *.hns.siasky.net + + include /etc/nginx/conf.d/server/server.http; +} + +server { + server_name *.hns.${PORTAL_DOMAIN}; # example: *.hns.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${PORTAL_DOMAIN}" } + set_by_lua_block $skynet_server_domain { + -- fall back to portal domain if server domain is not defined + if "${SERVER_DOMAIN}" == "" then + return "${PORTAL_DOMAIN}" + end + return "${SERVER_DOMAIN}" + } + + proxy_set_header Host ${PORTAL_DOMAIN}; + include /etc/nginx/conf.d/server/server.hns; +} + +server { + server_name *.hns.${SERVER_DOMAIN}; # example: *.hns.eu-ger-1.siasky.net + + include /etc/nginx/conf.d/server/server.http; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} + +server { + server_name *.hns.${SERVER_DOMAIN}; # example: *.hns.eu-ger-1.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } + + proxy_set_header Host ${SERVER_DOMAIN}; + include /etc/nginx/conf.d/server/server.hns; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} diff --git a/docker/nginx/conf.d.templates/server.skylink.conf b/docker/nginx/conf.d.templates/server.skylink.conf deleted file mode 100644 index a97e240c..00000000 --- a/docker/nginx/conf.d.templates/server.skylink.conf +++ /dev/null @@ -1,43 +0,0 @@ -{{#PORTAL_DOMAIN}} -server { - server_name *.{{PORTAL_DOMAIN}}; # example: *.siasky.net - - include /etc/nginx/conf.d/server/server.http; -} - -server { - server_name *.{{PORTAL_DOMAIN}}; # example: *.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{PORTAL_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { - -- fall back to portal domain if server domain is not defined - if "{{SERVER_DOMAIN}}" == "" then - return "{{PORTAL_DOMAIN}}" - end - return "{{SERVER_DOMAIN}}" - } - - include /etc/nginx/conf.d/server/server.skylink; -} -{{/PORTAL_DOMAIN}} - -{{#SERVER_DOMAIN}} -server { - server_name *.{{SERVER_DOMAIN}}; # example: *.eu-ger-1.siasky.net - - include /etc/nginx/conf.d/server/server.http; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } -} - -server { - server_name *.{{SERVER_DOMAIN}}; # example: *.eu-ger-1.siasky.net - - set_by_lua_block $skynet_portal_domain { return "{{SERVER_DOMAIN}}" } - set_by_lua_block $skynet_server_domain { return "{{SERVER_DOMAIN}}" } - - include /etc/nginx/conf.d/server/server.skylink; - - set_by_lua_block $server_alias { return string.match("{{SERVER_DOMAIN}}", "^([^.]+)") } -} -{{/SERVER_DOMAIN}} diff --git a/docker/nginx/conf.d.templates/server.skylink.conf.template b/docker/nginx/conf.d.templates/server.skylink.conf.template new file mode 100644 index 00000000..7e22c13c --- /dev/null +++ b/docker/nginx/conf.d.templates/server.skylink.conf.template @@ -0,0 +1,39 @@ +server { + server_name *.${PORTAL_DOMAIN}; # example: *.siasky.net + + include /etc/nginx/conf.d/server/server.http; +} + +server { + server_name *.${PORTAL_DOMAIN}; # example: *.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${PORTAL_DOMAIN}" } + set_by_lua_block $skynet_server_domain { + -- fall back to portal domain if server domain is not defined + if "${SERVER_DOMAIN}" == "" then + return "${PORTAL_DOMAIN}" + end + return "${SERVER_DOMAIN}" + } + + include /etc/nginx/conf.d/server/server.skylink; +} + +server { + server_name *.${SERVER_DOMAIN}; # example: *.eu-ger-1.siasky.net + + include /etc/nginx/conf.d/server/server.http; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} + +server { + server_name *.${SERVER_DOMAIN}; # example: *.eu-ger-1.siasky.net + + set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } + + include /etc/nginx/conf.d/server/server.skylink; + + set_by_lua_block $server_alias { return string.match("${SERVER_DOMAIN}", "^([^.]+)") } +} diff --git a/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh b/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh new file mode 100755 index 00000000..c46cea44 --- /dev/null +++ b/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/20-envsubst-on-templates.sh +# Copyright (C) 2011-2016 Nginx, Inc. +# All rights reserved. + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/docker/nginx/docker-entrypoint.d/40-reload-every-x-hours.sh b/docker/nginx/docker-entrypoint.d/40-reload-every-x-hours.sh new file mode 100755 index 00000000..cdd7d17e --- /dev/null +++ b/docker/nginx/docker-entrypoint.d/40-reload-every-x-hours.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# source: https://github.com/nginxinc/docker-nginx/pull/509 + +set -e + +ME=$(basename $0) + +[ "${NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS:-}" ] || exit 0 +if [ $(echo "$NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS > 0" | bc) = 0 ]; then + echo >&3 "$ME: Error. Provide integer or floating point number greater that 0. See 'man sleep'." + exit 1 +fi + +start_background_reload() { + echo >&3 "$ME: Reloading Nginx every $NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS hour(s)" + while :; do sleep ${NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS}h; echo >&3 "$ME: Reloading Nginx ..." && nginx -s reload; done & +} + +start_background_reload diff --git a/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh b/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh new file mode 100755 index 00000000..d556fd3e --- /dev/null +++ b/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Generate locally signed ssl certificate to be used on routes +# that do not require certificate issued by trusted CA + +set -e + +ME=$(basename $0) + +generate_local_certificate() { + echo >&3 "$ME: Generating locally signed ssl certificate" + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ + -subj '/CN=local-certificate' \ + -keyout /etc/ssl/local-certificate.key \ + -out /etc/ssl/local-certificate.crt +} + +generate_local_certificate diff --git a/docker/nginx/docker-entrypoint.sh b/docker/nginx/docker-entrypoint.sh new file mode 100755 index 00000000..07793211 --- /dev/null +++ b/docker/nginx/docker-entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +# https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/docker-entrypoint.sh +# Copyright (C) 2011-2016 Nginx, Inc. +# All rights reserved. + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -V | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/docker/nginx/mo b/docker/nginx/mo deleted file mode 100755 index ba8e48d1..00000000 --- a/docker/nginx/mo +++ /dev/null @@ -1,1106 +0,0 @@ -#!/usr/bin/env bash -# -#/ Mo is a mustache template rendering software written in bash. It inserts -#/ environment variables into templates. -#/ -#/ Simply put, mo will change {{VARIABLE}} into the value of that -#/ environment variable. You can use {{#VARIABLE}}content{{/VARIABLE}} to -#/ conditionally display content or iterate over the values of an array. -#/ -#/ Learn more about mustache templates at https://mustache.github.io/ -#/ -#/ Simple usage: -#/ -#/ mo [OPTIONS] filenames... -#/ -#/ Options: -#/ -#/ -u, --fail-not-set -#/ Fail upon expansion of an unset variable. -#/ -x, --fail-on-function -#/ Fail when a function returns a non-zero status code. -#/ -e, --false -#/ Treat the string "false" as empty for conditionals. -#/ -h, --help -#/ This message. -#/ -s=FILE, --source=FILE -#/ Load FILE into the environment before processing templates. -#/ Can be used multiple times. -# -# Mo is under a MIT style licence with an additional non-advertising clause. -# See LICENSE.md for the full text. -# -# This is open source! Please feel free to contribute. -# -# https://github.com/tests-always-included/mo - - -# Public: Template parser function. Writes templates to stdout. -# -# $0 - Name of the mo file, used for getting the help message. -# $@ - Filenames to parse. -# -# Options: -# -# --allow-function-arguments -# -# Permit functions in templates to be called with additional arguments. This -# puts template data directly in to the path of an eval statement. Use with -# caution. Not listed in the help because it only makes sense when mo is -# sourced. -# -# -u, --fail-not-set -# -# Fail upon expansion of an unset variable. Default behavior is to silently -# ignore and expand into empty string. -# -# -x, --fail-on-function -# -# Fail when a function used by a template returns an error status code. -# Alternately, ou may set the MO_FAIL_ON_FUNCTION environment variable to a -# non-empty value to enable this behavior. -# -# -e, --false -# -# Treat "false" as an empty value. You may set the MO_FALSE_IS_EMPTY -# environment variable instead to a non-empty value to enable this behavior. -# -# -h, --help -# -# Display a help message. -# -# -s=FILE, --source=FILE -# -# Source a file into the environment before processing template files. -# This can be used multiple times. -# -# -- -# -# Used to indicate the end of options. You may optionally use this when -# filenames may start with two hyphens. -# -# Mo uses the following environment variables: -# -# MO_ALLOW_FUNCTION_ARGUMENTS - When set to a non-empty value, this allows -# functions referenced in templates to receive additional -# options and arguments. This puts the content from the -# template directly into an eval statement. Use with extreme -# care. -# MO_FUNCTION_ARGS - Arguments passed to the function -# MO_FAIL_ON_FUNCTION - If a function returns a non-zero status code, abort -# with an error. -# MO_FAIL_ON_UNSET - When set to a non-empty value, expansion of an unset env -# variable will be aborted with an error. -# MO_FALSE_IS_EMPTY - When set to a non-empty value, the string "false" will be -# treated as an empty value for the purposes of conditionals. -# MO_ORIGINAL_COMMAND - Used to find the `mo` program in order to generate a -# help message. -# -# Returns nothing. -mo() ( - # This function executes in a subshell so IFS is reset. - # Namespace this variable so we don't conflict with desired values. - local moContent f2source files doubleHyphens - - IFS=$' \n\t' - files=() - doubleHyphens=false - - if [[ $# -gt 0 ]]; then - for arg in "$@"; do - if $doubleHyphens; then - #: After we encounter two hyphens together, all the rest - #: of the arguments are files. - files=("${files[@]}" "$arg") - else - case "$arg" in - -h|--h|--he|--hel|--help|-\?) - moUsage "$0" - exit 0 - ;; - - --allow-function-arguments) - # shellcheck disable=SC2030 - MO_ALLOW_FUNCTION_ARGUMENTS=true - ;; - - -u | --fail-not-set) - # shellcheck disable=SC2030 - MO_FAIL_ON_UNSET=true - ;; - - -x | --fail-on-function) - # shellcheck disable=SC2030 - MO_FAIL_ON_FUNCTION=true - ;; - - -e | --false) - # shellcheck disable=SC2030 - MO_FALSE_IS_EMPTY=true - ;; - - -s=* | --source=*) - if [[ "$arg" == --source=* ]]; then - f2source="${arg#--source=}" - else - f2source="${arg#-s=}" - fi - - if [[ -f "$f2source" ]]; then - # shellcheck disable=SC1090 - . "$f2source" - else - echo "No such file: $f2source" >&2 - exit 1 - fi - ;; - - --) - #: Set a flag indicating we've encountered double hyphens - doubleHyphens=true - ;; - - *) - #: Every arg that is not a flag or a option should be a file - files=(${files[@]+"${files[@]}"} "$arg") - ;; - esac - fi - done - fi - - moGetContent moContent "${files[@]}" || return 1 - moParse "$moContent" "" true -) - - -# Internal: Call a function. -# -# $1 - Variable for output -# $2 - Function to call -# $3 - Content to pass -# $4 - Additional arguments as a single string -# -# This can be dangerous, especially if you are using tags like -# {{someFunction ; rm -rf / }} -# -# Returns nothing. -moCallFunction() { - local moArgs moContent moFunctionArgs moFunctionResult - - moArgs=() - moTrimWhitespace moFunctionArgs "$4" - - # shellcheck disable=SC2031 - if [[ -n "${MO_ALLOW_FUNCTION_ARGUMENTS-}" ]]; then - # Intentionally bad behavior - # shellcheck disable=SC2206 - moArgs=($4) - fi - - moContent=$(echo -n "$3" | MO_FUNCTION_ARGS="$moFunctionArgs" eval "$2" "${moArgs[@]}") || { - moFunctionResult=$? - # shellcheck disable=SC2031 - if [[ -n "${MO_FAIL_ON_FUNCTION-}" && "$moFunctionResult" != 0 ]]; then - echo "Function '$2' with args (${moArgs[*]+"${moArgs[@]}"}) failed with status code $moFunctionResult" - exit "$moFunctionResult" - fi - } - - # shellcheck disable=SC2031 - local "$1" && moIndirect "$1" "$moContent" -} - - -# Internal: Scan content until the right end tag is found. Creates an array -# with the following members: -# -# [0] = Content before end tag -# [1] = End tag (complete tag) -# [2] = Content after end tag -# -# Everything using this function uses the "standalone tags" logic. -# -# $1 - Name of variable for the array -# $2 - Content -# $3 - Name of end tag -# $4 - If -z, do standalone tag processing before finishing -# -# Returns nothing. -moFindEndTag() { - local content remaining scanned standaloneBytes tag - - #: Find open tags - scanned="" - moSplit content "$2" '{{' '}}' - - while [[ "${#content[@]}" -gt 1 ]]; do - moTrimWhitespace tag "${content[1]}" - - #: Restore content[1] before we start using it - content[1]='{{'"${content[1]}"'}}' - - case $tag in - '#'* | '^'*) - #: Start another block - scanned="${scanned}${content[0]}${content[1]}" - moTrimWhitespace tag "${tag:1}" - moFindEndTag content "${content[2]}" "$tag" "loop" - scanned="${scanned}${content[0]}${content[1]}" - remaining=${content[2]} - ;; - - '/'*) - #: End a block - could be ours - moTrimWhitespace tag "${tag:1}" - scanned="$scanned${content[0]}" - - if [[ "$tag" == "$3" ]]; then - #: Found our end tag - if [[ -z "${4-}" ]] && moIsStandalone standaloneBytes "$scanned" "${content[2]}" true; then - #: This is also a standalone tag - clean up whitespace - #: and move those whitespace bytes to the "tag" element - # shellcheck disable=SC2206 - standaloneBytes=( $standaloneBytes ) - content[1]="${scanned:${standaloneBytes[0]}}${content[1]}${content[2]:0:${standaloneBytes[1]}}" - scanned="${scanned:0:${standaloneBytes[0]}}" - content[2]="${content[2]:${standaloneBytes[1]}}" - fi - - local "$1" && moIndirectArray "$1" "$scanned" "${content[1]}" "${content[2]}" - return 0 - fi - - scanned="$scanned${content[1]}" - remaining=${content[2]} - ;; - - *) - #: Ignore all other tags - scanned="${scanned}${content[0]}${content[1]}" - remaining=${content[2]} - ;; - esac - - moSplit content "$remaining" '{{' '}}' - done - - #: Did not find our closing tag - scanned="$scanned${content[0]}" - local "$1" && moIndirectArray "$1" "${scanned}" "" "" -} - - -# Internal: Find the first index of a substring. If not found, sets the -# index to -1. -# -# $1 - Destination variable for the index -# $2 - Haystack -# $3 - Needle -# -# Returns nothing. -moFindString() { - local pos string - - string=${2%%$3*} - [[ "$string" == "$2" ]] && pos=-1 || pos=${#string} - local "$1" && moIndirect "$1" "$pos" -} - - -# Internal: Generate a dotted name based on current context and target name. -# -# $1 - Target variable to store results -# $2 - Context name -# $3 - Desired variable name -# -# Returns nothing. -moFullTagName() { - if [[ -z "${2-}" ]] || [[ "$2" == *.* ]]; then - local "$1" && moIndirect "$1" "$3" - else - local "$1" && moIndirect "$1" "${2}.${3}" - fi -} - - -# Internal: Fetches the content to parse into a variable. Can be a list of -# partials for files or the content from stdin. -# -# $1 - Variable name to assign this content back as -# $2-@ - File names (optional) -# -# Returns nothing. -moGetContent() { - local moContent moFilename moTarget - - moTarget=$1 - shift - if [[ "${#@}" -gt 0 ]]; then - moContent="" - - for moFilename in "$@"; do - #: This is so relative paths work from inside template files - moContent="$moContent"'{{>'"$moFilename"'}}' - done - else - moLoadFile moContent || return 1 - fi - - local "$moTarget" && moIndirect "$moTarget" "$moContent" -} - - -# Internal: Indent a string, placing the indent at the beginning of every -# line that has any content. -# -# $1 - Name of destination variable to get an array of lines -# $2 - The indent string -# $3 - The string to reindent -# -# Returns nothing. -moIndentLines() { - local content fragment len posN posR result trimmed - - result="" - - #: Remove the period from the end of the string. - len=$((${#3} - 1)) - content=${3:0:$len} - - if [[ -z "${2-}" ]]; then - local "$1" && moIndirect "$1" "$content" - - return 0 - fi - - moFindString posN "$content" $'\n' - moFindString posR "$content" $'\r' - - while [[ "$posN" -gt -1 ]] || [[ "$posR" -gt -1 ]]; do - if [[ "$posN" -gt -1 ]]; then - fragment="${content:0:$posN + 1}" - content=${content:$posN + 1} - else - fragment="${content:0:$posR + 1}" - content=${content:$posR + 1} - fi - - moTrimChars trimmed "$fragment" false true " " $'\t' $'\n' $'\r' - - if [[ -n "$trimmed" ]]; then - fragment="$2$fragment" - fi - - result="$result$fragment" - - moFindString posN "$content" $'\n' - moFindString posR "$content" $'\r' - - # If the content ends in a newline, do not indent. - if [[ "$posN" -eq ${#content} ]]; then - # Special clause for \r\n - if [[ "$posR" -eq "$((posN - 1))" ]]; then - posR=-1 - fi - - posN=-1 - fi - - if [[ "$posR" -eq ${#content} ]]; then - posR=-1 - fi - done - - moTrimChars trimmed "$content" false true " " $'\t' - - if [[ -n "$trimmed" ]]; then - content="$2$content" - fi - - result="$result$content" - - local "$1" && moIndirect "$1" "$result" -} - - -# Internal: Send a variable up to the parent of the caller of this function. -# -# $1 - Variable name -# $2 - Value -# -# Examples -# -# callFunc () { -# local "$1" && moIndirect "$1" "the value" -# } -# callFunc dest -# echo "$dest" # writes "the value" -# -# Returns nothing. -moIndirect() { - unset -v "$1" - printf -v "$1" '%s' "$2" -} - - -# Internal: Send an array as a variable up to caller of a function -# -# $1 - Variable name -# $2-@ - Array elements -# -# Examples -# -# callFunc () { -# local myArray=(one two three) -# local "$1" && moIndirectArray "$1" "${myArray[@]}" -# } -# callFunc dest -# echo "${dest[@]}" # writes "one two three" -# -# Returns nothing. -moIndirectArray() { - unset -v "$1" - - # IFS must be set to a string containing space or unset in order for - # the array slicing to work regardless of the current IFS setting on - # bash 3. This is detailed further at - # https://github.com/fidian/gg-core/pull/7 - eval "$(printf "IFS= %s=(\"\${@:2}\") IFS=%q" "$1" "$IFS")" -} - - -# Internal: Determine if a given environment variable exists and if it is -# an array. -# -# $1 - Name of environment variable -# -# Be extremely careful. Even if strict mode is enabled, it is not honored -# in newer versions of Bash. Any errors that crop up here will not be -# caught automatically. -# -# Examples -# -# var=(abc) -# if moIsArray var; then -# echo "This is an array" -# echo "Make sure you don't accidentally use \$var" -# fi -# -# Returns 0 if the name is not empty, 1 otherwise. -moIsArray() { - # Namespace this variable so we don't conflict with what we're testing. - local moTestResult - - moTestResult=$(declare -p "$1" 2>/dev/null) || return 1 - [[ "${moTestResult:0:10}" == "declare -a" ]] && return 0 - [[ "${moTestResult:0:10}" == "declare -A" ]] && return 0 - - return 1 -} - - -# Internal: Determine if the given name is a defined function. -# -# $1 - Function name to check -# -# Be extremely careful. Even if strict mode is enabled, it is not honored -# in newer versions of Bash. Any errors that crop up here will not be -# caught automatically. -# -# Examples -# -# moo () { -# echo "This is a function" -# } -# if moIsFunction moo; then -# echo "moo is a defined function" -# fi -# -# Returns 0 if the name is a function, 1 otherwise. -moIsFunction() { - local functionList functionName - - functionList=$(declare -F) - # shellcheck disable=SC2206 - functionList=( ${functionList//declare -f /} ) - - for functionName in "${functionList[@]}"; do - if [[ "$functionName" == "$1" ]]; then - return 0 - fi - done - - return 1 -} - - -# Internal: Determine if the tag is a standalone tag based on whitespace -# before and after the tag. -# -# Passes back a string containing two numbers in the format "BEFORE AFTER" -# like "27 10". It indicates the number of bytes remaining in the "before" -# string (27) and the number of bytes to trim in the "after" string (10). -# Useful for string manipulation: -# -# $1 - Variable to set for passing data back -# $2 - Content before the tag -# $3 - Content after the tag -# $4 - true/false: is this the beginning of the content? -# -# Examples -# -# moIsStandalone RESULT "$before" "$after" false || return 0 -# RESULT_ARRAY=( $RESULT ) -# echo "${before:0:${RESULT_ARRAY[0]}}...${after:${RESULT_ARRAY[1]}}" -# -# Returns nothing. -moIsStandalone() { - local afterTrimmed beforeTrimmed char - - moTrimChars beforeTrimmed "$2" false true " " $'\t' - moTrimChars afterTrimmed "$3" true false " " $'\t' - char=$((${#beforeTrimmed} - 1)) - char=${beforeTrimmed:$char} - - # If the content before didn't end in a newline - if [[ "$char" != $'\n' ]] && [[ "$char" != $'\r' ]]; then - # and there was content or this didn't start the file - if [[ -n "$char" ]] || ! $4; then - # then this is not a standalone tag. - return 1 - fi - fi - - char=${afterTrimmed:0:1} - - # If the content after doesn't start with a newline and it is something - if [[ "$char" != $'\n' ]] && [[ "$char" != $'\r' ]] && [[ -n "$char" ]]; then - # then this is not a standalone tag. - return 2 - fi - - if [[ "$char" == $'\r' ]] && [[ "${afterTrimmed:1:1}" == $'\n' ]]; then - char="$char"$'\n' - fi - - local "$1" && moIndirect "$1" "$((${#beforeTrimmed})) $((${#3} + ${#char} - ${#afterTrimmed}))" -} - - -# Internal: Join / implode an array -# -# $1 - Variable name to receive the joined content -# $2 - Joiner -# $3-$* - Elements to join -# -# Returns nothing. -moJoin() { - local joiner part result target - - target=$1 - joiner=$2 - result=$3 - shift 3 - - for part in "$@"; do - result="$result$joiner$part" - done - - local "$target" && moIndirect "$target" "$result" -} - - -# Internal: Read a file into a variable. -# -# $1 - Variable name to receive the file's content -# $2 - Filename to load - if empty, defaults to /dev/stdin -# -# Returns nothing. -moLoadFile() { - local content len - - # The subshell removes any trailing newlines. We forcibly add - # a dot to the content to preserve all newlines. - # As a future optimization, it would be worth considering removing - # cat and replacing this with a read loop. - - content=$(cat -- "${2:-/dev/stdin}" && echo '.') || return 1 - len=$((${#content} - 1)) - content=${content:0:$len} # Remove last dot - - local "$1" && moIndirect "$1" "$content" -} - - -# Internal: Process a chunk of content some number of times. Writes output -# to stdout. -# -# $1 - Content to parse repeatedly -# $2 - Tag prefix (context name) -# $3-@ - Names to insert into the parsed content -# -# Returns nothing. -moLoop() { - local content context contextBase - - content=$1 - contextBase=$2 - shift 2 - - while [[ "${#@}" -gt 0 ]]; do - moFullTagName context "$contextBase" "$1" - moParse "$content" "$context" false - shift - done -} - - -# Internal: Parse a block of text, writing the result to stdout. -# -# $1 - Block of text to change -# $2 - Current name (the variable NAME for what {{.}} means) -# $3 - true when no content before this, false otherwise -# -# Returns nothing. -moParse() { - # Keep naming variables mo* here to not overwrite needed variables - # used in the string replacements - local moArgs moBlock moContent moCurrent moIsBeginning moNextIsBeginning moTag - - moCurrent=$2 - moIsBeginning=$3 - - # Find open tags - moSplit moContent "$1" '{{' '}}' - - while [[ "${#moContent[@]}" -gt 1 ]]; do - moTrimWhitespace moTag "${moContent[1]}" - moNextIsBeginning=false - - case $moTag in - '#'*) - # Loop, if/then, or pass content through function - # Sets context - moStandaloneAllowed moContent "${moContent[@]}" "$moIsBeginning" - moTrimWhitespace moTag "${moTag:1}" - - # Split arguments from the tag name. Arguments are passed to - # functions. - moArgs=$moTag - moTag=${moTag%% *} - moTag=${moTag%%$'\t'*} - moArgs=${moArgs:${#moTag}} - moFindEndTag moBlock "$moContent" "$moTag" - moFullTagName moTag "$moCurrent" "$moTag" - - if moTest "$moTag"; then - # Show / loop / pass through function - if moIsFunction "$moTag"; then - moCallFunction moContent "$moTag" "${moBlock[0]}" "$moArgs" - moParse "$moContent" "$moCurrent" false - moContent="${moBlock[2]}" - elif moIsArray "$moTag"; then - eval "moLoop \"\${moBlock[0]}\" \"$moTag\" \"\${!${moTag}[@]}\"" - else - moParse "${moBlock[0]}" "$moCurrent" true - fi - fi - - moContent="${moBlock[2]}" - ;; - - '>'*) - # Load partial - get name of file relative to cwd - moPartial moContent "${moContent[@]}" "$moIsBeginning" "$moCurrent" - moNextIsBeginning=${moContent[1]} - moContent=${moContent[0]} - ;; - - '/'*) - # Closing tag - If hit in this loop, we simply ignore - # Matching tags are found in moFindEndTag - moStandaloneAllowed moContent "${moContent[@]}" "$moIsBeginning" - ;; - - '^'*) - # Display section if named thing does not exist - moStandaloneAllowed moContent "${moContent[@]}" "$moIsBeginning" - moTrimWhitespace moTag "${moTag:1}" - moFindEndTag moBlock "$moContent" "$moTag" - moFullTagName moTag "$moCurrent" "$moTag" - - if ! moTest "$moTag"; then - moParse "${moBlock[0]}" "$moCurrent" false "$moCurrent" - fi - - moContent="${moBlock[2]}" - ;; - - '!'*) - # Comment - ignore the tag content entirely - # Trim spaces/tabs before the comment - moStandaloneAllowed moContent "${moContent[@]}" "$moIsBeginning" - ;; - - .) - # Current content (environment variable or function) - moStandaloneDenied moContent "${moContent[@]}" - moShow "$moCurrent" "$moCurrent" - ;; - - '=') - # Change delimiters - # Any two non-whitespace sequences separated by whitespace. - # This tag is ignored. - moStandaloneAllowed moContent "${moContent[@]}" "$moIsBeginning" - ;; - - '{'*) - # Unescaped - split on }}} not }} - moStandaloneDenied moContent "${moContent[@]}" - moContent="${moTag:1}"'}}'"$moContent" - moSplit moContent "$moContent" '}}}' - moTrimWhitespace moTag "${moContent[0]}" - moArgs=$moTag - moTag=${moTag%% *} - moTag=${moTag%%$'\t'*} - moArgs=${moArgs:${#moTag}} - moFullTagName moTag "$moCurrent" "$moTag" - moContent=${moContent[1]} - - # Now show the value - # Quote moArgs here, do not quote it later. - moShow "$moTag" "$moCurrent" "$moArgs" - ;; - - '&'*) - # Unescaped - moStandaloneDenied moContent "${moContent[@]}" - moTrimWhitespace moTag "${moTag:1}" - moFullTagName moTag "$moCurrent" "$moTag" - moShow "$moTag" "$moCurrent" - ;; - - *) - # Normal environment variable or function call - moStandaloneDenied moContent "${moContent[@]}" - moArgs=$moTag - moTag=${moTag%% *} - moTag=${moTag%%$'\t'*} - moArgs=${moArgs:${#moTag}} - moFullTagName moTag "$moCurrent" "$moTag" - - # Quote moArgs here, do not quote it later. - moShow "$moTag" "$moCurrent" "$moArgs" - ;; - esac - - moIsBeginning=$moNextIsBeginning - moSplit moContent "$moContent" '{{' '}}' - done - - echo -n "${moContent[0]}" -} - - -# Internal: Process a partial. -# -# Indentation should be applied to the entire partial. -# -# This sends back the "is beginning" flag because the newline after a -# standalone partial is consumed. That newline is very important in the middle -# of content. We send back this flag to reset the processing loop's -# `moIsBeginning` variable, so the software thinks we are back at the -# beginning of a file and standalone processing continues to work. -# -# Prefix all variables. -# -# $1 - Name of destination variable. Element [0] is the content, [1] is the -# true/false flag indicating if we are at the beginning of content. -# $2 - Content before the tag that was not yet written -# $3 - Tag content -# $4 - Content after the tag -# $5 - true/false: is this the beginning of the content? -# $6 - Current context name -# -# Returns nothing. -moPartial() { - # Namespace variables here to prevent conflicts. - local moContent moFilename moIndent moIsBeginning moPartial moStandalone moUnindented - - if moIsStandalone moStandalone "$2" "$4" "$5"; then - # shellcheck disable=SC2206 - moStandalone=( $moStandalone ) - echo -n "${2:0:${moStandalone[0]}}" - moIndent=${2:${moStandalone[0]}} - moContent=${4:${moStandalone[1]}} - moIsBeginning=true - else - moIndent="" - echo -n "$2" - moContent=$4 - moIsBeginning=$5 - fi - - moTrimWhitespace moFilename "${3:1}" - - # Execute in subshell to preserve current cwd and environment - ( - # It would be nice to remove `dirname` and use a function instead, - # but that's difficult when you're only given filenames. - cd "$(dirname -- "$moFilename")" || exit 1 - moUnindented="$( - moLoadFile moPartial "${moFilename##*/}" || exit 1 - moParse "${moPartial}" "$6" true - - # Fix bash handling of subshells and keep trailing whitespace. - # This is removed in moIndentLines. - echo -n "." - )" || exit 1 - moIndentLines moPartial "$moIndent" "$moUnindented" - echo -n "$moPartial" - ) || exit 1 - - # If this is a standalone tag, the trailing newline after the tag is - # removed and the contents of the partial are added, which typically - # contain a newline. We need to send a signal back to the processing - # loop that the moIsBeginning flag needs to be turned on again. - # - # [0] is the content, [1] is that flag. - local "$1" && moIndirectArray "$1" "$moContent" "$moIsBeginning" -} - - -# Internal: Show an environment variable or the output of a function to -# stdout. -# -# Limit/prefix any variables used. -# -# $1 - Name of environment variable or function -# $2 - Current context -# $3 - Arguments string if $1 is a function -# -# Returns nothing. -moShow() { - # Namespace these variables - local moJoined moNameParts moContent - - if moIsFunction "$1"; then - moCallFunction moContent "$1" "" "$3" - moParse "$moContent" "$2" false - return 0 - fi - - moSplit moNameParts "$1" "." - - if [[ -z "${moNameParts[1]-}" ]]; then - if moIsArray "$1"; then - eval moJoin moJoined "," "\${$1[@]}" - echo -n "$moJoined" - else - # shellcheck disable=SC2031 - if moTestVarSet "$1"; then - echo -n "${!1}" - elif [[ -n "${MO_FAIL_ON_UNSET-}" ]]; then - echo "Env variable not set: $1" >&2 - exit 1 - fi - fi - else - # Further subindexes are disallowed - eval "echo -n \"\${${moNameParts[0]}[${moNameParts[1]%%.*}]}\"" - fi -} - - -# Internal: Split a larger string into an array. -# -# $1 - Destination variable -# $2 - String to split -# $3 - Starting delimiter -# $4 - Ending delimiter (optional) -# -# Returns nothing. -moSplit() { - local pos result - - result=( "$2" ) - moFindString pos "${result[0]}" "$3" - - if [[ "$pos" -ne -1 ]]; then - # The first delimiter was found - result[1]=${result[0]:$pos + ${#3}} - result[0]=${result[0]:0:$pos} - - if [[ -n "${4-}" ]]; then - moFindString pos "${result[1]}" "$4" - - if [[ "$pos" -ne -1 ]]; then - # The second delimiter was found - result[2]="${result[1]:$pos + ${#4}}" - result[1]="${result[1]:0:$pos}" - fi - fi - fi - - local "$1" && moIndirectArray "$1" "${result[@]}" -} - - -# Internal: Handle the content for a standalone tag. This means removing -# whitespace (not newlines) before a tag and whitespace and a newline after -# a tag. That is, assuming, that the line is otherwise empty. -# -# $1 - Name of destination "content" variable. -# $2 - Content before the tag that was not yet written -# $3 - Tag content (not used) -# $4 - Content after the tag -# $5 - true/false: is this the beginning of the content? -# -# Returns nothing. -moStandaloneAllowed() { - local bytes - - if moIsStandalone bytes "$2" "$4" "$5"; then - # shellcheck disable=SC2206 - bytes=( $bytes ) - echo -n "${2:0:${bytes[0]}}" - local "$1" && moIndirect "$1" "${4:${bytes[1]}}" - else - echo -n "$2" - local "$1" && moIndirect "$1" "$4" - fi -} - - -# Internal: Handle the content for a tag that is never "standalone". No -# adjustments are made for newlines and whitespace. -# -# $1 - Name of destination "content" variable. -# $2 - Content before the tag that was not yet written -# $3 - Tag content (not used) -# $4 - Content after the tag -# -# Returns nothing. -moStandaloneDenied() { - echo -n "$2" - local "$1" && moIndirect "$1" "$4" -} - - -# Internal: Determines if the named thing is a function or if it is a -# non-empty environment variable. When MO_FALSE_IS_EMPTY is set to a -# non-empty value, then "false" is also treated is an empty value. -# -# Do not use variables without prefixes here if possible as this needs to -# check if any name exists in the environment -# -# $1 - Name of environment variable or function -# $2 - Current value (our context) -# MO_FALSE_IS_EMPTY - When set to a non-empty value, this will say the -# string value "false" is empty. -# -# Returns 0 if the name is not empty, 1 otherwise. When MO_FALSE_IS_EMPTY -# is set, this returns 1 if the name is "false". -moTest() { - # Test for functions - moIsFunction "$1" && return 0 - - if moIsArray "$1"; then - # Arrays must have at least 1 element - eval "[[ \"\${#${1}[@]}\" -gt 0 ]]" && return 0 - else - # If MO_FALSE_IS_EMPTY is set, then return 1 if the value of - # the variable is "false". - # shellcheck disable=SC2031 - [[ -n "${MO_FALSE_IS_EMPTY-}" ]] && [[ "${!1-}" == "false" ]] && return 1 - - # Environment variables must not be empty - [[ -n "${!1-}" ]] && return 0 - fi - - return 1 -} - -# Internal: Determine if a variable is assigned, even if it is assigned an empty -# value. -# -# $1 - Variable name to check. -# -# Returns true (0) if the variable is set, 1 if the variable is unset. -moTestVarSet() { - [[ "${!1-a}" == "${!1-b}" ]] -} - - -# Internal: Trim the leading whitespace only. -# -# $1 - Name of destination variable -# $2 - The string -# $3 - true/false - trim front? -# $4 - true/false - trim end? -# $5-@ - Characters to trim -# -# Returns nothing. -moTrimChars() { - local back current front last target varName - - target=$1 - current=$2 - front=$3 - back=$4 - last="" - shift 4 # Remove target, string, trim front flag, trim end flag - - while [[ "$current" != "$last" ]]; do - last=$current - - for varName in "$@"; do - $front && current="${current/#$varName}" - $back && current="${current/%$varName}" - done - done - - local "$target" && moIndirect "$target" "$current" -} - - -# Internal: Trim leading and trailing whitespace from a string. -# -# $1 - Name of variable to store trimmed string -# $2 - The string -# -# Returns nothing. -moTrimWhitespace() { - local result - - moTrimChars result "$2" true true $'\r' $'\n' $'\t' " " - local "$1" && moIndirect "$1" "$result" -} - - -# Internal: Displays the usage for mo. Pulls this from the file that -# contained the `mo` function. Can only work when the right filename -# comes is the one argument, and that only happens when `mo` is called -# with `$0` set to this file. -# -# $1 - Filename that has the help message -# -# Returns nothing. -moUsage() { - grep '^#/' "${MO_ORIGINAL_COMMAND}" | cut -c 4- - echo "" - echo "MO_VERSION=$MO_VERSION" -} - - -# Save the original command's path for usage later -MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}" -MO_VERSION="2.2.0" - -# If sourced, load all functions. -# If executed, perform the actions as expected. -if [[ "$0" == "${BASH_SOURCE[0]}" ]] || [[ -z "${BASH_SOURCE[0]}" ]]; then - mo "$@" -fi diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 3517a6bc..de55d276 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -19,6 +19,9 @@ user root; worker_processes auto; +# Enables the use of JIT for regular expressions to speed-up their processing. +pcre_jit on; + #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; From 306442eef3f72d33157bf34df5c95bd6dd49dd50 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 15:26:12 +0200 Subject: [PATCH 32/53] use volumes to mount nginx configuration --- docker-compose.yml | 4 ++++ docker/nginx/Dockerfile | 6 ------ .../docker-entrypoint.d/50-generate-local-certificate.sh | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d92b14fe..6450a10f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,10 @@ services: - ./docker/data/nginx/skynet:/data/nginx/skynet:ro - ./docker/data/sia/apipassword:/data/sia/apipassword:ro - ./docker/data/certbot:/etc/letsencrypt + - ./docker/nginx/libs:/etc/nginx/libs + - ./docker/nginx/conf.d:/etc/nginx/conf.d + - ./docker/nginx/conf.d.templates:/etc/nginx/templates + - ./docker/nginx/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf networks: shared: ipv4_address: 10.10.10.30 diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile index 12b27712..b294d522 100644 --- a/docker/nginx/Dockerfile +++ b/docker/nginx/Dockerfile @@ -14,12 +14,6 @@ ENV NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS 6 COPY docker/nginx/docker-entrypoint.sh / COPY docker/nginx/docker-entrypoint.d /docker-entrypoint.d -# copy nginx configuration files and libraries -COPY docker/nginx/libs /etc/nginx/libs -COPY docker/nginx/conf.d /etc/nginx/conf.d -COPY docker/nginx/conf.d.templates /etc/nginx/templates -COPY docker/nginx/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf - ENTRYPOINT ["/docker-entrypoint.sh"] STOPSIGNAL SIGQUIT diff --git a/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh b/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh index d556fd3e..f5ecada1 100755 --- a/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh +++ b/docker/nginx/docker-entrypoint.d/50-generate-local-certificate.sh @@ -7,7 +7,7 @@ set -e ME=$(basename $0) -generate_local_certificate() { +generate_local_certificate() { echo >&3 "$ME: Generating locally signed ssl certificate" openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ -subj '/CN=local-certificate' \ From 6d2d053e23b6199a4dde6926634fe19f29e2e220 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 15:36:17 +0200 Subject: [PATCH 33/53] lint testing nginx dockerfile --- .github/workflows/lint-dockerfiles.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint-dockerfiles.yml b/.github/workflows/lint-dockerfiles.yml index 467dc117..afdd6558 100644 --- a/.github/workflows/lint-dockerfiles.yml +++ b/.github/workflows/lint-dockerfiles.yml @@ -14,6 +14,7 @@ jobs: matrix: dockerfile: - docker/nginx/Dockerfile + - docker/nginx/testing/Dockerfile - docker/sia/Dockerfile - packages/dashboard/Dockerfile - packages/dashboard-v2/Dockerfile From 873f23b7bfd1be9de47349e42ac2d4e047659e81 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 15:57:16 +0200 Subject: [PATCH 34/53] add nginx license source --- docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh | 1 + docker/nginx/docker-entrypoint.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh b/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh index c46cea44..14d97a76 100755 --- a/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh +++ b/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh @@ -1,6 +1,7 @@ #!/bin/sh # https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/20-envsubst-on-templates.sh +# https://github.com/nginxinc/docker-nginx/blob/master/LICENSE # Copyright (C) 2011-2016 Nginx, Inc. # All rights reserved. diff --git a/docker/nginx/docker-entrypoint.sh b/docker/nginx/docker-entrypoint.sh index 07793211..3802dab5 100755 --- a/docker/nginx/docker-entrypoint.sh +++ b/docker/nginx/docker-entrypoint.sh @@ -2,6 +2,7 @@ # vim:sw=4:ts=4:et # https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/docker-entrypoint.sh +# https://github.com/nginxinc/docker-nginx/blob/master/LICENSE # Copyright (C) 2011-2016 Nginx, Inc. # All rights reserved. From ac99a426b33417d5e1c9b2e24eae076d8f065c50 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 15:59:07 +0200 Subject: [PATCH 35/53] fix DL3014 warning --- docker/nginx/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile index b294d522..f35c0aff 100644 --- a/docker/nginx/Dockerfile +++ b/docker/nginx/Dockerfile @@ -2,7 +2,7 @@ FROM openresty/openresty:1.19.9.1-focal WORKDIR / -RUN apt-get update && apt-get --no-install-recommends install bc=1.07.1-2build1 && \ +RUN apt-get update && apt-get --no-install-recommends -y install bc=1.07.1-2build1 && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \ luarocks install lua-resty-http && \ luarocks install hasher From 1d6d3cbfb601a69c14da18828b43e512195c92c5 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 21 Apr 2022 16:01:20 +0200 Subject: [PATCH 36/53] fix DL3025 warning --- docker/nginx/testing/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx/testing/Dockerfile b/docker/nginx/testing/Dockerfile index ae2cd78f..ed7740b6 100644 --- a/docker/nginx/testing/Dockerfile +++ b/docker/nginx/testing/Dockerfile @@ -8,4 +8,4 @@ RUN luarocks install lua-resty-http && \ COPY rbusted /etc/nginx/ -CMD /etc/nginx/rbusted --verbose --pattern=spec /usr/local/openresty/site/lualib +CMD ["/etc/nginx/rbusted", "--verbose", "--pattern=spec", "/usr/local/openresty/site/lualib"] From c9c393ae4f4f09b25255ce4ee3ed0a9e4d8af6f4 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Thu, 21 Apr 2022 12:57:09 -0400 Subject: [PATCH 37/53] Point to latest semver release for docker images --- docker-compose.abuse-scanner.yml | 2 +- docker-compose.blocker.yml | 2 +- docker-compose.malware-scanner.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.abuse-scanner.yml b/docker-compose.abuse-scanner.yml index 4edb6556..6080ebcd 100644 --- a/docker-compose.abuse-scanner.yml +++ b/docker-compose.abuse-scanner.yml @@ -10,7 +10,7 @@ services: abuse-scanner: # uncomment "build" and comment out "image" to build from sources # build: https://github.com/SkynetLabs/abuse-scanner.git#main - image: skynetlabs/abuse-scanner + image: skynetlabs/abuse-scanner:0.1.0 container_name: abuse-scanner restart: unless-stopped logging: *default-logging diff --git a/docker-compose.blocker.yml b/docker-compose.blocker.yml index edcb45c0..29d29e34 100644 --- a/docker-compose.blocker.yml +++ b/docker-compose.blocker.yml @@ -15,7 +15,7 @@ services: blocker: # uncomment "build" and comment out "image" to build from sources # build: https://github.com/SkynetLabs/blocker.git#main - image: skynetlabs/blocker + image: skynetlabs/blocker:0.1.0 container_name: blocker restart: unless-stopped logging: *default-logging diff --git a/docker-compose.malware-scanner.yml b/docker-compose.malware-scanner.yml index fba60f98..ee3b6700 100644 --- a/docker-compose.malware-scanner.yml +++ b/docker-compose.malware-scanner.yml @@ -28,7 +28,7 @@ services: malware-scanner: # uncomment "build" and comment out "image" to build from sources # build: https://github.com/SkynetLabs/malware-scanner.git#main - image: skynetlabs/malware-scanner + image: skynetlabs/malware-scanner:0.1.0 container_name: malware-scanner restart: unless-stopped logging: *default-logging From 9e675a2a043029c4d17d0eb0cf859035f39bd49d Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 10:17:30 +0200 Subject: [PATCH 38/53] add comment about skynet_portal_domain being set to server domain --- docker/nginx/conf.d.templates/server.account.conf.template | 7 ++++++- docker/nginx/conf.d.templates/server.api.conf.template | 7 ++++++- docker/nginx/conf.d.templates/server.hns.conf.template | 7 ++++++- docker/nginx/conf.d.templates/server.skylink.conf.template | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/docker/nginx/conf.d.templates/server.account.conf.template b/docker/nginx/conf.d.templates/server.account.conf.template index 64de6523..8507c407 100644 --- a/docker/nginx/conf.d.templates/server.account.conf.template +++ b/docker/nginx/conf.d.templates/server.account.conf.template @@ -30,7 +30,12 @@ server { server { server_name account.${SERVER_DOMAIN}; # example: account.eu-ger-1.siasky.net - set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_portal_domain { + -- when accessing portal directly through server domain, portal domain should be set to server domain + -- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current + -- portal address and it should be server domain when accessing specific server by its domain address + return "${SERVER_DOMAIN}" + } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } include /etc/nginx/conf.d/server/server.account; diff --git a/docker/nginx/conf.d.templates/server.api.conf.template b/docker/nginx/conf.d.templates/server.api.conf.template index 7d36ff08..5f742127 100644 --- a/docker/nginx/conf.d.templates/server.api.conf.template +++ b/docker/nginx/conf.d.templates/server.api.conf.template @@ -30,7 +30,12 @@ server { server { server_name ${SERVER_DOMAIN}; # example: eu-ger-1.siasky.net - set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_portal_domain { + -- when accessing portal directly through server domain, portal domain should be set to server domain + -- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current + -- portal address and it should be server domain when accessing specific server by its domain address + return "${SERVER_DOMAIN}" + } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } include /etc/nginx/conf.d/server/server.api; diff --git a/docker/nginx/conf.d.templates/server.hns.conf.template b/docker/nginx/conf.d.templates/server.hns.conf.template index 7067ce4d..f7bb43fb 100644 --- a/docker/nginx/conf.d.templates/server.hns.conf.template +++ b/docker/nginx/conf.d.templates/server.hns.conf.template @@ -31,7 +31,12 @@ server { server { server_name *.hns.${SERVER_DOMAIN}; # example: *.hns.eu-ger-1.siasky.net - set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_portal_domain { + -- when accessing portal directly through server domain, portal domain should be set to server domain + -- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current + -- portal address and it should be server domain when accessing specific server by its domain address + return "${SERVER_DOMAIN}" + } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } proxy_set_header Host ${SERVER_DOMAIN}; diff --git a/docker/nginx/conf.d.templates/server.skylink.conf.template b/docker/nginx/conf.d.templates/server.skylink.conf.template index 7e22c13c..0d337abb 100644 --- a/docker/nginx/conf.d.templates/server.skylink.conf.template +++ b/docker/nginx/conf.d.templates/server.skylink.conf.template @@ -30,7 +30,12 @@ server { server { server_name *.${SERVER_DOMAIN}; # example: *.eu-ger-1.siasky.net - set_by_lua_block $skynet_portal_domain { return "${SERVER_DOMAIN}" } + set_by_lua_block $skynet_portal_domain { + -- when accessing portal directly through server domain, portal domain should be set to server domain + -- motivation: skynet-js uses Skynet-Portal-Api header (that is set to $skynet_portal_domain) to detect current + -- portal address and it should be server domain when accessing specific server by its domain address + return "${SERVER_DOMAIN}" + } set_by_lua_block $skynet_server_domain { return "${SERVER_DOMAIN}" } include /etc/nginx/conf.d/server/server.skylink; From d65397ac675abe2a6a258658bee748a62d6135b7 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 14:00:33 +0200 Subject: [PATCH 39/53] include nginx list of license conditions and disclaimer --- .../20-envsubst-on-templates.sh | 22 +++++++++++++++++++ docker/nginx/docker-entrypoint.sh | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh b/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh index 14d97a76..be9c5f8e 100755 --- a/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh +++ b/docker/nginx/docker-entrypoint.d/20-envsubst-on-templates.sh @@ -2,9 +2,31 @@ # https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/20-envsubst-on-templates.sh # https://github.com/nginxinc/docker-nginx/blob/master/LICENSE + # Copyright (C) 2011-2016 Nginx, Inc. # All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. + +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + set -e ME=$(basename $0) diff --git a/docker/nginx/docker-entrypoint.sh b/docker/nginx/docker-entrypoint.sh index 3802dab5..d45a6d9a 100755 --- a/docker/nginx/docker-entrypoint.sh +++ b/docker/nginx/docker-entrypoint.sh @@ -3,9 +3,31 @@ # https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/docker-entrypoint.sh # https://github.com/nginxinc/docker-nginx/blob/master/LICENSE + # Copyright (C) 2011-2016 Nginx, Inc. # All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. + +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + set -e if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then From b88cdf6d76bd83a598d3abc473ca3ca6f178eaff Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 14:14:50 +0200 Subject: [PATCH 40/53] track anon uploads --- docker/nginx/libs/skynet/tracker.lua | 2 +- docker/nginx/libs/skynet/tracker.spec.lua | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 78fa6995..89848d2c 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -51,7 +51,7 @@ function _M.track_upload(skylink, status_code, auth_headers) local has_auth_headers = not utils.is_table_empty(auth_headers) local status_success = status_code >= 200 and status_code <= 299 - if skylink and status_success and has_auth_headers then + if skylink and status_success then local ok, err = ngx.timer.at(0, _M.track_upload_timer, skylink, auth_headers) if not ok then ngx.log(ngx.ERR, "Failed to create timer: ", err) end end diff --git a/docker/nginx/libs/skynet/tracker.spec.lua b/docker/nginx/libs/skynet/tracker.spec.lua index 41dab843..d6c59c4a 100644 --- a/docker/nginx/libs/skynet/tracker.spec.lua +++ b/docker/nginx/libs/skynet/tracker.spec.lua @@ -231,12 +231,17 @@ describe("track_upload", function() assert.stub(ngx.timer.at).was_not_called() end) - it("should not schedule a timer if auth headers are empty", function() + it("should schedule a timer if auth headers are empty", function() ngx.timer.at.invokes(function() return true, nil end) skynet_tracker.track_upload(valid_skylink, valid_status_code, {}) - assert.stub(ngx.timer.at).was_not_called() + assert.stub(ngx.timer.at).was_called_with( + 0, + skynet_tracker.track_upload_timer, + valid_skylink, + {} + ) end) it("should log an error if timer failed to create", function() From d27dca72d13bfada3d75501d98f7585693872ff1 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 14:26:34 +0200 Subject: [PATCH 41/53] remove unused variable --- docker/nginx/libs/skynet/tracker.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 89848d2c..56f9dcc4 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -48,7 +48,6 @@ function _M.track_upload_timer(premature, skylink, auth_headers) end function _M.track_upload(skylink, status_code, auth_headers) - local has_auth_headers = not utils.is_table_empty(auth_headers) local status_success = status_code >= 200 and status_code <= 299 if skylink and status_success then From 5bde83fc197ab4fe12dbe243e5f4e8472f0e0520 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 14:45:44 +0200 Subject: [PATCH 42/53] use multi stage build for website to slim down the image --- packages/website/Dockerfile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/website/Dockerfile b/packages/website/Dockerfile index dad0e393..bf4d34e4 100644 --- a/packages/website/Dockerfile +++ b/packages/website/Dockerfile @@ -1,15 +1,15 @@ -FROM node:16.14.2-alpine - -RUN apk add --no-cache autoconf=2.71-r0 automake=1.16.4-r1 build-base=0.5-r2 libtool=2.4.6-r7 nasm=2.15.05-r0 pkgconf=1.8.0-r0 +# builder stage - use debian base image to avoid needing to install missing packages +FROM node:16.14.2-bullseye as builder WORKDIR /usr/app +# disable gatsby telemetry and installing cypress binary +ENV GATSBY_TELEMETRY_DISABLED 1 +ENV CYPRESS_INSTALL_BINARY 0 + COPY packages/website/package.json \ packages/website/yarn.lock \ ./ - -ENV GATSBY_TELEMETRY_DISABLED 1 -ENV CYPRESS_INSTALL_BINARY 0 RUN yarn --frozen-lockfile COPY packages/website/data ./data @@ -22,6 +22,16 @@ COPY packages/website/gatsby-*.js \ RUN yarn build +# main stage - use alpine base image to minimise the resulting image footprint +FROM node:16.14.2-alpine + +WORKDIR /usr/app + +# install http server for serving website files +RUN npm install --global http-server@14.1.0 + +COPY --from=builder /usr/app/public /usr/app/public + EXPOSE 9000 -CMD ["sh", "-c", "yarn serve --host 0.0.0.0"] +CMD http-server /usr/app/public -s -p 9000 From 1c1615cd5fc274b79b3cef72898318f28e9e5780 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 14:49:05 +0200 Subject: [PATCH 43/53] convert CMD into JSON notation --- packages/website/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/Dockerfile b/packages/website/Dockerfile index bf4d34e4..39b17d37 100644 --- a/packages/website/Dockerfile +++ b/packages/website/Dockerfile @@ -34,4 +34,4 @@ COPY --from=builder /usr/app/public /usr/app/public EXPOSE 9000 -CMD http-server /usr/app/public -s -p 9000 +CMD ["http-server", "/usr/app/public", "-s -p 9000"] From 20f6831eb0aa2edfe359c83ba6a4d363703a2847 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 15:00:05 +0200 Subject: [PATCH 44/53] track file uploader ip --- docker/nginx/libs/skynet/tracker.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 56f9dcc4..769de45c 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -1,5 +1,6 @@ local _M = {} +local cjson = require("cjson") local utils = require("utils") function _M.track_download_timer(premature, skylink, status, auth_headers, body_bytes_sent) @@ -30,7 +31,7 @@ function _M.track_download(skylink, status_code, auth_headers, body_bytes_sent) end end -function _M.track_upload_timer(premature, skylink, auth_headers) +function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) if premature then return end local httpc = require("resty.http").new() @@ -39,6 +40,7 @@ function _M.track_upload_timer(premature, skylink, auth_headers) local res, err = httpc:request_uri("http://10.10.10.70:3000/track/upload/" .. skylink, { method = "POST", headers = auth_headers, + body = cjson.encode({ ip = uploader_ip }) }) if err or (res and res.status ~= 204) then @@ -49,9 +51,10 @@ end function _M.track_upload(skylink, status_code, auth_headers) local status_success = status_code >= 200 and status_code <= 299 + local uploader_ip = ngx.var.remote_addr if skylink and status_success then - local ok, err = ngx.timer.at(0, _M.track_upload_timer, skylink, auth_headers) + local ok, err = ngx.timer.at(0, _M.track_upload_timer, skylink, auth_headers, uploader_ip) if not ok then ngx.log(ngx.ERR, "Failed to create timer: ", err) end end end From e8babb625e6fc9e5a452aeb03314040ec144f838 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 15:08:01 +0200 Subject: [PATCH 45/53] try formvalue --- docker/nginx/libs/skynet/tracker.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 769de45c..b26cc5e5 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -39,8 +39,10 @@ function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) -- 10.10.10.70 points to accounts service (alias not available when using resty-http) local res, err = httpc:request_uri("http://10.10.10.70:3000/track/upload/" .. skylink, { method = "POST", - headers = auth_headers, - body = cjson.encode({ ip = uploader_ip }) + body = "ip=" .. uploader_ip, + headers = { + ["Content-Type"] = "application/x-www-form-urlencoded" + } }) if err or (res and res.status ~= 204) then From 5301384609a02523e50210f6cab990180aca49a8 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 15:16:07 +0200 Subject: [PATCH 46/53] do not include form header --- docker/nginx/libs/skynet/tracker.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index b26cc5e5..43d8319b 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -39,10 +39,8 @@ function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) -- 10.10.10.70 points to accounts service (alias not available when using resty-http) local res, err = httpc:request_uri("http://10.10.10.70:3000/track/upload/" .. skylink, { method = "POST", + headers = auth_headers, body = "ip=" .. uploader_ip, - headers = { - ["Content-Type"] = "application/x-www-form-urlencoded" - } }) if err or (res and res.status ~= 204) then From 39f9b4d19640c24c7dba8bfc1b6e3ef55904217f Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 15:19:07 +0200 Subject: [PATCH 47/53] fix headers --- docker/nginx/libs/skynet/tracker.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 43d8319b..8b3bd0f5 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -1,6 +1,5 @@ local _M = {} -local cjson = require("cjson") local utils = require("utils") function _M.track_download_timer(premature, skylink, status, auth_headers, body_bytes_sent) @@ -36,10 +35,18 @@ function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) local httpc = require("resty.http").new() + -- set correct content type header and include auth headers + local headers = { + ["Content-Type"] = "application/x-www-form-urlencoded", + } + for key, value in ipairs(auth_headers) do + headers[key] = value + end + -- 10.10.10.70 points to accounts service (alias not available when using resty-http) local res, err = httpc:request_uri("http://10.10.10.70:3000/track/upload/" .. skylink, { method = "POST", - headers = auth_headers, + headers = headers, body = "ip=" .. uploader_ip, }) From f88dcf3eee5af9a2207c1d8cf4d3f166c6e9915e Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 15:34:28 +0200 Subject: [PATCH 48/53] include unit tests for uploader ip --- docker/nginx/conf.d/server/server.api | 21 ++++++- docker/nginx/libs/skynet/tracker.lua | 5 +- docker/nginx/libs/skynet/tracker.spec.lua | 67 ++++++++++++++++------- 3 files changed, 68 insertions(+), 25 deletions(-) diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index 0243ab90..48e7a638 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -235,7 +235,12 @@ location /skynet/skyfile { local skynet_tracker = require("skynet.tracker") if skynet_modules.is_enabled("a") then - skynet_tracker.track_upload(ngx.header["Skynet-Skylink"], ngx.status, skynet_account.get_auth_headers()) + skynet_tracker.track_upload( + ngx.header["Skynet-Skylink"], + ngx.status, + skynet_account.get_auth_headers(), + ngx.var.remote_addr + ) end if skynet_modules.is_enabled("s") then @@ -315,7 +320,12 @@ location /skynet/tus { local skynet_tracker = require("skynet.tracker") if skynet_modules.is_enabled("a") then - skynet_tracker.track_upload(ngx.header["Skynet-Skylink"], ngx.status, skynet_account.get_auth_headers()) + skynet_tracker.track_upload( + ngx.header["Skynet-Skylink"], + ngx.status, + skynet_account.get_auth_headers(), + ngx.var.remote_addr + ) end if skynet_modules.is_enabled("s") then @@ -346,7 +356,12 @@ location /skynet/pin { local skynet_tracker = require("skynet.tracker") if skynet_modules.is_enabled("a") then - skynet_tracker.track_upload(ngx.header["Skynet-Skylink"], ngx.status, skynet_account.get_auth_headers()) + skynet_tracker.track_upload( + ngx.header["Skynet-Skylink"], + ngx.status, + skynet_account.get_auth_headers(), + ngx.var.remote_addr + ) end if skynet_modules.is_enabled("s") then diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 8b3bd0f5..2a89bb4b 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -41,7 +41,7 @@ function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) } for key, value in ipairs(auth_headers) do headers[key] = value - end + end -- 10.10.10.70 points to accounts service (alias not available when using resty-http) local res, err = httpc:request_uri("http://10.10.10.70:3000/track/upload/" .. skylink, { @@ -56,9 +56,8 @@ function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) end end -function _M.track_upload(skylink, status_code, auth_headers) +function _M.track_upload(skylink, status_code, auth_headers, uploader_ip) local status_success = status_code >= 200 and status_code <= 299 - local uploader_ip = ngx.var.remote_addr if skylink and status_success then local ok, err = ngx.timer.at(0, _M.track_upload_timer, skylink, auth_headers, uploader_ip) diff --git a/docker/nginx/libs/skynet/tracker.spec.lua b/docker/nginx/libs/skynet/tracker.spec.lua index d6c59c4a..98d587d8 100644 --- a/docker/nginx/libs/skynet/tracker.spec.lua +++ b/docker/nginx/libs/skynet/tracker.spec.lua @@ -5,6 +5,7 @@ local skynet_tracker = require("skynet.tracker") local valid_skylink = "AQBG8n_sgEM_nlEp3G0w3vLjmdvSZ46ln8ZXHn-eObZNjA" local valid_status_code = 200 local valid_auth_headers = { ["Skynet-Api-Key"] = "foo" } +local valid_ip = "12.34.56.78" describe("track_download", function() local valid_body_bytes_sent = 12345 @@ -200,20 +201,21 @@ describe("track_upload", function() it("should schedule a timer when conditions are met", function() ngx.timer.at.invokes(function() return true, nil end) - skynet_tracker.track_upload(valid_skylink, valid_status_code, valid_auth_headers) + skynet_tracker.track_upload(valid_skylink, valid_status_code, valid_auth_headers, valid_ip) assert.stub(ngx.timer.at).was_called_with( 0, skynet_tracker.track_upload_timer, valid_skylink, - valid_auth_headers + valid_auth_headers, + valid_ip ) end) it("should not schedule a timer if skylink is empty", function() ngx.timer.at.invokes(function() return true, nil end) - skynet_tracker.track_upload(nil, valid_status_code, valid_auth_headers) + skynet_tracker.track_upload(nil, valid_status_code, valid_auth_headers, valid_ip) assert.stub(ngx.timer.at).was_not_called() end) @@ -222,11 +224,11 @@ describe("track_upload", function() ngx.timer.at.invokes(function() return true, nil end) -- couple of example of 4XX and 5XX codes - skynet_tracker.track_upload(valid_skylink, 401, valid_auth_headers) - skynet_tracker.track_upload(valid_skylink, 403, valid_auth_headers) - skynet_tracker.track_upload(valid_skylink, 490, valid_auth_headers) - skynet_tracker.track_upload(valid_skylink, 500, valid_auth_headers) - skynet_tracker.track_upload(valid_skylink, 502, valid_auth_headers) + skynet_tracker.track_upload(valid_skylink, 401, valid_auth_headers, valid_ip) + skynet_tracker.track_upload(valid_skylink, 403, valid_auth_headers, valid_ip) + skynet_tracker.track_upload(valid_skylink, 490, valid_auth_headers, valid_ip) + skynet_tracker.track_upload(valid_skylink, 500, valid_auth_headers, valid_ip) + skynet_tracker.track_upload(valid_skylink, 502, valid_auth_headers, valid_ip) assert.stub(ngx.timer.at).was_not_called() end) @@ -234,13 +236,14 @@ describe("track_upload", function() it("should schedule a timer if auth headers are empty", function() ngx.timer.at.invokes(function() return true, nil end) - skynet_tracker.track_upload(valid_skylink, valid_status_code, {}) + skynet_tracker.track_upload(valid_skylink, valid_status_code, {}, valid_ip) assert.stub(ngx.timer.at).was_called_with( 0, skynet_tracker.track_upload_timer, valid_skylink, - {} + {}, + valid_ip ) end) @@ -248,13 +251,14 @@ describe("track_upload", function() stub(ngx, "log") ngx.timer.at.invokes(function() return false, "such a failure" end) - skynet_tracker.track_upload(valid_skylink, valid_status_code, valid_auth_headers) + skynet_tracker.track_upload(valid_skylink, valid_status_code, valid_auth_headers, valid_ip) assert.stub(ngx.timer.at).was_called_with( 0, skynet_tracker.track_upload_timer, valid_skylink, - valid_auth_headers + valid_auth_headers, + valid_ip ) assert.stub(ngx.log).was_called_with(ngx.ERR, "Failed to create timer: ", "such a failure") @@ -284,7 +288,8 @@ describe("track_upload", function() skynet_tracker.track_upload_timer( true, valid_skylink, - valid_auth_headers + valid_auth_headers, + valid_ip ) assert.stub(request_uri).was_not_called() @@ -302,11 +307,19 @@ describe("track_upload", function() skynet_tracker.track_upload_timer( false, valid_skylink, - valid_auth_headers + valid_auth_headers, + valid_ip ) local uri = "http://10.10.10.70:3000/track/upload/" .. valid_skylink - assert.stub(request_uri).was_called_with(httpc, uri, { method = "POST", headers = valid_auth_headers }) + assert.stub(request_uri).was_called_with(httpc, uri, { + method = "POST", + headers = { + ["Content-Type"] = "application/x-www-form-urlencoded", + ["Skynet-Api-Key"] = "foo", + }, + body = "ip=" .. valid_ip + }) assert.stub(ngx.log).was_not_called() end) @@ -321,11 +334,19 @@ describe("track_upload", function() skynet_tracker.track_upload_timer( false, valid_skylink, - valid_auth_headers + valid_auth_headers, + valid_ip ) local uri = "http://10.10.10.70:3000/track/upload/" .. valid_skylink - assert.stub(request_uri).was_called_with(httpc, uri, { method = "POST", headers = valid_auth_headers }) + assert.stub(request_uri).was_called_with(httpc, uri, { + method = "POST", + headers = { + ["Content-Type"] = "application/x-www-form-urlencoded", + ["Skynet-Api-Key"] = "foo", + }, + body = "ip=" .. valid_ip + }) assert.stub(ngx.log).was_called_with( ngx.ERR, "Failed accounts service request /track/upload/" .. valid_skylink .. ": ", @@ -344,11 +365,19 @@ describe("track_upload", function() skynet_tracker.track_upload_timer( false, valid_skylink, - valid_auth_headers + valid_auth_headers, + valid_ip ) local uri = "http://10.10.10.70:3000/track/upload/" .. valid_skylink - assert.stub(request_uri).was_called_with(httpc, uri, { method = "POST", headers = valid_auth_headers }) + assert.stub(request_uri).was_called_with(httpc, uri, { + method = "POST", + headers = { + ["Content-Type"] = "application/x-www-form-urlencoded", + ["Skynet-Api-Key"] = "foo", + }, + body = "ip=" .. valid_ip + }) assert.stub(ngx.log).was_called_with( ngx.ERR, "Failed accounts service request /track/upload/" .. valid_skylink .. ": ", From 077295806471cafb4bdf44800d5b3223f584c532 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 17:06:17 +0200 Subject: [PATCH 49/53] use pairs instead of ipairs --- docker/nginx/libs/skynet/tracker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx/libs/skynet/tracker.lua b/docker/nginx/libs/skynet/tracker.lua index 2a89bb4b..37413215 100644 --- a/docker/nginx/libs/skynet/tracker.lua +++ b/docker/nginx/libs/skynet/tracker.lua @@ -39,7 +39,7 @@ function _M.track_upload_timer(premature, skylink, auth_headers, uploader_ip) local headers = { ["Content-Type"] = "application/x-www-form-urlencoded", } - for key, value in ipairs(auth_headers) do + for key, value in pairs(auth_headers) do headers[key] = value end From 446049986c815da8dc644152e2d730dba9ad794c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 22 Apr 2022 17:33:26 +0200 Subject: [PATCH 50/53] Revert "Merge pull request #1917 from SkynetLabs/use-accounts-image" This reverts commit f3ec613a5aea5a31ecfa9e66426067e29401ed71, reversing changes made to 25d573b9bad6aa437190c3b0f202b75d32536e60. --- docker-compose.accounts.yml | 8 +++++--- docker/accounts/Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 docker/accounts/Dockerfile diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index b154bac7..e4806e91 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -20,9 +20,11 @@ services: - ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only accounts: - # uncomment "build" and comment out "image" to build from sources - # build: https://github.com/SkynetLabs/skynet-accounts.git#main - image: skynetlabs/skynet-accounts + build: + context: ./docker/accounts + dockerfile: Dockerfile + args: + branch: main container_name: accounts restart: unless-stopped logging: *default-logging diff --git a/docker/accounts/Dockerfile b/docker/accounts/Dockerfile new file mode 100644 index 00000000..5cbf359a --- /dev/null +++ b/docker/accounts/Dockerfile @@ -0,0 +1,22 @@ +FROM golang:1.16.7 +LABEL maintainer="SkynetLabs " + +ENV GOOS linux +ENV GOARCH amd64 + +ARG branch=main + +WORKDIR /root + +RUN git clone --single-branch --branch ${branch} https://github.com/SkynetLabs/skynet-accounts.git && \ + cd skynet-accounts && \ + go mod download && \ + make release + +ENV SKYNET_DB_HOST="localhost" +ENV SKYNET_DB_PORT="27017" +ENV SKYNET_DB_USER="username" +ENV SKYNET_DB_PASS="password" +ENV SKYNET_ACCOUNTS_PORT=3000 + +ENTRYPOINT ["skynet-accounts"] From cdfd94d29083fda8275d6e4599d89732a3cb35db Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Fri, 22 Apr 2022 13:50:28 -0400 Subject: [PATCH 51/53] Revert "Revert "Merge pull request #1917 from SkynetLabs/use-accounts-image"" --- docker-compose.accounts.yml | 8 +++----- docker/accounts/Dockerfile | 22 ---------------------- 2 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 docker/accounts/Dockerfile diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index e4806e91..b154bac7 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -20,11 +20,9 @@ services: - ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only accounts: - build: - context: ./docker/accounts - dockerfile: Dockerfile - args: - branch: main + # uncomment "build" and comment out "image" to build from sources + # build: https://github.com/SkynetLabs/skynet-accounts.git#main + image: skynetlabs/skynet-accounts container_name: accounts restart: unless-stopped logging: *default-logging diff --git a/docker/accounts/Dockerfile b/docker/accounts/Dockerfile deleted file mode 100644 index 5cbf359a..00000000 --- a/docker/accounts/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM golang:1.16.7 -LABEL maintainer="SkynetLabs " - -ENV GOOS linux -ENV GOARCH amd64 - -ARG branch=main - -WORKDIR /root - -RUN git clone --single-branch --branch ${branch} https://github.com/SkynetLabs/skynet-accounts.git && \ - cd skynet-accounts && \ - go mod download && \ - make release - -ENV SKYNET_DB_HOST="localhost" -ENV SKYNET_DB_PORT="27017" -ENV SKYNET_DB_USER="username" -ENV SKYNET_DB_PASS="password" -ENV SKYNET_ACCOUNTS_PORT=3000 - -ENTRYPOINT ["skynet-accounts"] From 3fff75aab5a7b8b7ede30867a68384ce49919a26 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Mon, 25 Apr 2022 10:06:27 +0200 Subject: [PATCH 52/53] Mongo: ShardingTaskExecutorPoolMinSize=10 (#2038) --- docker-compose.mongodb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.mongodb.yml b/docker-compose.mongodb.yml index 610d5308..e8eb9aca 100644 --- a/docker-compose.mongodb.yml +++ b/docker-compose.mongodb.yml @@ -15,7 +15,7 @@ services: mongo: image: mongo:4.4.1 - command: --keyFile=/data/mgkey --replSet=${SKYNET_DB_REPLICASET:-skynet} + command: --keyFile=/data/mgkey --replSet=${SKYNET_DB_REPLICASET:-skynet} --setParameter ShardingTaskExecutorPoolMinSize=10 container_name: mongo restart: unless-stopped logging: *default-logging From 82cc22f36718de8b8d9855e79535aeb4a715b25e Mon Sep 17 00:00:00 2001 From: firyx <29089732+firyx@users.noreply.github.com> Date: Tue, 26 Apr 2022 16:39:35 +0200 Subject: [PATCH 53/53] Fix dashboard-v2 Dockerfile context (#2051) --- changelog/items/bugs-fixed/fix-context.md | 2 ++ docker-compose.accounts.yml | 4 ++-- packages/dashboard-v2/Dockerfile | 14 +++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 changelog/items/bugs-fixed/fix-context.md diff --git a/changelog/items/bugs-fixed/fix-context.md b/changelog/items/bugs-fixed/fix-context.md new file mode 100644 index 00000000..e94c8e6e --- /dev/null +++ b/changelog/items/bugs-fixed/fix-context.md @@ -0,0 +1,2 @@ +- Fix `dashboard-v2` Dockerfile context in `docker-compose.accounts.yml` to + avoid Ansible deploy (docker compose build) `permission denied` issues. \ No newline at end of file diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index b154bac7..221badf8 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -80,8 +80,8 @@ services: dashboard-v2: build: - context: . - dockerfile: packages/dashboard-v2/Dockerfile + context: ./packages/dashboard-v2 + dockerfile: Dockerfile container_name: dashboard-v2 restart: unless-stopped logging: *default-logging diff --git a/packages/dashboard-v2/Dockerfile b/packages/dashboard-v2/Dockerfile index 4c834e0c..86fe89bc 100644 --- a/packages/dashboard-v2/Dockerfile +++ b/packages/dashboard-v2/Dockerfile @@ -2,17 +2,17 @@ FROM node:16.14.2-alpine WORKDIR /usr/app -COPY packages/dashboard-v2/package.json \ - packages/dashboard-v2/yarn.lock \ +COPY package.json \ + yarn.lock \ ./ RUN yarn --frozen-lockfile -COPY packages/dashboard-v2/static ./static -COPY packages/dashboard-v2/src ./src -COPY packages/dashboard-v2/gatsby*.js \ - packages/dashboard-v2/postcss.config.js \ - packages/dashboard-v2/tailwind.config.js \ +COPY static ./static +COPY src ./src +COPY gatsby*.js \ + postcss.config.js \ + tailwind.config.js \ ./ CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"]