Skip to content

Commit

Permalink
fix head from unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
codev911 committed Jan 25, 2024
1 parent 9a9ecec commit 769e850
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
8 changes: 1 addition & 7 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ export const getLiveGateway = async (
}

finalUrl.push(url);
listLoop.push(
axios({
method: 'head',
url: url,
timeout: timeout !== undefined && timeout !== null ? timeout : 1500,
})
);
listLoop.push(axios.head(url, { timeout: timeout || 5000 }));
});

const result = await Promise.allSettled(listLoop);
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "public-ipfs-gateway",
"description": "Get Public IPFS gateway url easily",
"author": "codev911",
"version": "1.0.8",
"version": "1.0.9",
"main": "./dist/index.js",
"browser": "./dist/iife/index.js",
"module": "./dist/esm/index.js",
"browser": "./dist/index.global.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
Expand All @@ -17,6 +17,7 @@
"test": "jest"
},
"devDependencies": {
"@swc/core": "^1.3.105",
"@types/jest": "^29.5.11",
"@types/mocha": "^10.0.6",
"@types/node": "^14",
Expand Down
2 changes: 0 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export default defineConfig({
dts: true,
splitting: false,
sourcemap: true,
minify: true,
minifyIdentifiers: true,
clean: true,
legacyOutput: true,
});

0 comments on commit 769e850

Please sign in to comment.