@dagger.io/dagger 0.2.0 → 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 +143 -24
- package/dist/api/client.gen.d.ts.map +1 -1
- package/dist/api/client.gen.js +159 -157
- 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/default.js +1 -1
- 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/client.gen.js
CHANGED
|
@@ -35,13 +35,12 @@ class BaseClient {
|
|
|
35
35
|
export class CacheVolume extends BaseClient {
|
|
36
36
|
id() {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
|
|
38
|
+
const response = yield queryBuilder([
|
|
39
39
|
...this._queryTree,
|
|
40
40
|
{
|
|
41
41
|
operation: "id",
|
|
42
42
|
},
|
|
43
|
-
];
|
|
44
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
43
|
+
], this.client);
|
|
45
44
|
return response;
|
|
46
45
|
});
|
|
47
46
|
}
|
|
@@ -53,13 +52,13 @@ export class Container extends BaseClient {
|
|
|
53
52
|
/**
|
|
54
53
|
* Initialize this container from a Dockerfile build
|
|
55
54
|
*/
|
|
56
|
-
build(context,
|
|
55
|
+
build(context, opts) {
|
|
57
56
|
return new Container({
|
|
58
57
|
queryTree: [
|
|
59
58
|
...this._queryTree,
|
|
60
59
|
{
|
|
61
60
|
operation: "build",
|
|
62
|
-
args: { context
|
|
61
|
+
args: Object.assign({ context }, opts),
|
|
63
62
|
},
|
|
64
63
|
],
|
|
65
64
|
host: this.clientHost,
|
|
@@ -70,13 +69,12 @@ export class Container extends BaseClient {
|
|
|
70
69
|
*/
|
|
71
70
|
defaultArgs() {
|
|
72
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
|
|
72
|
+
const response = yield queryBuilder([
|
|
74
73
|
...this._queryTree,
|
|
75
74
|
{
|
|
76
75
|
operation: "defaultArgs",
|
|
77
76
|
},
|
|
78
|
-
];
|
|
79
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
77
|
+
], this.client);
|
|
80
78
|
return response;
|
|
81
79
|
});
|
|
82
80
|
}
|
|
@@ -100,13 +98,12 @@ export class Container extends BaseClient {
|
|
|
100
98
|
*/
|
|
101
99
|
entrypoint() {
|
|
102
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
-
|
|
101
|
+
const response = yield queryBuilder([
|
|
104
102
|
...this._queryTree,
|
|
105
103
|
{
|
|
106
104
|
operation: "entrypoint",
|
|
107
105
|
},
|
|
108
|
-
];
|
|
109
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
106
|
+
], this.client);
|
|
110
107
|
return response;
|
|
111
108
|
});
|
|
112
109
|
}
|
|
@@ -115,14 +112,13 @@ export class Container extends BaseClient {
|
|
|
115
112
|
*/
|
|
116
113
|
envVariable(name) {
|
|
117
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
|
|
115
|
+
const response = yield queryBuilder([
|
|
119
116
|
...this._queryTree,
|
|
120
117
|
{
|
|
121
118
|
operation: "envVariable",
|
|
122
119
|
args: { name },
|
|
123
120
|
},
|
|
124
|
-
];
|
|
125
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
121
|
+
], this.client);
|
|
126
122
|
return response;
|
|
127
123
|
});
|
|
128
124
|
}
|
|
@@ -131,34 +127,29 @@ export class Container extends BaseClient {
|
|
|
131
127
|
*/
|
|
132
128
|
envVariables() {
|
|
133
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
-
|
|
130
|
+
const response = yield queryBuilder([
|
|
135
131
|
...this._queryTree,
|
|
136
132
|
{
|
|
137
133
|
operation: "envVariables",
|
|
138
134
|
},
|
|
139
|
-
];
|
|
140
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
135
|
+
], this.client);
|
|
141
136
|
return response;
|
|
142
137
|
});
|
|
143
138
|
}
|
|
144
139
|
/**
|
|
145
140
|
* This container after executing the specified command inside it
|
|
146
141
|
*
|
|
142
|
+
* @param opts optional params for exec
|
|
143
|
+
*
|
|
147
144
|
* @deprecated Replaced by withExec.
|
|
148
145
|
*/
|
|
149
|
-
exec(
|
|
146
|
+
exec(opts) {
|
|
150
147
|
return new Container({
|
|
151
148
|
queryTree: [
|
|
152
149
|
...this._queryTree,
|
|
153
150
|
{
|
|
154
151
|
operation: "exec",
|
|
155
|
-
args: {
|
|
156
|
-
args,
|
|
157
|
-
stdin,
|
|
158
|
-
redirectStdout,
|
|
159
|
-
redirectStderr,
|
|
160
|
-
experimentalPrivilegedNesting,
|
|
161
|
-
},
|
|
152
|
+
args: Object.assign({}, opts),
|
|
162
153
|
},
|
|
163
154
|
],
|
|
164
155
|
host: this.clientHost,
|
|
@@ -170,29 +161,27 @@ export class Container extends BaseClient {
|
|
|
170
161
|
*/
|
|
171
162
|
exitCode() {
|
|
172
163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
|
|
164
|
+
const response = yield queryBuilder([
|
|
174
165
|
...this._queryTree,
|
|
175
166
|
{
|
|
176
167
|
operation: "exitCode",
|
|
177
168
|
},
|
|
178
|
-
];
|
|
179
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
169
|
+
], this.client);
|
|
180
170
|
return response;
|
|
181
171
|
});
|
|
182
172
|
}
|
|
183
173
|
/**
|
|
184
174
|
* Write the container as an OCI tarball to the destination file path on the host
|
|
185
175
|
*/
|
|
186
|
-
export(path,
|
|
176
|
+
export(path, opts) {
|
|
187
177
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
|
|
178
|
+
const response = yield queryBuilder([
|
|
189
179
|
...this._queryTree,
|
|
190
180
|
{
|
|
191
181
|
operation: "export",
|
|
192
|
-
args: { path
|
|
182
|
+
args: Object.assign({ path }, opts),
|
|
193
183
|
},
|
|
194
|
-
];
|
|
195
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
184
|
+
], this.client);
|
|
196
185
|
return response;
|
|
197
186
|
});
|
|
198
187
|
}
|
|
@@ -229,6 +218,7 @@ export class Container extends BaseClient {
|
|
|
229
218
|
/**
|
|
230
219
|
* This container's root filesystem. Mounts are not included.
|
|
231
220
|
*
|
|
221
|
+
*
|
|
232
222
|
* @deprecated Replaced by rootfs.
|
|
233
223
|
*/
|
|
234
224
|
fs() {
|
|
@@ -247,13 +237,12 @@ export class Container extends BaseClient {
|
|
|
247
237
|
*/
|
|
248
238
|
id() {
|
|
249
239
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
-
|
|
240
|
+
const response = yield queryBuilder([
|
|
251
241
|
...this._queryTree,
|
|
252
242
|
{
|
|
253
243
|
operation: "id",
|
|
254
244
|
},
|
|
255
|
-
];
|
|
256
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
245
|
+
], this.client);
|
|
257
246
|
return response;
|
|
258
247
|
});
|
|
259
248
|
}
|
|
@@ -262,13 +251,12 @@ export class Container extends BaseClient {
|
|
|
262
251
|
*/
|
|
263
252
|
mounts() {
|
|
264
253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
-
|
|
254
|
+
const response = yield queryBuilder([
|
|
266
255
|
...this._queryTree,
|
|
267
256
|
{
|
|
268
257
|
operation: "mounts",
|
|
269
258
|
},
|
|
270
|
-
];
|
|
271
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
259
|
+
], this.client);
|
|
272
260
|
return response;
|
|
273
261
|
});
|
|
274
262
|
}
|
|
@@ -277,29 +265,27 @@ export class Container extends BaseClient {
|
|
|
277
265
|
*/
|
|
278
266
|
platform() {
|
|
279
267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
-
|
|
268
|
+
const response = yield queryBuilder([
|
|
281
269
|
...this._queryTree,
|
|
282
270
|
{
|
|
283
271
|
operation: "platform",
|
|
284
272
|
},
|
|
285
|
-
];
|
|
286
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
273
|
+
], this.client);
|
|
287
274
|
return response;
|
|
288
275
|
});
|
|
289
276
|
}
|
|
290
277
|
/**
|
|
291
278
|
* Publish this container as a new image, returning a fully qualified ref
|
|
292
279
|
*/
|
|
293
|
-
publish(address,
|
|
280
|
+
publish(address, opts) {
|
|
294
281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
-
|
|
282
|
+
const response = yield queryBuilder([
|
|
296
283
|
...this._queryTree,
|
|
297
284
|
{
|
|
298
285
|
operation: "publish",
|
|
299
|
-
args: { address
|
|
286
|
+
args: Object.assign({ address }, opts),
|
|
300
287
|
},
|
|
301
|
-
];
|
|
302
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
288
|
+
], this.client);
|
|
303
289
|
return response;
|
|
304
290
|
});
|
|
305
291
|
}
|
|
@@ -323,13 +309,12 @@ export class Container extends BaseClient {
|
|
|
323
309
|
*/
|
|
324
310
|
stderr() {
|
|
325
311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
|
|
312
|
+
const response = yield queryBuilder([
|
|
327
313
|
...this._queryTree,
|
|
328
314
|
{
|
|
329
315
|
operation: "stderr",
|
|
330
316
|
},
|
|
331
|
-
];
|
|
332
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
317
|
+
], this.client);
|
|
333
318
|
return response;
|
|
334
319
|
});
|
|
335
320
|
}
|
|
@@ -339,13 +324,12 @@ export class Container extends BaseClient {
|
|
|
339
324
|
*/
|
|
340
325
|
stdout() {
|
|
341
326
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
|
|
327
|
+
const response = yield queryBuilder([
|
|
343
328
|
...this._queryTree,
|
|
344
329
|
{
|
|
345
330
|
operation: "stdout",
|
|
346
331
|
},
|
|
347
|
-
];
|
|
348
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
332
|
+
], this.client);
|
|
349
333
|
return response;
|
|
350
334
|
});
|
|
351
335
|
}
|
|
@@ -354,26 +338,40 @@ export class Container extends BaseClient {
|
|
|
354
338
|
*/
|
|
355
339
|
user() {
|
|
356
340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
357
|
-
|
|
341
|
+
const response = yield queryBuilder([
|
|
358
342
|
...this._queryTree,
|
|
359
343
|
{
|
|
360
344
|
operation: "user",
|
|
361
345
|
},
|
|
362
|
-
];
|
|
363
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
346
|
+
], this.client);
|
|
364
347
|
return response;
|
|
365
348
|
});
|
|
366
349
|
}
|
|
367
350
|
/**
|
|
368
351
|
* Configures default arguments for future commands
|
|
369
352
|
*/
|
|
370
|
-
withDefaultArgs(
|
|
353
|
+
withDefaultArgs(opts) {
|
|
371
354
|
return new Container({
|
|
372
355
|
queryTree: [
|
|
373
356
|
...this._queryTree,
|
|
374
357
|
{
|
|
375
358
|
operation: "withDefaultArgs",
|
|
376
|
-
args: {
|
|
359
|
+
args: Object.assign({}, opts),
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
host: this.clientHost,
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* This container plus a directory written at the given path
|
|
367
|
+
*/
|
|
368
|
+
withDirectory(path, directory, opts) {
|
|
369
|
+
return new Container({
|
|
370
|
+
queryTree: [
|
|
371
|
+
...this._queryTree,
|
|
372
|
+
{
|
|
373
|
+
operation: "withDirectory",
|
|
374
|
+
args: Object.assign({ path, directory }, opts),
|
|
377
375
|
},
|
|
378
376
|
],
|
|
379
377
|
host: this.clientHost,
|
|
@@ -412,19 +410,13 @@ export class Container extends BaseClient {
|
|
|
412
410
|
/**
|
|
413
411
|
* This container after executing the specified command inside it
|
|
414
412
|
*/
|
|
415
|
-
withExec(args,
|
|
413
|
+
withExec(args, opts) {
|
|
416
414
|
return new Container({
|
|
417
415
|
queryTree: [
|
|
418
416
|
...this._queryTree,
|
|
419
417
|
{
|
|
420
418
|
operation: "withExec",
|
|
421
|
-
args: {
|
|
422
|
-
args,
|
|
423
|
-
stdin,
|
|
424
|
-
redirectStdout,
|
|
425
|
-
redirectStderr,
|
|
426
|
-
experimentalPrivilegedNesting,
|
|
427
|
-
},
|
|
419
|
+
args: Object.assign({ args }, opts),
|
|
428
420
|
},
|
|
429
421
|
],
|
|
430
422
|
host: this.clientHost,
|
|
@@ -433,6 +425,7 @@ export class Container extends BaseClient {
|
|
|
433
425
|
/**
|
|
434
426
|
* Initialize this container from this DirectoryID
|
|
435
427
|
*
|
|
428
|
+
*
|
|
436
429
|
* @deprecated Replaced by withRootfs.
|
|
437
430
|
*/
|
|
438
431
|
withFS(id) {
|
|
@@ -447,16 +440,31 @@ export class Container extends BaseClient {
|
|
|
447
440
|
host: this.clientHost,
|
|
448
441
|
});
|
|
449
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* This container plus the contents of the given file copied to the given path
|
|
445
|
+
*/
|
|
446
|
+
withFile(path, source) {
|
|
447
|
+
return new Container({
|
|
448
|
+
queryTree: [
|
|
449
|
+
...this._queryTree,
|
|
450
|
+
{
|
|
451
|
+
operation: "withFile",
|
|
452
|
+
args: { path, source },
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
host: this.clientHost,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
450
458
|
/**
|
|
451
459
|
* This container plus a cache volume mounted at the given path
|
|
452
460
|
*/
|
|
453
|
-
withMountedCache(path, cache,
|
|
461
|
+
withMountedCache(path, cache, opts) {
|
|
454
462
|
return new Container({
|
|
455
463
|
queryTree: [
|
|
456
464
|
...this._queryTree,
|
|
457
465
|
{
|
|
458
466
|
operation: "withMountedCache",
|
|
459
|
-
args: { path, cache
|
|
467
|
+
args: Object.assign({ path, cache }, opts),
|
|
460
468
|
},
|
|
461
469
|
],
|
|
462
470
|
host: this.clientHost,
|
|
@@ -522,6 +530,21 @@ export class Container extends BaseClient {
|
|
|
522
530
|
host: this.clientHost,
|
|
523
531
|
});
|
|
524
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* This container plus a new file written at the given path
|
|
535
|
+
*/
|
|
536
|
+
withNewFile(path, opts) {
|
|
537
|
+
return new Container({
|
|
538
|
+
queryTree: [
|
|
539
|
+
...this._queryTree,
|
|
540
|
+
{
|
|
541
|
+
operation: "withNewFile",
|
|
542
|
+
args: Object.assign({ path }, opts),
|
|
543
|
+
},
|
|
544
|
+
],
|
|
545
|
+
host: this.clientHost,
|
|
546
|
+
});
|
|
547
|
+
}
|
|
525
548
|
/**
|
|
526
549
|
* Initialize this container from this DirectoryID
|
|
527
550
|
*/
|
|
@@ -647,13 +670,12 @@ export class Container extends BaseClient {
|
|
|
647
670
|
*/
|
|
648
671
|
workdir() {
|
|
649
672
|
return __awaiter(this, void 0, void 0, function* () {
|
|
650
|
-
|
|
673
|
+
const response = yield queryBuilder([
|
|
651
674
|
...this._queryTree,
|
|
652
675
|
{
|
|
653
676
|
operation: "workdir",
|
|
654
677
|
},
|
|
655
|
-
];
|
|
656
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
678
|
+
], this.client);
|
|
657
679
|
return response;
|
|
658
680
|
});
|
|
659
681
|
}
|
|
@@ -695,13 +717,13 @@ export class Directory extends BaseClient {
|
|
|
695
717
|
/**
|
|
696
718
|
* Build a new Docker container from this directory
|
|
697
719
|
*/
|
|
698
|
-
dockerBuild(
|
|
720
|
+
dockerBuild(opts) {
|
|
699
721
|
return new Container({
|
|
700
722
|
queryTree: [
|
|
701
723
|
...this._queryTree,
|
|
702
724
|
{
|
|
703
725
|
operation: "dockerBuild",
|
|
704
|
-
args: {
|
|
726
|
+
args: Object.assign({}, opts),
|
|
705
727
|
},
|
|
706
728
|
],
|
|
707
729
|
host: this.clientHost,
|
|
@@ -710,16 +732,15 @@ export class Directory extends BaseClient {
|
|
|
710
732
|
/**
|
|
711
733
|
* Return a list of files and directories at the given path
|
|
712
734
|
*/
|
|
713
|
-
entries(
|
|
735
|
+
entries(opts) {
|
|
714
736
|
return __awaiter(this, void 0, void 0, function* () {
|
|
715
|
-
|
|
737
|
+
const response = yield queryBuilder([
|
|
716
738
|
...this._queryTree,
|
|
717
739
|
{
|
|
718
740
|
operation: "entries",
|
|
719
|
-
args: {
|
|
741
|
+
args: Object.assign({}, opts),
|
|
720
742
|
},
|
|
721
|
-
];
|
|
722
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
743
|
+
], this.client);
|
|
723
744
|
return response;
|
|
724
745
|
});
|
|
725
746
|
}
|
|
@@ -728,14 +749,13 @@ export class Directory extends BaseClient {
|
|
|
728
749
|
*/
|
|
729
750
|
export(path) {
|
|
730
751
|
return __awaiter(this, void 0, void 0, function* () {
|
|
731
|
-
|
|
752
|
+
const response = yield queryBuilder([
|
|
732
753
|
...this._queryTree,
|
|
733
754
|
{
|
|
734
755
|
operation: "export",
|
|
735
756
|
args: { path },
|
|
736
757
|
},
|
|
737
|
-
];
|
|
738
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
758
|
+
], this.client);
|
|
739
759
|
return response;
|
|
740
760
|
});
|
|
741
761
|
}
|
|
@@ -759,13 +779,12 @@ export class Directory extends BaseClient {
|
|
|
759
779
|
*/
|
|
760
780
|
id() {
|
|
761
781
|
return __awaiter(this, void 0, void 0, function* () {
|
|
762
|
-
|
|
782
|
+
const response = yield queryBuilder([
|
|
763
783
|
...this._queryTree,
|
|
764
784
|
{
|
|
765
785
|
operation: "id",
|
|
766
786
|
},
|
|
767
|
-
];
|
|
768
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
787
|
+
], this.client);
|
|
769
788
|
return response;
|
|
770
789
|
});
|
|
771
790
|
}
|
|
@@ -787,13 +806,13 @@ export class Directory extends BaseClient {
|
|
|
787
806
|
/**
|
|
788
807
|
* This directory plus a directory written at the given path
|
|
789
808
|
*/
|
|
790
|
-
withDirectory(path, directory,
|
|
809
|
+
withDirectory(path, directory, opts) {
|
|
791
810
|
return new Directory({
|
|
792
811
|
queryTree: [
|
|
793
812
|
...this._queryTree,
|
|
794
813
|
{
|
|
795
814
|
operation: "withDirectory",
|
|
796
|
-
args: { path, directory
|
|
815
|
+
args: Object.assign({ path, directory }, opts),
|
|
797
816
|
},
|
|
798
817
|
],
|
|
799
818
|
host: this.clientHost,
|
|
@@ -884,13 +903,12 @@ export class EnvVariable extends BaseClient {
|
|
|
884
903
|
*/
|
|
885
904
|
name() {
|
|
886
905
|
return __awaiter(this, void 0, void 0, function* () {
|
|
887
|
-
|
|
906
|
+
const response = yield queryBuilder([
|
|
888
907
|
...this._queryTree,
|
|
889
908
|
{
|
|
890
909
|
operation: "name",
|
|
891
910
|
},
|
|
892
|
-
];
|
|
893
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
911
|
+
], this.client);
|
|
894
912
|
return response;
|
|
895
913
|
});
|
|
896
914
|
}
|
|
@@ -899,13 +917,12 @@ export class EnvVariable extends BaseClient {
|
|
|
899
917
|
*/
|
|
900
918
|
value() {
|
|
901
919
|
return __awaiter(this, void 0, void 0, function* () {
|
|
902
|
-
|
|
920
|
+
const response = yield queryBuilder([
|
|
903
921
|
...this._queryTree,
|
|
904
922
|
{
|
|
905
923
|
operation: "value",
|
|
906
924
|
},
|
|
907
|
-
];
|
|
908
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
925
|
+
], this.client);
|
|
909
926
|
return response;
|
|
910
927
|
});
|
|
911
928
|
}
|
|
@@ -919,13 +936,12 @@ export class File extends BaseClient {
|
|
|
919
936
|
*/
|
|
920
937
|
contents() {
|
|
921
938
|
return __awaiter(this, void 0, void 0, function* () {
|
|
922
|
-
|
|
939
|
+
const response = yield queryBuilder([
|
|
923
940
|
...this._queryTree,
|
|
924
941
|
{
|
|
925
942
|
operation: "contents",
|
|
926
943
|
},
|
|
927
|
-
];
|
|
928
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
944
|
+
], this.client);
|
|
929
945
|
return response;
|
|
930
946
|
});
|
|
931
947
|
}
|
|
@@ -934,14 +950,13 @@ export class File extends BaseClient {
|
|
|
934
950
|
*/
|
|
935
951
|
export(path) {
|
|
936
952
|
return __awaiter(this, void 0, void 0, function* () {
|
|
937
|
-
|
|
953
|
+
const response = yield queryBuilder([
|
|
938
954
|
...this._queryTree,
|
|
939
955
|
{
|
|
940
956
|
operation: "export",
|
|
941
957
|
args: { path },
|
|
942
958
|
},
|
|
943
|
-
];
|
|
944
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
959
|
+
], this.client);
|
|
945
960
|
return response;
|
|
946
961
|
});
|
|
947
962
|
}
|
|
@@ -950,13 +965,12 @@ export class File extends BaseClient {
|
|
|
950
965
|
*/
|
|
951
966
|
id() {
|
|
952
967
|
return __awaiter(this, void 0, void 0, function* () {
|
|
953
|
-
|
|
968
|
+
const response = yield queryBuilder([
|
|
954
969
|
...this._queryTree,
|
|
955
970
|
{
|
|
956
971
|
operation: "id",
|
|
957
972
|
},
|
|
958
|
-
];
|
|
959
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
973
|
+
], this.client);
|
|
960
974
|
return response;
|
|
961
975
|
});
|
|
962
976
|
}
|
|
@@ -976,13 +990,12 @@ export class File extends BaseClient {
|
|
|
976
990
|
*/
|
|
977
991
|
size() {
|
|
978
992
|
return __awaiter(this, void 0, void 0, function* () {
|
|
979
|
-
|
|
993
|
+
const response = yield queryBuilder([
|
|
980
994
|
...this._queryTree,
|
|
981
995
|
{
|
|
982
996
|
operation: "size",
|
|
983
997
|
},
|
|
984
|
-
];
|
|
985
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
998
|
+
], this.client);
|
|
986
999
|
return response;
|
|
987
1000
|
});
|
|
988
1001
|
}
|
|
@@ -996,26 +1009,25 @@ export class GitRef extends BaseClient {
|
|
|
996
1009
|
*/
|
|
997
1010
|
digest() {
|
|
998
1011
|
return __awaiter(this, void 0, void 0, function* () {
|
|
999
|
-
|
|
1012
|
+
const response = yield queryBuilder([
|
|
1000
1013
|
...this._queryTree,
|
|
1001
1014
|
{
|
|
1002
1015
|
operation: "digest",
|
|
1003
1016
|
},
|
|
1004
|
-
];
|
|
1005
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1017
|
+
], this.client);
|
|
1006
1018
|
return response;
|
|
1007
1019
|
});
|
|
1008
1020
|
}
|
|
1009
1021
|
/**
|
|
1010
1022
|
* The filesystem tree at this ref
|
|
1011
1023
|
*/
|
|
1012
|
-
tree(
|
|
1024
|
+
tree(opts) {
|
|
1013
1025
|
return new Directory({
|
|
1014
1026
|
queryTree: [
|
|
1015
1027
|
...this._queryTree,
|
|
1016
1028
|
{
|
|
1017
1029
|
operation: "tree",
|
|
1018
|
-
args: {
|
|
1030
|
+
args: Object.assign({}, opts),
|
|
1019
1031
|
},
|
|
1020
1032
|
],
|
|
1021
1033
|
host: this.clientHost,
|
|
@@ -1046,13 +1058,12 @@ export class GitRepository extends BaseClient {
|
|
|
1046
1058
|
*/
|
|
1047
1059
|
branches() {
|
|
1048
1060
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1049
|
-
|
|
1061
|
+
const response = yield queryBuilder([
|
|
1050
1062
|
...this._queryTree,
|
|
1051
1063
|
{
|
|
1052
1064
|
operation: "branches",
|
|
1053
1065
|
},
|
|
1054
|
-
];
|
|
1055
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1066
|
+
], this.client);
|
|
1056
1067
|
return response;
|
|
1057
1068
|
});
|
|
1058
1069
|
}
|
|
@@ -1091,13 +1102,12 @@ export class GitRepository extends BaseClient {
|
|
|
1091
1102
|
*/
|
|
1092
1103
|
tags() {
|
|
1093
1104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1094
|
-
|
|
1105
|
+
const response = yield queryBuilder([
|
|
1095
1106
|
...this._queryTree,
|
|
1096
1107
|
{
|
|
1097
1108
|
operation: "tags",
|
|
1098
1109
|
},
|
|
1099
|
-
];
|
|
1100
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1110
|
+
], this.client);
|
|
1101
1111
|
return response;
|
|
1102
1112
|
});
|
|
1103
1113
|
}
|
|
@@ -1109,13 +1119,13 @@ export class Host extends BaseClient {
|
|
|
1109
1119
|
/**
|
|
1110
1120
|
* Access a directory on the host
|
|
1111
1121
|
*/
|
|
1112
|
-
directory(path,
|
|
1122
|
+
directory(path, opts) {
|
|
1113
1123
|
return new Directory({
|
|
1114
1124
|
queryTree: [
|
|
1115
1125
|
...this._queryTree,
|
|
1116
1126
|
{
|
|
1117
1127
|
operation: "directory",
|
|
1118
|
-
args: { path
|
|
1128
|
+
args: Object.assign({ path }, opts),
|
|
1119
1129
|
},
|
|
1120
1130
|
],
|
|
1121
1131
|
host: this.clientHost,
|
|
@@ -1154,15 +1164,17 @@ export class Host extends BaseClient {
|
|
|
1154
1164
|
/**
|
|
1155
1165
|
* The current working directory on the host
|
|
1156
1166
|
*
|
|
1167
|
+
* @param opts optional params for workdir
|
|
1168
|
+
*
|
|
1157
1169
|
* @deprecated Use directory with path set to '.' instead.
|
|
1158
1170
|
*/
|
|
1159
|
-
workdir(
|
|
1171
|
+
workdir(opts) {
|
|
1160
1172
|
return new Directory({
|
|
1161
1173
|
queryTree: [
|
|
1162
1174
|
...this._queryTree,
|
|
1163
1175
|
{
|
|
1164
1176
|
operation: "workdir",
|
|
1165
|
-
args: {
|
|
1177
|
+
args: Object.assign({}, opts),
|
|
1166
1178
|
},
|
|
1167
1179
|
],
|
|
1168
1180
|
host: this.clientHost,
|
|
@@ -1192,13 +1204,12 @@ export class HostVariable extends BaseClient {
|
|
|
1192
1204
|
*/
|
|
1193
1205
|
value() {
|
|
1194
1206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1195
|
-
|
|
1207
|
+
const response = yield queryBuilder([
|
|
1196
1208
|
...this._queryTree,
|
|
1197
1209
|
{
|
|
1198
1210
|
operation: "value",
|
|
1199
1211
|
},
|
|
1200
|
-
];
|
|
1201
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1212
|
+
], this.client);
|
|
1202
1213
|
return response;
|
|
1203
1214
|
});
|
|
1204
1215
|
}
|
|
@@ -1212,13 +1223,12 @@ export class Project extends BaseClient {
|
|
|
1212
1223
|
*/
|
|
1213
1224
|
extensions() {
|
|
1214
1225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1215
|
-
|
|
1226
|
+
const response = yield queryBuilder([
|
|
1216
1227
|
...this._queryTree,
|
|
1217
1228
|
{
|
|
1218
1229
|
operation: "extensions",
|
|
1219
1230
|
},
|
|
1220
|
-
];
|
|
1221
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1231
|
+
], this.client);
|
|
1222
1232
|
return response;
|
|
1223
1233
|
});
|
|
1224
1234
|
}
|
|
@@ -1241,13 +1251,12 @@ export class Project extends BaseClient {
|
|
|
1241
1251
|
*/
|
|
1242
1252
|
install() {
|
|
1243
1253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1244
|
-
|
|
1254
|
+
const response = yield queryBuilder([
|
|
1245
1255
|
...this._queryTree,
|
|
1246
1256
|
{
|
|
1247
1257
|
operation: "install",
|
|
1248
1258
|
},
|
|
1249
|
-
];
|
|
1250
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1259
|
+
], this.client);
|
|
1251
1260
|
return response;
|
|
1252
1261
|
});
|
|
1253
1262
|
}
|
|
@@ -1256,13 +1265,12 @@ export class Project extends BaseClient {
|
|
|
1256
1265
|
*/
|
|
1257
1266
|
name() {
|
|
1258
1267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1259
|
-
|
|
1268
|
+
const response = yield queryBuilder([
|
|
1260
1269
|
...this._queryTree,
|
|
1261
1270
|
{
|
|
1262
1271
|
operation: "name",
|
|
1263
1272
|
},
|
|
1264
|
-
];
|
|
1265
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1273
|
+
], this.client);
|
|
1266
1274
|
return response;
|
|
1267
1275
|
});
|
|
1268
1276
|
}
|
|
@@ -1271,13 +1279,12 @@ export class Project extends BaseClient {
|
|
|
1271
1279
|
*/
|
|
1272
1280
|
schema() {
|
|
1273
1281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1274
|
-
|
|
1282
|
+
const response = yield queryBuilder([
|
|
1275
1283
|
...this._queryTree,
|
|
1276
1284
|
{
|
|
1277
1285
|
operation: "schema",
|
|
1278
1286
|
},
|
|
1279
|
-
];
|
|
1280
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1287
|
+
], this.client);
|
|
1281
1288
|
return response;
|
|
1282
1289
|
});
|
|
1283
1290
|
}
|
|
@@ -1286,13 +1293,12 @@ export class Project extends BaseClient {
|
|
|
1286
1293
|
*/
|
|
1287
1294
|
sdk() {
|
|
1288
1295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1289
|
-
|
|
1296
|
+
const response = yield queryBuilder([
|
|
1290
1297
|
...this._queryTree,
|
|
1291
1298
|
{
|
|
1292
1299
|
operation: "sdk",
|
|
1293
1300
|
},
|
|
1294
|
-
];
|
|
1295
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1301
|
+
], this.client);
|
|
1296
1302
|
return response;
|
|
1297
1303
|
});
|
|
1298
1304
|
}
|
|
@@ -1318,13 +1324,13 @@ export default class Client extends BaseClient {
|
|
|
1318
1324
|
* Null ID returns an empty container (scratch).
|
|
1319
1325
|
* Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
|
|
1320
1326
|
*/
|
|
1321
|
-
container(
|
|
1327
|
+
container(opts) {
|
|
1322
1328
|
return new Container({
|
|
1323
1329
|
queryTree: [
|
|
1324
1330
|
...this._queryTree,
|
|
1325
1331
|
{
|
|
1326
1332
|
operation: "container",
|
|
1327
|
-
args: {
|
|
1333
|
+
args: Object.assign({}, opts),
|
|
1328
1334
|
},
|
|
1329
1335
|
],
|
|
1330
1336
|
host: this.clientHost,
|
|
@@ -1335,26 +1341,25 @@ export default class Client extends BaseClient {
|
|
|
1335
1341
|
*/
|
|
1336
1342
|
defaultPlatform() {
|
|
1337
1343
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1338
|
-
|
|
1344
|
+
const response = yield queryBuilder([
|
|
1339
1345
|
...this._queryTree,
|
|
1340
1346
|
{
|
|
1341
1347
|
operation: "defaultPlatform",
|
|
1342
1348
|
},
|
|
1343
|
-
];
|
|
1344
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1349
|
+
], this.client);
|
|
1345
1350
|
return response;
|
|
1346
1351
|
});
|
|
1347
1352
|
}
|
|
1348
1353
|
/**
|
|
1349
1354
|
* Load a directory by ID. No argument produces an empty directory.
|
|
1350
1355
|
*/
|
|
1351
|
-
directory(
|
|
1356
|
+
directory(opts) {
|
|
1352
1357
|
return new Directory({
|
|
1353
1358
|
queryTree: [
|
|
1354
1359
|
...this._queryTree,
|
|
1355
1360
|
{
|
|
1356
1361
|
operation: "directory",
|
|
1357
|
-
args: {
|
|
1362
|
+
args: Object.assign({}, opts),
|
|
1358
1363
|
},
|
|
1359
1364
|
],
|
|
1360
1365
|
host: this.clientHost,
|
|
@@ -1378,13 +1383,13 @@ export default class Client extends BaseClient {
|
|
|
1378
1383
|
/**
|
|
1379
1384
|
* Query a git repository
|
|
1380
1385
|
*/
|
|
1381
|
-
git(url,
|
|
1386
|
+
git(url, opts) {
|
|
1382
1387
|
return new GitRepository({
|
|
1383
1388
|
queryTree: [
|
|
1384
1389
|
...this._queryTree,
|
|
1385
1390
|
{
|
|
1386
1391
|
operation: "git",
|
|
1387
|
-
args: { url
|
|
1392
|
+
args: Object.assign({ url }, opts),
|
|
1388
1393
|
},
|
|
1389
1394
|
],
|
|
1390
1395
|
host: this.clientHost,
|
|
@@ -1452,13 +1457,13 @@ export default class Client extends BaseClient {
|
|
|
1452
1457
|
/**
|
|
1453
1458
|
* Load a socket by ID
|
|
1454
1459
|
*/
|
|
1455
|
-
socket(
|
|
1460
|
+
socket(opts) {
|
|
1456
1461
|
return new Socket({
|
|
1457
1462
|
queryTree: [
|
|
1458
1463
|
...this._queryTree,
|
|
1459
1464
|
{
|
|
1460
1465
|
operation: "socket",
|
|
1461
|
-
args: {
|
|
1466
|
+
args: Object.assign({}, opts),
|
|
1462
1467
|
},
|
|
1463
1468
|
],
|
|
1464
1469
|
host: this.clientHost,
|
|
@@ -1474,13 +1479,12 @@ export class Secret extends BaseClient {
|
|
|
1474
1479
|
*/
|
|
1475
1480
|
id() {
|
|
1476
1481
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1477
|
-
|
|
1482
|
+
const response = yield queryBuilder([
|
|
1478
1483
|
...this._queryTree,
|
|
1479
1484
|
{
|
|
1480
1485
|
operation: "id",
|
|
1481
1486
|
},
|
|
1482
|
-
];
|
|
1483
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1487
|
+
], this.client);
|
|
1484
1488
|
return response;
|
|
1485
1489
|
});
|
|
1486
1490
|
}
|
|
@@ -1489,13 +1493,12 @@ export class Secret extends BaseClient {
|
|
|
1489
1493
|
*/
|
|
1490
1494
|
plaintext() {
|
|
1491
1495
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1492
|
-
|
|
1496
|
+
const response = yield queryBuilder([
|
|
1493
1497
|
...this._queryTree,
|
|
1494
1498
|
{
|
|
1495
1499
|
operation: "plaintext",
|
|
1496
1500
|
},
|
|
1497
|
-
];
|
|
1498
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1501
|
+
], this.client);
|
|
1499
1502
|
return response;
|
|
1500
1503
|
});
|
|
1501
1504
|
}
|
|
@@ -1506,13 +1509,12 @@ export class Socket extends BaseClient {
|
|
|
1506
1509
|
*/
|
|
1507
1510
|
id() {
|
|
1508
1511
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1509
|
-
|
|
1512
|
+
const response = yield queryBuilder([
|
|
1510
1513
|
...this._queryTree,
|
|
1511
1514
|
{
|
|
1512
1515
|
operation: "id",
|
|
1513
1516
|
},
|
|
1514
|
-
];
|
|
1515
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1517
|
+
], this.client);
|
|
1516
1518
|
return response;
|
|
1517
1519
|
});
|
|
1518
1520
|
}
|