kurtosis-sdk 0.54.0 → 0.55.0
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/build/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts +44 -1
- package/build/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js +335 -15
- package/build/core/lib/enclaves/enclave_context.d.ts +1 -0
- package/build/core/lib/enclaves/enclave_context.js +5 -5
- package/build/core/lib/enclaves/grpc_node_api_container_client.d.ts +0 -2
- package/build/core/lib/enclaves/grpc_node_api_container_client.js +0 -36
- package/build/core/lib/enclaves/grpc_web_api_container_client.d.ts +0 -2
- package/build/core/lib/enclaves/grpc_web_api_container_client.js +0 -37
- package/build/core/lib/enclaves/{kurtosis_mod.d.ts → kurtosis_yaml.d.ts} +2 -2
- package/build/core/lib/enclaves/kurtosis_yaml.js +56 -0
- package/build/kurtosis_version/kurtosis_version.js +1 -1
- package/package.json +1 -1
- package/build/core/lib/enclaves/kurtosis_mod.js +0 -42
|
@@ -546,6 +546,14 @@ export class KurtosisInstruction extends jspb.Message {
|
|
|
546
546
|
hasPosition(): boolean;
|
|
547
547
|
clearPosition(): KurtosisInstruction;
|
|
548
548
|
|
|
549
|
+
getInstructionName(): string;
|
|
550
|
+
setInstructionName(value: string): KurtosisInstruction;
|
|
551
|
+
|
|
552
|
+
getArgumentsList(): Array<KurtosisInstructionArg>;
|
|
553
|
+
setArgumentsList(value: Array<KurtosisInstructionArg>): KurtosisInstruction;
|
|
554
|
+
clearArgumentsList(): KurtosisInstruction;
|
|
555
|
+
addArguments(value?: KurtosisInstructionArg, index?: number): KurtosisInstructionArg;
|
|
556
|
+
|
|
549
557
|
getExecutableInstruction(): string;
|
|
550
558
|
setExecutableInstruction(value: string): KurtosisInstruction;
|
|
551
559
|
|
|
@@ -565,13 +573,48 @@ export class KurtosisInstruction extends jspb.Message {
|
|
|
565
573
|
export namespace KurtosisInstruction {
|
|
566
574
|
export type AsObject = {
|
|
567
575
|
position?: KurtosisInstructionPosition.AsObject,
|
|
576
|
+
instructionName: string,
|
|
577
|
+
argumentsList: Array<KurtosisInstructionArg.AsObject>,
|
|
568
578
|
executableInstruction: string,
|
|
569
579
|
instructionResult?: string,
|
|
570
580
|
}
|
|
571
581
|
|
|
572
582
|
export enum InstructionResultCase {
|
|
573
583
|
_INSTRUCTION_RESULT_NOT_SET = 0,
|
|
574
|
-
INSTRUCTION_RESULT =
|
|
584
|
+
INSTRUCTION_RESULT = 5,
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export class KurtosisInstructionArg extends jspb.Message {
|
|
589
|
+
getSerializedArgValue(): string;
|
|
590
|
+
setSerializedArgValue(value: string): KurtosisInstructionArg;
|
|
591
|
+
|
|
592
|
+
getArgName(): string;
|
|
593
|
+
setArgName(value: string): KurtosisInstructionArg;
|
|
594
|
+
hasArgName(): boolean;
|
|
595
|
+
clearArgName(): KurtosisInstructionArg;
|
|
596
|
+
|
|
597
|
+
getIsRepresentative(): boolean;
|
|
598
|
+
setIsRepresentative(value: boolean): KurtosisInstructionArg;
|
|
599
|
+
|
|
600
|
+
serializeBinary(): Uint8Array;
|
|
601
|
+
toObject(includeInstance?: boolean): KurtosisInstructionArg.AsObject;
|
|
602
|
+
static toObject(includeInstance: boolean, msg: KurtosisInstructionArg): KurtosisInstructionArg.AsObject;
|
|
603
|
+
static serializeBinaryToWriter(message: KurtosisInstructionArg, writer: jspb.BinaryWriter): void;
|
|
604
|
+
static deserializeBinary(bytes: Uint8Array): KurtosisInstructionArg;
|
|
605
|
+
static deserializeBinaryFromReader(message: KurtosisInstructionArg, reader: jspb.BinaryReader): KurtosisInstructionArg;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
export namespace KurtosisInstructionArg {
|
|
609
|
+
export type AsObject = {
|
|
610
|
+
serializedArgValue: string,
|
|
611
|
+
argName?: string,
|
|
612
|
+
isRepresentative: boolean,
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export enum ArgNameCase {
|
|
616
|
+
_ARG_NAME_NOT_SET = 0,
|
|
617
|
+
ARG_NAME = 2,
|
|
575
618
|
}
|
|
576
619
|
}
|
|
577
620
|
|
|
@@ -54,6 +54,7 @@ goog.exportSymbol('proto.api_container_api.KurtosisExecutionError', null, global
|
|
|
54
54
|
goog.exportSymbol('proto.api_container_api.KurtosisExecutionResponseLine', null, global);
|
|
55
55
|
goog.exportSymbol('proto.api_container_api.KurtosisExecutionResponseLine.KurtosisExecutionResponseLineCase', null, global);
|
|
56
56
|
goog.exportSymbol('proto.api_container_api.KurtosisInstruction', null, global);
|
|
57
|
+
goog.exportSymbol('proto.api_container_api.KurtosisInstructionArg', null, global);
|
|
57
58
|
goog.exportSymbol('proto.api_container_api.KurtosisInstructionPosition', null, global);
|
|
58
59
|
goog.exportSymbol('proto.api_container_api.KurtosisInterpretationError', null, global);
|
|
59
60
|
goog.exportSymbol('proto.api_container_api.KurtosisValidationError', null, global);
|
|
@@ -498,7 +499,7 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
498
499
|
* @constructor
|
|
499
500
|
*/
|
|
500
501
|
proto.api_container_api.KurtosisInstruction = function(opt_data) {
|
|
501
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
502
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.api_container_api.KurtosisInstruction.repeatedFields_, null);
|
|
502
503
|
};
|
|
503
504
|
goog.inherits(proto.api_container_api.KurtosisInstruction, jspb.Message);
|
|
504
505
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -508,6 +509,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
508
509
|
*/
|
|
509
510
|
proto.api_container_api.KurtosisInstruction.displayName = 'proto.api_container_api.KurtosisInstruction';
|
|
510
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Generated by JsPbCodeGenerator.
|
|
514
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
515
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
516
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
517
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
518
|
+
* valid.
|
|
519
|
+
* @extends {jspb.Message}
|
|
520
|
+
* @constructor
|
|
521
|
+
*/
|
|
522
|
+
proto.api_container_api.KurtosisInstructionArg = function(opt_data) {
|
|
523
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
524
|
+
};
|
|
525
|
+
goog.inherits(proto.api_container_api.KurtosisInstructionArg, jspb.Message);
|
|
526
|
+
if (goog.DEBUG && !COMPILED) {
|
|
527
|
+
/**
|
|
528
|
+
* @public
|
|
529
|
+
* @override
|
|
530
|
+
*/
|
|
531
|
+
proto.api_container_api.KurtosisInstructionArg.displayName = 'proto.api_container_api.KurtosisInstructionArg';
|
|
532
|
+
}
|
|
511
533
|
/**
|
|
512
534
|
* Generated by JsPbCodeGenerator.
|
|
513
535
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -5222,6 +5244,13 @@ proto.api_container_api.KurtosisExecutionError.prototype.setErrorMessage = funct
|
|
|
5222
5244
|
|
|
5223
5245
|
|
|
5224
5246
|
|
|
5247
|
+
/**
|
|
5248
|
+
* List of repeated fields within this message type.
|
|
5249
|
+
* @private {!Array<number>}
|
|
5250
|
+
* @const
|
|
5251
|
+
*/
|
|
5252
|
+
proto.api_container_api.KurtosisInstruction.repeatedFields_ = [3];
|
|
5253
|
+
|
|
5225
5254
|
|
|
5226
5255
|
|
|
5227
5256
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -5254,8 +5283,11 @@ proto.api_container_api.KurtosisInstruction.prototype.toObject = function(opt_in
|
|
|
5254
5283
|
proto.api_container_api.KurtosisInstruction.toObject = function(includeInstance, msg) {
|
|
5255
5284
|
var f, obj = {
|
|
5256
5285
|
position: (f = msg.getPosition()) && proto.api_container_api.KurtosisInstructionPosition.toObject(includeInstance, f),
|
|
5257
|
-
|
|
5258
|
-
|
|
5286
|
+
instructionName: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
5287
|
+
argumentsList: jspb.Message.toObjectList(msg.getArgumentsList(),
|
|
5288
|
+
proto.api_container_api.KurtosisInstructionArg.toObject, includeInstance),
|
|
5289
|
+
executableInstruction: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
5290
|
+
instructionResult: jspb.Message.getFieldWithDefault(msg, 5, "")
|
|
5259
5291
|
};
|
|
5260
5292
|
|
|
5261
5293
|
if (includeInstance) {
|
|
@@ -5299,9 +5331,18 @@ proto.api_container_api.KurtosisInstruction.deserializeBinaryFromReader = functi
|
|
|
5299
5331
|
break;
|
|
5300
5332
|
case 2:
|
|
5301
5333
|
var value = /** @type {string} */ (reader.readString());
|
|
5302
|
-
msg.
|
|
5334
|
+
msg.setInstructionName(value);
|
|
5303
5335
|
break;
|
|
5304
5336
|
case 3:
|
|
5337
|
+
var value = new proto.api_container_api.KurtosisInstructionArg;
|
|
5338
|
+
reader.readMessage(value,proto.api_container_api.KurtosisInstructionArg.deserializeBinaryFromReader);
|
|
5339
|
+
msg.addArguments(value);
|
|
5340
|
+
break;
|
|
5341
|
+
case 4:
|
|
5342
|
+
var value = /** @type {string} */ (reader.readString());
|
|
5343
|
+
msg.setExecutableInstruction(value);
|
|
5344
|
+
break;
|
|
5345
|
+
case 5:
|
|
5305
5346
|
var value = /** @type {string} */ (reader.readString());
|
|
5306
5347
|
msg.setInstructionResult(value);
|
|
5307
5348
|
break;
|
|
@@ -5342,17 +5383,32 @@ proto.api_container_api.KurtosisInstruction.serializeBinaryToWriter = function(m
|
|
|
5342
5383
|
proto.api_container_api.KurtosisInstructionPosition.serializeBinaryToWriter
|
|
5343
5384
|
);
|
|
5344
5385
|
}
|
|
5345
|
-
f = message.
|
|
5386
|
+
f = message.getInstructionName();
|
|
5346
5387
|
if (f.length > 0) {
|
|
5347
5388
|
writer.writeString(
|
|
5348
5389
|
2,
|
|
5349
5390
|
f
|
|
5350
5391
|
);
|
|
5351
5392
|
}
|
|
5352
|
-
f =
|
|
5393
|
+
f = message.getArgumentsList();
|
|
5394
|
+
if (f.length > 0) {
|
|
5395
|
+
writer.writeRepeatedMessage(
|
|
5396
|
+
3,
|
|
5397
|
+
f,
|
|
5398
|
+
proto.api_container_api.KurtosisInstructionArg.serializeBinaryToWriter
|
|
5399
|
+
);
|
|
5400
|
+
}
|
|
5401
|
+
f = message.getExecutableInstruction();
|
|
5402
|
+
if (f.length > 0) {
|
|
5403
|
+
writer.writeString(
|
|
5404
|
+
4,
|
|
5405
|
+
f
|
|
5406
|
+
);
|
|
5407
|
+
}
|
|
5408
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 5));
|
|
5353
5409
|
if (f != null) {
|
|
5354
5410
|
writer.writeString(
|
|
5355
|
-
|
|
5411
|
+
5,
|
|
5356
5412
|
f
|
|
5357
5413
|
);
|
|
5358
5414
|
}
|
|
@@ -5397,10 +5453,10 @@ proto.api_container_api.KurtosisInstruction.prototype.hasPosition = function() {
|
|
|
5397
5453
|
|
|
5398
5454
|
|
|
5399
5455
|
/**
|
|
5400
|
-
* optional string
|
|
5456
|
+
* optional string instruction_name = 2;
|
|
5401
5457
|
* @return {string}
|
|
5402
5458
|
*/
|
|
5403
|
-
proto.api_container_api.KurtosisInstruction.prototype.
|
|
5459
|
+
proto.api_container_api.KurtosisInstruction.prototype.getInstructionName = function() {
|
|
5404
5460
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
5405
5461
|
};
|
|
5406
5462
|
|
|
@@ -5409,17 +5465,73 @@ proto.api_container_api.KurtosisInstruction.prototype.getExecutableInstruction =
|
|
|
5409
5465
|
* @param {string} value
|
|
5410
5466
|
* @return {!proto.api_container_api.KurtosisInstruction} returns this
|
|
5411
5467
|
*/
|
|
5412
|
-
proto.api_container_api.KurtosisInstruction.prototype.
|
|
5468
|
+
proto.api_container_api.KurtosisInstruction.prototype.setInstructionName = function(value) {
|
|
5413
5469
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
5414
5470
|
};
|
|
5415
5471
|
|
|
5416
5472
|
|
|
5417
5473
|
/**
|
|
5418
|
-
*
|
|
5474
|
+
* repeated KurtosisInstructionArg arguments = 3;
|
|
5475
|
+
* @return {!Array<!proto.api_container_api.KurtosisInstructionArg>}
|
|
5476
|
+
*/
|
|
5477
|
+
proto.api_container_api.KurtosisInstruction.prototype.getArgumentsList = function() {
|
|
5478
|
+
return /** @type{!Array<!proto.api_container_api.KurtosisInstructionArg>} */ (
|
|
5479
|
+
jspb.Message.getRepeatedWrapperField(this, proto.api_container_api.KurtosisInstructionArg, 3));
|
|
5480
|
+
};
|
|
5481
|
+
|
|
5482
|
+
|
|
5483
|
+
/**
|
|
5484
|
+
* @param {!Array<!proto.api_container_api.KurtosisInstructionArg>} value
|
|
5485
|
+
* @return {!proto.api_container_api.KurtosisInstruction} returns this
|
|
5486
|
+
*/
|
|
5487
|
+
proto.api_container_api.KurtosisInstruction.prototype.setArgumentsList = function(value) {
|
|
5488
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
5489
|
+
};
|
|
5490
|
+
|
|
5491
|
+
|
|
5492
|
+
/**
|
|
5493
|
+
* @param {!proto.api_container_api.KurtosisInstructionArg=} opt_value
|
|
5494
|
+
* @param {number=} opt_index
|
|
5495
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg}
|
|
5496
|
+
*/
|
|
5497
|
+
proto.api_container_api.KurtosisInstruction.prototype.addArguments = function(opt_value, opt_index) {
|
|
5498
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.api_container_api.KurtosisInstructionArg, opt_index);
|
|
5499
|
+
};
|
|
5500
|
+
|
|
5501
|
+
|
|
5502
|
+
/**
|
|
5503
|
+
* Clears the list making it empty but non-null.
|
|
5504
|
+
* @return {!proto.api_container_api.KurtosisInstruction} returns this
|
|
5505
|
+
*/
|
|
5506
|
+
proto.api_container_api.KurtosisInstruction.prototype.clearArgumentsList = function() {
|
|
5507
|
+
return this.setArgumentsList([]);
|
|
5508
|
+
};
|
|
5509
|
+
|
|
5510
|
+
|
|
5511
|
+
/**
|
|
5512
|
+
* optional string executable_instruction = 4;
|
|
5513
|
+
* @return {string}
|
|
5514
|
+
*/
|
|
5515
|
+
proto.api_container_api.KurtosisInstruction.prototype.getExecutableInstruction = function() {
|
|
5516
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
5517
|
+
};
|
|
5518
|
+
|
|
5519
|
+
|
|
5520
|
+
/**
|
|
5521
|
+
* @param {string} value
|
|
5522
|
+
* @return {!proto.api_container_api.KurtosisInstruction} returns this
|
|
5523
|
+
*/
|
|
5524
|
+
proto.api_container_api.KurtosisInstruction.prototype.setExecutableInstruction = function(value) {
|
|
5525
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
5526
|
+
};
|
|
5527
|
+
|
|
5528
|
+
|
|
5529
|
+
/**
|
|
5530
|
+
* optional string instruction_result = 5;
|
|
5419
5531
|
* @return {string}
|
|
5420
5532
|
*/
|
|
5421
5533
|
proto.api_container_api.KurtosisInstruction.prototype.getInstructionResult = function() {
|
|
5422
|
-
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this,
|
|
5534
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
5423
5535
|
};
|
|
5424
5536
|
|
|
5425
5537
|
|
|
@@ -5428,7 +5540,7 @@ proto.api_container_api.KurtosisInstruction.prototype.getInstructionResult = fun
|
|
|
5428
5540
|
* @return {!proto.api_container_api.KurtosisInstruction} returns this
|
|
5429
5541
|
*/
|
|
5430
5542
|
proto.api_container_api.KurtosisInstruction.prototype.setInstructionResult = function(value) {
|
|
5431
|
-
return jspb.Message.setField(this,
|
|
5543
|
+
return jspb.Message.setField(this, 5, value);
|
|
5432
5544
|
};
|
|
5433
5545
|
|
|
5434
5546
|
|
|
@@ -5437,7 +5549,7 @@ proto.api_container_api.KurtosisInstruction.prototype.setInstructionResult = fun
|
|
|
5437
5549
|
* @return {!proto.api_container_api.KurtosisInstruction} returns this
|
|
5438
5550
|
*/
|
|
5439
5551
|
proto.api_container_api.KurtosisInstruction.prototype.clearInstructionResult = function() {
|
|
5440
|
-
return jspb.Message.setField(this,
|
|
5552
|
+
return jspb.Message.setField(this, 5, undefined);
|
|
5441
5553
|
};
|
|
5442
5554
|
|
|
5443
5555
|
|
|
@@ -5446,7 +5558,215 @@ proto.api_container_api.KurtosisInstruction.prototype.clearInstructionResult = f
|
|
|
5446
5558
|
* @return {boolean}
|
|
5447
5559
|
*/
|
|
5448
5560
|
proto.api_container_api.KurtosisInstruction.prototype.hasInstructionResult = function() {
|
|
5449
|
-
return jspb.Message.getField(this,
|
|
5561
|
+
return jspb.Message.getField(this, 5) != null;
|
|
5562
|
+
};
|
|
5563
|
+
|
|
5564
|
+
|
|
5565
|
+
|
|
5566
|
+
|
|
5567
|
+
|
|
5568
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5569
|
+
/**
|
|
5570
|
+
* Creates an object representation of this proto.
|
|
5571
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
5572
|
+
* Optional fields that are not set will be set to undefined.
|
|
5573
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
5574
|
+
* For the list of reserved names please see:
|
|
5575
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
5576
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
5577
|
+
* JSPB instance for transitional soy proto support:
|
|
5578
|
+
* http://goto/soy-param-migration
|
|
5579
|
+
* @return {!Object}
|
|
5580
|
+
*/
|
|
5581
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.toObject = function(opt_includeInstance) {
|
|
5582
|
+
return proto.api_container_api.KurtosisInstructionArg.toObject(opt_includeInstance, this);
|
|
5583
|
+
};
|
|
5584
|
+
|
|
5585
|
+
|
|
5586
|
+
/**
|
|
5587
|
+
* Static version of the {@see toObject} method.
|
|
5588
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
5589
|
+
* the JSPB instance for transitional soy proto support:
|
|
5590
|
+
* http://goto/soy-param-migration
|
|
5591
|
+
* @param {!proto.api_container_api.KurtosisInstructionArg} msg The msg instance to transform.
|
|
5592
|
+
* @return {!Object}
|
|
5593
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
5594
|
+
*/
|
|
5595
|
+
proto.api_container_api.KurtosisInstructionArg.toObject = function(includeInstance, msg) {
|
|
5596
|
+
var f, obj = {
|
|
5597
|
+
serializedArgValue: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
5598
|
+
argName: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
5599
|
+
isRepresentative: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
|
|
5600
|
+
};
|
|
5601
|
+
|
|
5602
|
+
if (includeInstance) {
|
|
5603
|
+
obj.$jspbMessageInstance = msg;
|
|
5604
|
+
}
|
|
5605
|
+
return obj;
|
|
5606
|
+
};
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
|
|
5610
|
+
/**
|
|
5611
|
+
* Deserializes binary data (in protobuf wire format).
|
|
5612
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
5613
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg}
|
|
5614
|
+
*/
|
|
5615
|
+
proto.api_container_api.KurtosisInstructionArg.deserializeBinary = function(bytes) {
|
|
5616
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
5617
|
+
var msg = new proto.api_container_api.KurtosisInstructionArg;
|
|
5618
|
+
return proto.api_container_api.KurtosisInstructionArg.deserializeBinaryFromReader(msg, reader);
|
|
5619
|
+
};
|
|
5620
|
+
|
|
5621
|
+
|
|
5622
|
+
/**
|
|
5623
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
5624
|
+
* given reader into the given message object.
|
|
5625
|
+
* @param {!proto.api_container_api.KurtosisInstructionArg} msg The message object to deserialize into.
|
|
5626
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
5627
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg}
|
|
5628
|
+
*/
|
|
5629
|
+
proto.api_container_api.KurtosisInstructionArg.deserializeBinaryFromReader = function(msg, reader) {
|
|
5630
|
+
while (reader.nextField()) {
|
|
5631
|
+
if (reader.isEndGroup()) {
|
|
5632
|
+
break;
|
|
5633
|
+
}
|
|
5634
|
+
var field = reader.getFieldNumber();
|
|
5635
|
+
switch (field) {
|
|
5636
|
+
case 1:
|
|
5637
|
+
var value = /** @type {string} */ (reader.readString());
|
|
5638
|
+
msg.setSerializedArgValue(value);
|
|
5639
|
+
break;
|
|
5640
|
+
case 2:
|
|
5641
|
+
var value = /** @type {string} */ (reader.readString());
|
|
5642
|
+
msg.setArgName(value);
|
|
5643
|
+
break;
|
|
5644
|
+
case 3:
|
|
5645
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
5646
|
+
msg.setIsRepresentative(value);
|
|
5647
|
+
break;
|
|
5648
|
+
default:
|
|
5649
|
+
reader.skipField();
|
|
5650
|
+
break;
|
|
5651
|
+
}
|
|
5652
|
+
}
|
|
5653
|
+
return msg;
|
|
5654
|
+
};
|
|
5655
|
+
|
|
5656
|
+
|
|
5657
|
+
/**
|
|
5658
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
5659
|
+
* @return {!Uint8Array}
|
|
5660
|
+
*/
|
|
5661
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.serializeBinary = function() {
|
|
5662
|
+
var writer = new jspb.BinaryWriter();
|
|
5663
|
+
proto.api_container_api.KurtosisInstructionArg.serializeBinaryToWriter(this, writer);
|
|
5664
|
+
return writer.getResultBuffer();
|
|
5665
|
+
};
|
|
5666
|
+
|
|
5667
|
+
|
|
5668
|
+
/**
|
|
5669
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
5670
|
+
* format), writing to the given BinaryWriter.
|
|
5671
|
+
* @param {!proto.api_container_api.KurtosisInstructionArg} message
|
|
5672
|
+
* @param {!jspb.BinaryWriter} writer
|
|
5673
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
5674
|
+
*/
|
|
5675
|
+
proto.api_container_api.KurtosisInstructionArg.serializeBinaryToWriter = function(message, writer) {
|
|
5676
|
+
var f = undefined;
|
|
5677
|
+
f = message.getSerializedArgValue();
|
|
5678
|
+
if (f.length > 0) {
|
|
5679
|
+
writer.writeString(
|
|
5680
|
+
1,
|
|
5681
|
+
f
|
|
5682
|
+
);
|
|
5683
|
+
}
|
|
5684
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 2));
|
|
5685
|
+
if (f != null) {
|
|
5686
|
+
writer.writeString(
|
|
5687
|
+
2,
|
|
5688
|
+
f
|
|
5689
|
+
);
|
|
5690
|
+
}
|
|
5691
|
+
f = message.getIsRepresentative();
|
|
5692
|
+
if (f) {
|
|
5693
|
+
writer.writeBool(
|
|
5694
|
+
3,
|
|
5695
|
+
f
|
|
5696
|
+
);
|
|
5697
|
+
}
|
|
5698
|
+
};
|
|
5699
|
+
|
|
5700
|
+
|
|
5701
|
+
/**
|
|
5702
|
+
* optional string serialized_arg_value = 1;
|
|
5703
|
+
* @return {string}
|
|
5704
|
+
*/
|
|
5705
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.getSerializedArgValue = function() {
|
|
5706
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
5707
|
+
};
|
|
5708
|
+
|
|
5709
|
+
|
|
5710
|
+
/**
|
|
5711
|
+
* @param {string} value
|
|
5712
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg} returns this
|
|
5713
|
+
*/
|
|
5714
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.setSerializedArgValue = function(value) {
|
|
5715
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
5716
|
+
};
|
|
5717
|
+
|
|
5718
|
+
|
|
5719
|
+
/**
|
|
5720
|
+
* optional string arg_name = 2;
|
|
5721
|
+
* @return {string}
|
|
5722
|
+
*/
|
|
5723
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.getArgName = function() {
|
|
5724
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
5725
|
+
};
|
|
5726
|
+
|
|
5727
|
+
|
|
5728
|
+
/**
|
|
5729
|
+
* @param {string} value
|
|
5730
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg} returns this
|
|
5731
|
+
*/
|
|
5732
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.setArgName = function(value) {
|
|
5733
|
+
return jspb.Message.setField(this, 2, value);
|
|
5734
|
+
};
|
|
5735
|
+
|
|
5736
|
+
|
|
5737
|
+
/**
|
|
5738
|
+
* Clears the field making it undefined.
|
|
5739
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg} returns this
|
|
5740
|
+
*/
|
|
5741
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.clearArgName = function() {
|
|
5742
|
+
return jspb.Message.setField(this, 2, undefined);
|
|
5743
|
+
};
|
|
5744
|
+
|
|
5745
|
+
|
|
5746
|
+
/**
|
|
5747
|
+
* Returns whether this field is set.
|
|
5748
|
+
* @return {boolean}
|
|
5749
|
+
*/
|
|
5750
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.hasArgName = function() {
|
|
5751
|
+
return jspb.Message.getField(this, 2) != null;
|
|
5752
|
+
};
|
|
5753
|
+
|
|
5754
|
+
|
|
5755
|
+
/**
|
|
5756
|
+
* optional bool is_representative = 3;
|
|
5757
|
+
* @return {boolean}
|
|
5758
|
+
*/
|
|
5759
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.getIsRepresentative = function() {
|
|
5760
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
|
5761
|
+
};
|
|
5762
|
+
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* @param {boolean} value
|
|
5766
|
+
* @return {!proto.api_container_api.KurtosisInstructionArg} returns this
|
|
5767
|
+
*/
|
|
5768
|
+
proto.api_container_api.KurtosisInstructionArg.prototype.setIsRepresentative = function(value) {
|
|
5769
|
+
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
5450
5770
|
};
|
|
5451
5771
|
|
|
5452
5772
|
|
|
@@ -10,6 +10,7 @@ import { TemplateAndData } from "./template_and_data";
|
|
|
10
10
|
import { Readable } from "stream";
|
|
11
11
|
export declare type EnclaveID = string;
|
|
12
12
|
export declare type PartitionID = string;
|
|
13
|
+
export declare const KURTOSIS_YAML_FILENAME = "kurtosis.yml";
|
|
13
14
|
export declare class EnclaveContext {
|
|
14
15
|
private readonly backend;
|
|
15
16
|
private readonly pathJoiner;
|
|
@@ -13,7 +13,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.EnclaveContext = void 0;
|
|
16
|
+
exports.EnclaveContext = exports.KURTOSIS_YAML_FILENAME = void 0;
|
|
17
17
|
const neverthrow_1 = require("neverthrow");
|
|
18
18
|
const loglevel_1 = require("loglevel");
|
|
19
19
|
const browser_or_node_1 = require("browser-or-node");
|
|
@@ -25,11 +25,11 @@ const service_context_1 = require("../services/service_context");
|
|
|
25
25
|
const port_spec_1 = require("../services/port_spec");
|
|
26
26
|
const api_container_service_pb_1 = require("../../kurtosis_core_rpc_api_bindings/api_container_service_pb");
|
|
27
27
|
const path = require("path");
|
|
28
|
-
const
|
|
28
|
+
const kurtosis_yaml_1 = require("./kurtosis_yaml");
|
|
29
29
|
// This will always resolve to the default partition ID (regardless of whether such a partition exists in the enclave,
|
|
30
30
|
// or it was repartitioned away)
|
|
31
31
|
const DEFAULT_PARTITION_ID = "";
|
|
32
|
-
|
|
32
|
+
exports.KURTOSIS_YAML_FILENAME = "kurtosis.yml";
|
|
33
33
|
// Docs available at https://docs.kurtosistech.com/kurtosis-core/lib-documentation
|
|
34
34
|
class EnclaveContext {
|
|
35
35
|
constructor(backend, pathJoiner, genericTgzArchiver) {
|
|
@@ -578,8 +578,8 @@ class EnclaveContext {
|
|
|
578
578
|
}
|
|
579
579
|
assembleExecuteStartosisModuleArg(moduleRootPath, serializedParams, dryRun) {
|
|
580
580
|
return __awaiter(this, void 0, void 0, function* () {
|
|
581
|
-
const kurtosisYamlFilepath = path.join(moduleRootPath, KURTOSIS_YAML_FILENAME);
|
|
582
|
-
const resultParseKurtosisYaml = yield (0,
|
|
581
|
+
const kurtosisYamlFilepath = path.join(moduleRootPath, exports.KURTOSIS_YAML_FILENAME);
|
|
582
|
+
const resultParseKurtosisYaml = yield (0, kurtosis_yaml_1.parseKurtosisYaml)(kurtosisYamlFilepath);
|
|
583
583
|
if (resultParseKurtosisYaml.isErr()) {
|
|
584
584
|
return (0, neverthrow_1.err)(resultParseKurtosisYaml.error);
|
|
585
585
|
}
|
|
@@ -17,8 +17,6 @@ export declare class GrpcNodeApiContainerClient implements GenericApiContainerCl
|
|
|
17
17
|
executeKurtosisScript(serializedStartosisScript: ExecuteStartosisScriptArgs): Promise<Result<Readable, Error>>;
|
|
18
18
|
executeStartosisModule(startosisModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<ExecuteStartosisResponse, Error>>;
|
|
19
19
|
executeKurtosisModule(startosisModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<Readable, Error>>;
|
|
20
|
-
executeStartosisRemoteModule(startosisRemoteModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<ExecuteStartosisResponse, Error>>;
|
|
21
|
-
executeKurtosisRemoteModule(startosisRemoteModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<Readable, Error>>;
|
|
22
20
|
startServices(startServicesArgs: StartServicesArgs): Promise<Result<StartServicesResponse, Error>>;
|
|
23
21
|
removeService(args: RemoveServiceArgs): Promise<Result<RemoveServiceResponse, Error>>;
|
|
24
22
|
repartitionNetwork(repartitionArgs: RepartitionArgs): Promise<Result<null, Error>>;
|
|
@@ -139,42 +139,6 @@ class GrpcNodeApiContainerClient {
|
|
|
139
139
|
return (0, neverthrow_1.ok)(resultExecuteKurtosisModule.value);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
executeStartosisRemoteModule(startosisRemoteModuleArgs) {
|
|
143
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
const promiseExecuteStartosisRemoteModule = new Promise((resolve, _unusedReject) => {
|
|
145
|
-
this.client.executeStartosisModule(startosisRemoteModuleArgs, (error, response) => {
|
|
146
|
-
if (error === null) {
|
|
147
|
-
if (!response) {
|
|
148
|
-
resolve((0, neverthrow_1.err)(new Error("No error was encountered but the response was still falsy; this should never happen")));
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
resolve((0, neverthrow_1.ok)(response));
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
resolve((0, neverthrow_1.err)(error));
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
const resultExecuteStartosisRemoteModule = yield promiseExecuteStartosisRemoteModule;
|
|
160
|
-
if (resultExecuteStartosisRemoteModule.isErr()) {
|
|
161
|
-
return (0, neverthrow_1.err)(resultExecuteStartosisRemoteModule.error);
|
|
162
|
-
}
|
|
163
|
-
return (0, neverthrow_1.ok)(resultExecuteStartosisRemoteModule.value);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
executeKurtosisRemoteModule(startosisRemoteModuleArgs) {
|
|
167
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
const promiseExecuteKurtosisRemoteModule = new Promise((resolve, _unusedReject) => {
|
|
169
|
-
resolve((0, neverthrow_1.ok)(this.client.executeKurtosisModule(startosisRemoteModuleArgs)));
|
|
170
|
-
});
|
|
171
|
-
const resultExecuteKurtosisRemoteModule = yield promiseExecuteKurtosisRemoteModule;
|
|
172
|
-
if (resultExecuteKurtosisRemoteModule.isErr()) {
|
|
173
|
-
return (0, neverthrow_1.err)(resultExecuteKurtosisRemoteModule.error);
|
|
174
|
-
}
|
|
175
|
-
return (0, neverthrow_1.ok)(resultExecuteKurtosisRemoteModule.value);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
142
|
startServices(startServicesArgs) {
|
|
179
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
180
144
|
const promiseStartServices = new Promise((resolve, _unusedReject) => {
|
|
@@ -16,8 +16,6 @@ export declare class GrpcWebApiContainerClient implements GenericApiContainerCli
|
|
|
16
16
|
executeKurtosisScript(serializedStartosisScript: ExecuteStartosisScriptArgs): Promise<Result<Readable, Error>>;
|
|
17
17
|
executeStartosisModule(startosisModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<ExecuteStartosisResponse, Error>>;
|
|
18
18
|
executeKurtosisModule(startosisModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<Readable, Error>>;
|
|
19
|
-
executeStartosisRemoteModule(startosisRemoteModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<ExecuteStartosisResponse, Error>>;
|
|
20
|
-
executeKurtosisRemoteModule(startosisRemoteModuleArgs: ExecuteStartosisModuleArgs): Promise<Result<Readable, Error>>;
|
|
21
19
|
startServices(startServicesArgs: StartServicesArgs): Promise<Result<StartServicesResponse, Error>>;
|
|
22
20
|
removeService(args: RemoveServiceArgs): Promise<Result<RemoveServiceResponse, Error>>;
|
|
23
21
|
repartitionNetwork(repartitionArgs: RepartitionArgs): Promise<Result<null, Error>>;
|
|
@@ -142,43 +142,6 @@ class GrpcWebApiContainerClient {
|
|
|
142
142
|
return (0, neverthrow_1.ok)(kurtosisExecutionResponseLinesReadable);
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
executeStartosisRemoteModule(startosisRemoteModuleArgs) {
|
|
146
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
const promiseExecuteStartosisRemoteModule = new Promise((resolve, _unusedReject) => {
|
|
148
|
-
this.client.executeStartosisModule(startosisRemoteModuleArgs, {}, (error, response) => {
|
|
149
|
-
if (error === null) {
|
|
150
|
-
if (!response) {
|
|
151
|
-
resolve((0, neverthrow_1.err)(new Error("No error was encountered but the response was still falsy; this should never happen")));
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
resolve((0, neverthrow_1.ok)(response));
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
resolve((0, neverthrow_1.err)(error));
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
const resultExecuteStartosisRemoteModule = yield promiseExecuteStartosisRemoteModule;
|
|
163
|
-
if (resultExecuteStartosisRemoteModule.isErr()) {
|
|
164
|
-
return (0, neverthrow_1.err)(resultExecuteStartosisRemoteModule.error);
|
|
165
|
-
}
|
|
166
|
-
return (0, neverthrow_1.ok)(resultExecuteStartosisRemoteModule.value);
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
executeKurtosisRemoteModule(startosisRemoteModuleArgs) {
|
|
170
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
const promiseExecuteKurtosisRemoteModule = new Promise((resolve, _unusedReject) => {
|
|
172
|
-
resolve((0, neverthrow_1.ok)(this.client.executeKurtosisModule(startosisRemoteModuleArgs, {})));
|
|
173
|
-
});
|
|
174
|
-
const resultExecuteKurtosisRemoteModule = yield promiseExecuteKurtosisRemoteModule;
|
|
175
|
-
if (resultExecuteKurtosisRemoteModule.isErr()) {
|
|
176
|
-
return (0, neverthrow_1.err)(resultExecuteKurtosisRemoteModule.error);
|
|
177
|
-
}
|
|
178
|
-
const kurtosisExecutionResponseLinesReadable = this.forwardKurtosisExecutionLinesStreamToReadable(resultExecuteKurtosisRemoteModule.value);
|
|
179
|
-
return (0, neverthrow_1.ok)(kurtosisExecutionResponseLinesReadable);
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
145
|
startServices(startServicesArgs) {
|
|
183
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
147
|
const promiseStartServices = new Promise((resolve, _unusedReject) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result } from "neverthrow";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class KurtosisYaml {
|
|
3
3
|
readonly module: Module;
|
|
4
4
|
constructor(module: Module);
|
|
5
5
|
}
|
|
@@ -7,5 +7,5 @@ declare class Module {
|
|
|
7
7
|
readonly name: string;
|
|
8
8
|
constructor(name: string);
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function parseKurtosisYaml(kurtosisYamlFilepath: string): Promise<Result<KurtosisYaml, Error>>;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.parseKurtosisYaml = exports.KurtosisYaml = void 0;
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const neverthrow_1 = require("neverthrow");
|
|
15
|
+
const yaml = require("js-yaml");
|
|
16
|
+
const enclave_context_1 = require("./enclave_context");
|
|
17
|
+
const DEPENDENCIES_URL = "https://docs.kurtosis.com/reference/starlark-reference/#dependencies";
|
|
18
|
+
class KurtosisYaml {
|
|
19
|
+
constructor(module) {
|
|
20
|
+
this.module = module;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.KurtosisYaml = KurtosisYaml;
|
|
24
|
+
class Module {
|
|
25
|
+
constructor(name) {
|
|
26
|
+
this.name = name;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const UTF8_ENCODING = "utf-8";
|
|
30
|
+
function parseKurtosisYaml(kurtosisYamlFilepath) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
// check if the yml file actually exists
|
|
33
|
+
if (!fs.existsSync(kurtosisYamlFilepath)) {
|
|
34
|
+
return (0, neverthrow_1.err)(new Error(`Couldn't find a '${enclave_context_1.KURTOSIS_YAML_FILENAME}' in the root of the package at '${kurtosisYamlFilepath}'. Packages are expected to have a '${enclave_context_1.KURTOSIS_YAML_FILENAME}' at root; have a look at '${DEPENDENCIES_URL}' for more`));
|
|
35
|
+
}
|
|
36
|
+
let kurtosisYamlFile;
|
|
37
|
+
try {
|
|
38
|
+
kurtosisYamlFile = fs.readFileSync(kurtosisYamlFilepath, UTF8_ENCODING);
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
return (0, neverthrow_1.err)(new Error(`An error occurred while reading the '${enclave_context_1.KURTOSIS_YAML_FILENAME}' file at '${kurtosisYamlFilepath}'`));
|
|
42
|
+
}
|
|
43
|
+
let parsedYAML;
|
|
44
|
+
try {
|
|
45
|
+
parsedYAML = yaml.load(kurtosisYamlFile);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
return (0, neverthrow_1.err)(new Error(`"An error occurred while parsing the '${enclave_context_1.KURTOSIS_YAML_FILENAME}' file at '${kurtosisYamlFilepath}'`));
|
|
49
|
+
}
|
|
50
|
+
if (parsedYAML.module === null || parsedYAML.module.name === null || parsedYAML.module.name === "") {
|
|
51
|
+
return (0, neverthrow_1.err)(new Error(`Field module.name in '${enclave_context_1.KURTOSIS_YAML_FILENAME}' needs to be set and cannot be empty`));
|
|
52
|
+
}
|
|
53
|
+
return (0, neverthrow_1.ok)(parsedYAML);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.parseKurtosisYaml = parseKurtosisYaml;
|
|
@@ -4,5 +4,5 @@ exports.KURTOSIS_VERSION = void 0;
|
|
|
4
4
|
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
|
|
5
5
|
// This is necessary so that Kurt Core consumers (e.g. modules) will know if they're compatible with the currently-running
|
|
6
6
|
// API container
|
|
7
|
-
exports.KURTOSIS_VERSION = "0.
|
|
7
|
+
exports.KURTOSIS_VERSION = "0.55.0";
|
|
8
8
|
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kurtosis-sdk",
|
|
3
3
|
"//": "NOTE: DO NOT UPDATE THIS VERSION MANUALLY - IT WILL BE UPDATED DURING THE RELEASE PROCESS!",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.55.0",
|
|
5
5
|
"main": "./build/index",
|
|
6
6
|
"description": "This repo contains a Typescript client for communicating with the Kurtosis Engine server, which is responsible for creating, managing and destroying Kurtosis Enclaves.",
|
|
7
7
|
"types": "./build/index",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.parseKurtosisMod = exports.KurtosisMod = void 0;
|
|
13
|
-
const fs = require("fs");
|
|
14
|
-
const neverthrow_1 = require("neverthrow");
|
|
15
|
-
const yaml = require("js-yaml");
|
|
16
|
-
class KurtosisMod {
|
|
17
|
-
constructor(module) {
|
|
18
|
-
this.module = module;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.KurtosisMod = KurtosisMod;
|
|
22
|
-
class Module {
|
|
23
|
-
constructor(name) {
|
|
24
|
-
this.name = name;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const UTF8_ENCODING = "utf-8";
|
|
28
|
-
function parseKurtosisMod(kurtosisModFilepath) {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
// check if the mod file actually exists
|
|
31
|
-
if (!fs.existsSync(kurtosisModFilepath)) {
|
|
32
|
-
return (0, neverthrow_1.err)(new Error(`The file '${kurtosisModFilepath}' does not exist.`));
|
|
33
|
-
}
|
|
34
|
-
const kurtosisModFile = fs.readFileSync(kurtosisModFilepath, UTF8_ENCODING);
|
|
35
|
-
const parsedYAML = yaml.load(kurtosisModFile);
|
|
36
|
-
if (parsedYAML.module === null || parsedYAML.module.name === null || parsedYAML.module.name === "") {
|
|
37
|
-
return (0, neverthrow_1.err)(new Error(`Field module.name in kurtosis.mod needs to be set and cannot be empty`));
|
|
38
|
-
}
|
|
39
|
-
return (0, neverthrow_1.ok)(parsedYAML);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
exports.parseKurtosisMod = parseKurtosisMod;
|