@dagger.io/dagger 0.19.10 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/client.gen.d.ts +452 -8
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +677 -11
- package/dist/src/common/graphql/connect.d.ts.map +1 -1
- package/dist/src/common/graphql/connect.js +1 -1
- package/dist/src/module/decorators.d.ts +5 -0
- package/dist/src/module/decorators.d.ts.map +1 -1
- package/dist/src/module/decorators.js +5 -0
- package/dist/src/module/entrypoint/introspection_entrypoint.js +1 -1
- package/dist/src/module/entrypoint/invoke.js +1 -1
- package/dist/src/module/entrypoint/register.d.ts.map +1 -1
- package/dist/src/module/entrypoint/register.js +7 -1
- package/dist/src/module/introspector/dagger_module/argument.d.ts +2 -0
- package/dist/src/module/introspector/dagger_module/argument.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/argument.js +7 -0
- package/dist/src/module/introspector/dagger_module/decorator.d.ts +2 -1
- package/dist/src/module/introspector/dagger_module/decorator.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/decorator.js +2 -1
- package/dist/src/module/introspector/dagger_module/function.d.ts +1 -0
- package/dist/src/module/introspector/dagger_module/function.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/function.js +6 -1
- package/dist/src/module/registry.d.ts +12 -0
- package/dist/src/module/registry.d.ts.map +1 -1
- package/dist/src/module/registry.js +6 -0
- package/dist/src/provisioning/bin.d.ts.map +1 -1
- package/dist/src/provisioning/bin.js +1 -1
- package/dist/src/provisioning/default.d.ts +1 -1
- package/dist/src/provisioning/default.d.ts.map +1 -1
- package/dist/src/provisioning/default.js +1 -1
- package/package.json +20 -20
|
@@ -71,12 +71,62 @@ export declare enum CacheSharingMode {
|
|
|
71
71
|
export type CacheVolumeID = string & {
|
|
72
72
|
__CacheVolumeID: never;
|
|
73
73
|
};
|
|
74
|
+
export type ChangesetWithChangesetOpts = {
|
|
75
|
+
/**
|
|
76
|
+
* What to do on a merge conflict
|
|
77
|
+
*/
|
|
78
|
+
onConflict?: ChangesetMergeConflict;
|
|
79
|
+
};
|
|
80
|
+
export type ChangesetWithChangesetsOpts = {
|
|
81
|
+
/**
|
|
82
|
+
* What to do on a merge conflict
|
|
83
|
+
*/
|
|
84
|
+
onConflict?: ChangesetsMergeConflict;
|
|
85
|
+
};
|
|
74
86
|
/**
|
|
75
87
|
* The `ChangesetID` scalar type represents an identifier for an object of type Changeset.
|
|
76
88
|
*/
|
|
77
89
|
export type ChangesetID = string & {
|
|
78
90
|
__ChangesetID: never;
|
|
79
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* Strategy to use when merging changesets with conflicting changes.
|
|
94
|
+
*/
|
|
95
|
+
export declare enum ChangesetMergeConflict {
|
|
96
|
+
/**
|
|
97
|
+
* Attempt the merge and fail if git merge fails due to conflicts
|
|
98
|
+
*/
|
|
99
|
+
Fail = "FAIL",
|
|
100
|
+
/**
|
|
101
|
+
* Fail before attempting merge if file-level conflicts are detected
|
|
102
|
+
*/
|
|
103
|
+
FailEarly = "FAIL_EARLY",
|
|
104
|
+
/**
|
|
105
|
+
* Let git create conflict markers in files. For modify/delete conflicts, keeps the modified version. Fails on binary conflicts.
|
|
106
|
+
*/
|
|
107
|
+
LeaveConflictMarkers = "LEAVE_CONFLICT_MARKERS",
|
|
108
|
+
/**
|
|
109
|
+
* The conflict is resolved by applying the version of the calling changeset
|
|
110
|
+
*/
|
|
111
|
+
PreferOurs = "PREFER_OURS",
|
|
112
|
+
/**
|
|
113
|
+
* The conflict is resolved by applying the version of the other changeset
|
|
114
|
+
*/
|
|
115
|
+
PreferTheirs = "PREFER_THEIRS"
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Strategy to use when merging multiple changesets with git octopus merge.
|
|
119
|
+
*/
|
|
120
|
+
export declare enum ChangesetsMergeConflict {
|
|
121
|
+
/**
|
|
122
|
+
* Attempt the octopus merge and fail if git merge fails due to conflicts
|
|
123
|
+
*/
|
|
124
|
+
Fail = "FAIL",
|
|
125
|
+
/**
|
|
126
|
+
* Fail before attempting merge if file-level conflicts are detected between any changesets
|
|
127
|
+
*/
|
|
128
|
+
FailEarly = "FAIL_EARLY"
|
|
129
|
+
}
|
|
80
130
|
/**
|
|
81
131
|
* The `CheckGroupID` scalar type represents an identifier for an object of type CheckGroup.
|
|
82
132
|
*/
|
|
@@ -615,6 +665,12 @@ export type ContainerWithoutUnixSocketOpts = {
|
|
|
615
665
|
export type ContainerID = string & {
|
|
616
666
|
__ContainerID: never;
|
|
617
667
|
};
|
|
668
|
+
export type CurrentModuleGeneratorsOpts = {
|
|
669
|
+
/**
|
|
670
|
+
* Only include generators matching the specified patterns
|
|
671
|
+
*/
|
|
672
|
+
include?: string[];
|
|
673
|
+
};
|
|
618
674
|
export type CurrentModuleWorkdirOpts = {
|
|
619
675
|
/**
|
|
620
676
|
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
@@ -680,6 +736,14 @@ export type DirectoryDockerBuildOpts = {
|
|
|
680
736
|
* This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
|
|
681
737
|
*/
|
|
682
738
|
noInit?: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* A socket to use for SSH authentication during the build
|
|
741
|
+
*
|
|
742
|
+
* (e.g., for Dockerfile RUN --mount=type=ssh instructions).
|
|
743
|
+
*
|
|
744
|
+
* Typically obtained via host.unixSocket() pointing to the SSH_AUTH_SOCK.
|
|
745
|
+
*/
|
|
746
|
+
ssh?: Socket;
|
|
683
747
|
};
|
|
684
748
|
export type DirectoryEntriesOpts = {
|
|
685
749
|
/**
|
|
@@ -855,6 +919,22 @@ export type EngineCachePruneOpts = {
|
|
|
855
919
|
* Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
|
|
856
920
|
*/
|
|
857
921
|
useDefaultPolicy?: boolean;
|
|
922
|
+
/**
|
|
923
|
+
* Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
|
|
924
|
+
*/
|
|
925
|
+
maxUsedSpace?: string;
|
|
926
|
+
/**
|
|
927
|
+
* Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
|
|
928
|
+
*/
|
|
929
|
+
reservedSpace?: string;
|
|
930
|
+
/**
|
|
931
|
+
* Override the minimum free disk space target during pruning (e.g. "20GB" or "20%").
|
|
932
|
+
*/
|
|
933
|
+
minFreeSpace?: string;
|
|
934
|
+
/**
|
|
935
|
+
* Override the target disk space to keep after pruning (e.g. "200GB" or "50%").
|
|
936
|
+
*/
|
|
937
|
+
targetSpace?: string;
|
|
858
938
|
};
|
|
859
939
|
/**
|
|
860
940
|
* The `EngineCacheEntryID` scalar type represents an identifier for an object of type EngineCacheEntry.
|
|
@@ -892,6 +972,12 @@ export type EnumTypeDefID = string & {
|
|
|
892
972
|
export type EnumValueTypeDefID = string & {
|
|
893
973
|
__EnumValueTypeDefID: never;
|
|
894
974
|
};
|
|
975
|
+
export type EnvChecksOpts = {
|
|
976
|
+
/**
|
|
977
|
+
* Only include checks matching the specified patterns
|
|
978
|
+
*/
|
|
979
|
+
include?: string[];
|
|
980
|
+
};
|
|
895
981
|
export type EnvFileGetOpts = {
|
|
896
982
|
/**
|
|
897
983
|
* Return the value exactly as written to the file. No quote removal or variable expansion
|
|
@@ -1097,6 +1183,7 @@ export type FunctionWithArgOpts = {
|
|
|
1097
1183
|
* If deprecated, the reason or migration path.
|
|
1098
1184
|
*/
|
|
1099
1185
|
deprecated?: string;
|
|
1186
|
+
defaultAddress?: string;
|
|
1100
1187
|
};
|
|
1101
1188
|
export type FunctionWithCachePolicyOpts = {
|
|
1102
1189
|
/**
|
|
@@ -1148,6 +1235,24 @@ export type FunctionID = string & {
|
|
|
1148
1235
|
export type GeneratedCodeID = string & {
|
|
1149
1236
|
__GeneratedCodeID: never;
|
|
1150
1237
|
};
|
|
1238
|
+
export type GeneratorGroupChangesOpts = {
|
|
1239
|
+
/**
|
|
1240
|
+
* Strategy to apply on conflicts between generators
|
|
1241
|
+
*/
|
|
1242
|
+
onConflict?: ChangesetsMergeConflict;
|
|
1243
|
+
};
|
|
1244
|
+
/**
|
|
1245
|
+
* The `GeneratorGroupID` scalar type represents an identifier for an object of type GeneratorGroup.
|
|
1246
|
+
*/
|
|
1247
|
+
export type GeneratorGroupID = string & {
|
|
1248
|
+
__GeneratorGroupID: never;
|
|
1249
|
+
};
|
|
1250
|
+
/**
|
|
1251
|
+
* The `GeneratorID` scalar type represents an identifier for an object of type Generator.
|
|
1252
|
+
*/
|
|
1253
|
+
export type GeneratorID = string & {
|
|
1254
|
+
__GeneratorID: never;
|
|
1255
|
+
};
|
|
1151
1256
|
export type GitRefTreeOpts = {
|
|
1152
1257
|
/**
|
|
1153
1258
|
* Set to true to discard .git directory.
|
|
@@ -1322,6 +1427,12 @@ export type ModuleChecksOpts = {
|
|
|
1322
1427
|
*/
|
|
1323
1428
|
include?: string[];
|
|
1324
1429
|
};
|
|
1430
|
+
export type ModuleGeneratorsOpts = {
|
|
1431
|
+
/**
|
|
1432
|
+
* Only include generators matching the specified patterns
|
|
1433
|
+
*/
|
|
1434
|
+
include?: string[];
|
|
1435
|
+
};
|
|
1325
1436
|
export type ModuleServeOpts = {
|
|
1326
1437
|
/**
|
|
1327
1438
|
* Expose the dependencies of this module to the client
|
|
@@ -1423,6 +1534,12 @@ export type ClientContainerOpts = {
|
|
|
1423
1534
|
*/
|
|
1424
1535
|
platform?: Platform;
|
|
1425
1536
|
};
|
|
1537
|
+
export type ClientCurrentWorkspaceOpts = {
|
|
1538
|
+
/**
|
|
1539
|
+
* If true, skip legacy dagger.json migration checks.
|
|
1540
|
+
*/
|
|
1541
|
+
skipMigrationCheck?: boolean;
|
|
1542
|
+
};
|
|
1426
1543
|
export type ClientEnvOpts = {
|
|
1427
1544
|
/**
|
|
1428
1545
|
* Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
|
|
@@ -1540,11 +1657,11 @@ export type ClientSecretOpts = {
|
|
|
1540
1657
|
*/
|
|
1541
1658
|
export declare enum ReturnType {
|
|
1542
1659
|
/**
|
|
1543
|
-
* Any execution (exit codes 0-127)
|
|
1660
|
+
* Any execution (exit codes 0-127 and 192-255)
|
|
1544
1661
|
*/
|
|
1545
1662
|
Any = "ANY",
|
|
1546
1663
|
/**
|
|
1547
|
-
* A failed execution (exit codes 1-127)
|
|
1664
|
+
* A failed execution (exit codes 1-127 and 192-255)
|
|
1548
1665
|
*/
|
|
1549
1666
|
Failure = "FAILURE",
|
|
1550
1667
|
/**
|
|
@@ -1838,6 +1955,32 @@ export declare enum TypeDefKind {
|
|
|
1838
1955
|
export type Void = string & {
|
|
1839
1956
|
__Void: never;
|
|
1840
1957
|
};
|
|
1958
|
+
export type WorkspaceDirectoryOpts = {
|
|
1959
|
+
/**
|
|
1960
|
+
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
1961
|
+
*/
|
|
1962
|
+
exclude?: string[];
|
|
1963
|
+
/**
|
|
1964
|
+
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
1965
|
+
*/
|
|
1966
|
+
include?: string[];
|
|
1967
|
+
/**
|
|
1968
|
+
* Apply .gitignore filter rules inside the directory.
|
|
1969
|
+
*/
|
|
1970
|
+
gitignore?: boolean;
|
|
1971
|
+
};
|
|
1972
|
+
export type WorkspaceFindUpOpts = {
|
|
1973
|
+
/**
|
|
1974
|
+
* Path to start the search from, relative to the workspace root.
|
|
1975
|
+
*/
|
|
1976
|
+
from?: string;
|
|
1977
|
+
};
|
|
1978
|
+
/**
|
|
1979
|
+
* The `WorkspaceID` scalar type represents an identifier for an object of type Workspace.
|
|
1980
|
+
*/
|
|
1981
|
+
export type WorkspaceID = string & {
|
|
1982
|
+
__WorkspaceID: never;
|
|
1983
|
+
};
|
|
1841
1984
|
export type __DirectiveArgsOpts = {
|
|
1842
1985
|
includeDeprecated?: boolean;
|
|
1843
1986
|
};
|
|
@@ -1963,6 +2106,14 @@ export declare class Binding extends BaseClient {
|
|
|
1963
2106
|
* Retrieve the binding value, as type File
|
|
1964
2107
|
*/
|
|
1965
2108
|
asFile: () => File;
|
|
2109
|
+
/**
|
|
2110
|
+
* Retrieve the binding value, as type Generator
|
|
2111
|
+
*/
|
|
2112
|
+
asGenerator: () => Generator;
|
|
2113
|
+
/**
|
|
2114
|
+
* Retrieve the binding value, as type GeneratorGroup
|
|
2115
|
+
*/
|
|
2116
|
+
asGeneratorGroup: () => GeneratorGroup;
|
|
1966
2117
|
/**
|
|
1967
2118
|
* Retrieve the binding value, as type GitRef
|
|
1968
2119
|
*/
|
|
@@ -2015,6 +2166,10 @@ export declare class Binding extends BaseClient {
|
|
|
2015
2166
|
* Returns the binding's string value
|
|
2016
2167
|
*/
|
|
2017
2168
|
asString: () => Promise<string>;
|
|
2169
|
+
/**
|
|
2170
|
+
* Retrieve the binding value, as type Workspace
|
|
2171
|
+
*/
|
|
2172
|
+
asWorkspace: () => Workspace;
|
|
2018
2173
|
/**
|
|
2019
2174
|
* Returns the digest of the binding value
|
|
2020
2175
|
*/
|
|
@@ -2103,6 +2258,30 @@ export declare class Changeset extends BaseClient {
|
|
|
2103
2258
|
* Force evaluation in the engine.
|
|
2104
2259
|
*/
|
|
2105
2260
|
sync: () => Promise<Changeset>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Add changes to an existing changeset
|
|
2263
|
+
*
|
|
2264
|
+
* By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
|
|
2265
|
+
* @param changes Changes to merge into the actual changeset
|
|
2266
|
+
* @param opts.onConflict What to do on a merge conflict
|
|
2267
|
+
*/
|
|
2268
|
+
withChangeset: (changes: Changeset, opts?: ChangesetWithChangesetOpts) => Changeset;
|
|
2269
|
+
/**
|
|
2270
|
+
* Add changes from multiple changesets using git octopus merge strategy
|
|
2271
|
+
*
|
|
2272
|
+
* This is more efficient than chaining multiple withChangeset calls when merging many changesets.
|
|
2273
|
+
*
|
|
2274
|
+
* Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
|
|
2275
|
+
* @param changes List of changesets to merge into the actual changeset
|
|
2276
|
+
* @param opts.onConflict What to do on a merge conflict
|
|
2277
|
+
*/
|
|
2278
|
+
withChangesets: (changes: Changeset[], opts?: ChangesetWithChangesetsOpts) => Changeset;
|
|
2279
|
+
/**
|
|
2280
|
+
* Call the provided function with current Changeset.
|
|
2281
|
+
*
|
|
2282
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
2283
|
+
*/
|
|
2284
|
+
with: (arg: (param: Changeset) => Changeset) => Changeset;
|
|
2106
2285
|
}
|
|
2107
2286
|
export declare class Check extends BaseClient {
|
|
2108
2287
|
private readonly _id?;
|
|
@@ -2127,10 +2306,18 @@ export declare class Check extends BaseClient {
|
|
|
2127
2306
|
* The description of the check
|
|
2128
2307
|
*/
|
|
2129
2308
|
description: () => Promise<string>;
|
|
2309
|
+
/**
|
|
2310
|
+
* If the check failed, this is the error
|
|
2311
|
+
*/
|
|
2312
|
+
error: () => Error;
|
|
2130
2313
|
/**
|
|
2131
2314
|
* Return the fully qualified name of the check
|
|
2132
2315
|
*/
|
|
2133
2316
|
name: () => Promise<string>;
|
|
2317
|
+
/**
|
|
2318
|
+
* The original module in which the check has been defined
|
|
2319
|
+
*/
|
|
2320
|
+
originalModule: () => Module_;
|
|
2134
2321
|
/**
|
|
2135
2322
|
* Whether the check passed
|
|
2136
2323
|
*/
|
|
@@ -2147,10 +2334,6 @@ export declare class Check extends BaseClient {
|
|
|
2147
2334
|
* Execute the check
|
|
2148
2335
|
*/
|
|
2149
2336
|
run: () => Check;
|
|
2150
|
-
/**
|
|
2151
|
-
* The module source where the check is defined (i.e., toolchains)
|
|
2152
|
-
*/
|
|
2153
|
-
source: () => ModuleSource;
|
|
2154
2337
|
/**
|
|
2155
2338
|
* Call the provided function with current Check.
|
|
2156
2339
|
*
|
|
@@ -2858,6 +3041,12 @@ export declare class CurrentModule extends BaseClient {
|
|
|
2858
3041
|
* The generated files and directories made on top of the module source's context directory.
|
|
2859
3042
|
*/
|
|
2860
3043
|
generatedContextDirectory: () => Directory;
|
|
3044
|
+
/**
|
|
3045
|
+
* Return all generators defined by the module
|
|
3046
|
+
* @param opts.include Only include generators matching the specified patterns
|
|
3047
|
+
* @experimental
|
|
3048
|
+
*/
|
|
3049
|
+
generators: (opts?: CurrentModuleGeneratorsOpts) => GeneratorGroup;
|
|
2861
3050
|
/**
|
|
2862
3051
|
* The name of the module being executed in
|
|
2863
3052
|
*/
|
|
@@ -2960,6 +3149,11 @@ export declare class Directory extends BaseClient {
|
|
|
2960
3149
|
* @param opts.noInit If set, skip the automatic init process injected into containers created by RUN statements.
|
|
2961
3150
|
*
|
|
2962
3151
|
* This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
|
|
3152
|
+
* @param opts.ssh A socket to use for SSH authentication during the build
|
|
3153
|
+
*
|
|
3154
|
+
* (e.g., for Dockerfile RUN --mount=type=ssh instructions).
|
|
3155
|
+
*
|
|
3156
|
+
* Typically obtained via host.unixSocket() pointing to the SSH_AUTH_SOCK.
|
|
2963
3157
|
*/
|
|
2964
3158
|
dockerBuild: (opts?: DirectoryDockerBuildOpts) => Container;
|
|
2965
3159
|
/**
|
|
@@ -3205,6 +3399,10 @@ export declare class EngineCache extends BaseClient {
|
|
|
3205
3399
|
/**
|
|
3206
3400
|
* Prune the cache of releaseable entries
|
|
3207
3401
|
* @param opts.useDefaultPolicy Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
|
|
3402
|
+
* @param opts.maxUsedSpace Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
|
|
3403
|
+
* @param opts.reservedSpace Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
|
|
3404
|
+
* @param opts.minFreeSpace Override the minimum free disk space target during pruning (e.g. "20GB" or "20%").
|
|
3405
|
+
* @param opts.targetSpace Override the target disk space to keep after pruning (e.g. "200GB" or "50%").
|
|
3208
3406
|
*/
|
|
3209
3407
|
prune: (opts?: EngineCachePruneOpts) => Promise<void>;
|
|
3210
3408
|
/**
|
|
@@ -3226,10 +3424,11 @@ export declare class EngineCacheEntry extends BaseClient {
|
|
|
3226
3424
|
private readonly _description?;
|
|
3227
3425
|
private readonly _diskSpaceBytes?;
|
|
3228
3426
|
private readonly _mostRecentUseTimeUnixNano?;
|
|
3427
|
+
private readonly _recordType?;
|
|
3229
3428
|
/**
|
|
3230
3429
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3231
3430
|
*/
|
|
3232
|
-
constructor(ctx?: Context, _id?: EngineCacheEntryID, _activelyUsed?: boolean, _createdTimeUnixNano?: number, _description?: string, _diskSpaceBytes?: number, _mostRecentUseTimeUnixNano?: number);
|
|
3431
|
+
constructor(ctx?: Context, _id?: EngineCacheEntryID, _activelyUsed?: boolean, _createdTimeUnixNano?: number, _description?: string, _diskSpaceBytes?: number, _mostRecentUseTimeUnixNano?: number, _recordType?: string);
|
|
3233
3432
|
/**
|
|
3234
3433
|
* A unique identifier for this EngineCacheEntry.
|
|
3235
3434
|
*/
|
|
@@ -3254,6 +3453,10 @@ export declare class EngineCacheEntry extends BaseClient {
|
|
|
3254
3453
|
* The most recent time the cache entry was used, in Unix nanoseconds.
|
|
3255
3454
|
*/
|
|
3256
3455
|
mostRecentUseTimeUnixNano: () => Promise<number>;
|
|
3456
|
+
/**
|
|
3457
|
+
* The type of the cache record (e.g. regular, internal, frontend, source.local, source.git.checkout, exec.cachemount).
|
|
3458
|
+
*/
|
|
3459
|
+
recordType: () => Promise<string>;
|
|
3257
3460
|
}
|
|
3258
3461
|
/**
|
|
3259
3462
|
* A set of cache entries returned by a query to a cache
|
|
@@ -3372,6 +3575,18 @@ export declare class Env extends BaseClient {
|
|
|
3372
3575
|
* A unique identifier for this Env.
|
|
3373
3576
|
*/
|
|
3374
3577
|
id: () => Promise<EnvID>;
|
|
3578
|
+
/**
|
|
3579
|
+
* Return the check with the given name from the installed modules. Must match exactly one check.
|
|
3580
|
+
* @param name The name of the check to retrieve
|
|
3581
|
+
* @experimental
|
|
3582
|
+
*/
|
|
3583
|
+
check: (name: string) => Check;
|
|
3584
|
+
/**
|
|
3585
|
+
* Return all checks defined by the installed modules
|
|
3586
|
+
* @param opts.include Only include checks matching the specified patterns
|
|
3587
|
+
* @experimental
|
|
3588
|
+
*/
|
|
3589
|
+
checks: (opts?: EnvChecksOpts) => CheckGroup;
|
|
3375
3590
|
/**
|
|
3376
3591
|
* Retrieves an input binding by name
|
|
3377
3592
|
*/
|
|
@@ -3537,6 +3752,32 @@ export declare class Env extends BaseClient {
|
|
|
3537
3752
|
* @param description A description of the desired value of the binding
|
|
3538
3753
|
*/
|
|
3539
3754
|
withFileOutput: (name: string, description: string) => Env;
|
|
3755
|
+
/**
|
|
3756
|
+
* Create or update a binding of type GeneratorGroup in the environment
|
|
3757
|
+
* @param name The name of the binding
|
|
3758
|
+
* @param value The GeneratorGroup value to assign to the binding
|
|
3759
|
+
* @param description The purpose of the input
|
|
3760
|
+
*/
|
|
3761
|
+
withGeneratorGroupInput: (name: string, value: GeneratorGroup, description: string) => Env;
|
|
3762
|
+
/**
|
|
3763
|
+
* Declare a desired GeneratorGroup output to be assigned in the environment
|
|
3764
|
+
* @param name The name of the binding
|
|
3765
|
+
* @param description A description of the desired value of the binding
|
|
3766
|
+
*/
|
|
3767
|
+
withGeneratorGroupOutput: (name: string, description: string) => Env;
|
|
3768
|
+
/**
|
|
3769
|
+
* Create or update a binding of type Generator in the environment
|
|
3770
|
+
* @param name The name of the binding
|
|
3771
|
+
* @param value The Generator value to assign to the binding
|
|
3772
|
+
* @param description The purpose of the input
|
|
3773
|
+
*/
|
|
3774
|
+
withGeneratorInput: (name: string, value: Generator, description: string) => Env;
|
|
3775
|
+
/**
|
|
3776
|
+
* Declare a desired Generator output to be assigned in the environment
|
|
3777
|
+
* @param name The name of the binding
|
|
3778
|
+
* @param description A description of the desired value of the binding
|
|
3779
|
+
*/
|
|
3780
|
+
withGeneratorOutput: (name: string, description: string) => Env;
|
|
3540
3781
|
/**
|
|
3541
3782
|
* Create or update a binding of type GitRef in the environment
|
|
3542
3783
|
* @param name The name of the binding
|
|
@@ -3576,10 +3817,17 @@ export declare class Env extends BaseClient {
|
|
|
3576
3817
|
* @param description A description of the desired value of the binding
|
|
3577
3818
|
*/
|
|
3578
3819
|
withJSONValueOutput: (name: string, description: string) => Env;
|
|
3820
|
+
/**
|
|
3821
|
+
* Sets the main module for this environment (the project being worked on)
|
|
3822
|
+
*
|
|
3823
|
+
* Contextual path arguments will be populated using the environment's workspace.
|
|
3824
|
+
*/
|
|
3825
|
+
withMainModule: (module_: Module_) => Env;
|
|
3579
3826
|
/**
|
|
3580
3827
|
* Installs a module into the environment, exposing its functions to the model
|
|
3581
3828
|
*
|
|
3582
3829
|
* Contextual path arguments will be populated using the environment's workspace.
|
|
3830
|
+
* @deprecated Use withMainModule instead
|
|
3583
3831
|
*/
|
|
3584
3832
|
withModule: (module_: Module_) => Env;
|
|
3585
3833
|
/**
|
|
@@ -3717,6 +3965,19 @@ export declare class Env extends BaseClient {
|
|
|
3717
3965
|
* @param workspace The directory to set as the host filesystem
|
|
3718
3966
|
*/
|
|
3719
3967
|
withWorkspace: (workspace: Directory) => Env;
|
|
3968
|
+
/**
|
|
3969
|
+
* Create or update a binding of type Workspace in the environment
|
|
3970
|
+
* @param name The name of the binding
|
|
3971
|
+
* @param value The Workspace value to assign to the binding
|
|
3972
|
+
* @param description The purpose of the input
|
|
3973
|
+
*/
|
|
3974
|
+
withWorkspaceInput: (name: string, value: Workspace, description: string) => Env;
|
|
3975
|
+
/**
|
|
3976
|
+
* Declare a desired Workspace output to be assigned in the environment
|
|
3977
|
+
* @param name The name of the binding
|
|
3978
|
+
* @param description A description of the desired value of the binding
|
|
3979
|
+
*/
|
|
3980
|
+
withWorkspaceOutput: (name: string, description: string) => Env;
|
|
3720
3981
|
/**
|
|
3721
3982
|
* Returns a new environment without any outputs
|
|
3722
3983
|
*/
|
|
@@ -4097,6 +4358,10 @@ export declare class Function_ extends BaseClient {
|
|
|
4097
4358
|
* @param description The doc string to set.
|
|
4098
4359
|
*/
|
|
4099
4360
|
withDescription: (description: string) => Function_;
|
|
4361
|
+
/**
|
|
4362
|
+
* Returns the function with a flag indicating it's a generator.
|
|
4363
|
+
*/
|
|
4364
|
+
withGenerator: () => Function_;
|
|
4100
4365
|
/**
|
|
4101
4366
|
* Returns the function with the given source map.
|
|
4102
4367
|
* @param sourceMap The source map for the function definition.
|
|
@@ -4116,6 +4381,7 @@ export declare class Function_ extends BaseClient {
|
|
|
4116
4381
|
*/
|
|
4117
4382
|
export declare class FunctionArg extends BaseClient {
|
|
4118
4383
|
private readonly _id?;
|
|
4384
|
+
private readonly _defaultAddress?;
|
|
4119
4385
|
private readonly _defaultPath?;
|
|
4120
4386
|
private readonly _defaultValue?;
|
|
4121
4387
|
private readonly _deprecated?;
|
|
@@ -4124,11 +4390,15 @@ export declare class FunctionArg extends BaseClient {
|
|
|
4124
4390
|
/**
|
|
4125
4391
|
* Constructor is used for internal usage only, do not create object from it.
|
|
4126
4392
|
*/
|
|
4127
|
-
constructor(ctx?: Context, _id?: FunctionArgID, _defaultPath?: string, _defaultValue?: JSON, _deprecated?: string, _description?: string, _name?: string);
|
|
4393
|
+
constructor(ctx?: Context, _id?: FunctionArgID, _defaultAddress?: string, _defaultPath?: string, _defaultValue?: JSON, _deprecated?: string, _description?: string, _name?: string);
|
|
4128
4394
|
/**
|
|
4129
4395
|
* A unique identifier for this FunctionArg.
|
|
4130
4396
|
*/
|
|
4131
4397
|
id: () => Promise<FunctionArgID>;
|
|
4398
|
+
/**
|
|
4399
|
+
* Only applies to arguments of type Container. If the argument is not set, load it from the given address (e.g. alpine:latest)
|
|
4400
|
+
*/
|
|
4401
|
+
defaultAddress: () => Promise<string>;
|
|
4132
4402
|
/**
|
|
4133
4403
|
* 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
|
|
4134
4404
|
*/
|
|
@@ -4271,6 +4541,98 @@ export declare class GeneratedCode extends BaseClient {
|
|
|
4271
4541
|
*/
|
|
4272
4542
|
with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
|
|
4273
4543
|
}
|
|
4544
|
+
export declare class Generator extends BaseClient {
|
|
4545
|
+
private readonly _id?;
|
|
4546
|
+
private readonly _completed?;
|
|
4547
|
+
private readonly _description?;
|
|
4548
|
+
private readonly _isEmpty?;
|
|
4549
|
+
private readonly _name?;
|
|
4550
|
+
/**
|
|
4551
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
4552
|
+
*/
|
|
4553
|
+
constructor(ctx?: Context, _id?: GeneratorID, _completed?: boolean, _description?: string, _isEmpty?: boolean, _name?: string);
|
|
4554
|
+
/**
|
|
4555
|
+
* A unique identifier for this Generator.
|
|
4556
|
+
*/
|
|
4557
|
+
id: () => Promise<GeneratorID>;
|
|
4558
|
+
/**
|
|
4559
|
+
* The generated changeset
|
|
4560
|
+
*/
|
|
4561
|
+
changes: () => Changeset;
|
|
4562
|
+
/**
|
|
4563
|
+
* Whether the generator complete
|
|
4564
|
+
*/
|
|
4565
|
+
completed: () => Promise<boolean>;
|
|
4566
|
+
/**
|
|
4567
|
+
* Return the description of the generator
|
|
4568
|
+
*/
|
|
4569
|
+
description: () => Promise<string>;
|
|
4570
|
+
/**
|
|
4571
|
+
* Wether changeset from the generator execution is empty or not
|
|
4572
|
+
*/
|
|
4573
|
+
isEmpty: () => Promise<boolean>;
|
|
4574
|
+
/**
|
|
4575
|
+
* Return the fully qualified name of the generator
|
|
4576
|
+
*/
|
|
4577
|
+
name: () => Promise<string>;
|
|
4578
|
+
/**
|
|
4579
|
+
* The original module in which the generator has been defined
|
|
4580
|
+
*/
|
|
4581
|
+
originalModule: () => Module_;
|
|
4582
|
+
/**
|
|
4583
|
+
* The path of the generator within its module
|
|
4584
|
+
*/
|
|
4585
|
+
path: () => Promise<string[]>;
|
|
4586
|
+
/**
|
|
4587
|
+
* Execute the generator
|
|
4588
|
+
*/
|
|
4589
|
+
run: () => Generator;
|
|
4590
|
+
/**
|
|
4591
|
+
* Call the provided function with current Generator.
|
|
4592
|
+
*
|
|
4593
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
4594
|
+
*/
|
|
4595
|
+
with: (arg: (param: Generator) => Generator) => Generator;
|
|
4596
|
+
}
|
|
4597
|
+
export declare class GeneratorGroup extends BaseClient {
|
|
4598
|
+
private readonly _id?;
|
|
4599
|
+
private readonly _isEmpty?;
|
|
4600
|
+
/**
|
|
4601
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
4602
|
+
*/
|
|
4603
|
+
constructor(ctx?: Context, _id?: GeneratorGroupID, _isEmpty?: boolean);
|
|
4604
|
+
/**
|
|
4605
|
+
* A unique identifier for this GeneratorGroup.
|
|
4606
|
+
*/
|
|
4607
|
+
id: () => Promise<GeneratorGroupID>;
|
|
4608
|
+
/**
|
|
4609
|
+
* The combined changes from the generators execution
|
|
4610
|
+
*
|
|
4611
|
+
* If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed.
|
|
4612
|
+
*
|
|
4613
|
+
* Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy.
|
|
4614
|
+
* @param opts.onConflict Strategy to apply on conflicts between generators
|
|
4615
|
+
*/
|
|
4616
|
+
changes: (opts?: GeneratorGroupChangesOpts) => Changeset;
|
|
4617
|
+
/**
|
|
4618
|
+
* Whether the generated changeset is empty or not
|
|
4619
|
+
*/
|
|
4620
|
+
isEmpty: () => Promise<boolean>;
|
|
4621
|
+
/**
|
|
4622
|
+
* Return a list of individual generators and their details
|
|
4623
|
+
*/
|
|
4624
|
+
list: () => Promise<Generator[]>;
|
|
4625
|
+
/**
|
|
4626
|
+
* Execute all selected generators
|
|
4627
|
+
*/
|
|
4628
|
+
run: () => GeneratorGroup;
|
|
4629
|
+
/**
|
|
4630
|
+
* Call the provided function with current GeneratorGroup.
|
|
4631
|
+
*
|
|
4632
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
4633
|
+
*/
|
|
4634
|
+
with: (arg: (param: GeneratorGroup) => GeneratorGroup) => GeneratorGroup;
|
|
4635
|
+
}
|
|
4274
4636
|
/**
|
|
4275
4637
|
* A git ref (tag, branch, or commit).
|
|
4276
4638
|
*/
|
|
@@ -4827,6 +5189,18 @@ export declare class Module_ extends BaseClient {
|
|
|
4827
5189
|
* The generated files and directories made on top of the module source's context directory.
|
|
4828
5190
|
*/
|
|
4829
5191
|
generatedContextDirectory: () => Directory;
|
|
5192
|
+
/**
|
|
5193
|
+
* Return the generator defined by the module with the given name. Must match to exactly one generator.
|
|
5194
|
+
* @param name The name of the generator to retrieve
|
|
5195
|
+
* @experimental
|
|
5196
|
+
*/
|
|
5197
|
+
generator: (name: string) => Generator;
|
|
5198
|
+
/**
|
|
5199
|
+
* Return all generators defined by the module
|
|
5200
|
+
* @param opts.include Only include generators matching the specified patterns
|
|
5201
|
+
* @experimental
|
|
5202
|
+
*/
|
|
5203
|
+
generators: (opts?: ModuleGeneratorsOpts) => GeneratorGroup;
|
|
4830
5204
|
/**
|
|
4831
5205
|
* Interfaces served by this module.
|
|
4832
5206
|
*/
|
|
@@ -5321,6 +5695,12 @@ export declare class Client extends BaseClient {
|
|
|
5321
5695
|
* The TypeDef representations of the objects currently being served in the session.
|
|
5322
5696
|
*/
|
|
5323
5697
|
currentTypeDefs: () => Promise<TypeDef[]>;
|
|
5698
|
+
/**
|
|
5699
|
+
* Detect and return the current workspace.
|
|
5700
|
+
* @param opts.skipMigrationCheck If true, skip legacy dagger.json migration checks.
|
|
5701
|
+
* @experimental
|
|
5702
|
+
*/
|
|
5703
|
+
currentWorkspace: (opts?: ClientCurrentWorkspaceOpts) => Workspace;
|
|
5324
5704
|
/**
|
|
5325
5705
|
* The default platform of the engine.
|
|
5326
5706
|
*/
|
|
@@ -5519,6 +5899,14 @@ export declare class Client extends BaseClient {
|
|
|
5519
5899
|
* Load a GeneratedCode from its ID.
|
|
5520
5900
|
*/
|
|
5521
5901
|
loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
|
|
5902
|
+
/**
|
|
5903
|
+
* Load a Generator from its ID.
|
|
5904
|
+
*/
|
|
5905
|
+
loadGeneratorFromID: (id: GeneratorID) => Generator;
|
|
5906
|
+
/**
|
|
5907
|
+
* Load a GeneratorGroup from its ID.
|
|
5908
|
+
*/
|
|
5909
|
+
loadGeneratorGroupFromID: (id: GeneratorGroupID) => GeneratorGroup;
|
|
5522
5910
|
/**
|
|
5523
5911
|
* Load a GitRef from its ID.
|
|
5524
5912
|
*/
|
|
@@ -5623,6 +6011,10 @@ export declare class Client extends BaseClient {
|
|
|
5623
6011
|
* Load a TypeDef from its ID.
|
|
5624
6012
|
*/
|
|
5625
6013
|
loadTypeDefFromID: (id: TypeDefID) => TypeDef;
|
|
6014
|
+
/**
|
|
6015
|
+
* Load a Workspace from its ID.
|
|
6016
|
+
*/
|
|
6017
|
+
loadWorkspaceFromID: (id: WorkspaceID) => Workspace;
|
|
5626
6018
|
/**
|
|
5627
6019
|
* Create a new module.
|
|
5628
6020
|
*/
|
|
@@ -6118,6 +6510,58 @@ export declare class TypeDef extends BaseClient {
|
|
|
6118
6510
|
*/
|
|
6119
6511
|
with: (arg: (param: TypeDef) => TypeDef) => TypeDef;
|
|
6120
6512
|
}
|
|
6513
|
+
/**
|
|
6514
|
+
* A Dagger workspace detected from the current working directory.
|
|
6515
|
+
*/
|
|
6516
|
+
export declare class Workspace extends BaseClient {
|
|
6517
|
+
private readonly _id?;
|
|
6518
|
+
private readonly _clientId?;
|
|
6519
|
+
private readonly _findUp?;
|
|
6520
|
+
private readonly _root?;
|
|
6521
|
+
/**
|
|
6522
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
6523
|
+
*/
|
|
6524
|
+
constructor(ctx?: Context, _id?: WorkspaceID, _clientId?: string, _findUp?: string, _root?: string);
|
|
6525
|
+
/**
|
|
6526
|
+
* A unique identifier for this Workspace.
|
|
6527
|
+
*/
|
|
6528
|
+
id: () => Promise<WorkspaceID>;
|
|
6529
|
+
/**
|
|
6530
|
+
* The client ID that owns this workspace's host filesystem.
|
|
6531
|
+
*/
|
|
6532
|
+
clientId: () => Promise<string>;
|
|
6533
|
+
/**
|
|
6534
|
+
* Returns a Directory from the workspace.
|
|
6535
|
+
*
|
|
6536
|
+
* Path is relative to workspace root. Use "." for the root directory.
|
|
6537
|
+
* @param path Location of the directory to retrieve, relative to the workspace root (e.g., "src", ".").
|
|
6538
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
6539
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
6540
|
+
* @param opts.gitignore Apply .gitignore filter rules inside the directory.
|
|
6541
|
+
*/
|
|
6542
|
+
directory: (path: string, opts?: WorkspaceDirectoryOpts) => Directory;
|
|
6543
|
+
/**
|
|
6544
|
+
* Returns a File from the workspace.
|
|
6545
|
+
*
|
|
6546
|
+
* Path is relative to workspace root.
|
|
6547
|
+
* @param path Location of the file to retrieve, relative to the workspace root (e.g., "go.mod").
|
|
6548
|
+
*/
|
|
6549
|
+
file: (path: string) => File;
|
|
6550
|
+
/**
|
|
6551
|
+
* Search for a file or directory by walking up from the start path within the workspace.
|
|
6552
|
+
*
|
|
6553
|
+
* Returns the path relative to the workspace root if found, or null if not found.
|
|
6554
|
+
*
|
|
6555
|
+
* The search stops at the workspace root and will not traverse above it.
|
|
6556
|
+
* @param name The name of the file or directory to search for.
|
|
6557
|
+
* @param opts.from Path to start the search from, relative to the workspace root.
|
|
6558
|
+
*/
|
|
6559
|
+
findUp: (name: string, opts?: WorkspaceFindUpOpts) => Promise<string>;
|
|
6560
|
+
/**
|
|
6561
|
+
* Absolute path to the workspace root directory.
|
|
6562
|
+
*/
|
|
6563
|
+
root: () => Promise<string>;
|
|
6564
|
+
}
|
|
6121
6565
|
export declare const dag: Client;
|
|
6122
6566
|
export {};
|
|
6123
6567
|
//# sourceMappingURL=client.gen.d.ts.map
|