forked from LeekHub/leek-fund
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
666 lines (666 loc) · 19.1 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
{
"name": "leek-fund",
"displayName": "韭菜盒子",
"description": "韭菜盒子,VSCode 里也可以看股票 & 基金实时数据,做最好用的投资插件",
"version": "2.0.2",
"author": "giscafer <[email protected]>",
"repository": {
"type": "git",
"url": "https://github.com/giscafer/leek-fund.git"
},
"license": "MIT",
"keywords": [
"stock",
"股票",
"fund",
"基金",
"韭菜基金",
"韭菜盒子",
"同花顺",
"天天基金",
"蚂蚁财富",
"数字货币",
"Binance",
"币安",
"vscode"
],
"publisher": "giscafer",
"icon": "resources/logo.png",
"engines": {
"vscode": "^1.44.0"
},
"enableProposedAPI": true,
"categories": [
"Other"
],
"activationEvents": [
"*"
],
"main": "./out/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "leekFundMenu",
"title": "LeekFund",
"icon": "resources/leekfund.svg"
}
]
},
"views": {
"leekFundMenu": [
{
"id": "leekFundView.fund",
"name": "Fund"
},
{
"id": "leekFundView.stock",
"name": "Stock"
},
{
"id": "leekFundView.news",
"name": "XueQiu News"
},
{
"id": "leekFundView.binance",
"name": "Binance",
"visibility": "hidden"
},
{
"id": "leekFundView.settings",
"visibility": "visible",
"name": "Settings"
}
]
},
"commands": [
{
"command": "leek-fund.viewFundRank",
"title": "基金排行榜",
"icon": {
"light": "resources/light/rank.svg",
"dark": "resources/dark/rank.svg"
}
},
{
"command": "leek-fund.viewFundTrend",
"title": "基金走势一览",
"icon": {
"light": "resources/light/trend.svg",
"dark": "resources/dark/trend.svg"
}
},
{
"command": "leek-fund.sortFund",
"title": "升序/降序/不排序",
"icon": {
"light": "resources/light/sort.svg",
"dark": "resources/dark/sort.svg"
}
},
{
"command": "leek-fund.sortAmountFund",
"title": "持仓金额升序/降序",
"icon": {
"light": "resources/light/amount-sort.svg",
"dark": "resources/dark/amount-sort.svg"
}
},
{
"command": "leek-fund.addFund",
"title": "添加基金",
"icon": {
"light": "resources/light/add.svg",
"dark": "resources/dark/add.svg"
}
},
{
"command": "leek-fund.setFundAmount",
"title": "设置基金持仓金额",
"icon": {
"light": "resources/light/amount.svg",
"dark": "resources/dark/amount.svg"
}
},
{
"command": "leek-fund.setFundTop",
"title": "基金置顶",
"icon": {
"light": "resources/light/top.svg",
"dark": "resources/dark/top.svg"
}
},
{
"command": "leek-fund.deleteFund",
"title": "删除基金"
},
{
"command": "leek-fund.viewFundHistory",
"title": "历史净值"
},
{
"command": "leek-fund.viewFundPosition",
"title": "持仓信息"
},
{
"command": "leek-fund.refreshFund",
"title": "刷新数据",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
"command": "leek-fund.sortStock",
"title": "升序/降序/不排序",
"icon": {
"light": "resources/light/sort.svg",
"dark": "resources/dark/sort.svg"
}
},
{
"command": "leek-fund.addStock",
"title": "添加股票",
"icon": {
"light": "resources/light/add.svg",
"dark": "resources/dark/add.svg"
}
},
{
"command": "leek-fund.leekCenterView",
"title": "韭菜中心",
"icon": {
"light": "resources/light/remind.svg",
"dark": "resources/dark/remind.svg"
}
},
{
"command": "leek-fund.refreshStock",
"title": "刷新数据",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
"command": "leek-fund.setStockTop",
"title": "股票置顶",
"icon": {
"light": "resources/light/top.svg",
"dark": "resources/dark/top.svg"
}
},
{
"command": "leek-fund.deleteStock",
"title": "删除股票"
},
{
"command": "leek-fund.stockTrendPic",
"title": "股票走势(图片版)"
},
{
"command": "leek-fund.viewFundFlow",
"title": "资金流向",
"icon": {
"light": "resources/light/flow.svg",
"dark": "resources/dark/flow.svg"
}
},
{
"command": "leek-fund.refreshFollow",
"title": "刷新关注列表",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
"command": "leek-fund.toggleFlashNews",
"title": "启用/关闭 OUTPUT Flash News",
"icon": {
"light": "resources/light/news.svg",
"dark": "resources/dark/news.svg"
}
},
{
"command": "leek-fund.addNews",
"title": "添加关注雪球用户",
"icon": {
"light": "resources/light/add.svg",
"dark": "resources/dark/add.svg"
}
},
{
"command": "leek-fund.viewUserTimeline",
"title": "查看动态(无头像)"
},
{
"command": "leek-fund.deleteUser",
"title": "取消关注"
},
{
"command": "leek-fund.addBinancePair",
"title": "添加交易对",
"icon": {
"light": "resources/light/add.svg",
"dark": "resources/dark/add.svg"
}
},
{
"command": "leek-fund.deletePair",
"title": "删除交易对"
},
{
"command": "leek-fund.refreshBinance",
"title": "刷新数据",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
"command": "leek-fund.setPairTop",
"title": "交易对置顶",
"icon": {
"light": "resources/light/top.svg",
"dark": "resources/dark/top.svg"
}
}
],
"menus": {
"view/title": [
{
"command": "leek-fund.viewFundTrend",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.viewFundRank",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.refreshFund",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.sortFund",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.sortAmountFund",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.addFund",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.setFundAmount",
"when": "view == leekFundView.fund",
"group": "navigation"
},
{
"command": "leek-fund.refreshStock",
"when": "view == leekFundView.stock",
"group": "navigation"
},
{
"command": "leek-fund.sortStock",
"when": "view == leekFundView.stock",
"group": "navigation"
},
{
"command": "leek-fund.addStock",
"when": "view == leekFundView.stock",
"group": "navigation"
},
{
"command": "leek-fund.viewFundFlow",
"when": "view == leekFundView.stock",
"group": "navigation"
},
{
"command": "leek-fund.leekCenterView",
"when": "view == leekFundView.stock",
"group": "navigation"
},
{
"command": "leek-fund.refreshFollow",
"when": "view == leekFundView.news",
"group": "navigation"
},
{
"command": "leek-fund.toggleFlashNews",
"when": "view == leekFundView.news",
"group": "navigation"
},
{
"command": "leek-fund.addNews",
"when": "view == leekFundView.news",
"group": "navigation"
},
{
"command": "leek-fund.refreshBinance",
"when": "view == leekFundView.binance",
"group": "navigation"
},
{
"command": "leek-fund.addBinancePair",
"when": "view == leekFundView.binance",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "leek-fund.viewFundHistory",
"when": "view == leekFundView.fund",
"group": "group2"
},
{
"command": "leek-fund.viewFundPosition",
"when": "view == leekFundView.fund",
"group": "group2"
},
{
"command": "leek-fund.setFundTop",
"when": "view == leekFundView.fund",
"group": "group1"
},
{
"command": "leek-fund.setFundTop",
"when": "view == leekFundView.fund",
"group": "inline"
},
{
"command": "leek-fund.deleteFund",
"when": "view == leekFundView.fund",
"group": "group4"
},
{
"command": "leek-fund.setStockTop",
"when": "view == leekFundView.stock && viewItem != category && viewItem!=nodata",
"group": "group1"
},
{
"command": "leek-fund.stockTrendPic",
"when": "view == leekFundView.stock && viewItem != category && viewItem!=nodata",
"group": "group2"
},
{
"command": "leek-fund.setStockTop",
"when": "view == leekFundView.stock && viewItem != category && viewItem!=nodata",
"group": "inline"
},
{
"command": "leek-fund.deleteStock",
"when": "view == leekFundView.stock && viewItem != category",
"group": "group5"
},
{
"command": "leek-fund.deletePair",
"when": "view == leekFundView.binance && viewItem != category",
"group": "group0"
},
{
"command": "leek-fund.setPairTop",
"when": "view == leekFundView.binance",
"group": "inline"
},
{
"command": "leek-fund.setPairTop",
"when": "view == leekFundView.binance",
"group": "group1"
},
{
"command": "leek-fund.viewUserTimeline",
"when": "view == leekFundView.news",
"group": "group0"
},
{
"command": "leek-fund.deleteUser",
"when": "view == leekFundView.news",
"group": "group1"
}
]
},
"configuration": {
"properties": {
"leek-fund.stocks": {
"type": "array",
"default": [
"sh000001",
"sh000300",
"sh000016",
"sh000688",
"hk03690",
"hk00700",
"usr_ixic",
"usr_dji",
"usr_inx",
"ZC0"
],
"description": "配置需要监控的股票代码(建议通过界面新增)"
},
"leek-fund.funds": {
"type": "array",
"default": [
"001632",
"420009",
"320007",
"003096",
"001102",
"003885",
"001071",
"005963"
],
"description": "配置需要监控的基金代码(建议通过界面新增)"
},
"leek-fund.binance": {
"type": "array",
"default": [
"BTC_USDT",
"ETH_USDT",
"EOS_USDT"
],
"description": "配置需要监控的交易对(建议通过界面新增)"
},
"leek-fund.stocksRemind": {
"type": "object",
"description": "股票涨跌提醒,支持价格、涨跌幅。"
},
"leek-fund.statusBarStock": {
"type": "array",
"default": [
"sh000001"
],
"description": "状态栏展示的股票(建议通过界面选择设置,必须是在股票代码已设置存在)"
},
"leek-fund.interval": {
"type": "number",
"default": 5000,
"description": "配置轮询请求最新数据的时间间隔,单位:毫秒(最小轮询间隔是3秒)"
},
"leek-fund.riseColor": {
"type": "string",
"default": "white",
"description": "股票涨的颜色"
},
"leek-fund.fallColor": {
"type": "string",
"default": "#C9AD06",
"description": "股票跌的颜色"
},
"leek-fund.hideFundBarItem": {
"type": "boolean",
"default": false,
"description": "是否隐藏基金状态栏"
},
"leek-fund.hideStatusBarStock": {
"type": "boolean",
"default": false,
"description": "是否隐藏股票状态栏"
},
"leek-fund.hideStatusBar": {
"type": "boolean",
"default": false,
"description": "是否隐藏状态栏"
},
"leek-fund.newsUserIds": {
"type": "array",
"default": [
"5124430882",
"1287305957"
],
"description": "雪球用户id(进入雪球用户首页,复制/u/后的数字即可,比如 https://xueqiu.com/u/5124430882 链接的 5124430882)"
},
"leek-fund.xueqiuCookie": {
"type": "string",
"default": "",
"description": "由于防爬虫机制,需要用户设置雪球网站cookie"
},
"leek-fund.fundAmount": {
"type": "object",
"default": {},
"description": "基金持仓金额(不建议手填,格式错误影响功能)"
},
"leek-fund.showEarnings": {
"type": "number",
"default": 1,
"description": "显示/隐藏盈亏(1显示,0隐藏)"
},
"leek-fund.iconType": {
"type": "string",
"default": "arrow",
"description": "基金&股票涨跌图标(目前支持两种:arrow 和 food)"
},
"leek-fund.fundSort": {
"type": "number",
"default": 0,
"description": "基金排序方式(0正常、1涨跌升序、-1涨跌倒序、2持仓金额升序、-2持仓金额降序)"
},
"leek-fund.stockSort": {
"type": "number",
"default": 0,
"description": "股票排序方式(0正常、1升序、-1倒序)"
},
"leek-fund.stockRemindSwitch": {
"type": "number",
"default": 1,
"description": "打开/关闭提醒(1打开,0关闭)"
},
"leek-fund.labelFormat": {
"type": "object",
"default": {
"statusBarLabelFormat": "「${name}」${price} ${icon}(${percent})",
"sidebarStockLabelFormat": "${icon|padRight|4}${percent|padRight|11}${price|padRight|15}「${name}」",
"sidebarFundLabelFormat": "${icon|padRight|4}${percent|padRight}「${name}」${earnings} ${time}"
},
"description": "修改底部状态栏、侧栏的显示格式。\n"
},
"leek-fund.immersiveBackground": {
"type": "boolean",
"default": true,
"description": "沉浸式背景(仅适配暗色主题)"
},
"leek-fund.flash-news": {
"type": "boolean",
"default": false,
"description": "开启快讯输出(查看 - 输出 - 韭菜盒子快讯)"
}
}
},
"viewsWelcome": [
{
"view": "leekFundView.fund",
"contents": "无数据,请检查网络或添加基金"
},
{
"view": "leekFundView.stock",
"contents": "无数据,请检查网络或添加股票"
},
{
"view": "leekFundView.binance",
"contents": "无数据,请检查网络或添加交易对"
},
{
"view": "leekFundView.news",
"contents": "无数据,请检查网络或添加关注用户"
},
{
"view": "leekFundView.settings",
"contents": "\n [🏠️ 韭菜之家](command:leek-fund.leekCenterView) \n [🌈个性化设置](command:leek-fund.customSetting)\n[🛠打开配置页](command:leek-fund.openConfigPage)\n[💰打赏作者@giscafer](command:leek-fund.donate)\n 欢迎使用韭菜盒子^_^,[使用手册](https://github.com/giscafer/leek-fund/issues/23);论坛[韭菜盒子社区](command:leek-fund.tucaoForum),源码[Github](https://github.com/giscafer/leek-fund),加群交流[微信群](https://github.com/giscafer/leek-fund/issues/19), 电报群[Telegram](https://t.me/joinchat/VKxykRyeRNcibg7I-ykZMg)"
}
]
},
"scripts": {
"vscode:prepublish": "yarn run compile",
"compile": "tsc -p ./",
"postcompile": "yarn --cwd ./template-packages/leek-center run build",
"lint": "eslint src --ext ts --ignore-path .gitignore",
"watch": "tsc -watch -p ./",
"pretest": "yarn run compile && yarn run lint",
"test": "node ./out/_test/runTest.js",
"deploy": "vsce publish --yarn",
"package": "vsce package --yarn -o ./",
"commitmsg": "commitlint -e $GIT_PARAMS"
},
"config": {
"commitizen": {
"path": "cz-customizable"
}
},
"husky": {
"hooks": {
"pre-commit": "npm run lint",
"commit-msg": "npm run commitmsg"
}
},
"lint-staged": {
"src/**/*.{js,ts,tsx}": [
"prettier --write",
"eslint --fix --ext .js",
"git add ."
]
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@types/glob": "^7.1.1",
"@types/lodash.clonedeep": "^4.5.6",
"@types/lodash.throttle": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.0",
"@types/vscode": "1.44.0",
"@types/ws": "^7.4.0",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"eslint": "^6.8.0",
"glob": "^7.1.6",
"husky": "^4.3.0",
"lint-staged": "^10.5.1",
"mocha": "^7.1.2",
"prettier": "^2.1.2",
"typescript": "^3.8.3",
"vsce": "^1.78.0",
"vscode-test": "^1.3.0"
},
"dependencies": {
"amplitude": "^5.1.4",
"axios": "^0.19.2",
"compare-versions": "^3.6.0",
"iconv-lite": "^0.6.2",
"lodash.clonedeep": "^4.5.0",
"lodash.throttle": "^4.1.1",
"public-ip": "^4.0.3",
"ws": "^7.4.1"
},
"extensionKind": [
"ui",
"workspace"
]
}