From b5ae88da13d5f9c87ae4bec8c77495d960bd846a Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 8 May 2024 06:29:11 -0700 Subject: [PATCH 1/3] fix: broken og --- site/astro.config.ts | 10 +--- site/package-lock.json | 51 ++++++++++--------- site/package.json | 3 +- site/site.nix | 2 +- .../graphs/ValidatorPerformance.svelte | 2 +- site/src/layouts/Layout.astro | 1 + site/src/lib/utilities.ts | 2 +- site/src/pages/openapi/[slug].astro | 9 +++- site/tsconfig.json | 2 +- 9 files changed, 42 insertions(+), 40 deletions(-) diff --git a/site/astro.config.ts b/site/astro.config.ts index 16b7ac0249..d40eada7b5 100644 --- a/site/astro.config.ts +++ b/site/astro.config.ts @@ -52,17 +52,11 @@ export default defineConfig({ }, { tag: "meta", - attrs: { - name: "og:image", - content: "/og.png" - } + attrs: { property: "og:image", content: `${SITE_URL}/og.png` } }, { tag: "meta", - attrs: { - name: "twitter:image", - content: "/og.png" - } + attrs: { name: "twitter:image", content: `${SITE_URL}/og.png` } }, { tag: "script", diff --git a/site/package-lock.json b/site/package-lock.json index b0a51c4172..d6656c659c 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -15,7 +15,7 @@ "@astrojs/starlight-tailwind": "^2.0.2", "@astrojs/svelte": "^5.4.0", "@astrojs/tailwind": "^5.1.0", - "@expressive-code/plugin-collapsible-sections": "^0.34.1", + "@expressive-code/plugin-collapsible-sections": "^0.35.3", "@splinetool/runtime": "^1.0.93", "@splinetool/viewer": "^1.0.93", "@urql/svelte": "^4.1.1", @@ -45,7 +45,6 @@ "@astrojs/check": "^0.5.10", "@astrojs/language-server": "^2.8.4", "@astrojs/ts-plugin": "^1.6.1", - "@cloudflare/workers-types": "^4.20240405.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/typography": "^0.5.12", @@ -720,12 +719,6 @@ "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz", "integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==" }, - "node_modules/@cloudflare/workers-types": { - "version": "4.20240405.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20240405.0.tgz", - "integrity": "sha512-sEVOhyOgXUwfLkgHqbLZa/sfkSYrh7/zLmI6EZNibPaVPvAnAcItbNNl3SAlLyLKuwf8m4wAIAgu9meKWCvXjg==", - "dev": true - }, "node_modules/@ctrl/tinycolor": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", @@ -1375,24 +1368,32 @@ } }, "node_modules/@expressive-code/plugin-collapsible-sections": { - "version": "0.34.1", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-collapsible-sections/-/plugin-collapsible-sections-0.34.1.tgz", - "integrity": "sha512-KeG/FPyoXHHzH+yofWEpRB7UXUXF886B5UrJ0DthABDTnEi/LBcxLKkmCVClav0xtQjeP7kCIDTzYajl5NoXgQ==", + "version": "0.35.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-collapsible-sections/-/plugin-collapsible-sections-0.35.3.tgz", + "integrity": "sha512-UvinhyQGQ93ZrwZhxzkCqQYS1HkiJ3OOIcqKOUiEZnH26bSck2EehrXBLHxh0TuAnSfCwbC8H1QB1CAX3G2G1Q==", "dependencies": { - "@expressive-code/core": "^0.34.1" + "@expressive-code/core": "^0.35.3" + } + }, + "node_modules/@expressive-code/plugin-collapsible-sections/node_modules/@ctrl/tinycolor": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.1.0.tgz", + "integrity": "sha512-WyOx8cJQ+FQus4Mm4uPIZA64gbk3Wxh0so5Lcii0aJifqwoVOlfFtorjLE0Hen4OYyHZMXDWqMmaQemBhgxFRQ==", + "engines": { + "node": ">=14" } }, "node_modules/@expressive-code/plugin-collapsible-sections/node_modules/@expressive-code/core": { - "version": "0.34.1", - "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.34.1.tgz", - "integrity": "sha512-lq9Blzw9wrw0H+g/I96IGb4rxiO1PrfLySa3yRQYzHKH2YJwFFPTqXLSLzoZLUUkdPs5rD9JgeMtrlJ1uVvXkg==", + "version": "0.35.3", + "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.35.3.tgz", + "integrity": "sha512-SYamcarAjufYhbuK/kfvJSvAXLsfnM7DKc78R7Dq4B73R5bKQK2m5zR0l57tXr4yp2C5Z8lu5xZncdwWxcmPdg==", "dependencies": { - "@ctrl/tinycolor": "^3.6.0", + "@ctrl/tinycolor": "^4.0.4", "hast-util-select": "^6.0.2", - "hast-util-to-html": "^9.0.0", - "hast-util-to-text": "^4.0.0", + "hast-util-to-html": "^9.0.1", + "hast-util-to-text": "^4.0.1", "hastscript": "^9.0.0", - "postcss": "^8.4.21", + "postcss": "^8.4.38", "postcss-nested": "^6.0.1", "unist-util-visit": "^5.0.0", "unist-util-visit-parents": "^6.0.1" @@ -5431,9 +5432,9 @@ } }, "node_modules/hast-util-to-html": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.0.tgz", - "integrity": "sha512-IVGhNgg7vANuUA2XKrT6sOIIPgaYZnmLx3l/CCOAK0PtgfoHrZwX7jCSYyFxHTrGmC6S9q8aQQekjp4JPZF+cw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.1.tgz", + "integrity": "sha512-hZOofyZANbyWo+9RP75xIDV/gq+OUKx+T46IlwERnKmfpwp81XBFbT9mi26ws+SJchA4RVUQwIBJpqEOBhMzEQ==", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", @@ -5523,9 +5524,9 @@ } }, "node_modules/hast-util-to-text": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.0.tgz", - "integrity": "sha512-EWiE1FSArNBPUo1cKWtzqgnuRQwEeQbQtnFJRYV1hb1BWDgrAlBU0ExptvZMM/KSA82cDpm2sFGf3Dmc5Mza3w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz", + "integrity": "sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", diff --git a/site/package.json b/site/package.json index b91027894d..435c47ed8a 100644 --- a/site/package.json +++ b/site/package.json @@ -20,7 +20,7 @@ "@astrojs/starlight-tailwind": "^2.0.2", "@astrojs/svelte": "^5.4.0", "@astrojs/tailwind": "^5.1.0", - "@expressive-code/plugin-collapsible-sections": "^0.34.1", + "@expressive-code/plugin-collapsible-sections": "^0.35.3", "@splinetool/runtime": "^1.0.93", "@splinetool/viewer": "^1.0.93", "@urql/svelte": "^4.1.1", @@ -50,7 +50,6 @@ "@astrojs/check": "^0.5.10", "@astrojs/language-server": "^2.8.4", "@astrojs/ts-plugin": "^1.6.1", - "@cloudflare/workers-types": "^4.20240405.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/typography": "^0.5.12", diff --git a/site/site.nix b/site/site.nix index f4cb5809ff..78990aa12b 100644 --- a/site/site.nix +++ b/site/site.nix @@ -8,7 +8,7 @@ { packages = { site = unstablePkgs.buildNpmPackage { - npmDepsHash = "sha256-dd0rU/5WHM0NVxJWjGLM34VS3Y4Hmc4vRIot49E+NuE="; + npmDepsHash = "sha256-iacabyQyragOOO1AsWc0+N14e9cyl2p3Kq+egRaSGYc="; src = ./.; srcs = [ ./. ./../evm/. ./../networks/genesis/. ./../versions/. ]; sourceRoot = "site"; diff --git a/site/src/components/graphs/ValidatorPerformance.svelte b/site/src/components/graphs/ValidatorPerformance.svelte index cffd3cc1cf..1d87692ccb 100644 --- a/site/src/components/graphs/ValidatorPerformance.svelte +++ b/site/src/components/graphs/ValidatorPerformance.svelte @@ -50,7 +50,7 @@ function seriesValue(value: any, name: string): string { } } -const hiddenData = Array(128 / 4) +const hiddenData = new Array(128 / 4) .fill(0) .map((_, i) => [i * 4, "-"]) diff --git a/site/src/layouts/Layout.astro b/site/src/layouts/Layout.astro index 9a8c3db1ba..c8cacac0a0 100644 --- a/site/src/layouts/Layout.astro +++ b/site/src/layouts/Layout.astro @@ -2,6 +2,7 @@ import BaseLayout from "./BaseLayout.astro" import Header from "#/components/Header.astro" import Footer from "#/components/Footer.astro" +console.log(import.meta.url) interface Props { url?: string diff --git a/site/src/lib/utilities.ts b/site/src/lib/utilities.ts index 4839b98a84..7d78f6f729 100644 --- a/site/src/lib/utilities.ts +++ b/site/src/lib/utilities.ts @@ -1,4 +1,4 @@ -export const arraySizeN = (n: number) => Array.from(Array(n).keys()) +export const arraySizeN = (n: number) => Array.from(new Array(n).keys()) export const sleep = (ms: number): Promise => new Promise(resolve => setTimeout(resolve, ms)) diff --git a/site/src/pages/openapi/[slug].astro b/site/src/pages/openapi/[slug].astro index a348ed534c..85a803b75b 100644 --- a/site/src/pages/openapi/[slug].astro +++ b/site/src/pages/openapi/[slug].astro @@ -19,8 +19,15 @@ const openApiSchemaUrl = `/openapi/${slug}.json`