freestyle-sandboxes 0.1.35 → 0.1.36
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/cli.mjs +35 -12
- package/index.cjs +1620 -1277
- package/index.d.cts +1008 -863
- package/index.d.mts +1008 -863
- package/index.mjs +1620 -1278
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -82,209 +82,281 @@ class GitErrorError extends Error {
|
|
|
82
82
|
static statusCode = 500;
|
|
83
83
|
static description = `{message}`;
|
|
84
84
|
}
|
|
85
|
-
class
|
|
85
|
+
class SnapshotNotFoundError extends Error {
|
|
86
86
|
constructor(body) {
|
|
87
87
|
super(
|
|
88
|
-
`
|
|
88
|
+
`SNAPSHOT_NOT_FOUND: ${body.message}`
|
|
89
89
|
);
|
|
90
90
|
this.body = body;
|
|
91
|
-
this.name = "
|
|
91
|
+
this.name = "SnapshotNotFoundError";
|
|
92
92
|
}
|
|
93
|
-
static code = "
|
|
93
|
+
static code = "SNAPSHOT_NOT_FOUND";
|
|
94
94
|
static statusCode = 404;
|
|
95
|
-
static description = `
|
|
95
|
+
static description = `Snapshot not found: {snapshot_id}`;
|
|
96
96
|
}
|
|
97
|
-
class
|
|
97
|
+
class ResumedVmNonResponsiveError extends Error {
|
|
98
98
|
constructor(body) {
|
|
99
99
|
super(
|
|
100
|
-
`
|
|
100
|
+
`RESUMED_VM_NON_RESPONSIVE: ${body.message}`
|
|
101
101
|
);
|
|
102
102
|
this.body = body;
|
|
103
|
-
this.name = "
|
|
103
|
+
this.name = "ResumedVmNonResponsiveError";
|
|
104
104
|
}
|
|
105
|
-
static code = "
|
|
106
|
-
static statusCode =
|
|
107
|
-
static description = `
|
|
105
|
+
static code = "RESUMED_VM_NON_RESPONSIVE";
|
|
106
|
+
static statusCode = 500;
|
|
107
|
+
static description = `Resumed VM {vm_id} is not responsive after {timeout_seconds}s`;
|
|
108
108
|
}
|
|
109
|
-
class
|
|
109
|
+
class SnapshotLoadTimeoutError extends Error {
|
|
110
110
|
constructor(body) {
|
|
111
111
|
super(
|
|
112
|
-
`
|
|
112
|
+
`SNAPSHOT_LOAD_TIMEOUT: ${body.message}`
|
|
113
113
|
);
|
|
114
114
|
this.body = body;
|
|
115
|
-
this.name = "
|
|
115
|
+
this.name = "SnapshotLoadTimeoutError";
|
|
116
116
|
}
|
|
117
|
-
static code = "
|
|
118
|
-
static statusCode =
|
|
119
|
-
static description = `
|
|
117
|
+
static code = "SNAPSHOT_LOAD_TIMEOUT";
|
|
118
|
+
static statusCode = 500;
|
|
119
|
+
static description = `Snapshot load timed out after {elapsed_seconds}s for instance {vm_instance_id}, logs: {log_path}`;
|
|
120
120
|
}
|
|
121
|
-
class
|
|
121
|
+
class UffdTimeoutErrorError extends Error {
|
|
122
122
|
constructor(body) {
|
|
123
123
|
super(
|
|
124
|
-
`
|
|
124
|
+
`UFFD_TIMEOUT_ERROR: ${body.message}`
|
|
125
125
|
);
|
|
126
126
|
this.body = body;
|
|
127
|
-
this.name = "
|
|
127
|
+
this.name = "UffdTimeoutErrorError";
|
|
128
128
|
}
|
|
129
|
-
static code = "
|
|
130
|
-
static statusCode =
|
|
131
|
-
static description = `
|
|
129
|
+
static code = "UFFD_TIMEOUT_ERROR";
|
|
130
|
+
static statusCode = 500;
|
|
131
|
+
static description = `UFFD socket timeout: {report_socket_path}, logs: {log_path}`;
|
|
132
132
|
}
|
|
133
|
-
class
|
|
133
|
+
class KernelPanicError extends Error {
|
|
134
134
|
constructor(body) {
|
|
135
135
|
super(
|
|
136
|
-
`
|
|
136
|
+
`KERNEL_PANIC: ${body.message}`
|
|
137
137
|
);
|
|
138
138
|
this.body = body;
|
|
139
|
-
this.name = "
|
|
139
|
+
this.name = "KernelPanicError";
|
|
140
140
|
}
|
|
141
|
-
static code = "
|
|
142
|
-
static statusCode =
|
|
143
|
-
static description = `
|
|
141
|
+
static code = "KERNEL_PANIC";
|
|
142
|
+
static statusCode = 500;
|
|
143
|
+
static description = `VM kernel panic detected`;
|
|
144
144
|
}
|
|
145
|
-
class
|
|
145
|
+
class VmDeletedError extends Error {
|
|
146
146
|
constructor(body) {
|
|
147
147
|
super(
|
|
148
|
-
`
|
|
148
|
+
`VM_DELETED: ${body.message}`
|
|
149
149
|
);
|
|
150
150
|
this.body = body;
|
|
151
|
-
this.name = "
|
|
151
|
+
this.name = "VmDeletedError";
|
|
152
152
|
}
|
|
153
|
-
static code = "
|
|
154
|
-
static statusCode =
|
|
155
|
-
static description = `
|
|
153
|
+
static code = "VM_DELETED";
|
|
154
|
+
static statusCode = 410;
|
|
155
|
+
static description = `Cannot start VM: VM files have been deleted. This VM was ephemeral and its files were removed.`;
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class ReqwestError extends Error {
|
|
158
158
|
constructor(body) {
|
|
159
159
|
super(
|
|
160
|
-
`
|
|
160
|
+
`REQWEST: ${body.message}`
|
|
161
161
|
);
|
|
162
162
|
this.body = body;
|
|
163
|
-
this.name = "
|
|
163
|
+
this.name = "ReqwestError";
|
|
164
164
|
}
|
|
165
|
-
static code = "
|
|
166
|
-
static statusCode =
|
|
167
|
-
static description = `
|
|
165
|
+
static code = "REQWEST";
|
|
166
|
+
static statusCode = 500;
|
|
167
|
+
static description = `Reqwest error: {details}`;
|
|
168
168
|
}
|
|
169
|
-
class
|
|
169
|
+
class FirecrackerPidNotFoundError extends Error {
|
|
170
170
|
constructor(body) {
|
|
171
171
|
super(
|
|
172
|
-
`
|
|
172
|
+
`FIRECRACKER_PID_NOT_FOUND: ${body.message}`
|
|
173
173
|
);
|
|
174
174
|
this.body = body;
|
|
175
|
-
this.name = "
|
|
175
|
+
this.name = "FirecrackerPidNotFoundError";
|
|
176
176
|
}
|
|
177
|
-
static code = "
|
|
178
|
-
static statusCode =
|
|
179
|
-
static description = `
|
|
177
|
+
static code = "FIRECRACKER_PID_NOT_FOUND";
|
|
178
|
+
static statusCode = 500;
|
|
179
|
+
static description = `Firecracker PID not found`;
|
|
180
180
|
}
|
|
181
|
-
class
|
|
181
|
+
class FirecrackerApiSocketNotFoundError extends Error {
|
|
182
182
|
constructor(body) {
|
|
183
183
|
super(
|
|
184
|
-
`
|
|
184
|
+
`FIRECRACKER_API_SOCKET_NOT_FOUND: ${body.message}`
|
|
185
185
|
);
|
|
186
186
|
this.body = body;
|
|
187
|
-
this.name = "
|
|
187
|
+
this.name = "FirecrackerApiSocketNotFoundError";
|
|
188
188
|
}
|
|
189
|
-
static code = "
|
|
189
|
+
static code = "FIRECRACKER_API_SOCKET_NOT_FOUND";
|
|
190
190
|
static statusCode = 500;
|
|
191
|
-
static description = `
|
|
191
|
+
static description = `Firecracker API socket not found`;
|
|
192
192
|
}
|
|
193
|
-
class
|
|
193
|
+
class InvalidSnapshotIdError extends Error {
|
|
194
194
|
constructor(body) {
|
|
195
195
|
super(
|
|
196
|
-
`
|
|
196
|
+
`INVALID_SNAPSHOT_ID: ${body.message}`
|
|
197
197
|
);
|
|
198
198
|
this.body = body;
|
|
199
|
-
this.name = "
|
|
199
|
+
this.name = "InvalidSnapshotIdError";
|
|
200
200
|
}
|
|
201
|
-
static code = "
|
|
202
|
-
static statusCode =
|
|
203
|
-
static description = `
|
|
201
|
+
static code = "INVALID_SNAPSHOT_ID";
|
|
202
|
+
static statusCode = 400;
|
|
203
|
+
static description = `Invalid snapshot id: {id}`;
|
|
204
204
|
}
|
|
205
|
-
class
|
|
205
|
+
class VmStartTimeoutError extends Error {
|
|
206
206
|
constructor(body) {
|
|
207
207
|
super(
|
|
208
|
-
`
|
|
208
|
+
`VM_START_TIMEOUT: ${body.message}`
|
|
209
209
|
);
|
|
210
210
|
this.body = body;
|
|
211
|
-
this.name = "
|
|
211
|
+
this.name = "VmStartTimeoutError";
|
|
212
212
|
}
|
|
213
|
-
static code = "
|
|
214
|
-
static statusCode =
|
|
215
|
-
static description = `
|
|
213
|
+
static code = "VM_START_TIMEOUT";
|
|
214
|
+
static statusCode = 504;
|
|
215
|
+
static description = `VM did not become ready within the specified timeout`;
|
|
216
216
|
}
|
|
217
|
-
class
|
|
217
|
+
class VmIsSuspendingError extends Error {
|
|
218
218
|
constructor(body) {
|
|
219
219
|
super(
|
|
220
|
-
`
|
|
220
|
+
`VM_IS_SUSPENDING: ${body.message}`
|
|
221
221
|
);
|
|
222
222
|
this.body = body;
|
|
223
|
-
this.name = "
|
|
223
|
+
this.name = "VmIsSuspendingError";
|
|
224
224
|
}
|
|
225
|
-
static code = "
|
|
225
|
+
static code = "VM_IS_SUSPENDING";
|
|
226
|
+
static statusCode = 409;
|
|
227
|
+
static description = `VM is currently being suspended`;
|
|
228
|
+
}
|
|
229
|
+
class VmExitDuringStartError extends Error {
|
|
230
|
+
constructor(body) {
|
|
231
|
+
super(
|
|
232
|
+
`VM_EXIT_DURING_START: ${body.message}`
|
|
233
|
+
);
|
|
234
|
+
this.body = body;
|
|
235
|
+
this.name = "VmExitDuringStartError";
|
|
236
|
+
}
|
|
237
|
+
static code = "VM_EXIT_DURING_START";
|
|
226
238
|
static statusCode = 500;
|
|
227
|
-
static description = `
|
|
239
|
+
static description = `VM process exited unexpectedly during start`;
|
|
228
240
|
}
|
|
229
|
-
class
|
|
241
|
+
class VmAccessDeniedError extends Error {
|
|
230
242
|
constructor(body) {
|
|
231
243
|
super(
|
|
232
|
-
`
|
|
244
|
+
`VM_ACCESS_DENIED: ${body.message}`
|
|
233
245
|
);
|
|
234
246
|
this.body = body;
|
|
235
|
-
this.name = "
|
|
247
|
+
this.name = "VmAccessDeniedError";
|
|
236
248
|
}
|
|
237
|
-
static code = "
|
|
249
|
+
static code = "VM_ACCESS_DENIED";
|
|
250
|
+
static statusCode = 403;
|
|
251
|
+
static description = `You do not have access to this VM`;
|
|
252
|
+
}
|
|
253
|
+
class StdIoError extends Error {
|
|
254
|
+
constructor(body) {
|
|
255
|
+
super(
|
|
256
|
+
`STD_IO: ${body.message}`
|
|
257
|
+
);
|
|
258
|
+
this.body = body;
|
|
259
|
+
this.name = "StdIoError";
|
|
260
|
+
}
|
|
261
|
+
static code = "STD_IO";
|
|
238
262
|
static statusCode = 500;
|
|
239
|
-
static description = `
|
|
263
|
+
static description = `Standard IO error`;
|
|
240
264
|
}
|
|
241
|
-
class
|
|
265
|
+
class FailedToSpawnUffdError extends Error {
|
|
242
266
|
constructor(body) {
|
|
243
267
|
super(
|
|
244
|
-
`
|
|
268
|
+
`FAILED_TO_SPAWN_UFFD: ${body.message}`
|
|
245
269
|
);
|
|
246
270
|
this.body = body;
|
|
247
|
-
this.name = "
|
|
271
|
+
this.name = "FailedToSpawnUffdError";
|
|
248
272
|
}
|
|
249
|
-
static code = "
|
|
273
|
+
static code = "FAILED_TO_SPAWN_UFFD";
|
|
250
274
|
static statusCode = 500;
|
|
251
|
-
static description = `Failed to
|
|
275
|
+
static description = `Failed to spawn UFFD handler '{daemon_name}'`;
|
|
252
276
|
}
|
|
253
|
-
class
|
|
277
|
+
class VmSpawnProcessError extends Error {
|
|
254
278
|
constructor(body) {
|
|
255
279
|
super(
|
|
256
|
-
`
|
|
280
|
+
`VM_SPAWN_PROCESS: ${body.message}`
|
|
257
281
|
);
|
|
258
282
|
this.body = body;
|
|
259
|
-
this.name = "
|
|
283
|
+
this.name = "VmSpawnProcessError";
|
|
260
284
|
}
|
|
261
|
-
static code = "
|
|
262
|
-
static statusCode =
|
|
263
|
-
static description = `
|
|
285
|
+
static code = "VM_SPAWN_PROCESS";
|
|
286
|
+
static statusCode = 500;
|
|
287
|
+
static description = `Failed to spawn process for VM`;
|
|
264
288
|
}
|
|
265
|
-
class
|
|
289
|
+
class VmSubnetNotFoundError extends Error {
|
|
266
290
|
constructor(body) {
|
|
267
291
|
super(
|
|
268
|
-
`
|
|
292
|
+
`VM_SUBNET_NOT_FOUND: ${body.message}`
|
|
269
293
|
);
|
|
270
294
|
this.body = body;
|
|
271
|
-
this.name = "
|
|
295
|
+
this.name = "VmSubnetNotFoundError";
|
|
272
296
|
}
|
|
273
|
-
static code = "
|
|
297
|
+
static code = "VM_SUBNET_NOT_FOUND";
|
|
274
298
|
static statusCode = 500;
|
|
275
|
-
static description = `
|
|
299
|
+
static description = `Subnet for VM not found`;
|
|
276
300
|
}
|
|
277
|
-
class
|
|
301
|
+
class VmOperationDeniedDuringTransactionError extends Error {
|
|
278
302
|
constructor(body) {
|
|
279
303
|
super(
|
|
280
|
-
`
|
|
304
|
+
`VM_OPERATION_DENIED_DURING_TRANSACTION: ${body.message}`
|
|
281
305
|
);
|
|
282
306
|
this.body = body;
|
|
283
|
-
this.name = "
|
|
307
|
+
this.name = "VmOperationDeniedDuringTransactionError";
|
|
284
308
|
}
|
|
285
|
-
static code = "
|
|
309
|
+
static code = "VM_OPERATION_DENIED_DURING_TRANSACTION";
|
|
310
|
+
static statusCode = 409;
|
|
311
|
+
static description = `VM operation denied during active transaction for VM {vm_id} in transaction {transaction_id}`;
|
|
312
|
+
}
|
|
313
|
+
class VmTransactionIdMismatchError extends Error {
|
|
314
|
+
constructor(body) {
|
|
315
|
+
super(
|
|
316
|
+
`VM_TRANSACTION_ID_MISMATCH: ${body.message}`
|
|
317
|
+
);
|
|
318
|
+
this.body = body;
|
|
319
|
+
this.name = "VmTransactionIdMismatchError";
|
|
320
|
+
}
|
|
321
|
+
static code = "VM_TRANSACTION_ID_MISMATCH";
|
|
286
322
|
static statusCode = 400;
|
|
287
|
-
static description = `
|
|
323
|
+
static description = `Transaction ID {provided_transaction_id} does not match the current VM transaction {expected_transaction_id} for VM {vm_id}`;
|
|
324
|
+
}
|
|
325
|
+
class VmNotInTransactionError extends Error {
|
|
326
|
+
constructor(body) {
|
|
327
|
+
super(
|
|
328
|
+
`VM_NOT_IN_TRANSACTION: ${body.message}`
|
|
329
|
+
);
|
|
330
|
+
this.body = body;
|
|
331
|
+
this.name = "VmNotInTransactionError";
|
|
332
|
+
}
|
|
333
|
+
static code = "VM_NOT_IN_TRANSACTION";
|
|
334
|
+
static statusCode = 404;
|
|
335
|
+
static description = `VM not in a transaction: {vm_id}`;
|
|
336
|
+
}
|
|
337
|
+
class VmNotFoundInFsError extends Error {
|
|
338
|
+
constructor(body) {
|
|
339
|
+
super(
|
|
340
|
+
`VM_NOT_FOUND_IN_FS: ${body.message}`
|
|
341
|
+
);
|
|
342
|
+
this.body = body;
|
|
343
|
+
this.name = "VmNotFoundInFsError";
|
|
344
|
+
}
|
|
345
|
+
static code = "VM_NOT_FOUND_IN_FS";
|
|
346
|
+
static statusCode = 406;
|
|
347
|
+
static description = `Vm Not found in filesystem`;
|
|
348
|
+
}
|
|
349
|
+
class VmNotRunningError extends Error {
|
|
350
|
+
constructor(body) {
|
|
351
|
+
super(
|
|
352
|
+
`VM_NOT_RUNNING: ${body.message}`
|
|
353
|
+
);
|
|
354
|
+
this.body = body;
|
|
355
|
+
this.name = "VmNotRunningError";
|
|
356
|
+
}
|
|
357
|
+
static code = "VM_NOT_RUNNING";
|
|
358
|
+
static statusCode = 400;
|
|
359
|
+
static description = `VM is not running: {vm_id}`;
|
|
288
360
|
}
|
|
289
361
|
class VmNotFoundError extends Error {
|
|
290
362
|
constructor(body) {
|
|
@@ -334,533 +406,473 @@ class InternalVmNotFoundError extends Error {
|
|
|
334
406
|
static statusCode = 404;
|
|
335
407
|
static description = `VM not found: {vm_id}`;
|
|
336
408
|
}
|
|
337
|
-
class
|
|
409
|
+
class UserNotFoundError extends Error {
|
|
338
410
|
constructor(body) {
|
|
339
411
|
super(
|
|
340
|
-
`
|
|
412
|
+
`USER_NOT_FOUND: ${body.message}`
|
|
341
413
|
);
|
|
342
414
|
this.body = body;
|
|
343
|
-
this.name = "
|
|
415
|
+
this.name = "UserNotFoundError";
|
|
344
416
|
}
|
|
345
|
-
static code = "
|
|
346
|
-
static statusCode =
|
|
347
|
-
static description = `
|
|
417
|
+
static code = "USER_NOT_FOUND";
|
|
418
|
+
static statusCode = 404;
|
|
419
|
+
static description = `User not found: {user_name}`;
|
|
348
420
|
}
|
|
349
|
-
class
|
|
421
|
+
class UserAlreadyExistsError extends Error {
|
|
350
422
|
constructor(body) {
|
|
351
423
|
super(
|
|
352
|
-
`
|
|
424
|
+
`USER_ALREADY_EXISTS: ${body.message}`
|
|
353
425
|
);
|
|
354
426
|
this.body = body;
|
|
355
|
-
this.name = "
|
|
427
|
+
this.name = "UserAlreadyExistsError";
|
|
356
428
|
}
|
|
357
|
-
static code = "
|
|
358
|
-
static statusCode =
|
|
359
|
-
static description = `
|
|
429
|
+
static code = "USER_ALREADY_EXISTS";
|
|
430
|
+
static statusCode = 409;
|
|
431
|
+
static description = `Conflict: User '{user_name}' already exists`;
|
|
360
432
|
}
|
|
361
|
-
class
|
|
433
|
+
class ValidationErrorError extends Error {
|
|
362
434
|
constructor(body) {
|
|
363
435
|
super(
|
|
364
|
-
`
|
|
436
|
+
`VALIDATION_ERROR: ${body.message}`
|
|
365
437
|
);
|
|
366
438
|
this.body = body;
|
|
367
|
-
this.name = "
|
|
439
|
+
this.name = "ValidationErrorError";
|
|
368
440
|
}
|
|
369
|
-
static code = "
|
|
370
|
-
static statusCode =
|
|
371
|
-
static description = `
|
|
441
|
+
static code = "VALIDATION_ERROR";
|
|
442
|
+
static statusCode = 400;
|
|
443
|
+
static description = `Validation error: {message}`;
|
|
372
444
|
}
|
|
373
|
-
class
|
|
445
|
+
class GroupNotFoundError extends Error {
|
|
374
446
|
constructor(body) {
|
|
375
447
|
super(
|
|
376
|
-
`
|
|
448
|
+
`GROUP_NOT_FOUND: ${body.message}`
|
|
377
449
|
);
|
|
378
450
|
this.body = body;
|
|
379
|
-
this.name = "
|
|
451
|
+
this.name = "GroupNotFoundError";
|
|
380
452
|
}
|
|
381
|
-
static code = "
|
|
453
|
+
static code = "GROUP_NOT_FOUND";
|
|
382
454
|
static statusCode = 404;
|
|
383
|
-
static description = `
|
|
455
|
+
static description = `Group not found: {group_name}`;
|
|
384
456
|
}
|
|
385
|
-
class
|
|
457
|
+
class GroupAlreadyExistsError extends Error {
|
|
386
458
|
constructor(body) {
|
|
387
459
|
super(
|
|
388
|
-
`
|
|
460
|
+
`GROUP_ALREADY_EXISTS: ${body.message}`
|
|
389
461
|
);
|
|
390
462
|
this.body = body;
|
|
391
|
-
this.name = "
|
|
463
|
+
this.name = "GroupAlreadyExistsError";
|
|
392
464
|
}
|
|
393
|
-
static code = "
|
|
394
|
-
static statusCode =
|
|
395
|
-
static description = `
|
|
465
|
+
static code = "GROUP_ALREADY_EXISTS";
|
|
466
|
+
static statusCode = 409;
|
|
467
|
+
static description = `Conflict: Group '{group_name}' already exists`;
|
|
396
468
|
}
|
|
397
|
-
class
|
|
469
|
+
class DuplicateUserNameError extends Error {
|
|
398
470
|
constructor(body) {
|
|
399
471
|
super(
|
|
400
|
-
`
|
|
472
|
+
`DUPLICATE_USER_NAME: ${body.message}`
|
|
401
473
|
);
|
|
402
474
|
this.body = body;
|
|
403
|
-
this.name = "
|
|
475
|
+
this.name = "DuplicateUserNameError";
|
|
404
476
|
}
|
|
405
|
-
static code = "
|
|
406
|
-
static statusCode =
|
|
407
|
-
static description = `
|
|
477
|
+
static code = "DUPLICATE_USER_NAME";
|
|
478
|
+
static statusCode = 400;
|
|
479
|
+
static description = `Duplicate user name '{name}' found`;
|
|
408
480
|
}
|
|
409
|
-
class
|
|
481
|
+
class UserGroupEmptyError extends Error {
|
|
410
482
|
constructor(body) {
|
|
411
483
|
super(
|
|
412
|
-
`
|
|
484
|
+
`USER_GROUP_EMPTY: ${body.message}`
|
|
413
485
|
);
|
|
414
486
|
this.body = body;
|
|
415
|
-
this.name = "
|
|
487
|
+
this.name = "UserGroupEmptyError";
|
|
416
488
|
}
|
|
417
|
-
static code = "
|
|
418
|
-
static statusCode =
|
|
419
|
-
static description = `
|
|
489
|
+
static code = "USER_GROUP_EMPTY";
|
|
490
|
+
static statusCode = 400;
|
|
491
|
+
static description = `User '{user}' has empty string in groups`;
|
|
420
492
|
}
|
|
421
|
-
class
|
|
493
|
+
class UserSystemFlagMismatchError extends Error {
|
|
422
494
|
constructor(body) {
|
|
423
495
|
super(
|
|
424
|
-
`
|
|
496
|
+
`USER_SYSTEM_FLAG_MISMATCH: ${body.message}`
|
|
425
497
|
);
|
|
426
498
|
this.body = body;
|
|
427
|
-
this.name = "
|
|
499
|
+
this.name = "UserSystemFlagMismatchError";
|
|
428
500
|
}
|
|
429
|
-
static code = "
|
|
430
|
-
static statusCode =
|
|
431
|
-
static description = `
|
|
501
|
+
static code = "USER_SYSTEM_FLAG_MISMATCH";
|
|
502
|
+
static statusCode = 400;
|
|
503
|
+
static description = `User '{user}' has system=true but UID {uid} is > 999 (system range)`;
|
|
432
504
|
}
|
|
433
|
-
class
|
|
505
|
+
class UserUidOutOfRangeError extends Error {
|
|
434
506
|
constructor(body) {
|
|
435
507
|
super(
|
|
436
|
-
`
|
|
508
|
+
`USER_UID_OUT_OF_RANGE: ${body.message}`
|
|
437
509
|
);
|
|
438
510
|
this.body = body;
|
|
439
|
-
this.name = "
|
|
511
|
+
this.name = "UserUidOutOfRangeError";
|
|
440
512
|
}
|
|
441
|
-
static code = "
|
|
442
|
-
static statusCode =
|
|
443
|
-
static description = `
|
|
513
|
+
static code = "USER_UID_OUT_OF_RANGE";
|
|
514
|
+
static statusCode = 400;
|
|
515
|
+
static description = `User '{user}' has invalid UID {uid} (must be 0-65535)`;
|
|
444
516
|
}
|
|
445
|
-
class
|
|
517
|
+
class UserHomeInvalidError extends Error {
|
|
446
518
|
constructor(body) {
|
|
447
519
|
super(
|
|
448
|
-
`
|
|
520
|
+
`USER_HOME_INVALID: ${body.message}`
|
|
449
521
|
);
|
|
450
522
|
this.body = body;
|
|
451
|
-
this.name = "
|
|
523
|
+
this.name = "UserHomeInvalidError";
|
|
452
524
|
}
|
|
453
|
-
static code = "
|
|
454
|
-
static statusCode =
|
|
455
|
-
static description = `
|
|
525
|
+
static code = "USER_HOME_INVALID";
|
|
526
|
+
static statusCode = 400;
|
|
527
|
+
static description = `User '{user}' has invalid home path '{home}' (must be absolute path starting with /)`;
|
|
456
528
|
}
|
|
457
|
-
class
|
|
529
|
+
class UserShellInvalidError extends Error {
|
|
458
530
|
constructor(body) {
|
|
459
531
|
super(
|
|
460
|
-
`
|
|
532
|
+
`USER_SHELL_INVALID: ${body.message}`
|
|
461
533
|
);
|
|
462
534
|
this.body = body;
|
|
463
|
-
this.name = "
|
|
535
|
+
this.name = "UserShellInvalidError";
|
|
464
536
|
}
|
|
465
|
-
static code = "
|
|
466
|
-
static statusCode =
|
|
467
|
-
static description = `
|
|
537
|
+
static code = "USER_SHELL_INVALID";
|
|
538
|
+
static statusCode = 400;
|
|
539
|
+
static description = `User '{user}' has invalid shell path '{shell}' (must be absolute path starting with /)`;
|
|
468
540
|
}
|
|
469
|
-
class
|
|
541
|
+
class DuplicateGroupNameError extends Error {
|
|
470
542
|
constructor(body) {
|
|
471
543
|
super(
|
|
472
|
-
`
|
|
544
|
+
`DUPLICATE_GROUP_NAME: ${body.message}`
|
|
473
545
|
);
|
|
474
546
|
this.body = body;
|
|
475
|
-
this.name = "
|
|
547
|
+
this.name = "DuplicateGroupNameError";
|
|
476
548
|
}
|
|
477
|
-
static code = "
|
|
478
|
-
static statusCode =
|
|
479
|
-
static description = `
|
|
549
|
+
static code = "DUPLICATE_GROUP_NAME";
|
|
550
|
+
static statusCode = 400;
|
|
551
|
+
static description = `Duplicate group name '{name}' found`;
|
|
480
552
|
}
|
|
481
|
-
class
|
|
553
|
+
class GroupNameReservedError extends Error {
|
|
482
554
|
constructor(body) {
|
|
483
555
|
super(
|
|
484
|
-
`
|
|
556
|
+
`GROUP_NAME_RESERVED: ${body.message}`
|
|
485
557
|
);
|
|
486
558
|
this.body = body;
|
|
487
|
-
this.name = "
|
|
559
|
+
this.name = "GroupNameReservedError";
|
|
488
560
|
}
|
|
489
|
-
static code = "
|
|
490
|
-
static statusCode =
|
|
491
|
-
static description = `
|
|
561
|
+
static code = "GROUP_NAME_RESERVED";
|
|
562
|
+
static statusCode = 400;
|
|
563
|
+
static description = `Group name '{name}' is reserved and cannot be used`;
|
|
492
564
|
}
|
|
493
|
-
class
|
|
565
|
+
class GroupNameInvalidCharsError extends Error {
|
|
494
566
|
constructor(body) {
|
|
495
567
|
super(
|
|
496
|
-
`
|
|
568
|
+
`GROUP_NAME_INVALID_CHARS: ${body.message}`
|
|
497
569
|
);
|
|
498
570
|
this.body = body;
|
|
499
|
-
this.name = "
|
|
571
|
+
this.name = "GroupNameInvalidCharsError";
|
|
500
572
|
}
|
|
501
|
-
static code = "
|
|
502
|
-
static statusCode =
|
|
503
|
-
static description = `
|
|
573
|
+
static code = "GROUP_NAME_INVALID_CHARS";
|
|
574
|
+
static statusCode = 400;
|
|
575
|
+
static description = `Group name '{name}' contains invalid characters (must match [a-z_][a-z0-9_-]*)`;
|
|
504
576
|
}
|
|
505
|
-
class
|
|
577
|
+
class GroupNameTooLongError extends Error {
|
|
506
578
|
constructor(body) {
|
|
507
579
|
super(
|
|
508
|
-
`
|
|
580
|
+
`GROUP_NAME_TOO_LONG: ${body.message}`
|
|
509
581
|
);
|
|
510
582
|
this.body = body;
|
|
511
|
-
this.name = "
|
|
583
|
+
this.name = "GroupNameTooLongError";
|
|
512
584
|
}
|
|
513
|
-
static code = "
|
|
514
|
-
static statusCode =
|
|
515
|
-
static description = `
|
|
585
|
+
static code = "GROUP_NAME_TOO_LONG";
|
|
586
|
+
static statusCode = 400;
|
|
587
|
+
static description = `Group name '{name}' is too long (max {max_length} characters)`;
|
|
516
588
|
}
|
|
517
|
-
class
|
|
589
|
+
class GroupNameEmptyError extends Error {
|
|
518
590
|
constructor(body) {
|
|
519
591
|
super(
|
|
520
|
-
`
|
|
592
|
+
`GROUP_NAME_EMPTY: ${body.message}`
|
|
521
593
|
);
|
|
522
594
|
this.body = body;
|
|
523
|
-
this.name = "
|
|
595
|
+
this.name = "GroupNameEmptyError";
|
|
524
596
|
}
|
|
525
|
-
static code = "
|
|
526
|
-
static statusCode =
|
|
527
|
-
static description = `
|
|
597
|
+
static code = "GROUP_NAME_EMPTY";
|
|
598
|
+
static statusCode = 400;
|
|
599
|
+
static description = `Group name cannot be empty`;
|
|
528
600
|
}
|
|
529
|
-
class
|
|
601
|
+
class NoDefaultSnapshotAvailableError extends Error {
|
|
530
602
|
constructor(body) {
|
|
531
603
|
super(
|
|
532
|
-
`
|
|
604
|
+
`NO_DEFAULT_SNAPSHOT_AVAILABLE: ${body.message}`
|
|
533
605
|
);
|
|
534
606
|
this.body = body;
|
|
535
|
-
this.name = "
|
|
607
|
+
this.name = "NoDefaultSnapshotAvailableError";
|
|
536
608
|
}
|
|
537
|
-
static code = "
|
|
538
|
-
static statusCode =
|
|
539
|
-
static description = `
|
|
609
|
+
static code = "NO_DEFAULT_SNAPSHOT_AVAILABLE";
|
|
610
|
+
static statusCode = 404;
|
|
611
|
+
static description = `No default snapshot available for account {account_id}`;
|
|
540
612
|
}
|
|
541
|
-
class
|
|
613
|
+
class DockerSnapshotFailedError extends Error {
|
|
542
614
|
constructor(body) {
|
|
543
615
|
super(
|
|
544
|
-
`
|
|
616
|
+
`DOCKER_SNAPSHOT_FAILED: ${body.message}`
|
|
545
617
|
);
|
|
546
618
|
this.body = body;
|
|
547
|
-
this.name = "
|
|
619
|
+
this.name = "DockerSnapshotFailedError";
|
|
548
620
|
}
|
|
549
|
-
static code = "
|
|
621
|
+
static code = "DOCKER_SNAPSHOT_FAILED";
|
|
550
622
|
static statusCode = 500;
|
|
551
|
-
static description = `
|
|
623
|
+
static description = `Failed to create snapshot from Docker image {docker_image} for account {account_id}: {details}`;
|
|
552
624
|
}
|
|
553
|
-
class
|
|
625
|
+
class SetDefaultSnapshotFailedError extends Error {
|
|
554
626
|
constructor(body) {
|
|
555
627
|
super(
|
|
556
|
-
`
|
|
628
|
+
`SET_DEFAULT_SNAPSHOT_FAILED: ${body.message}`
|
|
557
629
|
);
|
|
558
630
|
this.body = body;
|
|
559
|
-
this.name = "
|
|
631
|
+
this.name = "SetDefaultSnapshotFailedError";
|
|
560
632
|
}
|
|
561
|
-
static code = "
|
|
633
|
+
static code = "SET_DEFAULT_SNAPSHOT_FAILED";
|
|
562
634
|
static statusCode = 500;
|
|
563
|
-
static description = `
|
|
635
|
+
static description = `Failed to update default snapshot in database for account {account_id}, snapshot {snapshot_id}: {details}`;
|
|
564
636
|
}
|
|
565
|
-
class
|
|
637
|
+
class SnapshotLayerCreationFailedError extends Error {
|
|
566
638
|
constructor(body) {
|
|
567
639
|
super(
|
|
568
|
-
`
|
|
640
|
+
`SNAPSHOT_LAYER_CREATION_FAILED: ${body.message}`
|
|
569
641
|
);
|
|
570
642
|
this.body = body;
|
|
571
|
-
this.name = "
|
|
643
|
+
this.name = "SnapshotLayerCreationFailedError";
|
|
572
644
|
}
|
|
573
|
-
static code = "
|
|
645
|
+
static code = "SNAPSHOT_LAYER_CREATION_FAILED";
|
|
574
646
|
static statusCode = 500;
|
|
575
|
-
static description = `
|
|
576
|
-
}
|
|
577
|
-
class InvalidSnapshotIdError extends Error {
|
|
578
|
-
constructor(body) {
|
|
579
|
-
super(
|
|
580
|
-
`INVALID_SNAPSHOT_ID: ${body.message}`
|
|
581
|
-
);
|
|
582
|
-
this.body = body;
|
|
583
|
-
this.name = "InvalidSnapshotIdError";
|
|
584
|
-
}
|
|
585
|
-
static code = "INVALID_SNAPSHOT_ID";
|
|
586
|
-
static statusCode = 400;
|
|
587
|
-
static description = `Invalid snapshot id: {id}`;
|
|
588
|
-
}
|
|
589
|
-
class VmStartTimeoutError extends Error {
|
|
590
|
-
constructor(body) {
|
|
591
|
-
super(
|
|
592
|
-
`VM_START_TIMEOUT: ${body.message}`
|
|
593
|
-
);
|
|
594
|
-
this.body = body;
|
|
595
|
-
this.name = "VmStartTimeoutError";
|
|
596
|
-
}
|
|
597
|
-
static code = "VM_START_TIMEOUT";
|
|
598
|
-
static statusCode = 504;
|
|
599
|
-
static description = `VM did not become ready within the specified timeout`;
|
|
647
|
+
static description = `Failed to create snapshot layer for account {account_id} from {source_snapshot_dir}: {details}`;
|
|
600
648
|
}
|
|
601
|
-
class
|
|
649
|
+
class SnapshotDirNotFoundError extends Error {
|
|
602
650
|
constructor(body) {
|
|
603
651
|
super(
|
|
604
|
-
`
|
|
652
|
+
`SNAPSHOT_DIR_NOT_FOUND: ${body.message}`
|
|
605
653
|
);
|
|
606
654
|
this.body = body;
|
|
607
|
-
this.name = "
|
|
655
|
+
this.name = "SnapshotDirNotFoundError";
|
|
608
656
|
}
|
|
609
|
-
static code = "
|
|
657
|
+
static code = "SNAPSHOT_DIR_NOT_FOUND";
|
|
610
658
|
static statusCode = 500;
|
|
611
|
-
static description = `
|
|
659
|
+
static description = `Snapshot directory not found at {snapshot_dir} for account {account_id}, snapshot {snapshot_id}`;
|
|
612
660
|
}
|
|
613
|
-
class
|
|
661
|
+
class SubvolumeCreationFailedError extends Error {
|
|
614
662
|
constructor(body) {
|
|
615
663
|
super(
|
|
616
|
-
`
|
|
664
|
+
`SUBVOLUME_CREATION_FAILED: ${body.message}`
|
|
617
665
|
);
|
|
618
666
|
this.body = body;
|
|
619
|
-
this.name = "
|
|
667
|
+
this.name = "SubvolumeCreationFailedError";
|
|
620
668
|
}
|
|
621
|
-
static code = "
|
|
622
|
-
static statusCode =
|
|
623
|
-
static description = `
|
|
669
|
+
static code = "SUBVOLUME_CREATION_FAILED";
|
|
670
|
+
static statusCode = 500;
|
|
671
|
+
static description = `Failed to create account subvolume for account {account_id}: {details}`;
|
|
624
672
|
}
|
|
625
|
-
class
|
|
673
|
+
class GetDefaultSnapshotFailedError extends Error {
|
|
626
674
|
constructor(body) {
|
|
627
675
|
super(
|
|
628
|
-
`
|
|
676
|
+
`GET_DEFAULT_SNAPSHOT_FAILED: ${body.message}`
|
|
629
677
|
);
|
|
630
678
|
this.body = body;
|
|
631
|
-
this.name = "
|
|
679
|
+
this.name = "GetDefaultSnapshotFailedError";
|
|
632
680
|
}
|
|
633
|
-
static code = "
|
|
681
|
+
static code = "GET_DEFAULT_SNAPSHOT_FAILED";
|
|
634
682
|
static statusCode = 500;
|
|
635
|
-
static description = `
|
|
683
|
+
static description = `Failed to query account default snapshot for account {account_id}: {details}`;
|
|
636
684
|
}
|
|
637
|
-
class
|
|
685
|
+
class SnapshotSetupFailedError extends Error {
|
|
638
686
|
constructor(body) {
|
|
639
687
|
super(
|
|
640
|
-
`
|
|
688
|
+
`SNAPSHOT_SETUP_FAILED: ${body.message}`
|
|
641
689
|
);
|
|
642
690
|
this.body = body;
|
|
643
|
-
this.name = "
|
|
691
|
+
this.name = "SnapshotSetupFailedError";
|
|
644
692
|
}
|
|
645
|
-
static code = "
|
|
693
|
+
static code = "SNAPSHOT_SETUP_FAILED";
|
|
646
694
|
static statusCode = 500;
|
|
647
|
-
static description = `
|
|
695
|
+
static description = `Snapshot setup failed: {failed_reason}`;
|
|
648
696
|
}
|
|
649
|
-
class
|
|
697
|
+
class SnapshotVmBadRequestError extends Error {
|
|
650
698
|
constructor(body) {
|
|
651
699
|
super(
|
|
652
|
-
`
|
|
700
|
+
`SNAPSHOT_VM_BAD_REQUEST: ${body.message}`
|
|
653
701
|
);
|
|
654
702
|
this.body = body;
|
|
655
|
-
this.name = "
|
|
703
|
+
this.name = "SnapshotVmBadRequestError";
|
|
656
704
|
}
|
|
657
|
-
static code = "
|
|
658
|
-
static statusCode =
|
|
659
|
-
static description = `
|
|
705
|
+
static code = "SNAPSHOT_VM_BAD_REQUEST";
|
|
706
|
+
static statusCode = 400;
|
|
707
|
+
static description = `Bad request: {message}`;
|
|
660
708
|
}
|
|
661
|
-
class
|
|
709
|
+
class DatabaseErrorError extends Error {
|
|
662
710
|
constructor(body) {
|
|
663
711
|
super(
|
|
664
|
-
`
|
|
712
|
+
`DATABASE_ERROR: ${body.message}`
|
|
665
713
|
);
|
|
666
714
|
this.body = body;
|
|
667
|
-
this.name = "
|
|
715
|
+
this.name = "DatabaseErrorError";
|
|
668
716
|
}
|
|
669
|
-
static code = "
|
|
717
|
+
static code = "DATABASE_ERROR";
|
|
670
718
|
static statusCode = 500;
|
|
671
|
-
static description = `
|
|
719
|
+
static description = `Database error occurred while constructing VmRecord, details: {details}`;
|
|
672
720
|
}
|
|
673
|
-
class
|
|
721
|
+
class PartitionNotFoundError extends Error {
|
|
674
722
|
constructor(body) {
|
|
675
723
|
super(
|
|
676
|
-
`
|
|
724
|
+
`PARTITION_NOT_FOUND: ${body.message}`
|
|
677
725
|
);
|
|
678
726
|
this.body = body;
|
|
679
|
-
this.name = "
|
|
727
|
+
this.name = "PartitionNotFoundError";
|
|
680
728
|
}
|
|
681
|
-
static code = "
|
|
729
|
+
static code = "PARTITION_NOT_FOUND";
|
|
682
730
|
static statusCode = 404;
|
|
683
|
-
static description = `
|
|
684
|
-
}
|
|
685
|
-
class UserAlreadyExistsError extends Error {
|
|
686
|
-
constructor(body) {
|
|
687
|
-
super(
|
|
688
|
-
`USER_ALREADY_EXISTS: ${body.message}`
|
|
689
|
-
);
|
|
690
|
-
this.body = body;
|
|
691
|
-
this.name = "UserAlreadyExistsError";
|
|
692
|
-
}
|
|
693
|
-
static code = "USER_ALREADY_EXISTS";
|
|
694
|
-
static statusCode = 409;
|
|
695
|
-
static description = `Conflict: User '{user_name}' already exists`;
|
|
731
|
+
static description = `Partition not found: {partition_id}`;
|
|
696
732
|
}
|
|
697
|
-
class
|
|
733
|
+
class InvalidVmIdError extends Error {
|
|
698
734
|
constructor(body) {
|
|
699
735
|
super(
|
|
700
|
-
`
|
|
736
|
+
`INVALID_VM_ID: ${body.message}`
|
|
701
737
|
);
|
|
702
738
|
this.body = body;
|
|
703
|
-
this.name = "
|
|
739
|
+
this.name = "InvalidVmIdError";
|
|
704
740
|
}
|
|
705
|
-
static code = "
|
|
741
|
+
static code = "INVALID_VM_ID";
|
|
706
742
|
static statusCode = 400;
|
|
707
|
-
static description = `
|
|
708
|
-
}
|
|
709
|
-
class GroupNotFoundError extends Error {
|
|
710
|
-
constructor(body) {
|
|
711
|
-
super(
|
|
712
|
-
`GROUP_NOT_FOUND: ${body.message}`
|
|
713
|
-
);
|
|
714
|
-
this.body = body;
|
|
715
|
-
this.name = "GroupNotFoundError";
|
|
716
|
-
}
|
|
717
|
-
static code = "GROUP_NOT_FOUND";
|
|
718
|
-
static statusCode = 404;
|
|
719
|
-
static description = `Group not found: {group_name}`;
|
|
720
|
-
}
|
|
721
|
-
class GroupAlreadyExistsError extends Error {
|
|
722
|
-
constructor(body) {
|
|
723
|
-
super(
|
|
724
|
-
`GROUP_ALREADY_EXISTS: ${body.message}`
|
|
725
|
-
);
|
|
726
|
-
this.body = body;
|
|
727
|
-
this.name = "GroupAlreadyExistsError";
|
|
728
|
-
}
|
|
729
|
-
static code = "GROUP_ALREADY_EXISTS";
|
|
730
|
-
static statusCode = 409;
|
|
731
|
-
static description = `Conflict: Group '{group_name}' already exists`;
|
|
743
|
+
static description = `Invalid VM ID: {vm_id}, details: {details}`;
|
|
732
744
|
}
|
|
733
|
-
class
|
|
745
|
+
class SuspendFailedAndStopFailedError extends Error {
|
|
734
746
|
constructor(body) {
|
|
735
747
|
super(
|
|
736
|
-
`
|
|
748
|
+
`SUSPEND_FAILED_AND_STOP_FAILED: ${body.message}`
|
|
737
749
|
);
|
|
738
750
|
this.body = body;
|
|
739
|
-
this.name = "
|
|
751
|
+
this.name = "SuspendFailedAndStopFailedError";
|
|
740
752
|
}
|
|
741
|
-
static code = "
|
|
742
|
-
static statusCode =
|
|
743
|
-
static description = `
|
|
753
|
+
static code = "SUSPEND_FAILED_AND_STOP_FAILED";
|
|
754
|
+
static statusCode = 500;
|
|
755
|
+
static description = `Failed to gracefully suspend or stop VM`;
|
|
744
756
|
}
|
|
745
|
-
class
|
|
757
|
+
class SuspendFailedAndStoppedError extends Error {
|
|
746
758
|
constructor(body) {
|
|
747
759
|
super(
|
|
748
|
-
`
|
|
760
|
+
`SUSPEND_FAILED_AND_STOPPED: ${body.message}`
|
|
749
761
|
);
|
|
750
762
|
this.body = body;
|
|
751
|
-
this.name = "
|
|
763
|
+
this.name = "SuspendFailedAndStoppedError";
|
|
752
764
|
}
|
|
753
|
-
static code = "
|
|
754
|
-
static statusCode =
|
|
755
|
-
static description = `
|
|
765
|
+
static code = "SUSPEND_FAILED_AND_STOPPED";
|
|
766
|
+
static statusCode = 500;
|
|
767
|
+
static description = `Failed to gracefully suspend, stopped VM`;
|
|
756
768
|
}
|
|
757
|
-
class
|
|
769
|
+
class FileNotFoundError extends Error {
|
|
758
770
|
constructor(body) {
|
|
759
771
|
super(
|
|
760
|
-
`
|
|
772
|
+
`FILE_NOT_FOUND: ${body.message}`
|
|
761
773
|
);
|
|
762
774
|
this.body = body;
|
|
763
|
-
this.name = "
|
|
775
|
+
this.name = "FileNotFoundError";
|
|
764
776
|
}
|
|
765
|
-
static code = "
|
|
766
|
-
static statusCode =
|
|
767
|
-
static description = `
|
|
777
|
+
static code = "FILE_NOT_FOUND";
|
|
778
|
+
static statusCode = 404;
|
|
779
|
+
static description = `File not found: {path}`;
|
|
768
780
|
}
|
|
769
|
-
class
|
|
781
|
+
class FilesBadRequestError extends Error {
|
|
770
782
|
constructor(body) {
|
|
771
783
|
super(
|
|
772
|
-
`
|
|
784
|
+
`FILES_BAD_REQUEST: ${body.message}`
|
|
773
785
|
);
|
|
774
786
|
this.body = body;
|
|
775
|
-
this.name = "
|
|
787
|
+
this.name = "FilesBadRequestError";
|
|
776
788
|
}
|
|
777
|
-
static code = "
|
|
789
|
+
static code = "FILES_BAD_REQUEST";
|
|
778
790
|
static statusCode = 400;
|
|
779
|
-
static description = `
|
|
791
|
+
static description = `Bad request: {message}`;
|
|
780
792
|
}
|
|
781
|
-
class
|
|
793
|
+
class InvalidGitRepoSpecErrorError extends Error {
|
|
782
794
|
constructor(body) {
|
|
783
795
|
super(
|
|
784
|
-
`
|
|
796
|
+
`INVALID_GIT_REPO_SPEC_ERROR: ${body.message}`
|
|
785
797
|
);
|
|
786
798
|
this.body = body;
|
|
787
|
-
this.name = "
|
|
799
|
+
this.name = "InvalidGitRepoSpecErrorError";
|
|
788
800
|
}
|
|
789
|
-
static code = "
|
|
801
|
+
static code = "INVALID_GIT_REPO_SPEC_ERROR";
|
|
790
802
|
static statusCode = 400;
|
|
791
|
-
static description = `
|
|
803
|
+
static description = `Invalid git repository specification: {message}`;
|
|
792
804
|
}
|
|
793
|
-
class
|
|
805
|
+
class InternalErrorError extends Error {
|
|
794
806
|
constructor(body) {
|
|
795
807
|
super(
|
|
796
|
-
`
|
|
808
|
+
`INTERNAL_ERROR: ${body.message}`
|
|
797
809
|
);
|
|
798
810
|
this.body = body;
|
|
799
|
-
this.name = "
|
|
811
|
+
this.name = "InternalErrorError";
|
|
800
812
|
}
|
|
801
|
-
static code = "
|
|
802
|
-
static statusCode =
|
|
803
|
-
static description = `
|
|
813
|
+
static code = "INTERNAL_ERROR";
|
|
814
|
+
static statusCode = 500;
|
|
815
|
+
static description = `Internal error: {message}`;
|
|
804
816
|
}
|
|
805
|
-
class
|
|
817
|
+
class ForkVmNotFoundError extends Error {
|
|
806
818
|
constructor(body) {
|
|
807
819
|
super(
|
|
808
|
-
`
|
|
820
|
+
`FORK_VM_NOT_FOUND: ${body.message}`
|
|
809
821
|
);
|
|
810
822
|
this.body = body;
|
|
811
|
-
this.name = "
|
|
823
|
+
this.name = "ForkVmNotFoundError";
|
|
812
824
|
}
|
|
813
|
-
static code = "
|
|
814
|
-
static statusCode =
|
|
815
|
-
static description = `
|
|
825
|
+
static code = "FORK_VM_NOT_FOUND";
|
|
826
|
+
static statusCode = 404;
|
|
827
|
+
static description = `Fork VM not found: {fork_vm_id}`;
|
|
816
828
|
}
|
|
817
|
-
class
|
|
829
|
+
class CreateSnapshotBadRequestError extends Error {
|
|
818
830
|
constructor(body) {
|
|
819
831
|
super(
|
|
820
|
-
`
|
|
832
|
+
`CREATE_SNAPSHOT_BAD_REQUEST: ${body.message}`
|
|
821
833
|
);
|
|
822
834
|
this.body = body;
|
|
823
|
-
this.name = "
|
|
835
|
+
this.name = "CreateSnapshotBadRequestError";
|
|
824
836
|
}
|
|
825
|
-
static code = "
|
|
837
|
+
static code = "CREATE_SNAPSHOT_BAD_REQUEST";
|
|
826
838
|
static statusCode = 400;
|
|
827
|
-
static description = `
|
|
839
|
+
static description = `Bad request: {message}`;
|
|
828
840
|
}
|
|
829
|
-
class
|
|
841
|
+
class ActiveTransactionErrorError extends Error {
|
|
830
842
|
constructor(body) {
|
|
831
843
|
super(
|
|
832
|
-
`
|
|
844
|
+
`ACTIVE_TRANSACTION_ERROR: ${body.message}`
|
|
833
845
|
);
|
|
834
846
|
this.body = body;
|
|
835
|
-
this.name = "
|
|
847
|
+
this.name = "ActiveTransactionErrorError";
|
|
836
848
|
}
|
|
837
|
-
static code = "
|
|
838
|
-
static statusCode =
|
|
839
|
-
static description = `
|
|
849
|
+
static code = "ACTIVE_TRANSACTION_ERROR";
|
|
850
|
+
static statusCode = 500;
|
|
851
|
+
static description = `Active transaction error: {details}`;
|
|
840
852
|
}
|
|
841
|
-
class
|
|
853
|
+
class SwapVmTapError extends Error {
|
|
842
854
|
constructor(body) {
|
|
843
855
|
super(
|
|
844
|
-
`
|
|
856
|
+
`SWAP_VM_TAP: ${body.message}`
|
|
845
857
|
);
|
|
846
858
|
this.body = body;
|
|
847
|
-
this.name = "
|
|
859
|
+
this.name = "SwapVmTapError";
|
|
848
860
|
}
|
|
849
|
-
static code = "
|
|
850
|
-
static statusCode =
|
|
851
|
-
static description = `
|
|
861
|
+
static code = "SWAP_VM_TAP";
|
|
862
|
+
static statusCode = 500;
|
|
863
|
+
static description = `Failed to swap tap device: {details}`;
|
|
852
864
|
}
|
|
853
|
-
class
|
|
865
|
+
class RootfsCopyErrorError extends Error {
|
|
854
866
|
constructor(body) {
|
|
855
867
|
super(
|
|
856
|
-
`
|
|
868
|
+
`ROOTFS_COPY_ERROR: ${body.message}`
|
|
857
869
|
);
|
|
858
870
|
this.body = body;
|
|
859
|
-
this.name = "
|
|
871
|
+
this.name = "RootfsCopyErrorError";
|
|
860
872
|
}
|
|
861
|
-
static code = "
|
|
862
|
-
static statusCode =
|
|
863
|
-
static description = `
|
|
873
|
+
static code = "ROOTFS_COPY_ERROR";
|
|
874
|
+
static statusCode = 500;
|
|
875
|
+
static description = `Failed to copy rootfs from {from} to {to}: {details}`;
|
|
864
876
|
}
|
|
865
877
|
class CreateVmBadRequestError extends Error {
|
|
866
878
|
constructor(body) {
|
|
@@ -1208,31 +1220,79 @@ class ForbiddenError extends Error {
|
|
|
1208
1220
|
}
|
|
1209
1221
|
static code = "FORBIDDEN";
|
|
1210
1222
|
static statusCode = 403;
|
|
1211
|
-
static description = `
|
|
1223
|
+
static description = `You do not have permission to push to this repository`;
|
|
1212
1224
|
}
|
|
1213
|
-
class
|
|
1225
|
+
class UnauthorizedError extends Error {
|
|
1214
1226
|
constructor(body) {
|
|
1215
1227
|
super(
|
|
1216
|
-
`
|
|
1228
|
+
`UNAUTHORIZED: ${body.message}`
|
|
1217
1229
|
);
|
|
1218
1230
|
this.body = body;
|
|
1219
|
-
this.name = "
|
|
1231
|
+
this.name = "UnauthorizedError";
|
|
1220
1232
|
}
|
|
1221
|
-
static code = "
|
|
1222
|
-
static statusCode =
|
|
1223
|
-
static description = `
|
|
1233
|
+
static code = "UNAUTHORIZED";
|
|
1234
|
+
static statusCode = 401;
|
|
1235
|
+
static description = `Unauthorized`;
|
|
1224
1236
|
}
|
|
1225
|
-
class
|
|
1237
|
+
class BlobNotFoundError extends Error {
|
|
1226
1238
|
constructor(body) {
|
|
1227
1239
|
super(
|
|
1228
|
-
`
|
|
1240
|
+
`BLOB_NOT_FOUND: ${body.message}`
|
|
1229
1241
|
);
|
|
1230
1242
|
this.body = body;
|
|
1231
|
-
this.name = "
|
|
1243
|
+
this.name = "BlobNotFoundError";
|
|
1232
1244
|
}
|
|
1233
|
-
static code = "
|
|
1245
|
+
static code = "BLOB_NOT_FOUND";
|
|
1234
1246
|
static statusCode = 404;
|
|
1235
|
-
static description = `
|
|
1247
|
+
static description = `Blob not found: {hash}`;
|
|
1248
|
+
}
|
|
1249
|
+
class InvalidRangeError extends Error {
|
|
1250
|
+
constructor(body) {
|
|
1251
|
+
super(
|
|
1252
|
+
`INVALID_RANGE: ${body.message}`
|
|
1253
|
+
);
|
|
1254
|
+
this.body = body;
|
|
1255
|
+
this.name = "InvalidRangeError";
|
|
1256
|
+
}
|
|
1257
|
+
static code = "INVALID_RANGE";
|
|
1258
|
+
static statusCode = 400;
|
|
1259
|
+
static description = `Invalid range: 'until' commit ({until}) must be a descendant of 'since' commit ({since}). In other words, 'until' must be newer than 'since' in the commit graph.`;
|
|
1260
|
+
}
|
|
1261
|
+
class OffsetWithSelectorError extends Error {
|
|
1262
|
+
constructor(body) {
|
|
1263
|
+
super(
|
|
1264
|
+
`OFFSET_WITH_SELECTOR: ${body.message}`
|
|
1265
|
+
);
|
|
1266
|
+
this.body = body;
|
|
1267
|
+
this.name = "OffsetWithSelectorError";
|
|
1268
|
+
}
|
|
1269
|
+
static code = "OFFSET_WITH_SELECTOR";
|
|
1270
|
+
static statusCode = 400;
|
|
1271
|
+
static description = `Cannot use 'offset' parameter together with 'since' or 'until'. Use 'since' for cursor-based pagination.`;
|
|
1272
|
+
}
|
|
1273
|
+
class CommitNotInBranchError extends Error {
|
|
1274
|
+
constructor(body) {
|
|
1275
|
+
super(
|
|
1276
|
+
`COMMIT_NOT_IN_BRANCH: ${body.message}`
|
|
1277
|
+
);
|
|
1278
|
+
this.body = body;
|
|
1279
|
+
this.name = "CommitNotInBranchError";
|
|
1280
|
+
}
|
|
1281
|
+
static code = "COMMIT_NOT_IN_BRANCH";
|
|
1282
|
+
static statusCode = 400;
|
|
1283
|
+
static description = `Commit {sha} is not in the history of branch {branch}`;
|
|
1284
|
+
}
|
|
1285
|
+
class CommitNotFoundError extends Error {
|
|
1286
|
+
constructor(body) {
|
|
1287
|
+
super(
|
|
1288
|
+
`COMMIT_NOT_FOUND: ${body.message}`
|
|
1289
|
+
);
|
|
1290
|
+
this.body = body;
|
|
1291
|
+
this.name = "CommitNotFoundError";
|
|
1292
|
+
}
|
|
1293
|
+
static code = "COMMIT_NOT_FOUND";
|
|
1294
|
+
static statusCode = 400;
|
|
1295
|
+
static description = `Commit not found: {sha}`;
|
|
1236
1296
|
}
|
|
1237
1297
|
class BranchNotFoundError extends Error {
|
|
1238
1298
|
constructor(body) {
|
|
@@ -1246,6 +1306,126 @@ class BranchNotFoundError extends Error {
|
|
|
1246
1306
|
static statusCode = 404;
|
|
1247
1307
|
static description = `Branch not found: {branch}`;
|
|
1248
1308
|
}
|
|
1309
|
+
class NoDefaultBranchError extends Error {
|
|
1310
|
+
constructor(body) {
|
|
1311
|
+
super(
|
|
1312
|
+
`NO_DEFAULT_BRANCH: ${body.message}`
|
|
1313
|
+
);
|
|
1314
|
+
this.body = body;
|
|
1315
|
+
this.name = "NoDefaultBranchError";
|
|
1316
|
+
}
|
|
1317
|
+
static code = "NO_DEFAULT_BRANCH";
|
|
1318
|
+
static statusCode = 404;
|
|
1319
|
+
static description = `Repository has no default branch configured`;
|
|
1320
|
+
}
|
|
1321
|
+
class InvalidBase64ContentError extends Error {
|
|
1322
|
+
constructor(body) {
|
|
1323
|
+
super(
|
|
1324
|
+
`INVALID_BASE64_CONTENT: ${body.message}`
|
|
1325
|
+
);
|
|
1326
|
+
this.body = body;
|
|
1327
|
+
this.name = "InvalidBase64ContentError";
|
|
1328
|
+
}
|
|
1329
|
+
static code = "INVALID_BASE64_CONTENT";
|
|
1330
|
+
static statusCode = 400;
|
|
1331
|
+
static description = `Invalid base64 content for file: {path}`;
|
|
1332
|
+
}
|
|
1333
|
+
class InvalidFileChangeError extends Error {
|
|
1334
|
+
constructor(body) {
|
|
1335
|
+
super(
|
|
1336
|
+
`INVALID_FILE_CHANGE: ${body.message}`
|
|
1337
|
+
);
|
|
1338
|
+
this.body = body;
|
|
1339
|
+
this.name = "InvalidFileChangeError";
|
|
1340
|
+
}
|
|
1341
|
+
static code = "INVALID_FILE_CHANGE";
|
|
1342
|
+
static statusCode = 400;
|
|
1343
|
+
static description = `File change must have either content or deleted flag, not both: {path}`;
|
|
1344
|
+
}
|
|
1345
|
+
class InvalidFilePathError extends Error {
|
|
1346
|
+
constructor(body) {
|
|
1347
|
+
super(
|
|
1348
|
+
`INVALID_FILE_PATH: ${body.message}`
|
|
1349
|
+
);
|
|
1350
|
+
this.body = body;
|
|
1351
|
+
this.name = "InvalidFilePathError";
|
|
1352
|
+
}
|
|
1353
|
+
static code = "INVALID_FILE_PATH";
|
|
1354
|
+
static statusCode = 400;
|
|
1355
|
+
static description = `Invalid file path: {path}`;
|
|
1356
|
+
}
|
|
1357
|
+
class ConflictingParentError extends Error {
|
|
1358
|
+
constructor(body) {
|
|
1359
|
+
super(
|
|
1360
|
+
`CONFLICTING_PARENT: ${body.message}`
|
|
1361
|
+
);
|
|
1362
|
+
this.body = body;
|
|
1363
|
+
this.name = "ConflictingParentError";
|
|
1364
|
+
}
|
|
1365
|
+
static code = "CONFLICTING_PARENT";
|
|
1366
|
+
static statusCode = 409;
|
|
1367
|
+
static description = `Conflict: expected parent SHA {expected} but current is {actual:?}`;
|
|
1368
|
+
}
|
|
1369
|
+
class AmbiguousError extends Error {
|
|
1370
|
+
constructor(body) {
|
|
1371
|
+
super(
|
|
1372
|
+
`AMBIGUOUS: ${body.message}`
|
|
1373
|
+
);
|
|
1374
|
+
this.body = body;
|
|
1375
|
+
this.name = "AmbiguousError";
|
|
1376
|
+
}
|
|
1377
|
+
static code = "AMBIGUOUS";
|
|
1378
|
+
static statusCode = 400;
|
|
1379
|
+
static description = `rev is ambiguous: {rev}`;
|
|
1380
|
+
}
|
|
1381
|
+
class NotFoundError extends Error {
|
|
1382
|
+
constructor(body) {
|
|
1383
|
+
super(
|
|
1384
|
+
`NOT_FOUND: ${body.message}`
|
|
1385
|
+
);
|
|
1386
|
+
this.body = body;
|
|
1387
|
+
this.name = "NotFoundError";
|
|
1388
|
+
}
|
|
1389
|
+
static code = "NOT_FOUND";
|
|
1390
|
+
static statusCode = 404;
|
|
1391
|
+
static description = `rev not found: {rev}`;
|
|
1392
|
+
}
|
|
1393
|
+
class InvalidError extends Error {
|
|
1394
|
+
constructor(body) {
|
|
1395
|
+
super(
|
|
1396
|
+
`INVALID: ${body.message}`
|
|
1397
|
+
);
|
|
1398
|
+
this.body = body;
|
|
1399
|
+
this.name = "InvalidError";
|
|
1400
|
+
}
|
|
1401
|
+
static code = "INVALID";
|
|
1402
|
+
static statusCode = 400;
|
|
1403
|
+
static description = `invalid rev syntax: {rev}`;
|
|
1404
|
+
}
|
|
1405
|
+
class UnsupportedTransferError extends Error {
|
|
1406
|
+
constructor(body) {
|
|
1407
|
+
super(
|
|
1408
|
+
`UNSUPPORTED_TRANSFER: ${body.message}`
|
|
1409
|
+
);
|
|
1410
|
+
this.body = body;
|
|
1411
|
+
this.name = "UnsupportedTransferError";
|
|
1412
|
+
}
|
|
1413
|
+
static code = "UNSUPPORTED_TRANSFER";
|
|
1414
|
+
static statusCode = 400;
|
|
1415
|
+
static description = `Unsupported LFS transfer protocol(s)`;
|
|
1416
|
+
}
|
|
1417
|
+
class TreeNotFoundError extends Error {
|
|
1418
|
+
constructor(body) {
|
|
1419
|
+
super(
|
|
1420
|
+
`TREE_NOT_FOUND: ${body.message}`
|
|
1421
|
+
);
|
|
1422
|
+
this.body = body;
|
|
1423
|
+
this.name = "TreeNotFoundError";
|
|
1424
|
+
}
|
|
1425
|
+
static code = "TREE_NOT_FOUND";
|
|
1426
|
+
static statusCode = 404;
|
|
1427
|
+
static description = `Tree not found: {hash}`;
|
|
1428
|
+
}
|
|
1249
1429
|
class ParentNotFoundError extends Error {
|
|
1250
1430
|
constructor(body) {
|
|
1251
1431
|
super(
|
|
@@ -1266,33 +1446,81 @@ class InvalidServiceError extends Error {
|
|
|
1266
1446
|
this.body = body;
|
|
1267
1447
|
this.name = "InvalidServiceError";
|
|
1268
1448
|
}
|
|
1269
|
-
static code = "INVALID_SERVICE";
|
|
1270
|
-
static statusCode = 403;
|
|
1271
|
-
static description = `Invalid service '{invalid}', expected 'git-upload-pack' or 'git-receive-pack'`;
|
|
1449
|
+
static code = "INVALID_SERVICE";
|
|
1450
|
+
static statusCode = 403;
|
|
1451
|
+
static description = `Invalid service '{invalid}', expected 'git-upload-pack' or 'git-receive-pack'`;
|
|
1452
|
+
}
|
|
1453
|
+
class ExpectedServiceError extends Error {
|
|
1454
|
+
constructor(body) {
|
|
1455
|
+
super(
|
|
1456
|
+
`EXPECTED_SERVICE: ${body.message}`
|
|
1457
|
+
);
|
|
1458
|
+
this.body = body;
|
|
1459
|
+
this.name = "ExpectedServiceError";
|
|
1460
|
+
}
|
|
1461
|
+
static code = "EXPECTED_SERVICE";
|
|
1462
|
+
static statusCode = 403;
|
|
1463
|
+
static description = `Expected 'service' query parameter`;
|
|
1464
|
+
}
|
|
1465
|
+
class PathNotFoundError extends Error {
|
|
1466
|
+
constructor(body) {
|
|
1467
|
+
super(
|
|
1468
|
+
`PATH_NOT_FOUND: ${body.message}`
|
|
1469
|
+
);
|
|
1470
|
+
this.body = body;
|
|
1471
|
+
this.name = "PathNotFoundError";
|
|
1472
|
+
}
|
|
1473
|
+
static code = "PATH_NOT_FOUND";
|
|
1474
|
+
static statusCode = 404;
|
|
1475
|
+
static description = `Path not found: {path}`;
|
|
1476
|
+
}
|
|
1477
|
+
class ReferenceNotFoundError extends Error {
|
|
1478
|
+
constructor(body) {
|
|
1479
|
+
super(
|
|
1480
|
+
`REFERENCE_NOT_FOUND: ${body.message}`
|
|
1481
|
+
);
|
|
1482
|
+
this.body = body;
|
|
1483
|
+
this.name = "ReferenceNotFoundError";
|
|
1484
|
+
}
|
|
1485
|
+
static code = "REFERENCE_NOT_FOUND";
|
|
1486
|
+
static statusCode = 404;
|
|
1487
|
+
static description = `Reference not found: {reference}`;
|
|
1488
|
+
}
|
|
1489
|
+
class TagNotFoundError extends Error {
|
|
1490
|
+
constructor(body) {
|
|
1491
|
+
super(
|
|
1492
|
+
`TAG_NOT_FOUND: ${body.message}`
|
|
1493
|
+
);
|
|
1494
|
+
this.body = body;
|
|
1495
|
+
this.name = "TagNotFoundError";
|
|
1496
|
+
}
|
|
1497
|
+
static code = "TAG_NOT_FOUND";
|
|
1498
|
+
static statusCode = 404;
|
|
1499
|
+
static description = `Tag not found: {hash}`;
|
|
1272
1500
|
}
|
|
1273
|
-
class
|
|
1501
|
+
class InvalidRevisionError extends Error {
|
|
1274
1502
|
constructor(body) {
|
|
1275
1503
|
super(
|
|
1276
|
-
`
|
|
1504
|
+
`INVALID_REVISION: ${body.message}`
|
|
1277
1505
|
);
|
|
1278
1506
|
this.body = body;
|
|
1279
|
-
this.name = "
|
|
1507
|
+
this.name = "InvalidRevisionError";
|
|
1280
1508
|
}
|
|
1281
|
-
static code = "
|
|
1282
|
-
static statusCode =
|
|
1283
|
-
static description = `
|
|
1509
|
+
static code = "INVALID_REVISION";
|
|
1510
|
+
static statusCode = 400;
|
|
1511
|
+
static description = `Invalid revision: {revision}`;
|
|
1284
1512
|
}
|
|
1285
|
-
class
|
|
1513
|
+
class PackfileError extends Error {
|
|
1286
1514
|
constructor(body) {
|
|
1287
1515
|
super(
|
|
1288
|
-
`
|
|
1516
|
+
`PACKFILE: ${body.message}`
|
|
1289
1517
|
);
|
|
1290
1518
|
this.body = body;
|
|
1291
|
-
this.name = "
|
|
1519
|
+
this.name = "PackfileError";
|
|
1292
1520
|
}
|
|
1293
|
-
static code = "
|
|
1294
|
-
static statusCode =
|
|
1295
|
-
static description = `
|
|
1521
|
+
static code = "PACKFILE";
|
|
1522
|
+
static statusCode = 500;
|
|
1523
|
+
static description = `Error building packfile`;
|
|
1296
1524
|
}
|
|
1297
1525
|
class SendErrorError extends Error {
|
|
1298
1526
|
constructor(body) {
|
|
@@ -1306,18 +1534,6 @@ class SendErrorError extends Error {
|
|
|
1306
1534
|
static statusCode = 500;
|
|
1307
1535
|
static description = `Stream receiver dropped`;
|
|
1308
1536
|
}
|
|
1309
|
-
class UnauthorizedError extends Error {
|
|
1310
|
-
constructor(body) {
|
|
1311
|
-
super(
|
|
1312
|
-
`UNAUTHORIZED: ${body.message}`
|
|
1313
|
-
);
|
|
1314
|
-
this.body = body;
|
|
1315
|
-
this.name = "UnauthorizedError";
|
|
1316
|
-
}
|
|
1317
|
-
static code = "UNAUTHORIZED";
|
|
1318
|
-
static statusCode = 401;
|
|
1319
|
-
static description = `Unauthorized: admin key and account id are required`;
|
|
1320
|
-
}
|
|
1321
1537
|
class InvalidAccountIdError extends Error {
|
|
1322
1538
|
constructor(body) {
|
|
1323
1539
|
super(
|
|
@@ -1390,545 +1606,497 @@ class RepoAlreadyExistsError extends Error {
|
|
|
1390
1606
|
static statusCode = 409;
|
|
1391
1607
|
static description = `Repo '{repo_id}' already exists`;
|
|
1392
1608
|
}
|
|
1393
|
-
class
|
|
1609
|
+
class ConflictError extends Error {
|
|
1394
1610
|
constructor(body) {
|
|
1395
1611
|
super(
|
|
1396
|
-
`
|
|
1612
|
+
`CONFLICT: ${body.message}`
|
|
1397
1613
|
);
|
|
1398
1614
|
this.body = body;
|
|
1399
|
-
this.name = "
|
|
1615
|
+
this.name = "ConflictError";
|
|
1400
1616
|
}
|
|
1401
|
-
static code = "
|
|
1402
|
-
static statusCode =
|
|
1403
|
-
static description = `
|
|
1617
|
+
static code = "CONFLICT";
|
|
1618
|
+
static statusCode = 409;
|
|
1619
|
+
static description = `Sync conflict: {message}`;
|
|
1404
1620
|
}
|
|
1405
|
-
class
|
|
1621
|
+
class BranchAlreadyExistsError extends Error {
|
|
1406
1622
|
constructor(body) {
|
|
1407
1623
|
super(
|
|
1408
|
-
`
|
|
1624
|
+
`BRANCH_ALREADY_EXISTS: ${body.message}`
|
|
1409
1625
|
);
|
|
1410
1626
|
this.body = body;
|
|
1411
|
-
this.name = "
|
|
1627
|
+
this.name = "BranchAlreadyExistsError";
|
|
1412
1628
|
}
|
|
1413
|
-
static code = "
|
|
1414
|
-
static statusCode =
|
|
1415
|
-
static description = `
|
|
1629
|
+
static code = "BRANCH_ALREADY_EXISTS";
|
|
1630
|
+
static statusCode = 409;
|
|
1631
|
+
static description = `Branch already exists: {branch}`;
|
|
1416
1632
|
}
|
|
1417
|
-
class
|
|
1633
|
+
class GitHubSyncConflictError extends Error {
|
|
1418
1634
|
constructor(body) {
|
|
1419
1635
|
super(
|
|
1420
|
-
`
|
|
1636
|
+
`GIT_HUB_SYNC_CONFLICT: ${body.message}`
|
|
1421
1637
|
);
|
|
1422
1638
|
this.body = body;
|
|
1423
|
-
this.name = "
|
|
1639
|
+
this.name = "GitHubSyncConflictError";
|
|
1424
1640
|
}
|
|
1425
|
-
static code = "
|
|
1426
|
-
static statusCode =
|
|
1427
|
-
static description = `
|
|
1641
|
+
static code = "GIT_HUB_SYNC_CONFLICT";
|
|
1642
|
+
static statusCode = 409;
|
|
1643
|
+
static description = `GitHub Sync Conflict: {message}`;
|
|
1428
1644
|
}
|
|
1429
|
-
class
|
|
1645
|
+
class InvalidObjectIdError extends Error {
|
|
1430
1646
|
constructor(body) {
|
|
1431
1647
|
super(
|
|
1432
|
-
`
|
|
1648
|
+
`INVALID_OBJECT_ID: ${body.message}`
|
|
1433
1649
|
);
|
|
1434
1650
|
this.body = body;
|
|
1435
|
-
this.name = "
|
|
1651
|
+
this.name = "InvalidObjectIdError";
|
|
1436
1652
|
}
|
|
1437
|
-
static code = "
|
|
1653
|
+
static code = "INVALID_OBJECT_ID";
|
|
1438
1654
|
static statusCode = 400;
|
|
1439
|
-
static description = `
|
|
1655
|
+
static description = `Invalid object ID: {hash}`;
|
|
1440
1656
|
}
|
|
1441
|
-
class
|
|
1657
|
+
class UnavailableError extends Error {
|
|
1442
1658
|
constructor(body) {
|
|
1443
1659
|
super(
|
|
1444
|
-
`
|
|
1660
|
+
`UNAVAILABLE: ${body.message}`
|
|
1445
1661
|
);
|
|
1446
1662
|
this.body = body;
|
|
1447
|
-
this.name = "
|
|
1663
|
+
this.name = "UnavailableError";
|
|
1448
1664
|
}
|
|
1449
|
-
static code = "
|
|
1450
|
-
static statusCode =
|
|
1451
|
-
static description = `
|
|
1665
|
+
static code = "UNAVAILABLE";
|
|
1666
|
+
static statusCode = 503;
|
|
1667
|
+
static description = `Cron service unavailable`;
|
|
1452
1668
|
}
|
|
1453
|
-
class
|
|
1669
|
+
class ScheduleNotFoundError extends Error {
|
|
1454
1670
|
constructor(body) {
|
|
1455
1671
|
super(
|
|
1456
|
-
`
|
|
1672
|
+
`SCHEDULE_NOT_FOUND: ${body.message}`
|
|
1457
1673
|
);
|
|
1458
1674
|
this.body = body;
|
|
1459
|
-
this.name = "
|
|
1675
|
+
this.name = "ScheduleNotFoundError";
|
|
1460
1676
|
}
|
|
1461
|
-
static code = "
|
|
1677
|
+
static code = "SCHEDULE_NOT_FOUND";
|
|
1462
1678
|
static statusCode = 404;
|
|
1463
|
-
static description = `
|
|
1464
|
-
}
|
|
1465
|
-
class InvalidBase64ContentError extends Error {
|
|
1466
|
-
constructor(body) {
|
|
1467
|
-
super(
|
|
1468
|
-
`INVALID_BASE64_CONTENT: ${body.message}`
|
|
1469
|
-
);
|
|
1470
|
-
this.body = body;
|
|
1471
|
-
this.name = "InvalidBase64ContentError";
|
|
1472
|
-
}
|
|
1473
|
-
static code = "INVALID_BASE64_CONTENT";
|
|
1474
|
-
static statusCode = 400;
|
|
1475
|
-
static description = `Invalid base64 content for file: {path}`;
|
|
1476
|
-
}
|
|
1477
|
-
class InvalidFileChangeError extends Error {
|
|
1478
|
-
constructor(body) {
|
|
1479
|
-
super(
|
|
1480
|
-
`INVALID_FILE_CHANGE: ${body.message}`
|
|
1481
|
-
);
|
|
1482
|
-
this.body = body;
|
|
1483
|
-
this.name = "InvalidFileChangeError";
|
|
1484
|
-
}
|
|
1485
|
-
static code = "INVALID_FILE_CHANGE";
|
|
1486
|
-
static statusCode = 400;
|
|
1487
|
-
static description = `File change must have either content or deleted flag, not both: {path}`;
|
|
1488
|
-
}
|
|
1489
|
-
class InvalidFilePathError extends Error {
|
|
1490
|
-
constructor(body) {
|
|
1491
|
-
super(
|
|
1492
|
-
`INVALID_FILE_PATH: ${body.message}`
|
|
1493
|
-
);
|
|
1494
|
-
this.body = body;
|
|
1495
|
-
this.name = "InvalidFilePathError";
|
|
1496
|
-
}
|
|
1497
|
-
static code = "INVALID_FILE_PATH";
|
|
1498
|
-
static statusCode = 400;
|
|
1499
|
-
static description = `Invalid file path: {path}`;
|
|
1500
|
-
}
|
|
1501
|
-
class ConflictingParentError extends Error {
|
|
1502
|
-
constructor(body) {
|
|
1503
|
-
super(
|
|
1504
|
-
`CONFLICTING_PARENT: ${body.message}`
|
|
1505
|
-
);
|
|
1506
|
-
this.body = body;
|
|
1507
|
-
this.name = "ConflictingParentError";
|
|
1508
|
-
}
|
|
1509
|
-
static code = "CONFLICTING_PARENT";
|
|
1510
|
-
static statusCode = 409;
|
|
1511
|
-
static description = `Conflict: expected parent SHA {expected} but current is {actual:?}`;
|
|
1679
|
+
static description = `Schedule not found`;
|
|
1512
1680
|
}
|
|
1513
|
-
class
|
|
1681
|
+
class ServiceUnavailableError extends Error {
|
|
1514
1682
|
constructor(body) {
|
|
1515
1683
|
super(
|
|
1516
|
-
`
|
|
1684
|
+
`SERVICE_UNAVAILABLE: ${body.message}`
|
|
1517
1685
|
);
|
|
1518
1686
|
this.body = body;
|
|
1519
|
-
this.name = "
|
|
1687
|
+
this.name = "ServiceUnavailableError";
|
|
1520
1688
|
}
|
|
1521
|
-
static code = "
|
|
1522
|
-
static statusCode =
|
|
1523
|
-
static description = `
|
|
1689
|
+
static code = "SERVICE_UNAVAILABLE";
|
|
1690
|
+
static statusCode = 503;
|
|
1691
|
+
static description = `Cron service not configured`;
|
|
1524
1692
|
}
|
|
1525
|
-
class
|
|
1693
|
+
class ExecuteLimitExceededError extends Error {
|
|
1526
1694
|
constructor(body) {
|
|
1527
1695
|
super(
|
|
1528
|
-
`
|
|
1696
|
+
`EXECUTE_LIMIT_EXCEEDED: ${body.message}`
|
|
1529
1697
|
);
|
|
1530
1698
|
this.body = body;
|
|
1531
|
-
this.name = "
|
|
1699
|
+
this.name = "ExecuteLimitExceededError";
|
|
1532
1700
|
}
|
|
1533
|
-
static code = "
|
|
1534
|
-
static statusCode =
|
|
1535
|
-
static description = `
|
|
1701
|
+
static code = "EXECUTE_LIMIT_EXCEEDED";
|
|
1702
|
+
static statusCode = 403;
|
|
1703
|
+
static description = `Execute runs limit exceeded: your plan allows {limit} runs per month, you have used {current}`;
|
|
1536
1704
|
}
|
|
1537
|
-
class
|
|
1705
|
+
class ObservabilityDatabaseErrorError extends Error {
|
|
1538
1706
|
constructor(body) {
|
|
1539
1707
|
super(
|
|
1540
|
-
`
|
|
1708
|
+
`OBSERVABILITY_DATABASE_ERROR: ${body.message}`
|
|
1541
1709
|
);
|
|
1542
1710
|
this.body = body;
|
|
1543
|
-
this.name = "
|
|
1711
|
+
this.name = "ObservabilityDatabaseErrorError";
|
|
1544
1712
|
}
|
|
1545
|
-
static code = "
|
|
1546
|
-
static statusCode =
|
|
1547
|
-
static description = `
|
|
1713
|
+
static code = "OBSERVABILITY_DATABASE_ERROR";
|
|
1714
|
+
static statusCode = 500;
|
|
1715
|
+
static description = `Database operation failed: {message}`;
|
|
1548
1716
|
}
|
|
1549
|
-
class
|
|
1717
|
+
class ObservabilityAccessDeniedError extends Error {
|
|
1550
1718
|
constructor(body) {
|
|
1551
1719
|
super(
|
|
1552
|
-
`
|
|
1720
|
+
`OBSERVABILITY_ACCESS_DENIED: ${body.message}`
|
|
1553
1721
|
);
|
|
1554
1722
|
this.body = body;
|
|
1555
|
-
this.name = "
|
|
1723
|
+
this.name = "ObservabilityAccessDeniedError";
|
|
1556
1724
|
}
|
|
1557
|
-
static code = "
|
|
1558
|
-
static statusCode =
|
|
1559
|
-
static description = `
|
|
1725
|
+
static code = "OBSERVABILITY_ACCESS_DENIED";
|
|
1726
|
+
static statusCode = 403;
|
|
1727
|
+
static description = `Access denied to logs for deployment: {deployment_id}`;
|
|
1560
1728
|
}
|
|
1561
|
-
class
|
|
1729
|
+
class ParseLogsFailedError extends Error {
|
|
1562
1730
|
constructor(body) {
|
|
1563
1731
|
super(
|
|
1564
|
-
`
|
|
1732
|
+
`PARSE_LOGS_FAILED: ${body.message}`
|
|
1565
1733
|
);
|
|
1566
1734
|
this.body = body;
|
|
1567
|
-
this.name = "
|
|
1735
|
+
this.name = "ParseLogsFailedError";
|
|
1568
1736
|
}
|
|
1569
|
-
static code = "
|
|
1570
|
-
static statusCode =
|
|
1571
|
-
static description = `
|
|
1737
|
+
static code = "PARSE_LOGS_FAILED";
|
|
1738
|
+
static statusCode = 500;
|
|
1739
|
+
static description = `Failed to parse logs: {message}`;
|
|
1572
1740
|
}
|
|
1573
|
-
class
|
|
1741
|
+
class RetrieveLogsFailedError extends Error {
|
|
1574
1742
|
constructor(body) {
|
|
1575
1743
|
super(
|
|
1576
|
-
`
|
|
1744
|
+
`RETRIEVE_LOGS_FAILED: ${body.message}`
|
|
1577
1745
|
);
|
|
1578
1746
|
this.body = body;
|
|
1579
|
-
this.name = "
|
|
1747
|
+
this.name = "RetrieveLogsFailedError";
|
|
1580
1748
|
}
|
|
1581
|
-
static code = "
|
|
1749
|
+
static code = "RETRIEVE_LOGS_FAILED";
|
|
1582
1750
|
static statusCode = 500;
|
|
1583
|
-
static description = `
|
|
1751
|
+
static description = `Failed to retrieve logs: {message}`;
|
|
1584
1752
|
}
|
|
1585
|
-
class
|
|
1753
|
+
class InvalidQueryError extends Error {
|
|
1586
1754
|
constructor(body) {
|
|
1587
1755
|
super(
|
|
1588
|
-
`
|
|
1756
|
+
`INVALID_QUERY: ${body.message}`
|
|
1589
1757
|
);
|
|
1590
1758
|
this.body = body;
|
|
1591
|
-
this.name = "
|
|
1759
|
+
this.name = "InvalidQueryError";
|
|
1592
1760
|
}
|
|
1593
|
-
static code = "
|
|
1761
|
+
static code = "INVALID_QUERY";
|
|
1594
1762
|
static statusCode = 400;
|
|
1595
|
-
static description = `Invalid
|
|
1763
|
+
static description = `Invalid log query: {message}`;
|
|
1596
1764
|
}
|
|
1597
|
-
class
|
|
1765
|
+
class LogsNotFoundError extends Error {
|
|
1598
1766
|
constructor(body) {
|
|
1599
1767
|
super(
|
|
1600
|
-
`
|
|
1768
|
+
`LOGS_NOT_FOUND: ${body.message}`
|
|
1601
1769
|
);
|
|
1602
1770
|
this.body = body;
|
|
1603
|
-
this.name = "
|
|
1771
|
+
this.name = "LogsNotFoundError";
|
|
1604
1772
|
}
|
|
1605
|
-
static code = "
|
|
1606
|
-
static statusCode =
|
|
1607
|
-
static description = `
|
|
1773
|
+
static code = "LOGS_NOT_FOUND";
|
|
1774
|
+
static statusCode = 404;
|
|
1775
|
+
static description = `Logs not found for deployment: {deployment_id}`;
|
|
1608
1776
|
}
|
|
1609
|
-
class
|
|
1777
|
+
class ExecuteInternalErrorError extends Error {
|
|
1610
1778
|
constructor(body) {
|
|
1611
1779
|
super(
|
|
1612
|
-
`
|
|
1780
|
+
`EXECUTE_INTERNAL_ERROR: ${body.message}`
|
|
1613
1781
|
);
|
|
1614
1782
|
this.body = body;
|
|
1615
|
-
this.name = "
|
|
1783
|
+
this.name = "ExecuteInternalErrorError";
|
|
1616
1784
|
}
|
|
1617
|
-
static code = "
|
|
1618
|
-
static statusCode =
|
|
1619
|
-
static description = `
|
|
1785
|
+
static code = "EXECUTE_INTERNAL_ERROR";
|
|
1786
|
+
static statusCode = 500;
|
|
1787
|
+
static description = `Internal error: {message}`;
|
|
1620
1788
|
}
|
|
1621
|
-
class
|
|
1789
|
+
class ExecuteAccessDeniedError extends Error {
|
|
1622
1790
|
constructor(body) {
|
|
1623
1791
|
super(
|
|
1624
|
-
`
|
|
1792
|
+
`EXECUTE_ACCESS_DENIED: ${body.message}`
|
|
1625
1793
|
);
|
|
1626
1794
|
this.body = body;
|
|
1627
|
-
this.name = "
|
|
1795
|
+
this.name = "ExecuteAccessDeniedError";
|
|
1628
1796
|
}
|
|
1629
|
-
static code = "
|
|
1630
|
-
static statusCode =
|
|
1631
|
-
static description = `
|
|
1797
|
+
static code = "EXECUTE_ACCESS_DENIED";
|
|
1798
|
+
static statusCode = 403;
|
|
1799
|
+
static description = `Access denied to execute run`;
|
|
1632
1800
|
}
|
|
1633
|
-
class
|
|
1801
|
+
class ListRunsFailedError extends Error {
|
|
1634
1802
|
constructor(body) {
|
|
1635
1803
|
super(
|
|
1636
|
-
`
|
|
1804
|
+
`LIST_RUNS_FAILED: ${body.message}`
|
|
1637
1805
|
);
|
|
1638
1806
|
this.body = body;
|
|
1639
|
-
this.name = "
|
|
1807
|
+
this.name = "ListRunsFailedError";
|
|
1640
1808
|
}
|
|
1641
|
-
static code = "
|
|
1642
|
-
static statusCode =
|
|
1643
|
-
static description = `
|
|
1809
|
+
static code = "LIST_RUNS_FAILED";
|
|
1810
|
+
static statusCode = 500;
|
|
1811
|
+
static description = `Failed to list execute runs: {message}`;
|
|
1644
1812
|
}
|
|
1645
|
-
class
|
|
1813
|
+
class ExecutionErrorError extends Error {
|
|
1646
1814
|
constructor(body) {
|
|
1647
1815
|
super(
|
|
1648
|
-
`
|
|
1816
|
+
`EXECUTION_ERROR: ${body.message}`
|
|
1649
1817
|
);
|
|
1650
1818
|
this.body = body;
|
|
1651
|
-
this.name = "
|
|
1819
|
+
this.name = "ExecutionErrorError";
|
|
1652
1820
|
}
|
|
1653
|
-
static code = "
|
|
1654
|
-
static statusCode =
|
|
1655
|
-
static description = `
|
|
1821
|
+
static code = "EXECUTION_ERROR";
|
|
1822
|
+
static statusCode = 500;
|
|
1823
|
+
static description = `Script execution error: {message}`;
|
|
1656
1824
|
}
|
|
1657
|
-
class
|
|
1825
|
+
class ConnectionFailedError extends Error {
|
|
1658
1826
|
constructor(body) {
|
|
1659
1827
|
super(
|
|
1660
|
-
`
|
|
1828
|
+
`CONNECTION_FAILED: ${body.message}`
|
|
1661
1829
|
);
|
|
1662
1830
|
this.body = body;
|
|
1663
|
-
this.name = "
|
|
1831
|
+
this.name = "ConnectionFailedError";
|
|
1664
1832
|
}
|
|
1665
|
-
static code = "
|
|
1666
|
-
static statusCode =
|
|
1667
|
-
static description = `
|
|
1833
|
+
static code = "CONNECTION_FAILED";
|
|
1834
|
+
static statusCode = 500;
|
|
1835
|
+
static description = `Failed to connect to execute server: {message}`;
|
|
1668
1836
|
}
|
|
1669
|
-
class
|
|
1837
|
+
class MetadataWriteFailedError extends Error {
|
|
1670
1838
|
constructor(body) {
|
|
1671
1839
|
super(
|
|
1672
|
-
`
|
|
1840
|
+
`METADATA_WRITE_FAILED: ${body.message}`
|
|
1673
1841
|
);
|
|
1674
1842
|
this.body = body;
|
|
1675
|
-
this.name = "
|
|
1843
|
+
this.name = "MetadataWriteFailedError";
|
|
1676
1844
|
}
|
|
1677
|
-
static code = "
|
|
1678
|
-
static statusCode =
|
|
1679
|
-
static description = `
|
|
1845
|
+
static code = "METADATA_WRITE_FAILED";
|
|
1846
|
+
static statusCode = 500;
|
|
1847
|
+
static description = `Failed to write metadata file: {message}`;
|
|
1680
1848
|
}
|
|
1681
|
-
class
|
|
1849
|
+
class NodeModulesInstallFailedError extends Error {
|
|
1682
1850
|
constructor(body) {
|
|
1683
1851
|
super(
|
|
1684
|
-
`
|
|
1852
|
+
`NODE_MODULES_INSTALL_FAILED: ${body.message}`
|
|
1685
1853
|
);
|
|
1686
1854
|
this.body = body;
|
|
1687
|
-
this.name = "
|
|
1855
|
+
this.name = "NodeModulesInstallFailedError";
|
|
1688
1856
|
}
|
|
1689
|
-
static code = "
|
|
1690
|
-
static statusCode =
|
|
1691
|
-
static description = `
|
|
1857
|
+
static code = "NODE_MODULES_INSTALL_FAILED";
|
|
1858
|
+
static statusCode = 500;
|
|
1859
|
+
static description = `Failed to install node modules: {message}`;
|
|
1692
1860
|
}
|
|
1693
|
-
class
|
|
1861
|
+
class NodeModulesDownloadFailedError extends Error {
|
|
1694
1862
|
constructor(body) {
|
|
1695
1863
|
super(
|
|
1696
|
-
`
|
|
1864
|
+
`NODE_MODULES_DOWNLOAD_FAILED: ${body.message}`
|
|
1697
1865
|
);
|
|
1698
1866
|
this.body = body;
|
|
1699
|
-
this.name = "
|
|
1867
|
+
this.name = "NodeModulesDownloadFailedError";
|
|
1700
1868
|
}
|
|
1701
|
-
static code = "
|
|
1869
|
+
static code = "NODE_MODULES_DOWNLOAD_FAILED";
|
|
1702
1870
|
static statusCode = 500;
|
|
1703
|
-
static description = `Failed to
|
|
1871
|
+
static description = `Failed to download node modules: {message}`;
|
|
1704
1872
|
}
|
|
1705
|
-
class
|
|
1873
|
+
class LockGenerationFailedError extends Error {
|
|
1706
1874
|
constructor(body) {
|
|
1707
1875
|
super(
|
|
1708
|
-
`
|
|
1876
|
+
`LOCK_GENERATION_FAILED: ${body.message}`
|
|
1709
1877
|
);
|
|
1710
1878
|
this.body = body;
|
|
1711
|
-
this.name = "
|
|
1879
|
+
this.name = "LockGenerationFailedError";
|
|
1712
1880
|
}
|
|
1713
|
-
static code = "
|
|
1881
|
+
static code = "LOCK_GENERATION_FAILED";
|
|
1714
1882
|
static statusCode = 500;
|
|
1715
|
-
static description = `Failed to
|
|
1883
|
+
static description = `Failed to generate lock file: {message}`;
|
|
1716
1884
|
}
|
|
1717
|
-
class
|
|
1885
|
+
class WriteScriptFailedError extends Error {
|
|
1718
1886
|
constructor(body) {
|
|
1719
1887
|
super(
|
|
1720
|
-
`
|
|
1888
|
+
`WRITE_SCRIPT_FAILED: ${body.message}`
|
|
1721
1889
|
);
|
|
1722
1890
|
this.body = body;
|
|
1723
|
-
this.name = "
|
|
1891
|
+
this.name = "WriteScriptFailedError";
|
|
1724
1892
|
}
|
|
1725
|
-
static code = "
|
|
1893
|
+
static code = "WRITE_SCRIPT_FAILED";
|
|
1726
1894
|
static statusCode = 500;
|
|
1727
|
-
static description = `Failed to
|
|
1895
|
+
static description = `Failed to write script file: {message}`;
|
|
1728
1896
|
}
|
|
1729
|
-
class
|
|
1897
|
+
class DirectoryCreationFailedError extends Error {
|
|
1730
1898
|
constructor(body) {
|
|
1731
1899
|
super(
|
|
1732
|
-
`
|
|
1900
|
+
`DIRECTORY_CREATION_FAILED: ${body.message}`
|
|
1733
1901
|
);
|
|
1734
1902
|
this.body = body;
|
|
1735
|
-
this.name = "
|
|
1903
|
+
this.name = "DirectoryCreationFailedError";
|
|
1736
1904
|
}
|
|
1737
|
-
static code = "
|
|
1905
|
+
static code = "DIRECTORY_CREATION_FAILED";
|
|
1738
1906
|
static statusCode = 500;
|
|
1739
|
-
static description = `Failed to
|
|
1907
|
+
static description = `Failed to create script directory: {message}`;
|
|
1740
1908
|
}
|
|
1741
|
-
class
|
|
1909
|
+
class NetworkPermissionsFailedError extends Error {
|
|
1742
1910
|
constructor(body) {
|
|
1743
1911
|
super(
|
|
1744
|
-
`
|
|
1912
|
+
`NETWORK_PERMISSIONS_FAILED: ${body.message}`
|
|
1745
1913
|
);
|
|
1746
1914
|
this.body = body;
|
|
1747
|
-
this.name = "
|
|
1915
|
+
this.name = "NetworkPermissionsFailedError";
|
|
1748
1916
|
}
|
|
1749
|
-
static code = "
|
|
1917
|
+
static code = "NETWORK_PERMISSIONS_FAILED";
|
|
1750
1918
|
static statusCode = 500;
|
|
1751
|
-
static description = `Failed to
|
|
1919
|
+
static description = `Failed to insert network permissions: {message}`;
|
|
1752
1920
|
}
|
|
1753
|
-
class
|
|
1921
|
+
class LoggingFailedError extends Error {
|
|
1754
1922
|
constructor(body) {
|
|
1755
1923
|
super(
|
|
1756
|
-
`
|
|
1924
|
+
`LOGGING_FAILED: ${body.message}`
|
|
1757
1925
|
);
|
|
1758
1926
|
this.body = body;
|
|
1759
|
-
this.name = "
|
|
1927
|
+
this.name = "LoggingFailedError";
|
|
1760
1928
|
}
|
|
1761
|
-
static code = "
|
|
1929
|
+
static code = "LOGGING_FAILED";
|
|
1762
1930
|
static statusCode = 500;
|
|
1763
|
-
static description = `Failed to
|
|
1931
|
+
static description = `Failed to log execute run: {message}`;
|
|
1764
1932
|
}
|
|
1765
|
-
class
|
|
1933
|
+
class RunNotFoundError extends Error {
|
|
1766
1934
|
constructor(body) {
|
|
1767
1935
|
super(
|
|
1768
|
-
`
|
|
1936
|
+
`RUN_NOT_FOUND: ${body.message}`
|
|
1769
1937
|
);
|
|
1770
1938
|
this.body = body;
|
|
1771
|
-
this.name = "
|
|
1939
|
+
this.name = "RunNotFoundError";
|
|
1772
1940
|
}
|
|
1773
|
-
static code = "
|
|
1774
|
-
static statusCode =
|
|
1775
|
-
static description = `
|
|
1941
|
+
static code = "RUN_NOT_FOUND";
|
|
1942
|
+
static statusCode = 404;
|
|
1943
|
+
static description = `Execute run not found: {run_id}`;
|
|
1776
1944
|
}
|
|
1777
|
-
class
|
|
1945
|
+
class LimitExceededError extends Error {
|
|
1778
1946
|
constructor(body) {
|
|
1779
1947
|
super(
|
|
1780
|
-
`
|
|
1948
|
+
`LIMIT_EXCEEDED: ${body.message}`
|
|
1781
1949
|
);
|
|
1782
1950
|
this.body = body;
|
|
1783
|
-
this.name = "
|
|
1951
|
+
this.name = "LimitExceededError";
|
|
1784
1952
|
}
|
|
1785
|
-
static code = "
|
|
1786
|
-
static statusCode =
|
|
1787
|
-
static description = `
|
|
1953
|
+
static code = "LIMIT_EXCEEDED";
|
|
1954
|
+
static statusCode = 403;
|
|
1955
|
+
static description = `Managed domains limit exceeded: your plan allows {limit} verified domains, you have {current}`;
|
|
1788
1956
|
}
|
|
1789
|
-
class
|
|
1957
|
+
class FailedToProvisionCertificateError extends Error {
|
|
1790
1958
|
constructor(body) {
|
|
1791
1959
|
super(
|
|
1792
|
-
`
|
|
1960
|
+
`FAILED_TO_PROVISION_CERTIFICATE: ${body.message}`
|
|
1793
1961
|
);
|
|
1794
1962
|
this.body = body;
|
|
1795
|
-
this.name = "
|
|
1963
|
+
this.name = "FailedToProvisionCertificateError";
|
|
1796
1964
|
}
|
|
1797
|
-
static code = "
|
|
1798
|
-
static statusCode =
|
|
1799
|
-
static description = `Failed to
|
|
1965
|
+
static code = "FAILED_TO_PROVISION_CERTIFICATE";
|
|
1966
|
+
static statusCode = 422;
|
|
1967
|
+
static description = `Failed to provision certificate: {message}`;
|
|
1800
1968
|
}
|
|
1801
|
-
class
|
|
1969
|
+
class FailedToInsertDomainMappingError extends Error {
|
|
1802
1970
|
constructor(body) {
|
|
1803
1971
|
super(
|
|
1804
|
-
`
|
|
1972
|
+
`FAILED_TO_INSERT_DOMAIN_MAPPING: ${body.message}`
|
|
1805
1973
|
);
|
|
1806
1974
|
this.body = body;
|
|
1807
|
-
this.name = "
|
|
1975
|
+
this.name = "FailedToInsertDomainMappingError";
|
|
1808
1976
|
}
|
|
1809
|
-
static code = "
|
|
1977
|
+
static code = "FAILED_TO_INSERT_DOMAIN_MAPPING";
|
|
1810
1978
|
static statusCode = 500;
|
|
1811
|
-
static description = `Failed to
|
|
1979
|
+
static description = `Failed to insert domain mapping: {message}`;
|
|
1812
1980
|
}
|
|
1813
|
-
class
|
|
1981
|
+
class PermissionDeniedError extends Error {
|
|
1814
1982
|
constructor(body) {
|
|
1815
1983
|
super(
|
|
1816
|
-
`
|
|
1984
|
+
`PERMISSION_DENIED: ${body.message}`
|
|
1817
1985
|
);
|
|
1818
1986
|
this.body = body;
|
|
1819
|
-
this.name = "
|
|
1987
|
+
this.name = "PermissionDeniedError";
|
|
1820
1988
|
}
|
|
1821
|
-
static code = "
|
|
1822
|
-
static statusCode =
|
|
1823
|
-
static description = `
|
|
1989
|
+
static code = "PERMISSION_DENIED";
|
|
1990
|
+
static statusCode = 401;
|
|
1991
|
+
static description = `Permission denied: {message}`;
|
|
1824
1992
|
}
|
|
1825
|
-
class
|
|
1993
|
+
class FailedToCheckPermissionsError extends Error {
|
|
1826
1994
|
constructor(body) {
|
|
1827
1995
|
super(
|
|
1828
|
-
`
|
|
1996
|
+
`FAILED_TO_CHECK_PERMISSIONS: ${body.message}`
|
|
1829
1997
|
);
|
|
1830
1998
|
this.body = body;
|
|
1831
|
-
this.name = "
|
|
1999
|
+
this.name = "FailedToCheckPermissionsError";
|
|
1832
2000
|
}
|
|
1833
|
-
static code = "
|
|
1834
|
-
static statusCode =
|
|
1835
|
-
static description = `
|
|
2001
|
+
static code = "FAILED_TO_CHECK_PERMISSIONS";
|
|
2002
|
+
static statusCode = 502;
|
|
2003
|
+
static description = `Failed to check permissions: {message}`;
|
|
1836
2004
|
}
|
|
1837
|
-
class
|
|
2005
|
+
class FailedToListDomainsError extends Error {
|
|
1838
2006
|
constructor(body) {
|
|
1839
2007
|
super(
|
|
1840
|
-
`
|
|
2008
|
+
`FAILED_TO_LIST_DOMAINS: ${body.message}`
|
|
1841
2009
|
);
|
|
1842
2010
|
this.body = body;
|
|
1843
|
-
this.name = "
|
|
2011
|
+
this.name = "FailedToListDomainsError";
|
|
1844
2012
|
}
|
|
1845
|
-
static code = "
|
|
1846
|
-
static statusCode =
|
|
1847
|
-
static description = `
|
|
2013
|
+
static code = "FAILED_TO_LIST_DOMAINS";
|
|
2014
|
+
static statusCode = 500;
|
|
2015
|
+
static description = `Failed to list domains: {message}`;
|
|
1848
2016
|
}
|
|
1849
|
-
class
|
|
2017
|
+
class FailedToListVerificationsError extends Error {
|
|
1850
2018
|
constructor(body) {
|
|
1851
2019
|
super(
|
|
1852
|
-
`
|
|
2020
|
+
`FAILED_TO_LIST_VERIFICATIONS: ${body.message}`
|
|
1853
2021
|
);
|
|
1854
2022
|
this.body = body;
|
|
1855
|
-
this.name = "
|
|
2023
|
+
this.name = "FailedToListVerificationsError";
|
|
1856
2024
|
}
|
|
1857
|
-
static code = "
|
|
1858
|
-
static statusCode =
|
|
1859
|
-
static description = `
|
|
2025
|
+
static code = "FAILED_TO_LIST_VERIFICATIONS";
|
|
2026
|
+
static statusCode = 500;
|
|
2027
|
+
static description = `Failed to list verifications: {message}`;
|
|
1860
2028
|
}
|
|
1861
|
-
class
|
|
2029
|
+
class FailedToVerifyDomainError extends Error {
|
|
1862
2030
|
constructor(body) {
|
|
1863
2031
|
super(
|
|
1864
|
-
`
|
|
2032
|
+
`FAILED_TO_VERIFY_DOMAIN: ${body.message}`
|
|
1865
2033
|
);
|
|
1866
2034
|
this.body = body;
|
|
1867
|
-
this.name = "
|
|
2035
|
+
this.name = "FailedToVerifyDomainError";
|
|
1868
2036
|
}
|
|
1869
|
-
static code = "
|
|
1870
|
-
static statusCode =
|
|
1871
|
-
static description = `
|
|
2037
|
+
static code = "FAILED_TO_VERIFY_DOMAIN";
|
|
2038
|
+
static statusCode = 500;
|
|
2039
|
+
static description = `Failed to verify domain: {message}`;
|
|
1872
2040
|
}
|
|
1873
|
-
class
|
|
2041
|
+
class VerificationFailedError extends Error {
|
|
1874
2042
|
constructor(body) {
|
|
1875
2043
|
super(
|
|
1876
|
-
`
|
|
2044
|
+
`VERIFICATION_FAILED: ${body.message}`
|
|
1877
2045
|
);
|
|
1878
2046
|
this.body = body;
|
|
1879
|
-
this.name = "
|
|
2047
|
+
this.name = "VerificationFailedError";
|
|
1880
2048
|
}
|
|
1881
|
-
static code = "
|
|
1882
|
-
static statusCode =
|
|
1883
|
-
static description = `
|
|
2049
|
+
static code = "VERIFICATION_FAILED";
|
|
2050
|
+
static statusCode = 400;
|
|
2051
|
+
static description = `Domain verification failed: {message}`;
|
|
1884
2052
|
}
|
|
1885
|
-
class
|
|
2053
|
+
class FailedToDeleteVerificationError extends Error {
|
|
1886
2054
|
constructor(body) {
|
|
1887
2055
|
super(
|
|
1888
|
-
`
|
|
2056
|
+
`FAILED_TO_DELETE_VERIFICATION: ${body.message}`
|
|
1889
2057
|
);
|
|
1890
2058
|
this.body = body;
|
|
1891
|
-
this.name = "
|
|
2059
|
+
this.name = "FailedToDeleteVerificationError";
|
|
1892
2060
|
}
|
|
1893
|
-
static code = "
|
|
1894
|
-
static statusCode =
|
|
1895
|
-
static description = `
|
|
2061
|
+
static code = "FAILED_TO_DELETE_VERIFICATION";
|
|
2062
|
+
static statusCode = 400;
|
|
2063
|
+
static description = `Failed to delete verification: {message}`;
|
|
1896
2064
|
}
|
|
1897
|
-
class
|
|
2065
|
+
class VerificationNotFoundError extends Error {
|
|
1898
2066
|
constructor(body) {
|
|
1899
2067
|
super(
|
|
1900
|
-
`
|
|
2068
|
+
`VERIFICATION_NOT_FOUND: ${body.message}`
|
|
1901
2069
|
);
|
|
1902
2070
|
this.body = body;
|
|
1903
|
-
this.name = "
|
|
2071
|
+
this.name = "VerificationNotFoundError";
|
|
1904
2072
|
}
|
|
1905
|
-
static code = "
|
|
1906
|
-
static statusCode =
|
|
1907
|
-
static description = `
|
|
2073
|
+
static code = "VERIFICATION_NOT_FOUND";
|
|
2074
|
+
static statusCode = 404;
|
|
2075
|
+
static description = `Verification request not found for domain: {domain}`;
|
|
1908
2076
|
}
|
|
1909
|
-
class
|
|
2077
|
+
class FailedToCreateVerificationCodeError extends Error {
|
|
1910
2078
|
constructor(body) {
|
|
1911
2079
|
super(
|
|
1912
|
-
`
|
|
2080
|
+
`FAILED_TO_CREATE_VERIFICATION_CODE: ${body.message}`
|
|
1913
2081
|
);
|
|
1914
2082
|
this.body = body;
|
|
1915
|
-
this.name = "
|
|
2083
|
+
this.name = "FailedToCreateVerificationCodeError";
|
|
1916
2084
|
}
|
|
1917
|
-
static code = "
|
|
1918
|
-
static statusCode =
|
|
1919
|
-
static description = `
|
|
2085
|
+
static code = "FAILED_TO_CREATE_VERIFICATION_CODE";
|
|
2086
|
+
static statusCode = 400;
|
|
2087
|
+
static description = `Failed to create verification code: {message}`;
|
|
1920
2088
|
}
|
|
1921
|
-
class
|
|
2089
|
+
class InvalidDomainError extends Error {
|
|
1922
2090
|
constructor(body) {
|
|
1923
2091
|
super(
|
|
1924
|
-
`
|
|
2092
|
+
`INVALID_DOMAIN: ${body.message}`
|
|
1925
2093
|
);
|
|
1926
2094
|
this.body = body;
|
|
1927
|
-
this.name = "
|
|
2095
|
+
this.name = "InvalidDomainError";
|
|
1928
2096
|
}
|
|
1929
|
-
static code = "
|
|
1930
|
-
static statusCode =
|
|
1931
|
-
static description = `
|
|
2097
|
+
static code = "INVALID_DOMAIN";
|
|
2098
|
+
static statusCode = 400;
|
|
2099
|
+
static description = `Invalid domain: {domain}`;
|
|
1932
2100
|
}
|
|
1933
2101
|
class BuildFailedError extends Error {
|
|
1934
2102
|
constructor(body) {
|
|
@@ -2062,6 +2230,18 @@ class WebDeploymentBadRequestError extends Error {
|
|
|
2062
2230
|
static statusCode = 400;
|
|
2063
2231
|
static description = `Bad request: {message}`;
|
|
2064
2232
|
}
|
|
2233
|
+
class TimeoutLimitExceededError extends Error {
|
|
2234
|
+
constructor(body) {
|
|
2235
|
+
super(
|
|
2236
|
+
`TIMEOUT_LIMIT_EXCEEDED: ${body.message}`
|
|
2237
|
+
);
|
|
2238
|
+
this.body = body;
|
|
2239
|
+
this.name = "TimeoutLimitExceededError";
|
|
2240
|
+
}
|
|
2241
|
+
static code = "TIMEOUT_LIMIT_EXCEEDED";
|
|
2242
|
+
static statusCode = 403;
|
|
2243
|
+
static description = `Timeout exceeds plan limit: requested {requested_ms}ms but your plan allows a maximum of {max_ms}ms`;
|
|
2244
|
+
}
|
|
2065
2245
|
class DeploymentLimitExceededError extends Error {
|
|
2066
2246
|
constructor(body) {
|
|
2067
2247
|
super(
|
|
@@ -2110,41 +2290,41 @@ class InternalResizeVmNotFoundError extends Error {
|
|
|
2110
2290
|
static statusCode = 404;
|
|
2111
2291
|
static description = `VM not found`;
|
|
2112
2292
|
}
|
|
2113
|
-
class
|
|
2293
|
+
class AccessDeniedError extends Error {
|
|
2114
2294
|
constructor(body) {
|
|
2115
2295
|
super(
|
|
2116
|
-
`
|
|
2296
|
+
`ACCESS_DENIED: ${body.message}`
|
|
2117
2297
|
);
|
|
2118
2298
|
this.body = body;
|
|
2119
|
-
this.name = "
|
|
2299
|
+
this.name = "AccessDeniedError";
|
|
2120
2300
|
}
|
|
2121
|
-
static code = "
|
|
2122
|
-
static statusCode =
|
|
2123
|
-
static description = `
|
|
2301
|
+
static code = "ACCESS_DENIED";
|
|
2302
|
+
static statusCode = 403;
|
|
2303
|
+
static description = `VM access denied`;
|
|
2124
2304
|
}
|
|
2125
|
-
class
|
|
2305
|
+
class BranchNameEmptyError extends Error {
|
|
2126
2306
|
constructor(body) {
|
|
2127
2307
|
super(
|
|
2128
|
-
`
|
|
2308
|
+
`BRANCH_NAME_EMPTY: ${body.message}`
|
|
2129
2309
|
);
|
|
2130
2310
|
this.body = body;
|
|
2131
|
-
this.name = "
|
|
2311
|
+
this.name = "BranchNameEmptyError";
|
|
2132
2312
|
}
|
|
2133
|
-
static code = "
|
|
2134
|
-
static statusCode =
|
|
2135
|
-
static description = `
|
|
2313
|
+
static code = "BRANCH_NAME_EMPTY";
|
|
2314
|
+
static statusCode = 400;
|
|
2315
|
+
static description = `Branch name cannot be empty`;
|
|
2136
2316
|
}
|
|
2137
|
-
class
|
|
2317
|
+
class UnauthorizedErrorError extends Error {
|
|
2138
2318
|
constructor(body) {
|
|
2139
2319
|
super(
|
|
2140
|
-
`
|
|
2320
|
+
`UNAUTHORIZED_ERROR: ${body.message}`
|
|
2141
2321
|
);
|
|
2142
2322
|
this.body = body;
|
|
2143
|
-
this.name = "
|
|
2323
|
+
this.name = "UnauthorizedErrorError";
|
|
2144
2324
|
}
|
|
2145
|
-
static code = "
|
|
2146
|
-
static statusCode =
|
|
2147
|
-
static description = `
|
|
2325
|
+
static code = "UNAUTHORIZED_ERROR";
|
|
2326
|
+
static statusCode = 401;
|
|
2327
|
+
static description = `Unauthorized request to {route}`;
|
|
2148
2328
|
}
|
|
2149
2329
|
class TriggerErrorError extends Error {
|
|
2150
2330
|
constructor(body) {
|
|
@@ -2476,191 +2656,23 @@ class FailedPermissionsCheckError extends Error {
|
|
|
2476
2656
|
`FAILED_PERMISSIONS_CHECK: ${body.message}`
|
|
2477
2657
|
);
|
|
2478
2658
|
this.body = body;
|
|
2479
|
-
this.name = "FailedPermissionsCheckError";
|
|
2480
|
-
}
|
|
2481
|
-
static code = "FAILED_PERMISSIONS_CHECK";
|
|
2482
|
-
static statusCode = 401;
|
|
2483
|
-
static description = `You do not have permission to delete the domain mapping for: {domain}`;
|
|
2484
|
-
}
|
|
2485
|
-
class FailedToCheckDomainMappingPermissionsError extends Error {
|
|
2486
|
-
constructor(body) {
|
|
2487
|
-
super(
|
|
2488
|
-
`FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS: ${body.message}`
|
|
2489
|
-
);
|
|
2490
|
-
this.body = body;
|
|
2491
|
-
this.name = "FailedToCheckDomainMappingPermissionsError";
|
|
2492
|
-
}
|
|
2493
|
-
static code = "FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS";
|
|
2494
|
-
static statusCode = 502;
|
|
2495
|
-
static description = `Failed to check permissions: {message}`;
|
|
2496
|
-
}
|
|
2497
|
-
class DomainOwnershipVerificationFailedError extends Error {
|
|
2498
|
-
constructor(body) {
|
|
2499
|
-
super(
|
|
2500
|
-
`DOMAIN_OWNERSHIP_VERIFICATION_FAILED: ${body.message}`
|
|
2501
|
-
);
|
|
2502
|
-
this.body = body;
|
|
2503
|
-
this.name = "DomainOwnershipVerificationFailedError";
|
|
2504
|
-
}
|
|
2505
|
-
static code = "DOMAIN_OWNERSHIP_VERIFICATION_FAILED";
|
|
2506
|
-
static statusCode = 403;
|
|
2507
|
-
static description = `Domain ownership verification failed`;
|
|
2508
|
-
}
|
|
2509
|
-
class ErrorDeletingRecordError extends Error {
|
|
2510
|
-
constructor(body) {
|
|
2511
|
-
super(
|
|
2512
|
-
`ERROR_DELETING_RECORD: ${body.message}`
|
|
2513
|
-
);
|
|
2514
|
-
this.body = body;
|
|
2515
|
-
this.name = "ErrorDeletingRecordError";
|
|
2516
|
-
}
|
|
2517
|
-
static code = "ERROR_DELETING_RECORD";
|
|
2518
|
-
static statusCode = 500;
|
|
2519
|
-
static description = `Error deleting DNS record for {domain}/{name}: {message}`;
|
|
2520
|
-
}
|
|
2521
|
-
class RecordOwnershipErrorError extends Error {
|
|
2522
|
-
constructor(body) {
|
|
2523
|
-
super(
|
|
2524
|
-
`RECORD_OWNERSHIP_ERROR: ${body.message}`
|
|
2525
|
-
);
|
|
2526
|
-
this.body = body;
|
|
2527
|
-
this.name = "RecordOwnershipErrorError";
|
|
2528
|
-
}
|
|
2529
|
-
static code = "RECORD_OWNERSHIP_ERROR";
|
|
2530
|
-
static statusCode = 403;
|
|
2531
|
-
static description = `Account {account_id} does not own record {record_id}`;
|
|
2532
|
-
}
|
|
2533
|
-
class ErrorCreatingRecordError extends Error {
|
|
2534
|
-
constructor(body) {
|
|
2535
|
-
super(
|
|
2536
|
-
`ERROR_CREATING_RECORD: ${body.message}`
|
|
2537
|
-
);
|
|
2538
|
-
this.body = body;
|
|
2539
|
-
this.name = "ErrorCreatingRecordError";
|
|
2540
|
-
}
|
|
2541
|
-
static code = "ERROR_CREATING_RECORD";
|
|
2542
|
-
static statusCode = 500;
|
|
2543
|
-
static description = `Error creating DNS record: {message}`;
|
|
2544
|
-
}
|
|
2545
|
-
class DomainOwnershipErrorError extends Error {
|
|
2546
|
-
constructor(body) {
|
|
2547
|
-
super(
|
|
2548
|
-
`DOMAIN_OWNERSHIP_ERROR: ${body.message}`
|
|
2549
|
-
);
|
|
2550
|
-
this.body = body;
|
|
2551
|
-
this.name = "DomainOwnershipErrorError";
|
|
2552
|
-
}
|
|
2553
|
-
static code = "DOMAIN_OWNERSHIP_ERROR";
|
|
2554
|
-
static statusCode = 403;
|
|
2555
|
-
static description = `Account {account_id} does not own domain {domain}`;
|
|
2556
|
-
}
|
|
2557
|
-
class CloudstateInternalErrorError extends Error {
|
|
2558
|
-
constructor(body) {
|
|
2559
|
-
super(
|
|
2560
|
-
`CLOUDSTATE_INTERNAL_ERROR: ${body.message}`
|
|
2561
|
-
);
|
|
2562
|
-
this.body = body;
|
|
2563
|
-
this.name = "CloudstateInternalErrorError";
|
|
2564
|
-
}
|
|
2565
|
-
static code = "CLOUDSTATE_INTERNAL_ERROR";
|
|
2566
|
-
static statusCode = 500;
|
|
2567
|
-
static description = `Internal error: {message}`;
|
|
2568
|
-
}
|
|
2569
|
-
class CloudstateDatabaseErrorError extends Error {
|
|
2570
|
-
constructor(body) {
|
|
2571
|
-
super(
|
|
2572
|
-
`CLOUDSTATE_DATABASE_ERROR: ${body.message}`
|
|
2573
|
-
);
|
|
2574
|
-
this.body = body;
|
|
2575
|
-
this.name = "CloudstateDatabaseErrorError";
|
|
2576
|
-
}
|
|
2577
|
-
static code = "CLOUDSTATE_DATABASE_ERROR";
|
|
2578
|
-
static statusCode = 500;
|
|
2579
|
-
static description = `Database operation failed: {message}`;
|
|
2580
|
-
}
|
|
2581
|
-
class CloudstateAccessDeniedError extends Error {
|
|
2582
|
-
constructor(body) {
|
|
2583
|
-
super(
|
|
2584
|
-
`CLOUDSTATE_ACCESS_DENIED: ${body.message}`
|
|
2585
|
-
);
|
|
2586
|
-
this.body = body;
|
|
2587
|
-
this.name = "CloudstateAccessDeniedError";
|
|
2588
|
-
}
|
|
2589
|
-
static code = "CLOUDSTATE_ACCESS_DENIED";
|
|
2590
|
-
static statusCode = 403;
|
|
2591
|
-
static description = `Access denied to project: {project_id}`;
|
|
2592
|
-
}
|
|
2593
|
-
class RestoreFailedError extends Error {
|
|
2594
|
-
constructor(body) {
|
|
2595
|
-
super(
|
|
2596
|
-
`RESTORE_FAILED: ${body.message}`
|
|
2597
|
-
);
|
|
2598
|
-
this.body = body;
|
|
2599
|
-
this.name = "RestoreFailedError";
|
|
2600
|
-
}
|
|
2601
|
-
static code = "RESTORE_FAILED";
|
|
2602
|
-
static statusCode = 500;
|
|
2603
|
-
static description = `Failed to restore from backup: {message}`;
|
|
2604
|
-
}
|
|
2605
|
-
class CreateBackupFailedError extends Error {
|
|
2606
|
-
constructor(body) {
|
|
2607
|
-
super(
|
|
2608
|
-
`CREATE_BACKUP_FAILED: ${body.message}`
|
|
2609
|
-
);
|
|
2610
|
-
this.body = body;
|
|
2611
|
-
this.name = "CreateBackupFailedError";
|
|
2612
|
-
}
|
|
2613
|
-
static code = "CREATE_BACKUP_FAILED";
|
|
2614
|
-
static statusCode = 500;
|
|
2615
|
-
static description = `Failed to create backup: {message}`;
|
|
2616
|
-
}
|
|
2617
|
-
class BackupFailedError extends Error {
|
|
2618
|
-
constructor(body) {
|
|
2619
|
-
super(
|
|
2620
|
-
`BACKUP_FAILED: ${body.message}`
|
|
2621
|
-
);
|
|
2622
|
-
this.body = body;
|
|
2623
|
-
this.name = "BackupFailedError";
|
|
2624
|
-
}
|
|
2625
|
-
static code = "BACKUP_FAILED";
|
|
2626
|
-
static statusCode = 500;
|
|
2627
|
-
static description = `Backup failed: {message}`;
|
|
2628
|
-
}
|
|
2629
|
-
class DeploymentFailedError extends Error {
|
|
2630
|
-
constructor(body) {
|
|
2631
|
-
super(
|
|
2632
|
-
`DEPLOYMENT_FAILED: ${body.message}`
|
|
2633
|
-
);
|
|
2634
|
-
this.body = body;
|
|
2635
|
-
this.name = "DeploymentFailedError";
|
|
2636
|
-
}
|
|
2637
|
-
static code = "DEPLOYMENT_FAILED";
|
|
2638
|
-
static statusCode = 500;
|
|
2639
|
-
static description = `Deployment failed: {message}`;
|
|
2640
|
-
}
|
|
2641
|
-
class InvalidDeploymentRequestError extends Error {
|
|
2642
|
-
constructor(body) {
|
|
2643
|
-
super(
|
|
2644
|
-
`INVALID_DEPLOYMENT_REQUEST: ${body.message}`
|
|
2645
|
-
);
|
|
2646
|
-
this.body = body;
|
|
2647
|
-
this.name = "InvalidDeploymentRequestError";
|
|
2659
|
+
this.name = "FailedPermissionsCheckError";
|
|
2648
2660
|
}
|
|
2649
|
-
static code = "
|
|
2650
|
-
static statusCode =
|
|
2651
|
-
static description = `
|
|
2661
|
+
static code = "FAILED_PERMISSIONS_CHECK";
|
|
2662
|
+
static statusCode = 401;
|
|
2663
|
+
static description = `You do not have permission to delete the domain mapping for: {domain}`;
|
|
2652
2664
|
}
|
|
2653
|
-
class
|
|
2665
|
+
class FailedToCheckDomainMappingPermissionsError extends Error {
|
|
2654
2666
|
constructor(body) {
|
|
2655
2667
|
super(
|
|
2656
|
-
`
|
|
2668
|
+
`FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS: ${body.message}`
|
|
2657
2669
|
);
|
|
2658
2670
|
this.body = body;
|
|
2659
|
-
this.name = "
|
|
2671
|
+
this.name = "FailedToCheckDomainMappingPermissionsError";
|
|
2660
2672
|
}
|
|
2661
|
-
static code = "
|
|
2662
|
-
static statusCode =
|
|
2663
|
-
static description = `
|
|
2673
|
+
static code = "FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS";
|
|
2674
|
+
static statusCode = 502;
|
|
2675
|
+
static description = `Failed to check permissions: {message}`;
|
|
2664
2676
|
}
|
|
2665
2677
|
class GitRepoLimitExceededError extends Error {
|
|
2666
2678
|
constructor(body) {
|
|
@@ -2686,413 +2698,449 @@ class EmptyTagError extends Error {
|
|
|
2686
2698
|
static statusCode = 400;
|
|
2687
2699
|
static description = `Invalid request: tag cannot be empty`;
|
|
2688
2700
|
}
|
|
2689
|
-
class
|
|
2701
|
+
class PersistentVmsNotAllowedError extends Error {
|
|
2690
2702
|
constructor(body) {
|
|
2691
2703
|
super(
|
|
2692
|
-
`
|
|
2704
|
+
`PERSISTENT_VMS_NOT_ALLOWED: ${body.message}`
|
|
2693
2705
|
);
|
|
2694
2706
|
this.body = body;
|
|
2695
|
-
this.name = "
|
|
2707
|
+
this.name = "PersistentVmsNotAllowedError";
|
|
2696
2708
|
}
|
|
2697
|
-
static code = "
|
|
2709
|
+
static code = "PERSISTENT_VMS_NOT_ALLOWED";
|
|
2698
2710
|
static statusCode = 403;
|
|
2699
|
-
static description = `
|
|
2711
|
+
static description = `Your plan does not allow persistent VMs. Use sticky or ephemeral persistence instead, or upgrade your plan.`;
|
|
2700
2712
|
}
|
|
2701
|
-
class
|
|
2713
|
+
class TotalVmLimitExceededError extends Error {
|
|
2702
2714
|
constructor(body) {
|
|
2703
2715
|
super(
|
|
2704
|
-
`
|
|
2716
|
+
`TOTAL_VM_LIMIT_EXCEEDED: ${body.message}`
|
|
2705
2717
|
);
|
|
2706
2718
|
this.body = body;
|
|
2707
|
-
this.name = "
|
|
2719
|
+
this.name = "TotalVmLimitExceededError";
|
|
2708
2720
|
}
|
|
2709
|
-
static code = "
|
|
2710
|
-
static statusCode =
|
|
2711
|
-
static description = `
|
|
2721
|
+
static code = "TOTAL_VM_LIMIT_EXCEEDED";
|
|
2722
|
+
static statusCode = 403;
|
|
2723
|
+
static description = `Total VM limit exceeded: your plan allows {limit} total VMs, you currently have {current}`;
|
|
2712
2724
|
}
|
|
2713
|
-
class
|
|
2725
|
+
class VmLimitExceededError extends Error {
|
|
2714
2726
|
constructor(body) {
|
|
2715
2727
|
super(
|
|
2716
|
-
`
|
|
2728
|
+
`VM_LIMIT_EXCEEDED: ${body.message}`
|
|
2717
2729
|
);
|
|
2718
2730
|
this.body = body;
|
|
2719
|
-
this.name = "
|
|
2731
|
+
this.name = "VmLimitExceededError";
|
|
2720
2732
|
}
|
|
2721
|
-
static code = "
|
|
2722
|
-
static statusCode =
|
|
2723
|
-
static description = `
|
|
2733
|
+
static code = "VM_LIMIT_EXCEEDED";
|
|
2734
|
+
static statusCode = 403;
|
|
2735
|
+
static description = `VM limit exceeded: your plan allows {limit} VMs, you currently have {current}`;
|
|
2724
2736
|
}
|
|
2725
|
-
class
|
|
2737
|
+
class PermissionAlreadyExistsError extends Error {
|
|
2726
2738
|
constructor(body) {
|
|
2727
2739
|
super(
|
|
2728
|
-
`
|
|
2740
|
+
`PERMISSION_ALREADY_EXISTS: ${body.message}`
|
|
2729
2741
|
);
|
|
2730
2742
|
this.body = body;
|
|
2731
|
-
this.name = "
|
|
2743
|
+
this.name = "PermissionAlreadyExistsError";
|
|
2732
2744
|
}
|
|
2733
|
-
static code = "
|
|
2734
|
-
static statusCode =
|
|
2735
|
-
static description = `Permission
|
|
2745
|
+
static code = "PERMISSION_ALREADY_EXISTS";
|
|
2746
|
+
static statusCode = 409;
|
|
2747
|
+
static description = `Permission already exists`;
|
|
2736
2748
|
}
|
|
2737
|
-
class
|
|
2749
|
+
class ListTokensFailedError extends Error {
|
|
2738
2750
|
constructor(body) {
|
|
2739
2751
|
super(
|
|
2740
|
-
`
|
|
2752
|
+
`LIST_TOKENS_FAILED: ${body.message}`
|
|
2741
2753
|
);
|
|
2742
2754
|
this.body = body;
|
|
2743
|
-
this.name = "
|
|
2755
|
+
this.name = "ListTokensFailedError";
|
|
2744
2756
|
}
|
|
2745
|
-
static code = "
|
|
2746
|
-
static statusCode =
|
|
2747
|
-
static description = `Failed to
|
|
2757
|
+
static code = "LIST_TOKENS_FAILED";
|
|
2758
|
+
static statusCode = 500;
|
|
2759
|
+
static description = `Failed to list tokens: {message}`;
|
|
2748
2760
|
}
|
|
2749
|
-
class
|
|
2761
|
+
class RevokeTokenFailedError extends Error {
|
|
2750
2762
|
constructor(body) {
|
|
2751
2763
|
super(
|
|
2752
|
-
`
|
|
2764
|
+
`REVOKE_TOKEN_FAILED: ${body.message}`
|
|
2753
2765
|
);
|
|
2754
2766
|
this.body = body;
|
|
2755
|
-
this.name = "
|
|
2767
|
+
this.name = "RevokeTokenFailedError";
|
|
2756
2768
|
}
|
|
2757
|
-
static code = "
|
|
2769
|
+
static code = "REVOKE_TOKEN_FAILED";
|
|
2758
2770
|
static statusCode = 500;
|
|
2759
|
-
static description = `Failed to
|
|
2771
|
+
static description = `Failed to revoke token: {message}`;
|
|
2760
2772
|
}
|
|
2761
|
-
class
|
|
2773
|
+
class CreateTokenFailedError extends Error {
|
|
2762
2774
|
constructor(body) {
|
|
2763
2775
|
super(
|
|
2764
|
-
`
|
|
2776
|
+
`CREATE_TOKEN_FAILED: ${body.message}`
|
|
2765
2777
|
);
|
|
2766
2778
|
this.body = body;
|
|
2767
|
-
this.name = "
|
|
2779
|
+
this.name = "CreateTokenFailedError";
|
|
2768
2780
|
}
|
|
2769
|
-
static code = "
|
|
2781
|
+
static code = "CREATE_TOKEN_FAILED";
|
|
2770
2782
|
static statusCode = 500;
|
|
2771
|
-
static description = `Failed to
|
|
2783
|
+
static description = `Failed to create token: {message}`;
|
|
2772
2784
|
}
|
|
2773
|
-
class
|
|
2785
|
+
class ListPermissionsFailedError extends Error {
|
|
2774
2786
|
constructor(body) {
|
|
2775
2787
|
super(
|
|
2776
|
-
`
|
|
2788
|
+
`LIST_PERMISSIONS_FAILED: ${body.message}`
|
|
2777
2789
|
);
|
|
2778
2790
|
this.body = body;
|
|
2779
|
-
this.name = "
|
|
2791
|
+
this.name = "ListPermissionsFailedError";
|
|
2780
2792
|
}
|
|
2781
|
-
static code = "
|
|
2793
|
+
static code = "LIST_PERMISSIONS_FAILED";
|
|
2782
2794
|
static statusCode = 500;
|
|
2783
|
-
static description = `Failed to
|
|
2795
|
+
static description = `Failed to list permissions: {message}`;
|
|
2784
2796
|
}
|
|
2785
|
-
class
|
|
2797
|
+
class GetPermissionFailedError extends Error {
|
|
2786
2798
|
constructor(body) {
|
|
2787
2799
|
super(
|
|
2788
|
-
`
|
|
2800
|
+
`GET_PERMISSION_FAILED: ${body.message}`
|
|
2789
2801
|
);
|
|
2790
2802
|
this.body = body;
|
|
2791
|
-
this.name = "
|
|
2803
|
+
this.name = "GetPermissionFailedError";
|
|
2792
2804
|
}
|
|
2793
|
-
static code = "
|
|
2794
|
-
static statusCode =
|
|
2795
|
-
static description = `
|
|
2805
|
+
static code = "GET_PERMISSION_FAILED";
|
|
2806
|
+
static statusCode = 500;
|
|
2807
|
+
static description = `Failed to get permission: {message}`;
|
|
2796
2808
|
}
|
|
2797
|
-
class
|
|
2809
|
+
class UpdatePermissionFailedError extends Error {
|
|
2798
2810
|
constructor(body) {
|
|
2799
2811
|
super(
|
|
2800
|
-
`
|
|
2812
|
+
`UPDATE_PERMISSION_FAILED: ${body.message}`
|
|
2801
2813
|
);
|
|
2802
2814
|
this.body = body;
|
|
2803
|
-
this.name = "
|
|
2815
|
+
this.name = "UpdatePermissionFailedError";
|
|
2804
2816
|
}
|
|
2805
|
-
static code = "
|
|
2806
|
-
static statusCode =
|
|
2807
|
-
static description = `Failed to
|
|
2817
|
+
static code = "UPDATE_PERMISSION_FAILED";
|
|
2818
|
+
static statusCode = 500;
|
|
2819
|
+
static description = `Failed to update permission: {message}`;
|
|
2808
2820
|
}
|
|
2809
|
-
class
|
|
2821
|
+
class RevokePermissionFailedError extends Error {
|
|
2810
2822
|
constructor(body) {
|
|
2811
2823
|
super(
|
|
2812
|
-
`
|
|
2824
|
+
`REVOKE_PERMISSION_FAILED: ${body.message}`
|
|
2813
2825
|
);
|
|
2814
2826
|
this.body = body;
|
|
2815
|
-
this.name = "
|
|
2827
|
+
this.name = "RevokePermissionFailedError";
|
|
2816
2828
|
}
|
|
2817
|
-
static code = "
|
|
2818
|
-
static statusCode =
|
|
2819
|
-
static description = `
|
|
2829
|
+
static code = "REVOKE_PERMISSION_FAILED";
|
|
2830
|
+
static statusCode = 500;
|
|
2831
|
+
static description = `Failed to revoke permission: {message}`;
|
|
2820
2832
|
}
|
|
2821
|
-
class
|
|
2833
|
+
class GrantPermissionFailedError extends Error {
|
|
2822
2834
|
constructor(body) {
|
|
2823
2835
|
super(
|
|
2824
|
-
`
|
|
2836
|
+
`GRANT_PERMISSION_FAILED: ${body.message}`
|
|
2825
2837
|
);
|
|
2826
2838
|
this.body = body;
|
|
2827
|
-
this.name = "
|
|
2839
|
+
this.name = "GrantPermissionFailedError";
|
|
2828
2840
|
}
|
|
2829
|
-
static code = "
|
|
2830
|
-
static statusCode =
|
|
2831
|
-
static description = `Failed to
|
|
2841
|
+
static code = "GRANT_PERMISSION_FAILED";
|
|
2842
|
+
static statusCode = 500;
|
|
2843
|
+
static description = `Failed to grant permission: {message}`;
|
|
2832
2844
|
}
|
|
2833
|
-
class
|
|
2845
|
+
class ListIdentitiesFailedError extends Error {
|
|
2834
2846
|
constructor(body) {
|
|
2835
2847
|
super(
|
|
2836
|
-
`
|
|
2848
|
+
`LIST_IDENTITIES_FAILED: ${body.message}`
|
|
2837
2849
|
);
|
|
2838
2850
|
this.body = body;
|
|
2839
|
-
this.name = "
|
|
2851
|
+
this.name = "ListIdentitiesFailedError";
|
|
2840
2852
|
}
|
|
2841
|
-
static code = "
|
|
2842
|
-
static statusCode =
|
|
2843
|
-
static description = `
|
|
2853
|
+
static code = "LIST_IDENTITIES_FAILED";
|
|
2854
|
+
static statusCode = 500;
|
|
2855
|
+
static description = `Failed to list identities: {message}`;
|
|
2844
2856
|
}
|
|
2845
|
-
class
|
|
2857
|
+
class DeleteIdentityFailedError extends Error {
|
|
2846
2858
|
constructor(body) {
|
|
2847
2859
|
super(
|
|
2848
|
-
`
|
|
2860
|
+
`DELETE_IDENTITY_FAILED: ${body.message}`
|
|
2849
2861
|
);
|
|
2850
2862
|
this.body = body;
|
|
2851
|
-
this.name = "
|
|
2863
|
+
this.name = "DeleteIdentityFailedError";
|
|
2852
2864
|
}
|
|
2853
|
-
static code = "
|
|
2854
|
-
static statusCode =
|
|
2855
|
-
static description = `
|
|
2865
|
+
static code = "DELETE_IDENTITY_FAILED";
|
|
2866
|
+
static statusCode = 500;
|
|
2867
|
+
static description = `Failed to delete identity: {message}`;
|
|
2856
2868
|
}
|
|
2857
|
-
class
|
|
2869
|
+
class CreateIdentityFailedError extends Error {
|
|
2858
2870
|
constructor(body) {
|
|
2859
2871
|
super(
|
|
2860
|
-
`
|
|
2872
|
+
`CREATE_IDENTITY_FAILED: ${body.message}`
|
|
2861
2873
|
);
|
|
2862
2874
|
this.body = body;
|
|
2863
|
-
this.name = "
|
|
2875
|
+
this.name = "CreateIdentityFailedError";
|
|
2864
2876
|
}
|
|
2865
|
-
static code = "
|
|
2877
|
+
static code = "CREATE_IDENTITY_FAILED";
|
|
2866
2878
|
static statusCode = 500;
|
|
2867
|
-
static description = `
|
|
2879
|
+
static description = `Failed to create identity: {message}`;
|
|
2868
2880
|
}
|
|
2869
|
-
class
|
|
2881
|
+
class VmPermissionNotFoundError extends Error {
|
|
2870
2882
|
constructor(body) {
|
|
2871
2883
|
super(
|
|
2872
|
-
`
|
|
2884
|
+
`VM_PERMISSION_NOT_FOUND: ${body.message}`
|
|
2873
2885
|
);
|
|
2874
2886
|
this.body = body;
|
|
2875
|
-
this.name = "
|
|
2887
|
+
this.name = "VmPermissionNotFoundError";
|
|
2876
2888
|
}
|
|
2877
|
-
static code = "
|
|
2889
|
+
static code = "VM_PERMISSION_NOT_FOUND";
|
|
2890
|
+
static statusCode = 404;
|
|
2891
|
+
static description = `VM permission not found`;
|
|
2892
|
+
}
|
|
2893
|
+
class PermissionNotFoundError extends Error {
|
|
2894
|
+
constructor(body) {
|
|
2895
|
+
super(
|
|
2896
|
+
`PERMISSION_NOT_FOUND: ${body.message}`
|
|
2897
|
+
);
|
|
2898
|
+
this.body = body;
|
|
2899
|
+
this.name = "PermissionNotFoundError";
|
|
2900
|
+
}
|
|
2901
|
+
static code = "PERMISSION_NOT_FOUND";
|
|
2902
|
+
static statusCode = 404;
|
|
2903
|
+
static description = `Permission not found`;
|
|
2904
|
+
}
|
|
2905
|
+
class GitRepositoryAccessDeniedError extends Error {
|
|
2906
|
+
constructor(body) {
|
|
2907
|
+
super(
|
|
2908
|
+
`GIT_REPOSITORY_ACCESS_DENIED: ${body.message}`
|
|
2909
|
+
);
|
|
2910
|
+
this.body = body;
|
|
2911
|
+
this.name = "GitRepositoryAccessDeniedError";
|
|
2912
|
+
}
|
|
2913
|
+
static code = "GIT_REPOSITORY_ACCESS_DENIED";
|
|
2878
2914
|
static statusCode = 403;
|
|
2879
|
-
static description = `
|
|
2915
|
+
static description = `You are not allowed to access this repository`;
|
|
2880
2916
|
}
|
|
2881
|
-
class
|
|
2917
|
+
class GitRepositoryNotFoundError extends Error {
|
|
2882
2918
|
constructor(body) {
|
|
2883
2919
|
super(
|
|
2884
|
-
`
|
|
2920
|
+
`GIT_REPOSITORY_NOT_FOUND: ${body.message}`
|
|
2885
2921
|
);
|
|
2886
2922
|
this.body = body;
|
|
2887
|
-
this.name = "
|
|
2923
|
+
this.name = "GitRepositoryNotFoundError";
|
|
2888
2924
|
}
|
|
2889
|
-
static code = "
|
|
2890
|
-
static statusCode =
|
|
2891
|
-
static description = `
|
|
2925
|
+
static code = "GIT_REPOSITORY_NOT_FOUND";
|
|
2926
|
+
static statusCode = 404;
|
|
2927
|
+
static description = `Repository not found`;
|
|
2892
2928
|
}
|
|
2893
|
-
class
|
|
2929
|
+
class CannotDeleteManagedIdentityError extends Error {
|
|
2894
2930
|
constructor(body) {
|
|
2895
2931
|
super(
|
|
2896
|
-
`
|
|
2932
|
+
`CANNOT_DELETE_MANAGED_IDENTITY: ${body.message}`
|
|
2897
2933
|
);
|
|
2898
2934
|
this.body = body;
|
|
2899
|
-
this.name = "
|
|
2935
|
+
this.name = "CannotDeleteManagedIdentityError";
|
|
2900
2936
|
}
|
|
2901
|
-
static code = "
|
|
2902
|
-
static statusCode =
|
|
2903
|
-
static description = `
|
|
2937
|
+
static code = "CANNOT_DELETE_MANAGED_IDENTITY";
|
|
2938
|
+
static statusCode = 403;
|
|
2939
|
+
static description = `Cannot delete managed identities`;
|
|
2904
2940
|
}
|
|
2905
|
-
class
|
|
2941
|
+
class CannotModifyManagedIdentityError extends Error {
|
|
2906
2942
|
constructor(body) {
|
|
2907
2943
|
super(
|
|
2908
|
-
`
|
|
2944
|
+
`CANNOT_MODIFY_MANAGED_IDENTITY: ${body.message}`
|
|
2909
2945
|
);
|
|
2910
2946
|
this.body = body;
|
|
2911
|
-
this.name = "
|
|
2947
|
+
this.name = "CannotModifyManagedIdentityError";
|
|
2948
|
+
}
|
|
2949
|
+
static code = "CANNOT_MODIFY_MANAGED_IDENTITY";
|
|
2950
|
+
static statusCode = 403;
|
|
2951
|
+
static description = `Cannot modify managed identities`;
|
|
2952
|
+
}
|
|
2953
|
+
class IdentityAccessDeniedError extends Error {
|
|
2954
|
+
constructor(body) {
|
|
2955
|
+
super(
|
|
2956
|
+
`IDENTITY_ACCESS_DENIED: ${body.message}`
|
|
2957
|
+
);
|
|
2958
|
+
this.body = body;
|
|
2959
|
+
this.name = "IdentityAccessDeniedError";
|
|
2912
2960
|
}
|
|
2913
|
-
static code = "
|
|
2914
|
-
static statusCode =
|
|
2915
|
-
static description = `
|
|
2961
|
+
static code = "IDENTITY_ACCESS_DENIED";
|
|
2962
|
+
static statusCode = 403;
|
|
2963
|
+
static description = `You are not allowed to access this identity`;
|
|
2916
2964
|
}
|
|
2917
|
-
class
|
|
2965
|
+
class IdentityNotFoundError extends Error {
|
|
2918
2966
|
constructor(body) {
|
|
2919
2967
|
super(
|
|
2920
|
-
`
|
|
2968
|
+
`IDENTITY_NOT_FOUND: ${body.message}`
|
|
2921
2969
|
);
|
|
2922
2970
|
this.body = body;
|
|
2923
|
-
this.name = "
|
|
2971
|
+
this.name = "IdentityNotFoundError";
|
|
2924
2972
|
}
|
|
2925
|
-
static code = "
|
|
2973
|
+
static code = "IDENTITY_NOT_FOUND";
|
|
2926
2974
|
static statusCode = 404;
|
|
2927
|
-
static description = `
|
|
2975
|
+
static description = `Identity not found`;
|
|
2928
2976
|
}
|
|
2929
|
-
class
|
|
2977
|
+
class DomainOwnershipVerificationFailedError extends Error {
|
|
2930
2978
|
constructor(body) {
|
|
2931
2979
|
super(
|
|
2932
|
-
`
|
|
2980
|
+
`DOMAIN_OWNERSHIP_VERIFICATION_FAILED: ${body.message}`
|
|
2933
2981
|
);
|
|
2934
2982
|
this.body = body;
|
|
2935
|
-
this.name = "
|
|
2983
|
+
this.name = "DomainOwnershipVerificationFailedError";
|
|
2936
2984
|
}
|
|
2937
|
-
static code = "
|
|
2938
|
-
static statusCode =
|
|
2939
|
-
static description = `
|
|
2985
|
+
static code = "DOMAIN_OWNERSHIP_VERIFICATION_FAILED";
|
|
2986
|
+
static statusCode = 403;
|
|
2987
|
+
static description = `Domain ownership verification failed`;
|
|
2940
2988
|
}
|
|
2941
|
-
class
|
|
2989
|
+
class ErrorDeletingRecordError extends Error {
|
|
2942
2990
|
constructor(body) {
|
|
2943
2991
|
super(
|
|
2944
|
-
`
|
|
2992
|
+
`ERROR_DELETING_RECORD: ${body.message}`
|
|
2945
2993
|
);
|
|
2946
2994
|
this.body = body;
|
|
2947
|
-
this.name = "
|
|
2995
|
+
this.name = "ErrorDeletingRecordError";
|
|
2948
2996
|
}
|
|
2949
|
-
static code = "
|
|
2950
|
-
static statusCode =
|
|
2951
|
-
static description = `
|
|
2997
|
+
static code = "ERROR_DELETING_RECORD";
|
|
2998
|
+
static statusCode = 500;
|
|
2999
|
+
static description = `Error deleting DNS record for {domain}/{name}: {message}`;
|
|
2952
3000
|
}
|
|
2953
|
-
class
|
|
3001
|
+
class RecordOwnershipErrorError extends Error {
|
|
2954
3002
|
constructor(body) {
|
|
2955
3003
|
super(
|
|
2956
|
-
`
|
|
3004
|
+
`RECORD_OWNERSHIP_ERROR: ${body.message}`
|
|
2957
3005
|
);
|
|
2958
3006
|
this.body = body;
|
|
2959
|
-
this.name = "
|
|
3007
|
+
this.name = "RecordOwnershipErrorError";
|
|
2960
3008
|
}
|
|
2961
|
-
static code = "
|
|
2962
|
-
static statusCode =
|
|
2963
|
-
static description = `
|
|
3009
|
+
static code = "RECORD_OWNERSHIP_ERROR";
|
|
3010
|
+
static statusCode = 403;
|
|
3011
|
+
static description = `Account {account_id} does not own record {record_id}`;
|
|
2964
3012
|
}
|
|
2965
|
-
class
|
|
3013
|
+
class ErrorCreatingRecordError extends Error {
|
|
2966
3014
|
constructor(body) {
|
|
2967
3015
|
super(
|
|
2968
|
-
`
|
|
3016
|
+
`ERROR_CREATING_RECORD: ${body.message}`
|
|
2969
3017
|
);
|
|
2970
3018
|
this.body = body;
|
|
2971
|
-
this.name = "
|
|
3019
|
+
this.name = "ErrorCreatingRecordError";
|
|
2972
3020
|
}
|
|
2973
|
-
static code = "
|
|
3021
|
+
static code = "ERROR_CREATING_RECORD";
|
|
2974
3022
|
static statusCode = 500;
|
|
2975
|
-
static description = `
|
|
3023
|
+
static description = `Error creating DNS record: {message}`;
|
|
2976
3024
|
}
|
|
2977
|
-
class
|
|
3025
|
+
class DomainOwnershipErrorError extends Error {
|
|
2978
3026
|
constructor(body) {
|
|
2979
3027
|
super(
|
|
2980
|
-
`
|
|
3028
|
+
`DOMAIN_OWNERSHIP_ERROR: ${body.message}`
|
|
2981
3029
|
);
|
|
2982
3030
|
this.body = body;
|
|
2983
|
-
this.name = "
|
|
3031
|
+
this.name = "DomainOwnershipErrorError";
|
|
2984
3032
|
}
|
|
2985
|
-
static code = "
|
|
2986
|
-
static statusCode =
|
|
2987
|
-
static description = `
|
|
3033
|
+
static code = "DOMAIN_OWNERSHIP_ERROR";
|
|
3034
|
+
static statusCode = 403;
|
|
3035
|
+
static description = `Account {account_id} does not own domain {domain}`;
|
|
2988
3036
|
}
|
|
2989
|
-
class
|
|
3037
|
+
class CloudstateInternalErrorError extends Error {
|
|
2990
3038
|
constructor(body) {
|
|
2991
3039
|
super(
|
|
2992
|
-
`
|
|
3040
|
+
`CLOUDSTATE_INTERNAL_ERROR: ${body.message}`
|
|
2993
3041
|
);
|
|
2994
3042
|
this.body = body;
|
|
2995
|
-
this.name = "
|
|
3043
|
+
this.name = "CloudstateInternalErrorError";
|
|
2996
3044
|
}
|
|
2997
|
-
static code = "
|
|
3045
|
+
static code = "CLOUDSTATE_INTERNAL_ERROR";
|
|
2998
3046
|
static statusCode = 500;
|
|
2999
|
-
static description = `
|
|
3047
|
+
static description = `Internal error: {message}`;
|
|
3000
3048
|
}
|
|
3001
|
-
class
|
|
3049
|
+
class CloudstateDatabaseErrorError extends Error {
|
|
3002
3050
|
constructor(body) {
|
|
3003
3051
|
super(
|
|
3004
|
-
`
|
|
3052
|
+
`CLOUDSTATE_DATABASE_ERROR: ${body.message}`
|
|
3005
3053
|
);
|
|
3006
3054
|
this.body = body;
|
|
3007
|
-
this.name = "
|
|
3055
|
+
this.name = "CloudstateDatabaseErrorError";
|
|
3008
3056
|
}
|
|
3009
|
-
static code = "
|
|
3057
|
+
static code = "CLOUDSTATE_DATABASE_ERROR";
|
|
3010
3058
|
static statusCode = 500;
|
|
3011
|
-
static description = `
|
|
3059
|
+
static description = `Database operation failed: {message}`;
|
|
3012
3060
|
}
|
|
3013
|
-
class
|
|
3061
|
+
class CloudstateAccessDeniedError extends Error {
|
|
3014
3062
|
constructor(body) {
|
|
3015
3063
|
super(
|
|
3016
|
-
`
|
|
3064
|
+
`CLOUDSTATE_ACCESS_DENIED: ${body.message}`
|
|
3017
3065
|
);
|
|
3018
3066
|
this.body = body;
|
|
3019
|
-
this.name = "
|
|
3067
|
+
this.name = "CloudstateAccessDeniedError";
|
|
3020
3068
|
}
|
|
3021
|
-
static code = "
|
|
3022
|
-
static statusCode =
|
|
3023
|
-
static description = `
|
|
3069
|
+
static code = "CLOUDSTATE_ACCESS_DENIED";
|
|
3070
|
+
static statusCode = 403;
|
|
3071
|
+
static description = `Access denied to project: {project_id}`;
|
|
3024
3072
|
}
|
|
3025
|
-
class
|
|
3073
|
+
class RestoreFailedError extends Error {
|
|
3026
3074
|
constructor(body) {
|
|
3027
3075
|
super(
|
|
3028
|
-
`
|
|
3076
|
+
`RESTORE_FAILED: ${body.message}`
|
|
3029
3077
|
);
|
|
3030
3078
|
this.body = body;
|
|
3031
|
-
this.name = "
|
|
3079
|
+
this.name = "RestoreFailedError";
|
|
3032
3080
|
}
|
|
3033
|
-
static code = "
|
|
3081
|
+
static code = "RESTORE_FAILED";
|
|
3034
3082
|
static statusCode = 500;
|
|
3035
|
-
static description = `Failed to
|
|
3083
|
+
static description = `Failed to restore from backup: {message}`;
|
|
3036
3084
|
}
|
|
3037
|
-
class
|
|
3085
|
+
class CreateBackupFailedError extends Error {
|
|
3038
3086
|
constructor(body) {
|
|
3039
3087
|
super(
|
|
3040
|
-
`
|
|
3088
|
+
`CREATE_BACKUP_FAILED: ${body.message}`
|
|
3041
3089
|
);
|
|
3042
3090
|
this.body = body;
|
|
3043
|
-
this.name = "
|
|
3091
|
+
this.name = "CreateBackupFailedError";
|
|
3044
3092
|
}
|
|
3045
|
-
static code = "
|
|
3093
|
+
static code = "CREATE_BACKUP_FAILED";
|
|
3046
3094
|
static statusCode = 500;
|
|
3047
|
-
static description = `Failed to
|
|
3095
|
+
static description = `Failed to create backup: {message}`;
|
|
3048
3096
|
}
|
|
3049
|
-
class
|
|
3097
|
+
class BackupFailedError extends Error {
|
|
3050
3098
|
constructor(body) {
|
|
3051
3099
|
super(
|
|
3052
|
-
`
|
|
3100
|
+
`BACKUP_FAILED: ${body.message}`
|
|
3053
3101
|
);
|
|
3054
3102
|
this.body = body;
|
|
3055
|
-
this.name = "
|
|
3103
|
+
this.name = "BackupFailedError";
|
|
3056
3104
|
}
|
|
3057
|
-
static code = "
|
|
3105
|
+
static code = "BACKUP_FAILED";
|
|
3058
3106
|
static statusCode = 500;
|
|
3059
|
-
static description = `
|
|
3107
|
+
static description = `Backup failed: {message}`;
|
|
3060
3108
|
}
|
|
3061
|
-
class
|
|
3109
|
+
class DeploymentFailedError extends Error {
|
|
3062
3110
|
constructor(body) {
|
|
3063
3111
|
super(
|
|
3064
|
-
`
|
|
3112
|
+
`DEPLOYMENT_FAILED: ${body.message}`
|
|
3065
3113
|
);
|
|
3066
3114
|
this.body = body;
|
|
3067
|
-
this.name = "
|
|
3115
|
+
this.name = "DeploymentFailedError";
|
|
3068
3116
|
}
|
|
3069
|
-
static code = "
|
|
3117
|
+
static code = "DEPLOYMENT_FAILED";
|
|
3070
3118
|
static statusCode = 500;
|
|
3071
|
-
static description = `
|
|
3119
|
+
static description = `Deployment failed: {message}`;
|
|
3072
3120
|
}
|
|
3073
|
-
class
|
|
3121
|
+
class InvalidDeploymentRequestError extends Error {
|
|
3074
3122
|
constructor(body) {
|
|
3075
3123
|
super(
|
|
3076
|
-
`
|
|
3124
|
+
`INVALID_DEPLOYMENT_REQUEST: ${body.message}`
|
|
3077
3125
|
);
|
|
3078
3126
|
this.body = body;
|
|
3079
|
-
this.name = "
|
|
3127
|
+
this.name = "InvalidDeploymentRequestError";
|
|
3080
3128
|
}
|
|
3081
|
-
static code = "
|
|
3082
|
-
static statusCode =
|
|
3083
|
-
static description = `
|
|
3129
|
+
static code = "INVALID_DEPLOYMENT_REQUEST";
|
|
3130
|
+
static statusCode = 400;
|
|
3131
|
+
static description = `Invalid deployment request: {message}`;
|
|
3084
3132
|
}
|
|
3085
|
-
class
|
|
3133
|
+
class ProjectNotFoundError extends Error {
|
|
3086
3134
|
constructor(body) {
|
|
3087
3135
|
super(
|
|
3088
|
-
`
|
|
3136
|
+
`PROJECT_NOT_FOUND: ${body.message}`
|
|
3089
3137
|
);
|
|
3090
3138
|
this.body = body;
|
|
3091
|
-
this.name = "
|
|
3139
|
+
this.name = "ProjectNotFoundError";
|
|
3092
3140
|
}
|
|
3093
|
-
static code = "
|
|
3141
|
+
static code = "PROJECT_NOT_FOUND";
|
|
3094
3142
|
static statusCode = 404;
|
|
3095
|
-
static description = `
|
|
3143
|
+
static description = `Project not found: {project_id}`;
|
|
3096
3144
|
}
|
|
3097
3145
|
const FREESTYLE_ERROR_CODE_MAP = {
|
|
3098
3146
|
"BAD_PARSE": BadParseError,
|
|
@@ -3101,55 +3149,33 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3101
3149
|
"BAD_HEADER": BadHeaderError,
|
|
3102
3150
|
"BAD_KEY": BadKeyError,
|
|
3103
3151
|
"GIT_ERROR": GitErrorError,
|
|
3104
|
-
"PARTITION_NOT_FOUND": PartitionNotFoundError,
|
|
3105
|
-
"VM_OPERATION_DENIED_DURING_TRANSACTION": VmOperationDeniedDuringTransactionError,
|
|
3106
|
-
"VM_TRANSACTION_ID_MISMATCH": VmTransactionIdMismatchError,
|
|
3107
|
-
"VM_NOT_IN_TRANSACTION": VmNotInTransactionError,
|
|
3108
|
-
"VM_NOT_RUNNING": VmNotRunningError,
|
|
3109
|
-
"FILE_NOT_FOUND": FileNotFoundError,
|
|
3110
|
-
"FILES_BAD_REQUEST": FilesBadRequestError,
|
|
3111
|
-
"INVALID_GIT_REPO_SPEC_ERROR": InvalidGitRepoSpecErrorError,
|
|
3112
|
-
"INTERNAL_ERROR": InternalErrorError,
|
|
3113
|
-
"FORK_VM_NOT_FOUND": ForkVmNotFoundError,
|
|
3114
|
-
"CREATE_SNAPSHOT_BAD_REQUEST": CreateSnapshotBadRequestError,
|
|
3115
|
-
"ACTIVE_TRANSACTION_ERROR": ActiveTransactionErrorError,
|
|
3116
|
-
"SWAP_VM_TAP": SwapVmTapError,
|
|
3117
|
-
"ROOTFS_COPY_ERROR": RootfsCopyErrorError,
|
|
3118
|
-
"VM_NOT_FOUND_IN_FS": VmNotFoundInFsError,
|
|
3119
|
-
"DATABASE_ERROR": DatabaseErrorError,
|
|
3120
|
-
"INVALID_VM_ID": InvalidVmIdError,
|
|
3121
|
-
"VM_NOT_FOUND": VmNotFoundError,
|
|
3122
|
-
"INTERNAL_FORK_VM_NOT_FOUND": InternalForkVmNotFoundError,
|
|
3123
|
-
"BAD_REQUEST": BadRequestError,
|
|
3124
|
-
"INTERNAL_VM_NOT_FOUND": InternalVmNotFoundError,
|
|
3125
|
-
"SNAPSHOT_SETUP_FAILED": SnapshotSetupFailedError,
|
|
3126
|
-
"SNAPSHOT_VM_BAD_REQUEST": SnapshotVmBadRequestError,
|
|
3127
|
-
"VM_DELETED": VmDeletedError,
|
|
3128
|
-
"NO_DEFAULT_SNAPSHOT_AVAILABLE": NoDefaultSnapshotAvailableError,
|
|
3129
|
-
"DOCKER_SNAPSHOT_FAILED": DockerSnapshotFailedError,
|
|
3130
|
-
"SET_DEFAULT_SNAPSHOT_FAILED": SetDefaultSnapshotFailedError,
|
|
3131
|
-
"SNAPSHOT_LAYER_CREATION_FAILED": SnapshotLayerCreationFailedError,
|
|
3132
|
-
"SNAPSHOT_DIR_NOT_FOUND": SnapshotDirNotFoundError,
|
|
3133
|
-
"SUBVOLUME_CREATION_FAILED": SubvolumeCreationFailedError,
|
|
3134
|
-
"GET_DEFAULT_SNAPSHOT_FAILED": GetDefaultSnapshotFailedError,
|
|
3135
|
-
"SUSPEND_FAILED_AND_STOP_FAILED": SuspendFailedAndStopFailedError,
|
|
3136
|
-
"SUSPEND_FAILED_AND_STOPPED": SuspendFailedAndStoppedError,
|
|
3137
3152
|
"SNAPSHOT_NOT_FOUND": SnapshotNotFoundError,
|
|
3138
3153
|
"RESUMED_VM_NON_RESPONSIVE": ResumedVmNonResponsiveError,
|
|
3139
3154
|
"SNAPSHOT_LOAD_TIMEOUT": SnapshotLoadTimeoutError,
|
|
3140
3155
|
"UFFD_TIMEOUT_ERROR": UffdTimeoutErrorError,
|
|
3141
3156
|
"KERNEL_PANIC": KernelPanicError,
|
|
3157
|
+
"VM_DELETED": VmDeletedError,
|
|
3142
3158
|
"REQWEST": ReqwestError,
|
|
3143
3159
|
"FIRECRACKER_PID_NOT_FOUND": FirecrackerPidNotFoundError,
|
|
3144
3160
|
"FIRECRACKER_API_SOCKET_NOT_FOUND": FirecrackerApiSocketNotFoundError,
|
|
3145
3161
|
"INVALID_SNAPSHOT_ID": InvalidSnapshotIdError,
|
|
3146
3162
|
"VM_START_TIMEOUT": VmStartTimeoutError,
|
|
3163
|
+
"VM_IS_SUSPENDING": VmIsSuspendingError,
|
|
3147
3164
|
"VM_EXIT_DURING_START": VmExitDuringStartError,
|
|
3148
3165
|
"VM_ACCESS_DENIED": VmAccessDeniedError,
|
|
3149
3166
|
"STD_IO": StdIoError,
|
|
3150
3167
|
"FAILED_TO_SPAWN_UFFD": FailedToSpawnUffdError,
|
|
3151
3168
|
"VM_SPAWN_PROCESS": VmSpawnProcessError,
|
|
3152
3169
|
"VM_SUBNET_NOT_FOUND": VmSubnetNotFoundError,
|
|
3170
|
+
"VM_OPERATION_DENIED_DURING_TRANSACTION": VmOperationDeniedDuringTransactionError,
|
|
3171
|
+
"VM_TRANSACTION_ID_MISMATCH": VmTransactionIdMismatchError,
|
|
3172
|
+
"VM_NOT_IN_TRANSACTION": VmNotInTransactionError,
|
|
3173
|
+
"VM_NOT_FOUND_IN_FS": VmNotFoundInFsError,
|
|
3174
|
+
"VM_NOT_RUNNING": VmNotRunningError,
|
|
3175
|
+
"VM_NOT_FOUND": VmNotFoundError,
|
|
3176
|
+
"INTERNAL_FORK_VM_NOT_FOUND": InternalForkVmNotFoundError,
|
|
3177
|
+
"BAD_REQUEST": BadRequestError,
|
|
3178
|
+
"INTERNAL_VM_NOT_FOUND": InternalVmNotFoundError,
|
|
3153
3179
|
"USER_NOT_FOUND": UserNotFoundError,
|
|
3154
3180
|
"USER_ALREADY_EXISTS": UserAlreadyExistsError,
|
|
3155
3181
|
"VALIDATION_ERROR": ValidationErrorError,
|
|
@@ -3166,6 +3192,29 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3166
3192
|
"GROUP_NAME_INVALID_CHARS": GroupNameInvalidCharsError,
|
|
3167
3193
|
"GROUP_NAME_TOO_LONG": GroupNameTooLongError,
|
|
3168
3194
|
"GROUP_NAME_EMPTY": GroupNameEmptyError,
|
|
3195
|
+
"NO_DEFAULT_SNAPSHOT_AVAILABLE": NoDefaultSnapshotAvailableError,
|
|
3196
|
+
"DOCKER_SNAPSHOT_FAILED": DockerSnapshotFailedError,
|
|
3197
|
+
"SET_DEFAULT_SNAPSHOT_FAILED": SetDefaultSnapshotFailedError,
|
|
3198
|
+
"SNAPSHOT_LAYER_CREATION_FAILED": SnapshotLayerCreationFailedError,
|
|
3199
|
+
"SNAPSHOT_DIR_NOT_FOUND": SnapshotDirNotFoundError,
|
|
3200
|
+
"SUBVOLUME_CREATION_FAILED": SubvolumeCreationFailedError,
|
|
3201
|
+
"GET_DEFAULT_SNAPSHOT_FAILED": GetDefaultSnapshotFailedError,
|
|
3202
|
+
"SNAPSHOT_SETUP_FAILED": SnapshotSetupFailedError,
|
|
3203
|
+
"SNAPSHOT_VM_BAD_REQUEST": SnapshotVmBadRequestError,
|
|
3204
|
+
"DATABASE_ERROR": DatabaseErrorError,
|
|
3205
|
+
"PARTITION_NOT_FOUND": PartitionNotFoundError,
|
|
3206
|
+
"INVALID_VM_ID": InvalidVmIdError,
|
|
3207
|
+
"SUSPEND_FAILED_AND_STOP_FAILED": SuspendFailedAndStopFailedError,
|
|
3208
|
+
"SUSPEND_FAILED_AND_STOPPED": SuspendFailedAndStoppedError,
|
|
3209
|
+
"FILE_NOT_FOUND": FileNotFoundError,
|
|
3210
|
+
"FILES_BAD_REQUEST": FilesBadRequestError,
|
|
3211
|
+
"INVALID_GIT_REPO_SPEC_ERROR": InvalidGitRepoSpecErrorError,
|
|
3212
|
+
"INTERNAL_ERROR": InternalErrorError,
|
|
3213
|
+
"FORK_VM_NOT_FOUND": ForkVmNotFoundError,
|
|
3214
|
+
"CREATE_SNAPSHOT_BAD_REQUEST": CreateSnapshotBadRequestError,
|
|
3215
|
+
"ACTIVE_TRANSACTION_ERROR": ActiveTransactionErrorError,
|
|
3216
|
+
"SWAP_VM_TAP": SwapVmTapError,
|
|
3217
|
+
"ROOTFS_COPY_ERROR": RootfsCopyErrorError,
|
|
3169
3218
|
"CREATE_VM_BAD_REQUEST": CreateVmBadRequestError,
|
|
3170
3219
|
"VM_SETUP_FAILED": VmSetupFailedError,
|
|
3171
3220
|
"WANTED_BY_EMPTY": WantedByEmptyError,
|
|
@@ -3195,38 +3244,38 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3195
3244
|
"MAX_USES_EXCEEDED": MaxUsesExceededError,
|
|
3196
3245
|
"EXPIRED": ExpiredError,
|
|
3197
3246
|
"FORBIDDEN": ForbiddenError,
|
|
3198
|
-
"UNSUPPORTED_TRANSFER": UnsupportedTransferError,
|
|
3199
|
-
"TREE_NOT_FOUND": TreeNotFoundError,
|
|
3200
|
-
"BRANCH_NOT_FOUND": BranchNotFoundError,
|
|
3201
|
-
"PARENT_NOT_FOUND": ParentNotFoundError,
|
|
3202
|
-
"INVALID_SERVICE": InvalidServiceError,
|
|
3203
|
-
"EXPECTED_SERVICE": ExpectedServiceError,
|
|
3204
|
-
"NOT_FOUND": NotFoundError,
|
|
3205
|
-
"SEND_ERROR": SendErrorError,
|
|
3206
3247
|
"UNAUTHORIZED": UnauthorizedError,
|
|
3207
|
-
"
|
|
3208
|
-
"SOURCE_IMPORT_CONFLICT": SourceImportConflictError,
|
|
3209
|
-
"SOURCE_UNAUTHORIZED": SourceUnauthorizedError,
|
|
3210
|
-
"SOURCE_NOT_FOUND": SourceNotFoundError,
|
|
3211
|
-
"IMPORT_SUBDIR_NOT_FOUND": ImportSubdirNotFoundError,
|
|
3212
|
-
"REPO_ALREADY_EXISTS": RepoAlreadyExistsError,
|
|
3213
|
-
"TAG_NOT_FOUND": TagNotFoundError,
|
|
3248
|
+
"BLOB_NOT_FOUND": BlobNotFoundError,
|
|
3214
3249
|
"INVALID_RANGE": InvalidRangeError,
|
|
3215
3250
|
"OFFSET_WITH_SELECTOR": OffsetWithSelectorError,
|
|
3216
3251
|
"COMMIT_NOT_IN_BRANCH": CommitNotInBranchError,
|
|
3217
3252
|
"COMMIT_NOT_FOUND": CommitNotFoundError,
|
|
3253
|
+
"BRANCH_NOT_FOUND": BranchNotFoundError,
|
|
3218
3254
|
"NO_DEFAULT_BRANCH": NoDefaultBranchError,
|
|
3219
3255
|
"INVALID_BASE64_CONTENT": InvalidBase64ContentError,
|
|
3220
3256
|
"INVALID_FILE_CHANGE": InvalidFileChangeError,
|
|
3221
3257
|
"INVALID_FILE_PATH": InvalidFilePathError,
|
|
3222
3258
|
"CONFLICTING_PARENT": ConflictingParentError,
|
|
3223
3259
|
"AMBIGUOUS": AmbiguousError,
|
|
3260
|
+
"NOT_FOUND": NotFoundError,
|
|
3224
3261
|
"INVALID": InvalidError,
|
|
3262
|
+
"UNSUPPORTED_TRANSFER": UnsupportedTransferError,
|
|
3263
|
+
"TREE_NOT_FOUND": TreeNotFoundError,
|
|
3264
|
+
"PARENT_NOT_FOUND": ParentNotFoundError,
|
|
3265
|
+
"INVALID_SERVICE": InvalidServiceError,
|
|
3266
|
+
"EXPECTED_SERVICE": ExpectedServiceError,
|
|
3225
3267
|
"PATH_NOT_FOUND": PathNotFoundError,
|
|
3226
3268
|
"REFERENCE_NOT_FOUND": ReferenceNotFoundError,
|
|
3227
|
-
"
|
|
3228
|
-
"PACKFILE": PackfileError,
|
|
3269
|
+
"TAG_NOT_FOUND": TagNotFoundError,
|
|
3229
3270
|
"INVALID_REVISION": InvalidRevisionError,
|
|
3271
|
+
"PACKFILE": PackfileError,
|
|
3272
|
+
"SEND_ERROR": SendErrorError,
|
|
3273
|
+
"INVALID_ACCOUNT_ID": InvalidAccountIdError,
|
|
3274
|
+
"SOURCE_IMPORT_CONFLICT": SourceImportConflictError,
|
|
3275
|
+
"SOURCE_UNAUTHORIZED": SourceUnauthorizedError,
|
|
3276
|
+
"SOURCE_NOT_FOUND": SourceNotFoundError,
|
|
3277
|
+
"IMPORT_SUBDIR_NOT_FOUND": ImportSubdirNotFoundError,
|
|
3278
|
+
"REPO_ALREADY_EXISTS": RepoAlreadyExistsError,
|
|
3230
3279
|
"CONFLICT": ConflictError,
|
|
3231
3280
|
"BRANCH_ALREADY_EXISTS": BranchAlreadyExistsError,
|
|
3232
3281
|
"GIT_HUB_SYNC_CONFLICT": GitHubSyncConflictError,
|
|
@@ -3234,27 +3283,40 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3234
3283
|
"UNAVAILABLE": UnavailableError,
|
|
3235
3284
|
"SCHEDULE_NOT_FOUND": ScheduleNotFoundError,
|
|
3236
3285
|
"SERVICE_UNAVAILABLE": ServiceUnavailableError,
|
|
3237
|
-
"
|
|
3238
|
-
"
|
|
3239
|
-
"
|
|
3240
|
-
"
|
|
3241
|
-
"
|
|
3242
|
-
"
|
|
3243
|
-
"
|
|
3244
|
-
"
|
|
3245
|
-
"
|
|
3246
|
-
"
|
|
3247
|
-
"
|
|
3248
|
-
"
|
|
3249
|
-
"
|
|
3250
|
-
"
|
|
3251
|
-
"
|
|
3252
|
-
"
|
|
3253
|
-
"
|
|
3254
|
-
"
|
|
3255
|
-
"
|
|
3256
|
-
"
|
|
3257
|
-
"
|
|
3286
|
+
"EXECUTE_LIMIT_EXCEEDED": ExecuteLimitExceededError,
|
|
3287
|
+
"OBSERVABILITY_DATABASE_ERROR": ObservabilityDatabaseErrorError,
|
|
3288
|
+
"OBSERVABILITY_ACCESS_DENIED": ObservabilityAccessDeniedError,
|
|
3289
|
+
"PARSE_LOGS_FAILED": ParseLogsFailedError,
|
|
3290
|
+
"RETRIEVE_LOGS_FAILED": RetrieveLogsFailedError,
|
|
3291
|
+
"INVALID_QUERY": InvalidQueryError,
|
|
3292
|
+
"LOGS_NOT_FOUND": LogsNotFoundError,
|
|
3293
|
+
"EXECUTE_INTERNAL_ERROR": ExecuteInternalErrorError,
|
|
3294
|
+
"EXECUTE_ACCESS_DENIED": ExecuteAccessDeniedError,
|
|
3295
|
+
"LIST_RUNS_FAILED": ListRunsFailedError,
|
|
3296
|
+
"EXECUTION_ERROR": ExecutionErrorError,
|
|
3297
|
+
"CONNECTION_FAILED": ConnectionFailedError,
|
|
3298
|
+
"METADATA_WRITE_FAILED": MetadataWriteFailedError,
|
|
3299
|
+
"NODE_MODULES_INSTALL_FAILED": NodeModulesInstallFailedError,
|
|
3300
|
+
"NODE_MODULES_DOWNLOAD_FAILED": NodeModulesDownloadFailedError,
|
|
3301
|
+
"LOCK_GENERATION_FAILED": LockGenerationFailedError,
|
|
3302
|
+
"WRITE_SCRIPT_FAILED": WriteScriptFailedError,
|
|
3303
|
+
"DIRECTORY_CREATION_FAILED": DirectoryCreationFailedError,
|
|
3304
|
+
"NETWORK_PERMISSIONS_FAILED": NetworkPermissionsFailedError,
|
|
3305
|
+
"LOGGING_FAILED": LoggingFailedError,
|
|
3306
|
+
"RUN_NOT_FOUND": RunNotFoundError,
|
|
3307
|
+
"LIMIT_EXCEEDED": LimitExceededError,
|
|
3308
|
+
"FAILED_TO_PROVISION_CERTIFICATE": FailedToProvisionCertificateError,
|
|
3309
|
+
"FAILED_TO_INSERT_DOMAIN_MAPPING": FailedToInsertDomainMappingError,
|
|
3310
|
+
"PERMISSION_DENIED": PermissionDeniedError,
|
|
3311
|
+
"FAILED_TO_CHECK_PERMISSIONS": FailedToCheckPermissionsError,
|
|
3312
|
+
"FAILED_TO_LIST_DOMAINS": FailedToListDomainsError,
|
|
3313
|
+
"FAILED_TO_LIST_VERIFICATIONS": FailedToListVerificationsError,
|
|
3314
|
+
"FAILED_TO_VERIFY_DOMAIN": FailedToVerifyDomainError,
|
|
3315
|
+
"VERIFICATION_FAILED": VerificationFailedError,
|
|
3316
|
+
"FAILED_TO_DELETE_VERIFICATION": FailedToDeleteVerificationError,
|
|
3317
|
+
"VERIFICATION_NOT_FOUND": VerificationNotFoundError,
|
|
3318
|
+
"FAILED_TO_CREATE_VERIFICATION_CODE": FailedToCreateVerificationCodeError,
|
|
3319
|
+
"INVALID_DOMAIN": InvalidDomainError,
|
|
3258
3320
|
"BUILD_FAILED": BuildFailedError,
|
|
3259
3321
|
"SERVER_DEPLOYMENT_FAILED": ServerDeploymentFailedError,
|
|
3260
3322
|
"LOCKFILE_ERROR": LockfileErrorError,
|
|
@@ -3266,13 +3328,14 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3266
3328
|
"NO_DOMAIN_OWNERSHIP": NoDomainOwnershipError,
|
|
3267
3329
|
"INVALID_DOMAINS": InvalidDomainsError,
|
|
3268
3330
|
"WEB_DEPLOYMENT_BAD_REQUEST": WebDeploymentBadRequestError,
|
|
3331
|
+
"TIMEOUT_LIMIT_EXCEEDED": TimeoutLimitExceededError,
|
|
3269
3332
|
"DEPLOYMENT_LIMIT_EXCEEDED": DeploymentLimitExceededError,
|
|
3270
3333
|
"DEPLOYMENT_NOT_FOUND": DeploymentNotFoundError,
|
|
3271
3334
|
"RESIZE_FAILED": ResizeFailedError,
|
|
3272
3335
|
"INTERNAL_RESIZE_VM_NOT_FOUND": InternalResizeVmNotFoundError,
|
|
3336
|
+
"ACCESS_DENIED": AccessDeniedError,
|
|
3273
3337
|
"BRANCH_NAME_EMPTY": BranchNameEmptyError,
|
|
3274
|
-
"
|
|
3275
|
-
"VM_LIMIT_EXCEEDED": VmLimitExceededError,
|
|
3338
|
+
"UNAUTHORIZED_ERROR": UnauthorizedErrorError,
|
|
3276
3339
|
"TRIGGER_ERROR": TriggerErrorError,
|
|
3277
3340
|
"TOKEN_ERROR": TokenErrorError,
|
|
3278
3341
|
"PERMISSION_ERROR": PermissionErrorError,
|
|
@@ -3302,6 +3365,31 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3302
3365
|
"FAILED_REMOVE_DOMAIN_MAPPING": FailedRemoveDomainMappingError,
|
|
3303
3366
|
"FAILED_PERMISSIONS_CHECK": FailedPermissionsCheckError,
|
|
3304
3367
|
"FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS": FailedToCheckDomainMappingPermissionsError,
|
|
3368
|
+
"GIT_REPO_LIMIT_EXCEEDED": GitRepoLimitExceededError,
|
|
3369
|
+
"EMPTY_TAG": EmptyTagError,
|
|
3370
|
+
"PERSISTENT_VMS_NOT_ALLOWED": PersistentVmsNotAllowedError,
|
|
3371
|
+
"TOTAL_VM_LIMIT_EXCEEDED": TotalVmLimitExceededError,
|
|
3372
|
+
"VM_LIMIT_EXCEEDED": VmLimitExceededError,
|
|
3373
|
+
"PERMISSION_ALREADY_EXISTS": PermissionAlreadyExistsError,
|
|
3374
|
+
"LIST_TOKENS_FAILED": ListTokensFailedError,
|
|
3375
|
+
"REVOKE_TOKEN_FAILED": RevokeTokenFailedError,
|
|
3376
|
+
"CREATE_TOKEN_FAILED": CreateTokenFailedError,
|
|
3377
|
+
"LIST_PERMISSIONS_FAILED": ListPermissionsFailedError,
|
|
3378
|
+
"GET_PERMISSION_FAILED": GetPermissionFailedError,
|
|
3379
|
+
"UPDATE_PERMISSION_FAILED": UpdatePermissionFailedError,
|
|
3380
|
+
"REVOKE_PERMISSION_FAILED": RevokePermissionFailedError,
|
|
3381
|
+
"GRANT_PERMISSION_FAILED": GrantPermissionFailedError,
|
|
3382
|
+
"LIST_IDENTITIES_FAILED": ListIdentitiesFailedError,
|
|
3383
|
+
"DELETE_IDENTITY_FAILED": DeleteIdentityFailedError,
|
|
3384
|
+
"CREATE_IDENTITY_FAILED": CreateIdentityFailedError,
|
|
3385
|
+
"VM_PERMISSION_NOT_FOUND": VmPermissionNotFoundError,
|
|
3386
|
+
"PERMISSION_NOT_FOUND": PermissionNotFoundError,
|
|
3387
|
+
"GIT_REPOSITORY_ACCESS_DENIED": GitRepositoryAccessDeniedError,
|
|
3388
|
+
"GIT_REPOSITORY_NOT_FOUND": GitRepositoryNotFoundError,
|
|
3389
|
+
"CANNOT_DELETE_MANAGED_IDENTITY": CannotDeleteManagedIdentityError,
|
|
3390
|
+
"CANNOT_MODIFY_MANAGED_IDENTITY": CannotModifyManagedIdentityError,
|
|
3391
|
+
"IDENTITY_ACCESS_DENIED": IdentityAccessDeniedError,
|
|
3392
|
+
"IDENTITY_NOT_FOUND": IdentityNotFoundError,
|
|
3305
3393
|
"DOMAIN_OWNERSHIP_VERIFICATION_FAILED": DomainOwnershipVerificationFailedError,
|
|
3306
3394
|
"ERROR_DELETING_RECORD": ErrorDeletingRecordError,
|
|
3307
3395
|
"RECORD_OWNERSHIP_ERROR": RecordOwnershipErrorError,
|
|
@@ -3315,43 +3403,7 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3315
3403
|
"BACKUP_FAILED": BackupFailedError,
|
|
3316
3404
|
"DEPLOYMENT_FAILED": DeploymentFailedError,
|
|
3317
3405
|
"INVALID_DEPLOYMENT_REQUEST": InvalidDeploymentRequestError,
|
|
3318
|
-
"PROJECT_NOT_FOUND": ProjectNotFoundError
|
|
3319
|
-
"GIT_REPO_LIMIT_EXCEEDED": GitRepoLimitExceededError,
|
|
3320
|
-
"EMPTY_TAG": EmptyTagError,
|
|
3321
|
-
"LIMIT_EXCEEDED": LimitExceededError,
|
|
3322
|
-
"FAILED_TO_PROVISION_CERTIFICATE": FailedToProvisionCertificateError,
|
|
3323
|
-
"FAILED_TO_INSERT_DOMAIN_MAPPING": FailedToInsertDomainMappingError,
|
|
3324
|
-
"PERMISSION_DENIED": PermissionDeniedError,
|
|
3325
|
-
"FAILED_TO_CHECK_PERMISSIONS": FailedToCheckPermissionsError,
|
|
3326
|
-
"FAILED_TO_LIST_DOMAINS": FailedToListDomainsError,
|
|
3327
|
-
"FAILED_TO_LIST_VERIFICATIONS": FailedToListVerificationsError,
|
|
3328
|
-
"FAILED_TO_VERIFY_DOMAIN": FailedToVerifyDomainError,
|
|
3329
|
-
"VERIFICATION_FAILED": VerificationFailedError,
|
|
3330
|
-
"FAILED_TO_DELETE_VERIFICATION": FailedToDeleteVerificationError,
|
|
3331
|
-
"VERIFICATION_NOT_FOUND": VerificationNotFoundError,
|
|
3332
|
-
"FAILED_TO_CREATE_VERIFICATION_CODE": FailedToCreateVerificationCodeError,
|
|
3333
|
-
"INVALID_DOMAIN": InvalidDomainError,
|
|
3334
|
-
"ACCESS_DENIED": AccessDeniedError,
|
|
3335
|
-
"OBSERVABILITY_DATABASE_ERROR": ObservabilityDatabaseErrorError,
|
|
3336
|
-
"OBSERVABILITY_ACCESS_DENIED": ObservabilityAccessDeniedError,
|
|
3337
|
-
"PARSE_LOGS_FAILED": ParseLogsFailedError,
|
|
3338
|
-
"RETRIEVE_LOGS_FAILED": RetrieveLogsFailedError,
|
|
3339
|
-
"INVALID_QUERY": InvalidQueryError,
|
|
3340
|
-
"LOGS_NOT_FOUND": LogsNotFoundError,
|
|
3341
|
-
"EXECUTE_INTERNAL_ERROR": ExecuteInternalErrorError,
|
|
3342
|
-
"EXECUTE_ACCESS_DENIED": ExecuteAccessDeniedError,
|
|
3343
|
-
"LIST_RUNS_FAILED": ListRunsFailedError,
|
|
3344
|
-
"EXECUTION_ERROR": ExecutionErrorError,
|
|
3345
|
-
"CONNECTION_FAILED": ConnectionFailedError,
|
|
3346
|
-
"METADATA_WRITE_FAILED": MetadataWriteFailedError,
|
|
3347
|
-
"NODE_MODULES_INSTALL_FAILED": NodeModulesInstallFailedError,
|
|
3348
|
-
"NODE_MODULES_DOWNLOAD_FAILED": NodeModulesDownloadFailedError,
|
|
3349
|
-
"LOCK_GENERATION_FAILED": LockGenerationFailedError,
|
|
3350
|
-
"WRITE_SCRIPT_FAILED": WriteScriptFailedError,
|
|
3351
|
-
"DIRECTORY_CREATION_FAILED": DirectoryCreationFailedError,
|
|
3352
|
-
"NETWORK_PERMISSIONS_FAILED": NetworkPermissionsFailedError,
|
|
3353
|
-
"LOGGING_FAILED": LoggingFailedError,
|
|
3354
|
-
"RUN_NOT_FOUND": RunNotFoundError
|
|
3406
|
+
"PROJECT_NOT_FOUND": ProjectNotFoundError
|
|
3355
3407
|
};
|
|
3356
3408
|
|
|
3357
3409
|
var errors = /*#__PURE__*/Object.freeze({
|
|
@@ -3525,6 +3577,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3525
3577
|
PermissionDeniedError: PermissionDeniedError,
|
|
3526
3578
|
PermissionErrorError: PermissionErrorError,
|
|
3527
3579
|
PermissionNotFoundError: PermissionNotFoundError,
|
|
3580
|
+
PersistentVmsNotAllowedError: PersistentVmsNotAllowedError,
|
|
3528
3581
|
ProjectNotFoundError: ProjectNotFoundError,
|
|
3529
3582
|
RecordOwnershipErrorError: RecordOwnershipErrorError,
|
|
3530
3583
|
ReferenceNotFoundError: ReferenceNotFoundError,
|
|
@@ -3572,7 +3625,9 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3572
3625
|
SwapVmTapError: SwapVmTapError,
|
|
3573
3626
|
SyntaxErrorError: SyntaxErrorError,
|
|
3574
3627
|
TagNotFoundError: TagNotFoundError,
|
|
3628
|
+
TimeoutLimitExceededError: TimeoutLimitExceededError,
|
|
3575
3629
|
TokenErrorError: TokenErrorError,
|
|
3630
|
+
TotalVmLimitExceededError: TotalVmLimitExceededError,
|
|
3576
3631
|
TreeNotFoundError: TreeNotFoundError,
|
|
3577
3632
|
TriggerErrorError: TriggerErrorError,
|
|
3578
3633
|
UffdTimeoutErrorError: UffdTimeoutErrorError,
|
|
@@ -3598,6 +3653,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3598
3653
|
VmAccessDeniedForMappingError: VmAccessDeniedForMappingError,
|
|
3599
3654
|
VmDeletedError: VmDeletedError,
|
|
3600
3655
|
VmExitDuringStartError: VmExitDuringStartError,
|
|
3656
|
+
VmIsSuspendingError: VmIsSuspendingError,
|
|
3601
3657
|
VmLimitExceededError: VmLimitExceededError,
|
|
3602
3658
|
VmNotFoundError: VmNotFoundError,
|
|
3603
3659
|
VmNotFoundInFsError: VmNotFoundInFsError,
|
|
@@ -5527,6 +5583,7 @@ class VmWithInstance {
|
|
|
5527
5583
|
}
|
|
5528
5584
|
class VmWith {
|
|
5529
5585
|
instance;
|
|
5586
|
+
defaultField;
|
|
5530
5587
|
/**
|
|
5531
5588
|
* Helper method to compose multiple configurations together.
|
|
5532
5589
|
* Uses the same merging strategy as the main compose function.
|
|
@@ -5583,11 +5640,14 @@ function composeCreateVmOptions(arr) {
|
|
|
5583
5640
|
if (options.workdir !== void 0) result.workdir = options.workdir;
|
|
5584
5641
|
if (options.snapshotId !== void 0)
|
|
5585
5642
|
result.snapshotId = options.snapshotId;
|
|
5643
|
+
if (options.baseImage !== void 0) result.baseImage = options.baseImage;
|
|
5586
5644
|
if (options.recreate !== void 0) result.recreate = options.recreate;
|
|
5587
5645
|
if (options.aptDeps !== void 0) result.aptDeps = options.aptDeps;
|
|
5588
5646
|
if (options.domains !== void 0) result.domains = options.domains;
|
|
5589
5647
|
if (options.activityThresholdBytes !== void 0)
|
|
5590
5648
|
result.activityThresholdBytes = options.activityThresholdBytes;
|
|
5649
|
+
if (options.discriminator !== void 0)
|
|
5650
|
+
result.discriminator = options.discriminator;
|
|
5591
5651
|
if (options.persistence !== void 0)
|
|
5592
5652
|
result.persistence = options.persistence;
|
|
5593
5653
|
if (options.ports !== void 0) {
|
|
@@ -5729,6 +5789,7 @@ function composeCreateVmOptions(arr) {
|
|
|
5729
5789
|
result.template = {
|
|
5730
5790
|
// Simple overrides - start with base, override with new
|
|
5731
5791
|
snapshotId: newTemplate.snapshotId !== void 0 ? newTemplate.snapshotId : baseTemplate.snapshotId,
|
|
5792
|
+
baseImage: newTemplate.baseImage !== void 0 ? newTemplate.baseImage : baseTemplate.baseImage,
|
|
5732
5793
|
rootfsSizeGb: newTemplate.rootfsSizeGb !== void 0 ? newTemplate.rootfsSizeGb : baseTemplate.rootfsSizeGb,
|
|
5733
5794
|
memSizeGb: newTemplate.memSizeGb !== void 0 ? newTemplate.memSizeGb : baseTemplate.memSizeGb,
|
|
5734
5795
|
aptDeps: newTemplate.aptDeps ?? baseTemplate.aptDeps,
|
|
@@ -5920,11 +5981,14 @@ function composeVmSpecs(specs) {
|
|
|
5920
5981
|
rawConfigs
|
|
5921
5982
|
);
|
|
5922
5983
|
const mergedWith = {};
|
|
5984
|
+
const mergedWithDiscriminators = {};
|
|
5923
5985
|
for (const spec of specs) {
|
|
5924
|
-
|
|
5925
|
-
|
|
5986
|
+
const builderDiscriminators = spec.getBuilderDiscriminators();
|
|
5987
|
+
for (const key in spec.builders) {
|
|
5988
|
+
const builder = spec.builders[key];
|
|
5926
5989
|
if (builder) {
|
|
5927
5990
|
mergedWith[key] = builder;
|
|
5991
|
+
mergedWithDiscriminators[key] = builderDiscriminators[key];
|
|
5928
5992
|
}
|
|
5929
5993
|
}
|
|
5930
5994
|
}
|
|
@@ -5936,11 +6000,13 @@ function composeVmSpecs(specs) {
|
|
|
5936
6000
|
const result = new VmSpec({
|
|
5937
6001
|
...composedRaw,
|
|
5938
6002
|
snapshot: nestedSpec,
|
|
5939
|
-
with: mergedWith
|
|
6003
|
+
with: mergedWith,
|
|
6004
|
+
__withDiscriminators: mergedWithDiscriminators
|
|
5940
6005
|
});
|
|
5941
6006
|
return result;
|
|
5942
6007
|
}
|
|
5943
6008
|
|
|
6009
|
+
const DEFAULT_CONFIGURE_BASE_IMAGE = "FROM debian:trixie-slim";
|
|
5944
6010
|
function processSystemdServices(services, existingFiles = {}) {
|
|
5945
6011
|
const additionalFiles = { ...existingFiles };
|
|
5946
6012
|
const processedServices = [];
|
|
@@ -6043,6 +6109,7 @@ class Vm {
|
|
|
6043
6109
|
fs;
|
|
6044
6110
|
terminals;
|
|
6045
6111
|
systemd;
|
|
6112
|
+
_withInstances = {};
|
|
6046
6113
|
/** @internal */
|
|
6047
6114
|
_linux_username;
|
|
6048
6115
|
constructor({ vmId, freestyle }) {
|
|
@@ -6069,6 +6136,13 @@ class Vm {
|
|
|
6069
6136
|
vm._linux_username = username;
|
|
6070
6137
|
return vm;
|
|
6071
6138
|
}
|
|
6139
|
+
with(name) {
|
|
6140
|
+
return this._withInstances[name];
|
|
6141
|
+
}
|
|
6142
|
+
/** @internal */
|
|
6143
|
+
_attachWith(name, instance) {
|
|
6144
|
+
this._withInstances[name] = instance;
|
|
6145
|
+
}
|
|
6072
6146
|
/**
|
|
6073
6147
|
* Start the VM.
|
|
6074
6148
|
* @param options Optional startup configuration
|
|
@@ -6205,6 +6279,64 @@ class Vm {
|
|
|
6205
6279
|
});
|
|
6206
6280
|
}
|
|
6207
6281
|
}
|
|
6282
|
+
class VmBaseImage {
|
|
6283
|
+
layers;
|
|
6284
|
+
constructor(base) {
|
|
6285
|
+
if (!base) {
|
|
6286
|
+
this.layers = [];
|
|
6287
|
+
return;
|
|
6288
|
+
}
|
|
6289
|
+
if (typeof base === "string") {
|
|
6290
|
+
this.layers = [base.trimEnd()];
|
|
6291
|
+
return;
|
|
6292
|
+
}
|
|
6293
|
+
this.layers = base.dockerfileContent ? [base.dockerfileContent.trimEnd()] : [];
|
|
6294
|
+
}
|
|
6295
|
+
from(baseImage) {
|
|
6296
|
+
if (typeof baseImage === "string") {
|
|
6297
|
+
const line = /^\s*FROM\b/i.test(baseImage) ? baseImage.trimEnd() : `FROM ${baseImage.trim()}`;
|
|
6298
|
+
this.layers.push(line);
|
|
6299
|
+
return this;
|
|
6300
|
+
}
|
|
6301
|
+
if (baseImage instanceof VmBaseImage) {
|
|
6302
|
+
this.layers.push(...baseImage.layers);
|
|
6303
|
+
return this;
|
|
6304
|
+
}
|
|
6305
|
+
this.layers.push((baseImage.dockerfileContent || "").trimEnd());
|
|
6306
|
+
return this;
|
|
6307
|
+
}
|
|
6308
|
+
runCommands(...commands) {
|
|
6309
|
+
for (const command of commands) {
|
|
6310
|
+
const trimmed = command.trim();
|
|
6311
|
+
if (!trimmed) continue;
|
|
6312
|
+
this.layers.push(`RUN <<'FREESTYLE_EOF'
|
|
6313
|
+
${trimmed}
|
|
6314
|
+
FREESTYLE_EOF`);
|
|
6315
|
+
}
|
|
6316
|
+
return this;
|
|
6317
|
+
}
|
|
6318
|
+
appendDockerfile(dockerfile) {
|
|
6319
|
+
const trimmed = dockerfile.trim();
|
|
6320
|
+
if (trimmed) {
|
|
6321
|
+
this.layers.push(trimmed);
|
|
6322
|
+
}
|
|
6323
|
+
return this;
|
|
6324
|
+
}
|
|
6325
|
+
hasFromInstruction() {
|
|
6326
|
+
return this.layers.some((layer) => /^\s*FROM\b/m.test(layer));
|
|
6327
|
+
}
|
|
6328
|
+
toRaw() {
|
|
6329
|
+
const dockerfileContent = this.layers.filter((layer) => layer.trim().length > 0).join("\n\n");
|
|
6330
|
+
if (dockerfileContent && !/^\s*FROM\b/m.test(dockerfileContent)) {
|
|
6331
|
+
throw new Error(
|
|
6332
|
+
'VmBaseImage must include a FROM instruction before adding Dockerfile layers. Add .baseImage(new VmBaseImage("FROM ...")) on the spec.'
|
|
6333
|
+
);
|
|
6334
|
+
}
|
|
6335
|
+
return {
|
|
6336
|
+
dockerfileContent
|
|
6337
|
+
};
|
|
6338
|
+
}
|
|
6339
|
+
}
|
|
6208
6340
|
class VmTemplate {
|
|
6209
6341
|
raw;
|
|
6210
6342
|
with;
|
|
@@ -6217,20 +6349,156 @@ class VmTemplate {
|
|
|
6217
6349
|
class VmSpec {
|
|
6218
6350
|
raw;
|
|
6219
6351
|
with;
|
|
6220
|
-
|
|
6221
|
-
|
|
6352
|
+
withDiscriminators;
|
|
6353
|
+
get builders() {
|
|
6354
|
+
return this.with;
|
|
6355
|
+
}
|
|
6356
|
+
constructor(spec = {}) {
|
|
6357
|
+
const {
|
|
6358
|
+
with: withBuilders,
|
|
6359
|
+
__withDiscriminators: existingWithDiscriminators,
|
|
6360
|
+
...rest
|
|
6361
|
+
} = spec;
|
|
6222
6362
|
this.raw = rest;
|
|
6223
|
-
this.
|
|
6363
|
+
this.withDiscriminators = { ...existingWithDiscriminators ?? {} };
|
|
6364
|
+
const withFn = ((nameOrBuilder, maybeBuilder) => {
|
|
6365
|
+
const key = typeof nameOrBuilder === "string" ? nameOrBuilder : defaultVmWithName(nameOrBuilder);
|
|
6366
|
+
const builder = typeof nameOrBuilder === "string" ? maybeBuilder : nameOrBuilder;
|
|
6367
|
+
if (!builder) {
|
|
6368
|
+
throw new Error("VmSpec.with requires a VmWith instance");
|
|
6369
|
+
}
|
|
6370
|
+
this.with[key] = builder;
|
|
6371
|
+
this.withDiscriminators[key] = this.raw.discriminator;
|
|
6372
|
+
return this;
|
|
6373
|
+
});
|
|
6374
|
+
this.with = withFn;
|
|
6375
|
+
for (const [key, builder] of Object.entries(withBuilders ?? {})) {
|
|
6376
|
+
if (builder) {
|
|
6377
|
+
this.with[key] = builder;
|
|
6378
|
+
if (!(key in this.withDiscriminators)) {
|
|
6379
|
+
this.withDiscriminators[key] = void 0;
|
|
6380
|
+
}
|
|
6381
|
+
}
|
|
6382
|
+
}
|
|
6383
|
+
}
|
|
6384
|
+
getBuilderDiscriminator(key) {
|
|
6385
|
+
return this.withDiscriminators[key];
|
|
6386
|
+
}
|
|
6387
|
+
getBuilderDiscriminators() {
|
|
6388
|
+
return { ...this.withDiscriminators };
|
|
6389
|
+
}
|
|
6390
|
+
mergeRaw(options) {
|
|
6391
|
+
this.raw = composeCreateVmOptions([
|
|
6392
|
+
this.raw,
|
|
6393
|
+
options
|
|
6394
|
+
]);
|
|
6395
|
+
return this;
|
|
6396
|
+
}
|
|
6397
|
+
clearBuilders() {
|
|
6398
|
+
for (const key of Object.keys(this.with)) {
|
|
6399
|
+
delete this.with[key];
|
|
6400
|
+
delete this.withDiscriminators[key];
|
|
6401
|
+
}
|
|
6402
|
+
}
|
|
6403
|
+
snapshot() {
|
|
6404
|
+
const { snapshot: existingSnapshot, ...currentLayer } = this.raw;
|
|
6405
|
+
const currentBuilders = { ...this.builders };
|
|
6406
|
+
const currentWithDiscriminators = this.getBuilderDiscriminators();
|
|
6407
|
+
const innerSnapshot = new VmSpec({
|
|
6408
|
+
...currentLayer,
|
|
6409
|
+
with: currentBuilders,
|
|
6410
|
+
__withDiscriminators: currentWithDiscriminators
|
|
6411
|
+
});
|
|
6412
|
+
if (isVmSpecLike$1(existingSnapshot)) {
|
|
6413
|
+
innerSnapshot.raw.snapshot = existingSnapshot;
|
|
6414
|
+
}
|
|
6415
|
+
this.raw = {
|
|
6416
|
+
snapshot: innerSnapshot
|
|
6417
|
+
};
|
|
6418
|
+
this.clearBuilders();
|
|
6419
|
+
return this;
|
|
6420
|
+
}
|
|
6421
|
+
ensureSnapshot() {
|
|
6422
|
+
if (!isVmSpecLike$1(this.raw.snapshot)) {
|
|
6423
|
+
this.raw.snapshot = this.raw.discriminator !== void 0 ? new VmSpec({ discriminator: this.raw.discriminator }) : new VmSpec();
|
|
6424
|
+
}
|
|
6425
|
+
return this.raw.snapshot;
|
|
6426
|
+
}
|
|
6427
|
+
baseImage(baseImage) {
|
|
6428
|
+
this.raw.baseImage = baseImage;
|
|
6429
|
+
return this;
|
|
6430
|
+
}
|
|
6431
|
+
rootfsSizeGb(value) {
|
|
6432
|
+
return this.mergeRaw({ rootfsSizeGb: value });
|
|
6433
|
+
}
|
|
6434
|
+
memSizeGb(value) {
|
|
6435
|
+
return this.mergeRaw({ memSizeGb: value });
|
|
6436
|
+
}
|
|
6437
|
+
vcpuCount(value) {
|
|
6438
|
+
return this.mergeRaw({ vcpuCount: value });
|
|
6439
|
+
}
|
|
6440
|
+
idleTimeoutSeconds(value) {
|
|
6441
|
+
return this.mergeRaw({ idleTimeoutSeconds: value });
|
|
6442
|
+
}
|
|
6443
|
+
readySignalTimeoutSeconds(value) {
|
|
6444
|
+
return this.mergeRaw({ readySignalTimeoutSeconds: value });
|
|
6445
|
+
}
|
|
6446
|
+
waitForReadySignal(value) {
|
|
6447
|
+
return this.mergeRaw({ waitForReadySignal: value });
|
|
6448
|
+
}
|
|
6449
|
+
discriminator(value) {
|
|
6450
|
+
return this.mergeRaw({ discriminator: value });
|
|
6451
|
+
}
|
|
6452
|
+
workdir(path) {
|
|
6453
|
+
return this.mergeRaw({ workdir: path });
|
|
6454
|
+
}
|
|
6455
|
+
aptDeps(...deps) {
|
|
6456
|
+
const existing = this.raw.aptDeps ?? [];
|
|
6457
|
+
return this.mergeRaw({ aptDeps: [...existing, ...deps] });
|
|
6458
|
+
}
|
|
6459
|
+
additionalFiles(files) {
|
|
6460
|
+
const existing = this.raw.additionalFiles ?? {};
|
|
6461
|
+
this.raw.additionalFiles = {
|
|
6462
|
+
...existing,
|
|
6463
|
+
...files
|
|
6464
|
+
};
|
|
6465
|
+
return this;
|
|
6466
|
+
}
|
|
6467
|
+
runCommands(...commands) {
|
|
6468
|
+
const image = normalizeBaseImage(this.raw.baseImage) ?? new VmBaseImage();
|
|
6469
|
+
image.runCommands(...commands);
|
|
6470
|
+
this.raw.baseImage = image;
|
|
6471
|
+
return this;
|
|
6472
|
+
}
|
|
6473
|
+
repo(repo, path) {
|
|
6474
|
+
const existingGit = this.raw.git ?? { config: {}, repos: [] };
|
|
6475
|
+
const existingRepos = existingGit.repos ?? [];
|
|
6476
|
+
return this.mergeRaw({
|
|
6477
|
+
git: {
|
|
6478
|
+
...existingGit,
|
|
6479
|
+
config: existingGit.config ?? {},
|
|
6480
|
+
repos: [...existingRepos, { repo, path }]
|
|
6481
|
+
}
|
|
6482
|
+
});
|
|
6483
|
+
}
|
|
6484
|
+
systemdService(service) {
|
|
6485
|
+
const existingSystemd = this.raw.systemd ?? {};
|
|
6486
|
+
const services = existingSystemd.services ?? [];
|
|
6487
|
+
this.raw.systemd = {
|
|
6488
|
+
...existingSystemd,
|
|
6489
|
+
services: [...services, service]
|
|
6490
|
+
};
|
|
6491
|
+
return this;
|
|
6224
6492
|
}
|
|
6225
6493
|
}
|
|
6226
|
-
function isVmSpecLike(value) {
|
|
6494
|
+
function isVmSpecLike$1(value) {
|
|
6227
6495
|
return !!value && typeof value === "object" && "raw" in value && "with" in value;
|
|
6228
6496
|
}
|
|
6229
6497
|
function isVmTemplateLike(value) {
|
|
6230
6498
|
return !!value && typeof value === "object" && "raw" in value && "with" in value;
|
|
6231
6499
|
}
|
|
6232
6500
|
async function convertSpecSnapshotsToTemplates(spec, processBuilders = true) {
|
|
6233
|
-
if (!isVmSpecLike(spec.raw.snapshot)) {
|
|
6501
|
+
if (!isVmSpecLike$1(spec.raw.snapshot)) {
|
|
6234
6502
|
return void 0;
|
|
6235
6503
|
}
|
|
6236
6504
|
let innerSpec = spec.raw.snapshot;
|
|
@@ -6239,28 +6507,34 @@ async function convertSpecSnapshotsToTemplates(spec, processBuilders = true) {
|
|
|
6239
6507
|
}
|
|
6240
6508
|
const { snapshot: nestedSnapshot, ...innerRaw } = innerSpec.raw;
|
|
6241
6509
|
let nestedTemplate;
|
|
6242
|
-
if (isVmSpecLike(nestedSnapshot)) {
|
|
6510
|
+
if (isVmSpecLike$1(nestedSnapshot)) {
|
|
6243
6511
|
nestedTemplate = await convertSpecSnapshotsToTemplates(innerSpec, false);
|
|
6244
6512
|
}
|
|
6245
6513
|
return new VmTemplate({
|
|
6246
6514
|
...innerRaw,
|
|
6247
6515
|
template: nestedTemplate,
|
|
6248
|
-
with: innerSpec.
|
|
6516
|
+
with: innerSpec.builders
|
|
6249
6517
|
});
|
|
6250
6518
|
}
|
|
6251
6519
|
async function processOuterSpecBuilders(spec) {
|
|
6252
|
-
for (const key in spec.
|
|
6253
|
-
const builder = spec.
|
|
6520
|
+
for (const key in spec.builders) {
|
|
6521
|
+
const builder = spec.builders[key];
|
|
6254
6522
|
if (builder) {
|
|
6255
6523
|
if (builder.configureSpec) {
|
|
6256
6524
|
spec = await builder.configureSpec(spec);
|
|
6257
6525
|
}
|
|
6526
|
+
if (builder.configureBaseImage) {
|
|
6527
|
+
spec.raw.baseImage = await builder.configureBaseImage(
|
|
6528
|
+
prepareBaseImageForConfigure(spec.raw.baseImage)
|
|
6529
|
+
);
|
|
6530
|
+
}
|
|
6258
6531
|
if (builder.configureSnapshotSpec) {
|
|
6259
6532
|
let snapshotSpec;
|
|
6260
|
-
if (isVmSpecLike(spec.raw.snapshot)) {
|
|
6533
|
+
if (isVmSpecLike$1(spec.raw.snapshot)) {
|
|
6261
6534
|
snapshotSpec = spec.raw.snapshot;
|
|
6262
6535
|
} else {
|
|
6263
|
-
|
|
6536
|
+
const inheritedDiscriminator = spec.getBuilderDiscriminator(key) ?? spec.raw.discriminator;
|
|
6537
|
+
snapshotSpec = inheritedDiscriminator !== void 0 ? new VmSpec({ discriminator: inheritedDiscriminator }) : new VmSpec({});
|
|
6264
6538
|
spec.raw.snapshot = snapshotSpec;
|
|
6265
6539
|
}
|
|
6266
6540
|
spec.raw.snapshot = await builder.configureSnapshotSpec(snapshotSpec);
|
|
@@ -6270,36 +6544,45 @@ async function processOuterSpecBuilders(spec) {
|
|
|
6270
6544
|
return spec;
|
|
6271
6545
|
}
|
|
6272
6546
|
async function processSpecTree(spec) {
|
|
6273
|
-
for (const key
|
|
6274
|
-
|
|
6547
|
+
for (const [key, builder] of Object.entries(
|
|
6548
|
+
spec.builders
|
|
6549
|
+
)) {
|
|
6275
6550
|
if (builder) {
|
|
6276
6551
|
if (builder.configureSpec) {
|
|
6277
6552
|
spec = await builder.configureSpec(spec);
|
|
6278
6553
|
}
|
|
6554
|
+
if (builder.configureBaseImage) {
|
|
6555
|
+
spec.raw.baseImage = await builder.configureBaseImage(
|
|
6556
|
+
prepareBaseImageForConfigure(spec.raw.baseImage)
|
|
6557
|
+
);
|
|
6558
|
+
}
|
|
6279
6559
|
if (builder.configureSnapshotSpec) {
|
|
6280
6560
|
let snapshotSpec;
|
|
6281
|
-
if (isVmSpecLike(spec.raw.snapshot)) {
|
|
6561
|
+
if (isVmSpecLike$1(spec.raw.snapshot)) {
|
|
6282
6562
|
snapshotSpec = spec.raw.snapshot;
|
|
6283
6563
|
} else {
|
|
6284
|
-
|
|
6564
|
+
const inheritedDiscriminator = spec.getBuilderDiscriminator(key) ?? spec.raw.discriminator;
|
|
6565
|
+
snapshotSpec = inheritedDiscriminator !== void 0 ? new VmSpec({ discriminator: inheritedDiscriminator }) : new VmSpec({});
|
|
6285
6566
|
spec.raw.snapshot = snapshotSpec;
|
|
6286
6567
|
}
|
|
6287
6568
|
spec.raw.snapshot = await builder.configureSnapshotSpec(snapshotSpec);
|
|
6288
6569
|
}
|
|
6289
6570
|
}
|
|
6290
6571
|
}
|
|
6291
|
-
if (isVmSpecLike(spec.raw.snapshot)) {
|
|
6572
|
+
if (isVmSpecLike$1(spec.raw.snapshot)) {
|
|
6292
6573
|
spec.raw.snapshot = await processSpecTree(spec.raw.snapshot);
|
|
6293
6574
|
}
|
|
6294
6575
|
return spec;
|
|
6295
6576
|
}
|
|
6296
6577
|
function collectSpecBuilders(spec) {
|
|
6297
6578
|
let builders = {};
|
|
6298
|
-
if (isVmSpecLike(spec.raw.snapshot)) {
|
|
6579
|
+
if (isVmSpecLike$1(spec.raw.snapshot)) {
|
|
6299
6580
|
builders = collectSpecBuilders(spec.raw.snapshot);
|
|
6300
6581
|
}
|
|
6301
|
-
if (spec.
|
|
6302
|
-
for (const [key, builder] of Object.entries(
|
|
6582
|
+
if (spec.builders) {
|
|
6583
|
+
for (const [key, builder] of Object.entries(
|
|
6584
|
+
spec.builders
|
|
6585
|
+
)) {
|
|
6303
6586
|
if (builder) {
|
|
6304
6587
|
builders[key] = builder;
|
|
6305
6588
|
}
|
|
@@ -6314,9 +6597,10 @@ function mergeWithBuildersIntoSpec(spec, withBuilders) {
|
|
|
6314
6597
|
return new VmSpec({
|
|
6315
6598
|
...spec.raw,
|
|
6316
6599
|
with: {
|
|
6317
|
-
...spec.
|
|
6600
|
+
...spec.builders,
|
|
6318
6601
|
...withBuilders
|
|
6319
|
-
}
|
|
6602
|
+
},
|
|
6603
|
+
__withDiscriminators: spec.getBuilderDiscriminators()
|
|
6320
6604
|
});
|
|
6321
6605
|
}
|
|
6322
6606
|
class VmsNamespace {
|
|
@@ -6325,14 +6609,12 @@ class VmsNamespace {
|
|
|
6325
6609
|
this.snapshots = new VmSnapshotsNamespace(freestyle._apiClient);
|
|
6326
6610
|
}
|
|
6327
6611
|
snapshots;
|
|
6328
|
-
/**
|
|
6329
|
-
* Create a new VM.
|
|
6330
|
-
* @param options Optional VM configuration
|
|
6331
|
-
* @returns A VM instance representing the created VM
|
|
6332
|
-
*/
|
|
6333
6612
|
async create(options = {}) {
|
|
6334
|
-
if (isVmSpecLike(options
|
|
6335
|
-
|
|
6613
|
+
if (isVmSpecLike$1(options)) {
|
|
6614
|
+
options = { spec: options };
|
|
6615
|
+
}
|
|
6616
|
+
if (isVmSpecLike$1(options.snapshot)) {
|
|
6617
|
+
if (isVmSpecLike$1(options.spec)) {
|
|
6336
6618
|
if (!options.spec.raw.snapshot) {
|
|
6337
6619
|
options.spec.raw.snapshot = options.snapshot;
|
|
6338
6620
|
}
|
|
@@ -6341,20 +6623,22 @@ class VmsNamespace {
|
|
|
6341
6623
|
}
|
|
6342
6624
|
}
|
|
6343
6625
|
if (options.systemd?.services) {
|
|
6344
|
-
const normalizedServices = options.systemd.services.map(
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6626
|
+
const normalizedServices = options.systemd.services.map(
|
|
6627
|
+
(service) => {
|
|
6628
|
+
return {
|
|
6629
|
+
...service,
|
|
6630
|
+
after: service.after?.map(
|
|
6631
|
+
(s) => s.includes(".") ? s : `${s}.service`
|
|
6632
|
+
),
|
|
6633
|
+
requires: service.requires?.map(
|
|
6634
|
+
(s) => s.includes(".") ? s : `${s}.service`
|
|
6635
|
+
),
|
|
6636
|
+
wantedBy: service.wantedBy?.map(
|
|
6637
|
+
(s) => s.includes(".") ? s : `${s}.service`
|
|
6638
|
+
)
|
|
6639
|
+
};
|
|
6640
|
+
}
|
|
6641
|
+
);
|
|
6358
6642
|
const { services: processedServices, additionalFiles: bashFiles } = processSystemdServices(
|
|
6359
6643
|
normalizedServices,
|
|
6360
6644
|
options.additionalFiles ?? {}
|
|
@@ -6382,10 +6666,10 @@ class VmsNamespace {
|
|
|
6382
6666
|
const { snapshot: _snapshot, ...rest } = options;
|
|
6383
6667
|
options = rest;
|
|
6384
6668
|
}
|
|
6385
|
-
if (isVmSpecLike(options.spec) && options.with) {
|
|
6669
|
+
if (isVmSpecLike$1(options.spec) && options.with) {
|
|
6386
6670
|
options.spec = mergeWithBuildersIntoSpec(options.spec, options.with);
|
|
6387
6671
|
}
|
|
6388
|
-
if (isVmSpecLike(options.spec)) {
|
|
6672
|
+
if (isVmSpecLike$1(options.spec)) {
|
|
6389
6673
|
let spec = options.spec;
|
|
6390
6674
|
spec = await processOuterSpecBuilders(spec);
|
|
6391
6675
|
const { snapshot, ...outerSpecOptions } = spec.raw;
|
|
@@ -6401,11 +6685,13 @@ class VmsNamespace {
|
|
|
6401
6685
|
...options,
|
|
6402
6686
|
...mergedOptions
|
|
6403
6687
|
};
|
|
6404
|
-
if (!options.with && spec.
|
|
6405
|
-
options.with = spec.
|
|
6688
|
+
if (!options.with && spec.builders) {
|
|
6689
|
+
options.with = spec.builders;
|
|
6406
6690
|
}
|
|
6407
6691
|
}
|
|
6408
|
-
const specBuilders = isVmSpecLike(
|
|
6692
|
+
const specBuilders = isVmSpecLike$1(
|
|
6693
|
+
options.spec
|
|
6694
|
+
) ? collectSpecBuilders(options.spec) : void 0;
|
|
6409
6695
|
const templateBuilders = isVmTemplateLike(options.template) ? options.template.with : void 0;
|
|
6410
6696
|
const builders = {
|
|
6411
6697
|
...templateBuilders || {},
|
|
@@ -6467,10 +6753,17 @@ class VmsNamespace {
|
|
|
6467
6753
|
);
|
|
6468
6754
|
}
|
|
6469
6755
|
config.git = normalizeGitOptions(config.git);
|
|
6756
|
+
const serializedBaseImage = normalizeBaseImage(config.baseImage)?.toRaw();
|
|
6757
|
+
const rawTemplate = isVmTemplateLike(config.template) ? config.template.raw : config.template;
|
|
6758
|
+
const requestTemplate = serializedBaseImage ? {
|
|
6759
|
+
...rawTemplate ?? {},
|
|
6760
|
+
baseImage: serializedBaseImage
|
|
6761
|
+
} : rawTemplate;
|
|
6762
|
+
const { baseImage: _baseImage, template: _template, ...requestConfig } = config;
|
|
6470
6763
|
const response = await this.freestyle._apiClient.post("/v1/vms", {
|
|
6471
6764
|
body: {
|
|
6472
|
-
...
|
|
6473
|
-
template:
|
|
6765
|
+
...requestConfig,
|
|
6766
|
+
template: requestTemplate,
|
|
6474
6767
|
// Cast systemd since we've processed SystemdServiceInput[] to RawSystemdService[]
|
|
6475
6768
|
systemd: config.systemd,
|
|
6476
6769
|
// Normalize git options - default config to {}
|
|
@@ -6487,6 +6780,7 @@ class VmsNamespace {
|
|
|
6487
6780
|
if (builder) {
|
|
6488
6781
|
const instance = builder.createInstance();
|
|
6489
6782
|
instance._init(vm);
|
|
6783
|
+
vm._attachWith(key, instance);
|
|
6490
6784
|
vm[key] = instance;
|
|
6491
6785
|
}
|
|
6492
6786
|
}
|
|
@@ -6525,6 +6819,7 @@ class VmsNamespace {
|
|
|
6525
6819
|
if (builder) {
|
|
6526
6820
|
const instance = builder.createInstance();
|
|
6527
6821
|
instance._init(vm);
|
|
6822
|
+
vm._attachWith(key, instance);
|
|
6528
6823
|
vm[key] = instance;
|
|
6529
6824
|
}
|
|
6530
6825
|
}
|
|
@@ -6545,6 +6840,7 @@ class VmsNamespace {
|
|
|
6545
6840
|
if (builder) {
|
|
6546
6841
|
const instance = builder.createInstance();
|
|
6547
6842
|
instance._init(vm);
|
|
6843
|
+
vm._attachWith(key, instance);
|
|
6548
6844
|
vm[key] = instance;
|
|
6549
6845
|
}
|
|
6550
6846
|
}
|
|
@@ -6565,14 +6861,44 @@ function enhanceError(e) {
|
|
|
6565
6861
|
}
|
|
6566
6862
|
return e;
|
|
6567
6863
|
}
|
|
6864
|
+
function defaultVmWithName(builder) {
|
|
6865
|
+
if (builder.defaultField) {
|
|
6866
|
+
return builder.defaultField;
|
|
6867
|
+
}
|
|
6868
|
+
const constructorWithDefaults = builder.constructor;
|
|
6869
|
+
if (constructorWithDefaults.defaultField) {
|
|
6870
|
+
return constructorWithDefaults.defaultField;
|
|
6871
|
+
}
|
|
6872
|
+
if (constructorWithDefaults.defaultName) {
|
|
6873
|
+
return constructorWithDefaults.defaultName;
|
|
6874
|
+
}
|
|
6875
|
+
const className = constructorWithDefaults.name ?? "";
|
|
6876
|
+
const stripped = className.startsWith("Vm") ? className.slice(2) : className;
|
|
6877
|
+
return stripped ? stripped.toLowerCase() : "with";
|
|
6878
|
+
}
|
|
6879
|
+
function normalizeBaseImage(image) {
|
|
6880
|
+
if (!image) return void 0;
|
|
6881
|
+
if (image instanceof VmBaseImage) return image;
|
|
6882
|
+
return new VmBaseImage(image);
|
|
6883
|
+
}
|
|
6884
|
+
function prepareBaseImageForConfigure(image) {
|
|
6885
|
+
const normalized = normalizeBaseImage(image);
|
|
6886
|
+
if (!normalized) {
|
|
6887
|
+
return new VmBaseImage(DEFAULT_CONFIGURE_BASE_IMAGE);
|
|
6888
|
+
}
|
|
6889
|
+
if (normalized.hasFromInstruction()) {
|
|
6890
|
+
return normalized;
|
|
6891
|
+
}
|
|
6892
|
+
return new VmBaseImage(DEFAULT_CONFIGURE_BASE_IMAGE).from(normalized);
|
|
6893
|
+
}
|
|
6568
6894
|
class VmSnapshotsNamespace {
|
|
6569
6895
|
constructor(apiClient) {
|
|
6570
6896
|
this.apiClient = apiClient;
|
|
6571
6897
|
}
|
|
6572
6898
|
async ensure(options) {
|
|
6573
6899
|
let requestOptions = options;
|
|
6574
|
-
if (isVmSpecLike(requestOptions.snapshot)) {
|
|
6575
|
-
if (isVmSpecLike(requestOptions.spec)) {
|
|
6900
|
+
if (isVmSpecLike$1(requestOptions.snapshot)) {
|
|
6901
|
+
if (isVmSpecLike$1(requestOptions.spec)) {
|
|
6576
6902
|
if (!requestOptions.spec.raw.snapshot) {
|
|
6577
6903
|
requestOptions.spec.raw.snapshot = requestOptions.snapshot;
|
|
6578
6904
|
}
|
|
@@ -6584,7 +6910,7 @@ class VmSnapshotsNamespace {
|
|
|
6584
6910
|
const { snapshot: _snapshot, ...rest } = requestOptions;
|
|
6585
6911
|
requestOptions = rest;
|
|
6586
6912
|
}
|
|
6587
|
-
if (isVmSpecLike(requestOptions.spec)) {
|
|
6913
|
+
if (isVmSpecLike$1(requestOptions.spec)) {
|
|
6588
6914
|
let spec = requestOptions.spec;
|
|
6589
6915
|
spec = await processSpecTree(spec);
|
|
6590
6916
|
const { snapshot: _snapshotSpec, ...outerSpecOptions } = spec.raw;
|
|
@@ -6592,7 +6918,7 @@ class VmSnapshotsNamespace {
|
|
|
6592
6918
|
requestOptions.template = new VmTemplate({
|
|
6593
6919
|
...outerSpecOptions,
|
|
6594
6920
|
template: innerTemplate,
|
|
6595
|
-
with: spec.
|
|
6921
|
+
with: spec.builders
|
|
6596
6922
|
});
|
|
6597
6923
|
}
|
|
6598
6924
|
if ("spec" in requestOptions) {
|
|
@@ -6628,6 +6954,11 @@ class VmSnapshotsNamespace {
|
|
|
6628
6954
|
}
|
|
6629
6955
|
}
|
|
6630
6956
|
async function processTemplateTree(template) {
|
|
6957
|
+
if (template.raw.baseImage) {
|
|
6958
|
+
template.raw.baseImage = normalizeBaseImage(
|
|
6959
|
+
template.raw.baseImage
|
|
6960
|
+
)?.toRaw();
|
|
6961
|
+
}
|
|
6631
6962
|
if (template.raw.git) {
|
|
6632
6963
|
template.raw.git = normalizeGitOptions(
|
|
6633
6964
|
template.raw.git
|
|
@@ -6659,6 +6990,11 @@ async function processTemplateTree(template) {
|
|
|
6659
6990
|
template
|
|
6660
6991
|
);
|
|
6661
6992
|
}
|
|
6993
|
+
if (builder.configureBaseImage) {
|
|
6994
|
+
template.raw.baseImage = await builder.configureBaseImage(
|
|
6995
|
+
prepareBaseImageForConfigure(template.raw.baseImage)
|
|
6996
|
+
);
|
|
6997
|
+
}
|
|
6662
6998
|
if (builder.configureNestedTemplate) {
|
|
6663
6999
|
let nestedTemplate;
|
|
6664
7000
|
if (isVmTemplateLike(template.raw.template)) {
|
|
@@ -6673,6 +7009,11 @@ async function processTemplateTree(template) {
|
|
|
6673
7009
|
}
|
|
6674
7010
|
}
|
|
6675
7011
|
}
|
|
7012
|
+
if (template.raw.baseImage) {
|
|
7013
|
+
template.raw.baseImage = normalizeBaseImage(
|
|
7014
|
+
template.raw.baseImage
|
|
7015
|
+
)?.toRaw();
|
|
7016
|
+
}
|
|
6676
7017
|
if (template.raw.git) {
|
|
6677
7018
|
template.raw.git = normalizeGitOptions(
|
|
6678
7019
|
template.raw.git
|
|
@@ -6697,20 +7038,18 @@ async function processTemplateTree(template) {
|
|
|
6697
7038
|
template.raw.additionalFiles = bashFiles;
|
|
6698
7039
|
}
|
|
6699
7040
|
if (template.raw.systemd?.patchedServices) {
|
|
6700
|
-
template.raw.systemd.patchedServices = template.raw.systemd.patchedServices.map(
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
})
|
|
6713
|
-
);
|
|
7041
|
+
template.raw.systemd.patchedServices = template.raw.systemd.patchedServices.map((service) => ({
|
|
7042
|
+
...service,
|
|
7043
|
+
after: service.after?.map(
|
|
7044
|
+
(s) => s.includes(".") ? s : `${s}.service`
|
|
7045
|
+
),
|
|
7046
|
+
requires: service.requires?.map(
|
|
7047
|
+
(s) => s.includes(".") ? s : `${s}.service`
|
|
7048
|
+
),
|
|
7049
|
+
wantedBy: service.wantedBy?.map(
|
|
7050
|
+
(s) => s.includes(".") ? s : `${s}.service`
|
|
7051
|
+
)
|
|
7052
|
+
}));
|
|
6714
7053
|
}
|
|
6715
7054
|
if (isVmTemplateLike(template.raw.template)) {
|
|
6716
7055
|
template.raw.template = await processTemplateTree(
|
|
@@ -6729,21 +7068,18 @@ async function ensureNestedTemplates(template, snapshots) {
|
|
|
6729
7068
|
return await layerTemplates(templates, snapshots);
|
|
6730
7069
|
}
|
|
6731
7070
|
async function layerTemplates(templates, snapshots) {
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
});
|
|
6736
|
-
|
|
6737
|
-
while (templates.length > 0) {
|
|
7071
|
+
if (templates.length === 1) {
|
|
7072
|
+
return templates[0];
|
|
7073
|
+
}
|
|
7074
|
+
let lastSnapshotId = (await snapshots.ensure({ template: templates.pop() })).snapshotId;
|
|
7075
|
+
while (templates.length > 1) {
|
|
6738
7076
|
const template = templates.pop();
|
|
6739
7077
|
template.raw.snapshotId = lastSnapshotId;
|
|
6740
|
-
|
|
6741
|
-
template
|
|
6742
|
-
});
|
|
6743
|
-
lastSnapshotId = snapshotId2;
|
|
6744
|
-
lastTemplate = template;
|
|
7078
|
+
lastSnapshotId = (await snapshots.ensure({ template })).snapshotId;
|
|
6745
7079
|
}
|
|
6746
|
-
|
|
7080
|
+
const outermost = templates.pop();
|
|
7081
|
+
outermost.raw.snapshotId = lastSnapshotId;
|
|
7082
|
+
return outermost;
|
|
6747
7083
|
}
|
|
6748
7084
|
function linuxUsernameHeader(linux_username) {
|
|
6749
7085
|
return linux_username ? { "X-Freestyle-Vm-Linux-User-Id": linux_username } : void 0;
|
|
@@ -6908,7 +7244,8 @@ async function readFiles(directory) {
|
|
|
6908
7244
|
return files;
|
|
6909
7245
|
}
|
|
6910
7246
|
|
|
6911
|
-
async function debugCreateRequests(freestyle,
|
|
7247
|
+
async function debugCreateRequests(freestyle, optionsOrSpec = {}) {
|
|
7248
|
+
const options = isVmSpecLike(optionsOrSpec) ? { spec: optionsOrSpec } : optionsOrSpec;
|
|
6912
7249
|
const requests = [];
|
|
6913
7250
|
let snapshotCounter = 0;
|
|
6914
7251
|
let vmCounter = 0;
|
|
@@ -6952,6 +7289,9 @@ async function debugCreateRequests(freestyle, options = {}) {
|
|
|
6952
7289
|
}
|
|
6953
7290
|
return requests;
|
|
6954
7291
|
}
|
|
7292
|
+
function isVmSpecLike(value) {
|
|
7293
|
+
return !!value && typeof value === "object" && "raw" in value && "with" in value;
|
|
7294
|
+
}
|
|
6955
7295
|
|
|
6956
7296
|
class Freestyle {
|
|
6957
7297
|
/**
|
|
@@ -7000,7 +7340,9 @@ class Freestyle {
|
|
|
7000
7340
|
async whoami() {
|
|
7001
7341
|
const response = await this._apiClient.fetch("/auth/v1/whoami");
|
|
7002
7342
|
if (!response.ok) {
|
|
7003
|
-
throw new Error(
|
|
7343
|
+
throw new Error(
|
|
7344
|
+
`Failed to get whoami: ${response.status} ${await response.text()}`
|
|
7345
|
+
);
|
|
7004
7346
|
}
|
|
7005
7347
|
return response.json();
|
|
7006
7348
|
}
|
|
@@ -7042,6 +7384,7 @@ exports.Identity = Identity;
|
|
|
7042
7384
|
exports.Systemd = Systemd;
|
|
7043
7385
|
exports.SystemdService = SystemdService;
|
|
7044
7386
|
exports.Vm = Vm;
|
|
7387
|
+
exports.VmBaseImage = VmBaseImage;
|
|
7045
7388
|
exports.VmBuilder = VmBuilder;
|
|
7046
7389
|
exports.VmService = VmService;
|
|
7047
7390
|
exports.VmSpec = VmSpec;
|