Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/app/(ee)/api/events/export/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const GET = withWorkspace(
.parse(searchParams);

const { event, domain, interval, start, end, columns, key, folderId } =
parsedParams;
parsedParams as any; // TODO: xavier find a better fix for types

if (domain) {
await getDomainOrThrow({ workspace, domain });
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(ee)/api/events/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const GET = withWorkspace(
domain,
key,
folderId,
} = parsedParams;
} = parsedParams as any; // TODO: xavier find a better fix for types

let link: Link | null = null;

Expand Down
10 changes: 6 additions & 4 deletions apps/web/app/app.dub.co/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,25 @@ export default function LoginPage() {
<div className="mt-8">
<LoginForm />
</div>
<p className="mt-6 text-center text-sm font-medium text-neutral-500">

{/* Temp disable SignUp */}
{/* <p className="mt-6 text-center text-sm font-medium text-neutral-500">
Don't have an account?&nbsp;
<Link
href="register"
className="font-semibold text-neutral-700 transition-colors hover:text-neutral-900"
>
Sign up
</Link>
</p>
</p> */}

<div className="mt-12 w-full">
{/* <div className="mt-12 w-full">
<AuthAlternativeBanner
text="Looking for your Dub partner account?"
cta="Log in at partners.dub.co"
href="https://partners.dub.co/login"
/>
</div>
</div> */}
</div>
</AuthLayout>
);
Expand Down
17 changes: 11 additions & 6 deletions apps/web/app/app.dub.co/(auth)/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { AuthLayout } from "@/ui/layout/auth-layout";
import { APP_DOMAIN, constructMetadata } from "@dub/utils";
import RegisterPageClient from "./page-client";
import { redirect } from "next/navigation";
// import RegisterPageClient from "./page-client";

export const metadata = constructMetadata({
title: `Create your ${process.env.NEXT_PUBLIC_APP_NAME} account`,
canonicalUrl: `${APP_DOMAIN}/register`,
});

// export default function RegisterPage() {
// return (
// <AuthLayout showTerms="app">
// <RegisterPageClient />
// </AuthLayout>
// );
// }
// Redirect all access to /register to /login
export default function RegisterPage() {
return (
<AuthLayout showTerms="app">
<RegisterPageClient />
</AuthLayout>
);
redirect("/login");
}
2 changes: 1 addition & 1 deletion apps/web/lib/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class StorageClient {
accessKeyId: process.env.STORAGE_ACCESS_KEY_ID || "",
secretAccessKey: process.env.STORAGE_SECRET_ACCESS_KEY || "",
service: "s3",
region: "auto",
region: "eu-west-1",
});
}

Expand Down
3 changes: 3 additions & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const { withAxiom } = require("next-axiom");

/** @type {import('next').NextConfig} */
module.exports = withAxiom({
typescript: {
ignoreBuildErrors: true,
},
reactStrictMode: false,
transpilePackages: [
"shiki",
Expand Down
73 changes: 0 additions & 73 deletions apps/web/vercel.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react-email": "^2.1.6",
"lucide-react": "^0.462.0",
"resend": "^4.0.0",
"nodemailer": "^6.9.3"
"nodemailer": "^7.0.7"
},
"devDependencies": {
"typescript": "^5.4.4",
Expand Down
12 changes: 9 additions & 3 deletions packages/email/src/resend/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ export const RESEND_AUDIENCES = {
"partners.dub.co": "6caf6898-941a-45b6-a59f-d0780c3004ac",
};

const primary = process.env.RESEND_EMAIL_FROM_PRIMARY || "Dub.co <[email protected]>";
const notifications = process.env.RESEND_EMAIL_FROM_NOTIFICATIONS || "Dub.co <[email protected]>";
const marketing = process.env.RESEND_EMAIL_FROM_MARKETING || "Steven from Dub.co <[email protected]>";

export const VARIANT_TO_FROM_MAP = {
primary: "Dub.co <[email protected]>",
notifications: "Dub.co <[email protected]>",
marketing: "Steven from Dub.co <[email protected]>",
primary,
notifications,
marketing,
};

export const RESEND_REPLY_TO = process.env.RESEND_EMAIL_REPLY_TO || "[email protected]";
6 changes: 3 additions & 3 deletions packages/email/src/send-via-resend.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resend } from "./resend";
import { VARIANT_TO_FROM_MAP } from "./resend/constants";
import { VARIANT_TO_FROM_MAP, RESEND_REPLY_TO } from "./resend/constants";
import { ResendEmailOptions } from "./resend/types";

// Send email using Resend (Recommended for production)
Expand All @@ -16,7 +16,7 @@ export const sendEmailViaResend = async (opts: ResendEmailOptions) => {
from,
variant = "primary",
bcc,
replyTo,
replyTo = RESEND_REPLY_TO,
subject,
text,
react,
Expand All @@ -27,7 +27,7 @@ export const sendEmailViaResend = async (opts: ResendEmailOptions) => {
to: email,
from: from || VARIANT_TO_FROM_MAP[variant],
bcc: bcc,
replyTo: replyTo || "[email protected]",
replyTo,
subject,
text,
react,
Expand Down
2 changes: 2 additions & 0 deletions packages/prisma/schema/domain.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ model DefaultDomains {
ggllink Boolean @default(true)
figpage Boolean @default(true)
loooooooong Boolean @default(false)
fyicodeforafricaorg Boolean @default(true)
cfafyi Boolean @default(true)
projectId String @unique
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
}
18 changes: 18 additions & 0 deletions packages/tinybird/.tinyenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

VERSION=0.0.0



##########
# OPTIONAL env vars

# Don't print CLI version warning message if there's a new available version
# TB_VERSION_WARNING=0

# Skip regression tests
# TB_SKIP_REGRESSION=0

# Use `OBFUSCATE_REGEX_PATTERN` and `OBFUSCATE_PATTERN_SEPARATOR` environment variables to define a regex pattern and a separator (in case of a single string with multiple regex) to obfuscate secrets in the CLI output.
# OBFUSCATE_REGEX_PATTERN="https://(www\.)?[^/]+||^Follow these instructions =>"
# OBFUSCATE_PATTERN_SEPARATOR=||
##########
1 change: 1 addition & 0 deletions packages/tinybird/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tinybird-cli>=5,<6
21 changes: 21 additions & 0 deletions packages/tinybird/scripts/append_fixtures.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

#!/usr/bin/env bash
set -euxo pipefail

directory="datasources/fixtures"
extensions=("csv" "ndjson")

absolute_directory=$(realpath "$directory")

for extension in "${extensions[@]}"; do
file_list=$(find "$absolute_directory" -type f -name "*.$extension")

for file_path in $file_list; do
file_name=$(basename "$file_path")
file_name_without_extension="${file_name%.*}"

command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
echo $command
$command
done
done
58 changes: 58 additions & 0 deletions packages/tinybird/scripts/exec_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

#!/usr/bin/env bash
set -euxo pipefail

export TB_VERSION_WARNING=0

run_test() {
t=$1
echo "** Running $t **"
echo "** $(cat $t)"
tmpfile=$(mktemp)
retries=0
TOTAL_RETRIES=3

# When appending fixtures, we need to retry in case of the data is not replicated in time
while [ $retries -lt $TOTAL_RETRIES ]; do
# Run the test and store the output in a temporary file
bash $t $2 >$tmpfile
exit_code=$?
if [ "$exit_code" -eq 0 ]; then
# If the test passed, break the loop
if diff -B ${t}.result $tmpfile >/dev/null 2>&1; then
break
# If the test failed, increment the retries counter and try again
else
retries=$((retries+1))
fi
# If the bash command failed, print an error message and break the loop
else
break
fi
done

if diff -B ${t}.result $tmpfile >/dev/null 2>&1; then
echo "✅ Test $t passed"
rm $tmpfile
return 0
elif [ $retries -eq $TOTAL_RETRIES ]; then
echo "🚨 ERROR: Test $t failed, diff:";
diff -B ${t}.result $tmpfile
rm $tmpfile
return 1
else
echo "🚨 ERROR: Test $t failed with bash command exit code $?"
cat $tmpfile
rm $tmpfile
return 1
fi
echo ""
}
export -f run_test

fail=0
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1

if [ $fail == 1 ]; then
exit -1;
fi
Loading