@kadi.build/deploy-ability 0.0.1
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 +523 -0
- package/dist/constants.d.ts +82 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +82 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors/certificate-error.d.ts +95 -0
- package/dist/errors/certificate-error.d.ts.map +1 -0
- package/dist/errors/certificate-error.js +111 -0
- package/dist/errors/certificate-error.js.map +1 -0
- package/dist/errors/deployment-error.d.ts +122 -0
- package/dist/errors/deployment-error.d.ts.map +1 -0
- package/dist/errors/deployment-error.js +185 -0
- package/dist/errors/deployment-error.js.map +1 -0
- package/dist/errors/index.d.ts +13 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +18 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/profile-error.d.ts +106 -0
- package/dist/errors/profile-error.d.ts.map +1 -0
- package/dist/errors/profile-error.js +127 -0
- package/dist/errors/profile-error.js.map +1 -0
- package/dist/errors/provider-error.d.ts +104 -0
- package/dist/errors/provider-error.d.ts.map +1 -0
- package/dist/errors/provider-error.js +120 -0
- package/dist/errors/provider-error.js.map +1 -0
- package/dist/errors/wallet-error.d.ts +131 -0
- package/dist/errors/wallet-error.d.ts.map +1 -0
- package/dist/errors/wallet-error.js +154 -0
- package/dist/errors/wallet-error.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/targets/akash/bid-selectors.d.ts +251 -0
- package/dist/targets/akash/bid-selectors.d.ts.map +1 -0
- package/dist/targets/akash/bid-selectors.js +322 -0
- package/dist/targets/akash/bid-selectors.js.map +1 -0
- package/dist/targets/akash/bid-types.d.ts +297 -0
- package/dist/targets/akash/bid-types.d.ts.map +1 -0
- package/dist/targets/akash/bid-types.js +89 -0
- package/dist/targets/akash/bid-types.js.map +1 -0
- package/dist/targets/akash/blockchain-client.d.ts +577 -0
- package/dist/targets/akash/blockchain-client.d.ts.map +1 -0
- package/dist/targets/akash/blockchain-client.js +803 -0
- package/dist/targets/akash/blockchain-client.js.map +1 -0
- package/dist/targets/akash/certificate-manager.d.ts +228 -0
- package/dist/targets/akash/certificate-manager.d.ts.map +1 -0
- package/dist/targets/akash/certificate-manager.js +395 -0
- package/dist/targets/akash/certificate-manager.js.map +1 -0
- package/dist/targets/akash/constants.d.ts +231 -0
- package/dist/targets/akash/constants.d.ts.map +1 -0
- package/dist/targets/akash/constants.js +225 -0
- package/dist/targets/akash/constants.js.map +1 -0
- package/dist/targets/akash/deployer.d.ts +136 -0
- package/dist/targets/akash/deployer.d.ts.map +1 -0
- package/dist/targets/akash/deployer.js +599 -0
- package/dist/targets/akash/deployer.js.map +1 -0
- package/dist/targets/akash/environment.d.ts +241 -0
- package/dist/targets/akash/environment.d.ts.map +1 -0
- package/dist/targets/akash/environment.js +245 -0
- package/dist/targets/akash/environment.js.map +1 -0
- package/dist/targets/akash/index.d.ts +1113 -0
- package/dist/targets/akash/index.d.ts.map +1 -0
- package/dist/targets/akash/index.js +909 -0
- package/dist/targets/akash/index.js.map +1 -0
- package/dist/targets/akash/lease-monitor.d.ts +51 -0
- package/dist/targets/akash/lease-monitor.d.ts.map +1 -0
- package/dist/targets/akash/lease-monitor.js +110 -0
- package/dist/targets/akash/lease-monitor.js.map +1 -0
- package/dist/targets/akash/logs.d.ts +71 -0
- package/dist/targets/akash/logs.d.ts.map +1 -0
- package/dist/targets/akash/logs.js +311 -0
- package/dist/targets/akash/logs.js.map +1 -0
- package/dist/targets/akash/logs.types.d.ts +102 -0
- package/dist/targets/akash/logs.types.d.ts.map +1 -0
- package/dist/targets/akash/logs.types.js +9 -0
- package/dist/targets/akash/logs.types.js.map +1 -0
- package/dist/targets/akash/pricing.d.ts +247 -0
- package/dist/targets/akash/pricing.d.ts.map +1 -0
- package/dist/targets/akash/pricing.js +246 -0
- package/dist/targets/akash/pricing.js.map +1 -0
- package/dist/targets/akash/provider-client.d.ts +114 -0
- package/dist/targets/akash/provider-client.d.ts.map +1 -0
- package/dist/targets/akash/provider-client.js +318 -0
- package/dist/targets/akash/provider-client.js.map +1 -0
- package/dist/targets/akash/provider-metadata.d.ts +228 -0
- package/dist/targets/akash/provider-metadata.d.ts.map +1 -0
- package/dist/targets/akash/provider-metadata.js +14 -0
- package/dist/targets/akash/provider-metadata.js.map +1 -0
- package/dist/targets/akash/provider-service.d.ts +133 -0
- package/dist/targets/akash/provider-service.d.ts.map +1 -0
- package/dist/targets/akash/provider-service.js +391 -0
- package/dist/targets/akash/provider-service.js.map +1 -0
- package/dist/targets/akash/query-client.d.ts +125 -0
- package/dist/targets/akash/query-client.d.ts.map +1 -0
- package/dist/targets/akash/query-client.js +332 -0
- package/dist/targets/akash/query-client.js.map +1 -0
- package/dist/targets/akash/sdl-generator.d.ts +31 -0
- package/dist/targets/akash/sdl-generator.d.ts.map +1 -0
- package/dist/targets/akash/sdl-generator.js +279 -0
- package/dist/targets/akash/sdl-generator.js.map +1 -0
- package/dist/targets/akash/types.d.ts +285 -0
- package/dist/targets/akash/types.d.ts.map +1 -0
- package/dist/targets/akash/types.js +54 -0
- package/dist/targets/akash/types.js.map +1 -0
- package/dist/targets/akash/wallet-manager.d.ts +526 -0
- package/dist/targets/akash/wallet-manager.d.ts.map +1 -0
- package/dist/targets/akash/wallet-manager.js +953 -0
- package/dist/targets/akash/wallet-manager.js.map +1 -0
- package/dist/targets/local/compose-generator.d.ts +244 -0
- package/dist/targets/local/compose-generator.d.ts.map +1 -0
- package/dist/targets/local/compose-generator.js +324 -0
- package/dist/targets/local/compose-generator.js.map +1 -0
- package/dist/targets/local/deployer.d.ts +82 -0
- package/dist/targets/local/deployer.d.ts.map +1 -0
- package/dist/targets/local/deployer.js +367 -0
- package/dist/targets/local/deployer.js.map +1 -0
- package/dist/targets/local/engine-manager.d.ts +155 -0
- package/dist/targets/local/engine-manager.d.ts.map +1 -0
- package/dist/targets/local/engine-manager.js +250 -0
- package/dist/targets/local/engine-manager.js.map +1 -0
- package/dist/targets/local/index.d.ts +40 -0
- package/dist/targets/local/index.d.ts.map +1 -0
- package/dist/targets/local/index.js +43 -0
- package/dist/targets/local/index.js.map +1 -0
- package/dist/targets/local/network-manager.d.ts +160 -0
- package/dist/targets/local/network-manager.d.ts.map +1 -0
- package/dist/targets/local/network-manager.js +337 -0
- package/dist/targets/local/network-manager.js.map +1 -0
- package/dist/targets/local/types.d.ts +327 -0
- package/dist/targets/local/types.d.ts.map +1 -0
- package/dist/targets/local/types.js +9 -0
- package/dist/targets/local/types.js.map +1 -0
- package/dist/types/common.d.ts +585 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +13 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/options.d.ts +329 -0
- package/dist/types/options.d.ts.map +1 -0
- package/dist/types/options.js +10 -0
- package/dist/types/options.js.map +1 -0
- package/dist/types/profiles.d.ts +329 -0
- package/dist/types/profiles.d.ts.map +1 -0
- package/dist/types/profiles.js +27 -0
- package/dist/types/profiles.js.map +1 -0
- package/dist/types/results.d.ts +443 -0
- package/dist/types/results.d.ts.map +1 -0
- package/dist/types/results.js +64 -0
- package/dist/types/results.js.map +1 -0
- package/dist/types/validators.d.ts +118 -0
- package/dist/types/validators.d.ts.map +1 -0
- package/dist/types/validators.js +198 -0
- package/dist/types/validators.js.map +1 -0
- package/dist/utils/command-runner.d.ts +128 -0
- package/dist/utils/command-runner.d.ts.map +1 -0
- package/dist/utils/command-runner.js +210 -0
- package/dist/utils/command-runner.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +68 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +93 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/profile-loader.d.ts +76 -0
- package/dist/utils/profile-loader.d.ts.map +1 -0
- package/dist/utils/profile-loader.js +194 -0
- package/dist/utils/profile-loader.js.map +1 -0
- package/dist/utils/registry/index.d.ts +27 -0
- package/dist/utils/registry/index.d.ts.map +1 -0
- package/dist/utils/registry/index.js +29 -0
- package/dist/utils/registry/index.js.map +1 -0
- package/dist/utils/registry/manager.d.ts +319 -0
- package/dist/utils/registry/manager.d.ts.map +1 -0
- package/dist/utils/registry/manager.js +671 -0
- package/dist/utils/registry/manager.js.map +1 -0
- package/dist/utils/registry/setup.d.ts +135 -0
- package/dist/utils/registry/setup.d.ts.map +1 -0
- package/dist/utils/registry/setup.js +207 -0
- package/dist/utils/registry/setup.js.map +1 -0
- package/dist/utils/registry/transformer.d.ts +92 -0
- package/dist/utils/registry/transformer.d.ts.map +1 -0
- package/dist/utils/registry/transformer.js +131 -0
- package/dist/utils/registry/transformer.js.map +1 -0
- package/dist/utils/registry/types.d.ts +241 -0
- package/dist/utils/registry/types.d.ts.map +1 -0
- package/dist/utils/registry/types.js +10 -0
- package/dist/utils/registry/types.js.map +1 -0
- package/docs/EXAMPLES.md +293 -0
- package/docs/PLACEMENT.md +433 -0
- package/docs/STORAGE.md +318 -0
- package/docs/building-provider-reliability-tracker.md +2581 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/targets/local/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common type definitions shared across the deploy-ability library
|
|
3
|
+
*
|
|
4
|
+
* This module provides foundational types including:
|
|
5
|
+
* - Branded types for domain safety
|
|
6
|
+
* - Logger interfaces
|
|
7
|
+
* - Network definitions
|
|
8
|
+
* - Resource specifications
|
|
9
|
+
*
|
|
10
|
+
* @module types/common
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Branded type utilities for type-safe domain values
|
|
14
|
+
*
|
|
15
|
+
* Branded types prevent accidental mixing of semantically different values
|
|
16
|
+
* that share the same primitive type (e.g., DSEQ vs port number, both numbers)
|
|
17
|
+
*/
|
|
18
|
+
declare const brand: unique symbol;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a branded type from a base type
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* type UserId = Brand<number, 'UserId'>;
|
|
24
|
+
* type ProductId = Brand<number, 'ProductId'>;
|
|
25
|
+
*
|
|
26
|
+
* const userId: UserId = 123 as UserId;
|
|
27
|
+
* const productId: ProductId = 456 as ProductId;
|
|
28
|
+
* // userId and productId are incompatible despite both being numbers
|
|
29
|
+
*/
|
|
30
|
+
export type Brand<T, TBrand extends string> = T & {
|
|
31
|
+
readonly [brand]: TBrand;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Deployment sequence number on Akash Network
|
|
35
|
+
*
|
|
36
|
+
* A unique identifier for a deployment on the Akash blockchain.
|
|
37
|
+
* Branded to prevent confusion with other numeric IDs.
|
|
38
|
+
*/
|
|
39
|
+
export type DeploymentSequence = Brand<number, 'DSEQ'>;
|
|
40
|
+
/**
|
|
41
|
+
* Akash wallet address
|
|
42
|
+
*
|
|
43
|
+
* A bech32-encoded address starting with "akash1"
|
|
44
|
+
* Branded to prevent mixing with other string values
|
|
45
|
+
*/
|
|
46
|
+
export type WalletAddress = Brand<string, 'AkashAddress'>;
|
|
47
|
+
/**
|
|
48
|
+
* Provider URI
|
|
49
|
+
*
|
|
50
|
+
* The HTTPS endpoint of an Akash provider
|
|
51
|
+
* Branded for type safety in provider communication
|
|
52
|
+
*/
|
|
53
|
+
export type ProviderUri = Brand<string, 'ProviderUri'>;
|
|
54
|
+
/**
|
|
55
|
+
* Container image reference
|
|
56
|
+
*
|
|
57
|
+
* A Docker image reference (e.g., "nginx:latest", "myapp:1.0.0")
|
|
58
|
+
*/
|
|
59
|
+
export type ImageReference = Brand<string, 'ImageReference'>;
|
|
60
|
+
/**
|
|
61
|
+
* Network target for deployment
|
|
62
|
+
*/
|
|
63
|
+
export type Network = 'mainnet' | 'testnet' | 'sandbox';
|
|
64
|
+
/**
|
|
65
|
+
* Container orchestration engine
|
|
66
|
+
*/
|
|
67
|
+
export type ContainerEngine = 'docker' | 'podman';
|
|
68
|
+
/**
|
|
69
|
+
* Deployment target platform
|
|
70
|
+
*/
|
|
71
|
+
export type DeploymentTarget = 'akash' | 'local';
|
|
72
|
+
/**
|
|
73
|
+
* Logger interface for deployment operations
|
|
74
|
+
*
|
|
75
|
+
* Provides structured logging with multiple severity levels.
|
|
76
|
+
* Implement this interface to integrate with your logging system.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* const logger: DeploymentLogger = {
|
|
80
|
+
* log: (msg) => console.log(`[INFO] ${msg}`),
|
|
81
|
+
* error: (msg) => console.error(`[ERROR] ${msg}`),
|
|
82
|
+
* warn: (msg) => console.warn(`[WARN] ${msg}`),
|
|
83
|
+
* debug: (msg) => process.env.DEBUG && console.debug(`[DEBUG] ${msg}`)
|
|
84
|
+
* };
|
|
85
|
+
*/
|
|
86
|
+
export interface DeploymentLogger {
|
|
87
|
+
/**
|
|
88
|
+
* Log informational messages
|
|
89
|
+
* Use for normal operational messages
|
|
90
|
+
*/
|
|
91
|
+
log(message: string, ...args: unknown[]): void;
|
|
92
|
+
/**
|
|
93
|
+
* Log error messages
|
|
94
|
+
* Use for errors that need attention
|
|
95
|
+
*/
|
|
96
|
+
error(message: string, ...args: unknown[]): void;
|
|
97
|
+
/**
|
|
98
|
+
* Log warning messages
|
|
99
|
+
* Use for concerning but non-critical issues
|
|
100
|
+
*/
|
|
101
|
+
warn(message: string, ...args: unknown[]): void;
|
|
102
|
+
/**
|
|
103
|
+
* Log debug messages
|
|
104
|
+
* Use for detailed diagnostic information
|
|
105
|
+
*/
|
|
106
|
+
debug(message: string, ...args: unknown[]): void;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Progress event for deployment operations
|
|
110
|
+
*
|
|
111
|
+
* Emitted during deployment to provide real-time status updates.
|
|
112
|
+
* Used with onProgress callbacks to track deployment progress.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* onProgress: (event) => {
|
|
117
|
+
* console.log(`[${event.phase}] ${event.message}`);
|
|
118
|
+
* if (event.data) {
|
|
119
|
+
* console.log('Data:', event.data);
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export interface ProgressEvent {
|
|
125
|
+
/**
|
|
126
|
+
* Current deployment phase
|
|
127
|
+
*
|
|
128
|
+
* - `profile`: Loading and validating deployment profile
|
|
129
|
+
* - `engine`: Checking/starting container engine
|
|
130
|
+
* - `network`: Setting up Docker network
|
|
131
|
+
* - `compose`: Generating docker-compose.yml
|
|
132
|
+
* - `deploy`: Deploying containers
|
|
133
|
+
* - `complete`: Deployment finished successfully
|
|
134
|
+
*/
|
|
135
|
+
readonly phase: 'profile' | 'engine' | 'network' | 'compose' | 'deploy' | 'complete';
|
|
136
|
+
/**
|
|
137
|
+
* Human-readable progress message
|
|
138
|
+
*/
|
|
139
|
+
readonly message: string;
|
|
140
|
+
/**
|
|
141
|
+
* Optional structured data about this phase
|
|
142
|
+
*/
|
|
143
|
+
readonly data?: unknown;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* CPU resource specification
|
|
147
|
+
*
|
|
148
|
+
* Represents CPU allocation in cores (fractional allowed)
|
|
149
|
+
* @example 0.5 = half a CPU core, 2.0 = two full cores
|
|
150
|
+
*/
|
|
151
|
+
export type CpuUnits = Brand<number, 'CpuUnits'>;
|
|
152
|
+
/**
|
|
153
|
+
* Memory resource specification
|
|
154
|
+
*
|
|
155
|
+
* Memory size with unit suffix (e.g., "512Mi", "2Gi")
|
|
156
|
+
* Follows Kubernetes resource notation
|
|
157
|
+
*/
|
|
158
|
+
export type MemorySize = Brand<string, 'MemorySize'>;
|
|
159
|
+
/**
|
|
160
|
+
* Storage resource specification
|
|
161
|
+
*
|
|
162
|
+
* Storage size with unit suffix (e.g., "10Gi", "100Mi")
|
|
163
|
+
* Follows Kubernetes resource notation
|
|
164
|
+
*/
|
|
165
|
+
export type StorageSize = Brand<string, 'StorageSize'>;
|
|
166
|
+
/**
|
|
167
|
+
* Akash storage class types
|
|
168
|
+
*
|
|
169
|
+
* Storage classes define the performance tier and persistence characteristics:
|
|
170
|
+
* - **beta1**: HDD storage (cheapest, slowest) - Good for cold storage, backups
|
|
171
|
+
* - **beta2**: SSD storage (balanced) - Recommended for most workloads
|
|
172
|
+
* - **beta3**: NVMe storage (fastest, most expensive) - For high-IOPS databases
|
|
173
|
+
* - **ram**: System memory (temporary in-memory storage) - Ultra-fast but volatile
|
|
174
|
+
*/
|
|
175
|
+
export type AkashStorageClass = 'beta1' | 'beta2' | 'beta3' | 'ram';
|
|
176
|
+
/**
|
|
177
|
+
* Persistent volume specification for Akash Network
|
|
178
|
+
*
|
|
179
|
+
* Defines a named persistent volume that **survives container restarts**.
|
|
180
|
+
* Data persists for the duration of the lease.
|
|
181
|
+
*
|
|
182
|
+
* **Use Cases:**
|
|
183
|
+
* - Database files (PostgreSQL, MongoDB)
|
|
184
|
+
* - User uploads (images, videos)
|
|
185
|
+
* - ML model weights
|
|
186
|
+
* - Configuration files
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```typescript
|
|
190
|
+
* const dataVolume: PersistentVolumeSpec = {
|
|
191
|
+
* name: 'data',
|
|
192
|
+
* size: '10Gi',
|
|
193
|
+
* mount: '/data',
|
|
194
|
+
* class: 'beta2'
|
|
195
|
+
* };
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
export interface PersistentVolumeSpec {
|
|
199
|
+
/**
|
|
200
|
+
* Volume name (must be unique within the service)
|
|
201
|
+
* Used to reference the volume in mount paths
|
|
202
|
+
* @example "data", "cache", "logs"
|
|
203
|
+
*/
|
|
204
|
+
readonly name: string;
|
|
205
|
+
/**
|
|
206
|
+
* Volume size with unit suffix
|
|
207
|
+
* @example "1Gi", "10Gi", "100Gi"
|
|
208
|
+
*/
|
|
209
|
+
readonly size: StorageSize;
|
|
210
|
+
/**
|
|
211
|
+
* Container mount path for this volume
|
|
212
|
+
* @example "/data", "/var/lib/mysql", "/app/uploads"
|
|
213
|
+
*/
|
|
214
|
+
readonly mount: string;
|
|
215
|
+
/**
|
|
216
|
+
* Storage class (performance tier)
|
|
217
|
+
* Defaults to 'beta2' (SSD) if not specified
|
|
218
|
+
* @example "beta2", "beta3"
|
|
219
|
+
*/
|
|
220
|
+
readonly class?: AkashStorageClass;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Resource requirements for a service
|
|
224
|
+
*
|
|
225
|
+
* Defines the compute resources needed for a container.
|
|
226
|
+
*
|
|
227
|
+
* **Storage vs Memory:**
|
|
228
|
+
* - **memory**: RAM for running processes (fast, volatile)
|
|
229
|
+
* - **ephemeralStorage**: Container root filesystem and /tmp (disk, wiped on restart)
|
|
230
|
+
* - **persistentVolumes**: Named volumes that survive restarts (disk, persistent)
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```typescript
|
|
234
|
+
* const resources: ResourceRequirements = {
|
|
235
|
+
* cpu: 0.5,
|
|
236
|
+
* memory: "1Gi", // 1GB RAM for Node.js runtime
|
|
237
|
+
* ephemeralStorage: "512Mi", // 512MB for container root FS, /tmp, logs
|
|
238
|
+
* persistentVolumes: [
|
|
239
|
+
* {
|
|
240
|
+
* name: "data",
|
|
241
|
+
* size: "10Gi", // 10GB persistent disk mounted at /data
|
|
242
|
+
* mount: "/data",
|
|
243
|
+
* class: "beta2"
|
|
244
|
+
* }
|
|
245
|
+
* ]
|
|
246
|
+
* };
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
export interface ResourceRequirements {
|
|
250
|
+
/**
|
|
251
|
+
* CPU cores required (fractional allowed)
|
|
252
|
+
* @example 0.5, 1.0, 2.0, 4.0
|
|
253
|
+
*/
|
|
254
|
+
readonly cpu: number;
|
|
255
|
+
/**
|
|
256
|
+
* Memory (RAM) required with unit suffix
|
|
257
|
+
*
|
|
258
|
+
* Used for:
|
|
259
|
+
* - Application heap/stack
|
|
260
|
+
* - In-memory caches
|
|
261
|
+
* - Runtime state
|
|
262
|
+
*
|
|
263
|
+
* @example "512Mi", "1Gi", "2Gi"
|
|
264
|
+
*/
|
|
265
|
+
readonly memory: MemorySize;
|
|
266
|
+
/**
|
|
267
|
+
* Ephemeral storage (disk) required with unit suffix
|
|
268
|
+
*
|
|
269
|
+
* Container's root filesystem storage that is **wiped on restart**.
|
|
270
|
+
* Used for:
|
|
271
|
+
* - Container's root filesystem (OS files, binaries)
|
|
272
|
+
* - /tmp directory
|
|
273
|
+
* - Temporary files during processing
|
|
274
|
+
* - Logs before shipping to external service
|
|
275
|
+
*
|
|
276
|
+
* @example "512Mi", "1Gi", "2Gi"
|
|
277
|
+
*/
|
|
278
|
+
readonly ephemeralStorage: StorageSize;
|
|
279
|
+
/**
|
|
280
|
+
* Persistent volumes that **survive container restarts**
|
|
281
|
+
*
|
|
282
|
+
* Named volumes mounted at specific paths that persist for lease duration.
|
|
283
|
+
* Used for:
|
|
284
|
+
* - Database files
|
|
285
|
+
* - User uploads
|
|
286
|
+
* - ML model weights
|
|
287
|
+
* - Configuration files
|
|
288
|
+
*
|
|
289
|
+
* Optional - omit if no persistent storage needed.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* [
|
|
294
|
+
* { name: "data", size: "10Gi", mount: "/data", class: "beta2" },
|
|
295
|
+
* { name: "cache", size: "5Gi", mount: "/cache", class: "beta1" }
|
|
296
|
+
* ]
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
readonly persistentVolumes?: readonly PersistentVolumeSpec[];
|
|
300
|
+
/**
|
|
301
|
+
* GPU requirements (Akash-specific)
|
|
302
|
+
* Optional, only for GPU workloads
|
|
303
|
+
*/
|
|
304
|
+
readonly gpu?: GpuRequirements;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* GPU vendor specification
|
|
308
|
+
*/
|
|
309
|
+
export type GpuVendor = 'nvidia' | 'amd';
|
|
310
|
+
/**
|
|
311
|
+
* GPU model specification for Akash Network
|
|
312
|
+
*/
|
|
313
|
+
export interface GpuModel {
|
|
314
|
+
/**
|
|
315
|
+
* GPU model name
|
|
316
|
+
* @example "rtx4090", "a100", "t4", "rtxa6000"
|
|
317
|
+
*/
|
|
318
|
+
readonly model: string;
|
|
319
|
+
/**
|
|
320
|
+
* GPU memory (VRAM) required
|
|
321
|
+
* @example "24Gi", "48Gi", "80Gi"
|
|
322
|
+
*/
|
|
323
|
+
readonly ram?: string;
|
|
324
|
+
/**
|
|
325
|
+
* GPU interface type
|
|
326
|
+
*/
|
|
327
|
+
readonly interface?: 'pcie' | 'sxm';
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* GPU resource requirements
|
|
331
|
+
*/
|
|
332
|
+
export interface GpuRequirements {
|
|
333
|
+
/**
|
|
334
|
+
* Number of GPU units required
|
|
335
|
+
* @example 1, 2, 4
|
|
336
|
+
*/
|
|
337
|
+
readonly units: number;
|
|
338
|
+
/**
|
|
339
|
+
* GPU vendor and model attributes
|
|
340
|
+
*/
|
|
341
|
+
readonly attributes: {
|
|
342
|
+
readonly vendor: {
|
|
343
|
+
readonly [K in GpuVendor]?: readonly GpuModel[];
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Akash HTTP proxy options for fine-grained HTTP endpoint control
|
|
349
|
+
*
|
|
350
|
+
* These options configure the Akash ingress controller's behavior for HTTP endpoints.
|
|
351
|
+
* Particularly useful for long-running operations like model downloads.
|
|
352
|
+
*
|
|
353
|
+
* **Background:**
|
|
354
|
+
* Akash uses NGINX as an ingress controller with default 60-second timeouts.
|
|
355
|
+
* For services that need longer response times (e.g., Ollama model pulling),
|
|
356
|
+
* you must explicitly configure longer timeouts.
|
|
357
|
+
*
|
|
358
|
+
* **Default Values** (from Akash source code):
|
|
359
|
+
* - max_body_size: 1,048,576 bytes (1 MB)
|
|
360
|
+
* - read_timeout: 60 seconds (NGINX ingress format)
|
|
361
|
+
* - send_timeout: 60 seconds (NGINX ingress format)
|
|
362
|
+
* - next_tries: 3
|
|
363
|
+
* - next_cases: ["error", "timeout"]
|
|
364
|
+
*
|
|
365
|
+
* **IMPORTANT:** Timeout values must be specified in **seconds** (NGINX format),
|
|
366
|
+
* not milliseconds. The NGINX ingress controller expects integer seconds.
|
|
367
|
+
*
|
|
368
|
+
* @see https://akash.network/docs/network-features/deployment-http-options/
|
|
369
|
+
* @see https://github.com/akash-network/node/blob/main/sdl/v2.go#L18-L37
|
|
370
|
+
*
|
|
371
|
+
* @example Long-running operations (Ollama model pull)
|
|
372
|
+
* ```typescript
|
|
373
|
+
* const httpOptions: HttpOptions = {
|
|
374
|
+
* max_body_size: 10485760, // 10 MB
|
|
375
|
+
* read_timeout: 600, // 10 minutes (in seconds)
|
|
376
|
+
* send_timeout: 600, // 10 minutes (in seconds)
|
|
377
|
+
* };
|
|
378
|
+
* ```
|
|
379
|
+
*
|
|
380
|
+
* @example High-traffic service with retries
|
|
381
|
+
* ```typescript
|
|
382
|
+
* const httpOptions: HttpOptions = {
|
|
383
|
+
* max_body_size: 5242880, // 5 MB
|
|
384
|
+
* next_cases: ["error", "timeout", "500", "502", "503"],
|
|
385
|
+
* next_tries: 5,
|
|
386
|
+
* next_timeout: 3, // 3 seconds
|
|
387
|
+
* };
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
export interface HttpOptions {
|
|
391
|
+
/**
|
|
392
|
+
* Maximum size of HTTP request body in bytes
|
|
393
|
+
*
|
|
394
|
+
* Limits the size of incoming request payloads.
|
|
395
|
+
* Useful for preventing abuse or handling large file uploads.
|
|
396
|
+
*
|
|
397
|
+
* @default 1048576 (1 MB)
|
|
398
|
+
* @example 10485760 // 10 MB
|
|
399
|
+
*/
|
|
400
|
+
readonly max_body_size?: number;
|
|
401
|
+
/**
|
|
402
|
+
* Maximum time (in SECONDS) the proxy waits for a response from the service
|
|
403
|
+
*
|
|
404
|
+
* **Critical for long-running operations!**
|
|
405
|
+
* If your service takes >60s to respond (default), you MUST increase this.
|
|
406
|
+
*
|
|
407
|
+
* **IMPORTANT:** Use SECONDS, not milliseconds (NGINX ingress format)
|
|
408
|
+
*
|
|
409
|
+
* Common use cases:
|
|
410
|
+
* - ML model downloads: 600 (10 min)
|
|
411
|
+
* - Large file processing: 300 (5 min)
|
|
412
|
+
* - Batch operations: 180 (3 min)
|
|
413
|
+
*
|
|
414
|
+
* @default 60 (60 seconds)
|
|
415
|
+
* @example 600 // 10 minutes for Ollama model pulls
|
|
416
|
+
*/
|
|
417
|
+
readonly read_timeout?: number;
|
|
418
|
+
/**
|
|
419
|
+
* Maximum time (in SECONDS) the proxy waits for the service to accept a request
|
|
420
|
+
*
|
|
421
|
+
* Typically mirrors read_timeout for symmetry.
|
|
422
|
+
*
|
|
423
|
+
* **IMPORTANT:** Use SECONDS, not milliseconds (NGINX ingress format)
|
|
424
|
+
*
|
|
425
|
+
* @default 60 (60 seconds)
|
|
426
|
+
* @example 600 // 10 minutes
|
|
427
|
+
*/
|
|
428
|
+
readonly send_timeout?: number;
|
|
429
|
+
/**
|
|
430
|
+
* HTTP status codes and error conditions that trigger retry to another replica
|
|
431
|
+
*
|
|
432
|
+
* Only applies when service count > 1.
|
|
433
|
+
*
|
|
434
|
+
* **Allowed values:**
|
|
435
|
+
* - "error" - Network/connection errors
|
|
436
|
+
* - "timeout" - Request timeout
|
|
437
|
+
* - "403", "404", "429", "500", "502", "503", "504" - HTTP status codes
|
|
438
|
+
* - "off" - Disable retries
|
|
439
|
+
*
|
|
440
|
+
* @default ["error", "timeout"]
|
|
441
|
+
* @example ["error", "timeout", "500", "502", "503"]
|
|
442
|
+
*/
|
|
443
|
+
readonly next_cases?: readonly string[];
|
|
444
|
+
/**
|
|
445
|
+
* Number of times to retry with another replica before giving up
|
|
446
|
+
*
|
|
447
|
+
* Only applies when service count > 1.
|
|
448
|
+
*
|
|
449
|
+
* @default 3
|
|
450
|
+
* @example 5
|
|
451
|
+
*/
|
|
452
|
+
readonly next_tries?: number;
|
|
453
|
+
/**
|
|
454
|
+
* Time (in SECONDS) to wait before considering a retry attempt has timed out
|
|
455
|
+
*
|
|
456
|
+
* Only applies when service count > 1.
|
|
457
|
+
*
|
|
458
|
+
* **IMPORTANT:** Use SECONDS, not milliseconds (NGINX ingress format)
|
|
459
|
+
*
|
|
460
|
+
* @example 3 // 3 seconds
|
|
461
|
+
*/
|
|
462
|
+
readonly next_timeout?: number;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Port exposure configuration
|
|
466
|
+
*
|
|
467
|
+
* Defines how a container port is exposed
|
|
468
|
+
*/
|
|
469
|
+
export interface PortExposure {
|
|
470
|
+
/**
|
|
471
|
+
* Internal container port
|
|
472
|
+
*/
|
|
473
|
+
readonly port: number;
|
|
474
|
+
/**
|
|
475
|
+
* External port to map to (defaults to same as port)
|
|
476
|
+
*/
|
|
477
|
+
readonly as: number;
|
|
478
|
+
/**
|
|
479
|
+
* Exposure targets
|
|
480
|
+
* - ["local"]: Only accessible from host machine
|
|
481
|
+
* - [{ global: true }]: Accessible from internet (Akash)
|
|
482
|
+
*/
|
|
483
|
+
readonly to: ReadonlyArray<'local' | {
|
|
484
|
+
readonly global?: boolean;
|
|
485
|
+
}>;
|
|
486
|
+
/**
|
|
487
|
+
* Protocol (defaults to TCP)
|
|
488
|
+
*/
|
|
489
|
+
readonly protocol?: 'tcp' | 'udp';
|
|
490
|
+
/**
|
|
491
|
+
* HTTP-specific options for Akash ingress configuration
|
|
492
|
+
*
|
|
493
|
+
* **Only applies to Akash deployments with global exposure.**
|
|
494
|
+
* Local deployments ignore this field.
|
|
495
|
+
*
|
|
496
|
+
* Use this for services that need:
|
|
497
|
+
* - Long response times (>60s)
|
|
498
|
+
* - Large request bodies (>1MB)
|
|
499
|
+
* - Custom retry logic
|
|
500
|
+
*
|
|
501
|
+
* @example Ollama with long model pull timeouts
|
|
502
|
+
* ```typescript
|
|
503
|
+
* {
|
|
504
|
+
* port: 11434,
|
|
505
|
+
* as: 80,
|
|
506
|
+
* to: [{ global: true }],
|
|
507
|
+
* http_options: {
|
|
508
|
+
* read_timeout: 600, // 10 minutes (in seconds)
|
|
509
|
+
* send_timeout: 600,
|
|
510
|
+
* }
|
|
511
|
+
* }
|
|
512
|
+
* ```
|
|
513
|
+
*/
|
|
514
|
+
readonly http_options?: HttpOptions;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Environment variable specification
|
|
518
|
+
*
|
|
519
|
+
* Either a simple key=value string or a structured object
|
|
520
|
+
*/
|
|
521
|
+
export type EnvironmentVariable = string | {
|
|
522
|
+
readonly name: string;
|
|
523
|
+
readonly value: string;
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Service configuration common across all targets
|
|
527
|
+
*
|
|
528
|
+
* Base configuration that applies to both local and remote deployments
|
|
529
|
+
*/
|
|
530
|
+
export interface BaseServiceConfig {
|
|
531
|
+
/**
|
|
532
|
+
* Container image to deploy
|
|
533
|
+
* @example "nginx:latest", "myapp:1.0.0"
|
|
534
|
+
*/
|
|
535
|
+
readonly image: ImageReference;
|
|
536
|
+
/**
|
|
537
|
+
* Environment variables
|
|
538
|
+
* @example ["PORT=8080", "NODE_ENV=production"]
|
|
539
|
+
*/
|
|
540
|
+
readonly env?: readonly EnvironmentVariable[];
|
|
541
|
+
/**
|
|
542
|
+
* Port exposures
|
|
543
|
+
*/
|
|
544
|
+
readonly expose?: readonly PortExposure[];
|
|
545
|
+
/**
|
|
546
|
+
* Command override (replaces image's CMD)
|
|
547
|
+
*/
|
|
548
|
+
readonly command?: readonly string[];
|
|
549
|
+
/**
|
|
550
|
+
* Resource requirements
|
|
551
|
+
*/
|
|
552
|
+
readonly resources?: ResourceRequirements;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Progress event emitted during deployment
|
|
556
|
+
*
|
|
557
|
+
* Allows monitoring of deployment progress in real-time
|
|
558
|
+
*/
|
|
559
|
+
export interface DeploymentProgressEvent {
|
|
560
|
+
/**
|
|
561
|
+
* Current deployment phase
|
|
562
|
+
*/
|
|
563
|
+
readonly phase: 'initializing' | 'loading-profile' | 'connecting-wallet' | 'creating-certificate' | 'building-images' | 'creating-deployment' | 'waiting-for-bids' | 'creating-lease' | 'sending-manifest' | 'waiting-for-containers' | 'completed' | 'failed';
|
|
564
|
+
/**
|
|
565
|
+
* Human-readable progress message
|
|
566
|
+
*/
|
|
567
|
+
readonly message: string;
|
|
568
|
+
/**
|
|
569
|
+
* Progress percentage (0-100)
|
|
570
|
+
* undefined if not applicable
|
|
571
|
+
*/
|
|
572
|
+
readonly progress?: number;
|
|
573
|
+
/**
|
|
574
|
+
* Additional context data
|
|
575
|
+
*/
|
|
576
|
+
readonly data?: Record<string, unknown>;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Progress callback function
|
|
580
|
+
*
|
|
581
|
+
* Called periodically during deployment to report progress
|
|
582
|
+
*/
|
|
583
|
+
export type ProgressCallback = (event: DeploymentProgressEvent) => void;
|
|
584
|
+
export {};
|
|
585
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AAEnC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,KAAK,CAAC,CAA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CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common type definitions shared across the deploy-ability library
|
|
3
|
+
*
|
|
4
|
+
* This module provides foundational types including:
|
|
5
|
+
* - Branded types for domain safety
|
|
6
|
+
* - Logger interfaces
|
|
7
|
+
* - Network definitions
|
|
8
|
+
* - Resource specifications
|
|
9
|
+
*
|
|
10
|
+
* @module types/common
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions barrel export
|
|
3
|
+
*
|
|
4
|
+
* Centralized export point for all type definitions in deploy-ability
|
|
5
|
+
*
|
|
6
|
+
* @module types
|
|
7
|
+
*/
|
|
8
|
+
export type { Brand, DeploymentSequence, WalletAddress, ProviderUri, ImageReference, Network, ContainerEngine, DeploymentTarget, DeploymentLogger, ProgressEvent, CpuUnits, MemorySize, StorageSize, ResourceRequirements, GpuVendor, GpuModel, GpuRequirements, PortExposure, EnvironmentVariable, BaseServiceConfig, ProgressCallback, } from './common.js';
|
|
9
|
+
export type { Success, Failure, Result, AkashDeploymentData, AkashDryRunData, AkashDeploymentResult, LocalDeploymentData, LocalDryRunData, LocalDeploymentResult, WalletConnectionData, WalletConnectionResult, CertificateData, CertificateResult, } from './results.js';
|
|
10
|
+
export { success, failure, isSuccess, isFailure } from './results.js';
|
|
11
|
+
export { WalletAddressSchema, DeploymentSequenceSchema, createWalletAddress, createDeploymentSequence, isWalletAddress, isDeploymentSequence, toWalletAddress, toDeploymentSequence, } from './validators.js';
|
|
12
|
+
export type { BaseDeploymentOptions, AkashDeploymentOptions, LocalDeploymentOptions, WalletConnectionOptions, CertificateOptions, MonitoringOptions, } from './options.js';
|
|
13
|
+
export type { AgentConfig, BuildProfile, BaseDeploymentProfile, LocalDeploymentProfile, AkashDeploymentProfile, DeploymentProfile, LoadedProfile, } from './profiles.js';
|
|
14
|
+
export { isLocalProfile, isAkashProfile } from './profiles.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,KAAK,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,cAAc,EACd,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,OAAO,EACP,OAAO,EACP,MAAM,EACN,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGtE,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions barrel export
|
|
3
|
+
*
|
|
4
|
+
* Centralized export point for all type definitions in deploy-ability
|
|
5
|
+
*
|
|
6
|
+
* @module types
|
|
7
|
+
*/
|
|
8
|
+
export { success, failure, isSuccess, isFailure } from './results.js';
|
|
9
|
+
// Validators
|
|
10
|
+
export { WalletAddressSchema, DeploymentSequenceSchema, createWalletAddress, createDeploymentSequence, isWalletAddress, isDeploymentSequence, toWalletAddress, toDeploymentSequence, } from './validators.js';
|
|
11
|
+
export { isLocalProfile, isAkashProfile } from './profiles.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA4CH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,aAAa;AACb,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAuBzB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|