You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a [`FileSystemTree`](#filesystemtree) when the format is `json`, otherwise a `Uint8Array`.
343
+
313
344
### ▸ `teardown`
314
345
315
346
Destroys the WebContainer instance, turning it unusable, and releases its resources. After this, a new WebContainer instance can be obtained by calling [`boot`](#▸-boot).
@@ -895,11 +926,11 @@ A tree-like structure to describe the contents of a folder to be mounted.
895
926
896
927
```ts
897
928
interfaceFileSystemTree {
898
-
[name:string]:FileNode|DirectoryNode;
929
+
[name:string]:FileNode|SymlinkNode|DirectoryNode;
899
930
}
900
931
```
901
932
902
-
Also see [`FileNode`](#filenode) and [`DirectoryNode`](#directorynode).
933
+
Also see [`FileNode`](#filenode), [`SymlinkNode`](#symlinknode), and [`DirectoryNode`](#directorynode).
903
934
904
935
<h4id="filesystemtree-example">
905
936
<aid="filesystemtree-example">Example</a>
@@ -915,6 +946,11 @@ const tree = {
915
946
contents:'const x = 1;',
916
947
},
917
948
},
949
+
'bar.js': {
950
+
file: {
951
+
symlink:'./foo.js',
952
+
},
953
+
},
918
954
'.envrc': {
919
955
file: {
920
956
contents:'ENVIRONMENT=staging'
@@ -950,6 +986,26 @@ Represents a file with contents. Also see [`FileSystemTree`](#filesystemtree).
950
986
951
987
---
952
988
989
+
## `SymlinkNode`
990
+
991
+
```ts
992
+
interfaceSymlinkNode {
993
+
file: {
994
+
symlink:string;
995
+
};
996
+
}
997
+
```
998
+
999
+
### `SymlinkNode` Properties
1000
+
1001
+
<br />
1002
+
1003
+
#### ▸ `file: { symlink: string }`
1004
+
1005
+
Represents a symlink pointing to another location. Also see [`FileSystemTree`](#filesystemtree).
1006
+
1007
+
---
1008
+
953
1009
## `DirectoryNode`
954
1010
955
1011
```ts
@@ -1011,6 +1067,42 @@ The size of the attached terminal.
1011
1067
1012
1068
---
1013
1069
1070
+
## `ExportOptions`
1071
+
1072
+
Options that control exporting data.
1073
+
1074
+
```ts
1075
+
exportinterfaceExportOptions {
1076
+
format?:'json'|'binary'|'zip',
1077
+
includes?:string[];
1078
+
excludes?:string[];
1079
+
}
1080
+
```
1081
+
1082
+
### `ExportOptions` Properties
1083
+
1084
+
<br />
1085
+
1086
+
#### ▸ `format?: 'json' | 'binary' | 'zip'`
1087
+
1088
+
The format of the exported data. The `json` and `binary` format can be used as `tree` when calling [`mount`](#▸-mount).
1089
+
1090
+
The default value is `json`.
1091
+
1092
+
<br />
1093
+
1094
+
#### ▸ `includes?: string[]`
1095
+
1096
+
Globbing patterns to include files from within excluded folders.
1097
+
1098
+
<br />
1099
+
1100
+
#### ▸ `excludes?: string[]`
1101
+
1102
+
Globbing patterns to exclude files from the export.
1103
+
1104
+
---
1105
+
1014
1106
## `WebContainerProcess`
1015
1107
1016
1108
A running process spawned in a [WebContainer](#webcontainer) instance.
0 commit comments