@lvce-editor/test-worker 4.35.0 → 4.37.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 +5 -4
- package/dist/testWorkerMain.js +12 -7
- package/package.json +3 -2
package/dist/api.d.ts
CHANGED
|
@@ -138,15 +138,16 @@ declare const openRuntimeStatus: () => Promise<void>;
|
|
|
138
138
|
declare const openJsonValidation: () => Promise<void>;
|
|
139
139
|
declare const openSettings: () => Promise<void>;
|
|
140
140
|
declare const handleScroll: (scrollTop: number) => Promise<void>;
|
|
141
|
-
declare const writeFile: (
|
|
142
|
-
declare const
|
|
141
|
+
declare const writeFile: (uri: string, content: string) => Promise<void>;
|
|
142
|
+
declare const readFile: (uri: string) => Promise<void>;
|
|
143
|
+
declare const mkdir: (uri: string) => Promise<void>;
|
|
143
144
|
declare const remove: (uri: string) => Promise<void>;
|
|
144
145
|
declare const getTmpDir: ({ scheme }?: {
|
|
145
146
|
readonly scheme?: string;
|
|
146
147
|
}) => Promise<string>;
|
|
147
148
|
declare const chmod: (uri: string, permissions: any) => Promise<void>;
|
|
148
149
|
declare const createExecutable: (content: string) => Promise<string>;
|
|
149
|
-
declare const createExecutableFrom: (
|
|
150
|
+
declare const createExecutableFrom: (uri: string) => Promise<string>;
|
|
150
151
|
declare const focusNext$3: () => Promise<void>;
|
|
151
152
|
declare const setValue: (value: string) => Promise<void>;
|
|
152
153
|
declare const setIconTheme: (id: string) => Promise<void>;
|
|
@@ -335,7 +336,7 @@ declare namespace ExtensionDetail {
|
|
|
335
336
|
export { handleScroll, open, openCommands, openFeature, openJsonValidation, openRuntimeStatus, openSettings, openThemes, openWebViews, selectChangelog, selectDetails, selectFeature, selectFeatures, selectTab };
|
|
336
337
|
}
|
|
337
338
|
declare namespace FileSystem {
|
|
338
|
-
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, remove, writeFile };
|
|
339
|
+
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, readFile, remove, writeFile };
|
|
339
340
|
}
|
|
340
341
|
declare namespace FindWidget {
|
|
341
342
|
export { focusNext$3 as focusNext, setValue };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -2304,11 +2304,14 @@ const {
|
|
|
2304
2304
|
Slash
|
|
2305
2305
|
} = Character;
|
|
2306
2306
|
|
|
2307
|
-
const writeFile = async (
|
|
2308
|
-
await invoke('FileSystem.writeFile',
|
|
2307
|
+
const writeFile = async (uri, content) => {
|
|
2308
|
+
await invoke('FileSystem.writeFile', uri, content);
|
|
2309
2309
|
};
|
|
2310
|
-
const
|
|
2311
|
-
await invoke('FileSystem.
|
|
2310
|
+
const readFile = async uri => {
|
|
2311
|
+
await invoke('FileSystem.readFile', uri);
|
|
2312
|
+
};
|
|
2313
|
+
const mkdir = async uri => {
|
|
2314
|
+
await invoke('FileSystem.mkdir', uri);
|
|
2312
2315
|
};
|
|
2313
2316
|
const remove = async uri => {
|
|
2314
2317
|
await invoke('FileSystem.remove', uri);
|
|
@@ -2340,10 +2343,10 @@ const createExecutable = async content => {
|
|
|
2340
2343
|
await chmod(gitPath, '755');
|
|
2341
2344
|
return gitPath;
|
|
2342
2345
|
};
|
|
2343
|
-
const createExecutableFrom = async
|
|
2346
|
+
const createExecutableFrom = async uri => {
|
|
2344
2347
|
// @ts-ignore
|
|
2345
2348
|
const testPath = await invoke('PlatformPaths.getTestPath');
|
|
2346
|
-
const absolutePath = testPath + Slash +
|
|
2349
|
+
const absolutePath = testPath + Slash + uri;
|
|
2347
2350
|
// @ts-ignore
|
|
2348
2351
|
const content = await invoke('Ajax.getText', absolutePath);
|
|
2349
2352
|
return createExecutable(content);
|
|
@@ -2356,6 +2359,7 @@ const TestFrameWorkComponentFileSystem = {
|
|
|
2356
2359
|
createExecutableFrom,
|
|
2357
2360
|
getTmpDir,
|
|
2358
2361
|
mkdir,
|
|
2362
|
+
readFile,
|
|
2359
2363
|
remove,
|
|
2360
2364
|
writeFile
|
|
2361
2365
|
};
|
|
@@ -3317,7 +3321,8 @@ const execute = async href => {
|
|
|
3317
3321
|
};
|
|
3318
3322
|
|
|
3319
3323
|
const commandMap = {
|
|
3320
|
-
'Test.execute': execute
|
|
3324
|
+
'Test.execute': execute,
|
|
3325
|
+
'Test.executeMock': executeMock
|
|
3321
3326
|
};
|
|
3322
3327
|
|
|
3323
3328
|
const listen = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/test-worker",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.37.0",
|
|
4
4
|
"description": "Test Worker",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,5 +9,6 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "Lvce Editor",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "dist/testWorkerMain.js"
|
|
12
|
+
"main": "dist/testWorkerMain.js",
|
|
13
|
+
"types": "dist/api.d.ts"
|
|
13
14
|
}
|