@iwsdk/vite-plugin-dev 1.2.0-rc.0 → 1.2.0-rc.2
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 +3 -1
- package/dist/index.js +337 -46
- package/dist/index.js.map +1 -1
- package/dist/injection/chunks/{index-yQSSsZAQ.js → index-C4Gr7sSi.js} +1 -1
- package/dist/injection/chunks/{injection-template-5pO4YM1n.js → injection-template-zNpCmzi9.js} +38 -38
- package/dist/injection/runtime.js +1 -1
- package/dist/managed-browser/render-mode.d.ts +12 -4
- package/dist/metavr-telemetry.d.ts +7 -0
- package/dist/native-target.d.ts +28 -0
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
export{s as startIwsdkDevRuntime}from"./chunks/injection-template-
|
|
1
|
+
export{s as startIwsdkDevRuntime}from"./chunks/injection-template-zNpCmzi9.js";
|
|
@@ -19,11 +19,19 @@ export type ManagedRenderMode = 'continuous' | 'on-demand';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function resolveManagedRenderMode(headless: boolean, override?: string | undefined, warn?: (message: string) => void): ManagedRenderMode;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* (non-IWSDK runtimes, older @iwsdk/core) are left alone.
|
|
22
|
+
* What {@link requestApplicationRender} saw: the frames were drawn, they were
|
|
23
|
+
* not drawn within the timeout, or the app cannot be asked to draw.
|
|
25
24
|
*/
|
|
26
|
-
export
|
|
25
|
+
export type ApplicationRenderResult = 'drawn' | 'timeout' | 'unsupported';
|
|
26
|
+
/**
|
|
27
|
+
* Draw `frames` fresh frames in the application frame and wait, at most
|
|
28
|
+
* `timeoutMs`, until they have been handed to the compositor. Resolves
|
|
29
|
+
* `'timeout'` when they were not drawn in time, for example because an
|
|
30
|
+
* uncaught error stopped the app's render loop. Apps that do not expose
|
|
31
|
+
* `requestRender` (non-IWSDK runtimes, older @iwsdk/core) are left alone and
|
|
32
|
+
* resolve `'unsupported'`. Rejects when the app's `requestRender` does.
|
|
33
|
+
*/
|
|
34
|
+
export declare function requestApplicationRender(frame: Frame, frames?: number, timeoutMs?: number): Promise<ApplicationRenderResult>;
|
|
27
35
|
/**
|
|
28
36
|
* Whether a frame the application draws stays on its canvas until the next
|
|
29
37
|
* draw. False under the emulator's default per-frame clear in immersive
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Starts up to MAX_RUNNING of the events still waiting and drops the rest.
|
|
9
|
+
* Runs when the process exits, so a burst at the end neither floods the
|
|
10
|
+
* machine nor keeps the process alive. Session and error events wait at the
|
|
11
|
+
* front, so they are the ones started.
|
|
12
|
+
*/
|
|
13
|
+
export declare function flushQueuedTelemetry(): void;
|
|
7
14
|
export declare function reportToolCall(toolName: string, success: boolean, durationMs: number, error?: string, sessionId?: string, clientVersion?: string): void;
|
|
8
15
|
export declare function reportSessionStart(sessionId: string, opts?: {
|
|
9
16
|
iwsdkVersion?: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import type { IwsdkProjectManifestV1 } from '@iwsdk/core/project';
|
|
8
|
+
/**
|
|
9
|
+
* Vite mode of a native (metavr) build: `vite build --mode metavr`, which the
|
|
10
|
+
* `build:metavr` script of projects created with `--metavr-native` runs before
|
|
11
|
+
* `iwer-native pack`. Alpha: the @iwer/native runtime is an opt-in preview.
|
|
12
|
+
*/
|
|
13
|
+
export declare const METAVR_BUILD_MODE = "metavr";
|
|
14
|
+
/** Environment switch for wrappers that cannot pass a Vite mode (`iwsdk build --target metavr`). */
|
|
15
|
+
export declare const BUILD_TARGET_ENV = "IWSDK_BUILD_TARGET";
|
|
16
|
+
/**
|
|
17
|
+
* True for a production build that @iwer/native packs into an APK. Such a build
|
|
18
|
+
* must not carry the IWER emulator: the native runtime provides WebXR itself
|
|
19
|
+
* (IWER host mode), and an injected emulator would take over navigator.xr.
|
|
20
|
+
* `dev.emulator.injectOnBuild` keeps applying to browser builds.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isNativeTargetBuild(command: 'serve' | 'build', mode: string | undefined, env?: Record<string, string | undefined>): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The manifest as the browser bundle sees it. The `native` section configures
|
|
25
|
+
* packaging (package id, signing keystore path, env-var names) and is read by
|
|
26
|
+
* @iwer/native at pack time, so it stays out of the shipped JavaScript.
|
|
27
|
+
*/
|
|
28
|
+
export declare function runtimeProjectManifest(manifest: IwsdkProjectManifestV1): IwsdkProjectManifestV1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iwsdk/vite-plugin-dev",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vite plugin for IWSDK development — XR emulation, AI agent tooling, and Playwright browser",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,26 +43,26 @@
|
|
|
43
43
|
"license": "MIT",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@drawcall/uikitml": "0.1.8",
|
|
46
|
-
"@iwer/devui": "^2.
|
|
46
|
+
"@iwer/devui": "^2.9.0",
|
|
47
47
|
"@preact/signals-core": "^1.12.1",
|
|
48
48
|
"@vitejs/plugin-basic-ssl": "^2.3.0",
|
|
49
49
|
"lucide": "^0.468.0",
|
|
50
50
|
"open": "^10.2.0",
|
|
51
51
|
"playwright": "1.65.1",
|
|
52
52
|
"preact": "^10.29.7",
|
|
53
|
-
"sharp": "^0.35.
|
|
53
|
+
"sharp": "^0.35.5",
|
|
54
54
|
"three": "npm:super-three@0.185.0",
|
|
55
55
|
"three-viewport-gizmo": "^2.2.0",
|
|
56
56
|
"ws": "^8.21.1",
|
|
57
|
-
"@iwsdk/scene-composition": "1.2.0-rc.
|
|
58
|
-
"@iwsdk/core": "1.2.0-rc.
|
|
57
|
+
"@iwsdk/scene-composition": "1.2.0-rc.2",
|
|
58
|
+
"@iwsdk/core": "1.2.0-rc.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@iwer/sem": "^2.
|
|
61
|
+
"@iwer/sem": "^2.9.0",
|
|
62
62
|
"@types/ws": "^8.5.13",
|
|
63
|
-
"iwer": "^2.
|
|
63
|
+
"iwer": "^2.9.0",
|
|
64
64
|
"vitest": "^4.1.10",
|
|
65
|
-
"@iwsdk/cli": "1.2.0-rc.
|
|
65
|
+
"@iwsdk/cli": "1.2.0-rc.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"vite": "^7.0.0"
|