Fix build errors and add package-lock.json

- Fix Prisma Json type compatibility for metadata fields
- Fix Set iteration for ES5 target in parser
- Add package-lock.json from npm install

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-14 01:31:11 +00:00
parent f6e3518a7a
commit 6bfea8bd0f
4 changed files with 6724 additions and 4 deletions

6720
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -87,7 +87,7 @@ export async function POST(
cost: raw.cost, cost: raw.cost,
status: raw.status, status: raw.status,
externalUrl: raw.externalUrl, externalUrl: raw.externalUrl,
metadata: raw.metadata, metadata: raw.metadata as any ?? undefined,
}, },
}) })
updated++ updated++
@ -124,7 +124,7 @@ export async function POST(
cost: raw.cost, cost: raw.cost,
status: raw.status, status: raw.status,
visibility: raw.visibility, visibility: raw.visibility,
metadata: raw.metadata, metadata: raw.metadata as any ?? undefined,
createdById: auth.user.id, createdById: auth.user.id,
spaceSlug: source.spaceSlug, spaceSlug: source.spaceSlug,
}, },

View File

@ -204,7 +204,7 @@ function inferCategory(text: string): string {
function extractTags(text: string): string[] { function extractTags(text: string): string[] {
const hashTags = text.match(/#(\w+)/g)?.map(t => t.slice(1)) || [] const hashTags = text.match(/#(\w+)/g)?.map(t => t.slice(1)) || []
return [...new Set(hashTags)].slice(0, 10) return Array.from(new Set(hashTags)).slice(0, 10)
} }
function extractOrganizer(text: string): string { function extractOrganizer(text: string): string {

View File

@ -28,7 +28,7 @@ export interface RawEvent {
cost: string cost: string
status: string status: string
visibility: string visibility: string
metadata: Record<string, unknown> | null metadata: Record<string, string | number | boolean> | null
} }
export interface SourceAdapter { export interface SourceAdapter {