@lvce-editor/test-worker 5.8.0 → 5.10.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.
- package/dist/api.d.ts +6 -1
- package/dist/testWorkerMain.js +14 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -152,6 +152,10 @@ declare const openRuntimeStatus: () => Promise<void>;
|
|
|
152
152
|
declare const openJsonValidation: () => Promise<void>;
|
|
153
153
|
declare const openSettings: () => Promise<void>;
|
|
154
154
|
declare const handleScroll: (scrollTop: number) => Promise<void>;
|
|
155
|
+
export interface DroppedFileHandle {
|
|
156
|
+
readonly id: number;
|
|
157
|
+
readonly file: File;
|
|
158
|
+
}
|
|
155
159
|
declare const writeFile: (uri: string, content: string) => Promise<void>;
|
|
156
160
|
declare const writeJson: (uri: string, data: any) => Promise<void>;
|
|
157
161
|
declare const readFile: (uri: string) => Promise<string>;
|
|
@@ -163,6 +167,7 @@ declare const getTmpDir: ({ scheme }?: {
|
|
|
163
167
|
declare const chmod: (uri: string, permissions: any) => Promise<void>;
|
|
164
168
|
declare const createExecutable: (content: string) => Promise<string>;
|
|
165
169
|
declare const createExecutableFrom: (uri: string) => Promise<string>;
|
|
170
|
+
declare const createDroppedFileHandle: () => Promise<DroppedFileHandle>;
|
|
166
171
|
declare const focusNext$3: () => Promise<void>;
|
|
167
172
|
declare const focusPrevious$2: () => Promise<void>;
|
|
168
173
|
declare const setReplaceValue: (value: string) => Promise<void>;
|
|
@@ -370,7 +375,7 @@ declare namespace ExtensionDetail {
|
|
|
370
375
|
export { handleClickCategory, handleClickDisable, handleClickEnable, handleClickSetColorTheme, handleScroll, open, openCommands, openFeature, openJsonValidation, openRuntimeStatus, openSettings, openThemes, openWebViews, selectChangelog, selectDetails, selectFeature, selectFeatures, selectTab };
|
|
371
376
|
}
|
|
372
377
|
declare namespace FileSystem {
|
|
373
|
-
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, readFile, remove, writeFile, writeJson };
|
|
378
|
+
export { chmod, createDroppedFileHandle, createExecutable, createExecutableFrom, getTmpDir, mkdir, readFile, remove, writeFile, writeJson };
|
|
374
379
|
}
|
|
375
380
|
declare namespace FindWidget {
|
|
376
381
|
export { focusElement, focusNext$3 as focusNext, focusNextElement, focusPrevious$2 as focusPrevious, focusPreviousElement, replace, replaceAll, setReplaceValue, setValue, toggleMatchCase, toggleMatchWholeWord, toggleReplace, toggleUseRegularExpression };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -2526,10 +2526,24 @@ const createExecutableFrom = async uri => {
|
|
|
2526
2526
|
const content = await invoke$1('Ajax.getText', absolutePath);
|
|
2527
2527
|
return createExecutable(content);
|
|
2528
2528
|
};
|
|
2529
|
+
const createDroppedFileHandle = async () => {
|
|
2530
|
+
const directory = await navigator.storage.getDirectory();
|
|
2531
|
+
const fileHandle = await directory.getFileHandle('dropped-file.txt', {
|
|
2532
|
+
create: true
|
|
2533
|
+
});
|
|
2534
|
+
const file = await fileHandle.getFile();
|
|
2535
|
+
// @ts-ignore
|
|
2536
|
+
const id = await ParentRpc.invoke('FileSystemHandle.addFileHandle', fileHandle);
|
|
2537
|
+
return {
|
|
2538
|
+
file,
|
|
2539
|
+
id
|
|
2540
|
+
};
|
|
2541
|
+
};
|
|
2529
2542
|
|
|
2530
2543
|
const TestFrameWorkComponentFileSystem = {
|
|
2531
2544
|
__proto__: null,
|
|
2532
2545
|
chmod,
|
|
2546
|
+
createDroppedFileHandle,
|
|
2533
2547
|
createExecutable,
|
|
2534
2548
|
createExecutableFrom,
|
|
2535
2549
|
getTmpDir,
|