-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate entries to Supabase #466
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
return { success, todo } | ||
} | ||
|
||
function convert_entry(_entry: Partial<ActualDatabaseEntry> & Record<string, any>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
id: randomUUID(), | ||
} | ||
|
||
for (const [key, value] of Object.entries(_entry) as [keyof ActualDatabaseEntry, any][]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
if (_entry.sf) { | ||
const audio_id = randomUUID() | ||
// TODO: use speakerName | ||
// eslint-disable-next-line unused-imports/no-unused-vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused eslint-disable directive (no problems were reported from 'unused-imports/no-unused-vars').
// eslint-disable-next-line unused-imports/no-unused-vars | |
entry.lexeme = { default: _entry.lx } | ||
delete _entry.lx | ||
|
||
for (const [key, value] of Object.entries(_entry) as [keyof ActualDatabaseEntry, any][]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
return new Date(seconds * 1000).toISOString() | ||
} | ||
|
||
function isEmptyArray(value: any): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
return Array.isArray(value) && value.length === 0 | ||
} | ||
|
||
function isEmptyObject(value: any): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
test(convert_entry, { timeout: 16000 }, async () => { | ||
// const count = 266408 | ||
const count = 278631 // total entries | ||
const success: any[] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
// const count = 266408 | ||
const count = 278631 // total entries | ||
const success: any[] = [] | ||
const todo: any[] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
const success: any[] = [] | ||
const todo: any[] = [] | ||
|
||
const result: Promise<any[]> = new Promise<void>((resolve, reject) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
resolve(success) | ||
}) | ||
|
||
pipeline.on('error', (err: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
expect(specific_entries).toMatchFileSnapshot('convert-entries.specific.snap.json') | ||
}) | ||
|
||
function remove_seconds_underscore(entry: Partial<ActualDatabaseEntry> & Record<string, any>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
const admin_uid_if_no_owner = 'de2d3715-6337-45a3-a81a-d82c3210b2a7' // [email protected] | ||
const old_talking_dictionaries = '00000000-0000-0000-0000-000000000000' // TODO - decide what user to use or create one for attribution | ||
|
||
export function convert_entry(_entry: Partial<ActualDatabaseEntry> & Record<string, any>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected any. Specify a different type.
⚡️Lighthouse reportResults for https://living-dictionaries-oqg37rz5b-polylingual-development.vercel.app/ (see detailed report)
Results for https://living-dictionaries-oqg37rz5b-polylingual-development.vercel.app/achi/entries/list (see detailed report)
Results for https://living-dictionaries-oqg37rz5b-polylingual-development.vercel.app/jaRhn6MAZim4Blvr1iEv/entry/yt9ja7ymh9xgba5i (see detailed report)
|
No description provided.