kurtosis-sdk 0.80.4 → 0.80.5

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.
@@ -18,8 +18,7 @@ interface IApiContainerServiceService extends grpc.ServiceDefinition<grpc.Untype
18
18
  waitForHttpPostEndpointAvailability: grpc.MethodDefinition<api_container_service_pb.WaitForHttpPostEndpointAvailabilityArgs, google_protobuf_empty_pb.Empty>;
19
19
  uploadFilesArtifact: grpc.MethodDefinition<api_container_service_pb.UploadFilesArtifactArgs, api_container_service_pb.UploadFilesArtifactResponse>;
20
20
  uploadFilesArtifactV2: grpc.MethodDefinition<api_container_service_pb.StreamedDataChunk, api_container_service_pb.UploadFilesArtifactResponse>;
21
- downloadFilesArtifact: grpc.MethodDefinition<api_container_service_pb.DownloadFilesArtifactArgs, api_container_service_pb.DownloadFilesArtifactResponse>;
22
- downloadFilesArtifactV2: grpc.MethodDefinition<api_container_service_pb.DownloadFilesArtifactArgs, api_container_service_pb.StreamedDataChunk>;
21
+ downloadFilesArtifact: grpc.MethodDefinition<api_container_service_pb.DownloadFilesArtifactArgs, api_container_service_pb.StreamedDataChunk>;
23
22
  storeWebFilesArtifact: grpc.MethodDefinition<api_container_service_pb.StoreWebFilesArtifactArgs, api_container_service_pb.StoreWebFilesArtifactResponse>;
24
23
  storeFilesArtifactFromService: grpc.MethodDefinition<api_container_service_pb.StoreFilesArtifactFromServiceArgs, api_container_service_pb.StoreFilesArtifactFromServiceResponse>;
25
24
  listFilesArtifactNamesAndUuids: grpc.MethodDefinition<google_protobuf_empty_pb.Empty, api_container_service_pb.ListFilesArtifactNamesAndUuidsResponse>;
@@ -38,8 +37,7 @@ export interface IApiContainerServiceServer extends grpc.UntypedServiceImplement
38
37
  waitForHttpPostEndpointAvailability: grpc.handleUnaryCall<api_container_service_pb.WaitForHttpPostEndpointAvailabilityArgs, google_protobuf_empty_pb.Empty>;
39
38
  uploadFilesArtifact: grpc.handleUnaryCall<api_container_service_pb.UploadFilesArtifactArgs, api_container_service_pb.UploadFilesArtifactResponse>;
40
39
  uploadFilesArtifactV2: grpc.handleClientStreamingCall<api_container_service_pb.StreamedDataChunk, api_container_service_pb.UploadFilesArtifactResponse>;
41
- downloadFilesArtifact: grpc.handleUnaryCall<api_container_service_pb.DownloadFilesArtifactArgs, api_container_service_pb.DownloadFilesArtifactResponse>;
42
- downloadFilesArtifactV2: grpc.handleServerStreamingCall<api_container_service_pb.DownloadFilesArtifactArgs, api_container_service_pb.StreamedDataChunk>;
40
+ downloadFilesArtifact: grpc.handleServerStreamingCall<api_container_service_pb.DownloadFilesArtifactArgs, api_container_service_pb.StreamedDataChunk>;
43
41
  storeWebFilesArtifact: grpc.handleUnaryCall<api_container_service_pb.StoreWebFilesArtifactArgs, api_container_service_pb.StoreWebFilesArtifactResponse>;
44
42
  storeFilesArtifactFromService: grpc.handleUnaryCall<api_container_service_pb.StoreFilesArtifactFromServiceArgs, api_container_service_pb.StoreFilesArtifactFromServiceResponse>;
45
43
  listFilesArtifactNamesAndUuids: grpc.handleUnaryCall<google_protobuf_empty_pb.Empty, api_container_service_pb.ListFilesArtifactNamesAndUuidsResponse>;
@@ -75,11 +73,8 @@ export class ApiContainerServiceClient extends grpc.Client {
75
73
  uploadFilesArtifactV2(callback: grpc.requestCallback<api_container_service_pb.UploadFilesArtifactResponse>): grpc.ClientWritableStream<api_container_service_pb.StreamedDataChunk>;
76
74
  uploadFilesArtifactV2(metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_container_service_pb.UploadFilesArtifactResponse>): grpc.ClientWritableStream<api_container_service_pb.StreamedDataChunk>;
77
75
  uploadFilesArtifactV2(metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_container_service_pb.UploadFilesArtifactResponse>): grpc.ClientWritableStream<api_container_service_pb.StreamedDataChunk>;
78
- downloadFilesArtifact(argument: api_container_service_pb.DownloadFilesArtifactArgs, callback: grpc.requestCallback<api_container_service_pb.DownloadFilesArtifactResponse>): grpc.ClientUnaryCall;
79
- downloadFilesArtifact(argument: api_container_service_pb.DownloadFilesArtifactArgs, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_container_service_pb.DownloadFilesArtifactResponse>): grpc.ClientUnaryCall;
80
- downloadFilesArtifact(argument: api_container_service_pb.DownloadFilesArtifactArgs, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_container_service_pb.DownloadFilesArtifactResponse>): grpc.ClientUnaryCall;
81
- downloadFilesArtifactV2(argument: api_container_service_pb.DownloadFilesArtifactArgs, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream<api_container_service_pb.StreamedDataChunk>;
82
- downloadFilesArtifactV2(argument: api_container_service_pb.DownloadFilesArtifactArgs, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream<api_container_service_pb.StreamedDataChunk>;
76
+ downloadFilesArtifact(argument: api_container_service_pb.DownloadFilesArtifactArgs, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream<api_container_service_pb.StreamedDataChunk>;
77
+ downloadFilesArtifact(argument: api_container_service_pb.DownloadFilesArtifactArgs, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream<api_container_service_pb.StreamedDataChunk>;
83
78
  storeWebFilesArtifact(argument: api_container_service_pb.StoreWebFilesArtifactArgs, callback: grpc.requestCallback<api_container_service_pb.StoreWebFilesArtifactResponse>): grpc.ClientUnaryCall;
84
79
  storeWebFilesArtifact(argument: api_container_service_pb.StoreWebFilesArtifactArgs, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_container_service_pb.StoreWebFilesArtifactResponse>): grpc.ClientUnaryCall;
85
80
  storeWebFilesArtifact(argument: api_container_service_pb.StoreWebFilesArtifactArgs, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_container_service_pb.StoreWebFilesArtifactResponse>): grpc.ClientUnaryCall;
@@ -16,17 +16,6 @@ function deserialize_api_container_api_DownloadFilesArtifactArgs(buffer_arg) {
16
16
  return api_container_service_pb.DownloadFilesArtifactArgs.deserializeBinary(new Uint8Array(buffer_arg));
17
17
  }
18
18
 
19
- function serialize_api_container_api_DownloadFilesArtifactResponse(arg) {
20
- if (!(arg instanceof api_container_service_pb.DownloadFilesArtifactResponse)) {
21
- throw new Error('Expected argument of type api_container_api.DownloadFilesArtifactResponse');
22
- }
23
- return Buffer.from(arg.serializeBinary());
24
- }
25
-
26
- function deserialize_api_container_api_DownloadFilesArtifactResponse(buffer_arg) {
27
- return api_container_service_pb.DownloadFilesArtifactResponse.deserializeBinary(new Uint8Array(buffer_arg));
28
- }
29
-
30
19
  function serialize_api_container_api_ExecCommandArgs(arg) {
31
20
  if (!(arg instanceof api_container_service_pb.ExecCommandArgs)) {
32
21
  throw new Error('Expected argument of type api_container_api.ExecCommandArgs');
@@ -362,22 +351,9 @@ uploadFilesArtifactV2: {
362
351
  responseDeserialize: deserialize_api_container_api_UploadFilesArtifactResponse,
363
352
  },
364
353
  // Downloads a files artifact from the Kurtosis File System
365
- // Deprecated: Use DownloadFilesArtifactV2 to stream the data and not be limited by GRPC 4MB limit
366
354
  downloadFilesArtifact: {
367
355
  path: '/api_container_api.ApiContainerService/DownloadFilesArtifact',
368
356
  requestStream: false,
369
- responseStream: false,
370
- requestType: api_container_service_pb.DownloadFilesArtifactArgs,
371
- responseType: api_container_service_pb.DownloadFilesArtifactResponse,
372
- requestSerialize: serialize_api_container_api_DownloadFilesArtifactArgs,
373
- requestDeserialize: deserialize_api_container_api_DownloadFilesArtifactArgs,
374
- responseSerialize: serialize_api_container_api_DownloadFilesArtifactResponse,
375
- responseDeserialize: deserialize_api_container_api_DownloadFilesArtifactResponse,
376
- },
377
- // Downloads a files artifact from the Kurtosis File System
378
- downloadFilesArtifactV2: {
379
- path: '/api_container_api.ApiContainerService/DownloadFilesArtifactV2',
380
- requestStream: false,
381
357
  responseStream: true,
382
358
  requestType: api_container_service_pb.DownloadFilesArtifactArgs,
383
359
  responseType: api_container_service_pb.StreamedDataChunk,
@@ -62,13 +62,6 @@ export class ApiContainerServiceClient {
62
62
  ): grpcWeb.ClientReadableStream<api_container_service_pb.UploadFilesArtifactResponse>;
63
63
 
64
64
  downloadFilesArtifact(
65
- request: api_container_service_pb.DownloadFilesArtifactArgs,
66
- metadata: grpcWeb.Metadata | undefined,
67
- callback: (err: grpcWeb.RpcError,
68
- response: api_container_service_pb.DownloadFilesArtifactResponse) => void
69
- ): grpcWeb.ClientReadableStream<api_container_service_pb.DownloadFilesArtifactResponse>;
70
-
71
- downloadFilesArtifactV2(
72
65
  request: api_container_service_pb.DownloadFilesArtifactArgs,
73
66
  metadata?: grpcWeb.Metadata
74
67
  ): grpcWeb.ClientReadableStream<api_container_service_pb.StreamedDataChunk>;
@@ -144,11 +137,6 @@ export class ApiContainerServicePromiseClient {
144
137
  downloadFilesArtifact(
145
138
  request: api_container_service_pb.DownloadFilesArtifactArgs,
146
139
  metadata?: grpcWeb.Metadata
147
- ): Promise<api_container_service_pb.DownloadFilesArtifactResponse>;
148
-
149
- downloadFilesArtifactV2(
150
- request: api_container_service_pb.DownloadFilesArtifactArgs,
151
- metadata?: grpcWeb.Metadata
152
140
  ): grpcWeb.ClientReadableStream<api_container_service_pb.StreamedDataChunk>;
153
141
 
154
142
  storeWebFilesArtifact(
@@ -558,71 +558,10 @@ proto.api_container_api.ApiContainerServicePromiseClient.prototype.uploadFilesAr
558
558
  * @const
559
559
  * @type {!grpc.web.MethodDescriptor<
560
560
  * !proto.api_container_api.DownloadFilesArtifactArgs,
561
- * !proto.api_container_api.DownloadFilesArtifactResponse>}
561
+ * !proto.api_container_api.StreamedDataChunk>}
562
562
  */
563
563
  const methodDescriptor_ApiContainerService_DownloadFilesArtifact = new grpc.web.MethodDescriptor(
564
564
  '/api_container_api.ApiContainerService/DownloadFilesArtifact',
565
- grpc.web.MethodType.UNARY,
566
- proto.api_container_api.DownloadFilesArtifactArgs,
567
- proto.api_container_api.DownloadFilesArtifactResponse,
568
- /**
569
- * @param {!proto.api_container_api.DownloadFilesArtifactArgs} request
570
- * @return {!Uint8Array}
571
- */
572
- function(request) {
573
- return request.serializeBinary();
574
- },
575
- proto.api_container_api.DownloadFilesArtifactResponse.deserializeBinary
576
- );
577
-
578
-
579
- /**
580
- * @param {!proto.api_container_api.DownloadFilesArtifactArgs} request The
581
- * request proto
582
- * @param {?Object<string, string>} metadata User defined
583
- * call metadata
584
- * @param {function(?grpc.web.RpcError, ?proto.api_container_api.DownloadFilesArtifactResponse)}
585
- * callback The callback function(error, response)
586
- * @return {!grpc.web.ClientReadableStream<!proto.api_container_api.DownloadFilesArtifactResponse>|undefined}
587
- * The XHR Node Readable Stream
588
- */
589
- proto.api_container_api.ApiContainerServiceClient.prototype.downloadFilesArtifact =
590
- function(request, metadata, callback) {
591
- return this.client_.rpcCall(this.hostname_ +
592
- '/api_container_api.ApiContainerService/DownloadFilesArtifact',
593
- request,
594
- metadata || {},
595
- methodDescriptor_ApiContainerService_DownloadFilesArtifact,
596
- callback);
597
- };
598
-
599
-
600
- /**
601
- * @param {!proto.api_container_api.DownloadFilesArtifactArgs} request The
602
- * request proto
603
- * @param {?Object<string, string>=} metadata User defined
604
- * call metadata
605
- * @return {!Promise<!proto.api_container_api.DownloadFilesArtifactResponse>}
606
- * Promise that resolves to the response
607
- */
608
- proto.api_container_api.ApiContainerServicePromiseClient.prototype.downloadFilesArtifact =
609
- function(request, metadata) {
610
- return this.client_.unaryCall(this.hostname_ +
611
- '/api_container_api.ApiContainerService/DownloadFilesArtifact',
612
- request,
613
- metadata || {},
614
- methodDescriptor_ApiContainerService_DownloadFilesArtifact);
615
- };
616
-
617
-
618
- /**
619
- * @const
620
- * @type {!grpc.web.MethodDescriptor<
621
- * !proto.api_container_api.DownloadFilesArtifactArgs,
622
- * !proto.api_container_api.StreamedDataChunk>}
623
- */
624
- const methodDescriptor_ApiContainerService_DownloadFilesArtifactV2 = new grpc.web.MethodDescriptor(
625
- '/api_container_api.ApiContainerService/DownloadFilesArtifactV2',
626
565
  grpc.web.MethodType.SERVER_STREAMING,
627
566
  proto.api_container_api.DownloadFilesArtifactArgs,
628
567
  proto.api_container_api.StreamedDataChunk,
@@ -644,13 +583,13 @@ const methodDescriptor_ApiContainerService_DownloadFilesArtifactV2 = new grpc.we
644
583
  * @return {!grpc.web.ClientReadableStream<!proto.api_container_api.StreamedDataChunk>}
645
584
  * The XHR Node Readable Stream
646
585
  */
647
- proto.api_container_api.ApiContainerServiceClient.prototype.downloadFilesArtifactV2 =
586
+ proto.api_container_api.ApiContainerServiceClient.prototype.downloadFilesArtifact =
648
587
  function(request, metadata) {
649
588
  return this.client_.serverStreaming(this.hostname_ +
650
- '/api_container_api.ApiContainerService/DownloadFilesArtifactV2',
589
+ '/api_container_api.ApiContainerService/DownloadFilesArtifact',
651
590
  request,
652
591
  metadata || {},
653
- methodDescriptor_ApiContainerService_DownloadFilesArtifactV2);
592
+ methodDescriptor_ApiContainerService_DownloadFilesArtifact);
654
593
  };
655
594
 
656
595
 
@@ -661,13 +600,13 @@ proto.api_container_api.ApiContainerServiceClient.prototype.downloadFilesArtifac
661
600
  * @return {!grpc.web.ClientReadableStream<!proto.api_container_api.StreamedDataChunk>}
662
601
  * The XHR Node Readable Stream
663
602
  */
664
- proto.api_container_api.ApiContainerServicePromiseClient.prototype.downloadFilesArtifactV2 =
603
+ proto.api_container_api.ApiContainerServicePromiseClient.prototype.downloadFilesArtifact =
665
604
  function(request, metadata) {
666
605
  return this.client_.serverStreaming(this.hostname_ +
667
- '/api_container_api.ApiContainerService/DownloadFilesArtifactV2',
606
+ '/api_container_api.ApiContainerService/DownloadFilesArtifact',
668
607
  request,
669
608
  metadata || {},
670
- methodDescriptor_ApiContainerService_DownloadFilesArtifactV2);
609
+ methodDescriptor_ApiContainerService_DownloadFilesArtifact);
671
610
  };
672
611
 
673
612
 
@@ -562,8 +562,8 @@ export namespace StarlarkRunProgress {
562
562
  }
563
563
 
564
564
  export class StarlarkRunFinishedEvent extends jspb.Message {
565
- getIsrunsuccessful(): boolean;
566
- setIsrunsuccessful(value: boolean): StarlarkRunFinishedEvent;
565
+ getIsRunSuccessful(): boolean;
566
+ setIsRunSuccessful(value: boolean): StarlarkRunFinishedEvent;
567
567
 
568
568
  getSerializedOutput(): string;
569
569
  setSerializedOutput(value: string): StarlarkRunFinishedEvent;
@@ -580,7 +580,7 @@ export class StarlarkRunFinishedEvent extends jspb.Message {
580
580
 
581
581
  export namespace StarlarkRunFinishedEvent {
582
582
  export type AsObject = {
583
- isrunsuccessful: boolean,
583
+ isRunSuccessful: boolean,
584
584
  serializedOutput?: string,
585
585
  }
586
586
 
@@ -918,26 +918,6 @@ export namespace DownloadFilesArtifactArgs {
918
918
  }
919
919
  }
920
920
 
921
- export class DownloadFilesArtifactResponse extends jspb.Message {
922
- getData(): Uint8Array | string;
923
- getData_asU8(): Uint8Array;
924
- getData_asB64(): string;
925
- setData(value: Uint8Array | string): DownloadFilesArtifactResponse;
926
-
927
- serializeBinary(): Uint8Array;
928
- toObject(includeInstance?: boolean): DownloadFilesArtifactResponse.AsObject;
929
- static toObject(includeInstance: boolean, msg: DownloadFilesArtifactResponse): DownloadFilesArtifactResponse.AsObject;
930
- static serializeBinaryToWriter(message: DownloadFilesArtifactResponse, writer: jspb.BinaryWriter): void;
931
- static deserializeBinary(bytes: Uint8Array): DownloadFilesArtifactResponse;
932
- static deserializeBinaryFromReader(message: DownloadFilesArtifactResponse, reader: jspb.BinaryReader): DownloadFilesArtifactResponse;
933
- }
934
-
935
- export namespace DownloadFilesArtifactResponse {
936
- export type AsObject = {
937
- data: Uint8Array | string,
938
- }
939
- }
940
-
941
921
  export class StoreWebFilesArtifactArgs extends jspb.Message {
942
922
  getUrl(): string;
943
923
  setUrl(value: string): StoreWebFilesArtifactArgs;
@@ -25,7 +25,6 @@ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb
25
25
  goog.object.extend(proto, google_protobuf_empty_pb);
26
26
  goog.exportSymbol('proto.api_container_api.DataChunkMetadata', null, global);
27
27
  goog.exportSymbol('proto.api_container_api.DownloadFilesArtifactArgs', null, global);
28
- goog.exportSymbol('proto.api_container_api.DownloadFilesArtifactResponse', null, global);
29
28
  goog.exportSymbol('proto.api_container_api.ExecCommandArgs', null, global);
30
29
  goog.exportSymbol('proto.api_container_api.ExecCommandResponse', null, global);
31
30
  goog.exportSymbol('proto.api_container_api.FilesArtifactNameAndUuid', null, global);
@@ -695,27 +694,6 @@ if (goog.DEBUG && !COMPILED) {
695
694
  */
696
695
  proto.api_container_api.DownloadFilesArtifactArgs.displayName = 'proto.api_container_api.DownloadFilesArtifactArgs';
697
696
  }
698
- /**
699
- * Generated by JsPbCodeGenerator.
700
- * @param {Array=} opt_data Optional initial data array, typically from a
701
- * server response, or constructed directly in Javascript. The array is used
702
- * in place and becomes part of the constructed object. It is not cloned.
703
- * If no data is provided, the constructed object will be empty, but still
704
- * valid.
705
- * @extends {jspb.Message}
706
- * @constructor
707
- */
708
- proto.api_container_api.DownloadFilesArtifactResponse = function(opt_data) {
709
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
710
- };
711
- goog.inherits(proto.api_container_api.DownloadFilesArtifactResponse, jspb.Message);
712
- if (goog.DEBUG && !COMPILED) {
713
- /**
714
- * @public
715
- * @override
716
- */
717
- proto.api_container_api.DownloadFilesArtifactResponse.displayName = 'proto.api_container_api.DownloadFilesArtifactResponse';
718
- }
719
697
  /**
720
698
  * Generated by JsPbCodeGenerator.
721
699
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -4730,7 +4708,7 @@ proto.api_container_api.StarlarkRunFinishedEvent.prototype.toObject = function(o
4730
4708
  */
4731
4709
  proto.api_container_api.StarlarkRunFinishedEvent.toObject = function(includeInstance, msg) {
4732
4710
  var f, obj = {
4733
- isrunsuccessful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
4711
+ isRunSuccessful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
4734
4712
  serializedOutput: jspb.Message.getFieldWithDefault(msg, 2, "")
4735
4713
  };
4736
4714
 
@@ -4770,7 +4748,7 @@ proto.api_container_api.StarlarkRunFinishedEvent.deserializeBinaryFromReader = f
4770
4748
  switch (field) {
4771
4749
  case 1:
4772
4750
  var value = /** @type {boolean} */ (reader.readBool());
4773
- msg.setIsrunsuccessful(value);
4751
+ msg.setIsRunSuccessful(value);
4774
4752
  break;
4775
4753
  case 2:
4776
4754
  var value = /** @type {string} */ (reader.readString());
@@ -4805,7 +4783,7 @@ proto.api_container_api.StarlarkRunFinishedEvent.prototype.serializeBinary = fun
4805
4783
  */
4806
4784
  proto.api_container_api.StarlarkRunFinishedEvent.serializeBinaryToWriter = function(message, writer) {
4807
4785
  var f = undefined;
4808
- f = message.getIsrunsuccessful();
4786
+ f = message.getIsRunSuccessful();
4809
4787
  if (f) {
4810
4788
  writer.writeBool(
4811
4789
  1,
@@ -4823,10 +4801,10 @@ proto.api_container_api.StarlarkRunFinishedEvent.serializeBinaryToWriter = funct
4823
4801
 
4824
4802
 
4825
4803
  /**
4826
- * optional bool isRunSuccessful = 1;
4804
+ * optional bool is_run_successful = 1;
4827
4805
  * @return {boolean}
4828
4806
  */
4829
- proto.api_container_api.StarlarkRunFinishedEvent.prototype.getIsrunsuccessful = function() {
4807
+ proto.api_container_api.StarlarkRunFinishedEvent.prototype.getIsRunSuccessful = function() {
4830
4808
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
4831
4809
  };
4832
4810
 
@@ -4835,7 +4813,7 @@ proto.api_container_api.StarlarkRunFinishedEvent.prototype.getIsrunsuccessful =
4835
4813
  * @param {boolean} value
4836
4814
  * @return {!proto.api_container_api.StarlarkRunFinishedEvent} returns this
4837
4815
  */
4838
- proto.api_container_api.StarlarkRunFinishedEvent.prototype.setIsrunsuccessful = function(value) {
4816
+ proto.api_container_api.StarlarkRunFinishedEvent.prototype.setIsRunSuccessful = function(value) {
4839
4817
  return jspb.Message.setProto3BooleanField(this, 1, value);
4840
4818
  };
4841
4819
 
@@ -7330,160 +7308,6 @@ proto.api_container_api.DownloadFilesArtifactArgs.prototype.setIdentifier = func
7330
7308
 
7331
7309
 
7332
7310
 
7333
- if (jspb.Message.GENERATE_TO_OBJECT) {
7334
- /**
7335
- * Creates an object representation of this proto.
7336
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
7337
- * Optional fields that are not set will be set to undefined.
7338
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7339
- * For the list of reserved names please see:
7340
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7341
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7342
- * JSPB instance for transitional soy proto support:
7343
- * http://goto/soy-param-migration
7344
- * @return {!Object}
7345
- */
7346
- proto.api_container_api.DownloadFilesArtifactResponse.prototype.toObject = function(opt_includeInstance) {
7347
- return proto.api_container_api.DownloadFilesArtifactResponse.toObject(opt_includeInstance, this);
7348
- };
7349
-
7350
-
7351
- /**
7352
- * Static version of the {@see toObject} method.
7353
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7354
- * the JSPB instance for transitional soy proto support:
7355
- * http://goto/soy-param-migration
7356
- * @param {!proto.api_container_api.DownloadFilesArtifactResponse} msg The msg instance to transform.
7357
- * @return {!Object}
7358
- * @suppress {unusedLocalVariables} f is only used for nested messages
7359
- */
7360
- proto.api_container_api.DownloadFilesArtifactResponse.toObject = function(includeInstance, msg) {
7361
- var f, obj = {
7362
- data: msg.getData_asB64()
7363
- };
7364
-
7365
- if (includeInstance) {
7366
- obj.$jspbMessageInstance = msg;
7367
- }
7368
- return obj;
7369
- };
7370
- }
7371
-
7372
-
7373
- /**
7374
- * Deserializes binary data (in protobuf wire format).
7375
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
7376
- * @return {!proto.api_container_api.DownloadFilesArtifactResponse}
7377
- */
7378
- proto.api_container_api.DownloadFilesArtifactResponse.deserializeBinary = function(bytes) {
7379
- var reader = new jspb.BinaryReader(bytes);
7380
- var msg = new proto.api_container_api.DownloadFilesArtifactResponse;
7381
- return proto.api_container_api.DownloadFilesArtifactResponse.deserializeBinaryFromReader(msg, reader);
7382
- };
7383
-
7384
-
7385
- /**
7386
- * Deserializes binary data (in protobuf wire format) from the
7387
- * given reader into the given message object.
7388
- * @param {!proto.api_container_api.DownloadFilesArtifactResponse} msg The message object to deserialize into.
7389
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7390
- * @return {!proto.api_container_api.DownloadFilesArtifactResponse}
7391
- */
7392
- proto.api_container_api.DownloadFilesArtifactResponse.deserializeBinaryFromReader = function(msg, reader) {
7393
- while (reader.nextField()) {
7394
- if (reader.isEndGroup()) {
7395
- break;
7396
- }
7397
- var field = reader.getFieldNumber();
7398
- switch (field) {
7399
- case 1:
7400
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
7401
- msg.setData(value);
7402
- break;
7403
- default:
7404
- reader.skipField();
7405
- break;
7406
- }
7407
- }
7408
- return msg;
7409
- };
7410
-
7411
-
7412
- /**
7413
- * Serializes the message to binary data (in protobuf wire format).
7414
- * @return {!Uint8Array}
7415
- */
7416
- proto.api_container_api.DownloadFilesArtifactResponse.prototype.serializeBinary = function() {
7417
- var writer = new jspb.BinaryWriter();
7418
- proto.api_container_api.DownloadFilesArtifactResponse.serializeBinaryToWriter(this, writer);
7419
- return writer.getResultBuffer();
7420
- };
7421
-
7422
-
7423
- /**
7424
- * Serializes the given message to binary data (in protobuf wire
7425
- * format), writing to the given BinaryWriter.
7426
- * @param {!proto.api_container_api.DownloadFilesArtifactResponse} message
7427
- * @param {!jspb.BinaryWriter} writer
7428
- * @suppress {unusedLocalVariables} f is only used for nested messages
7429
- */
7430
- proto.api_container_api.DownloadFilesArtifactResponse.serializeBinaryToWriter = function(message, writer) {
7431
- var f = undefined;
7432
- f = message.getData_asU8();
7433
- if (f.length > 0) {
7434
- writer.writeBytes(
7435
- 1,
7436
- f
7437
- );
7438
- }
7439
- };
7440
-
7441
-
7442
- /**
7443
- * optional bytes data = 1;
7444
- * @return {string}
7445
- */
7446
- proto.api_container_api.DownloadFilesArtifactResponse.prototype.getData = function() {
7447
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
7448
- };
7449
-
7450
-
7451
- /**
7452
- * optional bytes data = 1;
7453
- * This is a type-conversion wrapper around `getData()`
7454
- * @return {string}
7455
- */
7456
- proto.api_container_api.DownloadFilesArtifactResponse.prototype.getData_asB64 = function() {
7457
- return /** @type {string} */ (jspb.Message.bytesAsB64(
7458
- this.getData()));
7459
- };
7460
-
7461
-
7462
- /**
7463
- * optional bytes data = 1;
7464
- * Note that Uint8Array is not supported on all browsers.
7465
- * @see http://caniuse.com/Uint8Array
7466
- * This is a type-conversion wrapper around `getData()`
7467
- * @return {!Uint8Array}
7468
- */
7469
- proto.api_container_api.DownloadFilesArtifactResponse.prototype.getData_asU8 = function() {
7470
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
7471
- this.getData()));
7472
- };
7473
-
7474
-
7475
- /**
7476
- * @param {!(string|Uint8Array)} value
7477
- * @return {!proto.api_container_api.DownloadFilesArtifactResponse} returns this
7478
- */
7479
- proto.api_container_api.DownloadFilesArtifactResponse.prototype.setData = function(value) {
7480
- return jspb.Message.setProto3BytesField(this, 1, value);
7481
- };
7482
-
7483
-
7484
-
7485
-
7486
-
7487
7311
  if (jspb.Message.GENERATE_TO_OBJECT) {
7488
7312
  /**
7489
7313
  * Creates an object representation of this proto.
@@ -233,7 +233,7 @@ class EnclaveContext {
233
233
  return (0, neverthrow_1.err)(downloadFilesArtifactResponseResult.error);
234
234
  }
235
235
  const downloadFilesArtifactResponse = downloadFilesArtifactResponseResult.value;
236
- return (0, neverthrow_1.ok)(downloadFilesArtifactResponse.getData_asU8());
236
+ return (0, neverthrow_1.ok)(downloadFilesArtifactResponse);
237
237
  });
238
238
  }
239
239
  // Docs available at https://docs.kurtosis.com/sdk#getexistingandhistoricalserviceidentifiers---serviceidentifiers-serviceidentifiers
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { Result } from "neverthrow";
3
- import { DownloadFilesArtifactArgs, DownloadFilesArtifactResponse, ExecCommandArgs, ExecCommandResponse, GetExistingAndHistoricalServiceIdentifiersResponse, GetServicesArgs, GetServicesResponse, ListFilesArtifactNamesAndUuidsResponse, RunStarlarkPackageArgs, RunStarlarkScriptArgs, StoreWebFilesArtifactArgs, StoreWebFilesArtifactResponse, UploadFilesArtifactArgs, UploadFilesArtifactResponse, WaitForHttpGetEndpointAvailabilityArgs, WaitForHttpPostEndpointAvailabilityArgs } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb";
3
+ import { DownloadFilesArtifactArgs, ExecCommandArgs, ExecCommandResponse, GetExistingAndHistoricalServiceIdentifiersResponse, GetServicesArgs, GetServicesResponse, ListFilesArtifactNamesAndUuidsResponse, RunStarlarkPackageArgs, RunStarlarkScriptArgs, StoreWebFilesArtifactArgs, StoreWebFilesArtifactResponse, UploadFilesArtifactArgs, UploadFilesArtifactResponse, WaitForHttpGetEndpointAvailabilityArgs, WaitForHttpPostEndpointAvailabilityArgs } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb";
4
4
  import { EnclaveUUID } from "./enclave_context";
5
5
  import { Readable } from "stream";
6
6
  export interface GenericApiContainerClient {
@@ -14,7 +14,7 @@ export interface GenericApiContainerClient {
14
14
  execCommand(execCommandArgs: ExecCommandArgs): Promise<Result<ExecCommandResponse, Error>>;
15
15
  uploadFiles(uploadFilesArtifactArgs: UploadFilesArtifactArgs): Promise<Result<UploadFilesArtifactResponse, Error>>;
16
16
  storeWebFilesArtifact(storeWebFilesArtifactArgs: StoreWebFilesArtifactArgs): Promise<Result<StoreWebFilesArtifactResponse, Error>>;
17
- downloadFilesArtifact(downloadFilesArtifactArgs: DownloadFilesArtifactArgs): Promise<Result<DownloadFilesArtifactResponse, Error>>;
17
+ downloadFilesArtifact(downloadFilesArtifactArgs: DownloadFilesArtifactArgs): Promise<Result<Uint8Array, Error>>;
18
18
  getExistingAndHistoricalServiceIdentifiers(): Promise<Result<GetExistingAndHistoricalServiceIdentifiersResponse, Error>>;
19
19
  getAllFilesArtifactNamesAndUuids(): Promise<Result<ListFilesArtifactNamesAndUuidsResponse, Error>>;
20
20
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { Result } from "neverthrow";
3
- import { WaitForHttpGetEndpointAvailabilityArgs, WaitForHttpPostEndpointAvailabilityArgs, GetServicesResponse, ExecCommandArgs, ExecCommandResponse, UploadFilesArtifactArgs, UploadFilesArtifactResponse, StoreWebFilesArtifactArgs, StoreWebFilesArtifactResponse, GetServicesArgs, RunStarlarkScriptArgs, RunStarlarkPackageArgs, DownloadFilesArtifactResponse, DownloadFilesArtifactArgs, GetExistingAndHistoricalServiceIdentifiersResponse, ListFilesArtifactNamesAndUuidsResponse } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb";
3
+ import { WaitForHttpGetEndpointAvailabilityArgs, WaitForHttpPostEndpointAvailabilityArgs, GetServicesResponse, ExecCommandArgs, ExecCommandResponse, UploadFilesArtifactArgs, UploadFilesArtifactResponse, StoreWebFilesArtifactArgs, StoreWebFilesArtifactResponse, GetServicesArgs, RunStarlarkScriptArgs, RunStarlarkPackageArgs, DownloadFilesArtifactArgs, GetExistingAndHistoricalServiceIdentifiersResponse, ListFilesArtifactNamesAndUuidsResponse } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb";
4
4
  import type { ApiContainerServiceClient as ApiContainerServiceClientNode } from "../../kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb";
5
5
  import { GenericApiContainerClient } from "./generic_api_container_client";
6
6
  import { EnclaveUUID } from "./enclave_context";
@@ -20,7 +20,8 @@ export declare class GrpcNodeApiContainerClient implements GenericApiContainerCl
20
20
  execCommand(execCommandArgs: ExecCommandArgs): Promise<Result<ExecCommandResponse, Error>>;
21
21
  uploadFiles(uploadFilesArtifactArgs: UploadFilesArtifactArgs): Promise<Result<UploadFilesArtifactResponse, Error>>;
22
22
  storeWebFilesArtifact(storeWebFilesArtifactArgs: StoreWebFilesArtifactArgs): Promise<Result<StoreWebFilesArtifactResponse, Error>>;
23
- downloadFilesArtifact(downloadFilesArtifactArgs: DownloadFilesArtifactArgs): Promise<Result<DownloadFilesArtifactResponse, Error>>;
23
+ downloadFilesArtifact(downloadFilesArtifactArgs: DownloadFilesArtifactArgs): Promise<Result<Uint8Array, Error>>;
24
24
  getExistingAndHistoricalServiceIdentifiers(): Promise<Result<GetExistingAndHistoricalServiceIdentifiersResponse, Error>>;
25
25
  getAllFilesArtifactNamesAndUuids(): Promise<Result<ListFilesArtifactNamesAndUuidsResponse, Error>>;
26
+ private computeHexHash;
26
27
  }
@@ -12,6 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.GrpcNodeApiContainerClient = void 0;
13
13
  const neverthrow_1 = require("neverthrow");
14
14
  const google_protobuf_empty_pb = require("google-protobuf/google/protobuf/empty_pb");
15
+ const crypto = require("crypto");
16
+ const HASH_ALGORITHM = "sha1";
17
+ const HASH_ENCODING = "hex";
15
18
  class GrpcNodeApiContainerClient {
16
19
  constructor(client, enclaveUuid, enclaveName) {
17
20
  this.client = client;
@@ -189,18 +192,35 @@ class GrpcNodeApiContainerClient {
189
192
  downloadFilesArtifact(downloadFilesArtifactArgs) {
190
193
  return __awaiter(this, void 0, void 0, function* () {
191
194
  const downloadFilesArtifactPromise = new Promise((resolve, _unusedReject) => {
192
- this.client.downloadFilesArtifact(downloadFilesArtifactArgs, (error, response) => {
193
- if (error === null) {
194
- if (!response) {
195
- resolve((0, neverthrow_1.err)(new Error("No error was encountered but the response was still falsy; this should never happen")));
196
- }
197
- else {
198
- resolve((0, neverthrow_1.ok)(response));
199
- }
195
+ const filePayload = [];
196
+ const requestedArtifactName = downloadFilesArtifactArgs.getIdentifier();
197
+ let previousChunkHash = "";
198
+ const clientStream = this.client.downloadFilesArtifact(downloadFilesArtifactArgs);
199
+ clientStream.on('data', (dataChunk) => {
200
+ var _a;
201
+ const artifactNameFromChunk = (_a = dataChunk.getMetadata()) === null || _a === void 0 ? void 0 : _a.getName();
202
+ if (artifactNameFromChunk == undefined || artifactNameFromChunk != requestedArtifactName) {
203
+ resolve((0, neverthrow_1.err)(new Error(`There was an error downloading the file from Kurtosis enclave. The server sent an artifact not matching the requested one (requested: ${requestedArtifactName}, got ${artifactNameFromChunk}).`)));
200
204
  }
201
- else {
202
- resolve((0, neverthrow_1.err)(error));
205
+ if (dataChunk.getPreviousChunkHash() != previousChunkHash) {
206
+ resolve((0, neverthrow_1.err)(new Error(`There was an error downloading the file from Kurtosis enclave. File hash does not match (${dataChunk.getPreviousChunkHash()} not equal to ${previousChunkHash}).`)));
207
+ }
208
+ dataChunk.getData_asU8().forEach((byte) => {
209
+ filePayload.push(byte);
210
+ });
211
+ previousChunkHash = this.computeHexHash(dataChunk.getData_asU8());
212
+ });
213
+ clientStream.on('error', (streamErr) => {
214
+ if (!clientStream.destroyed) {
215
+ clientStream.destroy();
203
216
  }
217
+ resolve((0, neverthrow_1.err)(new Error(`And error was returned while downloading file from Kurtosis.\n Error: "${streamErr.message}"`)));
218
+ });
219
+ clientStream.on('end', () => {
220
+ if (!clientStream.destroyed) {
221
+ clientStream.destroy();
222
+ }
223
+ resolve((0, neverthrow_1.ok)(new Uint8Array(filePayload)));
204
224
  });
205
225
  });
206
226
  const downloadFilesArtifactResponseResult = yield downloadFilesArtifactPromise;
@@ -261,5 +281,10 @@ class GrpcNodeApiContainerClient {
261
281
  return (0, neverthrow_1.ok)(getAllFilesArtifactNamesAndUuidsResult.value);
262
282
  });
263
283
  }
284
+ computeHexHash(data) {
285
+ const hasher = crypto.createHash(HASH_ALGORITHM);
286
+ hasher.update(data);
287
+ return hasher.digest(HASH_ENCODING);
288
+ }
264
289
  }
265
290
  exports.GrpcNodeApiContainerClient = GrpcNodeApiContainerClient;
@@ -50,7 +50,7 @@ function readStreamContentUntilClosed(responseLines) {
50
50
  }
51
51
  else if (responseLine.getRunFinishedEvent() !== undefined) {
52
52
  let runFinishedEvent = responseLine.getRunFinishedEvent();
53
- if (runFinishedEvent.getIsrunsuccessful() && runFinishedEvent.getSerializedOutput() != "") {
53
+ if (runFinishedEvent.getIsRunSuccessful() && runFinishedEvent.getSerializedOutput() != "") {
54
54
  scriptOutput += runFinishedEvent.getSerializedOutput() + STARLARK_RUN_OUTPUT_LINE_SPLIT;
55
55
  }
56
56
  }
@@ -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.80.4";
7
+ exports.KURTOSIS_VERSION = "0.80.5";
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.80.4",
4
+ "version": "0.80.5",
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",