@dagger.io/dagger 0.15.3 → 0.16.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.
|
@@ -567,15 +567,17 @@ export type DirectoryAsModuleOpts = {
|
|
|
567
567
|
/**
|
|
568
568
|
* An optional subpath of the directory which contains the module's configuration file.
|
|
569
569
|
*
|
|
570
|
-
* 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.
|
|
571
|
-
*
|
|
572
570
|
* If not set, the module source code is loaded from the root of the directory.
|
|
573
571
|
*/
|
|
574
572
|
sourceRootPath?: string;
|
|
573
|
+
};
|
|
574
|
+
export type DirectoryAsModuleSourceOpts = {
|
|
575
575
|
/**
|
|
576
|
-
*
|
|
576
|
+
* An optional subpath of the directory which contains the module's configuration file.
|
|
577
|
+
*
|
|
578
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
577
579
|
*/
|
|
578
|
-
|
|
580
|
+
sourceRootPath?: string;
|
|
579
581
|
};
|
|
580
582
|
export type DirectoryDockerBuildOpts = {
|
|
581
583
|
/**
|
|
@@ -797,12 +799,6 @@ export type FunctionID = string & {
|
|
|
797
799
|
export type GeneratedCodeID = string & {
|
|
798
800
|
__GeneratedCodeID: never;
|
|
799
801
|
};
|
|
800
|
-
/**
|
|
801
|
-
* The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.
|
|
802
|
-
*/
|
|
803
|
-
export type GitModuleSourceID = string & {
|
|
804
|
-
__GitModuleSourceID: never;
|
|
805
|
-
};
|
|
806
802
|
export type GitRefTreeOpts = {
|
|
807
803
|
/**
|
|
808
804
|
* Set to true to discard .git directory.
|
|
@@ -921,52 +917,12 @@ export type LabelID = string & {
|
|
|
921
917
|
export type ListTypeDefID = string & {
|
|
922
918
|
__ListTypeDefID: never;
|
|
923
919
|
};
|
|
924
|
-
/**
|
|
925
|
-
* The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.
|
|
926
|
-
*/
|
|
927
|
-
export type LocalModuleSourceID = string & {
|
|
928
|
-
__LocalModuleSourceID: never;
|
|
929
|
-
};
|
|
930
|
-
export type ModuleWithSourceOpts = {
|
|
931
|
-
/**
|
|
932
|
-
* The engine version to upgrade to.
|
|
933
|
-
*/
|
|
934
|
-
engineVersion?: string;
|
|
935
|
-
};
|
|
936
|
-
/**
|
|
937
|
-
* The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.
|
|
938
|
-
*/
|
|
939
|
-
export type ModuleDependencyID = string & {
|
|
940
|
-
__ModuleDependencyID: never;
|
|
941
|
-
};
|
|
942
920
|
/**
|
|
943
921
|
* The `ModuleID` scalar type represents an identifier for an object of type Module.
|
|
944
922
|
*/
|
|
945
923
|
export type ModuleID = string & {
|
|
946
924
|
__ModuleID: never;
|
|
947
925
|
};
|
|
948
|
-
export type ModuleSourceAsModuleOpts = {
|
|
949
|
-
/**
|
|
950
|
-
* The engine version to upgrade to.
|
|
951
|
-
*/
|
|
952
|
-
engineVersion?: string;
|
|
953
|
-
};
|
|
954
|
-
export type ModuleSourceResolveDirectoryFromCallerOpts = {
|
|
955
|
-
/**
|
|
956
|
-
* If set, the name of the view to apply to the path.
|
|
957
|
-
*/
|
|
958
|
-
viewName?: string;
|
|
959
|
-
/**
|
|
960
|
-
* Patterns to ignore when loading the directory.
|
|
961
|
-
*/
|
|
962
|
-
ignore?: string[];
|
|
963
|
-
};
|
|
964
|
-
export type ModuleSourceWithInitOpts = {
|
|
965
|
-
/**
|
|
966
|
-
* Merge module dependencies into the current project's
|
|
967
|
-
*/
|
|
968
|
-
merge?: boolean;
|
|
969
|
-
};
|
|
970
926
|
/**
|
|
971
927
|
* The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.
|
|
972
928
|
*/
|
|
@@ -977,15 +933,10 @@ export type ModuleSourceID = string & {
|
|
|
977
933
|
* The kind of module source.
|
|
978
934
|
*/
|
|
979
935
|
export declare enum ModuleSourceKind {
|
|
936
|
+
DirSource = "DIR_SOURCE",
|
|
980
937
|
GitSource = "GIT_SOURCE",
|
|
981
938
|
LocalSource = "LOCAL_SOURCE"
|
|
982
939
|
}
|
|
983
|
-
/**
|
|
984
|
-
* The `ModuleSourceViewID` scalar type represents an identifier for an object of type ModuleSourceView.
|
|
985
|
-
*/
|
|
986
|
-
export type ModuleSourceViewID = string & {
|
|
987
|
-
__ModuleSourceViewID: never;
|
|
988
|
-
};
|
|
989
940
|
/**
|
|
990
941
|
* Transport layer network protocol associated to a port.
|
|
991
942
|
*/
|
|
@@ -1070,11 +1021,8 @@ export type ClientHttpOpts = {
|
|
|
1070
1021
|
*/
|
|
1071
1022
|
experimentalServiceHost?: Service;
|
|
1072
1023
|
};
|
|
1073
|
-
export type
|
|
1074
|
-
|
|
1075
|
-
* 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.
|
|
1076
|
-
*/
|
|
1077
|
-
name?: string;
|
|
1024
|
+
export type ClientLoadSecretFromNameOpts = {
|
|
1025
|
+
accessor?: string;
|
|
1078
1026
|
};
|
|
1079
1027
|
export type ClientModuleSourceOpts = {
|
|
1080
1028
|
/**
|
|
@@ -1082,16 +1030,17 @@ export type ClientModuleSourceOpts = {
|
|
|
1082
1030
|
*/
|
|
1083
1031
|
refPin?: string;
|
|
1084
1032
|
/**
|
|
1085
|
-
* If true,
|
|
1033
|
+
* If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
|
|
1086
1034
|
*/
|
|
1087
|
-
|
|
1035
|
+
disableFindUp?: boolean;
|
|
1088
1036
|
/**
|
|
1089
|
-
*
|
|
1037
|
+
* If true, do not error out if the provided ref string is a local path and does not exist yet. Useful when initializing new modules in directories that don't exist yet.
|
|
1090
1038
|
*/
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1039
|
+
allowNotExists?: boolean;
|
|
1040
|
+
/**
|
|
1041
|
+
* If set, error out if the ref string is not of the provided requireKind.
|
|
1042
|
+
*/
|
|
1043
|
+
requireKind?: ModuleSourceKind;
|
|
1095
1044
|
};
|
|
1096
1045
|
/**
|
|
1097
1046
|
* Expected return type of an execution
|
|
@@ -1110,6 +1059,12 @@ export declare enum ReturnType {
|
|
|
1110
1059
|
*/
|
|
1111
1060
|
Success = "SUCCESS"
|
|
1112
1061
|
}
|
|
1062
|
+
/**
|
|
1063
|
+
* The `SDKConfigID` scalar type represents an identifier for an object of type SDKConfig.
|
|
1064
|
+
*/
|
|
1065
|
+
export type SDKConfigID = string & {
|
|
1066
|
+
__SDKConfigID: never;
|
|
1067
|
+
};
|
|
1113
1068
|
/**
|
|
1114
1069
|
* The `ScalarTypeDefID` scalar type represents an identifier for an object of type ScalarTypeDef.
|
|
1115
1070
|
*/
|
|
@@ -1960,15 +1915,19 @@ export declare class Directory extends BaseClient {
|
|
|
1960
1915
|
*/
|
|
1961
1916
|
id: () => Promise<DirectoryID>;
|
|
1962
1917
|
/**
|
|
1963
|
-
* Load the directory as a Dagger module
|
|
1918
|
+
* Load the directory as a Dagger module source
|
|
1964
1919
|
* @param opts.sourceRootPath An optional subpath of the directory which contains the module's configuration file.
|
|
1965
1920
|
*
|
|
1966
|
-
* 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.
|
|
1967
|
-
*
|
|
1968
1921
|
* If not set, the module source code is loaded from the root of the directory.
|
|
1969
|
-
* @param opts.engineVersion The engine version to upgrade to.
|
|
1970
1922
|
*/
|
|
1971
1923
|
asModule: (opts?: DirectoryAsModuleOpts) => Module_;
|
|
1924
|
+
/**
|
|
1925
|
+
* Load the directory as a Dagger module source
|
|
1926
|
+
* @param opts.sourceRootPath An optional subpath of the directory which contains the module's configuration file.
|
|
1927
|
+
*
|
|
1928
|
+
* If not set, the module source code is loaded from the root of the directory.
|
|
1929
|
+
*/
|
|
1930
|
+
asModuleSource: (opts?: DirectoryAsModuleSourceOpts) => ModuleSource;
|
|
1972
1931
|
/**
|
|
1973
1932
|
* Gets the difference between this directory and an another directory.
|
|
1974
1933
|
* @param other Identifier of the directory to compare.
|
|
@@ -2644,59 +2603,6 @@ export declare class GeneratedCode extends BaseClient {
|
|
|
2644
2603
|
*/
|
|
2645
2604
|
with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
|
|
2646
2605
|
}
|
|
2647
|
-
/**
|
|
2648
|
-
* Module source originating from a git repo.
|
|
2649
|
-
*/
|
|
2650
|
-
export declare class GitModuleSource extends BaseClient {
|
|
2651
|
-
private readonly _id?;
|
|
2652
|
-
private readonly _cloneRef?;
|
|
2653
|
-
private readonly _commit?;
|
|
2654
|
-
private readonly _htmlRepoURL?;
|
|
2655
|
-
private readonly _htmlURL?;
|
|
2656
|
-
private readonly _root?;
|
|
2657
|
-
private readonly _rootSubpath?;
|
|
2658
|
-
private readonly _version?;
|
|
2659
|
-
/**
|
|
2660
|
-
* Constructor is used for internal usage only, do not create object from it.
|
|
2661
|
-
*/
|
|
2662
|
-
constructor(ctx?: Context, _id?: GitModuleSourceID, _cloneRef?: string, _commit?: string, _htmlRepoURL?: string, _htmlURL?: string, _root?: string, _rootSubpath?: string, _version?: string);
|
|
2663
|
-
/**
|
|
2664
|
-
* A unique identifier for this GitModuleSource.
|
|
2665
|
-
*/
|
|
2666
|
-
id: () => Promise<GitModuleSourceID>;
|
|
2667
|
-
/**
|
|
2668
|
-
* The ref to clone the root of the git repo from
|
|
2669
|
-
*/
|
|
2670
|
-
cloneRef: () => Promise<string>;
|
|
2671
|
-
/**
|
|
2672
|
-
* The resolved commit of the git repo this source points to.
|
|
2673
|
-
*/
|
|
2674
|
-
commit: () => Promise<string>;
|
|
2675
|
-
/**
|
|
2676
|
-
* The directory containing everything needed to load load and use the module.
|
|
2677
|
-
*/
|
|
2678
|
-
contextDirectory: () => Directory;
|
|
2679
|
-
/**
|
|
2680
|
-
* The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket)
|
|
2681
|
-
*/
|
|
2682
|
-
htmlRepoURL: () => Promise<string>;
|
|
2683
|
-
/**
|
|
2684
|
-
* The URL to the source's git repo in a web browser
|
|
2685
|
-
*/
|
|
2686
|
-
htmlURL: () => Promise<string>;
|
|
2687
|
-
/**
|
|
2688
|
-
* The clean module name of the root of the module
|
|
2689
|
-
*/
|
|
2690
|
-
root: () => Promise<string>;
|
|
2691
|
-
/**
|
|
2692
|
-
* 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).
|
|
2693
|
-
*/
|
|
2694
|
-
rootSubpath: () => Promise<string>;
|
|
2695
|
-
/**
|
|
2696
|
-
* The specified version of the git repo this source points to.
|
|
2697
|
-
*/
|
|
2698
|
-
version: () => Promise<string>;
|
|
2699
|
-
}
|
|
2700
2606
|
/**
|
|
2701
2607
|
* A git ref (tag, branch, or commit).
|
|
2702
2608
|
*/
|
|
@@ -2949,34 +2855,6 @@ export declare class ListTypeDef extends BaseClient {
|
|
|
2949
2855
|
*/
|
|
2950
2856
|
elementTypeDef: () => TypeDef;
|
|
2951
2857
|
}
|
|
2952
|
-
/**
|
|
2953
|
-
* Module source that that originates from a path locally relative to an arbitrary directory.
|
|
2954
|
-
*/
|
|
2955
|
-
export declare class LocalModuleSource extends BaseClient {
|
|
2956
|
-
private readonly _id?;
|
|
2957
|
-
private readonly _relHostPath?;
|
|
2958
|
-
private readonly _rootSubpath?;
|
|
2959
|
-
/**
|
|
2960
|
-
* Constructor is used for internal usage only, do not create object from it.
|
|
2961
|
-
*/
|
|
2962
|
-
constructor(ctx?: Context, _id?: LocalModuleSourceID, _relHostPath?: string, _rootSubpath?: string);
|
|
2963
|
-
/**
|
|
2964
|
-
* A unique identifier for this LocalModuleSource.
|
|
2965
|
-
*/
|
|
2966
|
-
id: () => Promise<LocalModuleSourceID>;
|
|
2967
|
-
/**
|
|
2968
|
-
* The directory containing everything needed to load load and use the module.
|
|
2969
|
-
*/
|
|
2970
|
-
contextDirectory: () => Directory;
|
|
2971
|
-
/**
|
|
2972
|
-
* The relative path to the module root from the host directory
|
|
2973
|
-
*/
|
|
2974
|
-
relHostPath: () => Promise<string>;
|
|
2975
|
-
/**
|
|
2976
|
-
* 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).
|
|
2977
|
-
*/
|
|
2978
|
-
rootSubpath: () => Promise<string>;
|
|
2979
|
-
}
|
|
2980
2858
|
/**
|
|
2981
2859
|
* A Dagger module.
|
|
2982
2860
|
*/
|
|
@@ -2984,24 +2862,20 @@ export declare class Module_ extends BaseClient {
|
|
|
2984
2862
|
private readonly _id?;
|
|
2985
2863
|
private readonly _description?;
|
|
2986
2864
|
private readonly _name?;
|
|
2987
|
-
private readonly _sdk?;
|
|
2988
2865
|
private readonly _serve?;
|
|
2866
|
+
private readonly _sync?;
|
|
2989
2867
|
/**
|
|
2990
2868
|
* Constructor is used for internal usage only, do not create object from it.
|
|
2991
2869
|
*/
|
|
2992
|
-
constructor(ctx?: Context, _id?: ModuleID, _description?: string, _name?: string,
|
|
2870
|
+
constructor(ctx?: Context, _id?: ModuleID, _description?: string, _name?: string, _serve?: Void, _sync?: ModuleID);
|
|
2993
2871
|
/**
|
|
2994
2872
|
* A unique identifier for this Module.
|
|
2995
2873
|
*/
|
|
2996
2874
|
id: () => Promise<ModuleID>;
|
|
2997
2875
|
/**
|
|
2998
|
-
*
|
|
2876
|
+
* The dependencies of the module.
|
|
2999
2877
|
*/
|
|
3000
2878
|
dependencies: () => Promise<Module_[]>;
|
|
3001
|
-
/**
|
|
3002
|
-
* The dependencies as configured by the module.
|
|
3003
|
-
*/
|
|
3004
|
-
dependencyConfig: () => Promise<ModuleDependency[]>;
|
|
3005
2879
|
/**
|
|
3006
2880
|
* The doc string of the module, if any
|
|
3007
2881
|
*/
|
|
@@ -3013,15 +2887,7 @@ export declare class Module_ extends BaseClient {
|
|
|
3013
2887
|
/**
|
|
3014
2888
|
* The generated files and directories made on top of the module source's context directory.
|
|
3015
2889
|
*/
|
|
3016
|
-
generatedContextDiff: () => Directory;
|
|
3017
|
-
/**
|
|
3018
|
-
* The module source's context plus any configuration and source files created by codegen.
|
|
3019
|
-
*/
|
|
3020
2890
|
generatedContextDirectory: () => Directory;
|
|
3021
|
-
/**
|
|
3022
|
-
* Retrieves the module with the objects loaded via its SDK.
|
|
3023
|
-
*/
|
|
3024
|
-
initialize: () => Module_;
|
|
3025
2891
|
/**
|
|
3026
2892
|
* Interfaces served by this module.
|
|
3027
2893
|
*/
|
|
@@ -3039,9 +2905,9 @@ export declare class Module_ extends BaseClient {
|
|
|
3039
2905
|
*/
|
|
3040
2906
|
runtime: () => Container;
|
|
3041
2907
|
/**
|
|
3042
|
-
* The SDK used by this module.
|
|
2908
|
+
* The SDK config used by this module.
|
|
3043
2909
|
*/
|
|
3044
|
-
sdk: () =>
|
|
2910
|
+
sdk: () => SDKConfig;
|
|
3045
2911
|
/**
|
|
3046
2912
|
* Serve a module's API in the current session.
|
|
3047
2913
|
*
|
|
@@ -3052,6 +2918,10 @@ export declare class Module_ extends BaseClient {
|
|
|
3052
2918
|
* The source for the module.
|
|
3053
2919
|
*/
|
|
3054
2920
|
source: () => ModuleSource;
|
|
2921
|
+
/**
|
|
2922
|
+
* Forces evaluation of the module, including any loading into the engine and associated validation.
|
|
2923
|
+
*/
|
|
2924
|
+
sync: () => Promise<Module_>;
|
|
3055
2925
|
/**
|
|
3056
2926
|
* Retrieves the module with the given description
|
|
3057
2927
|
* @param description The description to set
|
|
@@ -3069,12 +2939,6 @@ export declare class Module_ extends BaseClient {
|
|
|
3069
2939
|
* This module plus the given Object type and associated functions.
|
|
3070
2940
|
*/
|
|
3071
2941
|
withObject: (object: TypeDef) => Module_;
|
|
3072
|
-
/**
|
|
3073
|
-
* Retrieves the module with basic configuration loaded if present.
|
|
3074
|
-
* @param source The module source to initialize from.
|
|
3075
|
-
* @param opts.engineVersion The engine version to upgrade to.
|
|
3076
|
-
*/
|
|
3077
|
-
withSource: (source: ModuleSource, opts?: ModuleWithSourceOpts) => Module_;
|
|
3078
2942
|
/**
|
|
3079
2943
|
* Call the provided function with current Module.
|
|
3080
2944
|
*
|
|
@@ -3082,100 +2946,104 @@ export declare class Module_ extends BaseClient {
|
|
|
3082
2946
|
*/
|
|
3083
2947
|
with: (arg: (param: Module_) => Module_) => Module_;
|
|
3084
2948
|
}
|
|
3085
|
-
/**
|
|
3086
|
-
* The configuration of dependency of a module.
|
|
3087
|
-
*/
|
|
3088
|
-
export declare class ModuleDependency extends BaseClient {
|
|
3089
|
-
private readonly _id?;
|
|
3090
|
-
private readonly _name?;
|
|
3091
|
-
/**
|
|
3092
|
-
* Constructor is used for internal usage only, do not create object from it.
|
|
3093
|
-
*/
|
|
3094
|
-
constructor(ctx?: Context, _id?: ModuleDependencyID, _name?: string);
|
|
3095
|
-
/**
|
|
3096
|
-
* A unique identifier for this ModuleDependency.
|
|
3097
|
-
*/
|
|
3098
|
-
id: () => Promise<ModuleDependencyID>;
|
|
3099
|
-
/**
|
|
3100
|
-
* The name of the dependency module.
|
|
3101
|
-
*/
|
|
3102
|
-
name: () => Promise<string>;
|
|
3103
|
-
/**
|
|
3104
|
-
* The source for the dependency module.
|
|
3105
|
-
*/
|
|
3106
|
-
source: () => ModuleSource;
|
|
3107
|
-
}
|
|
3108
2949
|
/**
|
|
3109
2950
|
* The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
|
|
3110
2951
|
*/
|
|
3111
2952
|
export declare class ModuleSource extends BaseClient {
|
|
3112
2953
|
private readonly _id?;
|
|
3113
2954
|
private readonly _asString?;
|
|
2955
|
+
private readonly _cloneRef?;
|
|
2956
|
+
private readonly _commit?;
|
|
3114
2957
|
private readonly _configExists?;
|
|
3115
2958
|
private readonly _digest?;
|
|
2959
|
+
private readonly _engineVersion?;
|
|
2960
|
+
private readonly _htmlRepoURL?;
|
|
2961
|
+
private readonly _htmlURL?;
|
|
3116
2962
|
private readonly _kind?;
|
|
2963
|
+
private readonly _localContextDirectoryPath?;
|
|
3117
2964
|
private readonly _moduleName?;
|
|
3118
2965
|
private readonly _moduleOriginalName?;
|
|
3119
2966
|
private readonly _pin?;
|
|
3120
|
-
private readonly
|
|
2967
|
+
private readonly _repoRootPath?;
|
|
3121
2968
|
private readonly _sourceRootSubpath?;
|
|
3122
2969
|
private readonly _sourceSubpath?;
|
|
2970
|
+
private readonly _sync?;
|
|
2971
|
+
private readonly _version?;
|
|
3123
2972
|
/**
|
|
3124
2973
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3125
2974
|
*/
|
|
3126
|
-
constructor(ctx?: Context, _id?: ModuleSourceID, _asString?: string, _configExists?: boolean, _digest?: string, _kind?: ModuleSourceKind, _moduleName?: string, _moduleOriginalName?: string, _pin?: string,
|
|
2975
|
+
constructor(ctx?: Context, _id?: ModuleSourceID, _asString?: string, _cloneRef?: string, _commit?: string, _configExists?: boolean, _digest?: string, _engineVersion?: string, _htmlRepoURL?: string, _htmlURL?: string, _kind?: ModuleSourceKind, _localContextDirectoryPath?: string, _moduleName?: string, _moduleOriginalName?: string, _pin?: string, _repoRootPath?: string, _sourceRootSubpath?: string, _sourceSubpath?: string, _sync?: ModuleSourceID, _version?: string);
|
|
3127
2976
|
/**
|
|
3128
2977
|
* A unique identifier for this ModuleSource.
|
|
3129
2978
|
*/
|
|
3130
2979
|
id: () => Promise<ModuleSourceID>;
|
|
3131
2980
|
/**
|
|
3132
|
-
*
|
|
2981
|
+
* Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
|
|
3133
2982
|
*/
|
|
3134
|
-
|
|
2983
|
+
asModule: () => Module_;
|
|
3135
2984
|
/**
|
|
3136
|
-
*
|
|
2985
|
+
* A human readable ref string representation of this module source.
|
|
3137
2986
|
*/
|
|
3138
|
-
|
|
2987
|
+
asString: () => Promise<string>;
|
|
3139
2988
|
/**
|
|
3140
|
-
*
|
|
3141
|
-
* @param opts.engineVersion The engine version to upgrade to.
|
|
2989
|
+
* The ref to clone the root of the git repo from. Only valid for git sources.
|
|
3142
2990
|
*/
|
|
3143
|
-
|
|
2991
|
+
cloneRef: () => Promise<string>;
|
|
3144
2992
|
/**
|
|
3145
|
-
*
|
|
2993
|
+
* The resolved commit of the git repo this source points to. Only valid for git sources.
|
|
3146
2994
|
*/
|
|
3147
|
-
|
|
2995
|
+
commit: () => Promise<string>;
|
|
3148
2996
|
/**
|
|
3149
|
-
*
|
|
2997
|
+
* Whether an existing dagger.json for the module was found.
|
|
3150
2998
|
*/
|
|
3151
2999
|
configExists: () => Promise<boolean>;
|
|
3152
3000
|
/**
|
|
3153
|
-
* The directory
|
|
3001
|
+
* The full directory loaded for the module source, including the source code as a subdirectory.
|
|
3154
3002
|
*/
|
|
3155
3003
|
contextDirectory: () => Directory;
|
|
3156
3004
|
/**
|
|
3157
|
-
* The
|
|
3005
|
+
* The dependencies of the module source.
|
|
3158
3006
|
*/
|
|
3159
|
-
dependencies: () => Promise<
|
|
3007
|
+
dependencies: () => Promise<ModuleSource[]>;
|
|
3160
3008
|
/**
|
|
3161
|
-
*
|
|
3009
|
+
* A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance.
|
|
3162
3010
|
*/
|
|
3163
3011
|
digest: () => Promise<string>;
|
|
3164
3012
|
/**
|
|
3165
3013
|
* The directory containing the module configuration and source code (source code may be in a subdir).
|
|
3166
|
-
* @param path
|
|
3014
|
+
* @param path A subpath from the source directory to select.
|
|
3167
3015
|
*/
|
|
3168
3016
|
directory: (path: string) => Directory;
|
|
3169
3017
|
/**
|
|
3170
|
-
* The
|
|
3018
|
+
* The engine version of the module.
|
|
3019
|
+
*/
|
|
3020
|
+
engineVersion: () => Promise<string>;
|
|
3021
|
+
/**
|
|
3022
|
+
* The generated files and directories made on top of the module source's context directory.
|
|
3023
|
+
*/
|
|
3024
|
+
generatedContextDirectory: () => Directory;
|
|
3025
|
+
/**
|
|
3026
|
+
* The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket). Only valid for git sources.
|
|
3027
|
+
*/
|
|
3028
|
+
htmlRepoURL: () => Promise<string>;
|
|
3029
|
+
/**
|
|
3030
|
+
* The URL to the source's git repo in a web browser. Only valid for git sources.
|
|
3031
|
+
*/
|
|
3032
|
+
htmlURL: () => Promise<string>;
|
|
3033
|
+
/**
|
|
3034
|
+
* The kind of module source (currently local, git or dir).
|
|
3171
3035
|
*/
|
|
3172
3036
|
kind: () => Promise<ModuleSourceKind>;
|
|
3173
3037
|
/**
|
|
3174
|
-
*
|
|
3038
|
+
* The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources.
|
|
3039
|
+
*/
|
|
3040
|
+
localContextDirectoryPath: () => Promise<string>;
|
|
3041
|
+
/**
|
|
3042
|
+
* The name of the module, including any setting via the withName API.
|
|
3175
3043
|
*/
|
|
3176
3044
|
moduleName: () => Promise<string>;
|
|
3177
3045
|
/**
|
|
3178
|
-
* The original name of the module
|
|
3046
|
+
* The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
|
|
3179
3047
|
*/
|
|
3180
3048
|
moduleOriginalName: () => Promise<string>;
|
|
3181
3049
|
/**
|
|
@@ -3183,57 +3051,44 @@ export declare class ModuleSource extends BaseClient {
|
|
|
3183
3051
|
*/
|
|
3184
3052
|
pin: () => Promise<string>;
|
|
3185
3053
|
/**
|
|
3186
|
-
* The path to the
|
|
3187
|
-
*/
|
|
3188
|
-
resolveContextPathFromCaller: () => Promise<string>;
|
|
3189
|
-
/**
|
|
3190
|
-
* Resolve the provided module source arg as a dependency relative to this module source.
|
|
3191
|
-
* @param dep The dependency module source to resolve.
|
|
3192
|
-
*/
|
|
3193
|
-
resolveDependency: (dep: ModuleSource) => ModuleSource;
|
|
3194
|
-
/**
|
|
3195
|
-
* Load a directory from the caller optionally with a given view applied.
|
|
3196
|
-
* @param path The path on the caller's filesystem to load.
|
|
3197
|
-
* @param opts.viewName If set, the name of the view to apply to the path.
|
|
3198
|
-
* @param opts.ignore Patterns to ignore when loading the directory.
|
|
3054
|
+
* The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
|
|
3199
3055
|
*/
|
|
3200
|
-
|
|
3056
|
+
repoRootPath: () => Promise<string>;
|
|
3201
3057
|
/**
|
|
3202
|
-
*
|
|
3058
|
+
* The SDK configuration of the module.
|
|
3203
3059
|
*/
|
|
3204
|
-
|
|
3060
|
+
sdk: () => SDKConfig;
|
|
3205
3061
|
/**
|
|
3206
|
-
* The path relative to context
|
|
3062
|
+
* The path, relative to the context directory, that contains the module's dagger.json.
|
|
3207
3063
|
*/
|
|
3208
3064
|
sourceRootSubpath: () => Promise<string>;
|
|
3209
3065
|
/**
|
|
3210
|
-
* The path
|
|
3066
|
+
* The path to the directory containing the module's source code, relative to the context directory.
|
|
3211
3067
|
*/
|
|
3212
3068
|
sourceSubpath: () => Promise<string>;
|
|
3213
3069
|
/**
|
|
3214
|
-
*
|
|
3215
|
-
* @param name The name of the view to retrieve.
|
|
3070
|
+
* Forces evaluation of the module source, including any loading into the engine and associated validation.
|
|
3216
3071
|
*/
|
|
3217
|
-
|
|
3072
|
+
sync: () => Promise<ModuleSource>;
|
|
3218
3073
|
/**
|
|
3219
|
-
* The
|
|
3074
|
+
* The specified version of the git repo this source points to. Only valid for git sources.
|
|
3220
3075
|
*/
|
|
3221
|
-
|
|
3222
|
-
/**
|
|
3223
|
-
* Update the module source with a new context directory. Only valid for local sources.
|
|
3224
|
-
* @param dir The directory to set as the context directory.
|
|
3225
|
-
*/
|
|
3226
|
-
withContextDirectory: (dir: Directory) => ModuleSource;
|
|
3076
|
+
version: () => Promise<string>;
|
|
3227
3077
|
/**
|
|
3228
3078
|
* Append the provided dependencies to the module source's dependency list.
|
|
3229
3079
|
* @param dependencies The dependencies to append.
|
|
3230
3080
|
*/
|
|
3231
|
-
withDependencies: (dependencies:
|
|
3081
|
+
withDependencies: (dependencies: ModuleSource[]) => ModuleSource;
|
|
3232
3082
|
/**
|
|
3233
|
-
*
|
|
3234
|
-
* @param
|
|
3083
|
+
* Upgrade the engine version of the module to the given value.
|
|
3084
|
+
* @param version The engine version to upgrade to.
|
|
3235
3085
|
*/
|
|
3236
|
-
|
|
3086
|
+
withEngineVersion: (version: string) => ModuleSource;
|
|
3087
|
+
/**
|
|
3088
|
+
* Update the module source with additional include patterns for files+directories from its context that are required for building it
|
|
3089
|
+
* @param patterns The new additional include patterns.
|
|
3090
|
+
*/
|
|
3091
|
+
withIncludes: (patterns: string[]) => ModuleSource;
|
|
3237
3092
|
/**
|
|
3238
3093
|
* Update the module source with a new name.
|
|
3239
3094
|
* @param name The name to set.
|
|
@@ -3241,12 +3096,12 @@ export declare class ModuleSource extends BaseClient {
|
|
|
3241
3096
|
withName: (name: string) => ModuleSource;
|
|
3242
3097
|
/**
|
|
3243
3098
|
* Update the module source with a new SDK.
|
|
3244
|
-
* @param
|
|
3099
|
+
* @param source The SDK source to set.
|
|
3245
3100
|
*/
|
|
3246
|
-
withSDK: (
|
|
3101
|
+
withSDK: (source: string) => ModuleSource;
|
|
3247
3102
|
/**
|
|
3248
3103
|
* Update the module source with a new source subpath.
|
|
3249
|
-
* @param path The path to set as the source subpath.
|
|
3104
|
+
* @param path The path to set as the source subpath. Must be relative to the module source's source root directory.
|
|
3250
3105
|
*/
|
|
3251
3106
|
withSourceSubpath: (path: string) => ModuleSource;
|
|
3252
3107
|
/**
|
|
@@ -3254,12 +3109,6 @@ export declare class ModuleSource extends BaseClient {
|
|
|
3254
3109
|
* @param dependencies The dependencies to update.
|
|
3255
3110
|
*/
|
|
3256
3111
|
withUpdateDependencies: (dependencies: string[]) => ModuleSource;
|
|
3257
|
-
/**
|
|
3258
|
-
* Update the module source with a new named view.
|
|
3259
|
-
* @param name The name of the view to set.
|
|
3260
|
-
* @param patterns The patterns to set as the view filters.
|
|
3261
|
-
*/
|
|
3262
|
-
withView: (name: string, patterns: string[]) => ModuleSource;
|
|
3263
3112
|
/**
|
|
3264
3113
|
* Remove the provided dependencies from the module source's dependency list.
|
|
3265
3114
|
* @param dependencies The dependencies to remove.
|
|
@@ -3272,29 +3121,6 @@ export declare class ModuleSource extends BaseClient {
|
|
|
3272
3121
|
*/
|
|
3273
3122
|
with: (arg: (param: ModuleSource) => ModuleSource) => ModuleSource;
|
|
3274
3123
|
}
|
|
3275
|
-
/**
|
|
3276
|
-
* A named set of path filters that can be applied to directory arguments provided to functions.
|
|
3277
|
-
*/
|
|
3278
|
-
export declare class ModuleSourceView extends BaseClient {
|
|
3279
|
-
private readonly _id?;
|
|
3280
|
-
private readonly _name?;
|
|
3281
|
-
/**
|
|
3282
|
-
* Constructor is used for internal usage only, do not create object from it.
|
|
3283
|
-
*/
|
|
3284
|
-
constructor(ctx?: Context, _id?: ModuleSourceViewID, _name?: string);
|
|
3285
|
-
/**
|
|
3286
|
-
* A unique identifier for this ModuleSourceView.
|
|
3287
|
-
*/
|
|
3288
|
-
id: () => Promise<ModuleSourceViewID>;
|
|
3289
|
-
/**
|
|
3290
|
-
* The name of the view
|
|
3291
|
-
*/
|
|
3292
|
-
name: () => Promise<string>;
|
|
3293
|
-
/**
|
|
3294
|
-
* The patterns of the view used to filter paths
|
|
3295
|
-
*/
|
|
3296
|
-
patterns: () => Promise<string[]>;
|
|
3297
|
-
}
|
|
3298
3124
|
/**
|
|
3299
3125
|
* A definition of a custom object defined in a Module.
|
|
3300
3126
|
*/
|
|
@@ -3545,10 +3371,6 @@ export declare class Client extends BaseClient {
|
|
|
3545
3371
|
* Load a GeneratedCode from its ID.
|
|
3546
3372
|
*/
|
|
3547
3373
|
loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
|
|
3548
|
-
/**
|
|
3549
|
-
* Load a GitModuleSource from its ID.
|
|
3550
|
-
*/
|
|
3551
|
-
loadGitModuleSourceFromID: (id: GitModuleSourceID) => GitModuleSource;
|
|
3552
3374
|
/**
|
|
3553
3375
|
* Load a GitRef from its ID.
|
|
3554
3376
|
*/
|
|
@@ -3577,14 +3399,6 @@ export declare class Client extends BaseClient {
|
|
|
3577
3399
|
* Load a ListTypeDef from its ID.
|
|
3578
3400
|
*/
|
|
3579
3401
|
loadListTypeDefFromID: (id: ListTypeDefID) => ListTypeDef;
|
|
3580
|
-
/**
|
|
3581
|
-
* Load a LocalModuleSource from its ID.
|
|
3582
|
-
*/
|
|
3583
|
-
loadLocalModuleSourceFromID: (id: LocalModuleSourceID) => LocalModuleSource;
|
|
3584
|
-
/**
|
|
3585
|
-
* Load a ModuleDependency from its ID.
|
|
3586
|
-
*/
|
|
3587
|
-
loadModuleDependencyFromID: (id: ModuleDependencyID) => ModuleDependency;
|
|
3588
3402
|
/**
|
|
3589
3403
|
* Load a Module from its ID.
|
|
3590
3404
|
*/
|
|
@@ -3593,10 +3407,6 @@ export declare class Client extends BaseClient {
|
|
|
3593
3407
|
* Load a ModuleSource from its ID.
|
|
3594
3408
|
*/
|
|
3595
3409
|
loadModuleSourceFromID: (id: ModuleSourceID) => ModuleSource;
|
|
3596
|
-
/**
|
|
3597
|
-
* Load a ModuleSourceView from its ID.
|
|
3598
|
-
*/
|
|
3599
|
-
loadModuleSourceViewFromID: (id: ModuleSourceViewID) => ModuleSourceView;
|
|
3600
3410
|
/**
|
|
3601
3411
|
* Load a ObjectTypeDef from its ID.
|
|
3602
3412
|
*/
|
|
@@ -3605,6 +3415,10 @@ export declare class Client extends BaseClient {
|
|
|
3605
3415
|
* Load a Port from its ID.
|
|
3606
3416
|
*/
|
|
3607
3417
|
loadPortFromID: (id: PortID) => Port;
|
|
3418
|
+
/**
|
|
3419
|
+
* Load a SDKConfig from its ID.
|
|
3420
|
+
*/
|
|
3421
|
+
loadSDKConfigFromID: (id: SDKConfigID) => SDKConfig;
|
|
3608
3422
|
/**
|
|
3609
3423
|
* Load a ScalarTypeDef from its ID.
|
|
3610
3424
|
*/
|
|
@@ -3613,6 +3427,10 @@ export declare class Client extends BaseClient {
|
|
|
3613
3427
|
* Load a Secret from its ID.
|
|
3614
3428
|
*/
|
|
3615
3429
|
loadSecretFromID: (id: SecretID) => Secret;
|
|
3430
|
+
/**
|
|
3431
|
+
* Load a Secret from its Name.
|
|
3432
|
+
*/
|
|
3433
|
+
loadSecretFromName: (name: string, opts?: ClientLoadSecretFromNameOpts) => Secret;
|
|
3616
3434
|
/**
|
|
3617
3435
|
* Load a Service from its ID.
|
|
3618
3436
|
*/
|
|
@@ -3638,23 +3456,19 @@ export declare class Client extends BaseClient {
|
|
|
3638
3456
|
*/
|
|
3639
3457
|
module_: () => Module_;
|
|
3640
3458
|
/**
|
|
3641
|
-
* Create a new module
|
|
3642
|
-
* @param source The source of the dependency
|
|
3643
|
-
* @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.
|
|
3644
|
-
*/
|
|
3645
|
-
moduleDependency: (source: ModuleSource, opts?: ClientModuleDependencyOpts) => ModuleDependency;
|
|
3646
|
-
/**
|
|
3647
|
-
* Create a new module source instance from a source ref string.
|
|
3459
|
+
* Create a new module source instance from a source ref string
|
|
3648
3460
|
* @param refString The string ref representation of the module source
|
|
3649
3461
|
* @param opts.refPin The pinned version of the module source
|
|
3650
|
-
* @param opts.
|
|
3651
|
-
* @param opts.
|
|
3462
|
+
* @param opts.disableFindUp If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
|
|
3463
|
+
* @param opts.allowNotExists If true, do not error out if the provided ref string is a local path and does not exist yet. Useful when initializing new modules in directories that don't exist yet.
|
|
3464
|
+
* @param opts.requireKind If set, error out if the ref string is not of the provided requireKind.
|
|
3652
3465
|
*/
|
|
3653
3466
|
moduleSource: (refString: string, opts?: ClientModuleSourceOpts) => ModuleSource;
|
|
3654
3467
|
/**
|
|
3655
|
-
*
|
|
3468
|
+
* Creates a new secret.
|
|
3469
|
+
* @param uri The URI of the secret store
|
|
3656
3470
|
*/
|
|
3657
|
-
secret: (
|
|
3471
|
+
secret: (uri: string) => Secret;
|
|
3658
3472
|
/**
|
|
3659
3473
|
* Sets a secret given a user defined name to its plaintext and returns the secret.
|
|
3660
3474
|
*
|
|
@@ -3679,6 +3493,25 @@ export declare class Client extends BaseClient {
|
|
|
3679
3493
|
*/
|
|
3680
3494
|
version: () => Promise<string>;
|
|
3681
3495
|
}
|
|
3496
|
+
/**
|
|
3497
|
+
* The SDK config of the module.
|
|
3498
|
+
*/
|
|
3499
|
+
export declare class SDKConfig extends BaseClient {
|
|
3500
|
+
private readonly _id?;
|
|
3501
|
+
private readonly _source?;
|
|
3502
|
+
/**
|
|
3503
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3504
|
+
*/
|
|
3505
|
+
constructor(ctx?: Context, _id?: SDKConfigID, _source?: string);
|
|
3506
|
+
/**
|
|
3507
|
+
* A unique identifier for this SDKConfig.
|
|
3508
|
+
*/
|
|
3509
|
+
id: () => Promise<SDKConfigID>;
|
|
3510
|
+
/**
|
|
3511
|
+
* Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
|
|
3512
|
+
*/
|
|
3513
|
+
source: () => Promise<string>;
|
|
3514
|
+
}
|
|
3682
3515
|
/**
|
|
3683
3516
|
* A definition of a custom scalar defined in a Module.
|
|
3684
3517
|
*/
|
|
@@ -3715,10 +3548,11 @@ export declare class Secret extends BaseClient {
|
|
|
3715
3548
|
private readonly _id?;
|
|
3716
3549
|
private readonly _name?;
|
|
3717
3550
|
private readonly _plaintext?;
|
|
3551
|
+
private readonly _uri?;
|
|
3718
3552
|
/**
|
|
3719
3553
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3720
3554
|
*/
|
|
3721
|
-
constructor(ctx?: Context, _id?: SecretID, _name?: string, _plaintext?: string);
|
|
3555
|
+
constructor(ctx?: Context, _id?: SecretID, _name?: string, _plaintext?: string, _uri?: string);
|
|
3722
3556
|
/**
|
|
3723
3557
|
* A unique identifier for this Secret.
|
|
3724
3558
|
*/
|
|
@@ -3731,6 +3565,10 @@ export declare class Secret extends BaseClient {
|
|
|
3731
3565
|
* The value of this secret.
|
|
3732
3566
|
*/
|
|
3733
3567
|
plaintext: () => Promise<string>;
|
|
3568
|
+
/**
|
|
3569
|
+
* The URI of this secret.
|
|
3570
|
+
*/
|
|
3571
|
+
uri: () => Promise<string>;
|
|
3734
3572
|
}
|
|
3735
3573
|
/**
|
|
3736
3574
|
* A content-addressed service providing TCP connectivity.
|