webdriver-bidi-protocol 0.2.7 → 0.2.8

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.2.7"
2
+ ".": "0.2.8"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.8](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.7...webdriver-bidi-protocol-v0.2.8) (2025-09-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * re-generate types based on specifciation updates ([#233](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/233)) ([42c83fd](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/42c83fd2e364a3097da2494b4d2f7e1a6419358b))
9
+ * use a helper for commands and events ([#231](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/231)) ([e302d10](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e302d10cf32e02295b5910a541141d5435c80292))
10
+
3
11
  ## [0.2.7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.6...webdriver-bidi-protocol-v0.2.7) (2025-09-08)
4
12
 
5
13
 
package/out/index.d.ts CHANGED
@@ -9,22 +9,20 @@ import * as BidiBluetooth from './gen/web-bluetooth.js';
9
9
  export * from './gen/main.js';
10
10
  export * from './gen/permissions.js';
11
11
  export * from './gen/web-bluetooth.js';
12
+ type ExternalSpecCommand<T> = {
13
+ id: Bidi.JsUint;
14
+ } & T;
15
+ type ExternalSpecEvent<T> = {
16
+ type: 'event';
17
+ } & T &
18
+ Bidi.Extensible;
12
19
  export type Command =
13
20
  | Bidi.Command
14
- | BidiPermissions.Permissions.SetPermission
15
- | BidiBluetooth.Bluetooth.SimulateAdapter
16
- | BidiBluetooth.Bluetooth.HandleRequestDevicePrompt
17
- | BidiBluetooth.Bluetooth.SimulateAdvertisement
18
- | BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheral
19
- | BidiBluetooth.Bluetooth.DisableSimulation
20
- | BidiBluetooth.Bluetooth.SimulateGattDisconnection
21
- | BidiBluetooth.Bluetooth.SimulateDescriptorResponse;
21
+ | ExternalSpecCommand<BidiPermissions.PermissionsCommand>
22
+ | ExternalSpecCommand<BidiBluetooth.BluetoothCommand>;
22
23
  export type Event =
23
24
  | Bidi.Event
24
- | ({
25
- type: 'event';
26
- } & BidiBluetooth.Bluetooth.RequestDevicePromptUpdated &
27
- Bidi.Extensible);
25
+ | ExternalSpecEvent<BidiBluetooth.BluetoothEvent>;
28
26
  export interface Commands {
29
27
  'bluetooth.handleRequestDevicePrompt': {
30
28
  params: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdriver-bidi-protocol",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
package/src/index.ts CHANGED
@@ -12,22 +12,27 @@ export * from './gen/main.js';
12
12
  export * from './gen/permissions.js';
13
13
  export * from './gen/web-bluetooth.js';
14
14
 
15
+ type ExternalSpecCommand<T> = {
16
+ // id is defined by the main WebDriver BiDi spec and extension specs do
17
+ // not re-define it. Therefore, it's not part of generated types.
18
+ id: Bidi.JsUint;
19
+ } & T;
20
+
21
+ type ExternalSpecEvent<T> = {
22
+ // type is defined by the main WebDriver BiDi spec and extension specs do
23
+ // not re-define it. Therefore, it's not part of generated types.
24
+ type: 'event';
25
+ } & T &
26
+ Bidi.Extensible;
27
+
15
28
  export type Command =
16
29
  | Bidi.Command
17
- | BidiPermissions.Permissions.SetPermission
18
- | BidiBluetooth.Bluetooth.SimulateAdapter
19
- | BidiBluetooth.Bluetooth.HandleRequestDevicePrompt
20
- | BidiBluetooth.Bluetooth.SimulateAdvertisement
21
- | BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheral
22
- | BidiBluetooth.Bluetooth.DisableSimulation
23
- | BidiBluetooth.Bluetooth.SimulateGattDisconnection
24
- | BidiBluetooth.Bluetooth.SimulateDescriptorResponse;
30
+ | ExternalSpecCommand<BidiPermissions.PermissionsCommand>
31
+ | ExternalSpecCommand<BidiBluetooth.BluetoothCommand>;
32
+
25
33
  export type Event =
26
34
  | Bidi.Event
27
- | ({
28
- type: 'event';
29
- } & BidiBluetooth.Bluetooth.RequestDevicePromptUpdated &
30
- Bidi.Extensible);
35
+ | ExternalSpecEvent<BidiBluetooth.BluetoothEvent>;
31
36
 
32
37
  // TODO: is there a way to generate this mapping?
33
38
  export interface Commands {