@kubohiroya/turbowarp-camera-source 0.1.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/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ Mozilla Public License Version 2.0
2
+
3
+ This project is licensed under the Mozilla Public License, version 2.0.
4
+ The full license text is available at https://www.mozilla.org/MPL/2.0/.
package/README.ja.md ADDED
@@ -0,0 +1,62 @@
1
+ # Camera Source
2
+
3
+ [English](README.md)
4
+
5
+ Camera Sourceは、MediaDevicesのカメラストリームを名前付きで複数のTurboWarp拡張へ共有するcapability拡張です。leaseで起動と停止を管理し、TMPose、QR読み取り、将来の画像入力が同じ物理カメラを共有する場合も、姿勢認識用とQR/画像認識用で別カメラを使う場合も、`getUserMedia()`の競合を避けます。
6
+
7
+ **[English guide](https://kubohiroya.github.io/turbowarp-camera-source/)** ·
8
+ **[日本語ガイド](https://kubohiroya.github.io/turbowarp-camera-source/ja/)**
9
+
10
+ ## ブロック
11
+
12
+ - `start shared camera [CAMERA_ID] with device ID [DEVICE_ID]`: 名前付き共有カメラを開始します。
13
+ - `stop shared camera [CAMERA_ID]`: 名前付き共有カメラを停止し、MediaStreamTrackを解放します。
14
+ - `shared camera [CAMERA_ID] is running?`: 指定した共有カメラが起動中かを返します。
15
+ - `shared camera [CAMERA_ID] device ID`: 指定した共有カメラのdevice IDを返します。
16
+ - `refresh camera devices`: カメラデバイス一覧を更新します。
17
+ - `camera device count`: 更新済みカメラデバイス数を返します。
18
+ - `camera device ID at [INDEX]`: 1始まりの位置でカメラdevice IDを返します。
19
+ - `camera device label at [INDEX]`: 1始まりの位置でカメララベルを返します。
20
+
21
+ ## Runtime API
22
+
23
+ 他のunsandboxed拡張は`Scratch.vm.runtime.ext_kubohiroyacamerasource`を参照できます。
24
+
25
+ ```js
26
+ const poseLease = await cameraSource.acquireCamera({
27
+ owner: 'tmpose',
28
+ cameraId: 'pose',
29
+ deviceId: poseDeviceId
30
+ });
31
+ const qrLease = await cameraSource.acquireCamera({
32
+ owner: 'jsqr',
33
+ cameraId: 'qr',
34
+ deviceId: qrDeviceId
35
+ });
36
+ const frame = qrLease.getFrameSource();
37
+ await qrLease.release();
38
+ await poseLease.release();
39
+ ```
40
+
41
+ `cameraId`は`pose`や`qr`のような作品内の役割名です。`deviceId`を指定すると、その役割をブラウザが公開する特定のカメラデバイスへ割り当てられます。`frame.element`は`HTMLVideoElement`です。各カメラは最後のleaseが解放されるまで維持されます。
42
+
43
+ ## 要件
44
+
45
+ - TurboWarpの「Run extension without sandbox」
46
+ - HTTPSまたはlocalhostなどの安全なコンテキスト
47
+ - ブラウザのカメラ許可
48
+
49
+ Camera Sourceはカメラフレームをアップロードせず、画像を保存しません。
50
+
51
+ ## 開発
52
+
53
+ ```bash
54
+ pnpm install
55
+ pnpm check
56
+ ```
57
+
58
+ GitHub Pages用の静的サイトは`docs/`にあり、英語版は`docs/index.html`、日本語版は`docs/ja/index.html`です。
59
+
60
+ ## ライセンス
61
+
62
+ MPL-2.0
package/README.md ADDED
@@ -0,0 +1,188 @@
1
+ # Camera Source
2
+
3
+ [日本語](README.ja.md)
4
+
5
+ Camera Source is a TurboWarp extension capability for sharing named
6
+ `MediaDevices` camera streams across consumers such as pose recognition, image
7
+ classification, and QR scanning. It owns camera startup and shutdown through
8
+ leases so multiple extensions can intentionally share the same physical camera
9
+ or select separate cameras for separate roles.
10
+
11
+ **[Open the user guide](https://kubohiroya.github.io/turbowarp-camera-source/)** ·
12
+ **[日本語ガイド](https://kubohiroya.github.io/turbowarp-camera-source/ja/)**
13
+
14
+ ## Build workflow
15
+
16
+ ```text
17
+ TypeScript source
18
+ -> Vite
19
+ -> vite-plugin-turbowarp-extension
20
+ -> dist/<extension-name>.js
21
+
22
+ Extension config + block definitions
23
+ -> extension manifest plugin
24
+ -> dist/extension-manifest.json
25
+ ```
26
+
27
+ The generated JavaScript is a single, non-minified TurboWarp extension file with Extension Gallery metadata and the standard `(function (Scratch) { ... })(Scratch);` wrapper.
28
+
29
+ ## Blocks
30
+
31
+ <!-- BEGIN GENERATED BLOCKS -->
32
+
33
+ ### `start shared camera [CAMERA_ID] with device ID [DEVICE_ID]`
34
+
35
+ Starts or keeps a named shared MediaDevices camera stream.
36
+
37
+ | Property | Value |
38
+ |---|---|
39
+ | Type | Command |
40
+ | Opcode | `startSharedCamera` |
41
+ | `CAMERA_ID` | String, default: `default` |
42
+ | `DEVICE_ID` | String, default: `` |
43
+
44
+ ### `stop shared camera [CAMERA_ID]`
45
+
46
+ Stops a named shared camera stream and releases its tracks.
47
+
48
+ | Property | Value |
49
+ |---|---|
50
+ | Type | Command |
51
+ | Opcode | `stopSharedCamera` |
52
+ | `CAMERA_ID` | String, default: `default` |
53
+
54
+ ### `shared camera [CAMERA_ID] is running?`
55
+
56
+ Reports whether a named shared camera stream is active.
57
+
58
+ | Property | Value |
59
+ |---|---|
60
+ | Type | Boolean |
61
+ | Opcode | `isCameraRunning` |
62
+ | `CAMERA_ID` | String, default: `default` |
63
+
64
+ ### `shared camera [CAMERA_ID] device ID`
65
+
66
+ Returns the active device ID for a named shared camera when available.
67
+
68
+ | Property | Value |
69
+ |---|---|
70
+ | Type | Reporter |
71
+ | Opcode | `cameraDeviceIdReporter` |
72
+ | `CAMERA_ID` | String, default: `default` |
73
+
74
+ ### `refresh camera devices`
75
+
76
+ Refreshes the browser camera device list.
77
+
78
+ | Property | Value |
79
+ |---|---|
80
+ | Type | Command |
81
+ | Opcode | `refreshCameraDevices` |
82
+
83
+ ### `camera device count`
84
+
85
+ Returns the number of known camera devices after refresh.
86
+
87
+ | Property | Value |
88
+ |---|---|
89
+ | Type | Reporter |
90
+ | Opcode | `cameraDeviceCount` |
91
+
92
+ ### `camera device ID at [INDEX]`
93
+
94
+ Returns the one-based camera device ID at the requested index.
95
+
96
+ | Property | Value |
97
+ |---|---|
98
+ | Type | Reporter |
99
+ | Opcode | `cameraDeviceIdAt` |
100
+ | `INDEX` | String, default: `1` |
101
+
102
+ ### `camera device label at [INDEX]`
103
+
104
+ Returns the one-based camera device label at the requested index when the browser exposes it.
105
+
106
+ | Property | Value |
107
+ |---|---|
108
+ | Type | Reporter |
109
+ | Opcode | `cameraDeviceLabelAt` |
110
+ | `INDEX` | String, default: `1` |
111
+
112
+ <!-- END GENERATED BLOCKS -->
113
+
114
+ ## Development
115
+
116
+ ```bash
117
+ npm install
118
+ npm run check
119
+ ```
120
+
121
+ ## Runtime API
122
+
123
+ Other unsandboxed extensions can access `Scratch.vm.runtime.ext_kubohiroyacamerasource`.
124
+ Use `acquireCamera()` to receive a lease, call `getFrameSource()` while it is active, and
125
+ release the lease when the consumer no longer needs frames. Pass `cameraId` as a
126
+ project-local role name such as `pose` or `qr`; pass `deviceId` when a role should
127
+ bind to a specific browser camera device.
128
+
129
+ ```js
130
+ const poseLease = await cameraSource.acquireCamera({
131
+ owner: 'tmpose',
132
+ cameraId: 'pose',
133
+ deviceId: poseDeviceId
134
+ });
135
+ const qrLease = await cameraSource.acquireCamera({
136
+ owner: 'jsqr',
137
+ cameraId: 'qr',
138
+ deviceId: qrDeviceId
139
+ });
140
+ ```
141
+
142
+ For continuous rebuilding during development:
143
+
144
+ ```bash
145
+ npm run dev
146
+ ```
147
+
148
+ ## Project structure
149
+
150
+ - `src/config.ts`: extension metadata
151
+ - `src/block-definitions.json`: canonical block metadata used by both the extension and README generator
152
+ - `src/extension.ts`: extension implementation
153
+ - `src/extension-manifest.ts`: canonical manifest generator and Vite output plugin
154
+ - `src/index.ts`: extension registration entry point
155
+ - `src/globals.d.ts`: Scratch API declarations used by the project
156
+ - `schemas/extension-manifest.schema.json`: JSON Schema for the generated API contract
157
+ - `scripts/generate-readme.mjs`: updates the generated README block section
158
+ - `tests/`: unit tests
159
+ - `vite.config.ts`: TurboWarp-compatible Vite build configuration
160
+ - `dist/`: tracked TurboWarp JavaScript and extension API manifest
161
+
162
+ ## Extension API manifest
163
+
164
+ Each build emits `dist/extension-manifest.json` with `formatVersion: 1`. It records the extension ID,
165
+ block opcodes and types, argument IDs and types, and menu references in a deterministic order. Tools
166
+ such as `sb3-toolchain` can compare this contract before updating an embedded extension or migrating
167
+ its ID. See [the architecture document](docs/architecture.md) and the
168
+ [JSON Schema](schemas/extension-manifest.schema.json) for the v1 contract.
169
+
170
+ After changing runtime or block metadata, regenerate and verify the tracked release artifacts:
171
+
172
+ ```bash
173
+ npm run check:dist
174
+ ```
175
+
176
+ ## Generated documentation
177
+
178
+ Regenerate block documentation with:
179
+
180
+ ```bash
181
+ npm run docs
182
+ ```
183
+
184
+ `npm run check` also runs `docs:check`, which fails if `README.md` is out of date with `src/block-definitions.json`.
185
+
186
+ ## License
187
+
188
+ MPL-2.0
@@ -0,0 +1,211 @@
1
+ // Name: Camera Source
2
+ // ID: kubohiroyacamerasource
3
+ // Description: Share one MediaDevices camera stream between TurboWarp extensions.
4
+ // By: Hiroya Kubo
5
+ // License: MPL-2.0
6
+
7
+ (function (Scratch) {
8
+ 'use strict';
9
+
10
+ const extensionConfig = {
11
+ id: "kubohiroyacamerasource",
12
+ name: "Camera Source"
13
+ };
14
+ const extensionName = "Camera Source";
15
+ const blocks = [{ "opcode": "startSharedCamera", "blockType": "COMMAND", "text": "start shared camera [CAMERA_ID] with device ID [DEVICE_ID]", "description": "Starts or keeps a named shared MediaDevices camera stream.", "arguments": { "CAMERA_ID": { "type": "STRING", "defaultValue": "default" }, "DEVICE_ID": { "type": "STRING", "defaultValue": "" } } }, { "opcode": "stopSharedCamera", "blockType": "COMMAND", "text": "stop shared camera [CAMERA_ID]", "description": "Stops a named shared camera stream and releases its tracks.", "arguments": { "CAMERA_ID": { "type": "STRING", "defaultValue": "default" } } }, { "opcode": "isCameraRunning", "blockType": "BOOLEAN", "text": "shared camera [CAMERA_ID] is running?", "description": "Reports whether a named shared camera stream is active.", "arguments": { "CAMERA_ID": { "type": "STRING", "defaultValue": "default" } } }, { "opcode": "cameraDeviceIdReporter", "blockType": "REPORTER", "text": "shared camera [CAMERA_ID] device ID", "description": "Returns the active device ID for a named shared camera when available.", "arguments": { "CAMERA_ID": { "type": "STRING", "defaultValue": "default" } } }, { "opcode": "refreshCameraDevices", "blockType": "COMMAND", "text": "refresh camera devices", "description": "Refreshes the browser camera device list.", "arguments": {} }, { "opcode": "cameraDeviceCount", "blockType": "REPORTER", "text": "camera device count", "description": "Returns the number of known camera devices after refresh.", "arguments": {} }, { "opcode": "cameraDeviceIdAt", "blockType": "REPORTER", "text": "camera device ID at [INDEX]", "description": "Returns the one-based camera device ID at the requested index.", "arguments": { "INDEX": { "type": "STRING", "defaultValue": "1" } } }, { "opcode": "cameraDeviceLabelAt", "blockType": "REPORTER", "text": "camera device label at [INDEX]", "description": "Returns the one-based camera device label at the requested index when the browser exposes it.", "arguments": { "INDEX": { "type": "STRING", "defaultValue": "1" } } }];
16
+ const definitions = {
17
+ extensionName,
18
+ blocks
19
+ };
20
+ const blockDefinitions = definitions.blocks;
21
+ const defaultCameraId = "default";
22
+ function mediaDevices() {
23
+ const devices = globalThis.navigator?.mediaDevices;
24
+ if (!devices || typeof devices.getUserMedia !== "function") {
25
+ throw new Error("Camera Source requires navigator.mediaDevices.getUserMedia.");
26
+ }
27
+ return devices;
28
+ }
29
+ function normalizeId(value, fallback = defaultCameraId) {
30
+ const text = String(value ?? "").trim();
31
+ return text || fallback;
32
+ }
33
+ function optionalText(value) {
34
+ return String(value ?? "").trim();
35
+ }
36
+ function indexFrom(value) {
37
+ const parsed = Number.parseInt(String(value ?? ""), 10);
38
+ return Number.isFinite(parsed) ? parsed - 1 : -1;
39
+ }
40
+ function videoConstraints(options) {
41
+ if (typeof options.video === "object" && options.video !== null) {
42
+ return { audio: false, video: options.video };
43
+ }
44
+ if (options.deviceId) {
45
+ return { audio: false, video: { deviceId: { exact: options.deviceId } } };
46
+ }
47
+ return { audio: false, video: options.video ?? true };
48
+ }
49
+ class CameraSourceExtension {
50
+ constructor() {
51
+ this.sessions = /* @__PURE__ */ new Map();
52
+ this.blockLeases = /* @__PURE__ */ new Map();
53
+ this.devices = [];
54
+ Scratch.vm.runtime.ext_kubohiroyacamerasource = this;
55
+ }
56
+ getInfo() {
57
+ return {
58
+ id: extensionConfig.id,
59
+ name: Scratch.translate(definitions.extensionName),
60
+ blocks: blockDefinitions.map((block) => this.toScratchBlock(block))
61
+ };
62
+ }
63
+ isCameraRunning(args = {}) {
64
+ const session = this.sessions.get(normalizeId(args.CAMERA_ID));
65
+ return Boolean(session?.stream);
66
+ }
67
+ cameraDeviceIdReporter(args = {}) {
68
+ return this.sessions.get(normalizeId(args.CAMERA_ID))?.activeDeviceId ?? "";
69
+ }
70
+ async startSharedCamera(args = {}) {
71
+ const cameraId = normalizeId(args.CAMERA_ID);
72
+ if (this.blockLeases.has(cameraId)) return;
73
+ const deviceId = optionalText(args.DEVICE_ID);
74
+ const options = { owner: "camera-source-block", cameraId };
75
+ if (deviceId) options.deviceId = deviceId;
76
+ const lease = await this.acquireCamera(options);
77
+ this.blockLeases.set(cameraId, lease);
78
+ }
79
+ async acquireCamera(options = {}) {
80
+ const cameraId = normalizeId(options.cameraId);
81
+ const session = this.session(cameraId);
82
+ const token = Symbol(String(options.owner ?? "camera-lease"));
83
+ if (session.startPromise) {
84
+ await session.startPromise;
85
+ } else if (!session.stream) {
86
+ await this.start(session, options);
87
+ }
88
+ session.leases.add(token);
89
+ let released = false;
90
+ return Object.freeze({
91
+ getFrameSource: () => this.getFrameSource(session),
92
+ release: async () => {
93
+ if (released) return;
94
+ released = true;
95
+ session.leases.delete(token);
96
+ if (session.leases.size === 0) this.stopCameraSession(session.cameraId);
97
+ }
98
+ });
99
+ }
100
+ stopSharedCamera(args = {}) {
101
+ this.stopCameraSession(normalizeId(args.CAMERA_ID));
102
+ }
103
+ async refreshCameraDevices() {
104
+ this.devices = (await mediaDevices().enumerateDevices()).filter(
105
+ (device) => device.kind === "videoinput"
106
+ );
107
+ }
108
+ cameraDeviceCount() {
109
+ return this.devices.length;
110
+ }
111
+ cameraDeviceIdAt(args) {
112
+ return this.devices[indexFrom(args.INDEX)]?.deviceId ?? "";
113
+ }
114
+ cameraDeviceLabelAt(args) {
115
+ return this.devices[indexFrom(args.INDEX)]?.label ?? "";
116
+ }
117
+ stopAllCameras() {
118
+ for (const cameraId of [...this.sessions.keys()]) {
119
+ this.stopCameraSession(cameraId);
120
+ }
121
+ this.blockLeases.clear();
122
+ }
123
+ session(cameraId) {
124
+ const existing = this.sessions.get(cameraId);
125
+ if (existing) return existing;
126
+ const session = {
127
+ cameraId,
128
+ leases: /* @__PURE__ */ new Set(),
129
+ stream: null,
130
+ video: null,
131
+ startPromise: null,
132
+ mirrored: false,
133
+ activeDeviceId: ""
134
+ };
135
+ this.sessions.set(cameraId, session);
136
+ return session;
137
+ }
138
+ async start(session, options) {
139
+ session.mirrored = options.mirrored === true;
140
+ session.startPromise = (async () => {
141
+ const stream = await mediaDevices().getUserMedia(videoConstraints(options));
142
+ const video = document.createElement("video");
143
+ video.muted = true;
144
+ video.playsInline = true;
145
+ video.srcObject = stream;
146
+ await video.play();
147
+ session.stream = stream;
148
+ session.video = video;
149
+ this.updateActiveDevice(session);
150
+ })();
151
+ try {
152
+ await session.startPromise;
153
+ } catch (error) {
154
+ this.stopCameraSession(session.cameraId);
155
+ throw error;
156
+ }
157
+ }
158
+ updateActiveDevice(session) {
159
+ const track = session.stream?.getVideoTracks()[0] ?? null;
160
+ const settings = track?.getSettings();
161
+ session.activeDeviceId = typeof settings?.deviceId === "string" ? settings.deviceId : "";
162
+ }
163
+ getFrameSource(session) {
164
+ if (!session.video || !session.stream) {
165
+ throw new Error("Shared camera is not running.");
166
+ }
167
+ return Object.freeze({
168
+ kind: "video",
169
+ element: session.video,
170
+ width: session.video.videoWidth,
171
+ height: session.video.videoHeight,
172
+ mirrored: session.mirrored,
173
+ deviceId: session.activeDeviceId
174
+ });
175
+ }
176
+ stopCameraSession(cameraId) {
177
+ const session = this.sessions.get(cameraId);
178
+ if (!session) return;
179
+ session.stream?.getTracks().forEach((track) => track.stop());
180
+ if (session.video) session.video.srcObject = null;
181
+ session.stream = null;
182
+ session.video = null;
183
+ session.startPromise = null;
184
+ session.activeDeviceId = "";
185
+ session.leases.clear();
186
+ this.sessions.delete(cameraId);
187
+ this.blockLeases.delete(cameraId);
188
+ }
189
+ toScratchBlock(block) {
190
+ return {
191
+ opcode: block.opcode,
192
+ blockType: Scratch.BlockType[block.blockType],
193
+ text: Scratch.translate(block.text),
194
+ arguments: Object.fromEntries(
195
+ Object.entries(block.arguments).map(([name, argument]) => [
196
+ name,
197
+ {
198
+ type: Scratch.ArgumentType[argument.type],
199
+ defaultValue: argument.defaultValue
200
+ }
201
+ ])
202
+ )
203
+ };
204
+ }
205
+ }
206
+ if (!Scratch.extensions.unsandboxed) {
207
+ throw new Error(`${extensionConfig.name} must run unsandboxed.`);
208
+ }
209
+ Scratch.extensions.register(new CameraSourceExtension());
210
+
211
+ })(Scratch);
@@ -0,0 +1,81 @@
1
+ {
2
+ "formatVersion": 1,
3
+ "id": "kubohiroyacamerasource",
4
+ "blocks": [
5
+ {
6
+ "opcode": "cameraDeviceCount",
7
+ "blockType": "REPORTER",
8
+ "arguments": []
9
+ },
10
+ {
11
+ "opcode": "cameraDeviceIdAt",
12
+ "blockType": "REPORTER",
13
+ "arguments": [
14
+ {
15
+ "id": "INDEX",
16
+ "type": "STRING"
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "opcode": "cameraDeviceIdReporter",
22
+ "blockType": "REPORTER",
23
+ "arguments": [
24
+ {
25
+ "id": "CAMERA_ID",
26
+ "type": "STRING"
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "opcode": "cameraDeviceLabelAt",
32
+ "blockType": "REPORTER",
33
+ "arguments": [
34
+ {
35
+ "id": "INDEX",
36
+ "type": "STRING"
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "opcode": "isCameraRunning",
42
+ "blockType": "BOOLEAN",
43
+ "arguments": [
44
+ {
45
+ "id": "CAMERA_ID",
46
+ "type": "STRING"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "opcode": "refreshCameraDevices",
52
+ "blockType": "COMMAND",
53
+ "arguments": []
54
+ },
55
+ {
56
+ "opcode": "startSharedCamera",
57
+ "blockType": "COMMAND",
58
+ "arguments": [
59
+ {
60
+ "id": "CAMERA_ID",
61
+ "type": "STRING"
62
+ },
63
+ {
64
+ "id": "DEVICE_ID",
65
+ "type": "STRING"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "opcode": "stopSharedCamera",
71
+ "blockType": "COMMAND",
72
+ "arguments": [
73
+ {
74
+ "id": "CAMERA_ID",
75
+ "type": "STRING"
76
+ }
77
+ ]
78
+ }
79
+ ],
80
+ "menus": []
81
+ }
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@kubohiroya/turbowarp-camera-source",
3
+ "version": "0.1.0",
4
+ "author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
5
+ "description": "A TurboWarp capability extension for sharing one MediaDevices camera stream across extensions.",
6
+ "type": "module",
7
+ "homepage": "https://kubohiroya.github.io/turbowarp-camera-source/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kubohiroya/turbowarp-camera-source.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/kubohiroya/turbowarp-camera-source/issues"
14
+ },
15
+ "exports": {
16
+ "./camera-source.js": "./dist/camera-source.js",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "dist/",
21
+ "README.md",
22
+ "README.ja.md",
23
+ "LICENSE"
24
+ ],
25
+ "unpkg": "./dist/camera-source.js",
26
+ "jsdelivr": "./dist/camera-source.js",
27
+ "publishConfig": {
28
+ "access": "public",
29
+ "registry": "https://registry.npmjs.org/"
30
+ },
31
+ "scripts": {
32
+ "dev": "vite build --watch",
33
+ "typecheck": "tsc --noEmit",
34
+ "build": "vite build",
35
+ "lint": "eslint src tests vite.config.ts",
36
+ "test": "vitest run",
37
+ "docs": "node scripts/generate-readme.mjs",
38
+ "docs:check": "npm run docs && git diff --exit-code -- README.md",
39
+ "docs:pages:check": "node scripts/check-pages.mjs",
40
+ "check": "npm run typecheck && npm run lint && npm run test && npm run docs:check && npm run docs:pages:check && npm run check:dist",
41
+ "check:dist": "npm run build && node scripts/check-dist.mjs"
42
+ },
43
+ "devDependencies": {
44
+ "@eslint/js": "^9.39.5",
45
+ "@kubohiroya/vite-plugin-turbowarp-extension": "0.1.1",
46
+ "@types/node": "^24.13.3",
47
+ "eslint": "^9.39.5",
48
+ "typescript": "^5.9.3",
49
+ "typescript-eslint": "^8.66.0",
50
+ "vite": "^7.3.6",
51
+ "vitest": "^4.1.10"
52
+ },
53
+ "keywords": [
54
+ "turbowarp",
55
+ "scratch",
56
+ "extension",
57
+ "camera",
58
+ "media-devices",
59
+ "getusermedia"
60
+ ]
61
+ }