@icgio/clients-config 1.0.296 → 1.0.298

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.
package/config.json CHANGED
@@ -36,9 +36,6 @@
36
36
  "Mexc": ["LBAIUSDT"],
37
37
  "Xt": ["LBAIUSDC", "LBAIUSDT"]
38
38
  },
39
- "LUCIC": {
40
- "Xt": ["LUCICUSDT"]
41
- },
42
39
  "MINDFAK": {
43
40
  "Bitmart": ["MINDFAKUSDC", "MINDFAKUSDT"],
44
41
  "Mexc": ["MINDFAKUSDT"],
@@ -80,7 +77,6 @@
80
77
  "HKBITEX-ETH": [],
81
78
  "JYAI": [],
82
79
  "LBAI": [],
83
- "LUCIC": [],
84
80
  "MINDFAK": [],
85
81
  "MECO": [],
86
82
  "OPUL": [],
@@ -119,9 +115,6 @@
119
115
  "LBAIUSDC": ["Xt"],
120
116
  "LBAIUSDT": ["Mexc", "Xt"]
121
117
  },
122
- "LUCIC": {
123
- "LUCICUSDT": ["Xt"]
124
- },
125
118
  "MINDFAK": {
126
119
  "MINDFAKUSDT": ["Mexc"]
127
120
  },
@@ -196,12 +189,6 @@
196
189
  "orderbook": 1,
197
190
  "deposits_withdrawals": 1
198
191
  },
199
- "LUCIC": {
200
- "balance": 1,
201
- "trades": 1,
202
- "orderbook": 1,
203
- "deposits_withdrawals": 1
204
- },
205
192
  "MINDFAK": {
206
193
  "balance": 1,
207
194
  "trades": 1,
@@ -261,7 +248,6 @@
261
248
  "HKBITEX-ETH": true,
262
249
  "JYAI": true,
263
250
  "LBAI": true,
264
- "LUCIC": true,
265
251
  "MINDFAK": true,
266
252
  "MECO": true,
267
253
  "OPUL": true,
@@ -281,7 +267,6 @@
281
267
  "HKBITEX-ETH": true,
282
268
  "JYAI": true,
283
269
  "LBAI": true,
284
- "LUCIC": true,
285
270
  "MINDFAK": true,
286
271
  "MECO": true,
287
272
  "OPUL": true,
@@ -304,7 +289,6 @@
304
289
  "HKBITEX-ETH": true,
305
290
  "JYAI": true,
306
291
  "LBAI": true,
307
- "LUCIC": true,
308
292
  "MINDFAK": true,
309
293
  "MECO": true,
310
294
  "OPUL": true,
@@ -325,7 +309,6 @@
325
309
  "HKBITEX-ETH": [1, 2, 5, 10, 20, 50, 100],
326
310
  "JYAI": [1, 2, 5, 10, 20, 50, 100],
327
311
  "LBAI": [1, 2, 5, 10, 20, 50, 100],
328
- "LUCIC": [1, 2, 5, 10, 20, 50, 100],
329
312
  "MINDFAK": [1, 2, 5, 10, 20, 50, 100],
330
313
  "MECO": [1, 2, 5, 10, 20, 50, 100],
331
314
  "OPUL": [1, 2, 5, 10, 20, 50, 100],
@@ -344,7 +327,6 @@
344
327
  "HKBITEX-ETH": ["BTC", "ETH"],
345
328
  "JYAI": ["BTC", "ETH"],
346
329
  "LBAI": ["BTC", "ETH"],
347
- "LUCIC": ["BTC", "ETH"],
348
330
  "MINDFAK": ["BTC", "ETH"],
349
331
  "MECO": ["BTC", "ETH"],
350
332
  "OPUL": ["BTC", "ETH"],
@@ -363,7 +345,6 @@
363
345
  "HKBITEX-ETH": "-4837808085",
364
346
  "JYAI": "-4787448589",
365
347
  "LBAI": "-4939231107",
366
- "LUCIC": "-4701729001",
367
348
  "MINDFAK": "-4869618531",
368
349
  "MECO": "-4963129044",
369
350
  "OPUL": "-4581926908",
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/clients-config",
3
- "version": "1.0.296",
3
+ "version": "1.0.298",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
Binary file
@@ -1,9 +1,24 @@
1
1
  const fs = require('fs')
2
+ const { exec } = require('child_process')
2
3
  const prompt = require('prompt')
3
4
 
4
5
  const config_file_path = './config.json'
5
6
  const config_archive_file_path = './config-archive.json'
6
7
 
8
+ function run_prettier(file_path) {
9
+ return new Promise((resolve, reject) => {
10
+ exec(`npx prettier --write ${file_path}`, (error, stdout, stderr) => {
11
+ if (error) {
12
+ console.error(`Prettier error: ${error.message}`)
13
+ reject(error)
14
+ } else {
15
+ console.log(`Prettier formatted: ${file_path}`)
16
+ resolve()
17
+ }
18
+ })
19
+ })
20
+ }
21
+
7
22
  prompt.start()
8
23
 
9
24
  function read_config_file(path) {
@@ -86,6 +101,7 @@ function delete_client(client_name) {
86
101
  }
87
102
 
88
103
  write_config_file(config_file_data, config_file_path)
104
+ .then(() => run_prettier(config_file_path))
89
105
  .then(() => {
90
106
  console.log(`Client '${client_name}' has been deleted successfully.`)
91
107
  })
@@ -192,6 +208,7 @@ function add_client(client_name) {
192
208
  config_file_data.client_telegram_ids = sort(config_file_data.client_telegram_ids)
193
209
 
194
210
  write_config_file(config_file_data, config_file_path)
211
+ .then(() => run_prettier(config_file_path))
195
212
  .then(() => {
196
213
  console.log(`Client '${client_name}' has been added successfully.`)
197
214
  })
@@ -251,6 +268,7 @@ function update_config_archive(config_file_data, client_name) {
251
268
  }
252
269
 
253
270
  write_config_file(config_archive_data, config_archive_file_path)
271
+ .then(() => run_prettier(config_archive_file_path))
254
272
  .then(() => {
255
273
  resolve()
256
274
  })