@yuants/vendor-hyperliquid 0.3.9 → 0.3.11
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 +12 -12
- package/temp/package-deps.json +14 -16
- package/dist/extension.bundle.js +0 -119
- package/dist/extension.js +0 -89
- 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 -91
- 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-hyperliquid",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"bin": "lib/cli.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
"temp"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@yuants/protocol": "0.42.
|
|
13
|
-
"@yuants/transfer": "0.2.
|
|
14
|
-
"@yuants/data-account": "0.4.
|
|
15
|
-
"@yuants/utils": "0.
|
|
16
|
-
"@yuants/sql": "0.9.
|
|
17
|
-
"@yuants/data-product": "0.2.
|
|
18
|
-
"@yuants/data-interest-rate": "0.1.
|
|
19
|
-
"@yuants/data-order": "0.2.
|
|
20
|
-
"@yuants/data-series": "0.3.
|
|
12
|
+
"@yuants/protocol": "0.42.1",
|
|
13
|
+
"@yuants/transfer": "0.2.13",
|
|
14
|
+
"@yuants/data-account": "0.4.1",
|
|
15
|
+
"@yuants/utils": "0.8.0",
|
|
16
|
+
"@yuants/sql": "0.9.4",
|
|
17
|
+
"@yuants/data-product": "0.2.14",
|
|
18
|
+
"@yuants/data-interest-rate": "0.1.22",
|
|
19
|
+
"@yuants/data-order": "0.2.10",
|
|
20
|
+
"@yuants/data-series": "0.3.25",
|
|
21
21
|
"rxjs": "~7.5.6",
|
|
22
22
|
"crypto-js": "^4.2.0",
|
|
23
23
|
"hyperliquid": "~1.6.2",
|
|
24
24
|
"ethers": "~6.13.5",
|
|
25
25
|
"@msgpack/msgpack": "~3.1.2",
|
|
26
|
-
"@yuants/data-ohlc": "0.3.
|
|
26
|
+
"@yuants/data-ohlc": "0.3.21"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@microsoft/api-extractor": "~7.30.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@rushstack/heft-node-rig": "~1.10.7",
|
|
33
33
|
"@types/heft-jest": "1.0.3",
|
|
34
34
|
"@types/node": "22",
|
|
35
|
-
"@yuants/extension": "0.2.
|
|
35
|
+
"@yuants/extension": "0.2.24",
|
|
36
36
|
"@yuants/tool-kit": "0.2.0",
|
|
37
37
|
"typescript": "~4.7.4",
|
|
38
38
|
"ts-node": "~10.9.2"
|
package/temp/package-deps.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apps/vendor-hyperliquid/CHANGELOG.json": "
|
|
3
|
-
"apps/vendor-hyperliquid/CHANGELOG.md": "
|
|
2
|
+
"apps/vendor-hyperliquid/CHANGELOG.json": "6e0c7060aa9db4b0faaaa2ffc364f10dc95de759",
|
|
3
|
+
"apps/vendor-hyperliquid/CHANGELOG.md": "49cc9be0fcb224cdcad7909aeabf07b7598d2c18",
|
|
4
4
|
"apps/vendor-hyperliquid/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
5
|
-
"apps/vendor-hyperliquid/build/Dockerfile": "1c2ae19b2c8549403281594a463aaae67d70400c",
|
|
6
5
|
"apps/vendor-hyperliquid/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
7
6
|
"apps/vendor-hyperliquid/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
8
7
|
"apps/vendor-hyperliquid/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
9
8
|
"apps/vendor-hyperliquid/etc/vendor-hyperliquid.api.md": "66675bd88afa1fe945f0d4023984c1c9c3e60a34",
|
|
10
|
-
"apps/vendor-hyperliquid/package.json": "
|
|
9
|
+
"apps/vendor-hyperliquid/package.json": "ebd9ecb3c5af7fcde0945579bf1cb25d25879f1a",
|
|
11
10
|
"apps/vendor-hyperliquid/src/api.ts": "041aa6e0e322b7c6ea5c822119c695b05d32295a",
|
|
12
11
|
"apps/vendor-hyperliquid/src/cli.ts": "9bf6b5559a6c6f33da20e74cc6c5d702c60ec891",
|
|
13
|
-
"apps/vendor-hyperliquid/src/extension.ts": "451dc84e9d62d0e87aec1e04a2a8375aaef873a3",
|
|
14
12
|
"apps/vendor-hyperliquid/src/index.ts": "0b84c433e1cb0c6b718e54f88c213c9d1b632691",
|
|
15
13
|
"apps/vendor-hyperliquid/src/interest_rate.ts": "5b46f8a4904734d9801e3ddd1146813918e36835",
|
|
16
14
|
"apps/vendor-hyperliquid/src/ohlc.ts": "b1272944f0ffe8dd77ef9e7e39429efb7d2e5006",
|
|
@@ -20,16 +18,16 @@
|
|
|
20
18
|
"apps/vendor-hyperliquid/src/terminal.ts": "04776a178d253a2e53f9c84c802e80f67aa9179b",
|
|
21
19
|
"apps/vendor-hyperliquid/tsconfig.json": "81da8f78196974b5d15da0edb6b2d9f48641063c",
|
|
22
20
|
"apps/vendor-hyperliquid/.rush/temp/shrinkwrap-deps.json": "d8a15e8163d8abdb142a2024a5b5b13ab444f87b",
|
|
23
|
-
"libraries/protocol/temp/package-deps.json": "
|
|
24
|
-
"libraries/transfer/temp/package-deps.json": "
|
|
25
|
-
"libraries/data-account/temp/package-deps.json": "
|
|
26
|
-
"libraries/utils/temp/package-deps.json": "
|
|
27
|
-
"libraries/sql/temp/package-deps.json": "
|
|
28
|
-
"libraries/data-product/temp/package-deps.json": "
|
|
29
|
-
"libraries/data-interest-rate/temp/package-deps.json": "
|
|
30
|
-
"libraries/data-order/temp/package-deps.json": "
|
|
31
|
-
"libraries/data-series/temp/package-deps.json": "
|
|
32
|
-
"libraries/data-ohlc/temp/package-deps.json": "
|
|
33
|
-
"libraries/extension/temp/package-deps.json": "
|
|
21
|
+
"libraries/protocol/temp/package-deps.json": "68f1211ef6fa964309505e53f0b94ddcaf6d2909",
|
|
22
|
+
"libraries/transfer/temp/package-deps.json": "c7e6540230425de9372b9817e0311a13a51d3422",
|
|
23
|
+
"libraries/data-account/temp/package-deps.json": "9be03165ffc03d1ebe7c93f1acba11bd35e4b89c",
|
|
24
|
+
"libraries/utils/temp/package-deps.json": "c0ccd6946461153e7eb1b04a3061e075788fad2a",
|
|
25
|
+
"libraries/sql/temp/package-deps.json": "0d5252756a74ebb7ec08680f8a8b4be12241a90d",
|
|
26
|
+
"libraries/data-product/temp/package-deps.json": "bc7c03c62de2df960d705469d0c42d851cd51a62",
|
|
27
|
+
"libraries/data-interest-rate/temp/package-deps.json": "aa7bfce06421a83b35809a13b8cecb2f35c21b12",
|
|
28
|
+
"libraries/data-order/temp/package-deps.json": "731f14faef09e1d43637a778fe2214c940d15ce3",
|
|
29
|
+
"libraries/data-series/temp/package-deps.json": "d165e48d81cb126840dea31435e03776c76baf4d",
|
|
30
|
+
"libraries/data-ohlc/temp/package-deps.json": "106c33d9c2f3ff01b21e764bf9a6ffd383353d0e",
|
|
31
|
+
"libraries/extension/temp/package-deps.json": "abcd1ce716b9fd88f33173d01f02c4c3a9462009",
|
|
34
32
|
"tools/toolkit/temp/package-deps.json": "3bef053db16659f0cdaceea64c8a8580c0131633"
|
|
35
33
|
}
|
package/dist/extension.bundle.js
DELETED
|
@@ -1,119 +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
|
-
const COMPONENT_NAME = 'vendor-hyperliquid';
|
|
31
|
-
context.registerDeployProvider({
|
|
32
|
-
make_json_schema: () => ({
|
|
33
|
-
type: 'object',
|
|
34
|
-
properties: {
|
|
35
|
-
env: {
|
|
36
|
-
type: 'object',
|
|
37
|
-
required: ['HOST_URL'],
|
|
38
|
-
properties: {
|
|
39
|
-
//
|
|
40
|
-
HOST_URL: { type: 'string' },
|
|
41
|
-
TERMINAL_ID: { type: 'string' },
|
|
42
|
-
PRIVATE_KEY: { type: 'string' },
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
}),
|
|
47
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
48
|
-
var _a;
|
|
49
|
-
return {
|
|
50
|
-
[`${COMPONENT_NAME}-${ctx.key}`.replace(/\s/g, '')]: {
|
|
51
|
-
image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
52
|
-
restart: 'always',
|
|
53
|
-
environment: makeDockerEnvs(ctx.env),
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
58
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
59
|
-
return {
|
|
60
|
-
deployment: {
|
|
61
|
-
apiVersion: 'apps/v1',
|
|
62
|
-
kind: 'Deployment',
|
|
63
|
-
metadata: {
|
|
64
|
-
labels: {
|
|
65
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
66
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
67
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
68
|
-
},
|
|
69
|
-
name: `${COMPONENT_NAME}-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
70
|
-
namespace: 'yuan',
|
|
71
|
-
},
|
|
72
|
-
spec: {
|
|
73
|
-
replicas: 1,
|
|
74
|
-
selector: {
|
|
75
|
-
matchLabels: {
|
|
76
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
77
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
template: {
|
|
81
|
-
metadata: {
|
|
82
|
-
labels: {
|
|
83
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
84
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
85
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
spec: {
|
|
89
|
-
containers: [
|
|
90
|
-
{
|
|
91
|
-
env: makeK8sEnvs(ctx.env),
|
|
92
|
-
image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
93
|
-
imagePullPolicy: 'IfNotPresent',
|
|
94
|
-
name: COMPONENT_NAME,
|
|
95
|
-
resources: {
|
|
96
|
-
limits: {
|
|
97
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
98
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
99
|
-
},
|
|
100
|
-
requests: {
|
|
101
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '100m',
|
|
102
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
hostname: COMPONENT_NAME,
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
return extension;
|
|
118
|
-
|
|
119
|
-
})();
|
package/dist/extension.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { makeDockerEnvs, makeK8sEnvs } from '@yuants/extension';
|
|
2
|
-
export default (context) => {
|
|
3
|
-
const COMPONENT_NAME = 'vendor-hyperliquid';
|
|
4
|
-
context.registerDeployProvider({
|
|
5
|
-
make_json_schema: () => ({
|
|
6
|
-
type: 'object',
|
|
7
|
-
properties: {
|
|
8
|
-
env: {
|
|
9
|
-
type: 'object',
|
|
10
|
-
required: ['HOST_URL'],
|
|
11
|
-
properties: {
|
|
12
|
-
//
|
|
13
|
-
HOST_URL: { type: 'string' },
|
|
14
|
-
TERMINAL_ID: { type: 'string' },
|
|
15
|
-
PRIVATE_KEY: { type: 'string' },
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
21
|
-
var _a;
|
|
22
|
-
return {
|
|
23
|
-
[`${COMPONENT_NAME}-${ctx.key}`.replace(/\s/g, '')]: {
|
|
24
|
-
image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
25
|
-
restart: 'always',
|
|
26
|
-
environment: 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': COMPONENT_NAME,
|
|
41
|
-
},
|
|
42
|
-
name: `${COMPONENT_NAME}-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
43
|
-
namespace: 'yuan',
|
|
44
|
-
},
|
|
45
|
-
spec: {
|
|
46
|
-
replicas: 1,
|
|
47
|
-
selector: {
|
|
48
|
-
matchLabels: {
|
|
49
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
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': COMPONENT_NAME,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
spec: {
|
|
62
|
-
containers: [
|
|
63
|
-
{
|
|
64
|
-
env: makeK8sEnvs(ctx.env),
|
|
65
|
-
image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
66
|
-
imagePullPolicy: 'IfNotPresent',
|
|
67
|
-
name: COMPONENT_NAME,
|
|
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 : '100m',
|
|
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: COMPONENT_NAME,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
//# 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,MAAM,cAAc,GAAG,oBAAoB,CAAC;IAC5C,OAAO,CAAC,sBAAsB,CAAC;QAC7B,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;YACvB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE;oBACH,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,qBAAqB,EAAE,cAAc;gCACrC,wBAAwB,EAAE,GAAG,CAAC,GAAG;6BAClC;yBACF;wBACD,QAAQ,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,cAAc;iCACtC;6BACF;4BACD,IAAI,EAAE;gCACJ,UAAU,EAAE;oCACV;wCACE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;wCACzB,KAAK,EAAE,4BAA4B,cAAc,IAAI,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO,EAAE;wCACpF,eAAe,EAAE,cAAc;wCAC/B,IAAI,EAAE,cAAc;wCACpB,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,cAAc;6BACzB;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 const COMPONENT_NAME = 'vendor-hyperliquid';\n context.registerDeployProvider({\n make_json_schema: () => ({\n type: 'object',\n properties: {\n env: {\n type: 'object',\n required: ['HOST_URL'],\n properties: {\n //\n HOST_URL: { type: 'string' },\n TERMINAL_ID: { type: 'string' },\n PRIVATE_KEY: { type: 'string' },\n },\n },\n },\n }),\n make_docker_compose_file: async (ctx, envCtx) => {\n return {\n [`${COMPONENT_NAME}-${ctx.key}`.replace(/\\s/g, '')]: {\n image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${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': COMPONENT_NAME,\n },\n name: `${COMPONENT_NAME}-${ctx.key}`.replace(/\\s/g, '').toLocaleLowerCase(),\n namespace: 'yuan',\n },\n spec: {\n replicas: 1,\n selector: {\n matchLabels: {\n 'y.ntnl.io/component': COMPONENT_NAME,\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': COMPONENT_NAME,\n },\n },\n spec: {\n containers: [\n {\n env: makeK8sEnvs(ctx.env),\n image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${ctx.version ?? envCtx.version}`,\n imagePullPolicy: 'IfNotPresent',\n name: COMPONENT_NAME,\n resources: {\n limits: {\n cpu: ctx.cpu?.max ?? '500m',\n memory: ctx.memory?.max ?? '256Mi',\n },\n requests: {\n cpu: ctx.cpu?.min ?? '100m',\n memory: ctx.memory?.min ?? '128Mi',\n },\n },\n },\n ],\n hostname: COMPONENT_NAME,\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,wBAqFE"}
|
package/lib/extension.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const extension_1 = require("@yuants/extension");
|
|
4
|
-
exports.default = (context) => {
|
|
5
|
-
const COMPONENT_NAME = 'vendor-hyperliquid';
|
|
6
|
-
context.registerDeployProvider({
|
|
7
|
-
make_json_schema: () => ({
|
|
8
|
-
type: 'object',
|
|
9
|
-
properties: {
|
|
10
|
-
env: {
|
|
11
|
-
type: 'object',
|
|
12
|
-
required: ['HOST_URL'],
|
|
13
|
-
properties: {
|
|
14
|
-
//
|
|
15
|
-
HOST_URL: { type: 'string' },
|
|
16
|
-
TERMINAL_ID: { type: 'string' },
|
|
17
|
-
PRIVATE_KEY: { type: 'string' },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
23
|
-
var _a;
|
|
24
|
-
return {
|
|
25
|
-
[`${COMPONENT_NAME}-${ctx.key}`.replace(/\s/g, '')]: {
|
|
26
|
-
image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
27
|
-
restart: 'always',
|
|
28
|
-
environment: (0, extension_1.makeDockerEnvs)(ctx.env),
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
33
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
34
|
-
return {
|
|
35
|
-
deployment: {
|
|
36
|
-
apiVersion: 'apps/v1',
|
|
37
|
-
kind: 'Deployment',
|
|
38
|
-
metadata: {
|
|
39
|
-
labels: {
|
|
40
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
41
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
42
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
43
|
-
},
|
|
44
|
-
name: `${COMPONENT_NAME}-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
45
|
-
namespace: 'yuan',
|
|
46
|
-
},
|
|
47
|
-
spec: {
|
|
48
|
-
replicas: 1,
|
|
49
|
-
selector: {
|
|
50
|
-
matchLabels: {
|
|
51
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
52
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
template: {
|
|
56
|
-
metadata: {
|
|
57
|
-
labels: {
|
|
58
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
59
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
60
|
-
'y.ntnl.io/component': COMPONENT_NAME,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
spec: {
|
|
64
|
-
containers: [
|
|
65
|
-
{
|
|
66
|
-
env: (0, extension_1.makeK8sEnvs)(ctx.env),
|
|
67
|
-
image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
68
|
-
imagePullPolicy: 'IfNotPresent',
|
|
69
|
-
name: COMPONENT_NAME,
|
|
70
|
-
resources: {
|
|
71
|
-
limits: {
|
|
72
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
73
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
74
|
-
},
|
|
75
|
-
requests: {
|
|
76
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '100m',
|
|
77
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
hostname: COMPONENT_NAME,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
//# 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,MAAM,cAAc,GAAG,oBAAoB,CAAC;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,EAAE;wBACF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC5B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAChC;iBACF;aACF;SACF,CAAC;QACF,wBAAwB,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;;YAC9C,OAAO;gBACL,CAAC,GAAG,cAAc,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE;oBACn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AAI,MAAM,CAAC,OAAO,EAAE;wCACpF,eAAe,EAAE,cAAc;wCAC/B,IAAI,EAAE,cAAc;wCACpB,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,cAAc;6BACzB;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 const COMPONENT_NAME = 'vendor-hyperliquid';\n context.registerDeployProvider({\n make_json_schema: () => ({\n type: 'object',\n properties: {\n env: {\n type: 'object',\n required: ['HOST_URL'],\n properties: {\n //\n HOST_URL: { type: 'string' },\n TERMINAL_ID: { type: 'string' },\n PRIVATE_KEY: { type: 'string' },\n },\n },\n },\n }),\n make_docker_compose_file: async (ctx, envCtx) => {\n return {\n [`${COMPONENT_NAME}-${ctx.key}`.replace(/\\s/g, '')]: {\n image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${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': COMPONENT_NAME,\n },\n name: `${COMPONENT_NAME}-${ctx.key}`.replace(/\\s/g, '').toLocaleLowerCase(),\n namespace: 'yuan',\n },\n spec: {\n replicas: 1,\n selector: {\n matchLabels: {\n 'y.ntnl.io/component': COMPONENT_NAME,\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': COMPONENT_NAME,\n },\n },\n spec: {\n containers: [\n {\n env: makeK8sEnvs(ctx.env),\n image: `ghcr.io/no-trade-no-life/${COMPONENT_NAME}:${ctx.version ?? envCtx.version}`,\n imagePullPolicy: 'IfNotPresent',\n name: COMPONENT_NAME,\n resources: {\n limits: {\n cpu: ctx.cpu?.max ?? '500m',\n memory: ctx.memory?.max ?? '256Mi',\n },\n requests: {\n cpu: ctx.cpu?.min ?? '100m',\n memory: ctx.memory?.min ?? '128Mi',\n },\n },\n },\n ],\n hostname: COMPONENT_NAME,\n },\n },\n },\n },\n };\n },\n });\n};\n"]}
|
package/temp/image-tag
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sha-2fc872f8583c4796a9ad5badea6ba68c13d03c92
|