@yuants/vendor-hyperliquid 0.3.10 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuants/vendor-hyperliquid",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "bin": "lib/cli.js",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -1,16 +1,14 @@
1
1
  {
2
- "apps/vendor-hyperliquid/CHANGELOG.json": "8e2cef522549835a400d83546eb03b6d80323c76",
3
- "apps/vendor-hyperliquid/CHANGELOG.md": "43a0c5ef8ea25fe255b89d48f774d342118ed374",
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": "0ea0277557429b14bd37199c384a6478e50ba10e",
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",
@@ -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
@@ -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;o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gCACX,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"]}
@@ -1,4 +0,0 @@
1
- import { IExtensionContext } from '@yuants/extension';
2
- declare const _default: (context: IExtensionContext) => void;
3
- export default _default;
4
- //# sourceMappingURL=extension.d.ts.map
@@ -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
@@ -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,UAA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ACX,QAAQ,EAAE;4BACR,WAAW,EAAE;gCACX,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,IAAA,uBAAW,EAAC,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/temp/image-tag DELETED
@@ -1 +0,0 @@
1
- sha-ef57ef3f71f63e291d38c2f2d39b86eb10d4a91e