diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml index 3460455..7fe2623 100644 --- a/.github/workflows/azure.yml +++ b/.github/workflows/azure.yml @@ -9,12 +9,16 @@ # For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions # For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples on: - release: - types: [created] + push: + branches: + - master + pull_request: + branches: + - master env: AZURE_WEBAPP_NAME: MeatCoin # set this to your application's name - AZURE_WEBAPP_PACKAGE_PATH: 'https://meatcoin.azurewebsites.net' # set this to the path to your web app project, defaults to the repository root + AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root NODE_VERSION: '12.0' # set this to the node version to use jobs: diff --git a/index.js b/index.js index e33614d..45796fe 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,13 @@ const fs = require('fs'); -const Discord = require('discord.js'); -const bot = new Discord.Client(); +const path = require('path'); +const discord = require('discord.js'); +const bot = new discord.Client(); + +// storage identifiers +const TOKEN_FILE_NAME = 'token.txt'; +const LEDGER_FILE_NAME = 'ledger.txt'; +const PRICE_FILE_NAME = 'price.txt'; +const TIME_FILE_NAME = 'time.txt'; // constants const fee = 0.05; @@ -11,8 +18,8 @@ var betTable = {}; var diceTable = {}; // statistics -var price; -var time; +var price = 0; +var time = 0; var meatTotalLast = 0; var volume = { bought: 0.0, @@ -119,29 +126,59 @@ bot.on('message', (message) => { }); function init() { - const token = parseToken(); - parseLedger(); - parsePrice(); - parseTime(); + // Load user data and app settings + const token = readToken(TOKEN_FILE_NAME, parseToken); + ledger = readStorage(LEDGER_FILE_NAME, parseLedger); + price = readStorage(PRICE_FILE_NAME, parsePrice); + time = readStorage(TIME_FILE_NAME, parseTime); + + // Initialize app data meatState(); populateDiceTable(); + + // Schedule intervals for repetitive work setInterval(timeIncrement, 1000); setInterval(mine, 60000); setInterval(fluctuate, 5000); - // Meat Coin login + // Login bot.login(token); } -function parseToken() { - const path = process.cwd(); - const buffer = fs.readFileSync(path + "\\data\\token.txt").toString().split('\n'); - return buffer[0] +function readToken(fileName, parsingFunc) { + // This environment variable should be set if the app is deployed to Azure + var accessToken = process.env.DISCORD_ACCESS_TOKEN; + if (accessToken ) + return accessToken; + + // Parse token.txt if the app is running locally + var tokenPath = path.join('.', 'data', fileName); + if (fs.existsSync(tokenPath)) + return parsingFunc(tokenPath); } -function parseLedger() { - var path = process.cwd(); - var buffer = fs.readFileSync(path + "\\data\\ledger.txt"); +function readStorage(fileName, parsingFunc) { + // Azure mounted storage will exist if the app is deployed to Azure + // path.join() ensures cross-compat. file references on Ubuntu and Windows + var storagePath = path.join('~', 'data', fileName); + if (fs.existsSync(storagePath)) + return parsingFunc(storagePath); + + // Check local storage + storagePath = path.join('.', 'data', fileName); + if (fs.existsSync(storagePath)) + return parsingFunc(storagePath); +} + +function parseToken(path) { + const buffer = fs.readFileSync(path).toString().split('\n'); + return buffer[0]; +} + +function parseLedger(path) { + var localLedger = {}; + + var buffer = fs.readFileSync(path); var lines = buffer.toString().split("\n"); for (var i = 0; i < lines.length; i++) { var line = lines[i].replace('\r', ''); @@ -160,34 +197,31 @@ function parseLedger() { channel: null, history: userHistory }; - ledger[data[0]] = userData; + localLedger[data[0]] = userData; } registered += 1; } -} -function parsePrice() { - const path = process.cwd(); - const buffer = fs.readFileSync(path + "\\data\\price.txt").toString().split('\n'); - - price = parseFloat(buffer[0].toString()); + return localLedger; } -function parseTime() { - const path = process.cwd(); - const buffer = fs.readFileSync(path + "\\data\\time.txt").toString().split('\n'); +function parsePrice(path) { + const buffer = fs.readFileSync(path).toString().split('\n'); + return parseFloat(buffer[0].toString()); +} - time = parseFloat(buffer[0].toString()); +function parseTime(path) { + const buffer = fs.readFileSync(path).toString().split('\n'); + return parseFloat(buffer[0].toString()); } function meatState() { - if (Object.keys(ledger).length > 0) { - Object.keys(ledger).forEach(function(key) { - userData = ledger[key]; - meatTotalLast += parseFloat(userData.meatCoin.toFixed(2)); - }); - } - console.log('Last meat total: ' + meatTotalLast); + Object.keys(ledger).forEach(function(key) { + userData = ledger[key]; + meatTotalLast += parseFloat(userData.meatCoin.toFixed(2)); + }); + + console.log('Last meat total: ' + meatTotalLast); } function populateDiceTable() { diff --git a/package-lock.json b/package-lock.json index 1c96538..3c39b36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,43 +4,313 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@azure/abort-controller": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.1.tgz", + "integrity": "sha512-wP2Jw6uPp8DEDy0n4KNidvwzDjyVV2xnycEIq7nPzj1rHyb/r+t3OPeNT1INZePP2wy5ZqlwyuyOMTi0ePyY1A==", + "requires": { + "tslib": "^1.9.3" + } + }, + "@azure/core-asynciterator-polyfill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", + "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==" + }, + "@azure/core-auth": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.0.2.tgz", + "integrity": "sha512-zhPJObdrhz2ymIqGL1x8i3meEuaLz0UPjH9mOq9RGOlJB2Pb6K6xPtkHbRsfElgoO9USR4hH2XU5pLa4/JHHIw==", + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.7", + "@opentelemetry/types": "^0.2.0", + "tslib": "^1.9.3" + } + }, + "@azure/core-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.0.4.tgz", + "integrity": "sha512-UhQ4Tpgv6a/7fmvleXEpyQAg8FWcemqzAPY2F75QBygEDD4Hsz2fFujTAEUBQ1an+eNQjzk7EC7TTbqXOmiwAw==", + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.7", + "@azure/logger": "^1.0.0", + "@opentelemetry/types": "^0.2.0", + "@types/node-fetch": "^2.5.0", + "@types/tunnel": "^0.0.1", + "cross-env": "^6.0.3", + "form-data": "^3.0.0", + "node-fetch": "^2.6.0", + "process": "^0.11.10", + "tough-cookie": "^3.0.1", + "tslib": "^1.10.0", + "tunnel": "^0.0.6", + "uuid": "^3.3.2", + "xml2js": "^0.4.19" + } + }, + "@azure/core-lro": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-1.0.1.tgz", + "integrity": "sha512-RIrM6CTRoYoJEXpCuAr8vanXxlFBCCaHpa/PCSUfcYe6B9pAdSi1DTUZZ+2w2ysNIMHB9MyOLEAkzZ/4NCJIdQ==", + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^1.0.0", + "@opentelemetry/types": "^0.2.0", + "events": "^3.0.0", + "tslib": "^1.10.0" + } + }, + "@azure/core-paging": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.1.0.tgz", + "integrity": "sha512-Di26joIBaa5E/YAIAcis2LytbNy/LKTmgj+CUYZ8aLnzrN8h9AgVNASYOFXf+weJFD0pyaTAeW4GAt6P9NDFWw==", + "requires": { + "@azure/core-asynciterator-polyfill": "^1.0.0" + } + }, + "@azure/core-tracing": { + "version": "1.0.0-preview.7", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.7.tgz", + "integrity": "sha512-pkFCw6OiJrpR+aH1VQe6DYm3fK2KWCC5Jf3m/Pv1RxF08M1Xm08RCyQ5Qe0YyW5L16yYT2nnV48krVhYZ6SGFA==", + "requires": { + "@opencensus/web-types": "0.0.7", + "@opentelemetry/types": "^0.2.0", + "tslib": "^1.9.3" + } + }, + "@azure/logger": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.0.tgz", + "integrity": "sha512-g2qLDgvmhyIxR3JVS8N67CyIOeFRKQlX/llxYJQr1OSGQqM3HTpVP8MjmjcEKbL/OIt2N9C9UFaNQuKOw1laOA==", + "requires": { + "tslib": "^1.9.3" + } + }, + "@azure/storage-blob": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.1.1.tgz", + "integrity": "sha512-FhzXfrPe5DZE5KNbFoKXXhGqX362I+dGv0jVINCCQiToqadROZ1tRFtJ3ljnMPs75fZZzwnbq+oIB6NnpBqOzA==", + "requires": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^1.0.3", + "@azure/core-lro": "^1.0.0", + "@azure/core-paging": "^1.1.0", + "@azure/core-tracing": "1.0.0-preview.7", + "@azure/logger": "^1.0.0", + "@opentelemetry/types": "^0.2.0", + "events": "^3.0.0", + "tslib": "^1.10.0" + } + }, + "@opencensus/web-types": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@opencensus/web-types/-/web-types-0.0.7.tgz", + "integrity": "sha512-xB+w7ZDAu3YBzqH44rCmG9/RlrOmFuDPt/bpf17eJr8eZSrLt7nc7LnWdxM9Mmoj/YKMHpxRg28txu3TcpiL+g==" + }, + "@opentelemetry/types": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/types/-/types-0.2.0.tgz", + "integrity": "sha512-GtwNB6BNDdsIPAYEdpp3JnOGO/3AJxjPvny53s3HERBdXSJTGQw8IRhiaTEX0b3w9P8+FwFZde4k+qkjn67aVw==" + }, + "@types/node": { + "version": "13.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz", + "integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==" + }, + "@types/node-fetch": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.5.tgz", + "integrity": "sha512-IWwjsyYjGw+em3xTvWVQi5MgYKbRs0du57klfTaZkv/B24AEQ/p/IopNeqIYNy3EsfHOpg8ieQSDomPcsYMHpA==", + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "@types/tunnel": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.1.tgz", + "integrity": "sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==", + "requires": { + "@types/node": "*" + } + }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "cross-env": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", + "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "requires": { + "cross-spawn": "^7.0.0" + } + }, + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "discord.js": { "version": "11.3.0", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.3.0.tgz", "integrity": "sha512-xM3ydvb4urHjCP3N+Mgpw53a7ZGtmPwllwVgwPqdF2SHNPvTDr4So/+55VVx76s5eO9IMrOWpczsEuIr0/MAgQ==", "requires": { - "long": "3.2.0", - "prism-media": "0.0.1", - "snekfetch": "3.6.1", - "tweetnacl": "1.0.0", - "ws": "4.0.0" + "long": "^3.2.0", + "prism-media": "^0.0.1", + "snekfetch": "^3.6.1", + "tweetnacl": "^1.0.0", + "ws": "^4.0.0" } }, + "events": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==" + }, + "form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" }, + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "requires": { + "mime-db": "1.43.0" + } + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, "prism-media": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.1.tgz", "integrity": "sha1-o0JcnKvVDRxsAuVDlBoRiVZnvRA=" }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "psl": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", + "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, "snekfetch": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.1.tgz", "integrity": "sha512-aLEvf1YR440pINb0LEo/SL2Q2s/A26+YEqPlx09A0XpGH7qWp8iqIFFolVILHn2yudWXJne9QWyQu+lzDp+ksQ==" }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "requires": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, "tweetnacl": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", @@ -51,15 +321,42 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, "ws": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/ws/-/ws-4.0.0.tgz", "integrity": "sha512-QYslsH44bH8O7/W2815u5DpnCpXWpEK44FmaHffNwgJI4JMaSZONgPBTOfrxJ29mXKbXak+LsJ2uAkDTYq2ptQ==", "requires": { - "async-limiter": "1.0.0", - "safe-buffer": "5.1.1", - "ultron": "1.1.1" + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" } + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" } } } diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..e69de29