엄성진

Integrate the account & Using webhook with AWS

1 -'use strict'; 1 +var express = require('express');
2 - 2 +const request = require('request');
3 -const line = require('@line/bot-sdk'); 3 +const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
4 -const express = require('express'); 4 +const TOKEN = 'Kb1/rQYz4MUhF8XyKQv7z9x0MxVQ5bX/XO8S/yt/1qQEJVAbsEFAaMvXKEOx9Umr7KhivfyDPfZHRRLFPngR0O4ZGWV2VFses8ufPE7uAdvYr4G6keBNAU69nBz5IC71HfbIrUHxXYqD7GfhVwXzpwdB04t89/1O/w1cDnyilFU='
5 +const PAPAGO_URL = 'https://openapi.naver.com/v1/papago/n2mt'
6 +const PAPAGO_ID = 'kwoxKGTi6azBaW9aSVxe'
7 +const PAPAGO_SECRET = 'svB_MM61oD'
5 const fs = require('fs'); 8 const fs = require('fs');
6 const path = require('path'); 9 const path = require('path');
7 -const cp = require('child_process'); 10 +const HTTPS = require('https');
8 -const ngrok = require('ngrok'); 11 +const domain = "2020105631.oss2021.tk"
9 - 12 +const sslport = 23023;
10 - 13 +const bodyParser = require('body-parser');
11 - 14 +var app = express();
12 -// create LINE SDK config from env variables 15 +app.use(bodyParser.json());
13 -const config = { 16 +app.post('/hook', function (req, res) {
14 - channelAccessToken: '6Aw67RtwWFJb+GCbr5DGhlFY5w6i0HpuKRNA1BNyGIDfXYrA2V/+S0yCgYy+jh4R2wHvg1XEZh0hhsFof81squrHYTR+5yvrPyuaNcDOZnkQLl4X+EWi6vDB5Rf6VeRUclczO0VyXd4hp9Oo4QUmZwdB04t89/1O/w1cDnyilFU=', 17 +
15 - channelSecret: '2caa1add6c76bd51a84bd861e27c800c', 18 + var eventObj = req.body.events[0];
16 -}; 19 + var source = eventObj.source;
17 - 20 + var message = eventObj.message;
18 -// base URL for webhook server 21 +
19 -let baseURL = process.env.BASE_URL; 22 + // request log
20 - 23 + console.log('======================', new Date() ,'======================');
21 -// create LINE SDK client 24 + console.log('[request]', req.body);
22 -const client = new line.Client(config); 25 + console.log('[request source] ', eventObj.source);
23 - 26 + console.log('[request message]', eventObj.message);
24 -// create Express app 27 +
25 -// about Express itself: https://expressjs.com/ 28 + trans(eventObj.replyToken, eventObj.message.text);
26 -const app = express(); 29 +
27 - 30 +
28 -// serve static and downloaded files 31 + res.sendStatus(200);
29 -app.use('/static', express.static('static'));
30 -app.use('/downloaded', express.static('downloaded'));
31 -
32 -app.get('/callback', (req, res) => res.end(`I'm listening. Please access with POST.`));
33 -
34 -// webhook callback
35 -app.post('/callback', line.middleware(config), (req, res) => {
36 - if (req.body.destination) {
37 - console.log("Destination User ID: " + req.body.destination);
38 - }
39 -
40 - // req.body.events should be an array of events
41 - if (!Array.isArray(req.body.events)) {
42 - return res.status(500).end();
43 - }
44 -
45 - // handle events separately
46 - Promise.all(req.body.events.map(handleEvent))
47 - .then(() => res.end())
48 - .catch((err) => {
49 - console.error(err);
50 - res.status(500).end();
51 - });
52 }); 32 });
53 33
54 -// simple reply function 34 +function trans(replyToken, message) {
55 -const replyText = (token, texts) => {
56 - texts = Array.isArray(texts) ? texts : [texts];
57 - return client.replyMessage(
58 - token,
59 - texts.map((text) => ({ type: 'text', text }))
60 - );
61 -};
62 35
63 -// callback function to handle a single event 36 + request.post(
64 -function handleEvent(event) {
65 - if (event.replyToken && event.replyToken.match(/^(.)\1*$/)) {
66 - return console.log("Test hook recieved: " + JSON.stringify(event.message));
67 - }
68 37
69 - switch (event.type) {
70 - case 'message':
71 - const message = event.message;
72 - switch (message.type) {
73 - case 'text':
74 - return handleText(message, event.replyToken, event.source);
75 - case 'image':
76 - return handleImage(message, event.replyToken);
77 - case 'video':
78 - return handleVideo(message, event.replyToken);
79 - case 'audio':
80 - return handleAudio(message, event.replyToken);
81 - case 'location':
82 - return handleLocation(message, event.replyToken);
83 - case 'sticker':
84 - return handleSticker(message, event.replyToken);
85 - default:
86 - throw new Error(`Unknown message: ${JSON.stringify(message)}`);
87 - }
88 -
89 - case 'follow':
90 - return replyText(event.replyToken, 'Got followed event');
91 -
92 - case 'unfollow':
93 - return console.log(`Unfollowed this bot: ${JSON.stringify(event)}`);
94 -
95 - case 'join':
96 - return replyText(event.replyToken, `Joined ${event.source.type}`);
97 -
98 - case 'leave':
99 - return console.log(`Left: ${JSON.stringify(event)}`);
100 -
101 - case 'postback':
102 - let data = event.postback.data;
103 - if (data === 'DATE' || data === 'TIME' || data === 'DATETIME') {
104 - data += `(${JSON.stringify(event.postback.params)})`;
105 - }
106 - return replyText(event.replyToken, `Got postback: ${data}`);
107 -
108 - case 'beacon':
109 - return replyText(event.replyToken, `Got beacon: ${event.beacon.hwid}`);
110 -
111 - default:
112 - throw new Error(`Unknown event: ${JSON.stringify(event)}`);
113 - }
114 -}
115 -
116 -function handleText(message, replyToken, source) {
117 - const buttonsImageURL = `${baseURL}/static/buttons/1040.jpg`;
118 - //★text에 따른 응답 변화!!★
119 - switch (message.text) {
120 - case '음악 추천해줘':
121 - message.text = '아이유의 음악을 추천드립니다.';
122 - return replyText(replyToken, message.text);
123 - case 'profile':
124 - if (source.userId) {
125 - return client.getProfile(source.userId)
126 - .then((profile) => replyText(
127 - replyToken,
128 - [
129 - `Display name: ${profile.displayName}`,
130 - `Status message: ${profile.statusMessage}`,
131 - ]
132 - ));
133 - } else {
134 - return replyText(replyToken, 'Bot can\'t use profile API without user ID');
135 - }
136 - case 'buttons':
137 - return client.replyMessage(
138 - replyToken,
139 - {
140 - type: 'template',
141 - altText: 'Buttons alt text',
142 - template: {
143 - type: 'buttons',
144 - thumbnailImageUrl: buttonsImageURL,
145 - title: 'My button sample',
146 - text: 'Hello, my button',
147 - actions: [
148 - { label: 'Go to line.me', type: 'uri', uri: 'https://line.me' },
149 - { label: 'Say hello1', type: 'postback', data: 'hello こんにちは' },
150 - { label: '言 hello2', type: 'postback', data: 'hello こんにちは', text: 'hello こんにちは' },
151 - { label: 'Say message', type: 'message', text: 'Rice=米' },
152 - ],
153 - },
154 - }
155 - );
156 - case 'confirm':
157 - return client.replyMessage(
158 - replyToken,
159 - {
160 - type: 'template',
161 - altText: 'Confirm alt text',
162 - template: {
163 - type: 'confirm',
164 - text: 'Do it?',
165 - actions: [
166 - { label: 'Yes', type: 'message', text: 'Yes!' },
167 - { label: 'No', type: 'message', text: 'No!' },
168 - ],
169 - },
170 - }
171 - )
172 - case 'carousel':
173 - return client.replyMessage(
174 - replyToken,
175 - {
176 - type: 'template',
177 - altText: 'Carousel alt text',
178 - template: {
179 - type: 'carousel',
180 - columns: [
181 - {
182 - thumbnailImageUrl: buttonsImageURL,
183 - title: 'hoge',
184 - text: 'fuga',
185 - actions: [
186 - { label: 'Go to line.me', type: 'uri', uri: 'https://line.me' },
187 - { label: 'Say hello1', type: 'postback', data: 'hello こんにちは' },
188 - ],
189 - },
190 - {
191 - thumbnailImageUrl: buttonsImageURL,
192 - title: 'hoge',
193 - text: 'fuga',
194 - actions: [
195 - { label: '言 hello2', type: 'postback', data: 'hello こんにちは', text: 'hello こんにちは' },
196 - { label: 'Say message', type: 'message', text: 'Rice=米' },
197 - ],
198 - },
199 - ],
200 - },
201 - }
202 - );
203 - case 'image carousel':
204 - return client.replyMessage(
205 - replyToken,
206 - {
207 - type: 'template',
208 - altText: 'Image carousel alt text',
209 - template: {
210 - type: 'image_carousel',
211 - columns: [
212 - {
213 - imageUrl: buttonsImageURL,
214 - action: { label: 'Go to LINE', type: 'uri', uri: 'https://line.me' },
215 - },
216 - {
217 - imageUrl: buttonsImageURL,
218 - action: { label: 'Say hello1', type: 'postback', data: 'hello こんにちは' },
219 - },
220 - {
221 - imageUrl: buttonsImageURL,
222 - action: { label: 'Say message', type: 'message', text: 'Rice=米' },
223 - },
224 - {
225 - imageUrl: buttonsImageURL,
226 - action: {
227 - label: 'datetime',
228 - type: 'datetimepicker',
229 - data: 'DATETIME',
230 - mode: 'datetime',
231 - },
232 - },
233 - ]
234 - },
235 - }
236 - );
237 - case 'datetime':
238 - return client.replyMessage(
239 - replyToken,
240 - {
241 - type: 'template',
242 - altText: 'Datetime pickers alt text',
243 - template: {
244 - type: 'buttons',
245 - text: 'Select date / time !',
246 - actions: [
247 - { type: 'datetimepicker', label: 'date', data: 'DATE', mode: 'date' },
248 - { type: 'datetimepicker', label: 'time', data: 'TIME', mode: 'time' },
249 - { type: 'datetimepicker', label: 'datetime', data: 'DATETIME', mode: 'datetime' },
250 - ],
251 - },
252 - }
253 - );
254 - case 'imagemap':
255 - return client.replyMessage(
256 - replyToken,
257 { 38 {
258 - type: 'imagemap', 39 + url: PAPAGO_URL,
259 - baseUrl: `${baseURL}/static/rich`, 40 + headers: {
260 - altText: 'Imagemap alt text', 41 + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
261 - baseSize: { width: 1040, height: 1040 }, 42 + 'X-Naver-Client-Id': `${PAPAGO_ID}`,
262 - actions: [ 43 + 'X-Naver-Client-Secret': `${PAPAGO_SECRET}`
263 - { area: { x: 0, y: 0, width: 520, height: 520 }, type: 'uri', linkUri: 'https://store.line.me/family/manga/en' },
264 - { area: { x: 520, y: 0, width: 520, height: 520 }, type: 'uri', linkUri: 'https://store.line.me/family/music/en' },
265 - { area: { x: 0, y: 520, width: 520, height: 520 }, type: 'uri', linkUri: 'https://store.line.me/family/play/en' },
266 - { area: { x: 520, y: 520, width: 520, height: 520 }, type: 'message', text: 'URANAI!' },
267 - ],
268 - video: {
269 - originalContentUrl: `${baseURL}/static/imagemap/video.mp4`,
270 - previewImageUrl: `${baseURL}/static/imagemap/preview.jpg`,
271 - area: {
272 - x: 280,
273 - y: 385,
274 - width: 480,
275 - height: 270,
276 }, 44 },
277 - externalLink: { 45 + body: 'source=ko&target=en&text=' + message,
278 - linkUri: 'https://line.me', 46 + json:true
279 - label: 'LINE' 47 + },
280 - } 48 +
281 - }, 49 + (error, response, body) => {
282 - } 50 + if(!error && response.statusCode == 200)
283 - );
284 - case 'bye':
285 - switch (source.type) {
286 - case 'user':
287 - return replyText(replyToken, 'Bot can\'t leave from 1:1 chat');
288 - case 'group':
289 - return replyText(replyToken, 'Leaving group')
290 - .then(() => client.leaveGroup(source.groupId));
291 - case 'room':
292 - return replyText(replyToken, 'Leaving room')
293 - .then(() => client.leaveRoom(source.roomId));
294 - }
295 - default:
296 - console.log(`Echo message to ${replyToken}: ${message.text}`);
297 - return replyText(replyToken, message.text);
298 - }
299 -}
300 -
301 -function handleImage(message, replyToken) {
302 - let getContent;
303 - if (message.contentProvider.type === "line") {
304 - const downloadPath = path.join(__dirname, 'downloaded', `${message.id}.jpg`);
305 - const previewPath = path.join(__dirname, 'downloaded', `${message.id}-preview.jpg`);
306 -
307 - getContent = downloadContent(message.id, downloadPath)
308 - .then((downloadPath) => {
309 - // ImageMagick is needed here to run 'convert'
310 - // Please consider about security and performance by yourself
311 - cp.execSync(`convert -resize 240x jpeg:${downloadPath} jpeg:${previewPath}`);
312 -
313 - return {
314 - originalContentUrl: baseURL + '/downloaded/' + path.basename(downloadPath),
315 - previewImageUrl: baseURL + '/downloaded/' + path.basename(previewPath),
316 - };
317 - });
318 - } else if (message.contentProvider.type === "external") {
319 - getContent = Promise.resolve(message.contentProvider);
320 - }
321 -
322 - return getContent
323 - .then(({ originalContentUrl, previewImageUrl }) => {
324 - return client.replyMessage(
325 - replyToken,
326 { 51 {
327 - type: 'image', 52 + // message 가 사용자에게서 입력받은 메시지 내용입니다. sendMessage 는 보낼 메시지 내용입니다.
328 - originalContentUrl, 53 + // 위에 PAPAGO API부분은 추후 API를 연동시킬 때 맞춰서 작성하기 쉽도록 템플릿을 남겨놓았습니다. 자세한 정보는 교수님 학습 자료의 experiment의 trans 폴더를 참고하세요.
329 - previewImageUrl, 54 + // (현재 코드에선 PAPAGO API의 작동 결과는 반영되지 않습니다.)
330 - } 55 + //↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
331 - ); 56 + if (message=="노래 추천해줘")
332 - }); 57 + {
333 -} 58 + var sendMessage = "아이유의 노래를 추천드립니다.";
334 - 59 + }
335 -function handleVideo(message, replyToken) { 60 + else
336 - let getContent; 61 + {
337 - if (message.contentProvider.type === "line") { 62 + var sendMessage = "무슨 말인지 못알아먹겠습니다";
338 - const downloadPath = path.join(__dirname, 'downloaded', `${message.id}.mp4`); 63 + }
339 - const previewPath = path.join(__dirname, 'downloaded', `${message.id}-preview.jpg`); 64 + //↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
340 - 65 +
341 - getContent = downloadContent(message.id, downloadPath) 66 + console.log(body.message);
342 - .then((downloadPath) => { 67 +
343 - // FFmpeg and ImageMagick is needed here to run 'convert' 68 + request.post(
344 - // Please consider about security and performance by yourself 69 + {
345 - cp.execSync(`convert mp4:${downloadPath}[0] jpeg:${previewPath}`); 70 + url: TARGET_URL,
346 - 71 + headers: {
347 - return { 72 + 'Authorization': `Bearer ${TOKEN}`
348 - originalContentUrl: baseURL + '/downloaded/' + path.basename(downloadPath), 73 + },
349 - previewImageUrl: baseURL + '/downloaded/' + path.basename(previewPath), 74 + json: {
350 - } 75 + "replyToken":replyToken,
351 - }); 76 + "messages":[
352 - } else if (message.contentProvider.type === "external") { 77 + {
353 - getContent = Promise.resolve(message.contentProvider); 78 + "type":"text",
354 - } 79 + "text":sendMessage
80 + }
81 + ]
82 + }
83 + },(error, response, body) => {
84 + console.log(body)
85 + });
86 + }
87 + });
355 88
356 - return getContent
357 - .then(({ originalContentUrl, previewImageUrl }) => {
358 - return client.replyMessage(
359 - replyToken,
360 - {
361 - type: 'video',
362 - originalContentUrl,
363 - previewImageUrl,
364 - }
365 - );
366 - });
367 } 89 }
368 90
369 -function handleAudio(message, replyToken) { 91 +try {
370 - let getContent; 92 + const option = {
371 - if (message.contentProvider.type === "line") { 93 + ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
372 - const downloadPath = path.join(__dirname, 'downloaded', `${message.id}.m4a`); 94 + key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
373 - 95 + cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
374 - getContent = downloadContent(message.id, downloadPath) 96 + };
375 - .then((downloadPath) => { 97 +
376 - return { 98 + HTTPS.createServer(option, app).listen(sslport, () => {
377 - originalContentUrl: baseURL + '/downloaded/' + path.basename(downloadPath), 99 + console.log(`[HTTPS] Server is started on port ${sslport}`);
378 - };
379 - });
380 - } else {
381 - getContent = Promise.resolve(message.contentProvider);
382 - }
383 -
384 - return getContent
385 - .then(({ originalContentUrl }) => {
386 - return client.replyMessage(
387 - replyToken,
388 - {
389 - type: 'audio',
390 - originalContentUrl,
391 - duration: message.duration,
392 - }
393 - );
394 }); 100 });
395 -} 101 + } catch (error) {
396 - 102 + console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
397 -function downloadContent(messageId, downloadPath) { 103 + console.log(error);
398 - return client.getMessageContent(messageId)
399 - .then((stream) => new Promise((resolve, reject) => {
400 - const writable = fs.createWriteStream(downloadPath);
401 - stream.pipe(writable);
402 - stream.on('end', () => resolve(downloadPath));
403 - stream.on('error', reject);
404 - }));
405 -}
406 -
407 -function handleLocation(message, replyToken) {
408 - return client.replyMessage(
409 - replyToken,
410 - {
411 - type: 'location',
412 - title: message.title,
413 - address: message.address,
414 - latitude: message.latitude,
415 - longitude: message.longitude,
416 - }
417 - );
418 -}
419 -
420 -function handleSticker(message, replyToken) {
421 - return client.replyMessage(
422 - replyToken,
423 - {
424 - type: 'sticker',
425 - packageId: message.packageId,
426 - stickerId: message.stickerId,
427 - }
428 - );
429 -}
430 -
431 -// listen on port
432 -const port = process.env.PORT || 3000;
433 -app.listen(port, () => {
434 - if (baseURL) {
435 - console.log(`listening on ${baseURL}:${port}/callback`);
436 - } else {
437 - console.log("It seems that BASE_URL is not set. Connecting to ngrok...")
438 - ngrok.connect(port).then(url => {
439 - baseURL = url;
440 - console.log(`listening on ${baseURL}/callback`);
441 - }).catch(console.error);
442 } 104 }
443 -}); 105 +
...\ No newline at end of file ...\ No newline at end of file
......
1 { 1 {
2 - "name": "kitchensink", 2 + "name": "trans",
3 - "version": "0.0.0", 3 + "version": "1.0.0",
4 "lockfileVersion": 1, 4 "lockfileVersion": 1,
5 "requires": true, 5 "requires": true,
6 "dependencies": { 6 "dependencies": {
7 - "@line/bot-sdk": {
8 - "version": "7.3.0",
9 - "resolved": "https://registry.npmjs.org/@line/bot-sdk/-/bot-sdk-7.3.0.tgz",
10 - "integrity": "sha512-MItRU6Yl7ES8ai/fJ7Y0neKMQXI1QloRFq8i4YtV3t1+1kaxUY9j3dcPDXDRLKgYRNCIXamQwaTfI1QA3bxZHQ==",
11 - "requires": {
12 - "@types/body-parser": "^1.19.0",
13 - "@types/node": "^14.10.0",
14 - "axios": "^0.21.1",
15 - "body-parser": "^1.19.0",
16 - "file-type": "^15.0.0",
17 - "form-data": "^3.0.0"
18 - },
19 - "dependencies": {
20 - "@types/node": {
21 - "version": "14.17.0",
22 - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.0.tgz",
23 - "integrity": "sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA=="
24 - },
25 - "form-data": {
26 - "version": "3.0.1",
27 - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
28 - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
29 - "requires": {
30 - "asynckit": "^0.4.0",
31 - "combined-stream": "^1.0.8",
32 - "mime-types": "^2.1.12"
33 - }
34 - }
35 - }
36 - },
37 - "@tokenizer/token": {
38 - "version": "0.1.1",
39 - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz",
40 - "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w=="
41 - },
42 - "@types/body-parser": {
43 - "version": "1.19.0",
44 - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz",
45 - "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==",
46 - "requires": {
47 - "@types/connect": "*",
48 - "@types/node": "*"
49 - }
50 - },
51 - "@types/caseless": {
52 - "version": "0.12.2",
53 - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz",
54 - "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w=="
55 - },
56 - "@types/connect": {
57 - "version": "3.4.34",
58 - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.34.tgz",
59 - "integrity": "sha512-ePPA/JuI+X0vb+gSWlPKOY0NdNAie/rPUqX2GUPpbZwiKTkSPhjXWuee47E4MtE54QVzGCQMQkAL6JhV2E1+cQ==",
60 - "requires": {
61 - "@types/node": "*"
62 - }
63 - },
64 - "@types/debug": {
65 - "version": "4.1.5",
66 - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz",
67 - "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ=="
68 - },
69 - "@types/node": {
70 - "version": "8.10.61",
71 - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.61.tgz",
72 - "integrity": "sha512-l+zSbvT8TPRaCxL1l9cwHCb0tSqGAGcjPJFItGGYat5oCTiq1uQQKYg5m7AF1mgnEBzFXGLJ2LRmNjtreRX76Q=="
73 - },
74 - "@types/request": {
75 - "version": "2.48.5",
76 - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz",
77 - "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==",
78 - "requires": {
79 - "@types/caseless": "*",
80 - "@types/node": "*",
81 - "@types/tough-cookie": "*",
82 - "form-data": "^2.5.0"
83 - }
84 - },
85 - "@types/tough-cookie": {
86 - "version": "4.0.0",
87 - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz",
88 - "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A=="
89 - },
90 - "abbrev": {
91 - "version": "1.1.1",
92 - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
93 - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
94 - },
95 "accepts": { 7 "accepts": {
96 "version": "1.3.7", 8 "version": "1.3.7",
97 "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 9 "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
...@@ -99,21 +11,6 @@ ...@@ -99,21 +11,6 @@
99 "requires": { 11 "requires": {
100 "mime-types": "~2.1.24", 12 "mime-types": "~2.1.24",
101 "negotiator": "0.6.2" 13 "negotiator": "0.6.2"
102 - },
103 - "dependencies": {
104 - "mime-db": {
105 - "version": "1.44.0",
106 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
107 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
108 - },
109 - "mime-types": {
110 - "version": "2.1.27",
111 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
112 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
113 - "requires": {
114 - "mime-db": "1.44.0"
115 - }
116 - }
117 } 14 }
118 }, 15 },
119 "ajv": { 16 "ajv": {
...@@ -160,14 +57,6 @@ ...@@ -160,14 +57,6 @@
160 "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", 57 "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
161 "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" 58 "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
162 }, 59 },
163 - "axios": {
164 - "version": "0.21.1",
165 - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
166 - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
167 - "requires": {
168 - "follow-redirects": "^1.10.0"
169 - }
170 - },
171 "bcrypt-pbkdf": { 60 "bcrypt-pbkdf": {
172 "version": "1.0.2", 61 "version": "1.0.2",
173 "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 62 "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
...@@ -176,15 +65,6 @@ ...@@ -176,15 +65,6 @@
176 "tweetnacl": "^0.14.3" 65 "tweetnacl": "^0.14.3"
177 } 66 }
178 }, 67 },
179 - "binary": {
180 - "version": "0.3.0",
181 - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
182 - "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=",
183 - "requires": {
184 - "buffers": "~0.1.1",
185 - "chainsaw": "~0.1.0"
186 - }
187 - },
188 "body-parser": { 68 "body-parser": {
189 "version": "1.19.0", 69 "version": "1.19.0",
190 "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 70 "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
...@@ -200,20 +80,8 @@ ...@@ -200,20 +80,8 @@
200 "qs": "6.7.0", 80 "qs": "6.7.0",
201 "raw-body": "2.4.0", 81 "raw-body": "2.4.0",
202 "type-is": "~1.6.17" 82 "type-is": "~1.6.17"
203 - },
204 - "dependencies": {
205 - "qs": {
206 - "version": "6.7.0",
207 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
208 - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
209 - }
210 } 83 }
211 }, 84 },
212 - "buffers": {
213 - "version": "0.1.1",
214 - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
215 - "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s="
216 - },
217 "bytes": { 85 "bytes": {
218 "version": "3.1.0", 86 "version": "3.1.0",
219 "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 87 "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
...@@ -224,14 +92,6 @@ ...@@ -224,14 +92,6 @@
224 "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 92 "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
225 "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 93 "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
226 }, 94 },
227 - "chainsaw": {
228 - "version": "0.1.0",
229 - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
230 - "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=",
231 - "requires": {
232 - "traverse": ">=0.3.0 <0.4"
233 - }
234 - },
235 "combined-stream": { 95 "combined-stream": {
236 "version": "1.0.8", 96 "version": "1.0.8",
237 "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 97 "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
...@@ -284,20 +144,6 @@ ...@@ -284,20 +144,6 @@
284 "ms": "2.0.0" 144 "ms": "2.0.0"
285 } 145 }
286 }, 146 },
287 - "decompress-zip": {
288 - "version": "0.3.2",
289 - "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.2.tgz",
290 - "integrity": "sha512-Ab1QY4LrWMrUuo53lLnmGOby7v8ryqxJ+bKibKSiPisx+25mhut1dScVBXAYx14i/PqSrFZvR2FRRazhLbvL+g==",
291 - "requires": {
292 - "binary": "^0.3.0",
293 - "graceful-fs": "^4.1.3",
294 - "mkpath": "^0.1.0",
295 - "nopt": "^3.0.1",
296 - "q": "^1.1.2",
297 - "readable-stream": "^1.1.8",
298 - "touch": "0.0.3"
299 - }
300 - },
301 "delayed-stream": { 147 "delayed-stream": {
302 "version": "1.0.0", 148 "version": "1.0.0",
303 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 149 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
...@@ -377,13 +223,6 @@ ...@@ -377,13 +223,6 @@
377 "type-is": "~1.6.18", 223 "type-is": "~1.6.18",
378 "utils-merge": "1.0.1", 224 "utils-merge": "1.0.1",
379 "vary": "~1.1.2" 225 "vary": "~1.1.2"
380 - },
381 - "dependencies": {
382 - "qs": {
383 - "version": "6.7.0",
384 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
385 - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
386 - }
387 } 226 }
388 }, 227 },
389 "extend": { 228 "extend": {
...@@ -406,17 +245,6 @@ ...@@ -406,17 +245,6 @@
406 "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 245 "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
407 "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" 246 "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
408 }, 247 },
409 - "file-type": {
410 - "version": "15.0.1",
411 - "resolved": "https://registry.npmjs.org/file-type/-/file-type-15.0.1.tgz",
412 - "integrity": "sha512-0LieQlSA3bWUdErNrxzxfI4rhsvNAVPBO06R8pTc1hp9SE6nhqlVyvhcaXoMmtXkBTPnQenbMPLW9X76hH76oQ==",
413 - "requires": {
414 - "readable-web-to-node-stream": "^2.0.0",
415 - "strtok3": "^6.0.3",
416 - "token-types": "^2.0.0",
417 - "typedarray-to-buffer": "^3.1.5"
418 - }
419 - },
420 "finalhandler": { 248 "finalhandler": {
421 "version": "1.1.2", 249 "version": "1.1.2",
422 "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 250 "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
...@@ -431,20 +259,15 @@ ...@@ -431,20 +259,15 @@
431 "unpipe": "~1.0.0" 259 "unpipe": "~1.0.0"
432 } 260 }
433 }, 261 },
434 - "follow-redirects": {
435 - "version": "1.14.1",
436 - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
437 - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg=="
438 - },
439 "forever-agent": { 262 "forever-agent": {
440 "version": "0.6.1", 263 "version": "0.6.1",
441 "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 264 "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
442 "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 265 "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
443 }, 266 },
444 "form-data": { 267 "form-data": {
445 - "version": "2.5.1", 268 + "version": "2.3.3",
446 - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", 269 + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
447 - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", 270 + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
448 "requires": { 271 "requires": {
449 "asynckit": "^0.4.0", 272 "asynckit": "^0.4.0",
450 "combined-stream": "^1.0.6", 273 "combined-stream": "^1.0.6",
...@@ -469,11 +292,6 @@ ...@@ -469,11 +292,6 @@
469 "assert-plus": "^1.0.0" 292 "assert-plus": "^1.0.0"
470 } 293 }
471 }, 294 },
472 - "graceful-fs": {
473 - "version": "4.2.4",
474 - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
475 - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
476 - },
477 "har-schema": { 295 "har-schema": {
478 "version": "2.0.0", 296 "version": "2.0.0",
479 "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 297 "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
...@@ -518,11 +336,6 @@ ...@@ -518,11 +336,6 @@
518 "safer-buffer": ">= 2.1.2 < 3" 336 "safer-buffer": ">= 2.1.2 < 3"
519 } 337 }
520 }, 338 },
521 - "ieee754": {
522 - "version": "1.2.1",
523 - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
524 - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
525 - },
526 "inherits": { 339 "inherits": {
527 "version": "2.0.3", 340 "version": "2.0.3",
528 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 341 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
...@@ -538,11 +351,6 @@ ...@@ -538,11 +351,6 @@
538 "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 351 "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
539 "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 352 "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
540 }, 353 },
541 - "isarray": {
542 - "version": "0.0.1",
543 - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
544 - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
545 - },
546 "isstream": { 354 "isstream": {
547 "version": "0.1.2", 355 "version": "0.1.2",
548 "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 356 "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
...@@ -579,11 +387,6 @@ ...@@ -579,11 +387,6 @@
579 "verror": "1.10.0" 387 "verror": "1.10.0"
580 } 388 }
581 }, 389 },
582 - "lodash": {
583 - "version": "4.17.19",
584 - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
585 - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
586 - },
587 "media-typer": { 390 "media-typer": {
588 "version": "0.3.0", 391 "version": "0.3.0",
589 "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 392 "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
...@@ -605,23 +408,18 @@ ...@@ -605,23 +408,18 @@
605 "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 408 "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
606 }, 409 },
607 "mime-db": { 410 "mime-db": {
608 - "version": "1.37.0", 411 + "version": "1.44.0",
609 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", 412 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
610 - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" 413 + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
611 }, 414 },
612 "mime-types": { 415 "mime-types": {
613 - "version": "2.1.21", 416 + "version": "2.1.27",
614 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", 417 + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
615 - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", 418 + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
616 "requires": { 419 "requires": {
617 - "mime-db": "~1.37.0" 420 + "mime-db": "1.44.0"
618 } 421 }
619 }, 422 },
620 - "mkpath": {
621 - "version": "0.1.0",
622 - "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz",
623 - "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE="
624 - },
625 "ms": { 423 "ms": {
626 "version": "2.0.0", 424 "version": "2.0.0",
627 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 425 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
...@@ -632,27 +430,6 @@ ...@@ -632,27 +430,6 @@
632 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 430 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
633 "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 431 "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
634 }, 432 },
635 - "ngrok": {
636 - "version": "3.2.7",
637 - "resolved": "https://registry.npmjs.org/ngrok/-/ngrok-3.2.7.tgz",
638 - "integrity": "sha512-B7K15HM0qRZplL2aO/yfxixYubH0M50Pfu0fa4PDcmXP7RC+wyYzu6YtX77BBHHCfbwCzkObX6YdO8ThpCR6Lg==",
639 - "requires": {
640 - "@types/node": "^8.10.50",
641 - "@types/request": "^2.48.2",
642 - "decompress-zip": "^0.3.2",
643 - "request": "^2.88.0",
644 - "request-promise-native": "^1.0.7",
645 - "uuid": "^3.3.2"
646 - }
647 - },
648 - "nopt": {
649 - "version": "3.0.6",
650 - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
651 - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
652 - "requires": {
653 - "abbrev": "1"
654 - }
655 - },
656 "oauth-sign": { 433 "oauth-sign": {
657 "version": "0.9.0", 434 "version": "0.9.0",
658 "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 435 "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
...@@ -676,11 +453,6 @@ ...@@ -676,11 +453,6 @@
676 "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 453 "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
677 "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 454 "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
678 }, 455 },
679 - "peek-readable": {
680 - "version": "3.1.3",
681 - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-3.1.3.tgz",
682 - "integrity": "sha512-mpAcysyRJxmICBcBa5IXH7SZPvWkcghm6Fk8RekoS3v+BpbSzlZzuWbMx+GXrlUwESi9qHar4nVEZNMKylIHvg=="
683 - },
684 "performance-now": { 456 "performance-now": {
685 "version": "2.1.0", 457 "version": "2.1.0",
686 "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 458 "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
...@@ -705,15 +477,10 @@ ...@@ -705,15 +477,10 @@
705 "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 477 "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
706 "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 478 "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
707 }, 479 },
708 - "q": {
709 - "version": "1.5.1",
710 - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
711 - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
712 - },
713 "qs": { 480 "qs": {
714 - "version": "6.5.2", 481 + "version": "6.7.0",
715 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 482 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
716 - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 483 + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
717 }, 484 },
718 "range-parser": { 485 "range-parser": {
719 "version": "1.2.1", 486 "version": "1.2.1",
...@@ -731,22 +498,6 @@ ...@@ -731,22 +498,6 @@
731 "unpipe": "1.0.0" 498 "unpipe": "1.0.0"
732 } 499 }
733 }, 500 },
734 - "readable-stream": {
735 - "version": "1.1.14",
736 - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
737 - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
738 - "requires": {
739 - "core-util-is": "~1.0.0",
740 - "inherits": "~2.0.1",
741 - "isarray": "0.0.1",
742 - "string_decoder": "~0.10.x"
743 - }
744 - },
745 - "readable-web-to-node-stream": {
746 - "version": "2.0.0",
747 - "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-2.0.0.tgz",
748 - "integrity": "sha512-+oZJurc4hXpaaqsN68GoZGQAQIA3qr09Or4fqEsargABnbe5Aau8hFn6ISVleT3cpY/0n/8drn7huyyEvTbghA=="
749 - },
750 "request": { 501 "request": {
751 "version": "2.88.2", 502 "version": "2.88.2",
752 "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", 503 "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
...@@ -774,36 +525,13 @@ ...@@ -774,36 +525,13 @@
774 "uuid": "^3.3.2" 525 "uuid": "^3.3.2"
775 }, 526 },
776 "dependencies": { 527 "dependencies": {
777 - "form-data": { 528 + "qs": {
778 - "version": "2.3.3", 529 + "version": "6.5.2",
779 - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 530 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
780 - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 531 + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
781 - "requires": {
782 - "asynckit": "^0.4.0",
783 - "combined-stream": "^1.0.6",
784 - "mime-types": "^2.1.12"
785 - }
786 } 532 }
787 } 533 }
788 }, 534 },
789 - "request-promise-core": {
790 - "version": "1.1.3",
791 - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz",
792 - "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==",
793 - "requires": {
794 - "lodash": "^4.17.15"
795 - }
796 - },
797 - "request-promise-native": {
798 - "version": "1.0.8",
799 - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz",
800 - "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==",
801 - "requires": {
802 - "request-promise-core": "1.1.3",
803 - "stealthy-require": "^1.1.1",
804 - "tough-cookie": "^2.3.3"
805 - }
806 - },
807 "safe-buffer": { 535 "safe-buffer": {
808 "version": "5.1.2", 536 "version": "5.1.2",
809 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 537 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
...@@ -878,58 +606,11 @@ ...@@ -878,58 +606,11 @@
878 "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 606 "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
879 "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 607 "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
880 }, 608 },
881 - "stealthy-require": {
882 - "version": "1.1.1",
883 - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
884 - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
885 - },
886 - "string_decoder": {
887 - "version": "0.10.31",
888 - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
889 - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
890 - },
891 - "strtok3": {
892 - "version": "6.0.8",
893 - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.0.8.tgz",
894 - "integrity": "sha512-QLgv+oiXwXgCgp2PdPPa+Jpp4D9imK9e/0BsyfeFMr6QL6wMVqoVn9+OXQ9I7MZbmUzN6lmitTJ09uwS2OmGcw==",
895 - "requires": {
896 - "@tokenizer/token": "^0.1.1",
897 - "@types/debug": "^4.1.5",
898 - "peek-readable": "^3.1.3"
899 - }
900 - },
901 "toidentifier": { 609 "toidentifier": {
902 "version": "1.0.0", 610 "version": "1.0.0",
903 "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 611 "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
904 "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 612 "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
905 }, 613 },
906 - "token-types": {
907 - "version": "2.1.1",
908 - "resolved": "https://registry.npmjs.org/token-types/-/token-types-2.1.1.tgz",
909 - "integrity": "sha512-wnQcqlreS6VjthyHO3Y/kpK/emflxDBNhlNUPfh7wE39KnuDdOituXomIbyI79vBtF0Ninpkh72mcuRHo+RG3Q==",
910 - "requires": {
911 - "@tokenizer/token": "^0.1.1",
912 - "ieee754": "^1.2.1"
913 - }
914 - },
915 - "touch": {
916 - "version": "0.0.3",
917 - "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz",
918 - "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=",
919 - "requires": {
920 - "nopt": "~1.0.10"
921 - },
922 - "dependencies": {
923 - "nopt": {
924 - "version": "1.0.10",
925 - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
926 - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
927 - "requires": {
928 - "abbrev": "1"
929 - }
930 - }
931 - }
932 - },
933 "tough-cookie": { 614 "tough-cookie": {
934 "version": "2.5.0", 615 "version": "2.5.0",
935 "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", 616 "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
...@@ -939,11 +620,6 @@ ...@@ -939,11 +620,6 @@
939 "punycode": "^2.1.1" 620 "punycode": "^2.1.1"
940 } 621 }
941 }, 622 },
942 - "traverse": {
943 - "version": "0.3.9",
944 - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
945 - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk="
946 - },
947 "tunnel-agent": { 623 "tunnel-agent": {
948 "version": "0.6.0", 624 "version": "0.6.0",
949 "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 625 "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
...@@ -964,29 +640,6 @@ ...@@ -964,29 +640,6 @@
964 "requires": { 640 "requires": {
965 "media-typer": "0.3.0", 641 "media-typer": "0.3.0",
966 "mime-types": "~2.1.24" 642 "mime-types": "~2.1.24"
967 - },
968 - "dependencies": {
969 - "mime-db": {
970 - "version": "1.44.0",
971 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
972 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
973 - },
974 - "mime-types": {
975 - "version": "2.1.27",
976 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
977 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
978 - "requires": {
979 - "mime-db": "1.44.0"
980 - }
981 - }
982 - }
983 - },
984 - "typedarray-to-buffer": {
985 - "version": "3.1.5",
986 - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
987 - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
988 - "requires": {
989 - "is-typedarray": "^1.0.0"
990 } 643 }
991 }, 644 },
992 "unpipe": { 645 "unpipe": {
......
1 { 1 {
2 - "name": "kitchensink", 2 + "name": "trans",
3 - "version": "0.0.0", 3 + "version": "1.0.0",
4 - "description": "A kitchen-sink LINE bot example", 4 + "description": "",
5 - "main": "index.js", 5 + "main": "app.js",
6 "scripts": { 6 "scripts": {
7 - "build-sdk": "cd ../../; npm i; npm run build", 7 + "test": "echo \"Error: no test specified\" && exit 1"
8 - "start": "node ."
9 }, 8 },
9 + "author": "",
10 + "license": "ISC",
10 "dependencies": { 11 "dependencies": {
11 - "@line/bot-sdk": "^7.3.0",
12 "express": "^4.17.1", 12 "express": "^4.17.1",
13 - "ngrok": "^3.2.7" 13 + "request": "^2.88.2"
14 } 14 }
15 } 15 }
......