노영우

add contact e-amil

Showing 1000 changed files with 126 additions and 3112 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 -config.json
...\ No newline at end of file ...\ No newline at end of file
1 +config.json
2 +node_modules/
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -69,7 +69,7 @@ exports.run = async (client, msg, args, prefix) => { ...@@ -69,7 +69,7 @@ exports.run = async (client, msg, args, prefix) => {
69 exports.config = { 69 exports.config = {
70 name: '도움말', 70 name: '도움말',
71 aliases: ['도움', '명령어', 'commands', 'help'], 71 aliases: ['도움', '명령어', 'commands', 'help'],
72 - category: ['example'], 72 + category: ['Help'],
73 des: ['봇에 대한 명령어 리스트들을 불러옵니다.'], 73 des: ['봇에 대한 명령어 리스트들을 불러옵니다.'],
74 use: ['!도움말 <명령어>'] 74 use: ['!도움말 <명령어>']
75 }; 75 };
...\ No newline at end of file ...\ No newline at end of file
......
1 const Tesseract = require("tesseract.js"); 1 const Tesseract = require("tesseract.js");
2 +const Discord = require("discord.js");
2 exports.run = async (client, msg, args, prefix) => { 3 exports.run = async (client, msg, args, prefix) => {
3 - // msg.channel.send(`${client.user.username}의 핑은 ${client.ws.ping}ms 입니다!`); 4 +
4 if (msg.attachments.size > 0) { 5 if (msg.attachments.size > 0) {
5 - msg.attachments.forEach(attachment => { 6 + if (args[0] == "한국어" || args[0] == "kor") {
6 - var ImgURL = attachment.proxyURL; 7 + msg.reply("인식중 ...");
7 - Tesseract.recognize( 8 + msg.attachments.forEach(attachment => {
8 - ImgURL, 9 + var ImgURL = attachment.proxyURL;
9 - "eng", 10 + Tesseract.recognize(
10 - { logger: (m) => console.log(m) } 11 + ImgURL,
11 - ).then(({ data: { text } }) => { 12 + "kor",
12 - // Replying with the extracted test 13 + { logger: (m) => console.log(m) }
13 - console.log(text); 14 + ).then(({ data: { text } }) => {
14 - msg.reply(text); 15 + // Replying with the extracted test
16 + console.log(text);
17 + let Commands = new Discord.MessageEmbed()
18 + .setTitle("한국어로 문자를 인식한 결과입니다.")
19 + .setColor("81ECEC")
20 + .setDescription(text);
21 +
22 + msg.reply({ embeds: [Commands] });
23 +
24 + });
25 + });
26 + }
27 + else if (args[0] == "영어" || args[0] == "eng" || !args[0]) {
28 + msg.reply("인식중 ...");
29 + msg.attachments.forEach(attachment => {
30 + var ImgURL = attachment.proxyURL;
31 + Tesseract.recognize(
32 + ImgURL,
33 + "eng",
34 + { logger: (m) => console.log(m) }
35 + ).then(({ data: { text } }) => {
36 + // Replying with the extracted test
37 + console.log(text);
38 + let Commands = new Discord.MessageEmbed()
39 + .setTitle("영어로 문자를 인식한 결과입니다.")
40 + .setColor("81ECEC")
41 + .setDescription(text);
42 +
43 + msg.reply({ embeds: [Commands] });
44 + });
15 }); 45 });
46 + }
47 + else if (args[0] == "일본어" || args[0] == "jpn") {
48 + msg.reply("인식중 ...");
49 + msg.attachments.forEach(attachment => {
50 + var ImgURL = attachment.proxyURL;
51 + Tesseract.recognize(
52 + ImgURL,
53 + "jpn",
54 + { logger: (m) => console.log(m) }
55 + ).then(({ data: { text } }) => {
56 + // Replying with the extracted test
57 + console.log(text);
58 + let Commands = new Discord.MessageEmbed()
59 + .setTitle("일본어로 문자를 인식한 결과입니다.")
60 + .setColor("81ECEC")
61 + .setDescription(text);
16 62
17 - }); 63 + msg.reply({ embeds: [Commands] });
64 + });
65 + });
66 + }
67 +
68 + else {
69 + msg.reply("언어가 제대로 입력되지 않았습니다.");
70 + }
71 +
72 +
73 + } else {
74 + msg.reply("이미지가 인식되지 않았습니다. 이미지를 첨부해주세요!");
18 } 75 }
19 }; 76 };
20 77
78 +
21 exports.config = { 79 exports.config = {
22 name: 'ocr', 80 name: 'ocr',
23 aliases: ['ㅐㅊㄱ'], 81 aliases: ['ㅐㅊㄱ'],
24 - category: ['ocr'], 82 + category: ['Ocr'],
25 des: ['이미지를 첨부하고 명령어를 입력하면, 이미지에 있는 텍스트를 추출합니다.'], 83 des: ['이미지를 첨부하고 명령어를 입력하면, 이미지에 있는 텍스트를 추출합니다.'],
26 use: ['!ocr <사용 언어>'] 84 use: ['!ocr <사용 언어>']
27 }; 85 };
...\ No newline at end of file ...\ No newline at end of file
......
This diff is collapsed. Click to expand it.
...@@ -21,6 +21,10 @@ exports.run = async (client, msg, args, prefix) => { ...@@ -21,6 +21,10 @@ exports.run = async (client, msg, args, prefix) => {
21 } 21 }
22 }; 22 };
23 23
24 +<<<<<<< HEAD
25 +=======
26 +
27 +>>>>>>> d5a6b9b3343c77c3e74f6ccaeaf88b75094c368c
24 function en_translate(distext){ 28 function en_translate(distext){
25 return translatte(String(distext), {to: 'en'}) 29 return translatte(String(distext), {to: 'en'})
26 .then(res => { 30 .then(res => {
......
1 # Emon_Bot 1 # Emon_Bot
2 +
3 +## About The Project
4 +
5 +* 각종 편의기능 통합 서비스를 제공하는 챗봇입니다.
6 +
7 +## Built With
8 +
9 +* [Node.js](https://nodejs.org/ko/)
10 +
11 +## Getting Started
12 +
13 +* [봇 초대 링크](https://discord.com/api/oauth2/authorize?client_id=974262592388337695&permissions=8&scope=bot)
14 +* aws EC2 사용해서 배포 예정
15 +
16 +## Usage
17 +
18 +* Command List
19 +**!도움말** - 봇에 대한 명령어 리스트들을 불러옵니다.
20 +**!도움말** <명령어> - <명령어>에 해당하는 명령어의 사용방법을 조회합니다.
21 +**!ocr** <사용 언어> - 이미지를 첨부하고 <사용 언어>를 입력하면, 이미지에 있는 텍스트를 추출합니다.
22 +**!문구** <채팅> - <채팅>에 대한 검색결과를 보여줍니다.
23 +**!번역** <채팅> - <채팅>에 대한 번역결과를 보여줍니다.
24 +**!나라** - 봇이 띄워주는 버튼을 눌러서 번역할 언어(나라)를 선택합니다.
25 +
26 +* 사용 예시 (추가 예정)
27 +
28 +## Contributing
29 +
30 +프로젝트에 기여하고 싶으신 분들은 아래 절차를 따라주시기 바랍니다.
31 +
32 +1. 프로젝트 fork
33 +2. feature branch 생성 (git checkout -b feature/name)
34 +3. commit (git commit -m "Add feature")
35 +4. push (git push origin feature/name)
36 +5. pull request 생성
37 +
38 +## License
39 +
40 +MIT 라이센스 아래 사용 가능합니다. LICENSE.txt를 통해 자세한 정보를 확인하세요.
41 +
42 +## Contact
43 +
44 +* 김연수: deathcat@khu.ac.kr
45 +* 노영우: dndn1544@khu.ac.kr
46 +* 박건희: wm5256@khu.ac.kr
47 +
48 +* Project Link: http://khuhub.khu.ac.kr/2017103984/emon_bot.git
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -11,7 +11,7 @@ client.once('ready', () => { ...@@ -11,7 +11,7 @@ client.once('ready', () => {
11 11
12 client.commands = new Discord.Collection(); 12 client.commands = new Discord.Collection();
13 client.aliases = new Discord.Collection(); 13 client.aliases = new Discord.Collection();
14 -client.category = ['example', 'stationery', 'translate', 'ocr']; 14 +client.category = ['Help', 'Stationery', 'Translate', 'Ocr'];
15 15
16 fs.readdirSync("./Commands/").forEach(dir => { 16 fs.readdirSync("./Commands/").forEach(dir => {
17 const Filter = fs.readdirSync(`./Commands/${dir}`).filter(f => f.endsWith(".js")); 17 const Filter = fs.readdirSync(`./Commands/${dir}`).filter(f => f.endsWith(".js"));
......
This file is too large to display.
This file is too large to display.
This diff is collapsed. Click to expand it.
1 -<div align="center">
2 - <br />
3 - <p>
4 - <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
5 - </p>
6 - <br />
7 - <p>
8 - <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
9 - <a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/v/@discordjs/builders.svg?maxAge=3600" alt="npm version" /></a>
10 - <a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/dt/@discordjs/builders.svg?maxAge=3600" alt="npm downloads" /></a>
11 - <a href="https://github.com/discordjs/builders/actions"><img src="https://github.com/discordjs/builders/workflows/Tests/badge.svg" alt="Build status" /></a>
12 - <a href="https://codecov.io/gh/discordjs/builders"><img src="https://codecov.io/gh/discordjs/builders/branch/main/graph/badge.svg" alt="Code coverage" /></a>
13 - </p>
14 -</div>
15 -
16 -## Installation
17 -
18 -**Node.js 16.6.0 or newer is required.**
19 -
20 -```sh-session
21 -npm install @discordjs/builders
22 -yarn add @discordjs/builders
23 -pnpm add @discordjs/builders
24 -```
25 -
26 -## Examples
27 -
28 -Here are some examples for the builders and utilities you can find in this package:
29 -
30 -- [Slash Command Builders](./docs/examples/Slash%20Command%20Builders.md)
31 -
32 -## Links
33 -
34 -- [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))
35 -- [Documentation](https://discord.js.org/#/docs/builders)
36 -- [Guide](https://discordjs.guide/) ([source](https://github.com/discordjs/guide))
37 - See also the [Update Guide](https://discordjs.guide/additional-info/changes-in-v13.html), including updated and removed items in the library.
38 -- [discord.js Discord server](https://discord.gg/djs)
39 -- [Discord API Discord server](https://discord.gg/discord-api)
40 -- [GitHub](https://github.com/discordjs/builders)
41 -- [npm](https://www.npmjs.com/package/@discordjs/builders)
42 -- [Related libraries](https://discord.com/developers/docs/topics/community-resources#libraries)
43 -
44 -## Contributing
45 -
46 -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
47 -[documentation](https://discord.js.org/#/docs/builders).
48 -See [the contribution guide](https://github.com/discordjs/builders/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
49 -
50 -## Help
51 -
52 -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle
53 -nudge in the right direction, please don't hesitate to join our official [discord.js Server](https://discord.gg/djs).
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -{
2 - "name": "@discordjs/builders",
3 - "version": "0.11.0",
4 - "description": "A set of builders that you can use when creating your bot",
5 - "scripts": {
6 - "pretest": "npm run build",
7 - "test": "jest --pass-with-no-tests",
8 - "test:ci": "jest --no-stack-trace --verbose --pass-with-no-tests",
9 - "prebuild": "npm run lint",
10 - "build": "tsup",
11 - "lint": "eslint src --ext mjs,js,ts",
12 - "lint:fix": "eslint src --ext mjs,js,ts --fix",
13 - "format": "prettier --write **/*.{ts,js,json,yml,yaml}",
14 - "prepare": "is-ci || husky install",
15 - "docs": "typedoc --json docs/typedoc-out.json src/index.ts && node scripts/docs.mjs",
16 - "prepublishOnly": "npm run lint && npm run test",
17 - "release": "standard-version --preset angular"
18 - },
19 - "main": "./dist/index.js",
20 - "module": "./dist/index.mjs",
21 - "typings": "./dist/index.d.ts",
22 - "exports": {
23 - "import": "./dist/index.mjs",
24 - "require": "./dist/index.js"
25 - },
26 - "directories": {
27 - "lib": "src",
28 - "test": "__tests__"
29 - },
30 - "files": [
31 - "dist"
32 - ],
33 - "contributors": [
34 - "Vlad Frangu <kingdgrizzle@gmail.com>",
35 - "Crawl <icrawltogo@gmail.com>",
36 - "Amish Shah <amishshah.2k@gmail.com>",
37 - "SpaceEEC <spaceeec@yahoo.com>"
38 - ],
39 - "license": "Apache-2.0",
40 - "keywords": [
41 - "discord",
42 - "api",
43 - "bot",
44 - "client",
45 - "node",
46 - "discordapp",
47 - "discordjs"
48 - ],
49 - "repository": {
50 - "type": "git",
51 - "url": "https://github.com/discordjs/builders.git"
52 - },
53 - "bugs": {
54 - "url": "https://github.com/discordjs/builders/issues"
55 - },
56 - "homepage": "https://github.com/discordjs/builders",
57 - "dependencies": {
58 - "@sindresorhus/is": "^4.2.0",
59 - "discord-api-types": "^0.26.0",
60 - "ts-mixer": "^6.0.0",
61 - "tslib": "^2.3.1",
62 - "zod": "^3.11.6"
63 - },
64 - "devDependencies": {
65 - "@babel/core": "^7.16.5",
66 - "@babel/plugin-proposal-decorators": "^7.16.5",
67 - "@babel/preset-env": "^7.16.5",
68 - "@babel/preset-typescript": "^7.16.5",
69 - "@commitlint/cli": "^15.0.0",
70 - "@commitlint/config-angular": "^15.0.0",
71 - "@discordjs/ts-docgen": "^0.3.4",
72 - "@types/jest": "^27.0.3",
73 - "@types/node": "^16.11.6",
74 - "@typescript-eslint/eslint-plugin": "^5.8.0",
75 - "@typescript-eslint/parser": "^5.8.0",
76 - "babel-plugin-transform-typescript-metadata": "^0.3.2",
77 - "eslint": "^8.5.0",
78 - "eslint-config-marine": "^9.1.0",
79 - "eslint-config-prettier": "^8.3.0",
80 - "eslint-plugin-prettier": "^4.0.0",
81 - "husky": "^7.0.4",
82 - "is-ci": "^3.0.1",
83 - "jest": "^27.4.5",
84 - "lint-staged": "^12.1.4",
85 - "prettier": "^2.5.1",
86 - "standard-version": "^9.3.2",
87 - "tsup": "^5.11.8",
88 - "typedoc": "^0.22.10",
89 - "typescript": "^4.5.4"
90 - },
91 - "engines": {
92 - "node": ">=16.0.0",
93 - "npm": ">=7.0.0"
94 - },
95 - "publishConfig": {
96 - "access": "public"
97 - }
98 -}
This diff is collapsed. Click to expand it.
1 -<div align="center">
2 - <br />
3 - <p>
4 - <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
5 - </p>
6 - <br />
7 - <p>
8 - <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
9 - <a href="https://www.npmjs.com/package/@discordjs/collection"><img src="https://img.shields.io/npm/v/@discordjs/collection.svg?maxAge=3600" alt="npm version" /></a>
10 - <a href="https://www.npmjs.com/package/@discordjs/collection"><img src="https://img.shields.io/npm/dt/@discordjs/collection.svg?maxAge=3600" alt="npm downloads" /></a>
11 - <a href="https://github.com/discordjs/collection/actions"><img src="https://github.com/discordjs/collection/workflows/Tests/badge.svg" alt="Build status" /></a>
12 - </p>
13 -</div>
14 -
15 -## About
16 -
17 -`@discordjs/collection` is a powerful utility data structure used in discord.js.
18 -
19 -## Installation
20 -
21 -**Node.js 16.0.0 or newer is required.**
22 -
23 -```sh-session
24 -npm install @discordjs/collection
25 -yarn add @discordjs/collection
26 -pnpm add @discordjs/collection
27 -```
28 -
29 -## Links
30 -
31 -- [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))
32 -- [Documentation](https://discord.js.org/#/docs/collection)
33 -- [discord.js Discord server](https://discord.gg/djs)
34 -- [GitHub](https://github.com/discordjs/collection)
35 -- [npm](https://www.npmjs.com/package/@discordjs/collection)
36 -
37 -## Contributing
38 -
39 -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
40 -[documentation](https://discord.js.org/#/docs/collection).
41 -See [the contribution guide](https://github.com/discordjs/collection/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
42 -
43 -## Help
44 -
45 -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle
46 -nudge in the right direction, please don't hesitate to join our official [discord.js Server](https://discord.gg/djs).
This diff is collapsed. Click to expand it.
1 -var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var b=(l,e,i)=>e in l?s(l,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[e]=i;var V=l=>s(l,"__esModule",{value:!0}),h=(l,e)=>s(l,"name",{value:e,configurable:!0});var d=(l,e)=>{for(var i in e)s(l,i,{get:e[i],enumerable:!0})},y=(l,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of K(e))!p.call(l,n)&&(i||n!=="default")&&s(l,n,{get:()=>e[n],enumerable:!(t=f(e,n))||t.enumerable});return l};var v=(l=>(e,i)=>l&&l.get(e)||(i=y(V({}),e,1),l&&l.set(e,i),i))(typeof WeakMap!="undefined"?new WeakMap:0);var a=(l,e,i)=>(b(l,typeof e!="symbol"?e+"":e,i),i);var T={};d(T,{Collection:()=>c,default:()=>k});var r=class extends Map{ensure(e,i){if(this.has(e))return this.get(e);let t=i(e,this);return this.set(e,t),t}hasAll(...e){return e.every(i=>super.has(i))}hasAny(...e){return e.some(i=>super.has(i))}first(e){if(typeof e=="undefined")return this.values().next().value;if(e<0)return this.last(e*-1);e=Math.min(this.size,e);let i=this.values();return Array.from({length:e},()=>i.next().value)}firstKey(e){if(typeof e=="undefined")return this.keys().next().value;if(e<0)return this.lastKey(e*-1);e=Math.min(this.size,e);let i=this.keys();return Array.from({length:e},()=>i.next().value)}last(e){let i=[...this.values()];return typeof e=="undefined"?i[i.length-1]:e<0?this.first(e*-1):e?i.slice(-e):[]}lastKey(e){let i=[...this.keys()];return typeof e=="undefined"?i[i.length-1]:e<0?this.firstKey(e*-1):e?i.slice(-e):[]}at(e){return e=Math.floor(e),[...this.values()].at(e)}keyAt(e){return e=Math.floor(e),[...this.keys()].at(e)}random(e){let i=[...this.values()];return typeof e=="undefined"?i[Math.floor(Math.random()*i.length)]:!i.length||!e?[]:Array.from({length:Math.min(e,i.length)},()=>i.splice(Math.floor(Math.random()*i.length),1)[0])}randomKey(e){let i=[...this.keys()];return typeof e=="undefined"?i[Math.floor(Math.random()*i.length)]:!i.length||!e?[]:Array.from({length:Math.min(e,i.length)},()=>i.splice(Math.floor(Math.random()*i.length),1)[0])}reverse(){let e=[...this.entries()].reverse();this.clear();for(let[i,t]of e)this.set(i,t);return this}find(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(e(n,t,this))return n}findKey(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(e(n,t,this))return t}sweep(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=this.size;for(let[n,o]of this)e(o,n,this)&&this.delete(n);return t-this.size}filter(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=new this.constructor[Symbol.species];for(let[n,o]of this)e(o,n,this)&&t.set(n,o);return t}partition(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=[new this.constructor[Symbol.species],new this.constructor[Symbol.species]];for(let[n,o]of this)e(o,n,this)?t[0].set(n,o):t[1].set(n,o);return t}flatMap(e,i){let t=this.map(e,i);return new this.constructor[Symbol.species]().concat(...t)}map(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=this.entries();return Array.from({length:this.size},()=>{let[n,o]=t.next().value;return e(o,n,this)})}mapValues(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=new this.constructor[Symbol.species];for(let[n,o]of this)t.set(n,e(o,n,this));return t}some(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(e(n,t,this))return!0;return!1}every(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(!e(n,t,this))return!1;return!0}reduce(e,i){let t;if(typeof i!="undefined"){t=i;for(let[o,u]of this)t=e(t,u,o,this);return t}let n=!0;for(let[o,u]of this){if(n){t=u,n=!1;continue}t=e(t,u,o,this)}if(n)throw new TypeError("Reduce of empty collection with no initial value");return t}each(e,i){return this.forEach(e,i),this}tap(e,i){return typeof i!="undefined"&&(e=e.bind(i)),e(this),this}clone(){return new this.constructor[Symbol.species](this)}concat(...e){let i=this.clone();for(let t of e)for(let[n,o]of t)i.set(n,o);return i}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(let[i,t]of this)if(!e.has(i)||t!==e.get(i))return!1;return!0}sort(e=r.defaultSort){let i=[...this.entries()];i.sort((t,n)=>e(t[1],n[1],t[0],n[0])),super.clear();for(let[t,n]of i)super.set(t,n);return this}intersect(e){let i=new this.constructor[Symbol.species];for(let[t,n]of e)this.has(t)&&i.set(t,n);return i}difference(e){let i=new this.constructor[Symbol.species];for(let[t,n]of e)this.has(t)||i.set(t,n);for(let[t,n]of this)e.has(t)||i.set(t,n);return i}sorted(e=r.defaultSort){return new this.constructor[Symbol.species](this).sort((i,t,n,o)=>e(i,t,n,o))}toJSON(){return[...this.values()]}static defaultSort(e,i){return Number(e>i)||Number(e===i)-1}},c=r;h(c,"Collection"),a(c,"default",r);var k=c;module.exports=v(T);0&&(module.exports={Collection});
2 -//# sourceMappingURL=index.js.map
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 -var u=Object.defineProperty;var f=(o,e,i)=>e in o?u(o,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[e]=i;var h=(o,e)=>u(o,"name",{value:e,configurable:!0});var a=(o,e,i)=>(f(o,typeof e!="symbol"?e+"":e,i),i);var s=class extends Map{ensure(e,i){if(this.has(e))return this.get(e);let t=i(e,this);return this.set(e,t),t}hasAll(...e){return e.every(i=>super.has(i))}hasAny(...e){return e.some(i=>super.has(i))}first(e){if(typeof e=="undefined")return this.values().next().value;if(e<0)return this.last(e*-1);e=Math.min(this.size,e);let i=this.values();return Array.from({length:e},()=>i.next().value)}firstKey(e){if(typeof e=="undefined")return this.keys().next().value;if(e<0)return this.lastKey(e*-1);e=Math.min(this.size,e);let i=this.keys();return Array.from({length:e},()=>i.next().value)}last(e){let i=[...this.values()];return typeof e=="undefined"?i[i.length-1]:e<0?this.first(e*-1):e?i.slice(-e):[]}lastKey(e){let i=[...this.keys()];return typeof e=="undefined"?i[i.length-1]:e<0?this.firstKey(e*-1):e?i.slice(-e):[]}at(e){return e=Math.floor(e),[...this.values()].at(e)}keyAt(e){return e=Math.floor(e),[...this.keys()].at(e)}random(e){let i=[...this.values()];return typeof e=="undefined"?i[Math.floor(Math.random()*i.length)]:!i.length||!e?[]:Array.from({length:Math.min(e,i.length)},()=>i.splice(Math.floor(Math.random()*i.length),1)[0])}randomKey(e){let i=[...this.keys()];return typeof e=="undefined"?i[Math.floor(Math.random()*i.length)]:!i.length||!e?[]:Array.from({length:Math.min(e,i.length)},()=>i.splice(Math.floor(Math.random()*i.length),1)[0])}reverse(){let e=[...this.entries()].reverse();this.clear();for(let[i,t]of e)this.set(i,t);return this}find(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(e(n,t,this))return n}findKey(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(e(n,t,this))return t}sweep(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=this.size;for(let[n,l]of this)e(l,n,this)&&this.delete(n);return t-this.size}filter(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=new this.constructor[Symbol.species];for(let[n,l]of this)e(l,n,this)&&t.set(n,l);return t}partition(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=[new this.constructor[Symbol.species],new this.constructor[Symbol.species]];for(let[n,l]of this)e(l,n,this)?t[0].set(n,l):t[1].set(n,l);return t}flatMap(e,i){let t=this.map(e,i);return new this.constructor[Symbol.species]().concat(...t)}map(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=this.entries();return Array.from({length:this.size},()=>{let[n,l]=t.next().value;return e(l,n,this)})}mapValues(e,i){typeof i!="undefined"&&(e=e.bind(i));let t=new this.constructor[Symbol.species];for(let[n,l]of this)t.set(n,e(l,n,this));return t}some(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(e(n,t,this))return!0;return!1}every(e,i){typeof i!="undefined"&&(e=e.bind(i));for(let[t,n]of this)if(!e(n,t,this))return!1;return!0}reduce(e,i){let t;if(typeof i!="undefined"){t=i;for(let[l,c]of this)t=e(t,c,l,this);return t}let n=!0;for(let[l,c]of this){if(n){t=c,n=!1;continue}t=e(t,c,l,this)}if(n)throw new TypeError("Reduce of empty collection with no initial value");return t}each(e,i){return this.forEach(e,i),this}tap(e,i){return typeof i!="undefined"&&(e=e.bind(i)),e(this),this}clone(){return new this.constructor[Symbol.species](this)}concat(...e){let i=this.clone();for(let t of e)for(let[n,l]of t)i.set(n,l);return i}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(let[i,t]of this)if(!e.has(i)||t!==e.get(i))return!1;return!0}sort(e=s.defaultSort){let i=[...this.entries()];i.sort((t,n)=>e(t[1],n[1],t[0],n[0])),super.clear();for(let[t,n]of i)super.set(t,n);return this}intersect(e){let i=new this.constructor[Symbol.species];for(let[t,n]of e)this.has(t)&&i.set(t,n);return i}difference(e){let i=new this.constructor[Symbol.species];for(let[t,n]of e)this.has(t)||i.set(t,n);for(let[t,n]of this)e.has(t)||i.set(t,n);return i}sorted(e=s.defaultSort){return new this.constructor[Symbol.species](this).sort((i,t,n,l)=>e(i,t,n,l))}toJSON(){return[...this.values()]}static defaultSort(e,i){return Number(e>i)||Number(e===i)-1}},r=s;h(r,"Collection"),a(r,"default",s);var V=r;export{r as Collection,V as default};
2 -//# sourceMappingURL=index.mjs.map
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 -{
2 - "name": "@discordjs/collection",
3 - "version": "0.4.0",
4 - "description": "Utility data structure used in Discord.js",
5 - "scripts": {
6 - "pretest": "npm run build",
7 - "test": "jest --pass-with-no-tests",
8 - "test:ci": "jest --no-stack-trace --verbose --pass-with-no-tests",
9 - "prebuild": "npm run lint",
10 - "build": "tsup",
11 - "lint": "eslint src --ext mjs,js,ts",
12 - "lint:fix": "eslint src --ext mjs,js,ts --fix",
13 - "format": "prettier --write **/*.{ts,js,json,yml,yaml}",
14 - "prepare": "is-ci || husky install",
15 - "docs": "typedoc --json docs/typedoc-out.json src/index.ts && node scripts/docs.mjs",
16 - "prepublishOnly": "npm run lint && npm run test",
17 - "release": "standard-version --preset angular"
18 - },
19 - "main": "./dist/index.js",
20 - "module": "./dist/index.mjs",
21 - "typings": "./dist/index.d.ts",
22 - "exports": {
23 - "import": "./dist/index.mjs",
24 - "require": "./dist/index.js"
25 - },
26 - "directories": {
27 - "lib": "src",
28 - "test": "__tests__"
29 - },
30 - "files": [
31 - "dist"
32 - ],
33 - "contributors": [
34 - "Crawl <icrawltogo@gmail.com>",
35 - "Amish Shah <amishshah.2k@gmail.com>",
36 - "SpaceEEC <spaceeec@yahoo.com>",
37 - "Vlad Frangu <kingdgrizzle@gmail.com>"
38 - ],
39 - "license": "Apache-2.0",
40 - "keywords": [
41 - "map",
42 - "collection",
43 - "utility"
44 - ],
45 - "repository": {
46 - "type": "git",
47 - "url": "git+https://github.com/discordjs/collection.git"
48 - },
49 - "bugs": {
50 - "url": "https://github.com/discordjs/collection/issues"
51 - },
52 - "homepage": "https://github.com/discordjs/collection",
53 - "devDependencies": {
54 - "@babel/core": "^7.16.5",
55 - "@babel/preset-env": "^7.16.5",
56 - "@babel/preset-typescript": "^7.16.5",
57 - "@commitlint/cli": "^15.0.0",
58 - "@commitlint/config-angular": "^15.0.0",
59 - "@discordjs/ts-docgen": "^0.3.4",
60 - "@types/jest": "^27.0.3",
61 - "@types/node": "^16.11.6",
62 - "@typescript-eslint/eslint-plugin": "^5.8.0",
63 - "@typescript-eslint/parser": "^5.8.0",
64 - "eslint": "^8.5.0",
65 - "eslint-config-marine": "^9.1.0",
66 - "eslint-config-prettier": "^8.3.0",
67 - "eslint-plugin-prettier": "^4.0.0",
68 - "husky": "^7.0.4",
69 - "is-ci": "^3.0.1",
70 - "jest": "^27.4.5",
71 - "lint-staged": "^12.1.4",
72 - "prettier": "^2.5.1",
73 - "standard-version": "^9.3.2",
74 - "tsup": "^5.11.8",
75 - "typedoc": "^0.22.10",
76 - "typescript": "^4.5.4"
77 - },
78 - "engines": {
79 - "node": ">=16.0.0",
80 - "npm": ">=7.0.0"
81 - },
82 - "publishConfig": {
83 - "access": "public"
84 - }
85 -}
1 -# The MIT License (MIT)
2 -
3 -Copyright © `2020` `The Sapphire Community and its contributors`
4 -
5 -Permission is hereby granted, free of charge, to any person
6 -obtaining a copy of this software and associated documentation
7 -files (the “Software”), to deal in the Software without
8 -restriction, including without limitation the rights to use,
9 -copy, modify, merge, publish, distribute, sublicense, and/or sell
10 -copies of the Software, and to permit persons to whom the
11 -Software is furnished to do so, subject to the following
12 -conditions:
13 -
14 -The above copyright notice and this permission notice shall be
15 -included in all copies or substantial portions of the Software.
16 -
17 -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
18 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 -OTHER DEALINGS IN THE SOFTWARE.
This diff is collapsed. Click to expand it.
1 -export * from './lib/AsyncQueue';
2 -//# sourceMappingURL=index.d.ts.map
...\ No newline at end of file ...\ No newline at end of file
1 -var SapphireAsyncQueue = (() => {
2 - var __defProp = Object.defineProperty;
3 - var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4 - var __getOwnPropNames = Object.getOwnPropertyNames;
5 - var __hasOwnProp = Object.prototype.hasOwnProperty;
6 - var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7 - var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8 - var __export = (target, all) => {
9 - for (var name in all)
10 - __defProp(target, name, { get: all[name], enumerable: true });
11 - };
12 - var __copyProps = (to, from, except, desc) => {
13 - if (from && typeof from === "object" || typeof from === "function") {
14 - for (let key of __getOwnPropNames(from))
15 - if (!__hasOwnProp.call(to, key) && key !== except)
16 - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17 - }
18 - return to;
19 - };
20 - var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21 - var __publicField = (obj, key, value) => {
22 - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
23 - return value;
24 - };
25 -
26 - // src/index.ts
27 - var src_exports = {};
28 - __export(src_exports, {
29 - AsyncQueue: () => AsyncQueue
30 - });
31 -
32 - // src/lib/AsyncQueue.ts
33 - var AsyncQueue = class {
34 - constructor() {
35 - __publicField(this, "promises", []);
36 - }
37 - get remaining() {
38 - return this.promises.length;
39 - }
40 - wait() {
41 - const next = this.promises.length ? this.promises[this.promises.length - 1].promise : Promise.resolve();
42 - let resolve;
43 - const promise = new Promise((res) => {
44 - resolve = res;
45 - });
46 - this.promises.push({
47 - resolve,
48 - promise
49 - });
50 - return next;
51 - }
52 - shift() {
53 - const deferred = this.promises.shift();
54 - if (typeof deferred !== "undefined")
55 - deferred.resolve();
56 - }
57 - };
58 - return __toCommonJS(src_exports);
59 -})();
60 -//# sourceMappingURL=index.global.js.map
...\ No newline at end of file ...\ No newline at end of file
1 -{"version":3,"sources":["../src/index.ts","../src/lib/AsyncQueue.ts"],"sourcesContent":["export * from './lib/AsyncQueue';\n","/**\n * The AsyncQueue class used to sequentialize burst requests\n */\nexport class AsyncQueue {\n\t/**\n\t * The remaining amount of queued promises\n\t */\n\tpublic get remaining(): number {\n\t\treturn this.promises.length;\n\t}\n\n\t/**\n\t * The promises array\n\t */\n\tprivate promises: InternalAsyncQueueDeferredPromise[] = [];\n\n\t/**\n\t * Waits for last promise and queues a new one\n\t * @example\n\t * ```typescript\n\t * const queue = new AsyncQueue();\n\t * async function request(url, options) {\n\t * await queue.wait();\n\t * try {\n\t * const result = await fetch(url, options);\n\t * // Do some operations with 'result'\n\t * } finally {\n\t * // Remove first entry from the queue and resolve for the next entry\n\t * queue.shift();\n\t * }\n\t * }\n\t *\n\t * request(someUrl1, someOptions1); // Will call fetch() immediately\n\t * request(someUrl2, someOptions2); // Will call fetch() after the first finished\n\t * request(someUrl3, someOptions3); // Will call fetch() after the second finished\n\t * ```\n\t */\n\tpublic wait(): Promise<void> {\n\t\tconst next = this.promises.length ? this.promises[this.promises.length - 1].promise : Promise.resolve();\n\t\tlet resolve: () => void;\n\t\tconst promise = new Promise<void>((res) => {\n\t\t\tresolve = res;\n\t\t});\n\n\t\tthis.promises.push({\n\t\t\tresolve: resolve!,\n\t\t\tpromise\n\t\t});\n\n\t\treturn next;\n\t}\n\n\t/**\n\t * Frees the queue's lock for the next item to process\n\t */\n\tpublic shift(): void {\n\t\tconst deferred = this.promises.shift();\n\t\tif (typeof deferred !== 'undefined') deferred.resolve();\n\t}\n}\n\n/**\n * @internal\n */\ninterface InternalAsyncQueueDeferredPromise {\n\tresolve(): void;\n\tpromise: Promise<void>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACGO,yBAAiB;AAAA,IAAjB;AAWE,sCAAgD,CAAC;AAAA;AAAA,QAP9C,YAAoB;AAC9B,aAAO,KAAK,SAAS;AAAA,IACtB;AAAA,IA4BO,OAAsB;AAC5B,YAAM,OAAO,KAAK,SAAS,SAAS,KAAK,SAAS,KAAK,SAAS,SAAS,GAAG,UAAU,QAAQ,QAAQ;AACtG,UAAI;AACJ,YAAM,UAAU,IAAI,QAAc,CAAC,QAAQ;AAC1C,kBAAU;AAAA,MACX,CAAC;AAED,WAAK,SAAS,KAAK;AAAA,QAClB;AAAA,QACA;AAAA,MACD,CAAC;AAED,aAAO;AAAA,IACR;AAAA,IAKO,QAAc;AACpB,YAAM,WAAW,KAAK,SAAS,MAAM;AACrC,UAAI,OAAO,aAAa;AAAa,iBAAS,QAAQ;AAAA,IACvD;AAAA,EACD;AAxDO","names":[]}
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -var __defProp = Object.defineProperty;
3 -var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4 -var __getOwnPropNames = Object.getOwnPropertyNames;
5 -var __hasOwnProp = Object.prototype.hasOwnProperty;
6 -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7 -var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8 -var __export = (target, all) => {
9 - for (var name in all)
10 - __defProp(target, name, { get: all[name], enumerable: true });
11 -};
12 -var __copyProps = (to, from, except, desc) => {
13 - if (from && typeof from === "object" || typeof from === "function") {
14 - for (let key of __getOwnPropNames(from))
15 - if (!__hasOwnProp.call(to, key) && key !== except)
16 - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17 - }
18 - return to;
19 -};
20 -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21 -var __publicField = (obj, key, value) => {
22 - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
23 - return value;
24 -};
25 -
26 -// src/index.ts
27 -var src_exports = {};
28 -__export(src_exports, {
29 - AsyncQueue: () => AsyncQueue
30 -});
31 -module.exports = __toCommonJS(src_exports);
32 -
33 -// src/lib/AsyncQueue.ts
34 -var AsyncQueue = class {
35 - constructor() {
36 - __publicField(this, "promises", []);
37 - }
38 - get remaining() {
39 - return this.promises.length;
40 - }
41 - wait() {
42 - const next = this.promises.length ? this.promises[this.promises.length - 1].promise : Promise.resolve();
43 - let resolve;
44 - const promise = new Promise((res) => {
45 - resolve = res;
46 - });
47 - this.promises.push({
48 - resolve,
49 - promise
50 - });
51 - return next;
52 - }
53 - shift() {
54 - const deferred = this.promises.shift();
55 - if (typeof deferred !== "undefined")
56 - deferred.resolve();
57 - }
58 -};
59 -// Annotate the CommonJS export names for ESM import in node:
60 -0 && (module.exports = {
61 - AsyncQueue
62 -});
63 -//# sourceMappingURL=index.js.map
...\ No newline at end of file ...\ No newline at end of file
1 -{"version":3,"sources":["../src/index.ts","../src/lib/AsyncQueue.ts"],"sourcesContent":["export * from './lib/AsyncQueue';\n","/**\n * The AsyncQueue class used to sequentialize burst requests\n */\nexport class AsyncQueue {\n\t/**\n\t * The remaining amount of queued promises\n\t */\n\tpublic get remaining(): number {\n\t\treturn this.promises.length;\n\t}\n\n\t/**\n\t * The promises array\n\t */\n\tprivate promises: InternalAsyncQueueDeferredPromise[] = [];\n\n\t/**\n\t * Waits for last promise and queues a new one\n\t * @example\n\t * ```typescript\n\t * const queue = new AsyncQueue();\n\t * async function request(url, options) {\n\t * await queue.wait();\n\t * try {\n\t * const result = await fetch(url, options);\n\t * // Do some operations with 'result'\n\t * } finally {\n\t * // Remove first entry from the queue and resolve for the next entry\n\t * queue.shift();\n\t * }\n\t * }\n\t *\n\t * request(someUrl1, someOptions1); // Will call fetch() immediately\n\t * request(someUrl2, someOptions2); // Will call fetch() after the first finished\n\t * request(someUrl3, someOptions3); // Will call fetch() after the second finished\n\t * ```\n\t */\n\tpublic wait(): Promise<void> {\n\t\tconst next = this.promises.length ? this.promises[this.promises.length - 1].promise : Promise.resolve();\n\t\tlet resolve: () => void;\n\t\tconst promise = new Promise<void>((res) => {\n\t\t\tresolve = res;\n\t\t});\n\n\t\tthis.promises.push({\n\t\t\tresolve: resolve!,\n\t\t\tpromise\n\t\t});\n\n\t\treturn next;\n\t}\n\n\t/**\n\t * Frees the queue's lock for the next item to process\n\t */\n\tpublic shift(): void {\n\t\tconst deferred = this.promises.shift();\n\t\tif (typeof deferred !== 'undefined') deferred.resolve();\n\t}\n}\n\n/**\n * @internal\n */\ninterface InternalAsyncQueueDeferredPromise {\n\tresolve(): void;\n\tpromise: Promise<void>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,uBAAiB;AAAA,EAAjB;AAWE,oCAAgD,CAAC;AAAA;AAAA,MAP9C,YAAoB;AAC9B,WAAO,KAAK,SAAS;AAAA,EACtB;AAAA,EA4BO,OAAsB;AAC5B,UAAM,OAAO,KAAK,SAAS,SAAS,KAAK,SAAS,KAAK,SAAS,SAAS,GAAG,UAAU,QAAQ,QAAQ;AACtG,QAAI;AACJ,UAAM,UAAU,IAAI,QAAc,CAAC,QAAQ;AAC1C,gBAAU;AAAA,IACX,CAAC;AAED,SAAK,SAAS,KAAK;AAAA,MAClB;AAAA,MACA;AAAA,IACD,CAAC;AAED,WAAO;AAAA,EACR;AAAA,EAKO,QAAc;AACpB,UAAM,WAAW,KAAK,SAAS,MAAM;AACrC,QAAI,OAAO,aAAa;AAAa,eAAS,QAAQ;AAAA,EACvD;AACD;AAxDO","names":[]}
...\ No newline at end of file ...\ No newline at end of file
1 -var __defProp = Object.defineProperty;
2 -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3 -var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4 -var __publicField = (obj, key, value) => {
5 - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6 - return value;
7 -};
8 -
9 -// src/lib/AsyncQueue.ts
10 -var AsyncQueue = class {
11 - constructor() {
12 - __publicField(this, "promises", []);
13 - }
14 - get remaining() {
15 - return this.promises.length;
16 - }
17 - wait() {
18 - const next = this.promises.length ? this.promises[this.promises.length - 1].promise : Promise.resolve();
19 - let resolve;
20 - const promise = new Promise((res) => {
21 - resolve = res;
22 - });
23 - this.promises.push({
24 - resolve,
25 - promise
26 - });
27 - return next;
28 - }
29 - shift() {
30 - const deferred = this.promises.shift();
31 - if (typeof deferred !== "undefined")
32 - deferred.resolve();
33 - }
34 -};
35 -export {
36 - AsyncQueue
37 -};
38 -//# sourceMappingURL=index.mjs.map
...\ No newline at end of file ...\ No newline at end of file
1 -{"version":3,"sources":["../src/lib/AsyncQueue.ts"],"sourcesContent":["/**\n * The AsyncQueue class used to sequentialize burst requests\n */\nexport class AsyncQueue {\n\t/**\n\t * The remaining amount of queued promises\n\t */\n\tpublic get remaining(): number {\n\t\treturn this.promises.length;\n\t}\n\n\t/**\n\t * The promises array\n\t */\n\tprivate promises: InternalAsyncQueueDeferredPromise[] = [];\n\n\t/**\n\t * Waits for last promise and queues a new one\n\t * @example\n\t * ```typescript\n\t * const queue = new AsyncQueue();\n\t * async function request(url, options) {\n\t * await queue.wait();\n\t * try {\n\t * const result = await fetch(url, options);\n\t * // Do some operations with 'result'\n\t * } finally {\n\t * // Remove first entry from the queue and resolve for the next entry\n\t * queue.shift();\n\t * }\n\t * }\n\t *\n\t * request(someUrl1, someOptions1); // Will call fetch() immediately\n\t * request(someUrl2, someOptions2); // Will call fetch() after the first finished\n\t * request(someUrl3, someOptions3); // Will call fetch() after the second finished\n\t * ```\n\t */\n\tpublic wait(): Promise<void> {\n\t\tconst next = this.promises.length ? this.promises[this.promises.length - 1].promise : Promise.resolve();\n\t\tlet resolve: () => void;\n\t\tconst promise = new Promise<void>((res) => {\n\t\t\tresolve = res;\n\t\t});\n\n\t\tthis.promises.push({\n\t\t\tresolve: resolve!,\n\t\t\tpromise\n\t\t});\n\n\t\treturn next;\n\t}\n\n\t/**\n\t * Frees the queue's lock for the next item to process\n\t */\n\tpublic shift(): void {\n\t\tconst deferred = this.promises.shift();\n\t\tif (typeof deferred !== 'undefined') deferred.resolve();\n\t}\n}\n\n/**\n * @internal\n */\ninterface InternalAsyncQueueDeferredPromise {\n\tresolve(): void;\n\tpromise: Promise<void>;\n}\n"],"mappings":";;;;;;;;;AAGO,uBAAiB;AAAA,EAAjB;AAWE,oCAAgD,CAAC;AAAA;AAAA,MAP9C,YAAoB;AAC9B,WAAO,KAAK,SAAS;AAAA,EACtB;AAAA,EA4BO,OAAsB;AAC5B,UAAM,OAAO,KAAK,SAAS,SAAS,KAAK,SAAS,KAAK,SAAS,SAAS,GAAG,UAAU,QAAQ,QAAQ;AACtG,QAAI;AACJ,UAAM,UAAU,IAAI,QAAc,CAAC,QAAQ;AAC1C,gBAAU;AAAA,IACX,CAAC;AAED,SAAK,SAAS,KAAK;AAAA,MAClB;AAAA,MACA;AAAA,IACD,CAAC;AAED,WAAO;AAAA,EACR;AAAA,EAKO,QAAc;AACpB,UAAM,WAAW,KAAK,SAAS,MAAM;AACrC,QAAI,OAAO,aAAa;AAAa,eAAS,QAAQ;AAAA,EACvD;AACD;AAxDO","names":[]}
...\ No newline at end of file ...\ No newline at end of file
1 -/**
2 - * The AsyncQueue class used to sequentialize burst requests
3 - */
4 -export declare class AsyncQueue {
5 - /**
6 - * The remaining amount of queued promises
7 - */
8 - get remaining(): number;
9 - /**
10 - * The promises array
11 - */
12 - private promises;
13 - /**
14 - * Waits for last promise and queues a new one
15 - * @example
16 - * ```typescript
17 - * const queue = new AsyncQueue();
18 - * async function request(url, options) {
19 - * await queue.wait();
20 - * try {
21 - * const result = await fetch(url, options);
22 - * // Do some operations with 'result'
23 - * } finally {
24 - * // Remove first entry from the queue and resolve for the next entry
25 - * queue.shift();
26 - * }
27 - * }
28 - *
29 - * request(someUrl1, someOptions1); // Will call fetch() immediately
30 - * request(someUrl2, someOptions2); // Will call fetch() after the first finished
31 - * request(someUrl3, someOptions3); // Will call fetch() after the second finished
32 - * ```
33 - */
34 - wait(): Promise<void>;
35 - /**
36 - * Frees the queue's lock for the next item to process
37 - */
38 - shift(): void;
39 -}
40 -//# sourceMappingURL=AsyncQueue.d.ts.map
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "name": "@sapphire/async-queue",
3 - "version": "1.3.1",
4 - "description": "Sequential asynchronous lock-based queue for promises",
5 - "author": "@sapphire",
6 - "license": "MIT",
7 - "main": "dist/index.js",
8 - "module": "dist/index.mjs",
9 - "browser": "dist/index.global.js",
10 - "unpkg": "dist/index.global.js",
11 - "types": "dist/index.d.ts",
12 - "typedocMain": "src/index.ts",
13 - "exports": {
14 - "import": "./dist/index.mjs",
15 - "require": "./dist/index.js",
16 - "types": "./dist/index.d.ts"
17 - },
18 - "sideEffects": false,
19 - "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/async-queue",
20 - "scripts": {
21 - "test": "jest",
22 - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc",
23 - "build": "tsup && tsc -b src",
24 - "prepublishOnly": "yarn build"
25 - },
26 - "repository": {
27 - "type": "git",
28 - "url": "git+https://github.com/sapphiredev/utilities.git",
29 - "directory": "packages/async-queue"
30 - },
31 - "files": [
32 - "dist",
33 - "!dist/*.tsbuildinfo"
34 - ],
35 - "engines": {
36 - "node": ">=v14.0.0",
37 - "npm": ">=7.0.0"
38 - },
39 - "keywords": [
40 - "@sapphire/async-queue",
41 - "bot",
42 - "typescript",
43 - "ts",
44 - "yarn",
45 - "discord",
46 - "sapphire",
47 - "standalone"
48 - ],
49 - "bugs": {
50 - "url": "https://github.com/sapphiredev/utilities/issues"
51 - },
52 - "publishConfig": {
53 - "access": "public"
54 - },
55 - "gitHead": "bf5ac56e547bfdbfac38e020882004e0f136546e"
56 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -/**
2 -Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
3 -*/
4 -export declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
5 -/**
6 -Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
7 -*/
8 -export declare type Class<T = unknown, Arguments extends any[] = any[]> = new (...arguments_: Arguments) => T;
9 -/**
10 -Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
11 -*/
12 -export declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
13 -declare global {
14 - interface SymbolConstructor {
15 - readonly observable: symbol;
16 - }
17 -}
18 -/**
19 -Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
20 -*/
21 -export interface ObservableLike {
22 - subscribe(observer: (value: unknown) => void): void;
23 - [Symbol.observable](): ObservableLike;
24 -}
25 -export declare type Falsy = false | 0 | 0n | '' | null | undefined;
1 -"use strict";
2 -// Extracted from https://github.com/sindresorhus/type-fest/blob/78019f42ea888b0cdceb41a4a78163868de57555/index.d.ts
3 -Object.defineProperty(exports, "__esModule", { value: true });
1 -MIT License
2 -
3 -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 -
7 -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 -
9 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -{
2 - "name": "@sindresorhus/is",
3 - "version": "4.6.0",
4 - "description": "Type check values",
5 - "license": "MIT",
6 - "repository": "sindresorhus/is",
7 - "funding": "https://github.com/sindresorhus/is?sponsor=1",
8 - "author": {
9 - "name": "Sindre Sorhus",
10 - "email": "sindresorhus@gmail.com",
11 - "url": "https://sindresorhus.com"
12 - },
13 - "main": "dist/index.js",
14 - "engines": {
15 - "node": ">=10"
16 - },
17 - "scripts": {
18 - "build": "del dist && tsc",
19 - "test": "xo && ava",
20 - "prepare": "npm run build"
21 - },
22 - "files": [
23 - "dist"
24 - ],
25 - "keywords": [
26 - "type",
27 - "types",
28 - "is",
29 - "check",
30 - "checking",
31 - "validate",
32 - "validation",
33 - "utility",
34 - "util",
35 - "typeof",
36 - "instanceof",
37 - "object",
38 - "assert",
39 - "assertion",
40 - "test",
41 - "kind",
42 - "primitive",
43 - "verify",
44 - "compare",
45 - "typescript",
46 - "typeguards",
47 - "types"
48 - ],
49 - "devDependencies": {
50 - "@sindresorhus/tsconfig": "^0.7.0",
51 - "@types/jsdom": "^16.1.0",
52 - "@types/node": "^14.0.13",
53 - "@types/zen-observable": "^0.8.0",
54 - "@typescript-eslint/eslint-plugin": "^2.20.0",
55 - "@typescript-eslint/parser": "^2.20.0",
56 - "ava": "^3.3.0",
57 - "del-cli": "^2.0.0",
58 - "eslint-config-xo-typescript": "^0.26.0",
59 - "jsdom": "^16.0.1",
60 - "rxjs": "^6.4.0",
61 - "tempy": "^0.4.0",
62 - "ts-node": "^8.3.0",
63 - "typescript": "~3.8.2",
64 - "xo": "^0.26.1",
65 - "zen-observable": "^0.8.8"
66 - },
67 - "types": "dist/index.d.ts",
68 - "sideEffects": false,
69 - "ava": {
70 - "extensions": [
71 - "ts"
72 - ],
73 - "require": [
74 - "ts-node/register"
75 - ]
76 - },
77 - "xo": {
78 - "extends": "xo-typescript",
79 - "extensions": [
80 - "ts"
81 - ],
82 - "parserOptions": {
83 - "project": "./tsconfig.xo.json"
84 - },
85 - "globals": [
86 - "BigInt",
87 - "BigInt64Array",
88 - "BigUint64Array"
89 - ],
90 - "rules": {
91 - "@typescript-eslint/promise-function-async": "off",
92 - "@typescript-eslint/no-empty-function": "off",
93 - "@typescript-eslint/explicit-function-return-type": "off"
94 - }
95 - }
96 -}
This diff is collapsed. Click to expand it.
1 - MIT License
2 -
3 - Copyright (c) Microsoft Corporation.
4 -
5 - Permission is hereby granted, free of charge, to any person obtaining a copy
6 - of this software and associated documentation files (the "Software"), to deal
7 - in the Software without restriction, including without limitation the rights
8 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 - copies of the Software, and to permit persons to whom the Software is
10 - furnished to do so, subject to the following conditions:
11 -
12 - The above copyright notice and this permission notice shall be included in all
13 - copies or substantial portions of the Software.
14 -
15 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 - SOFTWARE
1 -# Installation
2 -> `npm install --save @types/node-fetch`
3 -
4 -# Summary
5 -This package contains type definitions for node-fetch (https://github.com/bitinn/node-fetch).
6 -
7 -# Details
8 -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch.
9 -
10 -### Additional Details
11 - * Last updated: Tue, 15 Feb 2022 20:01:33 GMT
12 - * Dependencies: [@types/form-data](https://npmjs.com/package/@types/form-data), [@types/node](https://npmjs.com/package/@types/node)
13 - * Global values: none
14 -
15 -# Credits
16 -These definitions were written by [Torsten Werner](https://github.com/torstenwerner), [Niklas Lindgren](https://github.com/nikcorg), [Vinay Bedre](https://github.com/vinaybedre), [Antonio Román](https://github.com/kyranet), [Andrew Leedham](https://github.com/AndrewLeedham), [Jason Li](https://github.com/JasonLi914), [Steve Faulkner](https://github.com/southpolesteve), [ExE Boss](https://github.com/ExE-Boss), [Alex Savin](https://github.com/alexandrusavin), [Alexis Tyler](https://github.com/OmgImAlexis), [Jakub Kisielewski](https://github.com/kbkk), and [David Glasser](https://github.com/glasser).
1 -// `AbortSignal` is defined here to prevent a dependency on a particular
2 -// implementation like the `abort-controller` package, and to avoid requiring
3 -// the `dom` library in `tsconfig.json`.
4 -
5 -export interface AbortSignal {
6 - aborted: boolean;
7 -
8 - addEventListener: (type: "abort", listener: ((this: AbortSignal, event: any) => any), options?: boolean | {
9 - capture?: boolean | undefined,
10 - once?: boolean | undefined,
11 - passive?: boolean | undefined
12 - }) => void;
13 -
14 - removeEventListener: (type: "abort", listener: ((this: AbortSignal, event: any) => any), options?: boolean | {
15 - capture?: boolean | undefined
16 - }) => void;
17 -
18 - dispatchEvent: (event: any) => boolean;
19 -
20 - onabort: null | ((this: AbortSignal, event: any) => void);
21 -}
1 -// Type definitions for node-fetch 2.6
2 -// Project: https://github.com/bitinn/node-fetch
3 -// Definitions by: Torsten Werner <https://github.com/torstenwerner>
4 -// Niklas Lindgren <https://github.com/nikcorg>
5 -// Vinay Bedre <https://github.com/vinaybedre>
6 -// Antonio Román <https://github.com/kyranet>
7 -// Andrew Leedham <https://github.com/AndrewLeedham>
8 -// Jason Li <https://github.com/JasonLi914>
9 -// Steve Faulkner <https://github.com/southpolesteve>
10 -// ExE Boss <https://github.com/ExE-Boss>
11 -// Alex Savin <https://github.com/alexandrusavin>
12 -// Alexis Tyler <https://github.com/OmgImAlexis>
13 -// Jakub Kisielewski <https://github.com/kbkk>
14 -// David Glasser <https://github.com/glasser>
15 -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
16 -
17 -/// <reference types="node" />
18 -
19 -import FormData = require('form-data');
20 -import { RequestOptions } from "http";
21 -import { URLSearchParams, URL } from "url";
22 -import { AbortSignal } from "./externals";
23 -
24 -export class Request extends Body {
25 - constructor(input: RequestInfo, init?: RequestInit);
26 - clone(): Request;
27 - context: RequestContext;
28 - headers: Headers;
29 - method: string;
30 - redirect: RequestRedirect;
31 - referrer: string;
32 - url: string;
33 -
34 - // node-fetch extensions to the whatwg/fetch spec
35 - agent?: RequestOptions['agent'] | ((parsedUrl: URL) => RequestOptions['agent']);
36 - compress: boolean;
37 - counter: number;
38 - follow: number;
39 - hostname: string;
40 - port?: number | undefined;
41 - protocol: string;
42 - size: number;
43 - timeout: number;
44 -}
45 -
46 -export interface RequestInit {
47 - // whatwg/fetch standard options
48 - body?: BodyInit | undefined;
49 - headers?: HeadersInit | undefined;
50 - method?: string | undefined;
51 - redirect?: RequestRedirect | undefined;
52 - signal?: AbortSignal | null | undefined;
53 -
54 - // node-fetch extensions
55 - agent?: RequestOptions['agent'] | ((parsedUrl: URL) => RequestOptions['agent']); // =null http.Agent instance, allows custom proxy, certificate etc.
56 - compress?: boolean | undefined; // =true support gzip/deflate content encoding. false to disable
57 - follow?: number | undefined; // =20 maximum redirect count. 0 to not follow redirect
58 - size?: number | undefined; // =0 maximum response body size in bytes. 0 to disable
59 - timeout?: number | undefined; // =0 req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies)
60 -
61 - // node-fetch does not support mode, cache or credentials options
62 -}
63 -
64 -export type RequestContext =
65 - "audio"
66 - | "beacon"
67 - | "cspreport"
68 - | "download"
69 - | "embed"
70 - | "eventsource"
71 - | "favicon"
72 - | "fetch"
73 - | "font"
74 - | "form"
75 - | "frame"
76 - | "hyperlink"
77 - | "iframe"
78 - | "image"
79 - | "imageset"
80 - | "import"
81 - | "internal"
82 - | "location"
83 - | "manifest"
84 - | "object"
85 - | "ping"
86 - | "plugin"
87 - | "prefetch"
88 - | "script"
89 - | "serviceworker"
90 - | "sharedworker"
91 - | "style"
92 - | "subresource"
93 - | "track"
94 - | "video"
95 - | "worker"
96 - | "xmlhttprequest"
97 - | "xslt";
98 -export type RequestMode = "cors" | "no-cors" | "same-origin";
99 -export type RequestRedirect = "error" | "follow" | "manual";
100 -export type RequestCredentials = "omit" | "include" | "same-origin";
101 -
102 -export type RequestCache =
103 - "default"
104 - | "force-cache"
105 - | "no-cache"
106 - | "no-store"
107 - | "only-if-cached"
108 - | "reload";
109 -
110 -export class Headers implements Iterable<[string, string]> {
111 - constructor(init?: HeadersInit);
112 - forEach(callback: (value: string, name: string) => void): void;
113 - append(name: string, value: string): void;
114 - delete(name: string): void;
115 - get(name: string): string | null;
116 - has(name: string): boolean;
117 - raw(): { [k: string]: string[] };
118 - set(name: string, value: string): void;
119 -
120 - // Iterable methods
121 - entries(): IterableIterator<[string, string]>;
122 - keys(): IterableIterator<string>;
123 - values(): IterableIterator<string>;
124 - [Symbol.iterator](): Iterator<[string, string]>;
125 -}
126 -
127 -type BlobPart = ArrayBuffer | ArrayBufferView | Blob | string;
128 -
129 -interface BlobOptions {
130 - type?: string | undefined;
131 - endings?: "transparent" | "native" | undefined;
132 -}
133 -
134 -export class Blob {
135 - constructor(blobParts?: BlobPart[], options?: BlobOptions);
136 - readonly type: string;
137 - readonly size: number;
138 - slice(start?: number, end?: number): Blob;
139 - text(): Promise<string>;
140 -}
141 -
142 -export class Body {
143 - constructor(body?: any, opts?: { size?: number | undefined; timeout?: number | undefined });
144 - arrayBuffer(): Promise<ArrayBuffer>;
145 - blob(): Promise<Blob>;
146 - body: NodeJS.ReadableStream;
147 - bodyUsed: boolean;
148 - buffer(): Promise<Buffer>;
149 - json(): Promise<any>;
150 - size: number;
151 - text(): Promise<string>;
152 - textConverted(): Promise<string>;
153 - timeout: number;
154 -}
155 -
156 -interface SystemError extends Error {
157 - code?: string | undefined;
158 -}
159 -
160 -export class FetchError extends Error {
161 - name: "FetchError";
162 - constructor(message: string, type: string, systemError?: SystemError);
163 - type: string;
164 - code?: string | undefined;
165 - errno?: string | undefined;
166 -}
167 -
168 -export class Response extends Body {
169 - constructor(body?: BodyInit, init?: ResponseInit);
170 - static error(): Response;
171 - static redirect(url: string, status: number): Response;
172 - clone(): Response;
173 - headers: Headers;
174 - ok: boolean;
175 - redirected: boolean;
176 - status: number;
177 - statusText: string;
178 - type: ResponseType;
179 - url: string;
180 -}
181 -
182 -export type ResponseType =
183 - "basic"
184 - | "cors"
185 - | "default"
186 - | "error"
187 - | "opaque"
188 - | "opaqueredirect";
189 -
190 -export interface ResponseInit {
191 - headers?: HeadersInit | undefined;
192 - size?: number | undefined;
193 - status?: number | undefined;
194 - statusText?: string | undefined;
195 - timeout?: number | undefined;
196 - url?: string | undefined;
197 -}
198 -
199 -interface URLLike {
200 - href: string;
201 -}
202 -
203 -export type HeadersInit = Headers | string[][] | { [key: string]: string };
204 -// HeaderInit is exported to support backwards compatibility. See PR #34382
205 -export type HeaderInit = HeadersInit;
206 -export type BodyInit =
207 - ArrayBuffer
208 - | ArrayBufferView
209 - | NodeJS.ReadableStream
210 - | string
211 - | URLSearchParams
212 - | FormData;
213 -export type RequestInfo = string | URLLike | Request;
214 -
215 -declare function fetch(
216 - url: RequestInfo,
217 - init?: RequestInit
218 -): Promise<Response>;
219 -
220 -declare namespace fetch {
221 - function isRedirect(code: number): boolean;
222 -}
223 -
224 -export default fetch;
1 -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
2 -
3 - Permission is hereby granted, free of charge, to any person obtaining a copy
4 - of this software and associated documentation files (the "Software"), to deal
5 - in the Software without restriction, including without limitation the rights
6 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 - copies of the Software, and to permit persons to whom the Software is
8 - furnished to do so, subject to the following conditions:
9 -
10 - The above copyright notice and this permission notice shall be included in
11 - all copies or substantial portions of the Software.
12 -
13 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 - THE SOFTWARE.
1 -// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
2 -// Leon Yu <https://github.com/leonyu>
3 -// BendingBender <https://github.com/BendingBender>
4 -// Maple Miao <https://github.com/mapleeit>
5 -
6 -/// <reference types="node" />
7 -import * as stream from 'stream';
8 -import * as http from 'http';
9 -
10 -export = FormData;
11 -
12 -// Extracted because @types/node doesn't export interfaces.
13 -interface ReadableOptions {
14 - highWaterMark?: number;
15 - encoding?: string;
16 - objectMode?: boolean;
17 - read?(this: stream.Readable, size: number): void;
18 - destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => void): void;
19 - autoDestroy?: boolean;
20 -}
21 -
22 -interface Options extends ReadableOptions {
23 - writable?: boolean;
24 - readable?: boolean;
25 - dataSize?: number;
26 - maxDataSize?: number;
27 - pauseStreams?: boolean;
28 -}
29 -
30 -declare class FormData extends stream.Readable {
31 - constructor(options?: Options);
32 - append(key: string, value: any, options?: FormData.AppendOptions | string): void;
33 - getHeaders(userHeaders?: FormData.Headers): FormData.Headers;
34 - submit(
35 - params: string | FormData.SubmitOptions,
36 - callback?: (error: Error | null, response: http.IncomingMessage) => void
37 - ): http.ClientRequest;
38 - getBuffer(): Buffer;
39 - setBoundary(boundary: string): void;
40 - getBoundary(): string;
41 - getLength(callback: (err: Error | null, length: number) => void): void;
42 - getLengthSync(): number;
43 - hasKnownLength(): boolean;
44 -}
45 -
46 -declare namespace FormData {
47 - interface Headers {
48 - [key: string]: any;
49 - }
50 -
51 - interface AppendOptions {
52 - header?: string | Headers;
53 - knownLength?: number;
54 - filename?: string;
55 - filepath?: string;
56 - contentType?: string;
57 - }
58 -
59 - interface SubmitOptions extends http.RequestOptions {
60 - protocol?: 'https:' | 'http:';
61 - }
62 -}
1 -/* eslint-env browser */
2 -module.exports = typeof self == 'object' ? self.FormData : window.FormData;
1 -// populates missing values
2 -module.exports = function(dst, src) {
3 -
4 - Object.keys(src).forEach(function(prop)
5 - {
6 - dst[prop] = dst[prop] || src[prop];
7 - });
8 -
9 - return dst;
10 -};
1 -{
2 - "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
3 - "name": "form-data",
4 - "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
5 - "version": "3.0.1",
6 - "repository": {
7 - "type": "git",
8 - "url": "git://github.com/form-data/form-data.git"
9 - },
10 - "main": "./lib/form_data",
11 - "browser": "./lib/browser",
12 - "typings": "./index.d.ts",
13 - "scripts": {
14 - "pretest": "rimraf coverage test/tmp",
15 - "test": "istanbul cover test/run.js",
16 - "posttest": "istanbul report lcov text",
17 - "lint": "eslint lib/*.js test/*.js test/integration/*.js",
18 - "report": "istanbul report lcov text",
19 - "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8",
20 - "ci-test": "npm run test && npm run browser && npm run report",
21 - "predebug": "rimraf coverage test/tmp",
22 - "debug": "verbose=1 ./test/run.js",
23 - "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
24 - "check": "istanbul check-coverage coverage/coverage*.json",
25 - "files": "pkgfiles --sort=name",
26 - "get-version": "node -e \"console.log(require('./package.json').version)\"",
27 - "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md",
28 - "restore-readme": "mv README.md.bak README.md",
29 - "prepublish": "in-publish && npm run update-readme || not-in-publish",
30 - "postpublish": "npm run restore-readme"
31 - },
32 - "pre-commit": [
33 - "lint",
34 - "ci-test",
35 - "check"
36 - ],
37 - "engines": {
38 - "node": ">= 6"
39 - },
40 - "dependencies": {
41 - "asynckit": "^0.4.0",
42 - "combined-stream": "^1.0.8",
43 - "mime-types": "^2.1.12"
44 - },
45 - "devDependencies": {
46 - "@types/node": "^12.0.10",
47 - "browserify": "^13.1.1",
48 - "browserify-istanbul": "^2.0.0",
49 - "coveralls": "^3.0.4",
50 - "cross-spawn": "^6.0.5",
51 - "eslint": "^6.0.1",
52 - "fake": "^0.2.2",
53 - "far": "^0.0.7",
54 - "formidable": "^1.0.17",
55 - "in-publish": "^2.0.0",
56 - "is-node-modern": "^1.0.0",
57 - "istanbul": "^0.4.5",
58 - "obake": "^0.1.2",
59 - "puppeteer": "^1.19.0",
60 - "pkgfiles": "^2.3.0",
61 - "pre-commit": "^1.1.3",
62 - "request": "^2.88.0",
63 - "rimraf": "^2.7.1",
64 - "tape": "^4.6.2",
65 - "typescript": "^3.5.2"
66 - },
67 - "license": "MIT"
68 -}
1 -{
2 - "name": "@types/node-fetch",
3 - "version": "2.6.1",
4 - "description": "TypeScript definitions for node-fetch",
5 - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch",
6 - "license": "MIT",
7 - "contributors": [
8 - {
9 - "name": "Torsten Werner",
10 - "url": "https://github.com/torstenwerner",
11 - "githubUsername": "torstenwerner"
12 - },
13 - {
14 - "name": "Niklas Lindgren",
15 - "url": "https://github.com/nikcorg",
16 - "githubUsername": "nikcorg"
17 - },
18 - {
19 - "name": "Vinay Bedre",
20 - "url": "https://github.com/vinaybedre",
21 - "githubUsername": "vinaybedre"
22 - },
23 - {
24 - "name": "Antonio Román",
25 - "url": "https://github.com/kyranet",
26 - "githubUsername": "kyranet"
27 - },
28 - {
29 - "name": "Andrew Leedham",
30 - "url": "https://github.com/AndrewLeedham",
31 - "githubUsername": "AndrewLeedham"
32 - },
33 - {
34 - "name": "Jason Li",
35 - "url": "https://github.com/JasonLi914",
36 - "githubUsername": "JasonLi914"
37 - },
38 - {
39 - "name": "Steve Faulkner",
40 - "url": "https://github.com/southpolesteve",
41 - "githubUsername": "southpolesteve"
42 - },
43 - {
44 - "name": "ExE Boss",
45 - "url": "https://github.com/ExE-Boss",
46 - "githubUsername": "ExE-Boss"
47 - },
48 - {
49 - "name": "Alex Savin",
50 - "url": "https://github.com/alexandrusavin",
51 - "githubUsername": "alexandrusavin"
52 - },
53 - {
54 - "name": "Alexis Tyler",
55 - "url": "https://github.com/OmgImAlexis",
56 - "githubUsername": "OmgImAlexis"
57 - },
58 - {
59 - "name": "Jakub Kisielewski",
60 - "url": "https://github.com/kbkk",
61 - "githubUsername": "kbkk"
62 - },
63 - {
64 - "name": "David Glasser",
65 - "url": "https://github.com/glasser",
66 - "githubUsername": "glasser"
67 - }
68 - ],
69 - "main": "",
70 - "types": "index.d.ts",
71 - "repository": {
72 - "type": "git",
73 - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
74 - "directory": "types/node-fetch"
75 - },
76 - "scripts": {},
77 - "dependencies": {
78 - "@types/node": "*",
79 - "form-data": "^3.0.0"
80 - },
81 - "typesPublisherContentHash": "c675d715eadc649103d0ecd377b5669dde03aa70390f1febf28750f5505e7b92",
82 - "typeScriptVersion": "3.8"
83 -}
...\ No newline at end of file ...\ No newline at end of file
1 - MIT License
2 -
3 - Copyright (c) Microsoft Corporation.
4 -
5 - Permission is hereby granted, free of charge, to any person obtaining a copy
6 - of this software and associated documentation files (the "Software"), to deal
7 - in the Software without restriction, including without limitation the rights
8 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 - copies of the Software, and to permit persons to whom the Software is
10 - furnished to do so, subject to the following conditions:
11 -
12 - The above copyright notice and this permission notice shall be included in all
13 - copies or substantial portions of the Software.
14 -
15 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 - SOFTWARE
1 -# Installation
2 -> `npm install --save @types/node`
3 -
4 -# Summary
5 -This package contains type definitions for Node.js (https://nodejs.org/).
6 -
7 -# Details
8 -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9 -
10 -### Additional Details
11 - * Last updated: Tue, 10 May 2022 21:31:42 GMT
12 - * Dependencies: none
13 - * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14 -
15 -# Credits
16 -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), and [wafuwafu13](https://github.com/wafuwafu13).
This diff is collapsed. Click to expand it.
1 -declare module 'assert/strict' {
2 - import { strict } from 'node:assert';
3 - export = strict;
4 -}
5 -declare module 'node:assert/strict' {
6 - import { strict } from 'node:assert';
7 - export = strict;
8 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2 -declare module 'constants' {
3 - import { constants as osConstants, SignalConstants } from 'node:os';
4 - import { constants as cryptoConstants } from 'node:crypto';
5 - import { constants as fsConstants } from 'node:fs';
6 -
7 - const exp: typeof osConstants.errno &
8 - typeof osConstants.priority &
9 - SignalConstants &
10 - typeof cryptoConstants &
11 - typeof fsConstants;
12 - export = exp;
13 -}
14 -
15 -declare module 'node:constants' {
16 - import constants = require('constants');
17 - export = constants;
18 -}
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
1 -/**
2 - * The `diagnostics_channel` module provides an API to create named channels
3 - * to report arbitrary message data for diagnostics purposes.
4 - *
5 - * It can be accessed using:
6 - *
7 - * ```js
8 - * import diagnostics_channel from 'diagnostics_channel';
9 - * ```
10 - *
11 - * It is intended that a module writer wanting to report diagnostics messages
12 - * will create one or many top-level channels to report messages through.
13 - * Channels may also be acquired at runtime but it is not encouraged
14 - * due to the additional overhead of doing so. Channels may be exported for
15 - * convenience, but as long as the name is known it can be acquired anywhere.
16 - *
17 - * If you intend for your module to produce diagnostics data for others to
18 - * consume it is recommended that you include documentation of what named
19 - * channels are used along with the shape of the message data. Channel names
20 - * should generally include the module name to avoid collisions with data from
21 - * other modules.
22 - * @experimental
23 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/diagnostics_channel.js)
24 - */
25 -declare module 'diagnostics_channel' {
26 - /**
27 - * Check if there are active subscribers to the named channel. This is helpful if
28 - * the message you want to send might be expensive to prepare.
29 - *
30 - * This API is optional but helpful when trying to publish messages from very
31 - * performance-sensitive code.
32 - *
33 - * ```js
34 - * import diagnostics_channel from 'diagnostics_channel';
35 - *
36 - * if (diagnostics_channel.hasSubscribers('my-channel')) {
37 - * // There are subscribers, prepare and publish message
38 - * }
39 - * ```
40 - * @since v15.1.0, v14.17.0
41 - * @param name The channel name
42 - * @return If there are active subscribers
43 - */
44 - function hasSubscribers(name: string): boolean;
45 - /**
46 - * This is the primary entry-point for anyone wanting to interact with a named
47 - * channel. It produces a channel object which is optimized to reduce overhead at
48 - * publish time as much as possible.
49 - *
50 - * ```js
51 - * import diagnostics_channel from 'diagnostics_channel';
52 - *
53 - * const channel = diagnostics_channel.channel('my-channel');
54 - * ```
55 - * @since v15.1.0, v14.17.0
56 - * @param name The channel name
57 - * @return The named channel object
58 - */
59 - function channel(name: string): Channel;
60 - type ChannelListener = (message: unknown, name: string) => void;
61 - /**
62 - * The class `Channel` represents an individual named channel within the data
63 - * pipeline. It is use to track subscribers and to publish messages when there
64 - * are subscribers present. It exists as a separate object to avoid channel
65 - * lookups at publish time, enabling very fast publish speeds and allowing
66 - * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
67 - * with `new Channel(name)` is not supported.
68 - * @since v15.1.0, v14.17.0
69 - */
70 - class Channel {
71 - readonly name: string;
72 - /**
73 - * Check if there are active subscribers to this channel. This is helpful if
74 - * the message you want to send might be expensive to prepare.
75 - *
76 - * This API is optional but helpful when trying to publish messages from very
77 - * performance-sensitive code.
78 - *
79 - * ```js
80 - * import diagnostics_channel from 'diagnostics_channel';
81 - *
82 - * const channel = diagnostics_channel.channel('my-channel');
83 - *
84 - * if (channel.hasSubscribers) {
85 - * // There are subscribers, prepare and publish message
86 - * }
87 - * ```
88 - * @since v15.1.0, v14.17.0
89 - */
90 - readonly hasSubscribers: boolean;
91 - private constructor(name: string);
92 - /**
93 - * Publish a message to any subscribers to the channel. This will
94 - * trigger message handlers synchronously so they will execute within
95 - * the same context.
96 - *
97 - * ```js
98 - * import diagnostics_channel from 'diagnostics_channel';
99 - *
100 - * const channel = diagnostics_channel.channel('my-channel');
101 - *
102 - * channel.publish({
103 - * some: 'message'
104 - * });
105 - * ```
106 - * @since v15.1.0, v14.17.0
107 - * @param message The message to send to the channel subscribers
108 - */
109 - publish(message: unknown): void;
110 - /**
111 - * Register a message handler to subscribe to this channel. This message handler
112 - * will be run synchronously whenever a message is published to the channel. Any
113 - * errors thrown in the message handler will trigger an `'uncaughtException'`.
114 - *
115 - * ```js
116 - * import diagnostics_channel from 'diagnostics_channel';
117 - *
118 - * const channel = diagnostics_channel.channel('my-channel');
119 - *
120 - * channel.subscribe((message, name) => {
121 - * // Received data
122 - * });
123 - * ```
124 - * @since v15.1.0, v14.17.0
125 - * @param onMessage The handler to receive channel messages
126 - */
127 - subscribe(onMessage: ChannelListener): void;
128 - /**
129 - * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
130 - *
131 - * ```js
132 - * import diagnostics_channel from 'diagnostics_channel';
133 - *
134 - * const channel = diagnostics_channel.channel('my-channel');
135 - *
136 - * function onMessage(message, name) {
137 - * // Received data
138 - * }
139 - *
140 - * channel.subscribe(onMessage);
141 - *
142 - * channel.unsubscribe(onMessage);
143 - * ```
144 - * @since v15.1.0, v14.17.0
145 - * @param onMessage The previous subscribed handler to remove
146 - */
147 - unsubscribe(onMessage: ChannelListener): void;
148 - }
149 -}
150 -declare module 'node:diagnostics_channel' {
151 - export * from 'diagnostics_channel';
152 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -/**
2 - * **This module is pending deprecation.** Once a replacement API has been
3 - * finalized, this module will be fully deprecated. Most developers should**not** have cause to use this module. Users who absolutely must have
4 - * the functionality that domains provide may rely on it for the time being
5 - * but should expect to have to migrate to a different solution
6 - * in the future.
7 - *
8 - * Domains provide a way to handle multiple different IO operations as a
9 - * single group. If any of the event emitters or callbacks registered to a
10 - * domain emit an `'error'` event, or throw an error, then the domain object
11 - * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
12 - * exit immediately with an error code.
13 - * @deprecated Since v1.4.2 - Deprecated
14 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/domain.js)
15 - */
16 -declare module 'domain' {
17 - import EventEmitter = require('node:events');
18 - /**
19 - * The `Domain` class encapsulates the functionality of routing errors and
20 - * uncaught exceptions to the active `Domain` object.
21 - *
22 - * To handle the errors that it catches, listen to its `'error'` event.
23 - */
24 - class Domain extends EventEmitter {
25 - /**
26 - * An array of timers and event emitters that have been explicitly added
27 - * to the domain.
28 - */
29 - members: Array<EventEmitter | NodeJS.Timer>;
30 - /**
31 - * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
32 - * pushes the domain onto the domain
33 - * stack managed by the domain module (see {@link exit} for details on the
34 - * domain stack). The call to `enter()` delimits the beginning of a chain of
35 - * asynchronous calls and I/O operations bound to a domain.
36 - *
37 - * Calling `enter()` changes only the active domain, and does not alter the domain
38 - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
39 - * single domain.
40 - */
41 - enter(): void;
42 - /**
43 - * The `exit()` method exits the current domain, popping it off the domain stack.
44 - * Any time execution is going to switch to the context of a different chain of
45 - * asynchronous calls, it's important to ensure that the current domain is exited.
46 - * The call to `exit()` delimits either the end of or an interruption to the chain
47 - * of asynchronous calls and I/O operations bound to a domain.
48 - *
49 - * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
50 - *
51 - * Calling `exit()` changes only the active domain, and does not alter the domain
52 - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
53 - * single domain.
54 - */
55 - exit(): void;
56 - /**
57 - * Run the supplied function in the context of the domain, implicitly
58 - * binding all event emitters, timers, and lowlevel requests that are
59 - * created in that context. Optionally, arguments can be passed to
60 - * the function.
61 - *
62 - * This is the most basic way to use a domain.
63 - *
64 - * ```js
65 - * const domain = require('domain');
66 - * const fs = require('fs');
67 - * const d = domain.create();
68 - * d.on('error', (er) => {
69 - * console.error('Caught error!', er);
70 - * });
71 - * d.run(() => {
72 - * process.nextTick(() => {
73 - * setTimeout(() => { // Simulating some various async stuff
74 - * fs.open('non-existent file', 'r', (er, fd) => {
75 - * if (er) throw er;
76 - * // proceed...
77 - * });
78 - * }, 100);
79 - * });
80 - * });
81 - * ```
82 - *
83 - * In this example, the `d.on('error')` handler will be triggered, rather
84 - * than crashing the program.
85 - */
86 - run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
87 - /**
88 - * Explicitly adds an emitter to the domain. If any event handlers called by
89 - * the emitter throw an error, or if the emitter emits an `'error'` event, it
90 - * will be routed to the domain's `'error'` event, just like with implicit
91 - * binding.
92 - *
93 - * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
94 - * the domain `'error'` handler.
95 - *
96 - * If the Timer or `EventEmitter` was already bound to a domain, it is removed
97 - * from that one, and bound to this one instead.
98 - * @param emitter emitter or timer to be added to the domain
99 - */
100 - add(emitter: EventEmitter | NodeJS.Timer): void;
101 - /**
102 - * The opposite of {@link add}. Removes domain handling from the
103 - * specified emitter.
104 - * @param emitter emitter or timer to be removed from the domain
105 - */
106 - remove(emitter: EventEmitter | NodeJS.Timer): void;
107 - /**
108 - * The returned function will be a wrapper around the supplied callback
109 - * function. When the returned function is called, any errors that are
110 - * thrown will be routed to the domain's `'error'` event.
111 - *
112 - * ```js
113 - * const d = domain.create();
114 - *
115 - * function readSomeFile(filename, cb) {
116 - * fs.readFile(filename, 'utf8', d.bind((er, data) => {
117 - * // If this throws, it will also be passed to the domain.
118 - * return cb(er, data ? JSON.parse(data) : null);
119 - * }));
120 - * }
121 - *
122 - * d.on('error', (er) => {
123 - * // An error occurred somewhere. If we throw it now, it will crash the program
124 - * // with the normal line number and stack message.
125 - * });
126 - * ```
127 - * @param callback The callback function
128 - * @return The bound function
129 - */
130 - bind<T extends Function>(callback: T): T;
131 - /**
132 - * This method is almost identical to {@link bind}. However, in
133 - * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
134 - *
135 - * In this way, the common `if (err) return callback(err);` pattern can be replaced
136 - * with a single error handler in a single place.
137 - *
138 - * ```js
139 - * const d = domain.create();
140 - *
141 - * function readSomeFile(filename, cb) {
142 - * fs.readFile(filename, 'utf8', d.intercept((data) => {
143 - * // Note, the first argument is never passed to the
144 - * // callback since it is assumed to be the 'Error' argument
145 - * // and thus intercepted by the domain.
146 - *
147 - * // If this throws, it will also be passed to the domain
148 - * // so the error-handling logic can be moved to the 'error'
149 - * // event on the domain instead of being repeated throughout
150 - * // the program.
151 - * return cb(null, JSON.parse(data));
152 - * }));
153 - * }
154 - *
155 - * d.on('error', (er) => {
156 - * // An error occurred somewhere. If we throw it now, it will crash the program
157 - * // with the normal line number and stack message.
158 - * });
159 - * ```
160 - * @param callback The callback function
161 - * @return The intercepted function
162 - */
163 - intercept<T extends Function>(callback: T): T;
164 - }
165 - function create(): Domain;
166 -}
167 -declare module 'node:domain' {
168 - export * from 'domain';
169 -}
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
1 -// Declare "static" methods in Error
2 -interface ErrorConstructor {
3 - /** Create .stack property on a target object */
4 - captureStackTrace(targetObject: object, constructorOpt?: Function): void;
5 -
6 - /**
7 - * Optional override for formatting stack traces
8 - *
9 - * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
10 - */
11 - prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
12 -
13 - stackTraceLimit: number;
14 -}
15 -
16 -/*-----------------------------------------------*
17 - * *
18 - * GLOBAL *
19 - * *
20 - ------------------------------------------------*/
21 -
22 -// For backwards compability
23 -interface NodeRequire extends NodeJS.Require { }
24 -interface RequireResolve extends NodeJS.RequireResolve { }
25 -interface NodeModule extends NodeJS.Module { }
26 -
27 -declare var process: NodeJS.Process;
28 -declare var console: Console;
29 -
30 -declare var __filename: string;
31 -declare var __dirname: string;
32 -
33 -declare var require: NodeRequire;
34 -declare var module: NodeModule;
35 -
36 -// Same as module.exports
37 -declare var exports: any;
38 -
39 -/**
40 - * Only available if `--expose-gc` is passed to the process.
41 - */
42 -declare var gc: undefined | (() => void);
43 -
44 -//#region borrowed
45 -// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
46 -/** A controller object that allows you to abort one or more DOM requests as and when desired. */
47 -interface AbortController {
48 - /**
49 - * Returns the AbortSignal object associated with this object.
50 - */
51 -
52 - readonly signal: AbortSignal;
53 - /**
54 - * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
55 - */
56 - abort(): void;
57 -}
58 -
59 -/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
60 -interface AbortSignal {
61 - /**
62 - * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
63 - */
64 - readonly aborted: boolean;
65 -}
66 -
67 -declare var AbortController: {
68 - prototype: AbortController;
69 - new(): AbortController;
70 -};
71 -
72 -declare var AbortSignal: {
73 - prototype: AbortSignal;
74 - new(): AbortSignal;
75 - // TODO: Add abort() static
76 -};
77 -//#endregion borrowed
78 -
79 -//#region ArrayLike.at()
80 -interface RelativeIndexable<T> {
81 - /**
82 - * Takes an integer value and returns the item at that index,
83 - * allowing for positive and negative integers.
84 - * Negative integers count back from the last item in the array.
85 - */
86 - at(index: number): T | undefined;
87 -}
88 -interface String extends RelativeIndexable<string> {}
89 -interface Array<T> extends RelativeIndexable<T> {}
90 -interface Int8Array extends RelativeIndexable<number> {}
91 -interface Uint8Array extends RelativeIndexable<number> {}
92 -interface Uint8ClampedArray extends RelativeIndexable<number> {}
93 -interface Int16Array extends RelativeIndexable<number> {}
94 -interface Uint16Array extends RelativeIndexable<number> {}
95 -interface Int32Array extends RelativeIndexable<number> {}
96 -interface Uint32Array extends RelativeIndexable<number> {}
97 -interface Float32Array extends RelativeIndexable<number> {}
98 -interface Float64Array extends RelativeIndexable<number> {}
99 -interface BigInt64Array extends RelativeIndexable<bigint> {}
100 -interface BigUint64Array extends RelativeIndexable<bigint> {}
101 -//#endregion ArrayLike.at() end
102 -
103 -/**
104 - * @since v17.0.0
105 - *
106 - * Creates a deep clone of an object.
107 - */
108 -declare function structuredClone<T>(
109 - value: T,
110 - transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
111 -): T;
112 -
113 -/*----------------------------------------------*
114 -* *
115 -* GLOBAL INTERFACES *
116 -* *
117 -*-----------------------------------------------*/
118 -declare namespace NodeJS {
119 - interface CallSite {
120 - /**
121 - * Value of "this"
122 - */
123 - getThis(): unknown;
124 -
125 - /**
126 - * Type of "this" as a string.
127 - * This is the name of the function stored in the constructor field of
128 - * "this", if available. Otherwise the object's [[Class]] internal
129 - * property.
130 - */
131 - getTypeName(): string | null;
132 -
133 - /**
134 - * Current function
135 - */
136 - getFunction(): Function | undefined;
137 -
138 - /**
139 - * Name of the current function, typically its name property.
140 - * If a name property is not available an attempt will be made to try
141 - * to infer a name from the function's context.
142 - */
143 - getFunctionName(): string | null;
144 -
145 - /**
146 - * Name of the property [of "this" or one of its prototypes] that holds
147 - * the current function
148 - */
149 - getMethodName(): string | null;
150 -
151 - /**
152 - * Name of the script [if this function was defined in a script]
153 - */
154 - getFileName(): string | null;
155 -
156 - /**
157 - * Current line number [if this function was defined in a script]
158 - */
159 - getLineNumber(): number | null;
160 -
161 - /**
162 - * Current column number [if this function was defined in a script]
163 - */
164 - getColumnNumber(): number | null;
165 -
166 - /**
167 - * A call site object representing the location where eval was called
168 - * [if this function was created using a call to eval]
169 - */
170 - getEvalOrigin(): string | undefined;
171 -
172 - /**
173 - * Is this a toplevel invocation, that is, is "this" the global object?
174 - */
175 - isToplevel(): boolean;
176 -
177 - /**
178 - * Does this call take place in code defined by a call to eval?
179 - */
180 - isEval(): boolean;
181 -
182 - /**
183 - * Is this call in native V8 code?
184 - */
185 - isNative(): boolean;
186 -
187 - /**
188 - * Is this a constructor call?
189 - */
190 - isConstructor(): boolean;
191 - }
192 -
193 - interface ErrnoException extends Error {
194 - errno?: number | undefined;
195 - code?: string | undefined;
196 - path?: string | undefined;
197 - syscall?: string | undefined;
198 - }
199 -
200 - interface ReadableStream extends EventEmitter {
201 - readable: boolean;
202 - read(size?: number): string | Buffer;
203 - setEncoding(encoding: BufferEncoding): this;
204 - pause(): this;
205 - resume(): this;
206 - isPaused(): boolean;
207 - pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
208 - unpipe(destination?: WritableStream): this;
209 - unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
210 - wrap(oldStream: ReadableStream): this;
211 - [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
212 - }
213 -
214 - interface WritableStream extends EventEmitter {
215 - writable: boolean;
216 - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
217 - write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
218 - end(cb?: () => void): this;
219 - end(data: string | Uint8Array, cb?: () => void): this;
220 - end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
221 - }
222 -
223 - interface ReadWriteStream extends ReadableStream, WritableStream { }
224 -
225 - interface RefCounted {
226 - ref(): this;
227 - unref(): this;
228 - }
229 -
230 - type TypedArray =
231 - | Uint8Array
232 - | Uint8ClampedArray
233 - | Uint16Array
234 - | Uint32Array
235 - | Int8Array
236 - | Int16Array
237 - | Int32Array
238 - | BigUint64Array
239 - | BigInt64Array
240 - | Float32Array
241 - | Float64Array;
242 - type ArrayBufferView = TypedArray | DataView;
243 -
244 - interface Require {
245 - (id: string): any;
246 - resolve: RequireResolve;
247 - cache: Dict<NodeModule>;
248 - /**
249 - * @deprecated
250 - */
251 - extensions: RequireExtensions;
252 - main: Module | undefined;
253 - }
254 -
255 - interface RequireResolve {
256 - (id: string, options?: { paths?: string[] | undefined; }): string;
257 - paths(request: string): string[] | null;
258 - }
259 -
260 - interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
261 - '.js': (m: Module, filename: string) => any;
262 - '.json': (m: Module, filename: string) => any;
263 - '.node': (m: Module, filename: string) => any;
264 - }
265 - interface Module {
266 - /**
267 - * `true` if the module is running during the Node.js preload
268 - */
269 - isPreloading: boolean;
270 - exports: any;
271 - require: Require;
272 - id: string;
273 - filename: string;
274 - loaded: boolean;
275 - /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
276 - parent: Module | null | undefined;
277 - children: Module[];
278 - /**
279 - * @since v11.14.0
280 - *
281 - * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
282 - */
283 - path: string;
284 - paths: string[];
285 - }
286 -
287 - interface Dict<T> {
288 - [key: string]: T | undefined;
289 - }
290 -
291 - interface ReadOnlyDict<T> {
292 - readonly [key: string]: T | undefined;
293 - }
294 -}
1 -declare var global: typeof globalThis;
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
1 -// Type definitions for non-npm package Node.js 17.0
2 -// Project: https://nodejs.org/
3 -// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4 -// DefinitelyTyped <https://github.com/DefinitelyTyped>
5 -// Alberto Schiabel <https://github.com/jkomyno>
6 -// Alvis HT Tang <https://github.com/alvis>
7 -// Andrew Makarov <https://github.com/r3nya>
8 -// Benjamin Toueg <https://github.com/btoueg>
9 -// Chigozirim C. <https://github.com/smac89>
10 -// David Junger <https://github.com/touffy>
11 -// Deividas Bakanas <https://github.com/DeividasBakanas>
12 -// Eugene Y. Q. Shen <https://github.com/eyqs>
13 -// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
14 -// Huw <https://github.com/hoo29>
15 -// Kelvin Jin <https://github.com/kjin>
16 -// Klaus Meinhardt <https://github.com/ajafff>
17 -// Lishude <https://github.com/islishude>
18 -// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
19 -// Mohsen Azimi <https://github.com/mohsen1>
20 -// Nicolas Even <https://github.com/n-e>
21 -// Nikita Galkin <https://github.com/galkin>
22 -// Parambir Singh <https://github.com/parambirs>
23 -// Sebastian Silbermann <https://github.com/eps1lon>
24 -// Simon Schick <https://github.com/SimonSchick>
25 -// Thomas den Hollander <https://github.com/ThomasdenH>
26 -// Wilco Bakker <https://github.com/WilcoBakker>
27 -// wwwy3y3 <https://github.com/wwwy3y3>
28 -// Samuel Ainsworth <https://github.com/samuela>
29 -// Kyle Uehlein <https://github.com/kuehlein>
30 -// Thanik Bhongbhibhat <https://github.com/bhongy>
31 -// Marcin Kopacz <https://github.com/chyzwar>
32 -// Trivikram Kamat <https://github.com/trivikr>
33 -// Junxiao Shi <https://github.com/yoursunny>
34 -// Ilia Baryshnikov <https://github.com/qwelias>
35 -// ExE Boss <https://github.com/ExE-Boss>
36 -// Piotr Błażejewicz <https://github.com/peterblazejewicz>
37 -// Anna Henningsen <https://github.com/addaleax>
38 -// Victor Perin <https://github.com/victorperin>
39 -// Yongsheng Zhang <https://github.com/ZYSzys>
40 -// NodeJS Contributors <https://github.com/NodeJS>
41 -// Linus Unnebäck <https://github.com/LinusU>
42 -// wafuwafu13 <https://github.com/wafuwafu13>
43 -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
44 -
45 -/**
46 - * License for programmatically and manually incorporated
47 - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
48 - *
49 - * Copyright Node.js contributors. All rights reserved.
50 - * Permission is hereby granted, free of charge, to any person obtaining a copy
51 - * of this software and associated documentation files (the "Software"), to
52 - * deal in the Software without restriction, including without limitation the
53 - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
54 - * sell copies of the Software, and to permit persons to whom the Software is
55 - * furnished to do so, subject to the following conditions:
56 - *
57 - * The above copyright notice and this permission notice shall be included in
58 - * all copies or substantial portions of the Software.
59 - *
60 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
65 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
66 - * IN THE SOFTWARE.
67 - */
68 -
69 -// NOTE: These definitions support NodeJS and TypeScript 3.7+.
70 -
71 -// Reference required types from the default lib:
72 -/// <reference lib="es2020" />
73 -/// <reference lib="esnext.asynciterable" />
74 -/// <reference lib="esnext.intl" />
75 -/// <reference lib="esnext.bigint" />
76 -
77 -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
78 -/// <reference path="assert.d.ts" />
79 -/// <reference path="assert/strict.d.ts" />
80 -/// <reference path="globals.d.ts" />
81 -/// <reference path="async_hooks.d.ts" />
82 -/// <reference path="buffer.d.ts" />
83 -/// <reference path="child_process.d.ts" />
84 -/// <reference path="cluster.d.ts" />
85 -/// <reference path="console.d.ts" />
86 -/// <reference path="constants.d.ts" />
87 -/// <reference path="crypto.d.ts" />
88 -/// <reference path="dgram.d.ts" />
89 -/// <reference path="diagnostics_channel.d.ts" />
90 -/// <reference path="dns.d.ts" />
91 -/// <reference path="dns/promises.d.ts" />
92 -/// <reference path="dns/promises.d.ts" />
93 -/// <reference path="domain.d.ts" />
94 -/// <reference path="events.d.ts" />
95 -/// <reference path="fs.d.ts" />
96 -/// <reference path="fs/promises.d.ts" />
97 -/// <reference path="http.d.ts" />
98 -/// <reference path="http2.d.ts" />
99 -/// <reference path="https.d.ts" />
100 -/// <reference path="inspector.d.ts" />
101 -/// <reference path="module.d.ts" />
102 -/// <reference path="net.d.ts" />
103 -/// <reference path="os.d.ts" />
104 -/// <reference path="path.d.ts" />
105 -/// <reference path="perf_hooks.d.ts" />
106 -/// <reference path="process.d.ts" />
107 -/// <reference path="punycode.d.ts" />
108 -/// <reference path="querystring.d.ts" />
109 -/// <reference path="readline.d.ts" />
110 -/// <reference path="repl.d.ts" />
111 -/// <reference path="stream.d.ts" />
112 -/// <reference path="stream/promises.d.ts" />
113 -/// <reference path="stream/consumers.d.ts" />
114 -/// <reference path="stream/web.d.ts" />
115 -/// <reference path="string_decoder.d.ts" />
116 -/// <reference path="timers.d.ts" />
117 -/// <reference path="timers/promises.d.ts" />
118 -/// <reference path="tls.d.ts" />
119 -/// <reference path="trace_events.d.ts" />
120 -/// <reference path="tty.d.ts" />
121 -/// <reference path="url.d.ts" />
122 -/// <reference path="util.d.ts" />
123 -/// <reference path="v8.d.ts" />
124 -/// <reference path="vm.d.ts" />
125 -/// <reference path="wasi.d.ts" />
126 -/// <reference path="worker_threads.d.ts" />
127 -/// <reference path="zlib.d.ts" />
128 -
129 -/// <reference path="globals.global.d.ts" />
This diff could not be displayed because it is too large.
1 -/**
2 - * @since v0.3.7
3 - */
4 -declare module 'module' {
5 - import { URL } from 'node:url';
6 - namespace Module {
7 - /**
8 - * The `module.syncBuiltinESMExports()` method updates all the live bindings for
9 - * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
10 - * does not add or remove exported names from the `ES Modules`.
11 - *
12 - * ```js
13 - * const fs = require('fs');
14 - * const assert = require('assert');
15 - * const { syncBuiltinESMExports } = require('module');
16 - *
17 - * fs.readFile = newAPI;
18 - *
19 - * delete fs.readFileSync;
20 - *
21 - * function newAPI() {
22 - * // ...
23 - * }
24 - *
25 - * fs.newAPI = newAPI;
26 - *
27 - * syncBuiltinESMExports();
28 - *
29 - * import('fs').then((esmFS) => {
30 - * // It syncs the existing readFile property with the new value
31 - * assert.strictEqual(esmFS.readFile, newAPI);
32 - * // readFileSync has been deleted from the required fs
33 - * assert.strictEqual('readFileSync' in fs, false);
34 - * // syncBuiltinESMExports() does not remove readFileSync from esmFS
35 - * assert.strictEqual('readFileSync' in esmFS, true);
36 - * // syncBuiltinESMExports() does not add names
37 - * assert.strictEqual(esmFS.newAPI, undefined);
38 - * });
39 - * ```
40 - * @since v12.12.0
41 - */
42 - function syncBuiltinESMExports(): void;
43 - /**
44 - * `path` is the resolved path for the file for which a corresponding source map
45 - * should be fetched.
46 - * @since v13.7.0, v12.17.0
47 - */
48 - function findSourceMap(path: string, error?: Error): SourceMap;
49 - interface SourceMapPayload {
50 - file: string;
51 - version: number;
52 - sources: string[];
53 - sourcesContent: string[];
54 - names: string[];
55 - mappings: string;
56 - sourceRoot: string;
57 - }
58 - interface SourceMapping {
59 - generatedLine: number;
60 - generatedColumn: number;
61 - originalSource: string;
62 - originalLine: number;
63 - originalColumn: number;
64 - }
65 - /**
66 - * @since v13.7.0, v12.17.0
67 - */
68 - class SourceMap {
69 - /**
70 - * Getter for the payload used to construct the `SourceMap` instance.
71 - */
72 - readonly payload: SourceMapPayload;
73 - constructor(payload: SourceMapPayload);
74 - /**
75 - * Given a line number and column number in the generated source file, returns
76 - * an object representing the position in the original file. The object returned
77 - * consists of the following keys:
78 - */
79 - findEntry(line: number, column: number): SourceMapping;
80 - }
81 - }
82 - interface Module extends NodeModule {}
83 - class Module {
84 - static runMain(): void;
85 - static wrap(code: string): string;
86 - static createRequire(path: string | URL): NodeRequire;
87 - static builtinModules: string[];
88 - static Module: typeof Module;
89 - constructor(id: string, parent?: Module);
90 - }
91 - global {
92 - interface ImportMeta {
93 - url: string;
94 - /**
95 - * @experimental
96 - * This feature is only available with the `--experimental-import-meta-resolve`
97 - * command flag enabled.
98 - *
99 - * Provides a module-relative resolution function scoped to each module, returning
100 - * the URL string.
101 - *
102 - * @param specified The module specifier to resolve relative to `parent`.
103 - * @param parent The absolute parent module URL to resolve from. If none
104 - * is specified, the value of `import.meta.url` is used as the default.
105 - */
106 - resolve?(specified: string, parent?: string | URL): Promise<string>;
107 - }
108 - }
109 - export = Module;
110 -}
111 -declare module 'node:module' {
112 - import module = require('module');
113 - export = module;
114 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -{
2 - "name": "@types/node",
3 - "version": "17.0.32",
4 - "description": "TypeScript definitions for Node.js",
5 - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6 - "license": "MIT",
7 - "contributors": [
8 - {
9 - "name": "Microsoft TypeScript",
10 - "url": "https://github.com/Microsoft",
11 - "githubUsername": "Microsoft"
12 - },
13 - {
14 - "name": "DefinitelyTyped",
15 - "url": "https://github.com/DefinitelyTyped",
16 - "githubUsername": "DefinitelyTyped"
17 - },
18 - {
19 - "name": "Alberto Schiabel",
20 - "url": "https://github.com/jkomyno",
21 - "githubUsername": "jkomyno"
22 - },
23 - {
24 - "name": "Alvis HT Tang",
25 - "url": "https://github.com/alvis",
26 - "githubUsername": "alvis"
27 - },
28 - {
29 - "name": "Andrew Makarov",
30 - "url": "https://github.com/r3nya",
31 - "githubUsername": "r3nya"
32 - },
33 - {
34 - "name": "Benjamin Toueg",
35 - "url": "https://github.com/btoueg",
36 - "githubUsername": "btoueg"
37 - },
38 - {
39 - "name": "Chigozirim C.",
40 - "url": "https://github.com/smac89",
41 - "githubUsername": "smac89"
42 - },
43 - {
44 - "name": "David Junger",
45 - "url": "https://github.com/touffy",
46 - "githubUsername": "touffy"
47 - },
48 - {
49 - "name": "Deividas Bakanas",
50 - "url": "https://github.com/DeividasBakanas",
51 - "githubUsername": "DeividasBakanas"
52 - },
53 - {
54 - "name": "Eugene Y. Q. Shen",
55 - "url": "https://github.com/eyqs",
56 - "githubUsername": "eyqs"
57 - },
58 - {
59 - "name": "Hannes Magnusson",
60 - "url": "https://github.com/Hannes-Magnusson-CK",
61 - "githubUsername": "Hannes-Magnusson-CK"
62 - },
63 - {
64 - "name": "Huw",
65 - "url": "https://github.com/hoo29",
66 - "githubUsername": "hoo29"
67 - },
68 - {
69 - "name": "Kelvin Jin",
70 - "url": "https://github.com/kjin",
71 - "githubUsername": "kjin"
72 - },
73 - {
74 - "name": "Klaus Meinhardt",
75 - "url": "https://github.com/ajafff",
76 - "githubUsername": "ajafff"
77 - },
78 - {
79 - "name": "Lishude",
80 - "url": "https://github.com/islishude",
81 - "githubUsername": "islishude"
82 - },
83 - {
84 - "name": "Mariusz Wiktorczyk",
85 - "url": "https://github.com/mwiktorczyk",
86 - "githubUsername": "mwiktorczyk"
87 - },
88 - {
89 - "name": "Mohsen Azimi",
90 - "url": "https://github.com/mohsen1",
91 - "githubUsername": "mohsen1"
92 - },
93 - {
94 - "name": "Nicolas Even",
95 - "url": "https://github.com/n-e",
96 - "githubUsername": "n-e"
97 - },
98 - {
99 - "name": "Nikita Galkin",
100 - "url": "https://github.com/galkin",
101 - "githubUsername": "galkin"
102 - },
103 - {
104 - "name": "Parambir Singh",
105 - "url": "https://github.com/parambirs",
106 - "githubUsername": "parambirs"
107 - },
108 - {
109 - "name": "Sebastian Silbermann",
110 - "url": "https://github.com/eps1lon",
111 - "githubUsername": "eps1lon"
112 - },
113 - {
114 - "name": "Simon Schick",
115 - "url": "https://github.com/SimonSchick",
116 - "githubUsername": "SimonSchick"
117 - },
118 - {
119 - "name": "Thomas den Hollander",
120 - "url": "https://github.com/ThomasdenH",
121 - "githubUsername": "ThomasdenH"
122 - },
123 - {
124 - "name": "Wilco Bakker",
125 - "url": "https://github.com/WilcoBakker",
126 - "githubUsername": "WilcoBakker"
127 - },
128 - {
129 - "name": "wwwy3y3",
130 - "url": "https://github.com/wwwy3y3",
131 - "githubUsername": "wwwy3y3"
132 - },
133 - {
134 - "name": "Samuel Ainsworth",
135 - "url": "https://github.com/samuela",
136 - "githubUsername": "samuela"
137 - },
138 - {
139 - "name": "Kyle Uehlein",
140 - "url": "https://github.com/kuehlein",
141 - "githubUsername": "kuehlein"
142 - },
143 - {
144 - "name": "Thanik Bhongbhibhat",
145 - "url": "https://github.com/bhongy",
146 - "githubUsername": "bhongy"
147 - },
148 - {
149 - "name": "Marcin Kopacz",
150 - "url": "https://github.com/chyzwar",
151 - "githubUsername": "chyzwar"
152 - },
153 - {
154 - "name": "Trivikram Kamat",
155 - "url": "https://github.com/trivikr",
156 - "githubUsername": "trivikr"
157 - },
158 - {
159 - "name": "Junxiao Shi",
160 - "url": "https://github.com/yoursunny",
161 - "githubUsername": "yoursunny"
162 - },
163 - {
164 - "name": "Ilia Baryshnikov",
165 - "url": "https://github.com/qwelias",
166 - "githubUsername": "qwelias"
167 - },
168 - {
169 - "name": "ExE Boss",
170 - "url": "https://github.com/ExE-Boss",
171 - "githubUsername": "ExE-Boss"
172 - },
173 - {
174 - "name": "Piotr Błażejewicz",
175 - "url": "https://github.com/peterblazejewicz",
176 - "githubUsername": "peterblazejewicz"
177 - },
178 - {
179 - "name": "Anna Henningsen",
180 - "url": "https://github.com/addaleax",
181 - "githubUsername": "addaleax"
182 - },
183 - {
184 - "name": "Victor Perin",
185 - "url": "https://github.com/victorperin",
186 - "githubUsername": "victorperin"
187 - },
188 - {
189 - "name": "Yongsheng Zhang",
190 - "url": "https://github.com/ZYSzys",
191 - "githubUsername": "ZYSzys"
192 - },
193 - {
194 - "name": "NodeJS Contributors",
195 - "url": "https://github.com/NodeJS",
196 - "githubUsername": "NodeJS"
197 - },
198 - {
199 - "name": "Linus Unnebäck",
200 - "url": "https://github.com/LinusU",
201 - "githubUsername": "LinusU"
202 - },
203 - {
204 - "name": "wafuwafu13",
205 - "url": "https://github.com/wafuwafu13",
206 - "githubUsername": "wafuwafu13"
207 - }
208 - ],
209 - "main": "",
210 - "types": "index.d.ts",
211 - "repository": {
212 - "type": "git",
213 - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
214 - "directory": "types/node"
215 - },
216 - "scripts": {},
217 - "dependencies": {},
218 - "typesPublisherContentHash": "2dd579d0ba3c1020dfef69325afa6d46fba439ba51eed066862df6bb33a7c2c5",
219 - "typeScriptVersion": "3.9"
220 -}
...\ No newline at end of file ...\ No newline at end of file
1 -declare module 'path/posix' {
2 - import path = require('path');
3 - export = path;
4 -}
5 -declare module 'path/win32' {
6 - import path = require('path');
7 - export = path;
8 -}
9 -/**
10 - * The `path` module provides utilities for working with file and directory paths.
11 - * It can be accessed using:
12 - *
13 - * ```js
14 - * const path = require('path');
15 - * ```
16 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/path.js)
17 - */
18 -declare module 'path' {
19 - namespace path {
20 - /**
21 - * A parsed path object generated by path.parse() or consumed by path.format().
22 - */
23 - interface ParsedPath {
24 - /**
25 - * The root of the path such as '/' or 'c:\'
26 - */
27 - root: string;
28 - /**
29 - * The full directory path such as '/home/user/dir' or 'c:\path\dir'
30 - */
31 - dir: string;
32 - /**
33 - * The file name including extension (if any) such as 'index.html'
34 - */
35 - base: string;
36 - /**
37 - * The file extension (if any) such as '.html'
38 - */
39 - ext: string;
40 - /**
41 - * The file name without extension (if any) such as 'index'
42 - */
43 - name: string;
44 - }
45 - interface FormatInputPathObject {
46 - /**
47 - * The root of the path such as '/' or 'c:\'
48 - */
49 - root?: string | undefined;
50 - /**
51 - * The full directory path such as '/home/user/dir' or 'c:\path\dir'
52 - */
53 - dir?: string | undefined;
54 - /**
55 - * The file name including extension (if any) such as 'index.html'
56 - */
57 - base?: string | undefined;
58 - /**
59 - * The file extension (if any) such as '.html'
60 - */
61 - ext?: string | undefined;
62 - /**
63 - * The file name without extension (if any) such as 'index'
64 - */
65 - name?: string | undefined;
66 - }
67 - interface PlatformPath {
68 - /**
69 - * Normalize a string path, reducing '..' and '.' parts.
70 - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
71 - *
72 - * @param p string path to normalize.
73 - */
74 - normalize(p: string): string;
75 - /**
76 - * Join all arguments together and normalize the resulting path.
77 - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
78 - *
79 - * @param paths paths to join.
80 - */
81 - join(...paths: string[]): string;
82 - /**
83 - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
84 - *
85 - * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
86 - *
87 - * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
88 - * until an absolute path is found. If after using all {from} paths still no absolute path is found,
89 - * the current working directory is used as well. The resulting path is normalized,
90 - * and trailing slashes are removed unless the path gets resolved to the root directory.
91 - *
92 - * @param pathSegments string paths to join. Non-string arguments are ignored.
93 - */
94 - resolve(...pathSegments: string[]): string;
95 - /**
96 - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
97 - *
98 - * @param path path to test.
99 - */
100 - isAbsolute(p: string): boolean;
101 - /**
102 - * Solve the relative path from {from} to {to}.
103 - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
104 - */
105 - relative(from: string, to: string): string;
106 - /**
107 - * Return the directory name of a path. Similar to the Unix dirname command.
108 - *
109 - * @param p the path to evaluate.
110 - */
111 - dirname(p: string): string;
112 - /**
113 - * Return the last portion of a path. Similar to the Unix basename command.
114 - * Often used to extract the file name from a fully qualified path.
115 - *
116 - * @param p the path to evaluate.
117 - * @param ext optionally, an extension to remove from the result.
118 - */
119 - basename(p: string, ext?: string): string;
120 - /**
121 - * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
122 - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
123 - *
124 - * @param p the path to evaluate.
125 - */
126 - extname(p: string): string;
127 - /**
128 - * The platform-specific file separator. '\\' or '/'.
129 - */
130 - readonly sep: string;
131 - /**
132 - * The platform-specific file delimiter. ';' or ':'.
133 - */
134 - readonly delimiter: string;
135 - /**
136 - * Returns an object from a path string - the opposite of format().
137 - *
138 - * @param pathString path to evaluate.
139 - */
140 - parse(p: string): ParsedPath;
141 - /**
142 - * Returns a path string from an object - the opposite of parse().
143 - *
144 - * @param pathString path to evaluate.
145 - */
146 - format(pP: FormatInputPathObject): string;
147 - /**
148 - * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
149 - * If path is not a string, path will be returned without modifications.
150 - * This method is meaningful only on Windows system.
151 - * On POSIX systems, the method is non-operational and always returns path without modifications.
152 - */
153 - toNamespacedPath(path: string): string;
154 - /**
155 - * Posix specific pathing.
156 - * Same as parent object on posix.
157 - */
158 - readonly posix: PlatformPath;
159 - /**
160 - * Windows specific pathing.
161 - * Same as parent object on windows
162 - */
163 - readonly win32: PlatformPath;
164 - }
165 - }
166 - const path: path.PlatformPath;
167 - export = path;
168 -}
169 -declare module 'node:path' {
170 - import path = require('path');
171 - export = path;
172 -}
173 -declare module 'node:path/posix' {
174 - import path = require('path/posix');
175 - export = path;
176 -}
177 -declare module 'node:path/win32' {
178 - import path = require('path/win32');
179 - export = path;
180 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -/**
2 - * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users
3 - * currently depending on the `punycode` module should switch to using the
4 - * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
5 - * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
6 - *
7 - * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It
8 - * can be accessed using:
9 - *
10 - * ```js
11 - * const punycode = require('punycode');
12 - * ```
13 - *
14 - * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
15 - * primarily intended for use in Internationalized Domain Names. Because host
16 - * names in URLs are limited to ASCII characters only, Domain Names that contain
17 - * non-ASCII characters must be converted into ASCII using the Punycode scheme.
18 - * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
19 - * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`.
20 - *
21 - * The `punycode` module provides a simple implementation of the Punycode standard.
22 - *
23 - * The `punycode` module is a third-party dependency used by Node.js and
24 - * made available to developers as a convenience. Fixes or other modifications to
25 - * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
26 - * @deprecated Since v7.0.0 - Deprecated
27 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/punycode.js)
28 - */
29 -declare module 'punycode' {
30 - /**
31 - * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
32 - * characters to the equivalent string of Unicode codepoints.
33 - *
34 - * ```js
35 - * punycode.decode('maana-pta'); // 'mañana'
36 - * punycode.decode('--dqo34k'); // '☃-⌘'
37 - * ```
38 - * @since v0.5.1
39 - */
40 - function decode(string: string): string;
41 - /**
42 - * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
43 - *
44 - * ```js
45 - * punycode.encode('mañana'); // 'maana-pta'
46 - * punycode.encode('☃-⌘'); // '--dqo34k'
47 - * ```
48 - * @since v0.5.1
49 - */
50 - function encode(string: string): string;
51 - /**
52 - * The `punycode.toUnicode()` method converts a string representing a domain name
53 - * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
54 - * converted.
55 - *
56 - * ```js
57 - * // decode domain names
58 - * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
59 - * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
60 - * punycode.toUnicode('example.com'); // 'example.com'
61 - * ```
62 - * @since v0.6.1
63 - */
64 - function toUnicode(domain: string): string;
65 - /**
66 - * The `punycode.toASCII()` method converts a Unicode string representing an
67 - * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
68 - * domain name will be converted. Calling `punycode.toASCII()` on a string that
69 - * already only contains ASCII characters will have no effect.
70 - *
71 - * ```js
72 - * // encode domain names
73 - * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
74 - * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
75 - * punycode.toASCII('example.com'); // 'example.com'
76 - * ```
77 - * @since v0.6.1
78 - */
79 - function toASCII(domain: string): string;
80 - /**
81 - * @deprecated since v7.0.0
82 - * The version of the punycode module bundled in Node.js is being deprecated.
83 - * In a future major version of Node.js this module will be removed.
84 - * Users currently depending on the punycode module should switch to using
85 - * the userland-provided Punycode.js module instead.
86 - */
87 - const ucs2: ucs2;
88 - interface ucs2 {
89 - /**
90 - * @deprecated since v7.0.0
91 - * The version of the punycode module bundled in Node.js is being deprecated.
92 - * In a future major version of Node.js this module will be removed.
93 - * Users currently depending on the punycode module should switch to using
94 - * the userland-provided Punycode.js module instead.
95 - */
96 - decode(string: string): number[];
97 - /**
98 - * @deprecated since v7.0.0
99 - * The version of the punycode module bundled in Node.js is being deprecated.
100 - * In a future major version of Node.js this module will be removed.
101 - * Users currently depending on the punycode module should switch to using
102 - * the userland-provided Punycode.js module instead.
103 - */
104 - encode(codePoints: ReadonlyArray<number>): string;
105 - }
106 - /**
107 - * @deprecated since v7.0.0
108 - * The version of the punycode module bundled in Node.js is being deprecated.
109 - * In a future major version of Node.js this module will be removed.
110 - * Users currently depending on the punycode module should switch to using
111 - * the userland-provided Punycode.js module instead.
112 - */
113 - const version: string;
114 -}
115 -declare module 'node:punycode' {
116 - export * from 'punycode';
117 -}
1 -/**
2 - * The `querystring` module provides utilities for parsing and formatting URL
3 - * query strings. It can be accessed using:
4 - *
5 - * ```js
6 - * const querystring = require('querystring');
7 - * ```
8 - *
9 - * The `querystring` API is considered Legacy. While it is still maintained,
10 - * new code should use the `URLSearchParams` API instead.
11 - * @deprecated Legacy
12 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/querystring.js)
13 - */
14 -declare module 'querystring' {
15 - interface StringifyOptions {
16 - encodeURIComponent?: ((str: string) => string) | undefined;
17 - }
18 - interface ParseOptions {
19 - maxKeys?: number | undefined;
20 - decodeURIComponent?: ((str: string) => string) | undefined;
21 - }
22 - interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
23 - interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {}
24 - /**
25 - * The `querystring.stringify()` method produces a URL query string from a
26 - * given `obj` by iterating through the object's "own properties".
27 - *
28 - * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
29 - * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
30 - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
31 - * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
32 - * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
33 - * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
34 - * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
35 - * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
36 - * empty strings.
37 - *
38 - * ```js
39 - * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
40 - * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
41 - *
42 - * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
43 - * // Returns 'foo:bar;baz:qux'
44 - * ```
45 - *
46 - * By default, characters requiring percent-encoding within the query string will
47 - * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified:
48 - *
49 - * ```js
50 - * // Assuming gbkEncodeURIComponent function already exists,
51 - *
52 - * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
53 - * { encodeURIComponent: gbkEncodeURIComponent });
54 - * ```
55 - * @since v0.1.25
56 - * @param obj The object to serialize into a URL query string
57 - * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
58 - * @param [eq='='] . The substring used to delimit keys and values in the query string.
59 - */
60 - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
61 - /**
62 - * The `querystring.parse()` method parses a URL query string (`str`) into a
63 - * collection of key and value pairs.
64 - *
65 - * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
66 - *
67 - * ```js
68 - * {
69 - * foo: 'bar',
70 - * abc: ['xyz', '123']
71 - * }
72 - * ```
73 - *
74 - * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
75 - * `obj.hasOwnProperty()`, and others
76 - * are not defined and _will not work_.
77 - *
78 - * By default, percent-encoded characters within the query string will be assumed
79 - * to use UTF-8 encoding. If an alternative character encoding is used, then an
80 - * alternative `decodeURIComponent` option will need to be specified:
81 - *
82 - * ```js
83 - * // Assuming gbkDecodeURIComponent function already exists...
84 - *
85 - * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
86 - * { decodeURIComponent: gbkDecodeURIComponent });
87 - * ```
88 - * @since v0.1.25
89 - * @param str The URL query string to parse
90 - * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
91 - * @param [eq='='] . The substring used to delimit keys and values in the query string.
92 - */
93 - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
94 - /**
95 - * The querystring.encode() function is an alias for querystring.stringify().
96 - */
97 - const encode: typeof stringify;
98 - /**
99 - * The querystring.decode() function is an alias for querystring.parse().
100 - */
101 - const decode: typeof parse;
102 - /**
103 - * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL
104 - * query strings.
105 - *
106 - * The `querystring.escape()` method is used by `querystring.stringify()` and is
107 - * generally not expected to be used directly. It is exported primarily to allow
108 - * application code to provide a replacement percent-encoding implementation if
109 - * necessary by assigning `querystring.escape` to an alternative function.
110 - * @since v0.1.25
111 - */
112 - function escape(str: string): string;
113 - /**
114 - * The `querystring.unescape()` method performs decoding of URL percent-encoded
115 - * characters on the given `str`.
116 - *
117 - * The `querystring.unescape()` method is used by `querystring.parse()` and is
118 - * generally not expected to be used directly. It is exported primarily to allow
119 - * application code to provide a replacement decoding implementation if
120 - * necessary by assigning `querystring.unescape` to an alternative function.
121 - *
122 - * By default, the `querystring.unescape()` method will attempt to use the
123 - * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
124 - * a safer equivalent that does not throw on malformed URLs will be used.
125 - * @since v0.1.25
126 - */
127 - function unescape(str: string): string;
128 -}
129 -declare module 'node:querystring' {
130 - export * from 'querystring';
131 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -// Duplicates of interface in lib.dom.ts.
2 -// Duplicated here rather than referencing lib.dom.ts because doing so causes lib.dom.ts to be loaded for "test-all"
3 -// Which in turn causes tests to pass that shouldn't pass.
4 -//
5 -// This interface is not, and should not be, exported.
6 -interface Blob {
7 - readonly size: number;
8 - readonly type: string;
9 - arrayBuffer(): Promise<ArrayBuffer>;
10 - slice(start?: number, end?: number, contentType?: string): Blob;
11 - stream(): NodeJS.ReadableStream;
12 - text(): Promise<string>;
13 -}
14 -declare module 'stream/consumers' {
15 - import { Readable } from 'node:stream';
16 - function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
17 - function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
18 - function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
19 - function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Blob>;
20 - function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
21 -}
22 -declare module 'node:stream/consumers' {
23 - export * from 'stream/consumers';
24 -}
1 -declare module 'stream/promises' {
2 - import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
3 - function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
4 - function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
5 - function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
6 - source: A,
7 - transform1: T1,
8 - destination: B,
9 - options?: PipelineOptions
10 - ): PipelinePromise<B>;
11 - function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
12 - source: A,
13 - transform1: T1,
14 - transform2: T2,
15 - destination: B,
16 - options?: PipelineOptions
17 - ): PipelinePromise<B>;
18 - function pipeline<
19 - A extends PipelineSource<any>,
20 - T1 extends PipelineTransform<A, any>,
21 - T2 extends PipelineTransform<T1, any>,
22 - T3 extends PipelineTransform<T2, any>,
23 - B extends PipelineDestination<T3, any>
24 - >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
25 - function pipeline<
26 - A extends PipelineSource<any>,
27 - T1 extends PipelineTransform<A, any>,
28 - T2 extends PipelineTransform<T1, any>,
29 - T3 extends PipelineTransform<T2, any>,
30 - T4 extends PipelineTransform<T3, any>,
31 - B extends PipelineDestination<T4, any>
32 - >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
33 - function pipeline(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
34 - function pipeline(
35 - stream1: NodeJS.ReadableStream,
36 - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
37 - ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
38 - ): Promise<void>;
39 -}
40 -declare module 'node:stream/promises' {
41 - export * from 'stream/promises';
42 -}
This diff is collapsed. Click to expand it.
1 -/**
2 - * The `string_decoder` module provides an API for decoding `Buffer` objects into
3 - * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
4 - * characters. It can be accessed using:
5 - *
6 - * ```js
7 - * const { StringDecoder } = require('string_decoder');
8 - * ```
9 - *
10 - * The following example shows the basic use of the `StringDecoder` class.
11 - *
12 - * ```js
13 - * const { StringDecoder } = require('string_decoder');
14 - * const decoder = new StringDecoder('utf8');
15 - *
16 - * const cent = Buffer.from([0xC2, 0xA2]);
17 - * console.log(decoder.write(cent));
18 - *
19 - * const euro = Buffer.from([0xE2, 0x82, 0xAC]);
20 - * console.log(decoder.write(euro));
21 - * ```
22 - *
23 - * When a `Buffer` instance is written to the `StringDecoder` instance, an
24 - * internal buffer is used to ensure that the decoded string does not contain
25 - * any incomplete multibyte characters. These are held in the buffer until the
26 - * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
27 - *
28 - * In the following example, the three UTF-8 encoded bytes of the European Euro
29 - * symbol (`€`) are written over three separate operations:
30 - *
31 - * ```js
32 - * const { StringDecoder } = require('string_decoder');
33 - * const decoder = new StringDecoder('utf8');
34 - *
35 - * decoder.write(Buffer.from([0xE2]));
36 - * decoder.write(Buffer.from([0x82]));
37 - * console.log(decoder.end(Buffer.from([0xAC])));
38 - * ```
39 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/string_decoder.js)
40 - */
41 -declare module 'string_decoder' {
42 - class StringDecoder {
43 - constructor(encoding?: BufferEncoding);
44 - /**
45 - * Returns a decoded string, ensuring that any incomplete multibyte characters at
46 - * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
47 - * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
48 - * @since v0.1.99
49 - * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
50 - */
51 - write(buffer: Buffer): string;
52 - /**
53 - * Returns any remaining input stored in the internal buffer as a string. Bytes
54 - * representing incomplete UTF-8 and UTF-16 characters will be replaced with
55 - * substitution characters appropriate for the character encoding.
56 - *
57 - * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
58 - * After `end()` is called, the `stringDecoder` object can be reused for new input.
59 - * @since v0.9.3
60 - * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
61 - */
62 - end(buffer?: Buffer): string;
63 - }
64 -}
65 -declare module 'node:string_decoder' {
66 - export * from 'string_decoder';
67 -}
1 -/**
2 - * The `timer` module exposes a global API for scheduling functions to
3 - * be called at some future period of time. Because the timer functions are
4 - * globals, there is no need to call `require('timers')` to use the API.
5 - *
6 - * The timer functions within Node.js implement a similar API as the timers API
7 - * provided by Web Browsers but use a different internal implementation that is
8 - * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
9 - * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/timers.js)
10 - */
11 -declare module 'timers' {
12 - import { Abortable } from 'node:events';
13 - import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
14 - interface TimerOptions extends Abortable {
15 - /**
16 - * Set to `false` to indicate that the scheduled `Timeout`
17 - * should not require the Node.js event loop to remain active.
18 - * @default true
19 - */
20 - ref?: boolean | undefined;
21 - }
22 - let setTimeout: typeof global.setTimeout;
23 - let clearTimeout: typeof global.clearTimeout;
24 - let setInterval: typeof global.setInterval;
25 - let clearInterval: typeof global.clearInterval;
26 - let setImmediate: typeof global.setImmediate;
27 - let clearImmediate: typeof global.clearImmediate;
28 - global {
29 - namespace NodeJS {
30 - // compatibility with older typings
31 - interface Timer extends RefCounted {
32 - hasRef(): boolean;
33 - refresh(): this;
34 - [Symbol.toPrimitive](): number;
35 - }
36 - interface Immediate extends RefCounted {
37 - /**
38 - * If true, the `Immediate` object will keep the Node.js event loop active.
39 - * @since v11.0.0
40 - */
41 - hasRef(): boolean;
42 - _onImmediate: Function; // to distinguish it from the Timeout class
43 - }
44 - interface Timeout extends Timer {
45 - /**
46 - * If true, the `Timeout` object will keep the Node.js event loop active.
47 - * @since v11.0.0
48 - */
49 - hasRef(): boolean;
50 - /**
51 - * Sets the timer's start time to the current time, and reschedules the timer to
52 - * call its callback at the previously specified duration adjusted to the current
53 - * time. This is useful for refreshing a timer without allocating a new
54 - * JavaScript object.
55 - *
56 - * Using this on a timer that has already called its callback will reactivate the
57 - * timer.
58 - * @since v10.2.0
59 - * @return a reference to `timeout`
60 - */
61 - refresh(): this;
62 - [Symbol.toPrimitive](): number;
63 - }
64 - }
65 - function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
66 - // util.promisify no rest args compability
67 - // tslint:disable-next-line void-return
68 - function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
69 - namespace setTimeout {
70 - const __promisify__: typeof setTimeoutPromise;
71 - }
72 - function clearTimeout(timeoutId: NodeJS.Timeout | undefined): void;
73 - function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer;
74 - // util.promisify no rest args compability
75 - // tslint:disable-next-line void-return
76 - function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer;
77 - namespace setInterval {
78 - const __promisify__: typeof setIntervalPromise;
79 - }
80 - function clearInterval(intervalId: NodeJS.Timeout | undefined): void;
81 - function setImmediate<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
82 - // util.promisify no rest args compability
83 - // tslint:disable-next-line void-return
84 - function setImmediate(callback: (args: void) => void): NodeJS.Immediate;
85 - namespace setImmediate {
86 - const __promisify__: typeof setImmediatePromise;
87 - }
88 - function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
89 - function queueMicrotask(callback: () => void): void;
90 - }
91 -}
92 -declare module 'node:timers' {
93 - export * from 'timers';
94 -}
1 -/**
2 - * The `timers/promises` API provides an alternative set of timer functions
3 - * that return `Promise` objects. The API is accessible via`require('timers/promises')`.
4 - *
5 - * ```js
6 - * import {
7 - * setTimeout,
8 - * setImmediate,
9 - * setInterval,
10 - * } from 'timers/promises';
11 - * ```
12 - * @since v15.0.0
13 - */
14 -declare module 'timers/promises' {
15 - import { TimerOptions } from 'node:timers';
16 - /**
17 - * ```js
18 - * import {
19 - * setTimeout,
20 - * } from 'timers/promises';
21 - *
22 - * const res = await setTimeout(100, 'result');
23 - *
24 - * console.log(res); // Prints 'result'
25 - * ```
26 - * @since v15.0.0
27 - * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
28 - * @param value A value with which the promise is fulfilled.
29 - */
30 - function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
31 - /**
32 - * ```js
33 - * import {
34 - * setImmediate,
35 - * } from 'timers/promises';
36 - *
37 - * const res = await setImmediate('result');
38 - *
39 - * console.log(res); // Prints 'result'
40 - * ```
41 - * @since v15.0.0
42 - * @param value A value with which the promise is fulfilled.
43 - */
44 - function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
45 - /**
46 - * Returns an async iterator that generates values in an interval of `delay` ms.
47 - *
48 - * ```js
49 - * import {
50 - * setInterval,
51 - * } from 'timers/promises';
52 - *
53 - * const interval = 100;
54 - * for await (const startTime of setInterval(interval, Date.now())) {
55 - * const now = Date.now();
56 - * console.log(now);
57 - * if ((now - startTime) > 1000)
58 - * break;
59 - * }
60 - * console.log(Date.now());
61 - * ```
62 - * @since v15.9.0
63 - */
64 - function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
65 -}
66 -declare module 'node:timers/promises' {
67 - export * from 'timers/promises';
68 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.