diff --git a/.gitignore b/.gitignore index a3014b4..20a0772 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /node_modules /lib /dist/* -!.gitkeep \ No newline at end of file +!.gitkeep + +yarn-error.log \ No newline at end of file diff --git a/README-bitcoin.md b/README-bitcoin.md index 1cad89c..ba678e1 100644 --- a/README-bitcoin.md +++ b/README-bitcoin.md @@ -630,60 +630,69 @@ Default push: `{ action: 'want', data: ['blocks', ...] }` to express what you wa Push transactions related to address: `{ 'track-address': '3PbJ...bF9B' }` to receive all new transactions containing that address as input or output. Returns an array of transactions. address-transactions for new mempool transactions, and block-transactions for new block confirmed transactions. -[ [NodeJS Example](examples/nodejs/bitcoin/addresses.ts) ] [ [HTML Example](examples/html/bitcoin/addresses.html) ] [ [Top](#features) ] +[ [NodeJS Example](examples/nodejs/bitcoin/websocket.ts) ] [ [HTML Example](examples/html/bitcoin/websocket.html) ] [ [Top](#features) ] #### **Websocket Server** -```js -const { - bitcoin: { websocket }, -} = mempoolJS(); - -const ws = websocket.initServer({ - options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], -}); +Only use on server side apps. -ws.on('message', function incoming(data) { - const res = JSON.parse(data.toString()); - if (res.blocks) { - console.log(res.blocks); - } - if (res.mempoolInfo) { - console.log(res.mempoolInfo); - } - if (res.transactions) { - console.log(res.transactions); - } - if (res.mempoolBlocks) { - console.log(res.mempoolBlocks); - } -}); +```js +const { bitcoin: { websocket } } = mempoolJS(); + +const init = async () => { + + const ws = websocket.initServer({ + options: ["blocks", "stats", "mempool-blocks", "live-2h-chart"], + }); + + ws.on("message", function incoming(data) { + const res = JSON.parse(data.toString()); + if (res.blocks) { + console.log(res.blocks); + } + if (res.mempoolInfo) { + console.log(res.mempoolInfo); + } + if (res.transactions) { + console.log(res.transactions); + } + if (res.mempoolBlocks) { + console.log(res.mempoolBlocks); + } + }); +} +init(); ``` #### **Websocket Client** -```js -const { - bitcoin: { websocket }, -} = mempoolJS(); +Only use on browser apps. -const ws = websocket.initClient({ - options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], -}); - -ws.on('message', function incoming(data) { - const res = JSON.parse(data.toString()); - if (res.blocks) { - console.log(res.blocks); - } - if (res.mempoolInfo) { - console.log(res.mempoolInfo); - } - if (res.transactions) { - console.log(res.transactions); - } - if (res.mempoolBlocks) { - console.log(res.mempoolBlocks); - } -}); +```js +const init = async () => { + const { + bitcoin: { websocket }, + } = mempoolJS(); + + const ws = websocket.initClient({ + options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], + }); + + ws.addEventListener('message', function incoming({data}) { + const res = JSON.parse(data.toString()); + if (res.blocks) { + console.log(res.blocks); + } + if (res.mempoolInfo) { + console.log(res.mempoolInfo); + } + if (res.transactions) { + console.log(res.transactions); + } + if (res.mempoolBlocks) { + console.log(res.mempoolBlocks); + } + }); +}; +init(); ``` diff --git a/README-liquid.md b/README-liquid.md index 736320f..df36041 100644 --- a/README-liquid.md +++ b/README-liquid.md @@ -698,60 +698,69 @@ Default push: `{ action: 'want', data: ['blocks', ...] }` to express what you wa Push transactions related to address: `{ 'track-address': '3PbJ...bF9B' }` to receive all new transactions containing that address as input or output. Returns an array of transactions. address-transactions for new mempool transactions, and block-transactions for new block confirmed transactions. -[ [NodeJS Example](examples/nodejs/liquid/addresses.ts) ] [ [HTML Example](examples/html/liquid/addresses.html) ] [ [Top](#features) ] +[ [NodeJS Example](examples/nodejs/liquid/websocket.ts) ] [ [HTML Example](examples/html/liquid/websocket.html) ] [ [Top](#features) ] #### **Websocket Server** -```js -const { - liquid: { websocket }, -} = mempoolJS(); - -const ws = websocket.initServer({ - options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], -}); - -ws.on('message', function incoming(data) { - const res = JSON.parse(data.toString()); - if (res.blocks) { - console.log(res.blocks); - } - if (res.mempoolInfo) { - console.log(res.mempoolInfo); - } - if (res.transactions) { - console.log(res.transactions); - } - if (res.mempoolBlocks) { - console.log(res.mempoolBlocks); - } -}); +Only use on server side apps. + +```js +const { liquid: { websocket } } = mempoolJS(); + +const init = async () => { + + const ws = websocket.initServer({ + options: ["blocks", "stats", "mempool-blocks", "live-2h-chart"], + }); + + ws.on("message", function incoming(data) { + const res = JSON.parse(data.toString()); + if (res.blocks) { + console.log(res.blocks); + } + if (res.mempoolInfo) { + console.log(res.mempoolInfo); + } + if (res.transactions) { + console.log(res.transactions); + } + if (res.mempoolBlocks) { + console.log(res.mempoolBlocks); + } + }); +} +init(); ``` #### **Websocket Client** -```js -const { - liquid: { websocket }, -} = mempoolJS(); - -const ws = websocket.initClient({ - options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], -}); - -ws.on('message', function incoming(data) { - const res = JSON.parse(data.toString()); - if (res.blocks) { - console.log(res.blocks); - } - if (res.mempoolInfo) { - console.log(res.mempoolInfo); - } - if (res.transactions) { - console.log(res.transactions); - } - if (res.mempoolBlocks) { - console.log(res.mempoolBlocks); - } -}); -``` +Only use on browser apps. + +```js +const init = async () => { + const { + liquid: { websocket }, + } = mempoolJS(); + + const ws = websocket.initClient({ + options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], + }); + + ws.addEventListener('message', function incoming({data}) { + const res = JSON.parse(data.toString()); + if (res.blocks) { + console.log(res.blocks); + } + if (res.mempoolInfo) { + console.log(res.mempoolInfo); + } + if (res.transactions) { + console.log(res.transactions); + } + if (res.mempoolBlocks) { + console.log(res.mempoolBlocks); + } + }); +}; +init(); +``` \ No newline at end of file diff --git a/examples/html/bitcoin/websocket.html b/examples/html/bitcoin/websocket.html index a1e82a5..bdb1dad 100644 --- a/examples/html/bitcoin/websocket.html +++ b/examples/html/bitcoin/websocket.html @@ -8,12 +8,12 @@ const { bitcoin: { websocket }, } = mempoolJS(); - // console.log(mempoolJS()); + const ws = websocket.initClient({ options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], }); - ws.on('message', function incoming(data) { + ws.addEventListener('message', function incoming({data}) { const res = JSON.parse(data.toString()); if (res.blocks) { console.log(res.blocks); diff --git a/examples/html/liquid/websocket.html b/examples/html/liquid/websocket.html index 5fde839..6ab82bd 100644 --- a/examples/html/liquid/websocket.html +++ b/examples/html/liquid/websocket.html @@ -8,12 +8,12 @@ const { liquid: { websocket }, } = mempoolJS(); - - const ws = websocket.initServer({ + + const ws = websocket.initClient({ options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], }); - ws.on('message', function incoming(data) { + ws.addEventListener('message', function incoming({data}) { const res = JSON.parse(data.toString()); if (res.blocks) { console.log(res.blocks); diff --git a/examples/nodejs/bisq/addresses.ts b/examples/nodejs/bisq/addresses.ts index f8e12c9..89e66ec 100644 --- a/examples/nodejs/bisq/addresses.ts +++ b/examples/nodejs/bisq/addresses.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bisq/blocks.ts b/examples/nodejs/bisq/blocks.ts index 7aeaa6e..b7da1f3 100644 --- a/examples/nodejs/bisq/blocks.ts +++ b/examples/nodejs/bisq/blocks.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bisq/statistics.ts b/examples/nodejs/bisq/statistics.ts index 19219d8..9662420 100644 --- a/examples/nodejs/bisq/statistics.ts +++ b/examples/nodejs/bisq/statistics.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bisq/transactions.ts b/examples/nodejs/bisq/transactions.ts index 40a8f14..0cbd6ef 100644 --- a/examples/nodejs/bisq/transactions.ts +++ b/examples/nodejs/bisq/transactions.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bitcoin/addresses.ts b/examples/nodejs/bitcoin/addresses.ts index e10ce36..b1a5d55 100644 --- a/examples/nodejs/bitcoin/addresses.ts +++ b/examples/nodejs/bitcoin/addresses.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bitcoin/blocks.ts b/examples/nodejs/bitcoin/blocks.ts index 2961122..2b9df1d 100644 --- a/examples/nodejs/bitcoin/blocks.ts +++ b/examples/nodejs/bitcoin/blocks.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bitcoin/fees.ts b/examples/nodejs/bitcoin/fees.ts index dc69bf3..cd5e976 100644 --- a/examples/nodejs/bitcoin/fees.ts +++ b/examples/nodejs/bitcoin/fees.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bitcoin/mempool.ts b/examples/nodejs/bitcoin/mempool.ts index 393cc62..94c0165 100644 --- a/examples/nodejs/bitcoin/mempool.ts +++ b/examples/nodejs/bitcoin/mempool.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bitcoin/transactions.ts b/examples/nodejs/bitcoin/transactions.ts index 2a8714b..3755142 100644 --- a/examples/nodejs/bitcoin/transactions.ts +++ b/examples/nodejs/bitcoin/transactions.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/bitcoin/websocket.ts b/examples/nodejs/bitcoin/websocket.ts index 26e6c6f..2cfee0b 100644 --- a/examples/nodejs/bitcoin/websocket.ts +++ b/examples/nodejs/bitcoin/websocket.ts @@ -1,15 +1,14 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; -const init = async () => { - const { - bitcoin: { websocket }, - } = mempoolJS(); +const { bitcoin: { websocket } } = mempoolJS(); +const init = async () => { + const ws = websocket.initServer({ - options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], + options: ["blocks", "stats", "mempool-blocks", "live-2h-chart"], }); - - ws.on('message', function incoming(data) { + + ws.on("message", function incoming(data) { const res = JSON.parse(data.toString()); if (res.blocks) { console.log(res.blocks); @@ -24,5 +23,5 @@ const init = async () => { console.log(res.mempoolBlocks); } }); -}; +} init(); diff --git a/examples/nodejs/liquid/addresses.ts b/examples/nodejs/liquid/addresses.ts index abbc0e0..c375ecd 100644 --- a/examples/nodejs/liquid/addresses.ts +++ b/examples/nodejs/liquid/addresses.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/liquid/assets.ts b/examples/nodejs/liquid/assets.ts index 293c482..d02b440 100644 --- a/examples/nodejs/liquid/assets.ts +++ b/examples/nodejs/liquid/assets.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/liquid/blocks.ts b/examples/nodejs/liquid/blocks.ts index 26518ad..7832ef3 100644 --- a/examples/nodejs/liquid/blocks.ts +++ b/examples/nodejs/liquid/blocks.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/liquid/fees.ts b/examples/nodejs/liquid/fees.ts index 79f471d..238c4bd 100644 --- a/examples/nodejs/liquid/fees.ts +++ b/examples/nodejs/liquid/fees.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/liquid/mempool.ts b/examples/nodejs/liquid/mempool.ts index e7234b4..325f6c5 100644 --- a/examples/nodejs/liquid/mempool.ts +++ b/examples/nodejs/liquid/mempool.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/liquid/transactions.ts b/examples/nodejs/liquid/transactions.ts index 86b96be..9005a61 100644 --- a/examples/nodejs/liquid/transactions.ts +++ b/examples/nodejs/liquid/transactions.ts @@ -1,4 +1,4 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; const init = async () => { const { diff --git a/examples/nodejs/liquid/websocket.ts b/examples/nodejs/liquid/websocket.ts index 57ae362..c64206e 100644 --- a/examples/nodejs/liquid/websocket.ts +++ b/examples/nodejs/liquid/websocket.ts @@ -1,15 +1,14 @@ -import mempoolJS from '../../../src/index'; +import mempoolJS from "@mempool/mempool.js"; -const init = async () => { - const { - liquid: { websocket }, - } = mempoolJS(); +const { liquid: { websocket } } = mempoolJS(); +const init = async () => { + const ws = websocket.initServer({ - options: ['blocks', 'stats', 'mempool-blocks', 'live-2h-chart'], + options: ["blocks", "stats", "mempool-blocks", "live-2h-chart"], }); - - ws.on('message', function incoming(data) { + + ws.on("message", function incoming(data) { const res = JSON.parse(data.toString()); if (res.blocks) { console.log(res.blocks); @@ -24,5 +23,5 @@ const init = async () => { console.log(res.mempoolBlocks); } }); -}; +} init(); diff --git a/package.json b/package.json index 51aee54..fa1bf3d 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "mempool.space", "mempool.js", "mempool", + "websocket", "nodejs", "typescript" ], @@ -31,6 +32,7 @@ "start": "ts-node src/index.ts", "dev": "nodemon src/index.ts", "build": "tsc | browserify lib/index.js --standalone mempoolJS > dist/mempool.js | browserify -p tinyify lib/index.js --standalone mempoolJS > dist/mempool.min.js", + "build-tsc": "tsc", "prepare": "npm run build", "postversion": "git push && git push --tags" }, @@ -51,6 +53,7 @@ "eslint": "^7.19.0", "nodemon": "^2.0.7", "tinyify": "^3.0.0", + "ts-node": "^9.1.1", "typescript": "^4.1.3" }, "license": "MIT" diff --git a/src/app/bitcoin/websocket.ts b/src/app/bitcoin/websocket.ts index 61c1a9e..4326dfb 100644 --- a/src/app/bitcoin/websocket.ts +++ b/src/app/bitcoin/websocket.ts @@ -2,13 +2,13 @@ import { WsInterface, WsInstance } from '../../interfaces/bitcoin/websockets'; import wsClient from '../../services/ws/client'; import wsServer from '../../services/ws/server'; -const defaultWs = 'wss://mempool.space/api/v1/ws'; +export const useWebsocket = (hostname: string): WsInstance => { -export const useWebsocket = (hostname?: string): WsInstance => { + const wsEndpoint = `wss://${hostname}/api/v1/ws`; return { initClient: ({ options }: WsInterface) => - wsClient(options, defaultWs, hostname), + wsClient(options, wsEndpoint), initServer: ({ options }: WsInterface) => - wsServer(options, defaultWs, hostname), + wsServer(options, wsEndpoint), }; }; diff --git a/src/app/liquid/websocket.ts b/src/app/liquid/websocket.ts index 6a48c46..ac9d9e7 100644 --- a/src/app/liquid/websocket.ts +++ b/src/app/liquid/websocket.ts @@ -2,13 +2,13 @@ import { WsInterface, WsInstance } from '../../interfaces/bitcoin/websockets'; import wsClient from '../../services/ws/client'; import wsServer from '../../services/ws/server'; -const defaultWs = 'wss://mempool.space/liquid/api/v1/ws'; +export const useWebsocket = (hostname: string): WsInstance => { -export const useWebsocket = (hostname?: string): WsInstance => { + const wsEndpoint = `wss://${hostname}/liquid/api/v1/ws`; return { initClient: ({ options }: WsInterface) => - wsClient(options, defaultWs, hostname), + wsClient(options, wsEndpoint), initServer: ({ options }: WsInterface) => - wsServer(options, defaultWs, hostname), + wsServer(options, wsEndpoint), }; }; diff --git a/src/services/ws/client.ts b/src/services/ws/client.ts index 350f354..a74c9a9 100644 --- a/src/services/ws/client.ts +++ b/src/services/ws/client.ts @@ -1,23 +1,25 @@ -const browserWS = ( +const serverWS = ( options: string[], - defaultWs: string, - websocketEndpoint?: string + endpoint: string, ): WebSocket => { - const ws = new WebSocket(websocketEndpoint || defaultWs); - ws.addEventListener('open', function open() { - handleMessage(ws, options); + const ws = new WebSocket(endpoint); + + ws.addEventListener("open", function open() { + ws.send(JSON.stringify({ action: "want", data: options })); + }); + + ws.addEventListener("close", async function close() { + await sleep(60000); + serverWS(options, endpoint); }); return ws; -}; +} -const handleMessage = (ws: WebSocket, options: string[]) => { - ws.send(JSON.stringify({ action: 'init' })); - ws.send( - JSON.stringify({ - action: 'want', - data: options, - }) - ); +const sleep = (ms: number) => { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); }; -export default browserWS; +export default serverWS; + diff --git a/src/services/ws/server.ts b/src/services/ws/server.ts index 1976efc..5976be6 100644 --- a/src/services/ws/server.ts +++ b/src/services/ws/server.ts @@ -2,23 +2,30 @@ import WebSocket from 'ws'; const serverWS = ( options: string[], - defaultWs: string, - websocketEndpoint?: string + endpoint: string, ): WebSocket => { - const ws = new WebSocket(websocketEndpoint || defaultWs); - ws.on('open', function open() { - handleMessage(ws, options); + const ws = new WebSocket(endpoint); + const interval = setInterval(function ping() { + ws.ping(); + }, 30000); + + ws.on("open", function open() { + ws.send(JSON.stringify({ action: "want", data: options })); + }); + + ws.on("close", async function close() { + clearInterval(interval); + ws.terminate(); + await sleep(60000); + serverWS(options, endpoint); }); return ws; -}; +} -const handleMessage = (ws: WebSocket, options: string[]) => { - ws.send(JSON.stringify({ action: 'init' })); - ws.send( - JSON.stringify({ - action: 'want', - data: options, - }) - ); +const sleep = (ms: number) => { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); }; + export default serverWS; diff --git a/yarn.lock b/yarn.lock index c31f4db..2dc4a66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -321,6 +321,11 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -914,6 +919,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -1062,6 +1072,11 @@ detective@^5.2.0: defined "^1.0.0" minimist "^1.1.1" +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -2140,6 +2155,11 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -2825,7 +2845,7 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -source-map-support@~0.5.10, source-map-support@~0.5.12: +source-map-support@^0.5.17, source-map-support@~0.5.10, source-map-support@~0.5.12: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -3134,6 +3154,18 @@ transform-ast@^2.4.2, transform-ast@^2.4.3: merge-source-map "1.0.4" nanobench "^2.1.1" +ts-node@^9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== + dependencies: + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -3430,3 +3462,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==