@dagger.io/dagger 0.2.1 → 0.3.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/dist/api/client.gen.d.ts +133 -19
- package/dist/api/client.gen.d.ts.map +1 -1
- package/dist/api/client.gen.js +118 -161
- package/dist/api/utils.d.ts.map +1 -1
- package/dist/api/utils.js +26 -8
- package/dist/common/errors/DaggerSDKError.d.ts +31 -0
- package/dist/common/errors/DaggerSDKError.d.ts.map +1 -0
- package/dist/common/errors/DaggerSDKError.js +22 -0
- package/dist/common/errors/DockerImageRefValidationError.d.ts +22 -0
- package/dist/common/errors/DockerImageRefValidationError.d.ts.map +1 -0
- package/dist/common/errors/DockerImageRefValidationError.js +16 -0
- package/dist/common/errors/EngineSessionPortParseError.d.ts +25 -0
- package/dist/common/errors/EngineSessionPortParseError.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionPortParseError.js +20 -0
- package/dist/common/errors/GraphQLRequestError.d.ts +27 -0
- package/dist/common/errors/GraphQLRequestError.d.ts.map +1 -0
- package/dist/common/errors/GraphQLRequestError.js +16 -0
- package/dist/common/errors/InitEngineSessionBinaryError.d.ts +13 -0
- package/dist/common/errors/InitEngineSessionBinaryError.d.ts.map +1 -0
- package/dist/common/errors/InitEngineSessionBinaryError.js +14 -0
- package/dist/common/errors/TooManyNestedObjectsError.d.ts +21 -0
- package/dist/common/errors/TooManyNestedObjectsError.d.ts.map +1 -0
- package/dist/common/errors/TooManyNestedObjectsError.js +15 -0
- package/dist/common/errors/UnknownDaggerError.d.ts +13 -0
- package/dist/common/errors/UnknownDaggerError.d.ts.map +1 -0
- package/dist/common/errors/UnknownDaggerError.js +14 -0
- package/dist/common/errors/index.d.ts +8 -0
- package/dist/common/errors/index.d.ts.map +1 -0
- package/dist/common/errors/index.js +7 -0
- package/dist/common/utils.d.ts +65 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +2 -0
- package/dist/connect.d.ts +1 -2
- package/dist/connect.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/provisioning/bin/bin.d.ts.map +1 -1
- package/dist/provisioning/bin/bin.js +6 -2
- package/dist/provisioning/docker-provision/image.d.ts.map +1 -1
- package/dist/provisioning/docker-provision/image.js +10 -4
- package/package.json +5 -8
package/dist/api/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../api/utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../api/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAMjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAsD3C;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,MAAM,CAYjD;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAClC,CAAC,EAAE,SAAS,EAAE,EACd,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,CAqBhD;AAED;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,CAAC,EAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
|
package/dist/api/utils.js
CHANGED
|
@@ -8,7 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11
|
-
import { gql } from "graphql-request";
|
|
11
|
+
import { ClientError, gql } from "graphql-request";
|
|
12
|
+
import { GraphQLRequestError, TooManyNestedObjectsError, UnknownDaggerError, } from "../common/errors/index.js";
|
|
12
13
|
function buildArgs(item) {
|
|
13
14
|
const entries = Object.entries(item.args)
|
|
14
15
|
.filter((value) => value[1] !== undefined)
|
|
@@ -35,8 +36,12 @@ function computeNestedQuery(query, client) {
|
|
|
35
36
|
yield Promise.all(Object.entries(q.args).map((val) => __awaiter(this, void 0, void 0, function* () {
|
|
36
37
|
if (val[1] instanceof Object && isQueryTree(val[1])) {
|
|
37
38
|
// push an id that will be used by the container
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
const getQueryTree = buildQuery([
|
|
40
|
+
...val[1]["_queryTree"],
|
|
41
|
+
{
|
|
42
|
+
operation: "id",
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
40
45
|
const result = yield compute(getQueryTree, client);
|
|
41
46
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
47
|
//@ts-ignore
|
|
@@ -91,8 +96,7 @@ export function queryFlatten(response) {
|
|
|
91
96
|
if (keys.length != 1) {
|
|
92
97
|
// Dagger is currently expecting to only return one value
|
|
93
98
|
// If the response is nested in a way were more than one object is nested inside throw an error
|
|
94
|
-
|
|
95
|
-
throw new Error("Too many Graphql nested objects");
|
|
99
|
+
throw new TooManyNestedObjectsError("Too many nested objects inside graphql response", { response: response });
|
|
96
100
|
}
|
|
97
101
|
const nestedKey = keys[0];
|
|
98
102
|
return queryFlatten(response[nestedKey]);
|
|
@@ -104,9 +108,23 @@ export function queryFlatten(response) {
|
|
|
104
108
|
*/
|
|
105
109
|
export function compute(query, client) {
|
|
106
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
let computeQuery;
|
|
112
|
+
try {
|
|
113
|
+
computeQuery = yield client.request(gql `
|
|
114
|
+
${query}
|
|
115
|
+
`);
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
if (e instanceof ClientError) {
|
|
119
|
+
throw new GraphQLRequestError("Error message", {
|
|
120
|
+
request: e.request,
|
|
121
|
+
response: e.response,
|
|
122
|
+
cause: e,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
// Just throw the unknown error
|
|
126
|
+
throw new UnknownDaggerError("Encountered an unknown error while requesting data via graphql", { cause: e });
|
|
127
|
+
}
|
|
110
128
|
return queryFlatten(computeQuery);
|
|
111
129
|
});
|
|
112
130
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface DaggerSDKErrorOptions {
|
|
2
|
+
cause?: Error;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* The base error. Every other error inherits this error.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class DaggerSDKError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the dagger error.
|
|
10
|
+
*/
|
|
11
|
+
abstract name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The dagger specific error code.
|
|
14
|
+
* Use this to identify dagger errors programmatically.
|
|
15
|
+
*/
|
|
16
|
+
abstract code: string;
|
|
17
|
+
/**
|
|
18
|
+
* The original error, which caused the DaggerSDKError.
|
|
19
|
+
*/
|
|
20
|
+
cause?: Error;
|
|
21
|
+
protected constructor(message: string, options?: DaggerSDKErrorOptions);
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
get [Symbol.toStringTag](): string;
|
|
26
|
+
/**
|
|
27
|
+
* Pretty prints the error
|
|
28
|
+
*/
|
|
29
|
+
printStackTrace(): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=DaggerSDKError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DaggerSDKError.d.ts","sourceRoot":"","sources":["../../../common/errors/DaggerSDKError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED;;GAEG;AACH,8BAAsB,cAAe,SAAQ,KAAK;IAChD;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;IAEb,SAAS,aAAa,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB;IAKtE;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;IAED;;OAEG;IACH,eAAe;CAGhB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { log } from "../utils.js";
|
|
2
|
+
/**
|
|
3
|
+
* The base error. Every other error inherits this error.
|
|
4
|
+
*/
|
|
5
|
+
export class DaggerSDKError extends Error {
|
|
6
|
+
constructor(message, options) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.cause = options === null || options === void 0 ? void 0 : options.cause;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
get [Symbol.toStringTag]() {
|
|
14
|
+
return this.name;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Pretty prints the error
|
|
18
|
+
*/
|
|
19
|
+
printStackTrace() {
|
|
20
|
+
log(this.stack);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
interface DockerImageRefValidationErrorOptions extends DaggerSDKErrorOptions {
|
|
3
|
+
ref: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown if the passed image reference does not pass validation and is not compliant with the
|
|
7
|
+
* DockerImage constructor.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DockerImageRefValidationError extends DaggerSDKError {
|
|
10
|
+
name: string;
|
|
11
|
+
code: string;
|
|
12
|
+
/**
|
|
13
|
+
* The docker image reference, which caused the error.
|
|
14
|
+
*/
|
|
15
|
+
ref: string;
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
constructor(message: string, options: DockerImageRefValidationErrorOptions);
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=DockerImageRefValidationError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DockerImageRefValidationError.d.ts","sourceRoot":"","sources":["../../../common/errors/DockerImageRefValidationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,UAAU,oCAAqC,SAAQ,qBAAqB;IAC1E,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,cAAc;IAC/D,IAAI,SAAkC;IACtC,IAAI,SAAS;IAEb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,oCAAoC;CAI3E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown if the passed image reference does not pass validation and is not compliant with the
|
|
4
|
+
* DockerImage constructor.
|
|
5
|
+
*/
|
|
6
|
+
export class DockerImageRefValidationError extends DaggerSDKError {
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
constructor(message, options) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
this.name = "DockerImageRefValidationError";
|
|
13
|
+
this.code = "D104";
|
|
14
|
+
this.ref = options === null || options === void 0 ? void 0 : options.ref;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
interface EngineSessionPortParseErrorOptions extends DaggerSDKErrorOptions {
|
|
3
|
+
parsedLine: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown if the EngineSession does not manage to parse the required port successfully.
|
|
7
|
+
* This can happen if
|
|
8
|
+
* - Reading the port times out after 30 seconds
|
|
9
|
+
* - The parsed port is not a number
|
|
10
|
+
* - the reader does not read a single line
|
|
11
|
+
*/
|
|
12
|
+
export declare class EngineSessionPortParseError extends DaggerSDKError {
|
|
13
|
+
name: string;
|
|
14
|
+
code: string;
|
|
15
|
+
/**
|
|
16
|
+
* the line, which caused the error during parsing, if the error was caused because of parsing.
|
|
17
|
+
*/
|
|
18
|
+
parsedLine?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(message: string, options?: EngineSessionPortParseErrorOptions);
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=EngineSessionPortParseError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineSessionPortParseError.d.ts","sourceRoot":"","sources":["../../../common/errors/EngineSessionPortParseError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,UAAU,kCAAmC,SAAQ,qBAAqB;IACxE,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,cAAc;IAC7D,IAAI,SAA2B;IAC/B,IAAI,SAAS;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kCAAkC;CAI1E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown if the EngineSession does not manage to parse the required port successfully.
|
|
4
|
+
* This can happen if
|
|
5
|
+
* - Reading the port times out after 30 seconds
|
|
6
|
+
* - The parsed port is not a number
|
|
7
|
+
* - the reader does not read a single line
|
|
8
|
+
*/
|
|
9
|
+
export class EngineSessionPortParseError extends DaggerSDKError {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(message, options) {
|
|
14
|
+
super(message, options);
|
|
15
|
+
this.name = "EngineSessionPortError";
|
|
16
|
+
this.code = "D103";
|
|
17
|
+
if (options)
|
|
18
|
+
this.parsedLine = options.parsedLine;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GraphQLRequestContext, GraphQLResponse } from "graphql-request/dist/types";
|
|
2
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
3
|
+
interface GraphQLRequestErrorOptions extends DaggerSDKErrorOptions {
|
|
4
|
+
response: GraphQLResponse;
|
|
5
|
+
request: GraphQLRequestContext;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* This error originates from the dagger engine. It means that some error was thrown and sent back via GraphQL.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphQLRequestError extends DaggerSDKError {
|
|
11
|
+
name: string;
|
|
12
|
+
code: string;
|
|
13
|
+
/**
|
|
14
|
+
* The query and variables, which caused the error.
|
|
15
|
+
*/
|
|
16
|
+
requestContext: GraphQLRequestContext;
|
|
17
|
+
/**
|
|
18
|
+
* the GraphQL response containing the error.
|
|
19
|
+
*/
|
|
20
|
+
response: GraphQLResponse;
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
constructor(message: string, options: GraphQLRequestErrorOptions);
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=GraphQLRequestError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphQLRequestError.d.ts","sourceRoot":"","sources":["../../../common/errors/GraphQLRequestError.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,eAAe,EAChB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,UAAU,0BAA2B,SAAQ,qBAAqB;IAChE,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,qBAAqB,CAAA;CAC/B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IAC9C,IAAI,SAAwB;IAC5B,IAAI,SAAS;IAEpB;;OAEG;IACH,cAAc,EAAE,qBAAqB,CAAA;IAErC;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAA;IAEzB;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,0BAA0B;CAKjE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error originates from the dagger engine. It means that some error was thrown and sent back via GraphQL.
|
|
4
|
+
*/
|
|
5
|
+
export class GraphQLRequestError extends DaggerSDKError {
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
constructor(message, options) {
|
|
10
|
+
super(message, options);
|
|
11
|
+
this.name = "GraphQLRequestError";
|
|
12
|
+
this.code = "D100";
|
|
13
|
+
this.requestContext = options.request;
|
|
14
|
+
this.response = options.response;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown if the dagger binary cannot be copied from the dagger docker image and copied to the local host.
|
|
4
|
+
*/
|
|
5
|
+
export declare class InitEngineSessionBinaryError extends DaggerSDKError {
|
|
6
|
+
name: string;
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
constructor(message: string, options?: DaggerSDKErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=InitEngineSessionBinaryError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitEngineSessionBinaryError.d.ts","sourceRoot":"","sources":["../../../common/errors/InitEngineSessionBinaryError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3E;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc;IAC9D,IAAI,SAAiC;IACrC,IAAI,SAAS;IAEb;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB;CAG7D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown if the dagger binary cannot be copied from the dagger docker image and copied to the local host.
|
|
4
|
+
*/
|
|
5
|
+
export class InitEngineSessionBinaryError extends DaggerSDKError {
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
constructor(message, options) {
|
|
10
|
+
super(message, options);
|
|
11
|
+
this.name = "InitEngineSessionBinaryError";
|
|
12
|
+
this.code = "D105";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
interface TooManyNestedObjectsErrorOptions extends DaggerSDKErrorOptions {
|
|
3
|
+
response: unknown;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Dagger only expects one response value from the engine. If the engine returns more than one value this error is thrown.
|
|
7
|
+
*/
|
|
8
|
+
export declare class TooManyNestedObjectsError extends DaggerSDKError {
|
|
9
|
+
name: string;
|
|
10
|
+
code: string;
|
|
11
|
+
/**
|
|
12
|
+
* the response containing more than one value.
|
|
13
|
+
*/
|
|
14
|
+
response: unknown;
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
constructor(message: string, options: TooManyNestedObjectsErrorOptions);
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=TooManyNestedObjectsError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooManyNestedObjectsError.d.ts","sourceRoot":"","sources":["../../../common/errors/TooManyNestedObjectsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,UAAU,gCAAiC,SAAQ,qBAAqB;IACtE,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,cAAc;IAC3D,IAAI,SAA8B;IAClC,IAAI,SAAS;IAEb;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gCAAgC;CAIvE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* Dagger only expects one response value from the engine. If the engine returns more than one value this error is thrown.
|
|
4
|
+
*/
|
|
5
|
+
export class TooManyNestedObjectsError extends DaggerSDKError {
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
constructor(message, options) {
|
|
10
|
+
super(message, options);
|
|
11
|
+
this.name = "TooManyNestedObjectsError";
|
|
12
|
+
this.code = "D102";
|
|
13
|
+
this.response = options.response;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown if the dagger SDK does not identify the error and just wraps the cause.
|
|
4
|
+
*/
|
|
5
|
+
export declare class UnknownDaggerError extends DaggerSDKError {
|
|
6
|
+
name: string;
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
constructor(message: string, options: DaggerSDKErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=UnknownDaggerError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownDaggerError.d.ts","sourceRoot":"","sources":["../../../common/errors/UnknownDaggerError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3E;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,IAAI,SAAuB;IAC3B,IAAI,SAAS;IAEb;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;CAG5D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown if the dagger SDK does not identify the error and just wraps the cause.
|
|
4
|
+
*/
|
|
5
|
+
export class UnknownDaggerError extends DaggerSDKError {
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
constructor(message, options) {
|
|
10
|
+
super(message, options);
|
|
11
|
+
this.name = "UnknownDaggerError";
|
|
12
|
+
this.code = "D101";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
export { UnknownDaggerError } from "./UnknownDaggerError.js";
|
|
3
|
+
export { DockerImageRefValidationError } from "./DockerImageRefValidationError.js";
|
|
4
|
+
export { EngineSessionPortParseError } from "./EngineSessionPortParseError.js";
|
|
5
|
+
export { GraphQLRequestError } from "./GraphQLRequestError.js";
|
|
6
|
+
export { InitEngineSessionBinaryError } from "./InitEngineSessionBinaryError.js";
|
|
7
|
+
export { TooManyNestedObjectsError } from "./TooManyNestedObjectsError.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../common/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAA;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
export { UnknownDaggerError } from "./UnknownDaggerError.js";
|
|
3
|
+
export { DockerImageRefValidationError } from "./DockerImageRefValidationError.js";
|
|
4
|
+
export { EngineSessionPortParseError } from "./EngineSessionPortParseError.js";
|
|
5
|
+
export { GraphQLRequestError } from "./GraphQLRequestError.js";
|
|
6
|
+
export { InitEngineSessionBinaryError } from "./InitEngineSessionBinaryError.js";
|
|
7
|
+
export { TooManyNestedObjectsError } from "./TooManyNestedObjectsError.js";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const log: (stack?: string) => {
|
|
2
|
+
command: string;
|
|
3
|
+
lastCommand: string;
|
|
4
|
+
level: any;
|
|
5
|
+
noColor: boolean;
|
|
6
|
+
setLevel(level: "debug" | "info" | "warn" | "error" | "disable" | "success"): void;
|
|
7
|
+
createNamedLogger(name: string): any;
|
|
8
|
+
setLevelNoColor(): void;
|
|
9
|
+
setLevelColor(): void;
|
|
10
|
+
isLevelValid(level: "debug" | "info" | "warn" | "error" | "disable" | "success"): boolean;
|
|
11
|
+
isAllowedLevel(level: "debug" | "info" | "warn" | "error" | "disable" | "success"): boolean;
|
|
12
|
+
checkSetting(setting: {
|
|
13
|
+
bold?: boolean | undefined;
|
|
14
|
+
italic?: boolean | undefined;
|
|
15
|
+
dim?: boolean | undefined;
|
|
16
|
+
underscore?: boolean | undefined;
|
|
17
|
+
reverse?: boolean | undefined;
|
|
18
|
+
strikethrough?: boolean | undefined;
|
|
19
|
+
}): string;
|
|
20
|
+
joint(): any;
|
|
21
|
+
setDate(callback: Function): void;
|
|
22
|
+
getDate(): string;
|
|
23
|
+
color(ticket: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white"): any;
|
|
24
|
+
bgColor(ticket: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white"): any;
|
|
25
|
+
bold(): any;
|
|
26
|
+
dim(): any;
|
|
27
|
+
underscore(): any;
|
|
28
|
+
strikethrough(): any;
|
|
29
|
+
reverse(): any;
|
|
30
|
+
italic(): any;
|
|
31
|
+
fontColorLog(ticket: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white", text: string, setting?: {
|
|
32
|
+
bold?: boolean | undefined;
|
|
33
|
+
italic?: boolean | undefined;
|
|
34
|
+
dim?: boolean | undefined;
|
|
35
|
+
underscore?: boolean | undefined;
|
|
36
|
+
reverse?: boolean | undefined;
|
|
37
|
+
strikethrough?: boolean | undefined;
|
|
38
|
+
} | undefined): void;
|
|
39
|
+
bgColorLog(ticket: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white", text: string, setting?: {
|
|
40
|
+
bold?: boolean | undefined;
|
|
41
|
+
italic?: boolean | undefined;
|
|
42
|
+
dim?: boolean | undefined;
|
|
43
|
+
underscore?: boolean | undefined;
|
|
44
|
+
reverse?: boolean | undefined;
|
|
45
|
+
strikethrough?: boolean | undefined;
|
|
46
|
+
} | undefined): void;
|
|
47
|
+
colorLog(ticketObj: {
|
|
48
|
+
font?: ("black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white") | undefined;
|
|
49
|
+
bg?: ("black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white") | undefined;
|
|
50
|
+
}, text: string, setting?: {
|
|
51
|
+
bold?: boolean | undefined;
|
|
52
|
+
italic?: boolean | undefined;
|
|
53
|
+
dim?: boolean | undefined;
|
|
54
|
+
underscore?: boolean | undefined;
|
|
55
|
+
reverse?: boolean | undefined;
|
|
56
|
+
strikethrough?: boolean | undefined;
|
|
57
|
+
} | undefined): void;
|
|
58
|
+
log(...args: any[]): any;
|
|
59
|
+
error(...args: any[]): void;
|
|
60
|
+
warn(...args: any[]): void;
|
|
61
|
+
info(...args: any[]): void;
|
|
62
|
+
debug(...args: any[]): void;
|
|
63
|
+
success(...args: any[]): void;
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../common/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,WAAY,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACe,CAAA"}
|
package/dist/connect.d.ts
CHANGED
|
@@ -9,12 +9,11 @@ export interface ConnectOpts {
|
|
|
9
9
|
ConfigPath?: string;
|
|
10
10
|
LogOutput?: Writable;
|
|
11
11
|
}
|
|
12
|
-
type CallbackFct = (client: Client) => Promise<void>;
|
|
12
|
+
export type CallbackFct = (client: Client) => Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* connect runs GraphQL server and initializes a
|
|
15
15
|
* GraphQL client to execute query on it through its callback.
|
|
16
16
|
* This implementation is based on the existing Go SDK.
|
|
17
17
|
*/
|
|
18
18
|
export declare function connect(cb: CallbackFct, config?: ConnectOpts): Promise<void>;
|
|
19
|
-
export {};
|
|
20
19
|
//# sourceMappingURL=connect.d.ts.map
|
package/dist/connect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../connect.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,QAAQ,CAAA;CACrB;AAED,
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../connect.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,QAAQ,CAAA;CACrB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAE3D;;;;GAIG;AACH,wBAAsB,OAAO,CAC3B,EAAE,EAAE,WAAW,EACf,MAAM,GAAE,WAAgB,GACvB,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Client from "./api/client.gen.js";
|
|
2
2
|
export { gql } from "graphql-tag";
|
|
3
3
|
export { GraphQLClient } from "graphql-request";
|
|
4
|
-
export { connect, ConnectOpts } from "./connect.js";
|
|
4
|
+
export { connect, ConnectOpts, CallbackFct } from "./connect.js";
|
|
5
5
|
export { getProvisioner } from "./provisioning/index.js";
|
|
6
6
|
export default Client;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../provisioning/bin/bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,MAAM,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../provisioning/bin/bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAG5C;;GAEG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,OAAO,CAAC,UAAU,CAAC,CAAmB;IAEtC,OAAO,CAAC,IAAI,CAAQ;gBAER,CAAC,EAAE,GAAG;IAQlB,IAAI,IAAI,MAAM;IAIR,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjD;;;;OAIG;YACW,gBAAgB;YAyChB,QAAQ;IAiBhB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
|
|
@@ -17,6 +17,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
17
17
|
import readline from "readline";
|
|
18
18
|
import { execaCommand } from "execa";
|
|
19
19
|
import Client from "../../api/client.gen.js";
|
|
20
|
+
import { EngineSessionPortParseError } from "../../common/errors/index.js";
|
|
20
21
|
/**
|
|
21
22
|
* Bin runs an engine session from a specified binary
|
|
22
23
|
*/
|
|
@@ -63,7 +64,7 @@ export class Bin {
|
|
|
63
64
|
this.readPort(stdoutReader),
|
|
64
65
|
new Promise((_, reject) => {
|
|
65
66
|
setTimeout(() => {
|
|
66
|
-
reject(new
|
|
67
|
+
reject(new EngineSessionPortParseError("timeout reading port from engine session"));
|
|
67
68
|
}, 300000).unref(); // long timeout to account for extensions, though that should be optimized in future
|
|
68
69
|
}),
|
|
69
70
|
]);
|
|
@@ -82,6 +83,9 @@ export class Bin {
|
|
|
82
83
|
const line = _d;
|
|
83
84
|
// Read line as a port number
|
|
84
85
|
const port = parseInt(line);
|
|
86
|
+
if (isNaN(port)) {
|
|
87
|
+
throw new EngineSessionPortParseError(`failed to parse port from engine session while parsing: ${line}`, { parsedLine: line });
|
|
88
|
+
}
|
|
85
89
|
return port;
|
|
86
90
|
}
|
|
87
91
|
finally {
|
|
@@ -96,7 +100,7 @@ export class Bin {
|
|
|
96
100
|
}
|
|
97
101
|
finally { if (e_1) throw e_1.error; }
|
|
98
102
|
}
|
|
99
|
-
throw new
|
|
103
|
+
throw new EngineSessionPortParseError("No line was found to parse the engine port");
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
Close() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../provisioning/docker-provision/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAM1D,OAAO,MAAM,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../provisioning/docker-provision/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAM1D,OAAO,MAAM,MAAM,yBAAyB,CAAA;AA4D5C;;;GAGG;AACH,qBAAa,WAAY,YAAW,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAGxB;IAED,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAA0B;IAEvE,OAAO,CAAC,UAAU,CAAC,CAAmB;gBAE1B,CAAC,EAAE,GAAG;IAIlB;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB,IAAI,IAAI,MAAM;IAIR,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAWjD;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAWpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAiE5B;;;OAGG;YACW,gBAAgB;YAgDhB,QAAQ;IAiBhB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
|
|
@@ -20,6 +20,7 @@ import * as os from "os";
|
|
|
20
20
|
import readline from "readline";
|
|
21
21
|
import { execaCommandSync, execaCommand } from "execa";
|
|
22
22
|
import Client from "../../api/client.gen.js";
|
|
23
|
+
import { DockerImageRefValidationError, EngineSessionPortParseError, InitEngineSessionBinaryError, } from "../../common/errors/index.js";
|
|
23
24
|
/**
|
|
24
25
|
* ImageRef is a simple abstraction of docker image reference.
|
|
25
26
|
*/
|
|
@@ -52,7 +53,9 @@ class ImageRef {
|
|
|
52
53
|
*/
|
|
53
54
|
static validate(ref) {
|
|
54
55
|
if (!ref.includes("@sha256:")) {
|
|
55
|
-
throw new
|
|
56
|
+
throw new DockerImageRefValidationError(`no digest found in ref ${ref}`, {
|
|
57
|
+
ref: ref,
|
|
58
|
+
});
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -168,7 +171,7 @@ export class DockerImage {
|
|
|
168
171
|
}
|
|
169
172
|
catch (e) {
|
|
170
173
|
fs.rmSync(tmpBinPath);
|
|
171
|
-
throw new
|
|
174
|
+
throw new InitEngineSessionBinaryError(`failed to copy engine session binary: ${e}`, { cause: e });
|
|
172
175
|
}
|
|
173
176
|
// Remove all temporary binary files
|
|
174
177
|
// Ignore current engine session binary or other files that have not be
|
|
@@ -220,7 +223,7 @@ export class DockerImage {
|
|
|
220
223
|
this.readPort(stdoutReader),
|
|
221
224
|
new Promise((_, reject) => {
|
|
222
225
|
setTimeout(() => {
|
|
223
|
-
reject(new
|
|
226
|
+
reject(new EngineSessionPortParseError("timeout reading port from engine session"));
|
|
224
227
|
}, 300000).unref(); // long timeout to account for extensions, though that should be optimized in future
|
|
225
228
|
}),
|
|
226
229
|
]);
|
|
@@ -239,6 +242,9 @@ export class DockerImage {
|
|
|
239
242
|
const line = _d;
|
|
240
243
|
// Read line as a port number
|
|
241
244
|
const port = parseInt(line);
|
|
245
|
+
if (isNaN(port)) {
|
|
246
|
+
throw new EngineSessionPortParseError(`failed to parse port from engine session while parsing: ${line}`, { parsedLine: line });
|
|
247
|
+
}
|
|
242
248
|
return port;
|
|
243
249
|
}
|
|
244
250
|
finally {
|
|
@@ -253,7 +259,7 @@ export class DockerImage {
|
|
|
253
259
|
}
|
|
254
260
|
finally { if (e_1) throw e_1.error; }
|
|
255
261
|
}
|
|
256
|
-
throw new
|
|
262
|
+
throw new EngineSessionPortParseError("No line was found to parse the engine port");
|
|
257
263
|
});
|
|
258
264
|
}
|
|
259
265
|
Close() {
|