@dagger.io/dagger 0.13.3 → 0.13.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.
- package/dist/api/client.gen.d.ts +3846 -0
- package/dist/api/client.gen.d.ts.map +1 -0
- package/dist/api/client.gen.js +7207 -0
- package/dist/api/utils.d.ts +28 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/api/utils.js +170 -0
- package/dist/common/errors/DaggerSDKError.d.ts +32 -0
- package/dist/common/errors/DaggerSDKError.d.ts.map +1 -0
- package/dist/common/errors/DaggerSDKError.js +26 -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 +21 -0
- package/dist/common/errors/EngineSessionConnectParamsParseError.d.ts +21 -0
- package/dist/common/errors/EngineSessionConnectParamsParseError.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionConnectParamsParseError.js +20 -0
- package/dist/common/errors/EngineSessionConnectionTimeoutError.d.ts +21 -0
- package/dist/common/errors/EngineSessionConnectionTimeoutError.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionConnectionTimeoutError.js +20 -0
- package/dist/common/errors/EngineSessionErrorOptions.d.ts +16 -0
- package/dist/common/errors/EngineSessionErrorOptions.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionErrorOptions.js +16 -0
- package/dist/common/errors/ExecError.d.ts +37 -0
- package/dist/common/errors/ExecError.d.ts.map +1 -0
- package/dist/common/errors/ExecError.js +38 -0
- package/dist/common/errors/GraphQLRequestError.d.ts +26 -0
- package/dist/common/errors/GraphQLRequestError.d.ts.map +1 -0
- package/dist/common/errors/GraphQLRequestError.js +25 -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 +15 -0
- package/dist/common/errors/NotAwaitedRequestError.d.ts +13 -0
- package/dist/common/errors/NotAwaitedRequestError.d.ts.map +1 -0
- package/dist/common/errors/NotAwaitedRequestError.js +15 -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 +20 -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 +15 -0
- package/dist/common/errors/errors-codes.d.ts +51 -0
- package/dist/common/errors/errors-codes.d.ts.map +1 -0
- package/dist/common/errors/errors-codes.js +43 -0
- package/dist/common/errors/index.d.ts +13 -0
- package/dist/common/errors/index.d.ts.map +1 -0
- package/dist/common/errors/index.js +12 -0
- package/dist/common/utils.d.ts +68 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +2 -0
- package/dist/connect.d.ts +32 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +66 -0
- package/dist/connectOpts.d.ts +24 -0
- package/dist/connectOpts.d.ts.map +1 -0
- package/dist/connectOpts.js +1 -0
- package/dist/context/builder.d.ts +9 -0
- package/dist/context/builder.d.ts.map +1 -0
- package/dist/context/builder.js +34 -0
- package/dist/context/context.d.ts +40 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.js +53 -0
- package/dist/entrypoint/context.d.ts +8 -0
- package/dist/entrypoint/context.d.ts.map +1 -0
- package/dist/entrypoint/context.js +1 -0
- package/dist/entrypoint/entrypoint.d.ts +2 -0
- package/dist/entrypoint/entrypoint.d.ts.map +1 -0
- package/dist/entrypoint/entrypoint.js +71 -0
- package/dist/entrypoint/invoke.d.ts +13 -0
- package/dist/entrypoint/invoke.d.ts.map +1 -0
- package/dist/entrypoint/invoke.js +40 -0
- package/dist/entrypoint/load.d.ts +56 -0
- package/dist/entrypoint/load.d.ts.map +1 -0
- package/dist/entrypoint/load.js +198 -0
- package/dist/entrypoint/register.d.ts +7 -0
- package/dist/entrypoint/register.d.ts.map +1 -0
- package/dist/entrypoint/register.js +139 -0
- package/dist/graphql/client.d.ts +3 -0
- package/dist/graphql/client.d.ts.map +1 -0
- package/dist/graphql/client.js +48 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/introspector/decorators/decorators.d.ts +44 -0
- package/dist/introspector/decorators/decorators.d.ts.map +1 -0
- package/dist/introspector/decorators/decorators.js +47 -0
- package/dist/introspector/registry/registry.d.ts +89 -0
- package/dist/introspector/registry/registry.d.ts.map +1 -0
- package/dist/introspector/registry/registry.js +115 -0
- package/dist/introspector/scanner/abtractions/argument.d.ts +104 -0
- package/dist/introspector/scanner/abtractions/argument.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/argument.js +207 -0
- package/dist/introspector/scanner/abtractions/constructor.d.ts +17 -0
- package/dist/introspector/scanner/abtractions/constructor.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/constructor.js +40 -0
- package/dist/introspector/scanner/abtractions/enum.d.ts +33 -0
- package/dist/introspector/scanner/abtractions/enum.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/enum.js +73 -0
- package/dist/introspector/scanner/abtractions/enumValue.d.ts +24 -0
- package/dist/introspector/scanner/abtractions/enumValue.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/enumValue.js +51 -0
- package/dist/introspector/scanner/abtractions/method.d.ts +67 -0
- package/dist/introspector/scanner/abtractions/method.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/method.js +132 -0
- package/dist/introspector/scanner/abtractions/module.d.ts +26 -0
- package/dist/introspector/scanner/abtractions/module.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/module.js +103 -0
- package/dist/introspector/scanner/abtractions/object.d.ts +52 -0
- package/dist/introspector/scanner/abtractions/object.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/object.js +118 -0
- package/dist/introspector/scanner/abtractions/property.d.ts +55 -0
- package/dist/introspector/scanner/abtractions/property.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/property.js +110 -0
- package/dist/introspector/scanner/abtractions/typeToTypedef.d.ts +8 -0
- package/dist/introspector/scanner/abtractions/typeToTypedef.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/typeToTypedef.js +85 -0
- package/dist/introspector/scanner/scan.d.ts +14 -0
- package/dist/introspector/scanner/scan.d.ts.map +1 -0
- package/dist/introspector/scanner/scan.js +26 -0
- package/dist/introspector/scanner/typeDefs.d.ts +45 -0
- package/dist/introspector/scanner/typeDefs.d.ts.map +1 -0
- package/dist/introspector/scanner/typeDefs.js +1 -0
- package/dist/introspector/scanner/utils.d.ts +22 -0
- package/dist/introspector/scanner/utils.d.ts.map +1 -0
- package/dist/introspector/scanner/utils.js +101 -0
- package/dist/introspector/utils/files.d.ts +5 -0
- package/dist/introspector/utils/files.d.ts.map +1 -0
- package/dist/introspector/utils/files.js +28 -0
- package/dist/provisioning/bin.d.ts +77 -0
- package/dist/provisioning/bin.d.ts.map +1 -0
- package/dist/provisioning/bin.js +353 -0
- package/dist/provisioning/default.d.ts +2 -0
- package/dist/provisioning/default.d.ts.map +1 -0
- package/dist/provisioning/default.js +2 -0
- package/dist/provisioning/engineconn.d.ts +28 -0
- package/dist/provisioning/engineconn.d.ts.map +1 -0
- package/dist/provisioning/engineconn.js +1 -0
- package/dist/provisioning/index.d.ts +4 -0
- package/dist/provisioning/index.d.ts.map +1 -0
- package/dist/provisioning/index.js +3 -0
- package/dist/telemetry/attributes.d.ts +2 -0
- package/dist/telemetry/attributes.d.ts.map +1 -0
- package/dist/telemetry/attributes.js +1 -0
- package/dist/telemetry/index.d.ts +3 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +2 -0
- package/dist/telemetry/init.d.ts +21 -0
- package/dist/telemetry/init.d.ts.map +1 -0
- package/dist/telemetry/init.js +66 -0
- package/dist/telemetry/telemetry.d.ts +16 -0
- package/dist/telemetry/telemetry.d.ts.map +1 -0
- package/dist/telemetry/telemetry.js +38 -0
- package/dist/telemetry/tracer.d.ts +32 -0
- package/dist/telemetry/tracer.d.ts.map +1 -0
- package/dist/telemetry/tracer.js +54 -0
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GraphQLClient } from "graphql-request";
|
|
2
|
+
import { QueryTree } from "./client.gen.js";
|
|
3
|
+
/**
|
|
4
|
+
* Convert the queryTree into a GraphQL query
|
|
5
|
+
* @param q
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildQuery(q: QueryTree[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* Convert querytree into a Graphql query then compute it
|
|
11
|
+
* @param q | QueryTree[]
|
|
12
|
+
* @param client | GraphQLClient
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function computeQuery<T>(q: QueryTree[], client: GraphQLClient): Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Return a Graphql query result flattened
|
|
18
|
+
* @param response any
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function queryFlatten<T>(response: any): T;
|
|
22
|
+
/**
|
|
23
|
+
* Send a GraphQL document to the server
|
|
24
|
+
* return a flatten result
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare function compute<T>(query: string, client: GraphQLClient): Promise<T>;
|
|
28
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../api/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AASjE,OAAO,EAAY,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAkHrD;;;;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,CAMZ;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,CAuBhD;AAED;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,CAAC,EAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,CAAC,CAAC,CA4CZ"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { ClientError, gql } from "graphql-request";
|
|
3
|
+
import { GraphQLRequestError, TooManyNestedObjectsError, UnknownDaggerError, NotAwaitedRequestError, ExecError, } from "../common/errors/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Format argument into GraphQL query format.
|
|
6
|
+
*/
|
|
7
|
+
function buildArgs(args) {
|
|
8
|
+
const metadata = args.__metadata || {};
|
|
9
|
+
// Remove unwanted quotes
|
|
10
|
+
const formatValue = (key, value) => {
|
|
11
|
+
// Special treatment for enumeration, they must be inserted without quotes
|
|
12
|
+
if (metadata[key]?.is_enum) {
|
|
13
|
+
return JSON.stringify(value).replace(/['"]+/g, "");
|
|
14
|
+
}
|
|
15
|
+
return JSON.stringify(value).replace(/\{"[a-zA-Z]+":|,"[a-zA-Z]+":/gi, (str) => {
|
|
16
|
+
return str.replace(/"/g, "");
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
if (args === undefined || args === null) {
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
const formattedArgs = Object.entries(args).reduce((acc, [key, value]) => {
|
|
23
|
+
// Ignore internal metadata key
|
|
24
|
+
if (key === "__metadata") {
|
|
25
|
+
return acc;
|
|
26
|
+
}
|
|
27
|
+
if (value !== undefined && value !== null) {
|
|
28
|
+
acc.push(`${key}: ${formatValue(key, value)}`);
|
|
29
|
+
}
|
|
30
|
+
return acc;
|
|
31
|
+
}, []);
|
|
32
|
+
if (formattedArgs.length === 0) {
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
return `(${formattedArgs})`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find QueryTree, convert them into GraphQl query
|
|
39
|
+
* then compute and return the result to the appropriate field
|
|
40
|
+
*/
|
|
41
|
+
async function computeNestedQuery(query, client) {
|
|
42
|
+
// Check if there is a nested queryTree to be executed
|
|
43
|
+
const isQueryTree = (value) => value["_queryTree"] !== undefined;
|
|
44
|
+
// Check if there is a nested array of queryTree to be executed
|
|
45
|
+
const isArrayQueryTree = (value) => value.every((v) => v instanceof Object && isQueryTree(v));
|
|
46
|
+
// Prepare query tree for final query by computing nested queries
|
|
47
|
+
// and building it with their results.
|
|
48
|
+
const computeQueryTree = async (value) => {
|
|
49
|
+
// Resolve sub queries if operation's args is a subquery
|
|
50
|
+
for (const op of value["_queryTree"]) {
|
|
51
|
+
await computeNestedQuery([op], client);
|
|
52
|
+
}
|
|
53
|
+
// push an id that will be used by the container
|
|
54
|
+
return buildQuery([
|
|
55
|
+
...value["_queryTree"],
|
|
56
|
+
{
|
|
57
|
+
operation: "id",
|
|
58
|
+
},
|
|
59
|
+
]);
|
|
60
|
+
};
|
|
61
|
+
// Remove all undefined args and assert args type
|
|
62
|
+
const queryToExec = query.filter((q) => !!q.args);
|
|
63
|
+
for (const q of queryToExec) {
|
|
64
|
+
await Promise.all(
|
|
65
|
+
// Compute nested query for single object
|
|
66
|
+
Object.entries(q.args).map(async ([key, value]) => {
|
|
67
|
+
if (value instanceof Object && isQueryTree(value)) {
|
|
68
|
+
// push an id that will be used by the container
|
|
69
|
+
const getQueryTree = await computeQueryTree(value);
|
|
70
|
+
q.args[key] = await compute(getQueryTree, client);
|
|
71
|
+
}
|
|
72
|
+
// Compute nested query for array of object
|
|
73
|
+
if (Array.isArray(value) && isArrayQueryTree(value)) {
|
|
74
|
+
const tmp = q.args[key];
|
|
75
|
+
for (let i = 0; i < value.length; i++) {
|
|
76
|
+
// push an id that will be used by the container
|
|
77
|
+
const getQueryTree = await computeQueryTree(value[i]);
|
|
78
|
+
tmp[i] = await compute(getQueryTree, client);
|
|
79
|
+
}
|
|
80
|
+
q.args[key] = tmp;
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Convert the queryTree into a GraphQL query
|
|
87
|
+
* @param q
|
|
88
|
+
* @returns
|
|
89
|
+
*/
|
|
90
|
+
export function buildQuery(q) {
|
|
91
|
+
const query = q.reduce((acc, { operation, args }, i) => {
|
|
92
|
+
const qLen = q.length;
|
|
93
|
+
acc += ` ${operation} ${args ? `${buildArgs(args)}` : ""} ${qLen - 1 !== i ? "{" : "}".repeat(qLen - 1)}`;
|
|
94
|
+
return acc;
|
|
95
|
+
}, "");
|
|
96
|
+
return `{${query} }`;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Convert querytree into a Graphql query then compute it
|
|
100
|
+
* @param q | QueryTree[]
|
|
101
|
+
* @param client | GraphQLClient
|
|
102
|
+
* @returns
|
|
103
|
+
*/
|
|
104
|
+
export async function computeQuery(q, client) {
|
|
105
|
+
await computeNestedQuery(q, client);
|
|
106
|
+
const query = buildQuery(q);
|
|
107
|
+
return await compute(query, client);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Return a Graphql query result flattened
|
|
111
|
+
* @param response any
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
export function queryFlatten(response) {
|
|
115
|
+
// Recursion break condition
|
|
116
|
+
// If our response is not an object or an array we assume we reached the value
|
|
117
|
+
if (!(response instanceof Object) || Array.isArray(response)) {
|
|
118
|
+
return response;
|
|
119
|
+
}
|
|
120
|
+
const keys = Object.keys(response);
|
|
121
|
+
if (keys.length != 1) {
|
|
122
|
+
// Dagger is currently expecting to only return one value
|
|
123
|
+
// If the response is nested in a way were more than one object is nested inside throw an error
|
|
124
|
+
throw new TooManyNestedObjectsError("Too many nested objects inside graphql response", {
|
|
125
|
+
response: response,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
const nestedKey = keys[0];
|
|
129
|
+
return queryFlatten(response[nestedKey]);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Send a GraphQL document to the server
|
|
133
|
+
* return a flatten result
|
|
134
|
+
* @hidden
|
|
135
|
+
*/
|
|
136
|
+
export async function compute(query, client) {
|
|
137
|
+
let computeQuery;
|
|
138
|
+
try {
|
|
139
|
+
computeQuery = await client.request(gql `
|
|
140
|
+
${query}
|
|
141
|
+
`);
|
|
142
|
+
}
|
|
143
|
+
catch (e) {
|
|
144
|
+
if (e instanceof ClientError) {
|
|
145
|
+
const msg = e.response.errors?.[0]?.message ?? `API Error`;
|
|
146
|
+
const ext = e.response.errors?.[0]?.extensions;
|
|
147
|
+
if (ext?._type === "EXEC_ERROR") {
|
|
148
|
+
throw new ExecError(msg, {
|
|
149
|
+
cmd: ext.cmd ?? [],
|
|
150
|
+
exitCode: ext.exitCode ?? -1,
|
|
151
|
+
stdout: ext.stdout ?? "",
|
|
152
|
+
stderr: ext.stderr ?? "",
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
throw new GraphQLRequestError(msg, {
|
|
156
|
+
error: e,
|
|
157
|
+
cause: e,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
// Looking for connection error in case the function has not been awaited.
|
|
161
|
+
if (e.errno === "ECONNREFUSED") {
|
|
162
|
+
throw new NotAwaitedRequestError("Encountered an error while requesting data via graphql through a synchronous call. Make sure the function called is awaited.", { cause: e });
|
|
163
|
+
}
|
|
164
|
+
// Just throw the unknown error
|
|
165
|
+
throw new UnknownDaggerError("Encountered an unknown error while requesting data via graphql", {
|
|
166
|
+
cause: e,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return queryFlatten(computeQuery);
|
|
170
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ErrorCodes, ErrorNames } from "./errors-codes.js";
|
|
2
|
+
export interface DaggerSDKErrorOptions {
|
|
3
|
+
cause?: Error;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The base error. Every other error inherits this error.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class DaggerSDKError extends Error {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the dagger error.
|
|
11
|
+
*/
|
|
12
|
+
abstract readonly name: ErrorNames;
|
|
13
|
+
/**
|
|
14
|
+
* The dagger specific error code.
|
|
15
|
+
* Use this to identify dagger errors programmatically.
|
|
16
|
+
*/
|
|
17
|
+
abstract readonly code: ErrorCodes;
|
|
18
|
+
/**
|
|
19
|
+
* The original error, which caused the DaggerSDKError.
|
|
20
|
+
*/
|
|
21
|
+
cause?: Error;
|
|
22
|
+
protected constructor(message: string, options?: DaggerSDKErrorOptions);
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
get [Symbol.toStringTag](): "GraphQLRequestError" | "UnknownDaggerError" | "TooManyNestedObjectsError" | "EngineSessionConnectParamsParseError" | "EngineSessionConnectionTimeoutError" | "EngineSessionError" | "InitEngineSessionBinaryError" | "DockerImageRefValidationError" | "NotAwaitedRequestError" | "ExecError";
|
|
27
|
+
/**
|
|
28
|
+
* Pretty prints the error
|
|
29
|
+
*/
|
|
30
|
+
printStackTrace(): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=DaggerSDKError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DaggerSDKError.d.ts","sourceRoot":"","sources":["../../../common/errors/DaggerSDKError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE1D,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED;;GAEG;AACH,8BAAsB,cAAe,SAAQ,KAAK;IAChD;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IAElC;;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,mSAEvB;IAED;;OAEG;IACH,eAAe;CAGhB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* The original error, which caused the DaggerSDKError.
|
|
8
|
+
*/
|
|
9
|
+
cause;
|
|
10
|
+
constructor(message, options) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.cause = options?.cause;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
get [Symbol.toStringTag]() {
|
|
18
|
+
return this.name;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Pretty prints the error
|
|
22
|
+
*/
|
|
23
|
+
printStackTrace() {
|
|
24
|
+
log(this.stack);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -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: "DockerImageRefValidationError";
|
|
11
|
+
code: "D107";
|
|
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;AAG3E,UAAU,oCAAqC,SAAQ,qBAAqB;IAC1E,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,cAAc;IAC/D,IAAI,kCAA4C;IAChD,IAAI,SAA4C;IAEhD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,oCAAoC;CAI3E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown if the passed image reference does not pass validation and is not compliant with the
|
|
5
|
+
* DockerImage constructor.
|
|
6
|
+
*/
|
|
7
|
+
export class DockerImageRefValidationError extends DaggerSDKError {
|
|
8
|
+
name = ERROR_NAMES.DockerImageRefValidationError;
|
|
9
|
+
code = ERROR_CODES.DockerImageRefValidationError;
|
|
10
|
+
/**
|
|
11
|
+
* The docker image reference, which caused the error.
|
|
12
|
+
*/
|
|
13
|
+
ref;
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
constructor(message, options) {
|
|
18
|
+
super(message, options);
|
|
19
|
+
this.ref = options?.ref;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
interface EngineSessionConnectParamsParseErrorOptions extends DaggerSDKErrorOptions {
|
|
3
|
+
parsedLine: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown if the EngineSession does not manage to parse the required connection parameters from the session binary
|
|
7
|
+
*/
|
|
8
|
+
export declare class EngineSessionConnectParamsParseError extends DaggerSDKError {
|
|
9
|
+
name: "EngineSessionConnectParamsParseError";
|
|
10
|
+
code: "D103";
|
|
11
|
+
/**
|
|
12
|
+
* the line, which caused the error during parsing, if the error was caused because of parsing.
|
|
13
|
+
*/
|
|
14
|
+
parsedLine: string;
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
constructor(message: string, options: EngineSessionConnectParamsParseErrorOptions);
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=EngineSessionConnectParamsParseError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineSessionConnectParamsParseError.d.ts","sourceRoot":"","sources":["../../../common/errors/EngineSessionConnectParamsParseError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG3E,UAAU,2CACR,SAAQ,qBAAqB;IAC7B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,cAAc;IACtE,IAAI,yCAAmD;IACvD,IAAI,SAAmD;IAEvD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;OAEG;gBAED,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,2CAA2C;CAKvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown if the EngineSession does not manage to parse the required connection parameters from the session binary
|
|
5
|
+
*/
|
|
6
|
+
export class EngineSessionConnectParamsParseError extends DaggerSDKError {
|
|
7
|
+
name = ERROR_NAMES.EngineSessionConnectParamsParseError;
|
|
8
|
+
code = ERROR_CODES.EngineSessionConnectParamsParseError;
|
|
9
|
+
/**
|
|
10
|
+
* the line, which caused the error during parsing, if the error was caused because of parsing.
|
|
11
|
+
*/
|
|
12
|
+
parsedLine;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
constructor(message, options) {
|
|
17
|
+
super(message, options);
|
|
18
|
+
this.parsedLine = options.parsedLine;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
interface EngineSessionConnectionTimeoutErrorOptions extends DaggerSDKErrorOptions {
|
|
3
|
+
timeOutDuration: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown if the EngineSession does not manage to parse the required port successfully because the sessions connection timed out.
|
|
7
|
+
*/
|
|
8
|
+
export declare class EngineSessionConnectionTimeoutError extends DaggerSDKError {
|
|
9
|
+
name: "EngineSessionConnectionTimeoutError";
|
|
10
|
+
code: "D104";
|
|
11
|
+
/**
|
|
12
|
+
* The duration until the timeout occurred in ms.
|
|
13
|
+
*/
|
|
14
|
+
timeOutDuration: number;
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
constructor(message: string, options: EngineSessionConnectionTimeoutErrorOptions);
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=EngineSessionConnectionTimeoutError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineSessionConnectionTimeoutError.d.ts","sourceRoot":"","sources":["../../../common/errors/EngineSessionConnectionTimeoutError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG3E,UAAU,0CACR,SAAQ,qBAAqB;IAC7B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,cAAc;IACrE,IAAI,wCAAkD;IACtD,IAAI,SAAkD;IAEtD;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IAEvB;;OAEG;gBAED,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,0CAA0C;CAKtD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown if the EngineSession does not manage to parse the required port successfully because the sessions connection timed out.
|
|
5
|
+
*/
|
|
6
|
+
export class EngineSessionConnectionTimeoutError extends DaggerSDKError {
|
|
7
|
+
name = ERROR_NAMES.EngineSessionConnectionTimeoutError;
|
|
8
|
+
code = ERROR_CODES.EngineSessionConnectionTimeoutError;
|
|
9
|
+
/**
|
|
10
|
+
* The duration until the timeout occurred in ms.
|
|
11
|
+
*/
|
|
12
|
+
timeOutDuration;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
constructor(message, options) {
|
|
17
|
+
super(message, options);
|
|
18
|
+
this.timeOutDuration = options.timeOutDuration;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
type EngineSessionErrorOptions = DaggerSDKErrorOptions;
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown if the EngineSession does not manage to parse the required port successfully because a EOF is read before any valid port.
|
|
5
|
+
* This usually happens if no connection can be established.
|
|
6
|
+
*/
|
|
7
|
+
export declare class EngineSessionError extends DaggerSDKError {
|
|
8
|
+
name: "EngineSessionError";
|
|
9
|
+
code: "D105";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(message: string, options?: EngineSessionErrorOptions);
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=EngineSessionErrorOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineSessionErrorOptions.d.ts","sourceRoot":"","sources":["../../../common/errors/EngineSessionErrorOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG3E,KAAK,yBAAyB,GAAG,qBAAqB,CAAA;AAEtD;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,IAAI,uBAAiC;IACrC,IAAI,SAAiC;IAErC;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB;CAGjE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown if the EngineSession does not manage to parse the required port successfully because a EOF is read before any valid port.
|
|
5
|
+
* This usually happens if no connection can be established.
|
|
6
|
+
*/
|
|
7
|
+
export class EngineSessionError extends DaggerSDKError {
|
|
8
|
+
name = ERROR_NAMES.EngineSessionError;
|
|
9
|
+
code = ERROR_CODES.EngineSessionError;
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(message, options) {
|
|
14
|
+
super(message, options);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
interface ExecErrorOptions extends DaggerSDKErrorOptions {
|
|
3
|
+
cmd: string[];
|
|
4
|
+
exitCode: number;
|
|
5
|
+
stdout: string;
|
|
6
|
+
stderr: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* API error from an exec operation in a pipeline.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ExecError extends DaggerSDKError {
|
|
12
|
+
name: "ExecError";
|
|
13
|
+
code: "D109";
|
|
14
|
+
/**
|
|
15
|
+
* The command that caused the error.
|
|
16
|
+
*/
|
|
17
|
+
cmd: string[];
|
|
18
|
+
/**
|
|
19
|
+
* The exit code of the command.
|
|
20
|
+
*/
|
|
21
|
+
exitCode: number;
|
|
22
|
+
/**
|
|
23
|
+
* The stdout of the command.
|
|
24
|
+
*/
|
|
25
|
+
stdout: string;
|
|
26
|
+
/**
|
|
27
|
+
* The stderr of the command.
|
|
28
|
+
*/
|
|
29
|
+
stderr: string;
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
constructor(message: string, options: ExecErrorOptions);
|
|
34
|
+
toString(): string;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=ExecError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecError.d.ts","sourceRoot":"","sources":["../../../common/errors/ExecError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG3E,UAAU,gBAAiB,SAAQ,qBAAqB;IACtD,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,cAAc;IAC3C,IAAI,cAAwB;IAC5B,IAAI,SAAwB;IAE5B;;OAEG;IACH,GAAG,EAAE,MAAM,EAAE,CAAA;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB;IAQtD,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* API error from an exec operation in a pipeline.
|
|
5
|
+
*/
|
|
6
|
+
export class ExecError extends DaggerSDKError {
|
|
7
|
+
name = ERROR_NAMES.ExecError;
|
|
8
|
+
code = ERROR_CODES.ExecError;
|
|
9
|
+
/**
|
|
10
|
+
* The command that caused the error.
|
|
11
|
+
*/
|
|
12
|
+
cmd;
|
|
13
|
+
/**
|
|
14
|
+
* The exit code of the command.
|
|
15
|
+
*/
|
|
16
|
+
exitCode;
|
|
17
|
+
/**
|
|
18
|
+
* The stdout of the command.
|
|
19
|
+
*/
|
|
20
|
+
stdout;
|
|
21
|
+
/**
|
|
22
|
+
* The stderr of the command.
|
|
23
|
+
*/
|
|
24
|
+
stderr;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
constructor(message, options) {
|
|
29
|
+
super(message, options);
|
|
30
|
+
this.cmd = options.cmd;
|
|
31
|
+
this.exitCode = options.exitCode;
|
|
32
|
+
this.stdout = options.stdout;
|
|
33
|
+
this.stderr = options.stderr;
|
|
34
|
+
}
|
|
35
|
+
toString() {
|
|
36
|
+
return `${super.toString()}\nStdout:\n${this.stdout}\nStderr:\n${this.stderr}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ClientError } from "graphql-request";
|
|
2
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
3
|
+
interface GraphQLRequestErrorOptions extends DaggerSDKErrorOptions {
|
|
4
|
+
error: ClientError;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This error originates from the dagger engine. It means that some error was thrown and sent back via GraphQL.
|
|
8
|
+
*/
|
|
9
|
+
export declare class GraphQLRequestError extends DaggerSDKError {
|
|
10
|
+
name: "GraphQLRequestError";
|
|
11
|
+
code: "D100";
|
|
12
|
+
/**
|
|
13
|
+
* The query and variables, which caused the error.
|
|
14
|
+
*/
|
|
15
|
+
requestContext: ClientError["request"];
|
|
16
|
+
/**
|
|
17
|
+
* the GraphQL response containing the error.
|
|
18
|
+
*/
|
|
19
|
+
response: ClientError["response"];
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
constructor(message: string, options: GraphQLRequestErrorOptions);
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# 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,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG3E,UAAU,0BAA2B,SAAQ,qBAAqB;IAChE,KAAK,EAAE,WAAW,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,IAAI,wBAAkC;IACtC,IAAI,SAAkC;IAEtC;;OAEG;IACH,cAAc,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAEtC;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAA;IAEjC;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,0BAA0B;CAKjE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error originates from the dagger engine. It means that some error was thrown and sent back via GraphQL.
|
|
5
|
+
*/
|
|
6
|
+
export class GraphQLRequestError extends DaggerSDKError {
|
|
7
|
+
name = ERROR_NAMES.GraphQLRequestError;
|
|
8
|
+
code = ERROR_CODES.GraphQLRequestError;
|
|
9
|
+
/**
|
|
10
|
+
* The query and variables, which caused the error.
|
|
11
|
+
*/
|
|
12
|
+
requestContext;
|
|
13
|
+
/**
|
|
14
|
+
* the GraphQL response containing the error.
|
|
15
|
+
*/
|
|
16
|
+
response;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
constructor(message, options) {
|
|
21
|
+
super(message, options);
|
|
22
|
+
this.requestContext = options.error.request;
|
|
23
|
+
this.response = options.error.response;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -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: "InitEngineSessionBinaryError";
|
|
7
|
+
code: "D106";
|
|
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;AAG3E;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc;IAC9D,IAAI,iCAA2C;IAC/C,IAAI,SAA2C;IAE/C;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB;CAG7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown if the dagger binary cannot be copied from the dagger docker image and copied to the local host.
|
|
5
|
+
*/
|
|
6
|
+
export class InitEngineSessionBinaryError extends DaggerSDKError {
|
|
7
|
+
name = ERROR_NAMES.InitEngineSessionBinaryError;
|
|
8
|
+
code = ERROR_CODES.InitEngineSessionBinaryError;
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
constructor(message, options) {
|
|
13
|
+
super(message, options);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.js";
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown when the compute function isn't awaited.
|
|
4
|
+
*/
|
|
5
|
+
export declare class NotAwaitedRequestError extends DaggerSDKError {
|
|
6
|
+
name: "NotAwaitedRequestError";
|
|
7
|
+
code: "D108";
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
constructor(message: string, options?: DaggerSDKErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=NotAwaitedRequestError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotAwaitedRequestError.d.ts","sourceRoot":"","sources":["../../../common/errors/NotAwaitedRequestError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG3E;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;IACxD,IAAI,2BAAqC;IACzC,IAAI,SAAqC;IAEzC;;OAEG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB;CAG7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DaggerSDKError } from "./DaggerSDKError.js";
|
|
2
|
+
import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown when the compute function isn't awaited.
|
|
5
|
+
*/
|
|
6
|
+
export class NotAwaitedRequestError extends DaggerSDKError {
|
|
7
|
+
name = ERROR_NAMES.NotAwaitedRequestError;
|
|
8
|
+
code = ERROR_CODES.NotAwaitedRequestError;
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
constructor(message, options) {
|
|
13
|
+
super(message, options);
|
|
14
|
+
}
|
|
15
|
+
}
|