@dagger.io/dagger 0.4.1 → 0.4.2
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/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../api/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAQjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../api/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAQjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AA8F3C;;;;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,CAqBhD;AAED;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,CAAC,EAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,CAAC,CAAC,CAiCZ"}
|
package/dist/api/utils.js
CHANGED
|
@@ -35,24 +35,44 @@ function computeNestedQuery(query, client) {
|
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
// Check if there is a nested queryTree to be executed
|
|
37
37
|
const isQueryTree = (value) => value["_queryTree"] !== undefined;
|
|
38
|
+
// Check if there is a nested array of queryTree to be executed
|
|
39
|
+
const isArrayQueryTree = (value) => value.every((v) => v instanceof Object && isQueryTree(v));
|
|
40
|
+
// Prepare query tree for final query by computing nested queries
|
|
41
|
+
// and building it with their results.
|
|
42
|
+
const computeQueryTree = (value) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
// Resolve sub queries if operation's args is a subquery
|
|
44
|
+
for (const op of value["_queryTree"]) {
|
|
45
|
+
yield computeNestedQuery([op], client);
|
|
46
|
+
}
|
|
47
|
+
// push an id that will be used by the container
|
|
48
|
+
return buildQuery([
|
|
49
|
+
...value["_queryTree"],
|
|
50
|
+
{
|
|
51
|
+
operation: "id",
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
54
|
+
});
|
|
38
55
|
// Remove all undefined args and assert args type
|
|
39
56
|
const queryToExec = query.filter((q) => !!q.args);
|
|
40
57
|
for (const q of queryToExec) {
|
|
41
|
-
yield Promise.all(
|
|
58
|
+
yield Promise.all(
|
|
59
|
+
// Compute nested query for single object
|
|
60
|
+
Object.entries(q.args).map(([key, value]) => __awaiter(this, void 0, void 0, function* () {
|
|
42
61
|
if (value instanceof Object && isQueryTree(value)) {
|
|
43
|
-
// Resolve sub queries if operation's args is a subquery
|
|
44
|
-
for (const op of value["_queryTree"]) {
|
|
45
|
-
yield computeNestedQuery([op], client);
|
|
46
|
-
}
|
|
47
62
|
// push an id that will be used by the container
|
|
48
|
-
const getQueryTree =
|
|
49
|
-
...value["_queryTree"],
|
|
50
|
-
{
|
|
51
|
-
operation: "id",
|
|
52
|
-
},
|
|
53
|
-
]);
|
|
63
|
+
const getQueryTree = yield computeQueryTree(value);
|
|
54
64
|
q.args[key] = yield compute(getQueryTree, client);
|
|
55
65
|
}
|
|
66
|
+
// Compute nested query for array of object
|
|
67
|
+
if (Array.isArray(value) && isArrayQueryTree(value)) {
|
|
68
|
+
const tmp = q.args[key];
|
|
69
|
+
for (let i = 0; i < value.length; i++) {
|
|
70
|
+
// push an id that will be used by the container
|
|
71
|
+
const getQueryTree = yield computeQueryTree(value[i]);
|
|
72
|
+
tmp[i] = yield compute(getQueryTree, client);
|
|
73
|
+
}
|
|
74
|
+
q.args[key] = tmp;
|
|
75
|
+
}
|
|
56
76
|
})));
|
|
57
77
|
}
|
|
58
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../provisioning/bin.ts"],"names":[],"mappings":"AAYA,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAQzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAMzD;;GAEG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,OAAO,CAAC,UAAU,CAAC,CAAmB;IAEtC,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB,OAAO,CAAC,UAAU,CAAC,CAAQ;IAE3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAKxB;IAED,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAW;gBAErC,OAAO,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAKjD,IAAI,IAAI,MAAM;IAIR,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;YAOnC,WAAW;IAgEzB;;;OAGG;YACW,gBAAgB;YA+ChB,iBAAiB;IA2BzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../provisioning/bin.ts"],"names":[],"mappings":"AAYA,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAQzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAMzD;;GAEG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,OAAO,CAAC,UAAU,CAAC,CAAmB;IAEtC,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB,OAAO,CAAC,UAAU,CAAC,CAAQ;IAE3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAKxB;IAED,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAW;gBAErC,OAAO,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAKjD,IAAI,IAAI,MAAM;IAIR,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;YAOnC,WAAW;IAgEzB;;;OAGG;YACW,gBAAgB;YA+ChB,iBAAiB;IA2BzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAWtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,cAAc;YAOR,WAAW;YAkBX,gBAAgB;YAWhB,cAAc;IA4C5B;;OAEG;IACH,OAAO,CAAC,WAAW;CAGpB;AAGD,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEjD;AAGD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE1D"}
|
package/dist/provisioning/bin.js
CHANGED
|
@@ -184,7 +184,9 @@ export class Bin {
|
|
|
184
184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185
185
|
if ((_a = this.subProcess) === null || _a === void 0 ? void 0 : _a.pid) {
|
|
186
186
|
this.subProcess.kill("SIGTERM", {
|
|
187
|
-
|
|
187
|
+
// Set a long timeout to give time for any cache exports to pack layers up
|
|
188
|
+
// which currently has to happen synchronously with the session.
|
|
189
|
+
forceKillAfterTimeout: 300000, // 5 mins
|
|
188
190
|
});
|
|
189
191
|
}
|
|
190
192
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.4.
|
|
1
|
+
export declare const CLI_VERSION = "0.4.2";
|
|
2
2
|
//# sourceMappingURL=default.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Code generated by dagger. DO NOT EDIT.
|
|
2
|
-
export const CLI_VERSION = "0.4.
|
|
2
|
+
export const CLI_VERSION = "0.4.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dagger.io/dagger",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"author": "hello@dagger.io",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@lifeomic/axios-fetch": "^3.0.1",
|
|
20
20
|
"adm-zip": "^0.5.10",
|
|
21
21
|
"env-paths": "^3.0.0",
|
|
22
|
-
"execa": "^7.
|
|
22
|
+
"execa": "^7.1.1",
|
|
23
23
|
"graphql": "^16.5.0",
|
|
24
24
|
"graphql-request": "^5.1.0",
|
|
25
25
|
"graphql-tag": "^2.12.6",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@types/node": "~16",
|
|
42
42
|
"@types/tar": "^6.1.4",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
|
44
|
-
"@typescript-eslint/parser": "^5.
|
|
44
|
+
"@typescript-eslint/parser": "^5.56.0",
|
|
45
45
|
"eslint": "^8.35.0",
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
46
|
+
"eslint-config-prettier": "^8.7.0",
|
|
47
47
|
"eslint-plugin-prettier": "^4.2.1",
|
|
48
48
|
"mocha": "^10.2.0",
|
|
49
49
|
"prettier": "^2.8.4",
|