@dagger.io/dagger 0.9.7 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,6 +165,12 @@ export type ContainerPublishOpts = {
165
165
  */
166
166
  mediaTypes?: ImageMediaTypes;
167
167
  };
168
+ export type ContainerShellOpts = {
169
+ /**
170
+ * If set, override the container's default shell and invoke these arguments instead.
171
+ */
172
+ args?: string[];
173
+ };
168
174
  export type ContainerWithDirectoryOpts = {
169
175
  /**
170
176
  * Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
@@ -232,6 +238,10 @@ export type ContainerWithExposedPortOpts = {
232
238
  * Optional port description
233
239
  */
234
240
  description?: string;
241
+ /**
242
+ * Skip the health check when run as a service.
243
+ */
244
+ experimentalSkipHealthcheck?: boolean;
235
245
  };
236
246
  export type ContainerWithFileOpts = {
237
247
  /**
@@ -349,6 +359,22 @@ export type ContainerWithoutExposedPortOpts = {
349
359
  export type ContainerID = string & {
350
360
  __ContainerID: never;
351
361
  };
362
+ export type CurrentModuleWorkdirOpts = {
363
+ /**
364
+ * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
365
+ */
366
+ exclude?: string[];
367
+ /**
368
+ * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
369
+ */
370
+ include?: string[];
371
+ };
372
+ /**
373
+ * The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.
374
+ */
375
+ export type CurrentModuleID = string & {
376
+ __CurrentModuleID: never;
377
+ };
352
378
  export type DirectoryAsModuleOpts = {
353
379
  /**
354
380
  * An optional subpath of the directory which contains the module's source code.
@@ -497,6 +523,12 @@ export type FunctionID = string & {
497
523
  export type GeneratedCodeID = string & {
498
524
  __GeneratedCodeID: never;
499
525
  };
526
+ /**
527
+ * The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.
528
+ */
529
+ export type GitModuleSourceID = string & {
530
+ __GitModuleSourceID: never;
531
+ };
500
532
  export type GitRefTreeOpts = {
501
533
  /**
502
534
  * DEPRECATED: This option should be passed to `git` instead.
@@ -583,6 +615,12 @@ export declare enum ImageMediaTypes {
583
615
  Dockermediatypes = "DockerMediaTypes",
584
616
  Ocimediatypes = "OCIMediaTypes"
585
617
  }
618
+ /**
619
+ * The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef.
620
+ */
621
+ export type InputTypeDefID = string & {
622
+ __InputTypeDefID: never;
623
+ };
586
624
  /**
587
625
  * The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
588
626
  */
@@ -607,21 +645,17 @@ export type LabelID = string & {
607
645
  export type ListTypeDefID = string & {
608
646
  __ListTypeDefID: never;
609
647
  };
610
- export type ModuleWithSourceOpts = {
611
- /**
612
- * An optional subpath of the directory which contains the module's source code.
613
- *
614
- * 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.
615
- *
616
- * If not set, the module source code is loaded from the root of the directory.
617
- */
618
- subpath?: string;
648
+ /**
649
+ * The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.
650
+ */
651
+ export type LocalModuleSourceID = string & {
652
+ __LocalModuleSourceID: never;
619
653
  };
620
654
  /**
621
- * The `ModuleConfigID` scalar type represents an identifier for an object of type ModuleConfig.
655
+ * The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.
622
656
  */
623
- export type ModuleConfigID = string & {
624
- __ModuleConfigID: never;
657
+ export type ModuleDependencyID = string & {
658
+ __ModuleDependencyID: never;
625
659
  };
626
660
  /**
627
661
  * The `ModuleID` scalar type represents an identifier for an object of type Module.
@@ -629,6 +663,19 @@ export type ModuleConfigID = string & {
629
663
  export type ModuleID = string & {
630
664
  __ModuleID: never;
631
665
  };
666
+ /**
667
+ * The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.
668
+ */
669
+ export type ModuleSourceID = string & {
670
+ __ModuleSourceID: never;
671
+ };
672
+ /**
673
+ * The kind of module source.
674
+ */
675
+ export declare enum ModuleSourceKind {
676
+ GitSource = "GIT_SOURCE",
677
+ LocalSource = "LOCAL_SOURCE"
678
+ }
632
679
  /**
633
680
  * Transport layer network protocol associated to a port.
634
681
  */
@@ -720,8 +767,21 @@ export type ClientHttpOpts = {
720
767
  */
721
768
  experimentalServiceHost?: Service;
722
769
  };
723
- export type ClientModuleConfigOpts = {
724
- subpath?: string;
770
+ export type ClientModuleDependencyOpts = {
771
+ /**
772
+ * If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default.
773
+ */
774
+ name?: string;
775
+ };
776
+ export type ClientModuleSourceOpts = {
777
+ /**
778
+ * An explicitly set root directory for the module source. This is required to load local sources as modules; other source types implicitly encode the root directory and do not require this.
779
+ */
780
+ rootDirectory?: Directory;
781
+ /**
782
+ * If true, enforce that the source is a stable version for source kinds that support versioning.
783
+ */
784
+ stable?: boolean;
725
785
  };
726
786
  export type ClientPipelineOpts = {
727
787
  /**
@@ -749,6 +809,16 @@ export type ServiceEndpointOpts = {
749
809
  */
750
810
  scheme?: string;
751
811
  };
812
+ export type ServiceStopOpts = {
813
+ /**
814
+ * Immediately kill the service without waiting for a graceful exit
815
+ */
816
+ kill?: boolean;
817
+ };
818
+ export type ServiceUpOpts = {
819
+ ports?: PortForward[];
820
+ native?: boolean;
821
+ };
752
822
  /**
753
823
  * The `ServiceID` scalar type represents an identifier for an object of type Service.
754
824
  */
@@ -761,6 +831,12 @@ export type ServiceID = string & {
761
831
  export type SocketID = string & {
762
832
  __SocketID: never;
763
833
  };
834
+ /**
835
+ * The `TerminalID` scalar type represents an identifier for an object of type Terminal.
836
+ */
837
+ export type TerminalID = string & {
838
+ __TerminalID: never;
839
+ };
764
840
  export type TypeDefWithFieldOpts = {
765
841
  /**
766
842
  * A doc string for the field, if any
@@ -787,6 +863,10 @@ export declare enum TypeDefKind {
787
863
  * A boolean value.
788
864
  */
789
865
  BooleanKind = "BOOLEAN_KIND",
866
+ /**
867
+ * A graphql input type, used only when representing the core API via TypeDefs.
868
+ */
869
+ InputKind = "INPUT_KIND",
790
870
  /**
791
871
  * An integer value.
792
872
  */
@@ -862,7 +942,6 @@ export declare class Container extends BaseClient {
862
942
  private readonly _label?;
863
943
  private readonly _platform?;
864
944
  private readonly _publish?;
865
- private readonly _shellEndpoint?;
866
945
  private readonly _stderr?;
867
946
  private readonly _stdout?;
868
947
  private readonly _sync?;
@@ -874,7 +953,7 @@ export declare class Container extends BaseClient {
874
953
  constructor(parent?: {
875
954
  queryTree?: QueryTree[];
876
955
  ctx: Context;
877
- }, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _shellEndpoint?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _user?: string, _workdir?: string);
956
+ }, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _user?: string, _workdir?: string);
878
957
  /**
879
958
  * A unique identifier for this Container.
880
959
  */
@@ -1051,11 +1130,10 @@ export declare class Container extends BaseClient {
1051
1130
  */
1052
1131
  rootfs: () => Directory;
1053
1132
  /**
1054
- * Return a websocket endpoint that, if connected to, will start the container with a TTY streamed over the websocket.
1055
- *
1056
- * Primarily intended for internal use with the dagger CLI.
1133
+ * Return an interactive terminal for this container using its configured shell if not overridden by args (or sh as a fallback default).
1134
+ * @param opts.args If set, override the container's default shell and invoke these arguments instead.
1057
1135
  */
1058
- shellEndpoint: () => Promise<string>;
1136
+ shell: (opts?: ContainerShellOpts) => Terminal;
1059
1137
  /**
1060
1138
  * The error stream of the last executed command.
1061
1139
  *
@@ -1083,6 +1161,11 @@ export declare class Container extends BaseClient {
1083
1161
  * @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
1084
1162
  */
1085
1163
  withDefaultArgs: (args: string[]) => Container;
1164
+ /**
1165
+ * Set the default command to invoke for the "shell" API.
1166
+ * @param args The args of the command to set the default shell to.
1167
+ */
1168
+ withDefaultShell: (args: string[]) => Container;
1086
1169
  /**
1087
1170
  * Retrieves this container plus a directory written at the given path.
1088
1171
  * @param path Location of the written directory (e.g., "/tmp/directory").
@@ -1135,6 +1218,7 @@ export declare class Container extends BaseClient {
1135
1218
  * @param port Port number to expose
1136
1219
  * @param opts.protocol Transport layer network protocol
1137
1220
  * @param opts.description Optional port description
1221
+ * @param opts.experimentalSkipHealthcheck Skip the health check when run as a service.
1138
1222
  */
1139
1223
  withExposedPort: (port: number, opts?: ContainerWithExposedPortOpts) => Container;
1140
1224
  /**
@@ -1351,6 +1435,44 @@ export declare class Container extends BaseClient {
1351
1435
  */
1352
1436
  with: (arg: (param: Container) => Container) => Container;
1353
1437
  }
1438
+ /**
1439
+ * Reflective module API provided to functions at runtime.
1440
+ */
1441
+ export declare class CurrentModule extends BaseClient {
1442
+ private readonly _id?;
1443
+ private readonly _name?;
1444
+ /**
1445
+ * Constructor is used for internal usage only, do not create object from it.
1446
+ */
1447
+ constructor(parent?: {
1448
+ queryTree?: QueryTree[];
1449
+ ctx: Context;
1450
+ }, _id?: CurrentModuleID, _name?: string);
1451
+ /**
1452
+ * A unique identifier for this CurrentModule.
1453
+ */
1454
+ id: () => Promise<CurrentModuleID>;
1455
+ /**
1456
+ * The name of the module being executed in
1457
+ */
1458
+ name: () => Promise<string>;
1459
+ /**
1460
+ * The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
1461
+ */
1462
+ source: () => Directory;
1463
+ /**
1464
+ * Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
1465
+ * @param path Location of the directory to access (e.g., ".").
1466
+ * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
1467
+ * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
1468
+ */
1469
+ workdir: (path: string, opts?: CurrentModuleWorkdirOpts) => Directory;
1470
+ /**
1471
+ * Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.
1472
+ * @param path Location of the file to retrieve (e.g., "README.md").
1473
+ */
1474
+ workdirFile: (path: string) => File;
1475
+ }
1354
1476
  /**
1355
1477
  * A directory.
1356
1478
  */
@@ -1739,6 +1861,39 @@ export declare class GeneratedCode extends BaseClient {
1739
1861
  */
1740
1862
  with: (arg: (param: GeneratedCode) => GeneratedCode) => GeneratedCode;
1741
1863
  }
1864
+ /**
1865
+ * Module source originating from a git repo.
1866
+ */
1867
+ export declare class GitModuleSource extends BaseClient {
1868
+ private readonly _id?;
1869
+ private readonly _cloneURL?;
1870
+ private readonly _commit?;
1871
+ private readonly _htmlURL?;
1872
+ private readonly _sourceSubpath?;
1873
+ private readonly _version?;
1874
+ /**
1875
+ * Constructor is used for internal usage only, do not create object from it.
1876
+ */
1877
+ constructor(parent?: {
1878
+ queryTree?: QueryTree[];
1879
+ ctx: Context;
1880
+ }, _id?: GitModuleSourceID, _cloneURL?: string, _commit?: string, _htmlURL?: string, _sourceSubpath?: string, _version?: string);
1881
+ /**
1882
+ * A unique identifier for this GitModuleSource.
1883
+ */
1884
+ id: () => Promise<GitModuleSourceID>;
1885
+ /**
1886
+ * The URL from which the source's git repo can be cloned.
1887
+ */
1888
+ cloneURL: () => Promise<string>;
1889
+ commit: () => Promise<string>;
1890
+ /**
1891
+ * The URL to the source's git repo in a web browser
1892
+ */
1893
+ htmlURL: () => Promise<string>;
1894
+ sourceSubpath: () => Promise<string>;
1895
+ version: () => Promise<string>;
1896
+ }
1742
1897
  /**
1743
1898
  * A git ref (tag, branch, or commit).
1744
1899
  */
@@ -1866,6 +2021,29 @@ export declare class Host extends BaseClient {
1866
2021
  */
1867
2022
  unixSocket: (path: string) => Socket;
1868
2023
  }
2024
+ /**
2025
+ * A graphql input type, which is essentially just a group of named args.
2026
+ * This is currently only used to represent pre-existing usage of graphql input types
2027
+ * in the core API. It is not used by user modules and shouldn't ever be as user
2028
+ * module accept input objects via their id rather than graphql input types.
2029
+ */
2030
+ export declare class InputTypeDef extends BaseClient {
2031
+ private readonly _id?;
2032
+ private readonly _name?;
2033
+ /**
2034
+ * Constructor is used for internal usage only, do not create object from it.
2035
+ */
2036
+ constructor(parent?: {
2037
+ queryTree?: QueryTree[];
2038
+ ctx: Context;
2039
+ }, _id?: InputTypeDefID, _name?: string);
2040
+ /**
2041
+ * A unique identifier for this InputTypeDef.
2042
+ */
2043
+ id: () => Promise<InputTypeDefID>;
2044
+ fields: () => Promise<FieldTypeDef[]>;
2045
+ name: () => Promise<string>;
2046
+ }
1869
2047
  /**
1870
2048
  * A definition of a custom interface defined in a Module.
1871
2049
  */
@@ -1929,6 +2107,25 @@ export declare class ListTypeDef extends BaseClient {
1929
2107
  id: () => Promise<ListTypeDefID>;
1930
2108
  elementTypeDef: () => TypeDef;
1931
2109
  }
2110
+ /**
2111
+ * Module source that that originates from a path locally relative to an arbitrary directory.
2112
+ */
2113
+ export declare class LocalModuleSource extends BaseClient {
2114
+ private readonly _id?;
2115
+ private readonly _sourceSubpath?;
2116
+ /**
2117
+ * Constructor is used for internal usage only, do not create object from it.
2118
+ */
2119
+ constructor(parent?: {
2120
+ queryTree?: QueryTree[];
2121
+ ctx: Context;
2122
+ }, _id?: LocalModuleSourceID, _sourceSubpath?: string);
2123
+ /**
2124
+ * A unique identifier for this LocalModuleSource.
2125
+ */
2126
+ id: () => Promise<LocalModuleSourceID>;
2127
+ sourceSubpath: () => Promise<string>;
2128
+ }
1932
2129
  /**
1933
2130
  * A Dagger module.
1934
2131
  */
@@ -1938,22 +2135,24 @@ export declare class Module_ extends BaseClient {
1938
2135
  private readonly _name?;
1939
2136
  private readonly _sdk?;
1940
2137
  private readonly _serve?;
1941
- private readonly _sourceDirectorySubpath?;
1942
2138
  /**
1943
2139
  * Constructor is used for internal usage only, do not create object from it.
1944
2140
  */
1945
2141
  constructor(parent?: {
1946
2142
  queryTree?: QueryTree[];
1947
2143
  ctx: Context;
1948
- }, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void, _sourceDirectorySubpath?: string);
2144
+ }, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void);
1949
2145
  /**
1950
2146
  * A unique identifier for this Module.
1951
2147
  */
1952
2148
  id: () => Promise<ModuleID>;
1953
2149
  dependencies: () => Promise<Module_[]>;
1954
- dependencyConfig: () => Promise<string[]>;
2150
+ dependencyConfig: () => Promise<ModuleDependency[]>;
1955
2151
  description: () => Promise<string>;
1956
- generatedCode: () => GeneratedCode;
2152
+ /**
2153
+ * The module's root directory containing the config file for it and its source (possibly as a subdir). It includes any generated code or updated config files created after initial load, but not any files/directories that were unchanged after sdk codegen was run.
2154
+ */
2155
+ generatedSourceRootDirectory: () => Directory;
1957
2156
  /**
1958
2157
  * Retrieves the module with the objects loaded via its SDK.
1959
2158
  */
@@ -1961,6 +2160,7 @@ export declare class Module_ extends BaseClient {
1961
2160
  interfaces: () => Promise<TypeDef[]>;
1962
2161
  name: () => Promise<string>;
1963
2162
  objects: () => Promise<TypeDef[]>;
2163
+ runtime: () => Container;
1964
2164
  sdk: () => Promise<string>;
1965
2165
  /**
1966
2166
  * Serve a module's API in the current session.
@@ -1968,26 +2168,40 @@ export declare class Module_ extends BaseClient {
1968
2168
  * Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
1969
2169
  */
1970
2170
  serve: () => Promise<Void>;
1971
- sourceDirectory: () => Directory;
1972
- sourceDirectorySubpath: () => Promise<string>;
2171
+ source: () => ModuleSource;
2172
+ /**
2173
+ * Update the module configuration to use the given dependencies.
2174
+ * @param dependencies The dependency modules to install.
2175
+ */
2176
+ withDependencies: (dependencies: ModuleDependency[]) => Module_;
2177
+ /**
2178
+ * Retrieves the module with the given description
2179
+ * @param description The description to set
2180
+ */
2181
+ withDescription: (description: string) => Module_;
1973
2182
  /**
1974
2183
  * This module plus the given Interface type and associated functions
1975
2184
  */
1976
2185
  withInterface: (iface: TypeDef) => Module_;
2186
+ /**
2187
+ * Update the module configuration to use the given name.
2188
+ * @param name The name to use.
2189
+ */
2190
+ withName: (name: string) => Module_;
1977
2191
  /**
1978
2192
  * This module plus the given Object type and associated functions.
1979
2193
  */
1980
2194
  withObject: (object: TypeDef) => Module_;
1981
2195
  /**
1982
- * Retrieves the module with basic configuration loaded, ready for initialization.
1983
- * @param directory The directory containing the module's source code.
1984
- * @param opts.subpath An optional subpath of the directory which contains the module's source code.
1985
- *
1986
- * 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.
1987
- *
1988
- * If not set, the module source code is loaded from the root of the directory.
2196
+ * Update the module configuration to use the given SDK.
2197
+ * @param sdk The SDK to use.
1989
2198
  */
1990
- withSource: (directory: Directory, opts?: ModuleWithSourceOpts) => Module_;
2199
+ withSDK: (sdk: string) => Module_;
2200
+ /**
2201
+ * Retrieves the module with basic configuration loaded if present.
2202
+ * @param source The module source to initialize from.
2203
+ */
2204
+ withSource: (source: ModuleSource) => Module_;
1991
2205
  /**
1992
2206
  * Call the provided function with current Module.
1993
2207
  *
@@ -1996,30 +2210,81 @@ export declare class Module_ extends BaseClient {
1996
2210
  with: (arg: (param: Module_) => Module_) => Module_;
1997
2211
  }
1998
2212
  /**
1999
- * Static configuration for a module (e.g. parsed contents of dagger.json)
2213
+ * The configuration of dependency of a module.
2000
2214
  */
2001
- export declare class ModuleConfig extends BaseClient {
2215
+ export declare class ModuleDependency extends BaseClient {
2002
2216
  private readonly _id?;
2003
2217
  private readonly _name?;
2004
- private readonly _root?;
2005
- private readonly _sdk?;
2006
2218
  /**
2007
2219
  * Constructor is used for internal usage only, do not create object from it.
2008
2220
  */
2009
2221
  constructor(parent?: {
2010
2222
  queryTree?: QueryTree[];
2011
2223
  ctx: Context;
2012
- }, _id?: ModuleConfigID, _name?: string, _root?: string, _sdk?: string);
2224
+ }, _id?: ModuleDependencyID, _name?: string);
2013
2225
  /**
2014
- * A unique identifier for this ModuleConfig.
2226
+ * A unique identifier for this ModuleDependency.
2015
2227
  */
2016
- id: () => Promise<ModuleConfigID>;
2017
- dependencies: () => Promise<string[]>;
2018
- exclude: () => Promise<string[]>;
2019
- include: () => Promise<string[]>;
2228
+ id: () => Promise<ModuleDependencyID>;
2020
2229
  name: () => Promise<string>;
2021
- root: () => Promise<string>;
2022
- sdk: () => Promise<string>;
2230
+ source: () => ModuleSource;
2231
+ }
2232
+ /**
2233
+ * The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
2234
+ */
2235
+ export declare class ModuleSource extends BaseClient {
2236
+ private readonly _id?;
2237
+ private readonly _asString?;
2238
+ private readonly _kind?;
2239
+ private readonly _moduleName?;
2240
+ private readonly _subpath?;
2241
+ /**
2242
+ * Constructor is used for internal usage only, do not create object from it.
2243
+ */
2244
+ constructor(parent?: {
2245
+ queryTree?: QueryTree[];
2246
+ ctx: Context;
2247
+ }, _id?: ModuleSourceID, _asString?: string, _kind?: ModuleSourceKind, _moduleName?: string, _subpath?: string);
2248
+ /**
2249
+ * A unique identifier for this ModuleSource.
2250
+ */
2251
+ id: () => Promise<ModuleSourceID>;
2252
+ asGitSource: () => GitModuleSource;
2253
+ asLocalSource: () => LocalModuleSource;
2254
+ /**
2255
+ * Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
2256
+ */
2257
+ asModule: () => Module_;
2258
+ /**
2259
+ * A human readable ref string representation of this module source.
2260
+ */
2261
+ asString: () => Promise<string>;
2262
+ /**
2263
+ * The directory containing the actual module's source code, as determined from the root directory and subpath.
2264
+ * @param path The path from the source directory to select.
2265
+ */
2266
+ directory: (path: string) => Directory;
2267
+ kind: () => Promise<ModuleSourceKind>;
2268
+ /**
2269
+ * If set, the name of the module this source references
2270
+ */
2271
+ moduleName: () => Promise<string>;
2272
+ /**
2273
+ * Resolve the provided module source arg as a dependency relative to this module source.
2274
+ * @param dep The dependency module source to resolve.
2275
+ */
2276
+ resolveDependency: (dep: ModuleSource) => ModuleSource;
2277
+ rootDirectory: () => Directory;
2278
+ /**
2279
+ * The path to the module subdirectory containing the actual module's source code.
2280
+ */
2281
+ subpath: () => Promise<string>;
2282
+ /**
2283
+ * Call the provided function with current ModuleSource.
2284
+ *
2285
+ * This is useful for reusability and readability by not breaking the calling chain.
2286
+ */
2287
+ with: (arg: (param: ModuleSource) => ModuleSource) => ModuleSource;
2023
2288
  }
2024
2289
  /**
2025
2290
  * A definition of a custom object defined in a Module.
@@ -2053,6 +2318,7 @@ export declare class ObjectTypeDef extends BaseClient {
2053
2318
  export declare class Port extends BaseClient {
2054
2319
  private readonly _id?;
2055
2320
  private readonly _description?;
2321
+ private readonly _experimentalSkipHealthcheck?;
2056
2322
  private readonly _port?;
2057
2323
  private readonly _protocol?;
2058
2324
  /**
@@ -2061,12 +2327,13 @@ export declare class Port extends BaseClient {
2061
2327
  constructor(parent?: {
2062
2328
  queryTree?: QueryTree[];
2063
2329
  ctx: Context;
2064
- }, _id?: PortID, _description?: string, _port?: number, _protocol?: NetworkProtocol);
2330
+ }, _id?: PortID, _description?: string, _experimentalSkipHealthcheck?: boolean, _port?: number, _protocol?: NetworkProtocol);
2065
2331
  /**
2066
2332
  * A unique identifier for this Port.
2067
2333
  */
2068
2334
  id: () => Promise<PortID>;
2069
2335
  description: () => Promise<string>;
2336
+ experimentalSkipHealthcheck: () => Promise<boolean>;
2070
2337
  port: () => Promise<number>;
2071
2338
  protocol: () => Promise<NetworkProtocol>;
2072
2339
  }
@@ -2118,7 +2385,7 @@ export declare class Client extends BaseClient {
2118
2385
  /**
2119
2386
  * The module currently being served in the session, if any.
2120
2387
  */
2121
- currentModule: () => Module_;
2388
+ currentModule: () => CurrentModule;
2122
2389
  /**
2123
2390
  * The TypeDef representations of the objects currently being served in the session.
2124
2391
  */
@@ -2177,6 +2444,10 @@ export declare class Client extends BaseClient {
2177
2444
  * Load a Container from its ID.
2178
2445
  */
2179
2446
  loadContainerFromID: (id: ContainerID) => Container;
2447
+ /**
2448
+ * Load a CurrentModule from its ID.
2449
+ */
2450
+ loadCurrentModuleFromID: (id: CurrentModuleID) => CurrentModule;
2180
2451
  /**
2181
2452
  * Load a Directory from its ID.
2182
2453
  */
@@ -2213,6 +2484,10 @@ export declare class Client extends BaseClient {
2213
2484
  * Load a GeneratedCode from its ID.
2214
2485
  */
2215
2486
  loadGeneratedCodeFromID: (id: GeneratedCodeID) => GeneratedCode;
2487
+ /**
2488
+ * Load a GitModuleSource from its ID.
2489
+ */
2490
+ loadGitModuleSourceFromID: (id: GitModuleSourceID) => GitModuleSource;
2216
2491
  /**
2217
2492
  * Load a GitRef from its ID.
2218
2493
  */
@@ -2225,6 +2500,10 @@ export declare class Client extends BaseClient {
2225
2500
  * Load a Host from its ID.
2226
2501
  */
2227
2502
  loadHostFromID: (id: HostID) => Host;
2503
+ /**
2504
+ * Load a InputTypeDef from its ID.
2505
+ */
2506
+ loadInputTypeDefFromID: (id: InputTypeDefID) => InputTypeDef;
2228
2507
  /**
2229
2508
  * Load a InterfaceTypeDef from its ID.
2230
2509
  */
@@ -2238,13 +2517,21 @@ export declare class Client extends BaseClient {
2238
2517
  */
2239
2518
  loadListTypeDefFromID: (id: ListTypeDefID) => ListTypeDef;
2240
2519
  /**
2241
- * Load a ModuleConfig from its ID.
2520
+ * Load a LocalModuleSource from its ID.
2521
+ */
2522
+ loadLocalModuleSourceFromID: (id: LocalModuleSourceID) => LocalModuleSource;
2523
+ /**
2524
+ * Load a ModuleDependency from its ID.
2242
2525
  */
2243
- loadModuleConfigFromID: (id: ModuleConfigID) => ModuleConfig;
2526
+ loadModuleDependencyFromID: (id: ModuleDependencyID) => ModuleDependency;
2244
2527
  /**
2245
2528
  * Load a Module from its ID.
2246
2529
  */
2247
2530
  loadModuleFromID: (id: ModuleID) => Module_;
2531
+ /**
2532
+ * Load a ModuleSource from its ID.
2533
+ */
2534
+ loadModuleSourceFromID: (id: ModuleSourceID) => ModuleSource;
2248
2535
  /**
2249
2536
  * Load a ObjectTypeDef from its ID.
2250
2537
  */
@@ -2265,6 +2552,10 @@ export declare class Client extends BaseClient {
2265
2552
  * Load a Socket from its ID.
2266
2553
  */
2267
2554
  loadSocketFromID: (id: SocketID) => Socket;
2555
+ /**
2556
+ * Load a Terminal from its ID.
2557
+ */
2558
+ loadTerminalFromID: (id: TerminalID) => Terminal;
2268
2559
  /**
2269
2560
  * Load a TypeDef from its ID.
2270
2561
  */
@@ -2274,9 +2565,18 @@ export declare class Client extends BaseClient {
2274
2565
  */
2275
2566
  module_: () => Module_;
2276
2567
  /**
2277
- * Load the static configuration for a module from the given source directory and optional subpath.
2568
+ * Create a new module dependency configuration from a module source and name
2569
+ * @param source The source of the dependency
2570
+ * @param opts.name If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default.
2278
2571
  */
2279
- moduleConfig: (sourceDirectory: Directory, opts?: ClientModuleConfigOpts) => ModuleConfig;
2572
+ moduleDependency: (source: ModuleSource, opts?: ClientModuleDependencyOpts) => ModuleDependency;
2573
+ /**
2574
+ * Create a new module source instance from a source ref string.
2575
+ * @param refString The string ref representation of the module source
2576
+ * @param opts.rootDirectory An explicitly set root directory for the module source. This is required to load local sources as modules; other source types implicitly encode the root directory and do not require this.
2577
+ * @param opts.stable If true, enforce that the source is a stable version for source kinds that support versioning.
2578
+ */
2579
+ moduleSource: (refString: string, opts?: ClientModuleSourceOpts) => ModuleSource;
2280
2580
  /**
2281
2581
  * Creates a named sub-pipeline.
2282
2582
  * @param name Name of the sub-pipeline.
@@ -2343,13 +2643,14 @@ export declare class Service extends BaseClient {
2343
2643
  private readonly _hostname?;
2344
2644
  private readonly _start?;
2345
2645
  private readonly _stop?;
2646
+ private readonly _up?;
2346
2647
  /**
2347
2648
  * Constructor is used for internal usage only, do not create object from it.
2348
2649
  */
2349
2650
  constructor(parent?: {
2350
2651
  queryTree?: QueryTree[];
2351
2652
  ctx: Context;
2352
- }, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID);
2653
+ }, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID, _up?: Void);
2353
2654
  /**
2354
2655
  * A unique identifier for this Service.
2355
2656
  */
@@ -2380,8 +2681,13 @@ export declare class Service extends BaseClient {
2380
2681
  start: () => Promise<Service>;
2381
2682
  /**
2382
2683
  * Stop the service.
2684
+ * @param opts.kill Immediately kill the service without waiting for a graceful exit
2685
+ */
2686
+ stop: (opts?: ServiceStopOpts) => Promise<Service>;
2687
+ /**
2688
+ * Creates a tunnel that forwards traffic from the caller's network to this service.
2383
2689
  */
2384
- stop: () => Promise<Service>;
2690
+ up: (opts?: ServiceUpOpts) => Promise<Void>;
2385
2691
  }
2386
2692
  /**
2387
2693
  * A Unix or TCP/IP socket that can be mounted into a container.
@@ -2400,6 +2706,28 @@ export declare class Socket extends BaseClient {
2400
2706
  */
2401
2707
  id: () => Promise<SocketID>;
2402
2708
  }
2709
+ /**
2710
+ * An interactive terminal that clients can connect to.
2711
+ */
2712
+ export declare class Terminal extends BaseClient {
2713
+ private readonly _id?;
2714
+ private readonly _websocketEndpoint?;
2715
+ /**
2716
+ * Constructor is used for internal usage only, do not create object from it.
2717
+ */
2718
+ constructor(parent?: {
2719
+ queryTree?: QueryTree[];
2720
+ ctx: Context;
2721
+ }, _id?: TerminalID, _websocketEndpoint?: string);
2722
+ /**
2723
+ * A unique identifier for this Terminal.
2724
+ */
2725
+ id: () => Promise<TerminalID>;
2726
+ /**
2727
+ * An http endpoint at which this terminal can be connected to over a websocket.
2728
+ */
2729
+ websocketEndpoint: () => Promise<string>;
2730
+ }
2403
2731
  /**
2404
2732
  * A definition of a parameter or return type in a Module.
2405
2733
  */
@@ -2418,6 +2746,7 @@ export declare class TypeDef extends BaseClient {
2418
2746
  * A unique identifier for this TypeDef.
2419
2747
  */
2420
2748
  id: () => Promise<TypeDefID>;
2749
+ asInput: () => InputTypeDef;
2421
2750
  asInterface: () => InterfaceTypeDef;
2422
2751
  asList: () => ListTypeDef;
2423
2752
  asObject: () => ObjectTypeDef;