From 9be450dfcfdb1329740956960cd0ab084b384cc0 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Tue, 16 Jul 2024 12:43:35 +0200 Subject: [PATCH 01/20] open alex data import script --- openalex-importer/.gitignore | 16 + openalex-importer/index.ts | 150 +++ openalex-importer/nodemon.json | 12 + openalex-importer/package.json | 25 + openalex-importer/tsconfig.json | 44 + openalex-importer/types/index.ts | 2 + openalex-importer/types/institutions.ts | 226 +++++ openalex-importer/types/works.ts | 157 ++++ openalex-importer/yarn.lock | 1150 +++++++++++++++++++++++ 9 files changed, 1782 insertions(+) create mode 100644 openalex-importer/.gitignore create mode 100644 openalex-importer/index.ts create mode 100644 openalex-importer/nodemon.json create mode 100644 openalex-importer/package.json create mode 100755 openalex-importer/tsconfig.json create mode 100644 openalex-importer/types/index.ts create mode 100644 openalex-importer/types/institutions.ts create mode 100644 openalex-importer/types/works.ts create mode 100644 openalex-importer/yarn.lock diff --git a/openalex-importer/.gitignore b/openalex-importer/.gitignore new file mode 100644 index 000000000..13d8cfa39 --- /dev/null +++ b/openalex-importer/.gitignore @@ -0,0 +1,16 @@ +node_modules +# Keep environment variables out of version control +.env +database/boilerplate/ +database/test/ +dist +.nebulus +log/access.log + +temp_downloads +.nyc_output +coverage + +server.log + +repo-tmp \ No newline at end of file diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts new file mode 100644 index 000000000..3479ce56d --- /dev/null +++ b/openalex-importer/index.ts @@ -0,0 +1,150 @@ +import { Work, Institution } from "./types/index.js"; +console.log("works"); + +const OPEN_ALEX_API = "https://api.openalex.org/"; + +type ApiResponse = { + meta: { + count: number; + db_response_time_ms: number; + page: number; + per_page: number; + next_cursor: string | undefined; + groups_count: number | null; + }; + results: T; +}; + +type Query = { + filter?: FilterParam; + "per-page"?: number; + cursor: string | undefined; +}; + +type FilterParam = { + from_publication_date?: string; + to_publication_date?: string; + from_created_date?: string; + from_updated_date?: string; + to_created_date?: string; + to_updated_date?: string; + has_ror?: boolean; +}; + +// const result = await fetch( +// `${OPEN_ALEX_API}/works?filter=from_publication_date:2024-07-16,to_publication_date:2024-07-16&per-page=200&cursor=*`, +// { +// headers: { +// Accept: "*/*", +// "content-type": "application/json", +// }, +// } +// ); +async function importWorks(): Promise { + try { + const url = `${OPEN_ALEX_API}/works`; + const works = await performFetch(url, { + filter: { + from_publication_date: "2024-07-16", + to_publication_date: "2024-07-16", + }, + "per-page": 200, + cursor: "*", + }); + console.log("RESPONSE: ", works.length); + return works; + } catch (err) { + console.log("ERROR::", err); + return null; + } +} + +async function importInstitutions(): Promise { + try { + const url = `${OPEN_ALEX_API}/institutions`; + const institutions = await performFetch(url, { + filter: { + has_ror: true, + }, + "per-page": 200, + cursor: "*", + }); + // console.log("RESPONSE: ", institutions); + return institutions; + } catch (err) { + console.log("ERROR::", err); + return null; + } +} + +async function performFetch(url: string, searchQuery: Query): Promise { + let data = []; + + const getFilter = (param: FilterParam) => { + const filter = Object.entries(param).reduce( + (queryStr, [key, value]) => + queryStr ? `${queryStr},${key}:${value}` : `${key}:${value}`, + "" + ); + return filter; + }; + + let cursor = searchQuery.cursor || true; + + while (cursor) { + let query = Object.entries(searchQuery).reduce((queryStr, [key, value]) => { + if (key === "filter") { + const filter = `filter=${getFilter(value as FilterParam)}`; + return queryStr ? `${queryStr}&${filter}` : filter; + } + + const param = `${key}=${value}`; + return queryStr ? `${queryStr}&${param}` : param; + }, ""); + + // console.log("QUERY: ", query); + const request = new Request(`${url}?${query}`, { + headers: { "API-KEY": "" }, + }); + const response = (await fetch(request)) as Response; + + if (response.ok && response.status === 200) { + // console.log("Api success: ", response.status, response.statusText); + + if (response.headers.get("content-type")?.includes("application/json")) { + const apiRes = (await response.json()) as ApiResponse; + data = data.concat(...(apiRes.results as any[])); + // console.log( + // "NEXT CURSOR: ", + // apiRes.meta.next_cursor, + // !!apiRes.meta.next_cursor + // ); + cursor = !!apiRes.meta?.next_cursor; + searchQuery.cursor = apiRes.meta.next_cursor; + // return data; + } else { + break; + } + } else { + // logger.info({ body: await response.text() }, 'ERROR RESPONSE'); + console.log("Api error: ", response.status, response.statusText); + // data = null; + break; + } + } + + return data as T; +} + +async function main() { + const works = await importWorks(); + // const institutions = await importInstitutions(); + // const concepts = await importConcepts(); + // const authors = await importAuthors(); + // const sources = await importSources(); + return works; +} + +main() + .then((done) => console.log("Import script done: ", done?.length)) + .catch((err) => console.log("ERROR: data import crashed due to: ", err)); diff --git a/openalex-importer/nodemon.json b/openalex-importer/nodemon.json new file mode 100644 index 000000000..b45b6d059 --- /dev/null +++ b/openalex-importer/nodemon.json @@ -0,0 +1,12 @@ +{ + "watch": [ + "." + ], + "ext": ".ts,.js,*", + "ignore": [ + "log/server.log" + ], + "verbose": true, + "exec": "node -r ts-node/register", + "delay": 300 +} \ No newline at end of file diff --git a/openalex-importer/package.json b/openalex-importer/package.json new file mode 100644 index 000000000..7743fc20c --- /dev/null +++ b/openalex-importer/package.json @@ -0,0 +1,25 @@ +{ + "name": "openalex-importer", + "version": "1.0.0", + "main": "index.js", + "type": "module", + "engines": { + "node": ">=16.14" + }, + "scripts": { + "dev": "npm-run-all --parallel watch-compile watch-dev", + "watch-dev": "debug=* nodemon --watch \"dist/**/*\" -e js ./dist/index.js", + "watch-compile": "debug=* tsc -w --preserveWatchOutput", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "nodemon": "^3.0.2", + "npm-run-all": "^4.1.5", + "ts-node": "10.9.1", + "typescript": "5.1.6" + } +} \ No newline at end of file diff --git a/openalex-importer/tsconfig.json b/openalex-importer/tsconfig.json new file mode 100755 index 000000000..470c1cc64 --- /dev/null +++ b/openalex-importer/tsconfig.json @@ -0,0 +1,44 @@ +{ + "compilerOptions": { + "module": "nodenext", + /** + * Implied by "module: nodenext": + * "moduleResolution": "nodenext", + * "esModuleInterop": true, + */ + "target": "esnext", + // Recommended by docs, but a lot of errors + // "verbatimModuleSyntax": true, + "lib": [ + "esnext", + "dom" + ], + "outDir": "./dist", + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "resolveJsonModule": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + // dagConcat.cjs requires this + "allowJs": true, + "inlineSourceMap": true, + "paths": { + // Overrides a built-in Response type + "express": [ + "./src/types/express" + ] + }, + "strictNullChecks": true, + "exactOptionalPropertyTypes": true + }, + "include": [ + "./src/**/*.ts", + "*.ts", + ], + "exclude": [ + "test/**/*.ts" + ], + "compileOnSave": true +} \ No newline at end of file diff --git a/openalex-importer/types/index.ts b/openalex-importer/types/index.ts new file mode 100644 index 000000000..9766b7245 --- /dev/null +++ b/openalex-importer/types/index.ts @@ -0,0 +1,2 @@ +export * from "./works.js"; +export * from "./institutions.js"; diff --git a/openalex-importer/types/institutions.ts b/openalex-importer/types/institutions.ts new file mode 100644 index 000000000..7158ba597 --- /dev/null +++ b/openalex-importer/types/institutions.ts @@ -0,0 +1,226 @@ +export interface Institution { + id: string; + ror: string; + display_name: string; + country_code: string; + type: string; + type_id: string; + lineage: string[]; + homepage_url: string; + image_url: string; + image_thumbnail_url: string; + display_name_acronyms: string[]; + display_name_alternatives: string[]; + repositories: Repository[]; + works_count: number; + cited_by_count: number; + summary_stats: SummaryStats; + ids: Ids; + geo: Geo; + international: International; + associated_institutions: AssociatedInstitution[]; + counts_by_year: CountsByYear[]; + roles: Role[]; + topics: Topic[]; + topic_share: TopicShare[]; + x_concepts: XConcept[]; + is_super_system: boolean; + works_api_url: string; + updated_date: string; + created_date: string; +} + +export interface Repository { + id: string; + display_name: string; + host_organization: string; + host_organization_name: string; + host_organization_lineage: string[]; +} + +export interface SummaryStats { + "2yr_mean_citedness": number; + h_index: number; + i10_index: number; +} + +export interface Ids { + openalex: string; + ror: string; + mag: string; + grid: string; + wikipedia: string; + wikidata: string; +} + +export interface Geo { + city: string; + geonames_city_id: string; + region: any; + country_code: string; + country: string; + latitude: number; + longitude: number; +} + +export interface International { + display_name: DisplayName; +} + +export interface DisplayName { + ar: string; + arz: string; + ast: string; + az: string; + azb: string; + ba: string; + be: string; + "be-tarask": string; + bg: string; + bn: string; + br: string; + ca: string; + ckb: string; + crh: string; + "crh-latn": string; + cs: string; + cy: string; + da: string; + de: string; + el: string; + en: string; + "en-gb": string; + eo: string; + es: string; + et: string; + eu: string; + fa: string; + fi: string; + fr: string; + ga: string; + gd: string; + gl: string; + gv: string; + he: string; + hu: string; + hy: string; + hyw: string; + id: string; + io: string; + is: string; + it: string; + ja: string; + jv: string; + ka: string; + ko: string; + kw: string; + ky: string; + la: string; + lb: string; + lt: string; + lv: string; + mk: string; + ml: string; + mr: string; + ms: string; + mt: string; + nb: string; + nl: string; + nn: string; + pa: string; + pap: string; + pl: string; + pms: string; + pnb: string; + pt: string; + ro: string; + ru: string; + rw: string; + sh: string; + sl: string; + sr: string; + sv: string; + ta: string; + tg: string; + th: string; + tl: string; + tr: string; + tt: string; + ug: string; + uk: string; + ur: string; + vi: string; + war: string; + wuu: string; + xmf: string; + yue: string; + zh: string; + "zh-cn": string; + "zh-hans": string; + "zh-hant": string; + "zh-hk": string; + "zh-sg": string; + "zh-tw": string; +} + +export interface AssociatedInstitution { + id: string; + ror: string; + display_name: string; + country_code: string; + type: string; + relationship: string; +} + +export interface CountsByYear { + year: number; + works_count: number; + cited_by_count: number; +} + +export interface Role { + role: string; + id: string; + works_count: number; +} + +export interface Topic { + id: string; + display_name: string; + count: number; + subfield: Subfield; + field: Field; + domain: Domain; +} + +export interface Subfield { + id: string; + display_name: string; +} + +export interface Field { + id: string; + display_name: string; +} + +export interface Domain { + id: string; + display_name: string; +} + +export interface TopicShare { + id: string; + display_name: string; + value: number; + subfield: Subfield; + field: Field; + domain: Domain; +} + +export interface XConcept { + id: string; + wikidata: string; + display_name: string; + level: number; + score: number; +} diff --git a/openalex-importer/types/works.ts b/openalex-importer/types/works.ts new file mode 100644 index 000000000..e5c840880 --- /dev/null +++ b/openalex-importer/types/works.ts @@ -0,0 +1,157 @@ +export interface Work { + id: string; + doi: string; + title: string; + display_name: string; + publication_year: number; + publication_date: string; + ids: Ids; + language: string; + primary_location: PrimaryLocation; + type: string; + type_crossref: string; + indexed_in: string[]; + open_access: OpenAccess; + authorships: Authorship[]; + countries_distinct_count: number; + institutions_distinct_count: number; + corresponding_author_ids: any[]; + corresponding_institution_ids: any[]; + apc_list: any; + apc_paid: any; + fwci: number; + has_fulltext: boolean; + fulltext_origin: string; + cited_by_count: number; + cited_by_percentile_year: CitedByPercentileYear; + biblio: Biblio; + is_retracted: boolean; + is_paratext: boolean; + primary_topic: any; + topics: any[]; + keywords: any[]; + concepts: Concept[]; + mesh: any[]; + locations_count: number; + locations: Location[]; + best_oa_location: BestOaLocation; + sustainable_development_goals: any[]; + grants: any[]; + datasets: any[]; + versions: any[]; + referenced_works_count: number; + referenced_works: any[]; + related_works: string[]; + ngrams_url: string; + abstract_inverted_index: any; + cited_by_api_url: string; + counts_by_year: CountsByYear[]; + updated_date: string; + created_date: string; +} + +interface Ids { + openalex: string; + doi: string; + mag: string; +} + +interface PrimaryLocation { + is_oa: boolean; + landing_page_url: string; + pdf_url: string; + source: Source; + license: string; + license_id: string; + version: string; + is_accepted: boolean; + is_published: boolean; +} + +interface Source { + id: string; + display_name: string; + issn_l: any; + issn: any; + is_oa: boolean; + is_in_doaj: boolean; + is_core: boolean; + host_organization: any; + host_organization_name: any; + host_organization_lineage: any[]; + host_organization_lineage_names: any[]; + type: string; +} + +interface OpenAccess { + is_oa: boolean; + oa_status: string; + oa_url: string; + any_repository_has_fulltext: boolean; +} + +interface Authorship { + author_position: string; + author: Author; + institutions: any[]; + countries: any[]; + is_corresponding: boolean; + raw_author_name: string; + raw_affiliation_strings: any[]; + affiliations: any[]; +} + +interface Author { + id: string; + display_name: string; + orcid?: string; +} + +interface CitedByPercentileYear { + min: number; + max: number; +} + +interface Biblio { + volume: any; + issue: any; + first_page: string; + last_page: string; +} + +interface Concept { + id: string; + wikidata: string; + display_name: string; + level: number; + score: number; +} + +interface Location { + is_oa: boolean; + landing_page_url: string; + pdf_url: string; + source: Source; + license: string; + license_id: string; + version: string; + is_accepted: boolean; + is_published: boolean; +} + +interface BestOaLocation { + is_oa: boolean; + landing_page_url: string; + pdf_url: string; + source: Source; + license: string; + license_id: string; + version: string; + is_accepted: boolean; + is_published: boolean; +} + +interface CountsByYear { + year: number; + cited_by_count: number; +} diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock new file mode 100644 index 000000000..ddc3585cb --- /dev/null +++ b/openalex-importer/yarn.lock @@ -0,0 +1,1150 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +acorn-walk@^8.1.1: + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.4.1: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +chalk@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar@^3.5.2: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +debug@^4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +globalthis@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== + dependencies: + define-properties "^1.2.1" + gopd "^1.0.1" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.2: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +ignore-by-default@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== + +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.13.0: + version "2.14.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.14.0.tgz#43b8ef9f46a6a08888db67b1ffd4ec9e3dfd59d1" + integrity sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A== + dependencies: + hasown "^2.0.2" + +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw== + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + +minimatch@^3.0.4, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +nodemon@^3.0.2: + version "3.1.4" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.4.tgz#c34dcd8eb46a05723ccde60cbdd25addcc8725e4" + integrity sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ== + dependencies: + chokidar "^3.5.2" + debug "^4" + ignore-by-default "^1.0.1" + minimatch "^3.1.2" + pstree.remy "^1.1.8" + semver "^7.5.3" + simple-update-notifier "^2.0.0" + supports-color "^5.5.0" + touch "^3.1.0" + undefsafe "^2.0.5" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-all@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" + integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== + dependencies: + ansi-styles "^3.2.1" + chalk "^2.4.1" + cross-spawn "^6.0.5" + memorystream "^0.3.1" + minimatch "^3.0.4" + pidtree "^0.3.0" + read-pkg "^3.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pidtree@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" + integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== + +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + +pstree.remy@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" + integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA== + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== + dependencies: + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" + +resolve@^1.10.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + +"semver@2 || 3 || 4 || 5", semver@^5.5.0: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + +semver@^7.5.3: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + +shell-quote@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + +side-channel@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +simple-update-notifier@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" + integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== + dependencies: + semver "^7.5.3" + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" + integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.18" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326" + integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== + +string.prototype.padend@^3.0.0: + version "3.1.6" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz#ba79cf8992609a91c872daa47c6bb144ee7f62a5" + integrity sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" + +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +supports-color@^5.3.0, supports-color@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +touch@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694" + integrity sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA== + +ts-node@10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + +typescript@5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" + integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +undefsafe@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" + integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-typed-array@^1.1.14, which-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== From f4353fd2388a79294d2829515def01d16fb04e45 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Tue, 16 Jul 2024 14:10:47 +0200 Subject: [PATCH 02/20] hide openalex folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9998940fb..8230f87d6 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ node-modules/ node_modules/* .idea .composedbRuntimeDefinition.json +openalex-importer \ No newline at end of file From c7552618198c20566c120ace51a1de5ad517ba4c Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Mon, 29 Jul 2024 11:02:57 +0100 Subject: [PATCH 03/20] realtime data import and transform into relational model --- openalex-importer/.gitignore | 5 +- openalex-importer/index.ts | 150 ---------------- openalex-importer/package.json | 8 +- openalex-importer/types/index.ts | 2 - openalex-importer/types/institutions.ts | 226 ------------------------ openalex-importer/types/works.ts | 157 ---------------- openalex-importer/yarn.lock | 27 +++ 7 files changed, 38 insertions(+), 537 deletions(-) delete mode 100644 openalex-importer/index.ts delete mode 100644 openalex-importer/types/index.ts delete mode 100644 openalex-importer/types/institutions.ts delete mode 100644 openalex-importer/types/works.ts diff --git a/openalex-importer/.gitignore b/openalex-importer/.gitignore index 13d8cfa39..fa981ce22 100644 --- a/openalex-importer/.gitignore +++ b/openalex-importer/.gitignore @@ -13,4 +13,7 @@ coverage server.log -repo-tmp \ No newline at end of file +repo-tmp + +postgres-data/ +logs/ \ No newline at end of file diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts deleted file mode 100644 index 3479ce56d..000000000 --- a/openalex-importer/index.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Work, Institution } from "./types/index.js"; -console.log("works"); - -const OPEN_ALEX_API = "https://api.openalex.org/"; - -type ApiResponse = { - meta: { - count: number; - db_response_time_ms: number; - page: number; - per_page: number; - next_cursor: string | undefined; - groups_count: number | null; - }; - results: T; -}; - -type Query = { - filter?: FilterParam; - "per-page"?: number; - cursor: string | undefined; -}; - -type FilterParam = { - from_publication_date?: string; - to_publication_date?: string; - from_created_date?: string; - from_updated_date?: string; - to_created_date?: string; - to_updated_date?: string; - has_ror?: boolean; -}; - -// const result = await fetch( -// `${OPEN_ALEX_API}/works?filter=from_publication_date:2024-07-16,to_publication_date:2024-07-16&per-page=200&cursor=*`, -// { -// headers: { -// Accept: "*/*", -// "content-type": "application/json", -// }, -// } -// ); -async function importWorks(): Promise { - try { - const url = `${OPEN_ALEX_API}/works`; - const works = await performFetch(url, { - filter: { - from_publication_date: "2024-07-16", - to_publication_date: "2024-07-16", - }, - "per-page": 200, - cursor: "*", - }); - console.log("RESPONSE: ", works.length); - return works; - } catch (err) { - console.log("ERROR::", err); - return null; - } -} - -async function importInstitutions(): Promise { - try { - const url = `${OPEN_ALEX_API}/institutions`; - const institutions = await performFetch(url, { - filter: { - has_ror: true, - }, - "per-page": 200, - cursor: "*", - }); - // console.log("RESPONSE: ", institutions); - return institutions; - } catch (err) { - console.log("ERROR::", err); - return null; - } -} - -async function performFetch(url: string, searchQuery: Query): Promise { - let data = []; - - const getFilter = (param: FilterParam) => { - const filter = Object.entries(param).reduce( - (queryStr, [key, value]) => - queryStr ? `${queryStr},${key}:${value}` : `${key}:${value}`, - "" - ); - return filter; - }; - - let cursor = searchQuery.cursor || true; - - while (cursor) { - let query = Object.entries(searchQuery).reduce((queryStr, [key, value]) => { - if (key === "filter") { - const filter = `filter=${getFilter(value as FilterParam)}`; - return queryStr ? `${queryStr}&${filter}` : filter; - } - - const param = `${key}=${value}`; - return queryStr ? `${queryStr}&${param}` : param; - }, ""); - - // console.log("QUERY: ", query); - const request = new Request(`${url}?${query}`, { - headers: { "API-KEY": "" }, - }); - const response = (await fetch(request)) as Response; - - if (response.ok && response.status === 200) { - // console.log("Api success: ", response.status, response.statusText); - - if (response.headers.get("content-type")?.includes("application/json")) { - const apiRes = (await response.json()) as ApiResponse; - data = data.concat(...(apiRes.results as any[])); - // console.log( - // "NEXT CURSOR: ", - // apiRes.meta.next_cursor, - // !!apiRes.meta.next_cursor - // ); - cursor = !!apiRes.meta?.next_cursor; - searchQuery.cursor = apiRes.meta.next_cursor; - // return data; - } else { - break; - } - } else { - // logger.info({ body: await response.text() }, 'ERROR RESPONSE'); - console.log("Api error: ", response.status, response.statusText); - // data = null; - break; - } - } - - return data as T; -} - -async function main() { - const works = await importWorks(); - // const institutions = await importInstitutions(); - // const concepts = await importConcepts(); - // const authors = await importAuthors(); - // const sources = await importSources(); - return works; -} - -main() - .then((done) => console.log("Import script done: ", done?.length)) - .catch((err) => console.log("ERROR: data import crashed due to: ", err)); diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 7743fc20c..df4a0adc6 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -17,9 +17,15 @@ "license": "ISC", "description": "", "devDependencies": { + "@types/node": "^20.14.12", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "ts-node": "10.9.1", "typescript": "5.1.6" + }, + "dependencies": { + "@prisma/client": "^5.17.0", + "@types/lodash": "^4.17.7", + "lodash": "^4.17.21" } -} \ No newline at end of file +} diff --git a/openalex-importer/types/index.ts b/openalex-importer/types/index.ts deleted file mode 100644 index 9766b7245..000000000 --- a/openalex-importer/types/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./works.js"; -export * from "./institutions.js"; diff --git a/openalex-importer/types/institutions.ts b/openalex-importer/types/institutions.ts deleted file mode 100644 index 7158ba597..000000000 --- a/openalex-importer/types/institutions.ts +++ /dev/null @@ -1,226 +0,0 @@ -export interface Institution { - id: string; - ror: string; - display_name: string; - country_code: string; - type: string; - type_id: string; - lineage: string[]; - homepage_url: string; - image_url: string; - image_thumbnail_url: string; - display_name_acronyms: string[]; - display_name_alternatives: string[]; - repositories: Repository[]; - works_count: number; - cited_by_count: number; - summary_stats: SummaryStats; - ids: Ids; - geo: Geo; - international: International; - associated_institutions: AssociatedInstitution[]; - counts_by_year: CountsByYear[]; - roles: Role[]; - topics: Topic[]; - topic_share: TopicShare[]; - x_concepts: XConcept[]; - is_super_system: boolean; - works_api_url: string; - updated_date: string; - created_date: string; -} - -export interface Repository { - id: string; - display_name: string; - host_organization: string; - host_organization_name: string; - host_organization_lineage: string[]; -} - -export interface SummaryStats { - "2yr_mean_citedness": number; - h_index: number; - i10_index: number; -} - -export interface Ids { - openalex: string; - ror: string; - mag: string; - grid: string; - wikipedia: string; - wikidata: string; -} - -export interface Geo { - city: string; - geonames_city_id: string; - region: any; - country_code: string; - country: string; - latitude: number; - longitude: number; -} - -export interface International { - display_name: DisplayName; -} - -export interface DisplayName { - ar: string; - arz: string; - ast: string; - az: string; - azb: string; - ba: string; - be: string; - "be-tarask": string; - bg: string; - bn: string; - br: string; - ca: string; - ckb: string; - crh: string; - "crh-latn": string; - cs: string; - cy: string; - da: string; - de: string; - el: string; - en: string; - "en-gb": string; - eo: string; - es: string; - et: string; - eu: string; - fa: string; - fi: string; - fr: string; - ga: string; - gd: string; - gl: string; - gv: string; - he: string; - hu: string; - hy: string; - hyw: string; - id: string; - io: string; - is: string; - it: string; - ja: string; - jv: string; - ka: string; - ko: string; - kw: string; - ky: string; - la: string; - lb: string; - lt: string; - lv: string; - mk: string; - ml: string; - mr: string; - ms: string; - mt: string; - nb: string; - nl: string; - nn: string; - pa: string; - pap: string; - pl: string; - pms: string; - pnb: string; - pt: string; - ro: string; - ru: string; - rw: string; - sh: string; - sl: string; - sr: string; - sv: string; - ta: string; - tg: string; - th: string; - tl: string; - tr: string; - tt: string; - ug: string; - uk: string; - ur: string; - vi: string; - war: string; - wuu: string; - xmf: string; - yue: string; - zh: string; - "zh-cn": string; - "zh-hans": string; - "zh-hant": string; - "zh-hk": string; - "zh-sg": string; - "zh-tw": string; -} - -export interface AssociatedInstitution { - id: string; - ror: string; - display_name: string; - country_code: string; - type: string; - relationship: string; -} - -export interface CountsByYear { - year: number; - works_count: number; - cited_by_count: number; -} - -export interface Role { - role: string; - id: string; - works_count: number; -} - -export interface Topic { - id: string; - display_name: string; - count: number; - subfield: Subfield; - field: Field; - domain: Domain; -} - -export interface Subfield { - id: string; - display_name: string; -} - -export interface Field { - id: string; - display_name: string; -} - -export interface Domain { - id: string; - display_name: string; -} - -export interface TopicShare { - id: string; - display_name: string; - value: number; - subfield: Subfield; - field: Field; - domain: Domain; -} - -export interface XConcept { - id: string; - wikidata: string; - display_name: string; - level: number; - score: number; -} diff --git a/openalex-importer/types/works.ts b/openalex-importer/types/works.ts deleted file mode 100644 index e5c840880..000000000 --- a/openalex-importer/types/works.ts +++ /dev/null @@ -1,157 +0,0 @@ -export interface Work { - id: string; - doi: string; - title: string; - display_name: string; - publication_year: number; - publication_date: string; - ids: Ids; - language: string; - primary_location: PrimaryLocation; - type: string; - type_crossref: string; - indexed_in: string[]; - open_access: OpenAccess; - authorships: Authorship[]; - countries_distinct_count: number; - institutions_distinct_count: number; - corresponding_author_ids: any[]; - corresponding_institution_ids: any[]; - apc_list: any; - apc_paid: any; - fwci: number; - has_fulltext: boolean; - fulltext_origin: string; - cited_by_count: number; - cited_by_percentile_year: CitedByPercentileYear; - biblio: Biblio; - is_retracted: boolean; - is_paratext: boolean; - primary_topic: any; - topics: any[]; - keywords: any[]; - concepts: Concept[]; - mesh: any[]; - locations_count: number; - locations: Location[]; - best_oa_location: BestOaLocation; - sustainable_development_goals: any[]; - grants: any[]; - datasets: any[]; - versions: any[]; - referenced_works_count: number; - referenced_works: any[]; - related_works: string[]; - ngrams_url: string; - abstract_inverted_index: any; - cited_by_api_url: string; - counts_by_year: CountsByYear[]; - updated_date: string; - created_date: string; -} - -interface Ids { - openalex: string; - doi: string; - mag: string; -} - -interface PrimaryLocation { - is_oa: boolean; - landing_page_url: string; - pdf_url: string; - source: Source; - license: string; - license_id: string; - version: string; - is_accepted: boolean; - is_published: boolean; -} - -interface Source { - id: string; - display_name: string; - issn_l: any; - issn: any; - is_oa: boolean; - is_in_doaj: boolean; - is_core: boolean; - host_organization: any; - host_organization_name: any; - host_organization_lineage: any[]; - host_organization_lineage_names: any[]; - type: string; -} - -interface OpenAccess { - is_oa: boolean; - oa_status: string; - oa_url: string; - any_repository_has_fulltext: boolean; -} - -interface Authorship { - author_position: string; - author: Author; - institutions: any[]; - countries: any[]; - is_corresponding: boolean; - raw_author_name: string; - raw_affiliation_strings: any[]; - affiliations: any[]; -} - -interface Author { - id: string; - display_name: string; - orcid?: string; -} - -interface CitedByPercentileYear { - min: number; - max: number; -} - -interface Biblio { - volume: any; - issue: any; - first_page: string; - last_page: string; -} - -interface Concept { - id: string; - wikidata: string; - display_name: string; - level: number; - score: number; -} - -interface Location { - is_oa: boolean; - landing_page_url: string; - pdf_url: string; - source: Source; - license: string; - license_id: string; - version: string; - is_accepted: boolean; - is_published: boolean; -} - -interface BestOaLocation { - is_oa: boolean; - landing_page_url: string; - pdf_url: string; - source: Source; - license: string; - license_id: string; - version: string; - is_accepted: boolean; - is_published: boolean; -} - -interface CountsByYear { - year: number; - cited_by_count: number; -} diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index ddc3585cb..77fbb0039 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -27,6 +27,11 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@prisma/client@^5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.17.0.tgz#9079947bd749689c2dabfb9ecc70a24ebefb1f43" + integrity sha512-N2tnyKayT0Zf7mHjwEyE8iG7FwTmXDHFZ1GnNhQp0pJUObsuel4ZZ1XwfuAYkq5mRIiC/Kot0kt0tGCfLJ70Jw== + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -47,6 +52,18 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@types/lodash@^4.17.7": + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== + +"@types/node@^20.14.12": + version "20.14.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.12.tgz#129d7c3a822cb49fc7ff661235f19cfefd422b49" + integrity sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ== + dependencies: + undici-types "~5.26.4" + acorn-walk@^8.1.1: version "8.3.3" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" @@ -663,6 +680,11 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -1102,6 +1124,11 @@ undefsafe@^2.0.5: resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" From 7d319df2a8a1cc26dcb6c8ce612e3b8d2edccd91 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Tue, 30 Jul 2024 03:37:40 +0100 Subject: [PATCH 04/20] replace prisma with pg and drizzle orm --- openalex-importer/package.json | 11 +- openalex-importer/yarn.lock | 530 +++++++++++++++++++++++++++++++++ 2 files changed, 540 insertions(+), 1 deletion(-) diff --git a/openalex-importer/package.json b/openalex-importer/package.json index df4a0adc6..67a3428d7 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -10,6 +10,8 @@ "dev": "npm-run-all --parallel watch-compile watch-dev", "watch-dev": "debug=* nodemon --watch \"dist/**/*\" -e js ./dist/index.js", "watch-compile": "debug=* tsc -w --preserveWatchOutput", + "generate": "drizzle-kit generate", + "migrate": "drizzle-kit migrate", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], @@ -18,6 +20,8 @@ "description": "", "devDependencies": { "@types/node": "^20.14.12", + "@types/pg": "^8.11.6", + "drizzle-kit": "^0.23.0", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "ts-node": "10.9.1", @@ -26,6 +30,11 @@ "dependencies": { "@prisma/client": "^5.17.0", "@types/lodash": "^4.17.7", - "lodash": "^4.17.21" + "dotenv": "^16.4.5", + "drizzle-orm": "^0.32.1", + "drizzle-zod": "^0.5.1", + "lodash": "^4.17.21", + "pg": "^8.12.0", + "zod": "^3.23.8" } } diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index 77fbb0039..d9a33234d 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -9,6 +9,247 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@esbuild-kit/core-utils@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz#186b6598a5066f0413471d7c4d45828e399ba96c" + integrity sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ== + dependencies: + esbuild "~0.18.20" + source-map-support "^0.5.21" + +"@esbuild-kit/esm-loader@^2.5.5": + version "2.6.5" + resolved "https://registry.yarnpkg.com/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz#6eedee46095d7d13b1efc381e2211ed1c60e64ea" + integrity sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA== + dependencies: + "@esbuild-kit/core-utils" "^3.3.2" + get-tsconfig "^4.7.0" + +"@esbuild/aix-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz#d1bc06aedb6936b3b6d313bf809a5a40387d2b7f" + integrity sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA== + +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== + +"@esbuild/android-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz#7ad65a36cfdb7e0d429c353e00f680d737c2aed4" + integrity sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA== + +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== + +"@esbuild/android-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz#b0c26536f37776162ca8bde25e42040c203f2824" + integrity sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w== + +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== + +"@esbuild/android-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz#cb13e2211282012194d89bf3bfe7721273473b3d" + integrity sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew== + +"@esbuild/darwin-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== + +"@esbuild/darwin-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz#cbee41e988020d4b516e9d9e44dd29200996275e" + integrity sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g== + +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== + +"@esbuild/darwin-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz#e37d9633246d52aecf491ee916ece709f9d5f4cd" + integrity sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A== + +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== + +"@esbuild/freebsd-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz#1ee4d8b682ed363b08af74d1ea2b2b4dbba76487" + integrity sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA== + +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== + +"@esbuild/freebsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz#37a693553d42ff77cd7126764b535fb6cc28a11c" + integrity sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg== + +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== + +"@esbuild/linux-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz#be9b145985ec6c57470e0e051d887b09dddb2d4b" + integrity sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA== + +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== + +"@esbuild/linux-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz#207ecd982a8db95f7b5279207d0ff2331acf5eef" + integrity sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w== + +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== + +"@esbuild/linux-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz#d0d86b5ca1562523dc284a6723293a52d5860601" + integrity sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA== + +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== + +"@esbuild/linux-loong64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz#9a37f87fec4b8408e682b528391fa22afd952299" + integrity sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA== + +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== + +"@esbuild/linux-mips64el@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz#4ddebd4e6eeba20b509d8e74c8e30d8ace0b89ec" + integrity sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w== + +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== + +"@esbuild/linux-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz#adb67dadb73656849f63cd522f5ecb351dd8dee8" + integrity sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg== + +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== + +"@esbuild/linux-riscv64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz#11bc0698bf0a2abf8727f1c7ace2112612c15adf" + integrity sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg== + +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== + +"@esbuild/linux-s390x@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz#e86fb8ffba7c5c92ba91fc3b27ed5a70196c3cc8" + integrity sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg== + +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + +"@esbuild/linux-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz#5f37cfdc705aea687dfe5dfbec086a05acfe9c78" + integrity sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg== + +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== + +"@esbuild/netbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz#29da566a75324e0d0dd7e47519ba2f7ef168657b" + integrity sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA== + +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== + +"@esbuild/openbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz#306c0acbdb5a99c95be98bdd1d47c916e7dc3ff0" + integrity sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw== + +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== + +"@esbuild/sunos-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz#0933eaab9af8b9b2c930236f62aae3fc593faf30" + integrity sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA== + +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== + +"@esbuild/win32-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz#773bdbaa1971b36db2f6560088639ccd1e6773ae" + integrity sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A== + +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== + +"@esbuild/win32-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz#000516cad06354cc84a73f0943a4aa690ef6fd67" + integrity sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ== + +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== + +"@esbuild/win32-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz#c57c8afbb4054a3ab8317591a0b7320360b444ae" + integrity sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== + "@jridgewell/resolve-uri@^3.0.3": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -57,6 +298,13 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== +"@types/node@*": + version "22.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" + integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== + dependencies: + undici-types "~6.11.1" + "@types/node@^20.14.12": version "20.14.12" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.12.tgz#129d7c3a822cb49fc7ff661235f19cfefd422b49" @@ -64,6 +312,15 @@ dependencies: undici-types "~5.26.4" +"@types/pg@^8.11.6": + version "8.11.6" + resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.6.tgz#a2d0fb0a14b53951a17df5197401569fb9c0c54b" + integrity sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ== + dependencies: + "@types/node" "*" + pg-protocol "*" + pg-types "^4.0.1" + acorn-walk@^8.1.1: version "8.3.3" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" @@ -150,6 +407,11 @@ braces@~3.0.2: dependencies: fill-range "^7.1.1" +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -252,6 +514,13 @@ debug@^4: dependencies: ms "2.1.2" +debug@^4.3.4: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -275,6 +544,30 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dotenv@^16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + +drizzle-kit@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/drizzle-kit/-/drizzle-kit-0.23.0.tgz#4ac8b4034a75091569666242e99df7bafd590148" + integrity sha512-w9jE97z193dd4jzAyj4Uv2SOh8Ydue70Ki6W0awy4bGM1aPXan6zD6Yv+nNTA6oGgNTDl2MJFxutjHG4fden5g== + dependencies: + "@esbuild-kit/esm-loader" "^2.5.5" + esbuild "^0.19.7" + esbuild-register "^3.5.0" + +drizzle-orm@^0.32.1: + version "0.32.1" + resolved "https://registry.yarnpkg.com/drizzle-orm/-/drizzle-orm-0.32.1.tgz#4e28c22d7f2a60aef3f0837c0a06aa7b3378b082" + integrity sha512-Wq1J+lL8PzwR5K3a1FfoWsbs8powjr3pGA4+5+2ueN1VTLDNFYEolUyUWFtqy8DVRvYbL2n7sXZkgVmK9dQkng== + +drizzle-zod@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/drizzle-zod/-/drizzle-zod-0.5.1.tgz#4e5efe016dce22ed01063f72f839b07670b2d11e" + integrity sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -371,6 +664,70 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild-register@^3.5.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/esbuild-register/-/esbuild-register-3.6.0.tgz#cf270cfa677baebbc0010ac024b823cbf723a36d" + integrity sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg== + dependencies: + debug "^4.3.4" + +esbuild@^0.19.7: + version "0.19.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.12.tgz#dc82ee5dc79e82f5a5c3b4323a2a641827db3e04" + integrity sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.19.12" + "@esbuild/android-arm" "0.19.12" + "@esbuild/android-arm64" "0.19.12" + "@esbuild/android-x64" "0.19.12" + "@esbuild/darwin-arm64" "0.19.12" + "@esbuild/darwin-x64" "0.19.12" + "@esbuild/freebsd-arm64" "0.19.12" + "@esbuild/freebsd-x64" "0.19.12" + "@esbuild/linux-arm" "0.19.12" + "@esbuild/linux-arm64" "0.19.12" + "@esbuild/linux-ia32" "0.19.12" + "@esbuild/linux-loong64" "0.19.12" + "@esbuild/linux-mips64el" "0.19.12" + "@esbuild/linux-ppc64" "0.19.12" + "@esbuild/linux-riscv64" "0.19.12" + "@esbuild/linux-s390x" "0.19.12" + "@esbuild/linux-x64" "0.19.12" + "@esbuild/netbsd-x64" "0.19.12" + "@esbuild/openbsd-x64" "0.19.12" + "@esbuild/sunos-x64" "0.19.12" + "@esbuild/win32-arm64" "0.19.12" + "@esbuild/win32-ia32" "0.19.12" + "@esbuild/win32-x64" "0.19.12" + +esbuild@~0.18.20: + version "0.18.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== + optionalDependencies: + "@esbuild/android-arm" "0.18.20" + "@esbuild/android-arm64" "0.18.20" + "@esbuild/android-x64" "0.18.20" + "@esbuild/darwin-arm64" "0.18.20" + "@esbuild/darwin-x64" "0.18.20" + "@esbuild/freebsd-arm64" "0.18.20" + "@esbuild/freebsd-x64" "0.18.20" + "@esbuild/linux-arm" "0.18.20" + "@esbuild/linux-arm64" "0.18.20" + "@esbuild/linux-ia32" "0.18.20" + "@esbuild/linux-loong64" "0.18.20" + "@esbuild/linux-mips64el" "0.18.20" + "@esbuild/linux-ppc64" "0.18.20" + "@esbuild/linux-riscv64" "0.18.20" + "@esbuild/linux-s390x" "0.18.20" + "@esbuild/linux-x64" "0.18.20" + "@esbuild/netbsd-x64" "0.18.20" + "@esbuild/openbsd-x64" "0.18.20" + "@esbuild/sunos-x64" "0.18.20" + "@esbuild/win32-arm64" "0.18.20" + "@esbuild/win32-ia32" "0.18.20" + "@esbuild/win32-x64" "0.18.20" + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -435,6 +792,13 @@ get-symbol-description@^1.0.2: es-errors "^1.3.0" get-intrinsic "^1.2.4" +get-tsconfig@^4.7.0: + version "4.7.6" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.6.tgz#118fd5b7b9bae234cc7705a00cd771d7eb65d62a" + integrity sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA== + dependencies: + resolve-pkg-maps "^1.0.0" + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -778,6 +1142,11 @@ object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" +obuf@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -803,6 +1172,80 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +pg-cloudflare@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz#e6d5833015b170e23ae819e8c5d7eaedb472ca98" + integrity sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q== + +pg-connection-string@^2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.6.4.tgz#f543862adfa49fa4e14bc8a8892d2a84d754246d" + integrity sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA== + +pg-int8@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" + integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== + +pg-numeric@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" + integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== + +pg-pool@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.6.2.tgz#3a592370b8ae3f02a7c8130d245bc02fa2c5f3f2" + integrity sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg== + +pg-protocol@*, pg-protocol@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.6.1.tgz#21333e6d83b01faaebfe7a33a7ad6bfd9ed38cb3" + integrity sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg== + +pg-types@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" + integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== + dependencies: + pg-int8 "1.0.1" + postgres-array "~2.0.0" + postgres-bytea "~1.0.0" + postgres-date "~1.0.4" + postgres-interval "^1.1.0" + +pg-types@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-4.0.2.tgz#399209a57c326f162461faa870145bb0f918b76d" + integrity sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng== + dependencies: + pg-int8 "1.0.1" + pg-numeric "1.0.2" + postgres-array "~3.0.1" + postgres-bytea "~3.0.0" + postgres-date "~2.1.0" + postgres-interval "^3.0.0" + postgres-range "^1.1.1" + +pg@^8.12.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.12.0.tgz#9341724db571022490b657908f65aee8db91df79" + integrity sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ== + dependencies: + pg-connection-string "^2.6.4" + pg-pool "^3.6.2" + pg-protocol "^1.6.1" + pg-types "^2.1.0" + pgpass "1.x" + optionalDependencies: + pg-cloudflare "^1.1.1" + +pgpass@1.x: + version "1.0.5" + resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.5.tgz#9b873e4a564bb10fa7a7dbd55312728d422a223d" + integrity sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug== + dependencies: + split2 "^4.1.0" + picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -823,6 +1266,55 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== +postgres-array@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" + integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== + +postgres-array@~3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-3.0.2.tgz#68d6182cb0f7f152a7e60dc6a6889ed74b0a5f98" + integrity sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog== + +postgres-bytea@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" + integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== + +postgres-bytea@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-3.0.0.tgz#9048dc461ac7ba70a6a42d109221619ecd1cb089" + integrity sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw== + dependencies: + obuf "~1.1.2" + +postgres-date@~1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + +postgres-date@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-2.1.0.tgz#b85d3c1fb6fb3c6c8db1e9942a13a3bf625189d0" + integrity sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA== + +postgres-interval@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" + integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== + dependencies: + xtend "^4.0.0" + +postgres-interval@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-3.0.0.tgz#baf7a8b3ebab19b7f38f07566c7aab0962f0c86a" + integrity sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw== + +postgres-range@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" + integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== + pstree.remy@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" @@ -854,6 +1346,11 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve@^1.10.0: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" @@ -948,6 +1445,19 @@ simple-update-notifier@^2.0.0: dependencies: semver "^7.5.3" +source-map-support@^0.5.21: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + spdx-correct@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" @@ -974,6 +1484,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326" integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== +split2@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + string.prototype.padend@^3.0.0: version "3.1.6" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz#ba79cf8992609a91c872daa47c6bb144ee7f62a5" @@ -1129,6 +1644,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.11.1: + version "6.11.1" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" + integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" @@ -1171,7 +1691,17 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +zod@^3.23.8: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== From aca3fe5a4fe1f08ec337c626c1e5a93158071fb4 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Tue, 30 Jul 2024 20:50:21 +0100 Subject: [PATCH 05/20] add build and start script (pm2) --- openalex-importer/nodemon.json | 4 +- openalex-importer/package.json | 5 + openalex-importer/tsconfig.json | 1 + openalex-importer/yarn.lock | 783 +++++++++++++++++++++++++++++++- 4 files changed, 779 insertions(+), 14 deletions(-) diff --git a/openalex-importer/nodemon.json b/openalex-importer/nodemon.json index b45b6d059..5e8099d04 100644 --- a/openalex-importer/nodemon.json +++ b/openalex-importer/nodemon.json @@ -4,7 +4,9 @@ ], "ext": ".ts,.js,*", "ignore": [ - "log/server.log" + "log/server.log", + "logs/", + "postgres/" ], "verbose": true, "exec": "node -r ts-node/register", diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 67a3428d7..4b7c47c95 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -10,6 +10,8 @@ "dev": "npm-run-all --parallel watch-compile watch-dev", "watch-dev": "debug=* nodemon --watch \"dist/**/*\" -e js ./dist/index.js", "watch-compile": "debug=* tsc -w --preserveWatchOutput", + "build": "tsc", + "start": "pm2 start ./dist/index.js", "generate": "drizzle-kit generate", "migrate": "drizzle-kit migrate", "test": "echo \"Error: no test specified\" && exit 1" @@ -30,11 +32,14 @@ "dependencies": { "@prisma/client": "^5.17.0", "@types/lodash": "^4.17.7", + "date-fns": "^3.6.0", "dotenv": "^16.4.5", "drizzle-orm": "^0.32.1", "drizzle-zod": "^0.5.1", "lodash": "^4.17.21", + "node-cron": "^3.0.3", "pg": "^8.12.0", + "pm2": "^5.4.2", "zod": "^3.23.8" } } diff --git a/openalex-importer/tsconfig.json b/openalex-importer/tsconfig.json index 470c1cc64..9fd43cb9a 100755 --- a/openalex-importer/tsconfig.json +++ b/openalex-importer/tsconfig.json @@ -36,6 +36,7 @@ "include": [ "./src/**/*.ts", "*.ts", + "./drizzle/schema.ts", ], "exclude": [ "test/**/*.ts" diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index d9a33234d..c1ab3f80e 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -268,11 +268,67 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@pm2/agent@~2.0.0": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@pm2/agent/-/agent-2.0.4.tgz#a6699a6c57741492129776eb5a7abc15e50672cb" + integrity sha512-n7WYvvTJhHLS2oBb1PjOtgLpMhgImOq8sXkPBw6smeg9LJBWZjiEgPKOpR8mn9UJZsB5P3W4V/MyvNnp31LKeA== + dependencies: + async "~3.2.0" + chalk "~3.0.0" + dayjs "~1.8.24" + debug "~4.3.1" + eventemitter2 "~5.0.1" + fast-json-patch "^3.0.0-1" + fclone "~1.0.11" + nssocket "0.6.0" + pm2-axon "~4.0.1" + pm2-axon-rpc "~0.7.0" + proxy-agent "~6.3.0" + semver "~7.5.0" + ws "~7.5.10" + +"@pm2/io@~6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@pm2/io/-/io-6.0.1.tgz#300fefa485317f26e3bc348da061ca395a52149a" + integrity sha512-KiA+shC6sULQAr9mGZ1pg+6KVW9MF8NpG99x26Lf/082/Qy8qsTCtnJy+HQReW1A9Rdf0C/404cz0RZGZro+IA== + dependencies: + async "~2.6.1" + debug "~4.3.1" + eventemitter2 "^6.3.1" + require-in-the-middle "^5.0.0" + semver "~7.5.4" + shimmer "^1.2.0" + signal-exit "^3.0.3" + tslib "1.9.3" + +"@pm2/js-api@~0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@pm2/js-api/-/js-api-0.8.0.tgz#d1b8aff562dd34befa3cb30fe28e08c9f9743abc" + integrity sha512-nmWzrA/BQZik3VBz+npRcNIu01kdBhWL0mxKmP1ciF/gTcujPTQqt027N9fc1pK9ERM8RipFhymw7RcmCyOEYA== + dependencies: + async "^2.6.3" + debug "~4.3.1" + eventemitter2 "^6.3.1" + extrareqp2 "^1.0.0" + ws "^7.0.0" + +"@pm2/pm2-version-check@latest": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz#cf97fbb14b0eca95430ca05eedccbd2683806e43" + integrity sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA== + dependencies: + debug "^4.3.1" + "@prisma/client@^5.17.0": version "5.17.0" resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.17.0.tgz#9079947bd749689c2dabfb9ecc70a24ebefb1f43" integrity sha512-N2tnyKayT0Zf7mHjwEyE8iG7FwTmXDHFZ1GnNhQp0pJUObsuel4ZZ1XwfuAYkq5mRIiC/Kot0kt0tGCfLJ70Jw== +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -333,6 +389,30 @@ acorn@^8.11.0, acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== +agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + +amp-message@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/amp-message/-/amp-message-0.1.2.tgz#a78f1c98995087ad36192a41298e4db49e3dfc45" + integrity sha512-JqutcFwoU1+jhv7ArgW38bqrE+LQdcRv4NxNw0mp0JHQyB6tXesWRjtYKlDgHRY2o3JE5UTaBGUK8kSWUdxWUg== + dependencies: + amp "0.3.1" + +amp@0.3.1, amp@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/amp/-/amp-0.3.1.tgz#6adf8d58a74f361e82c1fa8d389c079e139fc47d" + integrity sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw== + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -340,6 +420,13 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -353,6 +440,11 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-buffer-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" @@ -375,6 +467,25 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + +async@^2.6.3, async@~2.6.1: + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== + dependencies: + lodash "^4.17.14" + +async@^3.2.0, async@~3.2.0: + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -387,11 +498,26 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +basic-ftp@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" + integrity sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg== + binary-extensions@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== +blessed@0.1.81: + version "0.1.81" + resolved "https://registry.yarnpkg.com/blessed/-/blessed-0.1.81.tgz#f962d687ec2c369570ae71af843256e6d0ca1129" + integrity sha512-LoF5gae+hlmfORcG1M5+5XZi4LBmvlXTzwJWzUlPryN/SJdSflZvROM2TwkT0GMpq7oqT48NRd4GS7BiVBc5OQ== + +bodec@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bodec/-/bodec-0.1.0.tgz#bc851555430f23c9f7650a75ef64c6a94c3418cc" + integrity sha512-Ylo+MAo5BDUq1KA3f3R/MFhh+g8cnHmo8bz3YPGhI1znrMaf77ol1sfvYJzsw3nTE+Y2GryfDxBaR+AqpAkEHQ== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -423,6 +549,14 @@ call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +chalk@3.0.0, chalk@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -432,7 +566,12 @@ chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chokidar@^3.5.2: +charm@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/charm/-/charm-0.1.2.tgz#06c21eed1a1b06aeb67553cdc53e23274bac2296" + integrity sha512-syedaZ9cPe7r3hoQA9twWYKu5AIyCswN5+szkmPBe9ccdLrj4bYaCnLVPTLd2kgVRc7+zoX4tyPgRnFKCj5YjQ== + +chokidar@^3.5.2, chokidar@^3.5.3: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -447,6 +586,13 @@ chokidar@^3.5.2: optionalDependencies: fsevents "~2.3.2" +cli-tableau@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/cli-tableau/-/cli-tableau-2.0.1.tgz#baa78d83e08a2d7ab79b7dad9406f0254977053f" + integrity sha512-he+WTicka9cl0Fg/y+YyxcN6/bfQ/1O3QmgxRXDhABKqLzvoOSM4fMzp39uMyLBulAFuywD2N7UaoQE7WaADxQ== + dependencies: + chalk "3.0.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -454,11 +600,28 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -469,6 +632,11 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +croner@~4.1.92: + version "4.1.97" + resolved "https://registry.yarnpkg.com/croner/-/croner-4.1.97.tgz#6e373dc7bb3026fab2deb0d82685feef20796766" + integrity sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ== + cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -480,6 +648,16 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +culvert@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/culvert/-/culvert-0.1.2.tgz#9502f5f0154a2d5a22a023e79f71cc936fa6ef6f" + integrity sha512-yi1x3EAWKjQTreYWeSd98431AV+IEE0qoDyOoaHJ7KJ21gv6HtBXHVLX74opVSGqcR8/AbjJBHAHpcOy2bj5Gg== + +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + data-view-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" @@ -507,20 +685,42 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -debug@^4: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== - dependencies: - ms "2.1.2" +date-fns@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf" + integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww== + +dayjs@~1.11.5: + version "1.11.12" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" + integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== + +dayjs@~1.8.24: + version "1.8.36" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.36.tgz#be36e248467afabf8f5a86bae0de0cdceecced50" + integrity sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw== -debug@^4.3.4: +debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@~4.3.1: version "4.3.6" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" +debug@^3.2.6: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -539,6 +739,15 @@ define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -568,6 +777,13 @@ drizzle-zod@^0.5.1: resolved "https://registry.yarnpkg.com/drizzle-zod/-/drizzle-zod-0.5.1.tgz#4e5efe016dce22ed01063f72f839b07670b2d11e" integrity sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A== +enquirer@2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -733,6 +949,69 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +eventemitter2@5.0.1, eventemitter2@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-5.0.1.tgz#6197a095d5fb6b57e8942f6fd7eaad63a09c9452" + integrity sha512-5EM1GHXycJBS6mauYAbVKT1cVs7POKWb2NXD4Vyt8dDqeZa7LaDK1/sjtL+Zb0lzTpSNil4596Dyu97hz37QLg== + +eventemitter2@^6.3.1: + version "6.4.9" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" + integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg== + +eventemitter2@~0.4.14: + version "0.4.14" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" + integrity sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ== + +extrareqp2@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/extrareqp2/-/extrareqp2-1.0.0.tgz#aaf8ad1495d723f71276b0eab041c061aa21f035" + integrity sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA== + dependencies: + follow-redirects "^1.14.0" + +fast-json-patch@^3.0.0-1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" + integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== + +fclone@1.0.11, fclone@~1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fclone/-/fclone-1.0.11.tgz#10e85da38bfea7fc599341c296ee1d77266ee640" + integrity sha512-GDqVQezKzRABdeqflsgMr7ktzgF9CyS+p2oe0jJqUY6izSSbhPIQJDpoU4PtGcD7VPM9xh/dVrTu6z1nwgmEGw== + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -740,6 +1019,11 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +follow-redirects@^1.14.0: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -747,6 +1031,15 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +fs-extra@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fsevents@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" @@ -799,6 +1092,26 @@ get-tsconfig@^4.7.0: dependencies: resolve-pkg-maps "^1.0.0" +get-uri@^6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a" + integrity sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + fs-extra "^11.2.0" + +git-node-fs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/git-node-fs/-/git-node-fs-1.0.0.tgz#49b215e242ebe43aa4c7561bbba499521752080f" + integrity sha512-bLQypt14llVXBg0S0u8q8HmU7g9p3ysH+NvVlae5vILuUvs759665HvmR5+wb04KjHyjFcDRxdYb4kyNnluMUQ== + +git-sha1@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/git-sha1/-/git-sha1-0.1.2.tgz#599ac192b71875825e13a445f3a6e05118c2f745" + integrity sha512-2e/nZezdVlyCopOCYHeW0onkbZg7xP1Ad6pndPy1rCygeRykefUS6r7oA5cJRGEFvseiaz5a/qUHFVX1dd6Isg== + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -821,7 +1134,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -836,6 +1149,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" @@ -872,11 +1190,39 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== +http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.2, https-proxy-agent@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + +iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + ignore-by-default@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== +ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" @@ -886,6 +1232,14 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" @@ -1029,11 +1383,52 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +js-git@^0.7.8: + version "0.7.8" + resolved "https://registry.yarnpkg.com/js-git/-/js-git-0.7.8.tgz#52fa655ab61877d6f1079efc6534b554f31e5444" + integrity sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA== + dependencies: + bodec "^0.1.0" + culvert "^0.1.2" + git-sha1 "^0.1.2" + pako "^0.2.5" + +js-yaml@~4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +lazy@~1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/lazy/-/lazy-1.0.11.tgz#daa068206282542c088288e975c297c1ae77b690" + integrity sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA== + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -1044,11 +1439,23 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -lodash@^4.17.21: +lodash@^4.17.14, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -1066,16 +1473,57 @@ minimatch@^3.0.4, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +mkdirp@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +module-details-from-path@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b" + integrity sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@~0.0.4: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +needle@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +netmask@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" + integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-cron@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-3.0.3.tgz#c4bc7173dd96d96c50bdb51122c64415458caff2" + integrity sha512-dOal67//nohNgYWb+nWmg5dkFdIwDm8EpeGYMekPMrngV3637lqnX0lbUcCtgibHTz6SEz7DAIjKvKDFYCnO1A== + dependencies: + uuid "8.3.2" + nodemon@^3.0.2: version "3.1.4" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.4.tgz#c34dcd8eb46a05723ccde60cbdd25addcc8725e4" @@ -1122,6 +1570,14 @@ npm-run-all@^4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" +nssocket@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/nssocket/-/nssocket-0.6.0.tgz#59f96f6ff321566f33c70f7dbeeecdfdc07154fa" + integrity sha512-a9GSOIql5IqgWJR3F/JXG4KpJTA3Z53Cj0MeMvGpglytB1nxE4PdFNC0jINe27CS7cGivoynwc054EzCcT3M3w== + dependencies: + eventemitter2 "~0.4.14" + lazy "~1.0.11" + object-inspect@^1.13.1: version "1.13.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" @@ -1147,6 +1603,33 @@ obuf@~1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== +pac-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" + integrity sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.0.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.5" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.4" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + +pako@^0.2.5: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -1256,11 +1739,105 @@ pidtree@^0.3.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== +pidusage@^2.0.21: + version "2.0.21" + resolved "https://registry.yarnpkg.com/pidusage/-/pidusage-2.0.21.tgz#7068967b3d952baea73e57668c98b9eaa876894e" + integrity sha512-cv3xAQos+pugVX+BfXpHsbyz/dLzX+lr44zNMsYiGxUw+kV5sgQCIcLd1z+0vq+KyC7dJ+/ts2PsfgWfSC3WXA== + dependencies: + safe-buffer "^5.2.1" + +pidusage@~3.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/pidusage/-/pidusage-3.0.2.tgz#6faa5402b2530b3af2cf93d13bcf202889724a53" + integrity sha512-g0VU+y08pKw5M8EZ2rIGiEBaB8wrQMjYGFfW2QVIfyT8V+fq8YFLkvlz4bz5ljvFDJYNFCWT3PWqcRr2FKO81w== + dependencies: + safe-buffer "^5.2.1" + pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== +pm2-axon-rpc@~0.7.0, pm2-axon-rpc@~0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/pm2-axon-rpc/-/pm2-axon-rpc-0.7.1.tgz#2daec5383a63135b3f18babb70266dacdcbc429a" + integrity sha512-FbLvW60w+vEyvMjP/xom2UPhUN/2bVpdtLfKJeYM3gwzYhoTEEChCOICfFzxkxuoEleOlnpjie+n1nue91bDQw== + dependencies: + debug "^4.3.1" + +pm2-axon@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pm2-axon/-/pm2-axon-4.0.1.tgz#a7b4bb586e9aeb35b1042b488cde15b60cabafd2" + integrity sha512-kES/PeSLS8orT8dR5jMlNl+Yu4Ty3nbvZRmaAtROuVm9nYYGiaoXqqKQqQYzWQzMYWUKHMQTvBlirjE5GIIxqg== + dependencies: + amp "~0.3.1" + amp-message "~0.1.1" + debug "^4.3.1" + escape-string-regexp "^4.0.0" + +pm2-deploy@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pm2-deploy/-/pm2-deploy-1.0.2.tgz#98d8385553a3a4dca11c7b3116deb519bc5961a7" + integrity sha512-YJx6RXKrVrWaphEYf++EdOOx9EH18vM8RSZN/P1Y+NokTKqYAca/ejXwVLyiEpNju4HPZEk3Y2uZouwMqUlcgg== + dependencies: + run-series "^1.1.8" + tv4 "^1.3.0" + +pm2-multimeter@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz#1a1e55153d41a05534cea23cfe860abaa0eb4ace" + integrity sha512-S+wT6XfyKfd7SJIBqRgOctGxaBzUOmVQzTAS+cg04TsEUObJVreha7lvCfX8zzGVr871XwCSnHUU7DQQ5xEsfA== + dependencies: + charm "~0.1.1" + +pm2-sysmonit@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/pm2-sysmonit/-/pm2-sysmonit-1.2.8.tgz#eddea34a53fd8c8d7c3efb73b97a3c548686e24d" + integrity sha512-ACOhlONEXdCTVwKieBIQLSi2tQZ8eKinhcr9JpZSUAL8Qy0ajIgRtsLxG/lwPOW3JEKqPyw/UaHmTWhUzpP4kA== + dependencies: + async "^3.2.0" + debug "^4.3.1" + pidusage "^2.0.21" + systeminformation "^5.7" + tx2 "~1.0.4" + +pm2@^5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/pm2/-/pm2-5.4.2.tgz#34a50044cf772c5528d68e2713f84383ebb2e09b" + integrity sha512-ynVpBwZampRH3YWLwRepZpQ7X3MvpwLIaqIdFEeBYEhaXbHmEx2KqOdxGV4T54wvKBhH3LixvU1j1bK4/sq7Tw== + dependencies: + "@pm2/agent" "~2.0.0" + "@pm2/io" "~6.0.1" + "@pm2/js-api" "~0.8.0" + "@pm2/pm2-version-check" latest + async "~3.2.0" + blessed "0.1.81" + chalk "3.0.0" + chokidar "^3.5.3" + cli-tableau "^2.0.0" + commander "2.15.1" + croner "~4.1.92" + dayjs "~1.11.5" + debug "^4.3.1" + enquirer "2.3.6" + eventemitter2 "5.0.1" + fclone "1.0.11" + js-yaml "~4.1.0" + mkdirp "1.0.4" + needle "2.4.0" + pidusage "~3.0" + pm2-axon "~4.0.1" + pm2-axon-rpc "~0.7.1" + pm2-deploy "~1.0.2" + pm2-multimeter "^0.1.2" + promptly "^2" + semver "^7.2" + source-map-support "0.5.21" + sprintf-js "1.1.2" + vizion "~2.2.1" + optionalDependencies: + pm2-sysmonit "^1.2.8" + possible-typed-array-names@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" @@ -1315,6 +1892,32 @@ postgres-range@^1.1.1: resolved "https://registry.yarnpkg.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== +promptly@^2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/promptly/-/promptly-2.2.0.tgz#2a13fa063688a2a5983b161fff0108a07d26fc74" + integrity sha512-aC9j+BZsRSSzEsXBNBwDnAxujdx19HycZoKgRgzWnS8eOHg1asuf9heuLprfbe739zY3IdUQx+Egv6Jn135WHA== + dependencies: + read "^1.0.4" + +proxy-agent@~6.3.0: + version "6.3.1" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.3.1.tgz#40e7b230552cf44fd23ffaf7c59024b692612687" + integrity sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.2" + lru-cache "^7.14.1" + pac-proxy-agent "^7.0.1" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.2" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + pstree.remy@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" @@ -1329,6 +1932,13 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" +read@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ== + dependencies: + mute-stream "~0.0.4" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -1346,12 +1956,21 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" +require-in-the-middle@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-5.2.0.tgz#4b71e3cc7f59977100af9beb76bf2d056a5a6de2" + integrity sha512-efCx3b+0Z69/LGJmm9Yvi4cqEdxnoGnxYxGxBghkkTTFeXRtTCmmhO0AnAfHz59k957uTSuy8WaHqOs8wbYUWg== + dependencies: + debug "^4.1.1" + module-details-from-path "^1.0.3" + resolve "^1.22.1" + resolve-pkg-maps@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve@^1.10.0: +resolve@^1.10.0, resolve@^1.22.1: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -1360,6 +1979,11 @@ resolve@^1.10.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +run-series@^1.1.8: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-series/-/run-series-1.1.9.tgz#15ba9cb90e6a6c054e67c98e1dc063df0ecc113a" + integrity sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g== + safe-array-concat@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" @@ -1370,6 +1994,11 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" +safe-buffer@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" @@ -1379,16 +2008,38 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + "semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== +semver@^7.2: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + semver@^7.5.3: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@~7.5.0, semver@~7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -1428,6 +2079,11 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== +shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + side-channel@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -1438,6 +2094,11 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + simple-update-notifier@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" @@ -1445,7 +2106,29 @@ simple-update-notifier@^2.0.0: dependencies: semver "^7.5.3" -source-map-support@^0.5.21: +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.2, socks-proxy-agent@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== + dependencies: + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + +source-map-support@0.5.21, source-map-support@^0.5.21: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -1453,7 +2136,7 @@ source-map-support@^0.5.21: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0: +source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -1489,6 +2172,16 @@ split2@^4.1.0: resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== +sprintf-js@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== + +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + string.prototype.padend@^3.0.0: version "3.1.6" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz#ba79cf8992609a91c872daa47c6bb144ee7f62a5" @@ -1539,11 +2232,23 @@ supports-color@^5.3.0, supports-color@^5.5.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +systeminformation@^5.7: + version "5.22.11" + resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.22.11.tgz#42be7b650ce0a8b940c06219a6647f6ab3f7a349" + integrity sha512-aLws5yi4KCHTb0BVvbodQY5bY8eW4asMRDTxTW46hqw9lGjACX6TlLdJrkdoHYRB0qs+MekqEq1zG7WDnWE8Ug== + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -1575,6 +2280,28 @@ ts-node@10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tslib@1.9.3: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + +tslib@^2.0.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + +tv4@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/tv4/-/tv4-1.3.0.tgz#d020c846fadd50c855abb25ebaecc68fc10f7963" + integrity sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw== + +tx2@~1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tx2/-/tx2-1.0.5.tgz#ee0b0e5e2c351f8d23e54bdf46dd60afa3bbc73d" + integrity sha512-sJ24w0y03Md/bxzK4FU8J8JveYYUbSs2FViLJ2D/8bytSiyPRbuE3DyL/9UKYXTZlV3yXq0L8GLlhobTnekCVg== + dependencies: + json-stringify-safe "^5.0.1" + typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -1649,6 +2376,16 @@ undici-types@~6.11.1: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +uuid@8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" @@ -1662,6 +2399,16 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +vizion@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/vizion/-/vizion-2.2.1.tgz#04201ea45ffd145d5b5210e385a8f35170387fb2" + integrity sha512-sfAcO2yeSU0CSPFI/DmZp3FsFE9T+8913nv1xWBOyzODv13fwkn6Vl7HqxGpkr9F608M+8SuFId3s+BlZqfXww== + dependencies: + async "^2.6.3" + git-node-fs "^1.0.0" + ini "^1.3.5" + js-git "^0.7.8" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -1691,11 +2438,21 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +ws@^7.0.0, ws@~7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 6a156c209a3449f6ddac96002d27d94641ccabc7 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Tue, 30 Jul 2024 21:36:18 +0100 Subject: [PATCH 06/20] integrate pino http logger --- .gitignore | 2 +- openalex-importer/.gitignore | 4 +- openalex-importer/docker-compose.yml | 23 + openalex-importer/drizzle.config.ts | 23 + .../drizzle/0000_many_franklin_storm.sql | 51 ++ .../drizzle/meta/0000_snapshot.json | 256 ++++++++ openalex-importer/drizzle/meta/_journal.json | 13 + openalex-importer/drizzle/schema.ts | 62 ++ openalex-importer/index.ts | 15 + openalex-importer/log/.gitkeep | 0 openalex-importer/package.json | 3 + .../postgres/0-vector-extension.sh | 8 + openalex-importer/postgres/Dockerfile | 15 + .../postgres/sql/create_tables.sql | 587 ++++++++++++++++++ .../postgres/sql/vector_extension.sql | 2 + openalex-importer/src/client.ts | 3 + openalex-importer/src/db/index.ts | 88 +++ openalex-importer/src/db/types.ts | 17 + openalex-importer/src/logger.ts | 51 ++ openalex-importer/src/script.ts | 221 +++++++ openalex-importer/src/transformers.ts | 292 +++++++++ openalex-importer/src/types/index.ts | 2 + openalex-importer/src/types/institutions.ts | 226 +++++++ openalex-importer/src/types/works.ts | 180 ++++++ openalex-importer/yarn.lock | 253 +++++++- 25 files changed, 2393 insertions(+), 4 deletions(-) create mode 100644 openalex-importer/docker-compose.yml create mode 100644 openalex-importer/drizzle.config.ts create mode 100644 openalex-importer/drizzle/0000_many_franklin_storm.sql create mode 100644 openalex-importer/drizzle/meta/0000_snapshot.json create mode 100644 openalex-importer/drizzle/meta/_journal.json create mode 100644 openalex-importer/drizzle/schema.ts create mode 100644 openalex-importer/index.ts create mode 100644 openalex-importer/log/.gitkeep create mode 100644 openalex-importer/postgres/0-vector-extension.sh create mode 100644 openalex-importer/postgres/Dockerfile create mode 100644 openalex-importer/postgres/sql/create_tables.sql create mode 100644 openalex-importer/postgres/sql/vector_extension.sql create mode 100755 openalex-importer/src/client.ts create mode 100644 openalex-importer/src/db/index.ts create mode 100644 openalex-importer/src/db/types.ts create mode 100644 openalex-importer/src/logger.ts create mode 100644 openalex-importer/src/script.ts create mode 100644 openalex-importer/src/transformers.ts create mode 100644 openalex-importer/src/types/index.ts create mode 100644 openalex-importer/src/types/institutions.ts create mode 100644 openalex-importer/src/types/works.ts diff --git a/.gitignore b/.gitignore index 8230f87d6..45a09993e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ node-modules/ node_modules/* .idea .composedbRuntimeDefinition.json -openalex-importer \ No newline at end of file +# openalex-importer \ No newline at end of file diff --git a/openalex-importer/.gitignore b/openalex-importer/.gitignore index fa981ce22..cbb4363b7 100644 --- a/openalex-importer/.gitignore +++ b/openalex-importer/.gitignore @@ -16,4 +16,6 @@ server.log repo-tmp postgres-data/ -logs/ \ No newline at end of file + +logs +prisma \ No newline at end of file diff --git a/openalex-importer/docker-compose.yml b/openalex-importer/docker-compose.yml new file mode 100644 index 000000000..808e1a785 --- /dev/null +++ b/openalex-importer/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3.7" +services: + postgres: + container_name: "openalex_db" + image: "ankane/pgvector" + restart: always + # build: + # context: ./postgres + # dockerfile: Dockerfile + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + logging: + options: + max-size: 10m + max-file: "3" + ports: + - "5438:5432" + volumes: + - ./postgres/postgres-data:/var/lib/postgresql/data + # copy the sql script to create tables + - ./postgres/sql/vector_extension.sql:/docker-entrypoint-initdb.d/0-vector_extension.sql + - ./postgres/sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql diff --git a/openalex-importer/drizzle.config.ts b/openalex-importer/drizzle.config.ts new file mode 100644 index 000000000..1a266a38f --- /dev/null +++ b/openalex-importer/drizzle.config.ts @@ -0,0 +1,23 @@ +import { defineConfig } from "drizzle-kit"; +import "dotenv/config"; + +export default defineConfig({ + schema: "./drizzle/schema.ts", + out: "./drizzle", + dialect: "postgresql", + dbCredentials: { + database: process.env.POSTGRES_DB as string, + host: process.env.PG_HOST as string, + user: process.env.POSTGRES_USER as string, + password: process.env.POSTGRES_PASSWORD as string, + secretArn: "", + resourceArn: "", + ssl: false, + }, + migrations: { + table: "__migrations__", + schema: "public", + }, + // verbose: true, + // strict: true, +}); diff --git a/openalex-importer/drizzle/0000_many_franklin_storm.sql b/openalex-importer/drizzle/0000_many_franklin_storm.sql new file mode 100644 index 000000000..d714c14de --- /dev/null +++ b/openalex-importer/drizzle/0000_many_franklin_storm.sql @@ -0,0 +1,51 @@ +CREATE TABLE IF NOT EXISTS "openalex"."batch" ( + "id" serial PRIMARY KEY NOT NULL, + "createdAt" timestamp, + "updatedAt" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_batch" ( + "work_id" text NOT NULL, + "batch_id" text NOT NULL, + "createdAt" timestamp, + "updatedAt" timestamp, + CONSTRAINT "works_batch_work_id_unique" UNIQUE("work_id"), + CONSTRAINT "works_batch_batch_id_unique" UNIQUE("batch_id") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works" ( + "id" text PRIMARY KEY NOT NULL, + "doi" text, + "title" text, + "display_name" text, + "publication_year" integer, + "publication_date" date, + "type" text, + "cited_by_count" integer, + "is_retracted" boolean, + "is_paratext" boolean, + "cited_by_api_url" text, + "abstract_inverted_index" json, + "language" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_ids" ( + "work_id" text NOT NULL, + "openalex" text, + "doi" text, + "mag" bigint, + "pmid" text, + "pmcid" text +); +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "openalex"."works_batch" ADD CONSTRAINT "works_batch_work_id_works_id_fk" FOREIGN KEY ("work_id") REFERENCES "openalex"."works"("id") ON DELETE set null ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "openalex"."works_batch" ADD CONSTRAINT "works_batch_batch_id_batch_id_fk" FOREIGN KEY ("batch_id") REFERENCES "openalex"."batch"("id") ON DELETE set null ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; diff --git a/openalex-importer/drizzle/meta/0000_snapshot.json b/openalex-importer/drizzle/meta/0000_snapshot.json new file mode 100644 index 000000000..2b27a99ef --- /dev/null +++ b/openalex-importer/drizzle/meta/0000_snapshot.json @@ -0,0 +1,256 @@ +{ + "id": "eae2fc6f-fe08-442d-9153-9dce133285e6", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "openalex.batch": { + "name": "batch", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_batch": { + "name": "works_batch", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "batch_id": { + "name": "batch_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "works_batch_work_id_works_id_fk": { + "name": "works_batch_work_id_works_id_fk", + "tableFrom": "works_batch", + "tableTo": "works", + "schemaTo": "openalex", + "columnsFrom": [ + "work_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "works_batch_batch_id_batch_id_fk": { + "name": "works_batch_batch_id_batch_id_fk", + "tableFrom": "works_batch", + "tableTo": "batch", + "schemaTo": "openalex", + "columnsFrom": [ + "batch_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "works_batch_work_id_unique": { + "name": "works_batch_work_id_unique", + "nullsNotDistinct": false, + "columns": [ + "work_id" + ] + }, + "works_batch_batch_id_unique": { + "name": "works_batch_batch_id_unique", + "nullsNotDistinct": false, + "columns": [ + "batch_id" + ] + } + } + }, + "openalex.works": { + "name": "works", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "doi": { + "name": "doi", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "publication_year": { + "name": "publication_year", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "publication_date": { + "name": "publication_date", + "type": "date", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "is_retracted": { + "name": "is_retracted", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "is_paratext": { + "name": "is_paratext", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cited_by_api_url": { + "name": "cited_by_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "abstract_inverted_index": { + "name": "abstract_inverted_index", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "language": { + "name": "language", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_ids": { + "name": "works_ids", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "doi": { + "name": "doi", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mag": { + "name": "mag", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "pmid": { + "name": "pmid", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pmcid": { + "name": "pmcid", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/openalex-importer/drizzle/meta/_journal.json b/openalex-importer/drizzle/meta/_journal.json new file mode 100644 index 000000000..e5d1c858b --- /dev/null +++ b/openalex-importer/drizzle/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1722302874998, + "tag": "0000_many_franklin_storm", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/openalex-importer/drizzle/schema.ts b/openalex-importer/drizzle/schema.ts new file mode 100644 index 000000000..8d5300287 --- /dev/null +++ b/openalex-importer/drizzle/schema.ts @@ -0,0 +1,62 @@ +import { + pgTable, + serial, + boolean, + numeric, + integer, + json, + text, + timestamp, + date, + bigint, + pgSchema, +} from "drizzle-orm/pg-core"; +// import { createInsertSchema } from "drizzle-zod"; +// import z from "zod"; + +const openAlexSchema = pgSchema("openalex"); + +export const works = openAlexSchema.table("works", { + id: text("id").primaryKey(), + doi: text("doi"), + title: text("title"), + display_name: text("display_name"), + publication_year: integer("publication_year"), + publication_date: date("publication_date"), + type: text("type"), + cited_by_count: integer("cited_by_count"), + is_retracted: boolean("is_retracted"), + is_paratext: boolean("is_paratext"), + cited_by_api_url: text("cited_by_api_url"), + abstract_inverted_index: json("abstract_inverted_index"), + language: text("language"), + publication_date_date: date("publication_date_date"), +}); + +export const batch = openAlexSchema.table("batch", { + id: serial("id").primaryKey(), + createdAt: timestamp("createdAt", { mode: "date" }), + updatedAt: timestamp("updatedAt", { mode: "date" }), +}); + +export const workBatch = openAlexSchema.table("works_batch", { + work_id: text("work_id") + .references(() => works.id, { onDelete: "set null" }) + .unique() + .notNull(), + batch_id: integer("batch_id") + .references(() => batch.id, { onDelete: "set null" }) + .unique() + .notNull(), + // createdAt: timestamp("createdAt", { mode: "date" }), + // updatedAt: timestamp("updatedAt", { mode: "date" }), +}); + +export const worksId = openAlexSchema.table("works_ids", { + work_id: text("work_id").notNull(), + openalex: text("openalex"), + doi: text("doi"), + mag: bigint("mag", { mode: "bigint" }), + pmid: text("pmid"), + pmcid: text("pmcid"), +}); diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts new file mode 100644 index 000000000..390bf16c1 --- /dev/null +++ b/openalex-importer/index.ts @@ -0,0 +1,15 @@ +import "dotenv/config"; +import cron from "node-cron"; +import { runImport } from "./src/script.js"; +import { logger } from "./src/logger.js"; + +async function main() { + cron.schedule("0 0 * * *", () => { + logger.info("running a task every minute"); + runImport(); + }); +} + +main() + .then((_) => logger.info("Open Alex Import script Scheduled")) + .catch((err) => logger.info({ err }, "ERROR: data import crashed due to: ")); diff --git a/openalex-importer/log/.gitkeep b/openalex-importer/log/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 4b7c47c95..5a11c897e 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -39,6 +39,9 @@ "lodash": "^4.17.21", "node-cron": "^3.0.3", "pg": "^8.12.0", + "pino": "^9.3.2", + "pino-http": "^10.2.0", + "pino-pretty": "^11.2.2", "pm2": "^5.4.2", "zod": "^3.23.8" } diff --git a/openalex-importer/postgres/0-vector-extension.sh b/openalex-importer/postgres/0-vector-extension.sh new file mode 100644 index 000000000..dde367cbe --- /dev/null +++ b/openalex-importer/postgres/0-vector-extension.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +echo "In create extension" + +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="$POSTGRES_DB" < value.default); +const { Pool } = pg; +import { drizzle, NodePgQueryResultHKT } from "drizzle-orm/node-postgres"; +// import { Client } from "pg"; +import { DataModels } from "../transformers.js"; +import { batch, workBatch, works, worksId } from "../../drizzle/schema.js"; +import { PgTransaction } from "drizzle-orm/pg-core"; +import { eq, ExtractTablesWithRelations } from "drizzle-orm"; + +export * from "../../drizzle/schema.js"; +export * from "./types.js"; + +export const pool = new Pool({ + connectionString: process.env.DATABASE_URL, + options: "-c search_path=public", +}); + +type Schema = { + works: typeof works; + worksId: typeof worksId; +}; + +type PgTransactionType = PgTransaction< + NodePgQueryResultHKT, + Schema, + ExtractTablesWithRelations +>; + +export const saveData = async (models: DataModels) => { + const client = await pool.connect(); + const db = drizzle(client, { schema: { works, worksId } }); + + try { + // todo: try to batch similary queries + await db.transaction(async (tx) => { + const savedBatch = await tx + .insert(batch) + .values({}) + .returning({ id: batch.id }); + // Save works + await Promise.all( + models["works"].map(async (work) => { + const entry = await tx + .insert(works) + .values(work) + .onConflictDoUpdate({ target: works.id, set: work }) + .returning({ id: works.id }); + + await tx + .insert(workBatch) + .values({ + work_id: entry[0].id, + batch_id: savedBatch[0].id, + }) + .onConflictDoNothing({ target: workBatch.work_id }); + }) + ); + + // save worksIdb + await updateWorkIds(tx, models["works_id"]); + }); + console.log("Open alex data saved"); + } catch (e) { + console.log("Error Saving data to DB", e); + } finally { + // client.release(); + } +}; + +const updateWorkIds = async ( + tx: PgTransactionType, + data: DataModels["works_id"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(worksId) + .where(eq(worksId.work_id, entry.work_id)) + .limit(1); + // console.log("duplicate", duplicate); + if (duplicate.length > 0) return null; + return await tx.insert(worksId).values(entry); + }) + ); +}; diff --git a/openalex-importer/src/db/types.ts b/openalex-importer/src/db/types.ts new file mode 100644 index 000000000..d4eefa791 --- /dev/null +++ b/openalex-importer/src/db/types.ts @@ -0,0 +1,17 @@ +import { works, worksId } from "../../drizzle/schema.js"; + +// filter object fields to remove undefined fields but allow null fields +type NoUndefinedField = { + [P in keyof T]-?: NoUndefinedField; +}; + +// filter object fields to remove undefined and null fields +// type NoUndefinedAndNullField = { +// [P in keyof T]-?: NoUndefinedField>; +// }; + +// export const worksSchema = createInsertSchema(works, { doi: z.string().optional() }); +export type Works = NoUndefinedField; + +// export const worksIdSchema = createInsertSchema(worksId); +export type WorksId = NoUndefinedField; diff --git a/openalex-importer/src/logger.ts b/openalex-importer/src/logger.ts new file mode 100644 index 000000000..16da7068d --- /dev/null +++ b/openalex-importer/src/logger.ts @@ -0,0 +1,51 @@ +import { pino } from "pino"; +import { fileURLToPath } from "url"; +import path from "path"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const logLevel = process.env.PINO_LOG_LEVEL || "trace"; + +const devTransport = { + target: "pino-pretty", + level: logLevel, + options: { + colorize: true, + }, +}; + +const fileTransport = { + target: "pino/file", + options: { destination: `${__dirname}/../../log/server.log` }, + level: "trace", +}; + +console.log("[DIR NAME]::", __dirname, __filename, logLevel); + +export const logger = pino({ + level: logLevel, + serializers: { + files: omitBuffer, + }, + transport: + process.env.NODE_ENV === "production" + ? { targets: [] } + : { + targets: [devTransport, fileTransport], + }, + redact: { + paths: [], + }, +}); + +function omitBuffer(array) { + return array.map((obj) => { + const { buffer, ...rest } = obj; + return rest; + }); +} + +process.on("uncaughtException", (err) => { + logger.fatal(err, "uncaught exception"); +}); diff --git a/openalex-importer/src/script.ts b/openalex-importer/src/script.ts new file mode 100644 index 000000000..32f36da5a --- /dev/null +++ b/openalex-importer/src/script.ts @@ -0,0 +1,221 @@ +import path from "path"; +import { existsSync, mkdirSync, writeFileSync } from "fs"; +import { startOfDay, endOfDay, subDays } from "date-fns"; + +import { Work, Institution } from "./types/index.js"; +import { transformDataModel } from "./transformers.js"; +import { saveData } from "./db/index.js"; +import { logger } from "./logger.js"; + +const OPEN_ALEX_API = "https://api.openalex.org/"; + +type ApiResponse = { + meta: { + count: number; + db_response_time_ms: number; + page: number; + per_page: number; + next_cursor: string | undefined; + groups_count: number | null; + }; + results: T; +}; + +type Query = { + filter?: FilterParam; + "per-page"?: number; + cursor: string | undefined; +}; + +type FilterParam = { + from_publication_date?: string; + to_publication_date?: string; + from_created_date?: string; + from_updated_date?: string; + to_created_date?: string; + to_updated_date?: string; + has_ror?: boolean; +}; + +async function importWorks(filter?: FilterParam): Promise { + logger.info(filter, "Filter"); + try { + const url = `${OPEN_ALEX_API}/works`; + const works = await performFetch(url, { + filter: { + from_created_date: "2024-07-28", + to_created_date: "2024-07-28", + ...filter, + // from_updated_date: "2024-07-30T20:00:00.347Z", + // to_updated_date: "2024-07-30T23:29:50.347Z", + }, + "per-page": 200, + cursor: "*", + }); + logger.info({ totalWorks: works.length }, "Fetch done"); + return works; + } catch (err) { + logger.error({ err }, "ERROR::"); + return null; + } +} + +async function performFetch(url: string, searchQuery: Query): Promise { + logger.info(searchQuery, "QUERY"); + let data = []; + + const getFilter = (param: FilterParam) => { + const filter = Object.entries(param).reduce( + (queryStr, [key, value]) => + queryStr ? `${queryStr},${key}:${value}` : `${key}:${value}`, + "" + ); + return filter; + }; + + let cursor = searchQuery.cursor || true; + let roundtrip = 0; + + while (cursor) { + if (process.env.NODE_ENV === "development") { + // When running script locally, + // break loop prematurely to avoid overloading memory + if (roundtrip >= 10) break; // todo: remove line before push to prod + } + + let query = Object.entries(searchQuery).reduce((queryStr, [key, value]) => { + if (key === "filter") { + const filter = `filter=${getFilter(value as FilterParam)}`; + return queryStr ? `${queryStr}&${filter}` : filter; + } + + const param = `${key}=${value}`; + return queryStr ? `${queryStr}&${param}` : param; + }, ""); + + // logger.info("QUERY: ", query); + const request = new Request(`${url}?${query}`, { + headers: { "API-KEY": process.env.OPENALEX_API_KEY as string }, + }); + const response = (await fetch(request)) as Response; + + if (response.ok && response.status === 200) { + // logger.info("Api success: ", response.status, response.statusText); + + if (response.headers.get("content-type")?.includes("application/json")) { + const apiRes = (await response.json()) as ApiResponse; + data = data.concat(...(apiRes.results as any[])); + cursor = !!apiRes.meta?.next_cursor; + searchQuery.cursor = apiRes.meta.next_cursor; + roundtrip++; + } else { + break; + } + } else { + logger.info( + { + status: response.status, + message: response.statusText, + data: await response.json(), + }, + "Api error: " + ); + break; + } + } + + return data as T; +} + +const saveToLogs = (data: string, logFile: string) => { + const TMP_DIR = path.join(process.cwd(), "logs"); + const LOG_FILE = path.join(TMP_DIR, logFile); + if (!existsSync(TMP_DIR)) { + mkdirSync(TMP_DIR); + } + if (data) { + writeFileSync(LOG_FILE, data); + } +}; + +export const runImport = async () => { + // figure time parameters + let currentDate = new Date(); + let from_created_date = startOfDay(subDays(currentDate, 2)); + let to_created_date = endOfDay(subDays(currentDate, 2)); + + const dateFormatter = new Intl.DateTimeFormat("fr-CA", { + year: "numeric", + month: "2-digit", + day: "2-digit", + }); + const openAlexData = await importWorks({ + from_created_date: dateFormatter.format(from_created_date), + to_created_date: dateFormatter.format(to_created_date), + // from_updated_date: from_created_date.toISOString(), + // to_updated_date: to_created_date.toISOString(), + }); + + saveToLogs(JSON.stringify(openAlexData?.slice(0, 100)), "works_raw.json"); + if (!openAlexData) { + // logger issue or result + return 0; + } + + const transformedData = transformDataModel(openAlexData); + const { + authors, + authors_ids, + authorships, + works, + works_id, + works_concepts, + works_biblio, + works_locations, + works_mesh, + works_open_access, + works_primary_locations, + works_best_oa_locations, + works_referenced_works, + works_related_works, + works_topics, + } = transformedData; + + // const models = transformApiResponseToDbModel(works); + + if (process.env.NODE_ENV === "development") { + saveToLogs(JSON.stringify(authors), "authors.json"); + saveToLogs(JSON.stringify(authors_ids), "authors_ids.json"); + saveToLogs(JSON.stringify(authorships), "authorships.json"); + saveToLogs(JSON.stringify(works.slice(1, 100)), "works.json"); + saveToLogs(JSON.stringify(works_id), "works_id.json"); + saveToLogs(JSON.stringify(works_concepts), "works_concepts.json"); + saveToLogs(JSON.stringify(works_biblio), "works_biblio.json"); + saveToLogs(JSON.stringify(works_locations), "works_locations.json"); + saveToLogs( + JSON.stringify(works_best_oa_locations), + "works_best_oa_locations.json" + ); + saveToLogs(JSON.stringify(works_open_access), "works_open_access.json"); + saveToLogs(JSON.stringify(works_mesh), "works_mesh.json"); + saveToLogs( + JSON.stringify(works_primary_locations), + "works_primary_locations.json" + ); + saveToLogs( + JSON.stringify(works_referenced_works), + "works_referenced_works.json" + ); + saveToLogs(JSON.stringify(works_related_works), "works_related_works.json"); + saveToLogs(JSON.stringify(works_topics), "works_topics.json"); + } + + // const worksQueries = works.map((work) => + // prisma.works.upsert({ where: { id: work.id }, update: work, create: work }) + // ); + // const tx = await prisma.$transaction([...worksQueries]); + // logger.info("DB Transaction: ", tx.length); + await saveData(transformedData); + + return works?.length; +}; diff --git a/openalex-importer/src/transformers.ts b/openalex-importer/src/transformers.ts new file mode 100644 index 000000000..ff7b78a24 --- /dev/null +++ b/openalex-importer/src/transformers.ts @@ -0,0 +1,292 @@ +import _ from "lodash"; +import { Prisma } from "@prisma/client"; +import type { Mesh, Work } from "./types/works.js"; +import { Institution } from "./types/institutions.js"; +import type { Works, WorksId } from "./db/index.js"; + +interface ModelMap { + works: ReturnType[]; + // concepts: ReturnType[]; + // institutions: ReturnType[]; + // sources: ReturnType[]; + // authors: ReturnType[]; +} + +export const transformApiResponseToDbModel = (works: Work[]): ModelMap => { + return { + works: works.map(transformToWork), + // concepts: works.map(transformToWork), + // institutions: works.map(transformToWork), + // authors: works.map(transformToWork), + // sources: works.map(transformToWork), + }; +}; + +export const transformToWork = (data: Work): Works => { + return { + id: data.id, + doi: data.doi, + title: data.title, + display_name: data.display_name, + publication_date: data.publication_date, + publication_year: data.publication_year, + type: data.type, + cited_by_count: data.cited_by_count, + is_retracted: data.is_retracted, + is_paratext: data.is_paratext, + cited_by_api_url: data.cited_by_api_url, + abstract_inverted_index: data.abstract_inverted_index, + language: data.language, + publication_date_date: data.publication_date, + }; +}; + +export const transformDataModel = (data: Work[]) => { + const works = data.map(transformToWork); + + const authorship_data = data.map((work) => { + let authors = work.authorships.map((data) => data.author); + const authors_ids: Prisma.authors_idsCreateManyInput[] = + work.authorships.map((authorship) => ({ + author_id: authorship.author.id, + openalex: authorship.author.id, + orcid: authorship.author.orcid ?? null, + twitter: authorship.author.twitter ?? null, + scopus: authorship.author.scopus ?? null, + wikipedia: authorship.author.wikipedia ?? null, + mag: authorship.author.mag ?? null, + })); + const works_authorships: { + work_id?: string; + author_position?: string; + author_id?: string; + institution_id?: string; + raw_affiliation_string?: string; + }[] = []; + const institutions: Institution[] = []; + for (let authorship of work.authorships) { + for (let institution of authorship.institutions) { + works_authorships.push({ + work_id: work.id, + author_position: authorship.author_position, + author_id: authorship.author.id, + institution_id: institution.id, + }); + institutions.push(institution); + } + } + return { authors, authors_ids, works_authorships, institutions }; + }); + + const works_biblio: Prisma.works_biblioCreateManyInput[] = data.map( + (work) => ({ ...work.biblio, work_id: work.id }) + ); + + const works_id: WorksId[] = data.map((work) => ({ + ...work.ids, + work_id: work.id, + })); + + const works_concepts = _.flatten( + data.map((work) => + work.concepts.map((concept) => ({ + work_id: work.id, + concept_id: concept.id, + score: concept.score, + })) + ) + ); + + const works_topics = _.flatten( + data.map((work) => + work.topics.map((topic) => ({ + work_id: work.id, + topic_id: topic.id, + score: topic.score, + })) + ) + ); + + const works_locations = _.flatten( + data.map((work) => + work.locations.map((location) => ({ + work_id: work.id, + source_id: location.source?.id, + landing_page_url: location.landing_page_url, + pdf_url: location.pdf_url, + is_oa: location.is_oa, + version: location.version, + license: location.license, + })) + ) + ); + + const works_mesh = _.flatten( + data.map((work) => + work.mesh.map( + (mesh) => + ({ + work_id: work.id, + descriptor_name: mesh.descriptor_name, + descriptor_ui: mesh.descriptor_ui, + qualifier_name: mesh.qualifier_name, + qualifier_ui: mesh.qualifier_ui, + is_major_topic: mesh.is_major_topic, + } as Mesh) + ) + ) + ); + + const works_primary_locations = data + .map((work) => + work.primary_location + ? { + source_id: work.primary_location.source?.id, + landing_page_url: work.primary_location?.landing_page_url, + pdf_url: work.primary_location.pdf_url, + is_oa: work.primary_location.is_oa, + version: work.primary_location.version, + license: work.primary_location.license, + work_id: work.id, + } + : null + ) + .filter(Boolean); + + const works_best_oa_locations = data + .map((work) => + work?.best_oa_location + ? { + source_id: work.best_oa_location.source?.id, + landing_page_url: work.best_oa_location.landing_page_url, + pdf_url: work.best_oa_location.pdf_url, + is_oa: work.best_oa_location.is_oa, + version: work.best_oa_location.version, + license: work.best_oa_location.license, + work_id: work.id, + } + : null + ) + .filter(Boolean); + + const works_open_access = data.map((work) => ({ + ...work.open_access, + work_id: work.id, + })); + + const works_related_works = _.flatten( + data.map((work) => + work.related_works.map((related_work_id) => ({ + work_id: work.id, + related_work_id, + })) + ) + ); + + const works_referenced_works = _.flatten( + data.map((work) => + work.referenced_works.map((referenced_work_id) => ({ + work_id: work.id, + referenced_work_id, + })) + ) + ); + + // group unique authors + let all_authors = _.flatten(authorship_data.map((data) => data.authors)); + let authors: Prisma.authorsCreateManyInput[] = _(all_authors) + .groupBy((x) => x.id) + .map( + (values, key) => + ({ + id: key, + orcid: values[0].orcid, + display_name: values[0].display_name, + } as Prisma.authorsCreateManyInput) + ) + .value(); + + // group unique authors + let all_author_ids = _.flatten( + authorship_data.map((data) => data.authors_ids) + ); + + let authors_ids: Prisma.authors_idsCreateManyInput[] = _(all_author_ids) + .groupBy((x) => x.author_id) + .map( + (values, key) => + ({ + author_id: key, + openalex: key, + orcid: values[0].orcid, + twitter: values[0].twitter, + scopus: values[0].scopus, + wikipedia: values[0].wikipedia, + mag: values[0].mag, + } as Prisma.authors_idsCreateManyInput) + ) + .value(); + + // group unique institutions + // let all_institutions = _.flatten( + // authorship_data.map((data) => data.institutions) + // ); + // let institutions: Prisma.institutionsCreateManyInput[] = _(all_institutions) + // .groupBy((x) => x.id) + // .map( + // (values, key) => + // ({ + // ...values[0], + // id: key, + // } as Prisma.institutionsCreateManyInput) + // ) + // .value(); + + // let all_institutions_ids = all_institutions + // .map((institution) => + // institution.ids + // ? { + // ...institution.ids, + // institution_id: institution.id, + // } + // : null + // ) + // .filter(Boolean) as (Institution["ids"] & { + // institution_id: string; + // })[]; + + // let institutions_ids: Prisma.institutions_idsCreateManyInput[] = _( + // all_institutions_ids + // ) + // // .groupBy((x) => x.institution_id) + // .map( + // (values, key) => + // ({ + // ...values[0], + // institution_id: key, + // } as Prisma.institutions_idsCreateManyInput) + // ) + // .value(); + + return { + authors, + authorships: _.flatten( + authorship_data.map((data) => data.works_authorships) + ), + authors_ids, + works, + works_id, + works_biblio, + works_concepts, + works_topics, + works_locations, + works_mesh, + works_open_access, + works_primary_locations, + works_referenced_works, + works_related_works, + works_best_oa_locations, + }; +}; + +export type DataModels = ReturnType; diff --git a/openalex-importer/src/types/index.ts b/openalex-importer/src/types/index.ts new file mode 100644 index 000000000..9766b7245 --- /dev/null +++ b/openalex-importer/src/types/index.ts @@ -0,0 +1,2 @@ +export * from "./works.js"; +export * from "./institutions.js"; diff --git a/openalex-importer/src/types/institutions.ts b/openalex-importer/src/types/institutions.ts new file mode 100644 index 000000000..055f2b519 --- /dev/null +++ b/openalex-importer/src/types/institutions.ts @@ -0,0 +1,226 @@ +export interface Institution { + id: string; + ror: string; + display_name: string; + country_code: string; + type: string; + type_id: string; + lineage: string[]; + homepage_url: string; + image_url: string; + image_thumbnail_url: string; + display_name_acronyms: string[]; + display_name_alternatives: string[]; + repositories: Repository[]; + works_count: number; + cited_by_count: number; + summary_stats: SummaryStats; + ids: Ids; + geo: Geo; + international: International; + associated_institutions: AssociatedInstitution[]; + counts_by_year: CountsByYear[]; + roles: Role[]; + topics: Topic[]; + topic_share: TopicShare[]; + x_concepts: XConcept[]; + is_super_system: boolean; + works_api_url: string; + updated_date: string; + created_date: string; +} + +export interface Repository { + id: string; + display_name: string; + host_organization: string; + host_organization_name: string; + host_organization_lineage: string[]; +} + +export interface SummaryStats { + "2yr_mean_citedness": number; + h_index: number; + i10_index: number; +} + +export interface Ids { + openalex?: string; + ror?: string; + mag?: number; + grid?: string; + wikipedia?: string; + wikidata?: string; +} + +export interface Geo { + city: string; + geonames_city_id: string; + region: any; + country_code: string; + country: string; + latitude: number; + longitude: number; +} + +export interface International { + display_name: DisplayName; +} + +export interface DisplayName { + ar: string; + arz: string; + ast: string; + az: string; + azb: string; + ba: string; + be: string; + "be-tarask": string; + bg: string; + bn: string; + br: string; + ca: string; + ckb: string; + crh: string; + "crh-latn": string; + cs: string; + cy: string; + da: string; + de: string; + el: string; + en: string; + "en-gb": string; + eo: string; + es: string; + et: string; + eu: string; + fa: string; + fi: string; + fr: string; + ga: string; + gd: string; + gl: string; + gv: string; + he: string; + hu: string; + hy: string; + hyw: string; + id: string; + io: string; + is: string; + it: string; + ja: string; + jv: string; + ka: string; + ko: string; + kw: string; + ky: string; + la: string; + lb: string; + lt: string; + lv: string; + mk: string; + ml: string; + mr: string; + ms: string; + mt: string; + nb: string; + nl: string; + nn: string; + pa: string; + pap: string; + pl: string; + pms: string; + pnb: string; + pt: string; + ro: string; + ru: string; + rw: string; + sh: string; + sl: string; + sr: string; + sv: string; + ta: string; + tg: string; + th: string; + tl: string; + tr: string; + tt: string; + ug: string; + uk: string; + ur: string; + vi: string; + war: string; + wuu: string; + xmf: string; + yue: string; + zh: string; + "zh-cn": string; + "zh-hans": string; + "zh-hant": string; + "zh-hk": string; + "zh-sg": string; + "zh-tw": string; +} + +export interface AssociatedInstitution { + id: string; + ror: string; + display_name: string; + country_code: string; + type: string; + relationship: string; +} + +export interface CountsByYear { + year: number; + works_count: number; + cited_by_count: number; +} + +export interface Role { + role: string; + id: string; + works_count: number; +} + +export interface Topic { + id: string; + display_name: string; + count: number; + subfield: Subfield; + field: Field; + domain: Domain; +} + +export interface Subfield { + id: string; + display_name: string; +} + +export interface Field { + id: string; + display_name: string; +} + +export interface Domain { + id: string; + display_name: string; +} + +export interface TopicShare { + id: string; + display_name: string; + value: number; + subfield: Subfield; + field: Field; + domain: Domain; +} + +export interface XConcept { + id: string; + wikidata: string; + display_name: string; + level: number; + score: number; +} diff --git a/openalex-importer/src/types/works.ts b/openalex-importer/src/types/works.ts new file mode 100644 index 000000000..ba7399c9b --- /dev/null +++ b/openalex-importer/src/types/works.ts @@ -0,0 +1,180 @@ +import { Institution } from "./institutions.js"; + +export interface Work { + id: string; + doi: string; + title: string; + display_name: string; + publication_year: number; + publication_date: string; + ids: Ids; + language: string; + primary_location: PrimaryLocation; + type: string; + type_crossref: string; + indexed_in: string[]; + open_access: OpenAccess; + authorships: Authorship[]; + countries_distinct_count: number; + institutions_distinct_count: number; + corresponding_author_ids: any[]; + corresponding_institution_ids: any[]; + apc_list: any; + apc_paid: any; + fwci: number; + has_fulltext: boolean; + fulltext_origin: string; + cited_by_count: number; + cited_by_percentile_year: CitedByPercentileYear; + biblio: Biblio; + is_retracted: boolean; + is_paratext: boolean; + primary_topic: any; + topics: any[]; + keywords: any[]; + concepts: Concept[]; + mesh: Mesh[]; + locations_count: number; + locations: Location[]; + best_oa_location: BestOaLocation; + sustainable_development_goals: any[]; + grants: any[]; + datasets: any[]; + versions: any[]; + referenced_works_count: number; + referenced_works: any[]; + related_works: string[]; + ngrams_url: string; + abstract_inverted_index: any; + cited_by_api_url: string; + counts_by_year: CountsByYear[]; + updated_date: string; + created_date: string; +} + +interface Ids { + openalex: string; + doi: string | null; + mag: bigint | null; + pmid: string | null; + pmcid: string | null; +} + +interface PrimaryLocation { + is_oa: boolean; + landing_page_url: string; + pdf_url: string; + source: Source; + license: string; + license_id: string; + version: string; + is_accepted: boolean; + is_published: boolean; +} + +interface Source { + id: string; + display_name: string; + issn_l: any; + issn: any; + is_oa: boolean; + is_in_doaj: boolean; + is_core: boolean; + host_organization: any; + host_organization_name: any; + host_organization_lineage: any[]; + host_organization_lineage_names: any[]; + type: string; +} + +export interface OpenAccess { + is_oa: boolean; + oa_status: string; + oa_url: string; + any_repository_has_fulltext: boolean; +} + +export interface Authorship { + author_position: string; + author: Author; + institutions: Institution[]; + countries: any[]; + is_corresponding: boolean; + raw_author_name: string; + raw_affiliation_strings: any[]; + affiliations: any[]; +} + +export interface Author { + id: string; + display_name: string; + orcid: string | null; + twitter: string | null; + scopus: string | null; + wikipedia: string | null; + mag: number | null; +} + +interface CitedByPercentileYear { + min: number; + max: number; +} + +interface Biblio { + volume: any; + issue: any; + first_page: string; + last_page: string; +} + +interface Concept { + id: string; + wikidata: string | null; + display_name: string | null; + level: number | null; + score: number | null; + description: string | null; + works_count: number | null; + cited_by_count: number | null; + image_url: string | null; + image_thumbnail_url: string | null; + works_api_url: string | null; + updated_date: string | null; +} + +interface Location { + is_oa: boolean; + landing_page_url: string; + pdf_url: string; + source: Source; + license: string; + license_id: string; + version: string; + is_accepted: boolean; + is_published: boolean; +} + +interface BestOaLocation { + is_oa: boolean; + landing_page_url: string; + pdf_url: string; + source: Source; + license: string; + license_id: string; + version: string; + is_accepted: boolean; + is_published: boolean; +} + +interface CountsByYear { + year: number; + cited_by_count: number; +} + +export interface Mesh { + descriptor_ui: string; + descriptor_name: string; + qualifier_ui: string; + qualifier_name: string; + is_major_topic: boolean; +} diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index c1ab3f80e..906b226ad 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -377,6 +377,13 @@ pg-protocol "*" pg-types "^4.0.1" +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + acorn-walk@^8.1.1: version "8.3.3" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" @@ -486,6 +493,11 @@ async@^3.2.0, async@~3.2.0: resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -498,6 +510,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + basic-ftp@^5.0.2: version "5.0.5" resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" @@ -538,6 +555,14 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -617,6 +642,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^2.0.7: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + commander@2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -690,6 +720,11 @@ date-fns@^3.6.0: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf" integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww== +dateformat@^4.6.3: + version "4.6.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" + integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== + dayjs@~1.11.5: version "1.11.12" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" @@ -777,6 +812,13 @@ drizzle-zod@^0.5.1: resolved "https://registry.yarnpkg.com/drizzle-zod/-/drizzle-zod-0.5.1.tgz#4e5efe016dce22ed01063f72f839b07670b2d11e" integrity sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A== +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + enquirer@2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -980,6 +1022,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + eventemitter2@5.0.1, eventemitter2@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-5.0.1.tgz#6197a095d5fb6b57e8942f6fd7eaad63a09c9452" @@ -995,6 +1042,11 @@ eventemitter2@~0.4.14: resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" integrity sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ== +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + extrareqp2@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extrareqp2/-/extrareqp2-1.0.0.tgz#aaf8ad1495d723f71276b0eab041c061aa21f035" @@ -1002,11 +1054,26 @@ extrareqp2@^1.0.0: dependencies: follow-redirects "^1.14.0" +fast-copy@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.2.tgz#59c68f59ccbcac82050ba992e0d5c389097c9d35" + integrity sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ== + fast-json-patch@^3.0.0-1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== +fast-redact@^3.1.1: + version "3.5.0" + resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.5.0.tgz#e9ea02f7e57d0cd8438180083e93077e496285e4" + integrity sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A== + +fast-safe-stringify@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fclone@1.0.11, fclone@~1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/fclone/-/fclone-1.0.11.tgz#10e85da38bfea7fc599341c296ee1d77266ee640" @@ -1065,6 +1132,11 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" @@ -1185,6 +1257,11 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: dependencies: function-bind "^1.1.2" +help-me@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/help-me/-/help-me-5.0.0.tgz#b1ebe63b967b74060027c2ac61f9be12d354a6f6" + integrity sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg== + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -1213,6 +1290,11 @@ iconv-lite@^0.4.4: dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore-by-default@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" @@ -1383,6 +1465,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +joycon@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" + integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== + js-git@^0.7.8: version "0.7.8" resolved "https://registry.yarnpkg.com/js-git/-/js-git-0.7.8.tgz#52fa655ab61877d6f1079efc6534b554f31e5444" @@ -1473,6 +1560,11 @@ minimatch@^3.0.4, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + mkdirp@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -1603,6 +1695,18 @@ obuf@~1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== +on-exit-leak-free@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8" + integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + pac-proxy-agent@^7.0.1: version "7.0.2" resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" @@ -1758,6 +1862,66 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== +pino-abstract-transport@^1.0.0, pino-abstract-transport@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz#97f9f2631931e242da531b5c66d3079c12c9d1b5" + integrity sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q== + dependencies: + readable-stream "^4.0.0" + split2 "^4.0.0" + +pino-http@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/pino-http/-/pino-http-10.2.0.tgz#157b799e84ee4f6fe5a862fa3758f10d25376fed" + integrity sha512-am03BxnV3Ckx68OkbH0iZs3indsrH78wncQ6w1w51KroIbvJZNImBKX2X1wjdY8lSyaJ0UrX/dnO2DY3cTeCRw== + dependencies: + get-caller-file "^2.0.5" + pino "^9.0.0" + pino-std-serializers "^7.0.0" + process-warning "^3.0.0" + +pino-pretty@^11.2.2: + version "11.2.2" + resolved "https://registry.yarnpkg.com/pino-pretty/-/pino-pretty-11.2.2.tgz#5e8ec69b31e90eb187715af07b1d29a544e60d39" + integrity sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A== + dependencies: + colorette "^2.0.7" + dateformat "^4.6.3" + fast-copy "^3.0.2" + fast-safe-stringify "^2.1.1" + help-me "^5.0.0" + joycon "^3.1.1" + minimist "^1.2.6" + on-exit-leak-free "^2.1.0" + pino-abstract-transport "^1.0.0" + pump "^3.0.0" + readable-stream "^4.0.0" + secure-json-parse "^2.4.0" + sonic-boom "^4.0.1" + strip-json-comments "^3.1.1" + +pino-std-serializers@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz#7c625038b13718dbbd84ab446bd673dc52259e3b" + integrity sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA== + +pino@^9.0.0, pino@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/pino/-/pino-9.3.2.tgz#a530d6d28f1d954b6f54416a218cbb616f52f901" + integrity sha512-WtARBjgZ7LNEkrGWxMBN/jvlFiE17LTbBoH0konmBU684Kd0uIiDwBXlcTCW7iJnA6HfIKwUssS/2AC6cDEanw== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.1.1" + on-exit-leak-free "^2.1.0" + pino-abstract-transport "^1.2.0" + pino-std-serializers "^7.0.0" + process-warning "^4.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^4.0.1" + thread-stream "^3.0.0" + pm2-axon-rpc@~0.7.0, pm2-axon-rpc@~0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/pm2-axon-rpc/-/pm2-axon-rpc-0.7.1.tgz#2daec5383a63135b3f18babb70266dacdcbc429a" @@ -1892,6 +2056,21 @@ postgres-range@^1.1.1: resolved "https://registry.yarnpkg.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== +process-warning@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-3.0.0.tgz#96e5b88884187a1dce6f5c3166d611132058710b" + integrity sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ== + +process-warning@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-4.0.0.tgz#581e3a7a1fb456c5f4fd239f76bce75897682d5a" + integrity sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + promptly@^2: version "2.2.0" resolved "https://registry.yarnpkg.com/promptly/-/promptly-2.2.0.tgz#2a13fa063688a2a5983b161fff0108a07d26fc74" @@ -1923,6 +2102,19 @@ pstree.remy@^1.1.8: resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -1939,6 +2131,17 @@ read@^1.0.4: dependencies: mute-stream "~0.0.4" +readable-stream@^4.0.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -1946,6 +2149,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +real-require@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78" + integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== + regexp.prototype.flags@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" @@ -1994,7 +2202,7 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.2.1: +safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -2008,6 +2216,11 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" +safe-stable-stringify@^2.3.1: + version "2.4.3" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" + integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -2018,6 +2231,11 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== +secure-json-parse@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" + integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== + "semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" @@ -2128,6 +2346,13 @@ socks@^2.8.3: ip-address "^9.0.5" smart-buffer "^4.2.0" +sonic-boom@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-4.0.1.tgz#515b7cef2c9290cb362c4536388ddeece07aed30" + integrity sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ== + dependencies: + atomic-sleep "^1.0.0" + source-map-support@0.5.21, source-map-support@^0.5.21: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -2167,7 +2392,7 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326" integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== -split2@^4.1.0: +split2@^4.0.0, split2@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== @@ -2220,11 +2445,23 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" +string_decoder@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -2249,6 +2486,13 @@ systeminformation@^5.7: resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.22.11.tgz#42be7b650ce0a8b940c06219a6647f6ab3f7a349" integrity sha512-aLws5yi4KCHTb0BVvbodQY5bY8eW4asMRDTxTW46hqw9lGjACX6TlLdJrkdoHYRB0qs+MekqEq1zG7WDnWE8Ug== +thread-stream@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1" + integrity sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A== + dependencies: + real-require "^0.2.0" + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -2438,6 +2682,11 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + ws@^7.0.0, ws@~7.5.10: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" From 775388f21792ae592703dfffc76db357255b2adb Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Wed, 31 Jul 2024 02:49:19 +0100 Subject: [PATCH 07/20] add support for more tables --- openalex-importer/drizzle.config.ts | 5 +- .../drizzle/0000_many_franklin_storm.sql | 51 - .../drizzle/0000_youthful_randall.sql | 348 +++ .../drizzle/meta/0000_snapshot.json | 2002 ++++++++++++++++- openalex-importer/drizzle/meta/_journal.json | 4 +- openalex-importer/drizzle/old.schema.ts | 62 + openalex-importer/drizzle/relations.ts | 3 + openalex-importer/drizzle/schema.ts | 582 ++++- openalex-importer/index.ts | 5 +- openalex-importer/package.json | 7 +- .../postgres/sql/create_tables.sql | 7 +- openalex-importer/src/db/index.ts | 278 ++- openalex-importer/src/db/types.ts | 24 +- openalex-importer/src/script.ts | 15 +- openalex-importer/src/transformers.ts | 81 +- openalex-importer/src/types/works.ts | 20 +- openalex-importer/yarn.lock | 18 +- 17 files changed, 3234 insertions(+), 278 deletions(-) delete mode 100644 openalex-importer/drizzle/0000_many_franklin_storm.sql create mode 100644 openalex-importer/drizzle/0000_youthful_randall.sql create mode 100644 openalex-importer/drizzle/old.schema.ts create mode 100644 openalex-importer/drizzle/relations.ts diff --git a/openalex-importer/drizzle.config.ts b/openalex-importer/drizzle.config.ts index 1a266a38f..ac86d8a2f 100644 --- a/openalex-importer/drizzle.config.ts +++ b/openalex-importer/drizzle.config.ts @@ -14,10 +14,11 @@ export default defineConfig({ resourceArn: "", ssl: false, }, + schemaFilter: ["openalex", "public"], migrations: { table: "__migrations__", schema: "public", }, - // verbose: true, - // strict: true, + verbose: true, + strict: true, }); diff --git a/openalex-importer/drizzle/0000_many_franklin_storm.sql b/openalex-importer/drizzle/0000_many_franklin_storm.sql deleted file mode 100644 index d714c14de..000000000 --- a/openalex-importer/drizzle/0000_many_franklin_storm.sql +++ /dev/null @@ -1,51 +0,0 @@ -CREATE TABLE IF NOT EXISTS "openalex"."batch" ( - "id" serial PRIMARY KEY NOT NULL, - "createdAt" timestamp, - "updatedAt" timestamp -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "openalex"."works_batch" ( - "work_id" text NOT NULL, - "batch_id" text NOT NULL, - "createdAt" timestamp, - "updatedAt" timestamp, - CONSTRAINT "works_batch_work_id_unique" UNIQUE("work_id"), - CONSTRAINT "works_batch_batch_id_unique" UNIQUE("batch_id") -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "openalex"."works" ( - "id" text PRIMARY KEY NOT NULL, - "doi" text, - "title" text, - "display_name" text, - "publication_year" integer, - "publication_date" date, - "type" text, - "cited_by_count" integer, - "is_retracted" boolean, - "is_paratext" boolean, - "cited_by_api_url" text, - "abstract_inverted_index" json, - "language" text -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "openalex"."works_ids" ( - "work_id" text NOT NULL, - "openalex" text, - "doi" text, - "mag" bigint, - "pmid" text, - "pmcid" text -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "openalex"."works_batch" ADD CONSTRAINT "works_batch_work_id_works_id_fk" FOREIGN KEY ("work_id") REFERENCES "openalex"."works"("id") ON DELETE set null ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "openalex"."works_batch" ADD CONSTRAINT "works_batch_batch_id_batch_id_fk" FOREIGN KEY ("batch_id") REFERENCES "openalex"."batch"("id") ON DELETE set null ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/openalex-importer/drizzle/0000_youthful_randall.sql b/openalex-importer/drizzle/0000_youthful_randall.sql new file mode 100644 index 000000000..7db7fed8e --- /dev/null +++ b/openalex-importer/drizzle/0000_youthful_randall.sql @@ -0,0 +1,348 @@ +-- Current sql file was generated after introspecting the database +-- If you want to run this migration please uncomment this code before executing migrations +/* +CREATE SCHEMA "openalex"; +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."institutions_geo" ( + "institution_id" text NOT NULL, + "city" text, + "geonames_city_id" text, + "region" text, + "country_code" text, + "country" text, + "latitude" real, + "longitude" real +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."institutions_ids" ( + "institution_id" text NOT NULL, + "openalex" text, + "ror" text, + "grid" text, + "wikipedia" text, + "wikidata" text, + "mag" bigint +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."publishers" ( + "id" text NOT NULL, + "display_name" text, + "alternate_titles" json, + "country_codes" json, + "hierarchy_level" integer, + "parent_publisher" text, + "works_count" integer, + "cited_by_count" integer, + "sources_api_url" text, + "updated_date" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."publishers_counts_by_year" ( + "publisher_id" text NOT NULL, + "year" integer NOT NULL, + "works_count" integer, + "cited_by_count" integer, + "oa_works_count" integer +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."publishers_ids" ( + "publisher_id" text, + "openalex" text, + "ror" text, + "wikidata" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."institutions_associated_institutions" ( + "institution_id" text, + "associated_institution_id" text, + "relationship" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_primary_locations" ( + "work_id" text, + "source_id" text, + "landing_page_url" text, + "pdf_url" text, + "is_oa" boolean, + "version" text, + "license" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works" ( + "id" text NOT NULL, + "doi" text, + "title" text, + "display_name" text, + "publication_year" integer, + "publication_date" text, + "type" text, + "cited_by_count" integer, + "is_retracted" boolean, + "is_paratext" boolean, + "cited_by_api_url" text, + "abstract_inverted_index" json, + "language" text, + "publication_date_date" date +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."institutions" ( + "id" text NOT NULL, + "ror" text, + "display_name" text, + "country_code" text, + "type" text, + "homepage_url" text, + "image_url" text, + "image_thumbnail_url" text, + "display_name_acronyms" json, + "display_name_alternatives" json, + "works_count" integer, + "cited_by_count" integer, + "works_api_url" text, + "updated_date" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."institutions_counts_by_year" ( + "institution_id" text NOT NULL, + "year" integer NOT NULL, + "works_count" integer, + "cited_by_count" integer, + "oa_works_count" integer +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."sources" ( + "id" text NOT NULL, + "issn_l" text, + "issn" json, + "display_name" text, + "publisher" text, + "works_count" integer, + "cited_by_count" integer, + "is_oa" boolean, + "is_in_doaj" boolean, + "homepage_url" text, + "works_api_url" text, + "updated_date" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."sources_counts_by_year" ( + "source_id" text NOT NULL, + "year" integer NOT NULL, + "works_count" integer, + "cited_by_count" integer, + "oa_works_count" integer +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_biblio" ( + "work_id" text NOT NULL, + "volume" text, + "issue" text, + "first_page" text, + "last_page" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_concepts" ( + "work_id" text, + "concept_id" text, + "score" real +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_ids" ( + "work_id" text NOT NULL, + "openalex" text, + "doi" text, + "mag" bigint, + "pmid" text, + "pmcid" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_mesh" ( + "work_id" text, + "descriptor_ui" text, + "descriptor_name" text, + "qualifier_ui" text, + "qualifier_name" text, + "is_major_topic" boolean +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_open_access" ( + "work_id" text NOT NULL, + "is_oa" boolean, + "oa_status" text, + "oa_url" text, + "any_repository_has_fulltext" boolean +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."sources_ids" ( + "source_id" text, + "openalex" text, + "issn_l" text, + "issn" json, + "mag" bigint, + "wikidata" text, + "fatcat" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_locations" ( + "work_id" text, + "source_id" text, + "landing_page_url" text, + "pdf_url" text, + "is_oa" boolean, + "version" text, + "license" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_referenced_works" ( + "work_id" text, + "referenced_work_id" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_related_works" ( + "work_id" text, + "related_work_id" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_topics" ( + "work_id" text, + "topic_id" text, + "score" real +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."authors" ( + "id" text NOT NULL, + "orcid" text, + "display_name" text, + "display_name_alternatives" json, + "works_count" integer, + "cited_by_count" integer, + "last_known_institution" text, + "works_api_url" text, + "updated_date" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."authors_counts_by_year" ( + "author_id" text NOT NULL, + "year" integer NOT NULL, + "works_count" integer, + "cited_by_count" integer, + "oa_works_count" integer +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."authors_ids" ( + "author_id" text NOT NULL, + "openalex" text, + "orcid" text, + "scopus" text, + "twitter" text, + "wikipedia" text, + "mag" bigint +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."topics" ( + "id" text NOT NULL, + "display_name" text, + "subfield_id" text, + "subfield_display_name" text, + "field_id" text, + "field_display_name" text, + "domain_id" text, + "domain_display_name" text, + "description" text, + "keywords" text, + "works_api_url" text, + "wikipedia_id" text, + "works_count" integer, + "cited_by_count" integer, + "updated_date" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."concepts" ( + "id" text NOT NULL, + "wikidata" text, + "display_name" text, + "level" integer, + "description" text, + "works_count" integer, + "cited_by_count" integer, + "image_url" text, + "image_thumbnail_url" text, + "works_api_url" text, + "updated_date" timestamp, + "descriptions_embeddings" vector(768), + "name_embeddings" vector(768) +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."concepts_ancestors" ( + "concept_id" text, + "ancestor_id" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."concepts_counts_by_year" ( + "concept_id" text NOT NULL, + "year" integer NOT NULL, + "works_count" integer, + "cited_by_count" integer, + "oa_works_count" integer +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_authorships" ( + "work_id" text, + "author_position" text, + "author_id" text, + "institution_id" text, + "raw_affiliation_string" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_best_oa_locations" ( + "work_id" text, + "source_id" text, + "landing_page_url" text, + "pdf_url" text, + "is_oa" boolean, + "version" text, + "license" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."concepts_ids" ( + "concept_id" text NOT NULL, + "openalex" text, + "wikidata" text, + "wikipedia" text, + "umls_aui" json, + "umls_cui" json, + "mag" bigint +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."concepts_related_concepts" ( + "concept_id" text, + "related_concept_id" text, + "score" real +); +--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_primary_locations_work_id_idx" ON "openalex"."works_primary_locations" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_publication_date_idx" ON "openalex"."works" USING btree ("publication_date" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_concepts_concept_id_idx" ON "openalex"."works_concepts" USING btree ("concept_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_concepts_work_id_idx" ON "openalex"."works_concepts" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_mesh_descriptor_ui_idx" ON "openalex"."works_mesh" USING btree ("descriptor_ui" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_mesh_qualifier_ui_idx" ON "openalex"."works_mesh" USING btree ("qualifier_ui" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_mesh_work_id_idx" ON "openalex"."works_mesh" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_open_access_work_id_idx" ON "openalex"."works_open_access" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_open_access_work_id_idx1" ON "openalex"."works_open_access" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_locations_work_id_idx" ON "openalex"."works_locations" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_referenced_works_referenced_work_id_idx" ON "openalex"."works_referenced_works" USING btree ("referenced_work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_referenced_works_work_id_idx" ON "openalex"."works_referenced_works" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_related_works_related_work_id_idx" ON "openalex"."works_related_works" USING btree ("related_work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_related_works_work_id_idx" ON "openalex"."works_related_works" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_topics_topic_id_idx" ON "openalex"."works_topics" USING btree ("topic_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_topics_work_id_idx" ON "openalex"."works_topics" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "concepts_descriptions_embeddings_idx" ON "openalex"."concepts" USING ivfflat ("descriptions_embeddings" vector_l2_ops) WITH (lists=100);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "concepts_name_embeddings_idx" ON "openalex"."concepts" USING ivfflat ("name_embeddings" vector_l2_ops) WITH (lists=100);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "concepts_ancestors_concept_id_idx" ON "openalex"."concepts_ancestors" USING btree ("concept_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_authorships_author_id_idx" ON "openalex"."works_authorships" USING btree ("author_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_authorships_institution_id_idx" ON "openalex"."works_authorships" USING btree ("institution_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_authorships_work_id_idx" ON "openalex"."works_authorships" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "works_best_oa_locations_work_id_idx" ON "openalex"."works_best_oa_locations" USING btree ("work_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "concepts_related_concepts_concept_id_idx" ON "openalex"."concepts_related_concepts" USING btree ("concept_id" text_ops);--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "concepts_related_concepts_related_concept_id_idx" ON "openalex"."concepts_related_concepts" USING btree ("related_concept_id" text_ops); +*/ \ No newline at end of file diff --git a/openalex-importer/drizzle/meta/0000_snapshot.json b/openalex-importer/drizzle/meta/0000_snapshot.json index 2b27a99ef..99c75dba1 100644 --- a/openalex-importer/drizzle/meta/0000_snapshot.json +++ b/openalex-importer/drizzle/meta/0000_snapshot.json @@ -1,27 +1,179 @@ { - "id": "eae2fc6f-fe08-442d-9153-9dce133285e6", - "prevId": "00000000-0000-0000-0000-000000000000", + "id": "00000000-0000-0000-0000-000000000000", + "prevId": "", "version": "7", "dialect": "postgresql", "tables": { - "openalex.batch": { - "name": "batch", + "openalex.institutions_geo": { + "name": "institutions_geo", + "schema": "openalex", + "columns": { + "institution_id": { + "name": "institution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "city": { + "name": "city", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "geonames_city_id": { + "name": "geonames_city_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "country": { + "name": "country", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "latitude": { + "name": "latitude", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "longitude": { + "name": "longitude", + "type": "real", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.institutions_ids": { + "name": "institutions_ids", + "schema": "openalex", + "columns": { + "institution_id": { + "name": "institution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ror": { + "name": "ror", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "grid": { + "name": "grid", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikipedia": { + "name": "wikipedia", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikidata": { + "name": "wikidata", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mag": { + "name": "mag", + "type": "bigint", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.publishers": { + "name": "publishers", "schema": "openalex", "columns": { "id": { "name": "id", - "type": "serial", - "primaryKey": true, + "type": "text", + "primaryKey": false, "notNull": true }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "alternate_titles": { + "name": "alternate_titles", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "country_codes": { + "name": "country_codes", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "hierarchy_level": { + "name": "hierarchy_level", + "type": "integer", "primaryKey": false, "notNull": false }, - "updatedAt": { - "name": "updatedAt", + "parent_publisher": { + "name": "parent_publisher", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sources_api_url": { + "name": "sources_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_date": { + "name": "updated_date", "type": "timestamp", "primaryKey": false, "notNull": false @@ -32,83 +184,176 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "openalex.works_batch": { - "name": "works_batch", + "openalex.publishers_counts_by_year": { + "name": "publishers_counts_by_year", "schema": "openalex", "columns": { - "work_id": { - "name": "work_id", + "publisher_id": { + "name": "publisher_id", "type": "text", "primaryKey": false, "notNull": true }, - "batch_id": { - "name": "batch_id", - "type": "text", + "year": { + "name": "year", + "type": "integer", "primaryKey": false, "notNull": true }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", + "works_count": { + "name": "works_count", + "type": "integer", "primaryKey": false, "notNull": false }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "oa_works_count": { + "name": "oa_works_count", + "type": "integer", "primaryKey": false, "notNull": false } }, "indexes": {}, - "foreignKeys": { - "works_batch_work_id_works_id_fk": { - "name": "works_batch_work_id_works_id_fk", - "tableFrom": "works_batch", - "tableTo": "works", - "schemaTo": "openalex", - "columnsFrom": [ - "work_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "works_batch_batch_id_batch_id_fk": { - "name": "works_batch_batch_id_batch_id_fk", - "tableFrom": "works_batch", - "tableTo": "batch", - "schemaTo": "openalex", - "columnsFrom": [ - "batch_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.publishers_ids": { + "name": "publishers_ids", + "schema": "openalex", + "columns": { + "publisher_id": { + "name": "publisher_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ror": { + "name": "ror", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikidata": { + "name": "wikidata", + "type": "text", + "primaryKey": false, + "notNull": false } }, + "indexes": {}, + "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": { - "works_batch_work_id_unique": { - "name": "works_batch_work_id_unique", - "nullsNotDistinct": false, - "columns": [ - "work_id" - ] + "uniqueConstraints": {} + }, + "openalex.institutions_associated_institutions": { + "name": "institutions_associated_institutions", + "schema": "openalex", + "columns": { + "institution_id": { + "name": "institution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "associated_institution_id": { + "name": "associated_institution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "relationship": { + "name": "relationship", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_primary_locations": { + "name": "works_primary_locations", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "landing_page_url": { + "name": "landing_page_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pdf_url": { + "name": "pdf_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_oa": { + "name": "is_oa", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false }, - "works_batch_batch_id_unique": { - "name": "works_batch_batch_id_unique", - "nullsNotDistinct": false, + "license": { + "name": "license", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_primary_locations_work_id_idx": { + "name": "works_primary_locations_work_id_idx", "columns": [ - "batch_id" - ] + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} } - } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, "openalex.works": { "name": "works", @@ -117,7 +362,7 @@ "id": { "name": "id", "type": "text", - "primaryKey": true, + "primaryKey": false, "notNull": true }, "doi": { @@ -146,7 +391,7 @@ }, "publication_date": { "name": "publication_date", - "type": "date", + "type": "text", "primaryKey": false, "notNull": false }, @@ -191,66 +436,1641 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "publication_date_date": { + "name": "publication_date_date", + "type": "date", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_publication_date_idx": { + "name": "works_publication_date_idx", + "columns": [ + { + "expression": "publication_date", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} } }, - "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "openalex.works_ids": { - "name": "works_ids", + "openalex.institutions": { + "name": "institutions", "schema": "openalex", "columns": { - "work_id": { - "name": "work_id", + "id": { + "name": "id", "type": "text", "primaryKey": false, "notNull": true }, - "openalex": { - "name": "openalex", + "ror": { + "name": "ror", "type": "text", "primaryKey": false, "notNull": false }, - "doi": { - "name": "doi", + "display_name": { + "name": "display_name", "type": "text", "primaryKey": false, "notNull": false }, - "mag": { - "name": "mag", - "type": "bigint", + "country_code": { + "name": "country_code", + "type": "text", "primaryKey": false, "notNull": false }, - "pmid": { - "name": "pmid", + "type": { + "name": "type", "type": "text", "primaryKey": false, "notNull": false }, - "pmcid": { - "name": "pmcid", + "homepage_url": { + "name": "homepage_url", "type": "text", "primaryKey": false, "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "image_thumbnail_url": { + "name": "image_thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name_acronyms": { + "name": "display_name_acronyms", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "display_name_alternatives": { + "name": "display_name_alternatives", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "works_api_url": { + "name": "works_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_date": { + "name": "updated_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.institutions_counts_by_year": { + "name": "institutions_counts_by_year", + "schema": "openalex", + "columns": { + "institution_id": { + "name": "institution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "oa_works_count": { + "name": "oa_works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.sources": { + "name": "sources", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issn_l": { + "name": "issn_l", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "issn": { + "name": "issn", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "publisher": { + "name": "publisher", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "is_oa": { + "name": "is_oa", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "is_in_doaj": { + "name": "is_in_doaj", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "homepage_url": { + "name": "homepage_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_api_url": { + "name": "works_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_date": { + "name": "updated_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.sources_counts_by_year": { + "name": "sources_counts_by_year", + "schema": "openalex", + "columns": { + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "oa_works_count": { + "name": "oa_works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_biblio": { + "name": "works_biblio", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "volume": { + "name": "volume", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "issue": { + "name": "issue", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "first_page": { + "name": "first_page", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_page": { + "name": "last_page", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_concepts": { + "name": "works_concepts", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "concept_id": { + "name": "concept_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "score": { + "name": "score", + "type": "real", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_concepts_concept_id_idx": { + "name": "works_concepts_concept_id_idx", + "columns": [ + { + "expression": "concept_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_concepts_work_id_idx": { + "name": "works_concepts_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_ids": { + "name": "works_ids", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "doi": { + "name": "doi", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mag": { + "name": "mag", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "pmid": { + "name": "pmid", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pmcid": { + "name": "pmcid", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_mesh": { + "name": "works_mesh", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "descriptor_ui": { + "name": "descriptor_ui", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "descriptor_name": { + "name": "descriptor_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "qualifier_ui": { + "name": "qualifier_ui", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "qualifier_name": { + "name": "qualifier_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_major_topic": { + "name": "is_major_topic", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_mesh_descriptor_ui_idx": { + "name": "works_mesh_descriptor_ui_idx", + "columns": [ + { + "expression": "descriptor_ui", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_mesh_qualifier_ui_idx": { + "name": "works_mesh_qualifier_ui_idx", + "columns": [ + { + "expression": "qualifier_ui", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_mesh_work_id_idx": { + "name": "works_mesh_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_open_access": { + "name": "works_open_access", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_oa": { + "name": "is_oa", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "oa_status": { + "name": "oa_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oa_url": { + "name": "oa_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "any_repository_has_fulltext": { + "name": "any_repository_has_fulltext", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_open_access_work_id_idx": { + "name": "works_open_access_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_open_access_work_id_idx1": { + "name": "works_open_access_work_id_idx1", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.sources_ids": { + "name": "sources_ids", + "schema": "openalex", + "columns": { + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "issn_l": { + "name": "issn_l", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "issn": { + "name": "issn", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "mag": { + "name": "mag", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "wikidata": { + "name": "wikidata", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fatcat": { + "name": "fatcat", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_locations": { + "name": "works_locations", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "landing_page_url": { + "name": "landing_page_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pdf_url": { + "name": "pdf_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_oa": { + "name": "is_oa", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "license": { + "name": "license", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_locations_work_id_idx": { + "name": "works_locations_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_referenced_works": { + "name": "works_referenced_works", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "referenced_work_id": { + "name": "referenced_work_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_referenced_works_referenced_work_id_idx": { + "name": "works_referenced_works_referenced_work_id_idx", + "columns": [ + { + "expression": "referenced_work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_referenced_works_work_id_idx": { + "name": "works_referenced_works_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_related_works": { + "name": "works_related_works", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "related_work_id": { + "name": "related_work_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_related_works_related_work_id_idx": { + "name": "works_related_works_related_work_id_idx", + "columns": [ + { + "expression": "related_work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_related_works_work_id_idx": { + "name": "works_related_works_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_topics": { + "name": "works_topics", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "topic_id": { + "name": "topic_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "score": { + "name": "score", + "type": "real", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_topics_topic_id_idx": { + "name": "works_topics_topic_id_idx", + "columns": [ + { + "expression": "topic_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_topics_work_id_idx": { + "name": "works_topics_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.authors": { + "name": "authors", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "orcid": { + "name": "orcid", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name_alternatives": { + "name": "display_name_alternatives", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_known_institution": { + "name": "last_known_institution", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_api_url": { + "name": "works_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_date": { + "name": "updated_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.authors_counts_by_year": { + "name": "authors_counts_by_year", + "schema": "openalex", + "columns": { + "author_id": { + "name": "author_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "oa_works_count": { + "name": "oa_works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.authors_ids": { + "name": "authors_ids", + "schema": "openalex", + "columns": { + "author_id": { + "name": "author_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "orcid": { + "name": "orcid", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopus": { + "name": "scopus", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "twitter": { + "name": "twitter", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikipedia": { + "name": "wikipedia", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mag": { + "name": "mag", + "type": "bigint", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.topics": { + "name": "topics", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subfield_id": { + "name": "subfield_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subfield_display_name": { + "name": "subfield_display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "field_id": { + "name": "field_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "field_display_name": { + "name": "field_display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain_id": { + "name": "domain_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain_display_name": { + "name": "domain_display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "keywords": { + "name": "keywords", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_api_url": { + "name": "works_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikipedia_id": { + "name": "wikipedia_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_date": { + "name": "updated_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.concepts": { + "name": "concepts", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "wikidata": { + "name": "wikidata", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "image_thumbnail_url": { + "name": "image_thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "works_api_url": { + "name": "works_api_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_date": { + "name": "updated_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "descriptions_embeddings": { + "name": "descriptions_embeddings", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + }, + "name_embeddings": { + "name": "name_embeddings", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "concepts_descriptions_embeddings_idx": { + "name": "concepts_descriptions_embeddings_idx", + "columns": [ + { + "expression": "descriptions_embeddings", + "asc": true, + "nulls": "last", + "opclass": "vector_l2_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "ivfflat", + "with": { + "lists": "100" + } + }, + "concepts_name_embeddings_idx": { + "name": "concepts_name_embeddings_idx", + "columns": [ + { + "expression": "name_embeddings", + "asc": true, + "nulls": "last", + "opclass": "vector_l2_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "ivfflat", + "with": { + "lists": "100" + } + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.concepts_ancestors": { + "name": "concepts_ancestors", + "schema": "openalex", + "columns": { + "concept_id": { + "name": "concept_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ancestor_id": { + "name": "ancestor_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "concepts_ancestors_concept_id_idx": { + "name": "concepts_ancestors_concept_id_idx", + "columns": [ + { + "expression": "concept_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.concepts_counts_by_year": { + "name": "concepts_counts_by_year", + "schema": "openalex", + "columns": { + "concept_id": { + "name": "concept_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "works_count": { + "name": "works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cited_by_count": { + "name": "cited_by_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "oa_works_count": { + "name": "oa_works_count", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_authorships": { + "name": "works_authorships", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "author_position": { + "name": "author_position", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "author_id": { + "name": "author_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "institution_id": { + "name": "institution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "raw_affiliation_string": { + "name": "raw_affiliation_string", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_authorships_author_id_idx": { + "name": "works_authorships_author_id_idx", + "columns": [ + { + "expression": "author_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_authorships_institution_id_idx": { + "name": "works_authorships_institution_id_idx", + "columns": [ + { + "expression": "institution_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "works_authorships_work_id_idx": { + "name": "works_authorships_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_best_oa_locations": { + "name": "works_best_oa_locations", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "landing_page_url": { + "name": "landing_page_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pdf_url": { + "name": "pdf_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_oa": { + "name": "is_oa", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "license": { + "name": "license", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "works_best_oa_locations_work_id_idx": { + "name": "works_best_oa_locations_work_id_idx", + "columns": [ + { + "expression": "work_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.concepts_ids": { + "name": "concepts_ids", + "schema": "openalex", + "columns": { + "concept_id": { + "name": "concept_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "openalex": { + "name": "openalex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikidata": { + "name": "wikidata", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wikipedia": { + "name": "wikipedia", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "umls_aui": { + "name": "umls_aui", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "umls_cui": { + "name": "umls_cui", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "mag": { + "name": "mag", + "type": "bigint", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.concepts_related_concepts": { + "name": "concepts_related_concepts", + "schema": "openalex", + "columns": { + "concept_id": { + "name": "concept_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "related_concept_id": { + "name": "related_concept_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "score": { + "name": "score", + "type": "real", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "concepts_related_concepts_concept_id_idx": { + "name": "concepts_related_concepts_concept_id_idx", + "columns": [ + { + "expression": "concept_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "concepts_related_concepts_related_concept_id_idx": { + "name": "concepts_related_concepts_related_concept_id_idx", + "columns": [ + { + "expression": "related_concept_id", + "asc": true, + "nulls": "last", + "opclass": "text_ops", + "isExpression": false + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, "uniqueConstraints": {} } }, "enums": {}, - "schemas": {}, - "sequences": {}, + "schemas": { + "openalex": "openalex" + }, "_meta": { - "columns": {}, "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { "tables": {} } } \ No newline at end of file diff --git a/openalex-importer/drizzle/meta/_journal.json b/openalex-importer/drizzle/meta/_journal.json index e5d1c858b..5c8ac6863 100644 --- a/openalex-importer/drizzle/meta/_journal.json +++ b/openalex-importer/drizzle/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1722302874998, - "tag": "0000_many_franklin_storm", + "when": 1722381060496, + "tag": "0000_youthful_randall", "breakpoints": true } ] diff --git a/openalex-importer/drizzle/old.schema.ts b/openalex-importer/drizzle/old.schema.ts new file mode 100644 index 000000000..8d5300287 --- /dev/null +++ b/openalex-importer/drizzle/old.schema.ts @@ -0,0 +1,62 @@ +import { + pgTable, + serial, + boolean, + numeric, + integer, + json, + text, + timestamp, + date, + bigint, + pgSchema, +} from "drizzle-orm/pg-core"; +// import { createInsertSchema } from "drizzle-zod"; +// import z from "zod"; + +const openAlexSchema = pgSchema("openalex"); + +export const works = openAlexSchema.table("works", { + id: text("id").primaryKey(), + doi: text("doi"), + title: text("title"), + display_name: text("display_name"), + publication_year: integer("publication_year"), + publication_date: date("publication_date"), + type: text("type"), + cited_by_count: integer("cited_by_count"), + is_retracted: boolean("is_retracted"), + is_paratext: boolean("is_paratext"), + cited_by_api_url: text("cited_by_api_url"), + abstract_inverted_index: json("abstract_inverted_index"), + language: text("language"), + publication_date_date: date("publication_date_date"), +}); + +export const batch = openAlexSchema.table("batch", { + id: serial("id").primaryKey(), + createdAt: timestamp("createdAt", { mode: "date" }), + updatedAt: timestamp("updatedAt", { mode: "date" }), +}); + +export const workBatch = openAlexSchema.table("works_batch", { + work_id: text("work_id") + .references(() => works.id, { onDelete: "set null" }) + .unique() + .notNull(), + batch_id: integer("batch_id") + .references(() => batch.id, { onDelete: "set null" }) + .unique() + .notNull(), + // createdAt: timestamp("createdAt", { mode: "date" }), + // updatedAt: timestamp("updatedAt", { mode: "date" }), +}); + +export const worksId = openAlexSchema.table("works_ids", { + work_id: text("work_id").notNull(), + openalex: text("openalex"), + doi: text("doi"), + mag: bigint("mag", { mode: "bigint" }), + pmid: text("pmid"), + pmcid: text("pmcid"), +}); diff --git a/openalex-importer/drizzle/relations.ts b/openalex-importer/drizzle/relations.ts new file mode 100644 index 000000000..80768e2be --- /dev/null +++ b/openalex-importer/drizzle/relations.ts @@ -0,0 +1,3 @@ +import { relations } from "drizzle-orm/relations"; +import { } from "./schema"; + diff --git a/openalex-importer/drizzle/schema.ts b/openalex-importer/drizzle/schema.ts index 8d5300287..4cdf8742e 100644 --- a/openalex-importer/drizzle/schema.ts +++ b/openalex-importer/drizzle/schema.ts @@ -1,62 +1,570 @@ import { pgTable, - serial, - boolean, - numeric, - integer, - json, + pgSchema, text, + real, + bigint, + json, + integer, timestamp, + index, + boolean, date, - bigint, - pgSchema, + vector, + serial, } from "drizzle-orm/pg-core"; -// import { createInsertSchema } from "drizzle-zod"; -// import z from "zod"; +import { sql } from "drizzle-orm"; -const openAlexSchema = pgSchema("openalex"); +export const openalex = pgSchema("openalex"); -export const works = openAlexSchema.table("works", { - id: text("id").primaryKey(), - doi: text("doi"), - title: text("title"), +export const institutions_geoInOpenalex = openalex.table("institutions_geo", { + institution_id: text("institution_id").notNull(), + city: text("city"), + geonames_city_id: text("geonames_city_id"), + region: text("region"), + country_code: text("country_code"), + country: text("country"), + latitude: real("latitude"), + longitude: real("longitude"), +}); + +export const institutions_idsInOpenalex = openalex.table("institutions_ids", { + institution_id: text("institution_id").notNull(), + openalex: text("openalex"), + ror: text("ror"), + grid: text("grid"), + wikipedia: text("wikipedia"), + wikidata: text("wikidata"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), +}); + +export const publishersInOpenalex = openalex.table("publishers", { + id: text("id").notNull(), + display_name: text("display_name"), + alternate_titles: json("alternate_titles"), + country_codes: json("country_codes"), + hierarchy_level: integer("hierarchy_level"), + parent_publisher: text("parent_publisher"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + sources_api_url: text("sources_api_url"), + updated_date: timestamp("updated_date", { mode: "string" }), +}); + +export const publishers_counts_by_yearInOpenalex = openalex.table( + "publishers_counts_by_year", + { + publisher_id: text("publisher_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), + } +); + +export const publishers_idsInOpenalex = openalex.table("publishers_ids", { + publisher_id: text("publisher_id"), + openalex: text("openalex"), + ror: text("ror"), + wikidata: text("wikidata"), +}); + +export const institutions_associated_institutionsInOpenalex = openalex.table( + "institutions_associated_institutions", + { + institution_id: text("institution_id"), + associated_institution_id: text("associated_institution_id"), + relationship: text("relationship"), + } +); + +export const works_primary_locationsInOpenalex = openalex.table( + "works_primary_locations", + { + work_id: text("work_id"), + source_id: text("source_id"), + landing_page_url: text("landing_page_url"), + pdf_url: text("pdf_url"), + is_oa: boolean("is_oa"), + version: text("version"), + license: text("license"), + }, + (table) => { + return { + work_id_idx: index("works_primary_locations_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const worksInOpenalex = openalex.table( + "works", + { + id: text("id").notNull(), + doi: text("doi"), + title: text("title"), + display_name: text("display_name"), + publication_year: integer("publication_year"), + publication_date: text("publication_date"), + type: text("type"), + cited_by_count: integer("cited_by_count"), + is_retracted: boolean("is_retracted"), + is_paratext: boolean("is_paratext"), + cited_by_api_url: text("cited_by_api_url"), + abstract_inverted_index: json("abstract_inverted_index"), + language: text("language"), + publication_date_date: date("publication_date_date"), + }, + (table) => { + return { + publication_date_idx: index("works_publication_date_idx").using( + "btree", + table.publication_date + ), + }; + } +); + +export const institutionsInOpenalex = openalex.table("institutions", { + id: text("id").notNull(), + ror: text("ror"), display_name: text("display_name"), - publication_year: integer("publication_year"), - publication_date: date("publication_date"), + country_code: text("country_code"), type: text("type"), + homepage_url: text("homepage_url"), + image_url: text("image_url"), + image_thumbnail_url: text("image_thumbnail_url"), + display_name_acronyms: json("display_name_acronyms"), + display_name_alternatives: json("display_name_alternatives"), + works_count: integer("works_count"), cited_by_count: integer("cited_by_count"), - is_retracted: boolean("is_retracted"), - is_paratext: boolean("is_paratext"), - cited_by_api_url: text("cited_by_api_url"), - abstract_inverted_index: json("abstract_inverted_index"), - language: text("language"), - publication_date_date: date("publication_date_date"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: "string" }), }); -export const batch = openAlexSchema.table("batch", { +export const institutions_counts_by_yearInOpenalex = openalex.table( + "institutions_counts_by_year", + { + institution_id: text("institution_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), + } +); + +export const sourcesInOpenalex = openalex.table("sources", { + id: text("id").notNull(), + issn_l: text("issn_l"), + issn: json("issn"), + display_name: text("display_name"), + publisher: text("publisher"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + is_oa: boolean("is_oa"), + is_in_doaj: boolean("is_in_doaj"), + homepage_url: text("homepage_url"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: "string" }), +}); + +export const sources_counts_by_yearInOpenalex = openalex.table( + "sources_counts_by_year", + { + source_id: text("source_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), + } +); + +export const works_biblioInOpenalex = openalex.table("works_biblio", { + work_id: text("work_id").notNull(), + volume: text("volume"), + issue: text("issue"), + first_page: text("first_page"), + last_page: text("last_page"), +}); + +export const works_conceptsInOpenalex = openalex.table( + "works_concepts", + { + work_id: text("work_id"), + concept_id: text("concept_id"), + score: real("score"), + }, + (table) => { + return { + concept_id_idx: index("works_concepts_concept_id_idx").using( + "btree", + table.concept_id + ), + work_id_idx: index("works_concepts_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const works_idsInOpenalex = openalex.table("works_ids", { + work_id: text("work_id").notNull(), + openalex: text("openalex"), + doi: text("doi"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), + pmid: text("pmid"), + pmcid: text("pmcid"), +}); + +export const works_meshInOpenalex = openalex.table( + "works_mesh", + { + work_id: text("work_id"), + descriptor_ui: text("descriptor_ui"), + descriptor_name: text("descriptor_name"), + qualifier_ui: text("qualifier_ui"), + qualifier_name: text("qualifier_name"), + is_major_topic: boolean("is_major_topic"), + }, + (table) => { + return { + descriptor_ui_idx: index("works_mesh_descriptor_ui_idx").using( + "btree", + table.descriptor_ui + ), + qualifier_ui_idx: index("works_mesh_qualifier_ui_idx").using( + "btree", + table.qualifier_ui + ), + work_id_idx: index("works_mesh_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const works_open_accessInOpenalex = openalex.table( + "works_open_access", + { + work_id: text("work_id").notNull(), + is_oa: boolean("is_oa"), + oa_status: text("oa_status"), + oa_url: text("oa_url"), + any_repository_has_fulltext: boolean("any_repository_has_fulltext"), + }, + (table) => { + return { + work_id_idx: index("works_open_access_work_id_idx").using( + "btree", + table.work_id + ), + work_id_idx1: index("works_open_access_work_id_idx1").using( + "btree", + table.work_id + ), + }; + } +); + +export const sources_idsInOpenalex = openalex.table("sources_ids", { + source_id: text("source_id"), + openalex: text("openalex"), + issn_l: text("issn_l"), + issn: json("issn"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), + wikidata: text("wikidata"), + fatcat: text("fatcat"), +}); + +export const works_locationsInOpenalex = openalex.table( + "works_locations", + { + work_id: text("work_id"), + source_id: text("source_id"), + landing_page_url: text("landing_page_url"), + pdf_url: text("pdf_url"), + is_oa: boolean("is_oa"), + version: text("version"), + license: text("license"), + }, + (table) => { + return { + work_id_idx: index("works_locations_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const works_referenced_worksInOpenalex = openalex.table( + "works_referenced_works", + { + work_id: text("work_id"), + referenced_work_id: text("referenced_work_id"), + }, + (table) => { + return { + referenced_work_id_idx: index( + "works_referenced_works_referenced_work_id_idx" + ).using("btree", table.referenced_work_id), + work_id_idx: index("works_referenced_works_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const works_related_worksInOpenalex = openalex.table( + "works_related_works", + { + work_id: text("work_id"), + related_work_id: text("related_work_id"), + }, + (table) => { + return { + related_work_id_idx: index( + "works_related_works_related_work_id_idx" + ).using("btree", table.related_work_id), + work_id_idx: index("works_related_works_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const works_topicsInOpenalex = openalex.table( + "works_topics", + { + work_id: text("work_id"), + topic_id: text("topic_id"), + score: real("score"), + }, + (table) => { + return { + topic_id_idx: index("works_topics_topic_id_idx").using( + "btree", + table.topic_id + ), + work_id_idx: index("works_topics_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const authorsInOpenalex = openalex.table("authors", { + id: text("id").notNull(), + orcid: text("orcid"), + display_name: text("display_name"), + display_name_alternatives: json("display_name_alternatives"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + last_known_institution: text("last_known_institution"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: "string" }), +}); + +export const authors_counts_by_yearInOpenalex = openalex.table( + "authors_counts_by_year", + { + author_id: text("author_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), + } +); + +export const authors_idsInOpenalex = openalex.table("authors_ids", { + author_id: text("author_id").notNull(), + openalex: text("openalex"), + orcid: text("orcid"), + scopus: text("scopus"), + twitter: text("twitter"), + wikipedia: text("wikipedia"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), +}); + +export const topicsInOpenalex = openalex.table("topics", { + id: text("id").notNull(), + display_name: text("display_name"), + subfield_id: text("subfield_id"), + subfield_display_name: text("subfield_display_name"), + field_id: text("field_id"), + field_display_name: text("field_display_name"), + domain_id: text("domain_id"), + domain_display_name: text("domain_display_name"), + description: text("description"), + keywords: text("keywords"), + works_api_url: text("works_api_url"), + wikipedia_id: text("wikipedia_id"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + updated_date: timestamp("updated_date", { mode: "string" }), +}); + +export const conceptsInOpenalex = openalex.table( + "concepts", + { + id: text("id").notNull(), + wikidata: text("wikidata"), + display_name: text("display_name"), + level: integer("level"), + description: text("description"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + image_url: text("image_url"), + image_thumbnail_url: text("image_thumbnail_url"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: "string" }), + descriptions_embeddings: vector("descriptions_embeddings", { + dimensions: 768, + }), + name_embeddings: vector("name_embeddings", { dimensions: 768 }), + }, + (table) => { + return { + descriptions_embeddings_idx: index("concepts_descriptions_embeddings_idx") + .using("ivfflat", table.descriptions_embeddings.op("vector_l2_ops")) + .with({ lists: "100" }), + name_embeddings_idx: index("concepts_name_embeddings_idx") + .using("ivfflat", table.name_embeddings.op("vector_l2_ops")) + .with({ lists: "100" }), + }; + } +); + +export const concepts_ancestorsInOpenalex = openalex.table( + "concepts_ancestors", + { + concept_id: text("concept_id"), + ancestor_id: text("ancestor_id"), + }, + (table) => { + return { + concept_id_idx: index("concepts_ancestors_concept_id_idx").using( + "btree", + table.concept_id + ), + }; + } +); + +export const concepts_counts_by_yearInOpenalex = openalex.table( + "concepts_counts_by_year", + { + concept_id: text("concept_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), + } +); + +export const works_authorshipsInOpenalex = openalex.table( + "works_authorships", + { + work_id: text("work_id"), + author_position: text("author_position"), + author_id: text("author_id"), + institution_id: text("institution_id"), + raw_affiliation_string: text("raw_affiliation_string"), + }, + (table) => { + return { + author_id_idx: index("works_authorships_author_id_idx").using( + "btree", + table.author_id + ), + institution_id_idx: index("works_authorships_institution_id_idx").using( + "btree", + table.institution_id + ), + work_id_idx: index("works_authorships_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const works_best_oa_locationsInOpenalex = openalex.table( + "works_best_oa_locations", + { + work_id: text("work_id"), + source_id: text("source_id"), + landing_page_url: text("landing_page_url"), + pdf_url: text("pdf_url"), + is_oa: boolean("is_oa"), + version: text("version"), + license: text("license"), + }, + (table) => { + return { + work_id_idx: index("works_best_oa_locations_work_id_idx").using( + "btree", + table.work_id + ), + }; + } +); + +export const concepts_idsInOpenalex = openalex.table("concepts_ids", { + concept_id: text("concept_id").notNull(), + openalex: text("openalex"), + wikidata: text("wikidata"), + wikipedia: text("wikipedia"), + umls_aui: json("umls_aui"), + umls_cui: json("umls_cui"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), +}); + +export const concepts_related_conceptsInOpenalex = openalex.table( + "concepts_related_concepts", + { + concept_id: text("concept_id"), + related_concept_id: text("related_concept_id"), + score: real("score"), + }, + (table) => { + return { + concept_id_idx: index("concepts_related_concepts_concept_id_idx").using( + "btree", + table.concept_id + ), + related_concept_id_idx: index( + "concepts_related_concepts_related_concept_id_idx" + ).using("btree", table.related_concept_id), + }; + } +); + +export const batchesInOpenAlex = openalex.table("batch", { id: serial("id").primaryKey(), createdAt: timestamp("createdAt", { mode: "date" }), updatedAt: timestamp("updatedAt", { mode: "date" }), }); -export const workBatch = openAlexSchema.table("works_batch", { +export const workBatchesInOpenAlex = openalex.table("works_batch", { work_id: text("work_id") - .references(() => works.id, { onDelete: "set null" }) + .references(() => worksInOpenalex.id, { onDelete: "set null" }) .unique() .notNull(), batch_id: integer("batch_id") - .references(() => batch.id, { onDelete: "set null" }) + .references(() => batchesInOpenAlex.id, { onDelete: "set null" }) .unique() .notNull(), - // createdAt: timestamp("createdAt", { mode: "date" }), - // updatedAt: timestamp("updatedAt", { mode: "date" }), -}); - -export const worksId = openAlexSchema.table("works_ids", { - work_id: text("work_id").notNull(), - openalex: text("openalex"), - doi: text("doi"), - mag: bigint("mag", { mode: "bigint" }), - pmid: text("pmid"), - pmcid: text("pmcid"), }); diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index 390bf16c1..c448dfff4 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -4,10 +4,11 @@ import { runImport } from "./src/script.js"; import { logger } from "./src/logger.js"; async function main() { - cron.schedule("0 0 * * *", () => { + cron.schedule("0 0 * * *", async () => { logger.info("running a task every minute"); - runImport(); + await runImport(); }); + // await runImport(); } main() diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 5a11c897e..724d54ae9 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -14,6 +14,7 @@ "start": "pm2 start ./dist/index.js", "generate": "drizzle-kit generate", "migrate": "drizzle-kit migrate", + "introspect": "drizzle-kit instrospect", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], @@ -23,7 +24,7 @@ "devDependencies": { "@types/node": "^20.14.12", "@types/pg": "^8.11.6", - "drizzle-kit": "^0.23.0", + "drizzle-kit": "^0.22.8", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "ts-node": "10.9.1", @@ -35,14 +36,12 @@ "date-fns": "^3.6.0", "dotenv": "^16.4.5", "drizzle-orm": "^0.32.1", - "drizzle-zod": "^0.5.1", "lodash": "^4.17.21", "node-cron": "^3.0.3", "pg": "^8.12.0", "pino": "^9.3.2", "pino-http": "^10.2.0", "pino-pretty": "^11.2.2", - "pm2": "^5.4.2", - "zod": "^3.23.8" + "pm2": "^5.4.2" } } diff --git a/openalex-importer/postgres/sql/create_tables.sql b/openalex-importer/postgres/sql/create_tables.sql index 3a61c940a..d93ab631a 100644 --- a/openalex-importer/postgres/sql/create_tables.sql +++ b/openalex-importer/postgres/sql/create_tables.sql @@ -69,8 +69,11 @@ CREATE TABLE openalex.concepts image_thumbnail_url text NULL, works_api_url text NULL, updated_date timestamp NULL, - descriptions_embeddings vector(100) NULL, - name_embeddings vector(100) NULL, + +descriptions_embeddings vector +(768) NULL, + name_embeddings vector +(768) NULL, CONSTRAINT concepts_pkey PRIMARY KEY (id) ); CREATE INDEX concepts_descriptions_embeddings_idx ON openalex.concepts USING ivfflat diff --git a/openalex-importer/src/db/index.ts b/openalex-importer/src/db/index.ts index aa345de08..50f22ae71 100644 --- a/openalex-importer/src/db/index.ts +++ b/openalex-importer/src/db/index.ts @@ -5,9 +5,10 @@ const { Pool } = pg; import { drizzle, NodePgQueryResultHKT } from "drizzle-orm/node-postgres"; // import { Client } from "pg"; import { DataModels } from "../transformers.js"; -import { batch, workBatch, works, worksId } from "../../drizzle/schema.js"; +import * as openAlexSchema from "../../drizzle/schema.js"; import { PgTransaction } from "drizzle-orm/pg-core"; -import { eq, ExtractTablesWithRelations } from "drizzle-orm"; +import { and, eq, ExtractTablesWithRelations } from "drizzle-orm"; +import { logger } from "../logger.js"; export * from "../../drizzle/schema.js"; export * from "./types.js"; @@ -17,55 +18,95 @@ export const pool = new Pool({ options: "-c search_path=public", }); -type Schema = { - works: typeof works; - worksId: typeof worksId; +const { + batchesInOpenAlex, + workBatchesInOpenAlex, + worksInOpenalex, + works_idsInOpenalex, + works_authorshipsInOpenalex, + authorsInOpenalex, + authors_idsInOpenalex, + works_best_oa_locationsInOpenalex, + works_biblioInOpenalex, + works_locationsInOpenalex, + works_open_accessInOpenalex, + works_primary_locationsInOpenalex, + works_referenced_worksInOpenalex, + works_related_worksInOpenalex, +} = openAlexSchema; + +type OpenAlexSchema = { + worksInOpenalex: typeof worksInOpenalex; + works_idsInOpenalex: typeof works_idsInOpenalex; + batchesInOpenAlex: typeof batchesInOpenAlex; + workBatchesInOpenAlex: typeof workBatchesInOpenAlex; + works_authorshipsInOpenalex: typeof works_authorshipsInOpenalex; }; type PgTransactionType = PgTransaction< NodePgQueryResultHKT, - Schema, - ExtractTablesWithRelations + OpenAlexSchema, + ExtractTablesWithRelations >; export const saveData = async (models: DataModels) => { const client = await pool.connect(); - const db = drizzle(client, { schema: { works, worksId } }); + const db = drizzle(client, { + schema: { + worksInOpenalex, + works_idsInOpenalex, + batchesInOpenAlex, + workBatchesInOpenAlex, + works_authorshipsInOpenalex, + authorsInOpenalex, + }, + }); try { // todo: try to batch similary queries await db.transaction(async (tx) => { const savedBatch = await tx - .insert(batch) + .insert(batchesInOpenAlex) .values({}) - .returning({ id: batch.id }); + .returning({ id: batchesInOpenAlex.id }); // Save works await Promise.all( models["works"].map(async (work) => { const entry = await tx - .insert(works) + .insert(worksInOpenalex) .values(work) - .onConflictDoUpdate({ target: works.id, set: work }) - .returning({ id: works.id }); + .onConflictDoUpdate({ target: worksInOpenalex.id, set: work }) + .returning({ id: worksInOpenalex.id }); await tx - .insert(workBatch) + .insert(workBatchesInOpenAlex) .values({ work_id: entry[0].id, batch_id: savedBatch[0].id, }) - .onConflictDoNothing({ target: workBatch.work_id }); + .onConflictDoNothing({ target: workBatchesInOpenAlex.work_id }); }) ); // save worksIdb - await updateWorkIds(tx, models["works_id"]); + await Promise.all([ + updateAuthors(tx, models["authors"]), + updateAuthorIds(tx, models["authors_ids"]), + updateWorkIds(tx, models["works_id"]), + updateWorksBiblio(tx, models["works_biblio"]), + updateWorksBestOaLocations(tx, models["works_best_oa_locations"]), + updateWorksPrimaryLocations(tx, models["works_primary_locations"]), + updateWorksLocations(tx, models["works_locations"]), + updateWorksOpenAccess(tx, models["works_open_access"]), + updateWorksReferencedWorks(tx, models["works_referenced_works"]), + updateWorksRelatedWorks(tx, models["works_related_works"]), + // todo: add unique constraint [work_id, author_id] before uncommenting + // updateWorkAuthorships(tx, models["works_authorships"]), + ]); }); - console.log("Open alex data saved"); - } catch (e) { - console.log("Error Saving data to DB", e); - } finally { - // client.release(); + logger.info("Open alex data saved"); + } catch (err) { + logger.error({ err }, "Error Saving data to DB"); } }; @@ -77,12 +118,199 @@ const updateWorkIds = async ( data.map(async (entry) => { const duplicate = await tx .select() - .from(worksId) - .where(eq(worksId.work_id, entry.work_id)) + .from(works_idsInOpenalex) + .where(eq(works_idsInOpenalex.work_id, entry.work_id)) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_idsInOpenalex).values(entry); + }) + ); +}; + +const updateWorksBestOaLocations = async ( + tx: PgTransactionType, + data: DataModels["works_best_oa_locations"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_best_oa_locationsInOpenalex) + .where(eq(works_best_oa_locationsInOpenalex.work_id, entry?.work_id!)) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_best_oa_locationsInOpenalex).values(entry); + }) + ); +}; + +const updateWorksPrimaryLocations = async ( + tx: PgTransactionType, + data: DataModels["works_primary_locations"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_primary_locationsInOpenalex) + .where(eq(works_primary_locationsInOpenalex.work_id, entry?.work_id!)) .limit(1); - // console.log("duplicate", duplicate); if (duplicate.length > 0) return null; - return await tx.insert(worksId).values(entry); + return await tx.insert(works_primary_locationsInOpenalex).values(entry); + }) + ); +}; + +const updateWorksLocations = async ( + tx: PgTransactionType, + data: DataModels["works_locations"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_locationsInOpenalex) + .where( + eq( + works_locationsInOpenalex.landing_page_url, + entry?.landing_page_url! + ) + ) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_locationsInOpenalex).values(entry); + }) + ); +}; + +const updateWorksReferencedWorks = async ( + tx: PgTransactionType, + data: DataModels["works_referenced_works"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_referenced_worksInOpenalex) + .where( + and( + eq(works_referenced_worksInOpenalex.work_id, entry.work_id), + eq( + works_referenced_worksInOpenalex.referenced_work_id, + entry.referenced_work_id + ) + ) + ) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_referenced_worksInOpenalex).values(entry); + }) + ); +}; + +const updateWorksRelatedWorks = async ( + tx: PgTransactionType, + data: DataModels["works_related_works"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_related_worksInOpenalex) + .where( + and( + eq(works_related_worksInOpenalex.work_id, entry.work_id), + eq( + works_related_worksInOpenalex.related_work_id, + entry.related_work_id + ) + ) + ) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_related_worksInOpenalex).values(entry); + }) + ); +}; + +const updateWorksOpenAccess = async ( + tx: PgTransactionType, + data: DataModels["works_open_access"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_open_accessInOpenalex) + .where(eq(works_open_accessInOpenalex.work_id, entry?.work_id!)) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_open_accessInOpenalex).values(entry); + }) + ); +}; + +const updateWorkAuthorships = async ( + tx: PgTransactionType, + data: DataModels["works_authorships"] +) => { + await Promise.all( + data.map(async (entry) => { + await tx + .insert(works_authorshipsInOpenalex) + .values(entry) + .onConflictDoUpdate({ + target: [ + works_authorshipsInOpenalex.author_id, + works_authorshipsInOpenalex.work_id, + ], + set: entry, + }); + }) + ); +}; + +const updateAuthors = async ( + tx: PgTransactionType, + data: DataModels["authors"] +) => { + await Promise.all( + data.map(async (entry) => { + await tx.insert(authorsInOpenalex).values(entry).onConflictDoUpdate({ + target: authorsInOpenalex.id, + set: entry, + }); + }) + ); +}; + +const updateAuthorIds = async ( + tx: PgTransactionType, + data: DataModels["authors_ids"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(authors_idsInOpenalex) + .where(eq(authors_idsInOpenalex.author_id, entry.author_id)) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(authors_idsInOpenalex).values(entry); + }) + ); +}; + +const updateWorksBiblio = async ( + tx: PgTransactionType, + data: DataModels["works_biblio"] +) => { + await Promise.all( + data.map(async (entry) => { + await tx.insert(works_biblioInOpenalex).values(entry).onConflictDoUpdate({ + target: works_biblioInOpenalex.work_id, + set: entry, + }); }) ); }; diff --git a/openalex-importer/src/db/types.ts b/openalex-importer/src/db/types.ts index d4eefa791..c8cf9d20f 100644 --- a/openalex-importer/src/db/types.ts +++ b/openalex-importer/src/db/types.ts @@ -1,4 +1,10 @@ -import { works, worksId } from "../../drizzle/schema.js"; +import { + worksInOpenalex, + works_best_oa_locationsInOpenalex, + works_idsInOpenalex, + works_locationsInOpenalex, + works_primary_locationsInOpenalex, +} from "../../drizzle/schema.js"; // filter object fields to remove undefined fields but allow null fields type NoUndefinedField = { @@ -11,7 +17,19 @@ type NoUndefinedField = { // }; // export const worksSchema = createInsertSchema(works, { doi: z.string().optional() }); -export type Works = NoUndefinedField; +export type Works = NoUndefinedField; // export const worksIdSchema = createInsertSchema(worksId); -export type WorksId = NoUndefinedField; +export type WorksId = NoUndefinedField; + +export type WorksBestOaLocation = NoUndefinedField< + typeof works_best_oa_locationsInOpenalex.$inferInsert +>; + +export type WorksPrimaryLocation = NoUndefinedField< + typeof works_primary_locationsInOpenalex.$inferInsert +>; + +export type WorksLocation = NoUndefinedField< + typeof works_locationsInOpenalex.$inferInsert +>; diff --git a/openalex-importer/src/script.ts b/openalex-importer/src/script.ts index 32f36da5a..6b0038012 100644 --- a/openalex-importer/src/script.ts +++ b/openalex-importer/src/script.ts @@ -43,9 +43,9 @@ async function importWorks(filter?: FilterParam): Promise { const url = `${OPEN_ALEX_API}/works`; const works = await performFetch(url, { filter: { - from_created_date: "2024-07-28", - to_created_date: "2024-07-28", - ...filter, + from_created_date: "2024-07-27", + to_created_date: "2024-07-27", + // ...filter, // from_updated_date: "2024-07-30T20:00:00.347Z", // to_updated_date: "2024-07-30T23:29:50.347Z", }, @@ -166,7 +166,7 @@ export const runImport = async () => { const { authors, authors_ids, - authorships, + works_authorships, works, works_id, works_concepts, @@ -186,7 +186,7 @@ export const runImport = async () => { if (process.env.NODE_ENV === "development") { saveToLogs(JSON.stringify(authors), "authors.json"); saveToLogs(JSON.stringify(authors_ids), "authors_ids.json"); - saveToLogs(JSON.stringify(authorships), "authorships.json"); + saveToLogs(JSON.stringify(works_authorships), "works_authorships.json"); saveToLogs(JSON.stringify(works.slice(1, 100)), "works.json"); saveToLogs(JSON.stringify(works_id), "works_id.json"); saveToLogs(JSON.stringify(works_concepts), "works_concepts.json"); @@ -210,11 +210,6 @@ export const runImport = async () => { saveToLogs(JSON.stringify(works_topics), "works_topics.json"); } - // const worksQueries = works.map((work) => - // prisma.works.upsert({ where: { id: work.id }, update: work, create: work }) - // ); - // const tx = await prisma.$transaction([...worksQueries]); - // logger.info("DB Transaction: ", tx.length); await saveData(transformedData); return works?.length; diff --git a/openalex-importer/src/transformers.ts b/openalex-importer/src/transformers.ts index ff7b78a24..276983e7d 100644 --- a/openalex-importer/src/transformers.ts +++ b/openalex-importer/src/transformers.ts @@ -1,8 +1,17 @@ import _ from "lodash"; -import { Prisma } from "@prisma/client"; +// import { Prisma } from "@prisma/client"; import type { Mesh, Work } from "./types/works.js"; import { Institution } from "./types/institutions.js"; -import type { Works, WorksId } from "./db/index.js"; +import type { + authors_idsInOpenalex, + authorsInOpenalex, + WorksBestOaLocation, + Works, + works_biblioInOpenalex, + WorksId, + WorksPrimaryLocation, + WorksLocation, +} from "./db/index.js"; interface ModelMap { works: ReturnType[]; @@ -45,8 +54,10 @@ export const transformDataModel = (data: Work[]) => { const works = data.map(transformToWork); const authorship_data = data.map((work) => { - let authors = work.authorships.map((data) => data.author); - const authors_ids: Prisma.authors_idsCreateManyInput[] = + let authors: (typeof authorsInOpenalex.$inferInsert)[] = + work.authorships.map((data) => data.author); + + const authors_ids: (typeof authors_idsInOpenalex.$inferInsert)[] = work.authorships.map((authorship) => ({ author_id: authorship.author.id, openalex: authorship.author.id, @@ -56,6 +67,7 @@ export const transformDataModel = (data: Work[]) => { wikipedia: authorship.author.wikipedia ?? null, mag: authorship.author.mag ?? null, })); + const works_authorships: { work_id?: string; author_position?: string; @@ -63,7 +75,9 @@ export const transformDataModel = (data: Work[]) => { institution_id?: string; raw_affiliation_string?: string; }[] = []; + const institutions: Institution[] = []; + for (let authorship of work.authorships) { for (let institution of authorship.institutions) { works_authorships.push({ @@ -75,15 +89,20 @@ export const transformDataModel = (data: Work[]) => { institutions.push(institution); } } + return { authors, authors_ids, works_authorships, institutions }; }); - const works_biblio: Prisma.works_biblioCreateManyInput[] = data.map( - (work) => ({ ...work.biblio, work_id: work.id }) + const works_biblio: (typeof works_biblioInOpenalex.$inferInsert)[] = data.map( + (work) => ({ + ...work.biblio, + work_id: work.id, + }) ); const works_id: WorksId[] = data.map((work) => ({ ...work.ids, + mag: work.ids?.mag, work_id: work.id, })); @@ -109,17 +128,20 @@ export const transformDataModel = (data: Work[]) => { const works_locations = _.flatten( data.map((work) => - work.locations.map((location) => ({ - work_id: work.id, - source_id: location.source?.id, - landing_page_url: location.landing_page_url, - pdf_url: location.pdf_url, - is_oa: location.is_oa, - version: location.version, - license: location.license, - })) + work.locations.map( + (location) => + ({ + work_id: work.id, + source_id: location.source?.id, + landing_page_url: location.landing_page_url, + pdf_url: location.pdf_url, + is_oa: location.is_oa, + version: location.version, + license: location.license, + } as WorksLocation) + ) ) - ); + ) as WorksLocation[]; const works_mesh = _.flatten( data.map((work) => @@ -151,12 +173,12 @@ export const transformDataModel = (data: Work[]) => { } : null ) - .filter(Boolean); + .filter(Boolean) as WorksPrimaryLocation[]; const works_best_oa_locations = data .map((work) => work?.best_oa_location - ? { + ? ({ source_id: work.best_oa_location.source?.id, landing_page_url: work.best_oa_location.landing_page_url, pdf_url: work.best_oa_location.pdf_url, @@ -164,10 +186,10 @@ export const transformDataModel = (data: Work[]) => { version: work.best_oa_location.version, license: work.best_oa_location.license, work_id: work.id, - } + } as WorksBestOaLocation) : null ) - .filter(Boolean); + .filter(Boolean) as WorksBestOaLocation[]; const works_open_access = data.map((work) => ({ ...work.open_access, @@ -194,7 +216,7 @@ export const transformDataModel = (data: Work[]) => { // group unique authors let all_authors = _.flatten(authorship_data.map((data) => data.authors)); - let authors: Prisma.authorsCreateManyInput[] = _(all_authors) + let authors: (typeof authorsInOpenalex.$inferInsert)[] = _(all_authors) .groupBy((x) => x.id) .map( (values, key) => @@ -202,7 +224,13 @@ export const transformDataModel = (data: Work[]) => { id: key, orcid: values[0].orcid, display_name: values[0].display_name, - } as Prisma.authorsCreateManyInput) + display_name_alternatives: values[0].display_name_alternatives, + works_count: values[0].works_count, + cited_by_count: values[0].cited_by_count, + last_known_institution: values[0].last_known_institution, + works_api_url: values[0].works_api_url, + updated_date: values[0].updated_date, + } as typeof authorsInOpenalex.$inferInsert) ) .value(); @@ -211,7 +239,9 @@ export const transformDataModel = (data: Work[]) => { authorship_data.map((data) => data.authors_ids) ); - let authors_ids: Prisma.authors_idsCreateManyInput[] = _(all_author_ids) + let authors_ids: (typeof authors_idsInOpenalex.$inferInsert)[] = _( + all_author_ids + ) .groupBy((x) => x.author_id) .map( (values, key) => @@ -223,7 +253,7 @@ export const transformDataModel = (data: Work[]) => { scopus: values[0].scopus, wikipedia: values[0].wikipedia, mag: values[0].mag, - } as Prisma.authors_idsCreateManyInput) + } as typeof authors_idsInOpenalex.$inferInsert) ) .value(); @@ -270,12 +300,13 @@ export const transformDataModel = (data: Work[]) => { return { authors, - authorships: _.flatten( + works_authorships: _.flatten( authorship_data.map((data) => data.works_authorships) ), authors_ids, works, works_id, + works_biblio, works_concepts, works_topics, diff --git a/openalex-importer/src/types/works.ts b/openalex-importer/src/types/works.ts index ba7399c9b..1d2c30cad 100644 --- a/openalex-importer/src/types/works.ts +++ b/openalex-importer/src/types/works.ts @@ -55,7 +55,7 @@ export interface Work { interface Ids { openalex: string; doi: string | null; - mag: bigint | null; + mag: number | null; pmid: string | null; pmcid: string | null; } @@ -155,15 +155,15 @@ interface Location { } interface BestOaLocation { - is_oa: boolean; - landing_page_url: string; - pdf_url: string; - source: Source; - license: string; - license_id: string; - version: string; - is_accepted: boolean; - is_published: boolean; + is_oa: boolean | null; + landing_page_url: string | null; + pdf_url: string | null; + source: Source | null; + license: string | null; + license_id: string | null; + version: string | null; + is_accepted: boolean | null; + is_published: boolean | null; } interface CountsByYear { diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index 906b226ad..0a9c33300 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -793,10 +793,10 @@ dotenv@^16.4.5: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== -drizzle-kit@^0.23.0: - version "0.23.0" - resolved "https://registry.yarnpkg.com/drizzle-kit/-/drizzle-kit-0.23.0.tgz#4ac8b4034a75091569666242e99df7bafd590148" - integrity sha512-w9jE97z193dd4jzAyj4Uv2SOh8Ydue70Ki6W0awy4bGM1aPXan6zD6Yv+nNTA6oGgNTDl2MJFxutjHG4fden5g== +drizzle-kit@^0.22.8: + version "0.22.8" + resolved "https://registry.yarnpkg.com/drizzle-kit/-/drizzle-kit-0.22.8.tgz#0f85d84cd5a1dbad045228067105ff636fc597bf" + integrity sha512-VjI4wsJjk3hSqHSa3TwBf+uvH6M6pRHyxyoVbt935GUzP9tUR/BRZ+MhEJNgryqbzN2Za1KP0eJMTgKEPsalYQ== dependencies: "@esbuild-kit/esm-loader" "^2.5.5" esbuild "^0.19.7" @@ -807,11 +807,6 @@ drizzle-orm@^0.32.1: resolved "https://registry.yarnpkg.com/drizzle-orm/-/drizzle-orm-0.32.1.tgz#4e28c22d7f2a60aef3f0837c0a06aa7b3378b082" integrity sha512-Wq1J+lL8PzwR5K3a1FfoWsbs8powjr3pGA4+5+2ueN1VTLDNFYEolUyUWFtqy8DVRvYbL2n7sXZkgVmK9dQkng== -drizzle-zod@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/drizzle-zod/-/drizzle-zod-0.5.1.tgz#4e5efe016dce22ed01063f72f839b07670b2d11e" - integrity sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A== - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2706,8 +2701,3 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -zod@^3.23.8: - version "3.23.8" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" - integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== From daa325e3ebb7c6cb15e88cfbc4c3ccfbee0ecdc7 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Fri, 2 Aug 2024 03:50:35 +0100 Subject: [PATCH 08/20] update worksConcepts, mesh and topics from return data --- openalex-importer/index.ts | 1 - openalex-importer/src/db/index.ts | 79 +++++++++++++++++++++++++++ openalex-importer/src/transformers.ts | 18 +++--- 3 files changed, 90 insertions(+), 8 deletions(-) diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index c448dfff4..b61e539a0 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -8,7 +8,6 @@ async function main() { logger.info("running a task every minute"); await runImport(); }); - // await runImport(); } main() diff --git a/openalex-importer/src/db/index.ts b/openalex-importer/src/db/index.ts index 50f22ae71..af163e80b 100644 --- a/openalex-importer/src/db/index.ts +++ b/openalex-importer/src/db/index.ts @@ -33,6 +33,9 @@ const { works_primary_locationsInOpenalex, works_referenced_worksInOpenalex, works_related_worksInOpenalex, + works_conceptsInOpenalex, + works_meshInOpenalex, + works_topicsInOpenalex, } = openAlexSchema; type OpenAlexSchema = { @@ -41,6 +44,9 @@ type OpenAlexSchema = { batchesInOpenAlex: typeof batchesInOpenAlex; workBatchesInOpenAlex: typeof workBatchesInOpenAlex; works_authorshipsInOpenalex: typeof works_authorshipsInOpenalex; + works_conceptsInOpenalex: typeof works_conceptsInOpenalex; + works_meshInOpenalex: typeof works_meshInOpenalex; + works_topicsInOpenalex: typeof works_topicsInOpenalex; }; type PgTransactionType = PgTransaction< @@ -59,6 +65,9 @@ export const saveData = async (models: DataModels) => { workBatchesInOpenAlex, works_authorshipsInOpenalex, authorsInOpenalex, + works_conceptsInOpenalex, + works_meshInOpenalex, + works_topicsInOpenalex, }, }); @@ -100,6 +109,9 @@ export const saveData = async (models: DataModels) => { updateWorksOpenAccess(tx, models["works_open_access"]), updateWorksReferencedWorks(tx, models["works_referenced_works"]), updateWorksRelatedWorks(tx, models["works_related_works"]), + updateWorksConcepts(tx, models["works_concepts"]), + updateWorksMesh(tx, models["works_mesh"]), + updateWorksTopics(tx, models["works_topics"]), // todo: add unique constraint [work_id, author_id] before uncommenting // updateWorkAuthorships(tx, models["works_authorships"]), ]); @@ -314,3 +326,70 @@ const updateWorksBiblio = async ( }) ); }; + +const updateWorksConcepts = async ( + tx: PgTransactionType, + data: DataModels["works_concepts"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_conceptsInOpenalex) + .where( + and( + eq(works_conceptsInOpenalex.work_id, entry.work_id!), + eq(works_conceptsInOpenalex.concept_id, entry.concept_id!) + ) + ) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_conceptsInOpenalex).values(entry); + }) + ); +}; + +const updateWorksMesh = async ( + tx: PgTransactionType, + data: DataModels["works_mesh"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_meshInOpenalex) + .where( + and( + eq(works_meshInOpenalex.work_id, entry.work_id!), + eq(works_meshInOpenalex.descriptor_ui, entry.descriptor_ui!), + eq(works_meshInOpenalex.qualifier_ui, entry.qualifier_ui!) + ) + ) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_meshInOpenalex).values(entry); + }) + ); +}; + +const updateWorksTopics = async ( + tx: PgTransactionType, + data: DataModels["works_topics"] +) => { + await Promise.all( + data.map(async (entry) => { + const duplicate = await tx + .select() + .from(works_topicsInOpenalex) + .where( + and( + eq(works_topicsInOpenalex.work_id, entry.work_id!), + eq(works_topicsInOpenalex.topic_id, entry.topic_id!) + ) + ) + .limit(1); + if (duplicate.length > 0) return null; + return await tx.insert(works_topicsInOpenalex).values(entry); + }) + ); +}; diff --git a/openalex-importer/src/transformers.ts b/openalex-importer/src/transformers.ts index 276983e7d..8dda8b0d1 100644 --- a/openalex-importer/src/transformers.ts +++ b/openalex-importer/src/transformers.ts @@ -11,6 +11,8 @@ import type { WorksId, WorksPrimaryLocation, WorksLocation, + works_meshInOpenalex, + works_topicsInOpenalex, } from "./db/index.js"; interface ModelMap { @@ -118,11 +120,14 @@ export const transformDataModel = (data: Work[]) => { const works_topics = _.flatten( data.map((work) => - work.topics.map((topic) => ({ - work_id: work.id, - topic_id: topic.id, - score: topic.score, - })) + work.topics.map( + (topic) => + ({ + work_id: work.id, + topic_id: topic.id, + score: topic.score, + } as typeof works_topicsInOpenalex.$inferInsert) + ) ) ); @@ -154,7 +159,7 @@ export const transformDataModel = (data: Work[]) => { qualifier_name: mesh.qualifier_name, qualifier_ui: mesh.qualifier_ui, is_major_topic: mesh.is_major_topic, - } as Mesh) + } as typeof works_meshInOpenalex.$inferInsert) ) ) ); @@ -306,7 +311,6 @@ export const transformDataModel = (data: Work[]) => { authors_ids, works, works_id, - works_biblio, works_concepts, works_topics, From 2c2994dda94ff969348701143faf00a4ceee6962 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Fri, 2 Aug 2024 05:17:30 +0100 Subject: [PATCH 09/20] add .env.example, remove script constraint --- openalex-importer/.env.example | 9 +++++++++ openalex-importer/index.ts | 2 +- openalex-importer/src/db/index.ts | 4 ++++ openalex-importer/src/script.ts | 19 +++++++++++-------- 4 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 openalex-importer/.env.example diff --git a/openalex-importer/.env.example b/openalex-importer/.env.example new file mode 100644 index 000000000..389537f47 --- /dev/null +++ b/openalex-importer/.env.example @@ -0,0 +1,9 @@ +NODE_ENV=development +OPENALEX_API_KEY= + +PG_HOST=host.docker.internal +PG_PORT=5438 +POSTGRES_USER= +POSTGRES_PASSWORD= +POSTGRES_DB= +DATABASE_URL= diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index b61e539a0..e26d3e404 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -5,7 +5,7 @@ import { logger } from "./src/logger.js"; async function main() { cron.schedule("0 0 * * *", async () => { - logger.info("running a task every minute"); + logger.info("Running a task evey day at 12:00 AM"); await runImport(); }); } diff --git a/openalex-importer/src/db/index.ts b/openalex-importer/src/db/index.ts index af163e80b..868a327f0 100644 --- a/openalex-importer/src/db/index.ts +++ b/openalex-importer/src/db/index.ts @@ -56,6 +56,7 @@ type PgTransactionType = PgTransaction< >; export const saveData = async (models: DataModels) => { + logger.info("Persisting Data to database"); const client = await pool.connect(); const db = drizzle(client, { schema: { @@ -97,6 +98,8 @@ export const saveData = async (models: DataModels) => { }) ); + logger.info("Works data to persisted"); + // save worksIdb await Promise.all([ updateAuthors(tx, models["authors"]), @@ -294,6 +297,7 @@ const updateAuthors = async ( }); }) ); + // logger.info("Authors data to persisted"); }; const updateAuthorIds = async ( diff --git a/openalex-importer/src/script.ts b/openalex-importer/src/script.ts index 6b0038012..2d81e1715 100644 --- a/openalex-importer/src/script.ts +++ b/openalex-importer/src/script.ts @@ -37,15 +37,17 @@ type FilterParam = { has_ror?: boolean; }; +const MAX_PAGES_TO_FETCH = 100; + async function importWorks(filter?: FilterParam): Promise { logger.info(filter, "Filter"); try { const url = `${OPEN_ALEX_API}/works`; const works = await performFetch(url, { filter: { - from_created_date: "2024-07-27", - to_created_date: "2024-07-27", - // ...filter, + // from_created_date: "2024-07-27", + // to_created_date: "2024-07-27", + ...filter, // from_updated_date: "2024-07-30T20:00:00.347Z", // to_updated_date: "2024-07-30T23:29:50.347Z", }, @@ -78,9 +80,10 @@ async function performFetch(url: string, searchQuery: Query): Promise { while (cursor) { if (process.env.NODE_ENV === "development") { - // When running script locally, - // break loop prematurely to avoid overloading memory - if (roundtrip >= 10) break; // todo: remove line before push to prod + /* When running script locally, + break loop prematurely to avoid overloading memory + */ + if (roundtrip >= MAX_PAGES_TO_FETCH) break; // todo: remove line before push to prod } let query = Object.entries(searchQuery).reduce((queryStr, [key, value]) => { @@ -141,8 +144,8 @@ const saveToLogs = (data: string, logFile: string) => { export const runImport = async () => { // figure time parameters let currentDate = new Date(); - let from_created_date = startOfDay(subDays(currentDate, 2)); - let to_created_date = endOfDay(subDays(currentDate, 2)); + let from_created_date = startOfDay(subDays(currentDate, 1)); + let to_created_date = endOfDay(subDays(currentDate, 1)); const dateFormatter = new Intl.DateTimeFormat("fr-CA", { year: "numeric", From 2265af49a5790eb33b8c613ca4b243dc16f94226 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Fri, 2 Aug 2024 05:19:29 +0100 Subject: [PATCH 10/20] remove prisma links --- openalex-importer/.gitignore | 3 +-- openalex-importer/package.json | 1 - openalex-importer/yarn.lock | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/openalex-importer/.gitignore b/openalex-importer/.gitignore index cbb4363b7..ce98adf53 100644 --- a/openalex-importer/.gitignore +++ b/openalex-importer/.gitignore @@ -17,5 +17,4 @@ repo-tmp postgres-data/ -logs -prisma \ No newline at end of file +logs \ No newline at end of file diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 724d54ae9..293b1d7e2 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -31,7 +31,6 @@ "typescript": "5.1.6" }, "dependencies": { - "@prisma/client": "^5.17.0", "@types/lodash": "^4.17.7", "date-fns": "^3.6.0", "dotenv": "^16.4.5", diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index 0a9c33300..b6a507e90 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -319,11 +319,6 @@ dependencies: debug "^4.3.1" -"@prisma/client@^5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.17.0.tgz#9079947bd749689c2dabfb9ecc70a24ebefb1f43" - integrity sha512-N2tnyKayT0Zf7mHjwEyE8iG7FwTmXDHFZ1GnNhQp0pJUObsuel4ZZ1XwfuAYkq5mRIiC/Kot0kt0tGCfLJ70Jw== - "@tootallnate/quickjs-emscripten@^0.23.0": version "0.23.0" resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" From aa035808c048d73feb8de3f265334d48c0bd9a0d Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Fri, 2 Aug 2024 05:22:35 +0100 Subject: [PATCH 11/20] clean up --- openalex-importer/drizzle/batches.ts | 19 ++++++++ openalex-importer/drizzle/old.schema.ts | 62 ------------------------- 2 files changed, 19 insertions(+), 62 deletions(-) create mode 100644 openalex-importer/drizzle/batches.ts delete mode 100644 openalex-importer/drizzle/old.schema.ts diff --git a/openalex-importer/drizzle/batches.ts b/openalex-importer/drizzle/batches.ts new file mode 100644 index 000000000..deb9b58d5 --- /dev/null +++ b/openalex-importer/drizzle/batches.ts @@ -0,0 +1,19 @@ +import { serial, integer, text, timestamp } from "drizzle-orm/pg-core"; +import { openalex as openAlexSchema, worksInOpenalex } from "./schema.js"; + +export const batch = openAlexSchema.table("batch", { + id: serial("id").primaryKey(), + createdAt: timestamp("createdAt", { mode: "date" }), + updatedAt: timestamp("updatedAt", { mode: "date" }), +}); + +export const workBatch = openAlexSchema.table("works_batch", { + work_id: text("work_id") + .references(() => worksInOpenalex.id, { onDelete: "set null" }) + .unique() + .notNull(), + batch_id: integer("batch_id") + .references(() => batch.id, { onDelete: "set null" }) + .unique() + .notNull(), +}); diff --git a/openalex-importer/drizzle/old.schema.ts b/openalex-importer/drizzle/old.schema.ts deleted file mode 100644 index 8d5300287..000000000 --- a/openalex-importer/drizzle/old.schema.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { - pgTable, - serial, - boolean, - numeric, - integer, - json, - text, - timestamp, - date, - bigint, - pgSchema, -} from "drizzle-orm/pg-core"; -// import { createInsertSchema } from "drizzle-zod"; -// import z from "zod"; - -const openAlexSchema = pgSchema("openalex"); - -export const works = openAlexSchema.table("works", { - id: text("id").primaryKey(), - doi: text("doi"), - title: text("title"), - display_name: text("display_name"), - publication_year: integer("publication_year"), - publication_date: date("publication_date"), - type: text("type"), - cited_by_count: integer("cited_by_count"), - is_retracted: boolean("is_retracted"), - is_paratext: boolean("is_paratext"), - cited_by_api_url: text("cited_by_api_url"), - abstract_inverted_index: json("abstract_inverted_index"), - language: text("language"), - publication_date_date: date("publication_date_date"), -}); - -export const batch = openAlexSchema.table("batch", { - id: serial("id").primaryKey(), - createdAt: timestamp("createdAt", { mode: "date" }), - updatedAt: timestamp("updatedAt", { mode: "date" }), -}); - -export const workBatch = openAlexSchema.table("works_batch", { - work_id: text("work_id") - .references(() => works.id, { onDelete: "set null" }) - .unique() - .notNull(), - batch_id: integer("batch_id") - .references(() => batch.id, { onDelete: "set null" }) - .unique() - .notNull(), - // createdAt: timestamp("createdAt", { mode: "date" }), - // updatedAt: timestamp("updatedAt", { mode: "date" }), -}); - -export const worksId = openAlexSchema.table("works_ids", { - work_id: text("work_id").notNull(), - openalex: text("openalex"), - doi: text("doi"), - mag: bigint("mag", { mode: "bigint" }), - pmid: text("pmid"), - pmcid: text("pmcid"), -}); From 5ae61929ac485ac0ab27ef72e60cb539b4e6bb25 Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Fri, 2 Aug 2024 05:26:28 +0100 Subject: [PATCH 12/20] clean up dockerfile and compose file --- openalex-importer/docker-compose.yml | 3 --- openalex-importer/postgres/Dockerfile | 15 --------------- 2 files changed, 18 deletions(-) delete mode 100644 openalex-importer/postgres/Dockerfile diff --git a/openalex-importer/docker-compose.yml b/openalex-importer/docker-compose.yml index 808e1a785..36b8e789a 100644 --- a/openalex-importer/docker-compose.yml +++ b/openalex-importer/docker-compose.yml @@ -4,9 +4,6 @@ services: container_name: "openalex_db" image: "ankane/pgvector" restart: always - # build: - # context: ./postgres - # dockerfile: Dockerfile environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres diff --git a/openalex-importer/postgres/Dockerfile b/openalex-importer/postgres/Dockerfile deleted file mode 100644 index 27dc44956..000000000 --- a/openalex-importer/postgres/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# This is installing the pgvector extension for postgres -FROM postgres:latest - -RUN apt-get update && apt-get install -y \ - build-essential \ - git \ - postgresql-server-dev-all \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /tmp -RUN git clone https://github.com/pgvector/pgvector.git - -WORKDIR /tmp/pgvector -RUN make -RUN make install \ No newline at end of file From 3a948f2f6f186bdf6ffbc39ea509944576f204cd Mon Sep 17 00:00:00 2001 From: shadrach-tayo Date: Fri, 2 Aug 2024 05:27:56 +0100 Subject: [PATCH 13/20] chore: clean up prisma client traces --- openalex-importer/src/client.ts | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 openalex-importer/src/client.ts diff --git a/openalex-importer/src/client.ts b/openalex-importer/src/client.ts deleted file mode 100755 index 9b6c4ce30..000000000 --- a/openalex-importer/src/client.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { PrismaClient } from '@prisma/client'; - -export const prisma = new PrismaClient(); From 35bd6c1992f213f82d42f7f92f51c1fb5429725f Mon Sep 17 00:00:00 2001 From: shadrach Date: Fri, 6 Sep 2024 09:28:32 -0500 Subject: [PATCH 14/20] wip: add time traveling support for import script, update schema and add workBatches migration --- openalex-importer/README.MD | 79 ++ .../drizzle/{batches.ts => batches-schema.ts} | 6 +- .../drizzle/batches_migration.sql | 26 + .../drizzle/meta/0001_snapshot.json | 109 +++ openalex-importer/drizzle/meta/_journal.json | 7 + openalex-importer/drizzle/schema.ts | 914 +++++++----------- openalex-importer/index.ts | 66 +- openalex-importer/package.json | 1 + openalex-importer/src/db/index.ts | 91 +- openalex-importer/src/script.ts | 20 +- openalex-importer/yarn.lock | 5 + 11 files changed, 725 insertions(+), 599 deletions(-) create mode 100644 openalex-importer/README.MD rename openalex-importer/drizzle/{batches.ts => batches-schema.ts} (69%) create mode 100644 openalex-importer/drizzle/batches_migration.sql create mode 100644 openalex-importer/drizzle/meta/0001_snapshot.json diff --git a/openalex-importer/README.MD b/openalex-importer/README.MD new file mode 100644 index 000000000..8e283654b --- /dev/null +++ b/openalex-importer/README.MD @@ -0,0 +1,79 @@ +# OpenAlex Data Importer Script +This script aims to aid with realtime update of our openalex data imports + +## Table of Contents +- [Introduction](#introduction) +- [Prerequisites](#prerequisites) +- [Installation](#installation) +- [Usage](#usage) + - [Running Locally](#running-locally) + - [Running in Production](#running-in-production) + - [Script Arguments](#script-arguments) +- [Common Commands](#common-commands) + - [Introspect Remote OpenAlex Schema](#introspect-remote-openalex-schema) + - [Generate Batches Migration](#generate-batches-migration) +- [Troubleshooting](#troubleshooting) +- [Contributing](#contributing) +- [License](#license) + +## Introduction +[Brief explanation of OpenAlex and the purpose of this importer] + +## Prerequisites +- Node.js (version X.X or higher) +- Docker +- [Any other requirements] + +## Installation +[Steps to install the project] +```bash +git clone +cd openalex-importer +yarn install +yarn build +yarn start +``` + +## Usage + +### Running Locally +1. Install dependencies +2. Start Docker service +3. Introspect schema + +### Running in Production +1. Install dependencies +2. Start Docker service to run script + +### Script Arguments +Run the script using: +```bash +node ./index.js --start=08-24-2024 --end=09-05-2024 +``` +Note: Arguments are optional + +## Common Commands + +### Introspect Remote OpenAlex Schema +Set the following environment variables: +```bash +[Your existing env variables] +``` +Then run: +```bash +npx drizzle-kit introspect +``` + +### Generate Batches Migration +```bash +npx drizzle-kit generate --schema=./drizzle/batches.ts --out=./drizzle --dialect=postgresql +``` + +## Troubleshooting +[Common issues and their solutions] + +## Contributing +[How to contribute to the project] + +## License +[License information] diff --git a/openalex-importer/drizzle/batches.ts b/openalex-importer/drizzle/batches-schema.ts similarity index 69% rename from openalex-importer/drizzle/batches.ts rename to openalex-importer/drizzle/batches-schema.ts index deb9b58d5..105a4ef3b 100644 --- a/openalex-importer/drizzle/batches.ts +++ b/openalex-importer/drizzle/batches-schema.ts @@ -1,19 +1,19 @@ import { serial, integer, text, timestamp } from "drizzle-orm/pg-core"; import { openalex as openAlexSchema, worksInOpenalex } from "./schema.js"; -export const batch = openAlexSchema.table("batch", { +export const batchesInOpenAlex = openAlexSchema.table("batch", { id: serial("id").primaryKey(), createdAt: timestamp("createdAt", { mode: "date" }), updatedAt: timestamp("updatedAt", { mode: "date" }), }); -export const workBatch = openAlexSchema.table("works_batch", { +export const workBatchesInOpenAlex = openAlexSchema.table("works_batch", { work_id: text("work_id") .references(() => worksInOpenalex.id, { onDelete: "set null" }) .unique() .notNull(), batch_id: integer("batch_id") - .references(() => batch.id, { onDelete: "set null" }) + .references(() => batchesInOpenAlex.id, { onDelete: "set null" }) .unique() .notNull(), }); diff --git a/openalex-importer/drizzle/batches_migration.sql b/openalex-importer/drizzle/batches_migration.sql new file mode 100644 index 000000000..cca3b89dd --- /dev/null +++ b/openalex-importer/drizzle/batches_migration.sql @@ -0,0 +1,26 @@ +CREATE TABLE IF NOT EXISTS "openalex"."batch" ( + "id" serial PRIMARY KEY NOT NULL, + "createdAt" timestamp, + "updatedAt" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "openalex"."works_batch" ( + "work_id" text NOT NULL, + "batch_id" integer NOT NULL, + CONSTRAINT "works_batch_work_id_unique" UNIQUE("work_id"), + CONSTRAINT "works_batch_batch_id_unique" UNIQUE("batch_id") +); + +DO $$ BEGIN + ALTER TABLE "openalex"."works_batch" ADD CONSTRAINT "works_batch_work_id_works_id_fk" FOREIGN KEY ("work_id") REFERENCES "openalex"."works"("id") ON DELETE set null ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "openalex"."works_batch" ADD CONSTRAINT "works_batch_batch_id_batch_id_fk" FOREIGN KEY ("batch_id") REFERENCES "openalex"."batch"("id") ON DELETE set null ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DROP SCHEMA "openalex"; diff --git a/openalex-importer/drizzle/meta/0001_snapshot.json b/openalex-importer/drizzle/meta/0001_snapshot.json new file mode 100644 index 000000000..5852eb16d --- /dev/null +++ b/openalex-importer/drizzle/meta/0001_snapshot.json @@ -0,0 +1,109 @@ +{ + "id": "025ba7d4-fb87-4b04-bd34-e4260a0df5d3", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "openalex.batch": { + "name": "batch", + "schema": "openalex", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "openalex.works_batch": { + "name": "works_batch", + "schema": "openalex", + "columns": { + "work_id": { + "name": "work_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "batch_id": { + "name": "batch_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "works_batch_work_id_works_id_fk": { + "name": "works_batch_work_id_works_id_fk", + "tableFrom": "works_batch", + "tableTo": "works", + "schemaTo": "openalex", + "columnsFrom": [ + "work_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "works_batch_batch_id_batch_id_fk": { + "name": "works_batch_batch_id_batch_id_fk", + "tableFrom": "works_batch", + "tableTo": "batch", + "schemaTo": "openalex", + "columnsFrom": [ + "batch_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "works_batch_work_id_unique": { + "name": "works_batch_work_id_unique", + "nullsNotDistinct": false, + "columns": [ + "work_id" + ] + }, + "works_batch_batch_id_unique": { + "name": "works_batch_batch_id_unique", + "nullsNotDistinct": false, + "columns": [ + "batch_id" + ] + } + } + } + }, + "enums": {}, + "schemas": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/openalex-importer/drizzle/meta/_journal.json b/openalex-importer/drizzle/meta/_journal.json index 5c8ac6863..bb6368186 100644 --- a/openalex-importer/drizzle/meta/_journal.json +++ b/openalex-importer/drizzle/meta/_journal.json @@ -8,6 +8,13 @@ "when": 1722381060496, "tag": "0000_youthful_randall", "breakpoints": true + }, + { + "idx": 1, + "version": "7", + "when": 1725620137738, + "tag": "0001_fantastic_lockjaw", + "breakpoints": true } ] } \ No newline at end of file diff --git a/openalex-importer/drizzle/schema.ts b/openalex-importer/drizzle/schema.ts index 4cdf8742e..c65313126 100644 --- a/openalex-importer/drizzle/schema.ts +++ b/openalex-importer/drizzle/schema.ts @@ -1,570 +1,408 @@ -import { - pgTable, - pgSchema, - text, - real, - bigint, - json, - integer, - timestamp, - index, - boolean, - date, - vector, - serial, -} from "drizzle-orm/pg-core"; -import { sql } from "drizzle-orm"; +import { pgTable, pgSchema, text, real, bigint, json, integer, timestamp, index, boolean, date, vector } from "drizzle-orm/pg-core" + import { sql } from "drizzle-orm" export const openalex = pgSchema("openalex"); + export const institutions_geoInOpenalex = openalex.table("institutions_geo", { - institution_id: text("institution_id").notNull(), - city: text("city"), - geonames_city_id: text("geonames_city_id"), - region: text("region"), - country_code: text("country_code"), - country: text("country"), - latitude: real("latitude"), - longitude: real("longitude"), + institution_id: text("institution_id").notNull(), + city: text("city"), + geonames_city_id: text("geonames_city_id"), + region: text("region"), + country_code: text("country_code"), + country: text("country"), + latitude: real("latitude"), + longitude: real("longitude"), }); export const institutions_idsInOpenalex = openalex.table("institutions_ids", { - institution_id: text("institution_id").notNull(), - openalex: text("openalex"), - ror: text("ror"), - grid: text("grid"), - wikipedia: text("wikipedia"), - wikidata: text("wikidata"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), + institution_id: text("institution_id").notNull(), + openalex: text("openalex"), + ror: text("ror"), + grid: text("grid"), + wikipedia: text("wikipedia"), + wikidata: text("wikidata"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), }); export const publishersInOpenalex = openalex.table("publishers", { - id: text("id").notNull(), - display_name: text("display_name"), - alternate_titles: json("alternate_titles"), - country_codes: json("country_codes"), - hierarchy_level: integer("hierarchy_level"), - parent_publisher: text("parent_publisher"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - sources_api_url: text("sources_api_url"), - updated_date: timestamp("updated_date", { mode: "string" }), -}); - -export const publishers_counts_by_yearInOpenalex = openalex.table( - "publishers_counts_by_year", - { - publisher_id: text("publisher_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), - } -); + id: text("id").notNull(), + display_name: text("display_name"), + alternate_titles: json("alternate_titles"), + country_codes: json("country_codes"), + hierarchy_level: integer("hierarchy_level"), + parent_publisher: text("parent_publisher"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + sources_api_url: text("sources_api_url"), + updated_date: timestamp("updated_date", { mode: 'string' }), +}); + +export const publishers_counts_by_yearInOpenalex = openalex.table("publishers_counts_by_year", { + publisher_id: text("publisher_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), +}); export const publishers_idsInOpenalex = openalex.table("publishers_ids", { - publisher_id: text("publisher_id"), - openalex: text("openalex"), - ror: text("ror"), - wikidata: text("wikidata"), -}); - -export const institutions_associated_institutionsInOpenalex = openalex.table( - "institutions_associated_institutions", - { - institution_id: text("institution_id"), - associated_institution_id: text("associated_institution_id"), - relationship: text("relationship"), - } -); - -export const works_primary_locationsInOpenalex = openalex.table( - "works_primary_locations", - { - work_id: text("work_id"), - source_id: text("source_id"), - landing_page_url: text("landing_page_url"), - pdf_url: text("pdf_url"), - is_oa: boolean("is_oa"), - version: text("version"), - license: text("license"), - }, - (table) => { - return { - work_id_idx: index("works_primary_locations_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); - -export const worksInOpenalex = openalex.table( - "works", - { - id: text("id").notNull(), - doi: text("doi"), - title: text("title"), - display_name: text("display_name"), - publication_year: integer("publication_year"), - publication_date: text("publication_date"), - type: text("type"), - cited_by_count: integer("cited_by_count"), - is_retracted: boolean("is_retracted"), - is_paratext: boolean("is_paratext"), - cited_by_api_url: text("cited_by_api_url"), - abstract_inverted_index: json("abstract_inverted_index"), - language: text("language"), - publication_date_date: date("publication_date_date"), - }, - (table) => { - return { - publication_date_idx: index("works_publication_date_idx").using( - "btree", - table.publication_date - ), - }; - } -); + publisher_id: text("publisher_id"), + openalex: text("openalex"), + ror: text("ror"), + wikidata: text("wikidata"), +}); + +export const institutions_associated_institutionsInOpenalex = openalex.table("institutions_associated_institutions", { + institution_id: text("institution_id"), + associated_institution_id: text("associated_institution_id"), + relationship: text("relationship"), +}); + +export const works_primary_locationsInOpenalex = openalex.table("works_primary_locations", { + work_id: text("work_id"), + source_id: text("source_id"), + landing_page_url: text("landing_page_url"), + pdf_url: text("pdf_url"), + is_oa: boolean("is_oa"), + version: text("version"), + license: text("license"), +}, +(table) => { + return { + work_id_idx: index("works_primary_locations_work_id_idx").using("btree", table.work_id), + } +}); + +export const worksInOpenalex = openalex.table("works", { + id: text("id").notNull(), + doi: text("doi"), + title: text("title"), + display_name: text("display_name"), + publication_year: integer("publication_year"), + publication_date: text("publication_date"), + type: text("type"), + cited_by_count: integer("cited_by_count"), + is_retracted: boolean("is_retracted"), + is_paratext: boolean("is_paratext"), + cited_by_api_url: text("cited_by_api_url"), + abstract_inverted_index: json("abstract_inverted_index"), + language: text("language"), + publication_date_date: date("publication_date_date"), +}, +(table) => { + return { + publication_date_idx: index("works_publication_date_idx").using("btree", table.publication_date), + } +}); export const institutionsInOpenalex = openalex.table("institutions", { - id: text("id").notNull(), - ror: text("ror"), - display_name: text("display_name"), - country_code: text("country_code"), - type: text("type"), - homepage_url: text("homepage_url"), - image_url: text("image_url"), - image_thumbnail_url: text("image_thumbnail_url"), - display_name_acronyms: json("display_name_acronyms"), - display_name_alternatives: json("display_name_alternatives"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: "string" }), -}); - -export const institutions_counts_by_yearInOpenalex = openalex.table( - "institutions_counts_by_year", - { - institution_id: text("institution_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), - } -); + id: text("id").notNull(), + ror: text("ror"), + display_name: text("display_name"), + country_code: text("country_code"), + type: text("type"), + homepage_url: text("homepage_url"), + image_url: text("image_url"), + image_thumbnail_url: text("image_thumbnail_url"), + display_name_acronyms: json("display_name_acronyms"), + display_name_alternatives: json("display_name_alternatives"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: 'string' }), +}); + +export const institutions_counts_by_yearInOpenalex = openalex.table("institutions_counts_by_year", { + institution_id: text("institution_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), +}); export const sourcesInOpenalex = openalex.table("sources", { - id: text("id").notNull(), - issn_l: text("issn_l"), - issn: json("issn"), - display_name: text("display_name"), - publisher: text("publisher"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - is_oa: boolean("is_oa"), - is_in_doaj: boolean("is_in_doaj"), - homepage_url: text("homepage_url"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: "string" }), -}); - -export const sources_counts_by_yearInOpenalex = openalex.table( - "sources_counts_by_year", - { - source_id: text("source_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), - } -); + id: text("id").notNull(), + issn_l: text("issn_l"), + issn: json("issn"), + display_name: text("display_name"), + publisher: text("publisher"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + is_oa: boolean("is_oa"), + is_in_doaj: boolean("is_in_doaj"), + homepage_url: text("homepage_url"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: 'string' }), +}); + +export const sources_counts_by_yearInOpenalex = openalex.table("sources_counts_by_year", { + source_id: text("source_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), +}); export const works_biblioInOpenalex = openalex.table("works_biblio", { - work_id: text("work_id").notNull(), - volume: text("volume"), - issue: text("issue"), - first_page: text("first_page"), - last_page: text("last_page"), -}); - -export const works_conceptsInOpenalex = openalex.table( - "works_concepts", - { - work_id: text("work_id"), - concept_id: text("concept_id"), - score: real("score"), - }, - (table) => { - return { - concept_id_idx: index("works_concepts_concept_id_idx").using( - "btree", - table.concept_id - ), - work_id_idx: index("works_concepts_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); + work_id: text("work_id").notNull(), + volume: text("volume"), + issue: text("issue"), + first_page: text("first_page"), + last_page: text("last_page"), +}); + +export const works_conceptsInOpenalex = openalex.table("works_concepts", { + work_id: text("work_id"), + concept_id: text("concept_id"), + score: real("score"), +}, +(table) => { + return { + concept_id_idx: index("works_concepts_concept_id_idx").using("btree", table.concept_id), + work_id_idx: index("works_concepts_work_id_idx").using("btree", table.work_id), + } +}); export const works_idsInOpenalex = openalex.table("works_ids", { - work_id: text("work_id").notNull(), - openalex: text("openalex"), - doi: text("doi"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), - pmid: text("pmid"), - pmcid: text("pmcid"), -}); - -export const works_meshInOpenalex = openalex.table( - "works_mesh", - { - work_id: text("work_id"), - descriptor_ui: text("descriptor_ui"), - descriptor_name: text("descriptor_name"), - qualifier_ui: text("qualifier_ui"), - qualifier_name: text("qualifier_name"), - is_major_topic: boolean("is_major_topic"), - }, - (table) => { - return { - descriptor_ui_idx: index("works_mesh_descriptor_ui_idx").using( - "btree", - table.descriptor_ui - ), - qualifier_ui_idx: index("works_mesh_qualifier_ui_idx").using( - "btree", - table.qualifier_ui - ), - work_id_idx: index("works_mesh_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); - -export const works_open_accessInOpenalex = openalex.table( - "works_open_access", - { - work_id: text("work_id").notNull(), - is_oa: boolean("is_oa"), - oa_status: text("oa_status"), - oa_url: text("oa_url"), - any_repository_has_fulltext: boolean("any_repository_has_fulltext"), - }, - (table) => { - return { - work_id_idx: index("works_open_access_work_id_idx").using( - "btree", - table.work_id - ), - work_id_idx1: index("works_open_access_work_id_idx1").using( - "btree", - table.work_id - ), - }; - } -); + work_id: text("work_id").notNull(), + openalex: text("openalex"), + doi: text("doi"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), + pmid: text("pmid"), + pmcid: text("pmcid"), +}); + +export const works_meshInOpenalex = openalex.table("works_mesh", { + work_id: text("work_id"), + descriptor_ui: text("descriptor_ui"), + descriptor_name: text("descriptor_name"), + qualifier_ui: text("qualifier_ui"), + qualifier_name: text("qualifier_name"), + is_major_topic: boolean("is_major_topic"), +}, +(table) => { + return { + descriptor_ui_idx: index("works_mesh_descriptor_ui_idx").using("btree", table.descriptor_ui), + qualifier_ui_idx: index("works_mesh_qualifier_ui_idx").using("btree", table.qualifier_ui), + work_id_idx: index("works_mesh_work_id_idx").using("btree", table.work_id), + } +}); + +export const works_open_accessInOpenalex = openalex.table("works_open_access", { + work_id: text("work_id").notNull(), + is_oa: boolean("is_oa"), + oa_status: text("oa_status"), + oa_url: text("oa_url"), + any_repository_has_fulltext: boolean("any_repository_has_fulltext"), +}, +(table) => { + return { + work_id_idx: index("works_open_access_work_id_idx").using("btree", table.work_id), + work_id_idx1: index("works_open_access_work_id_idx1").using("btree", table.work_id), + } +}); export const sources_idsInOpenalex = openalex.table("sources_ids", { - source_id: text("source_id"), - openalex: text("openalex"), - issn_l: text("issn_l"), - issn: json("issn"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), - wikidata: text("wikidata"), - fatcat: text("fatcat"), -}); - -export const works_locationsInOpenalex = openalex.table( - "works_locations", - { - work_id: text("work_id"), - source_id: text("source_id"), - landing_page_url: text("landing_page_url"), - pdf_url: text("pdf_url"), - is_oa: boolean("is_oa"), - version: text("version"), - license: text("license"), - }, - (table) => { - return { - work_id_idx: index("works_locations_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); - -export const works_referenced_worksInOpenalex = openalex.table( - "works_referenced_works", - { - work_id: text("work_id"), - referenced_work_id: text("referenced_work_id"), - }, - (table) => { - return { - referenced_work_id_idx: index( - "works_referenced_works_referenced_work_id_idx" - ).using("btree", table.referenced_work_id), - work_id_idx: index("works_referenced_works_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); - -export const works_related_worksInOpenalex = openalex.table( - "works_related_works", - { - work_id: text("work_id"), - related_work_id: text("related_work_id"), - }, - (table) => { - return { - related_work_id_idx: index( - "works_related_works_related_work_id_idx" - ).using("btree", table.related_work_id), - work_id_idx: index("works_related_works_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); - -export const works_topicsInOpenalex = openalex.table( - "works_topics", - { - work_id: text("work_id"), - topic_id: text("topic_id"), - score: real("score"), - }, - (table) => { - return { - topic_id_idx: index("works_topics_topic_id_idx").using( - "btree", - table.topic_id - ), - work_id_idx: index("works_topics_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); + source_id: text("source_id"), + openalex: text("openalex"), + issn_l: text("issn_l"), + issn: json("issn"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), + wikidata: text("wikidata"), + fatcat: text("fatcat"), +}); + +export const works_locationsInOpenalex = openalex.table("works_locations", { + work_id: text("work_id"), + source_id: text("source_id"), + landing_page_url: text("landing_page_url"), + pdf_url: text("pdf_url"), + is_oa: boolean("is_oa"), + version: text("version"), + license: text("license"), +}, +(table) => { + return { + work_id_idx: index("works_locations_work_id_idx").using("btree", table.work_id), + } +}); + +export const works_referenced_worksInOpenalex = openalex.table("works_referenced_works", { + work_id: text("work_id"), + referenced_work_id: text("referenced_work_id"), +}, +(table) => { + return { + referenced_work_id_idx: index("works_referenced_works_referenced_work_id_idx").using("btree", table.referenced_work_id), + work_id_idx: index("works_referenced_works_work_id_idx").using("btree", table.work_id), + } +}); + +export const works_related_worksInOpenalex = openalex.table("works_related_works", { + work_id: text("work_id"), + related_work_id: text("related_work_id"), +}, +(table) => { + return { + related_work_id_idx: index("works_related_works_related_work_id_idx").using("btree", table.related_work_id), + work_id_idx: index("works_related_works_work_id_idx").using("btree", table.work_id), + } +}); + +export const works_topicsInOpenalex = openalex.table("works_topics", { + work_id: text("work_id"), + topic_id: text("topic_id"), + score: real("score"), +}, +(table) => { + return { + topic_id_idx: index("works_topics_topic_id_idx").using("btree", table.topic_id), + work_id_idx: index("works_topics_work_id_idx").using("btree", table.work_id), + } +}); export const authorsInOpenalex = openalex.table("authors", { - id: text("id").notNull(), - orcid: text("orcid"), - display_name: text("display_name"), - display_name_alternatives: json("display_name_alternatives"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - last_known_institution: text("last_known_institution"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: "string" }), -}); - -export const authors_counts_by_yearInOpenalex = openalex.table( - "authors_counts_by_year", - { - author_id: text("author_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), - } -); + id: text("id").notNull(), + orcid: text("orcid"), + display_name: text("display_name"), + display_name_alternatives: json("display_name_alternatives"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + last_known_institution: text("last_known_institution"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: 'string' }), +}); + +export const authors_counts_by_yearInOpenalex = openalex.table("authors_counts_by_year", { + author_id: text("author_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), +}); export const authors_idsInOpenalex = openalex.table("authors_ids", { - author_id: text("author_id").notNull(), - openalex: text("openalex"), - orcid: text("orcid"), - scopus: text("scopus"), - twitter: text("twitter"), - wikipedia: text("wikipedia"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), + author_id: text("author_id").notNull(), + openalex: text("openalex"), + orcid: text("orcid"), + scopus: text("scopus"), + twitter: text("twitter"), + wikipedia: text("wikipedia"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), }); export const topicsInOpenalex = openalex.table("topics", { - id: text("id").notNull(), - display_name: text("display_name"), - subfield_id: text("subfield_id"), - subfield_display_name: text("subfield_display_name"), - field_id: text("field_id"), - field_display_name: text("field_display_name"), - domain_id: text("domain_id"), - domain_display_name: text("domain_display_name"), - description: text("description"), - keywords: text("keywords"), - works_api_url: text("works_api_url"), - wikipedia_id: text("wikipedia_id"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - updated_date: timestamp("updated_date", { mode: "string" }), -}); - -export const conceptsInOpenalex = openalex.table( - "concepts", - { - id: text("id").notNull(), - wikidata: text("wikidata"), - display_name: text("display_name"), - level: integer("level"), - description: text("description"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - image_url: text("image_url"), - image_thumbnail_url: text("image_thumbnail_url"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: "string" }), - descriptions_embeddings: vector("descriptions_embeddings", { - dimensions: 768, - }), - name_embeddings: vector("name_embeddings", { dimensions: 768 }), - }, - (table) => { - return { - descriptions_embeddings_idx: index("concepts_descriptions_embeddings_idx") - .using("ivfflat", table.descriptions_embeddings.op("vector_l2_ops")) - .with({ lists: "100" }), - name_embeddings_idx: index("concepts_name_embeddings_idx") - .using("ivfflat", table.name_embeddings.op("vector_l2_ops")) - .with({ lists: "100" }), - }; - } -); - -export const concepts_ancestorsInOpenalex = openalex.table( - "concepts_ancestors", - { - concept_id: text("concept_id"), - ancestor_id: text("ancestor_id"), - }, - (table) => { - return { - concept_id_idx: index("concepts_ancestors_concept_id_idx").using( - "btree", - table.concept_id - ), - }; - } -); - -export const concepts_counts_by_yearInOpenalex = openalex.table( - "concepts_counts_by_year", - { - concept_id: text("concept_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), - } -); - -export const works_authorshipsInOpenalex = openalex.table( - "works_authorships", - { - work_id: text("work_id"), - author_position: text("author_position"), - author_id: text("author_id"), - institution_id: text("institution_id"), - raw_affiliation_string: text("raw_affiliation_string"), - }, - (table) => { - return { - author_id_idx: index("works_authorships_author_id_idx").using( - "btree", - table.author_id - ), - institution_id_idx: index("works_authorships_institution_id_idx").using( - "btree", - table.institution_id - ), - work_id_idx: index("works_authorships_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); - -export const works_best_oa_locationsInOpenalex = openalex.table( - "works_best_oa_locations", - { - work_id: text("work_id"), - source_id: text("source_id"), - landing_page_url: text("landing_page_url"), - pdf_url: text("pdf_url"), - is_oa: boolean("is_oa"), - version: text("version"), - license: text("license"), - }, - (table) => { - return { - work_id_idx: index("works_best_oa_locations_work_id_idx").using( - "btree", - table.work_id - ), - }; - } -); + id: text("id").notNull(), + display_name: text("display_name"), + subfield_id: text("subfield_id"), + subfield_display_name: text("subfield_display_name"), + field_id: text("field_id"), + field_display_name: text("field_display_name"), + domain_id: text("domain_id"), + domain_display_name: text("domain_display_name"), + description: text("description"), + keywords: text("keywords"), + works_api_url: text("works_api_url"), + wikipedia_id: text("wikipedia_id"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + updated_date: timestamp("updated_date", { mode: 'string' }), +}); + +export const conceptsInOpenalex = openalex.table("concepts", { + id: text("id").notNull(), + wikidata: text("wikidata"), + display_name: text("display_name"), + level: integer("level"), + description: text("description"), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + image_url: text("image_url"), + image_thumbnail_url: text("image_thumbnail_url"), + works_api_url: text("works_api_url"), + updated_date: timestamp("updated_date", { mode: 'string' }), + descriptions_embeddings: vector("descriptions_embeddings", { dimensions: 768 }), + name_embeddings: vector("name_embeddings", { dimensions: 768 }), +}, +(table) => { + return { + descriptions_embeddings_idx: index("concepts_descriptions_embeddings_idx").using("ivfflat", table.descriptions_embeddings.op("vector_l2_ops")).with({lists: "100"}), + name_embeddings_idx: index("concepts_name_embeddings_idx").using("ivfflat", table.name_embeddings.op("vector_l2_ops")).with({lists: "100"}), + } +}); + +export const concepts_ancestorsInOpenalex = openalex.table("concepts_ancestors", { + concept_id: text("concept_id"), + ancestor_id: text("ancestor_id"), +}, +(table) => { + return { + concept_id_idx: index("concepts_ancestors_concept_id_idx").using("btree", table.concept_id), + } +}); + +export const concepts_counts_by_yearInOpenalex = openalex.table("concepts_counts_by_year", { + concept_id: text("concept_id").notNull(), + year: integer("year").notNull(), + works_count: integer("works_count"), + cited_by_count: integer("cited_by_count"), + oa_works_count: integer("oa_works_count"), +}); + +export const works_authorshipsInOpenalex = openalex.table("works_authorships", { + work_id: text("work_id"), + author_position: text("author_position"), + author_id: text("author_id"), + institution_id: text("institution_id"), + raw_affiliation_string: text("raw_affiliation_string"), +}, +(table) => { + return { + author_id_idx: index("works_authorships_author_id_idx").using("btree", table.author_id), + institution_id_idx: index("works_authorships_institution_id_idx").using("btree", table.institution_id), + work_id_idx: index("works_authorships_work_id_idx").using("btree", table.work_id), + } +}); + +export const works_best_oa_locationsInOpenalex = openalex.table("works_best_oa_locations", { + work_id: text("work_id"), + source_id: text("source_id"), + landing_page_url: text("landing_page_url"), + pdf_url: text("pdf_url"), + is_oa: boolean("is_oa"), + version: text("version"), + license: text("license"), +}, +(table) => { + return { + work_id_idx: index("works_best_oa_locations_work_id_idx").using("btree", table.work_id), + } +}); export const concepts_idsInOpenalex = openalex.table("concepts_ids", { - concept_id: text("concept_id").notNull(), - openalex: text("openalex"), - wikidata: text("wikidata"), - wikipedia: text("wikipedia"), - umls_aui: json("umls_aui"), - umls_cui: json("umls_cui"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), -}); - -export const concepts_related_conceptsInOpenalex = openalex.table( - "concepts_related_concepts", - { - concept_id: text("concept_id"), - related_concept_id: text("related_concept_id"), - score: real("score"), - }, - (table) => { - return { - concept_id_idx: index("concepts_related_concepts_concept_id_idx").using( - "btree", - table.concept_id - ), - related_concept_id_idx: index( - "concepts_related_concepts_related_concept_id_idx" - ).using("btree", table.related_concept_id), - }; - } -); - -export const batchesInOpenAlex = openalex.table("batch", { - id: serial("id").primaryKey(), - createdAt: timestamp("createdAt", { mode: "date" }), - updatedAt: timestamp("updatedAt", { mode: "date" }), -}); - -export const workBatchesInOpenAlex = openalex.table("works_batch", { - work_id: text("work_id") - .references(() => worksInOpenalex.id, { onDelete: "set null" }) - .unique() - .notNull(), - batch_id: integer("batch_id") - .references(() => batchesInOpenAlex.id, { onDelete: "set null" }) - .unique() - .notNull(), + concept_id: text("concept_id").notNull(), + openalex: text("openalex"), + wikidata: text("wikidata"), + wikipedia: text("wikipedia"), + umls_aui: json("umls_aui"), + umls_cui: json("umls_cui"), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint("mag", { mode: "number" }), }); + +export const concepts_related_conceptsInOpenalex = openalex.table("concepts_related_concepts", { + concept_id: text("concept_id"), + related_concept_id: text("related_concept_id"), + score: real("score"), +}, +(table) => { + return { + concept_id_idx: index("concepts_related_concepts_concept_id_idx").using("btree", table.concept_id), + related_concept_id_idx: index("concepts_related_concepts_related_concept_id_idx").using("btree", table.related_concept_id), + } +}); \ No newline at end of file diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index e26d3e404..92c258f48 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -2,12 +2,70 @@ import "dotenv/config"; import cron from "node-cron"; import { runImport } from "./src/script.js"; import { logger } from "./src/logger.js"; +import { differenceInDays, endOfDay, startOfDay, subDays } from "date-fns"; async function main() { - cron.schedule("0 0 * * *", async () => { - logger.info("Running a task evey day at 12:00 AM"); - await runImport(); - }); + let cliArgs = parseArgs(); + if (!cliArgs) { + cron.schedule("*/3 * * * *", async () => { + logger.info("Running a task evey day at 12:00 AM"); + let currentDate = new Date(); + // let from_created_date = startOfDay(subDays(currentDate, 1)); + // let to_created_date = endOfDay(subDays(currentDate, 1)); + let from_created_date = startOfDay(subDays(currentDate, 0)); + let to_created_date = endOfDay(subDays(currentDate, 0)); + await runImport({ from: from_created_date, to: to_created_date }); + }); + } else if (cliArgs.start) { + logger.info("Running Script in Time travel mode ⏰✈️"); + let startDate = cliArgs.start; + let endDate = cliArgs.end || cliArgs.start; + let diffInDays = differenceInDays(startDate, endDate!); + logger.info({ diffInDays }, "differenceInDays"); + // run script from start date to end date in a loop + } +} + +/** + * Parses command line arguments for start and end dates. + * + * @returns An object with 'start' and 'end' Date properties if valid args are provided, + * or undefined if no valid args are found. + * @throws {Error} If the start argument is invalid or missing. + */ +function parseArgs() { + const parseDate = (dateString: string) => { + try { + return new Date(dateString); + } catch (err) { + logger.error({ err }, "[Error]::Parsing Date args"); + return undefined; + } + }; + + logger.info({ args: process.argv }, "ARGS"); + if (process.argv.length > 2) { + let param: { start?: Date | undefined; end?: Date | undefined } = {}; + let start = process.argv[2]; + let end = process.argv[3]; + if (start.startsWith("--start=")) { + param.start = parseDate(start.split("=")[1]); + } else { + throw new Error( + `Invalid cli args\n + Usage node ./index.js --start=[MM-DD-YYYY] --end=[MM-DD-YYYY]`, + ); + } + if (end.startsWith("--end=")) { + param.end = parseDate(end.split("=")[1]); + } + logger.info(param, "ARGS"); + + if (param.start) return param; + return; + } + + return; } main() diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 293b1d7e2..a2eb64f4b 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -23,6 +23,7 @@ "description": "", "devDependencies": { "@types/node": "^20.14.12", + "@types/node-cron": "^3.0.11", "@types/pg": "^8.11.6", "drizzle-kit": "^0.22.8", "nodemon": "^3.0.2", diff --git a/openalex-importer/src/db/index.ts b/openalex-importer/src/db/index.ts index 868a327f0..c786f4c84 100644 --- a/openalex-importer/src/db/index.ts +++ b/openalex-importer/src/db/index.ts @@ -6,6 +6,7 @@ import { drizzle, NodePgQueryResultHKT } from "drizzle-orm/node-postgres"; // import { Client } from "pg"; import { DataModels } from "../transformers.js"; import * as openAlexSchema from "../../drizzle/schema.js"; +import * as batchesSchema from "../../drizzle/batches-schema.js"; import { PgTransaction } from "drizzle-orm/pg-core"; import { and, eq, ExtractTablesWithRelations } from "drizzle-orm"; import { logger } from "../logger.js"; @@ -18,9 +19,9 @@ export const pool = new Pool({ options: "-c search_path=public", }); +const { batchesInOpenAlex, workBatchesInOpenAlex } = batchesSchema; + const { - batchesInOpenAlex, - workBatchesInOpenAlex, worksInOpenalex, works_idsInOpenalex, works_authorshipsInOpenalex, @@ -95,7 +96,7 @@ export const saveData = async (models: DataModels) => { batch_id: savedBatch[0].id, }) .onConflictDoNothing({ target: workBatchesInOpenAlex.work_id }); - }) + }), ); logger.info("Works data to persisted"); @@ -127,7 +128,7 @@ export const saveData = async (models: DataModels) => { const updateWorkIds = async ( tx: PgTransactionType, - data: DataModels["works_id"] + data: DataModels["works_id"], ) => { await Promise.all( data.map(async (entry) => { @@ -138,13 +139,13 @@ const updateWorkIds = async ( .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_idsInOpenalex).values(entry); - }) + }), ); }; const updateWorksBestOaLocations = async ( tx: PgTransactionType, - data: DataModels["works_best_oa_locations"] + data: DataModels["works_best_oa_locations"], ) => { await Promise.all( data.map(async (entry) => { @@ -155,13 +156,13 @@ const updateWorksBestOaLocations = async ( .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_best_oa_locationsInOpenalex).values(entry); - }) + }), ); }; const updateWorksPrimaryLocations = async ( tx: PgTransactionType, - data: DataModels["works_primary_locations"] + data: DataModels["works_primary_locations"], ) => { await Promise.all( data.map(async (entry) => { @@ -172,13 +173,13 @@ const updateWorksPrimaryLocations = async ( .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_primary_locationsInOpenalex).values(entry); - }) + }), ); }; const updateWorksLocations = async ( tx: PgTransactionType, - data: DataModels["works_locations"] + data: DataModels["works_locations"], ) => { await Promise.all( data.map(async (entry) => { @@ -188,19 +189,19 @@ const updateWorksLocations = async ( .where( eq( works_locationsInOpenalex.landing_page_url, - entry?.landing_page_url! - ) + entry?.landing_page_url!, + ), ) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_locationsInOpenalex).values(entry); - }) + }), ); }; const updateWorksReferencedWorks = async ( tx: PgTransactionType, - data: DataModels["works_referenced_works"] + data: DataModels["works_referenced_works"], ) => { await Promise.all( data.map(async (entry) => { @@ -212,20 +213,20 @@ const updateWorksReferencedWorks = async ( eq(works_referenced_worksInOpenalex.work_id, entry.work_id), eq( works_referenced_worksInOpenalex.referenced_work_id, - entry.referenced_work_id - ) - ) + entry.referenced_work_id, + ), + ), ) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_referenced_worksInOpenalex).values(entry); - }) + }), ); }; const updateWorksRelatedWorks = async ( tx: PgTransactionType, - data: DataModels["works_related_works"] + data: DataModels["works_related_works"], ) => { await Promise.all( data.map(async (entry) => { @@ -237,20 +238,20 @@ const updateWorksRelatedWorks = async ( eq(works_related_worksInOpenalex.work_id, entry.work_id), eq( works_related_worksInOpenalex.related_work_id, - entry.related_work_id - ) - ) + entry.related_work_id, + ), + ), ) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_related_worksInOpenalex).values(entry); - }) + }), ); }; const updateWorksOpenAccess = async ( tx: PgTransactionType, - data: DataModels["works_open_access"] + data: DataModels["works_open_access"], ) => { await Promise.all( data.map(async (entry) => { @@ -261,13 +262,13 @@ const updateWorksOpenAccess = async ( .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_open_accessInOpenalex).values(entry); - }) + }), ); }; const updateWorkAuthorships = async ( tx: PgTransactionType, - data: DataModels["works_authorships"] + data: DataModels["works_authorships"], ) => { await Promise.all( data.map(async (entry) => { @@ -281,13 +282,13 @@ const updateWorkAuthorships = async ( ], set: entry, }); - }) + }), ); }; const updateAuthors = async ( tx: PgTransactionType, - data: DataModels["authors"] + data: DataModels["authors"], ) => { await Promise.all( data.map(async (entry) => { @@ -295,14 +296,14 @@ const updateAuthors = async ( target: authorsInOpenalex.id, set: entry, }); - }) + }), ); // logger.info("Authors data to persisted"); }; const updateAuthorIds = async ( tx: PgTransactionType, - data: DataModels["authors_ids"] + data: DataModels["authors_ids"], ) => { await Promise.all( data.map(async (entry) => { @@ -313,13 +314,13 @@ const updateAuthorIds = async ( .limit(1); if (duplicate.length > 0) return null; return await tx.insert(authors_idsInOpenalex).values(entry); - }) + }), ); }; const updateWorksBiblio = async ( tx: PgTransactionType, - data: DataModels["works_biblio"] + data: DataModels["works_biblio"], ) => { await Promise.all( data.map(async (entry) => { @@ -327,13 +328,13 @@ const updateWorksBiblio = async ( target: works_biblioInOpenalex.work_id, set: entry, }); - }) + }), ); }; const updateWorksConcepts = async ( tx: PgTransactionType, - data: DataModels["works_concepts"] + data: DataModels["works_concepts"], ) => { await Promise.all( data.map(async (entry) => { @@ -343,19 +344,19 @@ const updateWorksConcepts = async ( .where( and( eq(works_conceptsInOpenalex.work_id, entry.work_id!), - eq(works_conceptsInOpenalex.concept_id, entry.concept_id!) - ) + eq(works_conceptsInOpenalex.concept_id, entry.concept_id!), + ), ) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_conceptsInOpenalex).values(entry); - }) + }), ); }; const updateWorksMesh = async ( tx: PgTransactionType, - data: DataModels["works_mesh"] + data: DataModels["works_mesh"], ) => { await Promise.all( data.map(async (entry) => { @@ -366,19 +367,19 @@ const updateWorksMesh = async ( and( eq(works_meshInOpenalex.work_id, entry.work_id!), eq(works_meshInOpenalex.descriptor_ui, entry.descriptor_ui!), - eq(works_meshInOpenalex.qualifier_ui, entry.qualifier_ui!) - ) + eq(works_meshInOpenalex.qualifier_ui, entry.qualifier_ui!), + ), ) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_meshInOpenalex).values(entry); - }) + }), ); }; const updateWorksTopics = async ( tx: PgTransactionType, - data: DataModels["works_topics"] + data: DataModels["works_topics"], ) => { await Promise.all( data.map(async (entry) => { @@ -388,12 +389,12 @@ const updateWorksTopics = async ( .where( and( eq(works_topicsInOpenalex.work_id, entry.work_id!), - eq(works_topicsInOpenalex.topic_id, entry.topic_id!) - ) + eq(works_topicsInOpenalex.topic_id, entry.topic_id!), + ), ) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_topicsInOpenalex).values(entry); - }) + }), ); }; diff --git a/openalex-importer/src/script.ts b/openalex-importer/src/script.ts index 2d81e1715..01c48f0db 100644 --- a/openalex-importer/src/script.ts +++ b/openalex-importer/src/script.ts @@ -70,7 +70,7 @@ async function performFetch(url: string, searchQuery: Query): Promise { const filter = Object.entries(param).reduce( (queryStr, [key, value]) => queryStr ? `${queryStr},${key}:${value}` : `${key}:${value}`, - "" + "", ); return filter; }; @@ -121,7 +121,7 @@ async function performFetch(url: string, searchQuery: Query): Promise { message: response.statusText, data: await response.json(), }, - "Api error: " + "Api error: ", ); break; } @@ -141,11 +141,13 @@ const saveToLogs = (data: string, logFile: string) => { } }; -export const runImport = async () => { +export const runImport = async ({ from, to }: { from: Date; to: Date }) => { // figure time parameters - let currentDate = new Date(); - let from_created_date = startOfDay(subDays(currentDate, 1)); - let to_created_date = endOfDay(subDays(currentDate, 1)); + // let currentDate = new Date(); + // let from_created_date = startOfDay(subDays(currentDate, 1)); + // let to_created_date = endOfDay(subDays(currentDate, 1)); + let from_created_date = from; // startOfDay(subDays(currentDate, 0)); + let to_created_date = to; // endOfDay(subDays(currentDate, 0)); const dateFormatter = new Intl.DateTimeFormat("fr-CA", { year: "numeric", @@ -197,17 +199,17 @@ export const runImport = async () => { saveToLogs(JSON.stringify(works_locations), "works_locations.json"); saveToLogs( JSON.stringify(works_best_oa_locations), - "works_best_oa_locations.json" + "works_best_oa_locations.json", ); saveToLogs(JSON.stringify(works_open_access), "works_open_access.json"); saveToLogs(JSON.stringify(works_mesh), "works_mesh.json"); saveToLogs( JSON.stringify(works_primary_locations), - "works_primary_locations.json" + "works_primary_locations.json", ); saveToLogs( JSON.stringify(works_referenced_works), - "works_referenced_works.json" + "works_referenced_works.json", ); saveToLogs(JSON.stringify(works_related_works), "works_related_works.json"); saveToLogs(JSON.stringify(works_topics), "works_topics.json"); diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index b6a507e90..a56e2e9bf 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -349,6 +349,11 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== +"@types/node-cron@^3.0.11": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@types/node-cron/-/node-cron-3.0.11.tgz#70b7131f65038ae63cfe841354c8aba363632344" + integrity sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg== + "@types/node@*": version "22.0.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" From 0f2d1f4c42929858414ca1141454036e8c073b57 Mon Sep 17 00:00:00 2001 From: shadrach Date: Fri, 6 Sep 2024 16:41:37 -0500 Subject: [PATCH 15/20] complete time travel logic --- openalex-importer/index.ts | 38 ++++++++++++++++++++++++++++++---- openalex-importer/nodemon.json | 14 ++++--------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index 92c258f48..d2030abf9 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -2,7 +2,13 @@ import "dotenv/config"; import cron from "node-cron"; import { runImport } from "./src/script.js"; import { logger } from "./src/logger.js"; -import { differenceInDays, endOfDay, startOfDay, subDays } from "date-fns"; +import { + addDays, + differenceInDays, + endOfDay, + startOfDay, + subDays, +} from "date-fns"; async function main() { let cliArgs = parseArgs(); @@ -17,13 +23,37 @@ async function main() { await runImport({ from: from_created_date, to: to_created_date }); }); } else if (cliArgs.start) { - logger.info("Running Script in Time travel mode ⏰✈️"); + logger.info("Running Script in Time travel moide ⏰✈️"); let startDate = cliArgs.start; let endDate = cliArgs.end || cliArgs.start; - let diffInDays = differenceInDays(startDate, endDate!); + let diffInDays = differenceInDays(endDate, startDate); logger.info({ diffInDays }, "differenceInDays"); // run script from start date to end date in a loop + if (diffInDays === 0) { + logger.info( + { from: startOfDay(startDate), to: endOfDay(startDate) }, + "Single Day time travel", + ); + await runImport({ from: startOfDay(startDate), to: endOfDay(startDate) }); + } else { + // run import from start to end date + let currentDate = startDate; + + while (diffInDays > 0) { + logger.info({ diffInDays, currentDate }, "Run import script"); + // await runImport({ from: startOfDay(currentDate), to: endOfDay(currentDate) }); + currentDate = addDays(currentDate, 1); + diffInDays = differenceInDays(endDate, currentDate); + } + + logger.info( + { currentDate, diffInDays, endDate }, + "Time travel completed ⏰✈️", + ); + } } + + return; } /** @@ -60,7 +90,7 @@ function parseArgs() { param.end = parseDate(end.split("=")[1]); } logger.info(param, "ARGS"); - + console.log(param, "ARGS"); if (param.start) return param; return; } diff --git a/openalex-importer/nodemon.json b/openalex-importer/nodemon.json index 5e8099d04..ec6284dce 100644 --- a/openalex-importer/nodemon.json +++ b/openalex-importer/nodemon.json @@ -1,14 +1,8 @@ { - "watch": [ - "." - ], + "watch": ["."], "ext": ".ts,.js,*", - "ignore": [ - "log/server.log", - "logs/", - "postgres/" - ], + "ignore": ["log/server.log", "logs/", "postgres/"], "verbose": true, - "exec": "node -r ts-node/register", + "exec": "node NODE_OPTIONS='--max-old-space-size=81192' -r ts-node/register", "delay": 300 -} \ No newline at end of file +} From f59e167047568e3c2b5db8426b287b9fd6b4f178 Mon Sep 17 00:00:00 2001 From: shadrach Date: Sat, 7 Sep 2024 11:47:12 -0500 Subject: [PATCH 16/20] add todo --- openalex-importer/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index d2030abf9..95fd63c27 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -101,3 +101,5 @@ function parseArgs() { main() .then((_) => logger.info("Open Alex Import script Scheduled")) .catch((err) => logger.info({ err }, "ERROR: data import crashed due to: ")); + +// Todo: Add k8s config file From fcbd7a5883a5b2e1cfa3745b8dc5050c4d7386c4 Mon Sep 17 00:00:00 2001 From: shadrach Date: Mon, 16 Sep 2024 04:25:01 -0500 Subject: [PATCH 17/20] add k8s config --- .github/workflows/build-repo-server.yaml | 28 -------- openalex-importer/kubernetes/deployment.yaml | 67 ++++++++++++++++++++ 2 files changed, 67 insertions(+), 28 deletions(-) create mode 100644 openalex-importer/kubernetes/deployment.yaml diff --git a/.github/workflows/build-repo-server.yaml b/.github/workflows/build-repo-server.yaml index 04c3cd862..b367ed25f 100644 --- a/.github/workflows/build-repo-server.yaml +++ b/.github/workflows/build-repo-server.yaml @@ -25,34 +25,6 @@ env: DOCKER_BUILDKIT: 1 jobs: - # build-and-test: - # runs-on: ubuntu-latest - # # container: - # # image: ubuntu:latest - # # options: --user 1001 - - # steps: - # - name: Check out repository - # uses: actions/checkout@v2 - - # - name: Set up the environment - # # Replace this line with the appropriate setup for your project - # # Examples: - # uses: actions/setup-node@v2 - # with: - # node-version: 16 - - # - name: Install dependencies - # run: cd desci-repo && yarn - - # - name: Run tests - # run: | - # cd desci-repo && export DOCKER_BUILDKIT=1 && yarn && yarn test - # echo "exit code $?" - # if [ $? -ne 0 ]; then - # exit 1 - # fi - build-and-push: # needs: build-and-test name: Build and deploy diff --git a/openalex-importer/kubernetes/deployment.yaml b/openalex-importer/kubernetes/deployment.yaml new file mode 100644 index 000000000..d02267a99 --- /dev/null +++ b/openalex-importer/kubernetes/deployment.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +kind: Service +metadata: + name: openalex-importer-service + labels: + App: OpenAlexImporter +spec: + type: ClusterIP + selector: + App: OpenAlexImporter + ports: + - name: server-api + port: 5494 + targetPort: 5494 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openalex-importer + labels: + App: OpenAlexImporter +spec: + replicas: 1 + revisionHistoryLimit: 2 + selector: + matchLabels: + App: OpenAlexImporter + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + vault.hashicorp.com/agent-inject: "true" + vault.hashicorp.com/agent-inject-status: "update" + vault.hashicorp.com/role: app-vault-reader + vault.hashicorp.com/agent-inject-secret-config: secrets/openalex/db + vault.hashicorp.com/agent-inject-template-config: | + {{- with secret "secrets/desci-server/dev/repo" -}} + echo "sourcing"; + export OPENALEX_API_KEY={{ .Data.OPENALEX_API_KEY }} + export NODE_ENV=production + export DATABASE_URL={{ .Data.DATABASE_URL }} + + {{- end -}} + labels: + App: OpenAlexImporter + spec: + containers: + - image: 523044037273.dkr.ecr.us-east-2.amazonaws.com/openalex-importer:latest + name: openalex-importer + command: ["/bin/bash", "-c"] + args: + - echo "SOURCING ENV"; source /vault/secrets/config; NODE_PATH=./dist node ./dist/index.js; + ports: + - containerPort: 5494 + name: server-api + resources: + limits: + cpu: "2" + memory: 16Gi + requests: + cpu: "1" + memory: 8Gi + serviceAccountName: "vault-auth" From aff7138afd2c7c89c3f6d71335d1ce1f1d84d383 Mon Sep 17 00:00:00 2001 From: shadrach Date: Mon, 16 Sep 2024 06:19:18 -0500 Subject: [PATCH 18/20] add k8s config, update local docker setup and npm scripts, integrate eslint & prettier to enforce code style --- .../workflows/build-openalex-importer.yaml | 118 ++ openalex-importer/.dockerignore | 5 + openalex-importer/.eslintrc.cjs | 44 + openalex-importer/.estlintrc.js | 49 + openalex-importer/.prettierignore | 1 + openalex-importer/.prettierrc | 7 + openalex-importer/Dockerfile | 15 + openalex-importer/docker-compose.yml | 30 +- openalex-importer/index.ts | 60 +- openalex-importer/kubernetes/deployment.yaml | 31 +- openalex-importer/package.json | 34 +- openalex-importer/src/db/index.ts | 168 +- openalex-importer/src/db/types.ts | 14 +- openalex-importer/src/logger.ts | 23 +- openalex-importer/src/script.ts | 114 +- openalex-importer/src/transformers.ts | 99 +- openalex-importer/src/types/index.ts | 4 +- openalex-importer/src/types/institutions.ts | 20 +- openalex-importer/src/types/works.ts | 2 +- openalex-importer/yarn.lock | 1642 ++++++++++++++++- 20 files changed, 2130 insertions(+), 350 deletions(-) create mode 100644 .github/workflows/build-openalex-importer.yaml create mode 100644 openalex-importer/.dockerignore create mode 100755 openalex-importer/.eslintrc.cjs create mode 100644 openalex-importer/.estlintrc.js create mode 100644 openalex-importer/.prettierignore create mode 100644 openalex-importer/.prettierrc create mode 100644 openalex-importer/Dockerfile diff --git a/.github/workflows/build-openalex-importer.yaml b/.github/workflows/build-openalex-importer.yaml new file mode 100644 index 000000000..5c162697e --- /dev/null +++ b/.github/workflows/build-openalex-importer.yaml @@ -0,0 +1,118 @@ +# build.yml +on: + push: + paths: + - .github/workflows/** + - openalex-importer/** + - Dockerfile + branches: # array of glob patterns matching against refs/heads. Optional; defaults to all + - main # triggers on pushes that contain changes + - develop + +name: Build openalex-importer + +# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html +env: + AWS_DEFAULT_REGION: us-east-2 + AWS_DEFAULT_OUTPUT: json + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + CONTAINER_IMAGE: openalex-importer + DOCKER_BUILDKIT: 1 + +jobs: + build-and-push: + name: Build and deploy + runs-on: ubuntu-latest + steps: + - uses: hashicorp/setup-terraform@v1 + - name: Checkout + uses: actions/checkout@v4 + + # Add steps here like linting, testing, minification, etc. + - id: install-aws-cli + uses: unfor19/install-aws-cli-action@v1 + with: + version: 1 + + - uses: prepor/action-aws-iam-authenticator@master + - run: aws-iam-authenticator version + + - name: Install Kubectl + run: | + #$(curl -Ls https://dl.k8s.io/release/stable.txt) + version=v1.23.6 + echo "using kubectl@$version" + curl -sLO "https://dl.k8s.io/release/$version/bin/linux/amd64/kubectl" -o kubectl + chmod +x kubectl + mv kubectl /usr/local/bin + mkdir $HOME/.kube + sudo apt-get update + sudo apt-get install less + echo ${{ secrets.KUBE_CONFIG_DATA }} | base64 --decode > $HOME/.kube/config + aws sts get-caller-identity + + - name: Build and tag the image (DEV) + if: github.ref == 'refs/heads/develop' + run: | + # Build and tag the image + docker build \ + -t $CONTAINER_IMAGE-dev:latest \ + -t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-dev \ + ./openalex-importer + + - name: Build and tag the image (PROD) + if: github.ref == 'refs/heads/main' + run: | + # Build and tag the image + docker build \ + -t $CONTAINER_IMAGE:latest \ + -t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE \ + ./openalex-importer + + # Add additional steps here like scanning of image + + # Only push to registry on master + - name: Push (DEV) + if: github.ref == 'refs/heads/develop' + run: | + # Push image to AWS ECR + aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com + docker tag $CONTAINER_IMAGE-dev:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-dev:${{ github.sha }} + docker tag $CONTAINER_IMAGE-dev:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-dev:latest + docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-dev:${{ github.sha }} + docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-dev:latest + + - name: Push (PROD) + if: github.ref == 'refs/heads/main' + run: | + # Push image to AWS ECR + aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com + docker tag $CONTAINER_IMAGE:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:${{ github.sha }} + docker tag $CONTAINER_IMAGE:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:latest + docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:${{ github.sha }} + docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:latest + + - name: Deploy to EKS (DEV) + # uses: steebchen/kubectl@v2.0.0 + if: github.ref == 'refs/heads/develop' + run: | # defaults to latest kubectl binary version + kubectl apply -f openalex-importer/kubernetes/deployment.yaml + kubectl set image deployment/openalex-importer-dev openalex-importer-dev=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-dev:${{ github.sha }} --record + + - name: Deploy to EKS (PROD) + if: github.ref == 'refs/heads/main' + run: | # defaults to latest kubectl binary version + kubectl apply -f openalex-importer/kubernetes/deployment.yaml + kubectl set image deployment/openalex-importer openalex-importer=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:${{ github.sha }} --record + + - name: Verify EKS Deployment (DEV) + if: github.ref == 'refs/heads/develop' + run: | + kubectl rollout status deployment/openalex-importer-dev + + - name: Verify EKS Deployment (PROD) + if: github.ref == 'refs/heads/main' + run: | + kubectl rollout status deployment/openalex-importer diff --git a/openalex-importer/.dockerignore b/openalex-importer/.dockerignore new file mode 100644 index 000000000..36760cbf0 --- /dev/null +++ b/openalex-importer/.dockerignore @@ -0,0 +1,5 @@ +config +dist +node_modules +.git +.env \ No newline at end of file diff --git a/openalex-importer/.eslintrc.cjs b/openalex-importer/.eslintrc.cjs new file mode 100755 index 000000000..5fa087805 --- /dev/null +++ b/openalex-importer/.eslintrc.cjs @@ -0,0 +1,44 @@ +module.exports = { + parser: '@typescript-eslint/parser', + + extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'], + + plugins: ['@typescript-eslint', 'import'], + + rules: { + // General + '@typescript-eslint/no-unused-vars': 0, + '@typescript-eslint/explicit-module-boundary-types': 0, + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-non-null-assertion': 0, + '@typescript-eslint/ban-ts-comment': 0, + '@typescript-eslint/no-empty-interface': 0, + + // Import + 'import/order': [ + 'error', + { + groups: ['builtin', 'external', 'internal', 'parent', 'sibling'], + 'newlines-between': 'always', + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + }, + ], + }, + + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + moduleDirectory: ['node_modules', 'src/'], + }, + }, + }, +}; diff --git a/openalex-importer/.estlintrc.js b/openalex-importer/.estlintrc.js new file mode 100644 index 000000000..a580b45d5 --- /dev/null +++ b/openalex-importer/.estlintrc.js @@ -0,0 +1,49 @@ +module.exports = { + parser: '@typescript-eslint/parser', + + extends: [ + 'plugin:@typescript-eslint/recommended', + 'prettier', + 'plugin:prettier/recommended', + 'plugin:no-array-reduce/recommended', + ], + + plugins: ['@typescript-eslint', 'import'], + + rules: { + // General + '@typescript-eslint/no-unused-vars': 0, + '@typescript-eslint/explicit-module-boundary-types': 0, + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-non-null-assertion': 0, + '@typescript-eslint/ban-ts-comment': 0, + '@typescript-eslint/no-empty-interface': 0, + + // Import + 'import/order': [ + 'error', + { + groups: ['builtin', 'external', 'internal', 'parent', 'sibling'], + 'newlines-between': 'always', + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + }, + ], + }, + + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + moduleDirectory: ['node_modules', 'src/'], + }, + }, + }, +}; diff --git a/openalex-importer/.prettierignore b/openalex-importer/.prettierignore new file mode 100644 index 000000000..53c37a166 --- /dev/null +++ b/openalex-importer/.prettierignore @@ -0,0 +1 @@ +dist \ No newline at end of file diff --git a/openalex-importer/.prettierrc b/openalex-importer/.prettierrc new file mode 100644 index 000000000..ec23823cc --- /dev/null +++ b/openalex-importer/.prettierrc @@ -0,0 +1,7 @@ +{ + "printWidth": 120, + "semi": true, + "singleQuote": true, + "trailingComma": "all" + } + \ No newline at end of file diff --git a/openalex-importer/Dockerfile b/openalex-importer/Dockerfile new file mode 100644 index 000000000..6015260c8 --- /dev/null +++ b/openalex-importer/Dockerfile @@ -0,0 +1,15 @@ +FROM node:20.8.1-bullseye-slim + +VOLUME /root/.yarn + +RUN npm install -g npm@10.8.2 + +RUN mkdir /app +WORKDIR /app + +COPY . . + +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install +RUN yarn build + +CMD [ "yarn", "start" ] diff --git a/openalex-importer/docker-compose.yml b/openalex-importer/docker-compose.yml index 36b8e789a..343e08487 100644 --- a/openalex-importer/docker-compose.yml +++ b/openalex-importer/docker-compose.yml @@ -1,20 +1,40 @@ -version: "3.7" services: postgres: - container_name: "openalex_db" - image: "ankane/pgvector" + container_name: 'openalex_db' + image: 'ankane/pgvector' restart: always + healthcheck: + test: 'pg_isready -U postgres -d postgres' + interval: 5s + timeout: 15s + retries: 5 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres logging: options: max-size: 10m - max-file: "3" + max-file: '3' ports: - - "5438:5432" + - '5438:5432' volumes: - ./postgres/postgres-data:/var/lib/postgresql/data # copy the sql script to create tables - ./postgres/sql/vector_extension.sql:/docker-entrypoint-initdb.d/0-vector_extension.sql - ./postgres/sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql + openalex-importer: + container_name: 'openalex-importer' + command: yarn dev + build: . + env_file: + - .env + extra_hosts: + - host.docker.internal:host-gateway + depends_on: + postgres: + condition: service_healthy + links: + - postgres + volumes: + - .:/app/ + - /app/node_modules diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index 95fd63c27..19115b799 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -1,20 +1,15 @@ -import "dotenv/config"; -import cron from "node-cron"; -import { runImport } from "./src/script.js"; -import { logger } from "./src/logger.js"; -import { - addDays, - differenceInDays, - endOfDay, - startOfDay, - subDays, -} from "date-fns"; +import 'dotenv/config'; +import cron from 'node-cron'; +import { runImport } from './src/script.js'; +import { logger } from './src/logger.js'; +import { addDays, differenceInDays, endOfDay, startOfDay, subDays } from 'date-fns'; async function main() { let cliArgs = parseArgs(); if (!cliArgs) { - cron.schedule("*/3 * * * *", async () => { - logger.info("Running a task evey day at 12:00 AM"); + cron.schedule('*/2 * * * *', async () => { + logger.info('Running a task evey day at 12:00 AM'); + console.log('Running a task evey day at 12:00 AM'); let currentDate = new Date(); // let from_created_date = startOfDay(subDays(currentDate, 1)); // let to_created_date = endOfDay(subDays(currentDate, 1)); @@ -23,33 +18,27 @@ async function main() { await runImport({ from: from_created_date, to: to_created_date }); }); } else if (cliArgs.start) { - logger.info("Running Script in Time travel moide ⏰✈️"); + logger.info('Running Script in Time travel moide ⏰✈️'); let startDate = cliArgs.start; let endDate = cliArgs.end || cliArgs.start; let diffInDays = differenceInDays(endDate, startDate); - logger.info({ diffInDays }, "differenceInDays"); + logger.info({ diffInDays }, 'differenceInDays'); // run script from start date to end date in a loop if (diffInDays === 0) { - logger.info( - { from: startOfDay(startDate), to: endOfDay(startDate) }, - "Single Day time travel", - ); + logger.info({ from: startOfDay(startDate), to: endOfDay(startDate) }, 'Single Day time travel'); await runImport({ from: startOfDay(startDate), to: endOfDay(startDate) }); } else { // run import from start to end date let currentDate = startDate; while (diffInDays > 0) { - logger.info({ diffInDays, currentDate }, "Run import script"); + logger.info({ diffInDays, currentDate }, 'Run import script'); // await runImport({ from: startOfDay(currentDate), to: endOfDay(currentDate) }); currentDate = addDays(currentDate, 1); diffInDays = differenceInDays(endDate, currentDate); } - logger.info( - { currentDate, diffInDays, endDate }, - "Time travel completed ⏰✈️", - ); + logger.info({ currentDate, diffInDays, endDate }, 'Time travel completed ⏰✈️'); } } @@ -68,29 +57,29 @@ function parseArgs() { try { return new Date(dateString); } catch (err) { - logger.error({ err }, "[Error]::Parsing Date args"); + logger.error({ err }, '[Error]::Parsing Date args'); return undefined; } }; - logger.info({ args: process.argv }, "ARGS"); + logger.info({ args: process.argv }, 'ARGS'); if (process.argv.length > 2) { let param: { start?: Date | undefined; end?: Date | undefined } = {}; let start = process.argv[2]; let end = process.argv[3]; - if (start.startsWith("--start=")) { - param.start = parseDate(start.split("=")[1]); + if (start.startsWith('--start=')) { + param.start = parseDate(start.split('=')[1]); } else { throw new Error( `Invalid cli args\n Usage node ./index.js --start=[MM-DD-YYYY] --end=[MM-DD-YYYY]`, ); } - if (end.startsWith("--end=")) { - param.end = parseDate(end.split("=")[1]); + if (end.startsWith('--end=')) { + param.end = parseDate(end.split('=')[1]); } - logger.info(param, "ARGS"); - console.log(param, "ARGS"); + logger.info(param, 'ARGS'); + console.log(param, 'ARGS'); if (param.start) return param; return; } @@ -99,7 +88,10 @@ function parseArgs() { } main() - .then((_) => logger.info("Open Alex Import script Scheduled")) - .catch((err) => logger.info({ err }, "ERROR: data import crashed due to: ")); + .then((_) => logger.info('Open Alex Import script Scheduled')) + .catch((err) => { + logger.info({ err }, 'ERROR: data import crashed due to: '); + console.log('Error: ', err); + }); // Todo: Add k8s config file diff --git a/openalex-importer/kubernetes/deployment.yaml b/openalex-importer/kubernetes/deployment.yaml index d02267a99..893aab090 100644 --- a/openalex-importer/kubernetes/deployment.yaml +++ b/openalex-importer/kubernetes/deployment.yaml @@ -4,21 +4,6 @@ metadata: name: openalex-importer-service labels: App: OpenAlexImporter -spec: - type: ClusterIP - selector: - App: OpenAlexImporter - ports: - - name: server-api - port: 5494 - targetPort: 5494 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: openalex-importer - labels: - App: OpenAlexImporter spec: replicas: 1 revisionHistoryLimit: 2 @@ -33,8 +18,8 @@ spec: template: metadata: annotations: - vault.hashicorp.com/agent-inject: "true" - vault.hashicorp.com/agent-inject-status: "update" + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-status: 'update' vault.hashicorp.com/role: app-vault-reader vault.hashicorp.com/agent-inject-secret-config: secrets/openalex/db vault.hashicorp.com/agent-inject-template-config: | @@ -43,7 +28,6 @@ spec: export OPENALEX_API_KEY={{ .Data.OPENALEX_API_KEY }} export NODE_ENV=production export DATABASE_URL={{ .Data.DATABASE_URL }} - {{- end -}} labels: App: OpenAlexImporter @@ -51,17 +35,14 @@ spec: containers: - image: 523044037273.dkr.ecr.us-east-2.amazonaws.com/openalex-importer:latest name: openalex-importer - command: ["/bin/bash", "-c"] + command: ['/bin/bash', '-c'] args: - echo "SOURCING ENV"; source /vault/secrets/config; NODE_PATH=./dist node ./dist/index.js; - ports: - - containerPort: 5494 - name: server-api resources: limits: - cpu: "2" + cpu: '2' memory: 16Gi requests: - cpu: "1" + cpu: '1' memory: 8Gi - serviceAccountName: "vault-auth" + serviceAccountName: 'vault-auth' diff --git a/openalex-importer/package.json b/openalex-importer/package.json index a2eb64f4b..4f3cb8ce8 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -7,15 +7,19 @@ "node": ">=16.14" }, "scripts": { - "dev": "npm-run-all --parallel watch-compile watch-dev", + "dev": "tsx watch --inspect=0.0.0.0:9231 index.ts", "watch-dev": "debug=* nodemon --watch \"dist/**/*\" -e js ./dist/index.js", "watch-compile": "debug=* tsc -w --preserveWatchOutput", - "build": "tsc", - "start": "pm2 start ./dist/index.js", + "build": "rimraf dist && tsc", + "start": "node ./dist/index.js", "generate": "drizzle-kit generate", "migrate": "drizzle-kit migrate", "introspect": "drizzle-kit instrospect", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "lint": "eslint --max-warnings 0 --ext .js,ts src", + "lint-staged-husky": "lint-staged", + "lint-prettier": "prettier --config .prettierrc --list-different '{src,test}/**/*.{ts,js,css,scss}'", + "prettier": "prettier --config .prettierrc --write './**/*.{ts,js,css,scss,json,md}'" }, "keywords": [], "author": "", @@ -28,20 +32,40 @@ "drizzle-kit": "^0.22.8", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", + "rimraf": "^3.0.2", "ts-node": "10.9.1", + "tsx": "^4.19.1", "typescript": "5.1.6" }, "dependencies": { "@types/lodash": "^4.17.7", + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", "date-fns": "^3.6.0", "dotenv": "^16.4.5", "drizzle-orm": "^0.32.1", + "eslint": "^7.32.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.24.0", + "eslint-plugin-no-array-reduce": "^1.0.22", + "eslint-plugin-prettier": "^3.4.0", + "lint-staged": "^11.1.2", "lodash": "^4.17.21", "node-cron": "^3.0.3", "pg": "^8.12.0", "pino": "^9.3.2", "pino-http": "^10.2.0", "pino-pretty": "^11.2.2", - "pm2": "^5.4.2" + "pm2": "^5.4.2", + "prettier": "^2.3.2", + "pretty-quick": "^3.1.1" + }, + "lint-staged": { + "*": [ + "pretty-quick --staged" + ], + "{src,test}/**/*.{js,ts}": [ + "eslint --max-warnings 0" + ] } } diff --git a/openalex-importer/src/db/index.ts b/openalex-importer/src/db/index.ts index c786f4c84..bc59c3411 100644 --- a/openalex-importer/src/db/index.ts +++ b/openalex-importer/src/db/index.ts @@ -1,22 +1,22 @@ // import * as pg from 'pg'; -const pg = await import("pg").then((value) => value.default); +const pg = await import('pg').then((value) => value.default); const { Pool } = pg; -import { drizzle, NodePgQueryResultHKT } from "drizzle-orm/node-postgres"; -// import { Client } from "pg"; -import { DataModels } from "../transformers.js"; -import * as openAlexSchema from "../../drizzle/schema.js"; -import * as batchesSchema from "../../drizzle/batches-schema.js"; -import { PgTransaction } from "drizzle-orm/pg-core"; -import { and, eq, ExtractTablesWithRelations } from "drizzle-orm"; -import { logger } from "../logger.js"; +import { and, eq, ExtractTablesWithRelations } from 'drizzle-orm'; +import { drizzle, NodePgQueryResultHKT } from 'drizzle-orm/node-postgres'; +import { PgTransaction } from 'drizzle-orm/pg-core'; -export * from "../../drizzle/schema.js"; -export * from "./types.js"; +import * as batchesSchema from '../../drizzle/batches-schema.js'; +import * as openAlexSchema from '../../drizzle/schema.js'; +import { logger } from '../logger.js'; +import { DataModels } from '../transformers.js'; + +export * from '../../drizzle/schema.js'; +export * from './types.js'; export const pool = new Pool({ connectionString: process.env.DATABASE_URL, - options: "-c search_path=public", + options: '-c search_path=public', }); const { batchesInOpenAlex, workBatchesInOpenAlex } = batchesSchema; @@ -57,7 +57,7 @@ type PgTransactionType = PgTransaction< >; export const saveData = async (models: DataModels) => { - logger.info("Persisting Data to database"); + logger.info('Persisting Data to database'); const client = await pool.connect(); const db = drizzle(client, { schema: { @@ -76,13 +76,10 @@ export const saveData = async (models: DataModels) => { try { // todo: try to batch similary queries await db.transaction(async (tx) => { - const savedBatch = await tx - .insert(batchesInOpenAlex) - .values({}) - .returning({ id: batchesInOpenAlex.id }); + const savedBatch = await tx.insert(batchesInOpenAlex).values({}).returning({ id: batchesInOpenAlex.id }); // Save works await Promise.all( - models["works"].map(async (work) => { + models['works'].map(async (work) => { const entry = await tx .insert(worksInOpenalex) .values(work) @@ -99,37 +96,34 @@ export const saveData = async (models: DataModels) => { }), ); - logger.info("Works data to persisted"); + logger.info('Works data to persisted'); // save worksIdb await Promise.all([ - updateAuthors(tx, models["authors"]), - updateAuthorIds(tx, models["authors_ids"]), - updateWorkIds(tx, models["works_id"]), - updateWorksBiblio(tx, models["works_biblio"]), - updateWorksBestOaLocations(tx, models["works_best_oa_locations"]), - updateWorksPrimaryLocations(tx, models["works_primary_locations"]), - updateWorksLocations(tx, models["works_locations"]), - updateWorksOpenAccess(tx, models["works_open_access"]), - updateWorksReferencedWorks(tx, models["works_referenced_works"]), - updateWorksRelatedWorks(tx, models["works_related_works"]), - updateWorksConcepts(tx, models["works_concepts"]), - updateWorksMesh(tx, models["works_mesh"]), - updateWorksTopics(tx, models["works_topics"]), + updateAuthors(tx, models['authors']), + updateAuthorIds(tx, models['authors_ids']), + updateWorkIds(tx, models['works_id']), + updateWorksBiblio(tx, models['works_biblio']), + updateWorksBestOaLocations(tx, models['works_best_oa_locations']), + updateWorksPrimaryLocations(tx, models['works_primary_locations']), + updateWorksLocations(tx, models['works_locations']), + updateWorksOpenAccess(tx, models['works_open_access']), + updateWorksReferencedWorks(tx, models['works_referenced_works']), + updateWorksRelatedWorks(tx, models['works_related_works']), + updateWorksConcepts(tx, models['works_concepts']), + updateWorksMesh(tx, models['works_mesh']), + updateWorksTopics(tx, models['works_topics']), // todo: add unique constraint [work_id, author_id] before uncommenting // updateWorkAuthorships(tx, models["works_authorships"]), ]); }); - logger.info("Open alex data saved"); + logger.info('Open alex data saved'); } catch (err) { - logger.error({ err }, "Error Saving data to DB"); + logger.error({ err }, 'Error Saving data to DB'); } }; -const updateWorkIds = async ( - tx: PgTransactionType, - data: DataModels["works_id"], -) => { +const updateWorkIds = async (tx: PgTransactionType, data: DataModels['works_id']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx @@ -143,16 +137,13 @@ const updateWorkIds = async ( ); }; -const updateWorksBestOaLocations = async ( - tx: PgTransactionType, - data: DataModels["works_best_oa_locations"], -) => { +const updateWorksBestOaLocations = async (tx: PgTransactionType, data: DataModels['works_best_oa_locations']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx .select() .from(works_best_oa_locationsInOpenalex) - .where(eq(works_best_oa_locationsInOpenalex.work_id, entry?.work_id!)) + .where(eq(works_best_oa_locationsInOpenalex.work_id, entry.work_id!)) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_best_oa_locationsInOpenalex).values(entry); @@ -160,16 +151,13 @@ const updateWorksBestOaLocations = async ( ); }; -const updateWorksPrimaryLocations = async ( - tx: PgTransactionType, - data: DataModels["works_primary_locations"], -) => { +const updateWorksPrimaryLocations = async (tx: PgTransactionType, data: DataModels['works_primary_locations']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx .select() .from(works_primary_locationsInOpenalex) - .where(eq(works_primary_locationsInOpenalex.work_id, entry?.work_id!)) + .where(eq(works_primary_locationsInOpenalex.work_id, entry.work_id!)) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_primary_locationsInOpenalex).values(entry); @@ -177,21 +165,13 @@ const updateWorksPrimaryLocations = async ( ); }; -const updateWorksLocations = async ( - tx: PgTransactionType, - data: DataModels["works_locations"], -) => { +const updateWorksLocations = async (tx: PgTransactionType, data: DataModels['works_locations']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx .select() .from(works_locationsInOpenalex) - .where( - eq( - works_locationsInOpenalex.landing_page_url, - entry?.landing_page_url!, - ), - ) + .where(eq(works_locationsInOpenalex.landing_page_url, entry.landing_page_url!)) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_locationsInOpenalex).values(entry); @@ -199,10 +179,7 @@ const updateWorksLocations = async ( ); }; -const updateWorksReferencedWorks = async ( - tx: PgTransactionType, - data: DataModels["works_referenced_works"], -) => { +const updateWorksReferencedWorks = async (tx: PgTransactionType, data: DataModels['works_referenced_works']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx @@ -211,10 +188,7 @@ const updateWorksReferencedWorks = async ( .where( and( eq(works_referenced_worksInOpenalex.work_id, entry.work_id), - eq( - works_referenced_worksInOpenalex.referenced_work_id, - entry.referenced_work_id, - ), + eq(works_referenced_worksInOpenalex.referenced_work_id, entry.referenced_work_id), ), ) .limit(1); @@ -224,10 +198,7 @@ const updateWorksReferencedWorks = async ( ); }; -const updateWorksRelatedWorks = async ( - tx: PgTransactionType, - data: DataModels["works_related_works"], -) => { +const updateWorksRelatedWorks = async (tx: PgTransactionType, data: DataModels['works_related_works']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx @@ -236,10 +207,7 @@ const updateWorksRelatedWorks = async ( .where( and( eq(works_related_worksInOpenalex.work_id, entry.work_id), - eq( - works_related_worksInOpenalex.related_work_id, - entry.related_work_id, - ), + eq(works_related_worksInOpenalex.related_work_id, entry.related_work_id), ), ) .limit(1); @@ -249,16 +217,13 @@ const updateWorksRelatedWorks = async ( ); }; -const updateWorksOpenAccess = async ( - tx: PgTransactionType, - data: DataModels["works_open_access"], -) => { +const updateWorksOpenAccess = async (tx: PgTransactionType, data: DataModels['works_open_access']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx .select() .from(works_open_accessInOpenalex) - .where(eq(works_open_accessInOpenalex.work_id, entry?.work_id!)) + .where(eq(works_open_accessInOpenalex.work_id, entry.work_id!)) .limit(1); if (duplicate.length > 0) return null; return await tx.insert(works_open_accessInOpenalex).values(entry); @@ -266,30 +231,21 @@ const updateWorksOpenAccess = async ( ); }; -const updateWorkAuthorships = async ( - tx: PgTransactionType, - data: DataModels["works_authorships"], -) => { +const updateWorkAuthorships = async (tx: PgTransactionType, data: DataModels['works_authorships']) => { await Promise.all( data.map(async (entry) => { await tx .insert(works_authorshipsInOpenalex) .values(entry) .onConflictDoUpdate({ - target: [ - works_authorshipsInOpenalex.author_id, - works_authorshipsInOpenalex.work_id, - ], + target: [works_authorshipsInOpenalex.author_id, works_authorshipsInOpenalex.work_id], set: entry, }); }), ); }; -const updateAuthors = async ( - tx: PgTransactionType, - data: DataModels["authors"], -) => { +const updateAuthors = async (tx: PgTransactionType, data: DataModels['authors']) => { await Promise.all( data.map(async (entry) => { await tx.insert(authorsInOpenalex).values(entry).onConflictDoUpdate({ @@ -301,10 +257,7 @@ const updateAuthors = async ( // logger.info("Authors data to persisted"); }; -const updateAuthorIds = async ( - tx: PgTransactionType, - data: DataModels["authors_ids"], -) => { +const updateAuthorIds = async (tx: PgTransactionType, data: DataModels['authors_ids']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx @@ -318,10 +271,7 @@ const updateAuthorIds = async ( ); }; -const updateWorksBiblio = async ( - tx: PgTransactionType, - data: DataModels["works_biblio"], -) => { +const updateWorksBiblio = async (tx: PgTransactionType, data: DataModels['works_biblio']) => { await Promise.all( data.map(async (entry) => { await tx.insert(works_biblioInOpenalex).values(entry).onConflictDoUpdate({ @@ -332,10 +282,7 @@ const updateWorksBiblio = async ( ); }; -const updateWorksConcepts = async ( - tx: PgTransactionType, - data: DataModels["works_concepts"], -) => { +const updateWorksConcepts = async (tx: PgTransactionType, data: DataModels['works_concepts']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx @@ -354,10 +301,7 @@ const updateWorksConcepts = async ( ); }; -const updateWorksMesh = async ( - tx: PgTransactionType, - data: DataModels["works_mesh"], -) => { +const updateWorksMesh = async (tx: PgTransactionType, data: DataModels['works_mesh']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx @@ -377,20 +321,14 @@ const updateWorksMesh = async ( ); }; -const updateWorksTopics = async ( - tx: PgTransactionType, - data: DataModels["works_topics"], -) => { +const updateWorksTopics = async (tx: PgTransactionType, data: DataModels['works_topics']) => { await Promise.all( data.map(async (entry) => { const duplicate = await tx .select() .from(works_topicsInOpenalex) .where( - and( - eq(works_topicsInOpenalex.work_id, entry.work_id!), - eq(works_topicsInOpenalex.topic_id, entry.topic_id!), - ), + and(eq(works_topicsInOpenalex.work_id, entry.work_id!), eq(works_topicsInOpenalex.topic_id, entry.topic_id!)), ) .limit(1); if (duplicate.length > 0) return null; diff --git a/openalex-importer/src/db/types.ts b/openalex-importer/src/db/types.ts index c8cf9d20f..c8d2e3b9f 100644 --- a/openalex-importer/src/db/types.ts +++ b/openalex-importer/src/db/types.ts @@ -4,7 +4,7 @@ import { works_idsInOpenalex, works_locationsInOpenalex, works_primary_locationsInOpenalex, -} from "../../drizzle/schema.js"; +} from '../../drizzle/schema.js'; // filter object fields to remove undefined fields but allow null fields type NoUndefinedField = { @@ -22,14 +22,8 @@ export type Works = NoUndefinedField; // export const worksIdSchema = createInsertSchema(worksId); export type WorksId = NoUndefinedField; -export type WorksBestOaLocation = NoUndefinedField< - typeof works_best_oa_locationsInOpenalex.$inferInsert ->; +export type WorksBestOaLocation = NoUndefinedField; -export type WorksPrimaryLocation = NoUndefinedField< - typeof works_primary_locationsInOpenalex.$inferInsert ->; +export type WorksPrimaryLocation = NoUndefinedField; -export type WorksLocation = NoUndefinedField< - typeof works_locationsInOpenalex.$inferInsert ->; +export type WorksLocation = NoUndefinedField; diff --git a/openalex-importer/src/logger.ts b/openalex-importer/src/logger.ts index 16da7068d..a4b884556 100644 --- a/openalex-importer/src/logger.ts +++ b/openalex-importer/src/logger.ts @@ -1,14 +1,15 @@ -import { pino } from "pino"; -import { fileURLToPath } from "url"; -import path from "path"; +import path from 'path'; +import { fileURLToPath } from 'url'; + +import { pino } from 'pino'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const logLevel = process.env.PINO_LOG_LEVEL || "trace"; +const logLevel = process.env.PINO_LOG_LEVEL || 'trace'; const devTransport = { - target: "pino-pretty", + target: 'pino-pretty', level: logLevel, options: { colorize: true, @@ -16,12 +17,12 @@ const devTransport = { }; const fileTransport = { - target: "pino/file", + target: 'pino/file', options: { destination: `${__dirname}/../../log/server.log` }, - level: "trace", + level: 'trace', }; -console.log("[DIR NAME]::", __dirname, __filename, logLevel); +console.log('[DIR NAME]::', __dirname, __filename, logLevel); export const logger = pino({ level: logLevel, @@ -29,7 +30,7 @@ export const logger = pino({ files: omitBuffer, }, transport: - process.env.NODE_ENV === "production" + process.env.NODE_ENV === 'production' ? { targets: [] } : { targets: [devTransport, fileTransport], @@ -46,6 +47,6 @@ function omitBuffer(array) { }); } -process.on("uncaughtException", (err) => { - logger.fatal(err, "uncaught exception"); +process.on('uncaughtException', (err) => { + logger.fatal(err, 'uncaught exception'); }); diff --git a/openalex-importer/src/script.ts b/openalex-importer/src/script.ts index 01c48f0db..76d901b95 100644 --- a/openalex-importer/src/script.ts +++ b/openalex-importer/src/script.ts @@ -1,13 +1,13 @@ -import path from "path"; -import { existsSync, mkdirSync, writeFileSync } from "fs"; -import { startOfDay, endOfDay, subDays } from "date-fns"; +import { existsSync, mkdirSync, writeFileSync } from 'fs'; +import path from 'path'; +// import { startOfDay, endOfDay, subDays } from "date-fns"; -import { Work, Institution } from "./types/index.js"; -import { transformDataModel } from "./transformers.js"; -import { saveData } from "./db/index.js"; -import { logger } from "./logger.js"; +import { saveData } from './db/index.js'; +import { logger } from './logger.js'; +import { transformDataModel } from './transformers.js'; +import { Work, Institution } from './types/index.js'; -const OPEN_ALEX_API = "https://api.openalex.org/"; +const OPEN_ALEX_API = 'https://api.openalex.org/'; type ApiResponse = { meta: { @@ -23,7 +23,7 @@ type ApiResponse = { type Query = { filter?: FilterParam; - "per-page"?: number; + 'per-page'?: number; cursor: string | undefined; }; @@ -40,37 +40,36 @@ type FilterParam = { const MAX_PAGES_TO_FETCH = 100; async function importWorks(filter?: FilterParam): Promise { - logger.info(filter, "Filter"); + logger.info(filter, 'Filter'); try { const url = `${OPEN_ALEX_API}/works`; const works = await performFetch(url, { filter: { + ...filter, // from_created_date: "2024-07-27", // to_created_date: "2024-07-27", - ...filter, // from_updated_date: "2024-07-30T20:00:00.347Z", // to_updated_date: "2024-07-30T23:29:50.347Z", }, - "per-page": 200, - cursor: "*", + 'per-page': 200, + cursor: '*', }); - logger.info({ totalWorks: works.length }, "Fetch done"); + logger.info({ totalWorks: works.length }, 'Fetch done'); return works; } catch (err) { - logger.error({ err }, "ERROR::"); + logger.error({ err }, 'ERROR::'); return null; } } async function performFetch(url: string, searchQuery: Query): Promise { - logger.info(searchQuery, "QUERY"); + logger.info(searchQuery, 'QUERY'); let data = []; const getFilter = (param: FilterParam) => { const filter = Object.entries(param).reduce( - (queryStr, [key, value]) => - queryStr ? `${queryStr},${key}:${value}` : `${key}:${value}`, - "", + (queryStr, [key, value]) => (queryStr ? `${queryStr},${key}:${value}` : `${key}:${value}`), + '', ); return filter; }; @@ -79,33 +78,33 @@ async function performFetch(url: string, searchQuery: Query): Promise { let roundtrip = 0; while (cursor) { - if (process.env.NODE_ENV === "development") { + if (process.env.NODE_ENV === 'development') { /* When running script locally, break loop prematurely to avoid overloading memory */ if (roundtrip >= MAX_PAGES_TO_FETCH) break; // todo: remove line before push to prod } - let query = Object.entries(searchQuery).reduce((queryStr, [key, value]) => { - if (key === "filter") { + const query = Object.entries(searchQuery).reduce((queryStr, [key, value]) => { + if (key === 'filter') { const filter = `filter=${getFilter(value as FilterParam)}`; return queryStr ? `${queryStr}&${filter}` : filter; } const param = `${key}=${value}`; return queryStr ? `${queryStr}&${param}` : param; - }, ""); + }, ''); // logger.info("QUERY: ", query); const request = new Request(`${url}?${query}`, { - headers: { "API-KEY": process.env.OPENALEX_API_KEY as string }, + headers: { 'API-KEY': process.env.OPENALEX_API_KEY as string }, }); const response = (await fetch(request)) as Response; if (response.ok && response.status === 200) { // logger.info("Api success: ", response.status, response.statusText); - if (response.headers.get("content-type")?.includes("application/json")) { + if (response.headers.get('content-type')?.includes('application/json')) { const apiRes = (await response.json()) as ApiResponse; data = data.concat(...(apiRes.results as any[])); cursor = !!apiRes.meta?.next_cursor; @@ -121,7 +120,7 @@ async function performFetch(url: string, searchQuery: Query): Promise { message: response.statusText, data: await response.json(), }, - "Api error: ", + 'Api error: ', ); break; } @@ -131,7 +130,7 @@ async function performFetch(url: string, searchQuery: Query): Promise { } const saveToLogs = (data: string, logFile: string) => { - const TMP_DIR = path.join(process.cwd(), "logs"); + const TMP_DIR = path.join(process.cwd(), 'logs'); const LOG_FILE = path.join(TMP_DIR, logFile); if (!existsSync(TMP_DIR)) { mkdirSync(TMP_DIR); @@ -146,13 +145,15 @@ export const runImport = async ({ from, to }: { from: Date; to: Date }) => { // let currentDate = new Date(); // let from_created_date = startOfDay(subDays(currentDate, 1)); // let to_created_date = endOfDay(subDays(currentDate, 1)); - let from_created_date = from; // startOfDay(subDays(currentDate, 0)); - let to_created_date = to; // endOfDay(subDays(currentDate, 0)); + logger.info({ from, to }, 'Running Import'); - const dateFormatter = new Intl.DateTimeFormat("fr-CA", { - year: "numeric", - month: "2-digit", - day: "2-digit", + const from_created_date = from; // startOfDay(subDays(currentDate, 0)); + const to_created_date = to; // endOfDay(subDays(currentDate, 0)); + + const dateFormatter = new Intl.DateTimeFormat('fr-CA', { + year: 'numeric', + month: '2-digit', + day: '2-digit', }); const openAlexData = await importWorks({ from_created_date: dateFormatter.format(from_created_date), @@ -161,12 +162,16 @@ export const runImport = async ({ from, to }: { from: Date; to: Date }) => { // to_updated_date: to_created_date.toISOString(), }); - saveToLogs(JSON.stringify(openAlexData?.slice(0, 100)), "works_raw.json"); if (!openAlexData) { // logger issue or result + logger.info('Nothing to import'); return 0; } + if (process.env.NODE_ENV === 'development') { + saveToLogs(JSON.stringify(openAlexData?.slice(0, 100)), 'works_raw.json'); + } + const transformedData = transformDataModel(openAlexData); const { authors, @@ -188,31 +193,22 @@ export const runImport = async ({ from, to }: { from: Date; to: Date }) => { // const models = transformApiResponseToDbModel(works); - if (process.env.NODE_ENV === "development") { - saveToLogs(JSON.stringify(authors), "authors.json"); - saveToLogs(JSON.stringify(authors_ids), "authors_ids.json"); - saveToLogs(JSON.stringify(works_authorships), "works_authorships.json"); - saveToLogs(JSON.stringify(works.slice(1, 100)), "works.json"); - saveToLogs(JSON.stringify(works_id), "works_id.json"); - saveToLogs(JSON.stringify(works_concepts), "works_concepts.json"); - saveToLogs(JSON.stringify(works_biblio), "works_biblio.json"); - saveToLogs(JSON.stringify(works_locations), "works_locations.json"); - saveToLogs( - JSON.stringify(works_best_oa_locations), - "works_best_oa_locations.json", - ); - saveToLogs(JSON.stringify(works_open_access), "works_open_access.json"); - saveToLogs(JSON.stringify(works_mesh), "works_mesh.json"); - saveToLogs( - JSON.stringify(works_primary_locations), - "works_primary_locations.json", - ); - saveToLogs( - JSON.stringify(works_referenced_works), - "works_referenced_works.json", - ); - saveToLogs(JSON.stringify(works_related_works), "works_related_works.json"); - saveToLogs(JSON.stringify(works_topics), "works_topics.json"); + if (process.env.NODE_ENV === 'development') { + saveToLogs(JSON.stringify(authors), 'authors.json'); + saveToLogs(JSON.stringify(authors_ids), 'authors_ids.json'); + saveToLogs(JSON.stringify(works_authorships), 'works_authorships.json'); + saveToLogs(JSON.stringify(works.slice(1, 100)), 'works.json'); + saveToLogs(JSON.stringify(works_id), 'works_id.json'); + saveToLogs(JSON.stringify(works_concepts), 'works_concepts.json'); + saveToLogs(JSON.stringify(works_biblio), 'works_biblio.json'); + saveToLogs(JSON.stringify(works_locations), 'works_locations.json'); + saveToLogs(JSON.stringify(works_best_oa_locations), 'works_best_oa_locations.json'); + saveToLogs(JSON.stringify(works_open_access), 'works_open_access.json'); + saveToLogs(JSON.stringify(works_mesh), 'works_mesh.json'); + saveToLogs(JSON.stringify(works_primary_locations), 'works_primary_locations.json'); + saveToLogs(JSON.stringify(works_referenced_works), 'works_referenced_works.json'); + saveToLogs(JSON.stringify(works_related_works), 'works_related_works.json'); + saveToLogs(JSON.stringify(works_topics), 'works_topics.json'); } await saveData(transformedData); diff --git a/openalex-importer/src/transformers.ts b/openalex-importer/src/transformers.ts index 8dda8b0d1..83f672499 100644 --- a/openalex-importer/src/transformers.ts +++ b/openalex-importer/src/transformers.ts @@ -1,7 +1,6 @@ -import _ from "lodash"; +import _ from 'lodash'; + // import { Prisma } from "@prisma/client"; -import type { Mesh, Work } from "./types/works.js"; -import { Institution } from "./types/institutions.js"; import type { authors_idsInOpenalex, authorsInOpenalex, @@ -13,7 +12,9 @@ import type { WorksLocation, works_meshInOpenalex, works_topicsInOpenalex, -} from "./db/index.js"; +} from './db/index.js'; +import { Institution } from './types/institutions.js'; +import type { Mesh, Work } from './types/works.js'; interface ModelMap { works: ReturnType[]; @@ -56,19 +57,17 @@ export const transformDataModel = (data: Work[]) => { const works = data.map(transformToWork); const authorship_data = data.map((work) => { - let authors: (typeof authorsInOpenalex.$inferInsert)[] = - work.authorships.map((data) => data.author); + const authors: (typeof authorsInOpenalex.$inferInsert)[] = work.authorships.map((data) => data.author); - const authors_ids: (typeof authors_idsInOpenalex.$inferInsert)[] = - work.authorships.map((authorship) => ({ - author_id: authorship.author.id, - openalex: authorship.author.id, - orcid: authorship.author.orcid ?? null, - twitter: authorship.author.twitter ?? null, - scopus: authorship.author.scopus ?? null, - wikipedia: authorship.author.wikipedia ?? null, - mag: authorship.author.mag ?? null, - })); + const authors_ids: (typeof authors_idsInOpenalex.$inferInsert)[] = work.authorships.map((authorship) => ({ + author_id: authorship.author.id, + openalex: authorship.author.id, + orcid: authorship.author.orcid ?? null, + twitter: authorship.author.twitter ?? null, + scopus: authorship.author.scopus ?? null, + wikipedia: authorship.author.wikipedia ?? null, + mag: authorship.author.mag ?? null, + })); const works_authorships: { work_id?: string; @@ -80,8 +79,8 @@ export const transformDataModel = (data: Work[]) => { const institutions: Institution[] = []; - for (let authorship of work.authorships) { - for (let institution of authorship.institutions) { + for (const authorship of work.authorships) { + for (const institution of authorship.institutions) { works_authorships.push({ work_id: work.id, author_position: authorship.author_position, @@ -95,12 +94,10 @@ export const transformDataModel = (data: Work[]) => { return { authors, authors_ids, works_authorships, institutions }; }); - const works_biblio: (typeof works_biblioInOpenalex.$inferInsert)[] = data.map( - (work) => ({ - ...work.biblio, - work_id: work.id, - }) - ); + const works_biblio: (typeof works_biblioInOpenalex.$inferInsert)[] = data.map((work) => ({ + ...work.biblio, + work_id: work.id, + })); const works_id: WorksId[] = data.map((work) => ({ ...work.ids, @@ -114,8 +111,8 @@ export const transformDataModel = (data: Work[]) => { work_id: work.id, concept_id: concept.id, score: concept.score, - })) - ) + })), + ), ); const works_topics = _.flatten( @@ -126,9 +123,9 @@ export const transformDataModel = (data: Work[]) => { work_id: work.id, topic_id: topic.id, score: topic.score, - } as typeof works_topicsInOpenalex.$inferInsert) - ) - ) + } as typeof works_topicsInOpenalex.$inferInsert), + ), + ), ); const works_locations = _.flatten( @@ -143,9 +140,9 @@ export const transformDataModel = (data: Work[]) => { is_oa: location.is_oa, version: location.version, license: location.license, - } as WorksLocation) - ) - ) + } as WorksLocation), + ), + ), ) as WorksLocation[]; const works_mesh = _.flatten( @@ -159,9 +156,9 @@ export const transformDataModel = (data: Work[]) => { qualifier_name: mesh.qualifier_name, qualifier_ui: mesh.qualifier_ui, is_major_topic: mesh.is_major_topic, - } as typeof works_meshInOpenalex.$inferInsert) - ) - ) + } as typeof works_meshInOpenalex.$inferInsert), + ), + ), ); const works_primary_locations = data @@ -176,7 +173,7 @@ export const transformDataModel = (data: Work[]) => { license: work.primary_location.license, work_id: work.id, } - : null + : null, ) .filter(Boolean) as WorksPrimaryLocation[]; @@ -192,7 +189,7 @@ export const transformDataModel = (data: Work[]) => { license: work.best_oa_location.license, work_id: work.id, } as WorksBestOaLocation) - : null + : null, ) .filter(Boolean) as WorksBestOaLocation[]; @@ -206,8 +203,8 @@ export const transformDataModel = (data: Work[]) => { work.related_works.map((related_work_id) => ({ work_id: work.id, related_work_id, - })) - ) + })), + ), ); const works_referenced_works = _.flatten( @@ -215,13 +212,13 @@ export const transformDataModel = (data: Work[]) => { work.referenced_works.map((referenced_work_id) => ({ work_id: work.id, referenced_work_id, - })) - ) + })), + ), ); // group unique authors - let all_authors = _.flatten(authorship_data.map((data) => data.authors)); - let authors: (typeof authorsInOpenalex.$inferInsert)[] = _(all_authors) + const all_authors = _.flatten(authorship_data.map((data) => data.authors)); + const authors: (typeof authorsInOpenalex.$inferInsert)[] = _(all_authors) .groupBy((x) => x.id) .map( (values, key) => @@ -235,18 +232,14 @@ export const transformDataModel = (data: Work[]) => { last_known_institution: values[0].last_known_institution, works_api_url: values[0].works_api_url, updated_date: values[0].updated_date, - } as typeof authorsInOpenalex.$inferInsert) + } as typeof authorsInOpenalex.$inferInsert), ) .value(); // group unique authors - let all_author_ids = _.flatten( - authorship_data.map((data) => data.authors_ids) - ); + const all_author_ids = _.flatten(authorship_data.map((data) => data.authors_ids)); - let authors_ids: (typeof authors_idsInOpenalex.$inferInsert)[] = _( - all_author_ids - ) + const authors_ids: (typeof authors_idsInOpenalex.$inferInsert)[] = _(all_author_ids) .groupBy((x) => x.author_id) .map( (values, key) => @@ -258,7 +251,7 @@ export const transformDataModel = (data: Work[]) => { scopus: values[0].scopus, wikipedia: values[0].wikipedia, mag: values[0].mag, - } as typeof authors_idsInOpenalex.$inferInsert) + } as typeof authors_idsInOpenalex.$inferInsert), ) .value(); @@ -305,9 +298,7 @@ export const transformDataModel = (data: Work[]) => { return { authors, - works_authorships: _.flatten( - authorship_data.map((data) => data.works_authorships) - ), + works_authorships: _.flatten(authorship_data.map((data) => data.works_authorships)), authors_ids, works, works_id, diff --git a/openalex-importer/src/types/index.ts b/openalex-importer/src/types/index.ts index 9766b7245..15d4a8255 100644 --- a/openalex-importer/src/types/index.ts +++ b/openalex-importer/src/types/index.ts @@ -1,2 +1,2 @@ -export * from "./works.js"; -export * from "./institutions.js"; +export * from './works.js'; +export * from './institutions.js'; diff --git a/openalex-importer/src/types/institutions.ts b/openalex-importer/src/types/institutions.ts index 055f2b519..011f90daf 100644 --- a/openalex-importer/src/types/institutions.ts +++ b/openalex-importer/src/types/institutions.ts @@ -39,7 +39,7 @@ export interface Repository { } export interface SummaryStats { - "2yr_mean_citedness": number; + '2yr_mean_citedness': number; h_index: number; i10_index: number; } @@ -75,21 +75,21 @@ export interface DisplayName { azb: string; ba: string; be: string; - "be-tarask": string; + 'be-tarask': string; bg: string; bn: string; br: string; ca: string; ckb: string; crh: string; - "crh-latn": string; + 'crh-latn': string; cs: string; cy: string; da: string; de: string; el: string; en: string; - "en-gb": string; + 'en-gb': string; eo: string; es: string; et: string; @@ -155,12 +155,12 @@ export interface DisplayName { xmf: string; yue: string; zh: string; - "zh-cn": string; - "zh-hans": string; - "zh-hant": string; - "zh-hk": string; - "zh-sg": string; - "zh-tw": string; + 'zh-cn': string; + 'zh-hans': string; + 'zh-hant': string; + 'zh-hk': string; + 'zh-sg': string; + 'zh-tw': string; } export interface AssociatedInstitution { diff --git a/openalex-importer/src/types/works.ts b/openalex-importer/src/types/works.ts index 1d2c30cad..fc0ea76cc 100644 --- a/openalex-importer/src/types/works.ts +++ b/openalex-importer/src/types/works.ts @@ -1,4 +1,4 @@ -import { Institution } from "./institutions.js"; +import { Institution } from './institutions.js'; export interface Work { id: string; diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index a56e2e9bf..bfb36717b 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -2,6 +2,36 @@ # yarn lockfile v1 +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.0.0": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -30,6 +60,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz#d1bc06aedb6936b3b6d313bf809a5a40387d2b7f" integrity sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA== +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + "@esbuild/android-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" @@ -40,6 +75,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz#7ad65a36cfdb7e0d429c353e00f680d737c2aed4" integrity sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA== +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + "@esbuild/android-arm@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" @@ -50,6 +90,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz#b0c26536f37776162ca8bde25e42040c203f2824" integrity sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w== +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + "@esbuild/android-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" @@ -60,6 +105,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz#cb13e2211282012194d89bf3bfe7721273473b3d" integrity sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew== +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + "@esbuild/darwin-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" @@ -70,6 +120,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz#cbee41e988020d4b516e9d9e44dd29200996275e" integrity sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g== +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + "@esbuild/darwin-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" @@ -80,6 +135,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz#e37d9633246d52aecf491ee916ece709f9d5f4cd" integrity sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A== +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + "@esbuild/freebsd-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" @@ -90,6 +150,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz#1ee4d8b682ed363b08af74d1ea2b2b4dbba76487" integrity sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA== +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + "@esbuild/freebsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" @@ -100,6 +165,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz#37a693553d42ff77cd7126764b535fb6cc28a11c" integrity sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg== +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + "@esbuild/linux-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" @@ -110,6 +180,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz#be9b145985ec6c57470e0e051d887b09dddb2d4b" integrity sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA== +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + "@esbuild/linux-arm@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" @@ -120,6 +195,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz#207ecd982a8db95f7b5279207d0ff2331acf5eef" integrity sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w== +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + "@esbuild/linux-ia32@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" @@ -130,6 +210,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz#d0d86b5ca1562523dc284a6723293a52d5860601" integrity sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA== +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + "@esbuild/linux-loong64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" @@ -140,6 +225,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz#9a37f87fec4b8408e682b528391fa22afd952299" integrity sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA== +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + "@esbuild/linux-mips64el@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" @@ -150,6 +240,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz#4ddebd4e6eeba20b509d8e74c8e30d8ace0b89ec" integrity sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w== +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + "@esbuild/linux-ppc64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" @@ -160,6 +255,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz#adb67dadb73656849f63cd522f5ecb351dd8dee8" integrity sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg== +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + "@esbuild/linux-riscv64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" @@ -170,6 +270,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz#11bc0698bf0a2abf8727f1c7ace2112612c15adf" integrity sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg== +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + "@esbuild/linux-s390x@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" @@ -180,6 +285,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz#e86fb8ffba7c5c92ba91fc3b27ed5a70196c3cc8" integrity sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg== +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + "@esbuild/linux-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" @@ -190,6 +300,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz#5f37cfdc705aea687dfe5dfbec086a05acfe9c78" integrity sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg== +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + "@esbuild/netbsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" @@ -200,6 +315,16 @@ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz#29da566a75324e0d0dd7e47519ba2f7ef168657b" integrity sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA== +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + "@esbuild/openbsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" @@ -210,6 +335,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz#306c0acbdb5a99c95be98bdd1d47c916e7dc3ff0" integrity sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw== +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + "@esbuild/sunos-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" @@ -220,6 +350,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz#0933eaab9af8b9b2c930236f62aae3fc593faf30" integrity sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA== +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + "@esbuild/win32-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" @@ -230,6 +365,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz#773bdbaa1971b36db2f6560088639ccd1e6773ae" integrity sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A== +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + "@esbuild/win32-ia32@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" @@ -240,6 +380,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz#000516cad06354cc84a73f0943a4aa690ef6fd67" integrity sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ== +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + "@esbuild/win32-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" @@ -250,6 +395,52 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz#c57c8afbb4054a3ab8317591a0b7320360b444ae" integrity sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== + +"@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== + +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@jridgewell/resolve-uri@^3.0.3": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -268,6 +459,27 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@pm2/agent@~2.0.0": version "2.0.4" resolved "https://registry.yarnpkg.com/@pm2/agent/-/agent-2.0.4.tgz#a6699a6c57741492129776eb5a7abc15e50672cb" @@ -319,6 +531,11 @@ dependencies: debug "^4.3.1" +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@tootallnate/quickjs-emscripten@^0.23.0": version "0.23.0" resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" @@ -344,6 +561,16 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/lodash@^4.17.7": version "4.17.7" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" @@ -368,6 +595,11 @@ dependencies: undici-types "~5.26.4" +"@types/parse-json@^4.0.0": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" + integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== + "@types/pg@^8.11.6": version "8.11.6" resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.6.tgz#a2d0fb0a14b53951a17df5197401569fb9c0c54b" @@ -377,6 +609,97 @@ pg-protocol "*" pg-types "^4.0.1" +"@types/semver@^7.5.0": + version "7.5.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== + +"@typescript-eslint/eslint-plugin@^6.14.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" + integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/type-utils" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^6.14.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== + dependencies: + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + +"@typescript-eslint/type-utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" + integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== + dependencies: + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== + +"@typescript-eslint/typescript-estree@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" + integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== + dependencies: + "@typescript-eslint/types" "6.21.0" + eslint-visitor-keys "^3.4.1" + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -384,6 +707,11 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" +acorn-jsx@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-walk@^8.1.1: version "8.3.3" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" @@ -391,6 +719,11 @@ acorn-walk@^8.1.1: dependencies: acorn "^8.11.0" +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + acorn@^8.11.0, acorn@^8.4.1: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" @@ -403,6 +736,34 @@ agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1: dependencies: debug "^4.3.4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + amp-message@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/amp-message/-/amp-message-0.1.2.tgz#a78f1c98995087ad36192a41298e4db49e3dfc45" @@ -420,6 +781,18 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -427,7 +800,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -447,6 +820,13 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -460,6 +840,55 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" +array-includes@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.findlastindex@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.flat@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + arraybuffer.prototype.slice@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" @@ -481,6 +910,11 @@ ast-types@^0.13.4: dependencies: tslib "^2.0.1" +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + async@^2.6.3, async@~2.6.1: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" @@ -543,7 +977,14 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@~3.0.2: +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3, braces@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== @@ -574,6 +1015,11 @@ call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + chalk@3.0.0, chalk@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -582,7 +1028,7 @@ chalk@3.0.0, chalk@~3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^2.4.1: +chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -591,6 +1037,14 @@ chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + charm@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/charm/-/charm-0.1.2.tgz#06c21eed1a1b06aeb67553cdc53e23274bac2296" @@ -611,6 +1065,18 @@ chokidar@^3.5.2, chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + cli-tableau@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/cli-tableau/-/cli-tableau-2.0.1.tgz#baa78d83e08a2d7ab79b7dad9406f0254977053f" @@ -618,6 +1084,14 @@ cli-tableau@^2.0.0: dependencies: chalk "3.0.0" +cli-truncate@2.1.0, cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -642,7 +1116,12 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.7: +colorette@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" + integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== + +colorette@^2.0.16, colorette@^2.0.7: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -652,11 +1131,27 @@ commander@2.15.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== +commander@^8.2.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +cosmiconfig@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" + integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -678,6 +1173,15 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + culvert@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/culvert/-/culvert-0.1.2.tgz#9502f5f0154a2d5a22a023e79f71cc936fa6ef6f" @@ -742,7 +1246,7 @@ debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@~4.3.1: dependencies: ms "2.1.2" -debug@^3.2.6: +debug@^3.2.6, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -756,6 +1260,18 @@ debug@^4: dependencies: ms "2.1.2" +debug@^4.0.1, debug@^4.3.2: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -788,6 +1304,27 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + dotenv@^16.4.5: version "16.4.5" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" @@ -807,6 +1344,11 @@ drizzle-orm@^0.32.1: resolved "https://registry.yarnpkg.com/drizzle-orm/-/drizzle-orm-0.32.1.tgz#4e28c22d7f2a60aef3f0837c0a06aa7b3378b082" integrity sha512-Wq1J+lL8PzwR5K3a1FfoWsbs8powjr3pGA4+5+2ueN1VTLDNFYEolUyUWFtqy8DVRvYbL2n7sXZkgVmK9dQkng== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -821,6 +1363,14 @@ enquirer@2.3.6: dependencies: ansi-colors "^4.1.1" +enquirer@^2.3.5, enquirer@^2.3.6: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -908,6 +1458,13 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -981,6 +1538,36 @@ esbuild@~0.18.20: "@esbuild/win32-ia32" "0.18.20" "@esbuild/win32-x64" "0.18.20" +esbuild@~0.23.0: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1002,12 +1589,173 @@ escodegen@^2.1.0: optionalDependencies: source-map "~0.6.1" -esprima@^4.0.1: +eslint-config-prettier@^8.3.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== + +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== + dependencies: + debug "^3.2.7" + is-core-module "^2.13.0" + resolve "^1.22.4" + +eslint-module-utils@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" + integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.24.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz#21ceea0fc462657195989dd780e50c92fe95f449" + integrity sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw== + dependencies: + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.9.0" + hasown "^2.0.2" + is-core-module "^2.15.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" + semver "^6.3.1" + tsconfig-paths "^3.15.0" + +eslint-plugin-no-array-reduce@^1.0.22: + version "1.0.62" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-array-reduce/-/eslint-plugin-no-array-reduce-1.0.62.tgz#925dee5bbe37f41ce7aa6ebb149c3988dd5b8d48" + integrity sha512-Hnauv6BNmo2RPNG6ka1fc2WcNDtsbcutCbvx188goD/EdSNab3Jp26HgmMSFERiqu3VQdIebHSnSKIS1GUrvoA== + +eslint-plugin-prettier@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5" + integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -estraverse@^5.2.0: +esquery@^1.4.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -1042,6 +1790,36 @@ events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +execa@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + extrareqp2@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extrareqp2/-/extrareqp2-1.0.0.tgz#aaf8ad1495d723f71276b0eab041c061aa21f035" @@ -1054,11 +1832,42 @@ fast-copy@^3.0.2: resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.2.tgz#59c68f59ccbcac82050ba992e0d5c389097c9d35" integrity sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ== +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.9: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-patch@^3.0.0-1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fast-redact@^3.1.1: version "3.5.0" resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.5.0.tgz#e9ea02f7e57d0cd8438180083e93077e496285e4" @@ -1069,11 +1878,30 @@ fast-safe-stringify@^2.1.1: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + +fastq@^1.6.0: + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== + dependencies: + reusify "^1.0.4" + fclone@1.0.11, fclone@~1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/fclone/-/fclone-1.0.11.tgz#10e85da38bfea7fc599341c296ee1d77266ee640" integrity sha512-GDqVQezKzRABdeqflsgMr7ktzgF9CyS+p2oe0jJqUY6izSSbhPIQJDpoU4PtGcD7VPM9xh/dVrTu6z1nwgmEGw== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -1081,6 +1909,28 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + follow-redirects@^1.14.0: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" @@ -1102,7 +1952,12 @@ fs-extra@^11.2.0: jsonfile "^6.0.1" universalify "^2.0.0" -fsevents@~2.3.2: +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -1122,6 +1977,11 @@ function.prototype.name@^1.1.6: es-abstract "^1.22.1" functions-have-names "^1.2.3" +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -1143,6 +2003,23 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== + +get-stream@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-symbol-description@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" @@ -1159,6 +2036,13 @@ get-tsconfig@^4.7.0: dependencies: resolve-pkg-maps "^1.0.0" +get-tsconfig@^4.7.5: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + get-uri@^6.0.1: version "6.0.3" resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a" @@ -1179,13 +2063,32 @@ git-sha1@^0.1.2: resolved "https://registry.yarnpkg.com/git-sha1/-/git-sha1-0.1.2.tgz#599ac192b71875825e13a445f3a6e05118c2f745" integrity sha512-2e/nZezdVlyCopOCYHeW0onkbZg7xP1Ad6pndPy1rCygeRykefUS6r7oA5cJRGEFvseiaz5a/qUHFVX1dd6Isg== -glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^13.6.0, globals@^13.9.0: + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== + dependencies: + type-fest "^0.20.2" + globalthis@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" @@ -1194,6 +2097,18 @@ globalthis@^1.0.3: define-properties "^1.2.1" gopd "^1.0.1" +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -1206,6 +2121,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -1278,6 +2198,16 @@ https-proxy-agent@^7.0.2, https-proxy-agent@^7.0.5: agent-base "^7.0.2" debug "4" +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1295,6 +2225,47 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + ini@^1.3.5: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -1364,6 +2335,13 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.2" +is-core-module@^2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + dependencies: + hasown "^2.0.2" + is-data-view@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" @@ -1383,7 +2361,12 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-glob@^4.0.1, is-glob@~4.0.1: +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -1407,6 +2390,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -1415,6 +2403,11 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== + is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" @@ -1422,6 +2415,11 @@ is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: dependencies: call-bind "^1.0.7" +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -1475,6 +2473,19 @@ js-git@^0.7.8: git-sha1 "^0.1.2" pako "^0.2.5" +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@~4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -1487,16 +2498,48 @@ jsbn@1.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -1506,11 +2549,65 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + lazy@~1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/lazy/-/lazy-1.0.11.tgz#daa068206282542c088288e975c297c1ae77b690" integrity sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +lint-staged@^11.1.2: + version "11.2.6" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.2.6.tgz#f477b1af0294db054e5937f171679df63baa4c43" + integrity sha512-Vti55pUnpvPE0J9936lKl0ngVeTdSZpEdTNhASbkaWX7J5R9OEifo1INBGQuGW4zmy6OG+TcWPJ3m5yuy5Q8Tg== + dependencies: + cli-truncate "2.1.0" + colorette "^1.4.0" + commander "^8.2.0" + cosmiconfig "^7.0.1" + debug "^4.3.2" + enquirer "^2.3.6" + execa "^5.1.1" + listr2 "^3.12.2" + micromatch "^4.0.4" + normalize-path "^3.0.0" + please-upgrade-node "^3.2.0" + string-argv "0.3.1" + stringify-object "3.3.0" + supports-color "8.1.1" + +listr2@^3.12.2: + version "3.14.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" + integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.5.1" + through "^2.3.8" + wrap-ansi "^7.0.0" + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -1521,11 +2618,38 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + lodash@^4.17.14, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -1548,14 +2672,44 @@ memorystream@^0.3.1: resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== -minimatch@^3.0.4, minimatch@^3.1.2: +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -1570,12 +2724,17 @@ module-details-from-path@^1.0.3: resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b" integrity sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A== +mri@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -1585,6 +2744,11 @@ mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + needle@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" @@ -1657,6 +2821,13 @@ npm-run-all@^4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" +npm-run-path@^4.0.0, npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + nssocket@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/nssocket/-/nssocket-0.6.0.tgz#59f96f6ff321566f33c70f7dbeeecdfdc07154fa" @@ -1685,6 +2856,34 @@ object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.groupby@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + +object.values@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + obuf@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -1695,13 +2894,58 @@ on-exit-leak-free@^2.1.0: resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8" integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== -once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +optionator@^0.9.1: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + pac-proxy-agent@^7.0.1: version "7.0.2" resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" @@ -1729,6 +2973,13 @@ pako@^0.2.5: resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -1737,11 +2988,36 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -1754,6 +3030,11 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pg-cloudflare@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz#e6d5833015b170e23ae819e8c5d7eaedb472ca98" @@ -1828,11 +3109,21 @@ pgpass@1.x: dependencies: split2 "^4.1.0" -picomatch@^2.0.4, picomatch@^2.2.1: +picocolors@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-3.0.1.tgz#817033161def55ec9638567a2f3bbc876b3e7516" + integrity sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag== + pidtree@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" @@ -1917,6 +3208,13 @@ pino@^9.0.0, pino@^9.3.2: sonic-boom "^4.0.1" thread-stream "^3.0.0" +please-upgrade-node@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" + integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== + dependencies: + semver-compare "^1.0.0" + pm2-axon-rpc@~0.7.0, pm2-axon-rpc@~0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/pm2-axon-rpc/-/pm2-axon-rpc-0.7.1.tgz#2daec5383a63135b3f18babb70266dacdcbc429a" @@ -2051,6 +3349,36 @@ postgres-range@^1.1.1: resolved "https://registry.yarnpkg.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.3.2: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +pretty-quick@^3.1.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.3.1.tgz#cfde97fec77a8d201a0e0c9c71d9990e12587ee2" + integrity sha512-3b36UXfYQ+IXXqex6mCca89jC8u0mYLqFAN5eTQKoXO6oCQYcIVYZEB/5AlBHI7JPYygReM2Vv6Vom/Gln7fBg== + dependencies: + execa "^4.1.0" + find-up "^4.1.0" + ignore "^5.3.0" + mri "^1.2.0" + picocolors "^1.0.0" + picomatch "^3.0.1" + tslib "^2.6.2" + process-warning@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-3.0.0.tgz#96e5b88884187a1dce6f5c3166d611132058710b" @@ -2066,6 +3394,11 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + promptly@^2: version "2.2.0" resolved "https://registry.yarnpkg.com/promptly/-/promptly-2.2.0.tgz#2a13fa063688a2a5983b161fff0108a07d26fc74" @@ -2105,6 +3438,16 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-format-unescaped@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" @@ -2159,6 +3502,16 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" +regexpp@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-in-the-middle@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-5.2.0.tgz#4b71e3cc7f59977100af9beb76bf2d056a5a6de2" @@ -2168,12 +3521,17 @@ require-in-the-middle@^5.0.0: module-details-from-path "^1.0.3" resolve "^1.22.1" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-pkg-maps@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve@^1.10.0, resolve@^1.22.1: +resolve@^1.10.0, resolve@^1.22.1, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -2182,11 +3540,50 @@ resolve@^1.10.0, resolve@^1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rfdc@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + run-series@^1.1.8: version "1.1.9" resolved "https://registry.yarnpkg.com/run-series/-/run-series-1.1.9.tgz#15ba9cb90e6a6c054e67c98e1dc063df0ecc113a" integrity sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g== +rxjs@^7.5.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + safe-array-concat@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" @@ -2231,12 +3628,22 @@ secure-json-parse@^2.4.0: resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== + "semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^7.2: +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.2, semver@^7.2.1, semver@^7.5.4: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -2282,11 +3689,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shell-quote@^1.6.1: version "1.8.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" @@ -2307,7 +3726,7 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.3: +signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -2319,6 +3738,29 @@ simple-update-notifier@^2.0.0: dependencies: semver "^7.5.3" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -2402,6 +3844,25 @@ sprintf-js@^1.1.3: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +string-argv@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string.prototype.padend@^3.0.0: version "3.1.6" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz#ba79cf8992609a91c872daa47c6bb144ee7f62a5" @@ -2447,16 +3908,44 @@ string_decoder@^1.3.0: dependencies: safe-buffer "~5.2.0" +stringify-object@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^1.0.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@^3.1.1: +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -2481,6 +3970,22 @@ systeminformation@^5.7: resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.22.11.tgz#42be7b650ce0a8b940c06219a6647f6ab3f7a349" integrity sha512-aLws5yi4KCHTb0BVvbodQY5bY8eW4asMRDTxTW46hqw9lGjACX6TlLdJrkdoHYRB0qs+MekqEq1zG7WDnWE8Ug== +table@^6.0.9: + version "6.8.2" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" + integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + thread-stream@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1" @@ -2488,6 +3993,11 @@ thread-stream@^3.0.0: dependencies: real-require "^0.2.0" +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -2500,6 +4010,11 @@ touch@^3.1.0: resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694" integrity sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA== +ts-api-utils@^1.0.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + ts-node@10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -2519,6 +4034,16 @@ ts-node@10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfig-paths@^3.15.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -2529,6 +4054,21 @@ tslib@^2.0.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +tslib@^2.1.0, tslib@^2.6.2: + version "2.7.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" + integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== + +tsx@^4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.1.tgz#b7bffdf4b565813e4dea14b90872af279cd0090b" + integrity sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA== + dependencies: + esbuild "~0.23.0" + get-tsconfig "^4.7.5" + optionalDependencies: + fsevents "~2.3.3" + tv4@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/tv4/-/tv4-1.3.0.tgz#d020c846fadd50c855abb25ebaecc68fc10f7963" @@ -2541,6 +4081,23 @@ tx2@~1.0.4: dependencies: json-stringify-safe "^5.0.1" +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -2620,6 +4177,13 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + uuid@8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -2630,6 +4194,11 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +v8-compile-cache@^2.0.3: + version "2.4.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" + integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -2677,6 +4246,36 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2697,6 +4296,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 0376584119452c117e46513eb39c24e7dc86bd07 Mon Sep 17 00:00:00 2001 From: shadrach Date: Mon, 16 Sep 2024 06:39:56 -0500 Subject: [PATCH 19/20] eslint fix --- openalex-importer/.eslintrc.cjs | 3 +- openalex-importer/.estlintrc.js | 49 --------------------------- openalex-importer/index.ts | 11 +++--- openalex-importer/package.json | 1 + openalex-importer/src/db/types.ts | 2 +- openalex-importer/src/logger.ts | 2 +- openalex-importer/src/script.ts | 4 +-- openalex-importer/src/transformers.ts | 8 ++--- openalex-importer/yarn.lock | 5 +++ 9 files changed, 21 insertions(+), 64 deletions(-) delete mode 100644 openalex-importer/.estlintrc.js diff --git a/openalex-importer/.eslintrc.cjs b/openalex-importer/.eslintrc.cjs index 5fa087805..8c4aca30b 100755 --- a/openalex-importer/.eslintrc.cjs +++ b/openalex-importer/.eslintrc.cjs @@ -3,7 +3,7 @@ module.exports = { extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'], - plugins: ['@typescript-eslint', 'import'], + plugins: ['@typescript-eslint', 'import', 'simple-import-sort'], rules: { // General @@ -13,6 +13,7 @@ module.exports = { '@typescript-eslint/no-non-null-assertion': 0, '@typescript-eslint/ban-ts-comment': 0, '@typescript-eslint/no-empty-interface': 0, + 'simple-import-sort/imports': 'error', // Import 'import/order': [ diff --git a/openalex-importer/.estlintrc.js b/openalex-importer/.estlintrc.js deleted file mode 100644 index a580b45d5..000000000 --- a/openalex-importer/.estlintrc.js +++ /dev/null @@ -1,49 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - - extends: [ - 'plugin:@typescript-eslint/recommended', - 'prettier', - 'plugin:prettier/recommended', - 'plugin:no-array-reduce/recommended', - ], - - plugins: ['@typescript-eslint', 'import'], - - rules: { - // General - '@typescript-eslint/no-unused-vars': 0, - '@typescript-eslint/explicit-module-boundary-types': 0, - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/no-non-null-assertion': 0, - '@typescript-eslint/ban-ts-comment': 0, - '@typescript-eslint/no-empty-interface': 0, - - // Import - 'import/order': [ - 'error', - { - groups: ['builtin', 'external', 'internal', 'parent', 'sibling'], - 'newlines-between': 'always', - alphabetize: { - order: 'asc', - caseInsensitive: true, - }, - }, - ], - }, - - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module', - }, - - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.jsx', '.ts', '.tsx'], - moduleDirectory: ['node_modules', 'src/'], - }, - }, - }, -}; diff --git a/openalex-importer/index.ts b/openalex-importer/index.ts index 19115b799..e7885c86d 100644 --- a/openalex-importer/index.ts +++ b/openalex-importer/index.ts @@ -1,20 +1,19 @@ import 'dotenv/config'; +import { addDays, differenceInDays, endOfDay, startOfDay, subDays } from 'date-fns'; import cron from 'node-cron'; import { runImport } from './src/script.js'; import { logger } from './src/logger.js'; -import { addDays, differenceInDays, endOfDay, startOfDay, subDays } from 'date-fns'; async function main() { - let cliArgs = parseArgs(); + const cliArgs = parseArgs(); if (!cliArgs) { cron.schedule('*/2 * * * *', async () => { logger.info('Running a task evey day at 12:00 AM'); - console.log('Running a task evey day at 12:00 AM'); - let currentDate = new Date(); + const currentDate = new Date(); // let from_created_date = startOfDay(subDays(currentDate, 1)); // let to_created_date = endOfDay(subDays(currentDate, 1)); - let from_created_date = startOfDay(subDays(currentDate, 0)); - let to_created_date = endOfDay(subDays(currentDate, 0)); + const from_created_date = startOfDay(subDays(currentDate, 0)); + const to_created_date = endOfDay(subDays(currentDate, 0)); await runImport({ from: from_created_date, to: to_created_date }); }); } else if (cliArgs.start) { diff --git a/openalex-importer/package.json b/openalex-importer/package.json index 4f3cb8ce8..54d9f567e 100644 --- a/openalex-importer/package.json +++ b/openalex-importer/package.json @@ -30,6 +30,7 @@ "@types/node-cron": "^3.0.11", "@types/pg": "^8.11.6", "drizzle-kit": "^0.22.8", + "eslint-plugin-simple-import-sort": "^12.1.1", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "rimraf": "^3.0.2", diff --git a/openalex-importer/src/db/types.ts b/openalex-importer/src/db/types.ts index c8d2e3b9f..3724955ac 100644 --- a/openalex-importer/src/db/types.ts +++ b/openalex-importer/src/db/types.ts @@ -1,9 +1,9 @@ import { - worksInOpenalex, works_best_oa_locationsInOpenalex, works_idsInOpenalex, works_locationsInOpenalex, works_primary_locationsInOpenalex, + worksInOpenalex, } from '../../drizzle/schema.js'; // filter object fields to remove undefined fields but allow null fields diff --git a/openalex-importer/src/logger.ts b/openalex-importer/src/logger.ts index a4b884556..2a991e2fa 100644 --- a/openalex-importer/src/logger.ts +++ b/openalex-importer/src/logger.ts @@ -1,6 +1,6 @@ import path from 'path'; -import { fileURLToPath } from 'url'; +import { fileURLToPath } from 'url'; import { pino } from 'pino'; const __filename = fileURLToPath(import.meta.url); diff --git a/openalex-importer/src/script.ts b/openalex-importer/src/script.ts index 76d901b95..aa91235d0 100644 --- a/openalex-importer/src/script.ts +++ b/openalex-importer/src/script.ts @@ -1,11 +1,11 @@ import { existsSync, mkdirSync, writeFileSync } from 'fs'; import path from 'path'; -// import { startOfDay, endOfDay, subDays } from "date-fns"; +// import { startOfDay, endOfDay, subDays } from "date-fns"; import { saveData } from './db/index.js'; import { logger } from './logger.js'; import { transformDataModel } from './transformers.js'; -import { Work, Institution } from './types/index.js'; +import { Institution, Work } from './types/index.js'; const OPEN_ALEX_API = 'https://api.openalex.org/'; diff --git a/openalex-importer/src/transformers.ts b/openalex-importer/src/transformers.ts index 83f672499..9461acb89 100644 --- a/openalex-importer/src/transformers.ts +++ b/openalex-importer/src/transformers.ts @@ -4,14 +4,14 @@ import _ from 'lodash'; import type { authors_idsInOpenalex, authorsInOpenalex, - WorksBestOaLocation, Works, works_biblioInOpenalex, - WorksId, - WorksPrimaryLocation, - WorksLocation, works_meshInOpenalex, works_topicsInOpenalex, + WorksBestOaLocation, + WorksId, + WorksLocation, + WorksPrimaryLocation, } from './db/index.js'; import { Institution } from './types/institutions.js'; import type { Mesh, Work } from './types/works.js'; diff --git a/openalex-importer/yarn.lock b/openalex-importer/yarn.lock index bfb36717b..a5e2d6ae1 100644 --- a/openalex-importer/yarn.lock +++ b/openalex-importer/yarn.lock @@ -1646,6 +1646,11 @@ eslint-plugin-prettier@^3.4.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-simple-import-sort@^12.1.1: + version "12.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz#e64bfdaf91c5b98a298619aa634a9f7aa43b709e" + integrity sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA== + eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" From 4b145f546f60a992364fa07540a0a1dd4b2786c3 Mon Sep 17 00:00:00 2001 From: shadrach Date: Wed, 8 Jan 2025 08:50:39 +0100 Subject: [PATCH 20/20] chore: fix formatting --- openalex-importer/drizzle/relations.ts | 4 +- openalex-importer/drizzle/schema.ts | 880 +++++++++++++------------ 2 files changed, 474 insertions(+), 410 deletions(-) diff --git a/openalex-importer/drizzle/relations.ts b/openalex-importer/drizzle/relations.ts index 80768e2be..1278283f5 100644 --- a/openalex-importer/drizzle/relations.ts +++ b/openalex-importer/drizzle/relations.ts @@ -1,3 +1,3 @@ -import { relations } from "drizzle-orm/relations"; -import { } from "./schema"; +import { relations } from 'drizzle-orm/relations'; +import {} from './schema'; diff --git a/openalex-importer/drizzle/schema.ts b/openalex-importer/drizzle/schema.ts index c65313126..3a1bb1bd4 100644 --- a/openalex-importer/drizzle/schema.ts +++ b/openalex-importer/drizzle/schema.ts @@ -1,408 +1,472 @@ -import { pgTable, pgSchema, text, real, bigint, json, integer, timestamp, index, boolean, date, vector } from "drizzle-orm/pg-core" - import { sql } from "drizzle-orm" - -export const openalex = pgSchema("openalex"); - - -export const institutions_geoInOpenalex = openalex.table("institutions_geo", { - institution_id: text("institution_id").notNull(), - city: text("city"), - geonames_city_id: text("geonames_city_id"), - region: text("region"), - country_code: text("country_code"), - country: text("country"), - latitude: real("latitude"), - longitude: real("longitude"), -}); - -export const institutions_idsInOpenalex = openalex.table("institutions_ids", { - institution_id: text("institution_id").notNull(), - openalex: text("openalex"), - ror: text("ror"), - grid: text("grid"), - wikipedia: text("wikipedia"), - wikidata: text("wikidata"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), -}); - -export const publishersInOpenalex = openalex.table("publishers", { - id: text("id").notNull(), - display_name: text("display_name"), - alternate_titles: json("alternate_titles"), - country_codes: json("country_codes"), - hierarchy_level: integer("hierarchy_level"), - parent_publisher: text("parent_publisher"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - sources_api_url: text("sources_api_url"), - updated_date: timestamp("updated_date", { mode: 'string' }), -}); - -export const publishers_counts_by_yearInOpenalex = openalex.table("publishers_counts_by_year", { - publisher_id: text("publisher_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), -}); - -export const publishers_idsInOpenalex = openalex.table("publishers_ids", { - publisher_id: text("publisher_id"), - openalex: text("openalex"), - ror: text("ror"), - wikidata: text("wikidata"), -}); - -export const institutions_associated_institutionsInOpenalex = openalex.table("institutions_associated_institutions", { - institution_id: text("institution_id"), - associated_institution_id: text("associated_institution_id"), - relationship: text("relationship"), -}); - -export const works_primary_locationsInOpenalex = openalex.table("works_primary_locations", { - work_id: text("work_id"), - source_id: text("source_id"), - landing_page_url: text("landing_page_url"), - pdf_url: text("pdf_url"), - is_oa: boolean("is_oa"), - version: text("version"), - license: text("license"), -}, -(table) => { - return { - work_id_idx: index("works_primary_locations_work_id_idx").using("btree", table.work_id), - } -}); - -export const worksInOpenalex = openalex.table("works", { - id: text("id").notNull(), - doi: text("doi"), - title: text("title"), - display_name: text("display_name"), - publication_year: integer("publication_year"), - publication_date: text("publication_date"), - type: text("type"), - cited_by_count: integer("cited_by_count"), - is_retracted: boolean("is_retracted"), - is_paratext: boolean("is_paratext"), - cited_by_api_url: text("cited_by_api_url"), - abstract_inverted_index: json("abstract_inverted_index"), - language: text("language"), - publication_date_date: date("publication_date_date"), -}, -(table) => { - return { - publication_date_idx: index("works_publication_date_idx").using("btree", table.publication_date), - } -}); - -export const institutionsInOpenalex = openalex.table("institutions", { - id: text("id").notNull(), - ror: text("ror"), - display_name: text("display_name"), - country_code: text("country_code"), - type: text("type"), - homepage_url: text("homepage_url"), - image_url: text("image_url"), - image_thumbnail_url: text("image_thumbnail_url"), - display_name_acronyms: json("display_name_acronyms"), - display_name_alternatives: json("display_name_alternatives"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: 'string' }), -}); - -export const institutions_counts_by_yearInOpenalex = openalex.table("institutions_counts_by_year", { - institution_id: text("institution_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), -}); - -export const sourcesInOpenalex = openalex.table("sources", { - id: text("id").notNull(), - issn_l: text("issn_l"), - issn: json("issn"), - display_name: text("display_name"), - publisher: text("publisher"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - is_oa: boolean("is_oa"), - is_in_doaj: boolean("is_in_doaj"), - homepage_url: text("homepage_url"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: 'string' }), -}); - -export const sources_counts_by_yearInOpenalex = openalex.table("sources_counts_by_year", { - source_id: text("source_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), -}); - -export const works_biblioInOpenalex = openalex.table("works_biblio", { - work_id: text("work_id").notNull(), - volume: text("volume"), - issue: text("issue"), - first_page: text("first_page"), - last_page: text("last_page"), -}); - -export const works_conceptsInOpenalex = openalex.table("works_concepts", { - work_id: text("work_id"), - concept_id: text("concept_id"), - score: real("score"), -}, -(table) => { - return { - concept_id_idx: index("works_concepts_concept_id_idx").using("btree", table.concept_id), - work_id_idx: index("works_concepts_work_id_idx").using("btree", table.work_id), - } -}); - -export const works_idsInOpenalex = openalex.table("works_ids", { - work_id: text("work_id").notNull(), - openalex: text("openalex"), - doi: text("doi"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), - pmid: text("pmid"), - pmcid: text("pmcid"), -}); - -export const works_meshInOpenalex = openalex.table("works_mesh", { - work_id: text("work_id"), - descriptor_ui: text("descriptor_ui"), - descriptor_name: text("descriptor_name"), - qualifier_ui: text("qualifier_ui"), - qualifier_name: text("qualifier_name"), - is_major_topic: boolean("is_major_topic"), -}, -(table) => { - return { - descriptor_ui_idx: index("works_mesh_descriptor_ui_idx").using("btree", table.descriptor_ui), - qualifier_ui_idx: index("works_mesh_qualifier_ui_idx").using("btree", table.qualifier_ui), - work_id_idx: index("works_mesh_work_id_idx").using("btree", table.work_id), - } -}); - -export const works_open_accessInOpenalex = openalex.table("works_open_access", { - work_id: text("work_id").notNull(), - is_oa: boolean("is_oa"), - oa_status: text("oa_status"), - oa_url: text("oa_url"), - any_repository_has_fulltext: boolean("any_repository_has_fulltext"), -}, -(table) => { - return { - work_id_idx: index("works_open_access_work_id_idx").using("btree", table.work_id), - work_id_idx1: index("works_open_access_work_id_idx1").using("btree", table.work_id), - } -}); - -export const sources_idsInOpenalex = openalex.table("sources_ids", { - source_id: text("source_id"), - openalex: text("openalex"), - issn_l: text("issn_l"), - issn: json("issn"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), - wikidata: text("wikidata"), - fatcat: text("fatcat"), -}); - -export const works_locationsInOpenalex = openalex.table("works_locations", { - work_id: text("work_id"), - source_id: text("source_id"), - landing_page_url: text("landing_page_url"), - pdf_url: text("pdf_url"), - is_oa: boolean("is_oa"), - version: text("version"), - license: text("license"), -}, -(table) => { - return { - work_id_idx: index("works_locations_work_id_idx").using("btree", table.work_id), - } -}); - -export const works_referenced_worksInOpenalex = openalex.table("works_referenced_works", { - work_id: text("work_id"), - referenced_work_id: text("referenced_work_id"), -}, -(table) => { - return { - referenced_work_id_idx: index("works_referenced_works_referenced_work_id_idx").using("btree", table.referenced_work_id), - work_id_idx: index("works_referenced_works_work_id_idx").using("btree", table.work_id), - } -}); - -export const works_related_worksInOpenalex = openalex.table("works_related_works", { - work_id: text("work_id"), - related_work_id: text("related_work_id"), -}, -(table) => { - return { - related_work_id_idx: index("works_related_works_related_work_id_idx").using("btree", table.related_work_id), - work_id_idx: index("works_related_works_work_id_idx").using("btree", table.work_id), - } -}); - -export const works_topicsInOpenalex = openalex.table("works_topics", { - work_id: text("work_id"), - topic_id: text("topic_id"), - score: real("score"), -}, -(table) => { - return { - topic_id_idx: index("works_topics_topic_id_idx").using("btree", table.topic_id), - work_id_idx: index("works_topics_work_id_idx").using("btree", table.work_id), - } -}); - -export const authorsInOpenalex = openalex.table("authors", { - id: text("id").notNull(), - orcid: text("orcid"), - display_name: text("display_name"), - display_name_alternatives: json("display_name_alternatives"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - last_known_institution: text("last_known_institution"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: 'string' }), -}); - -export const authors_counts_by_yearInOpenalex = openalex.table("authors_counts_by_year", { - author_id: text("author_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), -}); - -export const authors_idsInOpenalex = openalex.table("authors_ids", { - author_id: text("author_id").notNull(), - openalex: text("openalex"), - orcid: text("orcid"), - scopus: text("scopus"), - twitter: text("twitter"), - wikipedia: text("wikipedia"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), -}); - -export const topicsInOpenalex = openalex.table("topics", { - id: text("id").notNull(), - display_name: text("display_name"), - subfield_id: text("subfield_id"), - subfield_display_name: text("subfield_display_name"), - field_id: text("field_id"), - field_display_name: text("field_display_name"), - domain_id: text("domain_id"), - domain_display_name: text("domain_display_name"), - description: text("description"), - keywords: text("keywords"), - works_api_url: text("works_api_url"), - wikipedia_id: text("wikipedia_id"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - updated_date: timestamp("updated_date", { mode: 'string' }), -}); - -export const conceptsInOpenalex = openalex.table("concepts", { - id: text("id").notNull(), - wikidata: text("wikidata"), - display_name: text("display_name"), - level: integer("level"), - description: text("description"), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - image_url: text("image_url"), - image_thumbnail_url: text("image_thumbnail_url"), - works_api_url: text("works_api_url"), - updated_date: timestamp("updated_date", { mode: 'string' }), - descriptions_embeddings: vector("descriptions_embeddings", { dimensions: 768 }), - name_embeddings: vector("name_embeddings", { dimensions: 768 }), -}, -(table) => { - return { - descriptions_embeddings_idx: index("concepts_descriptions_embeddings_idx").using("ivfflat", table.descriptions_embeddings.op("vector_l2_ops")).with({lists: "100"}), - name_embeddings_idx: index("concepts_name_embeddings_idx").using("ivfflat", table.name_embeddings.op("vector_l2_ops")).with({lists: "100"}), - } -}); - -export const concepts_ancestorsInOpenalex = openalex.table("concepts_ancestors", { - concept_id: text("concept_id"), - ancestor_id: text("ancestor_id"), -}, -(table) => { - return { - concept_id_idx: index("concepts_ancestors_concept_id_idx").using("btree", table.concept_id), - } -}); - -export const concepts_counts_by_yearInOpenalex = openalex.table("concepts_counts_by_year", { - concept_id: text("concept_id").notNull(), - year: integer("year").notNull(), - works_count: integer("works_count"), - cited_by_count: integer("cited_by_count"), - oa_works_count: integer("oa_works_count"), -}); - -export const works_authorshipsInOpenalex = openalex.table("works_authorships", { - work_id: text("work_id"), - author_position: text("author_position"), - author_id: text("author_id"), - institution_id: text("institution_id"), - raw_affiliation_string: text("raw_affiliation_string"), -}, -(table) => { - return { - author_id_idx: index("works_authorships_author_id_idx").using("btree", table.author_id), - institution_id_idx: index("works_authorships_institution_id_idx").using("btree", table.institution_id), - work_id_idx: index("works_authorships_work_id_idx").using("btree", table.work_id), - } -}); - -export const works_best_oa_locationsInOpenalex = openalex.table("works_best_oa_locations", { - work_id: text("work_id"), - source_id: text("source_id"), - landing_page_url: text("landing_page_url"), - pdf_url: text("pdf_url"), - is_oa: boolean("is_oa"), - version: text("version"), - license: text("license"), -}, -(table) => { - return { - work_id_idx: index("works_best_oa_locations_work_id_idx").using("btree", table.work_id), - } -}); - -export const concepts_idsInOpenalex = openalex.table("concepts_ids", { - concept_id: text("concept_id").notNull(), - openalex: text("openalex"), - wikidata: text("wikidata"), - wikipedia: text("wikipedia"), - umls_aui: json("umls_aui"), - umls_cui: json("umls_cui"), - // You can use { mode: "bigint" } if numbers are exceeding js number limitations - mag: bigint("mag", { mode: "number" }), -}); - -export const concepts_related_conceptsInOpenalex = openalex.table("concepts_related_concepts", { - concept_id: text("concept_id"), - related_concept_id: text("related_concept_id"), - score: real("score"), -}, -(table) => { - return { - concept_id_idx: index("concepts_related_concepts_concept_id_idx").using("btree", table.concept_id), - related_concept_id_idx: index("concepts_related_concepts_related_concept_id_idx").using("btree", table.related_concept_id), - } -}); \ No newline at end of file +import { sql } from 'drizzle-orm'; +import { + bigint, + boolean, + date, + index, + integer, + json, + pgSchema, + pgTable, + real, + text, + timestamp, + vector, +} from 'drizzle-orm/pg-core'; + +export const openalex = pgSchema('openalex'); + +export const institutions_geoInOpenalex = openalex.table('institutions_geo', { + institution_id: text('institution_id').notNull(), + city: text('city'), + geonames_city_id: text('geonames_city_id'), + region: text('region'), + country_code: text('country_code'), + country: text('country'), + latitude: real('latitude'), + longitude: real('longitude'), +}); + +export const institutions_idsInOpenalex = openalex.table('institutions_ids', { + institution_id: text('institution_id').notNull(), + openalex: text('openalex'), + ror: text('ror'), + grid: text('grid'), + wikipedia: text('wikipedia'), + wikidata: text('wikidata'), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint('mag', { mode: 'number' }), +}); + +export const publishersInOpenalex = openalex.table('publishers', { + id: text('id').notNull(), + display_name: text('display_name'), + alternate_titles: json('alternate_titles'), + country_codes: json('country_codes'), + hierarchy_level: integer('hierarchy_level'), + parent_publisher: text('parent_publisher'), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + sources_api_url: text('sources_api_url'), + updated_date: timestamp('updated_date', { mode: 'string' }), +}); + +export const publishers_counts_by_yearInOpenalex = openalex.table('publishers_counts_by_year', { + publisher_id: text('publisher_id').notNull(), + year: integer('year').notNull(), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + oa_works_count: integer('oa_works_count'), +}); + +export const publishers_idsInOpenalex = openalex.table('publishers_ids', { + publisher_id: text('publisher_id'), + openalex: text('openalex'), + ror: text('ror'), + wikidata: text('wikidata'), +}); + +export const institutions_associated_institutionsInOpenalex = openalex.table('institutions_associated_institutions', { + institution_id: text('institution_id'), + associated_institution_id: text('associated_institution_id'), + relationship: text('relationship'), +}); + +export const works_primary_locationsInOpenalex = openalex.table( + 'works_primary_locations', + { + work_id: text('work_id'), + source_id: text('source_id'), + landing_page_url: text('landing_page_url'), + pdf_url: text('pdf_url'), + is_oa: boolean('is_oa'), + version: text('version'), + license: text('license'), + }, + (table) => { + return { + work_id_idx: index('works_primary_locations_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const worksInOpenalex = openalex.table( + 'works', + { + id: text('id').notNull(), + doi: text('doi'), + title: text('title'), + display_name: text('display_name'), + publication_year: integer('publication_year'), + publication_date: text('publication_date'), + type: text('type'), + cited_by_count: integer('cited_by_count'), + is_retracted: boolean('is_retracted'), + is_paratext: boolean('is_paratext'), + cited_by_api_url: text('cited_by_api_url'), + abstract_inverted_index: json('abstract_inverted_index'), + language: text('language'), + publication_date_date: date('publication_date_date'), + }, + (table) => { + return { + publication_date_idx: index('works_publication_date_idx').using('btree', table.publication_date), + }; + }, +); + +export const institutionsInOpenalex = openalex.table('institutions', { + id: text('id').notNull(), + ror: text('ror'), + display_name: text('display_name'), + country_code: text('country_code'), + type: text('type'), + homepage_url: text('homepage_url'), + image_url: text('image_url'), + image_thumbnail_url: text('image_thumbnail_url'), + display_name_acronyms: json('display_name_acronyms'), + display_name_alternatives: json('display_name_alternatives'), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + works_api_url: text('works_api_url'), + updated_date: timestamp('updated_date', { mode: 'string' }), +}); + +export const institutions_counts_by_yearInOpenalex = openalex.table('institutions_counts_by_year', { + institution_id: text('institution_id').notNull(), + year: integer('year').notNull(), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + oa_works_count: integer('oa_works_count'), +}); + +export const sourcesInOpenalex = openalex.table('sources', { + id: text('id').notNull(), + issn_l: text('issn_l'), + issn: json('issn'), + display_name: text('display_name'), + publisher: text('publisher'), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + is_oa: boolean('is_oa'), + is_in_doaj: boolean('is_in_doaj'), + homepage_url: text('homepage_url'), + works_api_url: text('works_api_url'), + updated_date: timestamp('updated_date', { mode: 'string' }), +}); + +export const sources_counts_by_yearInOpenalex = openalex.table('sources_counts_by_year', { + source_id: text('source_id').notNull(), + year: integer('year').notNull(), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + oa_works_count: integer('oa_works_count'), +}); + +export const works_biblioInOpenalex = openalex.table('works_biblio', { + work_id: text('work_id').notNull(), + volume: text('volume'), + issue: text('issue'), + first_page: text('first_page'), + last_page: text('last_page'), +}); + +export const works_conceptsInOpenalex = openalex.table( + 'works_concepts', + { + work_id: text('work_id'), + concept_id: text('concept_id'), + score: real('score'), + }, + (table) => { + return { + concept_id_idx: index('works_concepts_concept_id_idx').using('btree', table.concept_id), + work_id_idx: index('works_concepts_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const works_idsInOpenalex = openalex.table('works_ids', { + work_id: text('work_id').notNull(), + openalex: text('openalex'), + doi: text('doi'), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint('mag', { mode: 'number' }), + pmid: text('pmid'), + pmcid: text('pmcid'), +}); + +export const works_meshInOpenalex = openalex.table( + 'works_mesh', + { + work_id: text('work_id'), + descriptor_ui: text('descriptor_ui'), + descriptor_name: text('descriptor_name'), + qualifier_ui: text('qualifier_ui'), + qualifier_name: text('qualifier_name'), + is_major_topic: boolean('is_major_topic'), + }, + (table) => { + return { + descriptor_ui_idx: index('works_mesh_descriptor_ui_idx').using('btree', table.descriptor_ui), + qualifier_ui_idx: index('works_mesh_qualifier_ui_idx').using('btree', table.qualifier_ui), + work_id_idx: index('works_mesh_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const works_open_accessInOpenalex = openalex.table( + 'works_open_access', + { + work_id: text('work_id').notNull(), + is_oa: boolean('is_oa'), + oa_status: text('oa_status'), + oa_url: text('oa_url'), + any_repository_has_fulltext: boolean('any_repository_has_fulltext'), + }, + (table) => { + return { + work_id_idx: index('works_open_access_work_id_idx').using('btree', table.work_id), + work_id_idx1: index('works_open_access_work_id_idx1').using('btree', table.work_id), + }; + }, +); + +export const sources_idsInOpenalex = openalex.table('sources_ids', { + source_id: text('source_id'), + openalex: text('openalex'), + issn_l: text('issn_l'), + issn: json('issn'), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint('mag', { mode: 'number' }), + wikidata: text('wikidata'), + fatcat: text('fatcat'), +}); + +export const works_locationsInOpenalex = openalex.table( + 'works_locations', + { + work_id: text('work_id'), + source_id: text('source_id'), + landing_page_url: text('landing_page_url'), + pdf_url: text('pdf_url'), + is_oa: boolean('is_oa'), + version: text('version'), + license: text('license'), + }, + (table) => { + return { + work_id_idx: index('works_locations_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const works_referenced_worksInOpenalex = openalex.table( + 'works_referenced_works', + { + work_id: text('work_id'), + referenced_work_id: text('referenced_work_id'), + }, + (table) => { + return { + referenced_work_id_idx: index('works_referenced_works_referenced_work_id_idx').using( + 'btree', + table.referenced_work_id, + ), + work_id_idx: index('works_referenced_works_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const works_related_worksInOpenalex = openalex.table( + 'works_related_works', + { + work_id: text('work_id'), + related_work_id: text('related_work_id'), + }, + (table) => { + return { + related_work_id_idx: index('works_related_works_related_work_id_idx').using('btree', table.related_work_id), + work_id_idx: index('works_related_works_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const works_topicsInOpenalex = openalex.table( + 'works_topics', + { + work_id: text('work_id'), + topic_id: text('topic_id'), + score: real('score'), + }, + (table) => { + return { + topic_id_idx: index('works_topics_topic_id_idx').using('btree', table.topic_id), + work_id_idx: index('works_topics_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const authorsInOpenalex = openalex.table('authors', { + id: text('id').notNull(), + orcid: text('orcid'), + display_name: text('display_name'), + display_name_alternatives: json('display_name_alternatives'), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + last_known_institution: text('last_known_institution'), + works_api_url: text('works_api_url'), + updated_date: timestamp('updated_date', { mode: 'string' }), +}); + +export const authors_counts_by_yearInOpenalex = openalex.table('authors_counts_by_year', { + author_id: text('author_id').notNull(), + year: integer('year').notNull(), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + oa_works_count: integer('oa_works_count'), +}); + +export const authors_idsInOpenalex = openalex.table('authors_ids', { + author_id: text('author_id').notNull(), + openalex: text('openalex'), + orcid: text('orcid'), + scopus: text('scopus'), + twitter: text('twitter'), + wikipedia: text('wikipedia'), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint('mag', { mode: 'number' }), +}); + +export const topicsInOpenalex = openalex.table('topics', { + id: text('id').notNull(), + display_name: text('display_name'), + subfield_id: text('subfield_id'), + subfield_display_name: text('subfield_display_name'), + field_id: text('field_id'), + field_display_name: text('field_display_name'), + domain_id: text('domain_id'), + domain_display_name: text('domain_display_name'), + description: text('description'), + keywords: text('keywords'), + works_api_url: text('works_api_url'), + wikipedia_id: text('wikipedia_id'), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + updated_date: timestamp('updated_date', { mode: 'string' }), +}); + +export const conceptsInOpenalex = openalex.table( + 'concepts', + { + id: text('id').notNull(), + wikidata: text('wikidata'), + display_name: text('display_name'), + level: integer('level'), + description: text('description'), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + image_url: text('image_url'), + image_thumbnail_url: text('image_thumbnail_url'), + works_api_url: text('works_api_url'), + updated_date: timestamp('updated_date', { mode: 'string' }), + descriptions_embeddings: vector('descriptions_embeddings', { dimensions: 768 }), + name_embeddings: vector('name_embeddings', { dimensions: 768 }), + }, + (table) => { + return { + descriptions_embeddings_idx: index('concepts_descriptions_embeddings_idx') + .using('ivfflat', table.descriptions_embeddings.op('vector_l2_ops')) + .with({ lists: '100' }), + name_embeddings_idx: index('concepts_name_embeddings_idx') + .using('ivfflat', table.name_embeddings.op('vector_l2_ops')) + .with({ lists: '100' }), + }; + }, +); + +export const concepts_ancestorsInOpenalex = openalex.table( + 'concepts_ancestors', + { + concept_id: text('concept_id'), + ancestor_id: text('ancestor_id'), + }, + (table) => { + return { + concept_id_idx: index('concepts_ancestors_concept_id_idx').using('btree', table.concept_id), + }; + }, +); + +export const concepts_counts_by_yearInOpenalex = openalex.table('concepts_counts_by_year', { + concept_id: text('concept_id').notNull(), + year: integer('year').notNull(), + works_count: integer('works_count'), + cited_by_count: integer('cited_by_count'), + oa_works_count: integer('oa_works_count'), +}); + +export const works_authorshipsInOpenalex = openalex.table( + 'works_authorships', + { + work_id: text('work_id'), + author_position: text('author_position'), + author_id: text('author_id'), + institution_id: text('institution_id'), + raw_affiliation_string: text('raw_affiliation_string'), + }, + (table) => { + return { + author_id_idx: index('works_authorships_author_id_idx').using('btree', table.author_id), + institution_id_idx: index('works_authorships_institution_id_idx').using('btree', table.institution_id), + work_id_idx: index('works_authorships_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const works_best_oa_locationsInOpenalex = openalex.table( + 'works_best_oa_locations', + { + work_id: text('work_id'), + source_id: text('source_id'), + landing_page_url: text('landing_page_url'), + pdf_url: text('pdf_url'), + is_oa: boolean('is_oa'), + version: text('version'), + license: text('license'), + }, + (table) => { + return { + work_id_idx: index('works_best_oa_locations_work_id_idx').using('btree', table.work_id), + }; + }, +); + +export const concepts_idsInOpenalex = openalex.table('concepts_ids', { + concept_id: text('concept_id').notNull(), + openalex: text('openalex'), + wikidata: text('wikidata'), + wikipedia: text('wikipedia'), + umls_aui: json('umls_aui'), + umls_cui: json('umls_cui'), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + mag: bigint('mag', { mode: 'number' }), +}); + +export const concepts_related_conceptsInOpenalex = openalex.table( + 'concepts_related_concepts', + { + concept_id: text('concept_id'), + related_concept_id: text('related_concept_id'), + score: real('score'), + }, + (table) => { + return { + concept_id_idx: index('concepts_related_concepts_concept_id_idx').using('btree', table.concept_id), + related_concept_id_idx: index('concepts_related_concepts_related_concept_id_idx').using( + 'btree', + table.related_concept_id, + ), + }; + }, +);