@dagger.io/dagger 0.19.11 → 0.20.1
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 +269 -1
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +345 -1
- package/dist/src/common/graphql/connect.d.ts.map +1 -1
- package/dist/src/common/graphql/connect.js +1 -1
- package/dist/src/module/entrypoint/introspection_entrypoint.js +1 -1
- package/dist/src/module/entrypoint/invoke.js +1 -1
- 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
|
@@ -383,6 +383,32 @@ export type ContainerWithDirectoryOpts = {
|
|
|
383
383
|
*/
|
|
384
384
|
expand?: boolean;
|
|
385
385
|
};
|
|
386
|
+
export type ContainerWithDockerHealthcheckOpts = {
|
|
387
|
+
/**
|
|
388
|
+
* When true, command must be a single element, which is run using the container's shell
|
|
389
|
+
*/
|
|
390
|
+
shell?: boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Interval between running healthcheck. Example: "30s"
|
|
393
|
+
*/
|
|
394
|
+
interval?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Healthcheck timeout. Example: "3s"
|
|
397
|
+
*/
|
|
398
|
+
timeout?: string;
|
|
399
|
+
/**
|
|
400
|
+
* StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example: "0s"
|
|
401
|
+
*/
|
|
402
|
+
startPeriod?: string;
|
|
403
|
+
/**
|
|
404
|
+
* StartInterval configures the duration between checks during the startup phase. Example: "5s"
|
|
405
|
+
*/
|
|
406
|
+
startInterval?: string;
|
|
407
|
+
/**
|
|
408
|
+
* The maximum number of consecutive failures before the container is marked as unhealthy. Example: "3"
|
|
409
|
+
*/
|
|
410
|
+
retries?: number;
|
|
411
|
+
};
|
|
386
412
|
export type ContainerWithEntrypointOpts = {
|
|
387
413
|
/**
|
|
388
414
|
* Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
|
|
@@ -919,6 +945,22 @@ export type EngineCachePruneOpts = {
|
|
|
919
945
|
* Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
|
|
920
946
|
*/
|
|
921
947
|
useDefaultPolicy?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
|
|
950
|
+
*/
|
|
951
|
+
maxUsedSpace?: string;
|
|
952
|
+
/**
|
|
953
|
+
* Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
|
|
954
|
+
*/
|
|
955
|
+
reservedSpace?: string;
|
|
956
|
+
/**
|
|
957
|
+
* Override the minimum free disk space target during pruning (e.g. "20GB" or "20%").
|
|
958
|
+
*/
|
|
959
|
+
minFreeSpace?: string;
|
|
960
|
+
/**
|
|
961
|
+
* Override the target disk space to keep after pruning (e.g. "200GB" or "50%").
|
|
962
|
+
*/
|
|
963
|
+
targetSpace?: string;
|
|
922
964
|
};
|
|
923
965
|
/**
|
|
924
966
|
* The `EngineCacheEntryID` scalar type represents an identifier for an object of type EngineCacheEntry.
|
|
@@ -1246,6 +1288,10 @@ export type GitRefTreeOpts = {
|
|
|
1246
1288
|
* The depth of the tree to fetch.
|
|
1247
1289
|
*/
|
|
1248
1290
|
depth?: number;
|
|
1291
|
+
/**
|
|
1292
|
+
* Set to true to populate tag refs in the local checkout .git.
|
|
1293
|
+
*/
|
|
1294
|
+
includeTags?: boolean;
|
|
1249
1295
|
};
|
|
1250
1296
|
/**
|
|
1251
1297
|
* The `GitRefID` scalar type represents an identifier for an object of type GitRef.
|
|
@@ -1271,6 +1317,12 @@ export type GitRepositoryTagsOpts = {
|
|
|
1271
1317
|
export type GitRepositoryID = string & {
|
|
1272
1318
|
__GitRepositoryID: never;
|
|
1273
1319
|
};
|
|
1320
|
+
/**
|
|
1321
|
+
* The `HealthcheckConfigID` scalar type represents an identifier for an object of type HealthcheckConfig.
|
|
1322
|
+
*/
|
|
1323
|
+
export type HealthcheckConfigID = string & {
|
|
1324
|
+
__HealthcheckConfigID: never;
|
|
1325
|
+
};
|
|
1274
1326
|
export type HostDirectoryOpts = {
|
|
1275
1327
|
/**
|
|
1276
1328
|
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
@@ -1518,6 +1570,12 @@ export type ClientContainerOpts = {
|
|
|
1518
1570
|
*/
|
|
1519
1571
|
platform?: Platform;
|
|
1520
1572
|
};
|
|
1573
|
+
export type ClientCurrentWorkspaceOpts = {
|
|
1574
|
+
/**
|
|
1575
|
+
* If true, skip legacy dagger.json migration checks.
|
|
1576
|
+
*/
|
|
1577
|
+
skipMigrationCheck?: boolean;
|
|
1578
|
+
};
|
|
1521
1579
|
export type ClientEnvOpts = {
|
|
1522
1580
|
/**
|
|
1523
1581
|
* Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
|
|
@@ -1933,6 +1991,32 @@ export declare enum TypeDefKind {
|
|
|
1933
1991
|
export type Void = string & {
|
|
1934
1992
|
__Void: never;
|
|
1935
1993
|
};
|
|
1994
|
+
export type WorkspaceDirectoryOpts = {
|
|
1995
|
+
/**
|
|
1996
|
+
* Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
1997
|
+
*/
|
|
1998
|
+
exclude?: string[];
|
|
1999
|
+
/**
|
|
2000
|
+
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
2001
|
+
*/
|
|
2002
|
+
include?: string[];
|
|
2003
|
+
/**
|
|
2004
|
+
* Apply .gitignore filter rules inside the directory.
|
|
2005
|
+
*/
|
|
2006
|
+
gitignore?: boolean;
|
|
2007
|
+
};
|
|
2008
|
+
export type WorkspaceFindUpOpts = {
|
|
2009
|
+
/**
|
|
2010
|
+
* Path to start the search from, relative to the workspace root.
|
|
2011
|
+
*/
|
|
2012
|
+
from?: string;
|
|
2013
|
+
};
|
|
2014
|
+
/**
|
|
2015
|
+
* The `WorkspaceID` scalar type represents an identifier for an object of type Workspace.
|
|
2016
|
+
*/
|
|
2017
|
+
export type WorkspaceID = string & {
|
|
2018
|
+
__WorkspaceID: never;
|
|
2019
|
+
};
|
|
1936
2020
|
export type __DirectiveArgsOpts = {
|
|
1937
2021
|
includeDeprecated?: boolean;
|
|
1938
2022
|
};
|
|
@@ -2118,6 +2202,10 @@ export declare class Binding extends BaseClient {
|
|
|
2118
2202
|
* Returns the binding's string value
|
|
2119
2203
|
*/
|
|
2120
2204
|
asString: () => Promise<string>;
|
|
2205
|
+
/**
|
|
2206
|
+
* Retrieve the binding value, as type Workspace
|
|
2207
|
+
*/
|
|
2208
|
+
asWorkspace: () => Workspace;
|
|
2121
2209
|
/**
|
|
2122
2210
|
* Returns the digest of the binding value
|
|
2123
2211
|
*/
|
|
@@ -2254,10 +2342,18 @@ export declare class Check extends BaseClient {
|
|
|
2254
2342
|
* The description of the check
|
|
2255
2343
|
*/
|
|
2256
2344
|
description: () => Promise<string>;
|
|
2345
|
+
/**
|
|
2346
|
+
* If the check failed, this is the error
|
|
2347
|
+
*/
|
|
2348
|
+
error: () => Error;
|
|
2257
2349
|
/**
|
|
2258
2350
|
* Return the fully qualified name of the check
|
|
2259
2351
|
*/
|
|
2260
2352
|
name: () => Promise<string>;
|
|
2353
|
+
/**
|
|
2354
|
+
* The original module in which the check has been defined
|
|
2355
|
+
*/
|
|
2356
|
+
originalModule: () => Module_;
|
|
2261
2357
|
/**
|
|
2262
2358
|
* Whether the check passed
|
|
2263
2359
|
*/
|
|
@@ -2405,6 +2501,10 @@ export declare class Container extends BaseClient {
|
|
|
2405
2501
|
* @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").
|
|
2406
2502
|
*/
|
|
2407
2503
|
directory: (path: string, opts?: ContainerDirectoryOpts) => Directory;
|
|
2504
|
+
/**
|
|
2505
|
+
* Retrieves this container's configured docker healthcheck.
|
|
2506
|
+
*/
|
|
2507
|
+
dockerHealthcheck: () => HealthcheckConfig;
|
|
2408
2508
|
/**
|
|
2409
2509
|
* Return the container's OCI entrypoint.
|
|
2410
2510
|
*/
|
|
@@ -2637,6 +2737,17 @@ export declare class Container extends BaseClient {
|
|
|
2637
2737
|
* @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").
|
|
2638
2738
|
*/
|
|
2639
2739
|
withDirectory: (path: string, source: Directory, opts?: ContainerWithDirectoryOpts) => Container;
|
|
2740
|
+
/**
|
|
2741
|
+
* Retrieves this container with the specificed docker healtcheck command set.
|
|
2742
|
+
* @param args Healthcheck command to execute. Example: ["go", "run", "main.go"].
|
|
2743
|
+
* @param opts.shell When true, command must be a single element, which is run using the container's shell
|
|
2744
|
+
* @param opts.interval Interval between running healthcheck. Example: "30s"
|
|
2745
|
+
* @param opts.timeout Healthcheck timeout. Example: "3s"
|
|
2746
|
+
* @param opts.startPeriod StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example: "0s"
|
|
2747
|
+
* @param opts.startInterval StartInterval configures the duration between checks during the startup phase. Example: "5s"
|
|
2748
|
+
* @param opts.retries The maximum number of consecutive failures before the container is marked as unhealthy. Example: "3"
|
|
2749
|
+
*/
|
|
2750
|
+
withDockerHealthcheck: (args: string[], opts?: ContainerWithDockerHealthcheckOpts) => Container;
|
|
2640
2751
|
/**
|
|
2641
2752
|
* Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
|
|
2642
2753
|
* @param args Arguments of the entrypoint. Example: ["go", "run"].
|
|
@@ -2879,6 +2990,10 @@ export declare class Container extends BaseClient {
|
|
|
2879
2990
|
* @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").
|
|
2880
2991
|
*/
|
|
2881
2992
|
withoutDirectory: (path: string, opts?: ContainerWithoutDirectoryOpts) => Container;
|
|
2993
|
+
/**
|
|
2994
|
+
* Retrieves this container without a configured docker healtcheck command.
|
|
2995
|
+
*/
|
|
2996
|
+
withoutDockerHealthcheck: () => Container;
|
|
2882
2997
|
/**
|
|
2883
2998
|
* Reset the container's OCI entrypoint.
|
|
2884
2999
|
* @param opts.keepDefaultArgs Don't remove the default arguments when unsetting the entrypoint.
|
|
@@ -3339,6 +3454,10 @@ export declare class EngineCache extends BaseClient {
|
|
|
3339
3454
|
/**
|
|
3340
3455
|
* Prune the cache of releaseable entries
|
|
3341
3456
|
* @param opts.useDefaultPolicy Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
|
|
3457
|
+
* @param opts.maxUsedSpace Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
|
|
3458
|
+
* @param opts.reservedSpace Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
|
|
3459
|
+
* @param opts.minFreeSpace Override the minimum free disk space target during pruning (e.g. "20GB" or "20%").
|
|
3460
|
+
* @param opts.targetSpace Override the target disk space to keep after pruning (e.g. "200GB" or "50%").
|
|
3342
3461
|
*/
|
|
3343
3462
|
prune: (opts?: EngineCachePruneOpts) => Promise<void>;
|
|
3344
3463
|
/**
|
|
@@ -3360,10 +3479,11 @@ export declare class EngineCacheEntry extends BaseClient {
|
|
|
3360
3479
|
private readonly _description?;
|
|
3361
3480
|
private readonly _diskSpaceBytes?;
|
|
3362
3481
|
private readonly _mostRecentUseTimeUnixNano?;
|
|
3482
|
+
private readonly _recordType?;
|
|
3363
3483
|
/**
|
|
3364
3484
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3365
3485
|
*/
|
|
3366
|
-
constructor(ctx?: Context, _id?: EngineCacheEntryID, _activelyUsed?: boolean, _createdTimeUnixNano?: number, _description?: string, _diskSpaceBytes?: number, _mostRecentUseTimeUnixNano?: number);
|
|
3486
|
+
constructor(ctx?: Context, _id?: EngineCacheEntryID, _activelyUsed?: boolean, _createdTimeUnixNano?: number, _description?: string, _diskSpaceBytes?: number, _mostRecentUseTimeUnixNano?: number, _recordType?: string);
|
|
3367
3487
|
/**
|
|
3368
3488
|
* A unique identifier for this EngineCacheEntry.
|
|
3369
3489
|
*/
|
|
@@ -3388,6 +3508,10 @@ export declare class EngineCacheEntry extends BaseClient {
|
|
|
3388
3508
|
* The most recent time the cache entry was used, in Unix nanoseconds.
|
|
3389
3509
|
*/
|
|
3390
3510
|
mostRecentUseTimeUnixNano: () => Promise<number>;
|
|
3511
|
+
/**
|
|
3512
|
+
* The type of the cache record (e.g. regular, internal, frontend, source.local, source.git.checkout, exec.cachemount).
|
|
3513
|
+
*/
|
|
3514
|
+
recordType: () => Promise<string>;
|
|
3391
3515
|
}
|
|
3392
3516
|
/**
|
|
3393
3517
|
* A set of cache entries returned by a query to a cache
|
|
@@ -3896,6 +4020,19 @@ export declare class Env extends BaseClient {
|
|
|
3896
4020
|
* @param workspace The directory to set as the host filesystem
|
|
3897
4021
|
*/
|
|
3898
4022
|
withWorkspace: (workspace: Directory) => Env;
|
|
4023
|
+
/**
|
|
4024
|
+
* Create or update a binding of type Workspace in the environment
|
|
4025
|
+
* @param name The name of the binding
|
|
4026
|
+
* @param value The Workspace value to assign to the binding
|
|
4027
|
+
* @param description The purpose of the input
|
|
4028
|
+
*/
|
|
4029
|
+
withWorkspaceInput: (name: string, value: Workspace, description: string) => Env;
|
|
4030
|
+
/**
|
|
4031
|
+
* Declare a desired Workspace output to be assigned in the environment
|
|
4032
|
+
* @param name The name of the binding
|
|
4033
|
+
* @param description A description of the desired value of the binding
|
|
4034
|
+
*/
|
|
4035
|
+
withWorkspaceOutput: (name: string, description: string) => Env;
|
|
3899
4036
|
/**
|
|
3900
4037
|
* Returns a new environment without any outputs
|
|
3901
4038
|
*/
|
|
@@ -4493,6 +4630,14 @@ export declare class Generator extends BaseClient {
|
|
|
4493
4630
|
* Return the fully qualified name of the generator
|
|
4494
4631
|
*/
|
|
4495
4632
|
name: () => Promise<string>;
|
|
4633
|
+
/**
|
|
4634
|
+
* The original module in which the generator has been defined
|
|
4635
|
+
*/
|
|
4636
|
+
originalModule: () => Module_;
|
|
4637
|
+
/**
|
|
4638
|
+
* The path of the generator within its module
|
|
4639
|
+
*/
|
|
4640
|
+
path: () => Promise<string[]>;
|
|
4496
4641
|
/**
|
|
4497
4642
|
* Execute the generator
|
|
4498
4643
|
*/
|
|
@@ -4575,6 +4720,7 @@ export declare class GitRef extends BaseClient {
|
|
|
4575
4720
|
* The filesystem tree at this ref.
|
|
4576
4721
|
* @param opts.discardGitDir Set to true to discard .git directory.
|
|
4577
4722
|
* @param opts.depth The depth of the tree to fetch.
|
|
4723
|
+
* @param opts.includeTags Set to true to populate tag refs in the local checkout .git.
|
|
4578
4724
|
*/
|
|
4579
4725
|
tree: (opts?: GitRefTreeOpts) => Directory;
|
|
4580
4726
|
/**
|
|
@@ -4645,6 +4791,54 @@ export declare class GitRepository extends BaseClient {
|
|
|
4645
4791
|
*/
|
|
4646
4792
|
url: () => Promise<string>;
|
|
4647
4793
|
}
|
|
4794
|
+
/**
|
|
4795
|
+
* Image healthcheck configuration.
|
|
4796
|
+
*/
|
|
4797
|
+
export declare class HealthcheckConfig extends BaseClient {
|
|
4798
|
+
private readonly _id?;
|
|
4799
|
+
private readonly _interval?;
|
|
4800
|
+
private readonly _retries?;
|
|
4801
|
+
private readonly _shell?;
|
|
4802
|
+
private readonly _startInterval?;
|
|
4803
|
+
private readonly _startPeriod?;
|
|
4804
|
+
private readonly _timeout?;
|
|
4805
|
+
/**
|
|
4806
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
4807
|
+
*/
|
|
4808
|
+
constructor(ctx?: Context, _id?: HealthcheckConfigID, _interval?: string, _retries?: number, _shell?: boolean, _startInterval?: string, _startPeriod?: string, _timeout?: string);
|
|
4809
|
+
/**
|
|
4810
|
+
* A unique identifier for this HealthcheckConfig.
|
|
4811
|
+
*/
|
|
4812
|
+
id: () => Promise<HealthcheckConfigID>;
|
|
4813
|
+
/**
|
|
4814
|
+
* Healthcheck command arguments.
|
|
4815
|
+
*/
|
|
4816
|
+
args: () => Promise<string[]>;
|
|
4817
|
+
/**
|
|
4818
|
+
* Interval between running healthcheck. Example:30s
|
|
4819
|
+
*/
|
|
4820
|
+
interval: () => Promise<string>;
|
|
4821
|
+
/**
|
|
4822
|
+
* The maximum number of consecutive failures before the container is marked as unhealthy. Example:3
|
|
4823
|
+
*/
|
|
4824
|
+
retries: () => Promise<number>;
|
|
4825
|
+
/**
|
|
4826
|
+
* Healthcheck command is a shell command.
|
|
4827
|
+
*/
|
|
4828
|
+
shell: () => Promise<boolean>;
|
|
4829
|
+
/**
|
|
4830
|
+
* StartInterval configures the duration between checks during the startup phase. Example:5s
|
|
4831
|
+
*/
|
|
4832
|
+
startInterval: () => Promise<string>;
|
|
4833
|
+
/**
|
|
4834
|
+
* StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example:0s
|
|
4835
|
+
*/
|
|
4836
|
+
startPeriod: () => Promise<string>;
|
|
4837
|
+
/**
|
|
4838
|
+
* Healthcheck timeout. Example:3s
|
|
4839
|
+
*/
|
|
4840
|
+
timeout: () => Promise<string>;
|
|
4841
|
+
}
|
|
4648
4842
|
/**
|
|
4649
4843
|
* Information about the host environment.
|
|
4650
4844
|
*/
|
|
@@ -5287,6 +5481,10 @@ export declare class ModuleSource extends BaseClient {
|
|
|
5287
5481
|
* The engine version of the module.
|
|
5288
5482
|
*/
|
|
5289
5483
|
engineVersion: () => Promise<string>;
|
|
5484
|
+
/**
|
|
5485
|
+
* The generated files and directories made on top of the module source's context directory, returned as a Changeset.
|
|
5486
|
+
*/
|
|
5487
|
+
generatedContextChangeset: () => Changeset;
|
|
5290
5488
|
/**
|
|
5291
5489
|
* The generated files and directories made on top of the module source's context directory.
|
|
5292
5490
|
*/
|
|
@@ -5571,6 +5769,10 @@ export declare class Client extends BaseClient {
|
|
|
5571
5769
|
* @param key A string identifier to target this cache volume (e.g., "modules-cache").
|
|
5572
5770
|
*/
|
|
5573
5771
|
cacheVolume: (key: string) => CacheVolume;
|
|
5772
|
+
/**
|
|
5773
|
+
* Creates an empty changeset
|
|
5774
|
+
*/
|
|
5775
|
+
changeset: () => Changeset;
|
|
5574
5776
|
/**
|
|
5575
5777
|
* Dagger Cloud configuration and state
|
|
5576
5778
|
*/
|
|
@@ -5605,6 +5807,12 @@ export declare class Client extends BaseClient {
|
|
|
5605
5807
|
* The TypeDef representations of the objects currently being served in the session.
|
|
5606
5808
|
*/
|
|
5607
5809
|
currentTypeDefs: () => Promise<TypeDef[]>;
|
|
5810
|
+
/**
|
|
5811
|
+
* Detect and return the current workspace.
|
|
5812
|
+
* @param opts.skipMigrationCheck If true, skip legacy dagger.json migration checks.
|
|
5813
|
+
* @experimental
|
|
5814
|
+
*/
|
|
5815
|
+
currentWorkspace: (opts?: ClientCurrentWorkspaceOpts) => Workspace;
|
|
5608
5816
|
/**
|
|
5609
5817
|
* The default platform of the engine.
|
|
5610
5818
|
*/
|
|
@@ -5819,6 +6027,10 @@ export declare class Client extends BaseClient {
|
|
|
5819
6027
|
* Load a GitRepository from its ID.
|
|
5820
6028
|
*/
|
|
5821
6029
|
loadGitRepositoryFromID: (id: GitRepositoryID) => GitRepository;
|
|
6030
|
+
/**
|
|
6031
|
+
* Load a HealthcheckConfig from its ID.
|
|
6032
|
+
*/
|
|
6033
|
+
loadHealthcheckConfigFromID: (id: HealthcheckConfigID) => HealthcheckConfig;
|
|
5822
6034
|
/**
|
|
5823
6035
|
* Load a Host from its ID.
|
|
5824
6036
|
*/
|
|
@@ -5915,6 +6127,10 @@ export declare class Client extends BaseClient {
|
|
|
5915
6127
|
* Load a TypeDef from its ID.
|
|
5916
6128
|
*/
|
|
5917
6129
|
loadTypeDefFromID: (id: TypeDefID) => TypeDef;
|
|
6130
|
+
/**
|
|
6131
|
+
* Load a Workspace from its ID.
|
|
6132
|
+
*/
|
|
6133
|
+
loadWorkspaceFromID: (id: WorkspaceID) => Workspace;
|
|
5918
6134
|
/**
|
|
5919
6135
|
* Create a new module.
|
|
5920
6136
|
*/
|
|
@@ -6410,6 +6626,58 @@ export declare class TypeDef extends BaseClient {
|
|
|
6410
6626
|
*/
|
|
6411
6627
|
with: (arg: (param: TypeDef) => TypeDef) => TypeDef;
|
|
6412
6628
|
}
|
|
6629
|
+
/**
|
|
6630
|
+
* A Dagger workspace detected from the current working directory.
|
|
6631
|
+
*/
|
|
6632
|
+
export declare class Workspace extends BaseClient {
|
|
6633
|
+
private readonly _id?;
|
|
6634
|
+
private readonly _clientId?;
|
|
6635
|
+
private readonly _findUp?;
|
|
6636
|
+
private readonly _root?;
|
|
6637
|
+
/**
|
|
6638
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
6639
|
+
*/
|
|
6640
|
+
constructor(ctx?: Context, _id?: WorkspaceID, _clientId?: string, _findUp?: string, _root?: string);
|
|
6641
|
+
/**
|
|
6642
|
+
* A unique identifier for this Workspace.
|
|
6643
|
+
*/
|
|
6644
|
+
id: () => Promise<WorkspaceID>;
|
|
6645
|
+
/**
|
|
6646
|
+
* The client ID that owns this workspace's host filesystem.
|
|
6647
|
+
*/
|
|
6648
|
+
clientId: () => Promise<string>;
|
|
6649
|
+
/**
|
|
6650
|
+
* Returns a Directory from the workspace.
|
|
6651
|
+
*
|
|
6652
|
+
* Path is relative to workspace root. Use "." for the root directory.
|
|
6653
|
+
* @param path Location of the directory to retrieve, relative to the workspace root (e.g., "src", ".").
|
|
6654
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
6655
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
6656
|
+
* @param opts.gitignore Apply .gitignore filter rules inside the directory.
|
|
6657
|
+
*/
|
|
6658
|
+
directory: (path: string, opts?: WorkspaceDirectoryOpts) => Directory;
|
|
6659
|
+
/**
|
|
6660
|
+
* Returns a File from the workspace.
|
|
6661
|
+
*
|
|
6662
|
+
* Path is relative to workspace root.
|
|
6663
|
+
* @param path Location of the file to retrieve, relative to the workspace root (e.g., "go.mod").
|
|
6664
|
+
*/
|
|
6665
|
+
file: (path: string) => File;
|
|
6666
|
+
/**
|
|
6667
|
+
* Search for a file or directory by walking up from the start path within the workspace.
|
|
6668
|
+
*
|
|
6669
|
+
* Returns the path relative to the workspace root if found, or null if not found.
|
|
6670
|
+
*
|
|
6671
|
+
* The search stops at the workspace root and will not traverse above it.
|
|
6672
|
+
* @param name The name of the file or directory to search for.
|
|
6673
|
+
* @param opts.from Path to start the search from, relative to the workspace root.
|
|
6674
|
+
*/
|
|
6675
|
+
findUp: (name: string, opts?: WorkspaceFindUpOpts) => Promise<string>;
|
|
6676
|
+
/**
|
|
6677
|
+
* Absolute path to the workspace root directory.
|
|
6678
|
+
*/
|
|
6679
|
+
root: () => Promise<string>;
|
|
6680
|
+
}
|
|
6413
6681
|
export declare const dag: Client;
|
|
6414
6682
|
export {};
|
|
6415
6683
|
//# sourceMappingURL=client.gen.d.ts.map
|