@dagger.io/dagger 0.18.16 → 0.18.18
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 +676 -6
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +895 -7
- package/dist/src/common/utils.d.ts +1 -0
- package/dist/src/common/utils.d.ts.map +1 -1
- package/dist/src/module/decorators.d.ts.map +1 -1
- package/dist/src/module/entrypoint/register.d.ts.map +1 -1
- package/dist/src/module/entrypoint/register.js +2 -2
- package/dist/src/module/introspector/dagger_module/module.d.ts +4 -0
- package/dist/src/module/introspector/dagger_module/module.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/module.js +35 -13
- package/dist/src/module/introspector/typescript_module/ast.d.ts +1 -0
- package/dist/src/module/introspector/typescript_module/ast.d.ts.map +1 -1
- package/dist/src/module/introspector/typescript_module/ast.js +33 -0
- package/dist/src/module/registry.d.ts +2 -2
- package/dist/src/provisioning/default.d.ts +1 -1
- package/dist/src/provisioning/default.js +1 -1
- package/package.json +21 -20
|
@@ -53,6 +53,12 @@ export declare enum CacheSharingMode {
|
|
|
53
53
|
export type CacheVolumeID = string & {
|
|
54
54
|
__CacheVolumeID: never;
|
|
55
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* The `ChangesetID` scalar type represents an identifier for an object of type Changeset.
|
|
58
|
+
*/
|
|
59
|
+
export type ChangesetID = string & {
|
|
60
|
+
__ChangesetID: never;
|
|
61
|
+
};
|
|
56
62
|
/**
|
|
57
63
|
* The `CloudID` scalar type represents an identifier for an object of type Cloud.
|
|
58
64
|
*/
|
|
@@ -691,6 +697,52 @@ export type DirectoryFilterOpts = {
|
|
|
691
697
|
*/
|
|
692
698
|
include?: string[];
|
|
693
699
|
};
|
|
700
|
+
export type DirectorySearchOpts = {
|
|
701
|
+
/**
|
|
702
|
+
* Directory or file paths to search
|
|
703
|
+
*/
|
|
704
|
+
paths?: string[];
|
|
705
|
+
/**
|
|
706
|
+
* Glob patterns to match (e.g., "*.md")
|
|
707
|
+
*/
|
|
708
|
+
globs?: string[];
|
|
709
|
+
/**
|
|
710
|
+
* The text to match.
|
|
711
|
+
*/
|
|
712
|
+
pattern: string;
|
|
713
|
+
/**
|
|
714
|
+
* Interpret the pattern as a literal string instead of a regular expression.
|
|
715
|
+
*/
|
|
716
|
+
literal?: boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Enable searching across multiple lines.
|
|
719
|
+
*/
|
|
720
|
+
multiline?: boolean;
|
|
721
|
+
/**
|
|
722
|
+
* Allow the . pattern to match newlines in multiline mode.
|
|
723
|
+
*/
|
|
724
|
+
dotall?: boolean;
|
|
725
|
+
/**
|
|
726
|
+
* Enable case-insensitive matching.
|
|
727
|
+
*/
|
|
728
|
+
insensitive?: boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Honor .gitignore, .ignore, and .rgignore files.
|
|
731
|
+
*/
|
|
732
|
+
skipIgnored?: boolean;
|
|
733
|
+
/**
|
|
734
|
+
* Skip hidden files (files starting with .).
|
|
735
|
+
*/
|
|
736
|
+
skipHidden?: boolean;
|
|
737
|
+
/**
|
|
738
|
+
* Only return matching files, not lines and content
|
|
739
|
+
*/
|
|
740
|
+
filesOnly?: boolean;
|
|
741
|
+
/**
|
|
742
|
+
* Limit the number of results to return
|
|
743
|
+
*/
|
|
744
|
+
limit?: number;
|
|
745
|
+
};
|
|
694
746
|
export type DirectoryTerminalOpts = {
|
|
695
747
|
/**
|
|
696
748
|
* If set, override the default container used for the terminal.
|
|
@@ -718,12 +770,28 @@ export type DirectoryWithDirectoryOpts = {
|
|
|
718
770
|
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
719
771
|
*/
|
|
720
772
|
include?: string[];
|
|
773
|
+
/**
|
|
774
|
+
* A user:group to set for the copied directory and its contents.
|
|
775
|
+
*
|
|
776
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
777
|
+
*
|
|
778
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
779
|
+
*/
|
|
780
|
+
owner?: string;
|
|
721
781
|
};
|
|
722
782
|
export type DirectoryWithFileOpts = {
|
|
723
783
|
/**
|
|
724
784
|
* Permission given to the copied file (e.g., 0600).
|
|
725
785
|
*/
|
|
726
786
|
permissions?: number;
|
|
787
|
+
/**
|
|
788
|
+
* A user:group to set for the copied directory and its contents.
|
|
789
|
+
*
|
|
790
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
791
|
+
*
|
|
792
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
793
|
+
*/
|
|
794
|
+
owner?: string;
|
|
727
795
|
};
|
|
728
796
|
export type DirectoryWithFilesOpts = {
|
|
729
797
|
/**
|
|
@@ -794,6 +862,12 @@ export type EnumTypeDefID = string & {
|
|
|
794
862
|
export type EnumValueTypeDefID = string & {
|
|
795
863
|
__EnumValueTypeDefID: never;
|
|
796
864
|
};
|
|
865
|
+
/**
|
|
866
|
+
* The `EnvFileID` scalar type represents an identifier for an object of type EnvFile.
|
|
867
|
+
*/
|
|
868
|
+
export type EnvFileID = string & {
|
|
869
|
+
__EnvFileID: never;
|
|
870
|
+
};
|
|
797
871
|
/**
|
|
798
872
|
* The `EnvID` scalar type represents an identifier for an object of type Env.
|
|
799
873
|
*/
|
|
@@ -841,6 +915,22 @@ export declare enum ExistsType {
|
|
|
841
915
|
export type FieldTypeDefID = string & {
|
|
842
916
|
__FieldTypeDefID: never;
|
|
843
917
|
};
|
|
918
|
+
export type FileAsEnvFileOpts = {
|
|
919
|
+
/**
|
|
920
|
+
* Replace "${VAR}" or "$VAR" with the value of other vars
|
|
921
|
+
*/
|
|
922
|
+
expand?: boolean;
|
|
923
|
+
};
|
|
924
|
+
export type FileContentsOpts = {
|
|
925
|
+
/**
|
|
926
|
+
* Start reading after this line
|
|
927
|
+
*/
|
|
928
|
+
offsetLines?: number;
|
|
929
|
+
/**
|
|
930
|
+
* Maximum number of lines to read
|
|
931
|
+
*/
|
|
932
|
+
limitLines?: number;
|
|
933
|
+
};
|
|
844
934
|
export type FileDigestOpts = {
|
|
845
935
|
/**
|
|
846
936
|
* If true, exclude metadata from the digest.
|
|
@@ -853,6 +943,52 @@ export type FileExportOpts = {
|
|
|
853
943
|
*/
|
|
854
944
|
allowParentDirPath?: boolean;
|
|
855
945
|
};
|
|
946
|
+
export type FileSearchOpts = {
|
|
947
|
+
/**
|
|
948
|
+
* Interpret the pattern as a literal string instead of a regular expression.
|
|
949
|
+
*/
|
|
950
|
+
literal?: boolean;
|
|
951
|
+
/**
|
|
952
|
+
* Enable searching across multiple lines.
|
|
953
|
+
*/
|
|
954
|
+
multiline?: boolean;
|
|
955
|
+
/**
|
|
956
|
+
* Allow the . pattern to match newlines in multiline mode.
|
|
957
|
+
*/
|
|
958
|
+
dotall?: boolean;
|
|
959
|
+
/**
|
|
960
|
+
* Enable case-insensitive matching.
|
|
961
|
+
*/
|
|
962
|
+
insensitive?: boolean;
|
|
963
|
+
/**
|
|
964
|
+
* Honor .gitignore, .ignore, and .rgignore files.
|
|
965
|
+
*/
|
|
966
|
+
skipIgnored?: boolean;
|
|
967
|
+
/**
|
|
968
|
+
* Skip hidden files (files starting with .).
|
|
969
|
+
*/
|
|
970
|
+
skipHidden?: boolean;
|
|
971
|
+
/**
|
|
972
|
+
* Only return matching files, not lines and content
|
|
973
|
+
*/
|
|
974
|
+
filesOnly?: boolean;
|
|
975
|
+
/**
|
|
976
|
+
* Limit the number of results to return
|
|
977
|
+
*/
|
|
978
|
+
limit?: number;
|
|
979
|
+
paths?: string[];
|
|
980
|
+
globs?: string[];
|
|
981
|
+
};
|
|
982
|
+
export type FileWithReplacedOpts = {
|
|
983
|
+
/**
|
|
984
|
+
* Replace all occurrences of the pattern.
|
|
985
|
+
*/
|
|
986
|
+
all?: boolean;
|
|
987
|
+
/**
|
|
988
|
+
* Replace the first match starting from the specified line.
|
|
989
|
+
*/
|
|
990
|
+
firstFrom?: number;
|
|
991
|
+
};
|
|
856
992
|
/**
|
|
857
993
|
* The `FileID` scalar type represents an identifier for an object of type File.
|
|
858
994
|
*/
|
|
@@ -958,6 +1094,10 @@ export type HostDirectoryOpts = {
|
|
|
958
1094
|
* If true, the directory will always be reloaded from the host.
|
|
959
1095
|
*/
|
|
960
1096
|
noCache?: boolean;
|
|
1097
|
+
/**
|
|
1098
|
+
* Apply .gitignore filter rules inside the directory
|
|
1099
|
+
*/
|
|
1100
|
+
gitignore?: boolean;
|
|
961
1101
|
};
|
|
962
1102
|
export type HostFileOpts = {
|
|
963
1103
|
/**
|
|
@@ -965,6 +1105,9 @@ export type HostFileOpts = {
|
|
|
965
1105
|
*/
|
|
966
1106
|
noCache?: boolean;
|
|
967
1107
|
};
|
|
1108
|
+
export type HostFindUpOpts = {
|
|
1109
|
+
noCache?: boolean;
|
|
1110
|
+
};
|
|
968
1111
|
export type HostServiceOpts = {
|
|
969
1112
|
/**
|
|
970
1113
|
* Upstream host to forward traffic to.
|
|
@@ -1032,6 +1175,22 @@ export type InterfaceTypeDefID = string & {
|
|
|
1032
1175
|
export type JSON = string & {
|
|
1033
1176
|
__JSON: never;
|
|
1034
1177
|
};
|
|
1178
|
+
export type JSONValueContentsOpts = {
|
|
1179
|
+
/**
|
|
1180
|
+
* Pretty-print
|
|
1181
|
+
*/
|
|
1182
|
+
pretty?: boolean;
|
|
1183
|
+
/**
|
|
1184
|
+
* Optional line prefix
|
|
1185
|
+
*/
|
|
1186
|
+
indent?: string;
|
|
1187
|
+
};
|
|
1188
|
+
/**
|
|
1189
|
+
* The `JSONValueID` scalar type represents an identifier for an object of type JSONValue.
|
|
1190
|
+
*/
|
|
1191
|
+
export type JSONValueID = string & {
|
|
1192
|
+
__JSONValueID: never;
|
|
1193
|
+
};
|
|
1035
1194
|
/**
|
|
1036
1195
|
* The `LLMID` scalar type represents an identifier for an object of type LLM.
|
|
1037
1196
|
*/
|
|
@@ -1158,6 +1317,12 @@ export type ClientEnvOpts = {
|
|
|
1158
1317
|
*/
|
|
1159
1318
|
writable?: boolean;
|
|
1160
1319
|
};
|
|
1320
|
+
export type ClientEnvFileOpts = {
|
|
1321
|
+
/**
|
|
1322
|
+
* Replace "${VAR}" or "$VAR" with the value of other vars
|
|
1323
|
+
*/
|
|
1324
|
+
expand?: boolean;
|
|
1325
|
+
};
|
|
1161
1326
|
export type ClientFileOpts = {
|
|
1162
1327
|
/**
|
|
1163
1328
|
* Permissions of the new file. Example: 0600
|
|
@@ -1279,6 +1444,18 @@ export type SDKConfigID = string & {
|
|
|
1279
1444
|
export type ScalarTypeDefID = string & {
|
|
1280
1445
|
__ScalarTypeDefID: never;
|
|
1281
1446
|
};
|
|
1447
|
+
/**
|
|
1448
|
+
* The `SearchResultID` scalar type represents an identifier for an object of type SearchResult.
|
|
1449
|
+
*/
|
|
1450
|
+
export type SearchResultID = string & {
|
|
1451
|
+
__SearchResultID: never;
|
|
1452
|
+
};
|
|
1453
|
+
/**
|
|
1454
|
+
* The `SearchSubmatchID` scalar type represents an identifier for an object of type SearchSubmatch.
|
|
1455
|
+
*/
|
|
1456
|
+
export type SearchSubmatchID = string & {
|
|
1457
|
+
__SearchSubmatchID: never;
|
|
1458
|
+
};
|
|
1282
1459
|
/**
|
|
1283
1460
|
* The `SecretID` scalar type represents an identifier for an object of type Secret.
|
|
1284
1461
|
*/
|
|
@@ -1301,6 +1478,9 @@ export type ServiceStopOpts = {
|
|
|
1301
1478
|
*/
|
|
1302
1479
|
kill?: boolean;
|
|
1303
1480
|
};
|
|
1481
|
+
export type ServiceTerminalOpts = {
|
|
1482
|
+
cmd?: string[];
|
|
1483
|
+
};
|
|
1304
1484
|
export type ServiceUpOpts = {
|
|
1305
1485
|
/**
|
|
1306
1486
|
* List of frontend/backend port mappings to forward.
|
|
@@ -1553,6 +1733,10 @@ export declare class Binding extends BaseClient {
|
|
|
1553
1733
|
* Retrieve the binding value, as type CacheVolume
|
|
1554
1734
|
*/
|
|
1555
1735
|
asCacheVolume: () => CacheVolume;
|
|
1736
|
+
/**
|
|
1737
|
+
* Retrieve the binding value, as type Changeset
|
|
1738
|
+
*/
|
|
1739
|
+
asChangeset: () => Changeset;
|
|
1556
1740
|
/**
|
|
1557
1741
|
* Retrieve the binding value, as type Cloud
|
|
1558
1742
|
*/
|
|
@@ -1569,6 +1753,10 @@ export declare class Binding extends BaseClient {
|
|
|
1569
1753
|
* Retrieve the binding value, as type Env
|
|
1570
1754
|
*/
|
|
1571
1755
|
asEnv: () => Env;
|
|
1756
|
+
/**
|
|
1757
|
+
* Retrieve the binding value, as type EnvFile
|
|
1758
|
+
*/
|
|
1759
|
+
asEnvFile: () => EnvFile;
|
|
1572
1760
|
/**
|
|
1573
1761
|
* Retrieve the binding value, as type File
|
|
1574
1762
|
*/
|
|
@@ -1581,6 +1769,10 @@ export declare class Binding extends BaseClient {
|
|
|
1581
1769
|
* Retrieve the binding value, as type GitRepository
|
|
1582
1770
|
*/
|
|
1583
1771
|
asGitRepository: () => GitRepository;
|
|
1772
|
+
/**
|
|
1773
|
+
* Retrieve the binding value, as type JSONValue
|
|
1774
|
+
*/
|
|
1775
|
+
asJSONValue: () => JSONValue;
|
|
1584
1776
|
/**
|
|
1585
1777
|
* Retrieve the binding value, as type LLM
|
|
1586
1778
|
*/
|
|
@@ -1597,6 +1789,14 @@ export declare class Binding extends BaseClient {
|
|
|
1597
1789
|
* Retrieve the binding value, as type ModuleSource
|
|
1598
1790
|
*/
|
|
1599
1791
|
asModuleSource: () => ModuleSource;
|
|
1792
|
+
/**
|
|
1793
|
+
* Retrieve the binding value, as type SearchResult
|
|
1794
|
+
*/
|
|
1795
|
+
asSearchResult: () => SearchResult;
|
|
1796
|
+
/**
|
|
1797
|
+
* Retrieve the binding value, as type SearchSubmatch
|
|
1798
|
+
*/
|
|
1799
|
+
asSearchSubmatch: () => SearchSubmatch;
|
|
1600
1800
|
/**
|
|
1601
1801
|
* Retrieve the binding value, as type Secret
|
|
1602
1802
|
*/
|
|
@@ -1644,6 +1844,53 @@ export declare class CacheVolume extends BaseClient {
|
|
|
1644
1844
|
*/
|
|
1645
1845
|
id: () => Promise<CacheVolumeID>;
|
|
1646
1846
|
}
|
|
1847
|
+
/**
|
|
1848
|
+
* A comparison between two directories representing changes that can be applied.
|
|
1849
|
+
*/
|
|
1850
|
+
export declare class Changeset extends BaseClient {
|
|
1851
|
+
private readonly _id?;
|
|
1852
|
+
private readonly _sync?;
|
|
1853
|
+
/**
|
|
1854
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1855
|
+
*/
|
|
1856
|
+
constructor(ctx?: Context, _id?: ChangesetID, _sync?: ChangesetID);
|
|
1857
|
+
/**
|
|
1858
|
+
* A unique identifier for this Changeset.
|
|
1859
|
+
*/
|
|
1860
|
+
id: () => Promise<ChangesetID>;
|
|
1861
|
+
/**
|
|
1862
|
+
* Files and directories that were added in the newer directory.
|
|
1863
|
+
*/
|
|
1864
|
+
addedPaths: () => Promise<string[]>;
|
|
1865
|
+
/**
|
|
1866
|
+
* The newer/upper snapshot.
|
|
1867
|
+
*/
|
|
1868
|
+
after: () => Directory;
|
|
1869
|
+
/**
|
|
1870
|
+
* Return a Git-compatible patch of the changes
|
|
1871
|
+
*/
|
|
1872
|
+
asPatch: () => File;
|
|
1873
|
+
/**
|
|
1874
|
+
* The older/lower snapshot to compare against.
|
|
1875
|
+
*/
|
|
1876
|
+
before: () => Directory;
|
|
1877
|
+
/**
|
|
1878
|
+
* Return a snapshot containing only the created and modified files
|
|
1879
|
+
*/
|
|
1880
|
+
layer: () => Directory;
|
|
1881
|
+
/**
|
|
1882
|
+
* Files and directories that existed before and were updated in the newer directory.
|
|
1883
|
+
*/
|
|
1884
|
+
modifiedPaths: () => Promise<string[]>;
|
|
1885
|
+
/**
|
|
1886
|
+
* Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
|
|
1887
|
+
*/
|
|
1888
|
+
removedPaths: () => Promise<string[]>;
|
|
1889
|
+
/**
|
|
1890
|
+
* Force evaluation in the engine.
|
|
1891
|
+
*/
|
|
1892
|
+
sync: () => Promise<Changeset>;
|
|
1893
|
+
}
|
|
1647
1894
|
/**
|
|
1648
1895
|
* Dagger Cloud configuration and state
|
|
1649
1896
|
*/
|
|
@@ -1668,6 +1915,7 @@ export declare class Cloud extends BaseClient {
|
|
|
1668
1915
|
*/
|
|
1669
1916
|
export declare class Container extends BaseClient {
|
|
1670
1917
|
private readonly _id?;
|
|
1918
|
+
private readonly _combinedOutput?;
|
|
1671
1919
|
private readonly _envVariable?;
|
|
1672
1920
|
private readonly _exists?;
|
|
1673
1921
|
private readonly _exitCode?;
|
|
@@ -1686,7 +1934,7 @@ export declare class Container extends BaseClient {
|
|
|
1686
1934
|
/**
|
|
1687
1935
|
* Constructor is used for internal usage only, do not create object from it.
|
|
1688
1936
|
*/
|
|
1689
|
-
constructor(ctx?: Context, _id?: ContainerID, _envVariable?: string, _exists?: boolean, _exitCode?: number, _export?: string, _exportImage?: Void, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _up?: Void, _user?: string, _workdir?: string);
|
|
1937
|
+
constructor(ctx?: Context, _id?: ContainerID, _combinedOutput?: string, _envVariable?: string, _exists?: boolean, _exitCode?: number, _export?: string, _exportImage?: Void, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _up?: Void, _user?: string, _workdir?: string);
|
|
1690
1938
|
/**
|
|
1691
1939
|
* A unique identifier for this Container.
|
|
1692
1940
|
*/
|
|
@@ -1737,6 +1985,12 @@ export declare class Container extends BaseClient {
|
|
|
1737
1985
|
* @deprecated Use `Directory.build` instead
|
|
1738
1986
|
*/
|
|
1739
1987
|
build: (context: Directory, opts?: ContainerBuildOpts) => Container;
|
|
1988
|
+
/**
|
|
1989
|
+
* The combined buffered standard output and standard error stream of the last executed command
|
|
1990
|
+
*
|
|
1991
|
+
* Returns an error if no command was executed
|
|
1992
|
+
*/
|
|
1993
|
+
combinedOutput: () => Promise<string>;
|
|
1740
1994
|
/**
|
|
1741
1995
|
* Return the container's default arguments.
|
|
1742
1996
|
*/
|
|
@@ -2329,12 +2583,13 @@ export declare class Directory extends BaseClient {
|
|
|
2329
2583
|
private readonly _digest?;
|
|
2330
2584
|
private readonly _exists?;
|
|
2331
2585
|
private readonly _export?;
|
|
2586
|
+
private readonly _findUp?;
|
|
2332
2587
|
private readonly _name?;
|
|
2333
2588
|
private readonly _sync?;
|
|
2334
2589
|
/**
|
|
2335
2590
|
* Constructor is used for internal usage only, do not create object from it.
|
|
2336
2591
|
*/
|
|
2337
|
-
constructor(ctx?: Context, _id?: DirectoryID, _digest?: string, _exists?: boolean, _export?: string, _name?: string, _sync?: DirectoryID);
|
|
2592
|
+
constructor(ctx?: Context, _id?: DirectoryID, _digest?: string, _exists?: boolean, _export?: string, _findUp?: string, _name?: string, _sync?: DirectoryID);
|
|
2338
2593
|
/**
|
|
2339
2594
|
* A unique identifier for this Directory.
|
|
2340
2595
|
*/
|
|
@@ -2357,6 +2612,23 @@ export declare class Directory extends BaseClient {
|
|
|
2357
2612
|
* If not set, the module source code is loaded from the root of the directory.
|
|
2358
2613
|
*/
|
|
2359
2614
|
asModuleSource: (opts?: DirectoryAsModuleSourceOpts) => ModuleSource;
|
|
2615
|
+
/**
|
|
2616
|
+
* Return the difference between this directory and another directory, typically an older snapshot.
|
|
2617
|
+
*
|
|
2618
|
+
* The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
|
|
2619
|
+
* @param from The base directory snapshot to compare against
|
|
2620
|
+
*/
|
|
2621
|
+
changes: (from: Directory) => Changeset;
|
|
2622
|
+
/**
|
|
2623
|
+
* Change the owner of the directory contents recursively.
|
|
2624
|
+
* @param path Path of the directory to change ownership of (e.g., "/").
|
|
2625
|
+
* @param owner A user:group to set for the mounted directory and its contents.
|
|
2626
|
+
*
|
|
2627
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
2628
|
+
*
|
|
2629
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
2630
|
+
*/
|
|
2631
|
+
chown: (path: string, owner: string) => Directory;
|
|
2360
2632
|
/**
|
|
2361
2633
|
* Return the difference between this directory and an another directory. The difference is encoded as a directory.
|
|
2362
2634
|
* @param other The directory to compare against
|
|
@@ -2414,6 +2686,12 @@ export declare class Directory extends BaseClient {
|
|
|
2414
2686
|
* @param opts.include If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
|
|
2415
2687
|
*/
|
|
2416
2688
|
filter: (opts?: DirectoryFilterOpts) => Directory;
|
|
2689
|
+
/**
|
|
2690
|
+
* Search up the directory tree for a file or directory, and return its path. If no match, return null
|
|
2691
|
+
* @param name The name of the file or directory to search for
|
|
2692
|
+
* @param start The path to start the search from
|
|
2693
|
+
*/
|
|
2694
|
+
findUp: (name: string, start: string) => Promise<string>;
|
|
2417
2695
|
/**
|
|
2418
2696
|
* Returns a list of files and directories that matche the given pattern.
|
|
2419
2697
|
* @param pattern Pattern to match (e.g., "*.md").
|
|
@@ -2423,6 +2701,23 @@ export declare class Directory extends BaseClient {
|
|
|
2423
2701
|
* Returns the name of the directory.
|
|
2424
2702
|
*/
|
|
2425
2703
|
name: () => Promise<string>;
|
|
2704
|
+
/**
|
|
2705
|
+
* Searches for content matching the given regular expression or literal string.
|
|
2706
|
+
*
|
|
2707
|
+
* Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
|
|
2708
|
+
* @param opts.paths Directory or file paths to search
|
|
2709
|
+
* @param opts.globs Glob patterns to match (e.g., "*.md")
|
|
2710
|
+
* @param opts.pattern The text to match.
|
|
2711
|
+
* @param opts.literal Interpret the pattern as a literal string instead of a regular expression.
|
|
2712
|
+
* @param opts.multiline Enable searching across multiple lines.
|
|
2713
|
+
* @param opts.dotall Allow the . pattern to match newlines in multiline mode.
|
|
2714
|
+
* @param opts.insensitive Enable case-insensitive matching.
|
|
2715
|
+
* @param opts.skipIgnored Honor .gitignore, .ignore, and .rgignore files.
|
|
2716
|
+
* @param opts.skipHidden Skip hidden files (files starting with .).
|
|
2717
|
+
* @param opts.filesOnly Only return matching files, not lines and content
|
|
2718
|
+
* @param opts.limit Limit the number of results to return
|
|
2719
|
+
*/
|
|
2720
|
+
search: (opts?: DirectorySearchOpts) => Promise<SearchResult[]>;
|
|
2426
2721
|
/**
|
|
2427
2722
|
* Force evaluation in the engine.
|
|
2428
2723
|
*/
|
|
@@ -2435,12 +2730,22 @@ export declare class Directory extends BaseClient {
|
|
|
2435
2730
|
* @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
|
|
2436
2731
|
*/
|
|
2437
2732
|
terminal: (opts?: DirectoryTerminalOpts) => Directory;
|
|
2733
|
+
/**
|
|
2734
|
+
* Return a directory with changes from another directory applied to it.
|
|
2735
|
+
* @param changes Changes to apply to the directory
|
|
2736
|
+
*/
|
|
2737
|
+
withChanges: (changes: Changeset) => Directory;
|
|
2438
2738
|
/**
|
|
2439
2739
|
* Return a snapshot with a directory added
|
|
2440
2740
|
* @param path Location of the written directory (e.g., "/src/").
|
|
2441
2741
|
* @param directory Identifier of the directory to copy.
|
|
2442
2742
|
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
2443
2743
|
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
2744
|
+
* @param opts.owner A user:group to set for the copied directory and its contents.
|
|
2745
|
+
*
|
|
2746
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
2747
|
+
*
|
|
2748
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
2444
2749
|
*/
|
|
2445
2750
|
withDirectory: (path: string, directory: Directory, opts?: DirectoryWithDirectoryOpts) => Directory;
|
|
2446
2751
|
/**
|
|
@@ -2448,6 +2753,11 @@ export declare class Directory extends BaseClient {
|
|
|
2448
2753
|
* @param path Location of the copied file (e.g., "/file.txt").
|
|
2449
2754
|
* @param source Identifier of the file to copy.
|
|
2450
2755
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
2756
|
+
* @param opts.owner A user:group to set for the copied directory and its contents.
|
|
2757
|
+
*
|
|
2758
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
2759
|
+
*
|
|
2760
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
2451
2761
|
*/
|
|
2452
2762
|
withFile: (path: string, source: File, opts?: DirectoryWithFileOpts) => Directory;
|
|
2453
2763
|
/**
|
|
@@ -2476,6 +2786,12 @@ export declare class Directory extends BaseClient {
|
|
|
2476
2786
|
* @experimental
|
|
2477
2787
|
*/
|
|
2478
2788
|
withPatch: (patch: string) => Directory;
|
|
2789
|
+
/**
|
|
2790
|
+
* Retrieves this directory with the given Git-compatible patch file applied.
|
|
2791
|
+
* @param patch File containing the patch to apply
|
|
2792
|
+
* @experimental
|
|
2793
|
+
*/
|
|
2794
|
+
withPatchFile: (patch: File) => Directory;
|
|
2479
2795
|
/**
|
|
2480
2796
|
* Return a snapshot with a symlink
|
|
2481
2797
|
* @param target Location of the file or directory to link to (e.g., "/existing/file").
|
|
@@ -2759,6 +3075,19 @@ export declare class Env extends BaseClient {
|
|
|
2759
3075
|
* @param description A description of the desired value of the binding
|
|
2760
3076
|
*/
|
|
2761
3077
|
withCacheVolumeOutput: (name: string, description: string) => Env;
|
|
3078
|
+
/**
|
|
3079
|
+
* Create or update a binding of type Changeset in the environment
|
|
3080
|
+
* @param name The name of the binding
|
|
3081
|
+
* @param value The Changeset value to assign to the binding
|
|
3082
|
+
* @param description The purpose of the input
|
|
3083
|
+
*/
|
|
3084
|
+
withChangesetInput: (name: string, value: Changeset, description: string) => Env;
|
|
3085
|
+
/**
|
|
3086
|
+
* Declare a desired Changeset output to be assigned in the environment
|
|
3087
|
+
* @param name The name of the binding
|
|
3088
|
+
* @param description A description of the desired value of the binding
|
|
3089
|
+
*/
|
|
3090
|
+
withChangesetOutput: (name: string, description: string) => Env;
|
|
2762
3091
|
/**
|
|
2763
3092
|
* Create or update a binding of type Cloud in the environment
|
|
2764
3093
|
* @param name The name of the binding
|
|
@@ -2798,6 +3127,19 @@ export declare class Env extends BaseClient {
|
|
|
2798
3127
|
* @param description A description of the desired value of the binding
|
|
2799
3128
|
*/
|
|
2800
3129
|
withDirectoryOutput: (name: string, description: string) => Env;
|
|
3130
|
+
/**
|
|
3131
|
+
* Create or update a binding of type EnvFile in the environment
|
|
3132
|
+
* @param name The name of the binding
|
|
3133
|
+
* @param value The EnvFile value to assign to the binding
|
|
3134
|
+
* @param description The purpose of the input
|
|
3135
|
+
*/
|
|
3136
|
+
withEnvFileInput: (name: string, value: EnvFile, description: string) => Env;
|
|
3137
|
+
/**
|
|
3138
|
+
* Declare a desired EnvFile output to be assigned in the environment
|
|
3139
|
+
* @param name The name of the binding
|
|
3140
|
+
* @param description A description of the desired value of the binding
|
|
3141
|
+
*/
|
|
3142
|
+
withEnvFileOutput: (name: string, description: string) => Env;
|
|
2801
3143
|
/**
|
|
2802
3144
|
* Create or update a binding of type Env in the environment
|
|
2803
3145
|
* @param name The name of the binding
|
|
@@ -2850,6 +3192,19 @@ export declare class Env extends BaseClient {
|
|
|
2850
3192
|
* @param description A description of the desired value of the binding
|
|
2851
3193
|
*/
|
|
2852
3194
|
withGitRepositoryOutput: (name: string, description: string) => Env;
|
|
3195
|
+
/**
|
|
3196
|
+
* Create or update a binding of type JSONValue in the environment
|
|
3197
|
+
* @param name The name of the binding
|
|
3198
|
+
* @param value The JSONValue value to assign to the binding
|
|
3199
|
+
* @param description The purpose of the input
|
|
3200
|
+
*/
|
|
3201
|
+
withJSONValueInput: (name: string, value: JSONValue, description: string) => Env;
|
|
3202
|
+
/**
|
|
3203
|
+
* Declare a desired JSONValue output to be assigned in the environment
|
|
3204
|
+
* @param name The name of the binding
|
|
3205
|
+
* @param description A description of the desired value of the binding
|
|
3206
|
+
*/
|
|
3207
|
+
withJSONValueOutput: (name: string, description: string) => Env;
|
|
2853
3208
|
/**
|
|
2854
3209
|
* Create or update a binding of type LLM in the environment
|
|
2855
3210
|
* @param name The name of the binding
|
|
@@ -2902,6 +3257,32 @@ export declare class Env extends BaseClient {
|
|
|
2902
3257
|
* @param description A description of the desired value of the binding
|
|
2903
3258
|
*/
|
|
2904
3259
|
withModuleSourceOutput: (name: string, description: string) => Env;
|
|
3260
|
+
/**
|
|
3261
|
+
* Create or update a binding of type SearchResult in the environment
|
|
3262
|
+
* @param name The name of the binding
|
|
3263
|
+
* @param value The SearchResult value to assign to the binding
|
|
3264
|
+
* @param description The purpose of the input
|
|
3265
|
+
*/
|
|
3266
|
+
withSearchResultInput: (name: string, value: SearchResult, description: string) => Env;
|
|
3267
|
+
/**
|
|
3268
|
+
* Declare a desired SearchResult output to be assigned in the environment
|
|
3269
|
+
* @param name The name of the binding
|
|
3270
|
+
* @param description A description of the desired value of the binding
|
|
3271
|
+
*/
|
|
3272
|
+
withSearchResultOutput: (name: string, description: string) => Env;
|
|
3273
|
+
/**
|
|
3274
|
+
* Create or update a binding of type SearchSubmatch in the environment
|
|
3275
|
+
* @param name The name of the binding
|
|
3276
|
+
* @param value The SearchSubmatch value to assign to the binding
|
|
3277
|
+
* @param description The purpose of the input
|
|
3278
|
+
*/
|
|
3279
|
+
withSearchSubmatchInput: (name: string, value: SearchSubmatch, description: string) => Env;
|
|
3280
|
+
/**
|
|
3281
|
+
* Declare a desired SearchSubmatch output to be assigned in the environment
|
|
3282
|
+
* @param name The name of the binding
|
|
3283
|
+
* @param description A description of the desired value of the binding
|
|
3284
|
+
*/
|
|
3285
|
+
withSearchSubmatchOutput: (name: string, description: string) => Env;
|
|
2905
3286
|
/**
|
|
2906
3287
|
* Create or update a binding of type Secret in the environment
|
|
2907
3288
|
* @param name The name of the binding
|
|
@@ -2961,6 +3342,57 @@ export declare class Env extends BaseClient {
|
|
|
2961
3342
|
*/
|
|
2962
3343
|
with: (arg: (param: Env) => Env) => Env;
|
|
2963
3344
|
}
|
|
3345
|
+
/**
|
|
3346
|
+
* A collection of environment variables.
|
|
3347
|
+
*/
|
|
3348
|
+
export declare class EnvFile extends BaseClient {
|
|
3349
|
+
private readonly _id?;
|
|
3350
|
+
private readonly _exists?;
|
|
3351
|
+
private readonly _get?;
|
|
3352
|
+
/**
|
|
3353
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3354
|
+
*/
|
|
3355
|
+
constructor(ctx?: Context, _id?: EnvFileID, _exists?: boolean, _get?: string);
|
|
3356
|
+
/**
|
|
3357
|
+
* A unique identifier for this EnvFile.
|
|
3358
|
+
*/
|
|
3359
|
+
id: () => Promise<EnvFileID>;
|
|
3360
|
+
/**
|
|
3361
|
+
* Return as a file
|
|
3362
|
+
*/
|
|
3363
|
+
asFile: () => File;
|
|
3364
|
+
/**
|
|
3365
|
+
* Check if a variable exists
|
|
3366
|
+
* @param name Variable name
|
|
3367
|
+
*/
|
|
3368
|
+
exists: (name: string) => Promise<boolean>;
|
|
3369
|
+
/**
|
|
3370
|
+
* Lookup a variable (last occurrence wins) and return its value, or an empty string
|
|
3371
|
+
* @param name Variable name
|
|
3372
|
+
*/
|
|
3373
|
+
get: (name: string) => Promise<string>;
|
|
3374
|
+
/**
|
|
3375
|
+
* Return all variables
|
|
3376
|
+
*/
|
|
3377
|
+
variables: () => Promise<EnvVariable[]>;
|
|
3378
|
+
/**
|
|
3379
|
+
* Add a variable
|
|
3380
|
+
* @param name Variable name
|
|
3381
|
+
* @param value Variable value
|
|
3382
|
+
*/
|
|
3383
|
+
withVariable: (name: string, value: string) => EnvFile;
|
|
3384
|
+
/**
|
|
3385
|
+
* Remove all occurrences of the named variable
|
|
3386
|
+
* @param name Variable name
|
|
3387
|
+
*/
|
|
3388
|
+
withoutVariable: (name: string) => EnvFile;
|
|
3389
|
+
/**
|
|
3390
|
+
* Call the provided function with current EnvFile.
|
|
3391
|
+
*
|
|
3392
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
3393
|
+
*/
|
|
3394
|
+
with: (arg: (param: EnvFile) => EnvFile) => EnvFile;
|
|
3395
|
+
}
|
|
2964
3396
|
/**
|
|
2965
3397
|
* An environment variable name and value.
|
|
2966
3398
|
*/
|
|
@@ -3091,10 +3523,26 @@ export declare class File extends BaseClient {
|
|
|
3091
3523
|
* A unique identifier for this File.
|
|
3092
3524
|
*/
|
|
3093
3525
|
id: () => Promise<FileID>;
|
|
3526
|
+
/**
|
|
3527
|
+
* Parse as an env file
|
|
3528
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" with the value of other vars
|
|
3529
|
+
*/
|
|
3530
|
+
asEnvFile: (opts?: FileAsEnvFileOpts) => EnvFile;
|
|
3531
|
+
/**
|
|
3532
|
+
* Change the owner of the file recursively.
|
|
3533
|
+
* @param owner A user:group to set for the file.
|
|
3534
|
+
*
|
|
3535
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
3536
|
+
*
|
|
3537
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
3538
|
+
*/
|
|
3539
|
+
chown: (owner: string) => File;
|
|
3094
3540
|
/**
|
|
3095
3541
|
* Retrieves the contents of the file.
|
|
3542
|
+
* @param opts.offsetLines Start reading after this line
|
|
3543
|
+
* @param opts.limitLines Maximum number of lines to read
|
|
3096
3544
|
*/
|
|
3097
|
-
contents: () => Promise<string>;
|
|
3545
|
+
contents: (opts?: FileContentsOpts) => Promise<string>;
|
|
3098
3546
|
/**
|
|
3099
3547
|
* Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
|
|
3100
3548
|
* @param opts.excludeMetadata If true, exclude metadata from the digest.
|
|
@@ -3110,6 +3558,21 @@ export declare class File extends BaseClient {
|
|
|
3110
3558
|
* Retrieves the name of the file.
|
|
3111
3559
|
*/
|
|
3112
3560
|
name: () => Promise<string>;
|
|
3561
|
+
/**
|
|
3562
|
+
* Searches for content matching the given regular expression or literal string.
|
|
3563
|
+
*
|
|
3564
|
+
* Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
|
|
3565
|
+
* @param pattern The text to match.
|
|
3566
|
+
* @param opts.literal Interpret the pattern as a literal string instead of a regular expression.
|
|
3567
|
+
* @param opts.multiline Enable searching across multiple lines.
|
|
3568
|
+
* @param opts.dotall Allow the . pattern to match newlines in multiline mode.
|
|
3569
|
+
* @param opts.insensitive Enable case-insensitive matching.
|
|
3570
|
+
* @param opts.skipIgnored Honor .gitignore, .ignore, and .rgignore files.
|
|
3571
|
+
* @param opts.skipHidden Skip hidden files (files starting with .).
|
|
3572
|
+
* @param opts.filesOnly Only return matching files, not lines and content
|
|
3573
|
+
* @param opts.limit Limit the number of results to return
|
|
3574
|
+
*/
|
|
3575
|
+
search: (pattern: string, opts?: FileSearchOpts) => Promise<SearchResult[]>;
|
|
3113
3576
|
/**
|
|
3114
3577
|
* Retrieves the size of the file, in bytes.
|
|
3115
3578
|
*/
|
|
@@ -3123,6 +3586,22 @@ export declare class File extends BaseClient {
|
|
|
3123
3586
|
* @param name Name to set file to.
|
|
3124
3587
|
*/
|
|
3125
3588
|
withName: (name: string) => File;
|
|
3589
|
+
/**
|
|
3590
|
+
* Retrieves the file with content replaced with the given text.
|
|
3591
|
+
*
|
|
3592
|
+
* If 'all' is true, all occurrences of the pattern will be replaced.
|
|
3593
|
+
*
|
|
3594
|
+
* If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
|
|
3595
|
+
*
|
|
3596
|
+
* If neither are specified, and there are multiple matches for the pattern, this will error.
|
|
3597
|
+
*
|
|
3598
|
+
* If there are no matches for the pattern, this will error.
|
|
3599
|
+
* @param search The text to match.
|
|
3600
|
+
* @param replacement The text to match.
|
|
3601
|
+
* @param opts.all Replace all occurrences of the pattern.
|
|
3602
|
+
* @param opts.firstFrom Replace the first match starting from the specified line.
|
|
3603
|
+
*/
|
|
3604
|
+
withReplaced: (search: string, replacement: string, opts?: FileWithReplacedOpts) => File;
|
|
3126
3605
|
/**
|
|
3127
3606
|
* Retrieves this file with its created/modified timestamps set to the given time.
|
|
3128
3607
|
* @param timestamp Timestamp to set dir/files in.
|
|
@@ -3405,10 +3884,11 @@ export declare class GitRef extends BaseClient {
|
|
|
3405
3884
|
*/
|
|
3406
3885
|
export declare class GitRepository extends BaseClient {
|
|
3407
3886
|
private readonly _id?;
|
|
3887
|
+
private readonly _url?;
|
|
3408
3888
|
/**
|
|
3409
3889
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3410
3890
|
*/
|
|
3411
|
-
constructor(ctx?: Context, _id?: GitRepositoryID);
|
|
3891
|
+
constructor(ctx?: Context, _id?: GitRepositoryID, _url?: string);
|
|
3412
3892
|
/**
|
|
3413
3893
|
* A unique identifier for this GitRepository.
|
|
3414
3894
|
*/
|
|
@@ -3451,6 +3931,10 @@ export declare class GitRepository extends BaseClient {
|
|
|
3451
3931
|
* @param opts.patterns Glob patterns (e.g., "refs/tags/v*").
|
|
3452
3932
|
*/
|
|
3453
3933
|
tags: (opts?: GitRepositoryTagsOpts) => Promise<string[]>;
|
|
3934
|
+
/**
|
|
3935
|
+
* The URL of the git repository.
|
|
3936
|
+
*/
|
|
3937
|
+
url: () => Promise<string>;
|
|
3454
3938
|
/**
|
|
3455
3939
|
* Header to authenticate the remote with.
|
|
3456
3940
|
* @param header Secret used to populate the Authorization HTTP header
|
|
@@ -3475,20 +3959,27 @@ export declare class GitRepository extends BaseClient {
|
|
|
3475
3959
|
*/
|
|
3476
3960
|
export declare class Host extends BaseClient {
|
|
3477
3961
|
private readonly _id?;
|
|
3962
|
+
private readonly _findUp?;
|
|
3478
3963
|
/**
|
|
3479
3964
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3480
3965
|
*/
|
|
3481
|
-
constructor(ctx?: Context, _id?: HostID);
|
|
3966
|
+
constructor(ctx?: Context, _id?: HostID, _findUp?: string);
|
|
3482
3967
|
/**
|
|
3483
3968
|
* A unique identifier for this Host.
|
|
3484
3969
|
*/
|
|
3485
3970
|
id: () => Promise<HostID>;
|
|
3971
|
+
/**
|
|
3972
|
+
* Accesses a container image on the host.
|
|
3973
|
+
* @param name Name of the image to access.
|
|
3974
|
+
*/
|
|
3975
|
+
containerImage: (name: string) => Container;
|
|
3486
3976
|
/**
|
|
3487
3977
|
* Accesses a directory on the host.
|
|
3488
3978
|
* @param path Location of the directory to access (e.g., ".").
|
|
3489
3979
|
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
3490
3980
|
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
3491
3981
|
* @param opts.noCache If true, the directory will always be reloaded from the host.
|
|
3982
|
+
* @param opts.gitignore Apply .gitignore filter rules inside the directory
|
|
3492
3983
|
*/
|
|
3493
3984
|
directory: (path: string, opts?: HostDirectoryOpts) => Directory;
|
|
3494
3985
|
/**
|
|
@@ -3497,6 +3988,11 @@ export declare class Host extends BaseClient {
|
|
|
3497
3988
|
* @param opts.noCache If true, the file will always be reloaded from the host.
|
|
3498
3989
|
*/
|
|
3499
3990
|
file: (path: string, opts?: HostFileOpts) => File;
|
|
3991
|
+
/**
|
|
3992
|
+
* Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
|
|
3993
|
+
* @param name name of the file or directory to search for
|
|
3994
|
+
*/
|
|
3995
|
+
findUp: (name: string, opts?: HostFindUpOpts) => Promise<string>;
|
|
3500
3996
|
/**
|
|
3501
3997
|
* Creates a service that forwards traffic to a specified address via the host.
|
|
3502
3998
|
* @param ports Ports to expose via the service, forwarding through the host network.
|
|
@@ -3600,6 +4096,84 @@ export declare class InterfaceTypeDef extends BaseClient {
|
|
|
3600
4096
|
*/
|
|
3601
4097
|
sourceModuleName: () => Promise<string>;
|
|
3602
4098
|
}
|
|
4099
|
+
export declare class JSONValue extends BaseClient {
|
|
4100
|
+
private readonly _id?;
|
|
4101
|
+
private readonly _asBoolean?;
|
|
4102
|
+
private readonly _asInteger?;
|
|
4103
|
+
private readonly _asString?;
|
|
4104
|
+
private readonly _contents?;
|
|
4105
|
+
/**
|
|
4106
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
4107
|
+
*/
|
|
4108
|
+
constructor(ctx?: Context, _id?: JSONValueID, _asBoolean?: boolean, _asInteger?: number, _asString?: string, _contents?: JSON);
|
|
4109
|
+
/**
|
|
4110
|
+
* A unique identifier for this JSONValue.
|
|
4111
|
+
*/
|
|
4112
|
+
id: () => Promise<JSONValueID>;
|
|
4113
|
+
/**
|
|
4114
|
+
* Decode an array from json
|
|
4115
|
+
*/
|
|
4116
|
+
asArray: () => Promise<JSONValue[]>;
|
|
4117
|
+
/**
|
|
4118
|
+
* Decode a boolean from json
|
|
4119
|
+
*/
|
|
4120
|
+
asBoolean: () => Promise<boolean>;
|
|
4121
|
+
/**
|
|
4122
|
+
* Decode an integer from json
|
|
4123
|
+
*/
|
|
4124
|
+
asInteger: () => Promise<number>;
|
|
4125
|
+
/**
|
|
4126
|
+
* Decode a string from json
|
|
4127
|
+
*/
|
|
4128
|
+
asString: () => Promise<string>;
|
|
4129
|
+
/**
|
|
4130
|
+
* Return the value encoded as json
|
|
4131
|
+
* @param opts.pretty Pretty-print
|
|
4132
|
+
* @param opts.indent Optional line prefix
|
|
4133
|
+
*/
|
|
4134
|
+
contents: (opts?: JSONValueContentsOpts) => Promise<JSON>;
|
|
4135
|
+
/**
|
|
4136
|
+
* Lookup the field at the given path, and return its value.
|
|
4137
|
+
* @param path Path of the field to lookup, encoded as an array of field names
|
|
4138
|
+
*/
|
|
4139
|
+
field: (path: string[]) => JSONValue;
|
|
4140
|
+
/**
|
|
4141
|
+
* List fields of the encoded object
|
|
4142
|
+
*/
|
|
4143
|
+
fields: () => Promise<string[]>;
|
|
4144
|
+
/**
|
|
4145
|
+
* Encode a boolean to json
|
|
4146
|
+
* @param value New boolean value
|
|
4147
|
+
*/
|
|
4148
|
+
newBoolean: (value: boolean) => JSONValue;
|
|
4149
|
+
/**
|
|
4150
|
+
* Encode an integer to json
|
|
4151
|
+
* @param value New integer value
|
|
4152
|
+
*/
|
|
4153
|
+
newInteger: (value: number) => JSONValue;
|
|
4154
|
+
/**
|
|
4155
|
+
* Encode a string to json
|
|
4156
|
+
* @param value New string value
|
|
4157
|
+
*/
|
|
4158
|
+
newString: (value: string) => JSONValue;
|
|
4159
|
+
/**
|
|
4160
|
+
* Return a new json value, decoded from the given content
|
|
4161
|
+
* @param contents New JSON-encoded contents
|
|
4162
|
+
*/
|
|
4163
|
+
withContents: (contents: JSON) => JSONValue;
|
|
4164
|
+
/**
|
|
4165
|
+
* Set a new field at the given path
|
|
4166
|
+
* @param path Path of the field to set, encoded as an array of field names
|
|
4167
|
+
* @param value The new value of the field
|
|
4168
|
+
*/
|
|
4169
|
+
withField: (path: string[], value: JSONValue) => JSONValue;
|
|
4170
|
+
/**
|
|
4171
|
+
* Call the provided function with current JSONValue.
|
|
4172
|
+
*
|
|
4173
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
4174
|
+
*/
|
|
4175
|
+
with: (arg: (param: JSONValue) => JSONValue) => JSONValue;
|
|
4176
|
+
}
|
|
3603
4177
|
export declare class LLM extends BaseClient {
|
|
3604
4178
|
private readonly _id?;
|
|
3605
4179
|
private readonly _historyJSON?;
|
|
@@ -4232,6 +4806,11 @@ export declare class Client extends BaseClient {
|
|
|
4232
4806
|
* @experimental
|
|
4233
4807
|
*/
|
|
4234
4808
|
env: (opts?: ClientEnvOpts) => Env;
|
|
4809
|
+
/**
|
|
4810
|
+
* Initialize an environment file
|
|
4811
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" with the value of other vars
|
|
4812
|
+
*/
|
|
4813
|
+
envFile: (opts?: ClientEnvFileOpts) => EnvFile;
|
|
4235
4814
|
/**
|
|
4236
4815
|
* Create a new error.
|
|
4237
4816
|
* @param message A brief description of the error.
|
|
@@ -4283,6 +4862,10 @@ export declare class Client extends BaseClient {
|
|
|
4283
4862
|
* @param opts.experimentalServiceHost A service which must be started before the URL is fetched.
|
|
4284
4863
|
*/
|
|
4285
4864
|
http: (url: string, opts?: ClientHttpOpts) => File;
|
|
4865
|
+
/**
|
|
4866
|
+
* Initialize a JSON value
|
|
4867
|
+
*/
|
|
4868
|
+
json: () => JSONValue;
|
|
4286
4869
|
/**
|
|
4287
4870
|
* Initialize a Large Language Model (LLM)
|
|
4288
4871
|
* @param opts.model Model to use
|
|
@@ -4298,6 +4881,10 @@ export declare class Client extends BaseClient {
|
|
|
4298
4881
|
* Load a CacheVolume from its ID.
|
|
4299
4882
|
*/
|
|
4300
4883
|
loadCacheVolumeFromID: (id: CacheVolumeID) => CacheVolume;
|
|
4884
|
+
/**
|
|
4885
|
+
* Load a Changeset from its ID.
|
|
4886
|
+
*/
|
|
4887
|
+
loadChangesetFromID: (id: ChangesetID) => Changeset;
|
|
4301
4888
|
/**
|
|
4302
4889
|
* Load a Cloud from its ID.
|
|
4303
4890
|
*/
|
|
@@ -4338,6 +4925,10 @@ export declare class Client extends BaseClient {
|
|
|
4338
4925
|
* Load a EnumValueTypeDef from its ID.
|
|
4339
4926
|
*/
|
|
4340
4927
|
loadEnumValueTypeDefFromID: (id: EnumValueTypeDefID) => EnumValueTypeDef;
|
|
4928
|
+
/**
|
|
4929
|
+
* Load a EnvFile from its ID.
|
|
4930
|
+
*/
|
|
4931
|
+
loadEnvFileFromID: (id: EnvFileID) => EnvFile;
|
|
4341
4932
|
/**
|
|
4342
4933
|
* Load a Env from its ID.
|
|
4343
4934
|
*/
|
|
@@ -4402,6 +4993,10 @@ export declare class Client extends BaseClient {
|
|
|
4402
4993
|
* Load a InterfaceTypeDef from its ID.
|
|
4403
4994
|
*/
|
|
4404
4995
|
loadInterfaceTypeDefFromID: (id: InterfaceTypeDefID) => InterfaceTypeDef;
|
|
4996
|
+
/**
|
|
4997
|
+
* Load a JSONValue from its ID.
|
|
4998
|
+
*/
|
|
4999
|
+
loadJSONValueFromID: (id: JSONValueID) => JSONValue;
|
|
4405
5000
|
/**
|
|
4406
5001
|
* Load a LLM from its ID.
|
|
4407
5002
|
*/
|
|
@@ -4446,6 +5041,14 @@ export declare class Client extends BaseClient {
|
|
|
4446
5041
|
* Load a ScalarTypeDef from its ID.
|
|
4447
5042
|
*/
|
|
4448
5043
|
loadScalarTypeDefFromID: (id: ScalarTypeDefID) => ScalarTypeDef;
|
|
5044
|
+
/**
|
|
5045
|
+
* Load a SearchResult from its ID.
|
|
5046
|
+
*/
|
|
5047
|
+
loadSearchResultFromID: (id: SearchResultID) => SearchResult;
|
|
5048
|
+
/**
|
|
5049
|
+
* Load a SearchSubmatch from its ID.
|
|
5050
|
+
*/
|
|
5051
|
+
loadSearchSubmatchFromID: (id: SearchSubmatchID) => SearchSubmatch;
|
|
4449
5052
|
/**
|
|
4450
5053
|
* Load a Secret from its ID.
|
|
4451
5054
|
*/
|
|
@@ -4565,6 +5168,67 @@ export declare class ScalarTypeDef extends BaseClient {
|
|
|
4565
5168
|
*/
|
|
4566
5169
|
sourceModuleName: () => Promise<string>;
|
|
4567
5170
|
}
|
|
5171
|
+
export declare class SearchResult extends BaseClient {
|
|
5172
|
+
private readonly _id?;
|
|
5173
|
+
private readonly _absoluteOffset?;
|
|
5174
|
+
private readonly _filePath?;
|
|
5175
|
+
private readonly _lineNumber?;
|
|
5176
|
+
private readonly _matchedLines?;
|
|
5177
|
+
/**
|
|
5178
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
5179
|
+
*/
|
|
5180
|
+
constructor(ctx?: Context, _id?: SearchResultID, _absoluteOffset?: number, _filePath?: string, _lineNumber?: number, _matchedLines?: string);
|
|
5181
|
+
/**
|
|
5182
|
+
* A unique identifier for this SearchResult.
|
|
5183
|
+
*/
|
|
5184
|
+
id: () => Promise<SearchResultID>;
|
|
5185
|
+
/**
|
|
5186
|
+
* The byte offset of this line within the file.
|
|
5187
|
+
*/
|
|
5188
|
+
absoluteOffset: () => Promise<number>;
|
|
5189
|
+
/**
|
|
5190
|
+
* The path to the file that matched.
|
|
5191
|
+
*/
|
|
5192
|
+
filePath: () => Promise<string>;
|
|
5193
|
+
/**
|
|
5194
|
+
* The first line that matched.
|
|
5195
|
+
*/
|
|
5196
|
+
lineNumber: () => Promise<number>;
|
|
5197
|
+
/**
|
|
5198
|
+
* The line content that matched.
|
|
5199
|
+
*/
|
|
5200
|
+
matchedLines: () => Promise<string>;
|
|
5201
|
+
/**
|
|
5202
|
+
* Sub-match positions and content within the matched lines.
|
|
5203
|
+
*/
|
|
5204
|
+
submatches: () => Promise<SearchSubmatch[]>;
|
|
5205
|
+
}
|
|
5206
|
+
export declare class SearchSubmatch extends BaseClient {
|
|
5207
|
+
private readonly _id?;
|
|
5208
|
+
private readonly _end?;
|
|
5209
|
+
private readonly _start?;
|
|
5210
|
+
private readonly _text?;
|
|
5211
|
+
/**
|
|
5212
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
5213
|
+
*/
|
|
5214
|
+
constructor(ctx?: Context, _id?: SearchSubmatchID, _end?: number, _start?: number, _text?: string);
|
|
5215
|
+
/**
|
|
5216
|
+
* A unique identifier for this SearchSubmatch.
|
|
5217
|
+
*/
|
|
5218
|
+
id: () => Promise<SearchSubmatchID>;
|
|
5219
|
+
/**
|
|
5220
|
+
* The match's end offset within the matched lines.
|
|
5221
|
+
*/
|
|
5222
|
+
end: () => Promise<number>;
|
|
5223
|
+
/**
|
|
5224
|
+
* The match's start offset within the matched lines.
|
|
5225
|
+
*/
|
|
5226
|
+
start: () => Promise<number>;
|
|
5227
|
+
/**
|
|
5228
|
+
* The matched text.
|
|
5229
|
+
*/
|
|
5230
|
+
text: () => Promise<string>;
|
|
5231
|
+
}
|
|
4568
5232
|
/**
|
|
4569
5233
|
* A reference to a secret value, which can be handled more safely than the value itself.
|
|
4570
5234
|
*/
|
|
@@ -4603,11 +5267,12 @@ export declare class Service extends BaseClient {
|
|
|
4603
5267
|
private readonly _hostname?;
|
|
4604
5268
|
private readonly _start?;
|
|
4605
5269
|
private readonly _stop?;
|
|
5270
|
+
private readonly _sync?;
|
|
4606
5271
|
private readonly _up?;
|
|
4607
5272
|
/**
|
|
4608
5273
|
* Constructor is used for internal usage only, do not create object from it.
|
|
4609
5274
|
*/
|
|
4610
|
-
constructor(ctx?: Context, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID, _up?: Void);
|
|
5275
|
+
constructor(ctx?: Context, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID, _sync?: ServiceID, _up?: Void);
|
|
4611
5276
|
/**
|
|
4612
5277
|
* A unique identifier for this Service.
|
|
4613
5278
|
*/
|
|
@@ -4641,6 +5306,11 @@ export declare class Service extends BaseClient {
|
|
|
4641
5306
|
* @param opts.kill Immediately kill the service without waiting for a graceful exit
|
|
4642
5307
|
*/
|
|
4643
5308
|
stop: (opts?: ServiceStopOpts) => Promise<Service>;
|
|
5309
|
+
/**
|
|
5310
|
+
* Forces evaluation of the pipeline in the engine.
|
|
5311
|
+
*/
|
|
5312
|
+
sync: () => Promise<Service>;
|
|
5313
|
+
terminal: (opts?: ServiceTerminalOpts) => Service;
|
|
4644
5314
|
/**
|
|
4645
5315
|
* Creates a tunnel that forwards traffic from the caller's network to this service.
|
|
4646
5316
|
* @param opts.ports List of frontend/backend port mappings to forward.
|