From 58bcf7fc615cab9c747eb416fdf8e2599fe9ac5d Mon Sep 17 00:00:00 2001
From: Kevin-Umali
Date: Sat, 17 Aug 2024 11:50:57 +0800
Subject: [PATCH] transfer to new domain
---
.husky/pre-commit | 22 ++++++++++++++++++++++
client/app/layout.tsx | 6 +++---
client/package.json | 2 +-
client/public/robots.txt | 4 ++--
server/src/queue/emailQueue.ts | 6 +++---
server/src/template/backup.html | 3 +--
server/src/template/index.html | 3 +--
7 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 31e2758..7cb9506 100644
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1,26 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
+# Get the current branch name
+branch_name=$(git rev-parse --abbrev-ref HEAD)
+
+# Define your allowed patterns
+main_branch="main"
+feature_branch_pattern="^TL-DYS-[0-9]+$"
+
+# Check if branch name is valid
+if [ "$branch_name" != "$main_branch" ] && ! echo "$branch_name" | grep -Eq "$feature_branch_pattern"; then
+ echo "Warning: Branch name '$branch_name' is invalid. Must be '$main_branch' or match pattern 'TL-DYS-'."
+
+ # Ask the user if they want to bypass the check
+ echo "Do you want to bypass the branch name check and continue? (yes/no)"
+ read -r answer
+
+ if [ "$answer" != "yes" ]; then
+ echo "Commit/push aborted due to invalid branch name."
+ exit 1
+ fi
+fi
+
+# Run the rest of the pre-commit/pre-push hook (e.g., lint-staged)
npx lint-staged --concurrent false --relative
diff --git a/client/app/layout.tsx b/client/app/layout.tsx
index d7a5fa4..6d14f07 100644
--- a/client/app/layout.tsx
+++ b/client/app/layout.tsx
@@ -28,16 +28,16 @@ export const metadata: Metadata = {
"Innovative Project Generator",
"DIY Creativity",
],
- metadataBase: new URL("https://www.diyspire.online/"),
+ metadataBase: new URL("https://www.diyspire.com/"),
applicationName: "DIYspire",
openGraph: {
type: "website",
- url: "https://www.diyspire.online/",
+ url: "https://www.diyspire.com/",
title: "DIYspire - AI-Powered DIY Project Idea Generator",
description: "Unleash a world of unique DIY project ideas with DIYspire, an AI-powered generator backed by OpenAI. Ignite your creativity and embark on your next inventive journey.",
},
twitter: {
- site: "https://www.diyspire.online/",
+ site: "https://www.diyspire.com/",
title: "DIYspire - AI-Powered DIY Project Idea Generator",
description: "Unleash a world of unique DIY project ideas with DIYspire, an AI-powered generator backed by OpenAI. Ignite your creativity and embark on your next inventive journey.",
},
diff --git a/client/package.json b/client/package.json
index c15df5a..474f312 100644
--- a/client/package.json
+++ b/client/package.json
@@ -99,5 +99,5 @@
"prettier-plugin-tailwindcss"
]
},
- "homepage": "https://www.diyspire.online"
+ "homepage": "https://www.diyspire.com"
}
diff --git a/client/public/robots.txt b/client/public/robots.txt
index 03979c5..763bda2 100644
--- a/client/public/robots.txt
+++ b/client/public/robots.txt
@@ -3,7 +3,7 @@ User-agent: *
Allow: /
# Host
-Host: https://www.diyspire.online
+Host: https://www.diyspire.com
# Sitemaps
-Sitemap: https://www.diyspire.online/sitemap.xml
+Sitemap: https://www.diyspire.com/sitemap.xml
diff --git a/server/src/queue/emailQueue.ts b/server/src/queue/emailQueue.ts
index 9188719..4d359a6 100644
--- a/server/src/queue/emailQueue.ts
+++ b/server/src/queue/emailQueue.ts
@@ -149,8 +149,8 @@ export const processEmailQueue = async (
}
const generatedHtml = await fillTemplate(join(__dirname, "..", "template", "index.html"), {
- header_image: "https://www.diyspire.online/android-chrome-192x192.png",
- header_alt: "DIYspire - diyspire.online logo",
+ header_image: "https://www.diyspire.com/android-chrome-192x192.png",
+ header_alt: "DIYspire - diyspire.com logo",
header_title: "DIYspire",
welcome_title: projectIdea.welcome.title,
welcome_content: projectIdea.welcome.content,
@@ -167,7 +167,7 @@ export const processEmailQueue = async (
project_time: projectIdea.time,
project_budget: projectIdea.budget,
project_currency: projectIdea.currency,
- cta_url: "https://www.diyspire.online/?is_safe=false",
+ cta_url: "https://www.diyspire.com/?is_safe=false",
project_steps: generateProjectSteps(projectIdea.details),
});
diff --git a/server/src/template/backup.html b/server/src/template/backup.html
index 3b2d287..b7c3b27 100644
--- a/server/src/template/backup.html
+++ b/server/src/template/backup.html
@@ -291,8 +291,7 @@ {{suggested_diy.title}}
www.example.com
- © Copyright, 2024, diyspire.online • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.online. Although we'll be sad, you may
- choose to
+ © Copyright, 2024, diyspire.com • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.com. Although we'll be sad, you may choose to
unsubscribe. We understand, but we'll be sad.
diff --git a/server/src/template/index.html b/server/src/template/index.html
index 1aade5d..b435453 100644
--- a/server/src/template/index.html
+++ b/server/src/template/index.html
@@ -271,8 +271,7 @@
www.example.com
- © Copyright, 2024, diyspire.online • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.online. Although we'll be sad, you may
- choose to
+ © Copyright, 2024, diyspire.com • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.com. Although we'll be sad, you may choose to
unsubscribe. We understand, but we'll be sad.