@dagger.io/dagger 0.18.17 → 0.18.19
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 +361 -5
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +521 -3
- package/dist/src/common/utils.d.ts +1 -0
- package/dist/src/common/utils.d.ts.map +1 -1
- 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/provisioning/default.d.ts +1 -1
- package/dist/src/provisioning/default.js +1 -1
- package/package.json +22 -22
|
@@ -14,6 +14,22 @@ declare class BaseClient {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(_ctx?: Context);
|
|
16
16
|
}
|
|
17
|
+
export type AddressDirectoryOpts = {
|
|
18
|
+
exclude?: string[];
|
|
19
|
+
include?: string[];
|
|
20
|
+
noCache?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type AddressFileOpts = {
|
|
23
|
+
exclude?: string[];
|
|
24
|
+
include?: string[];
|
|
25
|
+
noCache?: boolean;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The `AddressID` scalar type represents an identifier for an object of type Address.
|
|
29
|
+
*/
|
|
30
|
+
export type AddressID = string & {
|
|
31
|
+
__AddressID: never;
|
|
32
|
+
};
|
|
17
33
|
/**
|
|
18
34
|
* The `BindingID` scalar type represents an identifier for an object of type Binding.
|
|
19
35
|
*/
|
|
@@ -53,6 +69,12 @@ export declare enum CacheSharingMode {
|
|
|
53
69
|
export type CacheVolumeID = string & {
|
|
54
70
|
__CacheVolumeID: never;
|
|
55
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* The `ChangesetID` scalar type represents an identifier for an object of type Changeset.
|
|
74
|
+
*/
|
|
75
|
+
export type ChangesetID = string & {
|
|
76
|
+
__ChangesetID: never;
|
|
77
|
+
};
|
|
56
78
|
/**
|
|
57
79
|
* The `CloudID` scalar type represents an identifier for an object of type Cloud.
|
|
58
80
|
*/
|
|
@@ -764,12 +786,28 @@ export type DirectoryWithDirectoryOpts = {
|
|
|
764
786
|
* Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
765
787
|
*/
|
|
766
788
|
include?: string[];
|
|
789
|
+
/**
|
|
790
|
+
* A user:group to set for the copied directory and its contents.
|
|
791
|
+
*
|
|
792
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
793
|
+
*
|
|
794
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
795
|
+
*/
|
|
796
|
+
owner?: string;
|
|
767
797
|
};
|
|
768
798
|
export type DirectoryWithFileOpts = {
|
|
769
799
|
/**
|
|
770
800
|
* Permission given to the copied file (e.g., 0600).
|
|
771
801
|
*/
|
|
772
802
|
permissions?: number;
|
|
803
|
+
/**
|
|
804
|
+
* A user:group to set for the copied directory and its contents.
|
|
805
|
+
*
|
|
806
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
807
|
+
*
|
|
808
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
809
|
+
*/
|
|
810
|
+
owner?: string;
|
|
773
811
|
};
|
|
774
812
|
export type DirectoryWithFilesOpts = {
|
|
775
813
|
/**
|
|
@@ -840,6 +878,12 @@ export type EnumTypeDefID = string & {
|
|
|
840
878
|
export type EnumValueTypeDefID = string & {
|
|
841
879
|
__EnumValueTypeDefID: never;
|
|
842
880
|
};
|
|
881
|
+
/**
|
|
882
|
+
* The `EnvFileID` scalar type represents an identifier for an object of type EnvFile.
|
|
883
|
+
*/
|
|
884
|
+
export type EnvFileID = string & {
|
|
885
|
+
__EnvFileID: never;
|
|
886
|
+
};
|
|
843
887
|
/**
|
|
844
888
|
* The `EnvID` scalar type represents an identifier for an object of type Env.
|
|
845
889
|
*/
|
|
@@ -887,6 +931,12 @@ export declare enum ExistsType {
|
|
|
887
931
|
export type FieldTypeDefID = string & {
|
|
888
932
|
__FieldTypeDefID: never;
|
|
889
933
|
};
|
|
934
|
+
export type FileAsEnvFileOpts = {
|
|
935
|
+
/**
|
|
936
|
+
* Replace "${VAR}" or "$VAR" with the value of other vars
|
|
937
|
+
*/
|
|
938
|
+
expand?: boolean;
|
|
939
|
+
};
|
|
890
940
|
export type FileContentsOpts = {
|
|
891
941
|
/**
|
|
892
942
|
* Start reading after this line
|
|
@@ -1061,9 +1111,9 @@ export type HostDirectoryOpts = {
|
|
|
1061
1111
|
*/
|
|
1062
1112
|
noCache?: boolean;
|
|
1063
1113
|
/**
|
|
1064
|
-
*
|
|
1114
|
+
* Apply .gitignore filter rules inside the directory
|
|
1065
1115
|
*/
|
|
1066
|
-
|
|
1116
|
+
gitignore?: boolean;
|
|
1067
1117
|
};
|
|
1068
1118
|
export type HostFileOpts = {
|
|
1069
1119
|
/**
|
|
@@ -1071,6 +1121,9 @@ export type HostFileOpts = {
|
|
|
1071
1121
|
*/
|
|
1072
1122
|
noCache?: boolean;
|
|
1073
1123
|
};
|
|
1124
|
+
export type HostFindUpOpts = {
|
|
1125
|
+
noCache?: boolean;
|
|
1126
|
+
};
|
|
1074
1127
|
export type HostServiceOpts = {
|
|
1075
1128
|
/**
|
|
1076
1129
|
* Upstream host to forward traffic to.
|
|
@@ -1280,6 +1333,12 @@ export type ClientEnvOpts = {
|
|
|
1280
1333
|
*/
|
|
1281
1334
|
writable?: boolean;
|
|
1282
1335
|
};
|
|
1336
|
+
export type ClientEnvFileOpts = {
|
|
1337
|
+
/**
|
|
1338
|
+
* Replace "${VAR}" or "$VAR" with the value of other vars
|
|
1339
|
+
*/
|
|
1340
|
+
expand?: boolean;
|
|
1341
|
+
};
|
|
1283
1342
|
export type ClientFileOpts = {
|
|
1284
1343
|
/**
|
|
1285
1344
|
* Permissions of the new file. Example: 0600
|
|
@@ -1671,6 +1730,57 @@ export type __TypeFieldsOpts = {
|
|
|
1671
1730
|
export type __TypeInputFieldsOpts = {
|
|
1672
1731
|
includeDeprecated?: boolean;
|
|
1673
1732
|
};
|
|
1733
|
+
/**
|
|
1734
|
+
* A standardized address to load containers, directories, secrets, and other object types. Address format depends on the type, and is validated at type selection.
|
|
1735
|
+
*/
|
|
1736
|
+
export declare class Address extends BaseClient {
|
|
1737
|
+
private readonly _id?;
|
|
1738
|
+
private readonly _value?;
|
|
1739
|
+
/**
|
|
1740
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1741
|
+
*/
|
|
1742
|
+
constructor(ctx?: Context, _id?: AddressID, _value?: string);
|
|
1743
|
+
/**
|
|
1744
|
+
* A unique identifier for this Address.
|
|
1745
|
+
*/
|
|
1746
|
+
id: () => Promise<AddressID>;
|
|
1747
|
+
/**
|
|
1748
|
+
* Load a container from the address.
|
|
1749
|
+
*/
|
|
1750
|
+
container: () => Container;
|
|
1751
|
+
/**
|
|
1752
|
+
* Load a directory from the address.
|
|
1753
|
+
*/
|
|
1754
|
+
directory: (opts?: AddressDirectoryOpts) => Directory;
|
|
1755
|
+
/**
|
|
1756
|
+
* Load a file from the address.
|
|
1757
|
+
*/
|
|
1758
|
+
file: (opts?: AddressFileOpts) => File;
|
|
1759
|
+
/**
|
|
1760
|
+
* Load a git ref (branch, tag or commit) from the address.
|
|
1761
|
+
*/
|
|
1762
|
+
gitRef: () => GitRef;
|
|
1763
|
+
/**
|
|
1764
|
+
* Load a git repository from the address.
|
|
1765
|
+
*/
|
|
1766
|
+
gitRepository: () => GitRepository;
|
|
1767
|
+
/**
|
|
1768
|
+
* Load a secret from the address.
|
|
1769
|
+
*/
|
|
1770
|
+
secret: () => Secret;
|
|
1771
|
+
/**
|
|
1772
|
+
* Load a service from the address.
|
|
1773
|
+
*/
|
|
1774
|
+
service: () => Service;
|
|
1775
|
+
/**
|
|
1776
|
+
* Load a local socket from the address.
|
|
1777
|
+
*/
|
|
1778
|
+
socket: () => Socket;
|
|
1779
|
+
/**
|
|
1780
|
+
* The address value
|
|
1781
|
+
*/
|
|
1782
|
+
value: () => Promise<string>;
|
|
1783
|
+
}
|
|
1674
1784
|
export declare class Binding extends BaseClient {
|
|
1675
1785
|
private readonly _id?;
|
|
1676
1786
|
private readonly _asString?;
|
|
@@ -1686,10 +1796,18 @@ export declare class Binding extends BaseClient {
|
|
|
1686
1796
|
* A unique identifier for this Binding.
|
|
1687
1797
|
*/
|
|
1688
1798
|
id: () => Promise<BindingID>;
|
|
1799
|
+
/**
|
|
1800
|
+
* Retrieve the binding value, as type Address
|
|
1801
|
+
*/
|
|
1802
|
+
asAddress: () => Address;
|
|
1689
1803
|
/**
|
|
1690
1804
|
* Retrieve the binding value, as type CacheVolume
|
|
1691
1805
|
*/
|
|
1692
1806
|
asCacheVolume: () => CacheVolume;
|
|
1807
|
+
/**
|
|
1808
|
+
* Retrieve the binding value, as type Changeset
|
|
1809
|
+
*/
|
|
1810
|
+
asChangeset: () => Changeset;
|
|
1693
1811
|
/**
|
|
1694
1812
|
* Retrieve the binding value, as type Cloud
|
|
1695
1813
|
*/
|
|
@@ -1706,6 +1824,10 @@ export declare class Binding extends BaseClient {
|
|
|
1706
1824
|
* Retrieve the binding value, as type Env
|
|
1707
1825
|
*/
|
|
1708
1826
|
asEnv: () => Env;
|
|
1827
|
+
/**
|
|
1828
|
+
* Retrieve the binding value, as type EnvFile
|
|
1829
|
+
*/
|
|
1830
|
+
asEnvFile: () => EnvFile;
|
|
1709
1831
|
/**
|
|
1710
1832
|
* Retrieve the binding value, as type File
|
|
1711
1833
|
*/
|
|
@@ -1793,6 +1915,59 @@ export declare class CacheVolume extends BaseClient {
|
|
|
1793
1915
|
*/
|
|
1794
1916
|
id: () => Promise<CacheVolumeID>;
|
|
1795
1917
|
}
|
|
1918
|
+
/**
|
|
1919
|
+
* A comparison between two directories representing changes that can be applied.
|
|
1920
|
+
*/
|
|
1921
|
+
export declare class Changeset extends BaseClient {
|
|
1922
|
+
private readonly _id?;
|
|
1923
|
+
private readonly _export?;
|
|
1924
|
+
private readonly _sync?;
|
|
1925
|
+
/**
|
|
1926
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
1927
|
+
*/
|
|
1928
|
+
constructor(ctx?: Context, _id?: ChangesetID, _export?: string, _sync?: ChangesetID);
|
|
1929
|
+
/**
|
|
1930
|
+
* A unique identifier for this Changeset.
|
|
1931
|
+
*/
|
|
1932
|
+
id: () => Promise<ChangesetID>;
|
|
1933
|
+
/**
|
|
1934
|
+
* Files and directories that were added in the newer directory.
|
|
1935
|
+
*/
|
|
1936
|
+
addedPaths: () => Promise<string[]>;
|
|
1937
|
+
/**
|
|
1938
|
+
* The newer/upper snapshot.
|
|
1939
|
+
*/
|
|
1940
|
+
after: () => Directory;
|
|
1941
|
+
/**
|
|
1942
|
+
* Return a Git-compatible patch of the changes
|
|
1943
|
+
*/
|
|
1944
|
+
asPatch: () => File;
|
|
1945
|
+
/**
|
|
1946
|
+
* The older/lower snapshot to compare against.
|
|
1947
|
+
*/
|
|
1948
|
+
before: () => Directory;
|
|
1949
|
+
/**
|
|
1950
|
+
* Applies the diff represented by this changeset to a path on the host.
|
|
1951
|
+
* @param path Location of the copied directory (e.g., "logs/").
|
|
1952
|
+
*/
|
|
1953
|
+
export: (path: string) => Promise<string>;
|
|
1954
|
+
/**
|
|
1955
|
+
* Return a snapshot containing only the created and modified files
|
|
1956
|
+
*/
|
|
1957
|
+
layer: () => Directory;
|
|
1958
|
+
/**
|
|
1959
|
+
* Files and directories that existed before and were updated in the newer directory.
|
|
1960
|
+
*/
|
|
1961
|
+
modifiedPaths: () => Promise<string[]>;
|
|
1962
|
+
/**
|
|
1963
|
+
* Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
|
|
1964
|
+
*/
|
|
1965
|
+
removedPaths: () => Promise<string[]>;
|
|
1966
|
+
/**
|
|
1967
|
+
* Force evaluation in the engine.
|
|
1968
|
+
*/
|
|
1969
|
+
sync: () => Promise<Changeset>;
|
|
1970
|
+
}
|
|
1796
1971
|
/**
|
|
1797
1972
|
* Dagger Cloud configuration and state
|
|
1798
1973
|
*/
|
|
@@ -2485,12 +2660,13 @@ export declare class Directory extends BaseClient {
|
|
|
2485
2660
|
private readonly _digest?;
|
|
2486
2661
|
private readonly _exists?;
|
|
2487
2662
|
private readonly _export?;
|
|
2663
|
+
private readonly _findUp?;
|
|
2488
2664
|
private readonly _name?;
|
|
2489
2665
|
private readonly _sync?;
|
|
2490
2666
|
/**
|
|
2491
2667
|
* Constructor is used for internal usage only, do not create object from it.
|
|
2492
2668
|
*/
|
|
2493
|
-
constructor(ctx?: Context, _id?: DirectoryID, _digest?: string, _exists?: boolean, _export?: string, _name?: string, _sync?: DirectoryID);
|
|
2669
|
+
constructor(ctx?: Context, _id?: DirectoryID, _digest?: string, _exists?: boolean, _export?: string, _findUp?: string, _name?: string, _sync?: DirectoryID);
|
|
2494
2670
|
/**
|
|
2495
2671
|
* A unique identifier for this Directory.
|
|
2496
2672
|
*/
|
|
@@ -2513,6 +2689,23 @@ export declare class Directory extends BaseClient {
|
|
|
2513
2689
|
* If not set, the module source code is loaded from the root of the directory.
|
|
2514
2690
|
*/
|
|
2515
2691
|
asModuleSource: (opts?: DirectoryAsModuleSourceOpts) => ModuleSource;
|
|
2692
|
+
/**
|
|
2693
|
+
* Return the difference between this directory and another directory, typically an older snapshot.
|
|
2694
|
+
*
|
|
2695
|
+
* The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
|
|
2696
|
+
* @param from The base directory snapshot to compare against
|
|
2697
|
+
*/
|
|
2698
|
+
changes: (from: Directory) => Changeset;
|
|
2699
|
+
/**
|
|
2700
|
+
* Change the owner of the directory contents recursively.
|
|
2701
|
+
* @param path Path of the directory to change ownership of (e.g., "/").
|
|
2702
|
+
* @param owner A user:group to set for the mounted directory and its contents.
|
|
2703
|
+
*
|
|
2704
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
2705
|
+
*
|
|
2706
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
2707
|
+
*/
|
|
2708
|
+
chown: (path: string, owner: string) => Directory;
|
|
2516
2709
|
/**
|
|
2517
2710
|
* Return the difference between this directory and an another directory. The difference is encoded as a directory.
|
|
2518
2711
|
* @param other The directory to compare against
|
|
@@ -2570,6 +2763,12 @@ export declare class Directory extends BaseClient {
|
|
|
2570
2763
|
* @param opts.include If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
|
|
2571
2764
|
*/
|
|
2572
2765
|
filter: (opts?: DirectoryFilterOpts) => Directory;
|
|
2766
|
+
/**
|
|
2767
|
+
* Search up the directory tree for a file or directory, and return its path. If no match, return null
|
|
2768
|
+
* @param name The name of the file or directory to search for
|
|
2769
|
+
* @param start The path to start the search from
|
|
2770
|
+
*/
|
|
2771
|
+
findUp: (name: string, start: string) => Promise<string>;
|
|
2573
2772
|
/**
|
|
2574
2773
|
* Returns a list of files and directories that matche the given pattern.
|
|
2575
2774
|
* @param pattern Pattern to match (e.g., "*.md").
|
|
@@ -2608,12 +2807,22 @@ export declare class Directory extends BaseClient {
|
|
|
2608
2807
|
* @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.
|
|
2609
2808
|
*/
|
|
2610
2809
|
terminal: (opts?: DirectoryTerminalOpts) => Directory;
|
|
2810
|
+
/**
|
|
2811
|
+
* Return a directory with changes from another directory applied to it.
|
|
2812
|
+
* @param changes Changes to apply to the directory
|
|
2813
|
+
*/
|
|
2814
|
+
withChanges: (changes: Changeset) => Directory;
|
|
2611
2815
|
/**
|
|
2612
2816
|
* Return a snapshot with a directory added
|
|
2613
2817
|
* @param path Location of the written directory (e.g., "/src/").
|
|
2614
2818
|
* @param directory Identifier of the directory to copy.
|
|
2615
2819
|
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
2616
2820
|
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
2821
|
+
* @param opts.owner A user:group to set for the copied directory and its contents.
|
|
2822
|
+
*
|
|
2823
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
2824
|
+
*
|
|
2825
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
2617
2826
|
*/
|
|
2618
2827
|
withDirectory: (path: string, directory: Directory, opts?: DirectoryWithDirectoryOpts) => Directory;
|
|
2619
2828
|
/**
|
|
@@ -2621,6 +2830,11 @@ export declare class Directory extends BaseClient {
|
|
|
2621
2830
|
* @param path Location of the copied file (e.g., "/file.txt").
|
|
2622
2831
|
* @param source Identifier of the file to copy.
|
|
2623
2832
|
* @param opts.permissions Permission given to the copied file (e.g., 0600).
|
|
2833
|
+
* @param opts.owner A user:group to set for the copied directory and its contents.
|
|
2834
|
+
*
|
|
2835
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
2836
|
+
*
|
|
2837
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
2624
2838
|
*/
|
|
2625
2839
|
withFile: (path: string, source: File, opts?: DirectoryWithFileOpts) => Directory;
|
|
2626
2840
|
/**
|
|
@@ -2649,6 +2863,12 @@ export declare class Directory extends BaseClient {
|
|
|
2649
2863
|
* @experimental
|
|
2650
2864
|
*/
|
|
2651
2865
|
withPatch: (patch: string) => Directory;
|
|
2866
|
+
/**
|
|
2867
|
+
* Retrieves this directory with the given Git-compatible patch file applied.
|
|
2868
|
+
* @param patch File containing the patch to apply
|
|
2869
|
+
* @experimental
|
|
2870
|
+
*/
|
|
2871
|
+
withPatchFile: (patch: File) => Directory;
|
|
2652
2872
|
/**
|
|
2653
2873
|
* Return a snapshot with a symlink
|
|
2654
2874
|
* @param target Location of the file or directory to link to (e.g., "/existing/file").
|
|
@@ -2919,6 +3139,19 @@ export declare class Env extends BaseClient {
|
|
|
2919
3139
|
* return all output values for the environment
|
|
2920
3140
|
*/
|
|
2921
3141
|
outputs: () => Promise<Binding[]>;
|
|
3142
|
+
/**
|
|
3143
|
+
* Create or update a binding of type Address in the environment
|
|
3144
|
+
* @param name The name of the binding
|
|
3145
|
+
* @param value The Address value to assign to the binding
|
|
3146
|
+
* @param description The purpose of the input
|
|
3147
|
+
*/
|
|
3148
|
+
withAddressInput: (name: string, value: Address, description: string) => Env;
|
|
3149
|
+
/**
|
|
3150
|
+
* Declare a desired Address output to be assigned in the environment
|
|
3151
|
+
* @param name The name of the binding
|
|
3152
|
+
* @param description A description of the desired value of the binding
|
|
3153
|
+
*/
|
|
3154
|
+
withAddressOutput: (name: string, description: string) => Env;
|
|
2922
3155
|
/**
|
|
2923
3156
|
* Create or update a binding of type CacheVolume in the environment
|
|
2924
3157
|
* @param name The name of the binding
|
|
@@ -2932,6 +3165,19 @@ export declare class Env extends BaseClient {
|
|
|
2932
3165
|
* @param description A description of the desired value of the binding
|
|
2933
3166
|
*/
|
|
2934
3167
|
withCacheVolumeOutput: (name: string, description: string) => Env;
|
|
3168
|
+
/**
|
|
3169
|
+
* Create or update a binding of type Changeset in the environment
|
|
3170
|
+
* @param name The name of the binding
|
|
3171
|
+
* @param value The Changeset value to assign to the binding
|
|
3172
|
+
* @param description The purpose of the input
|
|
3173
|
+
*/
|
|
3174
|
+
withChangesetInput: (name: string, value: Changeset, description: string) => Env;
|
|
3175
|
+
/**
|
|
3176
|
+
* Declare a desired Changeset output to be assigned in the environment
|
|
3177
|
+
* @param name The name of the binding
|
|
3178
|
+
* @param description A description of the desired value of the binding
|
|
3179
|
+
*/
|
|
3180
|
+
withChangesetOutput: (name: string, description: string) => Env;
|
|
2935
3181
|
/**
|
|
2936
3182
|
* Create or update a binding of type Cloud in the environment
|
|
2937
3183
|
* @param name The name of the binding
|
|
@@ -2971,6 +3217,19 @@ export declare class Env extends BaseClient {
|
|
|
2971
3217
|
* @param description A description of the desired value of the binding
|
|
2972
3218
|
*/
|
|
2973
3219
|
withDirectoryOutput: (name: string, description: string) => Env;
|
|
3220
|
+
/**
|
|
3221
|
+
* Create or update a binding of type EnvFile in the environment
|
|
3222
|
+
* @param name The name of the binding
|
|
3223
|
+
* @param value The EnvFile value to assign to the binding
|
|
3224
|
+
* @param description The purpose of the input
|
|
3225
|
+
*/
|
|
3226
|
+
withEnvFileInput: (name: string, value: EnvFile, description: string) => Env;
|
|
3227
|
+
/**
|
|
3228
|
+
* Declare a desired EnvFile output to be assigned in the environment
|
|
3229
|
+
* @param name The name of the binding
|
|
3230
|
+
* @param description A description of the desired value of the binding
|
|
3231
|
+
*/
|
|
3232
|
+
withEnvFileOutput: (name: string, description: string) => Env;
|
|
2974
3233
|
/**
|
|
2975
3234
|
* Create or update a binding of type Env in the environment
|
|
2976
3235
|
* @param name The name of the binding
|
|
@@ -3173,6 +3432,57 @@ export declare class Env extends BaseClient {
|
|
|
3173
3432
|
*/
|
|
3174
3433
|
with: (arg: (param: Env) => Env) => Env;
|
|
3175
3434
|
}
|
|
3435
|
+
/**
|
|
3436
|
+
* A collection of environment variables.
|
|
3437
|
+
*/
|
|
3438
|
+
export declare class EnvFile extends BaseClient {
|
|
3439
|
+
private readonly _id?;
|
|
3440
|
+
private readonly _exists?;
|
|
3441
|
+
private readonly _get?;
|
|
3442
|
+
/**
|
|
3443
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
3444
|
+
*/
|
|
3445
|
+
constructor(ctx?: Context, _id?: EnvFileID, _exists?: boolean, _get?: string);
|
|
3446
|
+
/**
|
|
3447
|
+
* A unique identifier for this EnvFile.
|
|
3448
|
+
*/
|
|
3449
|
+
id: () => Promise<EnvFileID>;
|
|
3450
|
+
/**
|
|
3451
|
+
* Return as a file
|
|
3452
|
+
*/
|
|
3453
|
+
asFile: () => File;
|
|
3454
|
+
/**
|
|
3455
|
+
* Check if a variable exists
|
|
3456
|
+
* @param name Variable name
|
|
3457
|
+
*/
|
|
3458
|
+
exists: (name: string) => Promise<boolean>;
|
|
3459
|
+
/**
|
|
3460
|
+
* Lookup a variable (last occurrence wins) and return its value, or an empty string
|
|
3461
|
+
* @param name Variable name
|
|
3462
|
+
*/
|
|
3463
|
+
get: (name: string) => Promise<string>;
|
|
3464
|
+
/**
|
|
3465
|
+
* Return all variables
|
|
3466
|
+
*/
|
|
3467
|
+
variables: () => Promise<EnvVariable[]>;
|
|
3468
|
+
/**
|
|
3469
|
+
* Add a variable
|
|
3470
|
+
* @param name Variable name
|
|
3471
|
+
* @param value Variable value
|
|
3472
|
+
*/
|
|
3473
|
+
withVariable: (name: string, value: string) => EnvFile;
|
|
3474
|
+
/**
|
|
3475
|
+
* Remove all occurrences of the named variable
|
|
3476
|
+
* @param name Variable name
|
|
3477
|
+
*/
|
|
3478
|
+
withoutVariable: (name: string) => EnvFile;
|
|
3479
|
+
/**
|
|
3480
|
+
* Call the provided function with current EnvFile.
|
|
3481
|
+
*
|
|
3482
|
+
* This is useful for reusability and readability by not breaking the calling chain.
|
|
3483
|
+
*/
|
|
3484
|
+
with: (arg: (param: EnvFile) => EnvFile) => EnvFile;
|
|
3485
|
+
}
|
|
3176
3486
|
/**
|
|
3177
3487
|
* An environment variable name and value.
|
|
3178
3488
|
*/
|
|
@@ -3303,6 +3613,20 @@ export declare class File extends BaseClient {
|
|
|
3303
3613
|
* A unique identifier for this File.
|
|
3304
3614
|
*/
|
|
3305
3615
|
id: () => Promise<FileID>;
|
|
3616
|
+
/**
|
|
3617
|
+
* Parse as an env file
|
|
3618
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" with the value of other vars
|
|
3619
|
+
*/
|
|
3620
|
+
asEnvFile: (opts?: FileAsEnvFileOpts) => EnvFile;
|
|
3621
|
+
/**
|
|
3622
|
+
* Change the owner of the file recursively.
|
|
3623
|
+
* @param owner A user:group to set for the file.
|
|
3624
|
+
*
|
|
3625
|
+
* The user and group must be an ID (1000:1000), not a name (foo:bar).
|
|
3626
|
+
*
|
|
3627
|
+
* If the group is omitted, it defaults to the same as the user.
|
|
3628
|
+
*/
|
|
3629
|
+
chown: (owner: string) => File;
|
|
3306
3630
|
/**
|
|
3307
3631
|
* Retrieves the contents of the file.
|
|
3308
3632
|
* @param opts.offsetLines Start reading after this line
|
|
@@ -3725,10 +4049,11 @@ export declare class GitRepository extends BaseClient {
|
|
|
3725
4049
|
*/
|
|
3726
4050
|
export declare class Host extends BaseClient {
|
|
3727
4051
|
private readonly _id?;
|
|
4052
|
+
private readonly _findUp?;
|
|
3728
4053
|
/**
|
|
3729
4054
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3730
4055
|
*/
|
|
3731
|
-
constructor(ctx?: Context, _id?: HostID);
|
|
4056
|
+
constructor(ctx?: Context, _id?: HostID, _findUp?: string);
|
|
3732
4057
|
/**
|
|
3733
4058
|
* A unique identifier for this Host.
|
|
3734
4059
|
*/
|
|
@@ -3744,7 +4069,7 @@ export declare class Host extends BaseClient {
|
|
|
3744
4069
|
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
3745
4070
|
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
3746
4071
|
* @param opts.noCache If true, the directory will always be reloaded from the host.
|
|
3747
|
-
* @param opts.
|
|
4072
|
+
* @param opts.gitignore Apply .gitignore filter rules inside the directory
|
|
3748
4073
|
*/
|
|
3749
4074
|
directory: (path: string, opts?: HostDirectoryOpts) => Directory;
|
|
3750
4075
|
/**
|
|
@@ -3753,6 +4078,11 @@ export declare class Host extends BaseClient {
|
|
|
3753
4078
|
* @param opts.noCache If true, the file will always be reloaded from the host.
|
|
3754
4079
|
*/
|
|
3755
4080
|
file: (path: string, opts?: HostFileOpts) => File;
|
|
4081
|
+
/**
|
|
4082
|
+
* Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
|
|
4083
|
+
* @param name name of the file or directory to search for
|
|
4084
|
+
*/
|
|
4085
|
+
findUp: (name: string, opts?: HostFindUpOpts) => Promise<string>;
|
|
3756
4086
|
/**
|
|
3757
4087
|
* Creates a service that forwards traffic to a specified address via the host.
|
|
3758
4088
|
* @param ports Ports to expose via the service, forwarding through the host network.
|
|
@@ -4403,6 +4733,11 @@ export declare class ModuleSource extends BaseClient {
|
|
|
4403
4733
|
* @param dependencies The dependencies to update.
|
|
4404
4734
|
*/
|
|
4405
4735
|
withUpdateDependencies: (dependencies: string[]) => ModuleSource;
|
|
4736
|
+
/**
|
|
4737
|
+
* Update one or more clients.
|
|
4738
|
+
* @param clients The clients to update
|
|
4739
|
+
*/
|
|
4740
|
+
withUpdatedClients: (clients: string[]) => ModuleSource;
|
|
4406
4741
|
/**
|
|
4407
4742
|
* Remove the current blueprint from the module source.
|
|
4408
4743
|
*/
|
|
@@ -4517,6 +4852,10 @@ export declare class Client extends BaseClient {
|
|
|
4517
4852
|
* Get the Raw GraphQL client.
|
|
4518
4853
|
*/
|
|
4519
4854
|
getGQLClient(): import("graphql-request").GraphQLClient;
|
|
4855
|
+
/**
|
|
4856
|
+
* initialize an address to load directories, containers, secrets or other object types.
|
|
4857
|
+
*/
|
|
4858
|
+
address: (value: string) => Address;
|
|
4520
4859
|
/**
|
|
4521
4860
|
* Constructs a cache volume for a given cache key.
|
|
4522
4861
|
* @param key A string identifier to target this cache volume (e.g., "modules-cache").
|
|
@@ -4566,6 +4905,11 @@ export declare class Client extends BaseClient {
|
|
|
4566
4905
|
* @experimental
|
|
4567
4906
|
*/
|
|
4568
4907
|
env: (opts?: ClientEnvOpts) => Env;
|
|
4908
|
+
/**
|
|
4909
|
+
* Initialize an environment file
|
|
4910
|
+
* @param opts.expand Replace "${VAR}" or "$VAR" with the value of other vars
|
|
4911
|
+
*/
|
|
4912
|
+
envFile: (opts?: ClientEnvFileOpts) => EnvFile;
|
|
4569
4913
|
/**
|
|
4570
4914
|
* Create a new error.
|
|
4571
4915
|
* @param message A brief description of the error.
|
|
@@ -4628,6 +4972,10 @@ export declare class Client extends BaseClient {
|
|
|
4628
4972
|
* @experimental
|
|
4629
4973
|
*/
|
|
4630
4974
|
llm: (opts?: ClientLlmOpts) => LLM;
|
|
4975
|
+
/**
|
|
4976
|
+
* Load a Address from its ID.
|
|
4977
|
+
*/
|
|
4978
|
+
loadAddressFromID: (id: AddressID) => Address;
|
|
4631
4979
|
/**
|
|
4632
4980
|
* Load a Binding from its ID.
|
|
4633
4981
|
*/
|
|
@@ -4636,6 +4984,10 @@ export declare class Client extends BaseClient {
|
|
|
4636
4984
|
* Load a CacheVolume from its ID.
|
|
4637
4985
|
*/
|
|
4638
4986
|
loadCacheVolumeFromID: (id: CacheVolumeID) => CacheVolume;
|
|
4987
|
+
/**
|
|
4988
|
+
* Load a Changeset from its ID.
|
|
4989
|
+
*/
|
|
4990
|
+
loadChangesetFromID: (id: ChangesetID) => Changeset;
|
|
4639
4991
|
/**
|
|
4640
4992
|
* Load a Cloud from its ID.
|
|
4641
4993
|
*/
|
|
@@ -4676,6 +5028,10 @@ export declare class Client extends BaseClient {
|
|
|
4676
5028
|
* Load a EnumValueTypeDef from its ID.
|
|
4677
5029
|
*/
|
|
4678
5030
|
loadEnumValueTypeDefFromID: (id: EnumValueTypeDefID) => EnumValueTypeDef;
|
|
5031
|
+
/**
|
|
5032
|
+
* Load a EnvFile from its ID.
|
|
5033
|
+
*/
|
|
5034
|
+
loadEnvFileFromID: (id: EnvFileID) => EnvFile;
|
|
4679
5035
|
/**
|
|
4680
5036
|
* Load a Env from its ID.
|
|
4681
5037
|
*/
|