@dagger.io/dagger 0.9.6 → 0.9.7
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 +474 -495
- package/dist/api/client.gen.d.ts.map +1 -1
- package/dist/api/client.gen.js +699 -404
- package/dist/entrypoint/entrypoint.d.ts +1 -1
- package/dist/entrypoint/entrypoint.d.ts.map +1 -1
- package/dist/entrypoint/entrypoint.js +13 -25
- package/dist/entrypoint/invoke.d.ts +14 -6
- package/dist/entrypoint/invoke.d.ts.map +1 -1
- package/dist/entrypoint/invoke.js +21 -8
- package/dist/entrypoint/load.d.ts +42 -5
- package/dist/entrypoint/load.d.ts.map +1 -1
- package/dist/entrypoint/load.js +122 -25
- package/dist/entrypoint/register.d.ts +3 -2
- package/dist/entrypoint/register.d.ts.map +1 -1
- package/dist/entrypoint/register.js +15 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/introspector/registry/registry.d.ts +1 -9
- package/dist/introspector/registry/registry.d.ts.map +1 -1
- package/dist/introspector/registry/registry.js +5 -24
- package/dist/introspector/scanner/scan.d.ts +6 -2
- package/dist/introspector/scanner/scan.d.ts.map +1 -1
- package/dist/introspector/scanner/scan.js +31 -20
- package/dist/introspector/scanner/typeDefs.d.ts +16 -7
- package/dist/introspector/scanner/typeDefs.d.ts.map +1 -1
- package/dist/introspector/scanner/utils.js +6 -6
- package/dist/provisioning/default.d.ts +1 -1
- package/dist/provisioning/default.js +1 -1
- package/package.json +2 -1
package/dist/api/client.gen.d.ts
CHANGED
|
@@ -49,8 +49,7 @@ export type BuildArg = {
|
|
|
49
49
|
*/
|
|
50
50
|
export declare enum CacheSharingMode {
|
|
51
51
|
/**
|
|
52
|
-
* Shares the cache volume amongst many build pipelines,
|
|
53
|
-
* but will serialize the writes
|
|
52
|
+
* Shares the cache volume amongst many build pipelines, but will serialize the writes
|
|
54
53
|
*/
|
|
55
54
|
Locked = "LOCKED",
|
|
56
55
|
/**
|
|
@@ -63,7 +62,7 @@ export declare enum CacheSharingMode {
|
|
|
63
62
|
Shared = "SHARED"
|
|
64
63
|
}
|
|
65
64
|
/**
|
|
66
|
-
*
|
|
65
|
+
* The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.
|
|
67
66
|
*/
|
|
68
67
|
export type CacheVolumeID = string & {
|
|
69
68
|
__CacheVolumeID: never;
|
|
@@ -71,116 +70,108 @@ export type CacheVolumeID = string & {
|
|
|
71
70
|
export type ContainerAsTarballOpts = {
|
|
72
71
|
/**
|
|
73
72
|
* Identifiers for other platform specific containers.
|
|
74
|
-
*
|
|
73
|
+
*
|
|
74
|
+
* Used for multi-platform images.
|
|
75
75
|
*/
|
|
76
76
|
platformVariants?: Container[];
|
|
77
77
|
/**
|
|
78
78
|
* Force each layer of the image to use the specified compression algorithm.
|
|
79
|
-
*
|
|
80
|
-
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
81
|
-
* different layers). If this is unset and a layer has no compressed blob in the
|
|
82
|
-
* engine's cache, then it will be compressed using Gzip.
|
|
79
|
+
*
|
|
80
|
+
* If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
|
|
83
81
|
*/
|
|
84
82
|
forcedCompression?: ImageLayerCompression;
|
|
85
83
|
/**
|
|
86
|
-
* Use the specified media types for the image's layers.
|
|
87
|
-
*
|
|
88
|
-
* for older runtimes without OCI support.
|
|
84
|
+
* Use the specified media types for the image's layers.
|
|
85
|
+
*
|
|
86
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
89
87
|
*/
|
|
90
88
|
mediaTypes?: ImageMediaTypes;
|
|
91
89
|
};
|
|
92
90
|
export type ContainerBuildOpts = {
|
|
93
91
|
/**
|
|
94
92
|
* Path to the Dockerfile to use.
|
|
95
|
-
*
|
|
96
|
-
* Default: './Dockerfile'.
|
|
97
93
|
*/
|
|
98
94
|
dockerfile?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Additional build arguments.
|
|
101
|
-
*/
|
|
102
|
-
buildArgs?: BuildArg[];
|
|
103
95
|
/**
|
|
104
96
|
* Target build stage to build.
|
|
105
97
|
*/
|
|
106
98
|
target?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Additional build arguments.
|
|
101
|
+
*/
|
|
102
|
+
buildArgs?: BuildArg[];
|
|
107
103
|
/**
|
|
108
104
|
* Secrets to pass to the build.
|
|
109
105
|
*
|
|
110
106
|
* They will be mounted at /run/secrets/[secret-name] in the build container
|
|
111
107
|
*
|
|
112
|
-
* They can be accessed in the Dockerfile using the "secret" mount type
|
|
113
|
-
* and mount path /run/secrets/[secret-name]
|
|
114
|
-
* e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)"
|
|
108
|
+
* They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl http://example.com?token=$(cat /run/secrets/my-secret)
|
|
115
109
|
*/
|
|
116
110
|
secrets?: Secret[];
|
|
117
111
|
};
|
|
118
112
|
export type ContainerExportOpts = {
|
|
119
113
|
/**
|
|
120
114
|
* Identifiers for other platform specific containers.
|
|
115
|
+
*
|
|
121
116
|
* Used for multi-platform image.
|
|
122
117
|
*/
|
|
123
118
|
platformVariants?: Container[];
|
|
124
119
|
/**
|
|
125
120
|
* Force each layer of the exported image to use the specified compression algorithm.
|
|
126
|
-
*
|
|
127
|
-
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
128
|
-
* different layers). If this is unset and a layer has no compressed blob in the
|
|
129
|
-
* engine's cache, then it will be compressed using Gzip.
|
|
121
|
+
*
|
|
122
|
+
* If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
|
|
130
123
|
*/
|
|
131
124
|
forcedCompression?: ImageLayerCompression;
|
|
132
125
|
/**
|
|
133
|
-
* Use the specified media types for the exported image's layers.
|
|
134
|
-
*
|
|
135
|
-
* for older runtimes without OCI support.
|
|
126
|
+
* Use the specified media types for the exported image's layers.
|
|
127
|
+
*
|
|
128
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
136
129
|
*/
|
|
137
130
|
mediaTypes?: ImageMediaTypes;
|
|
138
131
|
};
|
|
139
132
|
export type ContainerImportOpts = {
|
|
140
133
|
/**
|
|
141
|
-
* Identifies the tag to import from the archive, if the archive bundles
|
|
142
|
-
* multiple tags.
|
|
134
|
+
* Identifies the tag to import from the archive, if the archive bundles multiple tags.
|
|
143
135
|
*/
|
|
144
136
|
tag?: string;
|
|
145
137
|
};
|
|
146
138
|
export type ContainerPipelineOpts = {
|
|
147
139
|
/**
|
|
148
|
-
*
|
|
140
|
+
* Description of the sub-pipeline.
|
|
149
141
|
*/
|
|
150
142
|
description?: string;
|
|
151
143
|
/**
|
|
152
|
-
*
|
|
144
|
+
* Labels to apply to the sub-pipeline.
|
|
153
145
|
*/
|
|
154
146
|
labels?: PipelineLabel[];
|
|
155
147
|
};
|
|
156
148
|
export type ContainerPublishOpts = {
|
|
157
149
|
/**
|
|
158
150
|
* Identifiers for other platform specific containers.
|
|
151
|
+
*
|
|
159
152
|
* Used for multi-platform image.
|
|
160
153
|
*/
|
|
161
154
|
platformVariants?: Container[];
|
|
162
155
|
/**
|
|
163
156
|
* Force each layer of the published image to use the specified compression algorithm.
|
|
164
|
-
*
|
|
165
|
-
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
166
|
-
* different layers). If this is unset and a layer has no compressed blob in the
|
|
167
|
-
* engine's cache, then it will be compressed using Gzip.
|
|
157
|
+
*
|
|
158
|
+
* If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
|
|
168
159
|
*/
|
|
169
160
|
forcedCompression?: ImageLayerCompression;
|
|
170
161
|
/**
|
|
171
|
-
* Use the specified media types for the published image's layers.
|
|
172
|
-
*
|
|
173
|
-
* registries without OCI support.
|
|
162
|
+
* Use the specified media types for the published image's layers.
|
|
163
|
+
*
|
|
164
|
+
* Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
|
|
174
165
|
*/
|
|
175
166
|
mediaTypes?: ImageMediaTypes;
|
|
176
167
|
};
|
|
177
168
|
export type ContainerWithDirectoryOpts = {
|
|
178
169
|
/**
|
|
179
|
-
* Patterns to exclude in the written directory (e.g
|
|
170
|
+
* Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
|
|
180
171
|
*/
|
|
181
172
|
exclude?: string[];
|
|
182
173
|
/**
|
|
183
|
-
* Patterns to include in the written directory (e.g
|
|
174
|
+
* Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
|
|
184
175
|
*/
|
|
185
176
|
include?: string[];
|
|
186
177
|
/**
|
|
@@ -200,8 +191,7 @@ export type ContainerWithEntrypointOpts = {
|
|
|
200
191
|
};
|
|
201
192
|
export type ContainerWithEnvVariableOpts = {
|
|
202
193
|
/**
|
|
203
|
-
* Replace `${VAR}` or
|
|
204
|
-
* variables defined in the container (e.g., "/opt/bin:$PATH").
|
|
194
|
+
* Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
|
|
205
195
|
*/
|
|
206
196
|
expand?: boolean;
|
|
207
197
|
};
|
|
@@ -225,15 +215,11 @@ export type ContainerWithExecOpts = {
|
|
|
225
215
|
/**
|
|
226
216
|
* Provides dagger access to the executed command.
|
|
227
217
|
*
|
|
228
|
-
* Do not use this option unless you trust the command being executed.
|
|
229
|
-
* The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
|
218
|
+
* Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
|
230
219
|
*/
|
|
231
220
|
experimentalPrivilegedNesting?: boolean;
|
|
232
221
|
/**
|
|
233
|
-
* Execute the command with all root capabilities. This is similar to running a command
|
|
234
|
-
* with "sudo" or executing `docker run` with the `--privileged` flag. Containerization
|
|
235
|
-
* does not provide any security guarantees when using this option. It should only be used
|
|
236
|
-
* when absolutely necessary and only with trusted commands.
|
|
222
|
+
* Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
|
|
237
223
|
*/
|
|
238
224
|
insecureRootCapabilities?: boolean;
|
|
239
225
|
};
|
|
@@ -250,8 +236,6 @@ export type ContainerWithExposedPortOpts = {
|
|
|
250
236
|
export type ContainerWithFileOpts = {
|
|
251
237
|
/**
|
|
252
238
|
* Permission given to the copied file (e.g., 0600).
|
|
253
|
-
*
|
|
254
|
-
* Default: 0644.
|
|
255
239
|
*/
|
|
256
240
|
permissions?: number;
|
|
257
241
|
/**
|
|
@@ -275,9 +259,7 @@ export type ContainerWithMountedCacheOpts = {
|
|
|
275
259
|
/**
|
|
276
260
|
* A user:group to set for the mounted cache directory.
|
|
277
261
|
*
|
|
278
|
-
* Note that this changes the ownership of the specified mount along with the
|
|
279
|
-
* initial filesystem provided by source (if any). It does not have any effect
|
|
280
|
-
* if/when the cache has already been created.
|
|
262
|
+
* Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created.
|
|
281
263
|
*
|
|
282
264
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
283
265
|
*
|
|
@@ -316,9 +298,8 @@ export type ContainerWithMountedSecretOpts = {
|
|
|
316
298
|
owner?: string;
|
|
317
299
|
/**
|
|
318
300
|
* Permission given to the mounted secret (e.g., 0600).
|
|
319
|
-
* This option requires an owner to be set to be active.
|
|
320
301
|
*
|
|
321
|
-
*
|
|
302
|
+
* This option requires an owner to be set to be active.
|
|
322
303
|
*/
|
|
323
304
|
mode?: number;
|
|
324
305
|
};
|
|
@@ -329,8 +310,6 @@ export type ContainerWithNewFileOpts = {
|
|
|
329
310
|
contents?: string;
|
|
330
311
|
/**
|
|
331
312
|
* Permission given to the written file (e.g., 0600).
|
|
332
|
-
*
|
|
333
|
-
* Default: 0644.
|
|
334
313
|
*/
|
|
335
314
|
permissions?: number;
|
|
336
315
|
/**
|
|
@@ -365,51 +344,38 @@ export type ContainerWithoutExposedPortOpts = {
|
|
|
365
344
|
protocol?: NetworkProtocol;
|
|
366
345
|
};
|
|
367
346
|
/**
|
|
368
|
-
*
|
|
347
|
+
* The `ContainerID` scalar type represents an identifier for an object of type Container.
|
|
369
348
|
*/
|
|
370
349
|
export type ContainerID = string & {
|
|
371
350
|
__ContainerID: never;
|
|
372
351
|
};
|
|
373
|
-
/**
|
|
374
|
-
* The `DateTime` scalar type represents a DateTime. The DateTime is serialized as an RFC 3339 quoted string
|
|
375
|
-
*/
|
|
376
|
-
export type DateTime = string & {
|
|
377
|
-
__DateTime: never;
|
|
378
|
-
};
|
|
379
352
|
export type DirectoryAsModuleOpts = {
|
|
380
353
|
/**
|
|
381
|
-
* An optional subpath of the directory which contains the module's source
|
|
382
|
-
* code.
|
|
354
|
+
* An optional subpath of the directory which contains the module's source code.
|
|
383
355
|
*
|
|
384
|
-
* This is needed when the module code is in a subdirectory but requires
|
|
385
|
-
* parent directories to be loaded in order to execute. For example, the
|
|
386
|
-
* module source code may need a go.mod, project.toml, package.json, etc. file
|
|
387
|
-
* from a parent directory.
|
|
356
|
+
* This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
|
|
388
357
|
*
|
|
389
|
-
* If not set, the module source code is loaded from the root of the
|
|
390
|
-
* directory.
|
|
358
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
391
359
|
*/
|
|
392
360
|
sourceSubpath?: string;
|
|
393
361
|
};
|
|
394
362
|
export type DirectoryDockerBuildOpts = {
|
|
395
|
-
/**
|
|
396
|
-
* Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
397
|
-
*
|
|
398
|
-
* Defaults: './Dockerfile'.
|
|
399
|
-
*/
|
|
400
|
-
dockerfile?: string;
|
|
401
363
|
/**
|
|
402
364
|
* The platform to build.
|
|
403
365
|
*/
|
|
404
366
|
platform?: Platform;
|
|
405
367
|
/**
|
|
406
|
-
*
|
|
368
|
+
* Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
407
369
|
*/
|
|
408
|
-
|
|
370
|
+
dockerfile?: string;
|
|
409
371
|
/**
|
|
410
372
|
* Target build stage to build.
|
|
411
373
|
*/
|
|
412
374
|
target?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Build arguments to use in the build.
|
|
377
|
+
*/
|
|
378
|
+
buildArgs?: BuildArg[];
|
|
413
379
|
/**
|
|
414
380
|
* Secrets to pass to the build.
|
|
415
381
|
*
|
|
@@ -425,11 +391,11 @@ export type DirectoryEntriesOpts = {
|
|
|
425
391
|
};
|
|
426
392
|
export type DirectoryPipelineOpts = {
|
|
427
393
|
/**
|
|
428
|
-
*
|
|
394
|
+
* Description of the sub-pipeline.
|
|
429
395
|
*/
|
|
430
396
|
description?: string;
|
|
431
397
|
/**
|
|
432
|
-
*
|
|
398
|
+
* Labels to apply to the sub-pipeline.
|
|
433
399
|
*/
|
|
434
400
|
labels?: PipelineLabel[];
|
|
435
401
|
};
|
|
@@ -446,42 +412,47 @@ export type DirectoryWithDirectoryOpts = {
|
|
|
446
412
|
export type DirectoryWithFileOpts = {
|
|
447
413
|
/**
|
|
448
414
|
* Permission given to the copied file (e.g., 0600).
|
|
449
|
-
*
|
|
450
|
-
* Default: 0644.
|
|
451
415
|
*/
|
|
452
416
|
permissions?: number;
|
|
453
417
|
};
|
|
454
418
|
export type DirectoryWithNewDirectoryOpts = {
|
|
455
419
|
/**
|
|
456
420
|
* Permission granted to the created directory (e.g., 0777).
|
|
457
|
-
*
|
|
458
|
-
* Default: 0755.
|
|
459
421
|
*/
|
|
460
422
|
permissions?: number;
|
|
461
423
|
};
|
|
462
424
|
export type DirectoryWithNewFileOpts = {
|
|
463
425
|
/**
|
|
464
426
|
* Permission given to the copied file (e.g., 0600).
|
|
465
|
-
*
|
|
466
|
-
* Default: 0644.
|
|
467
427
|
*/
|
|
468
428
|
permissions?: number;
|
|
469
429
|
};
|
|
470
430
|
/**
|
|
471
|
-
*
|
|
431
|
+
* The `DirectoryID` scalar type represents an identifier for an object of type Directory.
|
|
472
432
|
*/
|
|
473
433
|
export type DirectoryID = string & {
|
|
474
434
|
__DirectoryID: never;
|
|
475
435
|
};
|
|
436
|
+
/**
|
|
437
|
+
* The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.
|
|
438
|
+
*/
|
|
439
|
+
export type EnvVariableID = string & {
|
|
440
|
+
__EnvVariableID: never;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
|
|
444
|
+
*/
|
|
445
|
+
export type FieldTypeDefID = string & {
|
|
446
|
+
__FieldTypeDefID: never;
|
|
447
|
+
};
|
|
476
448
|
export type FileExportOpts = {
|
|
477
449
|
/**
|
|
478
|
-
* If allowParentDirPath is true, the path argument can be a directory path, in which case
|
|
479
|
-
* the file will be created in that directory.
|
|
450
|
+
* If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
|
|
480
451
|
*/
|
|
481
452
|
allowParentDirPath?: boolean;
|
|
482
453
|
};
|
|
483
454
|
/**
|
|
484
|
-
*
|
|
455
|
+
* The `FileID` scalar type represents an identifier for an object of type File.
|
|
485
456
|
*/
|
|
486
457
|
export type FileID = string & {
|
|
487
458
|
__FileID: never;
|
|
@@ -497,35 +468,53 @@ export type FunctionWithArgOpts = {
|
|
|
497
468
|
defaultValue?: JSON;
|
|
498
469
|
};
|
|
499
470
|
/**
|
|
500
|
-
*
|
|
471
|
+
* The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.
|
|
501
472
|
*/
|
|
502
473
|
export type FunctionArgID = string & {
|
|
503
474
|
__FunctionArgID: never;
|
|
504
475
|
};
|
|
505
476
|
/**
|
|
506
|
-
*
|
|
477
|
+
* The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.
|
|
478
|
+
*/
|
|
479
|
+
export type FunctionCallArgValueID = string & {
|
|
480
|
+
__FunctionCallArgValueID: never;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.
|
|
484
|
+
*/
|
|
485
|
+
export type FunctionCallID = string & {
|
|
486
|
+
__FunctionCallID: never;
|
|
487
|
+
};
|
|
488
|
+
/**
|
|
489
|
+
* The `FunctionID` scalar type represents an identifier for an object of type Function.
|
|
507
490
|
*/
|
|
508
491
|
export type FunctionID = string & {
|
|
509
492
|
__FunctionID: never;
|
|
510
493
|
};
|
|
511
494
|
/**
|
|
512
|
-
*
|
|
495
|
+
* The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.
|
|
513
496
|
*/
|
|
514
497
|
export type GeneratedCodeID = string & {
|
|
515
498
|
__GeneratedCodeID: never;
|
|
516
499
|
};
|
|
517
500
|
export type GitRefTreeOpts = {
|
|
501
|
+
/**
|
|
502
|
+
* DEPRECATED: This option should be passed to `git` instead.
|
|
503
|
+
*/
|
|
518
504
|
sshKnownHosts?: string;
|
|
505
|
+
/**
|
|
506
|
+
* DEPRECATED: This option should be passed to `git` instead.
|
|
507
|
+
*/
|
|
519
508
|
sshAuthSocket?: Socket;
|
|
520
509
|
};
|
|
521
510
|
/**
|
|
522
|
-
*
|
|
511
|
+
* The `GitRefID` scalar type represents an identifier for an object of type GitRef.
|
|
523
512
|
*/
|
|
524
513
|
export type GitRefID = string & {
|
|
525
514
|
__GitRefID: never;
|
|
526
515
|
};
|
|
527
516
|
/**
|
|
528
|
-
*
|
|
517
|
+
* The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.
|
|
529
518
|
*/
|
|
530
519
|
export type GitRepositoryID = string & {
|
|
531
520
|
__GitRepositoryID: never;
|
|
@@ -545,34 +534,38 @@ export type HostServiceOpts = {
|
|
|
545
534
|
* Upstream host to forward traffic to.
|
|
546
535
|
*/
|
|
547
536
|
host?: string;
|
|
548
|
-
};
|
|
549
|
-
export type HostTunnelOpts = {
|
|
550
537
|
/**
|
|
551
|
-
*
|
|
552
|
-
* running natively.
|
|
538
|
+
* Ports to expose via the service, forwarding through the host network.
|
|
553
539
|
*
|
|
554
|
-
*
|
|
540
|
+
* If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
|
|
541
|
+
*
|
|
542
|
+
* An empty set of ports is not valid; an error will be returned.
|
|
555
543
|
*/
|
|
556
|
-
|
|
544
|
+
ports: PortForward[];
|
|
545
|
+
};
|
|
546
|
+
export type HostTunnelOpts = {
|
|
557
547
|
/**
|
|
558
548
|
* Configure explicit port forwarding rules for the tunnel.
|
|
559
549
|
*
|
|
560
|
-
* If a port's frontend is unspecified or 0, a random port will be chosen by
|
|
561
|
-
* the host.
|
|
550
|
+
* If a port's frontend is unspecified or 0, a random port will be chosen by the host.
|
|
562
551
|
*
|
|
563
|
-
* If no ports are given, all of the service's ports are forwarded. If native
|
|
564
|
-
* is true, each port maps to the same port on the host. If native is false,
|
|
565
|
-
* each port maps to a random port chosen by the host.
|
|
552
|
+
* If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host.
|
|
566
553
|
*
|
|
567
554
|
* If ports are given and native is true, the ports are additive.
|
|
568
555
|
*/
|
|
569
556
|
ports?: PortForward[];
|
|
557
|
+
/**
|
|
558
|
+
* Map each service port to the same port on the host, as if the service were running natively.
|
|
559
|
+
*
|
|
560
|
+
* Note: enabling may result in port conflicts.
|
|
561
|
+
*/
|
|
562
|
+
native?: boolean;
|
|
570
563
|
};
|
|
571
564
|
/**
|
|
572
|
-
* The `
|
|
565
|
+
* The `HostID` scalar type represents an identifier for an object of type Host.
|
|
573
566
|
*/
|
|
574
|
-
export type
|
|
575
|
-
|
|
567
|
+
export type HostID = string & {
|
|
568
|
+
__HostID: never;
|
|
576
569
|
};
|
|
577
570
|
/**
|
|
578
571
|
* Compression algorithm to use for image layers.
|
|
@@ -590,6 +583,12 @@ export declare enum ImageMediaTypes {
|
|
|
590
583
|
Dockermediatypes = "DockerMediaTypes",
|
|
591
584
|
Ocimediatypes = "OCIMediaTypes"
|
|
592
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
* The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
|
|
588
|
+
*/
|
|
589
|
+
export type InterfaceTypeDefID = string & {
|
|
590
|
+
__InterfaceTypeDefID: never;
|
|
591
|
+
};
|
|
593
592
|
/**
|
|
594
593
|
* An arbitrary JSON-encoded value.
|
|
595
594
|
*/
|
|
@@ -597,7 +596,35 @@ export type JSON = string & {
|
|
|
597
596
|
__JSON: never;
|
|
598
597
|
};
|
|
599
598
|
/**
|
|
600
|
-
*
|
|
599
|
+
* The `LabelID` scalar type represents an identifier for an object of type Label.
|
|
600
|
+
*/
|
|
601
|
+
export type LabelID = string & {
|
|
602
|
+
__LabelID: never;
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
* The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.
|
|
606
|
+
*/
|
|
607
|
+
export type ListTypeDefID = string & {
|
|
608
|
+
__ListTypeDefID: never;
|
|
609
|
+
};
|
|
610
|
+
export type ModuleWithSourceOpts = {
|
|
611
|
+
/**
|
|
612
|
+
* An optional subpath of the directory which contains the module's source code.
|
|
613
|
+
*
|
|
614
|
+
* This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
|
|
615
|
+
*
|
|
616
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
617
|
+
*/
|
|
618
|
+
subpath?: string;
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* The `ModuleConfigID` scalar type represents an identifier for an object of type ModuleConfig.
|
|
622
|
+
*/
|
|
623
|
+
export type ModuleConfigID = string & {
|
|
624
|
+
__ModuleConfigID: never;
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* The `ModuleID` scalar type represents an identifier for an object of type Module.
|
|
601
628
|
*/
|
|
602
629
|
export type ModuleID = string & {
|
|
603
630
|
__ModuleID: never;
|
|
@@ -606,15 +633,15 @@ export type ModuleID = string & {
|
|
|
606
633
|
* Transport layer network protocol associated to a port.
|
|
607
634
|
*/
|
|
608
635
|
export declare enum NetworkProtocol {
|
|
609
|
-
/**
|
|
610
|
-
* TCP (Transmission Control Protocol)
|
|
611
|
-
*/
|
|
612
636
|
Tcp = "TCP",
|
|
613
|
-
/**
|
|
614
|
-
* UDP (User Datagram Protocol)
|
|
615
|
-
*/
|
|
616
637
|
Udp = "UDP"
|
|
617
638
|
}
|
|
639
|
+
/**
|
|
640
|
+
* The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.
|
|
641
|
+
*/
|
|
642
|
+
export type ObjectTypeDefID = string & {
|
|
643
|
+
__ObjectTypeDefID: never;
|
|
644
|
+
};
|
|
618
645
|
export type PipelineLabel = {
|
|
619
646
|
/**
|
|
620
647
|
* Label name.
|
|
@@ -643,15 +670,30 @@ export type PortForward = {
|
|
|
643
670
|
*/
|
|
644
671
|
frontend?: number;
|
|
645
672
|
/**
|
|
646
|
-
*
|
|
673
|
+
* Transport layer protocol to use for traffic.
|
|
647
674
|
*/
|
|
648
675
|
protocol?: NetworkProtocol;
|
|
649
676
|
};
|
|
677
|
+
/**
|
|
678
|
+
* The `PortID` scalar type represents an identifier for an object of type Port.
|
|
679
|
+
*/
|
|
680
|
+
export type PortID = string & {
|
|
681
|
+
__PortID: never;
|
|
682
|
+
};
|
|
650
683
|
export type ClientContainerOpts = {
|
|
684
|
+
/**
|
|
685
|
+
* DEPRECATED: Use `loadContainerFromID` instead.
|
|
686
|
+
*/
|
|
651
687
|
id?: ContainerID;
|
|
688
|
+
/**
|
|
689
|
+
* Platform to initialize the container with.
|
|
690
|
+
*/
|
|
652
691
|
platform?: Platform;
|
|
653
692
|
};
|
|
654
693
|
export type ClientDirectoryOpts = {
|
|
694
|
+
/**
|
|
695
|
+
* DEPRECATED: Use `loadDirectoryFromID` isntead.
|
|
696
|
+
*/
|
|
655
697
|
id?: DirectoryID;
|
|
656
698
|
};
|
|
657
699
|
export type ClientGitOpts = {
|
|
@@ -659,6 +701,10 @@ export type ClientGitOpts = {
|
|
|
659
701
|
* Set to true to keep .git directory.
|
|
660
702
|
*/
|
|
661
703
|
keepGitDir?: boolean;
|
|
704
|
+
/**
|
|
705
|
+
* A service which must be started before the repo is fetched.
|
|
706
|
+
*/
|
|
707
|
+
experimentalServiceHost?: Service;
|
|
662
708
|
/**
|
|
663
709
|
* Set SSH known hosts
|
|
664
710
|
*/
|
|
@@ -667,10 +713,6 @@ export type ClientGitOpts = {
|
|
|
667
713
|
* Set SSH auth socket
|
|
668
714
|
*/
|
|
669
715
|
sshAuthSocket?: Socket;
|
|
670
|
-
/**
|
|
671
|
-
* A service which must be started before the repo is fetched.
|
|
672
|
-
*/
|
|
673
|
-
experimentalServiceHost?: Service;
|
|
674
716
|
};
|
|
675
717
|
export type ClientHttpOpts = {
|
|
676
718
|
/**
|
|
@@ -683,19 +725,16 @@ export type ClientModuleConfigOpts = {
|
|
|
683
725
|
};
|
|
684
726
|
export type ClientPipelineOpts = {
|
|
685
727
|
/**
|
|
686
|
-
*
|
|
728
|
+
* Description of the sub-pipeline.
|
|
687
729
|
*/
|
|
688
730
|
description?: string;
|
|
689
731
|
/**
|
|
690
|
-
*
|
|
732
|
+
* Labels to apply to the sub-pipeline.
|
|
691
733
|
*/
|
|
692
734
|
labels?: PipelineLabel[];
|
|
693
735
|
};
|
|
694
|
-
export type ClientSocketOpts = {
|
|
695
|
-
id?: SocketID;
|
|
696
|
-
};
|
|
697
736
|
/**
|
|
698
|
-
*
|
|
737
|
+
* The `SecretID` scalar type represents an identifier for an object of type Secret.
|
|
699
738
|
*/
|
|
700
739
|
export type SecretID = string & {
|
|
701
740
|
__SecretID: never;
|
|
@@ -711,13 +750,13 @@ export type ServiceEndpointOpts = {
|
|
|
711
750
|
scheme?: string;
|
|
712
751
|
};
|
|
713
752
|
/**
|
|
714
|
-
*
|
|
753
|
+
* The `ServiceID` scalar type represents an identifier for an object of type Service.
|
|
715
754
|
*/
|
|
716
755
|
export type ServiceID = string & {
|
|
717
756
|
__ServiceID: never;
|
|
718
757
|
};
|
|
719
758
|
/**
|
|
720
|
-
*
|
|
759
|
+
* The `SocketID` scalar type represents an identifier for an object of type Socket.
|
|
721
760
|
*/
|
|
722
761
|
export type SocketID = string & {
|
|
723
762
|
__SocketID: never;
|
|
@@ -735,7 +774,7 @@ export type TypeDefWithObjectOpts = {
|
|
|
735
774
|
description?: string;
|
|
736
775
|
};
|
|
737
776
|
/**
|
|
738
|
-
*
|
|
777
|
+
* The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.
|
|
739
778
|
*/
|
|
740
779
|
export type TypeDefID = string & {
|
|
741
780
|
__TypeDefID: never;
|
|
@@ -745,46 +784,44 @@ export type TypeDefID = string & {
|
|
|
745
784
|
*/
|
|
746
785
|
export declare enum TypeDefKind {
|
|
747
786
|
/**
|
|
748
|
-
* A boolean value
|
|
787
|
+
* A boolean value.
|
|
749
788
|
*/
|
|
750
|
-
|
|
789
|
+
BooleanKind = "BOOLEAN_KIND",
|
|
751
790
|
/**
|
|
752
|
-
* An integer value
|
|
791
|
+
* An integer value.
|
|
753
792
|
*/
|
|
754
|
-
|
|
793
|
+
IntegerKind = "INTEGER_KIND",
|
|
755
794
|
/**
|
|
756
795
|
* A named type of functions that can be matched+implemented by other objects+interfaces.
|
|
757
796
|
*
|
|
758
797
|
* Always paired with an InterfaceTypeDef.
|
|
759
798
|
*/
|
|
760
|
-
|
|
799
|
+
InterfaceKind = "INTERFACE_KIND",
|
|
761
800
|
/**
|
|
762
801
|
* A list of values all having the same type.
|
|
763
802
|
*
|
|
764
803
|
* Always paired with a ListTypeDef.
|
|
765
804
|
*/
|
|
766
|
-
|
|
805
|
+
ListKind = "LIST_KIND",
|
|
767
806
|
/**
|
|
768
807
|
* A named type defined in the GraphQL schema, with fields and functions.
|
|
769
808
|
*
|
|
770
809
|
* Always paired with an ObjectTypeDef.
|
|
771
810
|
*/
|
|
772
|
-
|
|
811
|
+
ObjectKind = "OBJECT_KIND",
|
|
773
812
|
/**
|
|
774
|
-
* A string value
|
|
813
|
+
* A string value.
|
|
775
814
|
*/
|
|
776
|
-
|
|
815
|
+
StringKind = "STRING_KIND",
|
|
777
816
|
/**
|
|
778
817
|
* A special kind used to signify that no value is returned.
|
|
779
818
|
*
|
|
780
|
-
* This is used for functions that have no return value. The outer TypeDef
|
|
781
|
-
* specifying this Kind is always Optional, as the Void is never actually
|
|
782
|
-
* represented.
|
|
819
|
+
* This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented.
|
|
783
820
|
*/
|
|
784
|
-
|
|
821
|
+
VoidKind = "VOID_KIND"
|
|
785
822
|
}
|
|
786
823
|
/**
|
|
787
|
-
* The
|
|
824
|
+
* The absence of a value.
|
|
788
825
|
*
|
|
789
826
|
* A Null Void is used as a placeholder for resolvers that do not return anything.
|
|
790
827
|
*/
|
|
@@ -809,10 +846,13 @@ export declare class CacheVolume extends BaseClient {
|
|
|
809
846
|
queryTree?: QueryTree[];
|
|
810
847
|
ctx: Context;
|
|
811
848
|
}, _id?: CacheVolumeID);
|
|
849
|
+
/**
|
|
850
|
+
* A unique identifier for this CacheVolume.
|
|
851
|
+
*/
|
|
812
852
|
id: () => Promise<CacheVolumeID>;
|
|
813
853
|
}
|
|
814
854
|
/**
|
|
815
|
-
* An OCI-compatible container, also known as a
|
|
855
|
+
* An OCI-compatible container, also known as a Docker container.
|
|
816
856
|
*/
|
|
817
857
|
export declare class Container extends BaseClient {
|
|
818
858
|
private readonly _id?;
|
|
@@ -836,7 +876,7 @@ export declare class Container extends BaseClient {
|
|
|
836
876
|
ctx: Context;
|
|
837
877
|
}, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _shellEndpoint?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _user?: string, _workdir?: string);
|
|
838
878
|
/**
|
|
839
|
-
* A unique identifier for this
|
|
879
|
+
* A unique identifier for this Container.
|
|
840
880
|
*/
|
|
841
881
|
id: () => Promise<ContainerID>;
|
|
842
882
|
/**
|
|
@@ -848,32 +888,27 @@ export declare class Container extends BaseClient {
|
|
|
848
888
|
/**
|
|
849
889
|
* Returns a File representing the container serialized to a tarball.
|
|
850
890
|
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
851
|
-
*
|
|
891
|
+
*
|
|
892
|
+
* Used for multi-platform images.
|
|
852
893
|
* @param opts.forcedCompression Force each layer of the image to use the specified compression algorithm.
|
|
853
|
-
*
|
|
854
|
-
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
* is largely compatible with most recent container runtimes, but Docker may be needed
|
|
859
|
-
* for older runtimes without OCI support.
|
|
894
|
+
*
|
|
895
|
+
* If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
|
|
896
|
+
* @param opts.mediaTypes Use the specified media types for the image's layers.
|
|
897
|
+
*
|
|
898
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
860
899
|
*/
|
|
861
900
|
asTarball: (opts?: ContainerAsTarballOpts) => File;
|
|
862
901
|
/**
|
|
863
902
|
* Initializes this container from a Dockerfile build.
|
|
864
903
|
* @param context Directory context used by the Dockerfile.
|
|
865
904
|
* @param opts.dockerfile Path to the Dockerfile to use.
|
|
866
|
-
*
|
|
867
|
-
* Default: './Dockerfile'.
|
|
868
|
-
* @param opts.buildArgs Additional build arguments.
|
|
869
905
|
* @param opts.target Target build stage to build.
|
|
906
|
+
* @param opts.buildArgs Additional build arguments.
|
|
870
907
|
* @param opts.secrets Secrets to pass to the build.
|
|
871
908
|
*
|
|
872
909
|
* They will be mounted at /run/secrets/[secret-name] in the build container
|
|
873
910
|
*
|
|
874
|
-
* They can be accessed in the Dockerfile using the "secret" mount type
|
|
875
|
-
* and mount path /run/secrets/[secret-name]
|
|
876
|
-
* e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)"
|
|
911
|
+
* They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl http://example.com?token=$(cat /run/secrets/my-secret)
|
|
877
912
|
*/
|
|
878
913
|
build: (context: Directory, opts?: ContainerBuildOpts) => Container;
|
|
879
914
|
/**
|
|
@@ -903,41 +938,44 @@ export declare class Container extends BaseClient {
|
|
|
903
938
|
/**
|
|
904
939
|
* EXPERIMENTAL API! Subject to change/removal at any time.
|
|
905
940
|
*
|
|
906
|
-
*
|
|
941
|
+
* Configures all available GPUs on the host to be accessible to this container.
|
|
942
|
+
*
|
|
907
943
|
* This currently works for Nvidia devices only.
|
|
908
944
|
*/
|
|
909
945
|
experimentalWithAllGPUs: () => Container;
|
|
910
946
|
/**
|
|
911
947
|
* EXPERIMENTAL API! Subject to change/removal at any time.
|
|
912
948
|
*
|
|
913
|
-
*
|
|
949
|
+
* Configures the provided list of devices to be accesible to this container.
|
|
950
|
+
*
|
|
914
951
|
* This currently works for Nvidia devices only.
|
|
952
|
+
* @param devices List of devices to be accessible to this container.
|
|
915
953
|
*/
|
|
916
954
|
experimentalWithGPU: (devices: string[]) => Container;
|
|
917
955
|
/**
|
|
918
|
-
* Writes the container as an OCI tarball to the destination file path on the host
|
|
956
|
+
* Writes the container as an OCI tarball to the destination file path on the host.
|
|
919
957
|
*
|
|
920
958
|
* Return true on success.
|
|
921
|
-
*
|
|
959
|
+
*
|
|
960
|
+
* It can also export platform variants.
|
|
922
961
|
* @param path Host's destination path (e.g., "./tarball").
|
|
962
|
+
*
|
|
923
963
|
* Path can be relative to the engine's workdir or absolute.
|
|
924
964
|
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
965
|
+
*
|
|
925
966
|
* Used for multi-platform image.
|
|
926
967
|
* @param opts.forcedCompression Force each layer of the exported image to use the specified compression algorithm.
|
|
927
|
-
*
|
|
928
|
-
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
929
|
-
*
|
|
930
|
-
*
|
|
931
|
-
*
|
|
932
|
-
* is largely compatible with most recent container runtimes, but Docker may be needed
|
|
933
|
-
* for older runtimes without OCI support.
|
|
968
|
+
*
|
|
969
|
+
* If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
|
|
970
|
+
* @param opts.mediaTypes Use the specified media types for the exported image's layers.
|
|
971
|
+
*
|
|
972
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
934
973
|
*/
|
|
935
974
|
export: (path: string, opts?: ContainerExportOpts) => Promise<boolean>;
|
|
936
975
|
/**
|
|
937
976
|
* Retrieves the list of exposed ports.
|
|
938
977
|
*
|
|
939
|
-
* This includes ports already exposed by the image, even if not
|
|
940
|
-
* explicitly added with dagger.
|
|
978
|
+
* This includes ports already exposed by the image, even if not explicitly added with dagger.
|
|
941
979
|
*/
|
|
942
980
|
exposedPorts: () => Promise<Port[]>;
|
|
943
981
|
/**
|
|
@@ -960,16 +998,13 @@ export declare class Container extends BaseClient {
|
|
|
960
998
|
imageRef: () => Promise<string>;
|
|
961
999
|
/**
|
|
962
1000
|
* Reads the container from an OCI tarball.
|
|
963
|
-
*
|
|
964
|
-
* NOTE: this involves unpacking the tarball to an OCI store on the host at
|
|
965
|
-
* $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like.
|
|
966
1001
|
* @param source File to read the container from.
|
|
967
|
-
* @param opts.tag Identifies the tag to import from the archive, if the archive bundles
|
|
968
|
-
* multiple tags.
|
|
1002
|
+
* @param opts.tag Identifies the tag to import from the archive, if the archive bundles multiple tags.
|
|
969
1003
|
*/
|
|
970
1004
|
import_: (source: File, opts?: ContainerImportOpts) => Container;
|
|
971
1005
|
/**
|
|
972
1006
|
* Retrieves the value of the specified label.
|
|
1007
|
+
* @param name The name of the label (e.g., "org.opencontainers.artifact.created").
|
|
973
1008
|
*/
|
|
974
1009
|
label: (name: string) => Promise<string>;
|
|
975
1010
|
/**
|
|
@@ -981,10 +1016,10 @@ export declare class Container extends BaseClient {
|
|
|
981
1016
|
*/
|
|
982
1017
|
mounts: () => Promise<string[]>;
|
|
983
1018
|
/**
|
|
984
|
-
* Creates a named sub-pipeline
|
|
985
|
-
* @param name
|
|
986
|
-
* @param opts.description
|
|
987
|
-
* @param opts.labels
|
|
1019
|
+
* Creates a named sub-pipeline.
|
|
1020
|
+
* @param name Name of the sub-pipeline.
|
|
1021
|
+
* @param opts.description Description of the sub-pipeline.
|
|
1022
|
+
* @param opts.labels Labels to apply to the sub-pipeline.
|
|
988
1023
|
*/
|
|
989
1024
|
pipeline: (name: string, opts?: ContainerPipelineOpts) => Container;
|
|
990
1025
|
/**
|
|
@@ -995,20 +1030,20 @@ export declare class Container extends BaseClient {
|
|
|
995
1030
|
* Publishes this container as a new image to the specified address.
|
|
996
1031
|
*
|
|
997
1032
|
* Publish returns a fully qualified ref.
|
|
1033
|
+
*
|
|
998
1034
|
* It can also publish platform variants.
|
|
999
1035
|
* @param address Registry's address to publish the image to.
|
|
1000
1036
|
*
|
|
1001
1037
|
* Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
|
|
1002
1038
|
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
1039
|
+
*
|
|
1003
1040
|
* Used for multi-platform image.
|
|
1004
1041
|
* @param opts.forcedCompression Force each layer of the published image to use the specified compression algorithm.
|
|
1005
|
-
*
|
|
1006
|
-
* cache, that will be used (this can result in a mix of compression algorithms for
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
1010
|
-
* is largely compatible with most recent registries, but Docker may be needed for older
|
|
1011
|
-
* registries without OCI support.
|
|
1042
|
+
*
|
|
1043
|
+
* If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
|
|
1044
|
+
* @param opts.mediaTypes Use the specified media types for the published image's layers.
|
|
1045
|
+
*
|
|
1046
|
+
* Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
|
|
1012
1047
|
*/
|
|
1013
1048
|
publish: (address: string, opts?: ContainerPublishOpts) => Promise<string>;
|
|
1014
1049
|
/**
|
|
@@ -1016,8 +1051,7 @@ export declare class Container extends BaseClient {
|
|
|
1016
1051
|
*/
|
|
1017
1052
|
rootfs: () => Directory;
|
|
1018
1053
|
/**
|
|
1019
|
-
* Return a websocket endpoint that, if connected to, will start the container with a TTY streamed
|
|
1020
|
-
* over the websocket.
|
|
1054
|
+
* Return a websocket endpoint that, if connected to, will start the container with a TTY streamed over the websocket.
|
|
1021
1055
|
*
|
|
1022
1056
|
* Primarily intended for internal use with the dagger CLI.
|
|
1023
1057
|
*/
|
|
@@ -1053,8 +1087,8 @@ export declare class Container extends BaseClient {
|
|
|
1053
1087
|
* Retrieves this container plus a directory written at the given path.
|
|
1054
1088
|
* @param path Location of the written directory (e.g., "/tmp/directory").
|
|
1055
1089
|
* @param directory Identifier of the directory to write
|
|
1056
|
-
* @param opts.exclude Patterns to exclude in the written directory (e.g
|
|
1057
|
-
* @param opts.include Patterns to include in the written directory (e.g
|
|
1090
|
+
* @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
|
|
1091
|
+
* @param opts.include Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
|
|
1058
1092
|
* @param opts.owner A user:group to set for the directory and its contents.
|
|
1059
1093
|
*
|
|
1060
1094
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
@@ -1072,8 +1106,7 @@ export declare class Container extends BaseClient {
|
|
|
1072
1106
|
* Retrieves this container plus the given environment variable.
|
|
1073
1107
|
* @param name The name of the environment variable (e.g., "HOST").
|
|
1074
1108
|
* @param value The value of the environment variable. (e.g., "localhost").
|
|
1075
|
-
* @param opts.expand Replace `${VAR}` or
|
|
1076
|
-
* variables defined in the container (e.g., "/opt/bin:$PATH").
|
|
1109
|
+
* @param opts.expand Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
|
|
1077
1110
|
*/
|
|
1078
1111
|
withEnvVariable: (name: string, value: string, opts?: ContainerWithEnvVariableOpts) => Container;
|
|
1079
1112
|
/**
|
|
@@ -1087,12 +1120,8 @@ export declare class Container extends BaseClient {
|
|
|
1087
1120
|
* @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
|
1088
1121
|
* @param opts.experimentalPrivilegedNesting Provides dagger access to the executed command.
|
|
1089
1122
|
*
|
|
1090
|
-
* Do not use this option unless you trust the command being executed.
|
|
1091
|
-
*
|
|
1092
|
-
* @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command
|
|
1093
|
-
* with "sudo" or executing `docker run` with the `--privileged` flag. Containerization
|
|
1094
|
-
* does not provide any security guarantees when using this option. It should only be used
|
|
1095
|
-
* when absolutely necessary and only with trusted commands.
|
|
1123
|
+
* Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
|
1124
|
+
* @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
|
|
1096
1125
|
*/
|
|
1097
1126
|
withExec: (args: string[], opts?: ContainerWithExecOpts) => Container;
|
|
1098
1127
|
/**
|
|
@@ -1101,6 +1130,7 @@ export declare class Container extends BaseClient {
|
|
|
1101
1130
|
* Exposed ports serve two purposes:
|
|
1102
1131
|
*
|
|
1103
1132
|
* - For health checks and introspection, when running services
|
|
1133
|
+
*
|
|
1104
1134
|
* - For setting the EXPOSE OCI field when publishing the container
|
|
1105
1135
|
* @param port Port number to expose
|
|
1106
1136
|
* @param opts.protocol Transport layer network protocol
|
|
@@ -1112,8 +1142,6 @@ export declare class Container extends BaseClient {
|
|
|
1112
1142
|
* @param path Location of the copied file (e.g., "/tmp/file.txt").
|
|
1113
1143
|
* @param source Identifier of the file to copy.
|
|
1114
1144
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1115
|
-
*
|
|
1116
|
-
* Default: 0644.
|
|
1117
1145
|
* @param opts.owner A user:group to set for the file.
|
|
1118
1146
|
*
|
|
1119
1147
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
@@ -1122,8 +1150,7 @@ export declare class Container extends BaseClient {
|
|
|
1122
1150
|
*/
|
|
1123
1151
|
withFile: (path: string, source: File, opts?: ContainerWithFileOpts) => Container;
|
|
1124
1152
|
/**
|
|
1125
|
-
* Indicate that subsequent operations should be featured more prominently in
|
|
1126
|
-
* the UI.
|
|
1153
|
+
* Indicate that subsequent operations should be featured more prominently in the UI.
|
|
1127
1154
|
*/
|
|
1128
1155
|
withFocus: () => Container;
|
|
1129
1156
|
/**
|
|
@@ -1140,9 +1167,7 @@ export declare class Container extends BaseClient {
|
|
|
1140
1167
|
* @param opts.sharing Sharing mode of the cache volume.
|
|
1141
1168
|
* @param opts.owner A user:group to set for the mounted cache directory.
|
|
1142
1169
|
*
|
|
1143
|
-
* Note that this changes the ownership of the specified mount along with the
|
|
1144
|
-
* initial filesystem provided by source (if any). It does not have any effect
|
|
1145
|
-
* if/when the cache has already been created.
|
|
1170
|
+
* Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created.
|
|
1146
1171
|
*
|
|
1147
1172
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1148
1173
|
*
|
|
@@ -1181,9 +1206,8 @@ export declare class Container extends BaseClient {
|
|
|
1181
1206
|
*
|
|
1182
1207
|
* If the group is omitted, it defaults to the same as the user.
|
|
1183
1208
|
* @param opts.mode Permission given to the mounted secret (e.g., 0600).
|
|
1184
|
-
* This option requires an owner to be set to be active.
|
|
1185
1209
|
*
|
|
1186
|
-
*
|
|
1210
|
+
* This option requires an owner to be set to be active.
|
|
1187
1211
|
*/
|
|
1188
1212
|
withMountedSecret: (path: string, source: Secret, opts?: ContainerWithMountedSecretOpts) => Container;
|
|
1189
1213
|
/**
|
|
@@ -1196,8 +1220,6 @@ export declare class Container extends BaseClient {
|
|
|
1196
1220
|
* @param path Location of the written file (e.g., "/tmp/file.txt").
|
|
1197
1221
|
* @param opts.contents Content of the file to write (e.g., "Hello world!").
|
|
1198
1222
|
* @param opts.permissions Permission given to the written file (e.g., 0600).
|
|
1199
|
-
*
|
|
1200
|
-
* Default: 0644.
|
|
1201
1223
|
* @param opts.owner A user:group to set for the file.
|
|
1202
1224
|
*
|
|
1203
1225
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
@@ -1208,13 +1230,15 @@ export declare class Container extends BaseClient {
|
|
|
1208
1230
|
/**
|
|
1209
1231
|
* Retrieves this container with a registry authentication for a given address.
|
|
1210
1232
|
* @param address Registry's address to bind the authentication to.
|
|
1233
|
+
*
|
|
1211
1234
|
* Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
|
1212
1235
|
* @param username The username of the registry's account (e.g., "Dagger").
|
|
1213
1236
|
* @param secret The API key, password or token to authenticate to this registry.
|
|
1214
1237
|
*/
|
|
1215
1238
|
withRegistryAuth: (address: string, username: string, secret: Secret) => Container;
|
|
1216
1239
|
/**
|
|
1217
|
-
*
|
|
1240
|
+
* Retrieves the container with the given directory mounted to /.
|
|
1241
|
+
* @param directory Directory to mount.
|
|
1218
1242
|
*/
|
|
1219
1243
|
withRootfs: (directory: Directory) => Container;
|
|
1220
1244
|
/**
|
|
@@ -1226,8 +1250,7 @@ export declare class Container extends BaseClient {
|
|
|
1226
1250
|
/**
|
|
1227
1251
|
* Establish a runtime dependency on a service.
|
|
1228
1252
|
*
|
|
1229
|
-
* The service will be started automatically when needed and detached when it is
|
|
1230
|
-
* no longer needed, executing the default command if none is set.
|
|
1253
|
+
* The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
|
|
1231
1254
|
*
|
|
1232
1255
|
* The service will be reachable from the container via the provided hostname alias.
|
|
1233
1256
|
*
|
|
@@ -1278,8 +1301,7 @@ export declare class Container extends BaseClient {
|
|
|
1278
1301
|
*/
|
|
1279
1302
|
withoutExposedPort: (port: number, opts?: ContainerWithoutExposedPortOpts) => Container;
|
|
1280
1303
|
/**
|
|
1281
|
-
* Indicate that subsequent operations should not be featured more prominently
|
|
1282
|
-
* in the UI.
|
|
1304
|
+
* Indicate that subsequent operations should not be featured more prominently in the UI.
|
|
1283
1305
|
*
|
|
1284
1306
|
* This is the initial state of all containers.
|
|
1285
1307
|
*/
|
|
@@ -1297,6 +1319,7 @@ export declare class Container extends BaseClient {
|
|
|
1297
1319
|
/**
|
|
1298
1320
|
* Retrieves this container without the registry authentication of a given address.
|
|
1299
1321
|
* @param address Registry's address to remove the authentication from.
|
|
1322
|
+
*
|
|
1300
1323
|
* Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
|
1301
1324
|
*/
|
|
1302
1325
|
withoutRegistryAuth: (address: string) => Container;
|
|
@@ -1343,21 +1366,16 @@ export declare class Directory extends BaseClient {
|
|
|
1343
1366
|
ctx: Context;
|
|
1344
1367
|
}, _id?: DirectoryID, _export?: boolean, _sync?: DirectoryID);
|
|
1345
1368
|
/**
|
|
1346
|
-
*
|
|
1369
|
+
* A unique identifier for this Directory.
|
|
1347
1370
|
*/
|
|
1348
1371
|
id: () => Promise<DirectoryID>;
|
|
1349
1372
|
/**
|
|
1350
1373
|
* Load the directory as a Dagger module
|
|
1351
|
-
* @param opts.sourceSubpath An optional subpath of the directory which contains the module's source
|
|
1352
|
-
* code.
|
|
1374
|
+
* @param opts.sourceSubpath An optional subpath of the directory which contains the module's source code.
|
|
1353
1375
|
*
|
|
1354
|
-
* This is needed when the module code is in a subdirectory but requires
|
|
1355
|
-
* parent directories to be loaded in order to execute. For example, the
|
|
1356
|
-
* module source code may need a go.mod, project.toml, package.json, etc. file
|
|
1357
|
-
* from a parent directory.
|
|
1376
|
+
* This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
|
|
1358
1377
|
*
|
|
1359
|
-
* If not set, the module source code is loaded from the root of the
|
|
1360
|
-
* directory.
|
|
1378
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
1361
1379
|
*/
|
|
1362
1380
|
asModule: (opts?: DirectoryAsModuleOpts) => Module_;
|
|
1363
1381
|
/**
|
|
@@ -1372,12 +1390,10 @@ export declare class Directory extends BaseClient {
|
|
|
1372
1390
|
directory: (path: string) => Directory;
|
|
1373
1391
|
/**
|
|
1374
1392
|
* Builds a new Docker container from this directory.
|
|
1375
|
-
* @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
1376
|
-
*
|
|
1377
|
-
* Defaults: './Dockerfile'.
|
|
1378
1393
|
* @param opts.platform The platform to build.
|
|
1379
|
-
* @param opts.
|
|
1394
|
+
* @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
1380
1395
|
* @param opts.target Target build stage to build.
|
|
1396
|
+
* @param opts.buildArgs Build arguments to use in the build.
|
|
1381
1397
|
* @param opts.secrets Secrets to pass to the build.
|
|
1382
1398
|
*
|
|
1383
1399
|
* They will be mounted at /run/secrets/[secret-name].
|
|
@@ -1404,10 +1420,10 @@ export declare class Directory extends BaseClient {
|
|
|
1404
1420
|
*/
|
|
1405
1421
|
glob: (pattern: string) => Promise<string[]>;
|
|
1406
1422
|
/**
|
|
1407
|
-
* Creates a named sub-pipeline
|
|
1408
|
-
* @param name
|
|
1409
|
-
* @param opts.description
|
|
1410
|
-
* @param opts.labels
|
|
1423
|
+
* Creates a named sub-pipeline.
|
|
1424
|
+
* @param name Name of the sub-pipeline.
|
|
1425
|
+
* @param opts.description Description of the sub-pipeline.
|
|
1426
|
+
* @param opts.labels Labels to apply to the sub-pipeline.
|
|
1411
1427
|
*/
|
|
1412
1428
|
pipeline: (name: string, opts?: DirectoryPipelineOpts) => Directory;
|
|
1413
1429
|
/**
|
|
@@ -1427,16 +1443,12 @@ export declare class Directory extends BaseClient {
|
|
|
1427
1443
|
* @param path Location of the copied file (e.g., "/file.txt").
|
|
1428
1444
|
* @param source Identifier of the file to copy.
|
|
1429
1445
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1430
|
-
*
|
|
1431
|
-
* Default: 0644.
|
|
1432
1446
|
*/
|
|
1433
1447
|
withFile: (path: string, source: File, opts?: DirectoryWithFileOpts) => Directory;
|
|
1434
1448
|
/**
|
|
1435
1449
|
* Retrieves this directory plus a new directory created at the given path.
|
|
1436
1450
|
* @param path Location of the directory created (e.g., "/logs").
|
|
1437
1451
|
* @param opts.permissions Permission granted to the created directory (e.g., 0777).
|
|
1438
|
-
*
|
|
1439
|
-
* Default: 0755.
|
|
1440
1452
|
*/
|
|
1441
1453
|
withNewDirectory: (path: string, opts?: DirectoryWithNewDirectoryOpts) => Directory;
|
|
1442
1454
|
/**
|
|
@@ -1444,8 +1456,6 @@ export declare class Directory extends BaseClient {
|
|
|
1444
1456
|
* @param path Location of the written file (e.g., "/file.txt").
|
|
1445
1457
|
* @param contents Content of the written file (e.g., "Hello world!").
|
|
1446
1458
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1447
|
-
*
|
|
1448
|
-
* Default: 0644.
|
|
1449
1459
|
*/
|
|
1450
1460
|
withNewFile: (path: string, contents: string, opts?: DirectoryWithNewFileOpts) => Directory;
|
|
1451
1461
|
/**
|
|
@@ -1473,9 +1483,10 @@ export declare class Directory extends BaseClient {
|
|
|
1473
1483
|
with: (arg: (param: Directory) => Directory) => Directory;
|
|
1474
1484
|
}
|
|
1475
1485
|
/**
|
|
1476
|
-
*
|
|
1486
|
+
* An environment variable name and value.
|
|
1477
1487
|
*/
|
|
1478
1488
|
export declare class EnvVariable extends BaseClient {
|
|
1489
|
+
private readonly _id?;
|
|
1479
1490
|
private readonly _name?;
|
|
1480
1491
|
private readonly _value?;
|
|
1481
1492
|
/**
|
|
@@ -1484,22 +1495,21 @@ export declare class EnvVariable extends BaseClient {
|
|
|
1484
1495
|
constructor(parent?: {
|
|
1485
1496
|
queryTree?: QueryTree[];
|
|
1486
1497
|
ctx: Context;
|
|
1487
|
-
}, _name?: string, _value?: string);
|
|
1498
|
+
}, _id?: EnvVariableID, _name?: string, _value?: string);
|
|
1488
1499
|
/**
|
|
1489
|
-
*
|
|
1500
|
+
* A unique identifier for this EnvVariable.
|
|
1490
1501
|
*/
|
|
1502
|
+
id: () => Promise<EnvVariableID>;
|
|
1491
1503
|
name: () => Promise<string>;
|
|
1492
|
-
/**
|
|
1493
|
-
* The environment variable value.
|
|
1494
|
-
*/
|
|
1495
1504
|
value: () => Promise<string>;
|
|
1496
1505
|
}
|
|
1497
1506
|
/**
|
|
1498
1507
|
* A definition of a field on a custom object defined in a Module.
|
|
1499
|
-
*
|
|
1500
|
-
* object whose value is computed by invoking code (and can accept arguments).
|
|
1508
|
+
*
|
|
1509
|
+
* A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments).
|
|
1501
1510
|
*/
|
|
1502
1511
|
export declare class FieldTypeDef extends BaseClient {
|
|
1512
|
+
private readonly _id?;
|
|
1503
1513
|
private readonly _description?;
|
|
1504
1514
|
private readonly _name?;
|
|
1505
1515
|
/**
|
|
@@ -1508,18 +1518,13 @@ export declare class FieldTypeDef extends BaseClient {
|
|
|
1508
1518
|
constructor(parent?: {
|
|
1509
1519
|
queryTree?: QueryTree[];
|
|
1510
1520
|
ctx: Context;
|
|
1511
|
-
}, _description?: string, _name?: string);
|
|
1521
|
+
}, _id?: FieldTypeDefID, _description?: string, _name?: string);
|
|
1512
1522
|
/**
|
|
1513
|
-
* A
|
|
1523
|
+
* A unique identifier for this FieldTypeDef.
|
|
1514
1524
|
*/
|
|
1525
|
+
id: () => Promise<FieldTypeDefID>;
|
|
1515
1526
|
description: () => Promise<string>;
|
|
1516
|
-
/**
|
|
1517
|
-
* The name of the field in the object
|
|
1518
|
-
*/
|
|
1519
1527
|
name: () => Promise<string>;
|
|
1520
|
-
/**
|
|
1521
|
-
* The type of the field
|
|
1522
|
-
*/
|
|
1523
1528
|
typeDef: () => TypeDef;
|
|
1524
1529
|
}
|
|
1525
1530
|
/**
|
|
@@ -1529,6 +1534,7 @@ export declare class File extends BaseClient {
|
|
|
1529
1534
|
private readonly _id?;
|
|
1530
1535
|
private readonly _contents?;
|
|
1531
1536
|
private readonly _export?;
|
|
1537
|
+
private readonly _name?;
|
|
1532
1538
|
private readonly _size?;
|
|
1533
1539
|
private readonly _sync?;
|
|
1534
1540
|
/**
|
|
@@ -1537,9 +1543,9 @@ export declare class File extends BaseClient {
|
|
|
1537
1543
|
constructor(parent?: {
|
|
1538
1544
|
queryTree?: QueryTree[];
|
|
1539
1545
|
ctx: Context;
|
|
1540
|
-
}, _id?: FileID, _contents?: string, _export?: boolean, _size?: number, _sync?: FileID);
|
|
1546
|
+
}, _id?: FileID, _contents?: string, _export?: boolean, _name?: string, _size?: number, _sync?: FileID);
|
|
1541
1547
|
/**
|
|
1542
|
-
*
|
|
1548
|
+
* A unique identifier for this File.
|
|
1543
1549
|
*/
|
|
1544
1550
|
id: () => Promise<FileID>;
|
|
1545
1551
|
/**
|
|
@@ -1549,12 +1555,15 @@ export declare class File extends BaseClient {
|
|
|
1549
1555
|
/**
|
|
1550
1556
|
* Writes the file to a file path on the host.
|
|
1551
1557
|
* @param path Location of the written directory (e.g., "output.txt").
|
|
1552
|
-
* @param opts.allowParentDirPath If allowParentDirPath is true, the path argument can be a directory path, in which case
|
|
1553
|
-
* the file will be created in that directory.
|
|
1558
|
+
* @param opts.allowParentDirPath If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
|
|
1554
1559
|
*/
|
|
1555
1560
|
export: (path: string, opts?: FileExportOpts) => Promise<boolean>;
|
|
1556
1561
|
/**
|
|
1557
|
-
*
|
|
1562
|
+
* Retrieves the name of the file.
|
|
1563
|
+
*/
|
|
1564
|
+
name: () => Promise<string>;
|
|
1565
|
+
/**
|
|
1566
|
+
* Retrieves the size of the file, in bytes.
|
|
1558
1567
|
*/
|
|
1559
1568
|
size: () => Promise<number>;
|
|
1560
1569
|
/**
|
|
@@ -1578,8 +1587,7 @@ export declare class File extends BaseClient {
|
|
|
1578
1587
|
/**
|
|
1579
1588
|
* Function represents a resolver provided by a Module.
|
|
1580
1589
|
*
|
|
1581
|
-
* A function always evaluates against a parent object and is given a set of
|
|
1582
|
-
* named arguments.
|
|
1590
|
+
* A function always evaluates against a parent object and is given a set of named arguments.
|
|
1583
1591
|
*/
|
|
1584
1592
|
export declare class Function_ extends BaseClient {
|
|
1585
1593
|
private readonly _id?;
|
|
@@ -1593,24 +1601,12 @@ export declare class Function_ extends BaseClient {
|
|
|
1593
1601
|
ctx: Context;
|
|
1594
1602
|
}, _id?: FunctionID, _description?: string, _name?: string);
|
|
1595
1603
|
/**
|
|
1596
|
-
*
|
|
1604
|
+
* A unique identifier for this Function.
|
|
1597
1605
|
*/
|
|
1598
1606
|
id: () => Promise<FunctionID>;
|
|
1599
|
-
/**
|
|
1600
|
-
* Arguments accepted by this function, if any
|
|
1601
|
-
*/
|
|
1602
1607
|
args: () => Promise<FunctionArg[]>;
|
|
1603
|
-
/**
|
|
1604
|
-
* A doc string for the function, if any
|
|
1605
|
-
*/
|
|
1606
1608
|
description: () => Promise<string>;
|
|
1607
|
-
/**
|
|
1608
|
-
* The name of the function
|
|
1609
|
-
*/
|
|
1610
1609
|
name: () => Promise<string>;
|
|
1611
|
-
/**
|
|
1612
|
-
* The type returned by this function
|
|
1613
|
-
*/
|
|
1614
1610
|
returnType: () => TypeDef;
|
|
1615
1611
|
/**
|
|
1616
1612
|
* Returns the function with the provided argument
|
|
@@ -1621,7 +1617,8 @@ export declare class Function_ extends BaseClient {
|
|
|
1621
1617
|
*/
|
|
1622
1618
|
withArg: (name: string, typeDef: TypeDef, opts?: FunctionWithArgOpts) => Function_;
|
|
1623
1619
|
/**
|
|
1624
|
-
* Returns the function with the doc string
|
|
1620
|
+
* Returns the function with the given doc string.
|
|
1621
|
+
* @param description The doc string to set.
|
|
1625
1622
|
*/
|
|
1626
1623
|
withDescription: (description: string) => Function_;
|
|
1627
1624
|
/**
|
|
@@ -1634,8 +1631,7 @@ export declare class Function_ extends BaseClient {
|
|
|
1634
1631
|
/**
|
|
1635
1632
|
* An argument accepted by a function.
|
|
1636
1633
|
*
|
|
1637
|
-
* This is a specification for an argument at function definition time, not an
|
|
1638
|
-
* argument passed at function call time.
|
|
1634
|
+
* This is a specification for an argument at function definition time, not an argument passed at function call time.
|
|
1639
1635
|
*/
|
|
1640
1636
|
export declare class FunctionArg extends BaseClient {
|
|
1641
1637
|
private readonly _id?;
|
|
@@ -1650,27 +1646,19 @@ export declare class FunctionArg extends BaseClient {
|
|
|
1650
1646
|
ctx: Context;
|
|
1651
1647
|
}, _id?: FunctionArgID, _defaultValue?: JSON, _description?: string, _name?: string);
|
|
1652
1648
|
/**
|
|
1653
|
-
*
|
|
1649
|
+
* A unique identifier for this FunctionArg.
|
|
1654
1650
|
*/
|
|
1655
1651
|
id: () => Promise<FunctionArgID>;
|
|
1656
|
-
/**
|
|
1657
|
-
* A default value to use for this argument when not explicitly set by the caller, if any
|
|
1658
|
-
*/
|
|
1659
1652
|
defaultValue: () => Promise<JSON>;
|
|
1660
|
-
/**
|
|
1661
|
-
* A doc string for the argument, if any
|
|
1662
|
-
*/
|
|
1663
1653
|
description: () => Promise<string>;
|
|
1664
|
-
/**
|
|
1665
|
-
* The name of the argument
|
|
1666
|
-
*/
|
|
1667
1654
|
name: () => Promise<string>;
|
|
1668
|
-
/**
|
|
1669
|
-
* The type of the argument
|
|
1670
|
-
*/
|
|
1671
1655
|
typeDef: () => TypeDef;
|
|
1672
1656
|
}
|
|
1657
|
+
/**
|
|
1658
|
+
* An active function call.
|
|
1659
|
+
*/
|
|
1673
1660
|
export declare class FunctionCall extends BaseClient {
|
|
1661
|
+
private readonly _id?;
|
|
1674
1662
|
private readonly _name?;
|
|
1675
1663
|
private readonly _parent?;
|
|
1676
1664
|
private readonly _parentName?;
|
|
@@ -1681,32 +1669,26 @@ export declare class FunctionCall extends BaseClient {
|
|
|
1681
1669
|
constructor(parent?: {
|
|
1682
1670
|
queryTree?: QueryTree[];
|
|
1683
1671
|
ctx: Context;
|
|
1684
|
-
}, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
|
|
1672
|
+
}, _id?: FunctionCallID, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
|
|
1685
1673
|
/**
|
|
1686
|
-
*
|
|
1674
|
+
* A unique identifier for this FunctionCall.
|
|
1687
1675
|
*/
|
|
1676
|
+
id: () => Promise<FunctionCallID>;
|
|
1688
1677
|
inputArgs: () => Promise<FunctionCallArgValue[]>;
|
|
1689
|
-
/**
|
|
1690
|
-
* The name of the function being called.
|
|
1691
|
-
*/
|
|
1692
1678
|
name: () => Promise<string>;
|
|
1693
|
-
/**
|
|
1694
|
-
* The value of the parent object of the function being called.
|
|
1695
|
-
* If the function is "top-level" to the module, this is always an empty object.
|
|
1696
|
-
*/
|
|
1697
1679
|
parent: () => Promise<JSON>;
|
|
1698
|
-
/**
|
|
1699
|
-
* The name of the parent object of the function being called.
|
|
1700
|
-
* If the function is "top-level" to the module, this is the name of the module.
|
|
1701
|
-
*/
|
|
1702
1680
|
parentName: () => Promise<string>;
|
|
1703
1681
|
/**
|
|
1704
1682
|
* Set the return value of the function call to the provided value.
|
|
1705
|
-
*
|
|
1683
|
+
* @param value JSON serialization of the return value.
|
|
1706
1684
|
*/
|
|
1707
1685
|
returnValue: (value: JSON) => Promise<Void>;
|
|
1708
1686
|
}
|
|
1687
|
+
/**
|
|
1688
|
+
* A value passed as a named argument to a function call.
|
|
1689
|
+
*/
|
|
1709
1690
|
export declare class FunctionCallArgValue extends BaseClient {
|
|
1691
|
+
private readonly _id?;
|
|
1710
1692
|
private readonly _name?;
|
|
1711
1693
|
private readonly _value?;
|
|
1712
1694
|
/**
|
|
@@ -1715,16 +1697,17 @@ export declare class FunctionCallArgValue extends BaseClient {
|
|
|
1715
1697
|
constructor(parent?: {
|
|
1716
1698
|
queryTree?: QueryTree[];
|
|
1717
1699
|
ctx: Context;
|
|
1718
|
-
}, _name?: string, _value?: JSON);
|
|
1700
|
+
}, _id?: FunctionCallArgValueID, _name?: string, _value?: JSON);
|
|
1719
1701
|
/**
|
|
1720
|
-
*
|
|
1702
|
+
* A unique identifier for this FunctionCallArgValue.
|
|
1721
1703
|
*/
|
|
1704
|
+
id: () => Promise<FunctionCallArgValueID>;
|
|
1722
1705
|
name: () => Promise<string>;
|
|
1723
|
-
/**
|
|
1724
|
-
* The value of the argument represented as a string of the JSON serialization.
|
|
1725
|
-
*/
|
|
1726
1706
|
value: () => Promise<JSON>;
|
|
1727
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* The result of running an SDK's codegen.
|
|
1710
|
+
*/
|
|
1728
1711
|
export declare class GeneratedCode extends BaseClient {
|
|
1729
1712
|
private readonly _id?;
|
|
1730
1713
|
/**
|
|
@@ -1734,25 +1717,19 @@ export declare class GeneratedCode extends BaseClient {
|
|
|
1734
1717
|
queryTree?: QueryTree[];
|
|
1735
1718
|
ctx: Context;
|
|
1736
1719
|
}, _id?: GeneratedCodeID);
|
|
1737
|
-
id: () => Promise<GeneratedCodeID>;
|
|
1738
1720
|
/**
|
|
1739
|
-
*
|
|
1721
|
+
* A unique identifier for this GeneratedCode.
|
|
1740
1722
|
*/
|
|
1723
|
+
id: () => Promise<GeneratedCodeID>;
|
|
1741
1724
|
code: () => Directory;
|
|
1742
|
-
/**
|
|
1743
|
-
* List of paths to mark generated in version control (i.e. .gitattributes)
|
|
1744
|
-
*/
|
|
1745
1725
|
vcsGeneratedPaths: () => Promise<string[]>;
|
|
1746
|
-
/**
|
|
1747
|
-
* List of paths to ignore in version control (i.e. .gitignore)
|
|
1748
|
-
*/
|
|
1749
1726
|
vcsIgnoredPaths: () => Promise<string[]>;
|
|
1750
1727
|
/**
|
|
1751
|
-
* Set the list of paths to mark generated in version control
|
|
1728
|
+
* Set the list of paths to mark generated in version control.
|
|
1752
1729
|
*/
|
|
1753
1730
|
withVCSGeneratedPaths: (paths: string[]) => GeneratedCode;
|
|
1754
1731
|
/**
|
|
1755
|
-
* Set the list of paths to ignore in version control
|
|
1732
|
+
* Set the list of paths to ignore in version control.
|
|
1756
1733
|
*/
|
|
1757
1734
|
withVCSIgnoredPaths: (paths: string[]) => GeneratedCode;
|
|
1758
1735
|
/**
|
|
@@ -1763,7 +1740,7 @@ export declare class GeneratedCode extends BaseClient {
|
|
|
1763
1740
|
with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
|
|
1764
1741
|
}
|
|
1765
1742
|
/**
|
|
1766
|
-
* A git ref (tag, branch or commit).
|
|
1743
|
+
* A git ref (tag, branch, or commit).
|
|
1767
1744
|
*/
|
|
1768
1745
|
export declare class GitRef extends BaseClient {
|
|
1769
1746
|
private readonly _id?;
|
|
@@ -1776,7 +1753,7 @@ export declare class GitRef extends BaseClient {
|
|
|
1776
1753
|
ctx: Context;
|
|
1777
1754
|
}, _id?: GitRefID, _commit?: string);
|
|
1778
1755
|
/**
|
|
1779
|
-
*
|
|
1756
|
+
* A unique identifier for this GitRef.
|
|
1780
1757
|
*/
|
|
1781
1758
|
id: () => Promise<GitRefID>;
|
|
1782
1759
|
/**
|
|
@@ -1785,6 +1762,8 @@ export declare class GitRef extends BaseClient {
|
|
|
1785
1762
|
commit: () => Promise<string>;
|
|
1786
1763
|
/**
|
|
1787
1764
|
* The filesystem tree at this ref.
|
|
1765
|
+
* @param opts.sshKnownHosts DEPRECATED: This option should be passed to `git` instead.
|
|
1766
|
+
* @param opts.sshAuthSocket DEPRECATED: This option should be passed to `git` instead.
|
|
1788
1767
|
*/
|
|
1789
1768
|
tree: (opts?: GitRefTreeOpts) => Directory;
|
|
1790
1769
|
}
|
|
@@ -1801,36 +1780,41 @@ export declare class GitRepository extends BaseClient {
|
|
|
1801
1780
|
ctx: Context;
|
|
1802
1781
|
}, _id?: GitRepositoryID);
|
|
1803
1782
|
/**
|
|
1804
|
-
*
|
|
1783
|
+
* A unique identifier for this GitRepository.
|
|
1805
1784
|
*/
|
|
1806
1785
|
id: () => Promise<GitRepositoryID>;
|
|
1807
1786
|
/**
|
|
1808
|
-
* Returns details
|
|
1787
|
+
* Returns details of a branch.
|
|
1809
1788
|
* @param name Branch's name (e.g., "main").
|
|
1810
1789
|
*/
|
|
1811
1790
|
branch: (name: string) => GitRef;
|
|
1812
1791
|
/**
|
|
1813
|
-
* Returns details
|
|
1792
|
+
* Returns details of a commit.
|
|
1814
1793
|
* @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
|
|
1815
1794
|
*/
|
|
1816
1795
|
commit: (id: string) => GitRef;
|
|
1817
1796
|
/**
|
|
1818
|
-
* Returns details
|
|
1797
|
+
* Returns details of a tag.
|
|
1819
1798
|
* @param name Tag's name (e.g., "v0.3.9").
|
|
1820
1799
|
*/
|
|
1821
1800
|
tag: (name: string) => GitRef;
|
|
1822
1801
|
}
|
|
1823
1802
|
/**
|
|
1824
|
-
* Information about the host
|
|
1803
|
+
* Information about the host environment.
|
|
1825
1804
|
*/
|
|
1826
1805
|
export declare class Host extends BaseClient {
|
|
1806
|
+
private readonly _id?;
|
|
1827
1807
|
/**
|
|
1828
1808
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1829
1809
|
*/
|
|
1830
1810
|
constructor(parent?: {
|
|
1831
1811
|
queryTree?: QueryTree[];
|
|
1832
1812
|
ctx: Context;
|
|
1833
|
-
});
|
|
1813
|
+
}, _id?: HostID);
|
|
1814
|
+
/**
|
|
1815
|
+
* A unique identifier for this Host.
|
|
1816
|
+
*/
|
|
1817
|
+
id: () => Promise<HostID>;
|
|
1834
1818
|
/**
|
|
1835
1819
|
* Accesses a directory on the host.
|
|
1836
1820
|
* @param path Location of the directory to access (e.g., ".").
|
|
@@ -1845,17 +1829,17 @@ export declare class Host extends BaseClient {
|
|
|
1845
1829
|
file: (path: string) => File;
|
|
1846
1830
|
/**
|
|
1847
1831
|
* Creates a service that forwards traffic to a specified address via the host.
|
|
1848
|
-
* @param
|
|
1832
|
+
* @param opts.host Upstream host to forward traffic to.
|
|
1833
|
+
* @param opts.ports Ports to expose via the service, forwarding through the host network.
|
|
1849
1834
|
*
|
|
1850
|
-
* If a port's frontend is unspecified or 0, it defaults to the same as the
|
|
1851
|
-
* backend port.
|
|
1835
|
+
* If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
|
|
1852
1836
|
*
|
|
1853
1837
|
* An empty set of ports is not valid; an error will be returned.
|
|
1854
|
-
* @param opts.host Upstream host to forward traffic to.
|
|
1855
1838
|
*/
|
|
1856
|
-
service: (
|
|
1839
|
+
service: (opts?: HostServiceOpts) => Service;
|
|
1857
1840
|
/**
|
|
1858
1841
|
* Sets a secret given a user-defined name and the file path on the host, and returns the secret.
|
|
1842
|
+
*
|
|
1859
1843
|
* The file is limited to a size of 512000 bytes.
|
|
1860
1844
|
* @param name The user defined name for this secret.
|
|
1861
1845
|
* @param path Location of the file to set as a secret.
|
|
@@ -1864,20 +1848,16 @@ export declare class Host extends BaseClient {
|
|
|
1864
1848
|
/**
|
|
1865
1849
|
* Creates a tunnel that forwards traffic from the host to a service.
|
|
1866
1850
|
* @param service Service to send traffic from the tunnel.
|
|
1867
|
-
* @param opts.native Map each service port to the same port on the host, as if the service were
|
|
1868
|
-
* running natively.
|
|
1869
|
-
*
|
|
1870
|
-
* Note: enabling may result in port conflicts.
|
|
1871
1851
|
* @param opts.ports Configure explicit port forwarding rules for the tunnel.
|
|
1872
1852
|
*
|
|
1873
|
-
* If a port's frontend is unspecified or 0, a random port will be chosen by
|
|
1874
|
-
* the host.
|
|
1853
|
+
* If a port's frontend is unspecified or 0, a random port will be chosen by the host.
|
|
1875
1854
|
*
|
|
1876
|
-
* If no ports are given, all of the service's ports are forwarded. If native
|
|
1877
|
-
* is true, each port maps to the same port on the host. If native is false,
|
|
1878
|
-
* each port maps to a random port chosen by the host.
|
|
1855
|
+
* If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host.
|
|
1879
1856
|
*
|
|
1880
1857
|
* If ports are given and native is true, the ports are additive.
|
|
1858
|
+
* @param opts.native Map each service port to the same port on the host, as if the service were running natively.
|
|
1859
|
+
*
|
|
1860
|
+
* Note: enabling may result in port conflicts.
|
|
1881
1861
|
*/
|
|
1882
1862
|
tunnel: (service: Service, opts?: HostTunnelOpts) => Service;
|
|
1883
1863
|
/**
|
|
@@ -1890,6 +1870,7 @@ export declare class Host extends BaseClient {
|
|
|
1890
1870
|
* A definition of a custom interface defined in a Module.
|
|
1891
1871
|
*/
|
|
1892
1872
|
export declare class InterfaceTypeDef extends BaseClient {
|
|
1873
|
+
private readonly _id?;
|
|
1893
1874
|
private readonly _description?;
|
|
1894
1875
|
private readonly _name?;
|
|
1895
1876
|
private readonly _sourceModuleName?;
|
|
@@ -1899,28 +1880,21 @@ export declare class InterfaceTypeDef extends BaseClient {
|
|
|
1899
1880
|
constructor(parent?: {
|
|
1900
1881
|
queryTree?: QueryTree[];
|
|
1901
1882
|
ctx: Context;
|
|
1902
|
-
}, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
1883
|
+
}, _id?: InterfaceTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
1903
1884
|
/**
|
|
1904
|
-
*
|
|
1885
|
+
* A unique identifier for this InterfaceTypeDef.
|
|
1905
1886
|
*/
|
|
1887
|
+
id: () => Promise<InterfaceTypeDefID>;
|
|
1906
1888
|
description: () => Promise<string>;
|
|
1907
|
-
/**
|
|
1908
|
-
* Functions defined on this interface, if any
|
|
1909
|
-
*/
|
|
1910
1889
|
functions: () => Promise<Function_[]>;
|
|
1911
|
-
/**
|
|
1912
|
-
* The name of the interface
|
|
1913
|
-
*/
|
|
1914
1890
|
name: () => Promise<string>;
|
|
1915
|
-
/**
|
|
1916
|
-
* If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
1917
|
-
*/
|
|
1918
1891
|
sourceModuleName: () => Promise<string>;
|
|
1919
1892
|
}
|
|
1920
1893
|
/**
|
|
1921
1894
|
* A simple key value object that represents a label.
|
|
1922
1895
|
*/
|
|
1923
1896
|
export declare class Label extends BaseClient {
|
|
1897
|
+
private readonly _id?;
|
|
1924
1898
|
private readonly _name?;
|
|
1925
1899
|
private readonly _value?;
|
|
1926
1900
|
/**
|
|
@@ -1929,104 +1903,91 @@ export declare class Label extends BaseClient {
|
|
|
1929
1903
|
constructor(parent?: {
|
|
1930
1904
|
queryTree?: QueryTree[];
|
|
1931
1905
|
ctx: Context;
|
|
1932
|
-
}, _name?: string, _value?: string);
|
|
1906
|
+
}, _id?: LabelID, _name?: string, _value?: string);
|
|
1933
1907
|
/**
|
|
1934
|
-
*
|
|
1908
|
+
* A unique identifier for this Label.
|
|
1935
1909
|
*/
|
|
1910
|
+
id: () => Promise<LabelID>;
|
|
1936
1911
|
name: () => Promise<string>;
|
|
1937
|
-
/**
|
|
1938
|
-
* The label value.
|
|
1939
|
-
*/
|
|
1940
1912
|
value: () => Promise<string>;
|
|
1941
1913
|
}
|
|
1942
1914
|
/**
|
|
1943
1915
|
* A definition of a list type in a Module.
|
|
1944
1916
|
*/
|
|
1945
1917
|
export declare class ListTypeDef extends BaseClient {
|
|
1918
|
+
private readonly _id?;
|
|
1946
1919
|
/**
|
|
1947
1920
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1948
1921
|
*/
|
|
1949
1922
|
constructor(parent?: {
|
|
1950
1923
|
queryTree?: QueryTree[];
|
|
1951
1924
|
ctx: Context;
|
|
1952
|
-
});
|
|
1925
|
+
}, _id?: ListTypeDefID);
|
|
1953
1926
|
/**
|
|
1954
|
-
*
|
|
1927
|
+
* A unique identifier for this ListTypeDef.
|
|
1955
1928
|
*/
|
|
1929
|
+
id: () => Promise<ListTypeDefID>;
|
|
1956
1930
|
elementTypeDef: () => TypeDef;
|
|
1957
1931
|
}
|
|
1932
|
+
/**
|
|
1933
|
+
* A Dagger module.
|
|
1934
|
+
*/
|
|
1958
1935
|
export declare class Module_ extends BaseClient {
|
|
1959
1936
|
private readonly _id?;
|
|
1960
1937
|
private readonly _description?;
|
|
1961
1938
|
private readonly _name?;
|
|
1962
1939
|
private readonly _sdk?;
|
|
1963
1940
|
private readonly _serve?;
|
|
1964
|
-
private readonly
|
|
1941
|
+
private readonly _sourceDirectorySubpath?;
|
|
1965
1942
|
/**
|
|
1966
1943
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1967
1944
|
*/
|
|
1968
1945
|
constructor(parent?: {
|
|
1969
1946
|
queryTree?: QueryTree[];
|
|
1970
1947
|
ctx: Context;
|
|
1971
|
-
}, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void,
|
|
1948
|
+
}, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void, _sourceDirectorySubpath?: string);
|
|
1972
1949
|
/**
|
|
1973
|
-
*
|
|
1950
|
+
* A unique identifier for this Module.
|
|
1974
1951
|
*/
|
|
1975
1952
|
id: () => Promise<ModuleID>;
|
|
1976
|
-
/**
|
|
1977
|
-
* Modules used by this module
|
|
1978
|
-
*/
|
|
1979
1953
|
dependencies: () => Promise<Module_[]>;
|
|
1980
|
-
/**
|
|
1981
|
-
* The dependencies as configured by the module
|
|
1982
|
-
*/
|
|
1983
1954
|
dependencyConfig: () => Promise<string[]>;
|
|
1984
|
-
/**
|
|
1985
|
-
* The doc string of the module, if any
|
|
1986
|
-
*/
|
|
1987
1955
|
description: () => Promise<string>;
|
|
1988
|
-
/**
|
|
1989
|
-
* The code generated by the SDK's runtime
|
|
1990
|
-
*/
|
|
1991
1956
|
generatedCode: () => GeneratedCode;
|
|
1992
1957
|
/**
|
|
1993
|
-
*
|
|
1958
|
+
* Retrieves the module with the objects loaded via its SDK.
|
|
1994
1959
|
*/
|
|
1960
|
+
initialize: () => Module_;
|
|
1995
1961
|
interfaces: () => Promise<TypeDef[]>;
|
|
1996
|
-
/**
|
|
1997
|
-
* The name of the module
|
|
1998
|
-
*/
|
|
1999
1962
|
name: () => Promise<string>;
|
|
2000
|
-
/**
|
|
2001
|
-
* Objects served by this module
|
|
2002
|
-
*/
|
|
2003
1963
|
objects: () => Promise<TypeDef[]>;
|
|
2004
|
-
/**
|
|
2005
|
-
* The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation.
|
|
2006
|
-
*/
|
|
2007
1964
|
sdk: () => Promise<string>;
|
|
2008
1965
|
/**
|
|
2009
1966
|
* Serve a module's API in the current session.
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
1967
|
+
*
|
|
1968
|
+
* Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
|
|
2012
1969
|
*/
|
|
2013
1970
|
serve: () => Promise<Void>;
|
|
2014
|
-
/**
|
|
2015
|
-
* The directory containing the module's source code
|
|
2016
|
-
*/
|
|
2017
1971
|
sourceDirectory: () => Directory;
|
|
2018
|
-
|
|
2019
|
-
* The module's subpath within the source directory
|
|
2020
|
-
*/
|
|
2021
|
-
sourceDirectorySubPath: () => Promise<string>;
|
|
1972
|
+
sourceDirectorySubpath: () => Promise<string>;
|
|
2022
1973
|
/**
|
|
2023
1974
|
* This module plus the given Interface type and associated functions
|
|
2024
1975
|
*/
|
|
2025
1976
|
withInterface: (iface: TypeDef) => Module_;
|
|
2026
1977
|
/**
|
|
2027
|
-
* This module plus the given Object type and associated functions
|
|
1978
|
+
* This module plus the given Object type and associated functions.
|
|
2028
1979
|
*/
|
|
2029
1980
|
withObject: (object: TypeDef) => Module_;
|
|
1981
|
+
/**
|
|
1982
|
+
* Retrieves the module with basic configuration loaded, ready for initialization.
|
|
1983
|
+
* @param directory The directory containing the module's source code.
|
|
1984
|
+
* @param opts.subpath An optional subpath of the directory which contains the module's source code.
|
|
1985
|
+
*
|
|
1986
|
+
* This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
|
|
1987
|
+
*
|
|
1988
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
1989
|
+
*/
|
|
1990
|
+
withSource: (directory: Directory, opts?: ModuleWithSourceOpts) => Module_;
|
|
2030
1991
|
/**
|
|
2031
1992
|
* Call the provided function with current Module.
|
|
2032
1993
|
*
|
|
@@ -2038,6 +1999,7 @@ export declare class Module_ extends BaseClient {
|
|
|
2038
1999
|
* Static configuration for a module (e.g. parsed contents of dagger.json)
|
|
2039
2000
|
*/
|
|
2040
2001
|
export declare class ModuleConfig extends BaseClient {
|
|
2002
|
+
private readonly _id?;
|
|
2041
2003
|
private readonly _name?;
|
|
2042
2004
|
private readonly _root?;
|
|
2043
2005
|
private readonly _sdk?;
|
|
@@ -2047,36 +2009,23 @@ export declare class ModuleConfig extends BaseClient {
|
|
|
2047
2009
|
constructor(parent?: {
|
|
2048
2010
|
queryTree?: QueryTree[];
|
|
2049
2011
|
ctx: Context;
|
|
2050
|
-
}, _name?: string, _root?: string, _sdk?: string);
|
|
2012
|
+
}, _id?: ModuleConfigID, _name?: string, _root?: string, _sdk?: string);
|
|
2051
2013
|
/**
|
|
2052
|
-
*
|
|
2014
|
+
* A unique identifier for this ModuleConfig.
|
|
2053
2015
|
*/
|
|
2016
|
+
id: () => Promise<ModuleConfigID>;
|
|
2054
2017
|
dependencies: () => Promise<string[]>;
|
|
2055
|
-
/**
|
|
2056
|
-
* Exclude these file globs when loading the module root.
|
|
2057
|
-
*/
|
|
2058
2018
|
exclude: () => Promise<string[]>;
|
|
2059
|
-
/**
|
|
2060
|
-
* Include only these file globs when loading the module root.
|
|
2061
|
-
*/
|
|
2062
2019
|
include: () => Promise<string[]>;
|
|
2063
|
-
/**
|
|
2064
|
-
* The name of the module.
|
|
2065
|
-
*/
|
|
2066
2020
|
name: () => Promise<string>;
|
|
2067
|
-
/**
|
|
2068
|
-
* The root directory of the module's project, which may be above the module source code.
|
|
2069
|
-
*/
|
|
2070
2021
|
root: () => Promise<string>;
|
|
2071
|
-
/**
|
|
2072
|
-
* Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation.
|
|
2073
|
-
*/
|
|
2074
2022
|
sdk: () => Promise<string>;
|
|
2075
2023
|
}
|
|
2076
2024
|
/**
|
|
2077
2025
|
* A definition of a custom object defined in a Module.
|
|
2078
2026
|
*/
|
|
2079
2027
|
export declare class ObjectTypeDef extends BaseClient {
|
|
2028
|
+
private readonly _id?;
|
|
2080
2029
|
private readonly _description?;
|
|
2081
2030
|
private readonly _name?;
|
|
2082
2031
|
private readonly _sourceModuleName?;
|
|
@@ -2086,36 +2035,23 @@ export declare class ObjectTypeDef extends BaseClient {
|
|
|
2086
2035
|
constructor(parent?: {
|
|
2087
2036
|
queryTree?: QueryTree[];
|
|
2088
2037
|
ctx: Context;
|
|
2089
|
-
}, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2038
|
+
}, _id?: ObjectTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2090
2039
|
/**
|
|
2091
|
-
*
|
|
2040
|
+
* A unique identifier for this ObjectTypeDef.
|
|
2092
2041
|
*/
|
|
2042
|
+
id: () => Promise<ObjectTypeDefID>;
|
|
2093
2043
|
constructor_: () => Function_;
|
|
2094
|
-
/**
|
|
2095
|
-
* The doc string for the object, if any
|
|
2096
|
-
*/
|
|
2097
2044
|
description: () => Promise<string>;
|
|
2098
|
-
/**
|
|
2099
|
-
* Static fields defined on this object, if any
|
|
2100
|
-
*/
|
|
2101
2045
|
fields: () => Promise<FieldTypeDef[]>;
|
|
2102
|
-
/**
|
|
2103
|
-
* Functions defined on this object, if any
|
|
2104
|
-
*/
|
|
2105
2046
|
functions: () => Promise<Function_[]>;
|
|
2106
|
-
/**
|
|
2107
|
-
* The name of the object
|
|
2108
|
-
*/
|
|
2109
2047
|
name: () => Promise<string>;
|
|
2110
|
-
/**
|
|
2111
|
-
* If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
2112
|
-
*/
|
|
2113
2048
|
sourceModuleName: () => Promise<string>;
|
|
2114
2049
|
}
|
|
2115
2050
|
/**
|
|
2116
2051
|
* A port exposed by a container.
|
|
2117
2052
|
*/
|
|
2118
2053
|
export declare class Port extends BaseClient {
|
|
2054
|
+
private readonly _id?;
|
|
2119
2055
|
private readonly _description?;
|
|
2120
2056
|
private readonly _port?;
|
|
2121
2057
|
private readonly _protocol?;
|
|
@@ -2125,20 +2061,18 @@ export declare class Port extends BaseClient {
|
|
|
2125
2061
|
constructor(parent?: {
|
|
2126
2062
|
queryTree?: QueryTree[];
|
|
2127
2063
|
ctx: Context;
|
|
2128
|
-
}, _description?: string, _port?: number, _protocol?: NetworkProtocol);
|
|
2064
|
+
}, _id?: PortID, _description?: string, _port?: number, _protocol?: NetworkProtocol);
|
|
2129
2065
|
/**
|
|
2130
|
-
*
|
|
2066
|
+
* A unique identifier for this Port.
|
|
2131
2067
|
*/
|
|
2068
|
+
id: () => Promise<PortID>;
|
|
2132
2069
|
description: () => Promise<string>;
|
|
2133
|
-
/**
|
|
2134
|
-
* The port number.
|
|
2135
|
-
*/
|
|
2136
2070
|
port: () => Promise<number>;
|
|
2137
|
-
/**
|
|
2138
|
-
* The transport layer network protocol.
|
|
2139
|
-
*/
|
|
2140
2071
|
protocol: () => Promise<NetworkProtocol>;
|
|
2141
2072
|
}
|
|
2073
|
+
/**
|
|
2074
|
+
* The root of the DAG.
|
|
2075
|
+
*/
|
|
2142
2076
|
export declare class Client extends BaseClient {
|
|
2143
2077
|
private readonly _checkVersionCompatibility?;
|
|
2144
2078
|
private readonly _defaultPlatform?;
|
|
@@ -2149,6 +2083,14 @@ export declare class Client extends BaseClient {
|
|
|
2149
2083
|
queryTree?: QueryTree[];
|
|
2150
2084
|
ctx: Context;
|
|
2151
2085
|
}, _checkVersionCompatibility?: boolean, _defaultPlatform?: Platform);
|
|
2086
|
+
/**
|
|
2087
|
+
* Retrieves a content-addressed blob.
|
|
2088
|
+
* @param digest Digest of the blob
|
|
2089
|
+
* @param size Size of the blob
|
|
2090
|
+
* @param mediaType Media type of the blob
|
|
2091
|
+
* @param uncompressed Digest of the uncompressed blob
|
|
2092
|
+
*/
|
|
2093
|
+
blob: (digest: string, size: number, mediaType: string, uncompressed: string) => Directory;
|
|
2152
2094
|
/**
|
|
2153
2095
|
* Constructs a cache volume for a given cache key.
|
|
2154
2096
|
* @param key A string identifier to target this cache volume (e.g., "modules-cache").
|
|
@@ -2156,20 +2098,21 @@ export declare class Client extends BaseClient {
|
|
|
2156
2098
|
cacheVolume: (key: string) => CacheVolume;
|
|
2157
2099
|
/**
|
|
2158
2100
|
* Checks if the current Dagger Engine is compatible with an SDK's required version.
|
|
2159
|
-
* @param version
|
|
2101
|
+
* @param version Version required by the SDK.
|
|
2160
2102
|
*/
|
|
2161
2103
|
checkVersionCompatibility: (version: string) => Promise<boolean>;
|
|
2162
2104
|
/**
|
|
2163
|
-
* Creates a scratch container
|
|
2105
|
+
* Creates a scratch container.
|
|
2164
2106
|
*
|
|
2165
|
-
* Optional platform argument initializes new containers to execute and publish
|
|
2166
|
-
*
|
|
2107
|
+
* Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
|
|
2108
|
+
* @param opts.id DEPRECATED: Use `loadContainerFromID` instead.
|
|
2109
|
+
* @param opts.platform Platform to initialize the container with.
|
|
2167
2110
|
*/
|
|
2168
2111
|
container: (opts?: ClientContainerOpts) => Container;
|
|
2169
2112
|
/**
|
|
2170
2113
|
* The FunctionCall context that the SDK caller is currently executing in.
|
|
2171
|
-
*
|
|
2172
|
-
* an error.
|
|
2114
|
+
*
|
|
2115
|
+
* If the caller is not currently executing in a function, this will return an error.
|
|
2173
2116
|
*/
|
|
2174
2117
|
currentFunctionCall: () => FunctionCall;
|
|
2175
2118
|
/**
|
|
@@ -2181,36 +2124,39 @@ export declare class Client extends BaseClient {
|
|
|
2181
2124
|
*/
|
|
2182
2125
|
currentTypeDefs: () => Promise<TypeDef[]>;
|
|
2183
2126
|
/**
|
|
2184
|
-
* The default platform of the
|
|
2127
|
+
* The default platform of the engine.
|
|
2185
2128
|
*/
|
|
2186
2129
|
defaultPlatform: () => Promise<Platform>;
|
|
2187
2130
|
/**
|
|
2188
|
-
* Creates an empty directory
|
|
2131
|
+
* Creates an empty directory.
|
|
2132
|
+
* @param opts.id DEPRECATED: Use `loadDirectoryFromID` isntead.
|
|
2189
2133
|
*/
|
|
2190
2134
|
directory: (opts?: ClientDirectoryOpts) => Directory;
|
|
2191
2135
|
/**
|
|
2192
|
-
* Loads a file by ID.
|
|
2193
2136
|
* @deprecated Use loadFileFromID instead.
|
|
2194
2137
|
*/
|
|
2195
2138
|
file: (id: FileID) => File;
|
|
2196
2139
|
/**
|
|
2197
|
-
*
|
|
2140
|
+
* Creates a function.
|
|
2141
|
+
* @param name Name of the function, in its original format from the implementation language.
|
|
2142
|
+
* @param returnType Return type of the function.
|
|
2198
2143
|
*/
|
|
2199
2144
|
function_: (name: string, returnType: TypeDef) => Function_;
|
|
2200
2145
|
/**
|
|
2201
|
-
* Create a code generation result, given a directory containing the generated
|
|
2202
|
-
* code.
|
|
2146
|
+
* Create a code generation result, given a directory containing the generated code.
|
|
2203
2147
|
*/
|
|
2204
2148
|
generatedCode: (code: Directory) => GeneratedCode;
|
|
2205
2149
|
/**
|
|
2206
|
-
* Queries a
|
|
2207
|
-
* @param url
|
|
2208
|
-
*
|
|
2150
|
+
* Queries a Git repository.
|
|
2151
|
+
* @param url URL of the git repository.
|
|
2152
|
+
*
|
|
2153
|
+
* Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
|
|
2154
|
+
*
|
|
2209
2155
|
* Suffix ".git" is optional.
|
|
2210
2156
|
* @param opts.keepGitDir Set to true to keep .git directory.
|
|
2157
|
+
* @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
|
|
2211
2158
|
* @param opts.sshKnownHosts Set SSH known hosts
|
|
2212
2159
|
* @param opts.sshAuthSocket Set SSH auth socket
|
|
2213
|
-
* @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
|
|
2214
2160
|
*/
|
|
2215
2161
|
git: (url: string, opts?: ClientGitOpts) => GitRepository;
|
|
2216
2162
|
/**
|
|
@@ -2228,47 +2174,91 @@ export declare class Client extends BaseClient {
|
|
|
2228
2174
|
*/
|
|
2229
2175
|
loadCacheVolumeFromID: (id: CacheVolumeID) => CacheVolume;
|
|
2230
2176
|
/**
|
|
2231
|
-
*
|
|
2177
|
+
* Load a Container from its ID.
|
|
2232
2178
|
*/
|
|
2233
2179
|
loadContainerFromID: (id: ContainerID) => Container;
|
|
2234
2180
|
/**
|
|
2235
2181
|
* Load a Directory from its ID.
|
|
2236
2182
|
*/
|
|
2237
2183
|
loadDirectoryFromID: (id: DirectoryID) => Directory;
|
|
2184
|
+
/**
|
|
2185
|
+
* Load a EnvVariable from its ID.
|
|
2186
|
+
*/
|
|
2187
|
+
loadEnvVariableFromID: (id: EnvVariableID) => EnvVariable;
|
|
2188
|
+
/**
|
|
2189
|
+
* Load a FieldTypeDef from its ID.
|
|
2190
|
+
*/
|
|
2191
|
+
loadFieldTypeDefFromID: (id: FieldTypeDefID) => FieldTypeDef;
|
|
2238
2192
|
/**
|
|
2239
2193
|
* Load a File from its ID.
|
|
2240
2194
|
*/
|
|
2241
2195
|
loadFileFromID: (id: FileID) => File;
|
|
2242
2196
|
/**
|
|
2243
|
-
* Load a
|
|
2197
|
+
* Load a FunctionArg from its ID.
|
|
2244
2198
|
*/
|
|
2245
2199
|
loadFunctionArgFromID: (id: FunctionArgID) => FunctionArg;
|
|
2246
2200
|
/**
|
|
2247
|
-
* Load a
|
|
2201
|
+
* Load a FunctionCallArgValue from its ID.
|
|
2202
|
+
*/
|
|
2203
|
+
loadFunctionCallArgValueFromID: (id: FunctionCallArgValueID) => FunctionCallArgValue;
|
|
2204
|
+
/**
|
|
2205
|
+
* Load a FunctionCall from its ID.
|
|
2206
|
+
*/
|
|
2207
|
+
loadFunctionCallFromID: (id: FunctionCallID) => FunctionCall;
|
|
2208
|
+
/**
|
|
2209
|
+
* Load a Function from its ID.
|
|
2248
2210
|
*/
|
|
2249
2211
|
loadFunctionFromID: (id: FunctionID) => Function_;
|
|
2250
2212
|
/**
|
|
2251
|
-
* Load a GeneratedCode
|
|
2213
|
+
* Load a GeneratedCode from its ID.
|
|
2252
2214
|
*/
|
|
2253
2215
|
loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
|
|
2254
2216
|
/**
|
|
2255
|
-
* Load a
|
|
2217
|
+
* Load a GitRef from its ID.
|
|
2256
2218
|
*/
|
|
2257
2219
|
loadGitRefFromID: (id: GitRefID) => GitRef;
|
|
2258
2220
|
/**
|
|
2259
|
-
* Load a
|
|
2221
|
+
* Load a GitRepository from its ID.
|
|
2260
2222
|
*/
|
|
2261
2223
|
loadGitRepositoryFromID: (id: GitRepositoryID) => GitRepository;
|
|
2262
2224
|
/**
|
|
2263
|
-
* Load a
|
|
2225
|
+
* Load a Host from its ID.
|
|
2226
|
+
*/
|
|
2227
|
+
loadHostFromID: (id: HostID) => Host;
|
|
2228
|
+
/**
|
|
2229
|
+
* Load a InterfaceTypeDef from its ID.
|
|
2230
|
+
*/
|
|
2231
|
+
loadInterfaceTypeDefFromID: (id: InterfaceTypeDefID) => InterfaceTypeDef;
|
|
2232
|
+
/**
|
|
2233
|
+
* Load a Label from its ID.
|
|
2234
|
+
*/
|
|
2235
|
+
loadLabelFromID: (id: LabelID) => Label;
|
|
2236
|
+
/**
|
|
2237
|
+
* Load a ListTypeDef from its ID.
|
|
2238
|
+
*/
|
|
2239
|
+
loadListTypeDefFromID: (id: ListTypeDefID) => ListTypeDef;
|
|
2240
|
+
/**
|
|
2241
|
+
* Load a ModuleConfig from its ID.
|
|
2242
|
+
*/
|
|
2243
|
+
loadModuleConfigFromID: (id: ModuleConfigID) => ModuleConfig;
|
|
2244
|
+
/**
|
|
2245
|
+
* Load a Module from its ID.
|
|
2264
2246
|
*/
|
|
2265
2247
|
loadModuleFromID: (id: ModuleID) => Module_;
|
|
2248
|
+
/**
|
|
2249
|
+
* Load a ObjectTypeDef from its ID.
|
|
2250
|
+
*/
|
|
2251
|
+
loadObjectTypeDefFromID: (id: ObjectTypeDefID) => ObjectTypeDef;
|
|
2252
|
+
/**
|
|
2253
|
+
* Load a Port from its ID.
|
|
2254
|
+
*/
|
|
2255
|
+
loadPortFromID: (id: PortID) => Port;
|
|
2266
2256
|
/**
|
|
2267
2257
|
* Load a Secret from its ID.
|
|
2268
2258
|
*/
|
|
2269
2259
|
loadSecretFromID: (id: SecretID) => Secret;
|
|
2270
2260
|
/**
|
|
2271
|
-
*
|
|
2261
|
+
* Load a Service from its ID.
|
|
2272
2262
|
*/
|
|
2273
2263
|
loadServiceFromID: (id: ServiceID) => Service;
|
|
2274
2264
|
/**
|
|
@@ -2276,7 +2266,7 @@ export declare class Client extends BaseClient {
|
|
|
2276
2266
|
*/
|
|
2277
2267
|
loadSocketFromID: (id: SocketID) => Socket;
|
|
2278
2268
|
/**
|
|
2279
|
-
* Load a TypeDef
|
|
2269
|
+
* Load a TypeDef from its ID.
|
|
2280
2270
|
*/
|
|
2281
2271
|
loadTypeDefFromID: (id: TypeDefID) => TypeDef;
|
|
2282
2272
|
/**
|
|
@@ -2289,18 +2279,18 @@ export declare class Client extends BaseClient {
|
|
|
2289
2279
|
moduleConfig: (sourceDirectory: Directory, opts?: ClientModuleConfigOpts) => ModuleConfig;
|
|
2290
2280
|
/**
|
|
2291
2281
|
* Creates a named sub-pipeline.
|
|
2292
|
-
* @param name
|
|
2293
|
-
* @param opts.description
|
|
2294
|
-
* @param opts.labels
|
|
2282
|
+
* @param name Name of the sub-pipeline.
|
|
2283
|
+
* @param opts.description Description of the sub-pipeline.
|
|
2284
|
+
* @param opts.labels Labels to apply to the sub-pipeline.
|
|
2295
2285
|
*/
|
|
2296
2286
|
pipeline: (name: string, opts?: ClientPipelineOpts) => Client;
|
|
2297
2287
|
/**
|
|
2298
|
-
*
|
|
2299
|
-
* @deprecated Use loadSecretFromID instead
|
|
2288
|
+
* Reference a secret by name.
|
|
2300
2289
|
*/
|
|
2301
|
-
secret: (
|
|
2290
|
+
secret: (name: string) => Secret;
|
|
2302
2291
|
/**
|
|
2303
2292
|
* Sets a secret given a user defined name to its plaintext and returns the secret.
|
|
2293
|
+
*
|
|
2304
2294
|
* The plaintext value is limited to a size of 128000 bytes.
|
|
2305
2295
|
* @param name The user defined name for this secret
|
|
2306
2296
|
* @param plaintext The plaintext of the secret
|
|
@@ -2310,7 +2300,7 @@ export declare class Client extends BaseClient {
|
|
|
2310
2300
|
* Loads a socket by its ID.
|
|
2311
2301
|
* @deprecated Use loadSocketFromID instead.
|
|
2312
2302
|
*/
|
|
2313
|
-
socket: (
|
|
2303
|
+
socket: (id: SocketID) => Socket;
|
|
2314
2304
|
/**
|
|
2315
2305
|
* Create a new TypeDef.
|
|
2316
2306
|
*/
|
|
@@ -2336,7 +2326,7 @@ export declare class Secret extends BaseClient {
|
|
|
2336
2326
|
ctx: Context;
|
|
2337
2327
|
}, _id?: SecretID, _plaintext?: string);
|
|
2338
2328
|
/**
|
|
2339
|
-
*
|
|
2329
|
+
* A unique identifier for this Secret.
|
|
2340
2330
|
*/
|
|
2341
2331
|
id: () => Promise<SecretID>;
|
|
2342
2332
|
/**
|
|
@@ -2344,6 +2334,9 @@ export declare class Secret extends BaseClient {
|
|
|
2344
2334
|
*/
|
|
2345
2335
|
plaintext: () => Promise<string>;
|
|
2346
2336
|
}
|
|
2337
|
+
/**
|
|
2338
|
+
* A content-addressed service providing TCP connectivity.
|
|
2339
|
+
*/
|
|
2347
2340
|
export declare class Service extends BaseClient {
|
|
2348
2341
|
private readonly _id?;
|
|
2349
2342
|
private readonly _endpoint?;
|
|
@@ -2358,7 +2351,7 @@ export declare class Service extends BaseClient {
|
|
|
2358
2351
|
ctx: Context;
|
|
2359
2352
|
}, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID);
|
|
2360
2353
|
/**
|
|
2361
|
-
* A unique identifier for this
|
|
2354
|
+
* A unique identifier for this Service.
|
|
2362
2355
|
*/
|
|
2363
2356
|
id: () => Promise<ServiceID>;
|
|
2364
2357
|
/**
|
|
@@ -2390,6 +2383,9 @@ export declare class Service extends BaseClient {
|
|
|
2390
2383
|
*/
|
|
2391
2384
|
stop: () => Promise<Service>;
|
|
2392
2385
|
}
|
|
2386
|
+
/**
|
|
2387
|
+
* A Unix or TCP/IP socket that can be mounted into a container.
|
|
2388
|
+
*/
|
|
2393
2389
|
export declare class Socket extends BaseClient {
|
|
2394
2390
|
private readonly _id?;
|
|
2395
2391
|
/**
|
|
@@ -2400,7 +2396,7 @@ export declare class Socket extends BaseClient {
|
|
|
2400
2396
|
ctx: Context;
|
|
2401
2397
|
}, _id?: SocketID);
|
|
2402
2398
|
/**
|
|
2403
|
-
*
|
|
2399
|
+
* A unique identifier for this Socket.
|
|
2404
2400
|
*/
|
|
2405
2401
|
id: () => Promise<SocketID>;
|
|
2406
2402
|
}
|
|
@@ -2418,29 +2414,14 @@ export declare class TypeDef extends BaseClient {
|
|
|
2418
2414
|
queryTree?: QueryTree[];
|
|
2419
2415
|
ctx: Context;
|
|
2420
2416
|
}, _id?: TypeDefID, _kind?: TypeDefKind, _optional?: boolean);
|
|
2421
|
-
id: () => Promise<TypeDefID>;
|
|
2422
2417
|
/**
|
|
2423
|
-
*
|
|
2424
|
-
* If kind is not INTERFACE, this will be null.
|
|
2418
|
+
* A unique identifier for this TypeDef.
|
|
2425
2419
|
*/
|
|
2420
|
+
id: () => Promise<TypeDefID>;
|
|
2426
2421
|
asInterface: () => InterfaceTypeDef;
|
|
2427
|
-
/**
|
|
2428
|
-
* If kind is LIST, the list-specific type definition.
|
|
2429
|
-
* If kind is not LIST, this will be null.
|
|
2430
|
-
*/
|
|
2431
2422
|
asList: () => ListTypeDef;
|
|
2432
|
-
/**
|
|
2433
|
-
* If kind is OBJECT, the object-specific type definition.
|
|
2434
|
-
* If kind is not OBJECT, this will be null.
|
|
2435
|
-
*/
|
|
2436
2423
|
asObject: () => ObjectTypeDef;
|
|
2437
|
-
/**
|
|
2438
|
-
* The kind of type this is (e.g. primitive, list, object)
|
|
2439
|
-
*/
|
|
2440
2424
|
kind: () => Promise<TypeDefKind>;
|
|
2441
|
-
/**
|
|
2442
|
-
* Whether this type can be set to null. Defaults to false.
|
|
2443
|
-
*/
|
|
2444
2425
|
optional: () => Promise<boolean>;
|
|
2445
2426
|
/**
|
|
2446
2427
|
* Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
|
|
@@ -2472,9 +2453,7 @@ export declare class TypeDef extends BaseClient {
|
|
|
2472
2453
|
/**
|
|
2473
2454
|
* Returns a TypeDef of kind Object with the provided name.
|
|
2474
2455
|
*
|
|
2475
|
-
* Note that an object's fields and functions may be omitted if the intent is
|
|
2476
|
-
* only to refer to an object. This is how functions are able to return their
|
|
2477
|
-
* own object, or any other circular reference.
|
|
2456
|
+
* Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference.
|
|
2478
2457
|
*/
|
|
2479
2458
|
withObject: (name: string, opts?: TypeDefWithObjectOpts) => TypeDef;
|
|
2480
2459
|
/**
|