4cko commited on
Commit
a2c64e7
·
1 Parent(s): a7008b6

/usr/local/rvm/gems/ruby-3.4.7/bin:/usr/local/rvm/gems/ruby-3.4.7@global/bin:/usr/local/rvm/rubies/ruby-3.4.7/bin:/home/codespace/.vscode-remote/data/User/globalStorage/github.copilot-chat/debugCommand:/home/codespace/.vscode-remote/data/User/globalStorage/github.copilot-chat/copilotCli:/vscode/bin/linux-x64/7e7950df89d055b5a378379db9ee14290772148a/bin/remote-cli:/home/codespace/.local/bin:/home/codespace/.dotnet:/home/codespace/nvm/current/bin:/home/codespace/.php/current/bin:/home/codespace/.python/current/bin:/home/codespace/java/current/bin:/home/codespace/.ruby/current/bin:/home/codespace/.local/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/jupyter:/usr/local/oryx:/usr/local/go/bin:/go/bin:/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:/usr/local/php/current/bin:/opt/conda/bin:/usr/local/nvs:/usr/local/share/nvm/versions/node/v24.14.0/bin:/usr/local/hugo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/dotnet:/home/codespace/.dotnet/tools:/usr/local/rvm/bin

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +0 -35
  2. Dockerfile +22 -0
  3. QUICKSTART.md +201 -0
  4. README.md +308 -8
  5. examples/curl-upload.sh +46 -0
  6. examples/index.html +366 -0
  7. examples/nodejs-axios.js +56 -0
  8. examples/python-requests.py +72 -0
  9. node_modules/.bin/mime +1 -0
  10. node_modules/.bin/mkdirp +1 -0
  11. node_modules/.bin/nodemon +1 -0
  12. node_modules/.bin/nodetouch +1 -0
  13. node_modules/.bin/semver +1 -0
  14. node_modules/.package-lock.json +1546 -0
  15. node_modules/accepts/HISTORY.md +243 -0
  16. node_modules/accepts/LICENSE +23 -0
  17. node_modules/accepts/README.md +140 -0
  18. node_modules/accepts/index.js +238 -0
  19. node_modules/accepts/package.json +47 -0
  20. node_modules/agent-base/README.md +145 -0
  21. node_modules/agent-base/dist/src/index.d.ts +78 -0
  22. node_modules/agent-base/dist/src/index.js +203 -0
  23. node_modules/agent-base/dist/src/index.js.map +1 -0
  24. node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  25. node_modules/agent-base/dist/src/promisify.js +18 -0
  26. node_modules/agent-base/dist/src/promisify.js.map +1 -0
  27. node_modules/agent-base/node_modules/debug/LICENSE +20 -0
  28. node_modules/agent-base/node_modules/debug/README.md +481 -0
  29. node_modules/agent-base/node_modules/debug/package.json +64 -0
  30. node_modules/agent-base/node_modules/debug/src/browser.js +272 -0
  31. node_modules/agent-base/node_modules/debug/src/common.js +292 -0
  32. node_modules/agent-base/node_modules/debug/src/index.js +10 -0
  33. node_modules/agent-base/node_modules/debug/src/node.js +263 -0
  34. node_modules/agent-base/node_modules/ms/index.js +162 -0
  35. node_modules/agent-base/node_modules/ms/license.md +21 -0
  36. node_modules/agent-base/node_modules/ms/package.json +38 -0
  37. node_modules/agent-base/node_modules/ms/readme.md +59 -0
  38. node_modules/agent-base/package.json +64 -0
  39. node_modules/agent-base/src/index.ts +345 -0
  40. node_modules/agent-base/src/promisify.ts +33 -0
  41. node_modules/anymatch/LICENSE +15 -0
  42. node_modules/anymatch/README.md +87 -0
  43. node_modules/anymatch/index.d.ts +20 -0
  44. node_modules/anymatch/index.js +104 -0
  45. node_modules/anymatch/package.json +48 -0
  46. node_modules/append-field/.npmignore +1 -0
  47. node_modules/append-field/LICENSE +21 -0
  48. node_modules/append-field/README.md +44 -0
  49. node_modules/append-field/index.js +12 -0
  50. node_modules/append-field/lib/parse-path.js +53 -0
.gitattributes DELETED
@@ -1,35 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy package files
6
+ COPY package*.json ./
7
+
8
+ # Install dependencies
9
+ RUN npm install --production
10
+
11
+ # Copy app files
12
+ COPY server.js .
13
+ COPY utils/ ./utils/
14
+
15
+ # Create uploads directory
16
+ RUN mkdir -p uploads
17
+
18
+ # Expose port
19
+ EXPOSE 3000
20
+
21
+ # Start server
22
+ CMD ["node", "server.js"]
QUICKSTART.md ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Vico - Quick Start Guide
2
+
3
+ ## 🎯 Setup Cepat (5 Menit)
4
+
5
+ ### 1. Install Dependencies
6
+ ```bash
7
+ npm install
8
+ ```
9
+
10
+ ### 2. Jalankan Server
11
+ ```bash
12
+ npm start
13
+ # atau untuk development:
14
+ npm run dev
15
+ ```
16
+
17
+ Server akan berjalan di `http://localhost:3000`
18
+
19
+ ### 3. Test Upload
20
+
21
+ #### Via cURL (Terminal)
22
+ ```bash
23
+ # Siapkan file test
24
+ echo "id,name,value" > test.csv
25
+ echo "1,Alice,100" >> test.csv
26
+
27
+ # Upload
28
+ curl -X POST http://localhost:3000/api/upload \
29
+ -F "file=@test.csv" \
30
+ -F "repo_id=username/my-dataset" \
31
+ -F "token=hf_your_token_here"
32
+ ```
33
+
34
+ #### Via Browser
35
+ 1. Buka `http://localhost:3000`
36
+ 2. Redirect ke file `examples/index.html`
37
+ 3. Atau buka langsung: `examples/index.html`
38
+
39
+ #### Via Node.js
40
+ ```bash
41
+ node examples/nodejs-axios.js
42
+ ```
43
+
44
+ #### Via Python
45
+ ```bash
46
+ python3 examples/python-requests.py
47
+ ```
48
+
49
+ ---
50
+
51
+ ## 📌 Langkah-langkah Detail
52
+
53
+ ### A. Siapkan Hugging Face Token
54
+
55
+ 1. Buka https://huggingface.co/settings/tokens
56
+ 2. Klik "New token"
57
+ 3. Beri nama: "Vico Upload"
58
+ 4. Pilih tipe: "Write"
59
+ 5. Salin token (format: `hf_...`)
60
+
61
+ ### B. Buat Dataset di Hugging Face
62
+
63
+ 1. Buka https://huggingface.co/datasets/create
64
+ 2. Isi form:
65
+ - **Name**: `my-dataset`
66
+ - **Organization**: Pilih account Anda
67
+ - **Visibility**: Public (atau Private)
68
+ 3. Klik "Create dataset"
69
+ 4. Catat ID: `username/my-dataset`
70
+
71
+ ### C. Upload File
72
+
73
+ Gunakan salah satu metode di atas dengan:
74
+ - `repo_id`: ID dataset yang dibuat
75
+ - `token`: Token yang disalin
76
+ - `file`: File yang ingin diupload
77
+
78
+ ### D. Cek Hasil
79
+
80
+ File akan langsung muncul di:
81
+ ```
82
+ https://huggingface.co/datasets/username/my-dataset/tree/main
83
+ ```
84
+
85
+ ---
86
+
87
+ ## 🔧 Konfigurasi Lanjutan
88
+
89
+ ### Setup Environment Variables
90
+ ```bash
91
+ cp .env.example .env
92
+ # Edit .env dan set PORT, NODE_ENV, dll
93
+ ```
94
+
95
+ ### Deploy dengan Docker
96
+ ```bash
97
+ docker build -t vico-api .
98
+ docker run -p 3000:3000 vico-api
99
+ ```
100
+
101
+ ### Deploy dengan PM2
102
+ ```bash
103
+ npm install -g pm2
104
+ pm2 start server.js --name "vico"
105
+ pm2 save
106
+ pm2 startup
107
+ ```
108
+
109
+ ---
110
+
111
+ ## 📝 API Response Format
112
+
113
+ ### ✅ Success (200)
114
+ ```json
115
+ {
116
+ "success": true,
117
+ "message": "File berhasil di-upload ke Hugging Face",
118
+ "data": {
119
+ "file_name": "test.csv",
120
+ "file_size": 123,
121
+ "repo_id": "username/my-dataset",
122
+ "subfolder": "root",
123
+ "url": "https://huggingface.co/datasets/username/my-dataset/blob/main/test.csv",
124
+ "upload_timestamp": "2024-06-24T14:35:00.000Z"
125
+ }
126
+ }
127
+ ```
128
+
129
+ ### ❌ Error (400/500)
130
+ ```json
131
+ {
132
+ "success": false,
133
+ "error": "Error message here",
134
+ "required_fields": ["field1", "field2"]
135
+ }
136
+ ```
137
+
138
+ ---
139
+
140
+ ## 🐛 Troubleshooting
141
+
142
+ | Error | Solusi |
143
+ |-------|--------|
144
+ | `Connection refused` | Pastikan server running (`npm start`) |
145
+ | `Token tidak valid` | Cek token di https://huggingface.co/settings/tokens |
146
+ | `Repository tidak ditemukan` | Cek format: `username/dataset-name` (lowercase) |
147
+ | `File too large` | Max 100MB, ubah di server.js jika perlu |
148
+ | `Timeout` | File besar, tingkatkan timeout di hfUploader.js |
149
+
150
+ ---
151
+
152
+ ## 📚 Contoh Lengkap
153
+
154
+ ### cURL dengan file
155
+ ```bash
156
+ curl -X POST http://localhost:3000/api/upload \
157
+ -F "file=@data.json" \
158
+ -F "repo_id=john/datasets" \
159
+ -F "token=hf_abc123xyz" \
160
+ -F "subfolder=raw-data"
161
+ ```
162
+
163
+ ### Node.js
164
+ ```javascript
165
+ const FormData = require('form-data');
166
+ const axios = require('axios');
167
+ const fs = require('fs');
168
+
169
+ const form = new FormData();
170
+ form.append('file', fs.createReadStream('data.json'));
171
+ form.append('repo_id', 'john/datasets');
172
+ form.append('token', 'hf_abc123xyz');
173
+ form.append('subfolder', 'raw-data');
174
+
175
+ axios.post('http://localhost:3000/api/upload', form, {
176
+ headers: form.getHeaders()
177
+ }).then(res => console.log(res.data));
178
+ ```
179
+
180
+ ### Python
181
+ ```python
182
+ import requests
183
+
184
+ files = {'file': open('data.json', 'rb')}
185
+ data = {
186
+ 'repo_id': 'john/datasets',
187
+ 'token': 'hf_abc123xyz',
188
+ 'subfolder': 'raw-data'
189
+ }
190
+
191
+ r = requests.post('http://localhost:3000/api/upload', files=files, data=data)
192
+ print(r.json())
193
+ ```
194
+
195
+ ---
196
+
197
+ ## 📞 Support
198
+
199
+ Untuk bantuan lebih lanjut, lihat `README.md` untuk dokumentasi lengkap.
200
+
201
+ Happy uploading! 🚀
README.md CHANGED
@@ -1,10 +1,310 @@
1
- ---
2
- title: Ge
3
- emoji: 🏃
4
- colorFrom: purple
5
- colorTo: blue
6
- sdk: docker
7
- pinned: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ # Vico - Hugging Face File Upload API
2
+
3
+ API Node.js untuk upload file ke Hugging Face Dataset dengan response format JSON.
4
+
5
+ ## 🚀 Fitur
6
+
7
+ - ✅ Upload file ke Hugging Face Dataset via REST API
8
+ - ✅ Validasi file dan error handling
9
+ - ✅ Response JSON terstruktur
10
+ - ✅ Support subfolder dalam repository
11
+ - ✅ File size limit 100MB
12
+ - ✅ Automatic local file cleanup
13
+
14
+ ## 📋 Prerequisites
15
+
16
+ - Node.js v14 atau lebih tinggi
17
+ - npm atau yarn
18
+ - Hugging Face account dengan access token
19
+
20
+ ## 🔧 Instalasi
21
+
22
+ ### 1. Clone Repository
23
+ ```bash
24
+ git clone https://github.com/4cko/vico.git
25
+ cd vico
26
+ ```
27
+
28
+ ### 2. Install Dependencies
29
+ ```bash
30
+ npm install
31
+ ```
32
+
33
+ ### 3. Setup Environment Variables
34
+ ```bash
35
+ cp .env.example .env
36
+ # Edit .env sesuai kebutuhan (opsional)
37
+ ```
38
+
39
+ ### 4. Dapatkan Hugging Face Token
40
+ 1. Buka https://huggingface.co/settings/tokens
41
+ 2. Buat token baru dengan akses 'write'
42
+ 3. Simpan token tersebut
43
+
44
+ ## 🎯 Cara Menggunakan
45
+
46
+ ### 1. Jalankan Server
47
+ ```bash
48
+ # Development mode dengan auto-reload
49
+ npm run dev
50
+
51
+ # Production mode
52
+ npm start
53
+ ```
54
+
55
+ Server akan berjalan di `http://localhost:3000`
56
+
57
+ ### 2. Upload File
58
+
59
+ **Endpoint:** `POST /api/upload`
60
+
61
+ **Required Fields:**
62
+ - `file` - File yang akan di-upload (form-data)
63
+ - `repo_id` - Hugging Face repo ID (format: `username/dataset-name`)
64
+ - `token` - Hugging Face API token
65
+
66
+ **Optional Fields:**
67
+ - `subfolder` - Subfolder dalam repository (default: root)
68
+
69
+ #### Contoh menggunakan cURL:
70
+ ```bash
71
+ curl -X POST http://localhost:3000/api/upload \
72
+ -F "file=@/path/to/file.csv" \
73
+ -F "repo_id=username/my-dataset" \
74
+ -F "token=hf_xxxxxxxxxxxxxxxxxxxxxxx" \
75
+ -F "subfolder=data"
76
+ ```
77
+
78
+ #### Contoh menggunakan Python:
79
+ ```python
80
+ import requests
81
+
82
+ files = {
83
+ 'file': open('/path/to/file.csv', 'rb')
84
+ }
85
+ data = {
86
+ 'repo_id': 'username/my-dataset',
87
+ 'token': 'hf_xxxxxxxxxxxxxxxxxxxxxxx',
88
+ 'subfolder': 'data'
89
+ }
90
+
91
+ response = requests.post(
92
+ 'http://localhost:3000/api/upload',
93
+ files=files,
94
+ data=data
95
+ )
96
+
97
+ print(response.json())
98
+ ```
99
+
100
+ #### Contoh menggunakan JavaScript/Node.js:
101
+ ```javascript
102
+ const FormData = require('form-data');
103
+ const axios = require('axios');
104
+ const fs = require('fs');
105
+
106
+ async function uploadFile() {
107
+ const form = new FormData();
108
+ form.append('file', fs.createReadStream('/path/to/file.csv'));
109
+ form.append('repo_id', 'username/my-dataset');
110
+ form.append('token', 'hf_xxxxxxxxxxxxxxxxxxxxxxx');
111
+ form.append('subfolder', 'data');
112
+
113
+ try {
114
+ const response = await axios.post(
115
+ 'http://localhost:3000/api/upload',
116
+ form,
117
+ {
118
+ headers: form.getHeaders()
119
+ }
120
+ );
121
+ console.log(response.data);
122
+ } catch (error) {
123
+ console.error('Error:', error.response?.data || error.message);
124
+ }
125
+ }
126
+
127
+ uploadFile();
128
+ ```
129
+
130
+ #### Contoh menggunakan fetch (Browser/Node.js):
131
+ ```javascript
132
+ async function uploadFile() {
133
+ const formData = new FormData();
134
+ const fileInput = document.querySelector('input[type="file"]');
135
+
136
+ formData.append('file', fileInput.files[0]);
137
+ formData.append('repo_id', 'username/my-dataset');
138
+ formData.append('token', 'hf_xxxxxxxxxxxxxxxxxxxxxxx');
139
+ formData.append('subfolder', 'data');
140
+
141
+ try {
142
+ const response = await fetch('http://localhost:3000/api/upload', {
143
+ method: 'POST',
144
+ body: formData
145
+ });
146
+ const result = await response.json();
147
+ console.log(result);
148
+ } catch (error) {
149
+ console.error('Error:', error);
150
+ }
151
+ }
152
+ ```
153
+
154
+ ### 3. Response Format
155
+
156
+ #### ✅ Sukses Upload (Status 200):
157
+ ```json
158
+ {
159
+ "success": true,
160
+ "message": "File berhasil di-upload ke Hugging Face",
161
+ "data": {
162
+ "file_name": "data.csv",
163
+ "file_size": 12345,
164
+ "repo_id": "username/my-dataset",
165
+ "subfolder": "data",
166
+ "url": "https://huggingface.co/datasets/username/my-dataset/blob/main/data/data.csv",
167
+ "upload_timestamp": "2024-06-24T10:30:00.000Z"
168
+ }
169
+ }
170
+ ```
171
+
172
+ #### ❌ Error Response (Status 400/500):
173
+ ```json
174
+ {
175
+ "success": false,
176
+ "error": "repo_id dan token diperlukan",
177
+ "required_fields": ["repo_id", "token"]
178
+ }
179
+ ```
180
+
181
+ ```json
182
+ {
183
+ "success": false,
184
+ "error": "Token tidak valid atau expired"
185
+ }
186
+ ```
187
+
188
+ ```json
189
+ {
190
+ "success": false,
191
+ "error": "Repository tidak ditemukan: invalid/repo"
192
+ }
193
+ ```
194
+
195
+ ## 📝 API Documentation
196
+
197
+ ### GET /
198
+ Health check endpoint
199
+
200
+ **Response:**
201
+ ```json
202
+ {
203
+ "status": "ok",
204
+ "message": "Hugging Face File Upload API",
205
+ "version": "1.0.0",
206
+ "endpoints": {
207
+ "upload": {
208
+ "method": "POST",
209
+ "path": "/api/upload",
210
+ "description": "Upload file ke Hugging Face dataset",
211
+ "required": ["file", "repo_id", "token"],
212
+ "optional": ["subfolder"]
213
+ }
214
+ }
215
+ }
216
+ ```
217
+
218
+ ## 🔐 Security Notes
219
+
220
+ 1. **Token Protection:**
221
+ - Jangan commit `.env` file ke repository
222
+ - Gunakan environment variables untuk production
223
+ - Rotate token secara berkala
224
+
225
+ 2. **File Validation:**
226
+ - Max file size: 100MB
227
+ - File validation dilakukan pada server
228
+ - Automatic cleanup file lokal setelah upload
229
+
230
+ 3. **Error Handling:**
231
+ - Token tidak valid
232
+ - Repository tidak ditemukan
233
+ - Access denied
234
+ - Network errors
235
+
236
+ ## 📂 Project Structure
237
+
238
+ ```
239
+ vico/
240
+ ├── server.js # Main server file
241
+ ├── package.json # Dependencies
242
+ ├── .env.example # Environment variables template
243
+ ├── README.md # Documentation
244
+ ├── uploads/ # Temporary upload folder
245
+ └── utils/
246
+ └── hfUploader.js # Hugging Face upload utility
247
+ ```
248
+
249
+ ## 🐛 Troubleshooting
250
+
251
+ ### Token tidak valid
252
+ ```
253
+ Error: Token tidak valid atau expired
254
+ ```
255
+ **Solusi:** Check token di https://huggingface.co/settings/tokens
256
+
257
+ ### Repository tidak ditemukan
258
+ ```
259
+ Error: Repository tidak ditemukan: username/dataset
260
+ ```
261
+ **Solusi:**
262
+ - Pastikan dataset sudah di-create di Hugging Face
263
+ - Format: `username/dataset-name` (lowercase)
264
+
265
+ ### File terlalu besar
266
+ ```
267
+ Error: File too large
268
+ ```
269
+ **Solusi:** Max file size adalah 100MB. Ubah di server.js jika perlu
270
+
271
+ ### Connection timeout
272
+ ```
273
+ Error: timeout of 30000ms exceeded
274
+ ```
275
+ **Solusi:** Untuk file besar, tingkatkan timeout di utils/hfUploader.js
276
+
277
+ ## 🚀 Deployment
278
+
279
+ ### Menggunakan PM2 (Production)
280
+ ```bash
281
+ npm install -g pm2
282
+ pm2 start server.js --name "vico-api"
283
+ pm2 save
284
+ pm2 startup
285
+ ```
286
+
287
+ ### Menggunakan Docker
288
+ ```bash
289
+ # Create Dockerfile
290
+ docker build -t vico-api .
291
+ docker run -p 3000:3000 \
292
+ -e NODE_ENV=production \
293
+ vico-api
294
+ ```
295
+
296
+ ## 📄 License
297
+
298
+ MIT
299
+
300
+ ## 👤 Author
301
+
302
+ 4cko
303
+
304
+ ## 💬 Support
305
+
306
+ Untuk masalah atau pertanyaan, buka issue di repository ini.
307
+
308
  ---
309
 
310
+ **Catatan:** API ini menggunakan Hugging Face Hub API. Pastikan token memiliki akses 'write' untuk repository yang dituju.
examples/curl-upload.sh ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Contoh: Upload file menggunakan cURL
4
+ #
5
+ # Cara jalankan:
6
+ # chmod +x examples/curl-upload.sh
7
+ # ./examples/curl-upload.sh
8
+
9
+ # Konfigurasi
10
+ API_URL="${API_URL:-http://localhost:3000/api/upload}"
11
+ HF_TOKEN="${HF_TOKEN:-your_hf_token_here}"
12
+ REPO_ID="${HF_REPO_ID:-username/dataset-name}"
13
+ FILE_PATH="./examples/sample-data.csv"
14
+
15
+ echo "🚀 Hugging Face Upload API - cURL Example"
16
+ echo "=========================================="
17
+ echo ""
18
+
19
+ # Validasi file
20
+ if [ ! -f "$FILE_PATH" ]; then
21
+ echo "❌ File tidak ditemukan: $FILE_PATH"
22
+ echo "📝 Membuat file contoh..."
23
+ mkdir -p "$(dirname "$FILE_PATH")"
24
+ cat > "$FILE_PATH" << EOF
25
+ id,name,value
26
+ 1,Alice,100
27
+ 2,Bob,200
28
+ EOF
29
+ fi
30
+
31
+ # Upload file
32
+ echo "📤 Uploading file..."
33
+ echo " File: $FILE_PATH"
34
+ echo " Repo: $REPO_ID"
35
+ echo " API: $API_URL"
36
+ echo ""
37
+
38
+ curl -X POST "$API_URL" \
39
+ -F "file=@$FILE_PATH" \
40
+ -F "repo_id=$REPO_ID" \
41
+ -F "token=$HF_TOKEN" \
42
+ -F "subfolder=datasets" \
43
+ -H "Accept: application/json" | jq .
44
+
45
+ echo ""
46
+ echo "✅ Upload selesai!"
examples/index.html ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="id">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Vico - Hugging Face Upload</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ body {
15
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
16
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
17
+ min-height: 100vh;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ padding: 20px;
22
+ }
23
+
24
+ .container {
25
+ background: white;
26
+ border-radius: 10px;
27
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
28
+ max-width: 600px;
29
+ width: 100%;
30
+ padding: 40px;
31
+ }
32
+
33
+ h1 {
34
+ color: #333;
35
+ margin-bottom: 10px;
36
+ font-size: 28px;
37
+ }
38
+
39
+ .subtitle {
40
+ color: #666;
41
+ margin-bottom: 30px;
42
+ font-size: 14px;
43
+ }
44
+
45
+ .form-group {
46
+ margin-bottom: 20px;
47
+ }
48
+
49
+ label {
50
+ display: block;
51
+ margin-bottom: 8px;
52
+ color: #333;
53
+ font-weight: 600;
54
+ font-size: 14px;
55
+ }
56
+
57
+ input[type="text"],
58
+ input[type="password"],
59
+ textarea {
60
+ width: 100%;
61
+ padding: 12px;
62
+ border: 2px solid #e0e0e0;
63
+ border-radius: 5px;
64
+ font-size: 14px;
65
+ transition: border-color 0.3s;
66
+ font-family: 'Courier New', monospace;
67
+ }
68
+
69
+ input[type="text"]:focus,
70
+ input[type="password"]:focus,
71
+ textarea:focus {
72
+ outline: none;
73
+ border-color: #667eea;
74
+ }
75
+
76
+ input[type="file"] {
77
+ padding: 10px;
78
+ border: 2px dashed #667eea;
79
+ border-radius: 5px;
80
+ cursor: pointer;
81
+ }
82
+
83
+ .file-input-wrapper {
84
+ position: relative;
85
+ overflow: hidden;
86
+ }
87
+
88
+ button {
89
+ width: 100%;
90
+ padding: 12px;
91
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
92
+ color: white;
93
+ border: none;
94
+ border-radius: 5px;
95
+ font-size: 16px;
96
+ font-weight: 600;
97
+ cursor: pointer;
98
+ transition: transform 0.2s, box-shadow 0.2s;
99
+ }
100
+
101
+ button:hover {
102
+ transform: translateY(-2px);
103
+ box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
104
+ }
105
+
106
+ button:disabled {
107
+ opacity: 0.6;
108
+ cursor: not-allowed;
109
+ transform: none;
110
+ }
111
+
112
+ .loading {
113
+ display: none;
114
+ text-align: center;
115
+ margin: 20px 0;
116
+ }
117
+
118
+ .spinner {
119
+ border: 3px solid #f3f3f3;
120
+ border-top: 3px solid #667eea;
121
+ border-radius: 50%;
122
+ width: 30px;
123
+ height: 30px;
124
+ animation: spin 1s linear infinite;
125
+ margin: 0 auto 10px;
126
+ }
127
+
128
+ @keyframes spin {
129
+ 0% { transform: rotate(0deg); }
130
+ 100% { transform: rotate(360deg); }
131
+ }
132
+
133
+ .result {
134
+ display: none;
135
+ margin-top: 20px;
136
+ padding: 15px;
137
+ border-radius: 5px;
138
+ font-size: 14px;
139
+ }
140
+
141
+ .result.success {
142
+ background: #d4edda;
143
+ color: #155724;
144
+ border: 1px solid #c3e6cb;
145
+ }
146
+
147
+ .result.error {
148
+ background: #f8d7da;
149
+ color: #721c24;
150
+ border: 1px solid #f5c6cb;
151
+ }
152
+
153
+ .result-content {
154
+ margin-top: 10px;
155
+ background: rgba(255, 255, 255, 0.5);
156
+ padding: 10px;
157
+ border-radius: 3px;
158
+ overflow-x: auto;
159
+ font-family: 'Courier New', monospace;
160
+ font-size: 12px;
161
+ }
162
+
163
+ .file-info {
164
+ display: none;
165
+ background: #f5f5f5;
166
+ padding: 10px;
167
+ border-radius: 5px;
168
+ margin-bottom: 10px;
169
+ font-size: 13px;
170
+ color: #666;
171
+ }
172
+
173
+ .file-info.show {
174
+ display: block;
175
+ }
176
+
177
+ .helper-text {
178
+ font-size: 12px;
179
+ color: #999;
180
+ margin-top: 5px;
181
+ }
182
+ </style>
183
+ </head>
184
+ <body>
185
+ <div class="container">
186
+ <h1>🚀 Vico</h1>
187
+ <p class="subtitle">Upload file ke Hugging Face Dataset</p>
188
+
189
+ <form id="uploadForm">
190
+ <!-- Hugging Face Token -->
191
+ <div class="form-group">
192
+ <label for="token">Hugging Face Token *</label>
193
+ <input
194
+ type="password"
195
+ id="token"
196
+ placeholder="hf_xxxxxxxxxxxxxxxxxxxxxxx"
197
+ required
198
+ >
199
+ <p class="helper-text">
200
+ Dapatkan di: <a href="https://huggingface.co/settings/tokens" target="_blank">
201
+ huggingface.co/settings/tokens</a>
202
+ </p>
203
+ </div>
204
+
205
+ <!-- Repository ID -->
206
+ <div class="form-group">
207
+ <label for="repoId">Repository ID *</label>
208
+ <input
209
+ type="text"
210
+ id="repoId"
211
+ placeholder="username/dataset-name"
212
+ required
213
+ >
214
+ <p class="helper-text">Format: username/dataset-name (lowercase)</p>
215
+ </div>
216
+
217
+ <!-- Subfolder -->
218
+ <div class="form-group">
219
+ <label for="subfolder">Subfolder (Opsional)</label>
220
+ <input
221
+ type="text"
222
+ id="subfolder"
223
+ placeholder="data, datasets, dll"
224
+ >
225
+ <p class="helper-text">Biarkan kosong untuk upload ke root</p>
226
+ </div>
227
+
228
+ <!-- File Upload -->
229
+ <div class="form-group">
230
+ <label for="file">Pilih File *</label>
231
+ <div class="file-input-wrapper">
232
+ <input
233
+ type="file"
234
+ id="file"
235
+ required
236
+ >
237
+ </div>
238
+ <div id="fileInfo" class="file-info">
239
+ <span id="fileName"></span>
240
+ (<span id="fileSize"></span>)
241
+ </div>
242
+ </div>
243
+
244
+ <!-- Submit Button -->
245
+ <button type="submit" id="submitBtn">Upload File</button>
246
+
247
+ <!-- Loading State -->
248
+ <div class="loading" id="loading">
249
+ <div class="spinner"></div>
250
+ <p>Mengupload...</p>
251
+ </div>
252
+
253
+ <!-- Result Message -->
254
+ <div class="result" id="result">
255
+ <div id="resultContent"></div>
256
+ </div>
257
+ </form>
258
+ </div>
259
+
260
+ <script>
261
+ const API_URL = 'http://localhost:3000/api/upload';
262
+
263
+ // File input handler
264
+ document.getElementById('file').addEventListener('change', function(e) {
265
+ const file = e.target.files[0];
266
+ if (file) {
267
+ const fileInfo = document.getElementById('fileInfo');
268
+ document.getElementById('fileName').textContent = file.name;
269
+ document.getElementById('fileSize').textContent = formatFileSize(file.size);
270
+ fileInfo.classList.add('show');
271
+ }
272
+ });
273
+
274
+ // Format file size
275
+ function formatFileSize(bytes) {
276
+ if (bytes === 0) return '0 Bytes';
277
+ const k = 1024;
278
+ const sizes = ['Bytes', 'KB', 'MB', 'GB'];
279
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
280
+ return Math.round(bytes / Math.pow(k, i) * 100) / 100 + ' ' + sizes[i];
281
+ }
282
+
283
+ // Form submit handler
284
+ document.getElementById('uploadForm').addEventListener('submit', async function(e) {
285
+ e.preventDefault();
286
+
287
+ const file = document.getElementById('file').files[0];
288
+ const token = document.getElementById('token').value;
289
+ const repoId = document.getElementById('repoId').value;
290
+ const subfolder = document.getElementById('subfolder').value;
291
+
292
+ if (!file || !token || !repoId) {
293
+ alert('Harap isi semua field yang diperlukan');
294
+ return;
295
+ }
296
+
297
+ // Show loading state
298
+ const submitBtn = document.getElementById('submitBtn');
299
+ const loading = document.getElementById('loading');
300
+ const result = document.getElementById('result');
301
+
302
+ submitBtn.disabled = true;
303
+ loading.style.display = 'block';
304
+ result.style.display = 'none';
305
+
306
+ try {
307
+ // Create FormData
308
+ const formData = new FormData();
309
+ formData.append('file', file);
310
+ formData.append('repo_id', repoId);
311
+ formData.append('token', token);
312
+ if (subfolder) {
313
+ formData.append('subfolder', subfolder);
314
+ }
315
+
316
+ // Upload
317
+ const response = await fetch(API_URL, {
318
+ method: 'POST',
319
+ body: formData
320
+ });
321
+
322
+ const data = await response.json();
323
+
324
+ // Show result
325
+ if (data.success) {
326
+ result.classList.remove('error');
327
+ result.classList.add('success');
328
+ result.innerHTML = `
329
+ <strong>✅ ${data.message}</strong>
330
+ <div class="result-content">
331
+ <strong>File:</strong> ${data.data.file_name}<br>
332
+ <strong>Size:</strong> ${formatFileSize(data.data.file_size)}<br>
333
+ <strong>Repo:</strong> ${data.data.repo_id}<br>
334
+ <strong>URL:</strong> <a href="${data.data.url}" target="_blank">${data.data.url}</a><br>
335
+ <strong>Time:</strong> ${new Date(data.data.upload_timestamp).toLocaleString('id-ID')}
336
+ </div>
337
+ `;
338
+ } else {
339
+ result.classList.remove('success');
340
+ result.classList.add('error');
341
+ result.innerHTML = `
342
+ <strong>❌ ${data.error}</strong>
343
+ <div class="result-content">${JSON.stringify(data, null, 2)}</div>
344
+ `;
345
+ }
346
+
347
+ result.style.display = 'block';
348
+
349
+ } catch (error) {
350
+ result.classList.remove('success');
351
+ result.classList.add('error');
352
+ result.innerHTML = `
353
+ <strong>❌ Error: ${error.message}</strong>
354
+ <div class="result-content">
355
+ Pastikan API server berjalan di ${API_URL}
356
+ </div>
357
+ `;
358
+ result.style.display = 'block';
359
+ } finally {
360
+ submitBtn.disabled = false;
361
+ loading.style.display = 'none';
362
+ }
363
+ });
364
+ </script>
365
+ </body>
366
+ </html>
examples/nodejs-axios.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Contoh: Upload file menggunakan Node.js + axios
3
+ *
4
+ * Cara jalankan:
5
+ * node examples/nodejs-axios.js
6
+ */
7
+
8
+ const FormData = require('form-data');
9
+ const axios = require('axios');
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+
13
+ // Konfigurasi
14
+ const API_URL = 'http://localhost:3000/api/upload';
15
+ const HF_TOKEN = process.env.HF_TOKEN || 'your_hf_token_here';
16
+ const REPO_ID = process.env.HF_REPO_ID || 'username/dataset-name';
17
+ const FILE_PATH = './examples/sample-data.csv';
18
+
19
+ async function uploadFile() {
20
+ try {
21
+ // Validasi file
22
+ if (!fs.existsSync(FILE_PATH)) {
23
+ console.error(`❌ File tidak ditemukan: ${FILE_PATH}`);
24
+ console.log('Buat file contoh...');
25
+ fs.writeFileSync(FILE_PATH, 'id,name,value\n1,Alice,100\n2,Bob,200\n');
26
+ }
27
+
28
+ // Setup form data
29
+ const form = new FormData();
30
+ form.append('file', fs.createReadStream(FILE_PATH));
31
+ form.append('repo_id', REPO_ID);
32
+ form.append('token', HF_TOKEN);
33
+ form.append('subfolder', 'datasets');
34
+
35
+ // Request
36
+ console.log('📤 Uploading file...');
37
+ const response = await axios.post(API_URL, form, {
38
+ headers: form.getHeaders(),
39
+ timeout: 30000
40
+ });
41
+
42
+ // Response
43
+ console.log('✅ Upload berhasil!');
44
+ console.log('📊 Response:');
45
+ console.log(JSON.stringify(response.data, null, 2));
46
+
47
+ return response.data;
48
+
49
+ } catch (error) {
50
+ console.error('❌ Error:', error.response?.data || error.message);
51
+ process.exit(1);
52
+ }
53
+ }
54
+
55
+ // Jalankan
56
+ uploadFile();
examples/python-requests.py ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Contoh: Upload file menggunakan Python + requests
4
+
5
+ Cara jalankan:
6
+ python3 examples/python-requests.py
7
+ """
8
+
9
+ import requests
10
+ import os
11
+ import sys
12
+ from pathlib import Path
13
+
14
+ # Konfigurasi
15
+ API_URL = 'http://localhost:3000/api/upload'
16
+ HF_TOKEN = os.getenv('HF_TOKEN', 'your_hf_token_here')
17
+ REPO_ID = os.getenv('HF_REPO_ID', 'username/dataset-name')
18
+ FILE_PATH = './examples/sample-data.csv'
19
+
20
+ def upload_file():
21
+ """Upload file ke API"""
22
+
23
+ # Validasi file
24
+ if not Path(FILE_PATH).exists():
25
+ print(f'❌ File tidak ditemukan: {FILE_PATH}')
26
+ print('📝 Membuat file contoh...')
27
+ with open(FILE_PATH, 'w') as f:
28
+ f.write('id,name,value\n')
29
+ f.write('1,Alice,100\n')
30
+ f.write('2,Bob,200\n')
31
+
32
+ try:
33
+ # Setup request
34
+ with open(FILE_PATH, 'rb') as f:
35
+ files = {'file': f}
36
+ data = {
37
+ 'repo_id': REPO_ID,
38
+ 'token': HF_TOKEN,
39
+ 'subfolder': 'datasets'
40
+ }
41
+
42
+ print('📤 Uploading file...')
43
+ response = requests.post(
44
+ API_URL,
45
+ files=files,
46
+ data=data,
47
+ timeout=30
48
+ )
49
+
50
+ # Check response
51
+ if response.status_code == 200:
52
+ result = response.json()
53
+ print('✅ Upload berhasil!')
54
+ print('📊 Response:')
55
+ import json
56
+ print(json.dumps(result, indent=2))
57
+ return result
58
+ else:
59
+ print(f'❌ Error {response.status_code}:')
60
+ print(response.json())
61
+ sys.exit(1)
62
+
63
+ except requests.exceptions.ConnectionError:
64
+ print('❌ Tidak dapat connect ke API')
65
+ print(f' Pastikan server berjalan di {API_URL}')
66
+ sys.exit(1)
67
+ except Exception as e:
68
+ print(f'❌ Error: {str(e)}')
69
+ sys.exit(1)
70
+
71
+ if __name__ == '__main__':
72
+ upload_file()
node_modules/.bin/mime ADDED
@@ -0,0 +1 @@
 
 
1
+ ../mime/cli.js
node_modules/.bin/mkdirp ADDED
@@ -0,0 +1 @@
 
 
1
+ ../mkdirp/bin/cmd.js
node_modules/.bin/nodemon ADDED
@@ -0,0 +1 @@
 
 
1
+ ../nodemon/bin/nodemon.js
node_modules/.bin/nodetouch ADDED
@@ -0,0 +1 @@
 
 
1
+ ../touch/bin/nodetouch.js
node_modules/.bin/semver ADDED
@@ -0,0 +1 @@
 
 
1
+ ../semver/bin/semver.js
node_modules/.package-lock.json ADDED
@@ -0,0 +1,1546 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vico-hf-upload",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "node_modules/accepts": {
8
+ "version": "1.3.8",
9
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
10
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
11
+ "license": "MIT",
12
+ "dependencies": {
13
+ "mime-types": "~2.1.34",
14
+ "negotiator": "0.6.3"
15
+ },
16
+ "engines": {
17
+ "node": ">= 0.6"
18
+ }
19
+ },
20
+ "node_modules/agent-base": {
21
+ "version": "6.0.2",
22
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
23
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
24
+ "license": "MIT",
25
+ "dependencies": {
26
+ "debug": "4"
27
+ },
28
+ "engines": {
29
+ "node": ">= 6.0.0"
30
+ }
31
+ },
32
+ "node_modules/agent-base/node_modules/debug": {
33
+ "version": "4.4.3",
34
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
35
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
36
+ "license": "MIT",
37
+ "dependencies": {
38
+ "ms": "^2.1.3"
39
+ },
40
+ "engines": {
41
+ "node": ">=6.0"
42
+ },
43
+ "peerDependenciesMeta": {
44
+ "supports-color": {
45
+ "optional": true
46
+ }
47
+ }
48
+ },
49
+ "node_modules/agent-base/node_modules/ms": {
50
+ "version": "2.1.3",
51
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
52
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
53
+ "license": "MIT"
54
+ },
55
+ "node_modules/anymatch": {
56
+ "version": "3.1.3",
57
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
58
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
59
+ "dev": true,
60
+ "license": "ISC",
61
+ "dependencies": {
62
+ "normalize-path": "^3.0.0",
63
+ "picomatch": "^2.0.4"
64
+ },
65
+ "engines": {
66
+ "node": ">= 8"
67
+ }
68
+ },
69
+ "node_modules/append-field": {
70
+ "version": "1.0.0",
71
+ "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
72
+ "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==",
73
+ "license": "MIT"
74
+ },
75
+ "node_modules/array-flatten": {
76
+ "version": "1.1.1",
77
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
78
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
79
+ "license": "MIT"
80
+ },
81
+ "node_modules/asynckit": {
82
+ "version": "0.4.0",
83
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
84
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
85
+ "license": "MIT"
86
+ },
87
+ "node_modules/axios": {
88
+ "version": "1.18.1",
89
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz",
90
+ "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==",
91
+ "license": "MIT",
92
+ "dependencies": {
93
+ "follow-redirects": "^1.16.0",
94
+ "form-data": "^4.0.5",
95
+ "https-proxy-agent": "^5.0.1",
96
+ "proxy-from-env": "^2.1.0"
97
+ }
98
+ },
99
+ "node_modules/balanced-match": {
100
+ "version": "4.0.4",
101
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
102
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
103
+ "dev": true,
104
+ "license": "MIT",
105
+ "engines": {
106
+ "node": "18 || 20 || >=22"
107
+ }
108
+ },
109
+ "node_modules/binary-extensions": {
110
+ "version": "2.3.0",
111
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
112
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
113
+ "dev": true,
114
+ "license": "MIT",
115
+ "engines": {
116
+ "node": ">=8"
117
+ },
118
+ "funding": {
119
+ "url": "https://github.com/sponsors/sindresorhus"
120
+ }
121
+ },
122
+ "node_modules/body-parser": {
123
+ "version": "1.20.5",
124
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz",
125
+ "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==",
126
+ "license": "MIT",
127
+ "dependencies": {
128
+ "bytes": "~3.1.2",
129
+ "content-type": "~1.0.5",
130
+ "debug": "2.6.9",
131
+ "depd": "2.0.0",
132
+ "destroy": "~1.2.0",
133
+ "http-errors": "~2.0.1",
134
+ "iconv-lite": "~0.4.24",
135
+ "on-finished": "~2.4.1",
136
+ "qs": "~6.15.1",
137
+ "raw-body": "~2.5.3",
138
+ "type-is": "~1.6.18",
139
+ "unpipe": "~1.0.0"
140
+ },
141
+ "engines": {
142
+ "node": ">= 0.8",
143
+ "npm": "1.2.8000 || >= 1.4.16"
144
+ }
145
+ },
146
+ "node_modules/brace-expansion": {
147
+ "version": "5.0.6",
148
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
149
+ "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
150
+ "dev": true,
151
+ "license": "MIT",
152
+ "dependencies": {
153
+ "balanced-match": "^4.0.2"
154
+ },
155
+ "engines": {
156
+ "node": "18 || 20 || >=22"
157
+ }
158
+ },
159
+ "node_modules/braces": {
160
+ "version": "3.0.3",
161
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
162
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
163
+ "dev": true,
164
+ "license": "MIT",
165
+ "dependencies": {
166
+ "fill-range": "^7.1.1"
167
+ },
168
+ "engines": {
169
+ "node": ">=8"
170
+ }
171
+ },
172
+ "node_modules/buffer-from": {
173
+ "version": "1.1.2",
174
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
175
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
176
+ "license": "MIT"
177
+ },
178
+ "node_modules/busboy": {
179
+ "version": "1.6.0",
180
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
181
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
182
+ "dependencies": {
183
+ "streamsearch": "^1.1.0"
184
+ },
185
+ "engines": {
186
+ "node": ">=10.16.0"
187
+ }
188
+ },
189
+ "node_modules/bytes": {
190
+ "version": "3.1.2",
191
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
192
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
193
+ "license": "MIT",
194
+ "engines": {
195
+ "node": ">= 0.8"
196
+ }
197
+ },
198
+ "node_modules/call-bind-apply-helpers": {
199
+ "version": "1.0.2",
200
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
201
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
202
+ "license": "MIT",
203
+ "dependencies": {
204
+ "es-errors": "^1.3.0",
205
+ "function-bind": "^1.1.2"
206
+ },
207
+ "engines": {
208
+ "node": ">= 0.4"
209
+ }
210
+ },
211
+ "node_modules/call-bound": {
212
+ "version": "1.0.4",
213
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
214
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
215
+ "license": "MIT",
216
+ "dependencies": {
217
+ "call-bind-apply-helpers": "^1.0.2",
218
+ "get-intrinsic": "^1.3.0"
219
+ },
220
+ "engines": {
221
+ "node": ">= 0.4"
222
+ },
223
+ "funding": {
224
+ "url": "https://github.com/sponsors/ljharb"
225
+ }
226
+ },
227
+ "node_modules/chokidar": {
228
+ "version": "3.6.0",
229
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
230
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
231
+ "dev": true,
232
+ "license": "MIT",
233
+ "dependencies": {
234
+ "anymatch": "~3.1.2",
235
+ "braces": "~3.0.2",
236
+ "glob-parent": "~5.1.2",
237
+ "is-binary-path": "~2.1.0",
238
+ "is-glob": "~4.0.1",
239
+ "normalize-path": "~3.0.0",
240
+ "readdirp": "~3.6.0"
241
+ },
242
+ "engines": {
243
+ "node": ">= 8.10.0"
244
+ },
245
+ "funding": {
246
+ "url": "https://paulmillr.com/funding/"
247
+ },
248
+ "optionalDependencies": {
249
+ "fsevents": "~2.3.2"
250
+ }
251
+ },
252
+ "node_modules/combined-stream": {
253
+ "version": "1.0.8",
254
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
255
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
256
+ "license": "MIT",
257
+ "dependencies": {
258
+ "delayed-stream": "~1.0.0"
259
+ },
260
+ "engines": {
261
+ "node": ">= 0.8"
262
+ }
263
+ },
264
+ "node_modules/concat-stream": {
265
+ "version": "1.6.2",
266
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
267
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
268
+ "engines": [
269
+ "node >= 0.8"
270
+ ],
271
+ "license": "MIT",
272
+ "dependencies": {
273
+ "buffer-from": "^1.0.0",
274
+ "inherits": "^2.0.3",
275
+ "readable-stream": "^2.2.2",
276
+ "typedarray": "^0.0.6"
277
+ }
278
+ },
279
+ "node_modules/content-disposition": {
280
+ "version": "0.5.4",
281
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
282
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
283
+ "license": "MIT",
284
+ "dependencies": {
285
+ "safe-buffer": "5.2.1"
286
+ },
287
+ "engines": {
288
+ "node": ">= 0.6"
289
+ }
290
+ },
291
+ "node_modules/content-type": {
292
+ "version": "1.0.5",
293
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
294
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
295
+ "license": "MIT",
296
+ "engines": {
297
+ "node": ">= 0.6"
298
+ }
299
+ },
300
+ "node_modules/cookie": {
301
+ "version": "0.7.2",
302
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
303
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
304
+ "license": "MIT",
305
+ "engines": {
306
+ "node": ">= 0.6"
307
+ }
308
+ },
309
+ "node_modules/cookie-signature": {
310
+ "version": "1.0.7",
311
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
312
+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
313
+ "license": "MIT"
314
+ },
315
+ "node_modules/core-util-is": {
316
+ "version": "1.0.3",
317
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
318
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
319
+ "license": "MIT"
320
+ },
321
+ "node_modules/debug": {
322
+ "version": "2.6.9",
323
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
324
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
325
+ "license": "MIT",
326
+ "dependencies": {
327
+ "ms": "2.0.0"
328
+ }
329
+ },
330
+ "node_modules/delayed-stream": {
331
+ "version": "1.0.0",
332
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
333
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
334
+ "license": "MIT",
335
+ "engines": {
336
+ "node": ">=0.4.0"
337
+ }
338
+ },
339
+ "node_modules/depd": {
340
+ "version": "2.0.0",
341
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
342
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
343
+ "license": "MIT",
344
+ "engines": {
345
+ "node": ">= 0.8"
346
+ }
347
+ },
348
+ "node_modules/destroy": {
349
+ "version": "1.2.0",
350
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
351
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
352
+ "license": "MIT",
353
+ "engines": {
354
+ "node": ">= 0.8",
355
+ "npm": "1.2.8000 || >= 1.4.16"
356
+ }
357
+ },
358
+ "node_modules/dotenv": {
359
+ "version": "16.6.1",
360
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
361
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
362
+ "license": "BSD-2-Clause",
363
+ "engines": {
364
+ "node": ">=12"
365
+ },
366
+ "funding": {
367
+ "url": "https://dotenvx.com"
368
+ }
369
+ },
370
+ "node_modules/dunder-proto": {
371
+ "version": "1.0.1",
372
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
373
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
374
+ "license": "MIT",
375
+ "dependencies": {
376
+ "call-bind-apply-helpers": "^1.0.1",
377
+ "es-errors": "^1.3.0",
378
+ "gopd": "^1.2.0"
379
+ },
380
+ "engines": {
381
+ "node": ">= 0.4"
382
+ }
383
+ },
384
+ "node_modules/ee-first": {
385
+ "version": "1.1.1",
386
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
387
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
388
+ "license": "MIT"
389
+ },
390
+ "node_modules/encodeurl": {
391
+ "version": "2.0.0",
392
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
393
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
394
+ "license": "MIT",
395
+ "engines": {
396
+ "node": ">= 0.8"
397
+ }
398
+ },
399
+ "node_modules/es-define-property": {
400
+ "version": "1.0.1",
401
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
402
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
403
+ "license": "MIT",
404
+ "engines": {
405
+ "node": ">= 0.4"
406
+ }
407
+ },
408
+ "node_modules/es-errors": {
409
+ "version": "1.3.0",
410
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
411
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
412
+ "license": "MIT",
413
+ "engines": {
414
+ "node": ">= 0.4"
415
+ }
416
+ },
417
+ "node_modules/es-object-atoms": {
418
+ "version": "1.1.2",
419
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
420
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
421
+ "license": "MIT",
422
+ "dependencies": {
423
+ "es-errors": "^1.3.0"
424
+ },
425
+ "engines": {
426
+ "node": ">= 0.4"
427
+ }
428
+ },
429
+ "node_modules/es-set-tostringtag": {
430
+ "version": "2.1.0",
431
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
432
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
433
+ "license": "MIT",
434
+ "dependencies": {
435
+ "es-errors": "^1.3.0",
436
+ "get-intrinsic": "^1.2.6",
437
+ "has-tostringtag": "^1.0.2",
438
+ "hasown": "^2.0.2"
439
+ },
440
+ "engines": {
441
+ "node": ">= 0.4"
442
+ }
443
+ },
444
+ "node_modules/escape-html": {
445
+ "version": "1.0.3",
446
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
447
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
448
+ "license": "MIT"
449
+ },
450
+ "node_modules/etag": {
451
+ "version": "1.8.1",
452
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
453
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
454
+ "license": "MIT",
455
+ "engines": {
456
+ "node": ">= 0.6"
457
+ }
458
+ },
459
+ "node_modules/express": {
460
+ "version": "4.22.2",
461
+ "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
462
+ "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==",
463
+ "license": "MIT",
464
+ "dependencies": {
465
+ "accepts": "~1.3.8",
466
+ "array-flatten": "1.1.1",
467
+ "body-parser": "~1.20.5",
468
+ "content-disposition": "~0.5.4",
469
+ "content-type": "~1.0.4",
470
+ "cookie": "~0.7.1",
471
+ "cookie-signature": "~1.0.6",
472
+ "debug": "2.6.9",
473
+ "depd": "2.0.0",
474
+ "encodeurl": "~2.0.0",
475
+ "escape-html": "~1.0.3",
476
+ "etag": "~1.8.1",
477
+ "finalhandler": "~1.3.1",
478
+ "fresh": "~0.5.2",
479
+ "http-errors": "~2.0.0",
480
+ "merge-descriptors": "1.0.3",
481
+ "methods": "~1.1.2",
482
+ "on-finished": "~2.4.1",
483
+ "parseurl": "~1.3.3",
484
+ "path-to-regexp": "~0.1.12",
485
+ "proxy-addr": "~2.0.7",
486
+ "qs": "~6.15.1",
487
+ "range-parser": "~1.2.1",
488
+ "safe-buffer": "5.2.1",
489
+ "send": "~0.19.0",
490
+ "serve-static": "~1.16.2",
491
+ "setprototypeof": "1.2.0",
492
+ "statuses": "~2.0.1",
493
+ "type-is": "~1.6.18",
494
+ "utils-merge": "1.0.1",
495
+ "vary": "~1.1.2"
496
+ },
497
+ "engines": {
498
+ "node": ">= 0.10.0"
499
+ },
500
+ "funding": {
501
+ "type": "opencollective",
502
+ "url": "https://opencollective.com/express"
503
+ }
504
+ },
505
+ "node_modules/fill-range": {
506
+ "version": "7.1.1",
507
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
508
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
509
+ "dev": true,
510
+ "license": "MIT",
511
+ "dependencies": {
512
+ "to-regex-range": "^5.0.1"
513
+ },
514
+ "engines": {
515
+ "node": ">=8"
516
+ }
517
+ },
518
+ "node_modules/finalhandler": {
519
+ "version": "1.3.2",
520
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
521
+ "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
522
+ "license": "MIT",
523
+ "dependencies": {
524
+ "debug": "2.6.9",
525
+ "encodeurl": "~2.0.0",
526
+ "escape-html": "~1.0.3",
527
+ "on-finished": "~2.4.1",
528
+ "parseurl": "~1.3.3",
529
+ "statuses": "~2.0.2",
530
+ "unpipe": "~1.0.0"
531
+ },
532
+ "engines": {
533
+ "node": ">= 0.8"
534
+ }
535
+ },
536
+ "node_modules/follow-redirects": {
537
+ "version": "1.16.0",
538
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
539
+ "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
540
+ "funding": [
541
+ {
542
+ "type": "individual",
543
+ "url": "https://github.com/sponsors/RubenVerborgh"
544
+ }
545
+ ],
546
+ "license": "MIT",
547
+ "engines": {
548
+ "node": ">=4.0"
549
+ },
550
+ "peerDependenciesMeta": {
551
+ "debug": {
552
+ "optional": true
553
+ }
554
+ }
555
+ },
556
+ "node_modules/form-data": {
557
+ "version": "4.0.6",
558
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
559
+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
560
+ "license": "MIT",
561
+ "dependencies": {
562
+ "asynckit": "^0.4.0",
563
+ "combined-stream": "^1.0.8",
564
+ "es-set-tostringtag": "^2.1.0",
565
+ "hasown": "^2.0.4",
566
+ "mime-types": "^2.1.35"
567
+ },
568
+ "engines": {
569
+ "node": ">= 6"
570
+ }
571
+ },
572
+ "node_modules/forwarded": {
573
+ "version": "0.2.0",
574
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
575
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
576
+ "license": "MIT",
577
+ "engines": {
578
+ "node": ">= 0.6"
579
+ }
580
+ },
581
+ "node_modules/fresh": {
582
+ "version": "0.5.2",
583
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
584
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
585
+ "license": "MIT",
586
+ "engines": {
587
+ "node": ">= 0.6"
588
+ }
589
+ },
590
+ "node_modules/function-bind": {
591
+ "version": "1.1.2",
592
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
593
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
594
+ "license": "MIT",
595
+ "funding": {
596
+ "url": "https://github.com/sponsors/ljharb"
597
+ }
598
+ },
599
+ "node_modules/get-intrinsic": {
600
+ "version": "1.3.0",
601
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
602
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
603
+ "license": "MIT",
604
+ "dependencies": {
605
+ "call-bind-apply-helpers": "^1.0.2",
606
+ "es-define-property": "^1.0.1",
607
+ "es-errors": "^1.3.0",
608
+ "es-object-atoms": "^1.1.1",
609
+ "function-bind": "^1.1.2",
610
+ "get-proto": "^1.0.1",
611
+ "gopd": "^1.2.0",
612
+ "has-symbols": "^1.1.0",
613
+ "hasown": "^2.0.2",
614
+ "math-intrinsics": "^1.1.0"
615
+ },
616
+ "engines": {
617
+ "node": ">= 0.4"
618
+ },
619
+ "funding": {
620
+ "url": "https://github.com/sponsors/ljharb"
621
+ }
622
+ },
623
+ "node_modules/get-proto": {
624
+ "version": "1.0.1",
625
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
626
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
627
+ "license": "MIT",
628
+ "dependencies": {
629
+ "dunder-proto": "^1.0.1",
630
+ "es-object-atoms": "^1.0.0"
631
+ },
632
+ "engines": {
633
+ "node": ">= 0.4"
634
+ }
635
+ },
636
+ "node_modules/glob-parent": {
637
+ "version": "5.1.2",
638
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
639
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
640
+ "dev": true,
641
+ "license": "ISC",
642
+ "dependencies": {
643
+ "is-glob": "^4.0.1"
644
+ },
645
+ "engines": {
646
+ "node": ">= 6"
647
+ }
648
+ },
649
+ "node_modules/gopd": {
650
+ "version": "1.2.0",
651
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
652
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
653
+ "license": "MIT",
654
+ "engines": {
655
+ "node": ">= 0.4"
656
+ },
657
+ "funding": {
658
+ "url": "https://github.com/sponsors/ljharb"
659
+ }
660
+ },
661
+ "node_modules/has-flag": {
662
+ "version": "3.0.0",
663
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
664
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
665
+ "dev": true,
666
+ "license": "MIT",
667
+ "engines": {
668
+ "node": ">=4"
669
+ }
670
+ },
671
+ "node_modules/has-symbols": {
672
+ "version": "1.1.0",
673
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
674
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
675
+ "license": "MIT",
676
+ "engines": {
677
+ "node": ">= 0.4"
678
+ },
679
+ "funding": {
680
+ "url": "https://github.com/sponsors/ljharb"
681
+ }
682
+ },
683
+ "node_modules/has-tostringtag": {
684
+ "version": "1.0.2",
685
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
686
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
687
+ "license": "MIT",
688
+ "dependencies": {
689
+ "has-symbols": "^1.0.3"
690
+ },
691
+ "engines": {
692
+ "node": ">= 0.4"
693
+ },
694
+ "funding": {
695
+ "url": "https://github.com/sponsors/ljharb"
696
+ }
697
+ },
698
+ "node_modules/hasown": {
699
+ "version": "2.0.4",
700
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
701
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
702
+ "license": "MIT",
703
+ "dependencies": {
704
+ "function-bind": "^1.1.2"
705
+ },
706
+ "engines": {
707
+ "node": ">= 0.4"
708
+ }
709
+ },
710
+ "node_modules/http-errors": {
711
+ "version": "2.0.1",
712
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
713
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
714
+ "license": "MIT",
715
+ "dependencies": {
716
+ "depd": "~2.0.0",
717
+ "inherits": "~2.0.4",
718
+ "setprototypeof": "~1.2.0",
719
+ "statuses": "~2.0.2",
720
+ "toidentifier": "~1.0.1"
721
+ },
722
+ "engines": {
723
+ "node": ">= 0.8"
724
+ },
725
+ "funding": {
726
+ "type": "opencollective",
727
+ "url": "https://opencollective.com/express"
728
+ }
729
+ },
730
+ "node_modules/https-proxy-agent": {
731
+ "version": "5.0.1",
732
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
733
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
734
+ "license": "MIT",
735
+ "dependencies": {
736
+ "agent-base": "6",
737
+ "debug": "4"
738
+ },
739
+ "engines": {
740
+ "node": ">= 6"
741
+ }
742
+ },
743
+ "node_modules/https-proxy-agent/node_modules/debug": {
744
+ "version": "4.4.3",
745
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
746
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
747
+ "license": "MIT",
748
+ "dependencies": {
749
+ "ms": "^2.1.3"
750
+ },
751
+ "engines": {
752
+ "node": ">=6.0"
753
+ },
754
+ "peerDependenciesMeta": {
755
+ "supports-color": {
756
+ "optional": true
757
+ }
758
+ }
759
+ },
760
+ "node_modules/https-proxy-agent/node_modules/ms": {
761
+ "version": "2.1.3",
762
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
763
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
764
+ "license": "MIT"
765
+ },
766
+ "node_modules/iconv-lite": {
767
+ "version": "0.4.24",
768
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
769
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
770
+ "license": "MIT",
771
+ "dependencies": {
772
+ "safer-buffer": ">= 2.1.2 < 3"
773
+ },
774
+ "engines": {
775
+ "node": ">=0.10.0"
776
+ }
777
+ },
778
+ "node_modules/ignore-by-default": {
779
+ "version": "1.0.1",
780
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
781
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
782
+ "dev": true,
783
+ "license": "ISC"
784
+ },
785
+ "node_modules/inherits": {
786
+ "version": "2.0.4",
787
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
788
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
789
+ "license": "ISC"
790
+ },
791
+ "node_modules/ipaddr.js": {
792
+ "version": "1.9.1",
793
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
794
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
795
+ "license": "MIT",
796
+ "engines": {
797
+ "node": ">= 0.10"
798
+ }
799
+ },
800
+ "node_modules/is-binary-path": {
801
+ "version": "2.1.0",
802
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
803
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
804
+ "dev": true,
805
+ "license": "MIT",
806
+ "dependencies": {
807
+ "binary-extensions": "^2.0.0"
808
+ },
809
+ "engines": {
810
+ "node": ">=8"
811
+ }
812
+ },
813
+ "node_modules/is-extglob": {
814
+ "version": "2.1.1",
815
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
816
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
817
+ "dev": true,
818
+ "license": "MIT",
819
+ "engines": {
820
+ "node": ">=0.10.0"
821
+ }
822
+ },
823
+ "node_modules/is-glob": {
824
+ "version": "4.0.3",
825
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
826
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
827
+ "dev": true,
828
+ "license": "MIT",
829
+ "dependencies": {
830
+ "is-extglob": "^2.1.1"
831
+ },
832
+ "engines": {
833
+ "node": ">=0.10.0"
834
+ }
835
+ },
836
+ "node_modules/is-number": {
837
+ "version": "7.0.0",
838
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
839
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
840
+ "dev": true,
841
+ "license": "MIT",
842
+ "engines": {
843
+ "node": ">=0.12.0"
844
+ }
845
+ },
846
+ "node_modules/isarray": {
847
+ "version": "1.0.0",
848
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
849
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
850
+ "license": "MIT"
851
+ },
852
+ "node_modules/math-intrinsics": {
853
+ "version": "1.1.0",
854
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
855
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
856
+ "license": "MIT",
857
+ "engines": {
858
+ "node": ">= 0.4"
859
+ }
860
+ },
861
+ "node_modules/media-typer": {
862
+ "version": "0.3.0",
863
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
864
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
865
+ "license": "MIT",
866
+ "engines": {
867
+ "node": ">= 0.6"
868
+ }
869
+ },
870
+ "node_modules/merge-descriptors": {
871
+ "version": "1.0.3",
872
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
873
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
874
+ "license": "MIT",
875
+ "funding": {
876
+ "url": "https://github.com/sponsors/sindresorhus"
877
+ }
878
+ },
879
+ "node_modules/methods": {
880
+ "version": "1.1.2",
881
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
882
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
883
+ "license": "MIT",
884
+ "engines": {
885
+ "node": ">= 0.6"
886
+ }
887
+ },
888
+ "node_modules/mime": {
889
+ "version": "1.6.0",
890
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
891
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
892
+ "license": "MIT",
893
+ "bin": {
894
+ "mime": "cli.js"
895
+ },
896
+ "engines": {
897
+ "node": ">=4"
898
+ }
899
+ },
900
+ "node_modules/mime-db": {
901
+ "version": "1.52.0",
902
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
903
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
904
+ "license": "MIT",
905
+ "engines": {
906
+ "node": ">= 0.6"
907
+ }
908
+ },
909
+ "node_modules/mime-types": {
910
+ "version": "2.1.35",
911
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
912
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
913
+ "license": "MIT",
914
+ "dependencies": {
915
+ "mime-db": "1.52.0"
916
+ },
917
+ "engines": {
918
+ "node": ">= 0.6"
919
+ }
920
+ },
921
+ "node_modules/minimatch": {
922
+ "version": "10.2.5",
923
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
924
+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
925
+ "dev": true,
926
+ "license": "BlueOak-1.0.0",
927
+ "dependencies": {
928
+ "brace-expansion": "^5.0.5"
929
+ },
930
+ "engines": {
931
+ "node": "18 || 20 || >=22"
932
+ },
933
+ "funding": {
934
+ "url": "https://github.com/sponsors/isaacs"
935
+ }
936
+ },
937
+ "node_modules/minimist": {
938
+ "version": "1.2.8",
939
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
940
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
941
+ "license": "MIT",
942
+ "funding": {
943
+ "url": "https://github.com/sponsors/ljharb"
944
+ }
945
+ },
946
+ "node_modules/mkdirp": {
947
+ "version": "0.5.6",
948
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
949
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
950
+ "license": "MIT",
951
+ "dependencies": {
952
+ "minimist": "^1.2.6"
953
+ },
954
+ "bin": {
955
+ "mkdirp": "bin/cmd.js"
956
+ }
957
+ },
958
+ "node_modules/ms": {
959
+ "version": "2.0.0",
960
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
961
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
962
+ "license": "MIT"
963
+ },
964
+ "node_modules/multer": {
965
+ "version": "1.4.5-lts.2",
966
+ "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.2.tgz",
967
+ "integrity": "sha512-VzGiVigcG9zUAoCNU+xShztrlr1auZOlurXynNvO9GiWD1/mTBbUljOKY+qMeazBqXgRnjzeEgJI/wyjJUHg9A==",
968
+ "deprecated": "Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.",
969
+ "license": "MIT",
970
+ "dependencies": {
971
+ "append-field": "^1.0.0",
972
+ "busboy": "^1.0.0",
973
+ "concat-stream": "^1.5.2",
974
+ "mkdirp": "^0.5.4",
975
+ "object-assign": "^4.1.1",
976
+ "type-is": "^1.6.4",
977
+ "xtend": "^4.0.0"
978
+ },
979
+ "engines": {
980
+ "node": ">= 6.0.0"
981
+ }
982
+ },
983
+ "node_modules/negotiator": {
984
+ "version": "0.6.3",
985
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
986
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
987
+ "license": "MIT",
988
+ "engines": {
989
+ "node": ">= 0.6"
990
+ }
991
+ },
992
+ "node_modules/nodemon": {
993
+ "version": "3.1.14",
994
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.14.tgz",
995
+ "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==",
996
+ "dev": true,
997
+ "license": "MIT",
998
+ "dependencies": {
999
+ "chokidar": "^3.5.2",
1000
+ "debug": "^4",
1001
+ "ignore-by-default": "^1.0.1",
1002
+ "minimatch": "^10.2.1",
1003
+ "pstree.remy": "^1.1.8",
1004
+ "semver": "^7.5.3",
1005
+ "simple-update-notifier": "^2.0.0",
1006
+ "supports-color": "^5.5.0",
1007
+ "touch": "^3.1.0",
1008
+ "undefsafe": "^2.0.5"
1009
+ },
1010
+ "bin": {
1011
+ "nodemon": "bin/nodemon.js"
1012
+ },
1013
+ "engines": {
1014
+ "node": ">=10"
1015
+ },
1016
+ "funding": {
1017
+ "type": "opencollective",
1018
+ "url": "https://opencollective.com/nodemon"
1019
+ }
1020
+ },
1021
+ "node_modules/nodemon/node_modules/debug": {
1022
+ "version": "4.4.3",
1023
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1024
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1025
+ "dev": true,
1026
+ "license": "MIT",
1027
+ "dependencies": {
1028
+ "ms": "^2.1.3"
1029
+ },
1030
+ "engines": {
1031
+ "node": ">=6.0"
1032
+ },
1033
+ "peerDependenciesMeta": {
1034
+ "supports-color": {
1035
+ "optional": true
1036
+ }
1037
+ }
1038
+ },
1039
+ "node_modules/nodemon/node_modules/ms": {
1040
+ "version": "2.1.3",
1041
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1042
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1043
+ "dev": true,
1044
+ "license": "MIT"
1045
+ },
1046
+ "node_modules/normalize-path": {
1047
+ "version": "3.0.0",
1048
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1049
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1050
+ "dev": true,
1051
+ "license": "MIT",
1052
+ "engines": {
1053
+ "node": ">=0.10.0"
1054
+ }
1055
+ },
1056
+ "node_modules/object-assign": {
1057
+ "version": "4.1.1",
1058
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
1059
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
1060
+ "license": "MIT",
1061
+ "engines": {
1062
+ "node": ">=0.10.0"
1063
+ }
1064
+ },
1065
+ "node_modules/object-inspect": {
1066
+ "version": "1.13.4",
1067
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
1068
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
1069
+ "license": "MIT",
1070
+ "engines": {
1071
+ "node": ">= 0.4"
1072
+ },
1073
+ "funding": {
1074
+ "url": "https://github.com/sponsors/ljharb"
1075
+ }
1076
+ },
1077
+ "node_modules/on-finished": {
1078
+ "version": "2.4.1",
1079
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
1080
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
1081
+ "license": "MIT",
1082
+ "dependencies": {
1083
+ "ee-first": "1.1.1"
1084
+ },
1085
+ "engines": {
1086
+ "node": ">= 0.8"
1087
+ }
1088
+ },
1089
+ "node_modules/parseurl": {
1090
+ "version": "1.3.3",
1091
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
1092
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
1093
+ "license": "MIT",
1094
+ "engines": {
1095
+ "node": ">= 0.8"
1096
+ }
1097
+ },
1098
+ "node_modules/path-to-regexp": {
1099
+ "version": "0.1.13",
1100
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
1101
+ "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
1102
+ "license": "MIT"
1103
+ },
1104
+ "node_modules/picomatch": {
1105
+ "version": "2.3.2",
1106
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
1107
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
1108
+ "dev": true,
1109
+ "license": "MIT",
1110
+ "engines": {
1111
+ "node": ">=8.6"
1112
+ },
1113
+ "funding": {
1114
+ "url": "https://github.com/sponsors/jonschlinkert"
1115
+ }
1116
+ },
1117
+ "node_modules/process-nextick-args": {
1118
+ "version": "2.0.1",
1119
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
1120
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
1121
+ "license": "MIT"
1122
+ },
1123
+ "node_modules/proxy-addr": {
1124
+ "version": "2.0.7",
1125
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
1126
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
1127
+ "license": "MIT",
1128
+ "dependencies": {
1129
+ "forwarded": "0.2.0",
1130
+ "ipaddr.js": "1.9.1"
1131
+ },
1132
+ "engines": {
1133
+ "node": ">= 0.10"
1134
+ }
1135
+ },
1136
+ "node_modules/proxy-from-env": {
1137
+ "version": "2.1.0",
1138
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz",
1139
+ "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",
1140
+ "license": "MIT",
1141
+ "engines": {
1142
+ "node": ">=10"
1143
+ }
1144
+ },
1145
+ "node_modules/pstree.remy": {
1146
+ "version": "1.1.8",
1147
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
1148
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
1149
+ "dev": true,
1150
+ "license": "MIT"
1151
+ },
1152
+ "node_modules/qs": {
1153
+ "version": "6.15.2",
1154
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz",
1155
+ "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==",
1156
+ "license": "BSD-3-Clause",
1157
+ "dependencies": {
1158
+ "side-channel": "^1.1.0"
1159
+ },
1160
+ "engines": {
1161
+ "node": ">=0.6"
1162
+ },
1163
+ "funding": {
1164
+ "url": "https://github.com/sponsors/ljharb"
1165
+ }
1166
+ },
1167
+ "node_modules/range-parser": {
1168
+ "version": "1.2.1",
1169
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
1170
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
1171
+ "license": "MIT",
1172
+ "engines": {
1173
+ "node": ">= 0.6"
1174
+ }
1175
+ },
1176
+ "node_modules/raw-body": {
1177
+ "version": "2.5.3",
1178
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
1179
+ "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
1180
+ "license": "MIT",
1181
+ "dependencies": {
1182
+ "bytes": "~3.1.2",
1183
+ "http-errors": "~2.0.1",
1184
+ "iconv-lite": "~0.4.24",
1185
+ "unpipe": "~1.0.0"
1186
+ },
1187
+ "engines": {
1188
+ "node": ">= 0.8"
1189
+ }
1190
+ },
1191
+ "node_modules/readable-stream": {
1192
+ "version": "2.3.8",
1193
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
1194
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
1195
+ "license": "MIT",
1196
+ "dependencies": {
1197
+ "core-util-is": "~1.0.0",
1198
+ "inherits": "~2.0.3",
1199
+ "isarray": "~1.0.0",
1200
+ "process-nextick-args": "~2.0.0",
1201
+ "safe-buffer": "~5.1.1",
1202
+ "string_decoder": "~1.1.1",
1203
+ "util-deprecate": "~1.0.1"
1204
+ }
1205
+ },
1206
+ "node_modules/readable-stream/node_modules/safe-buffer": {
1207
+ "version": "5.1.2",
1208
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1209
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
1210
+ "license": "MIT"
1211
+ },
1212
+ "node_modules/readdirp": {
1213
+ "version": "3.6.0",
1214
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
1215
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
1216
+ "dev": true,
1217
+ "license": "MIT",
1218
+ "dependencies": {
1219
+ "picomatch": "^2.2.1"
1220
+ },
1221
+ "engines": {
1222
+ "node": ">=8.10.0"
1223
+ }
1224
+ },
1225
+ "node_modules/safe-buffer": {
1226
+ "version": "5.2.1",
1227
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
1228
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
1229
+ "funding": [
1230
+ {
1231
+ "type": "github",
1232
+ "url": "https://github.com/sponsors/feross"
1233
+ },
1234
+ {
1235
+ "type": "patreon",
1236
+ "url": "https://www.patreon.com/feross"
1237
+ },
1238
+ {
1239
+ "type": "consulting",
1240
+ "url": "https://feross.org/support"
1241
+ }
1242
+ ],
1243
+ "license": "MIT"
1244
+ },
1245
+ "node_modules/safer-buffer": {
1246
+ "version": "2.1.2",
1247
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1248
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
1249
+ "license": "MIT"
1250
+ },
1251
+ "node_modules/semver": {
1252
+ "version": "7.8.5",
1253
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
1254
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
1255
+ "dev": true,
1256
+ "license": "ISC",
1257
+ "bin": {
1258
+ "semver": "bin/semver.js"
1259
+ },
1260
+ "engines": {
1261
+ "node": ">=10"
1262
+ }
1263
+ },
1264
+ "node_modules/send": {
1265
+ "version": "0.19.2",
1266
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
1267
+ "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
1268
+ "license": "MIT",
1269
+ "dependencies": {
1270
+ "debug": "2.6.9",
1271
+ "depd": "2.0.0",
1272
+ "destroy": "1.2.0",
1273
+ "encodeurl": "~2.0.0",
1274
+ "escape-html": "~1.0.3",
1275
+ "etag": "~1.8.1",
1276
+ "fresh": "~0.5.2",
1277
+ "http-errors": "~2.0.1",
1278
+ "mime": "1.6.0",
1279
+ "ms": "2.1.3",
1280
+ "on-finished": "~2.4.1",
1281
+ "range-parser": "~1.2.1",
1282
+ "statuses": "~2.0.2"
1283
+ },
1284
+ "engines": {
1285
+ "node": ">= 0.8.0"
1286
+ }
1287
+ },
1288
+ "node_modules/send/node_modules/ms": {
1289
+ "version": "2.1.3",
1290
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1291
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1292
+ "license": "MIT"
1293
+ },
1294
+ "node_modules/serve-static": {
1295
+ "version": "1.16.3",
1296
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
1297
+ "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
1298
+ "license": "MIT",
1299
+ "dependencies": {
1300
+ "encodeurl": "~2.0.0",
1301
+ "escape-html": "~1.0.3",
1302
+ "parseurl": "~1.3.3",
1303
+ "send": "~0.19.1"
1304
+ },
1305
+ "engines": {
1306
+ "node": ">= 0.8.0"
1307
+ }
1308
+ },
1309
+ "node_modules/setprototypeof": {
1310
+ "version": "1.2.0",
1311
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1312
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
1313
+ "license": "ISC"
1314
+ },
1315
+ "node_modules/side-channel": {
1316
+ "version": "1.1.1",
1317
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
1318
+ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
1319
+ "license": "MIT",
1320
+ "dependencies": {
1321
+ "es-errors": "^1.3.0",
1322
+ "object-inspect": "^1.13.4",
1323
+ "side-channel-list": "^1.0.1",
1324
+ "side-channel-map": "^1.0.1",
1325
+ "side-channel-weakmap": "^1.0.2"
1326
+ },
1327
+ "engines": {
1328
+ "node": ">= 0.4"
1329
+ },
1330
+ "funding": {
1331
+ "url": "https://github.com/sponsors/ljharb"
1332
+ }
1333
+ },
1334
+ "node_modules/side-channel-list": {
1335
+ "version": "1.0.1",
1336
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
1337
+ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
1338
+ "license": "MIT",
1339
+ "dependencies": {
1340
+ "es-errors": "^1.3.0",
1341
+ "object-inspect": "^1.13.4"
1342
+ },
1343
+ "engines": {
1344
+ "node": ">= 0.4"
1345
+ },
1346
+ "funding": {
1347
+ "url": "https://github.com/sponsors/ljharb"
1348
+ }
1349
+ },
1350
+ "node_modules/side-channel-map": {
1351
+ "version": "1.0.1",
1352
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
1353
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
1354
+ "license": "MIT",
1355
+ "dependencies": {
1356
+ "call-bound": "^1.0.2",
1357
+ "es-errors": "^1.3.0",
1358
+ "get-intrinsic": "^1.2.5",
1359
+ "object-inspect": "^1.13.3"
1360
+ },
1361
+ "engines": {
1362
+ "node": ">= 0.4"
1363
+ },
1364
+ "funding": {
1365
+ "url": "https://github.com/sponsors/ljharb"
1366
+ }
1367
+ },
1368
+ "node_modules/side-channel-weakmap": {
1369
+ "version": "1.0.2",
1370
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
1371
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
1372
+ "license": "MIT",
1373
+ "dependencies": {
1374
+ "call-bound": "^1.0.2",
1375
+ "es-errors": "^1.3.0",
1376
+ "get-intrinsic": "^1.2.5",
1377
+ "object-inspect": "^1.13.3",
1378
+ "side-channel-map": "^1.0.1"
1379
+ },
1380
+ "engines": {
1381
+ "node": ">= 0.4"
1382
+ },
1383
+ "funding": {
1384
+ "url": "https://github.com/sponsors/ljharb"
1385
+ }
1386
+ },
1387
+ "node_modules/simple-update-notifier": {
1388
+ "version": "2.0.0",
1389
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
1390
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
1391
+ "dev": true,
1392
+ "license": "MIT",
1393
+ "dependencies": {
1394
+ "semver": "^7.5.3"
1395
+ },
1396
+ "engines": {
1397
+ "node": ">=10"
1398
+ }
1399
+ },
1400
+ "node_modules/statuses": {
1401
+ "version": "2.0.2",
1402
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
1403
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
1404
+ "license": "MIT",
1405
+ "engines": {
1406
+ "node": ">= 0.8"
1407
+ }
1408
+ },
1409
+ "node_modules/streamsearch": {
1410
+ "version": "1.1.0",
1411
+ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
1412
+ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
1413
+ "engines": {
1414
+ "node": ">=10.0.0"
1415
+ }
1416
+ },
1417
+ "node_modules/string_decoder": {
1418
+ "version": "1.1.1",
1419
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1420
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
1421
+ "license": "MIT",
1422
+ "dependencies": {
1423
+ "safe-buffer": "~5.1.0"
1424
+ }
1425
+ },
1426
+ "node_modules/string_decoder/node_modules/safe-buffer": {
1427
+ "version": "5.1.2",
1428
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1429
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
1430
+ "license": "MIT"
1431
+ },
1432
+ "node_modules/supports-color": {
1433
+ "version": "5.5.0",
1434
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1435
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1436
+ "dev": true,
1437
+ "license": "MIT",
1438
+ "dependencies": {
1439
+ "has-flag": "^3.0.0"
1440
+ },
1441
+ "engines": {
1442
+ "node": ">=4"
1443
+ }
1444
+ },
1445
+ "node_modules/to-regex-range": {
1446
+ "version": "5.0.1",
1447
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1448
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1449
+ "dev": true,
1450
+ "license": "MIT",
1451
+ "dependencies": {
1452
+ "is-number": "^7.0.0"
1453
+ },
1454
+ "engines": {
1455
+ "node": ">=8.0"
1456
+ }
1457
+ },
1458
+ "node_modules/toidentifier": {
1459
+ "version": "1.0.1",
1460
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1461
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
1462
+ "license": "MIT",
1463
+ "engines": {
1464
+ "node": ">=0.6"
1465
+ }
1466
+ },
1467
+ "node_modules/touch": {
1468
+ "version": "3.1.1",
1469
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
1470
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
1471
+ "dev": true,
1472
+ "license": "ISC",
1473
+ "bin": {
1474
+ "nodetouch": "bin/nodetouch.js"
1475
+ }
1476
+ },
1477
+ "node_modules/type-is": {
1478
+ "version": "1.6.18",
1479
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
1480
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
1481
+ "license": "MIT",
1482
+ "dependencies": {
1483
+ "media-typer": "0.3.0",
1484
+ "mime-types": "~2.1.24"
1485
+ },
1486
+ "engines": {
1487
+ "node": ">= 0.6"
1488
+ }
1489
+ },
1490
+ "node_modules/typedarray": {
1491
+ "version": "0.0.6",
1492
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
1493
+ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
1494
+ "license": "MIT"
1495
+ },
1496
+ "node_modules/undefsafe": {
1497
+ "version": "2.0.5",
1498
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
1499
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
1500
+ "dev": true,
1501
+ "license": "MIT"
1502
+ },
1503
+ "node_modules/unpipe": {
1504
+ "version": "1.0.0",
1505
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1506
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
1507
+ "license": "MIT",
1508
+ "engines": {
1509
+ "node": ">= 0.8"
1510
+ }
1511
+ },
1512
+ "node_modules/util-deprecate": {
1513
+ "version": "1.0.2",
1514
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1515
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
1516
+ "license": "MIT"
1517
+ },
1518
+ "node_modules/utils-merge": {
1519
+ "version": "1.0.1",
1520
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1521
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
1522
+ "license": "MIT",
1523
+ "engines": {
1524
+ "node": ">= 0.4.0"
1525
+ }
1526
+ },
1527
+ "node_modules/vary": {
1528
+ "version": "1.1.2",
1529
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1530
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
1531
+ "license": "MIT",
1532
+ "engines": {
1533
+ "node": ">= 0.8"
1534
+ }
1535
+ },
1536
+ "node_modules/xtend": {
1537
+ "version": "4.0.2",
1538
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
1539
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
1540
+ "license": "MIT",
1541
+ "engines": {
1542
+ "node": ">=0.4"
1543
+ }
1544
+ }
1545
+ }
1546
+ }
node_modules/accepts/HISTORY.md ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1.3.8 / 2022-02-02
2
+ ==================
3
+
4
+ * deps: mime-types@~2.1.34
5
+ - deps: mime-db@~1.51.0
6
+ * deps: negotiator@0.6.3
7
+
8
+ 1.3.7 / 2019-04-29
9
+ ==================
10
+
11
+ * deps: negotiator@0.6.2
12
+ - Fix sorting charset, encoding, and language with extra parameters
13
+
14
+ 1.3.6 / 2019-04-28
15
+ ==================
16
+
17
+ * deps: mime-types@~2.1.24
18
+ - deps: mime-db@~1.40.0
19
+
20
+ 1.3.5 / 2018-02-28
21
+ ==================
22
+
23
+ * deps: mime-types@~2.1.18
24
+ - deps: mime-db@~1.33.0
25
+
26
+ 1.3.4 / 2017-08-22
27
+ ==================
28
+
29
+ * deps: mime-types@~2.1.16
30
+ - deps: mime-db@~1.29.0
31
+
32
+ 1.3.3 / 2016-05-02
33
+ ==================
34
+
35
+ * deps: mime-types@~2.1.11
36
+ - deps: mime-db@~1.23.0
37
+ * deps: negotiator@0.6.1
38
+ - perf: improve `Accept` parsing speed
39
+ - perf: improve `Accept-Charset` parsing speed
40
+ - perf: improve `Accept-Encoding` parsing speed
41
+ - perf: improve `Accept-Language` parsing speed
42
+
43
+ 1.3.2 / 2016-03-08
44
+ ==================
45
+
46
+ * deps: mime-types@~2.1.10
47
+ - Fix extension of `application/dash+xml`
48
+ - Update primary extension for `audio/mp4`
49
+ - deps: mime-db@~1.22.0
50
+
51
+ 1.3.1 / 2016-01-19
52
+ ==================
53
+
54
+ * deps: mime-types@~2.1.9
55
+ - deps: mime-db@~1.21.0
56
+
57
+ 1.3.0 / 2015-09-29
58
+ ==================
59
+
60
+ * deps: mime-types@~2.1.7
61
+ - deps: mime-db@~1.19.0
62
+ * deps: negotiator@0.6.0
63
+ - Fix including type extensions in parameters in `Accept` parsing
64
+ - Fix parsing `Accept` parameters with quoted equals
65
+ - Fix parsing `Accept` parameters with quoted semicolons
66
+ - Lazy-load modules from main entry point
67
+ - perf: delay type concatenation until needed
68
+ - perf: enable strict mode
69
+ - perf: hoist regular expressions
70
+ - perf: remove closures getting spec properties
71
+ - perf: remove a closure from media type parsing
72
+ - perf: remove property delete from media type parsing
73
+
74
+ 1.2.13 / 2015-09-06
75
+ ===================
76
+
77
+ * deps: mime-types@~2.1.6
78
+ - deps: mime-db@~1.18.0
79
+
80
+ 1.2.12 / 2015-07-30
81
+ ===================
82
+
83
+ * deps: mime-types@~2.1.4
84
+ - deps: mime-db@~1.16.0
85
+
86
+ 1.2.11 / 2015-07-16
87
+ ===================
88
+
89
+ * deps: mime-types@~2.1.3
90
+ - deps: mime-db@~1.15.0
91
+
92
+ 1.2.10 / 2015-07-01
93
+ ===================
94
+
95
+ * deps: mime-types@~2.1.2
96
+ - deps: mime-db@~1.14.0
97
+
98
+ 1.2.9 / 2015-06-08
99
+ ==================
100
+
101
+ * deps: mime-types@~2.1.1
102
+ - perf: fix deopt during mapping
103
+
104
+ 1.2.8 / 2015-06-07
105
+ ==================
106
+
107
+ * deps: mime-types@~2.1.0
108
+ - deps: mime-db@~1.13.0
109
+ * perf: avoid argument reassignment & argument slice
110
+ * perf: avoid negotiator recursive construction
111
+ * perf: enable strict mode
112
+ * perf: remove unnecessary bitwise operator
113
+
114
+ 1.2.7 / 2015-05-10
115
+ ==================
116
+
117
+ * deps: negotiator@0.5.3
118
+ - Fix media type parameter matching to be case-insensitive
119
+
120
+ 1.2.6 / 2015-05-07
121
+ ==================
122
+
123
+ * deps: mime-types@~2.0.11
124
+ - deps: mime-db@~1.9.1
125
+ * deps: negotiator@0.5.2
126
+ - Fix comparing media types with quoted values
127
+ - Fix splitting media types with quoted commas
128
+
129
+ 1.2.5 / 2015-03-13
130
+ ==================
131
+
132
+ * deps: mime-types@~2.0.10
133
+ - deps: mime-db@~1.8.0
134
+
135
+ 1.2.4 / 2015-02-14
136
+ ==================
137
+
138
+ * Support Node.js 0.6
139
+ * deps: mime-types@~2.0.9
140
+ - deps: mime-db@~1.7.0
141
+ * deps: negotiator@0.5.1
142
+ - Fix preference sorting to be stable for long acceptable lists
143
+
144
+ 1.2.3 / 2015-01-31
145
+ ==================
146
+
147
+ * deps: mime-types@~2.0.8
148
+ - deps: mime-db@~1.6.0
149
+
150
+ 1.2.2 / 2014-12-30
151
+ ==================
152
+
153
+ * deps: mime-types@~2.0.7
154
+ - deps: mime-db@~1.5.0
155
+
156
+ 1.2.1 / 2014-12-30
157
+ ==================
158
+
159
+ * deps: mime-types@~2.0.5
160
+ - deps: mime-db@~1.3.1
161
+
162
+ 1.2.0 / 2014-12-19
163
+ ==================
164
+
165
+ * deps: negotiator@0.5.0
166
+ - Fix list return order when large accepted list
167
+ - Fix missing identity encoding when q=0 exists
168
+ - Remove dynamic building of Negotiator class
169
+
170
+ 1.1.4 / 2014-12-10
171
+ ==================
172
+
173
+ * deps: mime-types@~2.0.4
174
+ - deps: mime-db@~1.3.0
175
+
176
+ 1.1.3 / 2014-11-09
177
+ ==================
178
+
179
+ * deps: mime-types@~2.0.3
180
+ - deps: mime-db@~1.2.0
181
+
182
+ 1.1.2 / 2014-10-14
183
+ ==================
184
+
185
+ * deps: negotiator@0.4.9
186
+ - Fix error when media type has invalid parameter
187
+
188
+ 1.1.1 / 2014-09-28
189
+ ==================
190
+
191
+ * deps: mime-types@~2.0.2
192
+ - deps: mime-db@~1.1.0
193
+ * deps: negotiator@0.4.8
194
+ - Fix all negotiations to be case-insensitive
195
+ - Stable sort preferences of same quality according to client order
196
+
197
+ 1.1.0 / 2014-09-02
198
+ ==================
199
+
200
+ * update `mime-types`
201
+
202
+ 1.0.7 / 2014-07-04
203
+ ==================
204
+
205
+ * Fix wrong type returned from `type` when match after unknown extension
206
+
207
+ 1.0.6 / 2014-06-24
208
+ ==================
209
+
210
+ * deps: negotiator@0.4.7
211
+
212
+ 1.0.5 / 2014-06-20
213
+ ==================
214
+
215
+ * fix crash when unknown extension given
216
+
217
+ 1.0.4 / 2014-06-19
218
+ ==================
219
+
220
+ * use `mime-types`
221
+
222
+ 1.0.3 / 2014-06-11
223
+ ==================
224
+
225
+ * deps: negotiator@0.4.6
226
+ - Order by specificity when quality is the same
227
+
228
+ 1.0.2 / 2014-05-29
229
+ ==================
230
+
231
+ * Fix interpretation when header not in request
232
+ * deps: pin negotiator@0.4.5
233
+
234
+ 1.0.1 / 2014-01-18
235
+ ==================
236
+
237
+ * Identity encoding isn't always acceptable
238
+ * deps: negotiator@~0.4.0
239
+
240
+ 1.0.0 / 2013-12-27
241
+ ==================
242
+
243
+ * Genesis
node_modules/accepts/LICENSE ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4
+ Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ 'Software'), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following 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 OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/accepts/README.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # accepts
2
+
3
+ [![NPM Version][npm-version-image]][npm-url]
4
+ [![NPM Downloads][npm-downloads-image]][npm-url]
5
+ [![Node.js Version][node-version-image]][node-version-url]
6
+ [![Build Status][github-actions-ci-image]][github-actions-ci-url]
7
+ [![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+ Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
10
+ Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
11
+
12
+ In addition to negotiator, it allows:
13
+
14
+ - Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
15
+ as well as `('text/html', 'application/json')`.
16
+ - Allows type shorthands such as `json`.
17
+ - Returns `false` when no types match
18
+ - Treats non-existent headers as `*`
19
+
20
+ ## Installation
21
+
22
+ This is a [Node.js](https://nodejs.org/en/) module available through the
23
+ [npm registry](https://www.npmjs.com/). Installation is done using the
24
+ [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
25
+
26
+ ```sh
27
+ $ npm install accepts
28
+ ```
29
+
30
+ ## API
31
+
32
+ ```js
33
+ var accepts = require('accepts')
34
+ ```
35
+
36
+ ### accepts(req)
37
+
38
+ Create a new `Accepts` object for the given `req`.
39
+
40
+ #### .charset(charsets)
41
+
42
+ Return the first accepted charset. If nothing in `charsets` is accepted,
43
+ then `false` is returned.
44
+
45
+ #### .charsets()
46
+
47
+ Return the charsets that the request accepts, in the order of the client's
48
+ preference (most preferred first).
49
+
50
+ #### .encoding(encodings)
51
+
52
+ Return the first accepted encoding. If nothing in `encodings` is accepted,
53
+ then `false` is returned.
54
+
55
+ #### .encodings()
56
+
57
+ Return the encodings that the request accepts, in the order of the client's
58
+ preference (most preferred first).
59
+
60
+ #### .language(languages)
61
+
62
+ Return the first accepted language. If nothing in `languages` is accepted,
63
+ then `false` is returned.
64
+
65
+ #### .languages()
66
+
67
+ Return the languages that the request accepts, in the order of the client's
68
+ preference (most preferred first).
69
+
70
+ #### .type(types)
71
+
72
+ Return the first accepted type (and it is returned as the same text as what
73
+ appears in the `types` array). If nothing in `types` is accepted, then `false`
74
+ is returned.
75
+
76
+ The `types` array can contain full MIME types or file extensions. Any value
77
+ that is not a full MIME types is passed to `require('mime-types').lookup`.
78
+
79
+ #### .types()
80
+
81
+ Return the types that the request accepts, in the order of the client's
82
+ preference (most preferred first).
83
+
84
+ ## Examples
85
+
86
+ ### Simple type negotiation
87
+
88
+ This simple example shows how to use `accepts` to return a different typed
89
+ respond body based on what the client wants to accept. The server lists it's
90
+ preferences in order and will get back the best match between the client and
91
+ server.
92
+
93
+ ```js
94
+ var accepts = require('accepts')
95
+ var http = require('http')
96
+
97
+ function app (req, res) {
98
+ var accept = accepts(req)
99
+
100
+ // the order of this list is significant; should be server preferred order
101
+ switch (accept.type(['json', 'html'])) {
102
+ case 'json':
103
+ res.setHeader('Content-Type', 'application/json')
104
+ res.write('{"hello":"world!"}')
105
+ break
106
+ case 'html':
107
+ res.setHeader('Content-Type', 'text/html')
108
+ res.write('<b>hello, world!</b>')
109
+ break
110
+ default:
111
+ // the fallback is text/plain, so no need to specify it above
112
+ res.setHeader('Content-Type', 'text/plain')
113
+ res.write('hello, world!')
114
+ break
115
+ }
116
+
117
+ res.end()
118
+ }
119
+
120
+ http.createServer(app).listen(3000)
121
+ ```
122
+
123
+ You can test this out with the cURL program:
124
+ ```sh
125
+ curl -I -H'Accept: text/html' http://localhost:3000/
126
+ ```
127
+
128
+ ## License
129
+
130
+ [MIT](LICENSE)
131
+
132
+ [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
133
+ [coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
134
+ [github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
135
+ [github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
136
+ [node-version-image]: https://badgen.net/npm/node/accepts
137
+ [node-version-url]: https://nodejs.org/en/download
138
+ [npm-downloads-image]: https://badgen.net/npm/dm/accepts
139
+ [npm-url]: https://npmjs.org/package/accepts
140
+ [npm-version-image]: https://badgen.net/npm/v/accepts
node_modules/accepts/index.js ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * accepts
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+ 'use strict'
9
+
10
+ /**
11
+ * Module dependencies.
12
+ * @private
13
+ */
14
+
15
+ var Negotiator = require('negotiator')
16
+ var mime = require('mime-types')
17
+
18
+ /**
19
+ * Module exports.
20
+ * @public
21
+ */
22
+
23
+ module.exports = Accepts
24
+
25
+ /**
26
+ * Create a new Accepts object for the given req.
27
+ *
28
+ * @param {object} req
29
+ * @public
30
+ */
31
+
32
+ function Accepts (req) {
33
+ if (!(this instanceof Accepts)) {
34
+ return new Accepts(req)
35
+ }
36
+
37
+ this.headers = req.headers
38
+ this.negotiator = new Negotiator(req)
39
+ }
40
+
41
+ /**
42
+ * Check if the given `type(s)` is acceptable, returning
43
+ * the best match when true, otherwise `undefined`, in which
44
+ * case you should respond with 406 "Not Acceptable".
45
+ *
46
+ * The `type` value may be a single mime type string
47
+ * such as "application/json", the extension name
48
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
49
+ * or array is given the _best_ match, if any is returned.
50
+ *
51
+ * Examples:
52
+ *
53
+ * // Accept: text/html
54
+ * this.types('html');
55
+ * // => "html"
56
+ *
57
+ * // Accept: text/*, application/json
58
+ * this.types('html');
59
+ * // => "html"
60
+ * this.types('text/html');
61
+ * // => "text/html"
62
+ * this.types('json', 'text');
63
+ * // => "json"
64
+ * this.types('application/json');
65
+ * // => "application/json"
66
+ *
67
+ * // Accept: text/*, application/json
68
+ * this.types('image/png');
69
+ * this.types('png');
70
+ * // => undefined
71
+ *
72
+ * // Accept: text/*;q=.5, application/json
73
+ * this.types(['html', 'json']);
74
+ * this.types('html', 'json');
75
+ * // => "json"
76
+ *
77
+ * @param {String|Array} types...
78
+ * @return {String|Array|Boolean}
79
+ * @public
80
+ */
81
+
82
+ Accepts.prototype.type =
83
+ Accepts.prototype.types = function (types_) {
84
+ var types = types_
85
+
86
+ // support flattened arguments
87
+ if (types && !Array.isArray(types)) {
88
+ types = new Array(arguments.length)
89
+ for (var i = 0; i < types.length; i++) {
90
+ types[i] = arguments[i]
91
+ }
92
+ }
93
+
94
+ // no types, return all requested types
95
+ if (!types || types.length === 0) {
96
+ return this.negotiator.mediaTypes()
97
+ }
98
+
99
+ // no accept header, return first given type
100
+ if (!this.headers.accept) {
101
+ return types[0]
102
+ }
103
+
104
+ var mimes = types.map(extToMime)
105
+ var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
106
+ var first = accepts[0]
107
+
108
+ return first
109
+ ? types[mimes.indexOf(first)]
110
+ : false
111
+ }
112
+
113
+ /**
114
+ * Return accepted encodings or best fit based on `encodings`.
115
+ *
116
+ * Given `Accept-Encoding: gzip, deflate`
117
+ * an array sorted by quality is returned:
118
+ *
119
+ * ['gzip', 'deflate']
120
+ *
121
+ * @param {String|Array} encodings...
122
+ * @return {String|Array}
123
+ * @public
124
+ */
125
+
126
+ Accepts.prototype.encoding =
127
+ Accepts.prototype.encodings = function (encodings_) {
128
+ var encodings = encodings_
129
+
130
+ // support flattened arguments
131
+ if (encodings && !Array.isArray(encodings)) {
132
+ encodings = new Array(arguments.length)
133
+ for (var i = 0; i < encodings.length; i++) {
134
+ encodings[i] = arguments[i]
135
+ }
136
+ }
137
+
138
+ // no encodings, return all requested encodings
139
+ if (!encodings || encodings.length === 0) {
140
+ return this.negotiator.encodings()
141
+ }
142
+
143
+ return this.negotiator.encodings(encodings)[0] || false
144
+ }
145
+
146
+ /**
147
+ * Return accepted charsets or best fit based on `charsets`.
148
+ *
149
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
150
+ * an array sorted by quality is returned:
151
+ *
152
+ * ['utf-8', 'utf-7', 'iso-8859-1']
153
+ *
154
+ * @param {String|Array} charsets...
155
+ * @return {String|Array}
156
+ * @public
157
+ */
158
+
159
+ Accepts.prototype.charset =
160
+ Accepts.prototype.charsets = function (charsets_) {
161
+ var charsets = charsets_
162
+
163
+ // support flattened arguments
164
+ if (charsets && !Array.isArray(charsets)) {
165
+ charsets = new Array(arguments.length)
166
+ for (var i = 0; i < charsets.length; i++) {
167
+ charsets[i] = arguments[i]
168
+ }
169
+ }
170
+
171
+ // no charsets, return all requested charsets
172
+ if (!charsets || charsets.length === 0) {
173
+ return this.negotiator.charsets()
174
+ }
175
+
176
+ return this.negotiator.charsets(charsets)[0] || false
177
+ }
178
+
179
+ /**
180
+ * Return accepted languages or best fit based on `langs`.
181
+ *
182
+ * Given `Accept-Language: en;q=0.8, es, pt`
183
+ * an array sorted by quality is returned:
184
+ *
185
+ * ['es', 'pt', 'en']
186
+ *
187
+ * @param {String|Array} langs...
188
+ * @return {Array|String}
189
+ * @public
190
+ */
191
+
192
+ Accepts.prototype.lang =
193
+ Accepts.prototype.langs =
194
+ Accepts.prototype.language =
195
+ Accepts.prototype.languages = function (languages_) {
196
+ var languages = languages_
197
+
198
+ // support flattened arguments
199
+ if (languages && !Array.isArray(languages)) {
200
+ languages = new Array(arguments.length)
201
+ for (var i = 0; i < languages.length; i++) {
202
+ languages[i] = arguments[i]
203
+ }
204
+ }
205
+
206
+ // no languages, return all requested languages
207
+ if (!languages || languages.length === 0) {
208
+ return this.negotiator.languages()
209
+ }
210
+
211
+ return this.negotiator.languages(languages)[0] || false
212
+ }
213
+
214
+ /**
215
+ * Convert extnames to mime.
216
+ *
217
+ * @param {String} type
218
+ * @return {String}
219
+ * @private
220
+ */
221
+
222
+ function extToMime (type) {
223
+ return type.indexOf('/') === -1
224
+ ? mime.lookup(type)
225
+ : type
226
+ }
227
+
228
+ /**
229
+ * Check if mime is valid.
230
+ *
231
+ * @param {String} type
232
+ * @return {String}
233
+ * @private
234
+ */
235
+
236
+ function validMime (type) {
237
+ return typeof type === 'string'
238
+ }
node_modules/accepts/package.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "accepts",
3
+ "description": "Higher-level content negotiation",
4
+ "version": "1.3.8",
5
+ "contributors": [
6
+ "Douglas Christopher Wilson <doug@somethingdoug.com>",
7
+ "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
8
+ ],
9
+ "license": "MIT",
10
+ "repository": "jshttp/accepts",
11
+ "dependencies": {
12
+ "mime-types": "~2.1.34",
13
+ "negotiator": "0.6.3"
14
+ },
15
+ "devDependencies": {
16
+ "deep-equal": "1.0.1",
17
+ "eslint": "7.32.0",
18
+ "eslint-config-standard": "14.1.1",
19
+ "eslint-plugin-import": "2.25.4",
20
+ "eslint-plugin-markdown": "2.2.1",
21
+ "eslint-plugin-node": "11.1.0",
22
+ "eslint-plugin-promise": "4.3.1",
23
+ "eslint-plugin-standard": "4.1.0",
24
+ "mocha": "9.2.0",
25
+ "nyc": "15.1.0"
26
+ },
27
+ "files": [
28
+ "LICENSE",
29
+ "HISTORY.md",
30
+ "index.js"
31
+ ],
32
+ "engines": {
33
+ "node": ">= 0.6"
34
+ },
35
+ "scripts": {
36
+ "lint": "eslint .",
37
+ "test": "mocha --reporter spec --check-leaks --bail test/",
38
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
39
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
40
+ },
41
+ "keywords": [
42
+ "content",
43
+ "negotiation",
44
+ "accept",
45
+ "accepts"
46
+ ]
47
+ }
node_modules/agent-base/README.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ agent-base
2
+ ==========
3
+ ### Turn a function into an [`http.Agent`][http.Agent] instance
4
+ [![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI)
5
+
6
+ This module provides an `http.Agent` generator. That is, you pass it an async
7
+ callback function, and it returns a new `http.Agent` instance that will invoke the
8
+ given callback function when sending outbound HTTP requests.
9
+
10
+ #### Some subclasses:
11
+
12
+ Here's some more interesting uses of `agent-base`.
13
+ Send a pull request to list yours!
14
+
15
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
16
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
17
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
18
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
19
+
20
+
21
+ Installation
22
+ ------------
23
+
24
+ Install with `npm`:
25
+
26
+ ``` bash
27
+ $ npm install agent-base
28
+ ```
29
+
30
+
31
+ Example
32
+ -------
33
+
34
+ Here's a minimal example that creates a new `net.Socket` connection to the server
35
+ for every HTTP request (i.e. the equivalent of `agent: false` option):
36
+
37
+ ```js
38
+ var net = require('net');
39
+ var tls = require('tls');
40
+ var url = require('url');
41
+ var http = require('http');
42
+ var agent = require('agent-base');
43
+
44
+ var endpoint = 'http://nodejs.org/api/';
45
+ var parsed = url.parse(endpoint);
46
+
47
+ // This is the important part!
48
+ parsed.agent = agent(function (req, opts) {
49
+ var socket;
50
+ // `secureEndpoint` is true when using the https module
51
+ if (opts.secureEndpoint) {
52
+ socket = tls.connect(opts);
53
+ } else {
54
+ socket = net.connect(opts);
55
+ }
56
+ return socket;
57
+ });
58
+
59
+ // Everything else works just like normal...
60
+ http.get(parsed, function (res) {
61
+ console.log('"response" event!', res.headers);
62
+ res.pipe(process.stdout);
63
+ });
64
+ ```
65
+
66
+ Returning a Promise or using an `async` function is also supported:
67
+
68
+ ```js
69
+ agent(async function (req, opts) {
70
+ await sleep(1000);
71
+ // etc…
72
+ });
73
+ ```
74
+
75
+ Return another `http.Agent` instance to "pass through" the responsibility
76
+ for that HTTP request to that agent:
77
+
78
+ ```js
79
+ agent(function (req, opts) {
80
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
81
+ });
82
+ ```
83
+
84
+
85
+ API
86
+ ---
87
+
88
+ ## Agent(Function callback[, Object options]) → [http.Agent][]
89
+
90
+ Creates a base `http.Agent` that will execute the callback function `callback`
91
+ for every HTTP request that it is used as the `agent` for. The callback function
92
+ is responsible for creating a `stream.Duplex` instance of some kind that will be
93
+ used as the underlying socket in the HTTP request.
94
+
95
+ The `options` object accepts the following properties:
96
+
97
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
98
+
99
+ The callback function should have the following signature:
100
+
101
+ ### callback(http.ClientRequest req, Object options, Function cb) → undefined
102
+
103
+ The ClientRequest `req` can be accessed to read request headers and
104
+ and the path, etc. The `options` object contains the options passed
105
+ to the `http.request()`/`https.request()` function call, and is formatted
106
+ to be directly passed to `net.connect()`/`tls.connect()`, or however
107
+ else you want a Socket to be created. Pass the created socket to
108
+ the callback function `cb` once created, and the HTTP request will
109
+ continue to proceed.
110
+
111
+ If the `https` module is used to invoke the HTTP request, then the
112
+ `secureEndpoint` property on `options` _will be set to `true`_.
113
+
114
+
115
+ License
116
+ -------
117
+
118
+ (The MIT License)
119
+
120
+ Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
121
+
122
+ Permission is hereby granted, free of charge, to any person obtaining
123
+ a copy of this software and associated documentation files (the
124
+ 'Software'), to deal in the Software without restriction, including
125
+ without limitation the rights to use, copy, modify, merge, publish,
126
+ distribute, sublicense, and/or sell copies of the Software, and to
127
+ permit persons to whom the Software is furnished to do so, subject to
128
+ the following conditions:
129
+
130
+ The above copyright notice and this permission notice shall be
131
+ included in all copies or substantial portions of the Software.
132
+
133
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
134
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
135
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
136
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
137
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
138
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
139
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
140
+
141
+ [http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
142
+ [https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
143
+ [pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
144
+ [socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
145
+ [http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
node_modules/agent-base/dist/src/index.d.ts ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import net from 'net';
3
+ import http from 'http';
4
+ import https from 'https';
5
+ import { Duplex } from 'stream';
6
+ import { EventEmitter } from 'events';
7
+ declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
8
+ declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent;
9
+ declare namespace createAgent {
10
+ interface ClientRequest extends http.ClientRequest {
11
+ _last?: boolean;
12
+ _hadError?: boolean;
13
+ method: string;
14
+ }
15
+ interface AgentRequestOptions {
16
+ host?: string;
17
+ path?: string;
18
+ port: number;
19
+ }
20
+ interface HttpRequestOptions extends AgentRequestOptions, Omit<http.RequestOptions, keyof AgentRequestOptions> {
21
+ secureEndpoint: false;
22
+ }
23
+ interface HttpsRequestOptions extends AgentRequestOptions, Omit<https.RequestOptions, keyof AgentRequestOptions> {
24
+ secureEndpoint: true;
25
+ }
26
+ type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
27
+ type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
28
+ type AgentCallbackReturn = Duplex | AgentLike;
29
+ type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void;
30
+ type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise<createAgent.AgentCallbackReturn>;
31
+ type AgentCallback = typeof Agent.prototype.callback;
32
+ type AgentOptions = {
33
+ timeout?: number;
34
+ };
35
+ /**
36
+ * Base `http.Agent` implementation.
37
+ * No pooling/keep-alive is implemented by default.
38
+ *
39
+ * @param {Function} callback
40
+ * @api public
41
+ */
42
+ class Agent extends EventEmitter {
43
+ timeout: number | null;
44
+ maxFreeSockets: number;
45
+ maxTotalSockets: number;
46
+ maxSockets: number;
47
+ sockets: {
48
+ [key: string]: net.Socket[];
49
+ };
50
+ freeSockets: {
51
+ [key: string]: net.Socket[];
52
+ };
53
+ requests: {
54
+ [key: string]: http.IncomingMessage[];
55
+ };
56
+ options: https.AgentOptions;
57
+ private promisifiedCallback?;
58
+ private explicitDefaultPort?;
59
+ private explicitProtocol?;
60
+ constructor(callback?: createAgent.AgentCallback | createAgent.AgentOptions, _opts?: createAgent.AgentOptions);
61
+ get defaultPort(): number;
62
+ set defaultPort(v: number);
63
+ get protocol(): string;
64
+ set protocol(v: string);
65
+ callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions, fn: createAgent.AgentCallbackCallback): void;
66
+ callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions): createAgent.AgentCallbackReturn | Promise<createAgent.AgentCallbackReturn>;
67
+ /**
68
+ * Called by node-core's "_http_client.js" module when creating
69
+ * a new HTTP request with this Agent instance.
70
+ *
71
+ * @api public
72
+ */
73
+ addRequest(req: ClientRequest, _opts: RequestOptions): void;
74
+ freeSocket(socket: net.Socket, opts: AgentOptions): void;
75
+ destroy(): void;
76
+ }
77
+ }
78
+ export = createAgent;
node_modules/agent-base/dist/src/index.js ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const events_1 = require("events");
6
+ const debug_1 = __importDefault(require("debug"));
7
+ const promisify_1 = __importDefault(require("./promisify"));
8
+ const debug = debug_1.default('agent-base');
9
+ function isAgent(v) {
10
+ return Boolean(v) && typeof v.addRequest === 'function';
11
+ }
12
+ function isSecureEndpoint() {
13
+ const { stack } = new Error();
14
+ if (typeof stack !== 'string')
15
+ return false;
16
+ return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
17
+ }
18
+ function createAgent(callback, opts) {
19
+ return new createAgent.Agent(callback, opts);
20
+ }
21
+ (function (createAgent) {
22
+ /**
23
+ * Base `http.Agent` implementation.
24
+ * No pooling/keep-alive is implemented by default.
25
+ *
26
+ * @param {Function} callback
27
+ * @api public
28
+ */
29
+ class Agent extends events_1.EventEmitter {
30
+ constructor(callback, _opts) {
31
+ super();
32
+ let opts = _opts;
33
+ if (typeof callback === 'function') {
34
+ this.callback = callback;
35
+ }
36
+ else if (callback) {
37
+ opts = callback;
38
+ }
39
+ // Timeout for the socket to be returned from the callback
40
+ this.timeout = null;
41
+ if (opts && typeof opts.timeout === 'number') {
42
+ this.timeout = opts.timeout;
43
+ }
44
+ // These aren't actually used by `agent-base`, but are required
45
+ // for the TypeScript definition files in `@types/node` :/
46
+ this.maxFreeSockets = 1;
47
+ this.maxSockets = 1;
48
+ this.maxTotalSockets = Infinity;
49
+ this.sockets = {};
50
+ this.freeSockets = {};
51
+ this.requests = {};
52
+ this.options = {};
53
+ }
54
+ get defaultPort() {
55
+ if (typeof this.explicitDefaultPort === 'number') {
56
+ return this.explicitDefaultPort;
57
+ }
58
+ return isSecureEndpoint() ? 443 : 80;
59
+ }
60
+ set defaultPort(v) {
61
+ this.explicitDefaultPort = v;
62
+ }
63
+ get protocol() {
64
+ if (typeof this.explicitProtocol === 'string') {
65
+ return this.explicitProtocol;
66
+ }
67
+ return isSecureEndpoint() ? 'https:' : 'http:';
68
+ }
69
+ set protocol(v) {
70
+ this.explicitProtocol = v;
71
+ }
72
+ callback(req, opts, fn) {
73
+ throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`');
74
+ }
75
+ /**
76
+ * Called by node-core's "_http_client.js" module when creating
77
+ * a new HTTP request with this Agent instance.
78
+ *
79
+ * @api public
80
+ */
81
+ addRequest(req, _opts) {
82
+ const opts = Object.assign({}, _opts);
83
+ if (typeof opts.secureEndpoint !== 'boolean') {
84
+ opts.secureEndpoint = isSecureEndpoint();
85
+ }
86
+ if (opts.host == null) {
87
+ opts.host = 'localhost';
88
+ }
89
+ if (opts.port == null) {
90
+ opts.port = opts.secureEndpoint ? 443 : 80;
91
+ }
92
+ if (opts.protocol == null) {
93
+ opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
94
+ }
95
+ if (opts.host && opts.path) {
96
+ // If both a `host` and `path` are specified then it's most
97
+ // likely the result of a `url.parse()` call... we need to
98
+ // remove the `path` portion so that `net.connect()` doesn't
99
+ // attempt to open that as a unix socket file.
100
+ delete opts.path;
101
+ }
102
+ delete opts.agent;
103
+ delete opts.hostname;
104
+ delete opts._defaultAgent;
105
+ delete opts.defaultPort;
106
+ delete opts.createConnection;
107
+ // Hint to use "Connection: close"
108
+ // XXX: non-documented `http` module API :(
109
+ req._last = true;
110
+ req.shouldKeepAlive = false;
111
+ let timedOut = false;
112
+ let timeoutId = null;
113
+ const timeoutMs = opts.timeout || this.timeout;
114
+ const onerror = (err) => {
115
+ if (req._hadError)
116
+ return;
117
+ req.emit('error', err);
118
+ // For Safety. Some additional errors might fire later on
119
+ // and we need to make sure we don't double-fire the error event.
120
+ req._hadError = true;
121
+ };
122
+ const ontimeout = () => {
123
+ timeoutId = null;
124
+ timedOut = true;
125
+ const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
126
+ err.code = 'ETIMEOUT';
127
+ onerror(err);
128
+ };
129
+ const callbackError = (err) => {
130
+ if (timedOut)
131
+ return;
132
+ if (timeoutId !== null) {
133
+ clearTimeout(timeoutId);
134
+ timeoutId = null;
135
+ }
136
+ onerror(err);
137
+ };
138
+ const onsocket = (socket) => {
139
+ if (timedOut)
140
+ return;
141
+ if (timeoutId != null) {
142
+ clearTimeout(timeoutId);
143
+ timeoutId = null;
144
+ }
145
+ if (isAgent(socket)) {
146
+ // `socket` is actually an `http.Agent` instance, so
147
+ // relinquish responsibility for this `req` to the Agent
148
+ // from here on
149
+ debug('Callback returned another Agent instance %o', socket.constructor.name);
150
+ socket.addRequest(req, opts);
151
+ return;
152
+ }
153
+ if (socket) {
154
+ socket.once('free', () => {
155
+ this.freeSocket(socket, opts);
156
+ });
157
+ req.onSocket(socket);
158
+ return;
159
+ }
160
+ const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
161
+ onerror(err);
162
+ };
163
+ if (typeof this.callback !== 'function') {
164
+ onerror(new Error('`callback` is not defined'));
165
+ return;
166
+ }
167
+ if (!this.promisifiedCallback) {
168
+ if (this.callback.length >= 3) {
169
+ debug('Converting legacy callback function to promise');
170
+ this.promisifiedCallback = promisify_1.default(this.callback);
171
+ }
172
+ else {
173
+ this.promisifiedCallback = this.callback;
174
+ }
175
+ }
176
+ if (typeof timeoutMs === 'number' && timeoutMs > 0) {
177
+ timeoutId = setTimeout(ontimeout, timeoutMs);
178
+ }
179
+ if ('port' in opts && typeof opts.port !== 'number') {
180
+ opts.port = Number(opts.port);
181
+ }
182
+ try {
183
+ debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`);
184
+ Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError);
185
+ }
186
+ catch (err) {
187
+ Promise.reject(err).catch(callbackError);
188
+ }
189
+ }
190
+ freeSocket(socket, opts) {
191
+ debug('Freeing socket %o %o', socket.constructor.name, opts);
192
+ socket.destroy();
193
+ }
194
+ destroy() {
195
+ debug('Destroying agent %o', this.constructor.name);
196
+ }
197
+ }
198
+ createAgent.Agent = Agent;
199
+ // So that `instanceof` works correctly
200
+ createAgent.prototype = createAgent.Agent.prototype;
201
+ })(createAgent || (createAgent = {}));
202
+ module.exports = createAgent;
203
+ //# sourceMappingURL=index.js.map
node_modules/agent-base/dist/src/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,IAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC;AAOD,SAAS,WAAW,CACnB,QAA+D,EAC/D,IAA+B;IAE/B,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,WAAU,WAAW;IAmDpB;;;;;;OAMG;IACH,MAAa,KAAM,SAAQ,qBAAY;QAmBtC,YACC,QAA+D,EAC/D,KAAgC;YAEhC,KAAK,EAAE,CAAC;YAER,IAAI,IAAI,GAAG,KAAK,CAAC;YACjB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;aACzB;iBAAM,IAAI,QAAQ,EAAE;gBACpB,IAAI,GAAG,QAAQ,CAAC;aAChB;YAED,0DAA0D;YAC1D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;aAC5B;YAED,+DAA+D;YAC/D,0DAA0D;YAC1D,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;YACpB,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;YAChC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QACnB,CAAC;QAED,IAAI,WAAW;YACd,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,QAAQ,EAAE;gBACjD,OAAO,IAAI,CAAC,mBAAmB,CAAC;aAChC;YACD,OAAO,gBAAgB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,CAAC;QAED,IAAI,WAAW,CAAC,CAAS;YACxB,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ;YACX,IAAI,OAAO,IAAI,CAAC,gBAAgB,KAAK,QAAQ,EAAE;gBAC9C,OAAO,IAAI,CAAC,gBAAgB,CAAC;aAC7B;YACD,OAAO,gBAAgB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;QAChD,CAAC;QAED,IAAI,QAAQ,CAAC,CAAS;YACrB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC3B,CAAC;QAaD,QAAQ,CACP,GAA8B,EAC9B,IAA8B,EAC9B,EAAsC;YAKtC,MAAM,IAAI,KAAK,CACd,yFAAyF,CACzF,CAAC;QACH,CAAC;QAED;;;;;WAKG;QACH,UAAU,CAAC,GAAkB,EAAE,KAAqB;YACnD,MAAM,IAAI,qBAAwB,KAAK,CAAE,CAAC;YAE1C,IAAI,OAAO,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE;gBAC7C,IAAI,CAAC,cAAc,GAAG,gBAAgB,EAAE,CAAC;aACzC;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;aACxB;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3C;YAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;aACzD;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;gBAC3B,2DAA2D;gBAC3D,0DAA0D;gBAC1D,4DAA4D;gBAC5D,8CAA8C;gBAC9C,OAAO,IAAI,CAAC,IAAI,CAAC;aACjB;YAED,OAAO,IAAI,CAAC,KAAK,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;YACrB,OAAO,IAAI,CAAC,aAAa,CAAC;YAC1B,OAAO,IAAI,CAAC,WAAW,CAAC;YACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;YAE7B,kCAAkC;YAClC,2CAA2C;YAC3C,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC;YACjB,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC;YAE5B,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,IAAI,SAAS,GAAyC,IAAI,CAAC;YAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;YAE/C,MAAM,OAAO,GAAG,CAAC,GAA0B,EAAE,EAAE;gBAC9C,IAAI,GAAG,CAAC,SAAS;oBAAE,OAAO;gBAC1B,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBACvB,yDAAyD;gBACzD,iEAAiE;gBACjE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC;YAEF,MAAM,SAAS,GAAG,GAAG,EAAE;gBACtB,SAAS,GAAG,IAAI,CAAC;gBACjB,QAAQ,GAAG,IAAI,CAAC;gBAChB,MAAM,GAAG,GAA0B,IAAI,KAAK,CAC3C,sDAAsD,SAAS,IAAI,CACnE,CAAC;gBACF,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC;gBACtB,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,MAAM,aAAa,GAAG,CAAC,GAA0B,EAAE,EAAE;gBACpD,IAAI,QAAQ;oBAAE,OAAO;gBACrB,IAAI,SAAS,KAAK,IAAI,EAAE;oBACvB,YAAY,CAAC,SAAS,CAAC,CAAC;oBACxB,SAAS,GAAG,IAAI,CAAC;iBACjB;gBACD,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,MAAM,QAAQ,GAAG,CAAC,MAA2B,EAAE,EAAE;gBAChD,IAAI,QAAQ;oBAAE,OAAO;gBACrB,IAAI,SAAS,IAAI,IAAI,EAAE;oBACtB,YAAY,CAAC,SAAS,CAAC,CAAC;oBACxB,SAAS,GAAG,IAAI,CAAC;iBACjB;gBAED,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;oBACpB,oDAAoD;oBACpD,wDAAwD;oBACxD,eAAe;oBACf,KAAK,CACJ,6CAA6C,EAC7C,MAAM,CAAC,WAAW,CAAC,IAAI,CACvB,CAAC;oBACD,MAA4B,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;oBACpD,OAAO;iBACP;gBAED,IAAI,MAAM,EAAE;oBACX,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;wBACxB,IAAI,CAAC,UAAU,CAAC,MAAoB,EAAE,IAAI,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,GAAG,CAAC,QAAQ,CAAC,MAAoB,CAAC,CAAC;oBACnC,OAAO;iBACP;gBAED,MAAM,GAAG,GAAG,IAAI,KAAK,CACpB,qDAAqD,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,CAC/E,CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;gBACxC,OAAO,CAAC,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;gBAChD,OAAO;aACP;YAED,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;gBAC9B,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE;oBAC9B,KAAK,CAAC,gDAAgD,CAAC,CAAC;oBACxD,IAAI,CAAC,mBAAmB,GAAG,mBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBACpD;qBAAM;oBACN,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC;iBACzC;aACD;YAED,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,GAAG,CAAC,EAAE;gBACnD,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;aAC7C;YAED,IAAI,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACpD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAED,IAAI;gBACH,KAAK,CACJ,qCAAqC,EACrC,IAAI,CAAC,QAAQ,EACb,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAC3B,CAAC;gBACF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CACxD,QAAQ,EACR,aAAa,CACb,CAAC;aACF;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACzC;QACF,CAAC;QAED,UAAU,CAAC,MAAkB,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAxPY,iBAAK,QAwPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAtTS,WAAW,KAAX,WAAW,QAsTpB;AAED,iBAAS,WAAW,CAAC"}
node_modules/agent-base/dist/src/promisify.d.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index';
2
+ declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void;
3
+ export default function promisify(fn: LegacyCallback): AgentCallbackPromise;
4
+ export {};
node_modules/agent-base/dist/src/promisify.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function promisify(fn) {
4
+ return function (req, opts) {
5
+ return new Promise((resolve, reject) => {
6
+ fn.call(this, req, opts, (err, rtn) => {
7
+ if (err) {
8
+ reject(err);
9
+ }
10
+ else {
11
+ resolve(rtn);
12
+ }
13
+ });
14
+ });
15
+ };
16
+ }
17
+ exports.default = promisify;
18
+ //# sourceMappingURL=promisify.js.map
node_modules/agent-base/dist/src/promisify.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,EAAE,EAAE;gBAC5D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"}
node_modules/agent-base/node_modules/debug/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
4
+ Copyright (c) 2018-2021 Josh Junon
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7
+ and associated documentation files (the 'Software'), to deal in the Software without restriction,
8
+ including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
+ and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all copies or substantial
13
+ portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+
node_modules/agent-base/node_modules/debug/README.md ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # debug
2
+ [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
3
+ [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
4
+
5
+ <img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
6
+
7
+ A tiny JavaScript debugging utility modelled after Node.js core's debugging
8
+ technique. Works in Node.js and web browsers.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ $ npm install debug
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ `debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
19
+
20
+ Example [_app.js_](./examples/node/app.js):
21
+
22
+ ```js
23
+ var debug = require('debug')('http')
24
+ , http = require('http')
25
+ , name = 'My App';
26
+
27
+ // fake app
28
+
29
+ debug('booting %o', name);
30
+
31
+ http.createServer(function(req, res){
32
+ debug(req.method + ' ' + req.url);
33
+ res.end('hello\n');
34
+ }).listen(3000, function(){
35
+ debug('listening');
36
+ });
37
+
38
+ // fake worker of some kind
39
+
40
+ require('./worker');
41
+ ```
42
+
43
+ Example [_worker.js_](./examples/node/worker.js):
44
+
45
+ ```js
46
+ var a = require('debug')('worker:a')
47
+ , b = require('debug')('worker:b');
48
+
49
+ function work() {
50
+ a('doing lots of uninteresting work');
51
+ setTimeout(work, Math.random() * 1000);
52
+ }
53
+
54
+ work();
55
+
56
+ function workb() {
57
+ b('doing some work');
58
+ setTimeout(workb, Math.random() * 2000);
59
+ }
60
+
61
+ workb();
62
+ ```
63
+
64
+ The `DEBUG` environment variable is then used to enable these based on space or
65
+ comma-delimited names.
66
+
67
+ Here are some examples:
68
+
69
+ <img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
70
+ <img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
71
+ <img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
72
+
73
+ #### Windows command prompt notes
74
+
75
+ ##### CMD
76
+
77
+ On Windows the environment variable is set using the `set` command.
78
+
79
+ ```cmd
80
+ set DEBUG=*,-not_this
81
+ ```
82
+
83
+ Example:
84
+
85
+ ```cmd
86
+ set DEBUG=* & node app.js
87
+ ```
88
+
89
+ ##### PowerShell (VS Code default)
90
+
91
+ PowerShell uses different syntax to set environment variables.
92
+
93
+ ```cmd
94
+ $env:DEBUG = "*,-not_this"
95
+ ```
96
+
97
+ Example:
98
+
99
+ ```cmd
100
+ $env:DEBUG='app';node app.js
101
+ ```
102
+
103
+ Then, run the program to be debugged as usual.
104
+
105
+ npm script example:
106
+ ```js
107
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
108
+ ```
109
+
110
+ ## Namespace Colors
111
+
112
+ Every debug instance has a color generated for it based on its namespace name.
113
+ This helps when visually parsing the debug output to identify which debug instance
114
+ a debug line belongs to.
115
+
116
+ #### Node.js
117
+
118
+ In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
119
+ the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
120
+ otherwise debug will only use a small handful of basic colors.
121
+
122
+ <img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
123
+
124
+ #### Web Browser
125
+
126
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
127
+ option. These are WebKit web inspectors, Firefox ([since version
128
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
129
+ and the Firebug plugin for Firefox (any version).
130
+
131
+ <img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
132
+
133
+
134
+ ## Millisecond diff
135
+
136
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
137
+
138
+ <img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
139
+
140
+ When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
141
+
142
+ <img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
143
+
144
+
145
+ ## Conventions
146
+
147
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
148
+
149
+ ## Wildcards
150
+
151
+ The `*` character may be used as a wildcard. Suppose for example your library has
152
+ debuggers named "connect:bodyParser", "connect:compress", "connect:session",
153
+ instead of listing all three with
154
+ `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
155
+ `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
156
+
157
+ You can also exclude specific debuggers by prefixing them with a "-" character.
158
+ For example, `DEBUG=*,-connect:*` would include all debuggers except those
159
+ starting with "connect:".
160
+
161
+ ## Environment Variables
162
+
163
+ When running through Node.js, you can set a few environment variables that will
164
+ change the behavior of the debug logging:
165
+
166
+ | Name | Purpose |
167
+ |-----------|-------------------------------------------------|
168
+ | `DEBUG` | Enables/disables specific debugging namespaces. |
169
+ | `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
170
+ | `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
171
+ | `DEBUG_DEPTH` | Object inspection depth. |
172
+ | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
173
+
174
+
175
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
176
+ converted into an Options object that gets used with `%o`/`%O` formatters.
177
+ See the Node.js documentation for
178
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
179
+ for the complete list.
180
+
181
+ ## Formatters
182
+
183
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
184
+ Below are the officially supported formatters:
185
+
186
+ | Formatter | Representation |
187
+ |-----------|----------------|
188
+ | `%O` | Pretty-print an Object on multiple lines. |
189
+ | `%o` | Pretty-print an Object all on a single line. |
190
+ | `%s` | String. |
191
+ | `%d` | Number (both integer and float). |
192
+ | `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
193
+ | `%%` | Single percent sign ('%'). This does not consume an argument. |
194
+
195
+
196
+ ### Custom formatters
197
+
198
+ You can add custom formatters by extending the `debug.formatters` object.
199
+ For example, if you wanted to add support for rendering a Buffer as hex with
200
+ `%h`, you could do something like:
201
+
202
+ ```js
203
+ const createDebug = require('debug')
204
+ createDebug.formatters.h = (v) => {
205
+ return v.toString('hex')
206
+ }
207
+
208
+ // …elsewhere
209
+ const debug = createDebug('foo')
210
+ debug('this is hex: %h', new Buffer('hello world'))
211
+ // foo this is hex: 68656c6c6f20776f726c6421 +0ms
212
+ ```
213
+
214
+
215
+ ## Browser Support
216
+
217
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
218
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
219
+ if you don't want to build it yourself.
220
+
221
+ Debug's enable state is currently persisted by `localStorage`.
222
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
223
+ and wish to debug both. You can enable this using `localStorage.debug`:
224
+
225
+ ```js
226
+ localStorage.debug = 'worker:*'
227
+ ```
228
+
229
+ And then refresh the page.
230
+
231
+ ```js
232
+ a = debug('worker:a');
233
+ b = debug('worker:b');
234
+
235
+ setInterval(function(){
236
+ a('doing some work');
237
+ }, 1000);
238
+
239
+ setInterval(function(){
240
+ b('doing some work');
241
+ }, 1200);
242
+ ```
243
+
244
+ In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
245
+
246
+ <img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
247
+
248
+ ## Output streams
249
+
250
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
251
+
252
+ Example [_stdout.js_](./examples/node/stdout.js):
253
+
254
+ ```js
255
+ var debug = require('debug');
256
+ var error = debug('app:error');
257
+
258
+ // by default stderr is used
259
+ error('goes to stderr!');
260
+
261
+ var log = debug('app:log');
262
+ // set this namespace to log via console.log
263
+ log.log = console.log.bind(console); // don't forget to bind to console!
264
+ log('goes to stdout');
265
+ error('still goes to stderr!');
266
+
267
+ // set all output to go via console.info
268
+ // overrides all per-namespace log settings
269
+ debug.log = console.info.bind(console);
270
+ error('now goes to stdout via console.info');
271
+ log('still goes to stdout, but via console.info now');
272
+ ```
273
+
274
+ ## Extend
275
+ You can simply extend debugger
276
+ ```js
277
+ const log = require('debug')('auth');
278
+
279
+ //creates new debug instance with extended namespace
280
+ const logSign = log.extend('sign');
281
+ const logLogin = log.extend('login');
282
+
283
+ log('hello'); // auth hello
284
+ logSign('hello'); //auth:sign hello
285
+ logLogin('hello'); //auth:login hello
286
+ ```
287
+
288
+ ## Set dynamically
289
+
290
+ You can also enable debug dynamically by calling the `enable()` method :
291
+
292
+ ```js
293
+ let debug = require('debug');
294
+
295
+ console.log(1, debug.enabled('test'));
296
+
297
+ debug.enable('test');
298
+ console.log(2, debug.enabled('test'));
299
+
300
+ debug.disable();
301
+ console.log(3, debug.enabled('test'));
302
+
303
+ ```
304
+
305
+ print :
306
+ ```
307
+ 1 false
308
+ 2 true
309
+ 3 false
310
+ ```
311
+
312
+ Usage :
313
+ `enable(namespaces)`
314
+ `namespaces` can include modes separated by a colon and wildcards.
315
+
316
+ Note that calling `enable()` completely overrides previously set DEBUG variable :
317
+
318
+ ```
319
+ $ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
320
+ => false
321
+ ```
322
+
323
+ `disable()`
324
+
325
+ Will disable all namespaces. The functions returns the namespaces currently
326
+ enabled (and skipped). This can be useful if you want to disable debugging
327
+ temporarily without knowing what was enabled to begin with.
328
+
329
+ For example:
330
+
331
+ ```js
332
+ let debug = require('debug');
333
+ debug.enable('foo:*,-foo:bar');
334
+ let namespaces = debug.disable();
335
+ debug.enable(namespaces);
336
+ ```
337
+
338
+ Note: There is no guarantee that the string will be identical to the initial
339
+ enable string, but semantically they will be identical.
340
+
341
+ ## Checking whether a debug target is enabled
342
+
343
+ After you've created a debug instance, you can determine whether or not it is
344
+ enabled by checking the `enabled` property:
345
+
346
+ ```javascript
347
+ const debug = require('debug')('http');
348
+
349
+ if (debug.enabled) {
350
+ // do stuff...
351
+ }
352
+ ```
353
+
354
+ You can also manually toggle this property to force the debug instance to be
355
+ enabled or disabled.
356
+
357
+ ## Usage in child processes
358
+
359
+ Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
360
+ For example:
361
+
362
+ ```javascript
363
+ worker = fork(WORKER_WRAP_PATH, [workerPath], {
364
+ stdio: [
365
+ /* stdin: */ 0,
366
+ /* stdout: */ 'pipe',
367
+ /* stderr: */ 'pipe',
368
+ 'ipc',
369
+ ],
370
+ env: Object.assign({}, process.env, {
371
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
372
+ }),
373
+ });
374
+
375
+ worker.stderr.pipe(process.stderr, { end: false });
376
+ ```
377
+
378
+
379
+ ## Authors
380
+
381
+ - TJ Holowaychuk
382
+ - Nathan Rajlich
383
+ - Andrew Rhyne
384
+ - Josh Junon
385
+
386
+ ## Backers
387
+
388
+ Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
389
+
390
+ <a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
391
+ <a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
392
+ <a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
393
+ <a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
394
+ <a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
395
+ <a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
396
+ <a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
397
+ <a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
398
+ <a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
399
+ <a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
400
+ <a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
401
+ <a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
402
+ <a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
403
+ <a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
404
+ <a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
405
+ <a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
406
+ <a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
407
+ <a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
408
+ <a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
409
+ <a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
410
+ <a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
411
+ <a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
412
+ <a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
413
+ <a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
414
+ <a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
415
+ <a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
416
+ <a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
417
+ <a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
418
+ <a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
419
+ <a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
420
+
421
+
422
+ ## Sponsors
423
+
424
+ Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
425
+
426
+ <a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
427
+ <a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
428
+ <a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
429
+ <a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
430
+ <a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
431
+ <a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
432
+ <a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
433
+ <a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
434
+ <a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
435
+ <a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
436
+ <a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
437
+ <a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
438
+ <a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
439
+ <a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
440
+ <a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
441
+ <a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
442
+ <a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
443
+ <a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
444
+ <a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
445
+ <a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
446
+ <a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
447
+ <a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
448
+ <a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
449
+ <a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
450
+ <a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
451
+ <a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
452
+ <a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
453
+ <a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
454
+ <a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
455
+ <a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
456
+
457
+ ## License
458
+
459
+ (The MIT License)
460
+
461
+ Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
462
+ Copyright (c) 2018-2021 Josh Junon
463
+
464
+ Permission is hereby granted, free of charge, to any person obtaining
465
+ a copy of this software and associated documentation files (the
466
+ 'Software'), to deal in the Software without restriction, including
467
+ without limitation the rights to use, copy, modify, merge, publish,
468
+ distribute, sublicense, and/or sell copies of the Software, and to
469
+ permit persons to whom the Software is furnished to do so, subject to
470
+ the following conditions:
471
+
472
+ The above copyright notice and this permission notice shall be
473
+ included in all copies or substantial portions of the Software.
474
+
475
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
476
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
477
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
478
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
479
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
480
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
481
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/agent-base/node_modules/debug/package.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "debug",
3
+ "version": "4.4.3",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git://github.com/debug-js/debug.git"
7
+ },
8
+ "description": "Lightweight debugging utility for Node.js and the browser",
9
+ "keywords": [
10
+ "debug",
11
+ "log",
12
+ "debugger"
13
+ ],
14
+ "files": [
15
+ "src",
16
+ "LICENSE",
17
+ "README.md"
18
+ ],
19
+ "author": "Josh Junon (https://github.com/qix-)",
20
+ "contributors": [
21
+ "TJ Holowaychuk <tj@vision-media.ca>",
22
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
23
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
24
+ ],
25
+ "license": "MIT",
26
+ "scripts": {
27
+ "lint": "xo",
28
+ "test": "npm run test:node && npm run test:browser && npm run lint",
29
+ "test:node": "mocha test.js test.node.js",
30
+ "test:browser": "karma start --single-run",
31
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
32
+ },
33
+ "dependencies": {
34
+ "ms": "^2.1.3"
35
+ },
36
+ "devDependencies": {
37
+ "brfs": "^2.0.1",
38
+ "browserify": "^16.2.3",
39
+ "coveralls": "^3.0.2",
40
+ "karma": "^3.1.4",
41
+ "karma-browserify": "^6.0.0",
42
+ "karma-chrome-launcher": "^2.2.0",
43
+ "karma-mocha": "^1.3.0",
44
+ "mocha": "^5.2.0",
45
+ "mocha-lcov-reporter": "^1.2.0",
46
+ "sinon": "^14.0.0",
47
+ "xo": "^0.23.0"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "supports-color": {
51
+ "optional": true
52
+ }
53
+ },
54
+ "main": "./src/index.js",
55
+ "browser": "./src/browser.js",
56
+ "engines": {
57
+ "node": ">=6.0"
58
+ },
59
+ "xo": {
60
+ "rules": {
61
+ "import/extensions": "off"
62
+ }
63
+ }
64
+ }
node_modules/agent-base/node_modules/debug/src/browser.js ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint-env browser */
2
+
3
+ /**
4
+ * This is the web browser implementation of `debug()`.
5
+ */
6
+
7
+ exports.formatArgs = formatArgs;
8
+ exports.save = save;
9
+ exports.load = load;
10
+ exports.useColors = useColors;
11
+ exports.storage = localstorage();
12
+ exports.destroy = (() => {
13
+ let warned = false;
14
+
15
+ return () => {
16
+ if (!warned) {
17
+ warned = true;
18
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
19
+ }
20
+ };
21
+ })();
22
+
23
+ /**
24
+ * Colors.
25
+ */
26
+
27
+ exports.colors = [
28
+ '#0000CC',
29
+ '#0000FF',
30
+ '#0033CC',
31
+ '#0033FF',
32
+ '#0066CC',
33
+ '#0066FF',
34
+ '#0099CC',
35
+ '#0099FF',
36
+ '#00CC00',
37
+ '#00CC33',
38
+ '#00CC66',
39
+ '#00CC99',
40
+ '#00CCCC',
41
+ '#00CCFF',
42
+ '#3300CC',
43
+ '#3300FF',
44
+ '#3333CC',
45
+ '#3333FF',
46
+ '#3366CC',
47
+ '#3366FF',
48
+ '#3399CC',
49
+ '#3399FF',
50
+ '#33CC00',
51
+ '#33CC33',
52
+ '#33CC66',
53
+ '#33CC99',
54
+ '#33CCCC',
55
+ '#33CCFF',
56
+ '#6600CC',
57
+ '#6600FF',
58
+ '#6633CC',
59
+ '#6633FF',
60
+ '#66CC00',
61
+ '#66CC33',
62
+ '#9900CC',
63
+ '#9900FF',
64
+ '#9933CC',
65
+ '#9933FF',
66
+ '#99CC00',
67
+ '#99CC33',
68
+ '#CC0000',
69
+ '#CC0033',
70
+ '#CC0066',
71
+ '#CC0099',
72
+ '#CC00CC',
73
+ '#CC00FF',
74
+ '#CC3300',
75
+ '#CC3333',
76
+ '#CC3366',
77
+ '#CC3399',
78
+ '#CC33CC',
79
+ '#CC33FF',
80
+ '#CC6600',
81
+ '#CC6633',
82
+ '#CC9900',
83
+ '#CC9933',
84
+ '#CCCC00',
85
+ '#CCCC33',
86
+ '#FF0000',
87
+ '#FF0033',
88
+ '#FF0066',
89
+ '#FF0099',
90
+ '#FF00CC',
91
+ '#FF00FF',
92
+ '#FF3300',
93
+ '#FF3333',
94
+ '#FF3366',
95
+ '#FF3399',
96
+ '#FF33CC',
97
+ '#FF33FF',
98
+ '#FF6600',
99
+ '#FF6633',
100
+ '#FF9900',
101
+ '#FF9933',
102
+ '#FFCC00',
103
+ '#FFCC33'
104
+ ];
105
+
106
+ /**
107
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
108
+ * and the Firebug extension (any Firefox version) are known
109
+ * to support "%c" CSS customizations.
110
+ *
111
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
112
+ */
113
+
114
+ // eslint-disable-next-line complexity
115
+ function useColors() {
116
+ // NB: In an Electron preload script, document will be defined but not fully
117
+ // initialized. Since we know we're in Chrome, we'll just detect this case
118
+ // explicitly
119
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
120
+ return true;
121
+ }
122
+
123
+ // Internet Explorer and Edge do not support colors.
124
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
125
+ return false;
126
+ }
127
+
128
+ let m;
129
+
130
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
131
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
132
+ // eslint-disable-next-line no-return-assign
133
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
134
+ // Is firebug? http://stackoverflow.com/a/398120/376773
135
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
136
+ // Is firefox >= v31?
137
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
138
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
139
+ // Double check webkit in userAgent just in case we are in a worker
140
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
141
+ }
142
+
143
+ /**
144
+ * Colorize log arguments if enabled.
145
+ *
146
+ * @api public
147
+ */
148
+
149
+ function formatArgs(args) {
150
+ args[0] = (this.useColors ? '%c' : '') +
151
+ this.namespace +
152
+ (this.useColors ? ' %c' : ' ') +
153
+ args[0] +
154
+ (this.useColors ? '%c ' : ' ') +
155
+ '+' + module.exports.humanize(this.diff);
156
+
157
+ if (!this.useColors) {
158
+ return;
159
+ }
160
+
161
+ const c = 'color: ' + this.color;
162
+ args.splice(1, 0, c, 'color: inherit');
163
+
164
+ // The final "%c" is somewhat tricky, because there could be other
165
+ // arguments passed either before or after the %c, so we need to
166
+ // figure out the correct index to insert the CSS into
167
+ let index = 0;
168
+ let lastC = 0;
169
+ args[0].replace(/%[a-zA-Z%]/g, match => {
170
+ if (match === '%%') {
171
+ return;
172
+ }
173
+ index++;
174
+ if (match === '%c') {
175
+ // We only are interested in the *last* %c
176
+ // (the user may have provided their own)
177
+ lastC = index;
178
+ }
179
+ });
180
+
181
+ args.splice(lastC, 0, c);
182
+ }
183
+
184
+ /**
185
+ * Invokes `console.debug()` when available.
186
+ * No-op when `console.debug` is not a "function".
187
+ * If `console.debug` is not available, falls back
188
+ * to `console.log`.
189
+ *
190
+ * @api public
191
+ */
192
+ exports.log = console.debug || console.log || (() => {});
193
+
194
+ /**
195
+ * Save `namespaces`.
196
+ *
197
+ * @param {String} namespaces
198
+ * @api private
199
+ */
200
+ function save(namespaces) {
201
+ try {
202
+ if (namespaces) {
203
+ exports.storage.setItem('debug', namespaces);
204
+ } else {
205
+ exports.storage.removeItem('debug');
206
+ }
207
+ } catch (error) {
208
+ // Swallow
209
+ // XXX (@Qix-) should we be logging these?
210
+ }
211
+ }
212
+
213
+ /**
214
+ * Load `namespaces`.
215
+ *
216
+ * @return {String} returns the previously persisted debug modes
217
+ * @api private
218
+ */
219
+ function load() {
220
+ let r;
221
+ try {
222
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
223
+ } catch (error) {
224
+ // Swallow
225
+ // XXX (@Qix-) should we be logging these?
226
+ }
227
+
228
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
229
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
230
+ r = process.env.DEBUG;
231
+ }
232
+
233
+ return r;
234
+ }
235
+
236
+ /**
237
+ * Localstorage attempts to return the localstorage.
238
+ *
239
+ * This is necessary because safari throws
240
+ * when a user disables cookies/localstorage
241
+ * and you attempt to access it.
242
+ *
243
+ * @return {LocalStorage}
244
+ * @api private
245
+ */
246
+
247
+ function localstorage() {
248
+ try {
249
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
250
+ // The Browser also has localStorage in the global context.
251
+ return localStorage;
252
+ } catch (error) {
253
+ // Swallow
254
+ // XXX (@Qix-) should we be logging these?
255
+ }
256
+ }
257
+
258
+ module.exports = require('./common')(exports);
259
+
260
+ const {formatters} = module.exports;
261
+
262
+ /**
263
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
264
+ */
265
+
266
+ formatters.j = function (v) {
267
+ try {
268
+ return JSON.stringify(v);
269
+ } catch (error) {
270
+ return '[UnexpectedJSONParseError]: ' + error.message;
271
+ }
272
+ };
node_modules/agent-base/node_modules/debug/src/common.js ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /**
3
+ * This is the common logic for both the Node.js and web browser
4
+ * implementations of `debug()`.
5
+ */
6
+
7
+ function setup(env) {
8
+ createDebug.debug = createDebug;
9
+ createDebug.default = createDebug;
10
+ createDebug.coerce = coerce;
11
+ createDebug.disable = disable;
12
+ createDebug.enable = enable;
13
+ createDebug.enabled = enabled;
14
+ createDebug.humanize = require('ms');
15
+ createDebug.destroy = destroy;
16
+
17
+ Object.keys(env).forEach(key => {
18
+ createDebug[key] = env[key];
19
+ });
20
+
21
+ /**
22
+ * The currently active debug mode names, and names to skip.
23
+ */
24
+
25
+ createDebug.names = [];
26
+ createDebug.skips = [];
27
+
28
+ /**
29
+ * Map of special "%n" handling functions, for the debug "format" argument.
30
+ *
31
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
32
+ */
33
+ createDebug.formatters = {};
34
+
35
+ /**
36
+ * Selects a color for a debug namespace
37
+ * @param {String} namespace The namespace string for the debug instance to be colored
38
+ * @return {Number|String} An ANSI color code for the given namespace
39
+ * @api private
40
+ */
41
+ function selectColor(namespace) {
42
+ let hash = 0;
43
+
44
+ for (let i = 0; i < namespace.length; i++) {
45
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
46
+ hash |= 0; // Convert to 32bit integer
47
+ }
48
+
49
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
50
+ }
51
+ createDebug.selectColor = selectColor;
52
+
53
+ /**
54
+ * Create a debugger with the given `namespace`.
55
+ *
56
+ * @param {String} namespace
57
+ * @return {Function}
58
+ * @api public
59
+ */
60
+ function createDebug(namespace) {
61
+ let prevTime;
62
+ let enableOverride = null;
63
+ let namespacesCache;
64
+ let enabledCache;
65
+
66
+ function debug(...args) {
67
+ // Disabled?
68
+ if (!debug.enabled) {
69
+ return;
70
+ }
71
+
72
+ const self = debug;
73
+
74
+ // Set `diff` timestamp
75
+ const curr = Number(new Date());
76
+ const ms = curr - (prevTime || curr);
77
+ self.diff = ms;
78
+ self.prev = prevTime;
79
+ self.curr = curr;
80
+ prevTime = curr;
81
+
82
+ args[0] = createDebug.coerce(args[0]);
83
+
84
+ if (typeof args[0] !== 'string') {
85
+ // Anything else let's inspect with %O
86
+ args.unshift('%O');
87
+ }
88
+
89
+ // Apply any `formatters` transformations
90
+ let index = 0;
91
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
92
+ // If we encounter an escaped % then don't increase the array index
93
+ if (match === '%%') {
94
+ return '%';
95
+ }
96
+ index++;
97
+ const formatter = createDebug.formatters[format];
98
+ if (typeof formatter === 'function') {
99
+ const val = args[index];
100
+ match = formatter.call(self, val);
101
+
102
+ // Now we need to remove `args[index]` since it's inlined in the `format`
103
+ args.splice(index, 1);
104
+ index--;
105
+ }
106
+ return match;
107
+ });
108
+
109
+ // Apply env-specific formatting (colors, etc.)
110
+ createDebug.formatArgs.call(self, args);
111
+
112
+ const logFn = self.log || createDebug.log;
113
+ logFn.apply(self, args);
114
+ }
115
+
116
+ debug.namespace = namespace;
117
+ debug.useColors = createDebug.useColors();
118
+ debug.color = createDebug.selectColor(namespace);
119
+ debug.extend = extend;
120
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
121
+
122
+ Object.defineProperty(debug, 'enabled', {
123
+ enumerable: true,
124
+ configurable: false,
125
+ get: () => {
126
+ if (enableOverride !== null) {
127
+ return enableOverride;
128
+ }
129
+ if (namespacesCache !== createDebug.namespaces) {
130
+ namespacesCache = createDebug.namespaces;
131
+ enabledCache = createDebug.enabled(namespace);
132
+ }
133
+
134
+ return enabledCache;
135
+ },
136
+ set: v => {
137
+ enableOverride = v;
138
+ }
139
+ });
140
+
141
+ // Env-specific initialization logic for debug instances
142
+ if (typeof createDebug.init === 'function') {
143
+ createDebug.init(debug);
144
+ }
145
+
146
+ return debug;
147
+ }
148
+
149
+ function extend(namespace, delimiter) {
150
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
151
+ newDebug.log = this.log;
152
+ return newDebug;
153
+ }
154
+
155
+ /**
156
+ * Enables a debug mode by namespaces. This can include modes
157
+ * separated by a colon and wildcards.
158
+ *
159
+ * @param {String} namespaces
160
+ * @api public
161
+ */
162
+ function enable(namespaces) {
163
+ createDebug.save(namespaces);
164
+ createDebug.namespaces = namespaces;
165
+
166
+ createDebug.names = [];
167
+ createDebug.skips = [];
168
+
169
+ const split = (typeof namespaces === 'string' ? namespaces : '')
170
+ .trim()
171
+ .replace(/\s+/g, ',')
172
+ .split(',')
173
+ .filter(Boolean);
174
+
175
+ for (const ns of split) {
176
+ if (ns[0] === '-') {
177
+ createDebug.skips.push(ns.slice(1));
178
+ } else {
179
+ createDebug.names.push(ns);
180
+ }
181
+ }
182
+ }
183
+
184
+ /**
185
+ * Checks if the given string matches a namespace template, honoring
186
+ * asterisks as wildcards.
187
+ *
188
+ * @param {String} search
189
+ * @param {String} template
190
+ * @return {Boolean}
191
+ */
192
+ function matchesTemplate(search, template) {
193
+ let searchIndex = 0;
194
+ let templateIndex = 0;
195
+ let starIndex = -1;
196
+ let matchIndex = 0;
197
+
198
+ while (searchIndex < search.length) {
199
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
200
+ // Match character or proceed with wildcard
201
+ if (template[templateIndex] === '*') {
202
+ starIndex = templateIndex;
203
+ matchIndex = searchIndex;
204
+ templateIndex++; // Skip the '*'
205
+ } else {
206
+ searchIndex++;
207
+ templateIndex++;
208
+ }
209
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
210
+ // Backtrack to the last '*' and try to match more characters
211
+ templateIndex = starIndex + 1;
212
+ matchIndex++;
213
+ searchIndex = matchIndex;
214
+ } else {
215
+ return false; // No match
216
+ }
217
+ }
218
+
219
+ // Handle trailing '*' in template
220
+ while (templateIndex < template.length && template[templateIndex] === '*') {
221
+ templateIndex++;
222
+ }
223
+
224
+ return templateIndex === template.length;
225
+ }
226
+
227
+ /**
228
+ * Disable debug output.
229
+ *
230
+ * @return {String} namespaces
231
+ * @api public
232
+ */
233
+ function disable() {
234
+ const namespaces = [
235
+ ...createDebug.names,
236
+ ...createDebug.skips.map(namespace => '-' + namespace)
237
+ ].join(',');
238
+ createDebug.enable('');
239
+ return namespaces;
240
+ }
241
+
242
+ /**
243
+ * Returns true if the given mode name is enabled, false otherwise.
244
+ *
245
+ * @param {String} name
246
+ * @return {Boolean}
247
+ * @api public
248
+ */
249
+ function enabled(name) {
250
+ for (const skip of createDebug.skips) {
251
+ if (matchesTemplate(name, skip)) {
252
+ return false;
253
+ }
254
+ }
255
+
256
+ for (const ns of createDebug.names) {
257
+ if (matchesTemplate(name, ns)) {
258
+ return true;
259
+ }
260
+ }
261
+
262
+ return false;
263
+ }
264
+
265
+ /**
266
+ * Coerce `val`.
267
+ *
268
+ * @param {Mixed} val
269
+ * @return {Mixed}
270
+ * @api private
271
+ */
272
+ function coerce(val) {
273
+ if (val instanceof Error) {
274
+ return val.stack || val.message;
275
+ }
276
+ return val;
277
+ }
278
+
279
+ /**
280
+ * XXX DO NOT USE. This is a temporary stub function.
281
+ * XXX It WILL be removed in the next major release.
282
+ */
283
+ function destroy() {
284
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
285
+ }
286
+
287
+ createDebug.enable(createDebug.load());
288
+
289
+ return createDebug;
290
+ }
291
+
292
+ module.exports = setup;
node_modules/agent-base/node_modules/debug/src/index.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Detect Electron renderer / nwjs process, which is node, but we should
3
+ * treat as a browser.
4
+ */
5
+
6
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
7
+ module.exports = require('./browser.js');
8
+ } else {
9
+ module.exports = require('./node.js');
10
+ }
node_modules/agent-base/node_modules/debug/src/node.js ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Module dependencies.
3
+ */
4
+
5
+ const tty = require('tty');
6
+ const util = require('util');
7
+
8
+ /**
9
+ * This is the Node.js implementation of `debug()`.
10
+ */
11
+
12
+ exports.init = init;
13
+ exports.log = log;
14
+ exports.formatArgs = formatArgs;
15
+ exports.save = save;
16
+ exports.load = load;
17
+ exports.useColors = useColors;
18
+ exports.destroy = util.deprecate(
19
+ () => {},
20
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
21
+ );
22
+
23
+ /**
24
+ * Colors.
25
+ */
26
+
27
+ exports.colors = [6, 2, 3, 4, 5, 1];
28
+
29
+ try {
30
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
31
+ // eslint-disable-next-line import/no-extraneous-dependencies
32
+ const supportsColor = require('supports-color');
33
+
34
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
35
+ exports.colors = [
36
+ 20,
37
+ 21,
38
+ 26,
39
+ 27,
40
+ 32,
41
+ 33,
42
+ 38,
43
+ 39,
44
+ 40,
45
+ 41,
46
+ 42,
47
+ 43,
48
+ 44,
49
+ 45,
50
+ 56,
51
+ 57,
52
+ 62,
53
+ 63,
54
+ 68,
55
+ 69,
56
+ 74,
57
+ 75,
58
+ 76,
59
+ 77,
60
+ 78,
61
+ 79,
62
+ 80,
63
+ 81,
64
+ 92,
65
+ 93,
66
+ 98,
67
+ 99,
68
+ 112,
69
+ 113,
70
+ 128,
71
+ 129,
72
+ 134,
73
+ 135,
74
+ 148,
75
+ 149,
76
+ 160,
77
+ 161,
78
+ 162,
79
+ 163,
80
+ 164,
81
+ 165,
82
+ 166,
83
+ 167,
84
+ 168,
85
+ 169,
86
+ 170,
87
+ 171,
88
+ 172,
89
+ 173,
90
+ 178,
91
+ 179,
92
+ 184,
93
+ 185,
94
+ 196,
95
+ 197,
96
+ 198,
97
+ 199,
98
+ 200,
99
+ 201,
100
+ 202,
101
+ 203,
102
+ 204,
103
+ 205,
104
+ 206,
105
+ 207,
106
+ 208,
107
+ 209,
108
+ 214,
109
+ 215,
110
+ 220,
111
+ 221
112
+ ];
113
+ }
114
+ } catch (error) {
115
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
116
+ }
117
+
118
+ /**
119
+ * Build up the default `inspectOpts` object from the environment variables.
120
+ *
121
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
122
+ */
123
+
124
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
125
+ return /^debug_/i.test(key);
126
+ }).reduce((obj, key) => {
127
+ // Camel-case
128
+ const prop = key
129
+ .substring(6)
130
+ .toLowerCase()
131
+ .replace(/_([a-z])/g, (_, k) => {
132
+ return k.toUpperCase();
133
+ });
134
+
135
+ // Coerce string value into JS value
136
+ let val = process.env[key];
137
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
138
+ val = true;
139
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
140
+ val = false;
141
+ } else if (val === 'null') {
142
+ val = null;
143
+ } else {
144
+ val = Number(val);
145
+ }
146
+
147
+ obj[prop] = val;
148
+ return obj;
149
+ }, {});
150
+
151
+ /**
152
+ * Is stdout a TTY? Colored output is enabled when `true`.
153
+ */
154
+
155
+ function useColors() {
156
+ return 'colors' in exports.inspectOpts ?
157
+ Boolean(exports.inspectOpts.colors) :
158
+ tty.isatty(process.stderr.fd);
159
+ }
160
+
161
+ /**
162
+ * Adds ANSI color escape codes if enabled.
163
+ *
164
+ * @api public
165
+ */
166
+
167
+ function formatArgs(args) {
168
+ const {namespace: name, useColors} = this;
169
+
170
+ if (useColors) {
171
+ const c = this.color;
172
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
173
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
174
+
175
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
176
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
177
+ } else {
178
+ args[0] = getDate() + name + ' ' + args[0];
179
+ }
180
+ }
181
+
182
+ function getDate() {
183
+ if (exports.inspectOpts.hideDate) {
184
+ return '';
185
+ }
186
+ return new Date().toISOString() + ' ';
187
+ }
188
+
189
+ /**
190
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
191
+ */
192
+
193
+ function log(...args) {
194
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
195
+ }
196
+
197
+ /**
198
+ * Save `namespaces`.
199
+ *
200
+ * @param {String} namespaces
201
+ * @api private
202
+ */
203
+ function save(namespaces) {
204
+ if (namespaces) {
205
+ process.env.DEBUG = namespaces;
206
+ } else {
207
+ // If you set a process.env field to null or undefined, it gets cast to the
208
+ // string 'null' or 'undefined'. Just delete instead.
209
+ delete process.env.DEBUG;
210
+ }
211
+ }
212
+
213
+ /**
214
+ * Load `namespaces`.
215
+ *
216
+ * @return {String} returns the previously persisted debug modes
217
+ * @api private
218
+ */
219
+
220
+ function load() {
221
+ return process.env.DEBUG;
222
+ }
223
+
224
+ /**
225
+ * Init logic for `debug` instances.
226
+ *
227
+ * Create a new `inspectOpts` object in case `useColors` is set
228
+ * differently for a particular `debug` instance.
229
+ */
230
+
231
+ function init(debug) {
232
+ debug.inspectOpts = {};
233
+
234
+ const keys = Object.keys(exports.inspectOpts);
235
+ for (let i = 0; i < keys.length; i++) {
236
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
237
+ }
238
+ }
239
+
240
+ module.exports = require('./common')(exports);
241
+
242
+ const {formatters} = module.exports;
243
+
244
+ /**
245
+ * Map %o to `util.inspect()`, all on a single line.
246
+ */
247
+
248
+ formatters.o = function (v) {
249
+ this.inspectOpts.colors = this.useColors;
250
+ return util.inspect(v, this.inspectOpts)
251
+ .split('\n')
252
+ .map(str => str.trim())
253
+ .join(' ');
254
+ };
255
+
256
+ /**
257
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
258
+ */
259
+
260
+ formatters.O = function (v) {
261
+ this.inspectOpts.colors = this.useColors;
262
+ return util.inspect(v, this.inspectOpts);
263
+ };
node_modules/agent-base/node_modules/ms/index.js ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Helpers.
3
+ */
4
+
5
+ var s = 1000;
6
+ var m = s * 60;
7
+ var h = m * 60;
8
+ var d = h * 24;
9
+ var w = d * 7;
10
+ var y = d * 365.25;
11
+
12
+ /**
13
+ * Parse or format the given `val`.
14
+ *
15
+ * Options:
16
+ *
17
+ * - `long` verbose formatting [false]
18
+ *
19
+ * @param {String|Number} val
20
+ * @param {Object} [options]
21
+ * @throws {Error} throw an error if val is not a non-empty string or a number
22
+ * @return {String|Number}
23
+ * @api public
24
+ */
25
+
26
+ module.exports = function (val, options) {
27
+ options = options || {};
28
+ var type = typeof val;
29
+ if (type === 'string' && val.length > 0) {
30
+ return parse(val);
31
+ } else if (type === 'number' && isFinite(val)) {
32
+ return options.long ? fmtLong(val) : fmtShort(val);
33
+ }
34
+ throw new Error(
35
+ 'val is not a non-empty string or a valid number. val=' +
36
+ JSON.stringify(val)
37
+ );
38
+ };
39
+
40
+ /**
41
+ * Parse the given `str` and return milliseconds.
42
+ *
43
+ * @param {String} str
44
+ * @return {Number}
45
+ * @api private
46
+ */
47
+
48
+ function parse(str) {
49
+ str = String(str);
50
+ if (str.length > 100) {
51
+ return;
52
+ }
53
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
54
+ str
55
+ );
56
+ if (!match) {
57
+ return;
58
+ }
59
+ var n = parseFloat(match[1]);
60
+ var type = (match[2] || 'ms').toLowerCase();
61
+ switch (type) {
62
+ case 'years':
63
+ case 'year':
64
+ case 'yrs':
65
+ case 'yr':
66
+ case 'y':
67
+ return n * y;
68
+ case 'weeks':
69
+ case 'week':
70
+ case 'w':
71
+ return n * w;
72
+ case 'days':
73
+ case 'day':
74
+ case 'd':
75
+ return n * d;
76
+ case 'hours':
77
+ case 'hour':
78
+ case 'hrs':
79
+ case 'hr':
80
+ case 'h':
81
+ return n * h;
82
+ case 'minutes':
83
+ case 'minute':
84
+ case 'mins':
85
+ case 'min':
86
+ case 'm':
87
+ return n * m;
88
+ case 'seconds':
89
+ case 'second':
90
+ case 'secs':
91
+ case 'sec':
92
+ case 's':
93
+ return n * s;
94
+ case 'milliseconds':
95
+ case 'millisecond':
96
+ case 'msecs':
97
+ case 'msec':
98
+ case 'ms':
99
+ return n;
100
+ default:
101
+ return undefined;
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Short format for `ms`.
107
+ *
108
+ * @param {Number} ms
109
+ * @return {String}
110
+ * @api private
111
+ */
112
+
113
+ function fmtShort(ms) {
114
+ var msAbs = Math.abs(ms);
115
+ if (msAbs >= d) {
116
+ return Math.round(ms / d) + 'd';
117
+ }
118
+ if (msAbs >= h) {
119
+ return Math.round(ms / h) + 'h';
120
+ }
121
+ if (msAbs >= m) {
122
+ return Math.round(ms / m) + 'm';
123
+ }
124
+ if (msAbs >= s) {
125
+ return Math.round(ms / s) + 's';
126
+ }
127
+ return ms + 'ms';
128
+ }
129
+
130
+ /**
131
+ * Long format for `ms`.
132
+ *
133
+ * @param {Number} ms
134
+ * @return {String}
135
+ * @api private
136
+ */
137
+
138
+ function fmtLong(ms) {
139
+ var msAbs = Math.abs(ms);
140
+ if (msAbs >= d) {
141
+ return plural(ms, msAbs, d, 'day');
142
+ }
143
+ if (msAbs >= h) {
144
+ return plural(ms, msAbs, h, 'hour');
145
+ }
146
+ if (msAbs >= m) {
147
+ return plural(ms, msAbs, m, 'minute');
148
+ }
149
+ if (msAbs >= s) {
150
+ return plural(ms, msAbs, s, 'second');
151
+ }
152
+ return ms + ' ms';
153
+ }
154
+
155
+ /**
156
+ * Pluralization helper.
157
+ */
158
+
159
+ function plural(ms, msAbs, n, name) {
160
+ var isPlural = msAbs >= n * 1.5;
161
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
162
+ }
node_modules/agent-base/node_modules/ms/license.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Vercel, Inc.
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.
node_modules/agent-base/node_modules/ms/package.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ms",
3
+ "version": "2.1.3",
4
+ "description": "Tiny millisecond conversion utility",
5
+ "repository": "vercel/ms",
6
+ "main": "./index",
7
+ "files": [
8
+ "index.js"
9
+ ],
10
+ "scripts": {
11
+ "precommit": "lint-staged",
12
+ "lint": "eslint lib/* bin/*",
13
+ "test": "mocha tests.js"
14
+ },
15
+ "eslintConfig": {
16
+ "extends": "eslint:recommended",
17
+ "env": {
18
+ "node": true,
19
+ "es6": true
20
+ }
21
+ },
22
+ "lint-staged": {
23
+ "*.js": [
24
+ "npm run lint",
25
+ "prettier --single-quote --write",
26
+ "git add"
27
+ ]
28
+ },
29
+ "license": "MIT",
30
+ "devDependencies": {
31
+ "eslint": "4.18.2",
32
+ "expect.js": "0.3.1",
33
+ "husky": "0.14.3",
34
+ "lint-staged": "5.0.0",
35
+ "mocha": "4.0.1",
36
+ "prettier": "2.0.5"
37
+ }
38
+ }
node_modules/agent-base/node_modules/ms/readme.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ms
2
+
3
+ ![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
4
+
5
+ Use this package to easily convert various time formats to milliseconds.
6
+
7
+ ## Examples
8
+
9
+ ```js
10
+ ms('2 days') // 172800000
11
+ ms('1d') // 86400000
12
+ ms('10h') // 36000000
13
+ ms('2.5 hrs') // 9000000
14
+ ms('2h') // 7200000
15
+ ms('1m') // 60000
16
+ ms('5s') // 5000
17
+ ms('1y') // 31557600000
18
+ ms('100') // 100
19
+ ms('-3 days') // -259200000
20
+ ms('-1h') // -3600000
21
+ ms('-200') // -200
22
+ ```
23
+
24
+ ### Convert from Milliseconds
25
+
26
+ ```js
27
+ ms(60000) // "1m"
28
+ ms(2 * 60000) // "2m"
29
+ ms(-3 * 60000) // "-3m"
30
+ ms(ms('10 hours')) // "10h"
31
+ ```
32
+
33
+ ### Time Format Written-Out
34
+
35
+ ```js
36
+ ms(60000, { long: true }) // "1 minute"
37
+ ms(2 * 60000, { long: true }) // "2 minutes"
38
+ ms(-3 * 60000, { long: true }) // "-3 minutes"
39
+ ms(ms('10 hours'), { long: true }) // "10 hours"
40
+ ```
41
+
42
+ ## Features
43
+
44
+ - Works both in [Node.js](https://nodejs.org) and in the browser
45
+ - If a number is supplied to `ms`, a string with a unit is returned
46
+ - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
47
+ - If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
48
+
49
+ ## Related Packages
50
+
51
+ - [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
52
+
53
+ ## Caught a Bug?
54
+
55
+ 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
56
+ 2. Link the package to the global module directory: `npm link`
57
+ 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
58
+
59
+ As always, you can run the tests using: `npm test`
node_modules/agent-base/package.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "agent-base",
3
+ "version": "6.0.2",
4
+ "description": "Turn a function into an `http.Agent` instance",
5
+ "main": "dist/src/index",
6
+ "typings": "dist/src/index",
7
+ "files": [
8
+ "dist/src",
9
+ "src"
10
+ ],
11
+ "scripts": {
12
+ "prebuild": "rimraf dist",
13
+ "build": "tsc",
14
+ "postbuild": "cpy --parents src test '!**/*.ts' dist",
15
+ "test": "mocha --reporter spec dist/test/*.js",
16
+ "test-lint": "eslint src --ext .js,.ts",
17
+ "prepublishOnly": "npm run build"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git://github.com/TooTallNate/node-agent-base.git"
22
+ },
23
+ "keywords": [
24
+ "http",
25
+ "agent",
26
+ "base",
27
+ "barebones",
28
+ "https"
29
+ ],
30
+ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
31
+ "license": "MIT",
32
+ "bugs": {
33
+ "url": "https://github.com/TooTallNate/node-agent-base/issues"
34
+ },
35
+ "dependencies": {
36
+ "debug": "4"
37
+ },
38
+ "devDependencies": {
39
+ "@types/debug": "4",
40
+ "@types/mocha": "^5.2.7",
41
+ "@types/node": "^14.0.20",
42
+ "@types/semver": "^7.1.0",
43
+ "@types/ws": "^6.0.3",
44
+ "@typescript-eslint/eslint-plugin": "1.6.0",
45
+ "@typescript-eslint/parser": "1.1.0",
46
+ "async-listen": "^1.2.0",
47
+ "cpy-cli": "^2.0.0",
48
+ "eslint": "5.16.0",
49
+ "eslint-config-airbnb": "17.1.0",
50
+ "eslint-config-prettier": "4.1.0",
51
+ "eslint-import-resolver-typescript": "1.1.1",
52
+ "eslint-plugin-import": "2.16.0",
53
+ "eslint-plugin-jsx-a11y": "6.2.1",
54
+ "eslint-plugin-react": "7.12.4",
55
+ "mocha": "^6.2.0",
56
+ "rimraf": "^3.0.0",
57
+ "semver": "^7.1.2",
58
+ "typescript": "^3.5.3",
59
+ "ws": "^3.0.0"
60
+ },
61
+ "engines": {
62
+ "node": ">= 6.0.0"
63
+ }
64
+ }
node_modules/agent-base/src/index.ts ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import net from 'net';
2
+ import http from 'http';
3
+ import https from 'https';
4
+ import { Duplex } from 'stream';
5
+ import { EventEmitter } from 'events';
6
+ import createDebug from 'debug';
7
+ import promisify from './promisify';
8
+
9
+ const debug = createDebug('agent-base');
10
+
11
+ function isAgent(v: any): v is createAgent.AgentLike {
12
+ return Boolean(v) && typeof v.addRequest === 'function';
13
+ }
14
+
15
+ function isSecureEndpoint(): boolean {
16
+ const { stack } = new Error();
17
+ if (typeof stack !== 'string') return false;
18
+ return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
19
+ }
20
+
21
+ function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
22
+ function createAgent(
23
+ callback: createAgent.AgentCallback,
24
+ opts?: createAgent.AgentOptions
25
+ ): createAgent.Agent;
26
+ function createAgent(
27
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
28
+ opts?: createAgent.AgentOptions
29
+ ) {
30
+ return new createAgent.Agent(callback, opts);
31
+ }
32
+
33
+ namespace createAgent {
34
+ export interface ClientRequest extends http.ClientRequest {
35
+ _last?: boolean;
36
+ _hadError?: boolean;
37
+ method: string;
38
+ }
39
+
40
+ export interface AgentRequestOptions {
41
+ host?: string;
42
+ path?: string;
43
+ // `port` on `http.RequestOptions` can be a string or undefined,
44
+ // but `net.TcpNetConnectOpts` expects only a number
45
+ port: number;
46
+ }
47
+
48
+ export interface HttpRequestOptions
49
+ extends AgentRequestOptions,
50
+ Omit<http.RequestOptions, keyof AgentRequestOptions> {
51
+ secureEndpoint: false;
52
+ }
53
+
54
+ export interface HttpsRequestOptions
55
+ extends AgentRequestOptions,
56
+ Omit<https.RequestOptions, keyof AgentRequestOptions> {
57
+ secureEndpoint: true;
58
+ }
59
+
60
+ export type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
61
+
62
+ export type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
63
+
64
+ export type AgentCallbackReturn = Duplex | AgentLike;
65
+
66
+ export type AgentCallbackCallback = (
67
+ err?: Error | null,
68
+ socket?: createAgent.AgentCallbackReturn
69
+ ) => void;
70
+
71
+ export type AgentCallbackPromise = (
72
+ req: createAgent.ClientRequest,
73
+ opts: createAgent.RequestOptions
74
+ ) =>
75
+ | createAgent.AgentCallbackReturn
76
+ | Promise<createAgent.AgentCallbackReturn>;
77
+
78
+ export type AgentCallback = typeof Agent.prototype.callback;
79
+
80
+ export type AgentOptions = {
81
+ timeout?: number;
82
+ };
83
+
84
+ /**
85
+ * Base `http.Agent` implementation.
86
+ * No pooling/keep-alive is implemented by default.
87
+ *
88
+ * @param {Function} callback
89
+ * @api public
90
+ */
91
+ export class Agent extends EventEmitter {
92
+ public timeout: number | null;
93
+ public maxFreeSockets: number;
94
+ public maxTotalSockets: number;
95
+ public maxSockets: number;
96
+ public sockets: {
97
+ [key: string]: net.Socket[];
98
+ };
99
+ public freeSockets: {
100
+ [key: string]: net.Socket[];
101
+ };
102
+ public requests: {
103
+ [key: string]: http.IncomingMessage[];
104
+ };
105
+ public options: https.AgentOptions;
106
+ private promisifiedCallback?: createAgent.AgentCallbackPromise;
107
+ private explicitDefaultPort?: number;
108
+ private explicitProtocol?: string;
109
+
110
+ constructor(
111
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
112
+ _opts?: createAgent.AgentOptions
113
+ ) {
114
+ super();
115
+
116
+ let opts = _opts;
117
+ if (typeof callback === 'function') {
118
+ this.callback = callback;
119
+ } else if (callback) {
120
+ opts = callback;
121
+ }
122
+
123
+ // Timeout for the socket to be returned from the callback
124
+ this.timeout = null;
125
+ if (opts && typeof opts.timeout === 'number') {
126
+ this.timeout = opts.timeout;
127
+ }
128
+
129
+ // These aren't actually used by `agent-base`, but are required
130
+ // for the TypeScript definition files in `@types/node` :/
131
+ this.maxFreeSockets = 1;
132
+ this.maxSockets = 1;
133
+ this.maxTotalSockets = Infinity;
134
+ this.sockets = {};
135
+ this.freeSockets = {};
136
+ this.requests = {};
137
+ this.options = {};
138
+ }
139
+
140
+ get defaultPort(): number {
141
+ if (typeof this.explicitDefaultPort === 'number') {
142
+ return this.explicitDefaultPort;
143
+ }
144
+ return isSecureEndpoint() ? 443 : 80;
145
+ }
146
+
147
+ set defaultPort(v: number) {
148
+ this.explicitDefaultPort = v;
149
+ }
150
+
151
+ get protocol(): string {
152
+ if (typeof this.explicitProtocol === 'string') {
153
+ return this.explicitProtocol;
154
+ }
155
+ return isSecureEndpoint() ? 'https:' : 'http:';
156
+ }
157
+
158
+ set protocol(v: string) {
159
+ this.explicitProtocol = v;
160
+ }
161
+
162
+ callback(
163
+ req: createAgent.ClientRequest,
164
+ opts: createAgent.RequestOptions,
165
+ fn: createAgent.AgentCallbackCallback
166
+ ): void;
167
+ callback(
168
+ req: createAgent.ClientRequest,
169
+ opts: createAgent.RequestOptions
170
+ ):
171
+ | createAgent.AgentCallbackReturn
172
+ | Promise<createAgent.AgentCallbackReturn>;
173
+ callback(
174
+ req: createAgent.ClientRequest,
175
+ opts: createAgent.AgentOptions,
176
+ fn?: createAgent.AgentCallbackCallback
177
+ ):
178
+ | createAgent.AgentCallbackReturn
179
+ | Promise<createAgent.AgentCallbackReturn>
180
+ | void {
181
+ throw new Error(
182
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
183
+ );
184
+ }
185
+
186
+ /**
187
+ * Called by node-core's "_http_client.js" module when creating
188
+ * a new HTTP request with this Agent instance.
189
+ *
190
+ * @api public
191
+ */
192
+ addRequest(req: ClientRequest, _opts: RequestOptions): void {
193
+ const opts: RequestOptions = { ..._opts };
194
+
195
+ if (typeof opts.secureEndpoint !== 'boolean') {
196
+ opts.secureEndpoint = isSecureEndpoint();
197
+ }
198
+
199
+ if (opts.host == null) {
200
+ opts.host = 'localhost';
201
+ }
202
+
203
+ if (opts.port == null) {
204
+ opts.port = opts.secureEndpoint ? 443 : 80;
205
+ }
206
+
207
+ if (opts.protocol == null) {
208
+ opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
209
+ }
210
+
211
+ if (opts.host && opts.path) {
212
+ // If both a `host` and `path` are specified then it's most
213
+ // likely the result of a `url.parse()` call... we need to
214
+ // remove the `path` portion so that `net.connect()` doesn't
215
+ // attempt to open that as a unix socket file.
216
+ delete opts.path;
217
+ }
218
+
219
+ delete opts.agent;
220
+ delete opts.hostname;
221
+ delete opts._defaultAgent;
222
+ delete opts.defaultPort;
223
+ delete opts.createConnection;
224
+
225
+ // Hint to use "Connection: close"
226
+ // XXX: non-documented `http` module API :(
227
+ req._last = true;
228
+ req.shouldKeepAlive = false;
229
+
230
+ let timedOut = false;
231
+ let timeoutId: ReturnType<typeof setTimeout> | null = null;
232
+ const timeoutMs = opts.timeout || this.timeout;
233
+
234
+ const onerror = (err: NodeJS.ErrnoException) => {
235
+ if (req._hadError) return;
236
+ req.emit('error', err);
237
+ // For Safety. Some additional errors might fire later on
238
+ // and we need to make sure we don't double-fire the error event.
239
+ req._hadError = true;
240
+ };
241
+
242
+ const ontimeout = () => {
243
+ timeoutId = null;
244
+ timedOut = true;
245
+ const err: NodeJS.ErrnoException = new Error(
246
+ `A "socket" was not created for HTTP request before ${timeoutMs}ms`
247
+ );
248
+ err.code = 'ETIMEOUT';
249
+ onerror(err);
250
+ };
251
+
252
+ const callbackError = (err: NodeJS.ErrnoException) => {
253
+ if (timedOut) return;
254
+ if (timeoutId !== null) {
255
+ clearTimeout(timeoutId);
256
+ timeoutId = null;
257
+ }
258
+ onerror(err);
259
+ };
260
+
261
+ const onsocket = (socket: AgentCallbackReturn) => {
262
+ if (timedOut) return;
263
+ if (timeoutId != null) {
264
+ clearTimeout(timeoutId);
265
+ timeoutId = null;
266
+ }
267
+
268
+ if (isAgent(socket)) {
269
+ // `socket` is actually an `http.Agent` instance, so
270
+ // relinquish responsibility for this `req` to the Agent
271
+ // from here on
272
+ debug(
273
+ 'Callback returned another Agent instance %o',
274
+ socket.constructor.name
275
+ );
276
+ (socket as createAgent.Agent).addRequest(req, opts);
277
+ return;
278
+ }
279
+
280
+ if (socket) {
281
+ socket.once('free', () => {
282
+ this.freeSocket(socket as net.Socket, opts);
283
+ });
284
+ req.onSocket(socket as net.Socket);
285
+ return;
286
+ }
287
+
288
+ const err = new Error(
289
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
290
+ );
291
+ onerror(err);
292
+ };
293
+
294
+ if (typeof this.callback !== 'function') {
295
+ onerror(new Error('`callback` is not defined'));
296
+ return;
297
+ }
298
+
299
+ if (!this.promisifiedCallback) {
300
+ if (this.callback.length >= 3) {
301
+ debug('Converting legacy callback function to promise');
302
+ this.promisifiedCallback = promisify(this.callback);
303
+ } else {
304
+ this.promisifiedCallback = this.callback;
305
+ }
306
+ }
307
+
308
+ if (typeof timeoutMs === 'number' && timeoutMs > 0) {
309
+ timeoutId = setTimeout(ontimeout, timeoutMs);
310
+ }
311
+
312
+ if ('port' in opts && typeof opts.port !== 'number') {
313
+ opts.port = Number(opts.port);
314
+ }
315
+
316
+ try {
317
+ debug(
318
+ 'Resolving socket for %o request: %o',
319
+ opts.protocol,
320
+ `${req.method} ${req.path}`
321
+ );
322
+ Promise.resolve(this.promisifiedCallback(req, opts)).then(
323
+ onsocket,
324
+ callbackError
325
+ );
326
+ } catch (err) {
327
+ Promise.reject(err).catch(callbackError);
328
+ }
329
+ }
330
+
331
+ freeSocket(socket: net.Socket, opts: AgentOptions) {
332
+ debug('Freeing socket %o %o', socket.constructor.name, opts);
333
+ socket.destroy();
334
+ }
335
+
336
+ destroy() {
337
+ debug('Destroying agent %o', this.constructor.name);
338
+ }
339
+ }
340
+
341
+ // So that `instanceof` works correctly
342
+ createAgent.prototype = createAgent.Agent.prototype;
343
+ }
344
+
345
+ export = createAgent;
node_modules/agent-base/src/promisify.ts ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ Agent,
3
+ ClientRequest,
4
+ RequestOptions,
5
+ AgentCallbackCallback,
6
+ AgentCallbackPromise,
7
+ AgentCallbackReturn
8
+ } from './index';
9
+
10
+ type LegacyCallback = (
11
+ req: ClientRequest,
12
+ opts: RequestOptions,
13
+ fn: AgentCallbackCallback
14
+ ) => void;
15
+
16
+ export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
17
+ return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
18
+ return new Promise((resolve, reject) => {
19
+ fn.call(
20
+ this,
21
+ req,
22
+ opts,
23
+ (err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
24
+ if (err) {
25
+ reject(err);
26
+ } else {
27
+ resolve(rtn);
28
+ }
29
+ }
30
+ );
31
+ });
32
+ };
33
+ }
node_modules/anymatch/LICENSE ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The ISC License
2
+
3
+ Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
node_modules/anymatch/README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master)
2
+ ======
3
+ Javascript module to match a string against a regular expression, glob, string,
4
+ or function that takes the string as an argument and returns a truthy or falsy
5
+ value. The matcher can also be an array of any or all of these. Useful for
6
+ allowing a very flexible user-defined config to define things like file paths.
7
+
8
+ __Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__
9
+
10
+
11
+ Usage
12
+ -----
13
+ ```sh
14
+ npm install anymatch
15
+ ```
16
+
17
+ #### anymatch(matchers, testString, [returnIndex], [options])
18
+ * __matchers__: (_Array|String|RegExp|Function_)
19
+ String to be directly matched, string with glob patterns, regular expression
20
+ test, function that takes the testString as an argument and returns a truthy
21
+ value if it should be matched, or an array of any number and mix of these types.
22
+ * __testString__: (_String|Array_) The string to test against the matchers. If
23
+ passed as an array, the first element of the array will be used as the
24
+ `testString` for non-function matchers, while the entire array will be applied
25
+ as the arguments for function matchers.
26
+ * __options__: (_Object_ [optional]_) Any of the [picomatch](https://github.com/micromatch/picomatch#options) options.
27
+ * __returnIndex__: (_Boolean [optional]_) If true, return the array index of
28
+ the first matcher that that testString matched, or -1 if no match, instead of a
29
+ boolean result.
30
+
31
+ ```js
32
+ const anymatch = require('anymatch');
33
+
34
+ const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ;
35
+
36
+ anymatch(matchers, 'path/to/file.js'); // true
37
+ anymatch(matchers, 'path/anyjs/baz.js'); // true
38
+ anymatch(matchers, 'path/to/foo.js'); // true
39
+ anymatch(matchers, 'path/to/bar.js'); // true
40
+ anymatch(matchers, 'bar.js'); // false
41
+
42
+ // returnIndex = true
43
+ anymatch(matchers, 'foo.js', {returnIndex: true}); // 2
44
+ anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1
45
+
46
+ // any picomatc
47
+
48
+ // using globs to match directories and their children
49
+ anymatch('node_modules', 'node_modules'); // true
50
+ anymatch('node_modules', 'node_modules/somelib/index.js'); // false
51
+ anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true
52
+ anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false
53
+ anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true
54
+
55
+ const matcher = anymatch(matchers);
56
+ ['foo.js', 'bar.js'].filter(matcher); // [ 'foo.js' ]
57
+ anymatch master* ❯
58
+
59
+ ```
60
+
61
+ #### anymatch(matchers)
62
+ You can also pass in only your matcher(s) to get a curried function that has
63
+ already been bound to the provided matching criteria. This can be used as an
64
+ `Array#filter` callback.
65
+
66
+ ```js
67
+ var matcher = anymatch(matchers);
68
+
69
+ matcher('path/to/file.js'); // true
70
+ matcher('path/anyjs/baz.js', true); // 1
71
+
72
+ ['foo.js', 'bar.js'].filter(matcher); // ['foo.js']
73
+ ```
74
+
75
+ Changelog
76
+ ----------
77
+ [See release notes page on GitHub](https://github.com/micromatch/anymatch/releases)
78
+
79
+ - **v3.0:** Removed `startIndex` and `endIndex` arguments. Node 8.x-only.
80
+ - **v2.0:** [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information).
81
+ - **v1.2:** anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch)
82
+ for glob pattern matching. Issues with glob pattern matching should be
83
+ reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues).
84
+
85
+ License
86
+ -------
87
+ [ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE)
node_modules/anymatch/index.d.ts ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ type AnymatchFn = (testString: string) => boolean;
2
+ type AnymatchPattern = string|RegExp|AnymatchFn;
3
+ type AnymatchMatcher = AnymatchPattern|AnymatchPattern[]
4
+ type AnymatchTester = {
5
+ (testString: string|any[], returnIndex: true): number;
6
+ (testString: string|any[]): boolean;
7
+ }
8
+
9
+ type PicomatchOptions = {dot: boolean};
10
+
11
+ declare const anymatch: {
12
+ (matchers: AnymatchMatcher): AnymatchTester;
13
+ (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester;
14
+ (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number;
15
+ (matchers: AnymatchMatcher, testString: string|any[]): boolean;
16
+ }
17
+
18
+ export {AnymatchMatcher as Matcher}
19
+ export {AnymatchTester as Tester}
20
+ export default anymatch
node_modules/anymatch/index.js ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+
5
+ const picomatch = require('picomatch');
6
+ const normalizePath = require('normalize-path');
7
+
8
+ /**
9
+ * @typedef {(testString: string) => boolean} AnymatchFn
10
+ * @typedef {string|RegExp|AnymatchFn} AnymatchPattern
11
+ * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher
12
+ */
13
+ const BANG = '!';
14
+ const DEFAULT_OPTIONS = {returnIndex: false};
15
+ const arrify = (item) => Array.isArray(item) ? item : [item];
16
+
17
+ /**
18
+ * @param {AnymatchPattern} matcher
19
+ * @param {object} options
20
+ * @returns {AnymatchFn}
21
+ */
22
+ const createPattern = (matcher, options) => {
23
+ if (typeof matcher === 'function') {
24
+ return matcher;
25
+ }
26
+ if (typeof matcher === 'string') {
27
+ const glob = picomatch(matcher, options);
28
+ return (string) => matcher === string || glob(string);
29
+ }
30
+ if (matcher instanceof RegExp) {
31
+ return (string) => matcher.test(string);
32
+ }
33
+ return (string) => false;
34
+ };
35
+
36
+ /**
37
+ * @param {Array<Function>} patterns
38
+ * @param {Array<Function>} negPatterns
39
+ * @param {String|Array} args
40
+ * @param {Boolean} returnIndex
41
+ * @returns {boolean|number}
42
+ */
43
+ const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
44
+ const isList = Array.isArray(args);
45
+ const _path = isList ? args[0] : args;
46
+ if (!isList && typeof _path !== 'string') {
47
+ throw new TypeError('anymatch: second argument must be a string: got ' +
48
+ Object.prototype.toString.call(_path))
49
+ }
50
+ const path = normalizePath(_path, false);
51
+
52
+ for (let index = 0; index < negPatterns.length; index++) {
53
+ const nglob = negPatterns[index];
54
+ if (nglob(path)) {
55
+ return returnIndex ? -1 : false;
56
+ }
57
+ }
58
+
59
+ const applied = isList && [path].concat(args.slice(1));
60
+ for (let index = 0; index < patterns.length; index++) {
61
+ const pattern = patterns[index];
62
+ if (isList ? pattern(...applied) : pattern(path)) {
63
+ return returnIndex ? index : true;
64
+ }
65
+ }
66
+
67
+ return returnIndex ? -1 : false;
68
+ };
69
+
70
+ /**
71
+ * @param {AnymatchMatcher} matchers
72
+ * @param {Array|string} testString
73
+ * @param {object} options
74
+ * @returns {boolean|number|Function}
75
+ */
76
+ const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
77
+ if (matchers == null) {
78
+ throw new TypeError('anymatch: specify first argument');
79
+ }
80
+ const opts = typeof options === 'boolean' ? {returnIndex: options} : options;
81
+ const returnIndex = opts.returnIndex || false;
82
+
83
+ // Early cache for matchers.
84
+ const mtchers = arrify(matchers);
85
+ const negatedGlobs = mtchers
86
+ .filter(item => typeof item === 'string' && item.charAt(0) === BANG)
87
+ .map(item => item.slice(1))
88
+ .map(item => picomatch(item, opts));
89
+ const patterns = mtchers
90
+ .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG))
91
+ .map(matcher => createPattern(matcher, opts));
92
+
93
+ if (testString == null) {
94
+ return (testString, ri = false) => {
95
+ const returnIndex = typeof ri === 'boolean' ? ri : false;
96
+ return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
97
+ }
98
+ }
99
+
100
+ return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
101
+ };
102
+
103
+ anymatch.default = anymatch;
104
+ module.exports = anymatch;
node_modules/anymatch/package.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "anymatch",
3
+ "version": "3.1.3",
4
+ "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions",
5
+ "files": [
6
+ "index.js",
7
+ "index.d.ts"
8
+ ],
9
+ "dependencies": {
10
+ "normalize-path": "^3.0.0",
11
+ "picomatch": "^2.0.4"
12
+ },
13
+ "author": {
14
+ "name": "Elan Shanker",
15
+ "url": "https://github.com/es128"
16
+ },
17
+ "license": "ISC",
18
+ "homepage": "https://github.com/micromatch/anymatch",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/micromatch/anymatch"
22
+ },
23
+ "keywords": [
24
+ "match",
25
+ "any",
26
+ "string",
27
+ "file",
28
+ "fs",
29
+ "list",
30
+ "glob",
31
+ "regex",
32
+ "regexp",
33
+ "regular",
34
+ "expression",
35
+ "function"
36
+ ],
37
+ "scripts": {
38
+ "test": "nyc mocha",
39
+ "mocha": "mocha"
40
+ },
41
+ "devDependencies": {
42
+ "mocha": "^6.1.3",
43
+ "nyc": "^14.0.0"
44
+ },
45
+ "engines": {
46
+ "node": ">= 8"
47
+ }
48
+ }
node_modules/append-field/.npmignore ADDED
@@ -0,0 +1 @@
 
 
1
+ node_modules/
node_modules/append-field/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Linus Unnebäck
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.
node_modules/append-field/README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # `append-field`
2
+
3
+ A [W3C HTML JSON forms spec](http://www.w3.org/TR/html-json-forms/) compliant
4
+ field appender (for lack of a better name). Useful for people implementing
5
+ `application/x-www-form-urlencoded` and `multipart/form-data` parsers.
6
+
7
+ It works best on objects created with `Object.create(null)`. Otherwise it might
8
+ conflict with variables from the prototype (e.g. `hasOwnProperty`).
9
+
10
+ ## Installation
11
+
12
+ ```sh
13
+ npm install --save append-field
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```javascript
19
+ var appendField = require('append-field')
20
+ var obj = Object.create(null)
21
+
22
+ appendField(obj, 'pets[0][species]', 'Dahut')
23
+ appendField(obj, 'pets[0][name]', 'Hypatia')
24
+ appendField(obj, 'pets[1][species]', 'Felis Stultus')
25
+ appendField(obj, 'pets[1][name]', 'Billie')
26
+
27
+ console.log(obj)
28
+ ```
29
+
30
+ ```text
31
+ { pets:
32
+ [ { species: 'Dahut', name: 'Hypatia' },
33
+ { species: 'Felis Stultus', name: 'Billie' } ] }
34
+ ```
35
+
36
+ ## API
37
+
38
+ ### `appendField(store, key, value)`
39
+
40
+ Adds the field named `key` with the value `value` to the object `store`.
41
+
42
+ ## License
43
+
44
+ MIT
node_modules/append-field/index.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var parsePath = require('./lib/parse-path')
2
+ var setValue = require('./lib/set-value')
3
+
4
+ function appendField (store, key, value) {
5
+ var steps = parsePath(key)
6
+
7
+ steps.reduce(function (context, step) {
8
+ return setValue(context, step, context[step.key], value)
9
+ }, store)
10
+ }
11
+
12
+ module.exports = appendField
node_modules/append-field/lib/parse-path.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var reFirstKey = /^[^\[]*/
2
+ var reDigitPath = /^\[(\d+)\]/
3
+ var reNormalPath = /^\[([^\]]+)\]/
4
+
5
+ function parsePath (key) {
6
+ function failure () {
7
+ return [{ type: 'object', key: key, last: true }]
8
+ }
9
+
10
+ var firstKey = reFirstKey.exec(key)[0]
11
+ if (!firstKey) return failure()
12
+
13
+ var len = key.length
14
+ var pos = firstKey.length
15
+ var tail = { type: 'object', key: firstKey }
16
+ var steps = [tail]
17
+
18
+ while (pos < len) {
19
+ var m
20
+
21
+ if (key[pos] === '[' && key[pos + 1] === ']') {
22
+ pos += 2
23
+ tail.append = true
24
+ if (pos !== len) return failure()
25
+ continue
26
+ }
27
+
28
+ m = reDigitPath.exec(key.substring(pos))
29
+ if (m !== null) {
30
+ pos += m[0].length
31
+ tail.nextType = 'array'
32
+ tail = { type: 'array', key: parseInt(m[1], 10) }
33
+ steps.push(tail)
34
+ continue
35
+ }
36
+
37
+ m = reNormalPath.exec(key.substring(pos))
38
+ if (m !== null) {
39
+ pos += m[0].length
40
+ tail.nextType = 'object'
41
+ tail = { type: 'object', key: m[1] }
42
+ steps.push(tail)
43
+ continue
44
+ }
45
+
46
+ return failure()
47
+ }
48
+
49
+ tail.last = true
50
+ return steps
51
+ }
52
+
53
+ module.exports = parsePath