fetch-status-codes 0.1.0
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/CHANGELOG.md +16 -0
- package/LICENSE +28 -0
- package/README.md +53 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +44 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +44 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +65 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
All notable changes to this project will be documented in this file.
|
|
5
|
+
|
|
6
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
|
+
|
|
9
|
+
[0.1.0] - 2025-11-26
|
|
10
|
+
--------------------
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Initial release.
|
|
15
|
+
|
|
16
|
+
[0.1.0]: https://github.com/jbenner-radham/node-fetch-status-codes/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, James Benner
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
fetch-status-codes
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
Fetch the HTTP status codes from the [IANA](https://www.iana.org/) registry.
|
|
5
|
+
|
|
6
|
+
Install
|
|
7
|
+
-------
|
|
8
|
+
|
|
9
|
+
```sh-session
|
|
10
|
+
npm install fetch-status-codes
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Usage
|
|
14
|
+
-----
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import fetchStatusCodes from 'fetch-status-codes';
|
|
18
|
+
|
|
19
|
+
await fetchStatusCodes();
|
|
20
|
+
// >>> [
|
|
21
|
+
// >>> {
|
|
22
|
+
// >>> value: 100,
|
|
23
|
+
// >>> description: 'Continue'
|
|
24
|
+
// >>> references: [
|
|
25
|
+
// >>> {
|
|
26
|
+
// >>> name: 'RFC9110, Section 15.2.1',
|
|
27
|
+
// >>> url: 'https://www.rfc-editor.org/rfc/rfc9110.html#section-15.2.1'
|
|
28
|
+
// >>> }
|
|
29
|
+
// >>> ]
|
|
30
|
+
// >>> },
|
|
31
|
+
// >>> ...
|
|
32
|
+
// >>> ]
|
|
33
|
+
|
|
34
|
+
await fetchStatusCodes({ resolveRedirects: false });
|
|
35
|
+
// >>> [
|
|
36
|
+
// >>> {
|
|
37
|
+
// >>> value: 100,
|
|
38
|
+
// >>> description: 'Continue'
|
|
39
|
+
// >>> references: [
|
|
40
|
+
// >>> {
|
|
41
|
+
// >>> name: 'RFC9110, Section 15.2.1',
|
|
42
|
+
// >>> url: 'https://www.iana.org/go/rfc9110'
|
|
43
|
+
// >>> }
|
|
44
|
+
// >>> ]
|
|
45
|
+
// >>> },
|
|
46
|
+
// >>> ...
|
|
47
|
+
// >>> ]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
License
|
|
51
|
+
-------
|
|
52
|
+
|
|
53
|
+
The BSD 3-Clause License. See the [license file](LICENSE) for details.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var x=(n,t)=>{for(var o in t)c(n,o,{get:t[o],enumerable:!0})},C=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!h.call(n,r)&&r!==o&&c(n,r,{get:()=>t[r],enumerable:!(a=y(t,r))||a.enumerable});return n};var S=n=>C(c({},"__esModule",{value:!0}),n);var A={};x(A,{default:()=>u});module.exports=S(A);var m=require("jsdom");async function u({resolveRedirects:n=!0}={}){let a=await(await fetch("https://www.iana.org/assignments/http-status-codes")).text(),d=new m.JSDOM(a).window.document.getElementById("table-http-status-codes-1"),f=Array.from(d.querySelectorAll("tbody > tr")),p=async e=>{if(!n)return e.href;let s=await fetch(e.href,{method:"HEAD",redirect:"manual"}),i=new URL(s.status===301?s.headers.get("Location"):e.href),w=/RFC\d+(?:, Section )?((?:\d+)?(?:.\d+){0,2})/,[,l]=w.exec(e.textContent)??[];return l&&(i.hash=`section-${l}`),i.toString()};return Promise.all(f.map(e=>Array.from(e.querySelectorAll("td"))).filter(e=>e.at(1).textContent!=="Unassigned").map(async e=>({value:Number.parseInt(e.at(0).textContent),description:e.at(1).textContent,references:await Promise.all(Array.from(e.at(2).querySelectorAll("a")).map(async s=>({name:s.textContent,url:await p(s)})))})))}
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { JSDOM } from 'jsdom';\n\nexport type Reference = { name: string; url: string };\n\nexport type StatusCode = { value: number; description: string; references: Reference[] };\n\nexport default async function fetchStatusCodes({ resolveRedirects = true }: {\n resolveRedirects?: boolean;\n} = {}): Promise<StatusCode[]> {\n const url = 'https://www.iana.org/assignments/http-status-codes';\n const response = await fetch(url);\n const html = await response.text();\n const dom = new JSDOM(html);\n const table = dom.window.document.getElementById('table-http-status-codes-1')!;\n const rows = Array.from(table.querySelectorAll<HTMLTableRowElement>('tbody > tr'));\n const getReferenceLink = async (anchor: HTMLAnchorElement): Promise<string> => {\n if (!resolveRedirects) {\n return anchor.href;\n }\n\n // The IANA links are redirects, but we want direct links with a section hash if applicable.\n const response = await fetch(anchor.href, { method: 'HEAD', redirect: 'manual' });\n const url = new URL(response.status === 301 ? response.headers.get('Location')! : anchor.href);\n const pattern = /RFC\\d+(?:, Section )?((?:\\d+)?(?:.\\d+){0,2})/;\n const [, section] = pattern.exec(anchor.textContent) ?? [];\n\n if (section) {\n url.hash = `section-${section}`;\n }\n\n return url.toString();\n };\n\n return Promise.all(rows.map(row => Array.from(row.querySelectorAll('td')))\n .filter(cells => cells.at(1)!.textContent !== 'Unassigned')\n .map(async cells => ({\n value: Number.parseInt(cells.at(0)!.textContent),\n description: cells.at(1)!.textContent,\n references: await Promise.all(Array.from(cells.at(2)!.querySelectorAll('a'))\n .map(async anchor =>\n ({ name: anchor.textContent!, url: await getReferenceLink(anchor) })\n )\n )\n })));\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,iBAMtB,eAAOF,EAAwC,CAAE,iBAAAG,EAAmB,EAAK,EAErE,CAAC,EAA0B,CAG7B,IAAMC,EAAO,MADI,MAAM,MADX,oDACoB,GACJ,KAAK,EAE3BC,EADM,IAAI,QAAMD,CAAI,EACR,OAAO,SAAS,eAAe,2BAA2B,EACtEE,EAAO,MAAM,KAAKD,EAAM,iBAAsC,YAAY,CAAC,EAC3EE,EAAmB,MAAOC,GAA+C,CAC7E,GAAI,CAACL,EACH,OAAOK,EAAO,KAIhB,IAAMC,EAAW,MAAM,MAAMD,EAAO,KAAM,CAAE,OAAQ,OAAQ,SAAU,QAAS,CAAC,EAC1EE,EAAM,IAAI,IAAID,EAAS,SAAW,IAAMA,EAAS,QAAQ,IAAI,UAAU,EAAKD,EAAO,IAAI,EACvFG,EAAU,+CACV,CAAC,CAAEC,CAAO,EAAID,EAAQ,KAAKH,EAAO,WAAW,GAAK,CAAC,EAEzD,OAAII,IACFF,EAAI,KAAO,WAAWE,CAAO,IAGxBF,EAAI,SAAS,CACtB,EAEA,OAAO,QAAQ,IAAIJ,EAAK,IAAIO,GAAO,MAAM,KAAKA,EAAI,iBAAiB,IAAI,CAAC,CAAC,EACtE,OAAOC,GAASA,EAAM,GAAG,CAAC,EAAG,cAAgB,YAAY,EACzD,IAAI,MAAMA,IAAU,CACnB,MAAO,OAAO,SAASA,EAAM,GAAG,CAAC,EAAG,WAAW,EAC/C,YAAaA,EAAM,GAAG,CAAC,EAAG,YAC1B,WAAY,MAAM,QAAQ,IAAI,MAAM,KAAKA,EAAM,GAAG,CAAC,EAAG,iBAAiB,GAAG,CAAC,EACxE,IAAI,MAAMN,IACR,CAAE,KAAMA,EAAO,YAAc,IAAK,MAAMD,EAAiBC,CAAM,CAAE,EACpE,CACF,CACF,EAAE,CAAC,CACP",
|
|
6
|
+
"names": ["index_exports", "__export", "fetchStatusCodes", "__toCommonJS", "import_jsdom", "resolveRedirects", "html", "table", "rows", "getReferenceLink", "anchor", "response", "url", "pattern", "section", "row", "cells"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fetch-status-codes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fetch the HTTP status codes from the IANA registry.",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/jbenner-radham/node-fetch-status-codes#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/jbenner-radham/node-fetch-status-codes/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/jbenner-radham/node-fetch-status-codes.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": "James Benner <hello@jamesbenner.com> (https://www.jamesbenner.com/)",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"type": "commonjs",
|
|
18
|
+
"exports": "./index.js",
|
|
19
|
+
"types": "../types/index.d.ts",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"jsdom": "^27.2.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@eslint/compat": "^2.0.0",
|
|
25
|
+
"@eslint/json": "^0.14.0",
|
|
26
|
+
"@radham/eslint-config": "^11.0.0",
|
|
27
|
+
"@types/jsdom": "^27.0.0",
|
|
28
|
+
"@types/node": "^22.18.8",
|
|
29
|
+
"@vitest/coverage-v8": "^4.0.14",
|
|
30
|
+
"duo-build": "^0.2.1",
|
|
31
|
+
"eslint": "^9.39.1",
|
|
32
|
+
"globals": "^16.5.0",
|
|
33
|
+
"husky": "^9.1.7",
|
|
34
|
+
"lint-staged": "^16.2.7",
|
|
35
|
+
"rimraf": "^6.1.2",
|
|
36
|
+
"sort-package-json": "^3.4.0",
|
|
37
|
+
"typescript": "^5.9.3",
|
|
38
|
+
"vitest": "^4.0.14"
|
|
39
|
+
},
|
|
40
|
+
"packageManager": "pnpm@10.23.0",
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{JSDOM as m}from"jsdom";async function u({resolveRedirects:o=!0}={}){let s=await(await fetch("https://www.iana.org/assignments/http-status-codes")).text(),a=new m(s).window.document.getElementById("table-http-status-codes-1"),c=Array.from(a.querySelectorAll("tbody > tr")),i=async e=>{if(!o)return e.href;let t=await fetch(e.href,{method:"HEAD",redirect:"manual"}),n=new URL(t.status===301?t.headers.get("Location"):e.href),l=/RFC\d+(?:, Section )?((?:\d+)?(?:.\d+){0,2})/,[,r]=l.exec(e.textContent)??[];return r&&(n.hash=`section-${r}`),n.toString()};return Promise.all(c.map(e=>Array.from(e.querySelectorAll("td"))).filter(e=>e.at(1).textContent!=="Unassigned").map(async e=>({value:Number.parseInt(e.at(0).textContent),description:e.at(1).textContent,references:await Promise.all(Array.from(e.at(2).querySelectorAll("a")).map(async t=>({name:t.textContent,url:await i(t)})))})))}export{u as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { JSDOM } from 'jsdom';\n\nexport type Reference = { name: string; url: string };\n\nexport type StatusCode = { value: number; description: string; references: Reference[] };\n\nexport default async function fetchStatusCodes({ resolveRedirects = true }: {\n resolveRedirects?: boolean;\n} = {}): Promise<StatusCode[]> {\n const url = 'https://www.iana.org/assignments/http-status-codes';\n const response = await fetch(url);\n const html = await response.text();\n const dom = new JSDOM(html);\n const table = dom.window.document.getElementById('table-http-status-codes-1')!;\n const rows = Array.from(table.querySelectorAll<HTMLTableRowElement>('tbody > tr'));\n const getReferenceLink = async (anchor: HTMLAnchorElement): Promise<string> => {\n if (!resolveRedirects) {\n return anchor.href;\n }\n\n // The IANA links are redirects, but we want direct links with a section hash if applicable.\n const response = await fetch(anchor.href, { method: 'HEAD', redirect: 'manual' });\n const url = new URL(response.status === 301 ? response.headers.get('Location')! : anchor.href);\n const pattern = /RFC\\d+(?:, Section )?((?:\\d+)?(?:.\\d+){0,2})/;\n const [, section] = pattern.exec(anchor.textContent) ?? [];\n\n if (section) {\n url.hash = `section-${section}`;\n }\n\n return url.toString();\n };\n\n return Promise.all(rows.map(row => Array.from(row.querySelectorAll('td')))\n .filter(cells => cells.at(1)!.textContent !== 'Unassigned')\n .map(async cells => ({\n value: Number.parseInt(cells.at(0)!.textContent),\n description: cells.at(1)!.textContent,\n references: await Promise.all(Array.from(cells.at(2)!.querySelectorAll('a'))\n .map(async anchor =>\n ({ name: anchor.textContent!, url: await getReferenceLink(anchor) })\n )\n )\n })));\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,SAAAA,MAAa,QAMtB,eAAOC,EAAwC,CAAE,iBAAAC,EAAmB,EAAK,EAErE,CAAC,EAA0B,CAG7B,IAAMC,EAAO,MADI,MAAM,MADX,oDACoB,GACJ,KAAK,EAE3BC,EADM,IAAIJ,EAAMG,CAAI,EACR,OAAO,SAAS,eAAe,2BAA2B,EACtEE,EAAO,MAAM,KAAKD,EAAM,iBAAsC,YAAY,CAAC,EAC3EE,EAAmB,MAAOC,GAA+C,CAC7E,GAAI,CAACL,EACH,OAAOK,EAAO,KAIhB,IAAMC,EAAW,MAAM,MAAMD,EAAO,KAAM,CAAE,OAAQ,OAAQ,SAAU,QAAS,CAAC,EAC1EE,EAAM,IAAI,IAAID,EAAS,SAAW,IAAMA,EAAS,QAAQ,IAAI,UAAU,EAAKD,EAAO,IAAI,EACvFG,EAAU,+CACV,CAAC,CAAEC,CAAO,EAAID,EAAQ,KAAKH,EAAO,WAAW,GAAK,CAAC,EAEzD,OAAII,IACFF,EAAI,KAAO,WAAWE,CAAO,IAGxBF,EAAI,SAAS,CACtB,EAEA,OAAO,QAAQ,IAAIJ,EAAK,IAAIO,GAAO,MAAM,KAAKA,EAAI,iBAAiB,IAAI,CAAC,CAAC,EACtE,OAAOC,GAASA,EAAM,GAAG,CAAC,EAAG,cAAgB,YAAY,EACzD,IAAI,MAAMA,IAAU,CACnB,MAAO,OAAO,SAASA,EAAM,GAAG,CAAC,EAAG,WAAW,EAC/C,YAAaA,EAAM,GAAG,CAAC,EAAG,YAC1B,WAAY,MAAM,QAAQ,IAAI,MAAM,KAAKA,EAAM,GAAG,CAAC,EAAG,iBAAiB,GAAG,CAAC,EACxE,IAAI,MAAMN,IACR,CAAE,KAAMA,EAAO,YAAc,IAAK,MAAMD,EAAiBC,CAAM,CAAE,EACpE,CACF,CACF,EAAE,CAAC,CACP",
|
|
6
|
+
"names": ["JSDOM", "fetchStatusCodes", "resolveRedirects", "html", "table", "rows", "getReferenceLink", "anchor", "response", "url", "pattern", "section", "row", "cells"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fetch-status-codes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fetch the HTTP status codes from the IANA registry.",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/jbenner-radham/node-fetch-status-codes#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/jbenner-radham/node-fetch-status-codes/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/jbenner-radham/node-fetch-status-codes.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": "James Benner <hello@jamesbenner.com> (https://www.jamesbenner.com/)",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": "./index.js",
|
|
19
|
+
"types": "../types/index.d.ts",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"jsdom": "^27.2.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@eslint/compat": "^2.0.0",
|
|
25
|
+
"@eslint/json": "^0.14.0",
|
|
26
|
+
"@radham/eslint-config": "^11.0.0",
|
|
27
|
+
"@types/jsdom": "^27.0.0",
|
|
28
|
+
"@types/node": "^22.18.8",
|
|
29
|
+
"@vitest/coverage-v8": "^4.0.14",
|
|
30
|
+
"duo-build": "^0.2.1",
|
|
31
|
+
"eslint": "^9.39.1",
|
|
32
|
+
"globals": "^16.5.0",
|
|
33
|
+
"husky": "^9.1.7",
|
|
34
|
+
"lint-staged": "^16.2.7",
|
|
35
|
+
"rimraf": "^6.1.2",
|
|
36
|
+
"sort-package-json": "^3.4.0",
|
|
37
|
+
"typescript": "^5.9.3",
|
|
38
|
+
"vitest": "^4.0.14"
|
|
39
|
+
},
|
|
40
|
+
"packageManager": "pnpm@10.23.0",
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type Reference = {
|
|
2
|
+
name: string;
|
|
3
|
+
url: string;
|
|
4
|
+
};
|
|
5
|
+
export type StatusCode = {
|
|
6
|
+
value: number;
|
|
7
|
+
description: string;
|
|
8
|
+
references: Reference[];
|
|
9
|
+
};
|
|
10
|
+
export default function fetchStatusCodes({ resolveRedirects }?: {
|
|
11
|
+
resolveRedirects?: boolean;
|
|
12
|
+
}): Promise<StatusCode[]>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC;AAEzF,wBAA8B,gBAAgB,CAAC,EAAE,gBAAuB,EAAE,GAAE;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAoC7B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fetch-status-codes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fetch the HTTP status codes from the IANA registry.",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/jbenner-radham/node-fetch-status-codes#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/jbenner-radham/node-fetch-status-codes/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/jbenner-radham/node-fetch-status-codes.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": "James Benner <hello@jamesbenner.com> (https://www.jamesbenner.com/)",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"default": "./dist/esm/index.js"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"default": "./dist/cjs/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"CHANGELOG.md"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"jsdom": "^27.2.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@eslint/compat": "^2.0.0",
|
|
37
|
+
"@eslint/json": "^0.14.0",
|
|
38
|
+
"@radham/eslint-config": "^11.0.0",
|
|
39
|
+
"@types/jsdom": "^27.0.0",
|
|
40
|
+
"@types/node": "^22.18.8",
|
|
41
|
+
"@vitest/coverage-v8": "^4.0.14",
|
|
42
|
+
"duo-build": "^0.2.1",
|
|
43
|
+
"eslint": "^9.39.1",
|
|
44
|
+
"globals": "^16.5.0",
|
|
45
|
+
"husky": "^9.1.7",
|
|
46
|
+
"lint-staged": "^16.2.7",
|
|
47
|
+
"rimraf": "^6.1.2",
|
|
48
|
+
"sort-package-json": "^3.4.0",
|
|
49
|
+
"typescript": "^5.9.3",
|
|
50
|
+
"vitest": "^4.0.14"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=22"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"prebuild": "rimraf ./dist",
|
|
57
|
+
"build": "duo-build --packages external --platform node",
|
|
58
|
+
"lint": "eslint .",
|
|
59
|
+
"lint:fix": "eslint --fix .",
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"test:coverage": "vitest run --coverage",
|
|
62
|
+
"test:log": "vitest run --silent passed-only",
|
|
63
|
+
"test:watch": "vitest"
|
|
64
|
+
}
|
|
65
|
+
}
|