Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

downgraded next to 13.4.9

Steven Teybf0808fa1af1
diff --git a/app/sitemap.ts b/app/sitemap.ts
index d4cf097d5f..2041e19ad9 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -1,11 +1,12 @@
import prisma from "#/lib/prisma";
import { headers } from "next/headers";
-import { getDomain } from "#/lib/utils";
import { allChangelogPosts, allLegalPosts } from "contentlayer/generated";
+import { isHomeHostname } from "#/lib/utils";
export default async function Sitemap() {
const headersList = headers();
- const domain = getDomain(headersList);
+ let domain = headersList.get("host") as string;
+ if (isHomeHostname(domain)) domain = "dub.sh";
const links = await prisma.link.findMany({
where: {
diff --git a/lib/utils.ts b/lib/utils.ts
index a6bd4db965..7ffdd6df4d 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -263,12 +263,6 @@ export const isHomeHostname = (domain: string) => {
return HOME_HOSTNAMES.has(domain) || domain.endsWith(".vercel.app");
};
-export const getDomain = (headers: Headers) => {
- let domain = headers.get("host") as string;
- if (isHomeHostname(domain)) domain = "dub.sh";
- return domain;
-};
-
export const getUrlFromString = (str: string) => {
if (isValidUrl(str)) return str;
try {
diff --git a/package.json b/package.json
index fb160f7d81..4ff6c6753f 100644
--- a/package.json
+++ b/package.json
@@ -53,7 +53,7 @@
"js-cookie": "^3.0.5",
"lucide-react": "^0.192.0",
"ms": "^2.1.3",
- "next": "^13.4.10-canary.0",
+ "next": "13.4.9-canary.1",
"next-auth": "^4.22.1",
"next-contentlayer": "^0.3.3",
"node-html-parser": "^6.1.4",
diff --git a/yarn.lock b/yarn.lock
index 1e6829d83b..84e39cefda 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -804,10 +804,10 @@
resolved "https://registry.npmjs.org/@next/env/-/env-13.1.6.tgz"
integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.10-canary.0.tgz#0a542949fe7643dece3c6bf0b86516bd39953d45"
- integrity sha512-kOEMhom5gCLdtrFXGCrO3qUObPbXMJ0hLavKAEAx0Vme9YaDjYBqLuQUJ9UfpFzjYIXh4t3/ZuSmxnfSPxldZg==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.9-canary.1.tgz#603ecc94fcb0f74b8e16af5f5b6c911a47d7b303"
+ integrity sha512-sXC2sJx2eG3essLnmo3TZqrHC/iNJuOjQ7PaejBrfaNzWRQGM0LlYOrByzL/7ukhPItjiTOjC+rSi5SoHK+ITA==
version "13.1.6"
@@ -824,20 +824,20 @@
resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz"
integrity sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.10-canary.0.tgz#792f643eaea30f12ba22931fae064e8b5a148cdd"
- integrity sha512-7fO4zkE2S7XytxRGwCz77tPlVXdJrF0YV6hbgRi2dAkDCwSPKSqLOcwqhd945XhVXAXOyat8nvSG29lQeo8+cw==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.9-canary.1.tgz#9af5abc62645a38e6b5ae98a173603c6dfa02ab3"
+ integrity sha512-SMd4EE/512oPh5Fe9/rDdz+7tjpmV+0zCsGYIU7JElyZ9lJWm2kIo+NZlYbWwpkRdVwsWVgZ/0LI91lrTWsiUQ==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz#e869ac75d16995eee733a7d1550322d9051c1eb4"
integrity sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.10-canary.0.tgz#77065c4f85ae3c35a6db63e3b5c6911a2ed9c91f"
- integrity sha512-bm5pJejXtNuROmG1xePzmEOiFCBPAQYOBV3d0Jc4UPe8iJMHF0G/REKyaobFds5Oz0rd7O+WUqX4mx8/Mnf/eQ==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.9-canary.1.tgz#c0360c000899d25672903a019c1ca54c895eeddc"
+ integrity sha512-QGgkepKAtbeJuCDaQYCcffYz/UDGvK4B9Qyg9hqJkRd4ZInY2fc1SWzHjCYQ1cDe9xM32+IK9JhA8p7/h6Nz+A==
version "13.1.6"
@@ -854,70 +854,70 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz#87a71db21cded3f7c63d1d19079845c59813c53d"
integrity sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.10-canary.0.tgz#7e353a0960e0f34438daae208cf10e944524c018"
- integrity sha512-u4OtqbLYW2srSsybJrc4Dv2m+iJy9trAzUApPfRkV9KbOPKhne4oHwziKfoRIfgBdQdVacbZ/kl02hn7VWgoeQ==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.9-canary.1.tgz#8d836016c841b7c1578140cc0319f5c24acff8fe"
+ integrity sha512-HffAAHmC9WTUiR23auK/ToSXSUHf7Cv4MIzcVn/HTvWkYKBUklGcgEmqksJ3wlRhe1OmvNjei5daDZsbEgixbQ==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz#c5aac8619331b9fd030603bbe2b36052011e11de"
integrity sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.10-canary.0.tgz#706018c24feda40b52888d836dbc6802a41b9fa3"
- integrity sha512-VxZ1etsSaL507WQ6xQAdaGju3ueFR623wi/1/ZxWxfGGPqyPn2LwL2Fbx8PDLv9gH6EKZdQG8lRXdUlV/LVPLw==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.9-canary.1.tgz#6a78a07c2bd3ffbcf7cb1c01805abf01a3520bf4"
+ integrity sha512-ihLGywdh7RMsY6DJGP022D1O8SuURmE5PvYf0+Hw/Gbb/LK6b3f788eqQm5yQf8xkvDxC7apF7mU3bPGhE6m5g==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz#9513d36d540bbfea575576746736054c31aacdea"
integrity sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.10-canary.0.tgz#c50185c923033b0cdc8adab165ed5f271154d38b"
- integrity sha512-zHSMxQtk+lH/TjY7O6vZjHPA/fE258tHA3MCbzSYMTFwFRwOS5T3bUu/9I6GLRVzVJb2EVPEtSBJKAFdwBttYA==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.9-canary.1.tgz#a50014cc8f9f6550b09a0364adeaaa01dcca0511"
+ integrity sha512-sdjgQriI9pd/Cqei00Qd/iVrzNGmxlSvdtjruxc+bJ37TPRFOBc4RLVTUSBLTK26yqYZoGp5wjczYQvXFouWxg==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz#d61fc6884899f5957251f4ce3f522e34a2c479b7"
integrity sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.10-canary.0.tgz#1fd5dd1b88aa1d3e769e1209f23913825cc1b3e7"
- integrity sha512-FC50Pvfy0v/FB84DfSSgESrhUUxeqCMkLpIkjMCCwOoaGiMc9RjToOjT5OZj2M1dik472MKdpKkh1+sou+7CUw==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.9-canary.1.tgz#f52ab3801a5917a5b3a06c481ac5ac2b18b589e9"
+ integrity sha512-eevPj4/5y/4KNwdzIl6BxDhleA9Y4RCu9kson3Kp/1CgI0aBZ2F1mhO6huKDp9u9Esb4wr5iLBWjx+SpETP3SA==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz#fac2077a8ae9768e31444c9ae90807e64117cda7"
integrity sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.10-canary.0.tgz#8b0c1e67d7f4eba176c20e4259d493a03c9d2186"
- integrity sha512-W/GV3UusZZczoDimCJWTxXQk62iwAAjDuVvISSLXuxuOGrRuJkHaRQQnTsN7pECRANDRIBiGDecawMuWz1iFOw==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.9-canary.1.tgz#5a2940ae0a9a8a52446554f21803dc0776062891"
+ integrity sha512-dpB466PXoYemixH2oNxpQ/zZXw04IoYbmMuQ9nhYst0bLOOEdtLM+ok8xfeLVlBa4O5aOh0GFJyv3bGltXqLCA==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz#498bc11c91b4c482a625bf4b978f98ae91111e46"
integrity sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.10-canary.0.tgz#1823d674bd4992f386777bf79a70d9f2ba2200b3"
- integrity sha512-LBbVkr3DaC8YWndxBUk22BbXRPd2OEjP40u/lpQQZnYQBiAHRBH7GRaPUOyTR1uSAjsmwKKtGPD6GYkn1nWOtg==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.9-canary.1.tgz#b764a88b4a61294aa6329948b66d7bc4939d73d6"
+ integrity sha512-AOvS+wHfKrYdfJIjuEaI+o//auXJxbU6LEFr3f/nOKXWMAWqMjw43objMoMVc+tRM2H+pJrvi0s0cCHaEFF6Dg==
version "13.1.6"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz#17ed919c723426b7d0ce1cd73d40ce3dcd342089"
integrity sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA==
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.10-canary.0.tgz#56dc2a8a23d1dfaf479a0ddf86bae8628708b616"
- integrity sha512-jk5naKdJ0M7Bv3NRRysJu8sKDKsUqvUZYVjTyKPSYv0dKU0sdLsCO/gOcvi+Zs1i8vkS6h+yIrKxMyvM++CNGQ==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.9-canary.1.tgz#2957274aeba4e69670310ba4aaed8a0c23485538"
+ integrity sha512-yjiZS52XfTSVS+tVr+Zx+eVQGL5adsqD4X6j7MVWt/wFLLsTcCr7ew820mA2Ogviu9yIo8Wg+cd2Ln4VyQF0Aw==
"@nodelib/[email protected]":
version "2.1.5"
@@ -6438,12 +6438,12 @@ [email protected]:
"@next/swc-win32-ia32-msvc" "13.1.6"
"@next/swc-win32-x64-msvc" "13.1.6"
-next@^13.4.10-canary.0:
- version "13.4.10-canary.0"
- resolved "https://registry.yarnpkg.com/next/-/next-13.4.10-canary.0.tgz#6e3123159f7e32cd056d65d0b4b7f60067472b3c"
- integrity sha512-bi/HYZSeMtDjH3wNBCWpwaRJEX6K/opCCVd9shrMv79ERP+Npw6i5al7MuWCTC7yY3IAbpOG7WgTsYgnoBtnGg==
+ version "13.4.9-canary.1"
+ resolved "https://registry.yarnpkg.com/next/-/next-13.4.9-canary.1.tgz#9e064737de343fb3baf3229c17145a52dfe58f74"
+ integrity sha512-mGk7mu7+mdYd3DvDrJZ+lnwFIkJs/1/uHBYp5TKScb3rmme8SVUtvms45vzh0KHR0ugkvKtV6fDTmriaqsi1LQ==
dependencies:
- "@next/env" "13.4.10-canary.0"
+ "@next/env" "13.4.9-canary.1"
"@swc/helpers" "0.5.1"
busboy "1.6.0"
caniuse-lite "^1.0.30001406"
@@ -6452,15 +6452,15 @@ next@^13.4.10-canary.0:
watchpack "2.4.0"
zod "3.21.4"
optionalDependencies:
- "@next/swc-darwin-arm64" "13.4.10-canary.0"
- "@next/swc-darwin-x64" "13.4.10-canary.0"
- "@next/swc-linux-arm64-gnu" "13.4.10-canary.0"
- "@next/swc-linux-arm64-musl" "13.4.10-canary.0"
- "@next/swc-linux-x64-gnu" "13.4.10-canary.0"
- "@next/swc-linux-x64-musl" "13.4.10-canary.0"
- "@next/swc-win32-arm64-msvc" "13.4.10-canary.0"
- "@next/swc-win32-ia32-msvc" "13.4.10-canary.0"
- "@next/swc-win32-x64-msvc" "13.4.10-canary.0"
+ "@next/swc-darwin-arm64" "13.4.9-canary.1"
+ "@next/swc-darwin-x64" "13.4.9-canary.1"
+ "@next/swc-linux-arm64-gnu" "13.4.9-canary.1"
+ "@next/swc-linux-arm64-musl" "13.4.9-canary.1"
+ "@next/swc-linux-x64-gnu" "13.4.9-canary.1"
+ "@next/swc-linux-x64-musl" "13.4.9-canary.1"
+ "@next/swc-win32-arm64-msvc" "13.4.9-canary.1"
+ "@next/swc-win32-ia32-msvc" "13.4.9-canary.1"
+ "@next/swc-win32-x64-msvc" "13.4.9-canary.1"
no-case@^3.0.4:
version "3.0.4"