From 379d072b7e6654685e6d1951e98e39a61e735994 Mon Sep 17 00:00:00 2001 From: Xavi Alfaro Date: Sat, 20 Apr 2024 17:10:48 -0500 Subject: [PATCH] add node fetch --- packages/cli/CHANGELOG.md | 6 ++++ packages/cli/package.json | 3 +- packages/cli/src/utils/get-schema.ts | 2 +- pnpm-lock.yaml | 50 ++++++++++++++++++---------- 4 files changed, 42 insertions(+), 19 deletions(-) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 1b2a999..4947c44 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # vdbs +## 0.0.3 + +### Patch Changes + +- add node-fetch for backwards compability + ## 0.0.2 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index fac37ad..313c597 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "vdbs", - "version": "0.0.2", + "version": "0.0.3", "description": "Generate migrations from database diagrams", "license": "MIT", "keywords": [ @@ -43,6 +43,7 @@ "commander": "12.0.0", "execa": "8.0.1", "glob": "10.3.12", + "node-fetch": "3.3.2", "ora": "8.0.1", "prompts": "2.4.2" }, diff --git a/packages/cli/src/utils/get-schema.ts b/packages/cli/src/utils/get-schema.ts index 9fca947..747a118 100644 --- a/packages/cli/src/utils/get-schema.ts +++ b/packages/cli/src/utils/get-schema.ts @@ -1,4 +1,4 @@ -// import fetch from "node-fetch"; +import fetch from "node-fetch"; const ENDPOINT = `https://vdbs.vercel.app/api/get-generation?code=`; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd8e1c5..dd17107 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -163,6 +163,9 @@ importers: glob: specifier: 10.3.12 version: 10.3.12 + node-fetch: + specifier: 3.3.2 + version: 3.3.2 ora: specifier: 8.0.1 version: 8.0.1 @@ -3297,6 +3300,11 @@ packages: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true + /data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + dev: false + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -4383,6 +4391,14 @@ packages: dependencies: reusify: 1.0.4 + /fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + dev: false + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -4462,6 +4478,13 @@ packages: web-streams-polyfill: 4.0.0-beta.3 dev: false + /formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + dependencies: + fetch-blob: 3.2.0 + dev: false + /fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} dev: true @@ -5573,6 +5596,15 @@ packages: whatwg-url: 5.0.0 dev: false + /node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + dev: false + /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true @@ -5913,22 +5945,6 @@ packages: camelcase-css: 2.0.1 postcss: 8.4.38 - /postcss-load-config@4.0.2: - resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} - engines: {node: '>= 14'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - dependencies: - lilconfig: 3.1.1 - yaml: 2.4.1 - dev: true - /postcss-load-config@4.0.2(postcss@8.4.38): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} @@ -6963,7 +6979,7 @@ packages: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2 + postcss-load-config: 4.0.2(postcss@8.4.38) resolve-from: 5.0.0 rollup: 4.14.3 source-map: 0.8.0-beta.0