feat: upgrade zero #1
@@ -21,7 +21,7 @@
|
|||||||
"@react-navigation/bottom-tabs": "^7.4.0",
|
"@react-navigation/bottom-tabs": "^7.4.0",
|
||||||
"@react-navigation/elements": "^2.6.3",
|
"@react-navigation/elements": "^2.6.3",
|
||||||
"@react-navigation/native": "^7.1.8",
|
"@react-navigation/native": "^7.1.8",
|
||||||
"@rocicorp/zero": "^0.23.2025090100",
|
"@rocicorp/zero": "^0.24.2025101500",
|
||||||
"better-auth": "^1.3.27",
|
"better-auth": "^1.3.27",
|
||||||
"drizzle-orm": "^0.44.6",
|
"drizzle-orm": "^0.44.6",
|
||||||
"expo": "~54.0.13",
|
"expo": "~54.0.13",
|
||||||
|
|||||||
2584
pnpm-lock.yaml
generated
2584
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -9,10 +9,10 @@
|
|||||||
"./db": "./src/db/index.ts"
|
"./db": "./src/db/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"drizzle-zero": "^0.14.3"
|
"drizzle-zero": "^0.15.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"generate:zero": "drizzle-zero generate -s ./src/db/schema/public.ts -o ./src/zero-schema.gen.ts -f && sed -i 's/enableLegacyQueries: true,/enableLegacyQueries: false,/g' src/zero-schema.gen.ts && sed -i 's/enableLegacyMutators: true,/enableLegacyMutators: false,/g' src/zero-schema.gen.ts",
|
"generate:zero": "drizzle-zero generate -s ./src/db/schema/public.ts -o ./src/zero-schema.gen.ts -f --disable-legacy-queries --disable-legacy-mutators",
|
||||||
"db:migrate": "drizzle-kit push"
|
"db:migrate": "drizzle-kit push"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
import type { Row } from "@rocicorp/zero";
|
import type { Row } from "@rocicorp/zero";
|
||||||
import { createBuilder } from "@rocicorp/zero";
|
import { createBuilder } from "@rocicorp/zero";
|
||||||
import type { DrizzleToZeroSchema, ZeroCustomType } from "drizzle-zero";
|
import type { CustomType } from "drizzle-zero";
|
||||||
import type * as drizzleSchema from "./db/schema/public";
|
import type * as drizzleSchema from "./db/schema/public";
|
||||||
|
|
||||||
type ZeroSchema = DrizzleToZeroSchema<typeof drizzleSchema>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Zero schema object.
|
* The Zero schema object.
|
||||||
* This type is auto-generated from your Drizzle schema definition.
|
* This type is auto-generated from your Drizzle schema definition.
|
||||||
@@ -27,8 +25,8 @@ export const schema = {
|
|||||||
id: {
|
id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"id"
|
"id"
|
||||||
>,
|
>,
|
||||||
@@ -36,8 +34,8 @@ export const schema = {
|
|||||||
user_id: {
|
user_id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"user_id"
|
"user_id"
|
||||||
>,
|
>,
|
||||||
@@ -46,8 +44,8 @@ export const schema = {
|
|||||||
plaid_id: {
|
plaid_id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"plaid_id"
|
"plaid_id"
|
||||||
>,
|
>,
|
||||||
@@ -56,8 +54,8 @@ export const schema = {
|
|||||||
avaliable: {
|
avaliable: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"avaliable"
|
"avaliable"
|
||||||
>,
|
>,
|
||||||
@@ -65,8 +63,8 @@ export const schema = {
|
|||||||
current: {
|
current: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"current"
|
"current"
|
||||||
>,
|
>,
|
||||||
@@ -74,8 +72,8 @@ export const schema = {
|
|||||||
name: {
|
name: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"name"
|
"name"
|
||||||
>,
|
>,
|
||||||
@@ -83,8 +81,8 @@ export const schema = {
|
|||||||
createdAt: {
|
createdAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"createdAt"
|
"createdAt"
|
||||||
>,
|
>,
|
||||||
@@ -93,8 +91,8 @@ export const schema = {
|
|||||||
updatedAt: {
|
updatedAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"balance",
|
"balance",
|
||||||
"updatedAt"
|
"updatedAt"
|
||||||
>,
|
>,
|
||||||
@@ -109,8 +107,8 @@ export const schema = {
|
|||||||
id: {
|
id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"plaidLink",
|
"plaidLink",
|
||||||
"id"
|
"id"
|
||||||
>,
|
>,
|
||||||
@@ -118,8 +116,8 @@ export const schema = {
|
|||||||
user_id: {
|
user_id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"plaidLink",
|
"plaidLink",
|
||||||
"user_id"
|
"user_id"
|
||||||
>,
|
>,
|
||||||
@@ -127,8 +125,8 @@ export const schema = {
|
|||||||
link: {
|
link: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"plaidLink",
|
"plaidLink",
|
||||||
"link"
|
"link"
|
||||||
>,
|
>,
|
||||||
@@ -136,8 +134,8 @@ export const schema = {
|
|||||||
token: {
|
token: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"plaidLink",
|
"plaidLink",
|
||||||
"token"
|
"token"
|
||||||
>,
|
>,
|
||||||
@@ -145,8 +143,8 @@ export const schema = {
|
|||||||
createdAt: {
|
createdAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"plaidLink",
|
"plaidLink",
|
||||||
"createdAt"
|
"createdAt"
|
||||||
>,
|
>,
|
||||||
@@ -161,8 +159,8 @@ export const schema = {
|
|||||||
id: {
|
id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"id"
|
"id"
|
||||||
>,
|
>,
|
||||||
@@ -170,8 +168,8 @@ export const schema = {
|
|||||||
user_id: {
|
user_id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"user_id"
|
"user_id"
|
||||||
>,
|
>,
|
||||||
@@ -179,8 +177,8 @@ export const schema = {
|
|||||||
plaid_id: {
|
plaid_id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"plaid_id"
|
"plaid_id"
|
||||||
>,
|
>,
|
||||||
@@ -188,8 +186,8 @@ export const schema = {
|
|||||||
account_id: {
|
account_id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"account_id"
|
"account_id"
|
||||||
>,
|
>,
|
||||||
@@ -197,8 +195,8 @@ export const schema = {
|
|||||||
name: {
|
name: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"name"
|
"name"
|
||||||
>,
|
>,
|
||||||
@@ -206,8 +204,8 @@ export const schema = {
|
|||||||
amount: {
|
amount: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"amount"
|
"amount"
|
||||||
>,
|
>,
|
||||||
@@ -215,8 +213,8 @@ export const schema = {
|
|||||||
datetime: {
|
datetime: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"datetime"
|
"datetime"
|
||||||
>,
|
>,
|
||||||
@@ -224,8 +222,8 @@ export const schema = {
|
|||||||
authorized_datetime: {
|
authorized_datetime: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"authorized_datetime"
|
"authorized_datetime"
|
||||||
>,
|
>,
|
||||||
@@ -233,8 +231,8 @@ export const schema = {
|
|||||||
json: {
|
json: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"json"
|
"json"
|
||||||
>,
|
>,
|
||||||
@@ -242,8 +240,8 @@ export const schema = {
|
|||||||
createdAt: {
|
createdAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"createdAt"
|
"createdAt"
|
||||||
>,
|
>,
|
||||||
@@ -252,8 +250,8 @@ export const schema = {
|
|||||||
updatedAt: {
|
updatedAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"transaction",
|
"transaction",
|
||||||
"updatedAt"
|
"updatedAt"
|
||||||
>,
|
>,
|
||||||
@@ -268,8 +266,8 @@ export const schema = {
|
|||||||
id: {
|
id: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"id"
|
"id"
|
||||||
>,
|
>,
|
||||||
@@ -277,8 +275,8 @@ export const schema = {
|
|||||||
name: {
|
name: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"name"
|
"name"
|
||||||
>,
|
>,
|
||||||
@@ -286,8 +284,8 @@ export const schema = {
|
|||||||
email: {
|
email: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"email"
|
"email"
|
||||||
>,
|
>,
|
||||||
@@ -295,8 +293,8 @@ export const schema = {
|
|||||||
emailVerified: {
|
emailVerified: {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"emailVerified"
|
"emailVerified"
|
||||||
>,
|
>,
|
||||||
@@ -305,8 +303,8 @@ export const schema = {
|
|||||||
image: {
|
image: {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"image"
|
"image"
|
||||||
>,
|
>,
|
||||||
@@ -314,8 +312,8 @@ export const schema = {
|
|||||||
createdAt: {
|
createdAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"createdAt"
|
"createdAt"
|
||||||
>,
|
>,
|
||||||
@@ -324,8 +322,8 @@ export const schema = {
|
|||||||
updatedAt: {
|
updatedAt: {
|
||||||
type: "number",
|
type: "number",
|
||||||
optional: true,
|
optional: true,
|
||||||
customType: null as unknown as ZeroCustomType<
|
customType: null as unknown as CustomType<
|
||||||
ZeroSchema,
|
typeof drizzleSchema,
|
||||||
"users",
|
"users",
|
||||||
"updatedAt"
|
"updatedAt"
|
||||||
>,
|
>,
|
||||||
|
|||||||
Reference in New Issue
Block a user