Skip to content

Commit

Permalink
Ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Apr 13, 2024
1 parent 3bf8db3 commit 89db3ba
Show file tree
Hide file tree
Showing 39 changed files with 134 additions and 137 deletions.
12 changes: 6 additions & 6 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "next lint",
"format": "biome format --write .",
"start": "next start",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@baselime/node-opentelemetry": "^0.5.8",
Expand All @@ -26,7 +26,7 @@
"@midday/utils": "workspace:*",
"@novu/headless": "^0.24.1",
"@openstatus/react": "^0.0.3",
"@tanstack/react-table": "^8.15.3",
"@tanstack/react-table": "^8.16.0",
"@team-plain/typescript-sdk": "^3.9.0",
"@todesktop/client-active-win": "^0.15.0",
"@todesktop/client-core": "^1.2.5",
Expand All @@ -38,7 +38,7 @@
"@uidotdev/usehooks": "^2.4.1",
"@vercel/speed-insights": "^1.0.10",
"@zip.js/zip.js": "2.7.41",
"ai": "^3.0.21",
"ai": "^3.0.22",
"base64-arraybuffer": "^1.0.2",
"change-case": "^5.4.4",
"dub": "^0.22.2",
Expand All @@ -48,12 +48,12 @@
"loops": "1.0.1",
"lottie-react": "^2.4.0",
"ms": "^2.1.3",
"next": "14.2.0",
"next": "14.2.1",
"next-international": "1.2.4",
"next-safe-action": "6.2.0",
"next-themes": "^0.3.0",
"nuqs": "^1.17.1",
"openai": "^4.33.0",
"openai": "^4.33.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-dropzone": "^14.2.3",
Expand All @@ -62,7 +62,7 @@
"react-intersection-observer": "^9.8.2",
"react-pdf": "^7.7.1",
"react-plaid-link": "^3.5.1",
"recharts": "^2.12.4",
"recharts": "^2.12.5",
"resend": "^3.2.0",
"sharp": "^0.33.3",
"teller-connect-react": "^0.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const bulkUpdateTransactionsAction = action(
async (payload) => {
const supabase = createClient();
const user = await getUser();
const teamId = user.data.team_id;
const teamId = user?.data?.team_id;

const updatePromises = payload.data.map(async ({ id, ...params }) => {
return supabase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use server";

import { VisibilityState } from "@tanstack/react-table";
import type { VisibilityState } from "@tanstack/react-table";
import { cookies } from "next/headers";

type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const updateSimilarTransactionsAction = action(
async ({ id }) => {
const supabase = createClient();
const user = await getUser();
const teamId = user.data.team_id;
const teamId = user?.data?.team_id;

await updateSimilarTransactions(supabase, id);

Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/store/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface CommandState {
isOpen: boolean;
setOpen: (menu?: MenuOption) => void;
setMenu: (menu: MenuOption) => void;
selected: MenuOption;
selected?: MenuOption;
}

export const useCommandStore = create<CommandState>()((set) => ({
Expand Down
26 changes: 10 additions & 16 deletions apps/dashboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"extends": "@midday/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"plugins": [
{
"name": "next"
}
],
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": [".", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
"extends": "@midday/tsconfig/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "tailwind.config.ts"],
"exclude": ["node_modules"]
}
4 changes: 2 additions & 2 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint",
"format": "biome format --write .",
"start": "next start",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@logsnag/next": "^1.0.3",
Expand All @@ -24,7 +24,7 @@
"date-fns": "^3.6.0",
"framer-motion": "^11.0.28",
"geist": "^1.3.0",
"next": "14.2.0",
"next": "14.2.1",
"next-mdx-remote": "^4.4.1",
"next-safe-action": "^6.2.0",
"next-themes": "^0.3.0",
Expand Down
12 changes: 3 additions & 9 deletions apps/website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"extends": "@midday/tsconfig/base.json",
"extends": "@midday/tsconfig/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"plugins": [
{
"name": "next"
}
],
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}
},
"include": [".", ".next/types/**/*.ts"],
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "tailwind.config.ts"],
"exclude": ["node_modules"]
}
Binary file modified bun.lockb
Binary file not shown.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"workspaces": [
"packages/*",
"apps/*",
"tooling/*",
"packages/email/*"
],
"scripts": {
Expand All @@ -21,7 +20,7 @@
"jobs:dashboard": "turbo jobs --filter=@midday/dashboard",
"format": "biome format --write .",
"lint": "turbo lint && manypkg check",
"check:types": "turbo typecheck"
"typecheck": "turbo typecheck"
},
"dependencies": {
"@biomejs/biome": "1.6.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome format --write .",
"check:types": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"dev": "email dev -p 3003",
"build": "email build",
"start": "email start"
Expand Down
19 changes: 10 additions & 9 deletions packages/email/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@midday/ui/*": ["../ui/src/*"]
},
"extends": "@midday/tsconfig/react-library.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@midday/ui/*": ["../ui/src/*"]
}
}

},
"include": ["."],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome --write .",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@logsnag/next": "^1.0.3"
Expand Down
1 change: 1 addition & 0 deletions packages/events/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface TrackOptions {
description?: string;
user_id?: string;
icon?: string;
tags?: Record<string, string | number | boolean>;
}

export const setupLogSnag = async (options: Props) => {
Expand Down
5 changes: 5 additions & 0 deletions packages/events/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@midday/tsconfig/nextjs.json",
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome format --write .",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@google-cloud/documentai": "^8.2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/jobs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"]
}
"extends": "@midday/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/kv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome format --write .",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@upstash/redis": "^1.29.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/kv/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"]
}
"extends": "@midday/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/location/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome --write .",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"typescript": "^5.4.4"
Expand Down
8 changes: 4 additions & 4 deletions packages/location/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"]
}
"extends": "@midday/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/notification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome format --write .",
"check:types": "tsc --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@novu/node": "^0.24.1"
Expand Down
8 changes: 4 additions & 4 deletions packages/notification/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"]
}
"extends": "@midday/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome format --write .",
"check:types": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"test": "bun test src"
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/providers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"]
}
"extends": "@midday/tsconfig/nextjs.json",
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/supabase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome format --write .",
"check:types": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"login": "supabase login",
"db:generate": "supabase gen types typescript --project-id pytddvqiozwrhfbwqazp --schema public > src/types/db.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/supabase/src/client/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type CreateClientOptions = {
schema?: string;
};

export const createClient = (options: CreateClientOptions) => {
export const createClient = (options?: CreateClientOptions) => {
const cookieStore = cookies();

const schema = options?.schema ?? "public";
Expand Down
7 changes: 4 additions & 3 deletions packages/supabase/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "*.ts"]
}
"extends": "@midday/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules"]
}
18 changes: 18 additions & 0 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"esModuleInterop": true,
"incremental": false,
"isolatedModules": true,
"lib": ["es2022", "DOM", "DOM.Iterable"],
"module": "NodeNext",
"moduleDetection": "force",
"moduleResolution": "NodeNext",
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2022"
}
}
13 changes: 13 additions & 0 deletions packages/tsconfig/nextjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"module": "ESNext",
"moduleResolution": "Bundler",
"allowJs": true,
"jsx": "preserve",
"noEmit": true
}
}
File renamed without changes.
Loading

0 comments on commit 89db3ba

Please sign in to comment.