@lvce-editor/extension-host-worker 5.20.0 → 5.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1113,7 +1113,7 @@ const rename$1 = async (protocol, oldUri, newUri) => {
|
|
|
1113
1113
|
throw new VError(error, 'Failed to execute file system provider');
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
|
-
const writeFile$
|
|
1116
|
+
const writeFile$3 = async (protocol, uri, content) => {
|
|
1117
1117
|
try {
|
|
1118
1118
|
const provider = get$a(protocol);
|
|
1119
1119
|
return await provider.writeFile(uri, content);
|
|
@@ -2540,6 +2540,10 @@ const append = async (uri, content) => {
|
|
|
2540
2540
|
const rpc = await getOrCreateRpc$1();
|
|
2541
2541
|
await rpc.invoke('FileSystem.appendFile', uri, content);
|
|
2542
2542
|
};
|
|
2543
|
+
const writeFile$2 = async (uri, content) => {
|
|
2544
|
+
const rpc = await getOrCreateRpc$1();
|
|
2545
|
+
await rpc.invoke('FileSystem.writeFile', uri, content);
|
|
2546
|
+
};
|
|
2543
2547
|
|
|
2544
2548
|
const getOutputFilePath = id => {
|
|
2545
2549
|
const outputFolderPath = 'file:///tmp';
|
|
@@ -2563,9 +2567,15 @@ const registerOutputChannel = provider => {
|
|
|
2563
2567
|
...provider,
|
|
2564
2568
|
uri
|
|
2565
2569
|
};
|
|
2570
|
+
let isFirst = true;
|
|
2566
2571
|
return {
|
|
2567
2572
|
async append(text) {
|
|
2568
|
-
|
|
2573
|
+
// TODO race condition?
|
|
2574
|
+
if (isFirst) {
|
|
2575
|
+
isFirst = false;
|
|
2576
|
+
await writeFile$2(uri, '');
|
|
2577
|
+
}
|
|
2578
|
+
await append(uri, text + '\n');
|
|
2569
2579
|
},
|
|
2570
2580
|
getUri() {
|
|
2571
2581
|
return uri;
|
|
@@ -6072,7 +6082,7 @@ const commandMap = {
|
|
|
6072
6082
|
[FileSystemReadDirWithFileTypes]: readDirWithFileTypes$2,
|
|
6073
6083
|
[FileSystemReadFile]: readFile$2,
|
|
6074
6084
|
[FileSystemRename]: rename$1,
|
|
6075
|
-
[FileSystemWriteFile]: writeFile$
|
|
6085
|
+
[FileSystemWriteFile]: writeFile$3,
|
|
6076
6086
|
[FormattingExecuteFormmattingProvider]: executeFormattingProvider,
|
|
6077
6087
|
[HoverExecute]: executeHoverProvider,
|
|
6078
6088
|
[ImplementationExecuteImplementationProvider]: executeImplementationProvider,
|