@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/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,25 @@ 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),
|
|
377
360
|
},
|
|
378
361
|
],
|
|
379
362
|
host: this.clientHost,
|
|
@@ -382,13 +365,13 @@ export class Container extends BaseClient {
|
|
|
382
365
|
/**
|
|
383
366
|
* This container plus a directory written at the given path
|
|
384
367
|
*/
|
|
385
|
-
withDirectory(path, directory,
|
|
368
|
+
withDirectory(path, directory, opts) {
|
|
386
369
|
return new Container({
|
|
387
370
|
queryTree: [
|
|
388
371
|
...this._queryTree,
|
|
389
372
|
{
|
|
390
373
|
operation: "withDirectory",
|
|
391
|
-
args: { path, directory
|
|
374
|
+
args: Object.assign({ path, directory }, opts),
|
|
392
375
|
},
|
|
393
376
|
],
|
|
394
377
|
host: this.clientHost,
|
|
@@ -427,19 +410,13 @@ export class Container extends BaseClient {
|
|
|
427
410
|
/**
|
|
428
411
|
* This container after executing the specified command inside it
|
|
429
412
|
*/
|
|
430
|
-
withExec(args,
|
|
413
|
+
withExec(args, opts) {
|
|
431
414
|
return new Container({
|
|
432
415
|
queryTree: [
|
|
433
416
|
...this._queryTree,
|
|
434
417
|
{
|
|
435
418
|
operation: "withExec",
|
|
436
|
-
args: {
|
|
437
|
-
args,
|
|
438
|
-
stdin,
|
|
439
|
-
redirectStdout,
|
|
440
|
-
redirectStderr,
|
|
441
|
-
experimentalPrivilegedNesting,
|
|
442
|
-
},
|
|
419
|
+
args: Object.assign({ args }, opts),
|
|
443
420
|
},
|
|
444
421
|
],
|
|
445
422
|
host: this.clientHost,
|
|
@@ -448,6 +425,7 @@ export class Container extends BaseClient {
|
|
|
448
425
|
/**
|
|
449
426
|
* Initialize this container from this DirectoryID
|
|
450
427
|
*
|
|
428
|
+
*
|
|
451
429
|
* @deprecated Replaced by withRootfs.
|
|
452
430
|
*/
|
|
453
431
|
withFS(id) {
|
|
@@ -480,13 +458,13 @@ export class Container extends BaseClient {
|
|
|
480
458
|
/**
|
|
481
459
|
* This container plus a cache volume mounted at the given path
|
|
482
460
|
*/
|
|
483
|
-
withMountedCache(path, cache,
|
|
461
|
+
withMountedCache(path, cache, opts) {
|
|
484
462
|
return new Container({
|
|
485
463
|
queryTree: [
|
|
486
464
|
...this._queryTree,
|
|
487
465
|
{
|
|
488
466
|
operation: "withMountedCache",
|
|
489
|
-
args: { path, cache
|
|
467
|
+
args: Object.assign({ path, cache }, opts),
|
|
490
468
|
},
|
|
491
469
|
],
|
|
492
470
|
host: this.clientHost,
|
|
@@ -555,13 +533,13 @@ export class Container extends BaseClient {
|
|
|
555
533
|
/**
|
|
556
534
|
* This container plus a new file written at the given path
|
|
557
535
|
*/
|
|
558
|
-
withNewFile(path,
|
|
536
|
+
withNewFile(path, opts) {
|
|
559
537
|
return new Container({
|
|
560
538
|
queryTree: [
|
|
561
539
|
...this._queryTree,
|
|
562
540
|
{
|
|
563
541
|
operation: "withNewFile",
|
|
564
|
-
args: { path
|
|
542
|
+
args: Object.assign({ path }, opts),
|
|
565
543
|
},
|
|
566
544
|
],
|
|
567
545
|
host: this.clientHost,
|
|
@@ -692,13 +670,12 @@ export class Container extends BaseClient {
|
|
|
692
670
|
*/
|
|
693
671
|
workdir() {
|
|
694
672
|
return __awaiter(this, void 0, void 0, function* () {
|
|
695
|
-
|
|
673
|
+
const response = yield queryBuilder([
|
|
696
674
|
...this._queryTree,
|
|
697
675
|
{
|
|
698
676
|
operation: "workdir",
|
|
699
677
|
},
|
|
700
|
-
];
|
|
701
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
678
|
+
], this.client);
|
|
702
679
|
return response;
|
|
703
680
|
});
|
|
704
681
|
}
|
|
@@ -740,13 +717,13 @@ export class Directory extends BaseClient {
|
|
|
740
717
|
/**
|
|
741
718
|
* Build a new Docker container from this directory
|
|
742
719
|
*/
|
|
743
|
-
dockerBuild(
|
|
720
|
+
dockerBuild(opts) {
|
|
744
721
|
return new Container({
|
|
745
722
|
queryTree: [
|
|
746
723
|
...this._queryTree,
|
|
747
724
|
{
|
|
748
725
|
operation: "dockerBuild",
|
|
749
|
-
args: {
|
|
726
|
+
args: Object.assign({}, opts),
|
|
750
727
|
},
|
|
751
728
|
],
|
|
752
729
|
host: this.clientHost,
|
|
@@ -755,16 +732,15 @@ export class Directory extends BaseClient {
|
|
|
755
732
|
/**
|
|
756
733
|
* Return a list of files and directories at the given path
|
|
757
734
|
*/
|
|
758
|
-
entries(
|
|
735
|
+
entries(opts) {
|
|
759
736
|
return __awaiter(this, void 0, void 0, function* () {
|
|
760
|
-
|
|
737
|
+
const response = yield queryBuilder([
|
|
761
738
|
...this._queryTree,
|
|
762
739
|
{
|
|
763
740
|
operation: "entries",
|
|
764
|
-
args: {
|
|
741
|
+
args: Object.assign({}, opts),
|
|
765
742
|
},
|
|
766
|
-
];
|
|
767
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
743
|
+
], this.client);
|
|
768
744
|
return response;
|
|
769
745
|
});
|
|
770
746
|
}
|
|
@@ -773,14 +749,13 @@ export class Directory extends BaseClient {
|
|
|
773
749
|
*/
|
|
774
750
|
export(path) {
|
|
775
751
|
return __awaiter(this, void 0, void 0, function* () {
|
|
776
|
-
|
|
752
|
+
const response = yield queryBuilder([
|
|
777
753
|
...this._queryTree,
|
|
778
754
|
{
|
|
779
755
|
operation: "export",
|
|
780
756
|
args: { path },
|
|
781
757
|
},
|
|
782
|
-
];
|
|
783
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
758
|
+
], this.client);
|
|
784
759
|
return response;
|
|
785
760
|
});
|
|
786
761
|
}
|
|
@@ -804,13 +779,12 @@ export class Directory extends BaseClient {
|
|
|
804
779
|
*/
|
|
805
780
|
id() {
|
|
806
781
|
return __awaiter(this, void 0, void 0, function* () {
|
|
807
|
-
|
|
782
|
+
const response = yield queryBuilder([
|
|
808
783
|
...this._queryTree,
|
|
809
784
|
{
|
|
810
785
|
operation: "id",
|
|
811
786
|
},
|
|
812
|
-
];
|
|
813
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
787
|
+
], this.client);
|
|
814
788
|
return response;
|
|
815
789
|
});
|
|
816
790
|
}
|
|
@@ -832,13 +806,13 @@ export class Directory extends BaseClient {
|
|
|
832
806
|
/**
|
|
833
807
|
* This directory plus a directory written at the given path
|
|
834
808
|
*/
|
|
835
|
-
withDirectory(path, directory,
|
|
809
|
+
withDirectory(path, directory, opts) {
|
|
836
810
|
return new Directory({
|
|
837
811
|
queryTree: [
|
|
838
812
|
...this._queryTree,
|
|
839
813
|
{
|
|
840
814
|
operation: "withDirectory",
|
|
841
|
-
args: { path, directory
|
|
815
|
+
args: Object.assign({ path, directory }, opts),
|
|
842
816
|
},
|
|
843
817
|
],
|
|
844
818
|
host: this.clientHost,
|
|
@@ -929,13 +903,12 @@ export class EnvVariable extends BaseClient {
|
|
|
929
903
|
*/
|
|
930
904
|
name() {
|
|
931
905
|
return __awaiter(this, void 0, void 0, function* () {
|
|
932
|
-
|
|
906
|
+
const response = yield queryBuilder([
|
|
933
907
|
...this._queryTree,
|
|
934
908
|
{
|
|
935
909
|
operation: "name",
|
|
936
910
|
},
|
|
937
|
-
];
|
|
938
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
911
|
+
], this.client);
|
|
939
912
|
return response;
|
|
940
913
|
});
|
|
941
914
|
}
|
|
@@ -944,13 +917,12 @@ export class EnvVariable extends BaseClient {
|
|
|
944
917
|
*/
|
|
945
918
|
value() {
|
|
946
919
|
return __awaiter(this, void 0, void 0, function* () {
|
|
947
|
-
|
|
920
|
+
const response = yield queryBuilder([
|
|
948
921
|
...this._queryTree,
|
|
949
922
|
{
|
|
950
923
|
operation: "value",
|
|
951
924
|
},
|
|
952
|
-
];
|
|
953
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
925
|
+
], this.client);
|
|
954
926
|
return response;
|
|
955
927
|
});
|
|
956
928
|
}
|
|
@@ -964,13 +936,12 @@ export class File extends BaseClient {
|
|
|
964
936
|
*/
|
|
965
937
|
contents() {
|
|
966
938
|
return __awaiter(this, void 0, void 0, function* () {
|
|
967
|
-
|
|
939
|
+
const response = yield queryBuilder([
|
|
968
940
|
...this._queryTree,
|
|
969
941
|
{
|
|
970
942
|
operation: "contents",
|
|
971
943
|
},
|
|
972
|
-
];
|
|
973
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
944
|
+
], this.client);
|
|
974
945
|
return response;
|
|
975
946
|
});
|
|
976
947
|
}
|
|
@@ -979,14 +950,13 @@ export class File extends BaseClient {
|
|
|
979
950
|
*/
|
|
980
951
|
export(path) {
|
|
981
952
|
return __awaiter(this, void 0, void 0, function* () {
|
|
982
|
-
|
|
953
|
+
const response = yield queryBuilder([
|
|
983
954
|
...this._queryTree,
|
|
984
955
|
{
|
|
985
956
|
operation: "export",
|
|
986
957
|
args: { path },
|
|
987
958
|
},
|
|
988
|
-
];
|
|
989
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
959
|
+
], this.client);
|
|
990
960
|
return response;
|
|
991
961
|
});
|
|
992
962
|
}
|
|
@@ -995,13 +965,12 @@ export class File extends BaseClient {
|
|
|
995
965
|
*/
|
|
996
966
|
id() {
|
|
997
967
|
return __awaiter(this, void 0, void 0, function* () {
|
|
998
|
-
|
|
968
|
+
const response = yield queryBuilder([
|
|
999
969
|
...this._queryTree,
|
|
1000
970
|
{
|
|
1001
971
|
operation: "id",
|
|
1002
972
|
},
|
|
1003
|
-
];
|
|
1004
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
973
|
+
], this.client);
|
|
1005
974
|
return response;
|
|
1006
975
|
});
|
|
1007
976
|
}
|
|
@@ -1021,13 +990,12 @@ export class File extends BaseClient {
|
|
|
1021
990
|
*/
|
|
1022
991
|
size() {
|
|
1023
992
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1024
|
-
|
|
993
|
+
const response = yield queryBuilder([
|
|
1025
994
|
...this._queryTree,
|
|
1026
995
|
{
|
|
1027
996
|
operation: "size",
|
|
1028
997
|
},
|
|
1029
|
-
];
|
|
1030
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
998
|
+
], this.client);
|
|
1031
999
|
return response;
|
|
1032
1000
|
});
|
|
1033
1001
|
}
|
|
@@ -1041,26 +1009,25 @@ export class GitRef extends BaseClient {
|
|
|
1041
1009
|
*/
|
|
1042
1010
|
digest() {
|
|
1043
1011
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1044
|
-
|
|
1012
|
+
const response = yield queryBuilder([
|
|
1045
1013
|
...this._queryTree,
|
|
1046
1014
|
{
|
|
1047
1015
|
operation: "digest",
|
|
1048
1016
|
},
|
|
1049
|
-
];
|
|
1050
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1017
|
+
], this.client);
|
|
1051
1018
|
return response;
|
|
1052
1019
|
});
|
|
1053
1020
|
}
|
|
1054
1021
|
/**
|
|
1055
1022
|
* The filesystem tree at this ref
|
|
1056
1023
|
*/
|
|
1057
|
-
tree(
|
|
1024
|
+
tree(opts) {
|
|
1058
1025
|
return new Directory({
|
|
1059
1026
|
queryTree: [
|
|
1060
1027
|
...this._queryTree,
|
|
1061
1028
|
{
|
|
1062
1029
|
operation: "tree",
|
|
1063
|
-
args: {
|
|
1030
|
+
args: Object.assign({}, opts),
|
|
1064
1031
|
},
|
|
1065
1032
|
],
|
|
1066
1033
|
host: this.clientHost,
|
|
@@ -1091,13 +1058,12 @@ export class GitRepository extends BaseClient {
|
|
|
1091
1058
|
*/
|
|
1092
1059
|
branches() {
|
|
1093
1060
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1094
|
-
|
|
1061
|
+
const response = yield queryBuilder([
|
|
1095
1062
|
...this._queryTree,
|
|
1096
1063
|
{
|
|
1097
1064
|
operation: "branches",
|
|
1098
1065
|
},
|
|
1099
|
-
];
|
|
1100
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1066
|
+
], this.client);
|
|
1101
1067
|
return response;
|
|
1102
1068
|
});
|
|
1103
1069
|
}
|
|
@@ -1136,13 +1102,12 @@ export class GitRepository extends BaseClient {
|
|
|
1136
1102
|
*/
|
|
1137
1103
|
tags() {
|
|
1138
1104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1139
|
-
|
|
1105
|
+
const response = yield queryBuilder([
|
|
1140
1106
|
...this._queryTree,
|
|
1141
1107
|
{
|
|
1142
1108
|
operation: "tags",
|
|
1143
1109
|
},
|
|
1144
|
-
];
|
|
1145
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1110
|
+
], this.client);
|
|
1146
1111
|
return response;
|
|
1147
1112
|
});
|
|
1148
1113
|
}
|
|
@@ -1154,13 +1119,13 @@ export class Host extends BaseClient {
|
|
|
1154
1119
|
/**
|
|
1155
1120
|
* Access a directory on the host
|
|
1156
1121
|
*/
|
|
1157
|
-
directory(path,
|
|
1122
|
+
directory(path, opts) {
|
|
1158
1123
|
return new Directory({
|
|
1159
1124
|
queryTree: [
|
|
1160
1125
|
...this._queryTree,
|
|
1161
1126
|
{
|
|
1162
1127
|
operation: "directory",
|
|
1163
|
-
args: { path
|
|
1128
|
+
args: Object.assign({ path }, opts),
|
|
1164
1129
|
},
|
|
1165
1130
|
],
|
|
1166
1131
|
host: this.clientHost,
|
|
@@ -1199,15 +1164,17 @@ export class Host extends BaseClient {
|
|
|
1199
1164
|
/**
|
|
1200
1165
|
* The current working directory on the host
|
|
1201
1166
|
*
|
|
1167
|
+
* @param opts optional params for workdir
|
|
1168
|
+
*
|
|
1202
1169
|
* @deprecated Use directory with path set to '.' instead.
|
|
1203
1170
|
*/
|
|
1204
|
-
workdir(
|
|
1171
|
+
workdir(opts) {
|
|
1205
1172
|
return new Directory({
|
|
1206
1173
|
queryTree: [
|
|
1207
1174
|
...this._queryTree,
|
|
1208
1175
|
{
|
|
1209
1176
|
operation: "workdir",
|
|
1210
|
-
args: {
|
|
1177
|
+
args: Object.assign({}, opts),
|
|
1211
1178
|
},
|
|
1212
1179
|
],
|
|
1213
1180
|
host: this.clientHost,
|
|
@@ -1237,13 +1204,12 @@ export class HostVariable extends BaseClient {
|
|
|
1237
1204
|
*/
|
|
1238
1205
|
value() {
|
|
1239
1206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1240
|
-
|
|
1207
|
+
const response = yield queryBuilder([
|
|
1241
1208
|
...this._queryTree,
|
|
1242
1209
|
{
|
|
1243
1210
|
operation: "value",
|
|
1244
1211
|
},
|
|
1245
|
-
];
|
|
1246
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1212
|
+
], this.client);
|
|
1247
1213
|
return response;
|
|
1248
1214
|
});
|
|
1249
1215
|
}
|
|
@@ -1257,13 +1223,12 @@ export class Project extends BaseClient {
|
|
|
1257
1223
|
*/
|
|
1258
1224
|
extensions() {
|
|
1259
1225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1260
|
-
|
|
1226
|
+
const response = yield queryBuilder([
|
|
1261
1227
|
...this._queryTree,
|
|
1262
1228
|
{
|
|
1263
1229
|
operation: "extensions",
|
|
1264
1230
|
},
|
|
1265
|
-
];
|
|
1266
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1231
|
+
], this.client);
|
|
1267
1232
|
return response;
|
|
1268
1233
|
});
|
|
1269
1234
|
}
|
|
@@ -1286,13 +1251,12 @@ export class Project extends BaseClient {
|
|
|
1286
1251
|
*/
|
|
1287
1252
|
install() {
|
|
1288
1253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1289
|
-
|
|
1254
|
+
const response = yield queryBuilder([
|
|
1290
1255
|
...this._queryTree,
|
|
1291
1256
|
{
|
|
1292
1257
|
operation: "install",
|
|
1293
1258
|
},
|
|
1294
|
-
];
|
|
1295
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1259
|
+
], this.client);
|
|
1296
1260
|
return response;
|
|
1297
1261
|
});
|
|
1298
1262
|
}
|
|
@@ -1301,13 +1265,12 @@ export class Project extends BaseClient {
|
|
|
1301
1265
|
*/
|
|
1302
1266
|
name() {
|
|
1303
1267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1304
|
-
|
|
1268
|
+
const response = yield queryBuilder([
|
|
1305
1269
|
...this._queryTree,
|
|
1306
1270
|
{
|
|
1307
1271
|
operation: "name",
|
|
1308
1272
|
},
|
|
1309
|
-
];
|
|
1310
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1273
|
+
], this.client);
|
|
1311
1274
|
return response;
|
|
1312
1275
|
});
|
|
1313
1276
|
}
|
|
@@ -1316,13 +1279,12 @@ export class Project extends BaseClient {
|
|
|
1316
1279
|
*/
|
|
1317
1280
|
schema() {
|
|
1318
1281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1319
|
-
|
|
1282
|
+
const response = yield queryBuilder([
|
|
1320
1283
|
...this._queryTree,
|
|
1321
1284
|
{
|
|
1322
1285
|
operation: "schema",
|
|
1323
1286
|
},
|
|
1324
|
-
];
|
|
1325
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1287
|
+
], this.client);
|
|
1326
1288
|
return response;
|
|
1327
1289
|
});
|
|
1328
1290
|
}
|
|
@@ -1331,13 +1293,12 @@ export class Project extends BaseClient {
|
|
|
1331
1293
|
*/
|
|
1332
1294
|
sdk() {
|
|
1333
1295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1334
|
-
|
|
1296
|
+
const response = yield queryBuilder([
|
|
1335
1297
|
...this._queryTree,
|
|
1336
1298
|
{
|
|
1337
1299
|
operation: "sdk",
|
|
1338
1300
|
},
|
|
1339
|
-
];
|
|
1340
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1301
|
+
], this.client);
|
|
1341
1302
|
return response;
|
|
1342
1303
|
});
|
|
1343
1304
|
}
|
|
@@ -1363,13 +1324,13 @@ export default class Client extends BaseClient {
|
|
|
1363
1324
|
* Null ID returns an empty container (scratch).
|
|
1364
1325
|
* Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
|
|
1365
1326
|
*/
|
|
1366
|
-
container(
|
|
1327
|
+
container(opts) {
|
|
1367
1328
|
return new Container({
|
|
1368
1329
|
queryTree: [
|
|
1369
1330
|
...this._queryTree,
|
|
1370
1331
|
{
|
|
1371
1332
|
operation: "container",
|
|
1372
|
-
args: {
|
|
1333
|
+
args: Object.assign({}, opts),
|
|
1373
1334
|
},
|
|
1374
1335
|
],
|
|
1375
1336
|
host: this.clientHost,
|
|
@@ -1380,26 +1341,25 @@ export default class Client extends BaseClient {
|
|
|
1380
1341
|
*/
|
|
1381
1342
|
defaultPlatform() {
|
|
1382
1343
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1383
|
-
|
|
1344
|
+
const response = yield queryBuilder([
|
|
1384
1345
|
...this._queryTree,
|
|
1385
1346
|
{
|
|
1386
1347
|
operation: "defaultPlatform",
|
|
1387
1348
|
},
|
|
1388
|
-
];
|
|
1389
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1349
|
+
], this.client);
|
|
1390
1350
|
return response;
|
|
1391
1351
|
});
|
|
1392
1352
|
}
|
|
1393
1353
|
/**
|
|
1394
1354
|
* Load a directory by ID. No argument produces an empty directory.
|
|
1395
1355
|
*/
|
|
1396
|
-
directory(
|
|
1356
|
+
directory(opts) {
|
|
1397
1357
|
return new Directory({
|
|
1398
1358
|
queryTree: [
|
|
1399
1359
|
...this._queryTree,
|
|
1400
1360
|
{
|
|
1401
1361
|
operation: "directory",
|
|
1402
|
-
args: {
|
|
1362
|
+
args: Object.assign({}, opts),
|
|
1403
1363
|
},
|
|
1404
1364
|
],
|
|
1405
1365
|
host: this.clientHost,
|
|
@@ -1423,13 +1383,13 @@ export default class Client extends BaseClient {
|
|
|
1423
1383
|
/**
|
|
1424
1384
|
* Query a git repository
|
|
1425
1385
|
*/
|
|
1426
|
-
git(url,
|
|
1386
|
+
git(url, opts) {
|
|
1427
1387
|
return new GitRepository({
|
|
1428
1388
|
queryTree: [
|
|
1429
1389
|
...this._queryTree,
|
|
1430
1390
|
{
|
|
1431
1391
|
operation: "git",
|
|
1432
|
-
args: { url
|
|
1392
|
+
args: Object.assign({ url }, opts),
|
|
1433
1393
|
},
|
|
1434
1394
|
],
|
|
1435
1395
|
host: this.clientHost,
|
|
@@ -1497,13 +1457,13 @@ export default class Client extends BaseClient {
|
|
|
1497
1457
|
/**
|
|
1498
1458
|
* Load a socket by ID
|
|
1499
1459
|
*/
|
|
1500
|
-
socket(
|
|
1460
|
+
socket(opts) {
|
|
1501
1461
|
return new Socket({
|
|
1502
1462
|
queryTree: [
|
|
1503
1463
|
...this._queryTree,
|
|
1504
1464
|
{
|
|
1505
1465
|
operation: "socket",
|
|
1506
|
-
args: {
|
|
1466
|
+
args: Object.assign({}, opts),
|
|
1507
1467
|
},
|
|
1508
1468
|
],
|
|
1509
1469
|
host: this.clientHost,
|
|
@@ -1519,13 +1479,12 @@ export class Secret extends BaseClient {
|
|
|
1519
1479
|
*/
|
|
1520
1480
|
id() {
|
|
1521
1481
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1522
|
-
|
|
1482
|
+
const response = yield queryBuilder([
|
|
1523
1483
|
...this._queryTree,
|
|
1524
1484
|
{
|
|
1525
1485
|
operation: "id",
|
|
1526
1486
|
},
|
|
1527
|
-
];
|
|
1528
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1487
|
+
], this.client);
|
|
1529
1488
|
return response;
|
|
1530
1489
|
});
|
|
1531
1490
|
}
|
|
@@ -1534,13 +1493,12 @@ export class Secret extends BaseClient {
|
|
|
1534
1493
|
*/
|
|
1535
1494
|
plaintext() {
|
|
1536
1495
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1537
|
-
|
|
1496
|
+
const response = yield queryBuilder([
|
|
1538
1497
|
...this._queryTree,
|
|
1539
1498
|
{
|
|
1540
1499
|
operation: "plaintext",
|
|
1541
1500
|
},
|
|
1542
|
-
];
|
|
1543
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1501
|
+
], this.client);
|
|
1544
1502
|
return response;
|
|
1545
1503
|
});
|
|
1546
1504
|
}
|
|
@@ -1551,13 +1509,12 @@ export class Socket extends BaseClient {
|
|
|
1551
1509
|
*/
|
|
1552
1510
|
id() {
|
|
1553
1511
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1554
|
-
|
|
1512
|
+
const response = yield queryBuilder([
|
|
1555
1513
|
...this._queryTree,
|
|
1556
1514
|
{
|
|
1557
1515
|
operation: "id",
|
|
1558
1516
|
},
|
|
1559
|
-
];
|
|
1560
|
-
const response = yield queryBuilder(this._queryTree, this.client);
|
|
1517
|
+
], this.client);
|
|
1561
1518
|
return response;
|
|
1562
1519
|
});
|
|
1563
1520
|
}
|