@dagger.io/dagger 0.6.3 → 0.6.4
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
CHANGED
|
@@ -136,6 +136,12 @@ export type ContainerExportOpts = {
|
|
|
136
136
|
* engine's cache, then it will be compressed using Gzip.
|
|
137
137
|
*/
|
|
138
138
|
forcedCompression?: ImageLayerCompression;
|
|
139
|
+
/**
|
|
140
|
+
* Use the specified media types for the exported image's layers. Defaults to OCI, which
|
|
141
|
+
* is largely compatible with most recent container runtimes, but Docker may be needed
|
|
142
|
+
* for older runtimes without OCI support.
|
|
143
|
+
*/
|
|
144
|
+
mediaTypes?: ImageMediaTypes;
|
|
139
145
|
};
|
|
140
146
|
export type ContainerImportOpts = {
|
|
141
147
|
/**
|
|
@@ -168,6 +174,12 @@ export type ContainerPublishOpts = {
|
|
|
168
174
|
* engine's cache, then it will be compressed using Gzip.
|
|
169
175
|
*/
|
|
170
176
|
forcedCompression?: ImageLayerCompression;
|
|
177
|
+
/**
|
|
178
|
+
* Use the specified media types for the published image's layers. Defaults to OCI, which
|
|
179
|
+
* is largely compatible with most recent registries, but Docker may be needed for older
|
|
180
|
+
* registries without OCI support.
|
|
181
|
+
*/
|
|
182
|
+
mediaTypes?: ImageMediaTypes;
|
|
171
183
|
};
|
|
172
184
|
export type ContainerWithDefaultArgsOpts = {
|
|
173
185
|
/**
|
|
@@ -484,7 +496,7 @@ export type ID = string & {
|
|
|
484
496
|
__ID: never;
|
|
485
497
|
};
|
|
486
498
|
/**
|
|
487
|
-
* Compression algorithm to use for image layers
|
|
499
|
+
* Compression algorithm to use for image layers.
|
|
488
500
|
*/
|
|
489
501
|
export declare enum ImageLayerCompression {
|
|
490
502
|
Estargz = 0,
|
|
@@ -492,6 +504,13 @@ export declare enum ImageLayerCompression {
|
|
|
492
504
|
Uncompressed = 2,
|
|
493
505
|
Zstd = 3
|
|
494
506
|
}
|
|
507
|
+
/**
|
|
508
|
+
* Mediatypes to use in published or exported image metadata.
|
|
509
|
+
*/
|
|
510
|
+
export declare enum ImageMediaTypes {
|
|
511
|
+
Dockermediatypes = 0,
|
|
512
|
+
Ocimediatypes = 1
|
|
513
|
+
}
|
|
495
514
|
/**
|
|
496
515
|
* Transport layer network protocol associated to a port.
|
|
497
516
|
*/
|
|
@@ -600,28 +619,6 @@ export type __TypeFieldsOpts = {
|
|
|
600
619
|
*/
|
|
601
620
|
export declare class CacheVolume extends BaseClient {
|
|
602
621
|
id(): Promise<CacheID>;
|
|
603
|
-
/**
|
|
604
|
-
* Chain objects together
|
|
605
|
-
* @example
|
|
606
|
-
* ```ts
|
|
607
|
-
* function AddAFewMounts(c) {
|
|
608
|
-
* return c
|
|
609
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
610
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
611
|
-
* }
|
|
612
|
-
*
|
|
613
|
-
* connect(async (client) => {
|
|
614
|
-
* const tree = await client
|
|
615
|
-
* .container()
|
|
616
|
-
* .from("alpine")
|
|
617
|
-
* .withWorkdir("/foo")
|
|
618
|
-
* .with(AddAFewMounts)
|
|
619
|
-
* .withExec(["ls", "-lh"])
|
|
620
|
-
* .stdout()
|
|
621
|
-
* })
|
|
622
|
-
*```
|
|
623
|
-
*/
|
|
624
|
-
with(arg: (param: CacheVolume) => CacheVolume): CacheVolume;
|
|
625
622
|
}
|
|
626
623
|
/**
|
|
627
624
|
* An OCI-compatible container, also known as a docker container.
|
|
@@ -692,6 +689,7 @@ export declare class Container extends BaseClient {
|
|
|
692
689
|
* Exit code of the last executed command. Zero means success.
|
|
693
690
|
*
|
|
694
691
|
* Will execute default command if none is set, or error if there's no default.
|
|
692
|
+
* @deprecated Use sync instead.
|
|
695
693
|
*/
|
|
696
694
|
exitCode(): Promise<number>;
|
|
697
695
|
/**
|
|
@@ -708,6 +706,9 @@ export declare class Container extends BaseClient {
|
|
|
708
706
|
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
709
707
|
* different layers). If this is unset and a layer has no compressed blob in the
|
|
710
708
|
* engine's cache, then it will be compressed using Gzip.
|
|
709
|
+
* @param opts.mediaTypes Use the specified media types for the exported image's layers. Defaults to OCI, which
|
|
710
|
+
* is largely compatible with most recent container runtimes, but Docker may be needed
|
|
711
|
+
* for older runtimes without OCI support.
|
|
711
712
|
*/
|
|
712
713
|
export(path: string, opts?: ContainerExportOpts): Promise<boolean>;
|
|
713
714
|
/**
|
|
@@ -800,6 +801,9 @@ export declare class Container extends BaseClient {
|
|
|
800
801
|
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
801
802
|
* different layers). If this is unset and a layer has no compressed blob in the
|
|
802
803
|
* engine's cache, then it will be compressed using Gzip.
|
|
804
|
+
* @param opts.mediaTypes Use the specified media types for the published image's layers. Defaults to OCI, which
|
|
805
|
+
* is largely compatible with most recent registries, but Docker may be needed for older
|
|
806
|
+
* registries without OCI support.
|
|
803
807
|
*/
|
|
804
808
|
publish(address: string, opts?: ContainerPublishOpts): Promise<string>;
|
|
805
809
|
/**
|
|
@@ -910,6 +914,11 @@ export declare class Container extends BaseClient {
|
|
|
910
914
|
* If the group is omitted, it defaults to the same as the user.
|
|
911
915
|
*/
|
|
912
916
|
withFile(path: string, source: File, opts?: ContainerWithFileOpts): Container;
|
|
917
|
+
/**
|
|
918
|
+
* Indicate that subsequent operations should be featured more prominently in
|
|
919
|
+
* the UI.
|
|
920
|
+
*/
|
|
921
|
+
withFocus(): Container;
|
|
913
922
|
/**
|
|
914
923
|
* Retrieves this container plus the given label.
|
|
915
924
|
* @param name The name of the label (e.g., "org.opencontainers.artifact.created").
|
|
@@ -1052,6 +1061,13 @@ export declare class Container extends BaseClient {
|
|
|
1052
1061
|
* @param opts.protocol Port protocol to unexpose
|
|
1053
1062
|
*/
|
|
1054
1063
|
withoutExposedPort(port: number, opts?: ContainerWithoutExposedPortOpts): Container;
|
|
1064
|
+
/**
|
|
1065
|
+
* Indicate that subsequent operations should not be featured more prominently
|
|
1066
|
+
* in the UI.
|
|
1067
|
+
*
|
|
1068
|
+
* This is the initial state of all containers.
|
|
1069
|
+
*/
|
|
1070
|
+
withoutFocus(): Container;
|
|
1055
1071
|
/**
|
|
1056
1072
|
* Retrieves this container minus the given environment label.
|
|
1057
1073
|
* @param name The name of the label to remove (e.g., "org.opencontainers.artifact.created").
|
|
@@ -1078,25 +1094,9 @@ export declare class Container extends BaseClient {
|
|
|
1078
1094
|
*/
|
|
1079
1095
|
workdir(): Promise<string>;
|
|
1080
1096
|
/**
|
|
1081
|
-
*
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1084
|
-
* function AddAFewMounts(c) {
|
|
1085
|
-
* return c
|
|
1086
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1087
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1088
|
-
* }
|
|
1089
|
-
*
|
|
1090
|
-
* connect(async (client) => {
|
|
1091
|
-
* const tree = await client
|
|
1092
|
-
* .container()
|
|
1093
|
-
* .from("alpine")
|
|
1094
|
-
* .withWorkdir("/foo")
|
|
1095
|
-
* .with(AddAFewMounts)
|
|
1096
|
-
* .withExec(["ls", "-lh"])
|
|
1097
|
-
* .stdout()
|
|
1098
|
-
* })
|
|
1099
|
-
*```
|
|
1097
|
+
* Call the provided function with current Container.
|
|
1098
|
+
*
|
|
1099
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
1100
1100
|
*/
|
|
1101
1101
|
with(arg: (param: Container) => Container): Container;
|
|
1102
1102
|
}
|
|
@@ -1153,6 +1153,10 @@ export declare class Directory extends BaseClient {
|
|
|
1153
1153
|
* @param opts.labels Pipeline labels.
|
|
1154
1154
|
*/
|
|
1155
1155
|
pipeline(name: string, opts?: DirectoryPipelineOpts): Directory;
|
|
1156
|
+
/**
|
|
1157
|
+
* Force evaluation in the engine.
|
|
1158
|
+
*/
|
|
1159
|
+
sync(): Promise<Directory>;
|
|
1156
1160
|
/**
|
|
1157
1161
|
* Retrieves this directory plus a directory written at the given path.
|
|
1158
1162
|
* @param path Location of the written directory (e.g., "/src/").
|
|
@@ -1205,25 +1209,9 @@ export declare class Directory extends BaseClient {
|
|
|
1205
1209
|
*/
|
|
1206
1210
|
withoutFile(path: string): Directory;
|
|
1207
1211
|
/**
|
|
1208
|
-
*
|
|
1209
|
-
*
|
|
1210
|
-
*
|
|
1211
|
-
* function AddAFewMounts(c) {
|
|
1212
|
-
* return c
|
|
1213
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1214
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1215
|
-
* }
|
|
1216
|
-
*
|
|
1217
|
-
* connect(async (client) => {
|
|
1218
|
-
* const tree = await client
|
|
1219
|
-
* .container()
|
|
1220
|
-
* .from("alpine")
|
|
1221
|
-
* .withWorkdir("/foo")
|
|
1222
|
-
* .with(AddAFewMounts)
|
|
1223
|
-
* .withExec(["ls", "-lh"])
|
|
1224
|
-
* .stdout()
|
|
1225
|
-
* })
|
|
1226
|
-
*```
|
|
1212
|
+
* Call the provided function with current Directory.
|
|
1213
|
+
*
|
|
1214
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
1227
1215
|
*/
|
|
1228
1216
|
with(arg: (param: Directory) => Directory): Directory;
|
|
1229
1217
|
}
|
|
@@ -1239,28 +1227,6 @@ export declare class EnvVariable extends BaseClient {
|
|
|
1239
1227
|
* The environment variable value.
|
|
1240
1228
|
*/
|
|
1241
1229
|
value(): Promise<string>;
|
|
1242
|
-
/**
|
|
1243
|
-
* Chain objects together
|
|
1244
|
-
* @example
|
|
1245
|
-
* ```ts
|
|
1246
|
-
* function AddAFewMounts(c) {
|
|
1247
|
-
* return c
|
|
1248
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1249
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1250
|
-
* }
|
|
1251
|
-
*
|
|
1252
|
-
* connect(async (client) => {
|
|
1253
|
-
* const tree = await client
|
|
1254
|
-
* .container()
|
|
1255
|
-
* .from("alpine")
|
|
1256
|
-
* .withWorkdir("/foo")
|
|
1257
|
-
* .with(AddAFewMounts)
|
|
1258
|
-
* .withExec(["ls", "-lh"])
|
|
1259
|
-
* .stdout()
|
|
1260
|
-
* })
|
|
1261
|
-
*```
|
|
1262
|
-
*/
|
|
1263
|
-
with(arg: (param: EnvVariable) => EnvVariable): EnvVariable;
|
|
1264
1230
|
}
|
|
1265
1231
|
/**
|
|
1266
1232
|
* A file.
|
|
@@ -1290,6 +1256,10 @@ export declare class File extends BaseClient {
|
|
|
1290
1256
|
* Gets the size of the file, in bytes.
|
|
1291
1257
|
*/
|
|
1292
1258
|
size(): Promise<number>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Force evaluation in the engine.
|
|
1261
|
+
*/
|
|
1262
|
+
sync(): Promise<File>;
|
|
1293
1263
|
/**
|
|
1294
1264
|
* Retrieves this file with its created/modified timestamps set to the given time.
|
|
1295
1265
|
* @param timestamp Timestamp to set dir/files in.
|
|
@@ -1298,25 +1268,9 @@ export declare class File extends BaseClient {
|
|
|
1298
1268
|
*/
|
|
1299
1269
|
withTimestamps(timestamp: number): File;
|
|
1300
1270
|
/**
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1304
|
-
* function AddAFewMounts(c) {
|
|
1305
|
-
* return c
|
|
1306
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1307
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1308
|
-
* }
|
|
1309
|
-
*
|
|
1310
|
-
* connect(async (client) => {
|
|
1311
|
-
* const tree = await client
|
|
1312
|
-
* .container()
|
|
1313
|
-
* .from("alpine")
|
|
1314
|
-
* .withWorkdir("/foo")
|
|
1315
|
-
* .with(AddAFewMounts)
|
|
1316
|
-
* .withExec(["ls", "-lh"])
|
|
1317
|
-
* .stdout()
|
|
1318
|
-
* })
|
|
1319
|
-
*```
|
|
1271
|
+
* Call the provided function with current File.
|
|
1272
|
+
*
|
|
1273
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
1320
1274
|
*/
|
|
1321
1275
|
with(arg: (param: File) => File): File;
|
|
1322
1276
|
}
|
|
@@ -1324,36 +1278,10 @@ export declare class File extends BaseClient {
|
|
|
1324
1278
|
* A git ref (tag, branch or commit).
|
|
1325
1279
|
*/
|
|
1326
1280
|
export declare class GitRef extends BaseClient {
|
|
1327
|
-
/**
|
|
1328
|
-
* The digest of the current value of this ref.
|
|
1329
|
-
*/
|
|
1330
|
-
digest(): Promise<string>;
|
|
1331
1281
|
/**
|
|
1332
1282
|
* The filesystem tree at this ref.
|
|
1333
1283
|
*/
|
|
1334
1284
|
tree(opts?: GitRefTreeOpts): Directory;
|
|
1335
|
-
/**
|
|
1336
|
-
* Chain objects together
|
|
1337
|
-
* @example
|
|
1338
|
-
* ```ts
|
|
1339
|
-
* function AddAFewMounts(c) {
|
|
1340
|
-
* return c
|
|
1341
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1342
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1343
|
-
* }
|
|
1344
|
-
*
|
|
1345
|
-
* connect(async (client) => {
|
|
1346
|
-
* const tree = await client
|
|
1347
|
-
* .container()
|
|
1348
|
-
* .from("alpine")
|
|
1349
|
-
* .withWorkdir("/foo")
|
|
1350
|
-
* .with(AddAFewMounts)
|
|
1351
|
-
* .withExec(["ls", "-lh"])
|
|
1352
|
-
* .stdout()
|
|
1353
|
-
* })
|
|
1354
|
-
*```
|
|
1355
|
-
*/
|
|
1356
|
-
with(arg: (param: GitRef) => GitRef): GitRef;
|
|
1357
1285
|
}
|
|
1358
1286
|
/**
|
|
1359
1287
|
* A git repository.
|
|
@@ -1364,10 +1292,6 @@ export declare class GitRepository extends BaseClient {
|
|
|
1364
1292
|
* @param name Branch's name (e.g., "main").
|
|
1365
1293
|
*/
|
|
1366
1294
|
branch(name: string): GitRef;
|
|
1367
|
-
/**
|
|
1368
|
-
* Lists of branches on the repository.
|
|
1369
|
-
*/
|
|
1370
|
-
branches(): Promise<string[]>;
|
|
1371
1295
|
/**
|
|
1372
1296
|
* Returns details on one commit.
|
|
1373
1297
|
* @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
|
|
@@ -1378,32 +1302,6 @@ export declare class GitRepository extends BaseClient {
|
|
|
1378
1302
|
* @param name Tag's name (e.g., "v0.3.9").
|
|
1379
1303
|
*/
|
|
1380
1304
|
tag(name: string): GitRef;
|
|
1381
|
-
/**
|
|
1382
|
-
* Lists of tags on the repository.
|
|
1383
|
-
*/
|
|
1384
|
-
tags(): Promise<string[]>;
|
|
1385
|
-
/**
|
|
1386
|
-
* Chain objects together
|
|
1387
|
-
* @example
|
|
1388
|
-
* ```ts
|
|
1389
|
-
* function AddAFewMounts(c) {
|
|
1390
|
-
* return c
|
|
1391
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1392
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1393
|
-
* }
|
|
1394
|
-
*
|
|
1395
|
-
* connect(async (client) => {
|
|
1396
|
-
* const tree = await client
|
|
1397
|
-
* .container()
|
|
1398
|
-
* .from("alpine")
|
|
1399
|
-
* .withWorkdir("/foo")
|
|
1400
|
-
* .with(AddAFewMounts)
|
|
1401
|
-
* .withExec(["ls", "-lh"])
|
|
1402
|
-
* .stdout()
|
|
1403
|
-
* })
|
|
1404
|
-
*```
|
|
1405
|
-
*/
|
|
1406
|
-
with(arg: (param: GitRepository) => GitRepository): GitRepository;
|
|
1407
1305
|
}
|
|
1408
1306
|
/**
|
|
1409
1307
|
* Information about the host execution environment.
|
|
@@ -1438,28 +1336,6 @@ export declare class Host extends BaseClient {
|
|
|
1438
1336
|
* @deprecated Use directory with path set to '.' instead.
|
|
1439
1337
|
*/
|
|
1440
1338
|
workdir(opts?: HostWorkdirOpts): Directory;
|
|
1441
|
-
/**
|
|
1442
|
-
* Chain objects together
|
|
1443
|
-
* @example
|
|
1444
|
-
* ```ts
|
|
1445
|
-
* function AddAFewMounts(c) {
|
|
1446
|
-
* return c
|
|
1447
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1448
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1449
|
-
* }
|
|
1450
|
-
*
|
|
1451
|
-
* connect(async (client) => {
|
|
1452
|
-
* const tree = await client
|
|
1453
|
-
* .container()
|
|
1454
|
-
* .from("alpine")
|
|
1455
|
-
* .withWorkdir("/foo")
|
|
1456
|
-
* .with(AddAFewMounts)
|
|
1457
|
-
* .withExec(["ls", "-lh"])
|
|
1458
|
-
* .stdout()
|
|
1459
|
-
* })
|
|
1460
|
-
*```
|
|
1461
|
-
*/
|
|
1462
|
-
with(arg: (param: Host) => Host): Host;
|
|
1463
1339
|
}
|
|
1464
1340
|
/**
|
|
1465
1341
|
* An environment variable on the host environment.
|
|
@@ -1474,28 +1350,6 @@ export declare class HostVariable extends BaseClient {
|
|
|
1474
1350
|
* The value of this variable.
|
|
1475
1351
|
*/
|
|
1476
1352
|
value(): Promise<string>;
|
|
1477
|
-
/**
|
|
1478
|
-
* Chain objects together
|
|
1479
|
-
* @example
|
|
1480
|
-
* ```ts
|
|
1481
|
-
* function AddAFewMounts(c) {
|
|
1482
|
-
* return c
|
|
1483
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1484
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1485
|
-
* }
|
|
1486
|
-
*
|
|
1487
|
-
* connect(async (client) => {
|
|
1488
|
-
* const tree = await client
|
|
1489
|
-
* .container()
|
|
1490
|
-
* .from("alpine")
|
|
1491
|
-
* .withWorkdir("/foo")
|
|
1492
|
-
* .with(AddAFewMounts)
|
|
1493
|
-
* .withExec(["ls", "-lh"])
|
|
1494
|
-
* .stdout()
|
|
1495
|
-
* })
|
|
1496
|
-
*```
|
|
1497
|
-
*/
|
|
1498
|
-
with(arg: (param: HostVariable) => HostVariable): HostVariable;
|
|
1499
1353
|
}
|
|
1500
1354
|
/**
|
|
1501
1355
|
* A simple key value object that represents a label.
|
|
@@ -1509,28 +1363,6 @@ export declare class Label extends BaseClient {
|
|
|
1509
1363
|
* The label value.
|
|
1510
1364
|
*/
|
|
1511
1365
|
value(): Promise<string>;
|
|
1512
|
-
/**
|
|
1513
|
-
* Chain objects together
|
|
1514
|
-
* @example
|
|
1515
|
-
* ```ts
|
|
1516
|
-
* function AddAFewMounts(c) {
|
|
1517
|
-
* return c
|
|
1518
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1519
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1520
|
-
* }
|
|
1521
|
-
*
|
|
1522
|
-
* connect(async (client) => {
|
|
1523
|
-
* const tree = await client
|
|
1524
|
-
* .container()
|
|
1525
|
-
* .from("alpine")
|
|
1526
|
-
* .withWorkdir("/foo")
|
|
1527
|
-
* .with(AddAFewMounts)
|
|
1528
|
-
* .withExec(["ls", "-lh"])
|
|
1529
|
-
* .stdout()
|
|
1530
|
-
* })
|
|
1531
|
-
*```
|
|
1532
|
-
*/
|
|
1533
|
-
with(arg: (param: Label) => Label): Label;
|
|
1534
1366
|
}
|
|
1535
1367
|
/**
|
|
1536
1368
|
* A port exposed by a container.
|
|
@@ -1548,28 +1380,6 @@ export declare class Port extends BaseClient {
|
|
|
1548
1380
|
* The transport layer network protocol.
|
|
1549
1381
|
*/
|
|
1550
1382
|
protocol(): Promise<NetworkProtocol>;
|
|
1551
|
-
/**
|
|
1552
|
-
* Chain objects together
|
|
1553
|
-
* @example
|
|
1554
|
-
* ```ts
|
|
1555
|
-
* function AddAFewMounts(c) {
|
|
1556
|
-
* return c
|
|
1557
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1558
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1559
|
-
* }
|
|
1560
|
-
*
|
|
1561
|
-
* connect(async (client) => {
|
|
1562
|
-
* const tree = await client
|
|
1563
|
-
* .container()
|
|
1564
|
-
* .from("alpine")
|
|
1565
|
-
* .withWorkdir("/foo")
|
|
1566
|
-
* .with(AddAFewMounts)
|
|
1567
|
-
* .withExec(["ls", "-lh"])
|
|
1568
|
-
* .stdout()
|
|
1569
|
-
* })
|
|
1570
|
-
*```
|
|
1571
|
-
*/
|
|
1572
|
-
with(arg: (param: Port) => Port): Port;
|
|
1573
1383
|
}
|
|
1574
1384
|
/**
|
|
1575
1385
|
* A collection of Dagger resources that can be queried and invoked.
|
|
@@ -1592,25 +1402,9 @@ export declare class Project extends BaseClient {
|
|
|
1592
1402
|
*/
|
|
1593
1403
|
name(): Promise<string>;
|
|
1594
1404
|
/**
|
|
1595
|
-
*
|
|
1596
|
-
*
|
|
1597
|
-
*
|
|
1598
|
-
* function AddAFewMounts(c) {
|
|
1599
|
-
* return c
|
|
1600
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1601
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1602
|
-
* }
|
|
1603
|
-
*
|
|
1604
|
-
* connect(async (client) => {
|
|
1605
|
-
* const tree = await client
|
|
1606
|
-
* .container()
|
|
1607
|
-
* .from("alpine")
|
|
1608
|
-
* .withWorkdir("/foo")
|
|
1609
|
-
* .with(AddAFewMounts)
|
|
1610
|
-
* .withExec(["ls", "-lh"])
|
|
1611
|
-
* .stdout()
|
|
1612
|
-
* })
|
|
1613
|
-
*```
|
|
1405
|
+
* Call the provided function with current Project.
|
|
1406
|
+
*
|
|
1407
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
1614
1408
|
*/
|
|
1615
1409
|
with(arg: (param: Project) => Project): Project;
|
|
1616
1410
|
}
|
|
@@ -1642,28 +1436,6 @@ export declare class ProjectCommand extends BaseClient {
|
|
|
1642
1436
|
* Subcommands, if any, that this command provides.
|
|
1643
1437
|
*/
|
|
1644
1438
|
subcommands(): Promise<ProjectCommand[]>;
|
|
1645
|
-
/**
|
|
1646
|
-
* Chain objects together
|
|
1647
|
-
* @example
|
|
1648
|
-
* ```ts
|
|
1649
|
-
* function AddAFewMounts(c) {
|
|
1650
|
-
* return c
|
|
1651
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1652
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1653
|
-
* }
|
|
1654
|
-
*
|
|
1655
|
-
* connect(async (client) => {
|
|
1656
|
-
* const tree = await client
|
|
1657
|
-
* .container()
|
|
1658
|
-
* .from("alpine")
|
|
1659
|
-
* .withWorkdir("/foo")
|
|
1660
|
-
* .with(AddAFewMounts)
|
|
1661
|
-
* .withExec(["ls", "-lh"])
|
|
1662
|
-
* .stdout()
|
|
1663
|
-
* })
|
|
1664
|
-
*```
|
|
1665
|
-
*/
|
|
1666
|
-
with(arg: (param: ProjectCommand) => ProjectCommand): ProjectCommand;
|
|
1667
1439
|
}
|
|
1668
1440
|
/**
|
|
1669
1441
|
* A flag accepted by a project command.
|
|
@@ -1677,28 +1449,6 @@ export declare class ProjectCommandFlag extends BaseClient {
|
|
|
1677
1449
|
* The name of the flag.
|
|
1678
1450
|
*/
|
|
1679
1451
|
name(): Promise<string>;
|
|
1680
|
-
/**
|
|
1681
|
-
* Chain objects together
|
|
1682
|
-
* @example
|
|
1683
|
-
* ```ts
|
|
1684
|
-
* function AddAFewMounts(c) {
|
|
1685
|
-
* return c
|
|
1686
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1687
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1688
|
-
* }
|
|
1689
|
-
*
|
|
1690
|
-
* connect(async (client) => {
|
|
1691
|
-
* const tree = await client
|
|
1692
|
-
* .container()
|
|
1693
|
-
* .from("alpine")
|
|
1694
|
-
* .withWorkdir("/foo")
|
|
1695
|
-
* .with(AddAFewMounts)
|
|
1696
|
-
* .withExec(["ls", "-lh"])
|
|
1697
|
-
* .stdout()
|
|
1698
|
-
* })
|
|
1699
|
-
*```
|
|
1700
|
-
*/
|
|
1701
|
-
with(arg: (param: ProjectCommandFlag) => ProjectCommandFlag): ProjectCommandFlag;
|
|
1702
1452
|
}
|
|
1703
1453
|
export default class Client extends BaseClient {
|
|
1704
1454
|
/**
|
|
@@ -1775,6 +1525,12 @@ export default class Client extends BaseClient {
|
|
|
1775
1525
|
* Loads a socket by its ID.
|
|
1776
1526
|
*/
|
|
1777
1527
|
socket(opts?: ClientSocketOpts): Socket;
|
|
1528
|
+
/**
|
|
1529
|
+
* Call the provided function with current Client.
|
|
1530
|
+
*
|
|
1531
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
1532
|
+
*/
|
|
1533
|
+
with(arg: (param: Client) => Client): Client;
|
|
1778
1534
|
}
|
|
1779
1535
|
/**
|
|
1780
1536
|
* A reference to a secret value, which can be handled more safely than the value itself.
|
|
@@ -1788,56 +1544,12 @@ export declare class Secret extends BaseClient {
|
|
|
1788
1544
|
* The value of this secret.
|
|
1789
1545
|
*/
|
|
1790
1546
|
plaintext(): Promise<string>;
|
|
1791
|
-
/**
|
|
1792
|
-
* Chain objects together
|
|
1793
|
-
* @example
|
|
1794
|
-
* ```ts
|
|
1795
|
-
* function AddAFewMounts(c) {
|
|
1796
|
-
* return c
|
|
1797
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1798
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1799
|
-
* }
|
|
1800
|
-
*
|
|
1801
|
-
* connect(async (client) => {
|
|
1802
|
-
* const tree = await client
|
|
1803
|
-
* .container()
|
|
1804
|
-
* .from("alpine")
|
|
1805
|
-
* .withWorkdir("/foo")
|
|
1806
|
-
* .with(AddAFewMounts)
|
|
1807
|
-
* .withExec(["ls", "-lh"])
|
|
1808
|
-
* .stdout()
|
|
1809
|
-
* })
|
|
1810
|
-
*```
|
|
1811
|
-
*/
|
|
1812
|
-
with(arg: (param: Secret) => Secret): Secret;
|
|
1813
1547
|
}
|
|
1814
1548
|
export declare class Socket extends BaseClient {
|
|
1815
1549
|
/**
|
|
1816
1550
|
* The content-addressed identifier of the socket.
|
|
1817
1551
|
*/
|
|
1818
1552
|
id(): Promise<SocketID>;
|
|
1819
|
-
/**
|
|
1820
|
-
* Chain objects together
|
|
1821
|
-
* @example
|
|
1822
|
-
* ```ts
|
|
1823
|
-
* function AddAFewMounts(c) {
|
|
1824
|
-
* return c
|
|
1825
|
-
* .withMountedDirectory("/foo", new Client().host().directory("/Users/slumbering/forks/dagger"))
|
|
1826
|
-
* .withMountedDirectory("/bar", new Client().host().directory("/Users/slumbering/forks/dagger/sdk/nodejs"))
|
|
1827
|
-
* }
|
|
1828
|
-
*
|
|
1829
|
-
* connect(async (client) => {
|
|
1830
|
-
* const tree = await client
|
|
1831
|
-
* .container()
|
|
1832
|
-
* .from("alpine")
|
|
1833
|
-
* .withWorkdir("/foo")
|
|
1834
|
-
* .with(AddAFewMounts)
|
|
1835
|
-
* .withExec(["ls", "-lh"])
|
|
1836
|
-
* .stdout()
|
|
1837
|
-
* })
|
|
1838
|
-
*```
|
|
1839
|
-
*/
|
|
1840
|
-
with(arg: (param: Socket) => Socket): Socket;
|
|
1841
1553
|
}
|
|
1842
1554
|
export {};
|
|
1843
1555
|
//# sourceMappingURL=client.gen.d.ts.map
|