Oreki
Oreki
Explore posts from servers
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
i don't really think nitro would have a db key in context?
22 replies
XXata
Created by Oreki on 7/29/2024 in #general
is there currently a way, while creating
Yeah that'd be the best, I was thinking if I could reduce the amount of columns somehow but that's not possible
12 replies
XXata
Created by Oreki on 7/29/2024 in #general
is there currently a way, while creating
Ahh so only way to pass in custom creation date is when you create using raw SQL query
12 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
Also this randomly still appears for me
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
so unless nitro does something with the variables, this should work
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
that is how'd you declare normally when using cloudflare workers
22 replies
XXata
Created by Oreki on 7/29/2024 in #general
is there currently a way, while creating
what type is xata.createdAt?
`UPDATE posts SET "xata.createdAt" = '${new Date(post.isoDate || post.pubDate || new Date()).toISOString()}' WHERE id = '${inserted.id}'`,
`UPDATE posts SET "xata.createdAt" = '${new Date(post.isoDate || post.pubDate || new Date()).toISOString()}' WHERE id = '${inserted.id}'`,
this seems to be throwing an error
12 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
i am new to nuxt/vue as well so not sure
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
that is what i believe lol
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
if you have src set in nuxt config then it has to go inside src yes
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
this basically worked for me
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
// env.d.ts

import { CfProperties, Request, ExecutionContext } from '@cloudflare/workers-types';

declare module 'h3' {
interface H3EventContext {
cf: CfProperties,
cloudflare: {
request: Request,
env: Record<string, string>,
context: ExecutionContext,
};
}
}
// env.d.ts

import { CfProperties, Request, ExecutionContext } from '@cloudflare/workers-types';

declare module 'h3' {
interface H3EventContext {
cf: CfProperties,
cloudflare: {
request: Request,
env: Record<string, string>,
context: ExecutionContext,
};
}
}
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
Mine's not public, but here's how the structure looks like
apps/
website/
nuxt.config.ts
(...)
src/
types/
env.d.ts
(...)
apps/
website/
nuxt.config.ts
(...)
src/
types/
env.d.ts
(...)
22 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
this went away for me once i created a types folder and added env.d.ts
22 replies
XXata
Created by Oreki on 7/29/2024 in #general
is there currently a way, while creating
Alright thank you, i'll just update them after inserting with client
12 replies
XXata
Created by Oreki on 7/29/2024 in #general
is there currently a way, while creating
So i cannot edit them during creation but once i have created, i can edit using raw sql?
12 replies
NNuxt
Created by KWAC on 7/28/2024 in #❓・help
nuxt 3 + cloudfare D1 problems with env.d.ts file
if i call my route directly, it returns data successfully, no idea why this would fail
22 replies