pinata 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4,6 +4,7 @@ type PinataConfig = {
4
4
  pinataGatewayKey?: string;
5
5
  customHeaders?: Record<string, string>;
6
6
  endpointUrl?: string;
7
+ uploadUrl?: string;
7
8
  };
8
9
  type AuthTestResponse = {
9
10
  message: string;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ type PinataConfig = {
4
4
  pinataGatewayKey?: string;
5
5
  customHeaders?: Record<string, string>;
6
6
  endpointUrl?: string;
7
+ uploadUrl?: string;
7
8
  };
8
9
  type AuthTestResponse = {
9
10
  message: string;
package/dist/index.js CHANGED
@@ -129,8 +129,8 @@ var uploadFile = async (config, file, options) => {
129
129
  };
130
130
  }
131
131
  let endpoint = "https://uploads.pinata.cloud/v3";
132
- if (config.endpointUrl) {
133
- endpoint = config.endpointUrl;
132
+ if (config.uploadUrl) {
133
+ endpoint = config.uploadUrl;
134
134
  }
135
135
  try {
136
136
  const request = await fetch(`${endpoint}/files`, {
@@ -191,8 +191,8 @@ var uploadBase64 = async (config, base64String, options) => {
191
191
  };
192
192
  }
193
193
  let endpoint = "https://uploads.pinata.cloud/v3";
194
- if (config.endpointUrl) {
195
- endpoint = config.endpointUrl;
194
+ if (config.uploadUrl) {
195
+ endpoint = config.uploadUrl;
196
196
  }
197
197
  try {
198
198
  const request = await fetch(`${endpoint}/files`, {
@@ -265,8 +265,8 @@ var uploadUrl = async (config, url, options) => {
265
265
  };
266
266
  }
267
267
  let endpoint = "https://uploads.pinata.cloud/v3";
268
- if (config.endpointUrl) {
269
- endpoint = config.endpointUrl;
268
+ if (config.uploadUrl) {
269
+ endpoint = config.uploadUrl;
270
270
  }
271
271
  try {
272
272
  const request = await fetch(`${endpoint}/files`, {
@@ -327,8 +327,8 @@ var uploadJson = async (config, jsonData, options) => {
327
327
  };
328
328
  }
329
329
  let endpoint = "https://uploads.pinata.cloud/v3";
330
- if (config.endpointUrl) {
331
- endpoint = config.endpointUrl;
330
+ if (config.uploadUrl) {
331
+ endpoint = config.uploadUrl;
332
332
  }
333
333
  try {
334
334
  const request = await fetch(`${endpoint}/files`, {