@akashnetwork/chain-sdk 1.0.0-alpha.22 → 1.0.0-alpha.24
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/README.md +42 -4
- package/dist/cjs/index.shared.cjs +1 -0
- package/dist/cjs/index.shared.cjs.map +2 -2
- package/dist/cjs/sdl/SDL/SDL.cjs +12 -12
- package/dist/cjs/sdl/SDL/SDL.cjs.map +2 -2
- package/dist/cjs/sdl/SDL/SdlValidationError.cjs.map +2 -2
- package/dist/cjs/sdl/index.cjs +6 -1
- package/dist/cjs/sdl/index.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifest.cjs +241 -0
- package/dist/cjs/sdl/manifest/generateManifest.cjs.map +7 -0
- package/dist/cjs/sdl/manifest/generateManifestVersion.cjs +84 -0
- package/dist/cjs/sdl/manifest/generateManifestVersion.cjs.map +7 -0
- package/dist/cjs/sdl/manifest/manifestUtils.cjs +138 -0
- package/dist/cjs/sdl/manifest/manifestUtils.cjs.map +7 -0
- package/dist/cjs/sdl/types.cjs.map +1 -1
- package/dist/cjs/sdl/{SDL/utils.cjs.map → utils.cjs.map} +1 -1
- package/dist/cjs/sdl/{SDL/validateSDL → validateSDL}/validateSDL.cjs +20 -13
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +7 -0
- package/dist/cjs/sdl/{SDL/validateSDL → validateSDL}/validateSDLInput.cjs +3 -3
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +7 -0
- package/dist/cjs/utils/yaml.cjs +44 -0
- package/dist/cjs/utils/yaml.cjs.map +7 -0
- package/dist/esm/chunk-2XL6OX6E.js +1 -0
- package/dist/esm/chunk-2XL6OX6E.js.map +7 -0
- package/dist/esm/{chunk-K3L3J5XB.js → chunk-4D3QNKFB.js} +3 -3
- package/dist/esm/{chunk-DUCGLLTN.js → chunk-5DCYIWCG.js} +100 -100
- package/dist/esm/{chunk-DUCGLLTN.js.map → chunk-5DCYIWCG.js.map} +4 -4
- package/dist/esm/{chunk-BGBAJIKV.js → chunk-5YECXI3P.js} +2 -2
- package/dist/esm/{chunk-MEXNRJE4.js → chunk-BYQF33C6.js} +2 -2
- package/dist/esm/{chunk-R5DUC7IU.js → chunk-C7UQYVYH.js} +2 -2
- package/dist/esm/{chunk-726NIMPF.js → chunk-JISXXX24.js} +2 -2
- package/dist/esm/{chunk-6OEI5BYK.js → chunk-RIIYZIXM.js} +479 -65
- package/dist/esm/chunk-RIIYZIXM.js.map +7 -0
- package/dist/esm/{chunk-EYW7M3KV.js → chunk-SA4SEZ6F.js} +2 -2
- package/dist/esm/{chunk-ST2QQ72E.js → chunk-VRE72ZD5.js} +2 -2
- package/dist/esm/{chunk-A5CS5ZKQ.js → chunk-XFCN5LRY.js} +2 -2
- package/dist/esm/chunk-Z5KZUB7X.js +364 -0
- package/dist/esm/chunk-Z5KZUB7X.js.map +7 -0
- package/dist/esm/generated/protos/index.akash.v1.js +6 -6
- package/dist/esm/generated/protos/index.akash.v1beta4.js +14 -349
- package/dist/esm/generated/protos/index.akash.v1beta4.js.map +4 -4
- package/dist/esm/generated/protos/index.akash.v1beta5.js +5 -5
- package/dist/esm/generated/protos/index.provider.akash.v1.js +3 -3
- package/dist/esm/generated/protos/index.provider.akash.v2beta3.js +3 -2
- package/dist/esm/index.js +30 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.web.js +29 -3
- package/dist/esm/index.web.js.map +1 -1
- package/dist/esm/{query_akash-XTPHUGJZ.js → query_akash-4CTLBKZR.js} +4 -4
- package/dist/esm/{query_akash-IXSQT2VJ.js → query_akash-DJ7LTLRE.js} +5 -5
- package/dist/esm/{service_akash-YMJ4ZYYX.js → service_akash-AZFAYT7H.js} +4 -4
- package/dist/esm/{service_akash-2EBLHFIP.js → service_akash-VMU3LNBA.js} +4 -4
- package/dist/esm/{service_akash-AYYJKBHS.js → service_akash-WRGOVR7I.js} +4 -4
- package/dist/sdl-schema.yaml +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/index.shared.d.ts +1 -0
- package/dist/types/sdl/SDL/SDL.d.ts +2 -0
- package/dist/types/sdl/SDL/SdlValidationError.d.ts +3 -0
- package/dist/types/sdl/index.d.ts +5 -2
- package/dist/types/sdl/manifest/generateManifest.d.ts +18 -0
- package/dist/types/sdl/manifest/generateManifestVersion.d.ts +3 -0
- package/dist/types/sdl/manifest/manifestUtils.d.ts +27 -0
- package/dist/types/sdl/types.d.ts +53 -1
- package/dist/types/sdl/{SDL/validateSDL → validateSDL}/validateSDL.d.ts +2 -2
- package/dist/types/utils/yaml.d.ts +38 -0
- package/package.json +1 -1
- package/dist/cjs/sdl/SDL/validateSDL/validateSDL.cjs.map +0 -7
- package/dist/cjs/sdl/SDL/validateSDL/validateSDLInput.cjs.map +0 -7
- package/dist/esm/chunk-6OEI5BYK.js.map +0 -7
- /package/dist/cjs/sdl/{SDL/utils.cjs → utils.cjs} +0 -0
- /package/dist/esm/{chunk-K3L3J5XB.js.map → chunk-4D3QNKFB.js.map} +0 -0
- /package/dist/esm/{chunk-BGBAJIKV.js.map → chunk-5YECXI3P.js.map} +0 -0
- /package/dist/esm/{chunk-MEXNRJE4.js.map → chunk-BYQF33C6.js.map} +0 -0
- /package/dist/esm/{chunk-R5DUC7IU.js.map → chunk-C7UQYVYH.js.map} +0 -0
- /package/dist/esm/{chunk-726NIMPF.js.map → chunk-JISXXX24.js.map} +0 -0
- /package/dist/esm/{chunk-EYW7M3KV.js.map → chunk-SA4SEZ6F.js.map} +0 -0
- /package/dist/esm/{chunk-ST2QQ72E.js.map → chunk-VRE72ZD5.js.map} +0 -0
- /package/dist/esm/{chunk-A5CS5ZKQ.js.map → chunk-XFCN5LRY.js.map} +0 -0
- /package/dist/esm/{query_akash-XTPHUGJZ.js.map → query_akash-4CTLBKZR.js.map} +0 -0
- /package/dist/esm/{query_akash-IXSQT2VJ.js.map → query_akash-DJ7LTLRE.js.map} +0 -0
- /package/dist/esm/{service_akash-YMJ4ZYYX.js.map → service_akash-AZFAYT7H.js.map} +0 -0
- /package/dist/esm/{service_akash-2EBLHFIP.js.map → service_akash-VMU3LNBA.js.map} +0 -0
- /package/dist/esm/{service_akash-AYYJKBHS.js.map → service_akash-WRGOVR7I.js.map} +0 -0
- /package/dist/types/sdl/{SDL/utils.d.ts → utils.d.ts} +0 -0
- /package/dist/types/sdl/{SDL/validateSDL → validateSDL}/validateSDLInput.d.ts +0 -0
|
@@ -5,6 +5,8 @@ type NetworkVersion = "beta2" | "beta3";
|
|
|
5
5
|
* SDL (Stack Definition Language) parser and validator
|
|
6
6
|
* Handles parsing and validation of Akash deployment manifests
|
|
7
7
|
*
|
|
8
|
+
* @deprecated Use `generateManifest` instead.
|
|
9
|
+
*
|
|
8
10
|
* @example
|
|
9
11
|
* ```ts
|
|
10
12
|
* import { SDL } from './SDL';
|
|
@@ -23,8 +23,11 @@
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export { SDL } from "./SDL/SDL.ts";
|
|
26
|
-
export { validateSDL, validationSDLSchema } from "./
|
|
27
|
-
export type { SDLInput } from "./
|
|
26
|
+
export { validateSDL, validationSDLSchema } from "./validateSDL/validateSDL.ts";
|
|
27
|
+
export type { SDLInput } from "./validateSDL/validateSDLInput.ts";
|
|
28
28
|
export type { ValidationError } from "../utils/jsonSchemaValidation.ts";
|
|
29
29
|
export * from "./types.ts";
|
|
30
30
|
export { SdlValidationError } from "./SDL/SdlValidationError.ts";
|
|
31
|
+
export { generateManifest } from "./manifest/generateManifest.ts";
|
|
32
|
+
export type { Manifest, GenerateManifestResult } from "./manifest/generateManifest.ts";
|
|
33
|
+
export { generateManifestVersion, manifestToSortedJSON } from "./manifest/generateManifestVersion.ts";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GroupSpec } from "../../generated/protos/akash/deployment/v1beta4/groupspec.ts";
|
|
2
|
+
import { Group } from "../../generated/protos/akash/manifest/v2beta3/group.ts";
|
|
3
|
+
import type { NetworkId } from "../../network/types.ts";
|
|
4
|
+
import type { ValidationError } from "../../utils/jsonSchemaValidation.ts";
|
|
5
|
+
import type { SDLInput } from "../validateSDL/validateSDL.ts";
|
|
6
|
+
export interface BuildResult {
|
|
7
|
+
groups: Group[];
|
|
8
|
+
groupSpecs: GroupSpec[];
|
|
9
|
+
}
|
|
10
|
+
export type Manifest = BuildResult["groups"];
|
|
11
|
+
export type GenerateManifestResult = {
|
|
12
|
+
ok?: false;
|
|
13
|
+
value: ValidationError[];
|
|
14
|
+
} | {
|
|
15
|
+
ok: true;
|
|
16
|
+
value: BuildResult;
|
|
17
|
+
};
|
|
18
|
+
export declare function generateManifest(sdl: SDLInput, networkId?: NetworkId): GenerateManifestResult;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Attribute } from "../../generated/protos/index.akash.v1.ts";
|
|
2
|
+
import { Endpoint } from "../../generated/protos/index.akash.v1beta4.ts";
|
|
3
|
+
import { ServiceExposeHTTPOptions } from "../../generated/protos/index.provider.akash.v2beta3.ts";
|
|
4
|
+
import type { SDLInput } from "../validateSDL/validateSDL.ts";
|
|
5
|
+
import type { StorageAttributesValidation } from "../validateSDL/validateSDLInput.ts";
|
|
6
|
+
type SDLService = SDLInput["services"][string];
|
|
7
|
+
type SDLExpose = NonNullable<SDLService["expose"]>[number];
|
|
8
|
+
type SDLExposeTo = NonNullable<SDLExpose["to"]>[number];
|
|
9
|
+
type SDLHttpOptions = SDLExpose["http_options"];
|
|
10
|
+
type SDLCompute = SDLInput["profiles"]["compute"][string];
|
|
11
|
+
type SDLStorage = SDLCompute["resources"]["storage"];
|
|
12
|
+
type SDLStorageVolume = SDLStorage extends (infer T)[] ? T : SDLStorage;
|
|
13
|
+
type SDLGpuAttributes = NonNullable<NonNullable<SDLCompute["resources"]["gpu"]>["attributes"]>;
|
|
14
|
+
export type { SDLCompute, SDLExpose, SDLExposeTo, SDLGpuAttributes, SDLHttpOptions, SDLService, SDLStorage, SDLStorageVolume };
|
|
15
|
+
export declare function encodeResourceValue(value: number): Uint8Array;
|
|
16
|
+
export declare function computeEndpointSequenceNumbers(services: SDLInput["services"]): Record<string, number>;
|
|
17
|
+
export declare function isIngress(proto: string, global: boolean, externalPort: number, port: number): boolean;
|
|
18
|
+
export declare function transformGpuAttributes(attributes: SDLGpuAttributes): Attribute[];
|
|
19
|
+
export declare function buildHttpOptions(httpOptions?: SDLHttpOptions): ServiceExposeHTTPOptions;
|
|
20
|
+
export declare function buildStorageAttributes(attributes?: StorageAttributesValidation): Attribute[];
|
|
21
|
+
export declare function parseServiceProto(proto?: string): string;
|
|
22
|
+
export declare function buildServiceEndpoints(service: SDLService, endpointSequenceNumbers: Record<string, number>): Endpoint[];
|
|
23
|
+
export declare function parseCpuUnits(cpu: SDLCompute["resources"]["cpu"]): number;
|
|
24
|
+
export declare function parseMemoryBytes(memory: SDLCompute["resources"]["memory"]): number;
|
|
25
|
+
export declare function parseStorageBytes(size: string): number;
|
|
26
|
+
export declare function parseGpuUnits(gpu?: SDLCompute["resources"]["gpu"]): number;
|
|
27
|
+
export declare function buildResourceAttributes(attributes?: Record<string, unknown>): Attribute[] | undefined;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated will be removed in favor of `Manifest` type
|
|
3
|
+
*/
|
|
1
4
|
export type v2Manifest = v2Group[];
|
|
5
|
+
/** @deprecated Use `Manifest` type instead. */
|
|
2
6
|
export type v3Manifest = v3Group[];
|
|
7
|
+
/** @deprecated Use `Manifest` type instead. */
|
|
3
8
|
export type v3Group = {
|
|
4
9
|
name: string;
|
|
5
10
|
services: v3ManifestService[];
|
|
6
11
|
};
|
|
12
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
7
13
|
export type v2Group = {
|
|
8
14
|
Name: string;
|
|
9
15
|
Services: v2ManifestService[];
|
|
10
16
|
};
|
|
17
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
11
18
|
export type v2ManifestService = {
|
|
12
19
|
Name: string;
|
|
13
20
|
Image: string;
|
|
@@ -19,6 +26,7 @@ export type v2ManifestService = {
|
|
|
19
26
|
Expose: v2ServiceExpose[];
|
|
20
27
|
params?: v2ManifestServiceParams;
|
|
21
28
|
};
|
|
29
|
+
/** @deprecated Use `Manifest` type instead. */
|
|
22
30
|
export type v3ManifestService = {
|
|
23
31
|
name: string;
|
|
24
32
|
image: string;
|
|
@@ -31,6 +39,7 @@ export type v3ManifestService = {
|
|
|
31
39
|
params?: v3ManifestServiceParams | null;
|
|
32
40
|
credentials: v2ServiceImageCredentials | null;
|
|
33
41
|
};
|
|
42
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
34
43
|
export type v2ServiceExposeHttpOptions = {
|
|
35
44
|
MaxBodySize: number;
|
|
36
45
|
ReadTimeout: number;
|
|
@@ -39,6 +48,7 @@ export type v2ServiceExposeHttpOptions = {
|
|
|
39
48
|
NextTimeout: number;
|
|
40
49
|
NextCases: string[];
|
|
41
50
|
};
|
|
51
|
+
/** @deprecated Use `Manifest[number]['services'][number]['expose'][number]['httpOptions']` type instead. */
|
|
42
52
|
export type v3ServiceExposeHttpOptions = {
|
|
43
53
|
maxBodySize: number;
|
|
44
54
|
readTimeout: number;
|
|
@@ -47,7 +57,9 @@ export type v3ServiceExposeHttpOptions = {
|
|
|
47
57
|
nextTimeout: number;
|
|
48
58
|
nextCases: string[];
|
|
49
59
|
};
|
|
60
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
50
61
|
export type ResourceUnits = Record<string, any>;
|
|
62
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
51
63
|
export type v2ServiceExpose = {
|
|
52
64
|
Port: number;
|
|
53
65
|
ExternalPort: number;
|
|
@@ -59,6 +71,7 @@ export type v2ServiceExpose = {
|
|
|
59
71
|
IP: string;
|
|
60
72
|
EndpointSequenceNumber: number;
|
|
61
73
|
};
|
|
74
|
+
/** @deprecated Use `Manifest[number]['services'][number]['expose'][number]` type instead. */
|
|
62
75
|
export type v3ServiceExpose = {
|
|
63
76
|
port: number;
|
|
64
77
|
externalPort: number;
|
|
@@ -71,38 +84,46 @@ export type v3ServiceExpose = {
|
|
|
71
84
|
endpointSequenceNumber: number;
|
|
72
85
|
};
|
|
73
86
|
type v2ServicePermissionsScope = "deployment" | "logs";
|
|
87
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
74
88
|
export type v2ServicePermissions = {
|
|
75
89
|
read?: v2ServicePermissionsScope[];
|
|
76
90
|
};
|
|
91
|
+
/** @deprecated will be removed in favor of `Manifest` type. */
|
|
77
92
|
export type v2ManifestServiceParams = {
|
|
78
93
|
Storage: v2ServiceStorageParams[];
|
|
79
94
|
Permissions?: v2ServicePermissions;
|
|
80
95
|
};
|
|
96
|
+
/** @deprecated Use `Manifest[number]['services'][number]['params']` type instead. */
|
|
81
97
|
export type v3ManifestServiceParams = {
|
|
82
|
-
storage: v2ServiceStorageParams[];
|
|
98
|
+
storage: v2ServiceStorageParams[] | null;
|
|
83
99
|
permissions?: v2ServicePermissions;
|
|
84
100
|
};
|
|
101
|
+
/** @deprecated will be removed in favor of `Manifest` type */
|
|
85
102
|
export type v2Sdl = {
|
|
86
103
|
services: Record<string, v2Service>;
|
|
87
104
|
profiles: v2Profiles;
|
|
88
105
|
deployment: Record<string, v2Deployment>;
|
|
89
106
|
endpoints: Record<string, v2Endpoint>;
|
|
90
107
|
};
|
|
108
|
+
/** @deprecated Use `SDLInput` type instead. */
|
|
91
109
|
export type v3Sdl = {
|
|
92
110
|
services: Record<string, v2Service>;
|
|
93
111
|
profiles: v3Profiles;
|
|
94
112
|
deployment: Record<string, v2Deployment>;
|
|
95
113
|
endpoints: Record<string, v2Endpoint>;
|
|
96
114
|
};
|
|
115
|
+
/** @deprecated will be removed. */
|
|
97
116
|
export type v2Endpoint = {
|
|
98
117
|
kind: string;
|
|
99
118
|
};
|
|
119
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
100
120
|
export type v2ExposeTo = {
|
|
101
121
|
service?: string;
|
|
102
122
|
global?: boolean;
|
|
103
123
|
http_options: v2HTTPOptions;
|
|
104
124
|
ip: string;
|
|
105
125
|
};
|
|
126
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
106
127
|
export type v2HTTPOptions = {
|
|
107
128
|
max_body_size: number;
|
|
108
129
|
read_timeout: number;
|
|
@@ -111,9 +132,11 @@ export type v2HTTPOptions = {
|
|
|
111
132
|
next_timeout: number;
|
|
112
133
|
next_cases: string[];
|
|
113
134
|
};
|
|
135
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
114
136
|
export type v2Accept = {
|
|
115
137
|
items?: string[];
|
|
116
138
|
};
|
|
139
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
117
140
|
export type v2Expose = {
|
|
118
141
|
port: number;
|
|
119
142
|
as: number;
|
|
@@ -122,24 +145,29 @@ export type v2Expose = {
|
|
|
122
145
|
accept: v2Accept;
|
|
123
146
|
http_options: v2HTTPOptions;
|
|
124
147
|
};
|
|
148
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
125
149
|
export type v2Dependency = {
|
|
126
150
|
service: string;
|
|
127
151
|
};
|
|
152
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
128
153
|
export type v2ServiceStorageParams = {
|
|
129
154
|
name: string;
|
|
130
155
|
mount: string;
|
|
131
156
|
readOnly: boolean;
|
|
132
157
|
};
|
|
158
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
133
159
|
export type v2ServiceParams = {
|
|
134
160
|
storage?: Record<string, v2ServiceStorageParams>;
|
|
135
161
|
permissions?: v2ServicePermissions;
|
|
136
162
|
};
|
|
163
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
137
164
|
export type v2ServiceImageCredentials = {
|
|
138
165
|
host: string;
|
|
139
166
|
email?: string;
|
|
140
167
|
username: string;
|
|
141
168
|
password: string;
|
|
142
169
|
};
|
|
170
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
143
171
|
export type v2Service = {
|
|
144
172
|
image: string;
|
|
145
173
|
command: string[] | null;
|
|
@@ -150,20 +178,26 @@ export type v2Service = {
|
|
|
150
178
|
params?: v2ServiceParams;
|
|
151
179
|
credentials?: v2ServiceImageCredentials;
|
|
152
180
|
};
|
|
181
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
153
182
|
export type v2ServiceDeployment = {
|
|
154
183
|
profile: string;
|
|
155
184
|
count: number;
|
|
156
185
|
};
|
|
186
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
157
187
|
export type v2Deployment = Record<string, v2ServiceDeployment>;
|
|
188
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
158
189
|
export type v2CPUAttributes = Record<string, any>;
|
|
190
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
159
191
|
export type v2ResourceCPU = {
|
|
160
192
|
units: number | string;
|
|
161
193
|
attributes?: v2CPUAttributes;
|
|
162
194
|
};
|
|
195
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
163
196
|
export type v2ResourceMemory = {
|
|
164
197
|
size: string;
|
|
165
198
|
attributes?: Record<string, any>;
|
|
166
199
|
};
|
|
200
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
167
201
|
export type v3GPUAttributes = {
|
|
168
202
|
vendor: {
|
|
169
203
|
[vendor: string]: Array<{
|
|
@@ -173,22 +207,28 @@ export type v3GPUAttributes = {
|
|
|
173
207
|
}>;
|
|
174
208
|
};
|
|
175
209
|
};
|
|
210
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
176
211
|
export type v3ResourceGPU = {
|
|
177
212
|
units: number | string;
|
|
178
213
|
attributes?: v3GPUAttributes;
|
|
179
214
|
};
|
|
215
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
180
216
|
export type v2StorageAttributes = Record<string, any>;
|
|
217
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
181
218
|
export type v2ResourceStorage = {
|
|
182
219
|
name: string;
|
|
183
220
|
size: string;
|
|
184
221
|
attributes: v2StorageAttributes;
|
|
185
222
|
};
|
|
223
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
186
224
|
export type v2ResourceStorageArray = v2ResourceStorage[];
|
|
225
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
187
226
|
export type v2ComputeResources = {
|
|
188
227
|
cpu: v2ResourceCPU;
|
|
189
228
|
memory: v2ResourceMemory;
|
|
190
229
|
storage: v2ResourceStorageArray | v2ResourceStorage;
|
|
191
230
|
};
|
|
231
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
192
232
|
export type v3ComputeResources = {
|
|
193
233
|
cpu: v2ResourceCPU;
|
|
194
234
|
memory: v2ResourceMemory;
|
|
@@ -196,40 +236,51 @@ export type v3ComputeResources = {
|
|
|
196
236
|
gpu: v3ResourceGPU;
|
|
197
237
|
id: number;
|
|
198
238
|
};
|
|
239
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
199
240
|
export type v2ProfileCompute = {
|
|
200
241
|
resources: v2ComputeResources;
|
|
201
242
|
};
|
|
243
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
202
244
|
export type v3ProfileCompute = {
|
|
203
245
|
resources: v3ComputeResources;
|
|
204
246
|
};
|
|
247
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
205
248
|
export type v2PlacementAttributes = Attributes;
|
|
249
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
206
250
|
export type v2Coin = {
|
|
207
251
|
denom: string;
|
|
208
252
|
value: number;
|
|
209
253
|
amount: number;
|
|
210
254
|
};
|
|
255
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
211
256
|
export type v2PlacementPricing = Record<string, v2Coin>;
|
|
257
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
212
258
|
export type SignedBy = {
|
|
213
259
|
allOf: string[];
|
|
214
260
|
anyOf: string[];
|
|
215
261
|
};
|
|
262
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
216
263
|
export type v2ProfilePlacement = {
|
|
217
264
|
attributes: v2PlacementAttributes;
|
|
218
265
|
signedBy: SignedBy;
|
|
219
266
|
pricing: v2PlacementPricing;
|
|
220
267
|
};
|
|
268
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
221
269
|
export type v2Profiles = {
|
|
222
270
|
compute: Record<string, v2ProfileCompute>;
|
|
223
271
|
placement: Record<string, v2ProfilePlacement>;
|
|
224
272
|
};
|
|
273
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
225
274
|
export type v3Profiles = {
|
|
226
275
|
compute: Record<string, v3ProfileCompute>;
|
|
227
276
|
placement: Record<string, v2ProfilePlacement>;
|
|
228
277
|
};
|
|
278
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
229
279
|
export type Attribute = {
|
|
230
280
|
key: string;
|
|
231
281
|
value: string;
|
|
232
282
|
};
|
|
283
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
233
284
|
export type v3DeploymentGroup = {
|
|
234
285
|
name: string;
|
|
235
286
|
resources: Array<{
|
|
@@ -249,5 +300,6 @@ export type v3DeploymentGroup = {
|
|
|
249
300
|
};
|
|
250
301
|
};
|
|
251
302
|
};
|
|
303
|
+
/** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
|
|
252
304
|
export type Attributes = Attribute[];
|
|
253
305
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type NetworkId } from "
|
|
2
|
-
import type { ValidationError } from "
|
|
1
|
+
import { type NetworkId } from "../../network/index.ts";
|
|
2
|
+
import type { ValidationError } from "../../utils/jsonSchemaValidation.ts";
|
|
3
3
|
import { schema as validationSDLSchema, type SDLInput } from "./validateSDLInput.ts";
|
|
4
4
|
export type { SDLInput };
|
|
5
5
|
export { validationSDLSchema };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* ```ts
|
|
4
|
+
* const version = "2.1";
|
|
5
|
+
* const expose = [{ port: 80, as: 80, to: [{ global: true }] }];
|
|
6
|
+
* const pricing = { web: { denom: "uakt", amount: 1000 } };
|
|
7
|
+
*
|
|
8
|
+
* const sdl: SDLInput = yaml`
|
|
9
|
+
* version: ${version}
|
|
10
|
+
* services:
|
|
11
|
+
* web:
|
|
12
|
+
* image: nginx
|
|
13
|
+
* expose: ${expose}
|
|
14
|
+
* profiles:
|
|
15
|
+
* compute:
|
|
16
|
+
* web:
|
|
17
|
+
* resources:
|
|
18
|
+
* cpu:
|
|
19
|
+
* units: 0.5
|
|
20
|
+
* memory:
|
|
21
|
+
* size: 512Mi
|
|
22
|
+
* storage:
|
|
23
|
+
* size: 1Gi
|
|
24
|
+
* placement:
|
|
25
|
+
* dcloud:
|
|
26
|
+
* pricing: ${pricing}
|
|
27
|
+
* deployment:
|
|
28
|
+
* web:
|
|
29
|
+
* dcloud:
|
|
30
|
+
* profile: web
|
|
31
|
+
* count: 1
|
|
32
|
+
* `;
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function yaml<T>(chunks: TemplateStringsArray, ...args: unknown[]): T;
|
|
36
|
+
export declare namespace yaml {
|
|
37
|
+
var template: <T>(template: string, vars?: Record<string, unknown>) => T;
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/sdl/SDL/validateSDL/validateSDL.ts"],
|
|
4
|
-
"sourcesContent": ["import { AKT_DENOM, type NetworkId, USDC_IBC_DENOMS } from \"../../../network/index.ts\";\nimport type { ErrorMessages, ValidationError, ValidationFunction } from \"../../../utils/jsonSchemaValidation.ts\";\nimport { dirname, getErrorLocation, humanizeErrors } from \"../../../utils/jsonSchemaValidation.ts\";\nimport { castArray, stringToBoolean } from \"../utils.ts\";\nimport { schema as validationSDLSchema, type SDLInput, validate as validateSDLInput } from \"./validateSDLInput.ts\";\n\nexport type { SDLInput };\nexport { validationSDLSchema };\n\nconst ERROR_MESSAGES: ErrorMessages = {\n \"#/definitions/storageAttributesValidation\"(error) {\n return `\"ram\" storage${getErrorLocation(dirname(error.instancePath))} cannot be persistent`;\n },\n \"#/definitions/exposeToWithIpEnforcesGlobal/then/properties/global/const\"() {\n return `If an IP is declared, the directive must be declared as global.`;\n },\n};\n\nexport function validateSDL(sdl: SDLInput, networkId: NetworkId): undefined | ValidationError[] {\n validateSDLInput(sdl);\n const schemaErrors = humanizeErrors((validateSDLInput as ValidationFunction).errors, validationSDLSchema, ERROR_MESSAGES);\n if (schemaErrors.length) return schemaErrors;\n\n const validator = new SDLValidator(sdl);\n const errors = validator.validate(networkId);\n\n const allErrors = schemaErrors.concat(errors);\n return allErrors.length ? allErrors : undefined;\n}\n\nclass SDLValidator {\n readonly #endpointsUsed = new Set<string>();\n readonly #portsUsed = new Map<string, string>();\n readonly #sdl: SDLInput;\n readonly #errors: ValidationError[] = [];\n\n constructor(sdl: SDLInput) {\n this.#sdl = sdl;\n }\n\n validate(networkId: NetworkId) {\n if (this.#sdl.services) {\n Object.keys(this.#sdl.services).forEach((serviceName) => {\n this.#validateDeploymentWithRelations(serviceName);\n this.#validateLeaseIP(serviceName);\n });\n }\n\n this.#validateDenom(networkId);\n this.#validateEndpoints();\n return this.#errors;\n }\n\n #validateDenom(networkId: NetworkId) {\n if (!this.#sdl.profiles?.placement) return;\n\n const usdcDenom = USDC_IBC_DENOMS[networkId];\n const denoms = Object.entries(this.#sdl.profiles.placement).map(([placementName, placement]) => {\n if (!placement.pricing) return [];\n return Object.entries(placement.pricing).map(([profile, pricing]) => ({\n path: `/profiles/placement/${placementName}/pricing/${profile}/denom`,\n denom: pricing.denom,\n }));\n }).flat();\n const invalidDenom = denoms.find(({ denom }) => denom !== AKT_DENOM && denom !== usdcDenom);\n if (invalidDenom) {\n this.#errors.push({\n message: `Invalid denom: \"${invalidDenom.denom}\" at path \"${invalidDenom.path}\". Only \"uakt\" and \"${usdcDenom}\" are supported.`,\n instancePath: invalidDenom.path,\n schemaPath: \"#/definitions/priceCoin/properties/denom\",\n keyword: \"pattern\",\n params: {\n pattern: \"^(uakt|ibc/.*)$\",\n },\n });\n }\n }\n\n #validateDeploymentWithRelations(serviceName: string) {\n const deployment = this.#sdl.deployment[serviceName];\n if (!deployment) {\n this.#errors.push({\n message: `Service \"${serviceName}\" is not defined at \"/deployment\" section.`,\n instancePath: `/deployment`,\n schemaPath: \"#/properties/deployment\",\n keyword: \"required\",\n params: {\n missingProperty: serviceName,\n },\n });\n return;\n }\n\n Object.keys(this.#sdl.deployment[serviceName]).forEach((deploymentName) => {\n this.#validateDeploymentRelations(serviceName, deploymentName);\n this.#validateServiceStorages(serviceName, deploymentName);\n this.#validateStorages(serviceName, deploymentName);\n this.#validateGPU(serviceName, deploymentName);\n });\n }\n\n #validateDeploymentRelations(serviceName: string, deploymentName: string) {\n const serviceDeployment = this.#sdl.deployment?.[serviceName]?.[deploymentName];\n const compute = this.#sdl.profiles?.compute?.[serviceDeployment?.profile];\n const infra = this.#sdl.profiles?.placement?.[deploymentName];\n\n if (!infra) {\n this.#errors.push({\n message: `The placement \"${deploymentName}\" is not defined in the \"placement\" section.`,\n instancePath: `/profiles/placement`,\n schemaPath: \"#/properties/profiles/properties/placement\",\n keyword: \"required\",\n params: {\n missingProperty: deploymentName,\n },\n });\n }\n\n if (infra && !infra.pricing?.[serviceDeployment?.profile]) {\n this.#errors.push({\n message: `The pricing for the \"${serviceDeployment?.profile}\" profile is not defined in the \"${deploymentName}\" placement.`,\n instancePath: `/profiles/placement/${deploymentName}/pricing`,\n schemaPath: \"#/properties/profiles/properties/placement/additionalProperties/properties/pricing\",\n keyword: \"required\",\n params: {\n missingProperty: serviceDeployment?.profile,\n },\n });\n }\n\n if (!compute) {\n this.#errors.push({\n message: `The compute requirements for the \"${serviceDeployment?.profile}\" profile are not defined in the \"compute\" section.`,\n instancePath: `/profiles/compute`,\n schemaPath: \"#/properties/profiles/properties/compute\",\n keyword: \"required\",\n params: {\n missingProperty: serviceDeployment?.profile,\n },\n });\n }\n }\n\n #validateServiceStorages(serviceName: string, deploymentName: string) {\n const service = this.#sdl.services?.[serviceName];\n const mounts: Record<string, string> = {};\n const serviceDeployment = this.#sdl.deployment[serviceName][deploymentName];\n const compute = this.#sdl.profiles?.compute?.[serviceDeployment.profile];\n const storages = castArray(compute?.resources.storage);\n\n if (!service?.params?.storage) {\n return;\n }\n\n Object.entries(service.params.storage).forEach(([storageName, storage]) => {\n if (!storage) {\n this.#errors.push({\n message: `Storage \"${storageName}\" is not configured.`,\n instancePath: `/services/${serviceName}/params/storage/${storageName}`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage/additionalProperties\",\n keyword: \"required\",\n params: {\n missingProperty: storageName,\n },\n });\n return;\n }\n const storageNameExists = storages.some(({ name }) => name === storageName);\n if (!storageNameExists) {\n this.#errors.push({\n message: `Service \"${serviceName}\" references non-existing compute volume \"${storageName}\".`,\n instancePath: `/profiles/compute/${serviceDeployment.profile}/resources/storage`,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/storage\",\n keyword: \"required\",\n params: {\n missingProperty: storageName,\n },\n });\n return;\n }\n\n const mount = String(storage.mount);\n const volumeName = mounts[mount];\n\n if (volumeName && !storage.mount) {\n this.#errors.push({\n message: \"Multiple root ephemeral storages are not allowed.\",\n instancePath: `/services/${serviceName}/params/storage/${storageName}`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage\",\n keyword: \"uniqueItems\",\n params: {\n duplicate: volumeName,\n },\n });\n }\n if (volumeName && storage.mount) {\n this.#errors.push({\n message: `Mount \"${mount}\" already in use by volume \"${volumeName}\".`,\n instancePath: `/services/${serviceName}/params/storage/${storageName}/mount`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage/additionalProperties/properties/mount\",\n keyword: \"uniqueItems\",\n params: {\n duplicate: mount,\n },\n });\n }\n\n mounts[mount] = storageName;\n });\n }\n\n #validateStorages(serviceName: string, deploymentName: string) {\n const service = this.#sdl.services?.[serviceName];\n const serviceDeployment = this.#sdl.deployment[serviceName][deploymentName];\n const compute = this.#sdl.profiles?.compute?.[serviceDeployment.profile];\n const storages = castArray(compute?.resources.storage);\n\n storages.forEach((storage) => {\n const persistent = stringToBoolean(storage.attributes?.persistent as string | boolean || false);\n\n if (persistent && !service?.params?.storage?.[storage.name || \"\"]?.mount) {\n this.#errors.push({\n message: `Persistent storage \"${storage.name || \"default\"}\" requires a mount path in /services/${serviceName}/params/storage/${storage.name || \"default\"}/mount.`,\n instancePath: `/services/${serviceName}/params/storage/${storage.name || \"default\"}`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage/additionalProperties/properties/mount\",\n keyword: \"required\",\n params: {\n missingProperty: \"mount\",\n },\n });\n }\n });\n }\n\n #validateGPU(serviceName: string, deploymentName: string) {\n const deployment = this.#sdl.deployment[serviceName];\n const compute = this.#sdl.profiles?.compute?.[deployment[deploymentName]?.profile];\n const gpu = compute?.resources.gpu;\n if (!gpu) return;\n\n const hasUnits = gpu.units !== undefined && gpu.units !== 0;\n const hasAttributes = typeof gpu.attributes !== \"undefined\";\n const hasVendor = hasAttributes && typeof gpu.attributes?.vendor !== \"undefined\";\n\n const profile = deployment[deploymentName]?.profile;\n const gpuPath = `/profiles/compute/${profile}/resources/gpu`;\n\n if (!hasUnits && hasAttributes) {\n this.#errors.push({\n message: \"GPU must not have attributes if units is 0.\",\n instancePath: `${gpuPath}/attributes`,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu/properties/attributes\",\n keyword: \"additionalProperties\",\n params: {\n additionalProperty: \"attributes\",\n },\n });\n }\n if (hasUnits && !hasAttributes) {\n this.#errors.push({\n message: \"GPU must have attributes if units is not 0.\",\n instancePath: gpuPath,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu\",\n keyword: \"required\",\n params: {\n missingProperty: \"attributes\",\n },\n });\n }\n if (hasUnits && !hasVendor) {\n this.#errors.push({\n message: \"GPU must specify a vendor if units is not 0.\",\n instancePath: `${gpuPath}/attributes`,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu/properties/attributes/properties/vendor\",\n keyword: \"required\",\n params: {\n missingProperty: \"vendor\",\n },\n });\n }\n }\n\n #validateLeaseIP(serviceName: string) {\n this.#sdl.services?.[serviceName]?.expose?.forEach((expose, exposeIndex) => {\n const proto = expose.proto?.toUpperCase() || \"TCP\";\n\n expose.to?.forEach((to, toIndex) => {\n if (to.ip?.length) {\n const toPath = `/services/${serviceName}/expose/${exposeIndex}/to/${toIndex}`;\n\n if (!to.global) {\n this.#errors.push({\n message: `If an IP is declared, the directive must be declared as global.`,\n instancePath: `${toPath}/global`,\n schemaPath: \"#/definitions/exposeToWithIpEnforcesGlobal/then/properties/global/const\",\n keyword: \"const\",\n params: {\n allowedValue: true,\n },\n });\n }\n if (!this.#sdl.endpoints?.[to.ip]) {\n this.#errors.push({\n message: `Unknown endpoint \"${to.ip}\" for service \"${serviceName}\". Add it to the \"endpoints\" section.`,\n instancePath: `/endpoints/${to.ip}`,\n schemaPath: \"#/properties/endpoints\",\n keyword: \"required\",\n params: {\n missingProperty: to.ip,\n },\n });\n }\n\n this.#endpointsUsed.add(to.ip);\n\n const externalPort = expose.as ?? expose.port;\n const portKey = `${to.ip}-${externalPort}-${proto}`;\n const otherServiceName = this.#portsUsed.get(portKey);\n\n if (this.#portsUsed.has(portKey)) {\n this.#errors.push({\n message: `IP endpoint \"${to.ip}\" port ${externalPort} protocol ${proto} already in use by service \"${otherServiceName}\".`,\n instancePath: `${toPath}/ip`,\n schemaPath: \"#/properties/services/additionalProperties/properties/expose/items/properties/to/items\",\n keyword: \"uniqueItems\",\n params: {\n duplicate: portKey,\n },\n });\n }\n this.#portsUsed.set(portKey, serviceName);\n }\n });\n });\n }\n\n #validateEndpoints() {\n if (!this.#sdl.endpoints) return;\n\n Object.keys(this.#sdl.endpoints).forEach((endpoint) => {\n if (!this.#endpointsUsed.has(endpoint)) {\n this.#errors.push({\n message: `Endpoint \"${endpoint}\" declared but never used.`,\n instancePath: `/endpoints/${endpoint}`,\n schemaPath: \"#/properties/endpoints\",\n keyword: \"additionalProperties\",\n params: {\n additionalProperty: endpoint,\n },\n });\n }\n });\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qDAAAA;AAAA;AAAA;AAAA,qBAA2D;AAE3D,kCAA0D;AAC1D,mBAA2C;AAC3C,8BAA2F;AAJ3F;AASA,MAAM,iBAAgC;AAAA,EACpC,4CAA4C,OAAO;AACjD,WAAO,oBAAgB,kDAAiB,qCAAQ,MAAM,YAAY,CAAC,CAAC;AAAA,EACtE;AAAA,EACA,4EAA4E;AAC1E,WAAO;AAAA,EACT;AACF;AAEO,SAAS,YAAY,KAAe,WAAqD;AAC9F,8BAAAC,UAAiB,GAAG;AACpB,QAAM,mBAAe,4CAAgB,wBAAAA,SAAwC,QAAQ,wBAAAC,QAAqB,cAAc;AACxH,MAAI,aAAa,OAAQ,QAAO;AAEhC,QAAM,YAAY,IAAI,aAAa,GAAG;AACtC,QAAM,SAAS,UAAU,SAAS,SAAS;AAE3C,QAAM,YAAY,aAAa,OAAO,MAAM;AAC5C,SAAO,UAAU,SAAS,YAAY;AACxC;AAEA,M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