@yuants/vendor-huobi 0.11.10 → 0.11.12
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/package.json +14 -14
- package/temp/package-deps.json +16 -18
- package/dist/extension.bundle.js +0 -117
- package/dist/extension.js +0 -87
- package/dist/extension.js.map +0 -1
- package/lib/extension.d.ts +0 -4
- package/lib/extension.d.ts.map +0 -1
- package/lib/extension.js +0 -89
- package/lib/extension.js.map +0 -1
- package/temp/image-tag +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuants/vendor-huobi",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.12",
|
|
4
4
|
"bin": "lib/cli.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
"temp"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@yuants/protocol": "0.42.
|
|
13
|
-
"@yuants/data-account": "0.4.
|
|
14
|
-
"@yuants/data-order": "0.2.
|
|
15
|
-
"@yuants/transfer": "0.2.
|
|
16
|
-
"@yuants/utils": "0.
|
|
17
|
-
"@yuants/cache": "0.1.
|
|
18
|
-
"@yuants/sql": "0.9.
|
|
19
|
-
"@yuants/data-product": "0.2.
|
|
20
|
-
"@yuants/data-series": "0.3.
|
|
21
|
-
"@yuants/data-interest-rate": "0.1.
|
|
22
|
-
"@yuants/data-quote": "0.2.
|
|
23
|
-
"@yuants/secret": "0.2.
|
|
12
|
+
"@yuants/protocol": "0.42.1",
|
|
13
|
+
"@yuants/data-account": "0.4.1",
|
|
14
|
+
"@yuants/data-order": "0.2.10",
|
|
15
|
+
"@yuants/transfer": "0.2.13",
|
|
16
|
+
"@yuants/utils": "0.8.0",
|
|
17
|
+
"@yuants/cache": "0.1.7",
|
|
18
|
+
"@yuants/sql": "0.9.4",
|
|
19
|
+
"@yuants/data-product": "0.2.14",
|
|
20
|
+
"@yuants/data-series": "0.3.25",
|
|
21
|
+
"@yuants/data-interest-rate": "0.1.22",
|
|
22
|
+
"@yuants/data-quote": "0.2.17",
|
|
23
|
+
"@yuants/secret": "0.2.8",
|
|
24
24
|
"rxjs": "~7.5.6",
|
|
25
25
|
"crypto-js": "^4.2.0"
|
|
26
26
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@rushstack/heft-node-rig": "~1.10.7",
|
|
32
32
|
"@types/heft-jest": "1.0.3",
|
|
33
33
|
"@types/node": "22",
|
|
34
|
-
"@yuants/extension": "0.2.
|
|
34
|
+
"@yuants/extension": "0.2.24",
|
|
35
35
|
"@yuants/tool-kit": "0.2.0",
|
|
36
36
|
"typescript": "~4.7.4"
|
|
37
37
|
},
|
package/temp/package-deps.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apps/vendor-huobi/CHANGELOG.json": "
|
|
3
|
-
"apps/vendor-huobi/CHANGELOG.md": "
|
|
2
|
+
"apps/vendor-huobi/CHANGELOG.json": "afa002d81cd526890ad91a4a877e8d611cd7d1bc",
|
|
3
|
+
"apps/vendor-huobi/CHANGELOG.md": "8fbad4e6e58f9ef9003fd2c6b55b35a6b401a1dd",
|
|
4
4
|
"apps/vendor-huobi/README.md": "d7bf0149513114eab5500a6b5c9e7cba10565572",
|
|
5
5
|
"apps/vendor-huobi/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
6
|
-
"apps/vendor-huobi/build/Dockerfile": "51905c802275985c2558fa8ae5878e9536e799ef",
|
|
7
6
|
"apps/vendor-huobi/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
8
7
|
"apps/vendor-huobi/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
9
8
|
"apps/vendor-huobi/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
10
9
|
"apps/vendor-huobi/etc/vendor-huobi.api.md": "dc8cbf2a044a227b30a4ee9701b0c97328244724",
|
|
11
|
-
"apps/vendor-huobi/package.json": "
|
|
10
|
+
"apps/vendor-huobi/package.json": "a1ac4fd425e69f55ceb8da76e7975592956484bf",
|
|
12
11
|
"apps/vendor-huobi/src/api.ts": "7f13d45da5c3600276cdf4e734e086358d96b348",
|
|
13
12
|
"apps/vendor-huobi/src/cli.ts": "9bf6b5559a6c6f33da20e74cc6c5d702c60ec891",
|
|
14
13
|
"apps/vendor-huobi/src/cluster.ts": "f58a96d9c89e29e4fcf7cedd8ea9cb1dc920540b",
|
|
15
|
-
"apps/vendor-huobi/src/extension.ts": "59c58a7cd44efcaa69e8a0f16c4461eb8878e92f",
|
|
16
14
|
"apps/vendor-huobi/src/index.ts": "d14b769d3e840645eab3f7a7f64d47d24e27829c",
|
|
17
15
|
"apps/vendor-huobi/src/interest_rate.ts": "1ada272b47f382533368928758b35176442d957f",
|
|
18
16
|
"apps/vendor-huobi/src/logger.ts": "d25d427e74f46819a601e0cb17d5358b22c8db7b",
|
|
@@ -20,18 +18,18 @@
|
|
|
20
18
|
"apps/vendor-huobi/src/quote.ts": "d772d64897c765a8157dac1a9abc0f3f488eaa1d",
|
|
21
19
|
"apps/vendor-huobi/tsconfig.json": "81da8f78196974b5d15da0edb6b2d9f48641063c",
|
|
22
20
|
"apps/vendor-huobi/.rush/temp/shrinkwrap-deps.json": "d9fc97de6643d551cb315ce28c6deca42698705c",
|
|
23
|
-
"libraries/protocol/temp/package-deps.json": "
|
|
24
|
-
"libraries/data-account/temp/package-deps.json": "
|
|
25
|
-
"libraries/data-order/temp/package-deps.json": "
|
|
26
|
-
"libraries/transfer/temp/package-deps.json": "
|
|
27
|
-
"libraries/utils/temp/package-deps.json": "
|
|
28
|
-
"libraries/cache/temp/package-deps.json": "
|
|
29
|
-
"libraries/sql/temp/package-deps.json": "
|
|
30
|
-
"libraries/data-product/temp/package-deps.json": "
|
|
31
|
-
"libraries/data-series/temp/package-deps.json": "
|
|
32
|
-
"libraries/data-interest-rate/temp/package-deps.json": "
|
|
33
|
-
"libraries/data-quote/temp/package-deps.json": "
|
|
34
|
-
"libraries/secret/temp/package-deps.json": "
|
|
35
|
-
"libraries/extension/temp/package-deps.json": "
|
|
21
|
+
"libraries/protocol/temp/package-deps.json": "68f1211ef6fa964309505e53f0b94ddcaf6d2909",
|
|
22
|
+
"libraries/data-account/temp/package-deps.json": "9be03165ffc03d1ebe7c93f1acba11bd35e4b89c",
|
|
23
|
+
"libraries/data-order/temp/package-deps.json": "731f14faef09e1d43637a778fe2214c940d15ce3",
|
|
24
|
+
"libraries/transfer/temp/package-deps.json": "c7e6540230425de9372b9817e0311a13a51d3422",
|
|
25
|
+
"libraries/utils/temp/package-deps.json": "c0ccd6946461153e7eb1b04a3061e075788fad2a",
|
|
26
|
+
"libraries/cache/temp/package-deps.json": "7fe9a4cf5cb23ebd4de9f237e4ffdff34429b205",
|
|
27
|
+
"libraries/sql/temp/package-deps.json": "0d5252756a74ebb7ec08680f8a8b4be12241a90d",
|
|
28
|
+
"libraries/data-product/temp/package-deps.json": "bc7c03c62de2df960d705469d0c42d851cd51a62",
|
|
29
|
+
"libraries/data-series/temp/package-deps.json": "d165e48d81cb126840dea31435e03776c76baf4d",
|
|
30
|
+
"libraries/data-interest-rate/temp/package-deps.json": "aa7bfce06421a83b35809a13b8cecb2f35c21b12",
|
|
31
|
+
"libraries/data-quote/temp/package-deps.json": "7cd7c110193b497e4f4ed111a090f8c55593c5e2",
|
|
32
|
+
"libraries/secret/temp/package-deps.json": "bc18c8383f4c1511ff2b37e47a3df5b46a763de2",
|
|
33
|
+
"libraries/extension/temp/package-deps.json": "abcd1ce716b9fd88f33173d01f02c4c3a9462009",
|
|
36
34
|
"tools/toolkit/temp/package-deps.json": "3bef053db16659f0cdaceea64c8a8580c0131633"
|
|
37
35
|
}
|
package/dist/extension.bundle.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Generates environment variables in the format of a Docker Compose file.
|
|
9
|
-
* @public
|
|
10
|
-
* @param env - The environment variables.
|
|
11
|
-
* @returns The environment variables in the format of a Docker Compose file.
|
|
12
|
-
*/
|
|
13
|
-
function makeDockerEnvs(env) {
|
|
14
|
-
return Object.entries(env !== null && env !== void 0 ? env : {}).map(([k, v]) => `${k}=${v}`);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Generates environment variables in the format of a Kubernetes pod.
|
|
18
|
-
* @public
|
|
19
|
-
* @param env - The environment variables.
|
|
20
|
-
* @returns The environment variables in the format of a Kubernetes pod.
|
|
21
|
-
*/
|
|
22
|
-
function makeK8sEnvs(env) {
|
|
23
|
-
return Object.entries(env !== null && env !== void 0 ? env : {}).map(([k, v]) => ({
|
|
24
|
-
name: k,
|
|
25
|
-
value: `${v}`,
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var extension = (context) => {
|
|
30
|
-
context.registerDeployProvider({
|
|
31
|
-
make_json_schema: () => ({
|
|
32
|
-
type: 'object',
|
|
33
|
-
properties: {
|
|
34
|
-
env: {
|
|
35
|
-
type: 'object',
|
|
36
|
-
required: ['HOST_URL'],
|
|
37
|
-
properties: {
|
|
38
|
-
HOST_URL: { type: 'string' },
|
|
39
|
-
TERMINAL_ID: { type: 'string' },
|
|
40
|
-
ENCRYPTION_KEY_BASE58: { type: 'string' },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
46
|
-
var _a;
|
|
47
|
-
return {
|
|
48
|
-
[`huobi-${ctx.env.ACCESS_KEY}`.replace(/\s/g, '')]: {
|
|
49
|
-
image: `ghcr.io/no-trade-no-life/vendor-huobi:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
50
|
-
restart: 'always',
|
|
51
|
-
environment: makeDockerEnvs(ctx.env),
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
57
|
-
return {
|
|
58
|
-
deployment: {
|
|
59
|
-
apiVersion: 'apps/v1',
|
|
60
|
-
kind: 'Deployment',
|
|
61
|
-
metadata: {
|
|
62
|
-
labels: {
|
|
63
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
64
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
65
|
-
'y.ntnl.io/component': 'huobi',
|
|
66
|
-
},
|
|
67
|
-
name: `huobi-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
68
|
-
namespace: 'yuan',
|
|
69
|
-
},
|
|
70
|
-
spec: {
|
|
71
|
-
replicas: 1,
|
|
72
|
-
selector: {
|
|
73
|
-
matchLabels: {
|
|
74
|
-
'y.ntnl.io/component': 'huobi',
|
|
75
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
template: {
|
|
79
|
-
metadata: {
|
|
80
|
-
labels: {
|
|
81
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
82
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
83
|
-
'y.ntnl.io/component': 'huobi',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
spec: {
|
|
87
|
-
containers: [
|
|
88
|
-
{
|
|
89
|
-
env: makeK8sEnvs(ctx.env),
|
|
90
|
-
image: `ghcr.io/no-trade-no-life/vendor-huobi:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
91
|
-
imagePullPolicy: 'IfNotPresent',
|
|
92
|
-
name: 'huobi',
|
|
93
|
-
resources: {
|
|
94
|
-
limits: {
|
|
95
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
96
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
97
|
-
},
|
|
98
|
-
requests: {
|
|
99
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '120m',
|
|
100
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
hostname: 'huobi',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return extension;
|
|
116
|
-
|
|
117
|
-
})();
|
package/dist/extension.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { makeDockerEnvs, makeK8sEnvs } from '@yuants/extension';
|
|
2
|
-
export default (context) => {
|
|
3
|
-
context.registerDeployProvider({
|
|
4
|
-
make_json_schema: () => ({
|
|
5
|
-
type: 'object',
|
|
6
|
-
properties: {
|
|
7
|
-
env: {
|
|
8
|
-
type: 'object',
|
|
9
|
-
required: ['HOST_URL'],
|
|
10
|
-
properties: {
|
|
11
|
-
HOST_URL: { type: 'string' },
|
|
12
|
-
TERMINAL_ID: { type: 'string' },
|
|
13
|
-
ENCRYPTION_KEY_BASE58: { type: 'string' },
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
19
|
-
var _a;
|
|
20
|
-
return {
|
|
21
|
-
[`huobi-${ctx.env.ACCESS_KEY}`.replace(/\s/g, '')]: {
|
|
22
|
-
image: `ghcr.io/no-trade-no-life/vendor-huobi:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
23
|
-
restart: 'always',
|
|
24
|
-
environment: makeDockerEnvs(ctx.env),
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
30
|
-
return {
|
|
31
|
-
deployment: {
|
|
32
|
-
apiVersion: 'apps/v1',
|
|
33
|
-
kind: 'Deployment',
|
|
34
|
-
metadata: {
|
|
35
|
-
labels: {
|
|
36
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
37
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
38
|
-
'y.ntnl.io/component': 'huobi',
|
|
39
|
-
},
|
|
40
|
-
name: `huobi-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
41
|
-
namespace: 'yuan',
|
|
42
|
-
},
|
|
43
|
-
spec: {
|
|
44
|
-
replicas: 1,
|
|
45
|
-
selector: {
|
|
46
|
-
matchLabels: {
|
|
47
|
-
'y.ntnl.io/component': 'huobi',
|
|
48
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
template: {
|
|
52
|
-
metadata: {
|
|
53
|
-
labels: {
|
|
54
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
55
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
56
|
-
'y.ntnl.io/component': 'huobi',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
spec: {
|
|
60
|
-
containers: [
|
|
61
|
-
{
|
|
62
|
-
env: makeK8sEnvs(ctx.env),
|
|
63
|
-
image: `ghcr.io/no-trade-no-life/vendor-huobi:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
64
|
-
imagePullPolicy: 'IfNotPresent',
|
|
65
|
-
name: 'huobi',
|
|
66
|
-
resources: {
|
|
67
|
-
limits: {
|
|
68
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
69
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
70
|
-
},
|
|
71
|
-
requests: {
|
|
72
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '120m',
|
|
73
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
hostname: 'huobi',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
//# sourceMappingURL=extension.js.map
|
package/dist/extension.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnF,eAAe,CAAC,OAA0B,EAAE,EAAE;IAC5C,OAAO,CAAC,sBAAsB,CAAC;QAC7B,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;YACvB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,UAAU,CAA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AQ,EAAE;4BACR,QAAQ,EAAE;gCACR,MAAM,EAAE;oCACN,mBAAmB,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO;oCAClD,wBAAwB,EAAE,GAAG,CAAC,GAAG;oCACjC,qBAAqB,EAAE,OAAO;iCAC/B;6BACF;4BACD,IAAI,EAAE;gCACJ,UAAU,EAAE;oCACV;wCACE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;wCACzB,KAAK,EAAE,yCAAyC,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO,EAAE;wCAC/E,eAAe,EAAE,cAAc;wCAC/B,IAAI,EAAE,OAAO;wCACb,SAAS,EAAE;4CACT,MAAM,EAAE;gDACN,GAAG,EAAE,MAAA,MAAA,GAAG,CAAC,GAAG,0CAAE,GAAG,mCAAI,MAAM;gDAC3B,MAAM,EAAE,MAAA,MAAA,GAAG,CAAC,MAAM,0CAAE,GAAG,mCAAI,OAAO;6CACnC;4CACD,QAAQ,EAAE;gDACR,GAAG,EAAE,MAAA,MAAA,GAAG,CAAC,GAAG,0CAAE,GAAG,mCAAI,MAAM;gDAC3B,MAAM,EAAE,MAAA,MAAA,GAAG,CAAC,MAAM,0CAAE,GAAG,mCAAI,OAAO;6CACnC;yCACF;qCACF;iCACF;gCACD,QAAQ,EAAE,OAAO;6BAClB;yBACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { IExtensionContext, makeDockerEnvs, makeK8sEnvs } from '@yuants/extension';\nexport default (context: IExtensionContext) => {\n context.registerDeployProvider({\n make_json_schema: () => ({\n type: 'object',\n properties: {\n env: {\n type: 'object',\n required: ['HOST_URL'],\n properties: {\n HOST_URL: { type: 'string' },\n TERMINAL_ID: { type: 'string' },\n ENCRYPTION_KEY_BASE58: { type: 'string' },\n },\n },\n },\n }),\n make_docker_compose_file: async (ctx, envCtx) => {\n return {\n [`huobi-${ctx.env!.ACCESS_KEY}`.replace(/\\s/g, '')]: {\n image: `ghcr.io/no-trade-no-life/vendor-huobi:${ctx.version ?? envCtx.version}`,\n restart: 'always',\n\n environment: makeDockerEnvs(ctx.env),\n },\n };\n },\n make_k8s_resource_objects: async (ctx, envCtx) => {\n return {\n deployment: {\n apiVersion: 'apps/v1',\n kind: 'Deployment',\n metadata: {\n labels: {\n 'y.ntnl.io/version': ctx.version ?? envCtx.version,\n 'y.ntnl.io/manifest_key': ctx.key,\n 'y.ntnl.io/component': 'huobi',\n },\n name: `huobi-${ctx.key}`.replace(/\\s/g, '').toLocaleLowerCase(),\n namespace: 'yuan',\n },\n spec: {\n replicas: 1,\n selector: {\n matchLabels: {\n 'y.ntnl.io/component': 'huobi',\n 'y.ntnl.io/manifest_key': ctx.key,\n },\n },\n template: {\n metadata: {\n labels: {\n 'y.ntnl.io/version': ctx.version ?? envCtx.version,\n 'y.ntnl.io/manifest_key': ctx.key,\n 'y.ntnl.io/component': 'huobi',\n },\n },\n spec: {\n containers: [\n {\n env: makeK8sEnvs(ctx.env),\n image: `ghcr.io/no-trade-no-life/vendor-huobi:${ctx.version ?? envCtx.version}`,\n imagePullPolicy: 'IfNotPresent',\n name: 'huobi',\n resources: {\n limits: {\n cpu: ctx.cpu?.max ?? '500m',\n memory: ctx.memory?.max ?? '256Mi',\n },\n requests: {\n cpu: ctx.cpu?.min ?? '120m',\n memory: ctx.memory?.min ?? '128Mi',\n },\n },\n },\n ],\n hostname: 'huobi',\n },\n },\n },\n },\n };\n },\n });\n};\n"]}
|
package/lib/extension.d.ts
DELETED
package/lib/extension.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA+B,MAAM,mBAAmB,CAAC;kCAC1D,iBAAiB;AAA1C,wBAmFE"}
|
package/lib/extension.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const extension_1 = require("@yuants/extension");
|
|
4
|
-
exports.default = (context) => {
|
|
5
|
-
context.registerDeployProvider({
|
|
6
|
-
make_json_schema: () => ({
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
env: {
|
|
10
|
-
type: 'object',
|
|
11
|
-
required: ['HOST_URL'],
|
|
12
|
-
properties: {
|
|
13
|
-
HOST_URL: { type: 'string' },
|
|
14
|
-
TERMINAL_ID: { type: 'string' },
|
|
15
|
-
ENCRYPTION_KEY_BASE58: { type: 'string' },
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
21
|
-
var _a;
|
|
22
|
-
return {
|
|
23
|
-
[`huobi-${ctx.env.ACCESS_KEY}`.replace(/\s/g, '')]: {
|
|
24
|
-
image: `ghcr.io/no-trade-no-life/vendor-huobi:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
25
|
-
restart: 'always',
|
|
26
|
-
environment: (0, extension_1.makeDockerEnvs)(ctx.env),
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
31
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
32
|
-
return {
|
|
33
|
-
deployment: {
|
|
34
|
-
apiVersion: 'apps/v1',
|
|
35
|
-
kind: 'Deployment',
|
|
36
|
-
metadata: {
|
|
37
|
-
labels: {
|
|
38
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
39
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
40
|
-
'y.ntnl.io/component': 'huobi',
|
|
41
|
-
},
|
|
42
|
-
name: `huobi-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
43
|
-
namespace: 'yuan',
|
|
44
|
-
},
|
|
45
|
-
spec: {
|
|
46
|
-
replicas: 1,
|
|
47
|
-
selector: {
|
|
48
|
-
matchLabels: {
|
|
49
|
-
'y.ntnl.io/component': 'huobi',
|
|
50
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
template: {
|
|
54
|
-
metadata: {
|
|
55
|
-
labels: {
|
|
56
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
57
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
58
|
-
'y.ntnl.io/component': 'huobi',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
spec: {
|
|
62
|
-
containers: [
|
|
63
|
-
{
|
|
64
|
-
env: (0, extension_1.makeK8sEnvs)(ctx.env),
|
|
65
|
-
image: `ghcr.io/no-trade-no-life/vendor-huobi:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
66
|
-
imagePullPolicy: 'IfNotPresent',
|
|
67
|
-
name: 'huobi',
|
|
68
|
-
resources: {
|
|
69
|
-
limits: {
|
|
70
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
71
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
72
|
-
},
|
|
73
|
-
requests: {
|
|
74
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '120m',
|
|
75
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
hostname: 'huobi',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=extension.js.map
|
package/lib/extension.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":";;AAAA,iDAAmF;AACnF,kBAAe,CAAC,OAA0B,EAAE,EAAE;IAC5C,OAAO,CAAC,sBAAsB,CAAC;QAC7B,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;YACvB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,UAAU,CAAC;oBACtB,UAAU,EAAE;wBACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC5B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,qBAAqB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAC1C;iBACF;aACF;SACF,CAAC;QACF,wBAAwB,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;;YAC9C,OAAO;gBACL,CAAC,SAAS,GAAG,CAAC,GAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE;oBACnD,KAAK,EAAE,yCAAyC,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO,EAAE;oBAC/E,OAAO,EAAE,QAAQ;oBAEjB,WAAW,EAAE,IAAA,0BAAc,EAAC,GAAG,CAAC,GAAG,CAAC;iBACrC;aACF,CAAC;QACJ,CAAC;QACD,yBAAyB,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;;YAC/C,OAAO;gBACL,UAAU,EAAE;oBACV,UAAU,EAAE,SAAS;oBAC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AAG,mCAAI,MAAM;gDAC3B,MAAM,EAAE,MAAA,MAAA,GAAG,CAAC,MAAM,0CAAE,GAAG,mCAAI,OAAO;6CACnC;yCACF;qCACF;iCACF;gCACD,QAAQ,EAAE,OAAO;6BAClB;yBACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { IExtensionContext, makeDockerEnvs, makeK8sEnvs } from '@yuants/extension';\nexport default (context: IExtensionContext) => {\n context.registerDeployProvider({\n make_json_schema: () => ({\n type: 'object',\n properties: {\n env: {\n type: 'object',\n required: ['HOST_URL'],\n properties: {\n HOST_URL: { type: 'string' },\n TERMINAL_ID: { type: 'string' },\n ENCRYPTION_KEY_BASE58: { type: 'string' },\n },\n },\n },\n }),\n make_docker_compose_file: async (ctx, envCtx) => {\n return {\n [`huobi-${ctx.env!.ACCESS_KEY}`.replace(/\\s/g, '')]: {\n image: `ghcr.io/no-trade-no-life/vendor-huobi:${ctx.version ?? envCtx.version}`,\n restart: 'always',\n\n environment: makeDockerEnvs(ctx.env),\n },\n };\n },\n make_k8s_resource_objects: async (ctx, envCtx) => {\n return {\n deployment: {\n apiVersion: 'apps/v1',\n kind: 'Deployment',\n metadata: {\n labels: {\n 'y.ntnl.io/version': ctx.version ?? envCtx.version,\n 'y.ntnl.io/manifest_key': ctx.key,\n 'y.ntnl.io/component': 'huobi',\n },\n name: `huobi-${ctx.key}`.replace(/\\s/g, '').toLocaleLowerCase(),\n namespace: 'yuan',\n },\n spec: {\n replicas: 1,\n selector: {\n matchLabels: {\n 'y.ntnl.io/component': 'huobi',\n 'y.ntnl.io/manifest_key': ctx.key,\n },\n },\n template: {\n metadata: {\n labels: {\n 'y.ntnl.io/version': ctx.version ?? envCtx.version,\n 'y.ntnl.io/manifest_key': ctx.key,\n 'y.ntnl.io/component': 'huobi',\n },\n },\n spec: {\n containers: [\n {\n env: makeK8sEnvs(ctx.env),\n image: `ghcr.io/no-trade-no-life/vendor-huobi:${ctx.version ?? envCtx.version}`,\n imagePullPolicy: 'IfNotPresent',\n name: 'huobi',\n resources: {\n limits: {\n cpu: ctx.cpu?.max ?? '500m',\n memory: ctx.memory?.max ?? '256Mi',\n },\n requests: {\n cpu: ctx.cpu?.min ?? '120m',\n memory: ctx.memory?.min ?? '128Mi',\n },\n },\n },\n ],\n hostname: 'huobi',\n },\n },\n },\n },\n };\n },\n });\n};\n"]}
|
package/temp/image-tag
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sha-3ed0426edd8366add8c3bc969cea303f5a47d30a
|