@yuants/vendor-coinex 0.2.10 → 0.2.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 +6 -6
- package/temp/package-deps.json +8 -10
- package/dist/extension.bundle.js +0 -120
- package/dist/extension.js +0 -90
- 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 -92
- 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-coinex",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"bin": "lib/cli.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@yuants/protocol": "0.42.1",
|
|
14
|
-
"@yuants/transfer": "0.2.
|
|
14
|
+
"@yuants/transfer": "0.2.14",
|
|
15
15
|
"@yuants/utils": "0.8.0",
|
|
16
|
-
"@yuants/sql": "0.9.
|
|
17
|
-
"@yuants/data-series": "0.3.
|
|
18
|
-
"@yuants/data-product": "0.2.
|
|
19
|
-
"@yuants/data-interest-rate": "0.1.
|
|
16
|
+
"@yuants/sql": "0.9.5",
|
|
17
|
+
"@yuants/data-series": "0.3.26",
|
|
18
|
+
"@yuants/data-product": "0.2.15",
|
|
19
|
+
"@yuants/data-interest-rate": "0.1.23",
|
|
20
20
|
"rxjs": "~7.5.6",
|
|
21
21
|
"crypto-js": "^4.2.0"
|
|
22
22
|
},
|
package/temp/package-deps.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apps/vendor-coinex/CHANGELOG.json": "
|
|
3
|
-
"apps/vendor-coinex/CHANGELOG.md": "
|
|
2
|
+
"apps/vendor-coinex/CHANGELOG.json": "f6af4b796a439b5e800cf22662a9d110820fbc9f",
|
|
3
|
+
"apps/vendor-coinex/CHANGELOG.md": "1bf84803e3c5344b96dd89466b8d15144889717a",
|
|
4
4
|
"apps/vendor-coinex/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
5
|
-
"apps/vendor-coinex/build/Dockerfile": "8337903e3366ea6c13f1396269c082b8cb5dd96b",
|
|
6
5
|
"apps/vendor-coinex/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
7
6
|
"apps/vendor-coinex/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
8
7
|
"apps/vendor-coinex/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
9
8
|
"apps/vendor-coinex/etc/vendor-coinex.api.md": "33941b70ac7469421ff8fb8c157181014a0ea655",
|
|
10
|
-
"apps/vendor-coinex/package.json": "
|
|
9
|
+
"apps/vendor-coinex/package.json": "c9ce18a3944a0c234a0088f90a42d86344fa77c3",
|
|
11
10
|
"apps/vendor-coinex/src/api.ts": "5dc2027855a6f71ff98f88ad2329abeef40593fb",
|
|
12
11
|
"apps/vendor-coinex/src/cli.ts": "9bf6b5559a6c6f33da20e74cc6c5d702c60ec891",
|
|
13
|
-
"apps/vendor-coinex/src/extension.ts": "0a560546d341acebb59b1703be89c19fc2111a8b",
|
|
14
12
|
"apps/vendor-coinex/src/index.ts": "1839b7a344b0f693f8e835f048a0bf6a69f5ff60",
|
|
15
13
|
"apps/vendor-coinex/src/interest_rate.ts": "e085bb282420c139fd541f7fa8fb9a676121382f",
|
|
16
14
|
"apps/vendor-coinex/src/product.ts": "220942cd49f2ca1846edab7708dc089d443591b1",
|
|
@@ -18,12 +16,12 @@
|
|
|
18
16
|
"apps/vendor-coinex/tsconfig.json": "81da8f78196974b5d15da0edb6b2d9f48641063c",
|
|
19
17
|
"apps/vendor-coinex/.rush/temp/shrinkwrap-deps.json": "65091c107a6149901dadc3fa1a7717446ce94f99",
|
|
20
18
|
"libraries/protocol/temp/package-deps.json": "68f1211ef6fa964309505e53f0b94ddcaf6d2909",
|
|
21
|
-
"libraries/transfer/temp/package-deps.json": "
|
|
19
|
+
"libraries/transfer/temp/package-deps.json": "b2172632c3a3b19d5826f422ce390334ebd29f07",
|
|
22
20
|
"libraries/utils/temp/package-deps.json": "c0ccd6946461153e7eb1b04a3061e075788fad2a",
|
|
23
|
-
"libraries/sql/temp/package-deps.json": "
|
|
24
|
-
"libraries/data-series/temp/package-deps.json": "
|
|
25
|
-
"libraries/data-product/temp/package-deps.json": "
|
|
26
|
-
"libraries/data-interest-rate/temp/package-deps.json": "
|
|
21
|
+
"libraries/sql/temp/package-deps.json": "ad3a35187374a87704492b34a5d287432d96b6f5",
|
|
22
|
+
"libraries/data-series/temp/package-deps.json": "e449261379774595e4fd0b1033bb8409afe4fb9c",
|
|
23
|
+
"libraries/data-product/temp/package-deps.json": "e9a9715ab74c3d2c301ef5e301d14fa8a0e4e445",
|
|
24
|
+
"libraries/data-interest-rate/temp/package-deps.json": "7eba2fb9af329c328497677d58a39a62bccf84cc",
|
|
27
25
|
"libraries/extension/temp/package-deps.json": "abcd1ce716b9fd88f33173d01f02c4c3a9462009",
|
|
28
26
|
"tools/toolkit/temp/package-deps.json": "3bef053db16659f0cdaceea64c8a8580c0131633"
|
|
29
27
|
}
|
package/dist/extension.bundle.js
DELETED
|
@@ -1,120 +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
|
-
//
|
|
39
|
-
HOST_URL: { type: 'string' },
|
|
40
|
-
TERMINAL_ID: { type: 'string' },
|
|
41
|
-
ACCESS_KEY: { type: 'string' },
|
|
42
|
-
SECRET_KEY: { type: 'string' },
|
|
43
|
-
PASSPHRASE: { type: 'string' },
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
}),
|
|
48
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
49
|
-
var _a;
|
|
50
|
-
return {
|
|
51
|
-
[`coinex-${ctx.env.ACCESS_KEY}`.replace(/\s/g, '')]: {
|
|
52
|
-
image: `ghcr.io/no-trade-no-life/vendor-coinex:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
53
|
-
restart: 'always',
|
|
54
|
-
environment: makeDockerEnvs(ctx.env),
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
59
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
60
|
-
return {
|
|
61
|
-
deployment: {
|
|
62
|
-
apiVersion: 'apps/v1',
|
|
63
|
-
kind: 'Deployment',
|
|
64
|
-
metadata: {
|
|
65
|
-
labels: {
|
|
66
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
67
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
68
|
-
'y.ntnl.io/component': 'coinex',
|
|
69
|
-
},
|
|
70
|
-
name: `coinex-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
71
|
-
namespace: 'yuan',
|
|
72
|
-
},
|
|
73
|
-
spec: {
|
|
74
|
-
replicas: 1,
|
|
75
|
-
selector: {
|
|
76
|
-
matchLabels: {
|
|
77
|
-
'y.ntnl.io/component': 'coinex',
|
|
78
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
template: {
|
|
82
|
-
metadata: {
|
|
83
|
-
labels: {
|
|
84
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
85
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
86
|
-
'y.ntnl.io/component': 'coinex',
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
spec: {
|
|
90
|
-
containers: [
|
|
91
|
-
{
|
|
92
|
-
env: makeK8sEnvs(ctx.env),
|
|
93
|
-
image: `ghcr.io/no-trade-no-life/vendor-coinex:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
94
|
-
imagePullPolicy: 'IfNotPresent',
|
|
95
|
-
name: 'coinex',
|
|
96
|
-
resources: {
|
|
97
|
-
limits: {
|
|
98
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
99
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
100
|
-
},
|
|
101
|
-
requests: {
|
|
102
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '100m',
|
|
103
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
hostname: 'coinex',
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
},
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
return extension;
|
|
119
|
-
|
|
120
|
-
})();
|
package/dist/extension.js
DELETED
|
@@ -1,90 +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
|
-
//
|
|
12
|
-
HOST_URL: { type: 'string' },
|
|
13
|
-
TERMINAL_ID: { type: 'string' },
|
|
14
|
-
ACCESS_KEY: { type: 'string' },
|
|
15
|
-
SECRET_KEY: { type: 'string' },
|
|
16
|
-
PASSPHRASE: { type: 'string' },
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
}),
|
|
21
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
22
|
-
var _a;
|
|
23
|
-
return {
|
|
24
|
-
[`coinex-${ctx.env.ACCESS_KEY}`.replace(/\s/g, '')]: {
|
|
25
|
-
image: `ghcr.io/no-trade-no-life/vendor-coinex:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
26
|
-
restart: 'always',
|
|
27
|
-
environment: makeDockerEnvs(ctx.env),
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
32
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
33
|
-
return {
|
|
34
|
-
deployment: {
|
|
35
|
-
apiVersion: 'apps/v1',
|
|
36
|
-
kind: 'Deployment',
|
|
37
|
-
metadata: {
|
|
38
|
-
labels: {
|
|
39
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
40
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
41
|
-
'y.ntnl.io/component': 'coinex',
|
|
42
|
-
},
|
|
43
|
-
name: `coinex-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
44
|
-
namespace: 'yuan',
|
|
45
|
-
},
|
|
46
|
-
spec: {
|
|
47
|
-
replicas: 1,
|
|
48
|
-
selector: {
|
|
49
|
-
matchLabels: {
|
|
50
|
-
'y.ntnl.io/component': 'coinex',
|
|
51
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
template: {
|
|
55
|
-
metadata: {
|
|
56
|
-
labels: {
|
|
57
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
58
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
59
|
-
'y.ntnl.io/component': 'coinex',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
spec: {
|
|
63
|
-
containers: [
|
|
64
|
-
{
|
|
65
|
-
env: makeK8sEnvs(ctx.env),
|
|
66
|
-
image: `ghcr.io/no-trade-no-life/vendor-coinex:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
67
|
-
imagePullPolicy: 'IfNotPresent',
|
|
68
|
-
name: 'coinex',
|
|
69
|
-
resources: {
|
|
70
|
-
limits: {
|
|
71
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
72
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
73
|
-
},
|
|
74
|
-
requests: {
|
|
75
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '100m',
|
|
76
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
hostname: 'coinex',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
//# 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,CAAC;oBACtB,UAAU,EAAE;wBACV,EAAE;wBACF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC5B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,UAAU,EA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,EAAE;oCACN,mBAAmB,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO;oCAClD,wBAAwB,EAAE,GAAG,CAAC,GAAG;oCACjC,qBAAqB,EAAE,QAAQ;iCAChC;6BACF;4BACD,IAAI,EAAE;gCACJ,UAAU,EAAE;oCACV;wCACE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;wCACzB,KAAK,EAAE,0CAA0C,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO,EAAE;wCAChF,eAAe,EAAE,cAAc;wCAC/B,IAAI,EAAE,QAAQ;wCACd,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,QAAQ;6BACnB;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 //\n HOST_URL: { type: 'string' },\n TERMINAL_ID: { type: 'string' },\n ACCESS_KEY: { type: 'string' },\n SECRET_KEY: { type: 'string' },\n PASSPHRASE: { type: 'string' },\n },\n },\n },\n }),\n make_docker_compose_file: async (ctx, envCtx) => {\n return {\n [`coinex-${ctx.env!.ACCESS_KEY}`.replace(/\\s/g, '')]: {\n image: `ghcr.io/no-trade-no-life/vendor-coinex:${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': 'coinex',\n },\n name: `coinex-${ctx.key}`.replace(/\\s/g, '').toLocaleLowerCase(),\n namespace: 'yuan',\n },\n spec: {\n replicas: 1,\n selector: {\n matchLabels: {\n 'y.ntnl.io/component': 'coinex',\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': 'coinex',\n },\n },\n spec: {\n containers: [\n {\n env: makeK8sEnvs(ctx.env),\n image: `ghcr.io/no-trade-no-life/vendor-coinex:${ctx.version ?? envCtx.version}`,\n imagePullPolicy: 'IfNotPresent',\n name: 'coinex',\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: 'coinex',\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,wBAsFE"}
|
package/lib/extension.js
DELETED
|
@@ -1,92 +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
|
-
//
|
|
14
|
-
HOST_URL: { type: 'string' },
|
|
15
|
-
TERMINAL_ID: { type: 'string' },
|
|
16
|
-
ACCESS_KEY: { type: 'string' },
|
|
17
|
-
SECRET_KEY: { type: 'string' },
|
|
18
|
-
PASSPHRASE: { type: 'string' },
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
}),
|
|
23
|
-
make_docker_compose_file: async (ctx, envCtx) => {
|
|
24
|
-
var _a;
|
|
25
|
-
return {
|
|
26
|
-
[`coinex-${ctx.env.ACCESS_KEY}`.replace(/\s/g, '')]: {
|
|
27
|
-
image: `ghcr.io/no-trade-no-life/vendor-coinex:${(_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version}`,
|
|
28
|
-
restart: 'always',
|
|
29
|
-
environment: (0, extension_1.makeDockerEnvs)(ctx.env),
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
make_k8s_resource_objects: async (ctx, envCtx) => {
|
|
34
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
35
|
-
return {
|
|
36
|
-
deployment: {
|
|
37
|
-
apiVersion: 'apps/v1',
|
|
38
|
-
kind: 'Deployment',
|
|
39
|
-
metadata: {
|
|
40
|
-
labels: {
|
|
41
|
-
'y.ntnl.io/version': (_a = ctx.version) !== null && _a !== void 0 ? _a : envCtx.version,
|
|
42
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
43
|
-
'y.ntnl.io/component': 'coinex',
|
|
44
|
-
},
|
|
45
|
-
name: `coinex-${ctx.key}`.replace(/\s/g, '').toLocaleLowerCase(),
|
|
46
|
-
namespace: 'yuan',
|
|
47
|
-
},
|
|
48
|
-
spec: {
|
|
49
|
-
replicas: 1,
|
|
50
|
-
selector: {
|
|
51
|
-
matchLabels: {
|
|
52
|
-
'y.ntnl.io/component': 'coinex',
|
|
53
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
template: {
|
|
57
|
-
metadata: {
|
|
58
|
-
labels: {
|
|
59
|
-
'y.ntnl.io/version': (_b = ctx.version) !== null && _b !== void 0 ? _b : envCtx.version,
|
|
60
|
-
'y.ntnl.io/manifest_key': ctx.key,
|
|
61
|
-
'y.ntnl.io/component': 'coinex',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
spec: {
|
|
65
|
-
containers: [
|
|
66
|
-
{
|
|
67
|
-
env: (0, extension_1.makeK8sEnvs)(ctx.env),
|
|
68
|
-
image: `ghcr.io/no-trade-no-life/vendor-coinex:${(_c = ctx.version) !== null && _c !== void 0 ? _c : envCtx.version}`,
|
|
69
|
-
imagePullPolicy: 'IfNotPresent',
|
|
70
|
-
name: 'coinex',
|
|
71
|
-
resources: {
|
|
72
|
-
limits: {
|
|
73
|
-
cpu: (_e = (_d = ctx.cpu) === null || _d === void 0 ? void 0 : _d.max) !== null && _e !== void 0 ? _e : '500m',
|
|
74
|
-
memory: (_g = (_f = ctx.memory) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : '256Mi',
|
|
75
|
-
},
|
|
76
|
-
requests: {
|
|
77
|
-
cpu: (_j = (_h = ctx.cpu) === null || _h === void 0 ? void 0 : _h.min) !== null && _j !== void 0 ? _j : '100m',
|
|
78
|
-
memory: (_l = (_k = ctx.memory) === null || _k === void 0 ? void 0 : _k.min) !== null && _l !== void 0 ? _l : '128Mi',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
hostname: 'coinex',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
//# 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,EAAE;wBACF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC5B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAC/B;iBACF;aACF;SACF,CAAC;QACF,wBAAwB,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;;YAC9C,OAAO;gBACL,CAAC,UAAU,GAAG,CAAC,GAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE;oBACpD,KAAK,EAAE,0CAA0C,MAAA,GAAG,CAAC,OAAO,mCAAI,MAAM,CAAC,OAAO,EAAE;oBAChF,OAAO,EAAE,QAAQ;oBAEjB,WAAW,EAAE,IAAA,0BAA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AAE,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,QAAQ;6BACnB;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 //\n HOST_URL: { type: 'string' },\n TERMINAL_ID: { type: 'string' },\n ACCESS_KEY: { type: 'string' },\n SECRET_KEY: { type: 'string' },\n PASSPHRASE: { type: 'string' },\n },\n },\n },\n }),\n make_docker_compose_file: async (ctx, envCtx) => {\n return {\n [`coinex-${ctx.env!.ACCESS_KEY}`.replace(/\\s/g, '')]: {\n image: `ghcr.io/no-trade-no-life/vendor-coinex:${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': 'coinex',\n },\n name: `coinex-${ctx.key}`.replace(/\\s/g, '').toLocaleLowerCase(),\n namespace: 'yuan',\n },\n spec: {\n replicas: 1,\n selector: {\n matchLabels: {\n 'y.ntnl.io/component': 'coinex',\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': 'coinex',\n },\n },\n spec: {\n containers: [\n {\n env: makeK8sEnvs(ctx.env),\n image: `ghcr.io/no-trade-no-life/vendor-coinex:${ctx.version ?? envCtx.version}`,\n imagePullPolicy: 'IfNotPresent',\n name: 'coinex',\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: 'coinex',\n },\n },\n },\n },\n };\n },\n });\n};\n"]}
|
package/temp/image-tag
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sha-70242012daf357ee57d901bd69223a320007c09f
|