myfetchapi
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -0,2 +1,27 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
SET_MAX_CONCURRENT_REQUESTS: () => SET_MAX_CONCURRENT_REQUESTS, | ||
myFetch: () => myFetch | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
var MAX_CONCURRENT_REQUESTS = 500; | ||
@@ -37,5 +62,5 @@ var currentRequests = 0; | ||
retrying = true; | ||
if (options?.retryCb) | ||
await options?.retryCb(error, retryCount + 1, maxRetry); | ||
executeRequest(retryCount + 1); | ||
if (options?.retryCb) | ||
options?.retryCb(error, retryCount + 1, maxRetry); | ||
} else { | ||
@@ -61,5 +86,1 @@ reject(error); | ||
} | ||
export { | ||
SET_MAX_CONCURRENT_REQUESTS, | ||
myFetch | ||
}; |
{ | ||
"name": "myfetchapi", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "mFetch is a JavaScript library that provides a utility function for making HTTP requests with queuing and retry functionality.", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "tsc && esbuild src/index.ts --format=esm --bundle --outfile=dist/index.js" | ||
"build": "tsc && esbuild src/index.ts --format=cjs --bundle --outfile=dist/index.js && esbuild src/index.ts --format=esm --bundle --outfile=dist/index.mjs" | ||
}, | ||
@@ -31,2 +32,2 @@ "repository": { | ||
"homepage": "https://github.com/ugo-studio/myfetch#readme" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
19271
6
262