@midscene/playground 1.0.3-beta-20251221011051.0 → 1.0.3-beta-20251223070556.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/es/adapters/remote-execution.mjs +30 -15
- package/dist/es/adapters/remote-execution.mjs.map +1 -1
- package/dist/es/sdk/index.mjs +11 -7
- package/dist/es/sdk/index.mjs.map +1 -1
- package/dist/es/server.mjs +29 -28
- package/dist/es/server.mjs.map +1 -1
- package/dist/lib/adapters/remote-execution.js +30 -15
- package/dist/lib/adapters/remote-execution.js.map +1 -1
- package/dist/lib/sdk/index.js +11 -7
- package/dist/lib/sdk/index.js.map +1 -1
- package/dist/lib/server.js +29 -28
- package/dist/lib/server.js.map +1 -1
- package/dist/types/adapters/remote-execution.d.ts +13 -4
- package/dist/types/sdk/index.d.ts +5 -2
- package/dist/types/server.d.ts +2 -2
- package/package.json +3 -3
- package/static/index.html +1 -1
- package/static/static/js/{index.6d26bf76.js → index.bd1efdb8.js} +4 -4
- package/static/static/js/index.bd1efdb8.js.map +1 -0
- package/static/static/js/index.6d26bf76.js.map +0 -1
- /package/static/static/js/{index.6d26bf76.js.LICENSE.txt → index.bd1efdb8.js.LICENSE.txt} +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { DeviceAction } from '@midscene/core';
|
|
1
|
+
import type { DeviceAction, ExecutionDump } from '@midscene/core';
|
|
2
2
|
import type { ExecutionOptions, FormValue, ValidationResult } from '../types';
|
|
3
3
|
import { BasePlaygroundAdapter } from './base';
|
|
4
4
|
export declare class RemoteExecutionAdapter extends BasePlaygroundAdapter {
|
|
5
5
|
private serverUrl?;
|
|
6
6
|
private _id?;
|
|
7
|
-
private
|
|
7
|
+
private dumpUpdateCallback?;
|
|
8
|
+
private pollingIntervalId?;
|
|
8
9
|
constructor(serverUrl: string);
|
|
9
|
-
|
|
10
|
+
onDumpUpdate(callback: (dump: string, executionDump?: ExecutionDump) => void): void;
|
|
10
11
|
get id(): string | undefined;
|
|
11
12
|
validateParams(value: FormValue, action: DeviceAction<unknown> | undefined): ValidationResult;
|
|
12
13
|
parseStructuredParams(action: DeviceAction<unknown>, params: Record<string, unknown>, options: ExecutionOptions): Promise<unknown[]>;
|
|
@@ -18,8 +19,16 @@ export declare class RemoteExecutionAdapter extends BasePlaygroundAdapter {
|
|
|
18
19
|
checkStatus(): Promise<boolean>;
|
|
19
20
|
overrideConfig(aiConfig: Record<string, unknown>): Promise<void>;
|
|
20
21
|
getTaskProgress(requestId: string): Promise<{
|
|
21
|
-
|
|
22
|
+
executionDump?: ExecutionDump;
|
|
22
23
|
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Start polling for task progress and invoke dump update callback
|
|
26
|
+
*/
|
|
27
|
+
private startProgressPolling;
|
|
28
|
+
/**
|
|
29
|
+
* Stop polling for task progress
|
|
30
|
+
*/
|
|
31
|
+
private stopProgressPolling;
|
|
23
32
|
cancelTask(requestId: string): Promise<{
|
|
24
33
|
error?: string;
|
|
25
34
|
success?: boolean;
|
|
@@ -13,12 +13,15 @@ export declare class PlaygroundSDK {
|
|
|
13
13
|
checkStatus(): Promise<boolean>;
|
|
14
14
|
overrideConfig(aiConfig: any): Promise<void>;
|
|
15
15
|
getTaskProgress(requestId: string): Promise<{
|
|
16
|
-
|
|
16
|
+
executionDump?: any;
|
|
17
17
|
}>;
|
|
18
18
|
cancelTask(requestId: string): Promise<any>;
|
|
19
19
|
onDumpUpdate(callback: (dump: string, executionDump?: any) => void): void;
|
|
20
20
|
onProgressUpdate(callback: (tip: string) => void): void;
|
|
21
|
-
cancelExecution(requestId: string): Promise<
|
|
21
|
+
cancelExecution(requestId: string): Promise<{
|
|
22
|
+
dump: any | null;
|
|
23
|
+
reportHTML: string | null;
|
|
24
|
+
} | null>;
|
|
22
25
|
getCurrentExecutionData(): Promise<{
|
|
23
26
|
dump: any | null;
|
|
24
27
|
reportHTML: string | null;
|
package/dist/types/server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Server } from 'node:http';
|
|
2
|
+
import type { ExecutionDump } from '@midscene/core';
|
|
2
3
|
import type { Agent as PageAgent } from '@midscene/core/agent';
|
|
3
4
|
import express from 'express';
|
|
4
|
-
import type { ProgressMessage } from './types';
|
|
5
5
|
import 'dotenv/config';
|
|
6
6
|
declare class PlaygroundServer {
|
|
7
7
|
private _app;
|
|
@@ -10,7 +10,7 @@ declare class PlaygroundServer {
|
|
|
10
10
|
port?: number | null;
|
|
11
11
|
agent: PageAgent;
|
|
12
12
|
staticPath: string;
|
|
13
|
-
|
|
13
|
+
taskExecutionDumps: Record<string, ExecutionDump | null>;
|
|
14
14
|
id: string;
|
|
15
15
|
private _initialized;
|
|
16
16
|
private agentFactory?;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/playground",
|
|
3
|
-
"version": "1.0.3-beta-
|
|
3
|
+
"version": "1.0.3-beta-20251223070556.0",
|
|
4
4
|
"description": "Midscene playground utilities for web integration",
|
|
5
5
|
"author": "midscene team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"express": "^4.21.2",
|
|
26
26
|
"open": "10.1.0",
|
|
27
27
|
"uuid": "11.1.0",
|
|
28
|
-
"@midscene/core": "1.0.3-beta-
|
|
29
|
-
"@midscene/shared": "1.0.3-beta-
|
|
28
|
+
"@midscene/core": "1.0.3-beta-20251223070556.0",
|
|
29
|
+
"@midscene/shared": "1.0.3-beta-20251223070556.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@rslib/core": "^0.18.3",
|
package/static/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/430.53da0b9c.js"></script><script defer src="/static/js/index.
|
|
1
|
+
<!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/430.53da0b9c.js"></script><script defer src="/static/js/index.bd1efdb8.js"></script><link href="/static/css/index.f2964c15.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|