kurtosis-sdk 0.76.6 → 0.76.7
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.js +7 -1
- package/build/core/lib/enclaves/enclave_context.d.ts +0 -1
- package/build/core/lib/enclaves/enclave_context.js +19 -51
- package/build/core/lib/enclaves/kurtosis_yaml.js +1 -1
- package/build/core/lib/enclaves/template_and_data.js +1 -1
- package/build/core/lib/services/container_config.js +2 -2
- package/build/core/lib/services/service_context.js +8 -8
- package/build/core/lib/services/service_identifiers.js +1 -1
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.d.ts +0 -8
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js +9 -63
- package/build/engine/lib/kurtosis_context/enclave_identifiers.js +1 -1
- package/build/engine/lib/kurtosis_context/kurtosis_context.d.ts +0 -1
- package/build/engine/lib/kurtosis_context/kurtosis_context.js +21 -38
- package/build/engine/lib/kurtosis_context/service_logs_stream_content.js +2 -2
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -2
- package/build/kurtosis_version/kurtosis_version.js +1 -1
- package/package.json +1 -2
- package/build/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.d.ts +0 -242
- package/build/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js +0 -1224
- package/build/core/lib/enclaves/grpc_web_api_container_client.d.ts +0 -32
- package/build/core/lib/enclaves/grpc_web_api_container_client.js +0 -402
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.d.ts +0 -114
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js +0 -565
- package/build/engine/lib/kurtosis_context/grpc_web_engine_client.d.ts +0 -20
- package/build/engine/lib/kurtosis_context/grpc_web_engine_client.js +0 -259
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
var jspb = require('google-protobuf');
|
|
15
15
|
var goog = jspb;
|
|
16
|
-
var global =
|
|
16
|
+
var global = (function() {
|
|
17
|
+
if (this) { return this; }
|
|
18
|
+
if (typeof window !== 'undefined') { return window; }
|
|
19
|
+
if (typeof global !== 'undefined') { return global; }
|
|
20
|
+
if (typeof self !== 'undefined') { return self; }
|
|
21
|
+
return Function('return this')();
|
|
22
|
+
}.call(null));
|
|
17
23
|
|
|
18
24
|
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
|
|
19
25
|
goog.object.extend(proto, google_protobuf_empty_pb);
|
|
@@ -15,7 +15,6 @@ export declare class EnclaveContext {
|
|
|
15
15
|
private readonly pathJoiner;
|
|
16
16
|
private readonly genericTgzArchiver;
|
|
17
17
|
private constructor();
|
|
18
|
-
static newGrpcWebEnclaveContext(ipAddress: string, apiContainerGrpcProxyPortNum: number, enclaveUuid: string, enclaveName: string): Promise<Result<EnclaveContext, Error>>;
|
|
19
18
|
static newGrpcNodeEnclaveContext(ipAddress: string, apiContainerGrpcPortNum: number, enclaveUuid: string, enclaveName: string): Promise<Result<EnclaveContext, Error>>;
|
|
20
19
|
getEnclaveUuid(): EnclaveUUID;
|
|
21
20
|
getEnclaveName(): string;
|
|
@@ -16,9 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.EnclaveContext = exports.KURTOSIS_YAML_FILENAME = void 0;
|
|
17
17
|
const neverthrow_1 = require("neverthrow");
|
|
18
18
|
const loglevel_1 = require("loglevel");
|
|
19
|
-
const browser_or_node_1 = require("browser-or-node");
|
|
20
19
|
const grpc_node_api_container_client_1 = require("./grpc_node_api_container_client");
|
|
21
|
-
const grpc_web_api_container_client_1 = require("./grpc_web_api_container_client");
|
|
22
20
|
const constructor_calls_1 = require("../constructor_calls");
|
|
23
21
|
const service_context_1 = require("../services/service_context");
|
|
24
22
|
const port_spec_1 = require("../services/port_spec");
|
|
@@ -31,45 +29,15 @@ const service_identifiers_1 = require("../services/service_identifiers");
|
|
|
31
29
|
// or it was repartitioned away)
|
|
32
30
|
const DEFAULT_PARTITION_ID = "";
|
|
33
31
|
exports.KURTOSIS_YAML_FILENAME = "kurtosis.yml";
|
|
34
|
-
// Docs available at https://docs.
|
|
32
|
+
// Docs available at https://docs.kurtosis.com/sdk/#enclavecontext
|
|
35
33
|
class EnclaveContext {
|
|
36
34
|
constructor(backend, pathJoiner, genericTgzArchiver) {
|
|
37
35
|
this.backend = backend;
|
|
38
36
|
this.pathJoiner = pathJoiner;
|
|
39
37
|
this.genericTgzArchiver = genericTgzArchiver;
|
|
40
38
|
}
|
|
41
|
-
static newGrpcWebEnclaveContext(ipAddress, apiContainerGrpcProxyPortNum, enclaveUuid, enclaveName) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
if (browser_or_node_1.isNode) {
|
|
44
|
-
return (0, neverthrow_1.err)(new Error("It seems you're trying to create Enclave Context from Node environment. Please consider the 'newGrpcNodeEnclaveContext()' method instead."));
|
|
45
|
-
}
|
|
46
|
-
let genericApiContainerClient;
|
|
47
|
-
let genericTgzArchiver;
|
|
48
|
-
let pathJoiner;
|
|
49
|
-
try {
|
|
50
|
-
pathJoiner = yield Promise.resolve().then(() => require("path-browserify"));
|
|
51
|
-
const apiContainerServiceWeb = yield Promise.resolve().then(() => require("../../kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb"));
|
|
52
|
-
const apiContainerGrpcProxyUrl = `${ipAddress}:${apiContainerGrpcProxyPortNum}`;
|
|
53
|
-
const apiContainerClient = new apiContainerServiceWeb.ApiContainerServiceClient(apiContainerGrpcProxyUrl);
|
|
54
|
-
genericApiContainerClient = new grpc_web_api_container_client_1.GrpcWebApiContainerClient(apiContainerClient, enclaveUuid, enclaveName);
|
|
55
|
-
const webFileArchiver = yield Promise.resolve().then(() => require("./web_tgz_archiver"));
|
|
56
|
-
genericTgzArchiver = new webFileArchiver.WebTgzArchiver();
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
if (error instanceof Error) {
|
|
60
|
-
return (0, neverthrow_1.err)(error);
|
|
61
|
-
}
|
|
62
|
-
return (0, neverthrow_1.err)(new Error("An unknown exception value was thrown during creation of the API container client that wasn't an error: " + error));
|
|
63
|
-
}
|
|
64
|
-
const enclaveContext = new EnclaveContext(genericApiContainerClient, pathJoiner, genericTgzArchiver);
|
|
65
|
-
return (0, neverthrow_1.ok)(enclaveContext);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
39
|
static newGrpcNodeEnclaveContext(ipAddress, apiContainerGrpcPortNum, enclaveUuid, enclaveName) {
|
|
69
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
if (!browser_or_node_1.isNode) {
|
|
71
|
-
return (0, neverthrow_1.err)(new Error("It seems you're trying to create Enclave Context from Web environment. Please consider the 'newGrpcWebEnclaveContext()' method instead."));
|
|
72
|
-
}
|
|
73
41
|
let genericApiContainerClient;
|
|
74
42
|
let genericTgzArchiver;
|
|
75
43
|
let pathJoiner;
|
|
@@ -94,15 +62,15 @@ class EnclaveContext {
|
|
|
94
62
|
return (0, neverthrow_1.ok)(enclaveContext);
|
|
95
63
|
});
|
|
96
64
|
}
|
|
97
|
-
// Docs available at https://docs.
|
|
65
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getenclaveuuid---enclaveuuid
|
|
98
66
|
getEnclaveUuid() {
|
|
99
67
|
return this.backend.getEnclaveUuid();
|
|
100
68
|
}
|
|
101
|
-
// Docs available at https://docs.
|
|
69
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getenclavename---string
|
|
102
70
|
getEnclaveName() {
|
|
103
71
|
return this.backend.getEnclaveName();
|
|
104
72
|
}
|
|
105
|
-
// Docs available at https://docs.
|
|
73
|
+
// Docs available at https://docs.kurtosis.com/sdk/#runstarlarkscriptstring-serializedstarlarkscript-boolean-dryrun---streamstarlarkrunresponseline-responselines-error-error
|
|
106
74
|
runStarlarkScript(serializedStartosisScript, serializedParams, dryRun) {
|
|
107
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
76
|
const args = new api_container_service_pb_1.RunStarlarkScriptArgs();
|
|
@@ -116,7 +84,7 @@ class EnclaveContext {
|
|
|
116
84
|
return (0, neverthrow_1.ok)(scriptRunResult.value);
|
|
117
85
|
});
|
|
118
86
|
}
|
|
119
|
-
// Docs available at https://docs.
|
|
87
|
+
// Docs available at https://docs.kurtosis.com/sdk/#runstarlarkscriptblockingstring-serializedstarlarkscript-boolean-dryrun---starlarkrunresult-runresult-error-error
|
|
120
88
|
runStarlarkScriptBlocking(serializedStartosisScript, serializedParams, dryRun) {
|
|
121
89
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
90
|
const runAsyncResponse = yield this.runStarlarkScript(serializedStartosisScript, serializedParams, dryRun);
|
|
@@ -127,7 +95,7 @@ class EnclaveContext {
|
|
|
127
95
|
return (0, neverthrow_1.ok)(fullRunResult);
|
|
128
96
|
});
|
|
129
97
|
}
|
|
130
|
-
// Docs available at https://docs.
|
|
98
|
+
// Docs available at https://docs.kurtosis.com/sdk/#runstarlarkpackagestring-packagerootpath-string-serializedparams-boolean-dryrun---streamstarlarkrunresponseline-responselines-error-error
|
|
131
99
|
runStarlarkPackage(packageRootPath, serializedParams, dryRun) {
|
|
132
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
101
|
const args = yield this.assembleRunStarlarkPackageArg(packageRootPath, serializedParams, dryRun);
|
|
@@ -141,7 +109,7 @@ class EnclaveContext {
|
|
|
141
109
|
return (0, neverthrow_1.ok)(packageRunResult.value);
|
|
142
110
|
});
|
|
143
111
|
}
|
|
144
|
-
// Docs available at https://docs.
|
|
112
|
+
// Docs available at https://docs.kurtosis.com/sdk/#runstarlarkpackageblockingstring-packagerootpath-string-serializedparams-boolean-dryrun---starlarkrunresult-runresult-error-error
|
|
145
113
|
runStarlarkPackageBlocking(packageRootPath, serializedParams, dryRun) {
|
|
146
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
115
|
const runAsyncResponse = yield this.runStarlarkPackage(packageRootPath, serializedParams, dryRun);
|
|
@@ -152,7 +120,7 @@ class EnclaveContext {
|
|
|
152
120
|
return (0, neverthrow_1.ok)(fullRunResult);
|
|
153
121
|
});
|
|
154
122
|
}
|
|
155
|
-
// Docs available at https://docs.
|
|
123
|
+
// Docs available at https://docs.kurtosis.com/sdk/#runremotestarlarkpackagestring-packageid-string-serializedparams-boolean-dryrun---streamstarlarkrunresponseline-responselines-error-error
|
|
156
124
|
runStarlarkRemotePackage(moduleId, serializedParams, dryRun) {
|
|
157
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
126
|
const args = new api_container_service_pb_1.RunStarlarkPackageArgs();
|
|
@@ -167,7 +135,7 @@ class EnclaveContext {
|
|
|
167
135
|
return (0, neverthrow_1.ok)(remotePackageRunResult.value);
|
|
168
136
|
});
|
|
169
137
|
}
|
|
170
|
-
// Docs available at https://docs.
|
|
138
|
+
// Docs available at https://docs.kurtosis.com/sdk/#runstarlarkremotepackageblockingstring-packageid-string-serializedparams-boolean-dryrun---starlarkrunresult-runresult-error-error
|
|
171
139
|
runStarlarkRemotePackageBlocking(moduleId, serializedParams, dryRun) {
|
|
172
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
141
|
const runAsyncResponse = yield this.runStarlarkRemotePackage(moduleId, serializedParams, dryRun);
|
|
@@ -178,7 +146,7 @@ class EnclaveContext {
|
|
|
178
146
|
return (0, neverthrow_1.ok)(fullRunResult);
|
|
179
147
|
});
|
|
180
148
|
}
|
|
181
|
-
// Docs available at https://docs.
|
|
149
|
+
// Docs available at https://docs.kurtosis.com/sdk/#addserviceserviceid-serviceid--containerconfig-containerconfig---servicecontext-servicecontext
|
|
182
150
|
addService(serviceName, containerConfig) {
|
|
183
151
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
152
|
const containerConfigs = new Map();
|
|
@@ -199,7 +167,7 @@ class EnclaveContext {
|
|
|
199
167
|
return (0, neverthrow_1.ok)(serviceCtx);
|
|
200
168
|
});
|
|
201
169
|
}
|
|
202
|
-
// Docs available at https://docs.
|
|
170
|
+
// Docs available at https://docs.kurtosis.com/sdk/#addservicetopartitionserviceid-serviceid-partitionid-partitionid-containerconfig-containerconfig---servicecontext-servicecontext
|
|
203
171
|
addServiceToPartition(serviceName, partitionId, containerConfig) {
|
|
204
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
173
|
const containerConfigs = new Map();
|
|
@@ -220,7 +188,7 @@ class EnclaveContext {
|
|
|
220
188
|
return (0, neverthrow_1.ok)(serviceCtx);
|
|
221
189
|
});
|
|
222
190
|
}
|
|
223
|
-
// Docs available at https://docs.
|
|
191
|
+
// Docs available at https://docs.kurtosis.com/sdk/#addservicestopartitionmapserviceid-containerconfig-containerconfigs-partitionid-partitionid---mapserviceid-servicecontext-successfulservices-mapserviceid-error-failedservices
|
|
224
192
|
addServicesToPartition(containerConfigs, partitionID) {
|
|
225
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
226
194
|
const failedServicesPool = new Map();
|
|
@@ -313,7 +281,7 @@ class EnclaveContext {
|
|
|
313
281
|
return (0, neverthrow_1.ok)([successfulServices, failedServicesPool]);
|
|
314
282
|
});
|
|
315
283
|
}
|
|
316
|
-
// Docs available at https://docs.
|
|
284
|
+
// Docs available at https://docs.kurtosis.com/sdk#getservicecontextstring-serviceidentifier---servicecontext-servicecontext
|
|
317
285
|
getServiceContext(serviceIdentifier) {
|
|
318
286
|
return __awaiter(this, void 0, void 0, function* () {
|
|
319
287
|
const serviceArgMap = new Map();
|
|
@@ -344,7 +312,7 @@ class EnclaveContext {
|
|
|
344
312
|
return (0, neverthrow_1.ok)(serviceContext);
|
|
345
313
|
});
|
|
346
314
|
}
|
|
347
|
-
// Docs available at https://docs.
|
|
315
|
+
// Docs available at https://docs.kurtosis.com/sdk#getservices---mapservicename--serviceuuid-serviceidentifiers
|
|
348
316
|
getServices() {
|
|
349
317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
350
318
|
const getAllServicesArgMap = new Map();
|
|
@@ -361,7 +329,7 @@ class EnclaveContext {
|
|
|
361
329
|
return (0, neverthrow_1.ok)(serviceInfos);
|
|
362
330
|
});
|
|
363
331
|
}
|
|
364
|
-
// Docs available at https://docs.
|
|
332
|
+
// Docs available at https://docs.kurtosis.com/sdk#uploadfilesstring-pathtoupload-string-artifactname
|
|
365
333
|
uploadFiles(pathToArchive, name) {
|
|
366
334
|
return __awaiter(this, void 0, void 0, function* () {
|
|
367
335
|
const archiverResponse = yield this.genericTgzArchiver.createTgzByteArray(pathToArchive);
|
|
@@ -376,7 +344,7 @@ class EnclaveContext {
|
|
|
376
344
|
return (0, neverthrow_1.ok)(uploadResult.value.getUuid());
|
|
377
345
|
});
|
|
378
346
|
}
|
|
379
|
-
// Docs available at https://docs.
|
|
347
|
+
// Docs available at https://docs.kurtosis.com/sdk#storewebfilesstring-urltodownload-string-artifactname
|
|
380
348
|
storeWebFiles(url, name) {
|
|
381
349
|
return __awaiter(this, void 0, void 0, function* () {
|
|
382
350
|
const args = (0, constructor_calls_1.newStoreWebFilesArtifactArgs)(url, name);
|
|
@@ -388,7 +356,7 @@ class EnclaveContext {
|
|
|
388
356
|
return (0, neverthrow_1.ok)(storeWebFilesArtifactResponse.getUuid());
|
|
389
357
|
});
|
|
390
358
|
}
|
|
391
|
-
// Docs available at https://docs.
|
|
359
|
+
// Docs available at https://docs.kurtosis.com/sdk#downloadfilesartifact-fileidentifier-string
|
|
392
360
|
downloadFilesArtifact(identifier) {
|
|
393
361
|
return __awaiter(this, void 0, void 0, function* () {
|
|
394
362
|
const args = (0, constructor_calls_1.newDownloadFilesArtifactArgs)(identifier);
|
|
@@ -400,7 +368,7 @@ class EnclaveContext {
|
|
|
400
368
|
return (0, neverthrow_1.ok)(downloadFilesArtifactResponse.getData_asU8());
|
|
401
369
|
});
|
|
402
370
|
}
|
|
403
|
-
// Docs available at https://docs.
|
|
371
|
+
// Docs available at https://docs.kurtosis.com/sdk#getexistingandhistoricalserviceidentifiers---serviceidentifiers-serviceidentifiers
|
|
404
372
|
getExistingAndHistoricalServiceIdentifiers() {
|
|
405
373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
406
374
|
const getExistingAndHistoricalServiceIdentifiersResponseResult = yield this.backend.getExistingAndHistoricalServiceIdentifiers();
|
|
@@ -411,7 +379,7 @@ class EnclaveContext {
|
|
|
411
379
|
return (0, neverthrow_1.ok)(new service_identifiers_1.ServiceIdentifiers(getExistingAndHistoricalIdentifiersValue.getAllidentifiersList()));
|
|
412
380
|
});
|
|
413
381
|
}
|
|
414
|
-
// Docs available at https://docs.
|
|
382
|
+
// Docs available at https://docs.kurtosis.com/#getallfilesartifactnamesanduuids---filesartifactnameanduuid-filesartifactnamesanduuids
|
|
415
383
|
getAllFilesArtifactNamesAndUuids() {
|
|
416
384
|
return __awaiter(this, void 0, void 0, function* () {
|
|
417
385
|
const getAllFilesArtifactsNamesAndUuidsResponseResult = yield this.backend.getAllFilesArtifactNamesAndUuids();
|
|
@@ -14,7 +14,7 @@ const fs = require("fs");
|
|
|
14
14
|
const neverthrow_1 = require("neverthrow");
|
|
15
15
|
const yaml = require("js-yaml");
|
|
16
16
|
const enclave_context_1 = require("./enclave_context");
|
|
17
|
-
const PACKAGES_URL = "https://docs.
|
|
17
|
+
const PACKAGES_URL = "https://docs.kurtosis.com/concepts-reference/packages";
|
|
18
18
|
class KurtosisYaml {
|
|
19
19
|
constructor(name) {
|
|
20
20
|
this.name = name;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TemplateAndData = void 0;
|
|
4
|
-
// Docs available at ttps://docs.
|
|
4
|
+
// Docs available at ttps://docs.kurtosis.com/sdk#templateanddata
|
|
5
5
|
class TemplateAndData {
|
|
6
6
|
constructor(template, templateData) {
|
|
7
7
|
this.template = template;
|
|
@@ -6,7 +6,7 @@ const DEFAULT_PRIVATE_IP_ADDR_PLACEHOLDER = "KURTOSIS_PRIVATE_IP_ADDR_PLACEHOLDE
|
|
|
6
6
|
// Config Object
|
|
7
7
|
// ====================================================================================================
|
|
8
8
|
// TODO defensive copy when we're giving back complex objects?????
|
|
9
|
-
// Docs available at https://docs.
|
|
9
|
+
// Docs available at https://docs.kurtosis.com/sdk/#containerconfig
|
|
10
10
|
class ContainerConfig {
|
|
11
11
|
constructor(image, usedPorts, publicPorts, //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution
|
|
12
12
|
filesArtifactMountpoints, entrypointOverrideArgs, cmdOverrideArgs, environmentVariableOverrides, cpuAllocationMillicpus, memoryAllocationMegabytes, privateIPAddrPlaceholder) {
|
|
@@ -27,7 +27,7 @@ exports.ContainerConfig = ContainerConfig;
|
|
|
27
27
|
// Builder
|
|
28
28
|
// ====================================================================================================
|
|
29
29
|
// TODO Defensive copies on all these With... functions???
|
|
30
|
-
// Docs available at https://docs.
|
|
30
|
+
// Docs available at https://docs.kurtosis.com/sdk/#containerconfigbuilder
|
|
31
31
|
class ContainerConfigBuilder {
|
|
32
32
|
constructor(image) {
|
|
33
33
|
this.image = image;
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ServiceContext = void 0;
|
|
13
13
|
const neverthrow_1 = require("neverthrow");
|
|
14
14
|
const constructor_calls_1 = require("../constructor_calls");
|
|
15
|
-
// Docs available at https://docs.
|
|
15
|
+
// Docs available at https://docs.kurtosis.com/sdk/#servicecontext
|
|
16
16
|
class ServiceContext {
|
|
17
17
|
constructor(client, serviceName, serviceUuid, privateIpAddress, privatePorts, publicIpAddress, publicPorts) {
|
|
18
18
|
this.client = client;
|
|
@@ -23,31 +23,31 @@ class ServiceContext {
|
|
|
23
23
|
this.publicIpAddress = publicIpAddress;
|
|
24
24
|
this.publicPorts = publicPorts;
|
|
25
25
|
}
|
|
26
|
-
// Docs available at https://docs.
|
|
26
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getservicename---servicename
|
|
27
27
|
getServiceName() {
|
|
28
28
|
return this.serviceName;
|
|
29
29
|
}
|
|
30
|
-
// Docs available at https://docs.
|
|
30
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getserviceuuid---serviceuuid
|
|
31
31
|
getServiceUUID() {
|
|
32
32
|
return this.serviceUuid;
|
|
33
33
|
}
|
|
34
|
-
// Docs available at https://docs.
|
|
34
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getprivateipaddress---string
|
|
35
35
|
getPrivateIPAddress() {
|
|
36
36
|
return this.privateIpAddress;
|
|
37
37
|
}
|
|
38
|
-
// Docs available at https://docs.
|
|
38
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getprivateports---mapportid-portspec
|
|
39
39
|
getPrivatePorts() {
|
|
40
40
|
return this.privatePorts;
|
|
41
41
|
}
|
|
42
|
-
// Docs available at https://docs.
|
|
42
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getmaybepublicipaddress---string
|
|
43
43
|
getMaybePublicIPAddress() {
|
|
44
44
|
return this.publicIpAddress;
|
|
45
45
|
}
|
|
46
|
-
// Docs available at https://docs.
|
|
46
|
+
// Docs available at https://docs.kurtosis.com/sdk/#getpublicports---mapportid-portspec
|
|
47
47
|
getPublicPorts() {
|
|
48
48
|
return this.publicPorts;
|
|
49
49
|
}
|
|
50
|
-
// Docs available at https://docs.
|
|
50
|
+
// Docs available at https://docs.kurtosis.com/sdk/#execcommandliststring-command---int-exitcode-string-logs
|
|
51
51
|
execCommand(command) {
|
|
52
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
53
|
const execCommandArgs = (0, constructor_calls_1.newExecCommandArgs)(this.serviceName, command);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServiceIdentifiers = void 0;
|
|
4
4
|
const VALID_UUID_MATCHES_ALLOWED = 1;
|
|
5
|
-
// Docs available at https://docs.
|
|
5
|
+
// Docs available at https://docs.kurtosis.com/sdk#service-identifiers
|
|
6
6
|
class ServiceIdentifiers {
|
|
7
7
|
constructor(historicalIdentifiers) {
|
|
8
8
|
this.serviceUuids = new Map();
|
|
@@ -82,9 +82,6 @@ export class EnclaveAPIContainerInfo extends jspb.Message {
|
|
|
82
82
|
getGrpcPortInsideEnclave(): number;
|
|
83
83
|
setGrpcPortInsideEnclave(value: number): EnclaveAPIContainerInfo;
|
|
84
84
|
|
|
85
|
-
getGrpcProxyPortInsideEnclave(): number;
|
|
86
|
-
setGrpcProxyPortInsideEnclave(value: number): EnclaveAPIContainerInfo;
|
|
87
|
-
|
|
88
85
|
serializeBinary(): Uint8Array;
|
|
89
86
|
toObject(includeInstance?: boolean): EnclaveAPIContainerInfo.AsObject;
|
|
90
87
|
static toObject(includeInstance: boolean, msg: EnclaveAPIContainerInfo): EnclaveAPIContainerInfo.AsObject;
|
|
@@ -98,7 +95,6 @@ export namespace EnclaveAPIContainerInfo {
|
|
|
98
95
|
containerId: string,
|
|
99
96
|
ipInsideEnclave: string,
|
|
100
97
|
grpcPortInsideEnclave: number,
|
|
101
|
-
grpcProxyPortInsideEnclave: number,
|
|
102
98
|
}
|
|
103
99
|
}
|
|
104
100
|
|
|
@@ -109,9 +105,6 @@ export class EnclaveAPIContainerHostMachineInfo extends jspb.Message {
|
|
|
109
105
|
getGrpcPortOnHostMachine(): number;
|
|
110
106
|
setGrpcPortOnHostMachine(value: number): EnclaveAPIContainerHostMachineInfo;
|
|
111
107
|
|
|
112
|
-
getGrpcProxyPortOnHostMachine(): number;
|
|
113
|
-
setGrpcProxyPortOnHostMachine(value: number): EnclaveAPIContainerHostMachineInfo;
|
|
114
|
-
|
|
115
108
|
serializeBinary(): Uint8Array;
|
|
116
109
|
toObject(includeInstance?: boolean): EnclaveAPIContainerHostMachineInfo.AsObject;
|
|
117
110
|
static toObject(includeInstance: boolean, msg: EnclaveAPIContainerHostMachineInfo): EnclaveAPIContainerHostMachineInfo.AsObject;
|
|
@@ -124,7 +117,6 @@ export namespace EnclaveAPIContainerHostMachineInfo {
|
|
|
124
117
|
export type AsObject = {
|
|
125
118
|
ipOnHostMachine: string,
|
|
126
119
|
grpcPortOnHostMachine: number,
|
|
127
|
-
grpcProxyPortOnHostMachine: number,
|
|
128
120
|
}
|
|
129
121
|
}
|
|
130
122
|
|
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
var jspb = require('google-protobuf');
|
|
15
15
|
var goog = jspb;
|
|
16
|
-
var global =
|
|
16
|
+
var global = (function() {
|
|
17
|
+
if (this) { return this; }
|
|
18
|
+
if (typeof window !== 'undefined') { return window; }
|
|
19
|
+
if (typeof global !== 'undefined') { return global; }
|
|
20
|
+
if (typeof self !== 'undefined') { return self; }
|
|
21
|
+
return Function('return this')();
|
|
22
|
+
}.call(null));
|
|
17
23
|
|
|
18
24
|
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
|
|
19
25
|
goog.object.extend(proto, google_protobuf_empty_pb);
|
|
@@ -953,8 +959,7 @@ proto.engine_api.EnclaveAPIContainerInfo.toObject = function(includeInstance, ms
|
|
|
953
959
|
var f, obj = {
|
|
954
960
|
containerId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
955
961
|
ipInsideEnclave: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
956
|
-
grpcPortInsideEnclave: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
957
|
-
grpcProxyPortInsideEnclave: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
962
|
+
grpcPortInsideEnclave: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
958
963
|
};
|
|
959
964
|
|
|
960
965
|
if (includeInstance) {
|
|
@@ -1003,10 +1008,6 @@ proto.engine_api.EnclaveAPIContainerInfo.deserializeBinaryFromReader = function(
|
|
|
1003
1008
|
var value = /** @type {number} */ (reader.readUint32());
|
|
1004
1009
|
msg.setGrpcPortInsideEnclave(value);
|
|
1005
1010
|
break;
|
|
1006
|
-
case 4:
|
|
1007
|
-
var value = /** @type {number} */ (reader.readUint32());
|
|
1008
|
-
msg.setGrpcProxyPortInsideEnclave(value);
|
|
1009
|
-
break;
|
|
1010
1011
|
default:
|
|
1011
1012
|
reader.skipField();
|
|
1012
1013
|
break;
|
|
@@ -1057,13 +1058,6 @@ proto.engine_api.EnclaveAPIContainerInfo.serializeBinaryToWriter = function(mess
|
|
|
1057
1058
|
f
|
|
1058
1059
|
);
|
|
1059
1060
|
}
|
|
1060
|
-
f = message.getGrpcProxyPortInsideEnclave();
|
|
1061
|
-
if (f !== 0) {
|
|
1062
|
-
writer.writeUint32(
|
|
1063
|
-
4,
|
|
1064
|
-
f
|
|
1065
|
-
);
|
|
1066
|
-
}
|
|
1067
1061
|
};
|
|
1068
1062
|
|
|
1069
1063
|
|
|
@@ -1121,24 +1115,6 @@ proto.engine_api.EnclaveAPIContainerInfo.prototype.setGrpcPortInsideEnclave = fu
|
|
|
1121
1115
|
};
|
|
1122
1116
|
|
|
1123
1117
|
|
|
1124
|
-
/**
|
|
1125
|
-
* optional uint32 grpc_proxy_port_inside_enclave = 4;
|
|
1126
|
-
* @return {number}
|
|
1127
|
-
*/
|
|
1128
|
-
proto.engine_api.EnclaveAPIContainerInfo.prototype.getGrpcProxyPortInsideEnclave = function() {
|
|
1129
|
-
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
1130
|
-
};
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* @param {number} value
|
|
1135
|
-
* @return {!proto.engine_api.EnclaveAPIContainerInfo} returns this
|
|
1136
|
-
*/
|
|
1137
|
-
proto.engine_api.EnclaveAPIContainerInfo.prototype.setGrpcProxyPortInsideEnclave = function(value) {
|
|
1138
|
-
return jspb.Message.setProto3IntField(this, 4, value);
|
|
1139
|
-
};
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
1118
|
|
|
1143
1119
|
|
|
1144
1120
|
|
|
@@ -1172,8 +1148,7 @@ proto.engine_api.EnclaveAPIContainerHostMachineInfo.prototype.toObject = functio
|
|
|
1172
1148
|
proto.engine_api.EnclaveAPIContainerHostMachineInfo.toObject = function(includeInstance, msg) {
|
|
1173
1149
|
var f, obj = {
|
|
1174
1150
|
ipOnHostMachine: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
1175
|
-
grpcPortOnHostMachine: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
|
1176
|
-
grpcProxyPortOnHostMachine: jspb.Message.getFieldWithDefault(msg, 6, 0)
|
|
1151
|
+
grpcPortOnHostMachine: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
|
1177
1152
|
};
|
|
1178
1153
|
|
|
1179
1154
|
if (includeInstance) {
|
|
@@ -1218,10 +1193,6 @@ proto.engine_api.EnclaveAPIContainerHostMachineInfo.deserializeBinaryFromReader
|
|
|
1218
1193
|
var value = /** @type {number} */ (reader.readUint32());
|
|
1219
1194
|
msg.setGrpcPortOnHostMachine(value);
|
|
1220
1195
|
break;
|
|
1221
|
-
case 6:
|
|
1222
|
-
var value = /** @type {number} */ (reader.readUint32());
|
|
1223
|
-
msg.setGrpcProxyPortOnHostMachine(value);
|
|
1224
|
-
break;
|
|
1225
1196
|
default:
|
|
1226
1197
|
reader.skipField();
|
|
1227
1198
|
break;
|
|
@@ -1265,13 +1236,6 @@ proto.engine_api.EnclaveAPIContainerHostMachineInfo.serializeBinaryToWriter = fu
|
|
|
1265
1236
|
f
|
|
1266
1237
|
);
|
|
1267
1238
|
}
|
|
1268
|
-
f = message.getGrpcProxyPortOnHostMachine();
|
|
1269
|
-
if (f !== 0) {
|
|
1270
|
-
writer.writeUint32(
|
|
1271
|
-
6,
|
|
1272
|
-
f
|
|
1273
|
-
);
|
|
1274
|
-
}
|
|
1275
1239
|
};
|
|
1276
1240
|
|
|
1277
1241
|
|
|
@@ -1311,24 +1275,6 @@ proto.engine_api.EnclaveAPIContainerHostMachineInfo.prototype.setGrpcPortOnHostM
|
|
|
1311
1275
|
};
|
|
1312
1276
|
|
|
1313
1277
|
|
|
1314
|
-
/**
|
|
1315
|
-
* optional uint32 grpc_proxy_port_on_host_machine = 6;
|
|
1316
|
-
* @return {number}
|
|
1317
|
-
*/
|
|
1318
|
-
proto.engine_api.EnclaveAPIContainerHostMachineInfo.prototype.getGrpcProxyPortOnHostMachine = function() {
|
|
1319
|
-
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
|
1320
|
-
};
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
/**
|
|
1324
|
-
* @param {number} value
|
|
1325
|
-
* @return {!proto.engine_api.EnclaveAPIContainerHostMachineInfo} returns this
|
|
1326
|
-
*/
|
|
1327
|
-
proto.engine_api.EnclaveAPIContainerHostMachineInfo.prototype.setGrpcProxyPortOnHostMachine = function(value) {
|
|
1328
|
-
return jspb.Message.setProto3IntField(this, 6, value);
|
|
1329
|
-
};
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
1278
|
|
|
1333
1279
|
|
|
1334
1280
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EnclaveIdentifiers = void 0;
|
|
4
4
|
const VALID_UUID_MATCHES_ALLOWED = 1;
|
|
5
|
-
// Docs available at https://docs.
|
|
5
|
+
// Docs available at https://docs.kurtosis.com/sdk#enclave-identifiers
|
|
6
6
|
class EnclaveIdentifiers {
|
|
7
7
|
constructor(historicalIdentifiers) {
|
|
8
8
|
this.enclaveUuids = new Map();
|
|
@@ -8,7 +8,6 @@ import { LogLineFilter } from "./log_line_filter";
|
|
|
8
8
|
import { Enclaves } from "./enclaves";
|
|
9
9
|
import { EnclaveIdentifiers } from "./enclave_identifiers";
|
|
10
10
|
export declare const DEFAULT_GRPC_ENGINE_SERVER_PORT_NUM: number;
|
|
11
|
-
export declare const DEFAULT_GRPC_PROXY_ENGINE_SERVER_PORT_NUM: number;
|
|
12
11
|
export declare class KurtosisContext {
|
|
13
12
|
private readonly client;
|
|
14
13
|
constructor(client: GenericEngineClient);
|