etherproxy-lite 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ const ttl = cafe_utility_1.Arrays.requireNumberArgument(process.argv, 'ttl');
12
12
  const timeout = cafe_utility_1.Arrays.requireNumberArgument(process.argv, 'timeout');
13
13
  const telegramToken = cafe_utility_1.Arrays.requireStringArgument(process.argv, 'telegram-token', process.env, 'TELEGRAM_TOKEN');
14
14
  const telegramChatId = cafe_utility_1.Arrays.requireStringArgument(process.argv, 'telegram-chat-id', process.env, 'TELEGRAM_CHAT_ID');
15
+ const verbose = cafe_utility_1.Arrays.getBooleanArgument(process.argv, 'verbose');
15
16
  cafe_utility_1.System.forever(async () => {
16
17
  cafe_utility_1.Cache.deleteExpired();
17
18
  }, cafe_utility_1.Dates.seconds(ttl));
@@ -29,6 +30,9 @@ const server = (0, http_1.createServer)(async (request, response) => {
29
30
  request.on('end', async () => {
30
31
  try {
31
32
  const body = JSON.parse(Buffer.concat(chunks).toString('utf-8'));
33
+ if (verbose) {
34
+ console.log(body);
35
+ }
32
36
  const id = body.id;
33
37
  delete body.id;
34
38
  const key = JSON.stringify(body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etherproxy-lite",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "bin": {
5
5
  "etherproxy-lite": "./dist/index.js"
6
6
  },