@dagger.io/dagger 0.9.6 → 0.9.8
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 +809 -501
- package/dist/api/client.gen.d.ts.map +1 -1
- package/dist/api/client.gen.js +1601 -570
- package/dist/common/utils.d.ts +3 -0
- package/dist/common/utils.d.ts.map +1 -1
- 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 +121 -26
- package/dist/entrypoint/register.d.ts +3 -2
- package/dist/entrypoint/register.d.ts.map +1 -1
- package/dist/entrypoint/register.js +17 -18
- 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 +9 -36
- 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 +7 -6
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,114 @@ 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
|
};
|
|
168
|
+
export type ContainerShellOpts = {
|
|
169
|
+
/**
|
|
170
|
+
* If set, override the container's default shell and invoke these arguments instead.
|
|
171
|
+
*/
|
|
172
|
+
args?: string[];
|
|
173
|
+
};
|
|
177
174
|
export type ContainerWithDirectoryOpts = {
|
|
178
175
|
/**
|
|
179
|
-
* Patterns to exclude in the written directory (e.g
|
|
176
|
+
* Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
|
|
180
177
|
*/
|
|
181
178
|
exclude?: string[];
|
|
182
179
|
/**
|
|
183
|
-
* Patterns to include in the written directory (e.g
|
|
180
|
+
* Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
|
|
184
181
|
*/
|
|
185
182
|
include?: string[];
|
|
186
183
|
/**
|
|
@@ -200,8 +197,7 @@ export type ContainerWithEntrypointOpts = {
|
|
|
200
197
|
};
|
|
201
198
|
export type ContainerWithEnvVariableOpts = {
|
|
202
199
|
/**
|
|
203
|
-
* Replace `${VAR}` or
|
|
204
|
-
* variables defined in the container (e.g., "/opt/bin:$PATH").
|
|
200
|
+
* Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
|
|
205
201
|
*/
|
|
206
202
|
expand?: boolean;
|
|
207
203
|
};
|
|
@@ -225,15 +221,11 @@ export type ContainerWithExecOpts = {
|
|
|
225
221
|
/**
|
|
226
222
|
* Provides dagger access to the executed command.
|
|
227
223
|
*
|
|
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.
|
|
224
|
+
* 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
225
|
*/
|
|
231
226
|
experimentalPrivilegedNesting?: boolean;
|
|
232
227
|
/**
|
|
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.
|
|
228
|
+
* 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
229
|
*/
|
|
238
230
|
insecureRootCapabilities?: boolean;
|
|
239
231
|
};
|
|
@@ -246,12 +238,14 @@ export type ContainerWithExposedPortOpts = {
|
|
|
246
238
|
* Optional port description
|
|
247
239
|
*/
|
|
248
240
|
description?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Skip the health check when run as a service.
|
|
243
|
+
*/
|
|
244
|
+
experimentalSkipHealthcheck?: boolean;
|
|
249
245
|
};
|
|
250
246
|
export type ContainerWithFileOpts = {
|
|
251
247
|
/**
|
|
252
248
|
* Permission given to the copied file (e.g., 0600).
|
|
253
|
-
*
|
|
254
|
-
* Default: 0644.
|
|
255
249
|
*/
|
|
256
250
|
permissions?: number;
|
|
257
251
|
/**
|
|
@@ -275,9 +269,7 @@ export type ContainerWithMountedCacheOpts = {
|
|
|
275
269
|
/**
|
|
276
270
|
* A user:group to set for the mounted cache directory.
|
|
277
271
|
*
|
|
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.
|
|
272
|
+
* 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
273
|
*
|
|
282
274
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
283
275
|
*
|
|
@@ -316,9 +308,8 @@ export type ContainerWithMountedSecretOpts = {
|
|
|
316
308
|
owner?: string;
|
|
317
309
|
/**
|
|
318
310
|
* Permission given to the mounted secret (e.g., 0600).
|
|
319
|
-
* This option requires an owner to be set to be active.
|
|
320
311
|
*
|
|
321
|
-
*
|
|
312
|
+
* This option requires an owner to be set to be active.
|
|
322
313
|
*/
|
|
323
314
|
mode?: number;
|
|
324
315
|
};
|
|
@@ -329,8 +320,6 @@ export type ContainerWithNewFileOpts = {
|
|
|
329
320
|
contents?: string;
|
|
330
321
|
/**
|
|
331
322
|
* Permission given to the written file (e.g., 0600).
|
|
332
|
-
*
|
|
333
|
-
* Default: 0644.
|
|
334
323
|
*/
|
|
335
324
|
permissions?: number;
|
|
336
325
|
/**
|
|
@@ -365,51 +354,54 @@ export type ContainerWithoutExposedPortOpts = {
|
|
|
365
354
|
protocol?: NetworkProtocol;
|
|
366
355
|
};
|
|
367
356
|
/**
|
|
368
|
-
*
|
|
357
|
+
* The `ContainerID` scalar type represents an identifier for an object of type Container.
|
|
369
358
|
*/
|
|
370
359
|
export type ContainerID = string & {
|
|
371
360
|
__ContainerID: never;
|
|
372
361
|
};
|
|
362
|
+
export type CurrentModuleWorkdirOpts = {
|
|
363
|
+
/**
|
|
364
|
+
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
365
|
+
*/
|
|
366
|
+
exclude?: string[];
|
|
367
|
+
/**
|
|
368
|
+
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
369
|
+
*/
|
|
370
|
+
include?: string[];
|
|
371
|
+
};
|
|
373
372
|
/**
|
|
374
|
-
* The `
|
|
373
|
+
* The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.
|
|
375
374
|
*/
|
|
376
|
-
export type
|
|
377
|
-
|
|
375
|
+
export type CurrentModuleID = string & {
|
|
376
|
+
__CurrentModuleID: never;
|
|
378
377
|
};
|
|
379
378
|
export type DirectoryAsModuleOpts = {
|
|
380
379
|
/**
|
|
381
|
-
* An optional subpath of the directory which contains the module's source
|
|
382
|
-
* code.
|
|
380
|
+
* An optional subpath of the directory which contains the module's source code.
|
|
383
381
|
*
|
|
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.
|
|
382
|
+
* 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
383
|
*
|
|
389
|
-
* If not set, the module source code is loaded from the root of the
|
|
390
|
-
* directory.
|
|
384
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
391
385
|
*/
|
|
392
386
|
sourceSubpath?: string;
|
|
393
387
|
};
|
|
394
388
|
export type DirectoryDockerBuildOpts = {
|
|
395
|
-
/**
|
|
396
|
-
* Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
397
|
-
*
|
|
398
|
-
* Defaults: './Dockerfile'.
|
|
399
|
-
*/
|
|
400
|
-
dockerfile?: string;
|
|
401
389
|
/**
|
|
402
390
|
* The platform to build.
|
|
403
391
|
*/
|
|
404
392
|
platform?: Platform;
|
|
405
393
|
/**
|
|
406
|
-
*
|
|
394
|
+
* Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
407
395
|
*/
|
|
408
|
-
|
|
396
|
+
dockerfile?: string;
|
|
409
397
|
/**
|
|
410
398
|
* Target build stage to build.
|
|
411
399
|
*/
|
|
412
400
|
target?: string;
|
|
401
|
+
/**
|
|
402
|
+
* Build arguments to use in the build.
|
|
403
|
+
*/
|
|
404
|
+
buildArgs?: BuildArg[];
|
|
413
405
|
/**
|
|
414
406
|
* Secrets to pass to the build.
|
|
415
407
|
*
|
|
@@ -425,11 +417,11 @@ export type DirectoryEntriesOpts = {
|
|
|
425
417
|
};
|
|
426
418
|
export type DirectoryPipelineOpts = {
|
|
427
419
|
/**
|
|
428
|
-
*
|
|
420
|
+
* Description of the sub-pipeline.
|
|
429
421
|
*/
|
|
430
422
|
description?: string;
|
|
431
423
|
/**
|
|
432
|
-
*
|
|
424
|
+
* Labels to apply to the sub-pipeline.
|
|
433
425
|
*/
|
|
434
426
|
labels?: PipelineLabel[];
|
|
435
427
|
};
|
|
@@ -446,42 +438,47 @@ export type DirectoryWithDirectoryOpts = {
|
|
|
446
438
|
export type DirectoryWithFileOpts = {
|
|
447
439
|
/**
|
|
448
440
|
* Permission given to the copied file (e.g., 0600).
|
|
449
|
-
*
|
|
450
|
-
* Default: 0644.
|
|
451
441
|
*/
|
|
452
442
|
permissions?: number;
|
|
453
443
|
};
|
|
454
444
|
export type DirectoryWithNewDirectoryOpts = {
|
|
455
445
|
/**
|
|
456
446
|
* Permission granted to the created directory (e.g., 0777).
|
|
457
|
-
*
|
|
458
|
-
* Default: 0755.
|
|
459
447
|
*/
|
|
460
448
|
permissions?: number;
|
|
461
449
|
};
|
|
462
450
|
export type DirectoryWithNewFileOpts = {
|
|
463
451
|
/**
|
|
464
452
|
* Permission given to the copied file (e.g., 0600).
|
|
465
|
-
*
|
|
466
|
-
* Default: 0644.
|
|
467
453
|
*/
|
|
468
454
|
permissions?: number;
|
|
469
455
|
};
|
|
470
456
|
/**
|
|
471
|
-
*
|
|
457
|
+
* The `DirectoryID` scalar type represents an identifier for an object of type Directory.
|
|
472
458
|
*/
|
|
473
459
|
export type DirectoryID = string & {
|
|
474
460
|
__DirectoryID: never;
|
|
475
461
|
};
|
|
462
|
+
/**
|
|
463
|
+
* The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.
|
|
464
|
+
*/
|
|
465
|
+
export type EnvVariableID = string & {
|
|
466
|
+
__EnvVariableID: never;
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
|
|
470
|
+
*/
|
|
471
|
+
export type FieldTypeDefID = string & {
|
|
472
|
+
__FieldTypeDefID: never;
|
|
473
|
+
};
|
|
476
474
|
export type FileExportOpts = {
|
|
477
475
|
/**
|
|
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.
|
|
476
|
+
* If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
|
|
480
477
|
*/
|
|
481
478
|
allowParentDirPath?: boolean;
|
|
482
479
|
};
|
|
483
480
|
/**
|
|
484
|
-
*
|
|
481
|
+
* The `FileID` scalar type represents an identifier for an object of type File.
|
|
485
482
|
*/
|
|
486
483
|
export type FileID = string & {
|
|
487
484
|
__FileID: never;
|
|
@@ -497,35 +494,59 @@ export type FunctionWithArgOpts = {
|
|
|
497
494
|
defaultValue?: JSON;
|
|
498
495
|
};
|
|
499
496
|
/**
|
|
500
|
-
*
|
|
497
|
+
* The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.
|
|
501
498
|
*/
|
|
502
499
|
export type FunctionArgID = string & {
|
|
503
500
|
__FunctionArgID: never;
|
|
504
501
|
};
|
|
505
502
|
/**
|
|
506
|
-
*
|
|
503
|
+
* The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.
|
|
504
|
+
*/
|
|
505
|
+
export type FunctionCallArgValueID = string & {
|
|
506
|
+
__FunctionCallArgValueID: never;
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.
|
|
510
|
+
*/
|
|
511
|
+
export type FunctionCallID = string & {
|
|
512
|
+
__FunctionCallID: never;
|
|
513
|
+
};
|
|
514
|
+
/**
|
|
515
|
+
* The `FunctionID` scalar type represents an identifier for an object of type Function.
|
|
507
516
|
*/
|
|
508
517
|
export type FunctionID = string & {
|
|
509
518
|
__FunctionID: never;
|
|
510
519
|
};
|
|
511
520
|
/**
|
|
512
|
-
*
|
|
521
|
+
* The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.
|
|
513
522
|
*/
|
|
514
523
|
export type GeneratedCodeID = string & {
|
|
515
524
|
__GeneratedCodeID: never;
|
|
516
525
|
};
|
|
526
|
+
/**
|
|
527
|
+
* The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.
|
|
528
|
+
*/
|
|
529
|
+
export type GitModuleSourceID = string & {
|
|
530
|
+
__GitModuleSourceID: never;
|
|
531
|
+
};
|
|
517
532
|
export type GitRefTreeOpts = {
|
|
533
|
+
/**
|
|
534
|
+
* DEPRECATED: This option should be passed to `git` instead.
|
|
535
|
+
*/
|
|
518
536
|
sshKnownHosts?: string;
|
|
537
|
+
/**
|
|
538
|
+
* DEPRECATED: This option should be passed to `git` instead.
|
|
539
|
+
*/
|
|
519
540
|
sshAuthSocket?: Socket;
|
|
520
541
|
};
|
|
521
542
|
/**
|
|
522
|
-
*
|
|
543
|
+
* The `GitRefID` scalar type represents an identifier for an object of type GitRef.
|
|
523
544
|
*/
|
|
524
545
|
export type GitRefID = string & {
|
|
525
546
|
__GitRefID: never;
|
|
526
547
|
};
|
|
527
548
|
/**
|
|
528
|
-
*
|
|
549
|
+
* The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.
|
|
529
550
|
*/
|
|
530
551
|
export type GitRepositoryID = string & {
|
|
531
552
|
__GitRepositoryID: never;
|
|
@@ -545,34 +566,38 @@ export type HostServiceOpts = {
|
|
|
545
566
|
* Upstream host to forward traffic to.
|
|
546
567
|
*/
|
|
547
568
|
host?: string;
|
|
548
|
-
};
|
|
549
|
-
export type HostTunnelOpts = {
|
|
550
569
|
/**
|
|
551
|
-
*
|
|
552
|
-
* running natively.
|
|
570
|
+
* Ports to expose via the service, forwarding through the host network.
|
|
553
571
|
*
|
|
554
|
-
*
|
|
572
|
+
* If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
|
|
573
|
+
*
|
|
574
|
+
* An empty set of ports is not valid; an error will be returned.
|
|
555
575
|
*/
|
|
556
|
-
|
|
576
|
+
ports: PortForward[];
|
|
577
|
+
};
|
|
578
|
+
export type HostTunnelOpts = {
|
|
557
579
|
/**
|
|
558
580
|
* Configure explicit port forwarding rules for the tunnel.
|
|
559
581
|
*
|
|
560
|
-
* If a port's frontend is unspecified or 0, a random port will be chosen by
|
|
561
|
-
* the host.
|
|
582
|
+
* If a port's frontend is unspecified or 0, a random port will be chosen by the host.
|
|
562
583
|
*
|
|
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.
|
|
584
|
+
* 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
585
|
*
|
|
567
586
|
* If ports are given and native is true, the ports are additive.
|
|
568
587
|
*/
|
|
569
588
|
ports?: PortForward[];
|
|
589
|
+
/**
|
|
590
|
+
* Map each service port to the same port on the host, as if the service were running natively.
|
|
591
|
+
*
|
|
592
|
+
* Note: enabling may result in port conflicts.
|
|
593
|
+
*/
|
|
594
|
+
native?: boolean;
|
|
570
595
|
};
|
|
571
596
|
/**
|
|
572
|
-
* The `
|
|
597
|
+
* The `HostID` scalar type represents an identifier for an object of type Host.
|
|
573
598
|
*/
|
|
574
|
-
export type
|
|
575
|
-
|
|
599
|
+
export type HostID = string & {
|
|
600
|
+
__HostID: never;
|
|
576
601
|
};
|
|
577
602
|
/**
|
|
578
603
|
* Compression algorithm to use for image layers.
|
|
@@ -590,6 +615,18 @@ export declare enum ImageMediaTypes {
|
|
|
590
615
|
Dockermediatypes = "DockerMediaTypes",
|
|
591
616
|
Ocimediatypes = "OCIMediaTypes"
|
|
592
617
|
}
|
|
618
|
+
/**
|
|
619
|
+
* The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef.
|
|
620
|
+
*/
|
|
621
|
+
export type InputTypeDefID = string & {
|
|
622
|
+
__InputTypeDefID: never;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
|
|
626
|
+
*/
|
|
627
|
+
export type InterfaceTypeDefID = string & {
|
|
628
|
+
__InterfaceTypeDefID: never;
|
|
629
|
+
};
|
|
593
630
|
/**
|
|
594
631
|
* An arbitrary JSON-encoded value.
|
|
595
632
|
*/
|
|
@@ -597,24 +634,61 @@ export type JSON = string & {
|
|
|
597
634
|
__JSON: never;
|
|
598
635
|
};
|
|
599
636
|
/**
|
|
600
|
-
*
|
|
637
|
+
* The `LabelID` scalar type represents an identifier for an object of type Label.
|
|
638
|
+
*/
|
|
639
|
+
export type LabelID = string & {
|
|
640
|
+
__LabelID: never;
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.
|
|
644
|
+
*/
|
|
645
|
+
export type ListTypeDefID = string & {
|
|
646
|
+
__ListTypeDefID: never;
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.
|
|
650
|
+
*/
|
|
651
|
+
export type LocalModuleSourceID = string & {
|
|
652
|
+
__LocalModuleSourceID: never;
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.
|
|
656
|
+
*/
|
|
657
|
+
export type ModuleDependencyID = string & {
|
|
658
|
+
__ModuleDependencyID: never;
|
|
659
|
+
};
|
|
660
|
+
/**
|
|
661
|
+
* The `ModuleID` scalar type represents an identifier for an object of type Module.
|
|
601
662
|
*/
|
|
602
663
|
export type ModuleID = string & {
|
|
603
664
|
__ModuleID: never;
|
|
604
665
|
};
|
|
666
|
+
/**
|
|
667
|
+
* The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.
|
|
668
|
+
*/
|
|
669
|
+
export type ModuleSourceID = string & {
|
|
670
|
+
__ModuleSourceID: never;
|
|
671
|
+
};
|
|
672
|
+
/**
|
|
673
|
+
* The kind of module source.
|
|
674
|
+
*/
|
|
675
|
+
export declare enum ModuleSourceKind {
|
|
676
|
+
GitSource = "GIT_SOURCE",
|
|
677
|
+
LocalSource = "LOCAL_SOURCE"
|
|
678
|
+
}
|
|
605
679
|
/**
|
|
606
680
|
* Transport layer network protocol associated to a port.
|
|
607
681
|
*/
|
|
608
682
|
export declare enum NetworkProtocol {
|
|
609
|
-
/**
|
|
610
|
-
* TCP (Transmission Control Protocol)
|
|
611
|
-
*/
|
|
612
683
|
Tcp = "TCP",
|
|
613
|
-
/**
|
|
614
|
-
* UDP (User Datagram Protocol)
|
|
615
|
-
*/
|
|
616
684
|
Udp = "UDP"
|
|
617
685
|
}
|
|
686
|
+
/**
|
|
687
|
+
* The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.
|
|
688
|
+
*/
|
|
689
|
+
export type ObjectTypeDefID = string & {
|
|
690
|
+
__ObjectTypeDefID: never;
|
|
691
|
+
};
|
|
618
692
|
export type PipelineLabel = {
|
|
619
693
|
/**
|
|
620
694
|
* Label name.
|
|
@@ -643,15 +717,30 @@ export type PortForward = {
|
|
|
643
717
|
*/
|
|
644
718
|
frontend?: number;
|
|
645
719
|
/**
|
|
646
|
-
*
|
|
720
|
+
* Transport layer protocol to use for traffic.
|
|
647
721
|
*/
|
|
648
722
|
protocol?: NetworkProtocol;
|
|
649
723
|
};
|
|
724
|
+
/**
|
|
725
|
+
* The `PortID` scalar type represents an identifier for an object of type Port.
|
|
726
|
+
*/
|
|
727
|
+
export type PortID = string & {
|
|
728
|
+
__PortID: never;
|
|
729
|
+
};
|
|
650
730
|
export type ClientContainerOpts = {
|
|
731
|
+
/**
|
|
732
|
+
* DEPRECATED: Use `loadContainerFromID` instead.
|
|
733
|
+
*/
|
|
651
734
|
id?: ContainerID;
|
|
735
|
+
/**
|
|
736
|
+
* Platform to initialize the container with.
|
|
737
|
+
*/
|
|
652
738
|
platform?: Platform;
|
|
653
739
|
};
|
|
654
740
|
export type ClientDirectoryOpts = {
|
|
741
|
+
/**
|
|
742
|
+
* DEPRECATED: Use `loadDirectoryFromID` isntead.
|
|
743
|
+
*/
|
|
655
744
|
id?: DirectoryID;
|
|
656
745
|
};
|
|
657
746
|
export type ClientGitOpts = {
|
|
@@ -659,6 +748,10 @@ export type ClientGitOpts = {
|
|
|
659
748
|
* Set to true to keep .git directory.
|
|
660
749
|
*/
|
|
661
750
|
keepGitDir?: boolean;
|
|
751
|
+
/**
|
|
752
|
+
* A service which must be started before the repo is fetched.
|
|
753
|
+
*/
|
|
754
|
+
experimentalServiceHost?: Service;
|
|
662
755
|
/**
|
|
663
756
|
* Set SSH known hosts
|
|
664
757
|
*/
|
|
@@ -667,10 +760,6 @@ export type ClientGitOpts = {
|
|
|
667
760
|
* Set SSH auth socket
|
|
668
761
|
*/
|
|
669
762
|
sshAuthSocket?: Socket;
|
|
670
|
-
/**
|
|
671
|
-
* A service which must be started before the repo is fetched.
|
|
672
|
-
*/
|
|
673
|
-
experimentalServiceHost?: Service;
|
|
674
763
|
};
|
|
675
764
|
export type ClientHttpOpts = {
|
|
676
765
|
/**
|
|
@@ -678,24 +767,34 @@ export type ClientHttpOpts = {
|
|
|
678
767
|
*/
|
|
679
768
|
experimentalServiceHost?: Service;
|
|
680
769
|
};
|
|
681
|
-
export type
|
|
682
|
-
|
|
770
|
+
export type ClientModuleDependencyOpts = {
|
|
771
|
+
/**
|
|
772
|
+
* If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default.
|
|
773
|
+
*/
|
|
774
|
+
name?: string;
|
|
775
|
+
};
|
|
776
|
+
export type ClientModuleSourceOpts = {
|
|
777
|
+
/**
|
|
778
|
+
* An explicitly set root directory for the module source. This is required to load local sources as modules; other source types implicitly encode the root directory and do not require this.
|
|
779
|
+
*/
|
|
780
|
+
rootDirectory?: Directory;
|
|
781
|
+
/**
|
|
782
|
+
* If true, enforce that the source is a stable version for source kinds that support versioning.
|
|
783
|
+
*/
|
|
784
|
+
stable?: boolean;
|
|
683
785
|
};
|
|
684
786
|
export type ClientPipelineOpts = {
|
|
685
787
|
/**
|
|
686
|
-
*
|
|
788
|
+
* Description of the sub-pipeline.
|
|
687
789
|
*/
|
|
688
790
|
description?: string;
|
|
689
791
|
/**
|
|
690
|
-
*
|
|
792
|
+
* Labels to apply to the sub-pipeline.
|
|
691
793
|
*/
|
|
692
794
|
labels?: PipelineLabel[];
|
|
693
795
|
};
|
|
694
|
-
export type ClientSocketOpts = {
|
|
695
|
-
id?: SocketID;
|
|
696
|
-
};
|
|
697
796
|
/**
|
|
698
|
-
*
|
|
797
|
+
* The `SecretID` scalar type represents an identifier for an object of type Secret.
|
|
699
798
|
*/
|
|
700
799
|
export type SecretID = string & {
|
|
701
800
|
__SecretID: never;
|
|
@@ -710,18 +809,34 @@ export type ServiceEndpointOpts = {
|
|
|
710
809
|
*/
|
|
711
810
|
scheme?: string;
|
|
712
811
|
};
|
|
812
|
+
export type ServiceStopOpts = {
|
|
813
|
+
/**
|
|
814
|
+
* Immediately kill the service without waiting for a graceful exit
|
|
815
|
+
*/
|
|
816
|
+
kill?: boolean;
|
|
817
|
+
};
|
|
818
|
+
export type ServiceUpOpts = {
|
|
819
|
+
ports?: PortForward[];
|
|
820
|
+
native?: boolean;
|
|
821
|
+
};
|
|
713
822
|
/**
|
|
714
|
-
*
|
|
823
|
+
* The `ServiceID` scalar type represents an identifier for an object of type Service.
|
|
715
824
|
*/
|
|
716
825
|
export type ServiceID = string & {
|
|
717
826
|
__ServiceID: never;
|
|
718
827
|
};
|
|
719
828
|
/**
|
|
720
|
-
*
|
|
829
|
+
* The `SocketID` scalar type represents an identifier for an object of type Socket.
|
|
721
830
|
*/
|
|
722
831
|
export type SocketID = string & {
|
|
723
832
|
__SocketID: never;
|
|
724
833
|
};
|
|
834
|
+
/**
|
|
835
|
+
* The `TerminalID` scalar type represents an identifier for an object of type Terminal.
|
|
836
|
+
*/
|
|
837
|
+
export type TerminalID = string & {
|
|
838
|
+
__TerminalID: never;
|
|
839
|
+
};
|
|
725
840
|
export type TypeDefWithFieldOpts = {
|
|
726
841
|
/**
|
|
727
842
|
* A doc string for the field, if any
|
|
@@ -735,7 +850,7 @@ export type TypeDefWithObjectOpts = {
|
|
|
735
850
|
description?: string;
|
|
736
851
|
};
|
|
737
852
|
/**
|
|
738
|
-
*
|
|
853
|
+
* The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.
|
|
739
854
|
*/
|
|
740
855
|
export type TypeDefID = string & {
|
|
741
856
|
__TypeDefID: never;
|
|
@@ -745,46 +860,48 @@ export type TypeDefID = string & {
|
|
|
745
860
|
*/
|
|
746
861
|
export declare enum TypeDefKind {
|
|
747
862
|
/**
|
|
748
|
-
* A boolean value
|
|
863
|
+
* A boolean value.
|
|
749
864
|
*/
|
|
750
|
-
|
|
865
|
+
BooleanKind = "BOOLEAN_KIND",
|
|
751
866
|
/**
|
|
752
|
-
*
|
|
867
|
+
* A graphql input type, used only when representing the core API via TypeDefs.
|
|
753
868
|
*/
|
|
754
|
-
|
|
869
|
+
InputKind = "INPUT_KIND",
|
|
870
|
+
/**
|
|
871
|
+
* An integer value.
|
|
872
|
+
*/
|
|
873
|
+
IntegerKind = "INTEGER_KIND",
|
|
755
874
|
/**
|
|
756
875
|
* A named type of functions that can be matched+implemented by other objects+interfaces.
|
|
757
876
|
*
|
|
758
877
|
* Always paired with an InterfaceTypeDef.
|
|
759
878
|
*/
|
|
760
|
-
|
|
879
|
+
InterfaceKind = "INTERFACE_KIND",
|
|
761
880
|
/**
|
|
762
881
|
* A list of values all having the same type.
|
|
763
882
|
*
|
|
764
883
|
* Always paired with a ListTypeDef.
|
|
765
884
|
*/
|
|
766
|
-
|
|
885
|
+
ListKind = "LIST_KIND",
|
|
767
886
|
/**
|
|
768
887
|
* A named type defined in the GraphQL schema, with fields and functions.
|
|
769
888
|
*
|
|
770
889
|
* Always paired with an ObjectTypeDef.
|
|
771
890
|
*/
|
|
772
|
-
|
|
891
|
+
ObjectKind = "OBJECT_KIND",
|
|
773
892
|
/**
|
|
774
|
-
* A string value
|
|
893
|
+
* A string value.
|
|
775
894
|
*/
|
|
776
|
-
|
|
895
|
+
StringKind = "STRING_KIND",
|
|
777
896
|
/**
|
|
778
897
|
* A special kind used to signify that no value is returned.
|
|
779
898
|
*
|
|
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.
|
|
899
|
+
* 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
900
|
*/
|
|
784
|
-
|
|
901
|
+
VoidKind = "VOID_KIND"
|
|
785
902
|
}
|
|
786
903
|
/**
|
|
787
|
-
* The
|
|
904
|
+
* The absence of a value.
|
|
788
905
|
*
|
|
789
906
|
* A Null Void is used as a placeholder for resolvers that do not return anything.
|
|
790
907
|
*/
|
|
@@ -809,10 +926,13 @@ export declare class CacheVolume extends BaseClient {
|
|
|
809
926
|
queryTree?: QueryTree[];
|
|
810
927
|
ctx: Context;
|
|
811
928
|
}, _id?: CacheVolumeID);
|
|
929
|
+
/**
|
|
930
|
+
* A unique identifier for this CacheVolume.
|
|
931
|
+
*/
|
|
812
932
|
id: () => Promise<CacheVolumeID>;
|
|
813
933
|
}
|
|
814
934
|
/**
|
|
815
|
-
* An OCI-compatible container, also known as a
|
|
935
|
+
* An OCI-compatible container, also known as a Docker container.
|
|
816
936
|
*/
|
|
817
937
|
export declare class Container extends BaseClient {
|
|
818
938
|
private readonly _id?;
|
|
@@ -822,7 +942,6 @@ export declare class Container extends BaseClient {
|
|
|
822
942
|
private readonly _label?;
|
|
823
943
|
private readonly _platform?;
|
|
824
944
|
private readonly _publish?;
|
|
825
|
-
private readonly _shellEndpoint?;
|
|
826
945
|
private readonly _stderr?;
|
|
827
946
|
private readonly _stdout?;
|
|
828
947
|
private readonly _sync?;
|
|
@@ -834,9 +953,9 @@ export declare class Container extends BaseClient {
|
|
|
834
953
|
constructor(parent?: {
|
|
835
954
|
queryTree?: QueryTree[];
|
|
836
955
|
ctx: Context;
|
|
837
|
-
}, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string,
|
|
956
|
+
}, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _user?: string, _workdir?: string);
|
|
838
957
|
/**
|
|
839
|
-
* A unique identifier for this
|
|
958
|
+
* A unique identifier for this Container.
|
|
840
959
|
*/
|
|
841
960
|
id: () => Promise<ContainerID>;
|
|
842
961
|
/**
|
|
@@ -848,32 +967,27 @@ export declare class Container extends BaseClient {
|
|
|
848
967
|
/**
|
|
849
968
|
* Returns a File representing the container serialized to a tarball.
|
|
850
969
|
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
851
|
-
*
|
|
970
|
+
*
|
|
971
|
+
* Used for multi-platform images.
|
|
852
972
|
* @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.
|
|
973
|
+
*
|
|
974
|
+
* 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.
|
|
975
|
+
* @param opts.mediaTypes Use the specified media types for the image's layers.
|
|
976
|
+
*
|
|
977
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
860
978
|
*/
|
|
861
979
|
asTarball: (opts?: ContainerAsTarballOpts) => File;
|
|
862
980
|
/**
|
|
863
981
|
* Initializes this container from a Dockerfile build.
|
|
864
982
|
* @param context Directory context used by the Dockerfile.
|
|
865
983
|
* @param opts.dockerfile Path to the Dockerfile to use.
|
|
866
|
-
*
|
|
867
|
-
* Default: './Dockerfile'.
|
|
868
|
-
* @param opts.buildArgs Additional build arguments.
|
|
869
984
|
* @param opts.target Target build stage to build.
|
|
985
|
+
* @param opts.buildArgs Additional build arguments.
|
|
870
986
|
* @param opts.secrets Secrets to pass to the build.
|
|
871
987
|
*
|
|
872
988
|
* They will be mounted at /run/secrets/[secret-name] in the build container
|
|
873
989
|
*
|
|
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)"
|
|
990
|
+
* 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
991
|
*/
|
|
878
992
|
build: (context: Directory, opts?: ContainerBuildOpts) => Container;
|
|
879
993
|
/**
|
|
@@ -903,41 +1017,44 @@ export declare class Container extends BaseClient {
|
|
|
903
1017
|
/**
|
|
904
1018
|
* EXPERIMENTAL API! Subject to change/removal at any time.
|
|
905
1019
|
*
|
|
906
|
-
*
|
|
1020
|
+
* Configures all available GPUs on the host to be accessible to this container.
|
|
1021
|
+
*
|
|
907
1022
|
* This currently works for Nvidia devices only.
|
|
908
1023
|
*/
|
|
909
1024
|
experimentalWithAllGPUs: () => Container;
|
|
910
1025
|
/**
|
|
911
1026
|
* EXPERIMENTAL API! Subject to change/removal at any time.
|
|
912
1027
|
*
|
|
913
|
-
*
|
|
1028
|
+
* Configures the provided list of devices to be accesible to this container.
|
|
1029
|
+
*
|
|
914
1030
|
* This currently works for Nvidia devices only.
|
|
1031
|
+
* @param devices List of devices to be accessible to this container.
|
|
915
1032
|
*/
|
|
916
1033
|
experimentalWithGPU: (devices: string[]) => Container;
|
|
917
1034
|
/**
|
|
918
|
-
* Writes the container as an OCI tarball to the destination file path on the host
|
|
1035
|
+
* Writes the container as an OCI tarball to the destination file path on the host.
|
|
919
1036
|
*
|
|
920
1037
|
* Return true on success.
|
|
921
|
-
*
|
|
1038
|
+
*
|
|
1039
|
+
* It can also export platform variants.
|
|
922
1040
|
* @param path Host's destination path (e.g., "./tarball").
|
|
1041
|
+
*
|
|
923
1042
|
* Path can be relative to the engine's workdir or absolute.
|
|
924
1043
|
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
1044
|
+
*
|
|
925
1045
|
* Used for multi-platform image.
|
|
926
1046
|
* @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.
|
|
1047
|
+
*
|
|
1048
|
+
* 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.
|
|
1049
|
+
* @param opts.mediaTypes Use the specified media types for the exported image's layers.
|
|
1050
|
+
*
|
|
1051
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
934
1052
|
*/
|
|
935
1053
|
export: (path: string, opts?: ContainerExportOpts) => Promise<boolean>;
|
|
936
1054
|
/**
|
|
937
1055
|
* Retrieves the list of exposed ports.
|
|
938
1056
|
*
|
|
939
|
-
* This includes ports already exposed by the image, even if not
|
|
940
|
-
* explicitly added with dagger.
|
|
1057
|
+
* This includes ports already exposed by the image, even if not explicitly added with dagger.
|
|
941
1058
|
*/
|
|
942
1059
|
exposedPorts: () => Promise<Port[]>;
|
|
943
1060
|
/**
|
|
@@ -960,16 +1077,13 @@ export declare class Container extends BaseClient {
|
|
|
960
1077
|
imageRef: () => Promise<string>;
|
|
961
1078
|
/**
|
|
962
1079
|
* 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
1080
|
* @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.
|
|
1081
|
+
* @param opts.tag Identifies the tag to import from the archive, if the archive bundles multiple tags.
|
|
969
1082
|
*/
|
|
970
1083
|
import_: (source: File, opts?: ContainerImportOpts) => Container;
|
|
971
1084
|
/**
|
|
972
1085
|
* Retrieves the value of the specified label.
|
|
1086
|
+
* @param name The name of the label (e.g., "org.opencontainers.artifact.created").
|
|
973
1087
|
*/
|
|
974
1088
|
label: (name: string) => Promise<string>;
|
|
975
1089
|
/**
|
|
@@ -981,10 +1095,10 @@ export declare class Container extends BaseClient {
|
|
|
981
1095
|
*/
|
|
982
1096
|
mounts: () => Promise<string[]>;
|
|
983
1097
|
/**
|
|
984
|
-
* Creates a named sub-pipeline
|
|
985
|
-
* @param name
|
|
986
|
-
* @param opts.description
|
|
987
|
-
* @param opts.labels
|
|
1098
|
+
* Creates a named sub-pipeline.
|
|
1099
|
+
* @param name Name of the sub-pipeline.
|
|
1100
|
+
* @param opts.description Description of the sub-pipeline.
|
|
1101
|
+
* @param opts.labels Labels to apply to the sub-pipeline.
|
|
988
1102
|
*/
|
|
989
1103
|
pipeline: (name: string, opts?: ContainerPipelineOpts) => Container;
|
|
990
1104
|
/**
|
|
@@ -995,20 +1109,20 @@ export declare class Container extends BaseClient {
|
|
|
995
1109
|
* Publishes this container as a new image to the specified address.
|
|
996
1110
|
*
|
|
997
1111
|
* Publish returns a fully qualified ref.
|
|
1112
|
+
*
|
|
998
1113
|
* It can also publish platform variants.
|
|
999
1114
|
* @param address Registry's address to publish the image to.
|
|
1000
1115
|
*
|
|
1001
1116
|
* Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
|
|
1002
1117
|
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
1118
|
+
*
|
|
1003
1119
|
* Used for multi-platform image.
|
|
1004
1120
|
* @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.
|
|
1121
|
+
*
|
|
1122
|
+
* 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.
|
|
1123
|
+
* @param opts.mediaTypes Use the specified media types for the published image's layers.
|
|
1124
|
+
*
|
|
1125
|
+
* Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
|
|
1012
1126
|
*/
|
|
1013
1127
|
publish: (address: string, opts?: ContainerPublishOpts) => Promise<string>;
|
|
1014
1128
|
/**
|
|
@@ -1016,12 +1130,10 @@ export declare class Container extends BaseClient {
|
|
|
1016
1130
|
*/
|
|
1017
1131
|
rootfs: () => Directory;
|
|
1018
1132
|
/**
|
|
1019
|
-
* Return
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
* Primarily intended for internal use with the dagger CLI.
|
|
1133
|
+
* Return an interactive terminal for this container using its configured shell if not overridden by args (or sh as a fallback default).
|
|
1134
|
+
* @param opts.args If set, override the container's default shell and invoke these arguments instead.
|
|
1023
1135
|
*/
|
|
1024
|
-
|
|
1136
|
+
shell: (opts?: ContainerShellOpts) => Terminal;
|
|
1025
1137
|
/**
|
|
1026
1138
|
* The error stream of the last executed command.
|
|
1027
1139
|
*
|
|
@@ -1049,12 +1161,17 @@ export declare class Container extends BaseClient {
|
|
|
1049
1161
|
* @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
|
|
1050
1162
|
*/
|
|
1051
1163
|
withDefaultArgs: (args: string[]) => Container;
|
|
1164
|
+
/**
|
|
1165
|
+
* Set the default command to invoke for the "shell" API.
|
|
1166
|
+
* @param args The args of the command to set the default shell to.
|
|
1167
|
+
*/
|
|
1168
|
+
withDefaultShell: (args: string[]) => Container;
|
|
1052
1169
|
/**
|
|
1053
1170
|
* Retrieves this container plus a directory written at the given path.
|
|
1054
1171
|
* @param path Location of the written directory (e.g., "/tmp/directory").
|
|
1055
1172
|
* @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
|
|
1173
|
+
* @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
|
|
1174
|
+
* @param opts.include Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
|
|
1058
1175
|
* @param opts.owner A user:group to set for the directory and its contents.
|
|
1059
1176
|
*
|
|
1060
1177
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
@@ -1072,8 +1189,7 @@ export declare class Container extends BaseClient {
|
|
|
1072
1189
|
* Retrieves this container plus the given environment variable.
|
|
1073
1190
|
* @param name The name of the environment variable (e.g., "HOST").
|
|
1074
1191
|
* @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").
|
|
1192
|
+
* @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
1193
|
*/
|
|
1078
1194
|
withEnvVariable: (name: string, value: string, opts?: ContainerWithEnvVariableOpts) => Container;
|
|
1079
1195
|
/**
|
|
@@ -1087,12 +1203,8 @@ export declare class Container extends BaseClient {
|
|
|
1087
1203
|
* @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
|
1088
1204
|
* @param opts.experimentalPrivilegedNesting Provides dagger access to the executed command.
|
|
1089
1205
|
*
|
|
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.
|
|
1206
|
+
* 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.
|
|
1207
|
+
* @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
1208
|
*/
|
|
1097
1209
|
withExec: (args: string[], opts?: ContainerWithExecOpts) => Container;
|
|
1098
1210
|
/**
|
|
@@ -1101,10 +1213,12 @@ export declare class Container extends BaseClient {
|
|
|
1101
1213
|
* Exposed ports serve two purposes:
|
|
1102
1214
|
*
|
|
1103
1215
|
* - For health checks and introspection, when running services
|
|
1216
|
+
*
|
|
1104
1217
|
* - For setting the EXPOSE OCI field when publishing the container
|
|
1105
1218
|
* @param port Port number to expose
|
|
1106
1219
|
* @param opts.protocol Transport layer network protocol
|
|
1107
1220
|
* @param opts.description Optional port description
|
|
1221
|
+
* @param opts.experimentalSkipHealthcheck Skip the health check when run as a service.
|
|
1108
1222
|
*/
|
|
1109
1223
|
withExposedPort: (port: number, opts?: ContainerWithExposedPortOpts) => Container;
|
|
1110
1224
|
/**
|
|
@@ -1112,8 +1226,6 @@ export declare class Container extends BaseClient {
|
|
|
1112
1226
|
* @param path Location of the copied file (e.g., "/tmp/file.txt").
|
|
1113
1227
|
* @param source Identifier of the file to copy.
|
|
1114
1228
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1115
|
-
*
|
|
1116
|
-
* Default: 0644.
|
|
1117
1229
|
* @param opts.owner A user:group to set for the file.
|
|
1118
1230
|
*
|
|
1119
1231
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
@@ -1122,8 +1234,7 @@ export declare class Container extends BaseClient {
|
|
|
1122
1234
|
*/
|
|
1123
1235
|
withFile: (path: string, source: File, opts?: ContainerWithFileOpts) => Container;
|
|
1124
1236
|
/**
|
|
1125
|
-
* Indicate that subsequent operations should be featured more prominently in
|
|
1126
|
-
* the UI.
|
|
1237
|
+
* Indicate that subsequent operations should be featured more prominently in the UI.
|
|
1127
1238
|
*/
|
|
1128
1239
|
withFocus: () => Container;
|
|
1129
1240
|
/**
|
|
@@ -1140,9 +1251,7 @@ export declare class Container extends BaseClient {
|
|
|
1140
1251
|
* @param opts.sharing Sharing mode of the cache volume.
|
|
1141
1252
|
* @param opts.owner A user:group to set for the mounted cache directory.
|
|
1142
1253
|
*
|
|
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.
|
|
1254
|
+
* 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
1255
|
*
|
|
1147
1256
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1148
1257
|
*
|
|
@@ -1181,9 +1290,8 @@ export declare class Container extends BaseClient {
|
|
|
1181
1290
|
*
|
|
1182
1291
|
* If the group is omitted, it defaults to the same as the user.
|
|
1183
1292
|
* @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
1293
|
*
|
|
1186
|
-
*
|
|
1294
|
+
* This option requires an owner to be set to be active.
|
|
1187
1295
|
*/
|
|
1188
1296
|
withMountedSecret: (path: string, source: Secret, opts?: ContainerWithMountedSecretOpts) => Container;
|
|
1189
1297
|
/**
|
|
@@ -1196,8 +1304,6 @@ export declare class Container extends BaseClient {
|
|
|
1196
1304
|
* @param path Location of the written file (e.g., "/tmp/file.txt").
|
|
1197
1305
|
* @param opts.contents Content of the file to write (e.g., "Hello world!").
|
|
1198
1306
|
* @param opts.permissions Permission given to the written file (e.g., 0600).
|
|
1199
|
-
*
|
|
1200
|
-
* Default: 0644.
|
|
1201
1307
|
* @param opts.owner A user:group to set for the file.
|
|
1202
1308
|
*
|
|
1203
1309
|
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
@@ -1208,13 +1314,15 @@ export declare class Container extends BaseClient {
|
|
|
1208
1314
|
/**
|
|
1209
1315
|
* Retrieves this container with a registry authentication for a given address.
|
|
1210
1316
|
* @param address Registry's address to bind the authentication to.
|
|
1317
|
+
*
|
|
1211
1318
|
* Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
|
1212
1319
|
* @param username The username of the registry's account (e.g., "Dagger").
|
|
1213
1320
|
* @param secret The API key, password or token to authenticate to this registry.
|
|
1214
1321
|
*/
|
|
1215
1322
|
withRegistryAuth: (address: string, username: string, secret: Secret) => Container;
|
|
1216
1323
|
/**
|
|
1217
|
-
*
|
|
1324
|
+
* Retrieves the container with the given directory mounted to /.
|
|
1325
|
+
* @param directory Directory to mount.
|
|
1218
1326
|
*/
|
|
1219
1327
|
withRootfs: (directory: Directory) => Container;
|
|
1220
1328
|
/**
|
|
@@ -1226,8 +1334,7 @@ export declare class Container extends BaseClient {
|
|
|
1226
1334
|
/**
|
|
1227
1335
|
* Establish a runtime dependency on a service.
|
|
1228
1336
|
*
|
|
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.
|
|
1337
|
+
* 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
1338
|
*
|
|
1232
1339
|
* The service will be reachable from the container via the provided hostname alias.
|
|
1233
1340
|
*
|
|
@@ -1278,8 +1385,7 @@ export declare class Container extends BaseClient {
|
|
|
1278
1385
|
*/
|
|
1279
1386
|
withoutExposedPort: (port: number, opts?: ContainerWithoutExposedPortOpts) => Container;
|
|
1280
1387
|
/**
|
|
1281
|
-
* Indicate that subsequent operations should not be featured more prominently
|
|
1282
|
-
* in the UI.
|
|
1388
|
+
* Indicate that subsequent operations should not be featured more prominently in the UI.
|
|
1283
1389
|
*
|
|
1284
1390
|
* This is the initial state of all containers.
|
|
1285
1391
|
*/
|
|
@@ -1297,6 +1403,7 @@ export declare class Container extends BaseClient {
|
|
|
1297
1403
|
/**
|
|
1298
1404
|
* Retrieves this container without the registry authentication of a given address.
|
|
1299
1405
|
* @param address Registry's address to remove the authentication from.
|
|
1406
|
+
*
|
|
1300
1407
|
* Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
|
1301
1408
|
*/
|
|
1302
1409
|
withoutRegistryAuth: (address: string) => Container;
|
|
@@ -1328,6 +1435,44 @@ export declare class Container extends BaseClient {
|
|
|
1328
1435
|
*/
|
|
1329
1436
|
with: (arg: (param: Container) => Container) => Container;
|
|
1330
1437
|
}
|
|
1438
|
+
/**
|
|
1439
|
+
* Reflective module API provided to functions at runtime.
|
|
1440
|
+
*/
|
|
1441
|
+
export declare class CurrentModule extends BaseClient {
|
|
1442
|
+
private readonly _id?;
|
|
1443
|
+
private readonly _name?;
|
|
1444
|
+
/**
|
|
1445
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1446
|
+
*/
|
|
1447
|
+
constructor(parent?: {
|
|
1448
|
+
queryTree?: QueryTree[];
|
|
1449
|
+
ctx: Context;
|
|
1450
|
+
}, _id?: CurrentModuleID, _name?: string);
|
|
1451
|
+
/**
|
|
1452
|
+
* A unique identifier for this CurrentModule.
|
|
1453
|
+
*/
|
|
1454
|
+
id: () => Promise<CurrentModuleID>;
|
|
1455
|
+
/**
|
|
1456
|
+
* The name of the module being executed in
|
|
1457
|
+
*/
|
|
1458
|
+
name: () => Promise<string>;
|
|
1459
|
+
/**
|
|
1460
|
+
* The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
|
|
1461
|
+
*/
|
|
1462
|
+
source: () => Directory;
|
|
1463
|
+
/**
|
|
1464
|
+
* Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
|
|
1465
|
+
* @param path Location of the directory to access (e.g., ".").
|
|
1466
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
1467
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
1468
|
+
*/
|
|
1469
|
+
workdir: (path: string, opts?: CurrentModuleWorkdirOpts) => Directory;
|
|
1470
|
+
/**
|
|
1471
|
+
* Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.
|
|
1472
|
+
* @param path Location of the file to retrieve (e.g., "README.md").
|
|
1473
|
+
*/
|
|
1474
|
+
workdirFile: (path: string) => File;
|
|
1475
|
+
}
|
|
1331
1476
|
/**
|
|
1332
1477
|
* A directory.
|
|
1333
1478
|
*/
|
|
@@ -1343,21 +1488,16 @@ export declare class Directory extends BaseClient {
|
|
|
1343
1488
|
ctx: Context;
|
|
1344
1489
|
}, _id?: DirectoryID, _export?: boolean, _sync?: DirectoryID);
|
|
1345
1490
|
/**
|
|
1346
|
-
*
|
|
1491
|
+
* A unique identifier for this Directory.
|
|
1347
1492
|
*/
|
|
1348
1493
|
id: () => Promise<DirectoryID>;
|
|
1349
1494
|
/**
|
|
1350
1495
|
* 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.
|
|
1496
|
+
* @param opts.sourceSubpath An optional subpath of the directory which contains the module's source code.
|
|
1353
1497
|
*
|
|
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.
|
|
1498
|
+
* 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
1499
|
*
|
|
1359
|
-
* If not set, the module source code is loaded from the root of the
|
|
1360
|
-
* directory.
|
|
1500
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
1361
1501
|
*/
|
|
1362
1502
|
asModule: (opts?: DirectoryAsModuleOpts) => Module_;
|
|
1363
1503
|
/**
|
|
@@ -1372,12 +1512,10 @@ export declare class Directory extends BaseClient {
|
|
|
1372
1512
|
directory: (path: string) => Directory;
|
|
1373
1513
|
/**
|
|
1374
1514
|
* 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
1515
|
* @param opts.platform The platform to build.
|
|
1379
|
-
* @param opts.
|
|
1516
|
+
* @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
1380
1517
|
* @param opts.target Target build stage to build.
|
|
1518
|
+
* @param opts.buildArgs Build arguments to use in the build.
|
|
1381
1519
|
* @param opts.secrets Secrets to pass to the build.
|
|
1382
1520
|
*
|
|
1383
1521
|
* They will be mounted at /run/secrets/[secret-name].
|
|
@@ -1404,10 +1542,10 @@ export declare class Directory extends BaseClient {
|
|
|
1404
1542
|
*/
|
|
1405
1543
|
glob: (pattern: string) => Promise<string[]>;
|
|
1406
1544
|
/**
|
|
1407
|
-
* Creates a named sub-pipeline
|
|
1408
|
-
* @param name
|
|
1409
|
-
* @param opts.description
|
|
1410
|
-
* @param opts.labels
|
|
1545
|
+
* Creates a named sub-pipeline.
|
|
1546
|
+
* @param name Name of the sub-pipeline.
|
|
1547
|
+
* @param opts.description Description of the sub-pipeline.
|
|
1548
|
+
* @param opts.labels Labels to apply to the sub-pipeline.
|
|
1411
1549
|
*/
|
|
1412
1550
|
pipeline: (name: string, opts?: DirectoryPipelineOpts) => Directory;
|
|
1413
1551
|
/**
|
|
@@ -1427,16 +1565,12 @@ export declare class Directory extends BaseClient {
|
|
|
1427
1565
|
* @param path Location of the copied file (e.g., "/file.txt").
|
|
1428
1566
|
* @param source Identifier of the file to copy.
|
|
1429
1567
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1430
|
-
*
|
|
1431
|
-
* Default: 0644.
|
|
1432
1568
|
*/
|
|
1433
1569
|
withFile: (path: string, source: File, opts?: DirectoryWithFileOpts) => Directory;
|
|
1434
1570
|
/**
|
|
1435
1571
|
* Retrieves this directory plus a new directory created at the given path.
|
|
1436
1572
|
* @param path Location of the directory created (e.g., "/logs").
|
|
1437
1573
|
* @param opts.permissions Permission granted to the created directory (e.g., 0777).
|
|
1438
|
-
*
|
|
1439
|
-
* Default: 0755.
|
|
1440
1574
|
*/
|
|
1441
1575
|
withNewDirectory: (path: string, opts?: DirectoryWithNewDirectoryOpts) => Directory;
|
|
1442
1576
|
/**
|
|
@@ -1444,8 +1578,6 @@ export declare class Directory extends BaseClient {
|
|
|
1444
1578
|
* @param path Location of the written file (e.g., "/file.txt").
|
|
1445
1579
|
* @param contents Content of the written file (e.g., "Hello world!").
|
|
1446
1580
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1447
|
-
*
|
|
1448
|
-
* Default: 0644.
|
|
1449
1581
|
*/
|
|
1450
1582
|
withNewFile: (path: string, contents: string, opts?: DirectoryWithNewFileOpts) => Directory;
|
|
1451
1583
|
/**
|
|
@@ -1473,9 +1605,10 @@ export declare class Directory extends BaseClient {
|
|
|
1473
1605
|
with: (arg: (param: Directory) => Directory) => Directory;
|
|
1474
1606
|
}
|
|
1475
1607
|
/**
|
|
1476
|
-
*
|
|
1608
|
+
* An environment variable name and value.
|
|
1477
1609
|
*/
|
|
1478
1610
|
export declare class EnvVariable extends BaseClient {
|
|
1611
|
+
private readonly _id?;
|
|
1479
1612
|
private readonly _name?;
|
|
1480
1613
|
private readonly _value?;
|
|
1481
1614
|
/**
|
|
@@ -1484,22 +1617,21 @@ export declare class EnvVariable extends BaseClient {
|
|
|
1484
1617
|
constructor(parent?: {
|
|
1485
1618
|
queryTree?: QueryTree[];
|
|
1486
1619
|
ctx: Context;
|
|
1487
|
-
}, _name?: string, _value?: string);
|
|
1620
|
+
}, _id?: EnvVariableID, _name?: string, _value?: string);
|
|
1488
1621
|
/**
|
|
1489
|
-
*
|
|
1622
|
+
* A unique identifier for this EnvVariable.
|
|
1490
1623
|
*/
|
|
1624
|
+
id: () => Promise<EnvVariableID>;
|
|
1491
1625
|
name: () => Promise<string>;
|
|
1492
|
-
/**
|
|
1493
|
-
* The environment variable value.
|
|
1494
|
-
*/
|
|
1495
1626
|
value: () => Promise<string>;
|
|
1496
1627
|
}
|
|
1497
1628
|
/**
|
|
1498
1629
|
* 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).
|
|
1630
|
+
*
|
|
1631
|
+
* 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
1632
|
*/
|
|
1502
1633
|
export declare class FieldTypeDef extends BaseClient {
|
|
1634
|
+
private readonly _id?;
|
|
1503
1635
|
private readonly _description?;
|
|
1504
1636
|
private readonly _name?;
|
|
1505
1637
|
/**
|
|
@@ -1508,18 +1640,13 @@ export declare class FieldTypeDef extends BaseClient {
|
|
|
1508
1640
|
constructor(parent?: {
|
|
1509
1641
|
queryTree?: QueryTree[];
|
|
1510
1642
|
ctx: Context;
|
|
1511
|
-
}, _description?: string, _name?: string);
|
|
1643
|
+
}, _id?: FieldTypeDefID, _description?: string, _name?: string);
|
|
1512
1644
|
/**
|
|
1513
|
-
* A
|
|
1645
|
+
* A unique identifier for this FieldTypeDef.
|
|
1514
1646
|
*/
|
|
1647
|
+
id: () => Promise<FieldTypeDefID>;
|
|
1515
1648
|
description: () => Promise<string>;
|
|
1516
|
-
/**
|
|
1517
|
-
* The name of the field in the object
|
|
1518
|
-
*/
|
|
1519
1649
|
name: () => Promise<string>;
|
|
1520
|
-
/**
|
|
1521
|
-
* The type of the field
|
|
1522
|
-
*/
|
|
1523
1650
|
typeDef: () => TypeDef;
|
|
1524
1651
|
}
|
|
1525
1652
|
/**
|
|
@@ -1529,6 +1656,7 @@ export declare class File extends BaseClient {
|
|
|
1529
1656
|
private readonly _id?;
|
|
1530
1657
|
private readonly _contents?;
|
|
1531
1658
|
private readonly _export?;
|
|
1659
|
+
private readonly _name?;
|
|
1532
1660
|
private readonly _size?;
|
|
1533
1661
|
private readonly _sync?;
|
|
1534
1662
|
/**
|
|
@@ -1537,9 +1665,9 @@ export declare class File extends BaseClient {
|
|
|
1537
1665
|
constructor(parent?: {
|
|
1538
1666
|
queryTree?: QueryTree[];
|
|
1539
1667
|
ctx: Context;
|
|
1540
|
-
}, _id?: FileID, _contents?: string, _export?: boolean, _size?: number, _sync?: FileID);
|
|
1668
|
+
}, _id?: FileID, _contents?: string, _export?: boolean, _name?: string, _size?: number, _sync?: FileID);
|
|
1541
1669
|
/**
|
|
1542
|
-
*
|
|
1670
|
+
* A unique identifier for this File.
|
|
1543
1671
|
*/
|
|
1544
1672
|
id: () => Promise<FileID>;
|
|
1545
1673
|
/**
|
|
@@ -1549,12 +1677,15 @@ export declare class File extends BaseClient {
|
|
|
1549
1677
|
/**
|
|
1550
1678
|
* Writes the file to a file path on the host.
|
|
1551
1679
|
* @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.
|
|
1680
|
+
* @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
1681
|
*/
|
|
1555
1682
|
export: (path: string, opts?: FileExportOpts) => Promise<boolean>;
|
|
1556
1683
|
/**
|
|
1557
|
-
*
|
|
1684
|
+
* Retrieves the name of the file.
|
|
1685
|
+
*/
|
|
1686
|
+
name: () => Promise<string>;
|
|
1687
|
+
/**
|
|
1688
|
+
* Retrieves the size of the file, in bytes.
|
|
1558
1689
|
*/
|
|
1559
1690
|
size: () => Promise<number>;
|
|
1560
1691
|
/**
|
|
@@ -1578,8 +1709,7 @@ export declare class File extends BaseClient {
|
|
|
1578
1709
|
/**
|
|
1579
1710
|
* Function represents a resolver provided by a Module.
|
|
1580
1711
|
*
|
|
1581
|
-
* A function always evaluates against a parent object and is given a set of
|
|
1582
|
-
* named arguments.
|
|
1712
|
+
* A function always evaluates against a parent object and is given a set of named arguments.
|
|
1583
1713
|
*/
|
|
1584
1714
|
export declare class Function_ extends BaseClient {
|
|
1585
1715
|
private readonly _id?;
|
|
@@ -1593,24 +1723,12 @@ export declare class Function_ extends BaseClient {
|
|
|
1593
1723
|
ctx: Context;
|
|
1594
1724
|
}, _id?: FunctionID, _description?: string, _name?: string);
|
|
1595
1725
|
/**
|
|
1596
|
-
*
|
|
1726
|
+
* A unique identifier for this Function.
|
|
1597
1727
|
*/
|
|
1598
1728
|
id: () => Promise<FunctionID>;
|
|
1599
|
-
/**
|
|
1600
|
-
* Arguments accepted by this function, if any
|
|
1601
|
-
*/
|
|
1602
1729
|
args: () => Promise<FunctionArg[]>;
|
|
1603
|
-
/**
|
|
1604
|
-
* A doc string for the function, if any
|
|
1605
|
-
*/
|
|
1606
1730
|
description: () => Promise<string>;
|
|
1607
|
-
/**
|
|
1608
|
-
* The name of the function
|
|
1609
|
-
*/
|
|
1610
1731
|
name: () => Promise<string>;
|
|
1611
|
-
/**
|
|
1612
|
-
* The type returned by this function
|
|
1613
|
-
*/
|
|
1614
1732
|
returnType: () => TypeDef;
|
|
1615
1733
|
/**
|
|
1616
1734
|
* Returns the function with the provided argument
|
|
@@ -1621,7 +1739,8 @@ export declare class Function_ extends BaseClient {
|
|
|
1621
1739
|
*/
|
|
1622
1740
|
withArg: (name: string, typeDef: TypeDef, opts?: FunctionWithArgOpts) => Function_;
|
|
1623
1741
|
/**
|
|
1624
|
-
* Returns the function with the doc string
|
|
1742
|
+
* Returns the function with the given doc string.
|
|
1743
|
+
* @param description The doc string to set.
|
|
1625
1744
|
*/
|
|
1626
1745
|
withDescription: (description: string) => Function_;
|
|
1627
1746
|
/**
|
|
@@ -1634,8 +1753,7 @@ export declare class Function_ extends BaseClient {
|
|
|
1634
1753
|
/**
|
|
1635
1754
|
* An argument accepted by a function.
|
|
1636
1755
|
*
|
|
1637
|
-
* This is a specification for an argument at function definition time, not an
|
|
1638
|
-
* argument passed at function call time.
|
|
1756
|
+
* This is a specification for an argument at function definition time, not an argument passed at function call time.
|
|
1639
1757
|
*/
|
|
1640
1758
|
export declare class FunctionArg extends BaseClient {
|
|
1641
1759
|
private readonly _id?;
|
|
@@ -1650,27 +1768,19 @@ export declare class FunctionArg extends BaseClient {
|
|
|
1650
1768
|
ctx: Context;
|
|
1651
1769
|
}, _id?: FunctionArgID, _defaultValue?: JSON, _description?: string, _name?: string);
|
|
1652
1770
|
/**
|
|
1653
|
-
*
|
|
1771
|
+
* A unique identifier for this FunctionArg.
|
|
1654
1772
|
*/
|
|
1655
1773
|
id: () => Promise<FunctionArgID>;
|
|
1656
|
-
/**
|
|
1657
|
-
* A default value to use for this argument when not explicitly set by the caller, if any
|
|
1658
|
-
*/
|
|
1659
1774
|
defaultValue: () => Promise<JSON>;
|
|
1660
|
-
/**
|
|
1661
|
-
* A doc string for the argument, if any
|
|
1662
|
-
*/
|
|
1663
1775
|
description: () => Promise<string>;
|
|
1664
|
-
/**
|
|
1665
|
-
* The name of the argument
|
|
1666
|
-
*/
|
|
1667
1776
|
name: () => Promise<string>;
|
|
1668
|
-
/**
|
|
1669
|
-
* The type of the argument
|
|
1670
|
-
*/
|
|
1671
1777
|
typeDef: () => TypeDef;
|
|
1672
1778
|
}
|
|
1779
|
+
/**
|
|
1780
|
+
* An active function call.
|
|
1781
|
+
*/
|
|
1673
1782
|
export declare class FunctionCall extends BaseClient {
|
|
1783
|
+
private readonly _id?;
|
|
1674
1784
|
private readonly _name?;
|
|
1675
1785
|
private readonly _parent?;
|
|
1676
1786
|
private readonly _parentName?;
|
|
@@ -1681,32 +1791,26 @@ export declare class FunctionCall extends BaseClient {
|
|
|
1681
1791
|
constructor(parent?: {
|
|
1682
1792
|
queryTree?: QueryTree[];
|
|
1683
1793
|
ctx: Context;
|
|
1684
|
-
}, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
|
|
1794
|
+
}, _id?: FunctionCallID, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
|
|
1685
1795
|
/**
|
|
1686
|
-
*
|
|
1796
|
+
* A unique identifier for this FunctionCall.
|
|
1687
1797
|
*/
|
|
1798
|
+
id: () => Promise<FunctionCallID>;
|
|
1688
1799
|
inputArgs: () => Promise<FunctionCallArgValue[]>;
|
|
1689
|
-
/**
|
|
1690
|
-
* The name of the function being called.
|
|
1691
|
-
*/
|
|
1692
1800
|
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
1801
|
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
1802
|
parentName: () => Promise<string>;
|
|
1703
1803
|
/**
|
|
1704
1804
|
* Set the return value of the function call to the provided value.
|
|
1705
|
-
*
|
|
1805
|
+
* @param value JSON serialization of the return value.
|
|
1706
1806
|
*/
|
|
1707
1807
|
returnValue: (value: JSON) => Promise<Void>;
|
|
1708
1808
|
}
|
|
1809
|
+
/**
|
|
1810
|
+
* A value passed as a named argument to a function call.
|
|
1811
|
+
*/
|
|
1709
1812
|
export declare class FunctionCallArgValue extends BaseClient {
|
|
1813
|
+
private readonly _id?;
|
|
1710
1814
|
private readonly _name?;
|
|
1711
1815
|
private readonly _value?;
|
|
1712
1816
|
/**
|
|
@@ -1715,16 +1819,17 @@ export declare class FunctionCallArgValue extends BaseClient {
|
|
|
1715
1819
|
constructor(parent?: {
|
|
1716
1820
|
queryTree?: QueryTree[];
|
|
1717
1821
|
ctx: Context;
|
|
1718
|
-
}, _name?: string, _value?: JSON);
|
|
1822
|
+
}, _id?: FunctionCallArgValueID, _name?: string, _value?: JSON);
|
|
1719
1823
|
/**
|
|
1720
|
-
*
|
|
1824
|
+
* A unique identifier for this FunctionCallArgValue.
|
|
1721
1825
|
*/
|
|
1826
|
+
id: () => Promise<FunctionCallArgValueID>;
|
|
1722
1827
|
name: () => Promise<string>;
|
|
1723
|
-
/**
|
|
1724
|
-
* The value of the argument represented as a string of the JSON serialization.
|
|
1725
|
-
*/
|
|
1726
1828
|
value: () => Promise<JSON>;
|
|
1727
1829
|
}
|
|
1830
|
+
/**
|
|
1831
|
+
* The result of running an SDK's codegen.
|
|
1832
|
+
*/
|
|
1728
1833
|
export declare class GeneratedCode extends BaseClient {
|
|
1729
1834
|
private readonly _id?;
|
|
1730
1835
|
/**
|
|
@@ -1734,25 +1839,19 @@ export declare class GeneratedCode extends BaseClient {
|
|
|
1734
1839
|
queryTree?: QueryTree[];
|
|
1735
1840
|
ctx: Context;
|
|
1736
1841
|
}, _id?: GeneratedCodeID);
|
|
1737
|
-
id: () => Promise<GeneratedCodeID>;
|
|
1738
1842
|
/**
|
|
1739
|
-
*
|
|
1843
|
+
* A unique identifier for this GeneratedCode.
|
|
1740
1844
|
*/
|
|
1845
|
+
id: () => Promise<GeneratedCodeID>;
|
|
1741
1846
|
code: () => Directory;
|
|
1742
|
-
/**
|
|
1743
|
-
* List of paths to mark generated in version control (i.e. .gitattributes)
|
|
1744
|
-
*/
|
|
1745
1847
|
vcsGeneratedPaths: () => Promise<string[]>;
|
|
1746
|
-
/**
|
|
1747
|
-
* List of paths to ignore in version control (i.e. .gitignore)
|
|
1748
|
-
*/
|
|
1749
1848
|
vcsIgnoredPaths: () => Promise<string[]>;
|
|
1750
1849
|
/**
|
|
1751
|
-
* Set the list of paths to mark generated in version control
|
|
1850
|
+
* Set the list of paths to mark generated in version control.
|
|
1752
1851
|
*/
|
|
1753
1852
|
withVCSGeneratedPaths: (paths: string[]) => GeneratedCode;
|
|
1754
1853
|
/**
|
|
1755
|
-
* Set the list of paths to ignore in version control
|
|
1854
|
+
* Set the list of paths to ignore in version control.
|
|
1756
1855
|
*/
|
|
1757
1856
|
withVCSIgnoredPaths: (paths: string[]) => GeneratedCode;
|
|
1758
1857
|
/**
|
|
@@ -1763,7 +1862,40 @@ export declare class GeneratedCode extends BaseClient {
|
|
|
1763
1862
|
with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
|
|
1764
1863
|
}
|
|
1765
1864
|
/**
|
|
1766
|
-
*
|
|
1865
|
+
* Module source originating from a git repo.
|
|
1866
|
+
*/
|
|
1867
|
+
export declare class GitModuleSource extends BaseClient {
|
|
1868
|
+
private readonly _id?;
|
|
1869
|
+
private readonly _cloneURL?;
|
|
1870
|
+
private readonly _commit?;
|
|
1871
|
+
private readonly _htmlURL?;
|
|
1872
|
+
private readonly _sourceSubpath?;
|
|
1873
|
+
private readonly _version?;
|
|
1874
|
+
/**
|
|
1875
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1876
|
+
*/
|
|
1877
|
+
constructor(parent?: {
|
|
1878
|
+
queryTree?: QueryTree[];
|
|
1879
|
+
ctx: Context;
|
|
1880
|
+
}, _id?: GitModuleSourceID, _cloneURL?: string, _commit?: string, _htmlURL?: string, _sourceSubpath?: string, _version?: string);
|
|
1881
|
+
/**
|
|
1882
|
+
* A unique identifier for this GitModuleSource.
|
|
1883
|
+
*/
|
|
1884
|
+
id: () => Promise<GitModuleSourceID>;
|
|
1885
|
+
/**
|
|
1886
|
+
* The URL from which the source's git repo can be cloned.
|
|
1887
|
+
*/
|
|
1888
|
+
cloneURL: () => Promise<string>;
|
|
1889
|
+
commit: () => Promise<string>;
|
|
1890
|
+
/**
|
|
1891
|
+
* The URL to the source's git repo in a web browser
|
|
1892
|
+
*/
|
|
1893
|
+
htmlURL: () => Promise<string>;
|
|
1894
|
+
sourceSubpath: () => Promise<string>;
|
|
1895
|
+
version: () => Promise<string>;
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* A git ref (tag, branch, or commit).
|
|
1767
1899
|
*/
|
|
1768
1900
|
export declare class GitRef extends BaseClient {
|
|
1769
1901
|
private readonly _id?;
|
|
@@ -1776,7 +1908,7 @@ export declare class GitRef extends BaseClient {
|
|
|
1776
1908
|
ctx: Context;
|
|
1777
1909
|
}, _id?: GitRefID, _commit?: string);
|
|
1778
1910
|
/**
|
|
1779
|
-
*
|
|
1911
|
+
* A unique identifier for this GitRef.
|
|
1780
1912
|
*/
|
|
1781
1913
|
id: () => Promise<GitRefID>;
|
|
1782
1914
|
/**
|
|
@@ -1785,6 +1917,8 @@ export declare class GitRef extends BaseClient {
|
|
|
1785
1917
|
commit: () => Promise<string>;
|
|
1786
1918
|
/**
|
|
1787
1919
|
* The filesystem tree at this ref.
|
|
1920
|
+
* @param opts.sshKnownHosts DEPRECATED: This option should be passed to `git` instead.
|
|
1921
|
+
* @param opts.sshAuthSocket DEPRECATED: This option should be passed to `git` instead.
|
|
1788
1922
|
*/
|
|
1789
1923
|
tree: (opts?: GitRefTreeOpts) => Directory;
|
|
1790
1924
|
}
|
|
@@ -1801,36 +1935,41 @@ export declare class GitRepository extends BaseClient {
|
|
|
1801
1935
|
ctx: Context;
|
|
1802
1936
|
}, _id?: GitRepositoryID);
|
|
1803
1937
|
/**
|
|
1804
|
-
*
|
|
1938
|
+
* A unique identifier for this GitRepository.
|
|
1805
1939
|
*/
|
|
1806
1940
|
id: () => Promise<GitRepositoryID>;
|
|
1807
1941
|
/**
|
|
1808
|
-
* Returns details
|
|
1942
|
+
* Returns details of a branch.
|
|
1809
1943
|
* @param name Branch's name (e.g., "main").
|
|
1810
1944
|
*/
|
|
1811
1945
|
branch: (name: string) => GitRef;
|
|
1812
1946
|
/**
|
|
1813
|
-
* Returns details
|
|
1947
|
+
* Returns details of a commit.
|
|
1814
1948
|
* @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
|
|
1815
1949
|
*/
|
|
1816
1950
|
commit: (id: string) => GitRef;
|
|
1817
1951
|
/**
|
|
1818
|
-
* Returns details
|
|
1952
|
+
* Returns details of a tag.
|
|
1819
1953
|
* @param name Tag's name (e.g., "v0.3.9").
|
|
1820
1954
|
*/
|
|
1821
1955
|
tag: (name: string) => GitRef;
|
|
1822
1956
|
}
|
|
1823
1957
|
/**
|
|
1824
|
-
* Information about the host
|
|
1958
|
+
* Information about the host environment.
|
|
1825
1959
|
*/
|
|
1826
1960
|
export declare class Host extends BaseClient {
|
|
1961
|
+
private readonly _id?;
|
|
1827
1962
|
/**
|
|
1828
1963
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1829
1964
|
*/
|
|
1830
1965
|
constructor(parent?: {
|
|
1831
1966
|
queryTree?: QueryTree[];
|
|
1832
1967
|
ctx: Context;
|
|
1833
|
-
});
|
|
1968
|
+
}, _id?: HostID);
|
|
1969
|
+
/**
|
|
1970
|
+
* A unique identifier for this Host.
|
|
1971
|
+
*/
|
|
1972
|
+
id: () => Promise<HostID>;
|
|
1834
1973
|
/**
|
|
1835
1974
|
* Accesses a directory on the host.
|
|
1836
1975
|
* @param path Location of the directory to access (e.g., ".").
|
|
@@ -1845,17 +1984,17 @@ export declare class Host extends BaseClient {
|
|
|
1845
1984
|
file: (path: string) => File;
|
|
1846
1985
|
/**
|
|
1847
1986
|
* Creates a service that forwards traffic to a specified address via the host.
|
|
1848
|
-
* @param
|
|
1987
|
+
* @param opts.host Upstream host to forward traffic to.
|
|
1988
|
+
* @param opts.ports Ports to expose via the service, forwarding through the host network.
|
|
1849
1989
|
*
|
|
1850
|
-
* If a port's frontend is unspecified or 0, it defaults to the same as the
|
|
1851
|
-
* backend port.
|
|
1990
|
+
* If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
|
|
1852
1991
|
*
|
|
1853
1992
|
* An empty set of ports is not valid; an error will be returned.
|
|
1854
|
-
* @param opts.host Upstream host to forward traffic to.
|
|
1855
1993
|
*/
|
|
1856
|
-
service: (
|
|
1994
|
+
service: (opts?: HostServiceOpts) => Service;
|
|
1857
1995
|
/**
|
|
1858
1996
|
* Sets a secret given a user-defined name and the file path on the host, and returns the secret.
|
|
1997
|
+
*
|
|
1859
1998
|
* The file is limited to a size of 512000 bytes.
|
|
1860
1999
|
* @param name The user defined name for this secret.
|
|
1861
2000
|
* @param path Location of the file to set as a secret.
|
|
@@ -1864,20 +2003,16 @@ export declare class Host extends BaseClient {
|
|
|
1864
2003
|
/**
|
|
1865
2004
|
* Creates a tunnel that forwards traffic from the host to a service.
|
|
1866
2005
|
* @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
2006
|
* @param opts.ports Configure explicit port forwarding rules for the tunnel.
|
|
1872
2007
|
*
|
|
1873
|
-
* If a port's frontend is unspecified or 0, a random port will be chosen by
|
|
1874
|
-
* the host.
|
|
2008
|
+
* If a port's frontend is unspecified or 0, a random port will be chosen by the host.
|
|
1875
2009
|
*
|
|
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.
|
|
2010
|
+
* 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
2011
|
*
|
|
1880
2012
|
* If ports are given and native is true, the ports are additive.
|
|
2013
|
+
* @param opts.native Map each service port to the same port on the host, as if the service were running natively.
|
|
2014
|
+
*
|
|
2015
|
+
* Note: enabling may result in port conflicts.
|
|
1881
2016
|
*/
|
|
1882
2017
|
tunnel: (service: Service, opts?: HostTunnelOpts) => Service;
|
|
1883
2018
|
/**
|
|
@@ -1886,10 +2021,34 @@ export declare class Host extends BaseClient {
|
|
|
1886
2021
|
*/
|
|
1887
2022
|
unixSocket: (path: string) => Socket;
|
|
1888
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* A graphql input type, which is essentially just a group of named args.
|
|
2026
|
+
* This is currently only used to represent pre-existing usage of graphql input types
|
|
2027
|
+
* in the core API. It is not used by user modules and shouldn't ever be as user
|
|
2028
|
+
* module accept input objects via their id rather than graphql input types.
|
|
2029
|
+
*/
|
|
2030
|
+
export declare class InputTypeDef extends BaseClient {
|
|
2031
|
+
private readonly _id?;
|
|
2032
|
+
private readonly _name?;
|
|
2033
|
+
/**
|
|
2034
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2035
|
+
*/
|
|
2036
|
+
constructor(parent?: {
|
|
2037
|
+
queryTree?: QueryTree[];
|
|
2038
|
+
ctx: Context;
|
|
2039
|
+
}, _id?: InputTypeDefID, _name?: string);
|
|
2040
|
+
/**
|
|
2041
|
+
* A unique identifier for this InputTypeDef.
|
|
2042
|
+
*/
|
|
2043
|
+
id: () => Promise<InputTypeDefID>;
|
|
2044
|
+
fields: () => Promise<FieldTypeDef[]>;
|
|
2045
|
+
name: () => Promise<string>;
|
|
2046
|
+
}
|
|
1889
2047
|
/**
|
|
1890
2048
|
* A definition of a custom interface defined in a Module.
|
|
1891
2049
|
*/
|
|
1892
2050
|
export declare class InterfaceTypeDef extends BaseClient {
|
|
2051
|
+
private readonly _id?;
|
|
1893
2052
|
private readonly _description?;
|
|
1894
2053
|
private readonly _name?;
|
|
1895
2054
|
private readonly _sourceModuleName?;
|
|
@@ -1899,28 +2058,21 @@ export declare class InterfaceTypeDef extends BaseClient {
|
|
|
1899
2058
|
constructor(parent?: {
|
|
1900
2059
|
queryTree?: QueryTree[];
|
|
1901
2060
|
ctx: Context;
|
|
1902
|
-
}, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2061
|
+
}, _id?: InterfaceTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
1903
2062
|
/**
|
|
1904
|
-
*
|
|
2063
|
+
* A unique identifier for this InterfaceTypeDef.
|
|
1905
2064
|
*/
|
|
2065
|
+
id: () => Promise<InterfaceTypeDefID>;
|
|
1906
2066
|
description: () => Promise<string>;
|
|
1907
|
-
/**
|
|
1908
|
-
* Functions defined on this interface, if any
|
|
1909
|
-
*/
|
|
1910
2067
|
functions: () => Promise<Function_[]>;
|
|
1911
|
-
/**
|
|
1912
|
-
* The name of the interface
|
|
1913
|
-
*/
|
|
1914
2068
|
name: () => Promise<string>;
|
|
1915
|
-
/**
|
|
1916
|
-
* If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
1917
|
-
*/
|
|
1918
2069
|
sourceModuleName: () => Promise<string>;
|
|
1919
2070
|
}
|
|
1920
2071
|
/**
|
|
1921
2072
|
* A simple key value object that represents a label.
|
|
1922
2073
|
*/
|
|
1923
2074
|
export declare class Label extends BaseClient {
|
|
2075
|
+
private readonly _id?;
|
|
1924
2076
|
private readonly _name?;
|
|
1925
2077
|
private readonly _value?;
|
|
1926
2078
|
/**
|
|
@@ -1929,104 +2081,127 @@ export declare class Label extends BaseClient {
|
|
|
1929
2081
|
constructor(parent?: {
|
|
1930
2082
|
queryTree?: QueryTree[];
|
|
1931
2083
|
ctx: Context;
|
|
1932
|
-
}, _name?: string, _value?: string);
|
|
2084
|
+
}, _id?: LabelID, _name?: string, _value?: string);
|
|
1933
2085
|
/**
|
|
1934
|
-
*
|
|
2086
|
+
* A unique identifier for this Label.
|
|
1935
2087
|
*/
|
|
2088
|
+
id: () => Promise<LabelID>;
|
|
1936
2089
|
name: () => Promise<string>;
|
|
1937
|
-
/**
|
|
1938
|
-
* The label value.
|
|
1939
|
-
*/
|
|
1940
2090
|
value: () => Promise<string>;
|
|
1941
2091
|
}
|
|
1942
2092
|
/**
|
|
1943
2093
|
* A definition of a list type in a Module.
|
|
1944
2094
|
*/
|
|
1945
2095
|
export declare class ListTypeDef extends BaseClient {
|
|
2096
|
+
private readonly _id?;
|
|
1946
2097
|
/**
|
|
1947
2098
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1948
2099
|
*/
|
|
1949
2100
|
constructor(parent?: {
|
|
1950
2101
|
queryTree?: QueryTree[];
|
|
1951
2102
|
ctx: Context;
|
|
1952
|
-
});
|
|
2103
|
+
}, _id?: ListTypeDefID);
|
|
1953
2104
|
/**
|
|
1954
|
-
*
|
|
2105
|
+
* A unique identifier for this ListTypeDef.
|
|
1955
2106
|
*/
|
|
2107
|
+
id: () => Promise<ListTypeDefID>;
|
|
1956
2108
|
elementTypeDef: () => TypeDef;
|
|
1957
2109
|
}
|
|
2110
|
+
/**
|
|
2111
|
+
* Module source that that originates from a path locally relative to an arbitrary directory.
|
|
2112
|
+
*/
|
|
2113
|
+
export declare class LocalModuleSource extends BaseClient {
|
|
2114
|
+
private readonly _id?;
|
|
2115
|
+
private readonly _sourceSubpath?;
|
|
2116
|
+
/**
|
|
2117
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2118
|
+
*/
|
|
2119
|
+
constructor(parent?: {
|
|
2120
|
+
queryTree?: QueryTree[];
|
|
2121
|
+
ctx: Context;
|
|
2122
|
+
}, _id?: LocalModuleSourceID, _sourceSubpath?: string);
|
|
2123
|
+
/**
|
|
2124
|
+
* A unique identifier for this LocalModuleSource.
|
|
2125
|
+
*/
|
|
2126
|
+
id: () => Promise<LocalModuleSourceID>;
|
|
2127
|
+
sourceSubpath: () => Promise<string>;
|
|
2128
|
+
}
|
|
2129
|
+
/**
|
|
2130
|
+
* A Dagger module.
|
|
2131
|
+
*/
|
|
1958
2132
|
export declare class Module_ extends BaseClient {
|
|
1959
2133
|
private readonly _id?;
|
|
1960
2134
|
private readonly _description?;
|
|
1961
2135
|
private readonly _name?;
|
|
1962
2136
|
private readonly _sdk?;
|
|
1963
2137
|
private readonly _serve?;
|
|
1964
|
-
private readonly _sourceDirectorySubPath?;
|
|
1965
2138
|
/**
|
|
1966
2139
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1967
2140
|
*/
|
|
1968
2141
|
constructor(parent?: {
|
|
1969
2142
|
queryTree?: QueryTree[];
|
|
1970
2143
|
ctx: Context;
|
|
1971
|
-
}, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void
|
|
2144
|
+
}, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void);
|
|
1972
2145
|
/**
|
|
1973
|
-
*
|
|
2146
|
+
* A unique identifier for this Module.
|
|
1974
2147
|
*/
|
|
1975
2148
|
id: () => Promise<ModuleID>;
|
|
1976
|
-
/**
|
|
1977
|
-
* Modules used by this module
|
|
1978
|
-
*/
|
|
1979
2149
|
dependencies: () => Promise<Module_[]>;
|
|
1980
|
-
|
|
1981
|
-
* The dependencies as configured by the module
|
|
1982
|
-
*/
|
|
1983
|
-
dependencyConfig: () => Promise<string[]>;
|
|
1984
|
-
/**
|
|
1985
|
-
* The doc string of the module, if any
|
|
1986
|
-
*/
|
|
2150
|
+
dependencyConfig: () => Promise<ModuleDependency[]>;
|
|
1987
2151
|
description: () => Promise<string>;
|
|
1988
2152
|
/**
|
|
1989
|
-
* The
|
|
2153
|
+
* The module's root directory containing the config file for it and its source (possibly as a subdir). It includes any generated code or updated config files created after initial load, but not any files/directories that were unchanged after sdk codegen was run.
|
|
1990
2154
|
*/
|
|
1991
|
-
|
|
2155
|
+
generatedSourceRootDirectory: () => Directory;
|
|
1992
2156
|
/**
|
|
1993
|
-
*
|
|
2157
|
+
* Retrieves the module with the objects loaded via its SDK.
|
|
1994
2158
|
*/
|
|
2159
|
+
initialize: () => Module_;
|
|
1995
2160
|
interfaces: () => Promise<TypeDef[]>;
|
|
1996
|
-
/**
|
|
1997
|
-
* The name of the module
|
|
1998
|
-
*/
|
|
1999
2161
|
name: () => Promise<string>;
|
|
2000
|
-
/**
|
|
2001
|
-
* Objects served by this module
|
|
2002
|
-
*/
|
|
2003
2162
|
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
|
-
*/
|
|
2163
|
+
runtime: () => Container;
|
|
2007
2164
|
sdk: () => Promise<string>;
|
|
2008
2165
|
/**
|
|
2009
2166
|
* Serve a module's API in the current session.
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
2167
|
+
*
|
|
2168
|
+
* 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
2169
|
*/
|
|
2013
2170
|
serve: () => Promise<Void>;
|
|
2171
|
+
source: () => ModuleSource;
|
|
2014
2172
|
/**
|
|
2015
|
-
*
|
|
2173
|
+
* Update the module configuration to use the given dependencies.
|
|
2174
|
+
* @param dependencies The dependency modules to install.
|
|
2016
2175
|
*/
|
|
2017
|
-
|
|
2176
|
+
withDependencies: (dependencies: ModuleDependency[]) => Module_;
|
|
2018
2177
|
/**
|
|
2019
|
-
*
|
|
2178
|
+
* Retrieves the module with the given description
|
|
2179
|
+
* @param description The description to set
|
|
2020
2180
|
*/
|
|
2021
|
-
|
|
2181
|
+
withDescription: (description: string) => Module_;
|
|
2022
2182
|
/**
|
|
2023
2183
|
* This module plus the given Interface type and associated functions
|
|
2024
2184
|
*/
|
|
2025
2185
|
withInterface: (iface: TypeDef) => Module_;
|
|
2026
2186
|
/**
|
|
2027
|
-
*
|
|
2187
|
+
* Update the module configuration to use the given name.
|
|
2188
|
+
* @param name The name to use.
|
|
2189
|
+
*/
|
|
2190
|
+
withName: (name: string) => Module_;
|
|
2191
|
+
/**
|
|
2192
|
+
* This module plus the given Object type and associated functions.
|
|
2028
2193
|
*/
|
|
2029
2194
|
withObject: (object: TypeDef) => Module_;
|
|
2195
|
+
/**
|
|
2196
|
+
* Update the module configuration to use the given SDK.
|
|
2197
|
+
* @param sdk The SDK to use.
|
|
2198
|
+
*/
|
|
2199
|
+
withSDK: (sdk: string) => Module_;
|
|
2200
|
+
/**
|
|
2201
|
+
* Retrieves the module with basic configuration loaded if present.
|
|
2202
|
+
* @param source The module source to initialize from.
|
|
2203
|
+
*/
|
|
2204
|
+
withSource: (source: ModuleSource) => Module_;
|
|
2030
2205
|
/**
|
|
2031
2206
|
* Call the provided function with current Module.
|
|
2032
2207
|
*
|
|
@@ -2035,48 +2210,87 @@ export declare class Module_ extends BaseClient {
|
|
|
2035
2210
|
with: (arg: (param: Module_) => Module_) => Module_;
|
|
2036
2211
|
}
|
|
2037
2212
|
/**
|
|
2038
|
-
*
|
|
2213
|
+
* The configuration of dependency of a module.
|
|
2039
2214
|
*/
|
|
2040
|
-
export declare class
|
|
2215
|
+
export declare class ModuleDependency extends BaseClient {
|
|
2216
|
+
private readonly _id?;
|
|
2041
2217
|
private readonly _name?;
|
|
2042
|
-
private readonly _root?;
|
|
2043
|
-
private readonly _sdk?;
|
|
2044
2218
|
/**
|
|
2045
2219
|
* Constructor is used for internal usage only, do not create object from it.
|
|
2046
2220
|
*/
|
|
2047
2221
|
constructor(parent?: {
|
|
2048
2222
|
queryTree?: QueryTree[];
|
|
2049
2223
|
ctx: Context;
|
|
2050
|
-
},
|
|
2224
|
+
}, _id?: ModuleDependencyID, _name?: string);
|
|
2051
2225
|
/**
|
|
2052
|
-
*
|
|
2226
|
+
* A unique identifier for this ModuleDependency.
|
|
2053
2227
|
*/
|
|
2054
|
-
|
|
2228
|
+
id: () => Promise<ModuleDependencyID>;
|
|
2229
|
+
name: () => Promise<string>;
|
|
2230
|
+
source: () => ModuleSource;
|
|
2231
|
+
}
|
|
2232
|
+
/**
|
|
2233
|
+
* The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
|
|
2234
|
+
*/
|
|
2235
|
+
export declare class ModuleSource extends BaseClient {
|
|
2236
|
+
private readonly _id?;
|
|
2237
|
+
private readonly _asString?;
|
|
2238
|
+
private readonly _kind?;
|
|
2239
|
+
private readonly _moduleName?;
|
|
2240
|
+
private readonly _subpath?;
|
|
2055
2241
|
/**
|
|
2056
|
-
*
|
|
2242
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2057
2243
|
*/
|
|
2058
|
-
|
|
2244
|
+
constructor(parent?: {
|
|
2245
|
+
queryTree?: QueryTree[];
|
|
2246
|
+
ctx: Context;
|
|
2247
|
+
}, _id?: ModuleSourceID, _asString?: string, _kind?: ModuleSourceKind, _moduleName?: string, _subpath?: string);
|
|
2059
2248
|
/**
|
|
2060
|
-
*
|
|
2249
|
+
* A unique identifier for this ModuleSource.
|
|
2061
2250
|
*/
|
|
2062
|
-
|
|
2251
|
+
id: () => Promise<ModuleSourceID>;
|
|
2252
|
+
asGitSource: () => GitModuleSource;
|
|
2253
|
+
asLocalSource: () => LocalModuleSource;
|
|
2063
2254
|
/**
|
|
2064
|
-
*
|
|
2255
|
+
* Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
|
|
2065
2256
|
*/
|
|
2066
|
-
|
|
2257
|
+
asModule: () => Module_;
|
|
2067
2258
|
/**
|
|
2068
|
-
*
|
|
2259
|
+
* A human readable ref string representation of this module source.
|
|
2069
2260
|
*/
|
|
2070
|
-
|
|
2261
|
+
asString: () => Promise<string>;
|
|
2071
2262
|
/**
|
|
2072
|
-
*
|
|
2263
|
+
* The directory containing the actual module's source code, as determined from the root directory and subpath.
|
|
2264
|
+
* @param path The path from the source directory to select.
|
|
2073
2265
|
*/
|
|
2074
|
-
|
|
2266
|
+
directory: (path: string) => Directory;
|
|
2267
|
+
kind: () => Promise<ModuleSourceKind>;
|
|
2268
|
+
/**
|
|
2269
|
+
* If set, the name of the module this source references
|
|
2270
|
+
*/
|
|
2271
|
+
moduleName: () => Promise<string>;
|
|
2272
|
+
/**
|
|
2273
|
+
* Resolve the provided module source arg as a dependency relative to this module source.
|
|
2274
|
+
* @param dep The dependency module source to resolve.
|
|
2275
|
+
*/
|
|
2276
|
+
resolveDependency: (dep: ModuleSource) => ModuleSource;
|
|
2277
|
+
rootDirectory: () => Directory;
|
|
2278
|
+
/**
|
|
2279
|
+
* The path to the module subdirectory containing the actual module's source code.
|
|
2280
|
+
*/
|
|
2281
|
+
subpath: () => Promise<string>;
|
|
2282
|
+
/**
|
|
2283
|
+
* Call the provided function with current ModuleSource.
|
|
2284
|
+
*
|
|
2285
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2286
|
+
*/
|
|
2287
|
+
with: (arg: (param: ModuleSource) => ModuleSource) => ModuleSource;
|
|
2075
2288
|
}
|
|
2076
2289
|
/**
|
|
2077
2290
|
* A definition of a custom object defined in a Module.
|
|
2078
2291
|
*/
|
|
2079
2292
|
export declare class ObjectTypeDef extends BaseClient {
|
|
2293
|
+
private readonly _id?;
|
|
2080
2294
|
private readonly _description?;
|
|
2081
2295
|
private readonly _name?;
|
|
2082
2296
|
private readonly _sourceModuleName?;
|
|
@@ -2086,37 +2300,25 @@ export declare class ObjectTypeDef extends BaseClient {
|
|
|
2086
2300
|
constructor(parent?: {
|
|
2087
2301
|
queryTree?: QueryTree[];
|
|
2088
2302
|
ctx: Context;
|
|
2089
|
-
}, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2303
|
+
}, _id?: ObjectTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2090
2304
|
/**
|
|
2091
|
-
*
|
|
2305
|
+
* A unique identifier for this ObjectTypeDef.
|
|
2092
2306
|
*/
|
|
2307
|
+
id: () => Promise<ObjectTypeDefID>;
|
|
2093
2308
|
constructor_: () => Function_;
|
|
2094
|
-
/**
|
|
2095
|
-
* The doc string for the object, if any
|
|
2096
|
-
*/
|
|
2097
2309
|
description: () => Promise<string>;
|
|
2098
|
-
/**
|
|
2099
|
-
* Static fields defined on this object, if any
|
|
2100
|
-
*/
|
|
2101
2310
|
fields: () => Promise<FieldTypeDef[]>;
|
|
2102
|
-
/**
|
|
2103
|
-
* Functions defined on this object, if any
|
|
2104
|
-
*/
|
|
2105
2311
|
functions: () => Promise<Function_[]>;
|
|
2106
|
-
/**
|
|
2107
|
-
* The name of the object
|
|
2108
|
-
*/
|
|
2109
2312
|
name: () => Promise<string>;
|
|
2110
|
-
/**
|
|
2111
|
-
* If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
2112
|
-
*/
|
|
2113
2313
|
sourceModuleName: () => Promise<string>;
|
|
2114
2314
|
}
|
|
2115
2315
|
/**
|
|
2116
2316
|
* A port exposed by a container.
|
|
2117
2317
|
*/
|
|
2118
2318
|
export declare class Port extends BaseClient {
|
|
2319
|
+
private readonly _id?;
|
|
2119
2320
|
private readonly _description?;
|
|
2321
|
+
private readonly _experimentalSkipHealthcheck?;
|
|
2120
2322
|
private readonly _port?;
|
|
2121
2323
|
private readonly _protocol?;
|
|
2122
2324
|
/**
|
|
@@ -2125,20 +2327,19 @@ export declare class Port extends BaseClient {
|
|
|
2125
2327
|
constructor(parent?: {
|
|
2126
2328
|
queryTree?: QueryTree[];
|
|
2127
2329
|
ctx: Context;
|
|
2128
|
-
}, _description?: string, _port?: number, _protocol?: NetworkProtocol);
|
|
2330
|
+
}, _id?: PortID, _description?: string, _experimentalSkipHealthcheck?: boolean, _port?: number, _protocol?: NetworkProtocol);
|
|
2129
2331
|
/**
|
|
2130
|
-
*
|
|
2332
|
+
* A unique identifier for this Port.
|
|
2131
2333
|
*/
|
|
2334
|
+
id: () => Promise<PortID>;
|
|
2132
2335
|
description: () => Promise<string>;
|
|
2133
|
-
|
|
2134
|
-
* The port number.
|
|
2135
|
-
*/
|
|
2336
|
+
experimentalSkipHealthcheck: () => Promise<boolean>;
|
|
2136
2337
|
port: () => Promise<number>;
|
|
2137
|
-
/**
|
|
2138
|
-
* The transport layer network protocol.
|
|
2139
|
-
*/
|
|
2140
2338
|
protocol: () => Promise<NetworkProtocol>;
|
|
2141
2339
|
}
|
|
2340
|
+
/**
|
|
2341
|
+
* The root of the DAG.
|
|
2342
|
+
*/
|
|
2142
2343
|
export declare class Client extends BaseClient {
|
|
2143
2344
|
private readonly _checkVersionCompatibility?;
|
|
2144
2345
|
private readonly _defaultPlatform?;
|
|
@@ -2149,6 +2350,14 @@ export declare class Client extends BaseClient {
|
|
|
2149
2350
|
queryTree?: QueryTree[];
|
|
2150
2351
|
ctx: Context;
|
|
2151
2352
|
}, _checkVersionCompatibility?: boolean, _defaultPlatform?: Platform);
|
|
2353
|
+
/**
|
|
2354
|
+
* Retrieves a content-addressed blob.
|
|
2355
|
+
* @param digest Digest of the blob
|
|
2356
|
+
* @param size Size of the blob
|
|
2357
|
+
* @param mediaType Media type of the blob
|
|
2358
|
+
* @param uncompressed Digest of the uncompressed blob
|
|
2359
|
+
*/
|
|
2360
|
+
blob: (digest: string, size: number, mediaType: string, uncompressed: string) => Directory;
|
|
2152
2361
|
/**
|
|
2153
2362
|
* Constructs a cache volume for a given cache key.
|
|
2154
2363
|
* @param key A string identifier to target this cache volume (e.g., "modules-cache").
|
|
@@ -2156,61 +2365,65 @@ export declare class Client extends BaseClient {
|
|
|
2156
2365
|
cacheVolume: (key: string) => CacheVolume;
|
|
2157
2366
|
/**
|
|
2158
2367
|
* Checks if the current Dagger Engine is compatible with an SDK's required version.
|
|
2159
|
-
* @param version
|
|
2368
|
+
* @param version Version required by the SDK.
|
|
2160
2369
|
*/
|
|
2161
2370
|
checkVersionCompatibility: (version: string) => Promise<boolean>;
|
|
2162
2371
|
/**
|
|
2163
|
-
* Creates a scratch container
|
|
2372
|
+
* Creates a scratch container.
|
|
2164
2373
|
*
|
|
2165
|
-
* Optional platform argument initializes new containers to execute and publish
|
|
2166
|
-
*
|
|
2374
|
+
* Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
|
|
2375
|
+
* @param opts.id DEPRECATED: Use `loadContainerFromID` instead.
|
|
2376
|
+
* @param opts.platform Platform to initialize the container with.
|
|
2167
2377
|
*/
|
|
2168
2378
|
container: (opts?: ClientContainerOpts) => Container;
|
|
2169
2379
|
/**
|
|
2170
2380
|
* The FunctionCall context that the SDK caller is currently executing in.
|
|
2171
|
-
*
|
|
2172
|
-
* an error.
|
|
2381
|
+
*
|
|
2382
|
+
* If the caller is not currently executing in a function, this will return an error.
|
|
2173
2383
|
*/
|
|
2174
2384
|
currentFunctionCall: () => FunctionCall;
|
|
2175
2385
|
/**
|
|
2176
2386
|
* The module currently being served in the session, if any.
|
|
2177
2387
|
*/
|
|
2178
|
-
currentModule: () =>
|
|
2388
|
+
currentModule: () => CurrentModule;
|
|
2179
2389
|
/**
|
|
2180
2390
|
* The TypeDef representations of the objects currently being served in the session.
|
|
2181
2391
|
*/
|
|
2182
2392
|
currentTypeDefs: () => Promise<TypeDef[]>;
|
|
2183
2393
|
/**
|
|
2184
|
-
* The default platform of the
|
|
2394
|
+
* The default platform of the engine.
|
|
2185
2395
|
*/
|
|
2186
2396
|
defaultPlatform: () => Promise<Platform>;
|
|
2187
2397
|
/**
|
|
2188
|
-
* Creates an empty directory
|
|
2398
|
+
* Creates an empty directory.
|
|
2399
|
+
* @param opts.id DEPRECATED: Use `loadDirectoryFromID` isntead.
|
|
2189
2400
|
*/
|
|
2190
2401
|
directory: (opts?: ClientDirectoryOpts) => Directory;
|
|
2191
2402
|
/**
|
|
2192
|
-
* Loads a file by ID.
|
|
2193
2403
|
* @deprecated Use loadFileFromID instead.
|
|
2194
2404
|
*/
|
|
2195
2405
|
file: (id: FileID) => File;
|
|
2196
2406
|
/**
|
|
2197
|
-
*
|
|
2407
|
+
* Creates a function.
|
|
2408
|
+
* @param name Name of the function, in its original format from the implementation language.
|
|
2409
|
+
* @param returnType Return type of the function.
|
|
2198
2410
|
*/
|
|
2199
2411
|
function_: (name: string, returnType: TypeDef) => Function_;
|
|
2200
2412
|
/**
|
|
2201
|
-
* Create a code generation result, given a directory containing the generated
|
|
2202
|
-
* code.
|
|
2413
|
+
* Create a code generation result, given a directory containing the generated code.
|
|
2203
2414
|
*/
|
|
2204
2415
|
generatedCode: (code: Directory) => GeneratedCode;
|
|
2205
2416
|
/**
|
|
2206
|
-
* Queries a
|
|
2207
|
-
* @param url
|
|
2208
|
-
*
|
|
2417
|
+
* Queries a Git repository.
|
|
2418
|
+
* @param url URL of the git repository.
|
|
2419
|
+
*
|
|
2420
|
+
* Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
|
|
2421
|
+
*
|
|
2209
2422
|
* Suffix ".git" is optional.
|
|
2210
2423
|
* @param opts.keepGitDir Set to true to keep .git directory.
|
|
2424
|
+
* @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
|
|
2211
2425
|
* @param opts.sshKnownHosts Set SSH known hosts
|
|
2212
2426
|
* @param opts.sshAuthSocket Set SSH auth socket
|
|
2213
|
-
* @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
|
|
2214
2427
|
*/
|
|
2215
2428
|
git: (url: string, opts?: ClientGitOpts) => GitRepository;
|
|
2216
2429
|
/**
|
|
@@ -2228,47 +2441,111 @@ export declare class Client extends BaseClient {
|
|
|
2228
2441
|
*/
|
|
2229
2442
|
loadCacheVolumeFromID: (id: CacheVolumeID) => CacheVolume;
|
|
2230
2443
|
/**
|
|
2231
|
-
*
|
|
2444
|
+
* Load a Container from its ID.
|
|
2232
2445
|
*/
|
|
2233
2446
|
loadContainerFromID: (id: ContainerID) => Container;
|
|
2447
|
+
/**
|
|
2448
|
+
* Load a CurrentModule from its ID.
|
|
2449
|
+
*/
|
|
2450
|
+
loadCurrentModuleFromID: (id: CurrentModuleID) => CurrentModule;
|
|
2234
2451
|
/**
|
|
2235
2452
|
* Load a Directory from its ID.
|
|
2236
2453
|
*/
|
|
2237
2454
|
loadDirectoryFromID: (id: DirectoryID) => Directory;
|
|
2455
|
+
/**
|
|
2456
|
+
* Load a EnvVariable from its ID.
|
|
2457
|
+
*/
|
|
2458
|
+
loadEnvVariableFromID: (id: EnvVariableID) => EnvVariable;
|
|
2459
|
+
/**
|
|
2460
|
+
* Load a FieldTypeDef from its ID.
|
|
2461
|
+
*/
|
|
2462
|
+
loadFieldTypeDefFromID: (id: FieldTypeDefID) => FieldTypeDef;
|
|
2238
2463
|
/**
|
|
2239
2464
|
* Load a File from its ID.
|
|
2240
2465
|
*/
|
|
2241
2466
|
loadFileFromID: (id: FileID) => File;
|
|
2242
2467
|
/**
|
|
2243
|
-
* Load a
|
|
2468
|
+
* Load a FunctionArg from its ID.
|
|
2244
2469
|
*/
|
|
2245
2470
|
loadFunctionArgFromID: (id: FunctionArgID) => FunctionArg;
|
|
2246
2471
|
/**
|
|
2247
|
-
* Load a
|
|
2472
|
+
* Load a FunctionCallArgValue from its ID.
|
|
2473
|
+
*/
|
|
2474
|
+
loadFunctionCallArgValueFromID: (id: FunctionCallArgValueID) => FunctionCallArgValue;
|
|
2475
|
+
/**
|
|
2476
|
+
* Load a FunctionCall from its ID.
|
|
2477
|
+
*/
|
|
2478
|
+
loadFunctionCallFromID: (id: FunctionCallID) => FunctionCall;
|
|
2479
|
+
/**
|
|
2480
|
+
* Load a Function from its ID.
|
|
2248
2481
|
*/
|
|
2249
2482
|
loadFunctionFromID: (id: FunctionID) => Function_;
|
|
2250
2483
|
/**
|
|
2251
|
-
* Load a GeneratedCode
|
|
2484
|
+
* Load a GeneratedCode from its ID.
|
|
2252
2485
|
*/
|
|
2253
2486
|
loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
|
|
2254
2487
|
/**
|
|
2255
|
-
* Load a
|
|
2488
|
+
* Load a GitModuleSource from its ID.
|
|
2489
|
+
*/
|
|
2490
|
+
loadGitModuleSourceFromID: (id: GitModuleSourceID) => GitModuleSource;
|
|
2491
|
+
/**
|
|
2492
|
+
* Load a GitRef from its ID.
|
|
2256
2493
|
*/
|
|
2257
2494
|
loadGitRefFromID: (id: GitRefID) => GitRef;
|
|
2258
2495
|
/**
|
|
2259
|
-
* Load a
|
|
2496
|
+
* Load a GitRepository from its ID.
|
|
2260
2497
|
*/
|
|
2261
2498
|
loadGitRepositoryFromID: (id: GitRepositoryID) => GitRepository;
|
|
2262
2499
|
/**
|
|
2263
|
-
* Load a
|
|
2500
|
+
* Load a Host from its ID.
|
|
2501
|
+
*/
|
|
2502
|
+
loadHostFromID: (id: HostID) => Host;
|
|
2503
|
+
/**
|
|
2504
|
+
* Load a InputTypeDef from its ID.
|
|
2505
|
+
*/
|
|
2506
|
+
loadInputTypeDefFromID: (id: InputTypeDefID) => InputTypeDef;
|
|
2507
|
+
/**
|
|
2508
|
+
* Load a InterfaceTypeDef from its ID.
|
|
2509
|
+
*/
|
|
2510
|
+
loadInterfaceTypeDefFromID: (id: InterfaceTypeDefID) => InterfaceTypeDef;
|
|
2511
|
+
/**
|
|
2512
|
+
* Load a Label from its ID.
|
|
2513
|
+
*/
|
|
2514
|
+
loadLabelFromID: (id: LabelID) => Label;
|
|
2515
|
+
/**
|
|
2516
|
+
* Load a ListTypeDef from its ID.
|
|
2517
|
+
*/
|
|
2518
|
+
loadListTypeDefFromID: (id: ListTypeDefID) => ListTypeDef;
|
|
2519
|
+
/**
|
|
2520
|
+
* Load a LocalModuleSource from its ID.
|
|
2521
|
+
*/
|
|
2522
|
+
loadLocalModuleSourceFromID: (id: LocalModuleSourceID) => LocalModuleSource;
|
|
2523
|
+
/**
|
|
2524
|
+
* Load a ModuleDependency from its ID.
|
|
2525
|
+
*/
|
|
2526
|
+
loadModuleDependencyFromID: (id: ModuleDependencyID) => ModuleDependency;
|
|
2527
|
+
/**
|
|
2528
|
+
* Load a Module from its ID.
|
|
2264
2529
|
*/
|
|
2265
2530
|
loadModuleFromID: (id: ModuleID) => Module_;
|
|
2531
|
+
/**
|
|
2532
|
+
* Load a ModuleSource from its ID.
|
|
2533
|
+
*/
|
|
2534
|
+
loadModuleSourceFromID: (id: ModuleSourceID) => ModuleSource;
|
|
2535
|
+
/**
|
|
2536
|
+
* Load a ObjectTypeDef from its ID.
|
|
2537
|
+
*/
|
|
2538
|
+
loadObjectTypeDefFromID: (id: ObjectTypeDefID) => ObjectTypeDef;
|
|
2539
|
+
/**
|
|
2540
|
+
* Load a Port from its ID.
|
|
2541
|
+
*/
|
|
2542
|
+
loadPortFromID: (id: PortID) => Port;
|
|
2266
2543
|
/**
|
|
2267
2544
|
* Load a Secret from its ID.
|
|
2268
2545
|
*/
|
|
2269
2546
|
loadSecretFromID: (id: SecretID) => Secret;
|
|
2270
2547
|
/**
|
|
2271
|
-
*
|
|
2548
|
+
* Load a Service from its ID.
|
|
2272
2549
|
*/
|
|
2273
2550
|
loadServiceFromID: (id: ServiceID) => Service;
|
|
2274
2551
|
/**
|
|
@@ -2276,7 +2553,11 @@ export declare class Client extends BaseClient {
|
|
|
2276
2553
|
*/
|
|
2277
2554
|
loadSocketFromID: (id: SocketID) => Socket;
|
|
2278
2555
|
/**
|
|
2279
|
-
* Load a
|
|
2556
|
+
* Load a Terminal from its ID.
|
|
2557
|
+
*/
|
|
2558
|
+
loadTerminalFromID: (id: TerminalID) => Terminal;
|
|
2559
|
+
/**
|
|
2560
|
+
* Load a TypeDef from its ID.
|
|
2280
2561
|
*/
|
|
2281
2562
|
loadTypeDefFromID: (id: TypeDefID) => TypeDef;
|
|
2282
2563
|
/**
|
|
@@ -2284,23 +2565,32 @@ export declare class Client extends BaseClient {
|
|
|
2284
2565
|
*/
|
|
2285
2566
|
module_: () => Module_;
|
|
2286
2567
|
/**
|
|
2287
|
-
*
|
|
2568
|
+
* Create a new module dependency configuration from a module source and name
|
|
2569
|
+
* @param source The source of the dependency
|
|
2570
|
+
* @param opts.name If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default.
|
|
2288
2571
|
*/
|
|
2289
|
-
|
|
2572
|
+
moduleDependency: (source: ModuleSource, opts?: ClientModuleDependencyOpts) => ModuleDependency;
|
|
2573
|
+
/**
|
|
2574
|
+
* Create a new module source instance from a source ref string.
|
|
2575
|
+
* @param refString The string ref representation of the module source
|
|
2576
|
+
* @param opts.rootDirectory An explicitly set root directory for the module source. This is required to load local sources as modules; other source types implicitly encode the root directory and do not require this.
|
|
2577
|
+
* @param opts.stable If true, enforce that the source is a stable version for source kinds that support versioning.
|
|
2578
|
+
*/
|
|
2579
|
+
moduleSource: (refString: string, opts?: ClientModuleSourceOpts) => ModuleSource;
|
|
2290
2580
|
/**
|
|
2291
2581
|
* Creates a named sub-pipeline.
|
|
2292
|
-
* @param name
|
|
2293
|
-
* @param opts.description
|
|
2294
|
-
* @param opts.labels
|
|
2582
|
+
* @param name Name of the sub-pipeline.
|
|
2583
|
+
* @param opts.description Description of the sub-pipeline.
|
|
2584
|
+
* @param opts.labels Labels to apply to the sub-pipeline.
|
|
2295
2585
|
*/
|
|
2296
2586
|
pipeline: (name: string, opts?: ClientPipelineOpts) => Client;
|
|
2297
2587
|
/**
|
|
2298
|
-
*
|
|
2299
|
-
* @deprecated Use loadSecretFromID instead
|
|
2588
|
+
* Reference a secret by name.
|
|
2300
2589
|
*/
|
|
2301
|
-
secret: (
|
|
2590
|
+
secret: (name: string) => Secret;
|
|
2302
2591
|
/**
|
|
2303
2592
|
* Sets a secret given a user defined name to its plaintext and returns the secret.
|
|
2593
|
+
*
|
|
2304
2594
|
* The plaintext value is limited to a size of 128000 bytes.
|
|
2305
2595
|
* @param name The user defined name for this secret
|
|
2306
2596
|
* @param plaintext The plaintext of the secret
|
|
@@ -2310,7 +2600,7 @@ export declare class Client extends BaseClient {
|
|
|
2310
2600
|
* Loads a socket by its ID.
|
|
2311
2601
|
* @deprecated Use loadSocketFromID instead.
|
|
2312
2602
|
*/
|
|
2313
|
-
socket: (
|
|
2603
|
+
socket: (id: SocketID) => Socket;
|
|
2314
2604
|
/**
|
|
2315
2605
|
* Create a new TypeDef.
|
|
2316
2606
|
*/
|
|
@@ -2336,7 +2626,7 @@ export declare class Secret extends BaseClient {
|
|
|
2336
2626
|
ctx: Context;
|
|
2337
2627
|
}, _id?: SecretID, _plaintext?: string);
|
|
2338
2628
|
/**
|
|
2339
|
-
*
|
|
2629
|
+
* A unique identifier for this Secret.
|
|
2340
2630
|
*/
|
|
2341
2631
|
id: () => Promise<SecretID>;
|
|
2342
2632
|
/**
|
|
@@ -2344,21 +2634,25 @@ export declare class Secret extends BaseClient {
|
|
|
2344
2634
|
*/
|
|
2345
2635
|
plaintext: () => Promise<string>;
|
|
2346
2636
|
}
|
|
2637
|
+
/**
|
|
2638
|
+
* A content-addressed service providing TCP connectivity.
|
|
2639
|
+
*/
|
|
2347
2640
|
export declare class Service extends BaseClient {
|
|
2348
2641
|
private readonly _id?;
|
|
2349
2642
|
private readonly _endpoint?;
|
|
2350
2643
|
private readonly _hostname?;
|
|
2351
2644
|
private readonly _start?;
|
|
2352
2645
|
private readonly _stop?;
|
|
2646
|
+
private readonly _up?;
|
|
2353
2647
|
/**
|
|
2354
2648
|
* Constructor is used for internal usage only, do not create object from it.
|
|
2355
2649
|
*/
|
|
2356
2650
|
constructor(parent?: {
|
|
2357
2651
|
queryTree?: QueryTree[];
|
|
2358
2652
|
ctx: Context;
|
|
2359
|
-
}, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID);
|
|
2653
|
+
}, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID, _up?: Void);
|
|
2360
2654
|
/**
|
|
2361
|
-
* A unique identifier for this
|
|
2655
|
+
* A unique identifier for this Service.
|
|
2362
2656
|
*/
|
|
2363
2657
|
id: () => Promise<ServiceID>;
|
|
2364
2658
|
/**
|
|
@@ -2387,9 +2681,17 @@ export declare class Service extends BaseClient {
|
|
|
2387
2681
|
start: () => Promise<Service>;
|
|
2388
2682
|
/**
|
|
2389
2683
|
* Stop the service.
|
|
2684
|
+
* @param opts.kill Immediately kill the service without waiting for a graceful exit
|
|
2685
|
+
*/
|
|
2686
|
+
stop: (opts?: ServiceStopOpts) => Promise<Service>;
|
|
2687
|
+
/**
|
|
2688
|
+
* Creates a tunnel that forwards traffic from the caller's network to this service.
|
|
2390
2689
|
*/
|
|
2391
|
-
|
|
2690
|
+
up: (opts?: ServiceUpOpts) => Promise<Void>;
|
|
2392
2691
|
}
|
|
2692
|
+
/**
|
|
2693
|
+
* A Unix or TCP/IP socket that can be mounted into a container.
|
|
2694
|
+
*/
|
|
2393
2695
|
export declare class Socket extends BaseClient {
|
|
2394
2696
|
private readonly _id?;
|
|
2395
2697
|
/**
|
|
@@ -2400,10 +2702,32 @@ export declare class Socket extends BaseClient {
|
|
|
2400
2702
|
ctx: Context;
|
|
2401
2703
|
}, _id?: SocketID);
|
|
2402
2704
|
/**
|
|
2403
|
-
*
|
|
2705
|
+
* A unique identifier for this Socket.
|
|
2404
2706
|
*/
|
|
2405
2707
|
id: () => Promise<SocketID>;
|
|
2406
2708
|
}
|
|
2709
|
+
/**
|
|
2710
|
+
* An interactive terminal that clients can connect to.
|
|
2711
|
+
*/
|
|
2712
|
+
export declare class Terminal extends BaseClient {
|
|
2713
|
+
private readonly _id?;
|
|
2714
|
+
private readonly _websocketEndpoint?;
|
|
2715
|
+
/**
|
|
2716
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2717
|
+
*/
|
|
2718
|
+
constructor(parent?: {
|
|
2719
|
+
queryTree?: QueryTree[];
|
|
2720
|
+
ctx: Context;
|
|
2721
|
+
}, _id?: TerminalID, _websocketEndpoint?: string);
|
|
2722
|
+
/**
|
|
2723
|
+
* A unique identifier for this Terminal.
|
|
2724
|
+
*/
|
|
2725
|
+
id: () => Promise<TerminalID>;
|
|
2726
|
+
/**
|
|
2727
|
+
* An http endpoint at which this terminal can be connected to over a websocket.
|
|
2728
|
+
*/
|
|
2729
|
+
websocketEndpoint: () => Promise<string>;
|
|
2730
|
+
}
|
|
2407
2731
|
/**
|
|
2408
2732
|
* A definition of a parameter or return type in a Module.
|
|
2409
2733
|
*/
|
|
@@ -2418,29 +2742,15 @@ export declare class TypeDef extends BaseClient {
|
|
|
2418
2742
|
queryTree?: QueryTree[];
|
|
2419
2743
|
ctx: Context;
|
|
2420
2744
|
}, _id?: TypeDefID, _kind?: TypeDefKind, _optional?: boolean);
|
|
2421
|
-
id: () => Promise<TypeDefID>;
|
|
2422
2745
|
/**
|
|
2423
|
-
*
|
|
2424
|
-
* If kind is not INTERFACE, this will be null.
|
|
2746
|
+
* A unique identifier for this TypeDef.
|
|
2425
2747
|
*/
|
|
2748
|
+
id: () => Promise<TypeDefID>;
|
|
2749
|
+
asInput: () => InputTypeDef;
|
|
2426
2750
|
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
2751
|
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
2752
|
asObject: () => ObjectTypeDef;
|
|
2437
|
-
/**
|
|
2438
|
-
* The kind of type this is (e.g. primitive, list, object)
|
|
2439
|
-
*/
|
|
2440
2753
|
kind: () => Promise<TypeDefKind>;
|
|
2441
|
-
/**
|
|
2442
|
-
* Whether this type can be set to null. Defaults to false.
|
|
2443
|
-
*/
|
|
2444
2754
|
optional: () => Promise<boolean>;
|
|
2445
2755
|
/**
|
|
2446
2756
|
* Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
|
|
@@ -2472,9 +2782,7 @@ export declare class TypeDef extends BaseClient {
|
|
|
2472
2782
|
/**
|
|
2473
2783
|
* Returns a TypeDef of kind Object with the provided name.
|
|
2474
2784
|
*
|
|
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.
|
|
2785
|
+
* 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
2786
|
*/
|
|
2479
2787
|
withObject: (name: string, opts?: TypeDefWithObjectOpts) => TypeDef;
|
|
2480
2788
|
/**
|