@aixnn/aixautots 0.5.3 → 0.6.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/README.md +40 -23
- package/dist/ScriptStudio-DaCqOF5H.d.ts +43 -0
- package/dist/agent-runner-V60B0is1.d.ts +57 -0
- package/dist/automation-queue-BxrSIkG3.d.ts +72 -0
- package/dist/{chunk-TATL3HTE.js → chunk-B2BOVLI6.js} +82 -21
- package/dist/{chunk-V4MXFPDX.js → chunk-BUW45GM2.js} +3 -3
- package/dist/{chunk-SVK2AY3J.js → chunk-HPKXW5IC.js} +2 -2
- package/dist/{chunk-XNKC6HU3.js → chunk-IZMWCTAP.js} +3 -3
- package/dist/{chunk-OXIM6EYO.js → chunk-JTFZSFFA.js} +1 -1
- package/dist/{chunk-O34SNDQB.js → chunk-JY7O77ML.js} +4 -4
- package/dist/{chunk-IJVNII5N.js → chunk-LAZ3RQ7X.js} +1 -1
- package/dist/{chunk-YOT7HZBU.js → chunk-QPNH7B7P.js} +6 -6
- package/dist/{chunk-UINEPEIE.js → chunk-SSE4IYA4.js} +12 -5
- package/dist/{chunk-BSHHYM72.js → chunk-XB4MS2A4.js} +2 -2
- package/dist/config-CLi5IhmO.d.ts +1380 -0
- package/dist/coords-LPR_MPyp.d.ts +22 -0
- package/dist/core/index.d.ts +135 -0
- package/dist/core/index.js +4 -4
- package/dist/device-normalize-BaThgnH7.d.ts +43 -0
- package/dist/device-session-CVT7OY4H.js +2 -0
- package/dist/i18n/index.d.ts +30 -0
- package/dist/mirror-session-7hrjaLnF.d.ts +108 -0
- package/dist/nav/index.d.ts +19 -0
- package/dist/react/index.d.ts +488 -0
- package/dist/react/index.js +6 -6
- package/dist/script-debugger-DtUGxK9i.d.ts +114 -0
- package/dist/task-agent-runner-DzV_OUZ7.d.ts +160 -0
- package/dist/types-C2WXVcam.d.ts +1005 -0
- package/dist/ui/billing.d.ts +48 -0
- package/dist/ui/billing.js +6 -6
- package/dist/ui/device-create.d.ts +55 -0
- package/dist/ui/device-create.js +7 -7
- package/dist/ui/device-mirror.d.ts +42 -0
- package/dist/ui/device-mirror.js +7 -7
- package/dist/ui/devices.d.ts +223 -0
- package/dist/ui/devices.js +9 -9
- package/dist/ui/editor.d.ts +64 -0
- package/dist/ui/editor.js +7 -7
- package/dist/ui/index.d.ts +108 -0
- package/dist/ui/index.js +83 -90
- package/dist/ui/inspector.d.ts +5 -0
- package/dist/ui/inspector.js +6 -6
- package/dist/ui/market.d.ts +10 -0
- package/dist/ui/market.js +6 -6
- package/dist/ui/mirror.d.ts +52 -0
- package/dist/ui/primitives/index.d.ts +101 -0
- package/dist/ui/script-studio.d.ts +85 -0
- package/dist/ui/script-studio.js +7 -7
- package/dist/ui/scripts.d.ts +18 -0
- package/dist/ui/scripts.js +6 -6
- package/dist/ui/tasks.d.ts +10 -0
- package/dist/ui/tasks.js +9 -9
- package/dist/use-script-run-Diay7ibY.d.ts +50 -0
- package/package.json +112 -40
- package/styles.css +1 -1
- package/tailwind-preset.cjs +3 -3
- package/dist/device-session-W7I3WQXF.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DeviceChannel, ScriptDebugger } from './chunk-
|
|
2
|
-
import { resolveConfig, AixClient, EnvRun } from './chunk-
|
|
1
|
+
import { DeviceChannel, ScriptDebugger } from './chunk-JTFZSFFA.js';
|
|
2
|
+
import { resolveConfig, AixClient, EnvRun } from './chunk-B2BOVLI6.js';
|
|
3
3
|
import React, { createContext, useContext, useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -155,13 +155,14 @@ function useQuery(loader, deps) {
|
|
|
155
155
|
}, []);
|
|
156
156
|
return { data, loading, error, refetch: run, setData: patch };
|
|
157
157
|
}
|
|
158
|
-
function useEnvRun() {
|
|
158
|
+
function useEnvRun(beforeSetup) {
|
|
159
159
|
const cfg = useAixConfig();
|
|
160
160
|
const [reqId, setReqId] = useState(null);
|
|
161
161
|
const [events, setEvents] = useState([]);
|
|
162
162
|
const [finished, setFinished] = useState(null);
|
|
163
163
|
const [done, setDone] = useState(false);
|
|
164
164
|
const [error, setError] = useState(null);
|
|
165
|
+
const [preparing, setPreparing] = useState(false);
|
|
165
166
|
const runRef = useRef(null);
|
|
166
167
|
const mountedRef = useRef(true);
|
|
167
168
|
useEffect(() => {
|
|
@@ -176,6 +177,7 @@ function useEnvRun() {
|
|
|
176
177
|
async (start) => {
|
|
177
178
|
runRef.current?.close();
|
|
178
179
|
if (mountedRef.current) {
|
|
180
|
+
setPreparing(true);
|
|
179
181
|
setError(null);
|
|
180
182
|
setEvents([]);
|
|
181
183
|
setFinished(null);
|
|
@@ -200,18 +202,23 @@ function useEnvRun() {
|
|
|
200
202
|
const err = e instanceof Error ? e : new Error(String(e));
|
|
201
203
|
if (mountedRef.current) setError(err);
|
|
202
204
|
throw err;
|
|
205
|
+
} finally {
|
|
206
|
+
if (mountedRef.current) setPreparing(false);
|
|
203
207
|
}
|
|
204
208
|
},
|
|
205
209
|
[]
|
|
206
210
|
);
|
|
207
|
-
const setup = useCallback((nodeId, input) => run(() =>
|
|
211
|
+
const setup = useCallback((nodeId, input) => run(async () => {
|
|
212
|
+
await beforeSetup?.(nodeId);
|
|
213
|
+
return EnvRun.start(cfg, nodeId, "setup", input);
|
|
214
|
+
}), [cfg, run, beforeSetup]);
|
|
208
215
|
const status = useCallback((nodeId, input) => run(() => EnvRun.start(cfg, nodeId, "status", input)), [cfg, run]);
|
|
209
216
|
const teardown = useCallback((nodeId, input) => run(() => EnvRun.start(cfg, nodeId, "teardown", input)), [cfg, run]);
|
|
210
217
|
const close = useCallback(() => {
|
|
211
218
|
runRef.current?.close();
|
|
212
219
|
runRef.current = null;
|
|
213
220
|
}, []);
|
|
214
|
-
return { reqId, events, finished, done, error, setup, status, teardown, close };
|
|
221
|
+
return { reqId, events, finished, done, error, preparing, setup, status, teardown, close };
|
|
215
222
|
}
|
|
216
223
|
|
|
217
224
|
export { AixProvider, useAixConfig, useClient, useDevice, useEnvRun, useQuery, useScript };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn, Select, Dialog, Button, Input, Badge } from './chunk-EVHTAXQG.js';
|
|
2
|
-
import { useNodes, useDevices } from './chunk-
|
|
3
|
-
import { useClient } from './chunk-
|
|
2
|
+
import { useNodes, useDevices } from './chunk-JY7O77ML.js';
|
|
3
|
+
import { useClient } from './chunk-SSE4IYA4.js';
|
|
4
4
|
import { useMemo, useEffect, useState, useCallback } from 'react';
|
|
5
5
|
import { Server, RefreshCw, Smartphone, Usb, Wifi, Info } from 'lucide-react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|