@dagger.io/dagger 0.13.2 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.gen.d.ts +3846 -0
- package/dist/api/client.gen.d.ts.map +1 -0
- package/dist/api/client.gen.js +7207 -0
- package/dist/api/utils.d.ts +28 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/api/utils.js +170 -0
- package/dist/common/errors/DaggerSDKError.d.ts +32 -0
- package/dist/common/errors/DaggerSDKError.d.ts.map +1 -0
- package/dist/common/errors/DaggerSDKError.js +26 -0
- package/dist/common/errors/DockerImageRefValidationError.d.ts +22 -0
- package/dist/common/errors/DockerImageRefValidationError.d.ts.map +1 -0
- package/dist/common/errors/DockerImageRefValidationError.js +21 -0
- package/dist/common/errors/EngineSessionConnectParamsParseError.d.ts +21 -0
- package/dist/common/errors/EngineSessionConnectParamsParseError.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionConnectParamsParseError.js +20 -0
- package/dist/common/errors/EngineSessionConnectionTimeoutError.d.ts +21 -0
- package/dist/common/errors/EngineSessionConnectionTimeoutError.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionConnectionTimeoutError.js +20 -0
- package/dist/common/errors/EngineSessionErrorOptions.d.ts +16 -0
- package/dist/common/errors/EngineSessionErrorOptions.d.ts.map +1 -0
- package/dist/common/errors/EngineSessionErrorOptions.js +16 -0
- package/dist/common/errors/ExecError.d.ts +37 -0
- package/dist/common/errors/ExecError.d.ts.map +1 -0
- package/dist/common/errors/ExecError.js +38 -0
- package/dist/common/errors/GraphQLRequestError.d.ts +26 -0
- package/dist/common/errors/GraphQLRequestError.d.ts.map +1 -0
- package/dist/common/errors/GraphQLRequestError.js +25 -0
- package/dist/common/errors/InitEngineSessionBinaryError.d.ts +13 -0
- package/dist/common/errors/InitEngineSessionBinaryError.d.ts.map +1 -0
- package/dist/common/errors/InitEngineSessionBinaryError.js +15 -0
- package/dist/common/errors/NotAwaitedRequestError.d.ts +13 -0
- package/dist/common/errors/NotAwaitedRequestError.d.ts.map +1 -0
- package/dist/common/errors/NotAwaitedRequestError.js +15 -0
- package/dist/common/errors/TooManyNestedObjectsError.d.ts +21 -0
- package/dist/common/errors/TooManyNestedObjectsError.d.ts.map +1 -0
- package/dist/common/errors/TooManyNestedObjectsError.js +20 -0
- package/dist/common/errors/UnknownDaggerError.d.ts +13 -0
- package/dist/common/errors/UnknownDaggerError.d.ts.map +1 -0
- package/dist/common/errors/UnknownDaggerError.js +15 -0
- package/dist/common/errors/errors-codes.d.ts +51 -0
- package/dist/common/errors/errors-codes.d.ts.map +1 -0
- package/dist/common/errors/errors-codes.js +43 -0
- package/dist/common/errors/index.d.ts +13 -0
- package/dist/common/errors/index.d.ts.map +1 -0
- package/dist/common/errors/index.js +12 -0
- package/dist/common/utils.d.ts +68 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +2 -0
- package/dist/connect.d.ts +32 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +66 -0
- package/dist/connectOpts.d.ts +24 -0
- package/dist/connectOpts.d.ts.map +1 -0
- package/dist/connectOpts.js +1 -0
- package/dist/context/builder.d.ts +9 -0
- package/dist/context/builder.d.ts.map +1 -0
- package/dist/context/builder.js +34 -0
- package/dist/context/context.d.ts +40 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.js +53 -0
- package/dist/entrypoint/context.d.ts +8 -0
- package/dist/entrypoint/context.d.ts.map +1 -0
- package/dist/entrypoint/context.js +1 -0
- package/dist/entrypoint/entrypoint.d.ts +2 -0
- package/dist/entrypoint/entrypoint.d.ts.map +1 -0
- package/dist/entrypoint/entrypoint.js +71 -0
- package/dist/entrypoint/invoke.d.ts +13 -0
- package/dist/entrypoint/invoke.d.ts.map +1 -0
- package/dist/entrypoint/invoke.js +40 -0
- package/dist/entrypoint/load.d.ts +56 -0
- package/dist/entrypoint/load.d.ts.map +1 -0
- package/dist/entrypoint/load.js +198 -0
- package/dist/entrypoint/register.d.ts +7 -0
- package/dist/entrypoint/register.d.ts.map +1 -0
- package/dist/entrypoint/register.js +139 -0
- package/dist/graphql/client.d.ts +3 -0
- package/dist/graphql/client.d.ts.map +1 -0
- package/dist/graphql/client.js +48 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/introspector/decorators/decorators.d.ts +44 -0
- package/dist/introspector/decorators/decorators.d.ts.map +1 -0
- package/dist/introspector/decorators/decorators.js +47 -0
- package/dist/introspector/registry/registry.d.ts +89 -0
- package/dist/introspector/registry/registry.d.ts.map +1 -0
- package/dist/introspector/registry/registry.js +115 -0
- package/dist/introspector/scanner/abtractions/argument.d.ts +104 -0
- package/dist/introspector/scanner/abtractions/argument.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/argument.js +207 -0
- package/dist/introspector/scanner/abtractions/constructor.d.ts +17 -0
- package/dist/introspector/scanner/abtractions/constructor.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/constructor.js +40 -0
- package/dist/introspector/scanner/abtractions/enum.d.ts +33 -0
- package/dist/introspector/scanner/abtractions/enum.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/enum.js +73 -0
- package/dist/introspector/scanner/abtractions/enumValue.d.ts +24 -0
- package/dist/introspector/scanner/abtractions/enumValue.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/enumValue.js +51 -0
- package/dist/introspector/scanner/abtractions/method.d.ts +67 -0
- package/dist/introspector/scanner/abtractions/method.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/method.js +132 -0
- package/dist/introspector/scanner/abtractions/module.d.ts +26 -0
- package/dist/introspector/scanner/abtractions/module.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/module.js +103 -0
- package/dist/introspector/scanner/abtractions/object.d.ts +52 -0
- package/dist/introspector/scanner/abtractions/object.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/object.js +118 -0
- package/dist/introspector/scanner/abtractions/property.d.ts +55 -0
- package/dist/introspector/scanner/abtractions/property.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/property.js +110 -0
- package/dist/introspector/scanner/abtractions/typeToTypedef.d.ts +8 -0
- package/dist/introspector/scanner/abtractions/typeToTypedef.d.ts.map +1 -0
- package/dist/introspector/scanner/abtractions/typeToTypedef.js +85 -0
- package/dist/introspector/scanner/scan.d.ts +14 -0
- package/dist/introspector/scanner/scan.d.ts.map +1 -0
- package/dist/introspector/scanner/scan.js +26 -0
- package/dist/introspector/scanner/typeDefs.d.ts +45 -0
- package/dist/introspector/scanner/typeDefs.d.ts.map +1 -0
- package/dist/introspector/scanner/typeDefs.js +1 -0
- package/dist/introspector/scanner/utils.d.ts +22 -0
- package/dist/introspector/scanner/utils.d.ts.map +1 -0
- package/dist/introspector/scanner/utils.js +101 -0
- package/dist/introspector/utils/files.d.ts +5 -0
- package/dist/introspector/utils/files.d.ts.map +1 -0
- package/dist/introspector/utils/files.js +28 -0
- package/dist/provisioning/bin.d.ts +77 -0
- package/dist/provisioning/bin.d.ts.map +1 -0
- package/dist/provisioning/bin.js +353 -0
- package/dist/provisioning/default.d.ts +2 -0
- package/dist/provisioning/default.d.ts.map +1 -0
- package/dist/provisioning/default.js +2 -0
- package/dist/provisioning/engineconn.d.ts +28 -0
- package/dist/provisioning/engineconn.d.ts.map +1 -0
- package/dist/provisioning/engineconn.js +1 -0
- package/dist/provisioning/index.d.ts +4 -0
- package/dist/provisioning/index.d.ts.map +1 -0
- package/dist/provisioning/index.js +3 -0
- package/dist/telemetry/attributes.d.ts +2 -0
- package/dist/telemetry/attributes.d.ts.map +1 -0
- package/dist/telemetry/attributes.js +1 -0
- package/dist/telemetry/index.d.ts +3 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +2 -0
- package/dist/telemetry/init.d.ts +21 -0
- package/dist/telemetry/init.d.ts.map +1 -0
- package/dist/telemetry/init.js +66 -0
- package/dist/telemetry/telemetry.d.ts +16 -0
- package/dist/telemetry/telemetry.d.ts.map +1 -0
- package/dist/telemetry/telemetry.js +38 -0
- package/dist/telemetry/tracer.d.ts +32 -0
- package/dist/telemetry/tracer.d.ts.map +1 -0
- package/dist/telemetry/tracer.js +54 -0
- package/package.json +2 -2
|
@@ -0,0 +1,3846 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by `client-gen`.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
import { Context } from "../context/context.js";
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export type QueryTree = {
|
|
10
|
+
operation: string;
|
|
11
|
+
args?: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export type Metadata = {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
is_enum?: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
interface ClientConfig {
|
|
22
|
+
queryTree?: QueryTree[];
|
|
23
|
+
ctx?: Context;
|
|
24
|
+
}
|
|
25
|
+
declare class BaseClient {
|
|
26
|
+
protected _queryTree: QueryTree[];
|
|
27
|
+
protected _ctx: Context;
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
constructor({ queryTree, ctx }?: ClientConfig);
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
get queryTree(): QueryTree[];
|
|
36
|
+
}
|
|
37
|
+
export type BuildArg = {
|
|
38
|
+
/**
|
|
39
|
+
* The build argument name.
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* The build argument value.
|
|
44
|
+
*/
|
|
45
|
+
value: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Sharing mode of the cache volume.
|
|
49
|
+
*/
|
|
50
|
+
export declare enum CacheSharingMode {
|
|
51
|
+
/**
|
|
52
|
+
* Shares the cache volume amongst many build pipelines, but will serialize the writes
|
|
53
|
+
*/
|
|
54
|
+
Locked = "LOCKED",
|
|
55
|
+
/**
|
|
56
|
+
* Keeps a cache volume for a single build pipeline
|
|
57
|
+
*/
|
|
58
|
+
Private = "PRIVATE",
|
|
59
|
+
/**
|
|
60
|
+
* Shares the cache volume amongst many build pipelines
|
|
61
|
+
*/
|
|
62
|
+
Shared = "SHARED"
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.
|
|
66
|
+
*/
|
|
67
|
+
export type CacheVolumeID = string & {
|
|
68
|
+
__CacheVolumeID: never;
|
|
69
|
+
};
|
|
70
|
+
export type ContainerAsTarballOpts = {
|
|
71
|
+
/**
|
|
72
|
+
* Identifiers for other platform specific containers.
|
|
73
|
+
*
|
|
74
|
+
* Used for multi-platform images.
|
|
75
|
+
*/
|
|
76
|
+
platformVariants?: Container[];
|
|
77
|
+
/**
|
|
78
|
+
* Force each layer of the image to use the specified compression algorithm.
|
|
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.
|
|
81
|
+
*/
|
|
82
|
+
forcedCompression?: ImageLayerCompression;
|
|
83
|
+
/**
|
|
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.
|
|
87
|
+
*/
|
|
88
|
+
mediaTypes?: ImageMediaTypes;
|
|
89
|
+
};
|
|
90
|
+
export type ContainerBuildOpts = {
|
|
91
|
+
/**
|
|
92
|
+
* Path to the Dockerfile to use.
|
|
93
|
+
*/
|
|
94
|
+
dockerfile?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Target build stage to build.
|
|
97
|
+
*/
|
|
98
|
+
target?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Additional build arguments.
|
|
101
|
+
*/
|
|
102
|
+
buildArgs?: BuildArg[];
|
|
103
|
+
/**
|
|
104
|
+
* Secrets to pass to the build.
|
|
105
|
+
*
|
|
106
|
+
* They will be mounted at /run/secrets/[secret-name] in the build container
|
|
107
|
+
*
|
|
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)](http://example.com?token=$(cat /run/secrets/my-secret))
|
|
109
|
+
*/
|
|
110
|
+
secrets?: Secret[];
|
|
111
|
+
};
|
|
112
|
+
export type ContainerDirectoryOpts = {
|
|
113
|
+
/**
|
|
114
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
115
|
+
*/
|
|
116
|
+
expand?: boolean;
|
|
117
|
+
};
|
|
118
|
+
export type ContainerExportOpts = {
|
|
119
|
+
/**
|
|
120
|
+
* Identifiers for other platform specific containers.
|
|
121
|
+
*
|
|
122
|
+
* Used for multi-platform image.
|
|
123
|
+
*/
|
|
124
|
+
platformVariants?: Container[];
|
|
125
|
+
/**
|
|
126
|
+
* Force each layer of the exported image to use the specified compression algorithm.
|
|
127
|
+
*
|
|
128
|
+
* 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.
|
|
129
|
+
*/
|
|
130
|
+
forcedCompression?: ImageLayerCompression;
|
|
131
|
+
/**
|
|
132
|
+
* Use the specified media types for the exported image's layers.
|
|
133
|
+
*
|
|
134
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
135
|
+
*/
|
|
136
|
+
mediaTypes?: ImageMediaTypes;
|
|
137
|
+
/**
|
|
138
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
139
|
+
*/
|
|
140
|
+
expand?: boolean;
|
|
141
|
+
};
|
|
142
|
+
export type ContainerFileOpts = {
|
|
143
|
+
/**
|
|
144
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
145
|
+
*/
|
|
146
|
+
expand?: boolean;
|
|
147
|
+
};
|
|
148
|
+
export type ContainerImportOpts = {
|
|
149
|
+
/**
|
|
150
|
+
* Identifies the tag to import from the archive, if the archive bundles multiple tags.
|
|
151
|
+
*/
|
|
152
|
+
tag?: string;
|
|
153
|
+
};
|
|
154
|
+
export type ContainerPublishOpts = {
|
|
155
|
+
/**
|
|
156
|
+
* Identifiers for other platform specific containers.
|
|
157
|
+
*
|
|
158
|
+
* Used for multi-platform image.
|
|
159
|
+
*/
|
|
160
|
+
platformVariants?: Container[];
|
|
161
|
+
/**
|
|
162
|
+
* Force each layer of the published image to use the specified compression algorithm.
|
|
163
|
+
*
|
|
164
|
+
* 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.
|
|
165
|
+
*/
|
|
166
|
+
forcedCompression?: ImageLayerCompression;
|
|
167
|
+
/**
|
|
168
|
+
* Use the specified media types for the published image's layers.
|
|
169
|
+
*
|
|
170
|
+
* Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
|
|
171
|
+
*/
|
|
172
|
+
mediaTypes?: ImageMediaTypes;
|
|
173
|
+
};
|
|
174
|
+
export type ContainerTerminalOpts = {
|
|
175
|
+
/**
|
|
176
|
+
* If set, override the container's default terminal command and invoke these command arguments instead.
|
|
177
|
+
*/
|
|
178
|
+
cmd?: string[];
|
|
179
|
+
/**
|
|
180
|
+
* Provides Dagger access to the executed command.
|
|
181
|
+
*
|
|
182
|
+
* 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.
|
|
183
|
+
*/
|
|
184
|
+
experimentalPrivilegedNesting?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* 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.
|
|
187
|
+
*/
|
|
188
|
+
insecureRootCapabilities?: boolean;
|
|
189
|
+
};
|
|
190
|
+
export type ContainerUpOpts = {
|
|
191
|
+
/**
|
|
192
|
+
* List of frontend/backend port mappings to forward.
|
|
193
|
+
*
|
|
194
|
+
* Frontend is the port accepting traffic on the host, backend is the service port.
|
|
195
|
+
*/
|
|
196
|
+
ports?: PortForward[];
|
|
197
|
+
/**
|
|
198
|
+
* Bind each tunnel port to a random port on the host.
|
|
199
|
+
*/
|
|
200
|
+
random?: boolean;
|
|
201
|
+
};
|
|
202
|
+
export type ContainerWithDefaultTerminalCmdOpts = {
|
|
203
|
+
/**
|
|
204
|
+
* Provides Dagger access to the executed command.
|
|
205
|
+
*
|
|
206
|
+
* 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.
|
|
207
|
+
*/
|
|
208
|
+
experimentalPrivilegedNesting?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* 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.
|
|
211
|
+
*/
|
|
212
|
+
insecureRootCapabilities?: boolean;
|
|
213
|
+
};
|
|
214
|
+
export type ContainerWithDirectoryOpts = {
|
|
215
|
+
/**
|
|
216
|
+
* Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
|
|
217
|
+
*/
|
|
218
|
+
exclude?: string[];
|
|
219
|
+
/**
|
|
220
|
+
* Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
|
|
221
|
+
*/
|
|
222
|
+
include?: string[];
|
|
223
|
+
/**
|
|
224
|
+
* A user:group to set for the directory and its contents.
|
|
225
|
+
*
|
|
226
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
227
|
+
*
|
|
228
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
229
|
+
*/
|
|
230
|
+
owner?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
233
|
+
*/
|
|
234
|
+
expand?: boolean;
|
|
235
|
+
};
|
|
236
|
+
export type ContainerWithEntrypointOpts = {
|
|
237
|
+
/**
|
|
238
|
+
* Don't remove the default arguments when setting the entrypoint.
|
|
239
|
+
*/
|
|
240
|
+
keepDefaultArgs?: boolean;
|
|
241
|
+
};
|
|
242
|
+
export type ContainerWithEnvVariableOpts = {
|
|
243
|
+
/**
|
|
244
|
+
* Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
|
|
245
|
+
*/
|
|
246
|
+
expand?: boolean;
|
|
247
|
+
};
|
|
248
|
+
export type ContainerWithExecOpts = {
|
|
249
|
+
/**
|
|
250
|
+
* If the container has an entrypoint, prepend it to the args.
|
|
251
|
+
*/
|
|
252
|
+
useEntrypoint?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Content to write to the command's standard input before closing (e.g., "Hello world").
|
|
255
|
+
*/
|
|
256
|
+
stdin?: string;
|
|
257
|
+
/**
|
|
258
|
+
* Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
|
|
259
|
+
*/
|
|
260
|
+
redirectStdout?: string;
|
|
261
|
+
/**
|
|
262
|
+
* Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
|
263
|
+
*/
|
|
264
|
+
redirectStderr?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Provides Dagger access to the executed command.
|
|
267
|
+
*
|
|
268
|
+
* 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.
|
|
269
|
+
*/
|
|
270
|
+
experimentalPrivilegedNesting?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* 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.
|
|
273
|
+
*/
|
|
274
|
+
insecureRootCapabilities?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
277
|
+
*/
|
|
278
|
+
expand?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* If set, skip the automatic init process injected into containers by default.
|
|
281
|
+
*
|
|
282
|
+
* This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
|
|
283
|
+
*/
|
|
284
|
+
noInit?: boolean;
|
|
285
|
+
};
|
|
286
|
+
export type ContainerWithExposedPortOpts = {
|
|
287
|
+
/**
|
|
288
|
+
* Transport layer network protocol
|
|
289
|
+
*/
|
|
290
|
+
protocol?: NetworkProtocol;
|
|
291
|
+
/**
|
|
292
|
+
* Optional port description
|
|
293
|
+
*/
|
|
294
|
+
description?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Skip the health check when run as a service.
|
|
297
|
+
*/
|
|
298
|
+
experimentalSkipHealthcheck?: boolean;
|
|
299
|
+
};
|
|
300
|
+
export type ContainerWithFileOpts = {
|
|
301
|
+
/**
|
|
302
|
+
* Permission given to the copied file (e.g., 0600).
|
|
303
|
+
*/
|
|
304
|
+
permissions?: number;
|
|
305
|
+
/**
|
|
306
|
+
* A user:group to set for the file.
|
|
307
|
+
*
|
|
308
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
309
|
+
*
|
|
310
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
311
|
+
*/
|
|
312
|
+
owner?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
315
|
+
*/
|
|
316
|
+
expand?: boolean;
|
|
317
|
+
};
|
|
318
|
+
export type ContainerWithFilesOpts = {
|
|
319
|
+
/**
|
|
320
|
+
* Permission given to the copied files (e.g., 0600).
|
|
321
|
+
*/
|
|
322
|
+
permissions?: number;
|
|
323
|
+
/**
|
|
324
|
+
* A user:group to set for the files.
|
|
325
|
+
*
|
|
326
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
327
|
+
*
|
|
328
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
329
|
+
*/
|
|
330
|
+
owner?: string;
|
|
331
|
+
/**
|
|
332
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
333
|
+
*/
|
|
334
|
+
expand?: boolean;
|
|
335
|
+
};
|
|
336
|
+
export type ContainerWithMountedCacheOpts = {
|
|
337
|
+
/**
|
|
338
|
+
* Identifier of the directory to use as the cache volume's root.
|
|
339
|
+
*/
|
|
340
|
+
source?: Directory;
|
|
341
|
+
/**
|
|
342
|
+
* Sharing mode of the cache volume.
|
|
343
|
+
*/
|
|
344
|
+
sharing?: CacheSharingMode;
|
|
345
|
+
/**
|
|
346
|
+
* A user:group to set for the mounted cache directory.
|
|
347
|
+
*
|
|
348
|
+
* 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.
|
|
349
|
+
*
|
|
350
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
351
|
+
*
|
|
352
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
353
|
+
*/
|
|
354
|
+
owner?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
357
|
+
*/
|
|
358
|
+
expand?: boolean;
|
|
359
|
+
};
|
|
360
|
+
export type ContainerWithMountedDirectoryOpts = {
|
|
361
|
+
/**
|
|
362
|
+
* A user:group to set for the mounted directory and its contents.
|
|
363
|
+
*
|
|
364
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
365
|
+
*
|
|
366
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
367
|
+
*/
|
|
368
|
+
owner?: string;
|
|
369
|
+
/**
|
|
370
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
371
|
+
*/
|
|
372
|
+
expand?: boolean;
|
|
373
|
+
};
|
|
374
|
+
export type ContainerWithMountedFileOpts = {
|
|
375
|
+
/**
|
|
376
|
+
* A user or user:group to set for the mounted file.
|
|
377
|
+
*
|
|
378
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
379
|
+
*
|
|
380
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
381
|
+
*/
|
|
382
|
+
owner?: string;
|
|
383
|
+
/**
|
|
384
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
385
|
+
*/
|
|
386
|
+
expand?: boolean;
|
|
387
|
+
};
|
|
388
|
+
export type ContainerWithMountedSecretOpts = {
|
|
389
|
+
/**
|
|
390
|
+
* A user:group to set for the mounted secret.
|
|
391
|
+
*
|
|
392
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
393
|
+
*
|
|
394
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
395
|
+
*/
|
|
396
|
+
owner?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Permission given to the mounted secret (e.g., 0600).
|
|
399
|
+
*
|
|
400
|
+
* This option requires an owner to be set to be active.
|
|
401
|
+
*/
|
|
402
|
+
mode?: number;
|
|
403
|
+
/**
|
|
404
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
405
|
+
*/
|
|
406
|
+
expand?: boolean;
|
|
407
|
+
};
|
|
408
|
+
export type ContainerWithMountedTempOpts = {
|
|
409
|
+
/**
|
|
410
|
+
* Size of the temporary directory in bytes.
|
|
411
|
+
*/
|
|
412
|
+
size?: number;
|
|
413
|
+
/**
|
|
414
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
415
|
+
*/
|
|
416
|
+
expand?: boolean;
|
|
417
|
+
};
|
|
418
|
+
export type ContainerWithNewFileOpts = {
|
|
419
|
+
/**
|
|
420
|
+
* Permission given to the written file (e.g., 0600).
|
|
421
|
+
*/
|
|
422
|
+
permissions?: number;
|
|
423
|
+
/**
|
|
424
|
+
* A user:group to set for the file.
|
|
425
|
+
*
|
|
426
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
427
|
+
*
|
|
428
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
429
|
+
*/
|
|
430
|
+
owner?: string;
|
|
431
|
+
/**
|
|
432
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
433
|
+
*/
|
|
434
|
+
expand?: boolean;
|
|
435
|
+
};
|
|
436
|
+
export type ContainerWithUnixSocketOpts = {
|
|
437
|
+
/**
|
|
438
|
+
* A user:group to set for the mounted socket.
|
|
439
|
+
*
|
|
440
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
441
|
+
*
|
|
442
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
443
|
+
*/
|
|
444
|
+
owner?: string;
|
|
445
|
+
/**
|
|
446
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
447
|
+
*/
|
|
448
|
+
expand?: boolean;
|
|
449
|
+
};
|
|
450
|
+
export type ContainerWithWorkdirOpts = {
|
|
451
|
+
/**
|
|
452
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
453
|
+
*/
|
|
454
|
+
expand?: boolean;
|
|
455
|
+
};
|
|
456
|
+
export type ContainerWithoutDirectoryOpts = {
|
|
457
|
+
/**
|
|
458
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
459
|
+
*/
|
|
460
|
+
expand?: boolean;
|
|
461
|
+
};
|
|
462
|
+
export type ContainerWithoutEntrypointOpts = {
|
|
463
|
+
/**
|
|
464
|
+
* Don't remove the default arguments when unsetting the entrypoint.
|
|
465
|
+
*/
|
|
466
|
+
keepDefaultArgs?: boolean;
|
|
467
|
+
};
|
|
468
|
+
export type ContainerWithoutExposedPortOpts = {
|
|
469
|
+
/**
|
|
470
|
+
* Port protocol to unexpose
|
|
471
|
+
*/
|
|
472
|
+
protocol?: NetworkProtocol;
|
|
473
|
+
};
|
|
474
|
+
export type ContainerWithoutFileOpts = {
|
|
475
|
+
/**
|
|
476
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
477
|
+
*/
|
|
478
|
+
expand?: boolean;
|
|
479
|
+
};
|
|
480
|
+
export type ContainerWithoutFilesOpts = {
|
|
481
|
+
/**
|
|
482
|
+
* Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
483
|
+
*/
|
|
484
|
+
expand?: boolean;
|
|
485
|
+
};
|
|
486
|
+
export type ContainerWithoutMountOpts = {
|
|
487
|
+
/**
|
|
488
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
489
|
+
*/
|
|
490
|
+
expand?: boolean;
|
|
491
|
+
};
|
|
492
|
+
export type ContainerWithoutUnixSocketOpts = {
|
|
493
|
+
/**
|
|
494
|
+
* Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
495
|
+
*/
|
|
496
|
+
expand?: boolean;
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* The `ContainerID` scalar type represents an identifier for an object of type Container.
|
|
500
|
+
*/
|
|
501
|
+
export type ContainerID = string & {
|
|
502
|
+
__ContainerID: never;
|
|
503
|
+
};
|
|
504
|
+
export type CurrentModuleWorkdirOpts = {
|
|
505
|
+
/**
|
|
506
|
+
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
507
|
+
*/
|
|
508
|
+
exclude?: string[];
|
|
509
|
+
/**
|
|
510
|
+
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
511
|
+
*/
|
|
512
|
+
include?: string[];
|
|
513
|
+
};
|
|
514
|
+
/**
|
|
515
|
+
* The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.
|
|
516
|
+
*/
|
|
517
|
+
export type CurrentModuleID = string & {
|
|
518
|
+
__CurrentModuleID: never;
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* The `DaggerEngineCacheEntryID` scalar type represents an identifier for an object of type DaggerEngineCacheEntry.
|
|
522
|
+
*/
|
|
523
|
+
export type DaggerEngineCacheEntryID = string & {
|
|
524
|
+
__DaggerEngineCacheEntryID: never;
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* The `DaggerEngineCacheEntrySetID` scalar type represents an identifier for an object of type DaggerEngineCacheEntrySet.
|
|
528
|
+
*/
|
|
529
|
+
export type DaggerEngineCacheEntrySetID = string & {
|
|
530
|
+
__DaggerEngineCacheEntrySetID: never;
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* The `DaggerEngineCacheID` scalar type represents an identifier for an object of type DaggerEngineCache.
|
|
534
|
+
*/
|
|
535
|
+
export type DaggerEngineCacheID = string & {
|
|
536
|
+
__DaggerEngineCacheID: never;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* The `DaggerEngineID` scalar type represents an identifier for an object of type DaggerEngine.
|
|
540
|
+
*/
|
|
541
|
+
export type DaggerEngineID = string & {
|
|
542
|
+
__DaggerEngineID: never;
|
|
543
|
+
};
|
|
544
|
+
export type DirectoryAsModuleOpts = {
|
|
545
|
+
/**
|
|
546
|
+
* An optional subpath of the directory which contains the module's configuration file.
|
|
547
|
+
*
|
|
548
|
+
* 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.
|
|
549
|
+
*
|
|
550
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
551
|
+
*/
|
|
552
|
+
sourceRootPath?: string;
|
|
553
|
+
/**
|
|
554
|
+
* The engine version to upgrade to.
|
|
555
|
+
*/
|
|
556
|
+
engineVersion?: string;
|
|
557
|
+
};
|
|
558
|
+
export type DirectoryDockerBuildOpts = {
|
|
559
|
+
/**
|
|
560
|
+
* The platform to build.
|
|
561
|
+
*/
|
|
562
|
+
platform?: Platform;
|
|
563
|
+
/**
|
|
564
|
+
* Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
565
|
+
*/
|
|
566
|
+
dockerfile?: string;
|
|
567
|
+
/**
|
|
568
|
+
* Target build stage to build.
|
|
569
|
+
*/
|
|
570
|
+
target?: string;
|
|
571
|
+
/**
|
|
572
|
+
* Build arguments to use in the build.
|
|
573
|
+
*/
|
|
574
|
+
buildArgs?: BuildArg[];
|
|
575
|
+
/**
|
|
576
|
+
* Secrets to pass to the build.
|
|
577
|
+
*
|
|
578
|
+
* They will be mounted at /run/secrets/[secret-name].
|
|
579
|
+
*/
|
|
580
|
+
secrets?: Secret[];
|
|
581
|
+
};
|
|
582
|
+
export type DirectoryEntriesOpts = {
|
|
583
|
+
/**
|
|
584
|
+
* Location of the directory to look at (e.g., "/src").
|
|
585
|
+
*/
|
|
586
|
+
path?: string;
|
|
587
|
+
};
|
|
588
|
+
export type DirectoryExportOpts = {
|
|
589
|
+
/**
|
|
590
|
+
* If true, then the host directory will be wiped clean before exporting so that it exactly matches the directory being exported; this means it will delete any files on the host that aren't in the exported dir. If false (the default), the contents of the directory will be merged with any existing contents of the host directory, leaving any existing files on the host that aren't in the exported directory alone.
|
|
591
|
+
*/
|
|
592
|
+
wipe?: boolean;
|
|
593
|
+
};
|
|
594
|
+
export type DirectoryTerminalOpts = {
|
|
595
|
+
/**
|
|
596
|
+
* If set, override the container's default terminal command and invoke these command arguments instead.
|
|
597
|
+
*/
|
|
598
|
+
cmd?: string[];
|
|
599
|
+
/**
|
|
600
|
+
* Provides Dagger access to the executed command.
|
|
601
|
+
*
|
|
602
|
+
* 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.
|
|
603
|
+
*/
|
|
604
|
+
experimentalPrivilegedNesting?: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* 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.
|
|
607
|
+
*/
|
|
608
|
+
insecureRootCapabilities?: boolean;
|
|
609
|
+
/**
|
|
610
|
+
* If set, override the default container used for the terminal.
|
|
611
|
+
*/
|
|
612
|
+
container?: Container;
|
|
613
|
+
};
|
|
614
|
+
export type DirectoryWithDirectoryOpts = {
|
|
615
|
+
/**
|
|
616
|
+
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
617
|
+
*/
|
|
618
|
+
exclude?: string[];
|
|
619
|
+
/**
|
|
620
|
+
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
621
|
+
*/
|
|
622
|
+
include?: string[];
|
|
623
|
+
};
|
|
624
|
+
export type DirectoryWithFileOpts = {
|
|
625
|
+
/**
|
|
626
|
+
* Permission given to the copied file (e.g., 0600).
|
|
627
|
+
*/
|
|
628
|
+
permissions?: number;
|
|
629
|
+
};
|
|
630
|
+
export type DirectoryWithFilesOpts = {
|
|
631
|
+
/**
|
|
632
|
+
* Permission given to the copied files (e.g., 0600).
|
|
633
|
+
*/
|
|
634
|
+
permissions?: number;
|
|
635
|
+
};
|
|
636
|
+
export type DirectoryWithNewDirectoryOpts = {
|
|
637
|
+
/**
|
|
638
|
+
* Permission granted to the created directory (e.g., 0777).
|
|
639
|
+
*/
|
|
640
|
+
permissions?: number;
|
|
641
|
+
};
|
|
642
|
+
export type DirectoryWithNewFileOpts = {
|
|
643
|
+
/**
|
|
644
|
+
* Permission given to the copied file (e.g., 0600).
|
|
645
|
+
*/
|
|
646
|
+
permissions?: number;
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* The `DirectoryID` scalar type represents an identifier for an object of type Directory.
|
|
650
|
+
*/
|
|
651
|
+
export type DirectoryID = string & {
|
|
652
|
+
__DirectoryID: never;
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* The `EnumTypeDefID` scalar type represents an identifier for an object of type EnumTypeDef.
|
|
656
|
+
*/
|
|
657
|
+
export type EnumTypeDefID = string & {
|
|
658
|
+
__EnumTypeDefID: never;
|
|
659
|
+
};
|
|
660
|
+
/**
|
|
661
|
+
* The `EnumValueTypeDefID` scalar type represents an identifier for an object of type EnumValueTypeDef.
|
|
662
|
+
*/
|
|
663
|
+
export type EnumValueTypeDefID = string & {
|
|
664
|
+
__EnumValueTypeDefID: never;
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.
|
|
668
|
+
*/
|
|
669
|
+
export type EnvVariableID = string & {
|
|
670
|
+
__EnvVariableID: never;
|
|
671
|
+
};
|
|
672
|
+
/**
|
|
673
|
+
* The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
|
|
674
|
+
*/
|
|
675
|
+
export type FieldTypeDefID = string & {
|
|
676
|
+
__FieldTypeDefID: never;
|
|
677
|
+
};
|
|
678
|
+
export type FileDigestOpts = {
|
|
679
|
+
/**
|
|
680
|
+
* If true, exclude metadata from the digest.
|
|
681
|
+
*/
|
|
682
|
+
excludeMetadata?: boolean;
|
|
683
|
+
};
|
|
684
|
+
export type FileExportOpts = {
|
|
685
|
+
/**
|
|
686
|
+
* If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
|
|
687
|
+
*/
|
|
688
|
+
allowParentDirPath?: boolean;
|
|
689
|
+
};
|
|
690
|
+
/**
|
|
691
|
+
* The `FileID` scalar type represents an identifier for an object of type File.
|
|
692
|
+
*/
|
|
693
|
+
export type FileID = string & {
|
|
694
|
+
__FileID: never;
|
|
695
|
+
};
|
|
696
|
+
export type FunctionWithArgOpts = {
|
|
697
|
+
/**
|
|
698
|
+
* A doc string for the argument, if any
|
|
699
|
+
*/
|
|
700
|
+
description?: string;
|
|
701
|
+
/**
|
|
702
|
+
* A default value to use for this argument if not explicitly set by the caller, if any
|
|
703
|
+
*/
|
|
704
|
+
defaultValue?: JSON;
|
|
705
|
+
/**
|
|
706
|
+
* If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
|
|
707
|
+
*/
|
|
708
|
+
defaultPath?: string;
|
|
709
|
+
/**
|
|
710
|
+
* Patterns to ignore when loading the contextual argument value.
|
|
711
|
+
*/
|
|
712
|
+
ignore?: string[];
|
|
713
|
+
};
|
|
714
|
+
/**
|
|
715
|
+
* The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.
|
|
716
|
+
*/
|
|
717
|
+
export type FunctionArgID = string & {
|
|
718
|
+
__FunctionArgID: never;
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.
|
|
722
|
+
*/
|
|
723
|
+
export type FunctionCallArgValueID = string & {
|
|
724
|
+
__FunctionCallArgValueID: never;
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
* The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.
|
|
728
|
+
*/
|
|
729
|
+
export type FunctionCallID = string & {
|
|
730
|
+
__FunctionCallID: never;
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* The `FunctionID` scalar type represents an identifier for an object of type Function.
|
|
734
|
+
*/
|
|
735
|
+
export type FunctionID = string & {
|
|
736
|
+
__FunctionID: never;
|
|
737
|
+
};
|
|
738
|
+
/**
|
|
739
|
+
* The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.
|
|
740
|
+
*/
|
|
741
|
+
export type GeneratedCodeID = string & {
|
|
742
|
+
__GeneratedCodeID: never;
|
|
743
|
+
};
|
|
744
|
+
/**
|
|
745
|
+
* The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.
|
|
746
|
+
*/
|
|
747
|
+
export type GitModuleSourceID = string & {
|
|
748
|
+
__GitModuleSourceID: never;
|
|
749
|
+
};
|
|
750
|
+
export type GitRefTreeOpts = {
|
|
751
|
+
/**
|
|
752
|
+
* Set to true to discard .git directory.
|
|
753
|
+
*/
|
|
754
|
+
discardGitDir?: boolean;
|
|
755
|
+
};
|
|
756
|
+
/**
|
|
757
|
+
* The `GitRefID` scalar type represents an identifier for an object of type GitRef.
|
|
758
|
+
*/
|
|
759
|
+
export type GitRefID = string & {
|
|
760
|
+
__GitRefID: never;
|
|
761
|
+
};
|
|
762
|
+
export type GitRepositoryTagsOpts = {
|
|
763
|
+
/**
|
|
764
|
+
* Glob patterns (e.g., "refs/tags/v*").
|
|
765
|
+
*/
|
|
766
|
+
patterns?: string[];
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.
|
|
770
|
+
*/
|
|
771
|
+
export type GitRepositoryID = string & {
|
|
772
|
+
__GitRepositoryID: never;
|
|
773
|
+
};
|
|
774
|
+
export type HostDirectoryOpts = {
|
|
775
|
+
/**
|
|
776
|
+
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
777
|
+
*/
|
|
778
|
+
exclude?: string[];
|
|
779
|
+
/**
|
|
780
|
+
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
781
|
+
*/
|
|
782
|
+
include?: string[];
|
|
783
|
+
};
|
|
784
|
+
export type HostServiceOpts = {
|
|
785
|
+
/**
|
|
786
|
+
* Upstream host to forward traffic to.
|
|
787
|
+
*/
|
|
788
|
+
host?: string;
|
|
789
|
+
/**
|
|
790
|
+
* Ports to expose via the service, forwarding through the host network.
|
|
791
|
+
*
|
|
792
|
+
* If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
|
|
793
|
+
*
|
|
794
|
+
* An empty set of ports is not valid; an error will be returned.
|
|
795
|
+
*/
|
|
796
|
+
ports: PortForward[];
|
|
797
|
+
};
|
|
798
|
+
export type HostTunnelOpts = {
|
|
799
|
+
/**
|
|
800
|
+
* Configure explicit port forwarding rules for the tunnel.
|
|
801
|
+
*
|
|
802
|
+
* If a port's frontend is unspecified or 0, a random port will be chosen by the host.
|
|
803
|
+
*
|
|
804
|
+
* 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.
|
|
805
|
+
*
|
|
806
|
+
* If ports are given and native is true, the ports are additive.
|
|
807
|
+
*/
|
|
808
|
+
ports?: PortForward[];
|
|
809
|
+
/**
|
|
810
|
+
* Map each service port to the same port on the host, as if the service were running natively.
|
|
811
|
+
*
|
|
812
|
+
* Note: enabling may result in port conflicts.
|
|
813
|
+
*/
|
|
814
|
+
native?: boolean;
|
|
815
|
+
};
|
|
816
|
+
/**
|
|
817
|
+
* The `HostID` scalar type represents an identifier for an object of type Host.
|
|
818
|
+
*/
|
|
819
|
+
export type HostID = string & {
|
|
820
|
+
__HostID: never;
|
|
821
|
+
};
|
|
822
|
+
/**
|
|
823
|
+
* Compression algorithm to use for image layers.
|
|
824
|
+
*/
|
|
825
|
+
export declare enum ImageLayerCompression {
|
|
826
|
+
Estargz = "EStarGZ",
|
|
827
|
+
Gzip = "Gzip",
|
|
828
|
+
Uncompressed = "Uncompressed",
|
|
829
|
+
Zstd = "Zstd"
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Mediatypes to use in published or exported image metadata.
|
|
833
|
+
*/
|
|
834
|
+
export declare enum ImageMediaTypes {
|
|
835
|
+
Dockermediatypes = "DockerMediaTypes",
|
|
836
|
+
Ocimediatypes = "OCIMediaTypes"
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef.
|
|
840
|
+
*/
|
|
841
|
+
export type InputTypeDefID = string & {
|
|
842
|
+
__InputTypeDefID: never;
|
|
843
|
+
};
|
|
844
|
+
/**
|
|
845
|
+
* The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
|
|
846
|
+
*/
|
|
847
|
+
export type InterfaceTypeDefID = string & {
|
|
848
|
+
__InterfaceTypeDefID: never;
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* An arbitrary JSON-encoded value.
|
|
852
|
+
*/
|
|
853
|
+
export type JSON = string & {
|
|
854
|
+
__JSON: never;
|
|
855
|
+
};
|
|
856
|
+
/**
|
|
857
|
+
* The `LabelID` scalar type represents an identifier for an object of type Label.
|
|
858
|
+
*/
|
|
859
|
+
export type LabelID = string & {
|
|
860
|
+
__LabelID: never;
|
|
861
|
+
};
|
|
862
|
+
/**
|
|
863
|
+
* The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.
|
|
864
|
+
*/
|
|
865
|
+
export type ListTypeDefID = string & {
|
|
866
|
+
__ListTypeDefID: never;
|
|
867
|
+
};
|
|
868
|
+
/**
|
|
869
|
+
* The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.
|
|
870
|
+
*/
|
|
871
|
+
export type LocalModuleSourceID = string & {
|
|
872
|
+
__LocalModuleSourceID: never;
|
|
873
|
+
};
|
|
874
|
+
export type ModuleWithSourceOpts = {
|
|
875
|
+
/**
|
|
876
|
+
* The engine version to upgrade to.
|
|
877
|
+
*/
|
|
878
|
+
engineVersion?: string;
|
|
879
|
+
};
|
|
880
|
+
/**
|
|
881
|
+
* The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.
|
|
882
|
+
*/
|
|
883
|
+
export type ModuleDependencyID = string & {
|
|
884
|
+
__ModuleDependencyID: never;
|
|
885
|
+
};
|
|
886
|
+
/**
|
|
887
|
+
* The `ModuleID` scalar type represents an identifier for an object of type Module.
|
|
888
|
+
*/
|
|
889
|
+
export type ModuleID = string & {
|
|
890
|
+
__ModuleID: never;
|
|
891
|
+
};
|
|
892
|
+
export type ModuleSourceAsModuleOpts = {
|
|
893
|
+
/**
|
|
894
|
+
* The engine version to upgrade to.
|
|
895
|
+
*/
|
|
896
|
+
engineVersion?: string;
|
|
897
|
+
};
|
|
898
|
+
export type ModuleSourceResolveDirectoryFromCallerOpts = {
|
|
899
|
+
/**
|
|
900
|
+
* If set, the name of the view to apply to the path.
|
|
901
|
+
*/
|
|
902
|
+
viewName?: string;
|
|
903
|
+
/**
|
|
904
|
+
* Patterns to ignore when loading the directory.
|
|
905
|
+
*/
|
|
906
|
+
ignore?: string[];
|
|
907
|
+
};
|
|
908
|
+
export type ModuleSourceWithInitOpts = {
|
|
909
|
+
/**
|
|
910
|
+
* Merge module dependencies into the current project's
|
|
911
|
+
*/
|
|
912
|
+
merge?: boolean;
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.
|
|
916
|
+
*/
|
|
917
|
+
export type ModuleSourceID = string & {
|
|
918
|
+
__ModuleSourceID: never;
|
|
919
|
+
};
|
|
920
|
+
/**
|
|
921
|
+
* The kind of module source.
|
|
922
|
+
*/
|
|
923
|
+
export declare enum ModuleSourceKind {
|
|
924
|
+
GitSource = "GIT_SOURCE",
|
|
925
|
+
LocalSource = "LOCAL_SOURCE"
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* The `ModuleSourceViewID` scalar type represents an identifier for an object of type ModuleSourceView.
|
|
929
|
+
*/
|
|
930
|
+
export type ModuleSourceViewID = string & {
|
|
931
|
+
__ModuleSourceViewID: never;
|
|
932
|
+
};
|
|
933
|
+
/**
|
|
934
|
+
* Transport layer network protocol associated to a port.
|
|
935
|
+
*/
|
|
936
|
+
export declare enum NetworkProtocol {
|
|
937
|
+
Tcp = "TCP",
|
|
938
|
+
Udp = "UDP"
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.
|
|
942
|
+
*/
|
|
943
|
+
export type ObjectTypeDefID = string & {
|
|
944
|
+
__ObjectTypeDefID: never;
|
|
945
|
+
};
|
|
946
|
+
export type PipelineLabel = {
|
|
947
|
+
/**
|
|
948
|
+
* Label name.
|
|
949
|
+
*/
|
|
950
|
+
name: string;
|
|
951
|
+
/**
|
|
952
|
+
* Label value.
|
|
953
|
+
*/
|
|
954
|
+
value: string;
|
|
955
|
+
};
|
|
956
|
+
/**
|
|
957
|
+
* The platform config OS and architecture in a Container.
|
|
958
|
+
*
|
|
959
|
+
* The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").
|
|
960
|
+
*/
|
|
961
|
+
export type Platform = string & {
|
|
962
|
+
__Platform: never;
|
|
963
|
+
};
|
|
964
|
+
export type PortForward = {
|
|
965
|
+
/**
|
|
966
|
+
* Destination port for traffic.
|
|
967
|
+
*/
|
|
968
|
+
backend: number;
|
|
969
|
+
/**
|
|
970
|
+
* Port to expose to clients. If unspecified, a default will be chosen.
|
|
971
|
+
*/
|
|
972
|
+
frontend?: number;
|
|
973
|
+
/**
|
|
974
|
+
* Transport layer protocol to use for traffic.
|
|
975
|
+
*/
|
|
976
|
+
protocol?: NetworkProtocol;
|
|
977
|
+
};
|
|
978
|
+
/**
|
|
979
|
+
* The `PortID` scalar type represents an identifier for an object of type Port.
|
|
980
|
+
*/
|
|
981
|
+
export type PortID = string & {
|
|
982
|
+
__PortID: never;
|
|
983
|
+
};
|
|
984
|
+
export type ClientContainerOpts = {
|
|
985
|
+
/**
|
|
986
|
+
* Platform to initialize the container with.
|
|
987
|
+
*/
|
|
988
|
+
platform?: Platform;
|
|
989
|
+
};
|
|
990
|
+
export type ClientGitOpts = {
|
|
991
|
+
/**
|
|
992
|
+
* DEPRECATED: Set to true to keep .git directory.
|
|
993
|
+
*/
|
|
994
|
+
keepGitDir?: boolean;
|
|
995
|
+
/**
|
|
996
|
+
* A service which must be started before the repo is fetched.
|
|
997
|
+
*/
|
|
998
|
+
experimentalServiceHost?: Service;
|
|
999
|
+
/**
|
|
1000
|
+
* Set SSH known hosts
|
|
1001
|
+
*/
|
|
1002
|
+
sshKnownHosts?: string;
|
|
1003
|
+
/**
|
|
1004
|
+
* Set SSH auth socket
|
|
1005
|
+
*/
|
|
1006
|
+
sshAuthSocket?: Socket;
|
|
1007
|
+
};
|
|
1008
|
+
export type ClientHttpOpts = {
|
|
1009
|
+
/**
|
|
1010
|
+
* A service which must be started before the URL is fetched.
|
|
1011
|
+
*/
|
|
1012
|
+
experimentalServiceHost?: Service;
|
|
1013
|
+
};
|
|
1014
|
+
export type ClientModuleDependencyOpts = {
|
|
1015
|
+
/**
|
|
1016
|
+
* 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.
|
|
1017
|
+
*/
|
|
1018
|
+
name?: string;
|
|
1019
|
+
};
|
|
1020
|
+
export type ClientModuleSourceOpts = {
|
|
1021
|
+
/**
|
|
1022
|
+
* If true, enforce that the source is a stable version for source kinds that support versioning.
|
|
1023
|
+
*/
|
|
1024
|
+
stable?: boolean;
|
|
1025
|
+
/**
|
|
1026
|
+
* The relative path to the module root from the host directory
|
|
1027
|
+
*/
|
|
1028
|
+
relHostPath?: string;
|
|
1029
|
+
};
|
|
1030
|
+
export type ClientSecretOpts = {
|
|
1031
|
+
accessor?: string;
|
|
1032
|
+
};
|
|
1033
|
+
/**
|
|
1034
|
+
* The `ScalarTypeDefID` scalar type represents an identifier for an object of type ScalarTypeDef.
|
|
1035
|
+
*/
|
|
1036
|
+
export type ScalarTypeDefID = string & {
|
|
1037
|
+
__ScalarTypeDefID: never;
|
|
1038
|
+
};
|
|
1039
|
+
/**
|
|
1040
|
+
* The `SecretID` scalar type represents an identifier for an object of type Secret.
|
|
1041
|
+
*/
|
|
1042
|
+
export type SecretID = string & {
|
|
1043
|
+
__SecretID: never;
|
|
1044
|
+
};
|
|
1045
|
+
export type ServiceEndpointOpts = {
|
|
1046
|
+
/**
|
|
1047
|
+
* The exposed port number for the endpoint
|
|
1048
|
+
*/
|
|
1049
|
+
port?: number;
|
|
1050
|
+
/**
|
|
1051
|
+
* Return a URL with the given scheme, eg. http for http://
|
|
1052
|
+
*/
|
|
1053
|
+
scheme?: string;
|
|
1054
|
+
};
|
|
1055
|
+
export type ServiceStopOpts = {
|
|
1056
|
+
/**
|
|
1057
|
+
* Immediately kill the service without waiting for a graceful exit
|
|
1058
|
+
*/
|
|
1059
|
+
kill?: boolean;
|
|
1060
|
+
};
|
|
1061
|
+
export type ServiceUpOpts = {
|
|
1062
|
+
/**
|
|
1063
|
+
* List of frontend/backend port mappings to forward.
|
|
1064
|
+
*
|
|
1065
|
+
* Frontend is the port accepting traffic on the host, backend is the service port.
|
|
1066
|
+
*/
|
|
1067
|
+
ports?: PortForward[];
|
|
1068
|
+
/**
|
|
1069
|
+
* Bind each tunnel port to a random port on the host.
|
|
1070
|
+
*/
|
|
1071
|
+
random?: boolean;
|
|
1072
|
+
};
|
|
1073
|
+
/**
|
|
1074
|
+
* The `ServiceID` scalar type represents an identifier for an object of type Service.
|
|
1075
|
+
*/
|
|
1076
|
+
export type ServiceID = string & {
|
|
1077
|
+
__ServiceID: never;
|
|
1078
|
+
};
|
|
1079
|
+
/**
|
|
1080
|
+
* The `SocketID` scalar type represents an identifier for an object of type Socket.
|
|
1081
|
+
*/
|
|
1082
|
+
export type SocketID = string & {
|
|
1083
|
+
__SocketID: never;
|
|
1084
|
+
};
|
|
1085
|
+
/**
|
|
1086
|
+
* The `TerminalID` scalar type represents an identifier for an object of type Terminal.
|
|
1087
|
+
*/
|
|
1088
|
+
export type TerminalID = string & {
|
|
1089
|
+
__TerminalID: never;
|
|
1090
|
+
};
|
|
1091
|
+
export type TypeDefWithEnumOpts = {
|
|
1092
|
+
/**
|
|
1093
|
+
* A doc string for the enum, if any
|
|
1094
|
+
*/
|
|
1095
|
+
description?: string;
|
|
1096
|
+
};
|
|
1097
|
+
export type TypeDefWithEnumValueOpts = {
|
|
1098
|
+
/**
|
|
1099
|
+
* A doc string for the value, if any
|
|
1100
|
+
*/
|
|
1101
|
+
description?: string;
|
|
1102
|
+
};
|
|
1103
|
+
export type TypeDefWithFieldOpts = {
|
|
1104
|
+
/**
|
|
1105
|
+
* A doc string for the field, if any
|
|
1106
|
+
*/
|
|
1107
|
+
description?: string;
|
|
1108
|
+
};
|
|
1109
|
+
export type TypeDefWithInterfaceOpts = {
|
|
1110
|
+
description?: string;
|
|
1111
|
+
};
|
|
1112
|
+
export type TypeDefWithObjectOpts = {
|
|
1113
|
+
description?: string;
|
|
1114
|
+
};
|
|
1115
|
+
export type TypeDefWithScalarOpts = {
|
|
1116
|
+
description?: string;
|
|
1117
|
+
};
|
|
1118
|
+
/**
|
|
1119
|
+
* The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.
|
|
1120
|
+
*/
|
|
1121
|
+
export type TypeDefID = string & {
|
|
1122
|
+
__TypeDefID: never;
|
|
1123
|
+
};
|
|
1124
|
+
/**
|
|
1125
|
+
* Distinguishes the different kinds of TypeDefs.
|
|
1126
|
+
*/
|
|
1127
|
+
export declare enum TypeDefKind {
|
|
1128
|
+
/**
|
|
1129
|
+
* A boolean value.
|
|
1130
|
+
*/
|
|
1131
|
+
BooleanKind = "BOOLEAN_KIND",
|
|
1132
|
+
/**
|
|
1133
|
+
* A GraphQL enum type and its values
|
|
1134
|
+
*
|
|
1135
|
+
* Always paired with an EnumTypeDef.
|
|
1136
|
+
*/
|
|
1137
|
+
EnumKind = "ENUM_KIND",
|
|
1138
|
+
/**
|
|
1139
|
+
* A graphql input type, used only when representing the core API via TypeDefs.
|
|
1140
|
+
*/
|
|
1141
|
+
InputKind = "INPUT_KIND",
|
|
1142
|
+
/**
|
|
1143
|
+
* An integer value.
|
|
1144
|
+
*/
|
|
1145
|
+
IntegerKind = "INTEGER_KIND",
|
|
1146
|
+
/**
|
|
1147
|
+
* A named type of functions that can be matched+implemented by other objects+interfaces.
|
|
1148
|
+
*
|
|
1149
|
+
* Always paired with an InterfaceTypeDef.
|
|
1150
|
+
*/
|
|
1151
|
+
InterfaceKind = "INTERFACE_KIND",
|
|
1152
|
+
/**
|
|
1153
|
+
* A list of values all having the same type.
|
|
1154
|
+
*
|
|
1155
|
+
* Always paired with a ListTypeDef.
|
|
1156
|
+
*/
|
|
1157
|
+
ListKind = "LIST_KIND",
|
|
1158
|
+
/**
|
|
1159
|
+
* A named type defined in the GraphQL schema, with fields and functions.
|
|
1160
|
+
*
|
|
1161
|
+
* Always paired with an ObjectTypeDef.
|
|
1162
|
+
*/
|
|
1163
|
+
ObjectKind = "OBJECT_KIND",
|
|
1164
|
+
/**
|
|
1165
|
+
* A scalar value of any basic kind.
|
|
1166
|
+
*/
|
|
1167
|
+
ScalarKind = "SCALAR_KIND",
|
|
1168
|
+
/**
|
|
1169
|
+
* A string value.
|
|
1170
|
+
*/
|
|
1171
|
+
StringKind = "STRING_KIND",
|
|
1172
|
+
/**
|
|
1173
|
+
* A special kind used to signify that no value is returned.
|
|
1174
|
+
*
|
|
1175
|
+
* 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.
|
|
1176
|
+
*/
|
|
1177
|
+
VoidKind = "VOID_KIND"
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* The absence of a value.
|
|
1181
|
+
*
|
|
1182
|
+
* A Null Void is used as a placeholder for resolvers that do not return anything.
|
|
1183
|
+
*/
|
|
1184
|
+
export type Void = string & {
|
|
1185
|
+
__Void: never;
|
|
1186
|
+
};
|
|
1187
|
+
export type __TypeEnumValuesOpts = {
|
|
1188
|
+
includeDeprecated?: boolean;
|
|
1189
|
+
};
|
|
1190
|
+
export type __TypeFieldsOpts = {
|
|
1191
|
+
includeDeprecated?: boolean;
|
|
1192
|
+
};
|
|
1193
|
+
/**
|
|
1194
|
+
* A directory whose contents persist across runs.
|
|
1195
|
+
*/
|
|
1196
|
+
export declare class CacheVolume extends BaseClient {
|
|
1197
|
+
private readonly _id?;
|
|
1198
|
+
/**
|
|
1199
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1200
|
+
*/
|
|
1201
|
+
constructor(parent?: {
|
|
1202
|
+
queryTree?: QueryTree[];
|
|
1203
|
+
ctx: Context;
|
|
1204
|
+
}, _id?: CacheVolumeID);
|
|
1205
|
+
/**
|
|
1206
|
+
* A unique identifier for this CacheVolume.
|
|
1207
|
+
*/
|
|
1208
|
+
id: () => Promise<CacheVolumeID>;
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* An OCI-compatible container, also known as a Docker container.
|
|
1212
|
+
*/
|
|
1213
|
+
export declare class Container extends BaseClient {
|
|
1214
|
+
private readonly _id?;
|
|
1215
|
+
private readonly _envVariable?;
|
|
1216
|
+
private readonly _export?;
|
|
1217
|
+
private readonly _imageRef?;
|
|
1218
|
+
private readonly _label?;
|
|
1219
|
+
private readonly _platform?;
|
|
1220
|
+
private readonly _publish?;
|
|
1221
|
+
private readonly _stderr?;
|
|
1222
|
+
private readonly _stdout?;
|
|
1223
|
+
private readonly _sync?;
|
|
1224
|
+
private readonly _up?;
|
|
1225
|
+
private readonly _user?;
|
|
1226
|
+
private readonly _workdir?;
|
|
1227
|
+
/**
|
|
1228
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1229
|
+
*/
|
|
1230
|
+
constructor(parent?: {
|
|
1231
|
+
queryTree?: QueryTree[];
|
|
1232
|
+
ctx: Context;
|
|
1233
|
+
}, _id?: ContainerID, _envVariable?: string, _export?: string, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _up?: Void, _user?: string, _workdir?: string);
|
|
1234
|
+
/**
|
|
1235
|
+
* A unique identifier for this Container.
|
|
1236
|
+
*/
|
|
1237
|
+
id: () => Promise<ContainerID>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Turn the container into a Service.
|
|
1240
|
+
*
|
|
1241
|
+
* Be sure to set any exposed ports before this conversion.
|
|
1242
|
+
*/
|
|
1243
|
+
asService: () => Service;
|
|
1244
|
+
/**
|
|
1245
|
+
* Returns a File representing the container serialized to a tarball.
|
|
1246
|
+
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
1247
|
+
*
|
|
1248
|
+
* Used for multi-platform images.
|
|
1249
|
+
* @param opts.forcedCompression Force each layer of the image to use the specified compression algorithm.
|
|
1250
|
+
*
|
|
1251
|
+
* 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.
|
|
1252
|
+
* @param opts.mediaTypes Use the specified media types for the image's layers.
|
|
1253
|
+
*
|
|
1254
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
1255
|
+
*/
|
|
1256
|
+
asTarball: (opts?: ContainerAsTarballOpts) => File;
|
|
1257
|
+
/**
|
|
1258
|
+
* Initializes this container from a Dockerfile build.
|
|
1259
|
+
* @param context Directory context used by the Dockerfile.
|
|
1260
|
+
* @param opts.dockerfile Path to the Dockerfile to use.
|
|
1261
|
+
* @param opts.target Target build stage to build.
|
|
1262
|
+
* @param opts.buildArgs Additional build arguments.
|
|
1263
|
+
* @param opts.secrets Secrets to pass to the build.
|
|
1264
|
+
*
|
|
1265
|
+
* They will be mounted at /run/secrets/[secret-name] in the build container
|
|
1266
|
+
*
|
|
1267
|
+
* 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)](http://example.com?token=$(cat /run/secrets/my-secret))
|
|
1268
|
+
*/
|
|
1269
|
+
build: (context: Directory, opts?: ContainerBuildOpts) => Container;
|
|
1270
|
+
/**
|
|
1271
|
+
* Retrieves default arguments for future commands.
|
|
1272
|
+
*/
|
|
1273
|
+
defaultArgs: () => Promise<string[]>;
|
|
1274
|
+
/**
|
|
1275
|
+
* Retrieves a directory at the given path.
|
|
1276
|
+
*
|
|
1277
|
+
* Mounts are included.
|
|
1278
|
+
* @param path The path of the directory to retrieve (e.g., "./src").
|
|
1279
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1280
|
+
*/
|
|
1281
|
+
directory: (path: string, opts?: ContainerDirectoryOpts) => Directory;
|
|
1282
|
+
/**
|
|
1283
|
+
* Retrieves entrypoint to be prepended to the arguments of all commands.
|
|
1284
|
+
*/
|
|
1285
|
+
entrypoint: () => Promise<string[]>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Retrieves the value of the specified environment variable.
|
|
1288
|
+
* @param name The name of the environment variable to retrieve (e.g., "PATH").
|
|
1289
|
+
*/
|
|
1290
|
+
envVariable: (name: string) => Promise<string>;
|
|
1291
|
+
/**
|
|
1292
|
+
* Retrieves the list of environment variables passed to commands.
|
|
1293
|
+
*/
|
|
1294
|
+
envVariables: () => Promise<EnvVariable[]>;
|
|
1295
|
+
/**
|
|
1296
|
+
* EXPERIMENTAL API! Subject to change/removal at any time.
|
|
1297
|
+
*
|
|
1298
|
+
* Configures all available GPUs on the host to be accessible to this container.
|
|
1299
|
+
*
|
|
1300
|
+
* This currently works for Nvidia devices only.
|
|
1301
|
+
*/
|
|
1302
|
+
experimentalWithAllGPUs: () => Container;
|
|
1303
|
+
/**
|
|
1304
|
+
* EXPERIMENTAL API! Subject to change/removal at any time.
|
|
1305
|
+
*
|
|
1306
|
+
* Configures the provided list of devices to be accessible to this container.
|
|
1307
|
+
*
|
|
1308
|
+
* This currently works for Nvidia devices only.
|
|
1309
|
+
* @param devices List of devices to be accessible to this container.
|
|
1310
|
+
*/
|
|
1311
|
+
experimentalWithGPU: (devices: string[]) => Container;
|
|
1312
|
+
/**
|
|
1313
|
+
* Writes the container as an OCI tarball to the destination file path on the host.
|
|
1314
|
+
*
|
|
1315
|
+
* It can also export platform variants.
|
|
1316
|
+
* @param path Host's destination path (e.g., "./tarball").
|
|
1317
|
+
*
|
|
1318
|
+
* Path can be relative to the engine's workdir or absolute.
|
|
1319
|
+
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
1320
|
+
*
|
|
1321
|
+
* Used for multi-platform image.
|
|
1322
|
+
* @param opts.forcedCompression Force each layer of the exported image to use the specified compression algorithm.
|
|
1323
|
+
*
|
|
1324
|
+
* 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.
|
|
1325
|
+
* @param opts.mediaTypes Use the specified media types for the exported image's layers.
|
|
1326
|
+
*
|
|
1327
|
+
* Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
|
1328
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1329
|
+
*/
|
|
1330
|
+
export: (path: string, opts?: ContainerExportOpts) => Promise<string>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Retrieves the list of exposed ports.
|
|
1333
|
+
*
|
|
1334
|
+
* This includes ports already exposed by the image, even if not explicitly added with dagger.
|
|
1335
|
+
*/
|
|
1336
|
+
exposedPorts: () => Promise<Port[]>;
|
|
1337
|
+
/**
|
|
1338
|
+
* Retrieves a file at the given path.
|
|
1339
|
+
*
|
|
1340
|
+
* Mounts are included.
|
|
1341
|
+
* @param path The path of the file to retrieve (e.g., "./README.md").
|
|
1342
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1343
|
+
*/
|
|
1344
|
+
file: (path: string, opts?: ContainerFileOpts) => File;
|
|
1345
|
+
/**
|
|
1346
|
+
* Initializes this container from a pulled base image.
|
|
1347
|
+
* @param address Image's address from its registry.
|
|
1348
|
+
*
|
|
1349
|
+
* Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main").
|
|
1350
|
+
*/
|
|
1351
|
+
from: (address: string) => Container;
|
|
1352
|
+
/**
|
|
1353
|
+
* The unique image reference which can only be retrieved immediately after the 'Container.From' call.
|
|
1354
|
+
*/
|
|
1355
|
+
imageRef: () => Promise<string>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Reads the container from an OCI tarball.
|
|
1358
|
+
* @param source File to read the container from.
|
|
1359
|
+
* @param opts.tag Identifies the tag to import from the archive, if the archive bundles multiple tags.
|
|
1360
|
+
*/
|
|
1361
|
+
import_: (source: File, opts?: ContainerImportOpts) => Container;
|
|
1362
|
+
/**
|
|
1363
|
+
* Retrieves the value of the specified label.
|
|
1364
|
+
* @param name The name of the label (e.g., "org.opencontainers.artifact.created").
|
|
1365
|
+
*/
|
|
1366
|
+
label: (name: string) => Promise<string>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Retrieves the list of labels passed to container.
|
|
1369
|
+
*/
|
|
1370
|
+
labels: () => Promise<Label[]>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Retrieves the list of paths where a directory is mounted.
|
|
1373
|
+
*/
|
|
1374
|
+
mounts: () => Promise<string[]>;
|
|
1375
|
+
/**
|
|
1376
|
+
* The platform this container executes and publishes as.
|
|
1377
|
+
*/
|
|
1378
|
+
platform: () => Promise<Platform>;
|
|
1379
|
+
/**
|
|
1380
|
+
* Publishes this container as a new image to the specified address.
|
|
1381
|
+
*
|
|
1382
|
+
* Publish returns a fully qualified ref.
|
|
1383
|
+
*
|
|
1384
|
+
* It can also publish platform variants.
|
|
1385
|
+
* @param address Registry's address to publish the image to.
|
|
1386
|
+
*
|
|
1387
|
+
* Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
|
|
1388
|
+
* @param opts.platformVariants Identifiers for other platform specific containers.
|
|
1389
|
+
*
|
|
1390
|
+
* Used for multi-platform image.
|
|
1391
|
+
* @param opts.forcedCompression Force each layer of the published image to use the specified compression algorithm.
|
|
1392
|
+
*
|
|
1393
|
+
* 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.
|
|
1394
|
+
* @param opts.mediaTypes Use the specified media types for the published image's layers.
|
|
1395
|
+
*
|
|
1396
|
+
* Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
|
|
1397
|
+
*/
|
|
1398
|
+
publish: (address: string, opts?: ContainerPublishOpts) => Promise<string>;
|
|
1399
|
+
/**
|
|
1400
|
+
* Retrieves this container's root filesystem. Mounts are not included.
|
|
1401
|
+
*/
|
|
1402
|
+
rootfs: () => Directory;
|
|
1403
|
+
/**
|
|
1404
|
+
* The error stream of the last executed command.
|
|
1405
|
+
*
|
|
1406
|
+
* Will execute default command if none is set, or error if there's no default.
|
|
1407
|
+
*/
|
|
1408
|
+
stderr: () => Promise<string>;
|
|
1409
|
+
/**
|
|
1410
|
+
* The output stream of the last executed command.
|
|
1411
|
+
*
|
|
1412
|
+
* Will execute default command if none is set, or error if there's no default.
|
|
1413
|
+
*/
|
|
1414
|
+
stdout: () => Promise<string>;
|
|
1415
|
+
/**
|
|
1416
|
+
* Forces evaluation of the pipeline in the engine.
|
|
1417
|
+
*
|
|
1418
|
+
* It doesn't run the default command if no exec has been set.
|
|
1419
|
+
*/
|
|
1420
|
+
sync: () => Promise<Container>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
|
|
1423
|
+
* @param opts.cmd If set, override the container's default terminal command and invoke these command arguments instead.
|
|
1424
|
+
* @param opts.experimentalPrivilegedNesting Provides Dagger access to the executed command.
|
|
1425
|
+
*
|
|
1426
|
+
* 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.
|
|
1427
|
+
* @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.
|
|
1428
|
+
*/
|
|
1429
|
+
terminal: (opts?: ContainerTerminalOpts) => Container;
|
|
1430
|
+
/**
|
|
1431
|
+
* Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
|
|
1432
|
+
*
|
|
1433
|
+
* Be sure to set any exposed ports before calling this api.
|
|
1434
|
+
* @param opts.ports List of frontend/backend port mappings to forward.
|
|
1435
|
+
*
|
|
1436
|
+
* Frontend is the port accepting traffic on the host, backend is the service port.
|
|
1437
|
+
* @param opts.random Bind each tunnel port to a random port on the host.
|
|
1438
|
+
*/
|
|
1439
|
+
up: (opts?: ContainerUpOpts) => Promise<void>;
|
|
1440
|
+
/**
|
|
1441
|
+
* Retrieves the user to be set for all commands.
|
|
1442
|
+
*/
|
|
1443
|
+
user: () => Promise<string>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Retrieves this container plus the given OCI anotation.
|
|
1446
|
+
* @param name The name of the annotation.
|
|
1447
|
+
* @param value The value of the annotation.
|
|
1448
|
+
*/
|
|
1449
|
+
withAnnotation: (name: string, value: string) => Container;
|
|
1450
|
+
/**
|
|
1451
|
+
* Configures default arguments for future commands.
|
|
1452
|
+
* @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
|
|
1453
|
+
*/
|
|
1454
|
+
withDefaultArgs: (args: string[]) => Container;
|
|
1455
|
+
/**
|
|
1456
|
+
* Set the default command to invoke for the container's terminal API.
|
|
1457
|
+
* @param args The args of the command.
|
|
1458
|
+
* @param opts.experimentalPrivilegedNesting Provides Dagger access to the executed command.
|
|
1459
|
+
*
|
|
1460
|
+
* 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.
|
|
1461
|
+
* @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.
|
|
1462
|
+
*/
|
|
1463
|
+
withDefaultTerminalCmd: (args: string[], opts?: ContainerWithDefaultTerminalCmdOpts) => Container;
|
|
1464
|
+
/**
|
|
1465
|
+
* Retrieves this container plus a directory written at the given path.
|
|
1466
|
+
* @param path Location of the written directory (e.g., "/tmp/directory").
|
|
1467
|
+
* @param directory Identifier of the directory to write
|
|
1468
|
+
* @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
|
|
1469
|
+
* @param opts.include Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
|
|
1470
|
+
* @param opts.owner A user:group to set for the directory and its contents.
|
|
1471
|
+
*
|
|
1472
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1473
|
+
*
|
|
1474
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1475
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1476
|
+
*/
|
|
1477
|
+
withDirectory: (path: string, directory: Directory, opts?: ContainerWithDirectoryOpts) => Container;
|
|
1478
|
+
/**
|
|
1479
|
+
* Retrieves this container but with a different command entrypoint.
|
|
1480
|
+
* @param args Entrypoint to use for future executions (e.g., ["go", "run"]).
|
|
1481
|
+
* @param opts.keepDefaultArgs Don't remove the default arguments when setting the entrypoint.
|
|
1482
|
+
*/
|
|
1483
|
+
withEntrypoint: (args: string[], opts?: ContainerWithEntrypointOpts) => Container;
|
|
1484
|
+
/**
|
|
1485
|
+
* Retrieves this container plus the given environment variable.
|
|
1486
|
+
* @param name The name of the environment variable (e.g., "HOST").
|
|
1487
|
+
* @param value The value of the environment variable. (e.g., "localhost").
|
|
1488
|
+
* @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").
|
|
1489
|
+
*/
|
|
1490
|
+
withEnvVariable: (name: string, value: string, opts?: ContainerWithEnvVariableOpts) => Container;
|
|
1491
|
+
/**
|
|
1492
|
+
* Retrieves this container after executing the specified command inside it.
|
|
1493
|
+
* @param args Command to run instead of the container's default command (e.g., ["run", "main.go"]).
|
|
1494
|
+
*
|
|
1495
|
+
* If empty, the container's default command is used.
|
|
1496
|
+
* @param opts.useEntrypoint If the container has an entrypoint, prepend it to the args.
|
|
1497
|
+
* @param opts.stdin Content to write to the command's standard input before closing (e.g., "Hello world").
|
|
1498
|
+
* @param opts.redirectStdout Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
|
|
1499
|
+
* @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
|
1500
|
+
* @param opts.experimentalPrivilegedNesting Provides Dagger access to the executed command.
|
|
1501
|
+
*
|
|
1502
|
+
* 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.
|
|
1503
|
+
* @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.
|
|
1504
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1505
|
+
* @param opts.noInit If set, skip the automatic init process injected into containers by default.
|
|
1506
|
+
*
|
|
1507
|
+
* This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
|
|
1508
|
+
*/
|
|
1509
|
+
withExec: (args: string[], opts?: ContainerWithExecOpts) => Container;
|
|
1510
|
+
/**
|
|
1511
|
+
* Expose a network port.
|
|
1512
|
+
*
|
|
1513
|
+
* Exposed ports serve two purposes:
|
|
1514
|
+
*
|
|
1515
|
+
* - For health checks and introspection, when running services
|
|
1516
|
+
*
|
|
1517
|
+
* - For setting the EXPOSE OCI field when publishing the container
|
|
1518
|
+
* @param port Port number to expose
|
|
1519
|
+
* @param opts.protocol Transport layer network protocol
|
|
1520
|
+
* @param opts.description Optional port description
|
|
1521
|
+
* @param opts.experimentalSkipHealthcheck Skip the health check when run as a service.
|
|
1522
|
+
*/
|
|
1523
|
+
withExposedPort: (port: number, opts?: ContainerWithExposedPortOpts) => Container;
|
|
1524
|
+
/**
|
|
1525
|
+
* Retrieves this container plus the contents of the given file copied to the given path.
|
|
1526
|
+
* @param path Location of the copied file (e.g., "/tmp/file.txt").
|
|
1527
|
+
* @param source Identifier of the file to copy.
|
|
1528
|
+
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
1529
|
+
* @param opts.owner A user:group to set for the file.
|
|
1530
|
+
*
|
|
1531
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1532
|
+
*
|
|
1533
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1534
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1535
|
+
*/
|
|
1536
|
+
withFile: (path: string, source: File, opts?: ContainerWithFileOpts) => Container;
|
|
1537
|
+
/**
|
|
1538
|
+
* Retrieves this container plus the contents of the given files copied to the given path.
|
|
1539
|
+
* @param path Location where copied files should be placed (e.g., "/src").
|
|
1540
|
+
* @param sources Identifiers of the files to copy.
|
|
1541
|
+
* @param opts.permissions Permission given to the copied files (e.g., 0600).
|
|
1542
|
+
* @param opts.owner A user:group to set for the files.
|
|
1543
|
+
*
|
|
1544
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1545
|
+
*
|
|
1546
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1547
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1548
|
+
*/
|
|
1549
|
+
withFiles: (path: string, sources: File[], opts?: ContainerWithFilesOpts) => Container;
|
|
1550
|
+
/**
|
|
1551
|
+
* Indicate that subsequent operations should be featured more prominently in the UI.
|
|
1552
|
+
*/
|
|
1553
|
+
withFocus: () => Container;
|
|
1554
|
+
/**
|
|
1555
|
+
* Retrieves this container plus the given label.
|
|
1556
|
+
* @param name The name of the label (e.g., "org.opencontainers.artifact.created").
|
|
1557
|
+
* @param value The value of the label (e.g., "2023-01-01T00:00:00Z").
|
|
1558
|
+
*/
|
|
1559
|
+
withLabel: (name: string, value: string) => Container;
|
|
1560
|
+
/**
|
|
1561
|
+
* Retrieves this container plus a cache volume mounted at the given path.
|
|
1562
|
+
* @param path Location of the cache directory (e.g., "/cache/node_modules").
|
|
1563
|
+
* @param cache Identifier of the cache volume to mount.
|
|
1564
|
+
* @param opts.source Identifier of the directory to use as the cache volume's root.
|
|
1565
|
+
* @param opts.sharing Sharing mode of the cache volume.
|
|
1566
|
+
* @param opts.owner A user:group to set for the mounted cache directory.
|
|
1567
|
+
*
|
|
1568
|
+
* 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.
|
|
1569
|
+
*
|
|
1570
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1571
|
+
*
|
|
1572
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1573
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1574
|
+
*/
|
|
1575
|
+
withMountedCache: (path: string, cache: CacheVolume, opts?: ContainerWithMountedCacheOpts) => Container;
|
|
1576
|
+
/**
|
|
1577
|
+
* Retrieves this container plus a directory mounted at the given path.
|
|
1578
|
+
* @param path Location of the mounted directory (e.g., "/mnt/directory").
|
|
1579
|
+
* @param source Identifier of the mounted directory.
|
|
1580
|
+
* @param opts.owner A user:group to set for the mounted directory and its contents.
|
|
1581
|
+
*
|
|
1582
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1583
|
+
*
|
|
1584
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1585
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1586
|
+
*/
|
|
1587
|
+
withMountedDirectory: (path: string, source: Directory, opts?: ContainerWithMountedDirectoryOpts) => Container;
|
|
1588
|
+
/**
|
|
1589
|
+
* Retrieves this container plus a file mounted at the given path.
|
|
1590
|
+
* @param path Location of the mounted file (e.g., "/tmp/file.txt").
|
|
1591
|
+
* @param source Identifier of the mounted file.
|
|
1592
|
+
* @param opts.owner A user or user:group to set for the mounted file.
|
|
1593
|
+
*
|
|
1594
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1595
|
+
*
|
|
1596
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1597
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1598
|
+
*/
|
|
1599
|
+
withMountedFile: (path: string, source: File, opts?: ContainerWithMountedFileOpts) => Container;
|
|
1600
|
+
/**
|
|
1601
|
+
* Retrieves this container plus a secret mounted into a file at the given path.
|
|
1602
|
+
* @param path Location of the secret file (e.g., "/tmp/secret.txt").
|
|
1603
|
+
* @param source Identifier of the secret to mount.
|
|
1604
|
+
* @param opts.owner A user:group to set for the mounted secret.
|
|
1605
|
+
*
|
|
1606
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1607
|
+
*
|
|
1608
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1609
|
+
* @param opts.mode Permission given to the mounted secret (e.g., 0600).
|
|
1610
|
+
*
|
|
1611
|
+
* This option requires an owner to be set to be active.
|
|
1612
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1613
|
+
*/
|
|
1614
|
+
withMountedSecret: (path: string, source: Secret, opts?: ContainerWithMountedSecretOpts) => Container;
|
|
1615
|
+
/**
|
|
1616
|
+
* Retrieves this container plus a temporary directory mounted at the given path. Any writes will be ephemeral to a single withExec call; they will not be persisted to subsequent withExecs.
|
|
1617
|
+
* @param path Location of the temporary directory (e.g., "/tmp/temp_dir").
|
|
1618
|
+
* @param opts.size Size of the temporary directory in bytes.
|
|
1619
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1620
|
+
*/
|
|
1621
|
+
withMountedTemp: (path: string, opts?: ContainerWithMountedTempOpts) => Container;
|
|
1622
|
+
/**
|
|
1623
|
+
* Retrieves this container plus a new file written at the given path.
|
|
1624
|
+
* @param path Location of the written file (e.g., "/tmp/file.txt").
|
|
1625
|
+
* @param contents Content of the file to write (e.g., "Hello world!").
|
|
1626
|
+
* @param opts.permissions Permission given to the written file (e.g., 0600).
|
|
1627
|
+
* @param opts.owner A user:group to set for the file.
|
|
1628
|
+
*
|
|
1629
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1630
|
+
*
|
|
1631
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1632
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1633
|
+
*/
|
|
1634
|
+
withNewFile: (path: string, contents: string, opts?: ContainerWithNewFileOpts) => Container;
|
|
1635
|
+
/**
|
|
1636
|
+
* Retrieves this container with a registry authentication for a given address.
|
|
1637
|
+
* @param address Registry's address to bind the authentication to.
|
|
1638
|
+
*
|
|
1639
|
+
* Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
|
1640
|
+
* @param username The username of the registry's account (e.g., "Dagger").
|
|
1641
|
+
* @param secret The API key, password or token to authenticate to this registry.
|
|
1642
|
+
*/
|
|
1643
|
+
withRegistryAuth: (address: string, username: string, secret: Secret) => Container;
|
|
1644
|
+
/**
|
|
1645
|
+
* Retrieves the container with the given directory mounted to /.
|
|
1646
|
+
* @param directory Directory to mount.
|
|
1647
|
+
*/
|
|
1648
|
+
withRootfs: (directory: Directory) => Container;
|
|
1649
|
+
/**
|
|
1650
|
+
* Retrieves this container plus an env variable containing the given secret.
|
|
1651
|
+
* @param name The name of the secret variable (e.g., "API_SECRET").
|
|
1652
|
+
* @param secret The identifier of the secret value.
|
|
1653
|
+
*/
|
|
1654
|
+
withSecretVariable: (name: string, secret: Secret) => Container;
|
|
1655
|
+
/**
|
|
1656
|
+
* Establish a runtime dependency on a service.
|
|
1657
|
+
*
|
|
1658
|
+
* The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
|
|
1659
|
+
*
|
|
1660
|
+
* The service will be reachable from the container via the provided hostname alias.
|
|
1661
|
+
*
|
|
1662
|
+
* The service dependency will also convey to any files or directories produced by the container.
|
|
1663
|
+
* @param alias A name that can be used to reach the service from the container
|
|
1664
|
+
* @param service Identifier of the service container
|
|
1665
|
+
*/
|
|
1666
|
+
withServiceBinding: (alias: string, service: Service) => Container;
|
|
1667
|
+
/**
|
|
1668
|
+
* Retrieves this container plus a socket forwarded to the given Unix socket path.
|
|
1669
|
+
* @param path Location of the forwarded Unix socket (e.g., "/tmp/socket").
|
|
1670
|
+
* @param source Identifier of the socket to forward.
|
|
1671
|
+
* @param opts.owner A user:group to set for the mounted socket.
|
|
1672
|
+
*
|
|
1673
|
+
* The user and group can either be an ID (1000:1000) or a name (foo:bar).
|
|
1674
|
+
*
|
|
1675
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
1676
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1677
|
+
*/
|
|
1678
|
+
withUnixSocket: (path: string, source: Socket, opts?: ContainerWithUnixSocketOpts) => Container;
|
|
1679
|
+
/**
|
|
1680
|
+
* Retrieves this container with a different command user.
|
|
1681
|
+
* @param name The user to set (e.g., "root").
|
|
1682
|
+
*/
|
|
1683
|
+
withUser: (name: string) => Container;
|
|
1684
|
+
/**
|
|
1685
|
+
* Retrieves this container with a different working directory.
|
|
1686
|
+
* @param path The path to set as the working directory (e.g., "/app").
|
|
1687
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1688
|
+
*/
|
|
1689
|
+
withWorkdir: (path: string, opts?: ContainerWithWorkdirOpts) => Container;
|
|
1690
|
+
/**
|
|
1691
|
+
* Retrieves this container minus the given OCI annotation.
|
|
1692
|
+
* @param name The name of the annotation.
|
|
1693
|
+
*/
|
|
1694
|
+
withoutAnnotation: (name: string) => Container;
|
|
1695
|
+
/**
|
|
1696
|
+
* Retrieves this container with unset default arguments for future commands.
|
|
1697
|
+
*/
|
|
1698
|
+
withoutDefaultArgs: () => Container;
|
|
1699
|
+
/**
|
|
1700
|
+
* Retrieves this container with the directory at the given path removed.
|
|
1701
|
+
* @param path Location of the directory to remove (e.g., ".github/").
|
|
1702
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1703
|
+
*/
|
|
1704
|
+
withoutDirectory: (path: string, opts?: ContainerWithoutDirectoryOpts) => Container;
|
|
1705
|
+
/**
|
|
1706
|
+
* Retrieves this container with an unset command entrypoint.
|
|
1707
|
+
* @param opts.keepDefaultArgs Don't remove the default arguments when unsetting the entrypoint.
|
|
1708
|
+
*/
|
|
1709
|
+
withoutEntrypoint: (opts?: ContainerWithoutEntrypointOpts) => Container;
|
|
1710
|
+
/**
|
|
1711
|
+
* Retrieves this container minus the given environment variable.
|
|
1712
|
+
* @param name The name of the environment variable (e.g., "HOST").
|
|
1713
|
+
*/
|
|
1714
|
+
withoutEnvVariable: (name: string) => Container;
|
|
1715
|
+
/**
|
|
1716
|
+
* Unexpose a previously exposed port.
|
|
1717
|
+
* @param port Port number to unexpose
|
|
1718
|
+
* @param opts.protocol Port protocol to unexpose
|
|
1719
|
+
*/
|
|
1720
|
+
withoutExposedPort: (port: number, opts?: ContainerWithoutExposedPortOpts) => Container;
|
|
1721
|
+
/**
|
|
1722
|
+
* Retrieves this container with the file at the given path removed.
|
|
1723
|
+
* @param path Location of the file to remove (e.g., "/file.txt").
|
|
1724
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1725
|
+
*/
|
|
1726
|
+
withoutFile: (path: string, opts?: ContainerWithoutFileOpts) => Container;
|
|
1727
|
+
/**
|
|
1728
|
+
* Retrieves this container with the files at the given paths removed.
|
|
1729
|
+
* @param paths Location of the files to remove (e.g., ["/file.txt"]).
|
|
1730
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
|
1731
|
+
*/
|
|
1732
|
+
withoutFiles: (paths: string[], opts?: ContainerWithoutFilesOpts) => Container;
|
|
1733
|
+
/**
|
|
1734
|
+
* Indicate that subsequent operations should not be featured more prominently in the UI.
|
|
1735
|
+
*
|
|
1736
|
+
* This is the initial state of all containers.
|
|
1737
|
+
*/
|
|
1738
|
+
withoutFocus: () => Container;
|
|
1739
|
+
/**
|
|
1740
|
+
* Retrieves this container minus the given environment label.
|
|
1741
|
+
* @param name The name of the label to remove (e.g., "org.opencontainers.artifact.created").
|
|
1742
|
+
*/
|
|
1743
|
+
withoutLabel: (name: string) => Container;
|
|
1744
|
+
/**
|
|
1745
|
+
* Retrieves this container after unmounting everything at the given path.
|
|
1746
|
+
* @param path Location of the cache directory (e.g., "/cache/node_modules").
|
|
1747
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1748
|
+
*/
|
|
1749
|
+
withoutMount: (path: string, opts?: ContainerWithoutMountOpts) => Container;
|
|
1750
|
+
/**
|
|
1751
|
+
* Retrieves this container without the registry authentication of a given address.
|
|
1752
|
+
* @param address Registry's address to remove the authentication from.
|
|
1753
|
+
*
|
|
1754
|
+
* Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
|
1755
|
+
*/
|
|
1756
|
+
withoutRegistryAuth: (address: string) => Container;
|
|
1757
|
+
/**
|
|
1758
|
+
* Retrieves this container minus the given environment variable containing the secret.
|
|
1759
|
+
* @param name The name of the environment variable (e.g., "HOST").
|
|
1760
|
+
*/
|
|
1761
|
+
withoutSecretVariable: (name: string) => Container;
|
|
1762
|
+
/**
|
|
1763
|
+
* Retrieves this container with a previously added Unix socket removed.
|
|
1764
|
+
* @param path Location of the socket to remove (e.g., "/tmp/socket").
|
|
1765
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
|
1766
|
+
*/
|
|
1767
|
+
withoutUnixSocket: (path: string, opts?: ContainerWithoutUnixSocketOpts) => Container;
|
|
1768
|
+
/**
|
|
1769
|
+
* Retrieves this container with an unset command user.
|
|
1770
|
+
*
|
|
1771
|
+
* Should default to root.
|
|
1772
|
+
*/
|
|
1773
|
+
withoutUser: () => Container;
|
|
1774
|
+
/**
|
|
1775
|
+
* Retrieves this container with an unset working directory.
|
|
1776
|
+
*
|
|
1777
|
+
* Should default to "/".
|
|
1778
|
+
*/
|
|
1779
|
+
withoutWorkdir: () => Container;
|
|
1780
|
+
/**
|
|
1781
|
+
* Retrieves the working directory for all commands.
|
|
1782
|
+
*/
|
|
1783
|
+
workdir: () => Promise<string>;
|
|
1784
|
+
/**
|
|
1785
|
+
* Call the provided function with current Container.
|
|
1786
|
+
*
|
|
1787
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
1788
|
+
*/
|
|
1789
|
+
with: (arg: (param: Container) => Container) => Container;
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* Reflective module API provided to functions at runtime.
|
|
1793
|
+
*/
|
|
1794
|
+
export declare class CurrentModule extends BaseClient {
|
|
1795
|
+
private readonly _id?;
|
|
1796
|
+
private readonly _name?;
|
|
1797
|
+
/**
|
|
1798
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1799
|
+
*/
|
|
1800
|
+
constructor(parent?: {
|
|
1801
|
+
queryTree?: QueryTree[];
|
|
1802
|
+
ctx: Context;
|
|
1803
|
+
}, _id?: CurrentModuleID, _name?: string);
|
|
1804
|
+
/**
|
|
1805
|
+
* A unique identifier for this CurrentModule.
|
|
1806
|
+
*/
|
|
1807
|
+
id: () => Promise<CurrentModuleID>;
|
|
1808
|
+
/**
|
|
1809
|
+
* The name of the module being executed in
|
|
1810
|
+
*/
|
|
1811
|
+
name: () => Promise<string>;
|
|
1812
|
+
/**
|
|
1813
|
+
* The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
|
|
1814
|
+
*/
|
|
1815
|
+
source: () => Directory;
|
|
1816
|
+
/**
|
|
1817
|
+
* Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
|
|
1818
|
+
* @param path Location of the directory to access (e.g., ".").
|
|
1819
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
1820
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
1821
|
+
*/
|
|
1822
|
+
workdir: (path: string, opts?: CurrentModuleWorkdirOpts) => Directory;
|
|
1823
|
+
/**
|
|
1824
|
+
* 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.
|
|
1825
|
+
* @param path Location of the file to retrieve (e.g., "README.md").
|
|
1826
|
+
*/
|
|
1827
|
+
workdirFile: (path: string) => File;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* The Dagger engine configuration and state
|
|
1831
|
+
*/
|
|
1832
|
+
export declare class DaggerEngine extends BaseClient {
|
|
1833
|
+
private readonly _id?;
|
|
1834
|
+
/**
|
|
1835
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1836
|
+
*/
|
|
1837
|
+
constructor(parent?: {
|
|
1838
|
+
queryTree?: QueryTree[];
|
|
1839
|
+
ctx: Context;
|
|
1840
|
+
}, _id?: DaggerEngineID);
|
|
1841
|
+
/**
|
|
1842
|
+
* A unique identifier for this DaggerEngine.
|
|
1843
|
+
*/
|
|
1844
|
+
id: () => Promise<DaggerEngineID>;
|
|
1845
|
+
/**
|
|
1846
|
+
* The local (on-disk) cache for the Dagger engine
|
|
1847
|
+
*/
|
|
1848
|
+
localCache: () => DaggerEngineCache;
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* A cache storage for the Dagger engine
|
|
1852
|
+
*/
|
|
1853
|
+
export declare class DaggerEngineCache extends BaseClient {
|
|
1854
|
+
private readonly _id?;
|
|
1855
|
+
private readonly _keepBytes?;
|
|
1856
|
+
private readonly _prune?;
|
|
1857
|
+
/**
|
|
1858
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1859
|
+
*/
|
|
1860
|
+
constructor(parent?: {
|
|
1861
|
+
queryTree?: QueryTree[];
|
|
1862
|
+
ctx: Context;
|
|
1863
|
+
}, _id?: DaggerEngineCacheID, _keepBytes?: number, _prune?: Void);
|
|
1864
|
+
/**
|
|
1865
|
+
* A unique identifier for this DaggerEngineCache.
|
|
1866
|
+
*/
|
|
1867
|
+
id: () => Promise<DaggerEngineCacheID>;
|
|
1868
|
+
/**
|
|
1869
|
+
* The current set of entries in the cache
|
|
1870
|
+
*/
|
|
1871
|
+
entrySet: () => DaggerEngineCacheEntrySet;
|
|
1872
|
+
/**
|
|
1873
|
+
* The maximum bytes to keep in the cache without pruning, after which automatic pruning may kick in.
|
|
1874
|
+
*/
|
|
1875
|
+
keepBytes: () => Promise<number>;
|
|
1876
|
+
/**
|
|
1877
|
+
* Prune the cache of releaseable entries
|
|
1878
|
+
*/
|
|
1879
|
+
prune: () => Promise<void>;
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* An individual cache entry in a cache entry set
|
|
1883
|
+
*/
|
|
1884
|
+
export declare class DaggerEngineCacheEntry extends BaseClient {
|
|
1885
|
+
private readonly _id?;
|
|
1886
|
+
private readonly _activelyUsed?;
|
|
1887
|
+
private readonly _createdTimeUnixNano?;
|
|
1888
|
+
private readonly _description?;
|
|
1889
|
+
private readonly _diskSpaceBytes?;
|
|
1890
|
+
private readonly _mostRecentUseTimeUnixNano?;
|
|
1891
|
+
/**
|
|
1892
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1893
|
+
*/
|
|
1894
|
+
constructor(parent?: {
|
|
1895
|
+
queryTree?: QueryTree[];
|
|
1896
|
+
ctx: Context;
|
|
1897
|
+
}, _id?: DaggerEngineCacheEntryID, _activelyUsed?: boolean, _createdTimeUnixNano?: number, _description?: string, _diskSpaceBytes?: number, _mostRecentUseTimeUnixNano?: number);
|
|
1898
|
+
/**
|
|
1899
|
+
* A unique identifier for this DaggerEngineCacheEntry.
|
|
1900
|
+
*/
|
|
1901
|
+
id: () => Promise<DaggerEngineCacheEntryID>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Whether the cache entry is actively being used.
|
|
1904
|
+
*/
|
|
1905
|
+
activelyUsed: () => Promise<boolean>;
|
|
1906
|
+
/**
|
|
1907
|
+
* The time the cache entry was created, in Unix nanoseconds.
|
|
1908
|
+
*/
|
|
1909
|
+
createdTimeUnixNano: () => Promise<number>;
|
|
1910
|
+
/**
|
|
1911
|
+
* The description of the cache entry.
|
|
1912
|
+
*/
|
|
1913
|
+
description: () => Promise<string>;
|
|
1914
|
+
/**
|
|
1915
|
+
* The disk space used by the cache entry.
|
|
1916
|
+
*/
|
|
1917
|
+
diskSpaceBytes: () => Promise<number>;
|
|
1918
|
+
/**
|
|
1919
|
+
* The most recent time the cache entry was used, in Unix nanoseconds.
|
|
1920
|
+
*/
|
|
1921
|
+
mostRecentUseTimeUnixNano: () => Promise<number>;
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* A set of cache entries returned by a query to a cache
|
|
1925
|
+
*/
|
|
1926
|
+
export declare class DaggerEngineCacheEntrySet extends BaseClient {
|
|
1927
|
+
private readonly _id?;
|
|
1928
|
+
private readonly _diskSpaceBytes?;
|
|
1929
|
+
private readonly _entryCount?;
|
|
1930
|
+
/**
|
|
1931
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1932
|
+
*/
|
|
1933
|
+
constructor(parent?: {
|
|
1934
|
+
queryTree?: QueryTree[];
|
|
1935
|
+
ctx: Context;
|
|
1936
|
+
}, _id?: DaggerEngineCacheEntrySetID, _diskSpaceBytes?: number, _entryCount?: number);
|
|
1937
|
+
/**
|
|
1938
|
+
* A unique identifier for this DaggerEngineCacheEntrySet.
|
|
1939
|
+
*/
|
|
1940
|
+
id: () => Promise<DaggerEngineCacheEntrySetID>;
|
|
1941
|
+
/**
|
|
1942
|
+
* The total disk space used by the cache entries in this set.
|
|
1943
|
+
*/
|
|
1944
|
+
diskSpaceBytes: () => Promise<number>;
|
|
1945
|
+
/**
|
|
1946
|
+
* The list of individual cache entries in the set
|
|
1947
|
+
*/
|
|
1948
|
+
entries: () => Promise<DaggerEngineCacheEntry[]>;
|
|
1949
|
+
/**
|
|
1950
|
+
* The number of cache entries in this set.
|
|
1951
|
+
*/
|
|
1952
|
+
entryCount: () => Promise<number>;
|
|
1953
|
+
}
|
|
1954
|
+
/**
|
|
1955
|
+
* A directory.
|
|
1956
|
+
*/
|
|
1957
|
+
export declare class Directory extends BaseClient {
|
|
1958
|
+
private readonly _id?;
|
|
1959
|
+
private readonly _digest?;
|
|
1960
|
+
private readonly _export?;
|
|
1961
|
+
private readonly _sync?;
|
|
1962
|
+
/**
|
|
1963
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1964
|
+
*/
|
|
1965
|
+
constructor(parent?: {
|
|
1966
|
+
queryTree?: QueryTree[];
|
|
1967
|
+
ctx: Context;
|
|
1968
|
+
}, _id?: DirectoryID, _digest?: string, _export?: string, _sync?: DirectoryID);
|
|
1969
|
+
/**
|
|
1970
|
+
* A unique identifier for this Directory.
|
|
1971
|
+
*/
|
|
1972
|
+
id: () => Promise<DirectoryID>;
|
|
1973
|
+
/**
|
|
1974
|
+
* Load the directory as a Dagger module
|
|
1975
|
+
* @param opts.sourceRootPath An optional subpath of the directory which contains the module's configuration file.
|
|
1976
|
+
*
|
|
1977
|
+
* 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.
|
|
1978
|
+
*
|
|
1979
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
1980
|
+
* @param opts.engineVersion The engine version to upgrade to.
|
|
1981
|
+
*/
|
|
1982
|
+
asModule: (opts?: DirectoryAsModuleOpts) => Module_;
|
|
1983
|
+
/**
|
|
1984
|
+
* Gets the difference between this directory and an another directory.
|
|
1985
|
+
* @param other Identifier of the directory to compare.
|
|
1986
|
+
*/
|
|
1987
|
+
diff: (other: Directory) => Directory;
|
|
1988
|
+
/**
|
|
1989
|
+
* Return the directory's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
|
|
1990
|
+
*/
|
|
1991
|
+
digest: () => Promise<string>;
|
|
1992
|
+
/**
|
|
1993
|
+
* Retrieves a directory at the given path.
|
|
1994
|
+
* @param path Location of the directory to retrieve (e.g., "/src").
|
|
1995
|
+
*/
|
|
1996
|
+
directory: (path: string) => Directory;
|
|
1997
|
+
/**
|
|
1998
|
+
* Builds a new Docker container from this directory.
|
|
1999
|
+
* @param opts.platform The platform to build.
|
|
2000
|
+
* @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
|
2001
|
+
* @param opts.target Target build stage to build.
|
|
2002
|
+
* @param opts.buildArgs Build arguments to use in the build.
|
|
2003
|
+
* @param opts.secrets Secrets to pass to the build.
|
|
2004
|
+
*
|
|
2005
|
+
* They will be mounted at /run/secrets/[secret-name].
|
|
2006
|
+
*/
|
|
2007
|
+
dockerBuild: (opts?: DirectoryDockerBuildOpts) => Container;
|
|
2008
|
+
/**
|
|
2009
|
+
* Returns a list of files and directories at the given path.
|
|
2010
|
+
* @param opts.path Location of the directory to look at (e.g., "/src").
|
|
2011
|
+
*/
|
|
2012
|
+
entries: (opts?: DirectoryEntriesOpts) => Promise<string[]>;
|
|
2013
|
+
/**
|
|
2014
|
+
* Writes the contents of the directory to a path on the host.
|
|
2015
|
+
* @param path Location of the copied directory (e.g., "logs/").
|
|
2016
|
+
* @param opts.wipe If true, then the host directory will be wiped clean before exporting so that it exactly matches the directory being exported; this means it will delete any files on the host that aren't in the exported dir. If false (the default), the contents of the directory will be merged with any existing contents of the host directory, leaving any existing files on the host that aren't in the exported directory alone.
|
|
2017
|
+
*/
|
|
2018
|
+
export: (path: string, opts?: DirectoryExportOpts) => Promise<string>;
|
|
2019
|
+
/**
|
|
2020
|
+
* Retrieves a file at the given path.
|
|
2021
|
+
* @param path Location of the file to retrieve (e.g., "README.md").
|
|
2022
|
+
*/
|
|
2023
|
+
file: (path: string) => File;
|
|
2024
|
+
/**
|
|
2025
|
+
* Returns a list of files and directories that matche the given pattern.
|
|
2026
|
+
* @param pattern Pattern to match (e.g., "*.md").
|
|
2027
|
+
*/
|
|
2028
|
+
glob: (pattern: string) => Promise<string[]>;
|
|
2029
|
+
/**
|
|
2030
|
+
* Force evaluation in the engine.
|
|
2031
|
+
*/
|
|
2032
|
+
sync: () => Promise<Directory>;
|
|
2033
|
+
/**
|
|
2034
|
+
* Opens an interactive terminal in new container with this directory mounted inside.
|
|
2035
|
+
* @param opts.cmd If set, override the container's default terminal command and invoke these command arguments instead.
|
|
2036
|
+
* @param opts.experimentalPrivilegedNesting Provides Dagger access to the executed command.
|
|
2037
|
+
*
|
|
2038
|
+
* 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.
|
|
2039
|
+
* @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.
|
|
2040
|
+
* @param opts.container If set, override the default container used for the terminal.
|
|
2041
|
+
*/
|
|
2042
|
+
terminal: (opts?: DirectoryTerminalOpts) => Directory;
|
|
2043
|
+
/**
|
|
2044
|
+
* Retrieves this directory plus a directory written at the given path.
|
|
2045
|
+
* @param path Location of the written directory (e.g., "/src/").
|
|
2046
|
+
* @param directory Identifier of the directory to copy.
|
|
2047
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
2048
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
2049
|
+
*/
|
|
2050
|
+
withDirectory: (path: string, directory: Directory, opts?: DirectoryWithDirectoryOpts) => Directory;
|
|
2051
|
+
/**
|
|
2052
|
+
* Retrieves this directory plus the contents of the given file copied to the given path.
|
|
2053
|
+
* @param path Location of the copied file (e.g., "/file.txt").
|
|
2054
|
+
* @param source Identifier of the file to copy.
|
|
2055
|
+
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
2056
|
+
*/
|
|
2057
|
+
withFile: (path: string, source: File, opts?: DirectoryWithFileOpts) => Directory;
|
|
2058
|
+
/**
|
|
2059
|
+
* Retrieves this directory plus the contents of the given files copied to the given path.
|
|
2060
|
+
* @param path Location where copied files should be placed (e.g., "/src").
|
|
2061
|
+
* @param sources Identifiers of the files to copy.
|
|
2062
|
+
* @param opts.permissions Permission given to the copied files (e.g., 0600).
|
|
2063
|
+
*/
|
|
2064
|
+
withFiles: (path: string, sources: File[], opts?: DirectoryWithFilesOpts) => Directory;
|
|
2065
|
+
/**
|
|
2066
|
+
* Retrieves this directory plus a new directory created at the given path.
|
|
2067
|
+
* @param path Location of the directory created (e.g., "/logs").
|
|
2068
|
+
* @param opts.permissions Permission granted to the created directory (e.g., 0777).
|
|
2069
|
+
*/
|
|
2070
|
+
withNewDirectory: (path: string, opts?: DirectoryWithNewDirectoryOpts) => Directory;
|
|
2071
|
+
/**
|
|
2072
|
+
* Retrieves this directory plus a new file written at the given path.
|
|
2073
|
+
* @param path Location of the written file (e.g., "/file.txt").
|
|
2074
|
+
* @param contents Content of the written file (e.g., "Hello world!").
|
|
2075
|
+
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
2076
|
+
*/
|
|
2077
|
+
withNewFile: (path: string, contents: string, opts?: DirectoryWithNewFileOpts) => Directory;
|
|
2078
|
+
/**
|
|
2079
|
+
* Retrieves this directory with all file/dir timestamps set to the given time.
|
|
2080
|
+
* @param timestamp Timestamp to set dir/files in.
|
|
2081
|
+
*
|
|
2082
|
+
* Formatted in seconds following Unix epoch (e.g., 1672531199).
|
|
2083
|
+
*/
|
|
2084
|
+
withTimestamps: (timestamp: number) => Directory;
|
|
2085
|
+
/**
|
|
2086
|
+
* Retrieves this directory with the directory at the given path removed.
|
|
2087
|
+
* @param path Location of the directory to remove (e.g., ".github/").
|
|
2088
|
+
*/
|
|
2089
|
+
withoutDirectory: (path: string) => Directory;
|
|
2090
|
+
/**
|
|
2091
|
+
* Retrieves this directory with the file at the given path removed.
|
|
2092
|
+
* @param path Location of the file to remove (e.g., "/file.txt").
|
|
2093
|
+
*/
|
|
2094
|
+
withoutFile: (path: string) => Directory;
|
|
2095
|
+
/**
|
|
2096
|
+
* Retrieves this directory with the files at the given paths removed.
|
|
2097
|
+
* @param paths Location of the file to remove (e.g., ["/file.txt"]).
|
|
2098
|
+
*/
|
|
2099
|
+
withoutFiles: (paths: string[]) => Directory;
|
|
2100
|
+
/**
|
|
2101
|
+
* Call the provided function with current Directory.
|
|
2102
|
+
*
|
|
2103
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2104
|
+
*/
|
|
2105
|
+
with: (arg: (param: Directory) => Directory) => Directory;
|
|
2106
|
+
}
|
|
2107
|
+
/**
|
|
2108
|
+
* A definition of a custom enum defined in a Module.
|
|
2109
|
+
*/
|
|
2110
|
+
export declare class EnumTypeDef extends BaseClient {
|
|
2111
|
+
private readonly _id?;
|
|
2112
|
+
private readonly _description?;
|
|
2113
|
+
private readonly _name?;
|
|
2114
|
+
private readonly _sourceModuleName?;
|
|
2115
|
+
/**
|
|
2116
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2117
|
+
*/
|
|
2118
|
+
constructor(parent?: {
|
|
2119
|
+
queryTree?: QueryTree[];
|
|
2120
|
+
ctx: Context;
|
|
2121
|
+
}, _id?: EnumTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2122
|
+
/**
|
|
2123
|
+
* A unique identifier for this EnumTypeDef.
|
|
2124
|
+
*/
|
|
2125
|
+
id: () => Promise<EnumTypeDefID>;
|
|
2126
|
+
/**
|
|
2127
|
+
* A doc string for the enum, if any.
|
|
2128
|
+
*/
|
|
2129
|
+
description: () => Promise<string>;
|
|
2130
|
+
/**
|
|
2131
|
+
* The name of the enum.
|
|
2132
|
+
*/
|
|
2133
|
+
name: () => Promise<string>;
|
|
2134
|
+
/**
|
|
2135
|
+
* If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
2136
|
+
*/
|
|
2137
|
+
sourceModuleName: () => Promise<string>;
|
|
2138
|
+
/**
|
|
2139
|
+
* The values of the enum.
|
|
2140
|
+
*/
|
|
2141
|
+
values: () => Promise<EnumValueTypeDef[]>;
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* A definition of a value in a custom enum defined in a Module.
|
|
2145
|
+
*/
|
|
2146
|
+
export declare class EnumValueTypeDef extends BaseClient {
|
|
2147
|
+
private readonly _id?;
|
|
2148
|
+
private readonly _description?;
|
|
2149
|
+
private readonly _name?;
|
|
2150
|
+
/**
|
|
2151
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2152
|
+
*/
|
|
2153
|
+
constructor(parent?: {
|
|
2154
|
+
queryTree?: QueryTree[];
|
|
2155
|
+
ctx: Context;
|
|
2156
|
+
}, _id?: EnumValueTypeDefID, _description?: string, _name?: string);
|
|
2157
|
+
/**
|
|
2158
|
+
* A unique identifier for this EnumValueTypeDef.
|
|
2159
|
+
*/
|
|
2160
|
+
id: () => Promise<EnumValueTypeDefID>;
|
|
2161
|
+
/**
|
|
2162
|
+
* A doc string for the enum value, if any.
|
|
2163
|
+
*/
|
|
2164
|
+
description: () => Promise<string>;
|
|
2165
|
+
/**
|
|
2166
|
+
* The name of the enum value.
|
|
2167
|
+
*/
|
|
2168
|
+
name: () => Promise<string>;
|
|
2169
|
+
}
|
|
2170
|
+
/**
|
|
2171
|
+
* An environment variable name and value.
|
|
2172
|
+
*/
|
|
2173
|
+
export declare class EnvVariable extends BaseClient {
|
|
2174
|
+
private readonly _id?;
|
|
2175
|
+
private readonly _name?;
|
|
2176
|
+
private readonly _value?;
|
|
2177
|
+
/**
|
|
2178
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2179
|
+
*/
|
|
2180
|
+
constructor(parent?: {
|
|
2181
|
+
queryTree?: QueryTree[];
|
|
2182
|
+
ctx: Context;
|
|
2183
|
+
}, _id?: EnvVariableID, _name?: string, _value?: string);
|
|
2184
|
+
/**
|
|
2185
|
+
* A unique identifier for this EnvVariable.
|
|
2186
|
+
*/
|
|
2187
|
+
id: () => Promise<EnvVariableID>;
|
|
2188
|
+
/**
|
|
2189
|
+
* The environment variable name.
|
|
2190
|
+
*/
|
|
2191
|
+
name: () => Promise<string>;
|
|
2192
|
+
/**
|
|
2193
|
+
* The environment variable value.
|
|
2194
|
+
*/
|
|
2195
|
+
value: () => Promise<string>;
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* A definition of a field on a custom object defined in a Module.
|
|
2199
|
+
*
|
|
2200
|
+
* 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).
|
|
2201
|
+
*/
|
|
2202
|
+
export declare class FieldTypeDef extends BaseClient {
|
|
2203
|
+
private readonly _id?;
|
|
2204
|
+
private readonly _description?;
|
|
2205
|
+
private readonly _name?;
|
|
2206
|
+
/**
|
|
2207
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2208
|
+
*/
|
|
2209
|
+
constructor(parent?: {
|
|
2210
|
+
queryTree?: QueryTree[];
|
|
2211
|
+
ctx: Context;
|
|
2212
|
+
}, _id?: FieldTypeDefID, _description?: string, _name?: string);
|
|
2213
|
+
/**
|
|
2214
|
+
* A unique identifier for this FieldTypeDef.
|
|
2215
|
+
*/
|
|
2216
|
+
id: () => Promise<FieldTypeDefID>;
|
|
2217
|
+
/**
|
|
2218
|
+
* A doc string for the field, if any.
|
|
2219
|
+
*/
|
|
2220
|
+
description: () => Promise<string>;
|
|
2221
|
+
/**
|
|
2222
|
+
* The name of the field in lowerCamelCase format.
|
|
2223
|
+
*/
|
|
2224
|
+
name: () => Promise<string>;
|
|
2225
|
+
/**
|
|
2226
|
+
* The type of the field.
|
|
2227
|
+
*/
|
|
2228
|
+
typeDef: () => TypeDef;
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* A file.
|
|
2232
|
+
*/
|
|
2233
|
+
export declare class File extends BaseClient {
|
|
2234
|
+
private readonly _id?;
|
|
2235
|
+
private readonly _contents?;
|
|
2236
|
+
private readonly _digest?;
|
|
2237
|
+
private readonly _export?;
|
|
2238
|
+
private readonly _name?;
|
|
2239
|
+
private readonly _size?;
|
|
2240
|
+
private readonly _sync?;
|
|
2241
|
+
/**
|
|
2242
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2243
|
+
*/
|
|
2244
|
+
constructor(parent?: {
|
|
2245
|
+
queryTree?: QueryTree[];
|
|
2246
|
+
ctx: Context;
|
|
2247
|
+
}, _id?: FileID, _contents?: string, _digest?: string, _export?: string, _name?: string, _size?: number, _sync?: FileID);
|
|
2248
|
+
/**
|
|
2249
|
+
* A unique identifier for this File.
|
|
2250
|
+
*/
|
|
2251
|
+
id: () => Promise<FileID>;
|
|
2252
|
+
/**
|
|
2253
|
+
* Retrieves the contents of the file.
|
|
2254
|
+
*/
|
|
2255
|
+
contents: () => Promise<string>;
|
|
2256
|
+
/**
|
|
2257
|
+
* Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
|
|
2258
|
+
* @param opts.excludeMetadata If true, exclude metadata from the digest.
|
|
2259
|
+
*/
|
|
2260
|
+
digest: (opts?: FileDigestOpts) => Promise<string>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Writes the file to a file path on the host.
|
|
2263
|
+
* @param path Location of the written directory (e.g., "output.txt").
|
|
2264
|
+
* @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.
|
|
2265
|
+
*/
|
|
2266
|
+
export: (path: string, opts?: FileExportOpts) => Promise<string>;
|
|
2267
|
+
/**
|
|
2268
|
+
* Retrieves the name of the file.
|
|
2269
|
+
*/
|
|
2270
|
+
name: () => Promise<string>;
|
|
2271
|
+
/**
|
|
2272
|
+
* Retrieves the size of the file, in bytes.
|
|
2273
|
+
*/
|
|
2274
|
+
size: () => Promise<number>;
|
|
2275
|
+
/**
|
|
2276
|
+
* Force evaluation in the engine.
|
|
2277
|
+
*/
|
|
2278
|
+
sync: () => Promise<File>;
|
|
2279
|
+
/**
|
|
2280
|
+
* Retrieves this file with its name set to the given name.
|
|
2281
|
+
* @param name Name to set file to.
|
|
2282
|
+
*/
|
|
2283
|
+
withName: (name: string) => File;
|
|
2284
|
+
/**
|
|
2285
|
+
* Retrieves this file with its created/modified timestamps set to the given time.
|
|
2286
|
+
* @param timestamp Timestamp to set dir/files in.
|
|
2287
|
+
*
|
|
2288
|
+
* Formatted in seconds following Unix epoch (e.g., 1672531199).
|
|
2289
|
+
*/
|
|
2290
|
+
withTimestamps: (timestamp: number) => File;
|
|
2291
|
+
/**
|
|
2292
|
+
* Call the provided function with current File.
|
|
2293
|
+
*
|
|
2294
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2295
|
+
*/
|
|
2296
|
+
with: (arg: (param: File) => File) => File;
|
|
2297
|
+
}
|
|
2298
|
+
/**
|
|
2299
|
+
* Function represents a resolver provided by a Module.
|
|
2300
|
+
*
|
|
2301
|
+
* A function always evaluates against a parent object and is given a set of named arguments.
|
|
2302
|
+
*/
|
|
2303
|
+
export declare class Function_ extends BaseClient {
|
|
2304
|
+
private readonly _id?;
|
|
2305
|
+
private readonly _description?;
|
|
2306
|
+
private readonly _name?;
|
|
2307
|
+
/**
|
|
2308
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2309
|
+
*/
|
|
2310
|
+
constructor(parent?: {
|
|
2311
|
+
queryTree?: QueryTree[];
|
|
2312
|
+
ctx: Context;
|
|
2313
|
+
}, _id?: FunctionID, _description?: string, _name?: string);
|
|
2314
|
+
/**
|
|
2315
|
+
* A unique identifier for this Function.
|
|
2316
|
+
*/
|
|
2317
|
+
id: () => Promise<FunctionID>;
|
|
2318
|
+
/**
|
|
2319
|
+
* Arguments accepted by the function, if any.
|
|
2320
|
+
*/
|
|
2321
|
+
args: () => Promise<FunctionArg[]>;
|
|
2322
|
+
/**
|
|
2323
|
+
* A doc string for the function, if any.
|
|
2324
|
+
*/
|
|
2325
|
+
description: () => Promise<string>;
|
|
2326
|
+
/**
|
|
2327
|
+
* The name of the function.
|
|
2328
|
+
*/
|
|
2329
|
+
name: () => Promise<string>;
|
|
2330
|
+
/**
|
|
2331
|
+
* The type returned by the function.
|
|
2332
|
+
*/
|
|
2333
|
+
returnType: () => TypeDef;
|
|
2334
|
+
/**
|
|
2335
|
+
* Returns the function with the provided argument
|
|
2336
|
+
* @param name The name of the argument
|
|
2337
|
+
* @param typeDef The type of the argument
|
|
2338
|
+
* @param opts.description A doc string for the argument, if any
|
|
2339
|
+
* @param opts.defaultValue A default value to use for this argument if not explicitly set by the caller, if any
|
|
2340
|
+
* @param opts.defaultPath If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
|
|
2341
|
+
* @param opts.ignore Patterns to ignore when loading the contextual argument value.
|
|
2342
|
+
*/
|
|
2343
|
+
withArg: (name: string, typeDef: TypeDef, opts?: FunctionWithArgOpts) => Function_;
|
|
2344
|
+
/**
|
|
2345
|
+
* Returns the function with the given doc string.
|
|
2346
|
+
* @param description The doc string to set.
|
|
2347
|
+
*/
|
|
2348
|
+
withDescription: (description: string) => Function_;
|
|
2349
|
+
/**
|
|
2350
|
+
* Call the provided function with current Function.
|
|
2351
|
+
*
|
|
2352
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2353
|
+
*/
|
|
2354
|
+
with: (arg: (param: Function_) => Function_) => Function_;
|
|
2355
|
+
}
|
|
2356
|
+
/**
|
|
2357
|
+
* An argument accepted by a function.
|
|
2358
|
+
*
|
|
2359
|
+
* This is a specification for an argument at function definition time, not an argument passed at function call time.
|
|
2360
|
+
*/
|
|
2361
|
+
export declare class FunctionArg extends BaseClient {
|
|
2362
|
+
private readonly _id?;
|
|
2363
|
+
private readonly _defaultPath?;
|
|
2364
|
+
private readonly _defaultValue?;
|
|
2365
|
+
private readonly _description?;
|
|
2366
|
+
private readonly _name?;
|
|
2367
|
+
/**
|
|
2368
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2369
|
+
*/
|
|
2370
|
+
constructor(parent?: {
|
|
2371
|
+
queryTree?: QueryTree[];
|
|
2372
|
+
ctx: Context;
|
|
2373
|
+
}, _id?: FunctionArgID, _defaultPath?: string, _defaultValue?: JSON, _description?: string, _name?: string);
|
|
2374
|
+
/**
|
|
2375
|
+
* A unique identifier for this FunctionArg.
|
|
2376
|
+
*/
|
|
2377
|
+
id: () => Promise<FunctionArgID>;
|
|
2378
|
+
/**
|
|
2379
|
+
* Only applies to arguments of type File or Directory. If the argument is not set, load it from the given path in the context directory
|
|
2380
|
+
*/
|
|
2381
|
+
defaultPath: () => Promise<string>;
|
|
2382
|
+
/**
|
|
2383
|
+
* A default value to use for this argument when not explicitly set by the caller, if any.
|
|
2384
|
+
*/
|
|
2385
|
+
defaultValue: () => Promise<JSON>;
|
|
2386
|
+
/**
|
|
2387
|
+
* A doc string for the argument, if any.
|
|
2388
|
+
*/
|
|
2389
|
+
description: () => Promise<string>;
|
|
2390
|
+
/**
|
|
2391
|
+
* Only applies to arguments of type Directory. The ignore patterns are applied to the input directory, and matching entries are filtered out, in a cache-efficient manner.
|
|
2392
|
+
*/
|
|
2393
|
+
ignore: () => Promise<string[]>;
|
|
2394
|
+
/**
|
|
2395
|
+
* The name of the argument in lowerCamelCase format.
|
|
2396
|
+
*/
|
|
2397
|
+
name: () => Promise<string>;
|
|
2398
|
+
/**
|
|
2399
|
+
* The type of the argument.
|
|
2400
|
+
*/
|
|
2401
|
+
typeDef: () => TypeDef;
|
|
2402
|
+
}
|
|
2403
|
+
/**
|
|
2404
|
+
* An active function call.
|
|
2405
|
+
*/
|
|
2406
|
+
export declare class FunctionCall extends BaseClient {
|
|
2407
|
+
private readonly _id?;
|
|
2408
|
+
private readonly _name?;
|
|
2409
|
+
private readonly _parent?;
|
|
2410
|
+
private readonly _parentName?;
|
|
2411
|
+
private readonly _returnValue?;
|
|
2412
|
+
/**
|
|
2413
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2414
|
+
*/
|
|
2415
|
+
constructor(parent?: {
|
|
2416
|
+
queryTree?: QueryTree[];
|
|
2417
|
+
ctx: Context;
|
|
2418
|
+
}, _id?: FunctionCallID, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void);
|
|
2419
|
+
/**
|
|
2420
|
+
* A unique identifier for this FunctionCall.
|
|
2421
|
+
*/
|
|
2422
|
+
id: () => Promise<FunctionCallID>;
|
|
2423
|
+
/**
|
|
2424
|
+
* The argument values the function is being invoked with.
|
|
2425
|
+
*/
|
|
2426
|
+
inputArgs: () => Promise<FunctionCallArgValue[]>;
|
|
2427
|
+
/**
|
|
2428
|
+
* The name of the function being called.
|
|
2429
|
+
*/
|
|
2430
|
+
name: () => Promise<string>;
|
|
2431
|
+
/**
|
|
2432
|
+
* The value of the parent object of the function being called. If the function is top-level to the module, this is always an empty object.
|
|
2433
|
+
*/
|
|
2434
|
+
parent: () => Promise<JSON>;
|
|
2435
|
+
/**
|
|
2436
|
+
* The name of the parent object of the function being called. If the function is top-level to the module, this is the name of the module.
|
|
2437
|
+
*/
|
|
2438
|
+
parentName: () => Promise<string>;
|
|
2439
|
+
/**
|
|
2440
|
+
* Set the return value of the function call to the provided value.
|
|
2441
|
+
* @param value JSON serialization of the return value.
|
|
2442
|
+
*/
|
|
2443
|
+
returnValue: (value: JSON) => Promise<void>;
|
|
2444
|
+
}
|
|
2445
|
+
/**
|
|
2446
|
+
* A value passed as a named argument to a function call.
|
|
2447
|
+
*/
|
|
2448
|
+
export declare class FunctionCallArgValue extends BaseClient {
|
|
2449
|
+
private readonly _id?;
|
|
2450
|
+
private readonly _name?;
|
|
2451
|
+
private readonly _value?;
|
|
2452
|
+
/**
|
|
2453
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2454
|
+
*/
|
|
2455
|
+
constructor(parent?: {
|
|
2456
|
+
queryTree?: QueryTree[];
|
|
2457
|
+
ctx: Context;
|
|
2458
|
+
}, _id?: FunctionCallArgValueID, _name?: string, _value?: JSON);
|
|
2459
|
+
/**
|
|
2460
|
+
* A unique identifier for this FunctionCallArgValue.
|
|
2461
|
+
*/
|
|
2462
|
+
id: () => Promise<FunctionCallArgValueID>;
|
|
2463
|
+
/**
|
|
2464
|
+
* The name of the argument.
|
|
2465
|
+
*/
|
|
2466
|
+
name: () => Promise<string>;
|
|
2467
|
+
/**
|
|
2468
|
+
* The value of the argument represented as a JSON serialized string.
|
|
2469
|
+
*/
|
|
2470
|
+
value: () => Promise<JSON>;
|
|
2471
|
+
}
|
|
2472
|
+
/**
|
|
2473
|
+
* The result of running an SDK's codegen.
|
|
2474
|
+
*/
|
|
2475
|
+
export declare class GeneratedCode extends BaseClient {
|
|
2476
|
+
private readonly _id?;
|
|
2477
|
+
/**
|
|
2478
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2479
|
+
*/
|
|
2480
|
+
constructor(parent?: {
|
|
2481
|
+
queryTree?: QueryTree[];
|
|
2482
|
+
ctx: Context;
|
|
2483
|
+
}, _id?: GeneratedCodeID);
|
|
2484
|
+
/**
|
|
2485
|
+
* A unique identifier for this GeneratedCode.
|
|
2486
|
+
*/
|
|
2487
|
+
id: () => Promise<GeneratedCodeID>;
|
|
2488
|
+
/**
|
|
2489
|
+
* The directory containing the generated code.
|
|
2490
|
+
*/
|
|
2491
|
+
code: () => Directory;
|
|
2492
|
+
/**
|
|
2493
|
+
* List of paths to mark generated in version control (i.e. .gitattributes).
|
|
2494
|
+
*/
|
|
2495
|
+
vcsGeneratedPaths: () => Promise<string[]>;
|
|
2496
|
+
/**
|
|
2497
|
+
* List of paths to ignore in version control (i.e. .gitignore).
|
|
2498
|
+
*/
|
|
2499
|
+
vcsIgnoredPaths: () => Promise<string[]>;
|
|
2500
|
+
/**
|
|
2501
|
+
* Set the list of paths to mark generated in version control.
|
|
2502
|
+
*/
|
|
2503
|
+
withVCSGeneratedPaths: (paths: string[]) => GeneratedCode;
|
|
2504
|
+
/**
|
|
2505
|
+
* Set the list of paths to ignore in version control.
|
|
2506
|
+
*/
|
|
2507
|
+
withVCSIgnoredPaths: (paths: string[]) => GeneratedCode;
|
|
2508
|
+
/**
|
|
2509
|
+
* Call the provided function with current GeneratedCode.
|
|
2510
|
+
*
|
|
2511
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2512
|
+
*/
|
|
2513
|
+
with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
|
|
2514
|
+
}
|
|
2515
|
+
/**
|
|
2516
|
+
* Module source originating from a git repo.
|
|
2517
|
+
*/
|
|
2518
|
+
export declare class GitModuleSource extends BaseClient {
|
|
2519
|
+
private readonly _id?;
|
|
2520
|
+
private readonly _cloneRef?;
|
|
2521
|
+
private readonly _commit?;
|
|
2522
|
+
private readonly _htmlRepoURL?;
|
|
2523
|
+
private readonly _htmlURL?;
|
|
2524
|
+
private readonly _root?;
|
|
2525
|
+
private readonly _rootSubpath?;
|
|
2526
|
+
private readonly _version?;
|
|
2527
|
+
/**
|
|
2528
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2529
|
+
*/
|
|
2530
|
+
constructor(parent?: {
|
|
2531
|
+
queryTree?: QueryTree[];
|
|
2532
|
+
ctx: Context;
|
|
2533
|
+
}, _id?: GitModuleSourceID, _cloneRef?: string, _commit?: string, _htmlRepoURL?: string, _htmlURL?: string, _root?: string, _rootSubpath?: string, _version?: string);
|
|
2534
|
+
/**
|
|
2535
|
+
* A unique identifier for this GitModuleSource.
|
|
2536
|
+
*/
|
|
2537
|
+
id: () => Promise<GitModuleSourceID>;
|
|
2538
|
+
/**
|
|
2539
|
+
* The ref to clone the root of the git repo from
|
|
2540
|
+
*/
|
|
2541
|
+
cloneRef: () => Promise<string>;
|
|
2542
|
+
/**
|
|
2543
|
+
* The resolved commit of the git repo this source points to.
|
|
2544
|
+
*/
|
|
2545
|
+
commit: () => Promise<string>;
|
|
2546
|
+
/**
|
|
2547
|
+
* The directory containing everything needed to load load and use the module.
|
|
2548
|
+
*/
|
|
2549
|
+
contextDirectory: () => Directory;
|
|
2550
|
+
/**
|
|
2551
|
+
* The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket)
|
|
2552
|
+
*/
|
|
2553
|
+
htmlRepoURL: () => Promise<string>;
|
|
2554
|
+
/**
|
|
2555
|
+
* The URL to the source's git repo in a web browser
|
|
2556
|
+
*/
|
|
2557
|
+
htmlURL: () => Promise<string>;
|
|
2558
|
+
/**
|
|
2559
|
+
* The clean module name of the root of the module
|
|
2560
|
+
*/
|
|
2561
|
+
root: () => Promise<string>;
|
|
2562
|
+
/**
|
|
2563
|
+
* The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory).
|
|
2564
|
+
*/
|
|
2565
|
+
rootSubpath: () => Promise<string>;
|
|
2566
|
+
/**
|
|
2567
|
+
* The specified version of the git repo this source points to.
|
|
2568
|
+
*/
|
|
2569
|
+
version: () => Promise<string>;
|
|
2570
|
+
}
|
|
2571
|
+
/**
|
|
2572
|
+
* A git ref (tag, branch, or commit).
|
|
2573
|
+
*/
|
|
2574
|
+
export declare class GitRef extends BaseClient {
|
|
2575
|
+
private readonly _id?;
|
|
2576
|
+
private readonly _commit?;
|
|
2577
|
+
/**
|
|
2578
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2579
|
+
*/
|
|
2580
|
+
constructor(parent?: {
|
|
2581
|
+
queryTree?: QueryTree[];
|
|
2582
|
+
ctx: Context;
|
|
2583
|
+
}, _id?: GitRefID, _commit?: string);
|
|
2584
|
+
/**
|
|
2585
|
+
* A unique identifier for this GitRef.
|
|
2586
|
+
*/
|
|
2587
|
+
id: () => Promise<GitRefID>;
|
|
2588
|
+
/**
|
|
2589
|
+
* The resolved commit id at this ref.
|
|
2590
|
+
*/
|
|
2591
|
+
commit: () => Promise<string>;
|
|
2592
|
+
/**
|
|
2593
|
+
* The filesystem tree at this ref.
|
|
2594
|
+
* @param opts.discardGitDir Set to true to discard .git directory.
|
|
2595
|
+
*/
|
|
2596
|
+
tree: (opts?: GitRefTreeOpts) => Directory;
|
|
2597
|
+
}
|
|
2598
|
+
/**
|
|
2599
|
+
* A git repository.
|
|
2600
|
+
*/
|
|
2601
|
+
export declare class GitRepository extends BaseClient {
|
|
2602
|
+
private readonly _id?;
|
|
2603
|
+
/**
|
|
2604
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2605
|
+
*/
|
|
2606
|
+
constructor(parent?: {
|
|
2607
|
+
queryTree?: QueryTree[];
|
|
2608
|
+
ctx: Context;
|
|
2609
|
+
}, _id?: GitRepositoryID);
|
|
2610
|
+
/**
|
|
2611
|
+
* A unique identifier for this GitRepository.
|
|
2612
|
+
*/
|
|
2613
|
+
id: () => Promise<GitRepositoryID>;
|
|
2614
|
+
/**
|
|
2615
|
+
* Returns details of a branch.
|
|
2616
|
+
* @param name Branch's name (e.g., "main").
|
|
2617
|
+
*/
|
|
2618
|
+
branch: (name: string) => GitRef;
|
|
2619
|
+
/**
|
|
2620
|
+
* Returns details of a commit.
|
|
2621
|
+
* @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
|
|
2622
|
+
*/
|
|
2623
|
+
commit: (id: string) => GitRef;
|
|
2624
|
+
/**
|
|
2625
|
+
* Returns details for HEAD.
|
|
2626
|
+
*/
|
|
2627
|
+
head: () => GitRef;
|
|
2628
|
+
/**
|
|
2629
|
+
* Returns details of a ref.
|
|
2630
|
+
* @param name Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
|
|
2631
|
+
*/
|
|
2632
|
+
ref: (name: string) => GitRef;
|
|
2633
|
+
/**
|
|
2634
|
+
* Returns details of a tag.
|
|
2635
|
+
* @param name Tag's name (e.g., "v0.3.9").
|
|
2636
|
+
*/
|
|
2637
|
+
tag: (name: string) => GitRef;
|
|
2638
|
+
/**
|
|
2639
|
+
* tags that match any of the given glob patterns.
|
|
2640
|
+
* @param opts.patterns Glob patterns (e.g., "refs/tags/v*").
|
|
2641
|
+
*/
|
|
2642
|
+
tags: (opts?: GitRepositoryTagsOpts) => Promise<string[]>;
|
|
2643
|
+
/**
|
|
2644
|
+
* Header to authenticate the remote with.
|
|
2645
|
+
* @param header Secret used to populate the Authorization HTTP header
|
|
2646
|
+
*/
|
|
2647
|
+
withAuthHeader: (header: Secret) => GitRepository;
|
|
2648
|
+
/**
|
|
2649
|
+
* Token to authenticate the remote with.
|
|
2650
|
+
* @param token Secret used to populate the password during basic HTTP Authorization
|
|
2651
|
+
*/
|
|
2652
|
+
withAuthToken: (token: Secret) => GitRepository;
|
|
2653
|
+
/**
|
|
2654
|
+
* Call the provided function with current GitRepository.
|
|
2655
|
+
*
|
|
2656
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2657
|
+
*/
|
|
2658
|
+
with: (arg: (param: GitRepository) => GitRepository) => GitRepository;
|
|
2659
|
+
}
|
|
2660
|
+
/**
|
|
2661
|
+
* Information about the host environment.
|
|
2662
|
+
*/
|
|
2663
|
+
export declare class Host extends BaseClient {
|
|
2664
|
+
private readonly _id?;
|
|
2665
|
+
/**
|
|
2666
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2667
|
+
*/
|
|
2668
|
+
constructor(parent?: {
|
|
2669
|
+
queryTree?: QueryTree[];
|
|
2670
|
+
ctx: Context;
|
|
2671
|
+
}, _id?: HostID);
|
|
2672
|
+
/**
|
|
2673
|
+
* A unique identifier for this Host.
|
|
2674
|
+
*/
|
|
2675
|
+
id: () => Promise<HostID>;
|
|
2676
|
+
/**
|
|
2677
|
+
* Accesses a directory on the host.
|
|
2678
|
+
* @param path Location of the directory to access (e.g., ".").
|
|
2679
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
2680
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
2681
|
+
*/
|
|
2682
|
+
directory: (path: string, opts?: HostDirectoryOpts) => Directory;
|
|
2683
|
+
/**
|
|
2684
|
+
* Accesses a file on the host.
|
|
2685
|
+
* @param path Location of the file to retrieve (e.g., "README.md").
|
|
2686
|
+
*/
|
|
2687
|
+
file: (path: string) => File;
|
|
2688
|
+
/**
|
|
2689
|
+
* Creates a service that forwards traffic to a specified address via the host.
|
|
2690
|
+
* @param opts.host Upstream host to forward traffic to.
|
|
2691
|
+
* @param opts.ports Ports to expose via the service, forwarding through the host network.
|
|
2692
|
+
*
|
|
2693
|
+
* If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
|
|
2694
|
+
*
|
|
2695
|
+
* An empty set of ports is not valid; an error will be returned.
|
|
2696
|
+
*/
|
|
2697
|
+
service: (opts?: HostServiceOpts) => Service;
|
|
2698
|
+
/**
|
|
2699
|
+
* Sets a secret given a user-defined name and the file path on the host, and returns the secret.
|
|
2700
|
+
*
|
|
2701
|
+
* The file is limited to a size of 512000 bytes.
|
|
2702
|
+
* @param name The user defined name for this secret.
|
|
2703
|
+
* @param path Location of the file to set as a secret.
|
|
2704
|
+
*/
|
|
2705
|
+
setSecretFile: (name: string, path: string) => Secret;
|
|
2706
|
+
/**
|
|
2707
|
+
* Creates a tunnel that forwards traffic from the host to a service.
|
|
2708
|
+
* @param service Service to send traffic from the tunnel.
|
|
2709
|
+
* @param opts.ports Configure explicit port forwarding rules for the tunnel.
|
|
2710
|
+
*
|
|
2711
|
+
* If a port's frontend is unspecified or 0, a random port will be chosen by the host.
|
|
2712
|
+
*
|
|
2713
|
+
* 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.
|
|
2714
|
+
*
|
|
2715
|
+
* If ports are given and native is true, the ports are additive.
|
|
2716
|
+
* @param opts.native Map each service port to the same port on the host, as if the service were running natively.
|
|
2717
|
+
*
|
|
2718
|
+
* Note: enabling may result in port conflicts.
|
|
2719
|
+
*/
|
|
2720
|
+
tunnel: (service: Service, opts?: HostTunnelOpts) => Service;
|
|
2721
|
+
/**
|
|
2722
|
+
* Accesses a Unix socket on the host.
|
|
2723
|
+
* @param path Location of the Unix socket (e.g., "/var/run/docker.sock").
|
|
2724
|
+
*/
|
|
2725
|
+
unixSocket: (path: string) => Socket;
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* A graphql input type, which is essentially just a group of named args.
|
|
2729
|
+
* This is currently only used to represent pre-existing usage of graphql input types
|
|
2730
|
+
* in the core API. It is not used by user modules and shouldn't ever be as user
|
|
2731
|
+
* module accept input objects via their id rather than graphql input types.
|
|
2732
|
+
*/
|
|
2733
|
+
export declare class InputTypeDef extends BaseClient {
|
|
2734
|
+
private readonly _id?;
|
|
2735
|
+
private readonly _name?;
|
|
2736
|
+
/**
|
|
2737
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2738
|
+
*/
|
|
2739
|
+
constructor(parent?: {
|
|
2740
|
+
queryTree?: QueryTree[];
|
|
2741
|
+
ctx: Context;
|
|
2742
|
+
}, _id?: InputTypeDefID, _name?: string);
|
|
2743
|
+
/**
|
|
2744
|
+
* A unique identifier for this InputTypeDef.
|
|
2745
|
+
*/
|
|
2746
|
+
id: () => Promise<InputTypeDefID>;
|
|
2747
|
+
/**
|
|
2748
|
+
* Static fields defined on this input object, if any.
|
|
2749
|
+
*/
|
|
2750
|
+
fields: () => Promise<FieldTypeDef[]>;
|
|
2751
|
+
/**
|
|
2752
|
+
* The name of the input object.
|
|
2753
|
+
*/
|
|
2754
|
+
name: () => Promise<string>;
|
|
2755
|
+
}
|
|
2756
|
+
/**
|
|
2757
|
+
* A definition of a custom interface defined in a Module.
|
|
2758
|
+
*/
|
|
2759
|
+
export declare class InterfaceTypeDef extends BaseClient {
|
|
2760
|
+
private readonly _id?;
|
|
2761
|
+
private readonly _description?;
|
|
2762
|
+
private readonly _name?;
|
|
2763
|
+
private readonly _sourceModuleName?;
|
|
2764
|
+
/**
|
|
2765
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2766
|
+
*/
|
|
2767
|
+
constructor(parent?: {
|
|
2768
|
+
queryTree?: QueryTree[];
|
|
2769
|
+
ctx: Context;
|
|
2770
|
+
}, _id?: InterfaceTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
2771
|
+
/**
|
|
2772
|
+
* A unique identifier for this InterfaceTypeDef.
|
|
2773
|
+
*/
|
|
2774
|
+
id: () => Promise<InterfaceTypeDefID>;
|
|
2775
|
+
/**
|
|
2776
|
+
* The doc string for the interface, if any.
|
|
2777
|
+
*/
|
|
2778
|
+
description: () => Promise<string>;
|
|
2779
|
+
/**
|
|
2780
|
+
* Functions defined on this interface, if any.
|
|
2781
|
+
*/
|
|
2782
|
+
functions: () => Promise<Function_[]>;
|
|
2783
|
+
/**
|
|
2784
|
+
* The name of the interface.
|
|
2785
|
+
*/
|
|
2786
|
+
name: () => Promise<string>;
|
|
2787
|
+
/**
|
|
2788
|
+
* If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
2789
|
+
*/
|
|
2790
|
+
sourceModuleName: () => Promise<string>;
|
|
2791
|
+
}
|
|
2792
|
+
/**
|
|
2793
|
+
* A simple key value object that represents a label.
|
|
2794
|
+
*/
|
|
2795
|
+
export declare class Label extends BaseClient {
|
|
2796
|
+
private readonly _id?;
|
|
2797
|
+
private readonly _name?;
|
|
2798
|
+
private readonly _value?;
|
|
2799
|
+
/**
|
|
2800
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2801
|
+
*/
|
|
2802
|
+
constructor(parent?: {
|
|
2803
|
+
queryTree?: QueryTree[];
|
|
2804
|
+
ctx: Context;
|
|
2805
|
+
}, _id?: LabelID, _name?: string, _value?: string);
|
|
2806
|
+
/**
|
|
2807
|
+
* A unique identifier for this Label.
|
|
2808
|
+
*/
|
|
2809
|
+
id: () => Promise<LabelID>;
|
|
2810
|
+
/**
|
|
2811
|
+
* The label name.
|
|
2812
|
+
*/
|
|
2813
|
+
name: () => Promise<string>;
|
|
2814
|
+
/**
|
|
2815
|
+
* The label value.
|
|
2816
|
+
*/
|
|
2817
|
+
value: () => Promise<string>;
|
|
2818
|
+
}
|
|
2819
|
+
/**
|
|
2820
|
+
* A definition of a list type in a Module.
|
|
2821
|
+
*/
|
|
2822
|
+
export declare class ListTypeDef extends BaseClient {
|
|
2823
|
+
private readonly _id?;
|
|
2824
|
+
/**
|
|
2825
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2826
|
+
*/
|
|
2827
|
+
constructor(parent?: {
|
|
2828
|
+
queryTree?: QueryTree[];
|
|
2829
|
+
ctx: Context;
|
|
2830
|
+
}, _id?: ListTypeDefID);
|
|
2831
|
+
/**
|
|
2832
|
+
* A unique identifier for this ListTypeDef.
|
|
2833
|
+
*/
|
|
2834
|
+
id: () => Promise<ListTypeDefID>;
|
|
2835
|
+
/**
|
|
2836
|
+
* The type of the elements in the list.
|
|
2837
|
+
*/
|
|
2838
|
+
elementTypeDef: () => TypeDef;
|
|
2839
|
+
}
|
|
2840
|
+
/**
|
|
2841
|
+
* Module source that that originates from a path locally relative to an arbitrary directory.
|
|
2842
|
+
*/
|
|
2843
|
+
export declare class LocalModuleSource extends BaseClient {
|
|
2844
|
+
private readonly _id?;
|
|
2845
|
+
private readonly _relHostPath?;
|
|
2846
|
+
private readonly _rootSubpath?;
|
|
2847
|
+
/**
|
|
2848
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2849
|
+
*/
|
|
2850
|
+
constructor(parent?: {
|
|
2851
|
+
queryTree?: QueryTree[];
|
|
2852
|
+
ctx: Context;
|
|
2853
|
+
}, _id?: LocalModuleSourceID, _relHostPath?: string, _rootSubpath?: string);
|
|
2854
|
+
/**
|
|
2855
|
+
* A unique identifier for this LocalModuleSource.
|
|
2856
|
+
*/
|
|
2857
|
+
id: () => Promise<LocalModuleSourceID>;
|
|
2858
|
+
/**
|
|
2859
|
+
* The directory containing everything needed to load load and use the module.
|
|
2860
|
+
*/
|
|
2861
|
+
contextDirectory: () => Directory;
|
|
2862
|
+
/**
|
|
2863
|
+
* The relative path to the module root from the host directory
|
|
2864
|
+
*/
|
|
2865
|
+
relHostPath: () => Promise<string>;
|
|
2866
|
+
/**
|
|
2867
|
+
* The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory).
|
|
2868
|
+
*/
|
|
2869
|
+
rootSubpath: () => Promise<string>;
|
|
2870
|
+
}
|
|
2871
|
+
/**
|
|
2872
|
+
* A Dagger module.
|
|
2873
|
+
*/
|
|
2874
|
+
export declare class Module_ extends BaseClient {
|
|
2875
|
+
private readonly _id?;
|
|
2876
|
+
private readonly _description?;
|
|
2877
|
+
private readonly _name?;
|
|
2878
|
+
private readonly _sdk?;
|
|
2879
|
+
private readonly _serve?;
|
|
2880
|
+
/**
|
|
2881
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2882
|
+
*/
|
|
2883
|
+
constructor(parent?: {
|
|
2884
|
+
queryTree?: QueryTree[];
|
|
2885
|
+
ctx: Context;
|
|
2886
|
+
}, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void);
|
|
2887
|
+
/**
|
|
2888
|
+
* A unique identifier for this Module.
|
|
2889
|
+
*/
|
|
2890
|
+
id: () => Promise<ModuleID>;
|
|
2891
|
+
/**
|
|
2892
|
+
* Modules used by this module.
|
|
2893
|
+
*/
|
|
2894
|
+
dependencies: () => Promise<Module_[]>;
|
|
2895
|
+
/**
|
|
2896
|
+
* The dependencies as configured by the module.
|
|
2897
|
+
*/
|
|
2898
|
+
dependencyConfig: () => Promise<ModuleDependency[]>;
|
|
2899
|
+
/**
|
|
2900
|
+
* The doc string of the module, if any
|
|
2901
|
+
*/
|
|
2902
|
+
description: () => Promise<string>;
|
|
2903
|
+
/**
|
|
2904
|
+
* Enumerations served by this module.
|
|
2905
|
+
*/
|
|
2906
|
+
enums: () => Promise<TypeDef[]>;
|
|
2907
|
+
/**
|
|
2908
|
+
* The generated files and directories made on top of the module source's context directory.
|
|
2909
|
+
*/
|
|
2910
|
+
generatedContextDiff: () => Directory;
|
|
2911
|
+
/**
|
|
2912
|
+
* The module source's context plus any configuration and source files created by codegen.
|
|
2913
|
+
*/
|
|
2914
|
+
generatedContextDirectory: () => Directory;
|
|
2915
|
+
/**
|
|
2916
|
+
* Retrieves the module with the objects loaded via its SDK.
|
|
2917
|
+
*/
|
|
2918
|
+
initialize: () => Module_;
|
|
2919
|
+
/**
|
|
2920
|
+
* Interfaces served by this module.
|
|
2921
|
+
*/
|
|
2922
|
+
interfaces: () => Promise<TypeDef[]>;
|
|
2923
|
+
/**
|
|
2924
|
+
* The name of the module
|
|
2925
|
+
*/
|
|
2926
|
+
name: () => Promise<string>;
|
|
2927
|
+
/**
|
|
2928
|
+
* Objects served by this module.
|
|
2929
|
+
*/
|
|
2930
|
+
objects: () => Promise<TypeDef[]>;
|
|
2931
|
+
/**
|
|
2932
|
+
* The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
|
|
2933
|
+
*/
|
|
2934
|
+
runtime: () => Container;
|
|
2935
|
+
/**
|
|
2936
|
+
* The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
|
|
2937
|
+
*/
|
|
2938
|
+
sdk: () => Promise<string>;
|
|
2939
|
+
/**
|
|
2940
|
+
* Serve a module's API in the current session.
|
|
2941
|
+
*
|
|
2942
|
+
* Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
|
|
2943
|
+
*/
|
|
2944
|
+
serve: () => Promise<void>;
|
|
2945
|
+
/**
|
|
2946
|
+
* The source for the module.
|
|
2947
|
+
*/
|
|
2948
|
+
source: () => ModuleSource;
|
|
2949
|
+
/**
|
|
2950
|
+
* Retrieves the module with the given description
|
|
2951
|
+
* @param description The description to set
|
|
2952
|
+
*/
|
|
2953
|
+
withDescription: (description: string) => Module_;
|
|
2954
|
+
/**
|
|
2955
|
+
* This module plus the given Enum type and associated values
|
|
2956
|
+
*/
|
|
2957
|
+
withEnum: (enum_: TypeDef) => Module_;
|
|
2958
|
+
/**
|
|
2959
|
+
* This module plus the given Interface type and associated functions
|
|
2960
|
+
*/
|
|
2961
|
+
withInterface: (iface: TypeDef) => Module_;
|
|
2962
|
+
/**
|
|
2963
|
+
* This module plus the given Object type and associated functions.
|
|
2964
|
+
*/
|
|
2965
|
+
withObject: (object: TypeDef) => Module_;
|
|
2966
|
+
/**
|
|
2967
|
+
* Retrieves the module with basic configuration loaded if present.
|
|
2968
|
+
* @param source The module source to initialize from.
|
|
2969
|
+
* @param opts.engineVersion The engine version to upgrade to.
|
|
2970
|
+
*/
|
|
2971
|
+
withSource: (source: ModuleSource, opts?: ModuleWithSourceOpts) => Module_;
|
|
2972
|
+
/**
|
|
2973
|
+
* Call the provided function with current Module.
|
|
2974
|
+
*
|
|
2975
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2976
|
+
*/
|
|
2977
|
+
with: (arg: (param: Module_) => Module_) => Module_;
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* The configuration of dependency of a module.
|
|
2981
|
+
*/
|
|
2982
|
+
export declare class ModuleDependency extends BaseClient {
|
|
2983
|
+
private readonly _id?;
|
|
2984
|
+
private readonly _name?;
|
|
2985
|
+
/**
|
|
2986
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
2987
|
+
*/
|
|
2988
|
+
constructor(parent?: {
|
|
2989
|
+
queryTree?: QueryTree[];
|
|
2990
|
+
ctx: Context;
|
|
2991
|
+
}, _id?: ModuleDependencyID, _name?: string);
|
|
2992
|
+
/**
|
|
2993
|
+
* A unique identifier for this ModuleDependency.
|
|
2994
|
+
*/
|
|
2995
|
+
id: () => Promise<ModuleDependencyID>;
|
|
2996
|
+
/**
|
|
2997
|
+
* The name of the dependency module.
|
|
2998
|
+
*/
|
|
2999
|
+
name: () => Promise<string>;
|
|
3000
|
+
/**
|
|
3001
|
+
* The source for the dependency module.
|
|
3002
|
+
*/
|
|
3003
|
+
source: () => ModuleSource;
|
|
3004
|
+
}
|
|
3005
|
+
/**
|
|
3006
|
+
* The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
|
|
3007
|
+
*/
|
|
3008
|
+
export declare class ModuleSource extends BaseClient {
|
|
3009
|
+
private readonly _id?;
|
|
3010
|
+
private readonly _asString?;
|
|
3011
|
+
private readonly _configExists?;
|
|
3012
|
+
private readonly _digest?;
|
|
3013
|
+
private readonly _kind?;
|
|
3014
|
+
private readonly _moduleName?;
|
|
3015
|
+
private readonly _moduleOriginalName?;
|
|
3016
|
+
private readonly _resolveContextPathFromCaller?;
|
|
3017
|
+
private readonly _sourceRootSubpath?;
|
|
3018
|
+
private readonly _sourceSubpath?;
|
|
3019
|
+
/**
|
|
3020
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3021
|
+
*/
|
|
3022
|
+
constructor(parent?: {
|
|
3023
|
+
queryTree?: QueryTree[];
|
|
3024
|
+
ctx: Context;
|
|
3025
|
+
}, _id?: ModuleSourceID, _asString?: string, _configExists?: boolean, _digest?: string, _kind?: ModuleSourceKind, _moduleName?: string, _moduleOriginalName?: string, _resolveContextPathFromCaller?: string, _sourceRootSubpath?: string, _sourceSubpath?: string);
|
|
3026
|
+
/**
|
|
3027
|
+
* A unique identifier for this ModuleSource.
|
|
3028
|
+
*/
|
|
3029
|
+
id: () => Promise<ModuleSourceID>;
|
|
3030
|
+
/**
|
|
3031
|
+
* If the source is a of kind git, the git source representation of it.
|
|
3032
|
+
*/
|
|
3033
|
+
asGitSource: () => GitModuleSource;
|
|
3034
|
+
/**
|
|
3035
|
+
* If the source is of kind local, the local source representation of it.
|
|
3036
|
+
*/
|
|
3037
|
+
asLocalSource: () => LocalModuleSource;
|
|
3038
|
+
/**
|
|
3039
|
+
* Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
|
|
3040
|
+
* @param opts.engineVersion The engine version to upgrade to.
|
|
3041
|
+
*/
|
|
3042
|
+
asModule: (opts?: ModuleSourceAsModuleOpts) => Module_;
|
|
3043
|
+
/**
|
|
3044
|
+
* A human readable ref string representation of this module source.
|
|
3045
|
+
*/
|
|
3046
|
+
asString: () => Promise<string>;
|
|
3047
|
+
/**
|
|
3048
|
+
* Returns whether the module source has a configuration file.
|
|
3049
|
+
*/
|
|
3050
|
+
configExists: () => Promise<boolean>;
|
|
3051
|
+
/**
|
|
3052
|
+
* The directory containing everything needed to load load and use the module.
|
|
3053
|
+
*/
|
|
3054
|
+
contextDirectory: () => Directory;
|
|
3055
|
+
/**
|
|
3056
|
+
* The dependencies of the module source. Includes dependencies from the configuration and any extras from withDependencies calls.
|
|
3057
|
+
*/
|
|
3058
|
+
dependencies: () => Promise<ModuleDependency[]>;
|
|
3059
|
+
/**
|
|
3060
|
+
* Return the module source's content digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
|
|
3061
|
+
*/
|
|
3062
|
+
digest: () => Promise<string>;
|
|
3063
|
+
/**
|
|
3064
|
+
* The directory containing the module configuration and source code (source code may be in a subdir).
|
|
3065
|
+
* @param path The path from the source directory to select.
|
|
3066
|
+
*/
|
|
3067
|
+
directory: (path: string) => Directory;
|
|
3068
|
+
/**
|
|
3069
|
+
* The kind of source (e.g. local, git, etc.)
|
|
3070
|
+
*/
|
|
3071
|
+
kind: () => Promise<ModuleSourceKind>;
|
|
3072
|
+
/**
|
|
3073
|
+
* If set, the name of the module this source references, including any overrides at runtime by callers.
|
|
3074
|
+
*/
|
|
3075
|
+
moduleName: () => Promise<string>;
|
|
3076
|
+
/**
|
|
3077
|
+
* The original name of the module this source references, as defined in the module configuration.
|
|
3078
|
+
*/
|
|
3079
|
+
moduleOriginalName: () => Promise<string>;
|
|
3080
|
+
/**
|
|
3081
|
+
* The path to the module source's context directory on the caller's filesystem. Only valid for local sources.
|
|
3082
|
+
*/
|
|
3083
|
+
resolveContextPathFromCaller: () => Promise<string>;
|
|
3084
|
+
/**
|
|
3085
|
+
* Resolve the provided module source arg as a dependency relative to this module source.
|
|
3086
|
+
* @param dep The dependency module source to resolve.
|
|
3087
|
+
*/
|
|
3088
|
+
resolveDependency: (dep: ModuleSource) => ModuleSource;
|
|
3089
|
+
/**
|
|
3090
|
+
* Load a directory from the caller optionally with a given view applied.
|
|
3091
|
+
* @param path The path on the caller's filesystem to load.
|
|
3092
|
+
* @param opts.viewName If set, the name of the view to apply to the path.
|
|
3093
|
+
* @param opts.ignore Patterns to ignore when loading the directory.
|
|
3094
|
+
*/
|
|
3095
|
+
resolveDirectoryFromCaller: (path: string, opts?: ModuleSourceResolveDirectoryFromCallerOpts) => Directory;
|
|
3096
|
+
/**
|
|
3097
|
+
* Load the source from its path on the caller's filesystem, including only needed+configured files and directories. Only valid for local sources.
|
|
3098
|
+
*/
|
|
3099
|
+
resolveFromCaller: () => ModuleSource;
|
|
3100
|
+
/**
|
|
3101
|
+
* The path relative to context of the root of the module source, which contains dagger.json. It also contains the module implementation source code, but that may or may not being a subdir of this root.
|
|
3102
|
+
*/
|
|
3103
|
+
sourceRootSubpath: () => Promise<string>;
|
|
3104
|
+
/**
|
|
3105
|
+
* The path relative to context of the module implementation source code.
|
|
3106
|
+
*/
|
|
3107
|
+
sourceSubpath: () => Promise<string>;
|
|
3108
|
+
/**
|
|
3109
|
+
* Retrieve a named view defined for this module source.
|
|
3110
|
+
* @param name The name of the view to retrieve.
|
|
3111
|
+
*/
|
|
3112
|
+
view: (name: string) => ModuleSourceView;
|
|
3113
|
+
/**
|
|
3114
|
+
* The named views defined for this module source, which are sets of directory filters that can be applied to directory arguments provided to functions.
|
|
3115
|
+
*/
|
|
3116
|
+
views: () => Promise<ModuleSourceView[]>;
|
|
3117
|
+
/**
|
|
3118
|
+
* Update the module source with a new context directory. Only valid for local sources.
|
|
3119
|
+
* @param dir The directory to set as the context directory.
|
|
3120
|
+
*/
|
|
3121
|
+
withContextDirectory: (dir: Directory) => ModuleSource;
|
|
3122
|
+
/**
|
|
3123
|
+
* Append the provided dependencies to the module source's dependency list.
|
|
3124
|
+
* @param dependencies The dependencies to append.
|
|
3125
|
+
*/
|
|
3126
|
+
withDependencies: (dependencies: ModuleDependency[]) => ModuleSource;
|
|
3127
|
+
/**
|
|
3128
|
+
* Sets module init arguments
|
|
3129
|
+
* @param opts.merge Merge module dependencies into the current project's
|
|
3130
|
+
*/
|
|
3131
|
+
withInit: (opts?: ModuleSourceWithInitOpts) => ModuleSource;
|
|
3132
|
+
/**
|
|
3133
|
+
* Update the module source with a new name.
|
|
3134
|
+
* @param name The name to set.
|
|
3135
|
+
*/
|
|
3136
|
+
withName: (name: string) => ModuleSource;
|
|
3137
|
+
/**
|
|
3138
|
+
* Update the module source with a new SDK.
|
|
3139
|
+
* @param sdk The SDK to set.
|
|
3140
|
+
*/
|
|
3141
|
+
withSDK: (sdk: string) => ModuleSource;
|
|
3142
|
+
/**
|
|
3143
|
+
* Update the module source with a new source subpath.
|
|
3144
|
+
* @param path The path to set as the source subpath.
|
|
3145
|
+
*/
|
|
3146
|
+
withSourceSubpath: (path: string) => ModuleSource;
|
|
3147
|
+
/**
|
|
3148
|
+
* Update the module source with a new named view.
|
|
3149
|
+
* @param name The name of the view to set.
|
|
3150
|
+
* @param patterns The patterns to set as the view filters.
|
|
3151
|
+
*/
|
|
3152
|
+
withView: (name: string, patterns: string[]) => ModuleSource;
|
|
3153
|
+
/**
|
|
3154
|
+
* Call the provided function with current ModuleSource.
|
|
3155
|
+
*
|
|
3156
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
3157
|
+
*/
|
|
3158
|
+
with: (arg: (param: ModuleSource) => ModuleSource) => ModuleSource;
|
|
3159
|
+
}
|
|
3160
|
+
/**
|
|
3161
|
+
* A named set of path filters that can be applied to directory arguments provided to functions.
|
|
3162
|
+
*/
|
|
3163
|
+
export declare class ModuleSourceView extends BaseClient {
|
|
3164
|
+
private readonly _id?;
|
|
3165
|
+
private readonly _name?;
|
|
3166
|
+
/**
|
|
3167
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3168
|
+
*/
|
|
3169
|
+
constructor(parent?: {
|
|
3170
|
+
queryTree?: QueryTree[];
|
|
3171
|
+
ctx: Context;
|
|
3172
|
+
}, _id?: ModuleSourceViewID, _name?: string);
|
|
3173
|
+
/**
|
|
3174
|
+
* A unique identifier for this ModuleSourceView.
|
|
3175
|
+
*/
|
|
3176
|
+
id: () => Promise<ModuleSourceViewID>;
|
|
3177
|
+
/**
|
|
3178
|
+
* The name of the view
|
|
3179
|
+
*/
|
|
3180
|
+
name: () => Promise<string>;
|
|
3181
|
+
/**
|
|
3182
|
+
* The patterns of the view used to filter paths
|
|
3183
|
+
*/
|
|
3184
|
+
patterns: () => Promise<string[]>;
|
|
3185
|
+
}
|
|
3186
|
+
/**
|
|
3187
|
+
* A definition of a custom object defined in a Module.
|
|
3188
|
+
*/
|
|
3189
|
+
export declare class ObjectTypeDef extends BaseClient {
|
|
3190
|
+
private readonly _id?;
|
|
3191
|
+
private readonly _description?;
|
|
3192
|
+
private readonly _name?;
|
|
3193
|
+
private readonly _sourceModuleName?;
|
|
3194
|
+
/**
|
|
3195
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3196
|
+
*/
|
|
3197
|
+
constructor(parent?: {
|
|
3198
|
+
queryTree?: QueryTree[];
|
|
3199
|
+
ctx: Context;
|
|
3200
|
+
}, _id?: ObjectTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
3201
|
+
/**
|
|
3202
|
+
* A unique identifier for this ObjectTypeDef.
|
|
3203
|
+
*/
|
|
3204
|
+
id: () => Promise<ObjectTypeDefID>;
|
|
3205
|
+
/**
|
|
3206
|
+
* The function used to construct new instances of this object, if any
|
|
3207
|
+
*/
|
|
3208
|
+
constructor_: () => Function_;
|
|
3209
|
+
/**
|
|
3210
|
+
* The doc string for the object, if any.
|
|
3211
|
+
*/
|
|
3212
|
+
description: () => Promise<string>;
|
|
3213
|
+
/**
|
|
3214
|
+
* Static fields defined on this object, if any.
|
|
3215
|
+
*/
|
|
3216
|
+
fields: () => Promise<FieldTypeDef[]>;
|
|
3217
|
+
/**
|
|
3218
|
+
* Functions defined on this object, if any.
|
|
3219
|
+
*/
|
|
3220
|
+
functions: () => Promise<Function_[]>;
|
|
3221
|
+
/**
|
|
3222
|
+
* The name of the object.
|
|
3223
|
+
*/
|
|
3224
|
+
name: () => Promise<string>;
|
|
3225
|
+
/**
|
|
3226
|
+
* If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
3227
|
+
*/
|
|
3228
|
+
sourceModuleName: () => Promise<string>;
|
|
3229
|
+
}
|
|
3230
|
+
/**
|
|
3231
|
+
* A port exposed by a container.
|
|
3232
|
+
*/
|
|
3233
|
+
export declare class Port extends BaseClient {
|
|
3234
|
+
private readonly _id?;
|
|
3235
|
+
private readonly _description?;
|
|
3236
|
+
private readonly _experimentalSkipHealthcheck?;
|
|
3237
|
+
private readonly _port?;
|
|
3238
|
+
private readonly _protocol?;
|
|
3239
|
+
/**
|
|
3240
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3241
|
+
*/
|
|
3242
|
+
constructor(parent?: {
|
|
3243
|
+
queryTree?: QueryTree[];
|
|
3244
|
+
ctx: Context;
|
|
3245
|
+
}, _id?: PortID, _description?: string, _experimentalSkipHealthcheck?: boolean, _port?: number, _protocol?: NetworkProtocol);
|
|
3246
|
+
/**
|
|
3247
|
+
* A unique identifier for this Port.
|
|
3248
|
+
*/
|
|
3249
|
+
id: () => Promise<PortID>;
|
|
3250
|
+
/**
|
|
3251
|
+
* The port description.
|
|
3252
|
+
*/
|
|
3253
|
+
description: () => Promise<string>;
|
|
3254
|
+
/**
|
|
3255
|
+
* Skip the health check when run as a service.
|
|
3256
|
+
*/
|
|
3257
|
+
experimentalSkipHealthcheck: () => Promise<boolean>;
|
|
3258
|
+
/**
|
|
3259
|
+
* The port number.
|
|
3260
|
+
*/
|
|
3261
|
+
port: () => Promise<number>;
|
|
3262
|
+
/**
|
|
3263
|
+
* The transport layer protocol.
|
|
3264
|
+
*/
|
|
3265
|
+
protocol: () => Promise<NetworkProtocol>;
|
|
3266
|
+
}
|
|
3267
|
+
/**
|
|
3268
|
+
* The root of the DAG.
|
|
3269
|
+
*/
|
|
3270
|
+
export declare class Client extends BaseClient {
|
|
3271
|
+
private readonly _defaultPlatform?;
|
|
3272
|
+
private readonly _version?;
|
|
3273
|
+
/**
|
|
3274
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3275
|
+
*/
|
|
3276
|
+
constructor(parent?: {
|
|
3277
|
+
queryTree?: QueryTree[];
|
|
3278
|
+
ctx: Context;
|
|
3279
|
+
}, _defaultPlatform?: Platform, _version?: string);
|
|
3280
|
+
/**
|
|
3281
|
+
* Get the Raw GraphQL client.
|
|
3282
|
+
*/
|
|
3283
|
+
getGQLClient(): import("graphql-request").GraphQLClient;
|
|
3284
|
+
/**
|
|
3285
|
+
* Retrieves a content-addressed blob.
|
|
3286
|
+
* @param digest Digest of the blob
|
|
3287
|
+
* @param size Size of the blob
|
|
3288
|
+
* @param mediaType Media type of the blob
|
|
3289
|
+
* @param uncompressed Digest of the uncompressed blob
|
|
3290
|
+
*/
|
|
3291
|
+
blob: (digest: string, size: number, mediaType: string, uncompressed: string) => Directory;
|
|
3292
|
+
/**
|
|
3293
|
+
* Retrieves a container builtin to the engine.
|
|
3294
|
+
* @param digest Digest of the image manifest
|
|
3295
|
+
*/
|
|
3296
|
+
builtinContainer: (digest: string) => Container;
|
|
3297
|
+
/**
|
|
3298
|
+
* Constructs a cache volume for a given cache key.
|
|
3299
|
+
* @param key A string identifier to target this cache volume (e.g., "modules-cache").
|
|
3300
|
+
*/
|
|
3301
|
+
cacheVolume: (key: string) => CacheVolume;
|
|
3302
|
+
/**
|
|
3303
|
+
* Creates a scratch container.
|
|
3304
|
+
*
|
|
3305
|
+
* Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
|
|
3306
|
+
* @param opts.platform Platform to initialize the container with.
|
|
3307
|
+
*/
|
|
3308
|
+
container: (opts?: ClientContainerOpts) => Container;
|
|
3309
|
+
/**
|
|
3310
|
+
* The FunctionCall context that the SDK caller is currently executing in.
|
|
3311
|
+
*
|
|
3312
|
+
* If the caller is not currently executing in a function, this will return an error.
|
|
3313
|
+
*/
|
|
3314
|
+
currentFunctionCall: () => FunctionCall;
|
|
3315
|
+
/**
|
|
3316
|
+
* The module currently being served in the session, if any.
|
|
3317
|
+
*/
|
|
3318
|
+
currentModule: () => CurrentModule;
|
|
3319
|
+
/**
|
|
3320
|
+
* The TypeDef representations of the objects currently being served in the session.
|
|
3321
|
+
*/
|
|
3322
|
+
currentTypeDefs: () => Promise<TypeDef[]>;
|
|
3323
|
+
/**
|
|
3324
|
+
* The Dagger engine container configuration and state
|
|
3325
|
+
*/
|
|
3326
|
+
daggerEngine: () => DaggerEngine;
|
|
3327
|
+
/**
|
|
3328
|
+
* The default platform of the engine.
|
|
3329
|
+
*/
|
|
3330
|
+
defaultPlatform: () => Promise<Platform>;
|
|
3331
|
+
/**
|
|
3332
|
+
* Creates an empty directory.
|
|
3333
|
+
*/
|
|
3334
|
+
directory: () => Directory;
|
|
3335
|
+
/**
|
|
3336
|
+
* Creates a function.
|
|
3337
|
+
* @param name Name of the function, in its original format from the implementation language.
|
|
3338
|
+
* @param returnType Return type of the function.
|
|
3339
|
+
*/
|
|
3340
|
+
function_: (name: string, returnType: TypeDef) => Function_;
|
|
3341
|
+
/**
|
|
3342
|
+
* Create a code generation result, given a directory containing the generated code.
|
|
3343
|
+
*/
|
|
3344
|
+
generatedCode: (code: Directory) => GeneratedCode;
|
|
3345
|
+
/**
|
|
3346
|
+
* Queries a Git repository.
|
|
3347
|
+
* @param url URL of the git repository.
|
|
3348
|
+
*
|
|
3349
|
+
* Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
|
|
3350
|
+
*
|
|
3351
|
+
* Suffix ".git" is optional.
|
|
3352
|
+
* @param opts.keepGitDir DEPRECATED: Set to true to keep .git directory.
|
|
3353
|
+
* @param opts.experimentalServiceHost A service which must be started before the repo is fetched.
|
|
3354
|
+
* @param opts.sshKnownHosts Set SSH known hosts
|
|
3355
|
+
* @param opts.sshAuthSocket Set SSH auth socket
|
|
3356
|
+
*/
|
|
3357
|
+
git: (url: string, opts?: ClientGitOpts) => GitRepository;
|
|
3358
|
+
/**
|
|
3359
|
+
* Queries the host environment.
|
|
3360
|
+
*/
|
|
3361
|
+
host: () => Host;
|
|
3362
|
+
/**
|
|
3363
|
+
* Returns a file containing an http remote url content.
|
|
3364
|
+
* @param url HTTP url to get the content from (e.g., "https://docs.dagger.io").
|
|
3365
|
+
* @param opts.experimentalServiceHost A service which must be started before the URL is fetched.
|
|
3366
|
+
*/
|
|
3367
|
+
http: (url: string, opts?: ClientHttpOpts) => File;
|
|
3368
|
+
/**
|
|
3369
|
+
* Load a CacheVolume from its ID.
|
|
3370
|
+
*/
|
|
3371
|
+
loadCacheVolumeFromID: (id: CacheVolumeID) => CacheVolume;
|
|
3372
|
+
/**
|
|
3373
|
+
* Load a Container from its ID.
|
|
3374
|
+
*/
|
|
3375
|
+
loadContainerFromID: (id: ContainerID) => Container;
|
|
3376
|
+
/**
|
|
3377
|
+
* Load a CurrentModule from its ID.
|
|
3378
|
+
*/
|
|
3379
|
+
loadCurrentModuleFromID: (id: CurrentModuleID) => CurrentModule;
|
|
3380
|
+
/**
|
|
3381
|
+
* Load a DaggerEngineCacheEntry from its ID.
|
|
3382
|
+
*/
|
|
3383
|
+
loadDaggerEngineCacheEntryFromID: (id: DaggerEngineCacheEntryID) => DaggerEngineCacheEntry;
|
|
3384
|
+
/**
|
|
3385
|
+
* Load a DaggerEngineCacheEntrySet from its ID.
|
|
3386
|
+
*/
|
|
3387
|
+
loadDaggerEngineCacheEntrySetFromID: (id: DaggerEngineCacheEntrySetID) => DaggerEngineCacheEntrySet;
|
|
3388
|
+
/**
|
|
3389
|
+
* Load a DaggerEngineCache from its ID.
|
|
3390
|
+
*/
|
|
3391
|
+
loadDaggerEngineCacheFromID: (id: DaggerEngineCacheID) => DaggerEngineCache;
|
|
3392
|
+
/**
|
|
3393
|
+
* Load a DaggerEngine from its ID.
|
|
3394
|
+
*/
|
|
3395
|
+
loadDaggerEngineFromID: (id: DaggerEngineID) => DaggerEngine;
|
|
3396
|
+
/**
|
|
3397
|
+
* Load a Directory from its ID.
|
|
3398
|
+
*/
|
|
3399
|
+
loadDirectoryFromID: (id: DirectoryID) => Directory;
|
|
3400
|
+
/**
|
|
3401
|
+
* Load a EnumTypeDef from its ID.
|
|
3402
|
+
*/
|
|
3403
|
+
loadEnumTypeDefFromID: (id: EnumTypeDefID) => EnumTypeDef;
|
|
3404
|
+
/**
|
|
3405
|
+
* Load a EnumValueTypeDef from its ID.
|
|
3406
|
+
*/
|
|
3407
|
+
loadEnumValueTypeDefFromID: (id: EnumValueTypeDefID) => EnumValueTypeDef;
|
|
3408
|
+
/**
|
|
3409
|
+
* Load a EnvVariable from its ID.
|
|
3410
|
+
*/
|
|
3411
|
+
loadEnvVariableFromID: (id: EnvVariableID) => EnvVariable;
|
|
3412
|
+
/**
|
|
3413
|
+
* Load a FieldTypeDef from its ID.
|
|
3414
|
+
*/
|
|
3415
|
+
loadFieldTypeDefFromID: (id: FieldTypeDefID) => FieldTypeDef;
|
|
3416
|
+
/**
|
|
3417
|
+
* Load a File from its ID.
|
|
3418
|
+
*/
|
|
3419
|
+
loadFileFromID: (id: FileID) => File;
|
|
3420
|
+
/**
|
|
3421
|
+
* Load a FunctionArg from its ID.
|
|
3422
|
+
*/
|
|
3423
|
+
loadFunctionArgFromID: (id: FunctionArgID) => FunctionArg;
|
|
3424
|
+
/**
|
|
3425
|
+
* Load a FunctionCallArgValue from its ID.
|
|
3426
|
+
*/
|
|
3427
|
+
loadFunctionCallArgValueFromID: (id: FunctionCallArgValueID) => FunctionCallArgValue;
|
|
3428
|
+
/**
|
|
3429
|
+
* Load a FunctionCall from its ID.
|
|
3430
|
+
*/
|
|
3431
|
+
loadFunctionCallFromID: (id: FunctionCallID) => FunctionCall;
|
|
3432
|
+
/**
|
|
3433
|
+
* Load a Function from its ID.
|
|
3434
|
+
*/
|
|
3435
|
+
loadFunctionFromID: (id: FunctionID) => Function_;
|
|
3436
|
+
/**
|
|
3437
|
+
* Load a GeneratedCode from its ID.
|
|
3438
|
+
*/
|
|
3439
|
+
loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
|
|
3440
|
+
/**
|
|
3441
|
+
* Load a GitModuleSource from its ID.
|
|
3442
|
+
*/
|
|
3443
|
+
loadGitModuleSourceFromID: (id: GitModuleSourceID) => GitModuleSource;
|
|
3444
|
+
/**
|
|
3445
|
+
* Load a GitRef from its ID.
|
|
3446
|
+
*/
|
|
3447
|
+
loadGitRefFromID: (id: GitRefID) => GitRef;
|
|
3448
|
+
/**
|
|
3449
|
+
* Load a GitRepository from its ID.
|
|
3450
|
+
*/
|
|
3451
|
+
loadGitRepositoryFromID: (id: GitRepositoryID) => GitRepository;
|
|
3452
|
+
/**
|
|
3453
|
+
* Load a Host from its ID.
|
|
3454
|
+
*/
|
|
3455
|
+
loadHostFromID: (id: HostID) => Host;
|
|
3456
|
+
/**
|
|
3457
|
+
* Load a InputTypeDef from its ID.
|
|
3458
|
+
*/
|
|
3459
|
+
loadInputTypeDefFromID: (id: InputTypeDefID) => InputTypeDef;
|
|
3460
|
+
/**
|
|
3461
|
+
* Load a InterfaceTypeDef from its ID.
|
|
3462
|
+
*/
|
|
3463
|
+
loadInterfaceTypeDefFromID: (id: InterfaceTypeDefID) => InterfaceTypeDef;
|
|
3464
|
+
/**
|
|
3465
|
+
* Load a Label from its ID.
|
|
3466
|
+
*/
|
|
3467
|
+
loadLabelFromID: (id: LabelID) => Label;
|
|
3468
|
+
/**
|
|
3469
|
+
* Load a ListTypeDef from its ID.
|
|
3470
|
+
*/
|
|
3471
|
+
loadListTypeDefFromID: (id: ListTypeDefID) => ListTypeDef;
|
|
3472
|
+
/**
|
|
3473
|
+
* Load a LocalModuleSource from its ID.
|
|
3474
|
+
*/
|
|
3475
|
+
loadLocalModuleSourceFromID: (id: LocalModuleSourceID) => LocalModuleSource;
|
|
3476
|
+
/**
|
|
3477
|
+
* Load a ModuleDependency from its ID.
|
|
3478
|
+
*/
|
|
3479
|
+
loadModuleDependencyFromID: (id: ModuleDependencyID) => ModuleDependency;
|
|
3480
|
+
/**
|
|
3481
|
+
* Load a Module from its ID.
|
|
3482
|
+
*/
|
|
3483
|
+
loadModuleFromID: (id: ModuleID) => Module_;
|
|
3484
|
+
/**
|
|
3485
|
+
* Load a ModuleSource from its ID.
|
|
3486
|
+
*/
|
|
3487
|
+
loadModuleSourceFromID: (id: ModuleSourceID) => ModuleSource;
|
|
3488
|
+
/**
|
|
3489
|
+
* Load a ModuleSourceView from its ID.
|
|
3490
|
+
*/
|
|
3491
|
+
loadModuleSourceViewFromID: (id: ModuleSourceViewID) => ModuleSourceView;
|
|
3492
|
+
/**
|
|
3493
|
+
* Load a ObjectTypeDef from its ID.
|
|
3494
|
+
*/
|
|
3495
|
+
loadObjectTypeDefFromID: (id: ObjectTypeDefID) => ObjectTypeDef;
|
|
3496
|
+
/**
|
|
3497
|
+
* Load a Port from its ID.
|
|
3498
|
+
*/
|
|
3499
|
+
loadPortFromID: (id: PortID) => Port;
|
|
3500
|
+
/**
|
|
3501
|
+
* Load a ScalarTypeDef from its ID.
|
|
3502
|
+
*/
|
|
3503
|
+
loadScalarTypeDefFromID: (id: ScalarTypeDefID) => ScalarTypeDef;
|
|
3504
|
+
/**
|
|
3505
|
+
* Load a Secret from its ID.
|
|
3506
|
+
*/
|
|
3507
|
+
loadSecretFromID: (id: SecretID) => Secret;
|
|
3508
|
+
/**
|
|
3509
|
+
* Load a Service from its ID.
|
|
3510
|
+
*/
|
|
3511
|
+
loadServiceFromID: (id: ServiceID) => Service;
|
|
3512
|
+
/**
|
|
3513
|
+
* Load a Socket from its ID.
|
|
3514
|
+
*/
|
|
3515
|
+
loadSocketFromID: (id: SocketID) => Socket;
|
|
3516
|
+
/**
|
|
3517
|
+
* Load a Terminal from its ID.
|
|
3518
|
+
*/
|
|
3519
|
+
loadTerminalFromID: (id: TerminalID) => Terminal;
|
|
3520
|
+
/**
|
|
3521
|
+
* Load a TypeDef from its ID.
|
|
3522
|
+
*/
|
|
3523
|
+
loadTypeDefFromID: (id: TypeDefID) => TypeDef;
|
|
3524
|
+
/**
|
|
3525
|
+
* Create a new module.
|
|
3526
|
+
*/
|
|
3527
|
+
module_: () => Module_;
|
|
3528
|
+
/**
|
|
3529
|
+
* Create a new module dependency configuration from a module source and name
|
|
3530
|
+
* @param source The source of the dependency
|
|
3531
|
+
* @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.
|
|
3532
|
+
*/
|
|
3533
|
+
moduleDependency: (source: ModuleSource, opts?: ClientModuleDependencyOpts) => ModuleDependency;
|
|
3534
|
+
/**
|
|
3535
|
+
* Create a new module source instance from a source ref string.
|
|
3536
|
+
* @param refString The string ref representation of the module source
|
|
3537
|
+
* @param opts.stable If true, enforce that the source is a stable version for source kinds that support versioning.
|
|
3538
|
+
* @param opts.relHostPath The relative path to the module root from the host directory
|
|
3539
|
+
*/
|
|
3540
|
+
moduleSource: (refString: string, opts?: ClientModuleSourceOpts) => ModuleSource;
|
|
3541
|
+
/**
|
|
3542
|
+
* Reference a secret by name.
|
|
3543
|
+
*/
|
|
3544
|
+
secret: (name: string, opts?: ClientSecretOpts) => Secret;
|
|
3545
|
+
/**
|
|
3546
|
+
* Sets a secret given a user defined name to its plaintext and returns the secret.
|
|
3547
|
+
*
|
|
3548
|
+
* The plaintext value is limited to a size of 128000 bytes.
|
|
3549
|
+
* @param name The user defined name for this secret
|
|
3550
|
+
* @param plaintext The plaintext of the secret
|
|
3551
|
+
*/
|
|
3552
|
+
setSecret: (name: string, plaintext: string) => Secret;
|
|
3553
|
+
/**
|
|
3554
|
+
* Create a new TypeDef.
|
|
3555
|
+
*/
|
|
3556
|
+
typeDef: () => TypeDef;
|
|
3557
|
+
/**
|
|
3558
|
+
* Get the current Dagger Engine version.
|
|
3559
|
+
*/
|
|
3560
|
+
version: () => Promise<string>;
|
|
3561
|
+
}
|
|
3562
|
+
/**
|
|
3563
|
+
* A definition of a custom scalar defined in a Module.
|
|
3564
|
+
*/
|
|
3565
|
+
export declare class ScalarTypeDef extends BaseClient {
|
|
3566
|
+
private readonly _id?;
|
|
3567
|
+
private readonly _description?;
|
|
3568
|
+
private readonly _name?;
|
|
3569
|
+
private readonly _sourceModuleName?;
|
|
3570
|
+
/**
|
|
3571
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3572
|
+
*/
|
|
3573
|
+
constructor(parent?: {
|
|
3574
|
+
queryTree?: QueryTree[];
|
|
3575
|
+
ctx: Context;
|
|
3576
|
+
}, _id?: ScalarTypeDefID, _description?: string, _name?: string, _sourceModuleName?: string);
|
|
3577
|
+
/**
|
|
3578
|
+
* A unique identifier for this ScalarTypeDef.
|
|
3579
|
+
*/
|
|
3580
|
+
id: () => Promise<ScalarTypeDefID>;
|
|
3581
|
+
/**
|
|
3582
|
+
* A doc string for the scalar, if any.
|
|
3583
|
+
*/
|
|
3584
|
+
description: () => Promise<string>;
|
|
3585
|
+
/**
|
|
3586
|
+
* The name of the scalar.
|
|
3587
|
+
*/
|
|
3588
|
+
name: () => Promise<string>;
|
|
3589
|
+
/**
|
|
3590
|
+
* If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
|
|
3591
|
+
*/
|
|
3592
|
+
sourceModuleName: () => Promise<string>;
|
|
3593
|
+
}
|
|
3594
|
+
/**
|
|
3595
|
+
* A reference to a secret value, which can be handled more safely than the value itself.
|
|
3596
|
+
*/
|
|
3597
|
+
export declare class Secret extends BaseClient {
|
|
3598
|
+
private readonly _id?;
|
|
3599
|
+
private readonly _name?;
|
|
3600
|
+
private readonly _plaintext?;
|
|
3601
|
+
/**
|
|
3602
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3603
|
+
*/
|
|
3604
|
+
constructor(parent?: {
|
|
3605
|
+
queryTree?: QueryTree[];
|
|
3606
|
+
ctx: Context;
|
|
3607
|
+
}, _id?: SecretID, _name?: string, _plaintext?: string);
|
|
3608
|
+
/**
|
|
3609
|
+
* A unique identifier for this Secret.
|
|
3610
|
+
*/
|
|
3611
|
+
id: () => Promise<SecretID>;
|
|
3612
|
+
/**
|
|
3613
|
+
* The name of this secret.
|
|
3614
|
+
*/
|
|
3615
|
+
name: () => Promise<string>;
|
|
3616
|
+
/**
|
|
3617
|
+
* The value of this secret.
|
|
3618
|
+
*/
|
|
3619
|
+
plaintext: () => Promise<string>;
|
|
3620
|
+
}
|
|
3621
|
+
/**
|
|
3622
|
+
* A content-addressed service providing TCP connectivity.
|
|
3623
|
+
*/
|
|
3624
|
+
export declare class Service extends BaseClient {
|
|
3625
|
+
private readonly _id?;
|
|
3626
|
+
private readonly _endpoint?;
|
|
3627
|
+
private readonly _hostname?;
|
|
3628
|
+
private readonly _start?;
|
|
3629
|
+
private readonly _stop?;
|
|
3630
|
+
private readonly _up?;
|
|
3631
|
+
/**
|
|
3632
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3633
|
+
*/
|
|
3634
|
+
constructor(parent?: {
|
|
3635
|
+
queryTree?: QueryTree[];
|
|
3636
|
+
ctx: Context;
|
|
3637
|
+
}, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID, _up?: Void);
|
|
3638
|
+
/**
|
|
3639
|
+
* A unique identifier for this Service.
|
|
3640
|
+
*/
|
|
3641
|
+
id: () => Promise<ServiceID>;
|
|
3642
|
+
/**
|
|
3643
|
+
* Retrieves an endpoint that clients can use to reach this container.
|
|
3644
|
+
*
|
|
3645
|
+
* If no port is specified, the first exposed port is used. If none exist an error is returned.
|
|
3646
|
+
*
|
|
3647
|
+
* If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
|
|
3648
|
+
* @param opts.port The exposed port number for the endpoint
|
|
3649
|
+
* @param opts.scheme Return a URL with the given scheme, eg. http for http://
|
|
3650
|
+
*/
|
|
3651
|
+
endpoint: (opts?: ServiceEndpointOpts) => Promise<string>;
|
|
3652
|
+
/**
|
|
3653
|
+
* Retrieves a hostname which can be used by clients to reach this container.
|
|
3654
|
+
*/
|
|
3655
|
+
hostname: () => Promise<string>;
|
|
3656
|
+
/**
|
|
3657
|
+
* Retrieves the list of ports provided by the service.
|
|
3658
|
+
*/
|
|
3659
|
+
ports: () => Promise<Port[]>;
|
|
3660
|
+
/**
|
|
3661
|
+
* Start the service and wait for its health checks to succeed.
|
|
3662
|
+
*
|
|
3663
|
+
* Services bound to a Container do not need to be manually started.
|
|
3664
|
+
*/
|
|
3665
|
+
start: () => Promise<Service>;
|
|
3666
|
+
/**
|
|
3667
|
+
* Stop the service.
|
|
3668
|
+
* @param opts.kill Immediately kill the service without waiting for a graceful exit
|
|
3669
|
+
*/
|
|
3670
|
+
stop: (opts?: ServiceStopOpts) => Promise<Service>;
|
|
3671
|
+
/**
|
|
3672
|
+
* Creates a tunnel that forwards traffic from the caller's network to this service.
|
|
3673
|
+
* @param opts.ports List of frontend/backend port mappings to forward.
|
|
3674
|
+
*
|
|
3675
|
+
* Frontend is the port accepting traffic on the host, backend is the service port.
|
|
3676
|
+
* @param opts.random Bind each tunnel port to a random port on the host.
|
|
3677
|
+
*/
|
|
3678
|
+
up: (opts?: ServiceUpOpts) => Promise<void>;
|
|
3679
|
+
/**
|
|
3680
|
+
* Configures a hostname which can be used by clients within the session to reach this container.
|
|
3681
|
+
* @param hostname The hostname to use.
|
|
3682
|
+
*/
|
|
3683
|
+
withHostname: (hostname: string) => Service;
|
|
3684
|
+
/**
|
|
3685
|
+
* Call the provided function with current Service.
|
|
3686
|
+
*
|
|
3687
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
3688
|
+
*/
|
|
3689
|
+
with: (arg: (param: Service) => Service) => Service;
|
|
3690
|
+
}
|
|
3691
|
+
/**
|
|
3692
|
+
* A Unix or TCP/IP socket that can be mounted into a container.
|
|
3693
|
+
*/
|
|
3694
|
+
export declare class Socket extends BaseClient {
|
|
3695
|
+
private readonly _id?;
|
|
3696
|
+
/**
|
|
3697
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3698
|
+
*/
|
|
3699
|
+
constructor(parent?: {
|
|
3700
|
+
queryTree?: QueryTree[];
|
|
3701
|
+
ctx: Context;
|
|
3702
|
+
}, _id?: SocketID);
|
|
3703
|
+
/**
|
|
3704
|
+
* A unique identifier for this Socket.
|
|
3705
|
+
*/
|
|
3706
|
+
id: () => Promise<SocketID>;
|
|
3707
|
+
}
|
|
3708
|
+
/**
|
|
3709
|
+
* An interactive terminal that clients can connect to.
|
|
3710
|
+
*/
|
|
3711
|
+
export declare class Terminal extends BaseClient {
|
|
3712
|
+
private readonly _id?;
|
|
3713
|
+
private readonly _sync?;
|
|
3714
|
+
/**
|
|
3715
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3716
|
+
*/
|
|
3717
|
+
constructor(parent?: {
|
|
3718
|
+
queryTree?: QueryTree[];
|
|
3719
|
+
ctx: Context;
|
|
3720
|
+
}, _id?: TerminalID, _sync?: TerminalID);
|
|
3721
|
+
/**
|
|
3722
|
+
* A unique identifier for this Terminal.
|
|
3723
|
+
*/
|
|
3724
|
+
id: () => Promise<TerminalID>;
|
|
3725
|
+
/**
|
|
3726
|
+
* Forces evaluation of the pipeline in the engine.
|
|
3727
|
+
*
|
|
3728
|
+
* It doesn't run the default command if no exec has been set.
|
|
3729
|
+
*/
|
|
3730
|
+
sync: () => Promise<Terminal>;
|
|
3731
|
+
}
|
|
3732
|
+
/**
|
|
3733
|
+
* A definition of a parameter or return type in a Module.
|
|
3734
|
+
*/
|
|
3735
|
+
export declare class TypeDef extends BaseClient {
|
|
3736
|
+
private readonly _id?;
|
|
3737
|
+
private readonly _kind?;
|
|
3738
|
+
private readonly _optional?;
|
|
3739
|
+
/**
|
|
3740
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3741
|
+
*/
|
|
3742
|
+
constructor(parent?: {
|
|
3743
|
+
queryTree?: QueryTree[];
|
|
3744
|
+
ctx: Context;
|
|
3745
|
+
}, _id?: TypeDefID, _kind?: TypeDefKind, _optional?: boolean);
|
|
3746
|
+
/**
|
|
3747
|
+
* A unique identifier for this TypeDef.
|
|
3748
|
+
*/
|
|
3749
|
+
id: () => Promise<TypeDefID>;
|
|
3750
|
+
/**
|
|
3751
|
+
* If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
|
|
3752
|
+
*/
|
|
3753
|
+
asEnum: () => EnumTypeDef;
|
|
3754
|
+
/**
|
|
3755
|
+
* If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
|
|
3756
|
+
*/
|
|
3757
|
+
asInput: () => InputTypeDef;
|
|
3758
|
+
/**
|
|
3759
|
+
* If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
|
|
3760
|
+
*/
|
|
3761
|
+
asInterface: () => InterfaceTypeDef;
|
|
3762
|
+
/**
|
|
3763
|
+
* If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
|
|
3764
|
+
*/
|
|
3765
|
+
asList: () => ListTypeDef;
|
|
3766
|
+
/**
|
|
3767
|
+
* If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
|
|
3768
|
+
*/
|
|
3769
|
+
asObject: () => ObjectTypeDef;
|
|
3770
|
+
/**
|
|
3771
|
+
* If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
|
|
3772
|
+
*/
|
|
3773
|
+
asScalar: () => ScalarTypeDef;
|
|
3774
|
+
/**
|
|
3775
|
+
* The kind of type this is (e.g. primitive, list, object).
|
|
3776
|
+
*/
|
|
3777
|
+
kind: () => Promise<TypeDefKind>;
|
|
3778
|
+
/**
|
|
3779
|
+
* Whether this type can be set to null. Defaults to false.
|
|
3780
|
+
*/
|
|
3781
|
+
optional: () => Promise<boolean>;
|
|
3782
|
+
/**
|
|
3783
|
+
* Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
|
|
3784
|
+
*/
|
|
3785
|
+
withConstructor: (function_: Function_) => TypeDef;
|
|
3786
|
+
/**
|
|
3787
|
+
* Returns a TypeDef of kind Enum with the provided name.
|
|
3788
|
+
*
|
|
3789
|
+
* Note that an enum's values may be omitted if the intent is only to refer to an enum. This is how functions are able to return their own, or any other circular reference.
|
|
3790
|
+
* @param name The name of the enum
|
|
3791
|
+
* @param opts.description A doc string for the enum, if any
|
|
3792
|
+
*/
|
|
3793
|
+
withEnum: (name: string, opts?: TypeDefWithEnumOpts) => TypeDef;
|
|
3794
|
+
/**
|
|
3795
|
+
* Adds a static value for an Enum TypeDef, failing if the type is not an enum.
|
|
3796
|
+
* @param value The name of the value in the enum
|
|
3797
|
+
* @param opts.description A doc string for the value, if any
|
|
3798
|
+
*/
|
|
3799
|
+
withEnumValue: (value: string, opts?: TypeDefWithEnumValueOpts) => TypeDef;
|
|
3800
|
+
/**
|
|
3801
|
+
* Adds a static field for an Object TypeDef, failing if the type is not an object.
|
|
3802
|
+
* @param name The name of the field in the object
|
|
3803
|
+
* @param typeDef The type of the field
|
|
3804
|
+
* @param opts.description A doc string for the field, if any
|
|
3805
|
+
*/
|
|
3806
|
+
withField: (name: string, typeDef: TypeDef, opts?: TypeDefWithFieldOpts) => TypeDef;
|
|
3807
|
+
/**
|
|
3808
|
+
* Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
|
|
3809
|
+
*/
|
|
3810
|
+
withFunction: (function_: Function_) => TypeDef;
|
|
3811
|
+
/**
|
|
3812
|
+
* Returns a TypeDef of kind Interface with the provided name.
|
|
3813
|
+
*/
|
|
3814
|
+
withInterface: (name: string, opts?: TypeDefWithInterfaceOpts) => TypeDef;
|
|
3815
|
+
/**
|
|
3816
|
+
* Sets the kind of the type.
|
|
3817
|
+
*/
|
|
3818
|
+
withKind: (kind: TypeDefKind) => TypeDef;
|
|
3819
|
+
/**
|
|
3820
|
+
* Returns a TypeDef of kind List with the provided type for its elements.
|
|
3821
|
+
*/
|
|
3822
|
+
withListOf: (elementType: TypeDef) => TypeDef;
|
|
3823
|
+
/**
|
|
3824
|
+
* Returns a TypeDef of kind Object with the provided name.
|
|
3825
|
+
*
|
|
3826
|
+
* 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.
|
|
3827
|
+
*/
|
|
3828
|
+
withObject: (name: string, opts?: TypeDefWithObjectOpts) => TypeDef;
|
|
3829
|
+
/**
|
|
3830
|
+
* Sets whether this type can be set to null.
|
|
3831
|
+
*/
|
|
3832
|
+
withOptional: (optional: boolean) => TypeDef;
|
|
3833
|
+
/**
|
|
3834
|
+
* Returns a TypeDef of kind Scalar with the provided name.
|
|
3835
|
+
*/
|
|
3836
|
+
withScalar: (name: string, opts?: TypeDefWithScalarOpts) => TypeDef;
|
|
3837
|
+
/**
|
|
3838
|
+
* Call the provided function with current TypeDef.
|
|
3839
|
+
*
|
|
3840
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
3841
|
+
*/
|
|
3842
|
+
with: (arg: (param: TypeDef) => TypeDef) => TypeDef;
|
|
3843
|
+
}
|
|
3844
|
+
export declare const dag: Client;
|
|
3845
|
+
export {};
|
|
3846
|
+
//# sourceMappingURL=client.gen.d.ts.map
|