Compare commits
2 Commits
fix/neon-d
...
v1.5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
927cb1a934 | ||
|
|
579a2f96e5 |
@@ -203,7 +203,7 @@ export const SinglePlayerClient = () => {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
className="hover:text-foreground/80 font-semibold transition-colors"
|
className="hover:text-foreground/80 font-semibold transition-colors"
|
||||||
>
|
>
|
||||||
community plan
|
early adopter plan
|
||||||
</Link>{' '}
|
</Link>{' '}
|
||||||
for exclusive features, including the ability to collaborate with multiple signers.
|
for exclusive features, including the ability to collaborate with multiple signers.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const Callout = ({ starCount }: CalloutProps) => {
|
|||||||
className="rounded-full bg-transparent backdrop-blur-sm"
|
className="rounded-full bg-transparent backdrop-blur-sm"
|
||||||
onClick={onSignUpClick}
|
onClick={onSignUpClick}
|
||||||
>
|
>
|
||||||
Claim Community Plan
|
Claim Early Adopter Plan
|
||||||
<span className="bg-primary dark:text-background -mr-2.5 ml-2.5 rounded-full px-2 py-1.5 text-xs font-medium">
|
<span className="bg-primary dark:text-background -mr-2.5 ml-2.5 rounded-full px-2 py-1.5 text-xs font-medium">
|
||||||
$30/mo
|
$30/mo
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export const Hero = ({ className, ...props }: HeroProps) => {
|
|||||||
className="rounded-full bg-transparent backdrop-blur-sm"
|
className="rounded-full bg-transparent backdrop-blur-sm"
|
||||||
onClick={onSignUpClick}
|
onClick={onSignUpClick}
|
||||||
>
|
>
|
||||||
Claim Community Plan
|
Claim Early Adopter Plan
|
||||||
<span className="bg-primary dark:text-background -mr-2.5 ml-2.5 rounded-full px-2 py-1.5 text-xs font-medium">
|
<span className="bg-primary dark:text-background -mr-2.5 ml-2.5 rounded-full px-2 py-1.5 text-xs font-medium">
|
||||||
$30/mo
|
$30/mo
|
||||||
</span>
|
</span>
|
||||||
@@ -225,7 +225,8 @@ export const Hero = ({ className, ...props }: HeroProps) => {
|
|||||||
<span className="bg-primary text-black">
|
<span className="bg-primary text-black">
|
||||||
(in a non-legally binding, but heartfelt way)
|
(in a non-legally binding, but heartfelt way)
|
||||||
</span>{' '}
|
</span>{' '}
|
||||||
and lock in the community plan for forever, including everything we build this year.
|
and lock in the early adopter plan for forever, including everything we build this
|
||||||
|
year.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="flex h-24 items-center">
|
<div className="flex h-24 items-center">
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
data-plan="community"
|
data-plan="early-adopter"
|
||||||
className="border-primary bg-background shadow-foreground/5 flex flex-col items-center justify-center rounded-lg border-2 px-8 py-12 shadow-[0px_0px_0px_4px_#E3E3E380]"
|
className="border-primary bg-background shadow-foreground/5 flex flex-col items-center justify-center rounded-lg border-2 px-8 py-12 shadow-[0px_0px_0px_4px_#E3E3E380]"
|
||||||
>
|
>
|
||||||
<p className="text-foreground text-4xl font-medium">Early Adopters</p>
|
<p className="text-foreground text-4xl font-medium">Early Adopters</p>
|
||||||
@@ -119,7 +119,7 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
|
|||||||
|
|
||||||
<Button className="mt-6 rounded-full text-base" asChild>
|
<Button className="mt-6 rounded-full text-base" asChild>
|
||||||
<Link
|
<Link
|
||||||
href={`${NEXT_PUBLIC_WEBAPP_URL()}/signup?utm_source=pricing-community`}
|
href={`${NEXT_PUBLIC_WEBAPP_URL()}/signup?utm_source=pricing-early-adopter`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Signup Now
|
Signup Now
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => {
|
|||||||
className="bg-foreground/5 col-span-12 flex flex-col rounded-2xl p-6 lg:col-span-5"
|
className="bg-foreground/5 col-span-12 flex flex-col rounded-2xl p-6 lg:col-span-5"
|
||||||
onSubmit={handleSubmit(onFormSubmit)}
|
onSubmit={handleSubmit(onFormSubmit)}
|
||||||
>
|
>
|
||||||
<h3 className="text-xl font-semibold">Sign up to Community Plan</h3>
|
<h3 className="text-xl font-semibold">Sign up to Early Adopter Plan</h3>
|
||||||
<p className="text-muted-foreground mt-2 text-xs">
|
<p className="text-muted-foreground mt-2 text-xs">
|
||||||
with Timur Ercan & Lucas Smith from Documenso
|
with Timur Ercan & Lucas Smith from Documenso
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default async function TeamsSettingBillingPage({ params }: TeamsSettingsB
|
|||||||
<CardContent className="flex flex-row items-center justify-between p-4">
|
<CardContent className="flex flex-row items-center justify-between p-4">
|
||||||
<div className="flex flex-col text-sm">
|
<div className="flex flex-col text-sm">
|
||||||
<p className="text-foreground font-semibold">
|
<p className="text-foreground font-semibold">
|
||||||
Current plan: {teamSubscription ? 'Team' : 'Community Team'}
|
Current plan: {teamSubscription ? 'Team' : 'Early Adopter Team'}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p className="text-muted-foreground mt-0.5">
|
<p className="text-muted-foreground mt-0.5">
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ type TransferStripeSubscriptionOptions = {
|
|||||||
* Will create a new subscription for the new owner and cancel the old one.
|
* Will create a new subscription for the new owner and cancel the old one.
|
||||||
*
|
*
|
||||||
* Returns the subscription that should be associated with the team, null if
|
* Returns the subscription that should be associated with the team, null if
|
||||||
* no subscription is needed (for community plan).
|
* no subscription is needed (for early adopter plan).
|
||||||
*/
|
*/
|
||||||
export const transferTeamSubscription = async ({
|
export const transferTeamSubscription = async ({
|
||||||
user,
|
user,
|
||||||
|
|||||||
@@ -15,12 +15,10 @@ export const downloadPDF = async ({ documentData, fileName }: DownloadPDFProps)
|
|||||||
type: 'application/pdf',
|
type: 'application/pdf',
|
||||||
});
|
});
|
||||||
|
|
||||||
const [baseTitle] = fileName?.includes('.pdf')
|
const baseTitle = (fileName ?? 'document').replace(/\.pdf$/, '');
|
||||||
? fileName.split('.pdf')
|
|
||||||
: [fileName ?? 'document'];
|
|
||||||
|
|
||||||
downloadFile({
|
downloadFile({
|
||||||
filename: baseTitle,
|
filename: `${baseTitle}.pdf`,
|
||||||
data: blob,
|
data: blob,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ export const getDatabaseUrl = () => {
|
|||||||
process.env.NEXT_PRIVATE_DIRECT_DATABASE_URL = process.env.DATABASE_URL;
|
process.env.NEXT_PRIVATE_DIRECT_DATABASE_URL = process.env.DATABASE_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.DATABASE_URL_UNPOOLED) {
|
|
||||||
process.env.NEXT_PRIVATE_DIRECT_DATABASE_URL = process.env.DATABASE_URL_UNPOOLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.POSTGRES_PRISMA_URL) {
|
if (process.env.POSTGRES_PRISMA_URL) {
|
||||||
process.env.NEXT_PRIVATE_DATABASE_URL = process.env.POSTGRES_PRISMA_URL;
|
process.env.NEXT_PRIVATE_DATABASE_URL = process.env.POSTGRES_PRISMA_URL;
|
||||||
}
|
}
|
||||||
@@ -44,5 +40,18 @@ export const getDatabaseUrl = () => {
|
|||||||
process.env.NEXT_PRIVATE_DATABASE_URL = url.toString().replace('https://', 'postgres://');
|
process.env.NEXT_PRIVATE_DATABASE_URL = url.toString().replace('https://', 'postgres://');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Support for neon.tech (Neon Database)
|
||||||
|
if (url.hostname.endsWith('neon.tech')) {
|
||||||
|
const [projectId, ...rest] = url.hostname.split('.');
|
||||||
|
|
||||||
|
if (!projectId.endsWith('-pooler')) {
|
||||||
|
url.hostname = `${projectId}-pooler.${rest.join('.')}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
url.searchParams.set('pgbouncer', 'true');
|
||||||
|
|
||||||
|
process.env.NEXT_PRIVATE_DATABASE_URL = url.toString().replace('https://', 'postgres://');
|
||||||
|
}
|
||||||
|
|
||||||
return process.env.NEXT_PRIVATE_DATABASE_URL;
|
return process.env.NEXT_PRIVATE_DATABASE_URL;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
-- CreateTable
|
|
||||||
CREATE TABLE "DummyData" (
|
|
||||||
"id" TEXT NOT NULL,
|
|
||||||
"userId" INTEGER NOT NULL,
|
|
||||||
"hello" TEXT,
|
|
||||||
|
|
||||||
CONSTRAINT "DummyData_pkey" PRIMARY KEY ("id")
|
|
||||||
);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE "DummyData" ADD CONSTRAINT "DummyData_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
@@ -52,19 +52,10 @@ model User {
|
|||||||
securityAuditLogs UserSecurityAuditLog[]
|
securityAuditLogs UserSecurityAuditLog[]
|
||||||
Webhooks Webhook[]
|
Webhooks Webhook[]
|
||||||
siteSettings SiteSettings[]
|
siteSettings SiteSettings[]
|
||||||
dummyData DummyData[]
|
|
||||||
|
|
||||||
@@index([email])
|
@@index([email])
|
||||||
}
|
}
|
||||||
|
|
||||||
model DummyData {
|
|
||||||
id String @id @default(cuid())
|
|
||||||
userId Int
|
|
||||||
hello String?
|
|
||||||
|
|
||||||
User User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
||||||
}
|
|
||||||
|
|
||||||
model UserProfile {
|
model UserProfile {
|
||||||
id Int @id
|
id Int @id
|
||||||
bio String?
|
bio String?
|
||||||
|
|||||||
@@ -13,13 +13,7 @@ const seedDatabase = async () => {
|
|||||||
|
|
||||||
if ('seedDatabase' in mod && typeof mod.seedDatabase === 'function') {
|
if ('seedDatabase' in mod && typeof mod.seedDatabase === 'function') {
|
||||||
console.log(`[SEEDING]: ${file}`);
|
console.log(`[SEEDING]: ${file}`);
|
||||||
|
|
||||||
try {
|
|
||||||
await mod.seedDatabase();
|
await mod.seedDatabase();
|
||||||
} catch (e) {
|
|
||||||
console.log(`[SEEDING]: Seed failed for ${file}`);
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ set -eo pipefail
|
|||||||
# Get the directory of this script, regardless of where it is called from.
|
# Get the directory of this script, regardless of where it is called from.
|
||||||
SCRIPT_DIR="$(readlink -f "$(dirname "$0")")"
|
SCRIPT_DIR="$(readlink -f "$(dirname "$0")")"
|
||||||
|
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
echo "[VercelBuild]: $1"
|
echo "[VercelBuild]: $1"
|
||||||
}
|
}
|
||||||
@@ -68,17 +69,19 @@ function remap_database_integration() {
|
|||||||
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$DATABASE_URL"
|
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$DATABASE_URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$DATABASE_URL_UNPOOLED" ]]; then
|
|
||||||
log "Remapping for Neon integration"
|
|
||||||
|
|
||||||
export NEXT_PRIVATE_DATABASE_URL="$DATABASE_URL&pgbouncer=true"
|
|
||||||
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$DATABASE_URL_UNPOOLED"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -z "$POSTGRES_URL_NON_POOLING" ]]; then
|
if [[ ! -z "$POSTGRES_URL_NON_POOLING" ]]; then
|
||||||
export NEXT_PRIVATE_DATABASE_URL="$POSTGRES_URL?pgbouncer=true"
|
export NEXT_PRIVATE_DATABASE_URL="$POSTGRES_URL?pgbouncer=true"
|
||||||
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$POSTGRES_URL_NON_POOLING"
|
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$POSTGRES_URL_NON_POOLING"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$NEXT_PRIVATE_DATABASE_URL" == *"neon.tech"* ]]; then
|
||||||
|
log "Remapping for Neon integration"
|
||||||
|
|
||||||
|
PROJECT_ID="$(echo "$PGHOST" | cut -d'.' -f1)"
|
||||||
|
PGBOUNCER_HOST="$(echo "$PGHOST" | sed "s/${PROJECT_ID}/${PROJECT_ID}-pooler/")"
|
||||||
|
|
||||||
|
export NEXT_PRIVATE_DATABASE_URL="postgres://${PGUSER}:${PGPASSWORD}@${PGBOUNCER_HOST}/${PGDATABASE}?pgbouncer=true"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Navigate to the root of the project.
|
# Navigate to the root of the project.
|
||||||
|
|||||||
@@ -90,7 +90,6 @@
|
|||||||
"FONT_CAVEAT_URI",
|
"FONT_CAVEAT_URI",
|
||||||
"POSTGRES_URL",
|
"POSTGRES_URL",
|
||||||
"DATABASE_URL",
|
"DATABASE_URL",
|
||||||
"DATABASE_URL_UNPOOLED",
|
|
||||||
"POSTGRES_PRISMA_URL",
|
"POSTGRES_PRISMA_URL",
|
||||||
"POSTGRES_URL_NON_POOLING",
|
"POSTGRES_URL_NON_POOLING",
|
||||||
"E2E_TEST_AUTHENTICATE_USERNAME",
|
"E2E_TEST_AUTHENTICATE_USERNAME",
|
||||||
|
|||||||
Reference in New Issue
Block a user