diff --git a/packages/umi-uploader-cascade/package.json b/packages/umi-uploader-cascade/package.json index b5aca1d..943d95a 100644 --- a/packages/umi-uploader-cascade/package.json +++ b/packages/umi-uploader-cascade/package.json @@ -28,7 +28,8 @@ "test": "ava" }, "dependencies": { - "node-fetch": "^2.6.7" + "node-fetch": "^2.6.7", + "form-data": "^3.0.0" }, "peerDependencies": { "@metaplex-foundation/umi": "workspace:^" @@ -42,8 +43,7 @@ "@metaplex-foundation/umi-rpc-web3js": "workspace:^", "ava": "^5.1.0", "typescript": "^4.5.4", - "@types/node-fetch": "^2.6.2", - "form-data": "^3.0.0" + "@types/node-fetch": "^2.6.2" }, "publishConfig": { "access": "public" diff --git a/packages/umi-uploader-cascade/src/createCascadeUploader.ts b/packages/umi-uploader-cascade/src/createCascadeUploader.ts index bad5e27..9ddcea1 100644 --- a/packages/umi-uploader-cascade/src/createCascadeUploader.ts +++ b/packages/umi-uploader-cascade/src/createCascadeUploader.ts @@ -9,6 +9,7 @@ import { UploaderUploadOptions, } from '@metaplex-foundation/umi'; import fetch from 'node-fetch'; + const FormData = require('form-data'); const CASCADE_API_URL = 'https://gateway-api.pastel.network/'; @@ -65,7 +66,7 @@ export function createCascadeUploader( Api_key: apiKey, }, method: 'POST', - body: body, + body, } ); @@ -80,6 +81,7 @@ export function createCascadeUploader( } catch (e) { return []; } + // eslint-disable-next-line no-console console.log(uris); return uris; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e69c8a2..35dc142 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -572,6 +572,9 @@ importers: packages/umi-uploader-cascade: dependencies: + form-data: + specifier: ^3.0.0 + version: 3.0.1 node-fetch: specifier: ^2.6.7 version: 2.6.9 @@ -600,9 +603,6 @@ importers: ava: specifier: ^5.1.0 version: 5.1.0(@ava/typescript@3.0.1) - form-data: - specifier: ^3.0.0 - version: 3.0.1 typescript: specifier: ^4.5.4 version: 4.9.5 @@ -8473,7 +8473,6 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: true /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}