webdriver-bidi-protocol 0.2.11 → 0.3.1

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,5 +1,5 @@
1
1
  version: 2
2
- # bump 3
2
+ # bump 4
3
3
  updates:
4
4
  - package-ecosystem: npm
5
5
  directory: /
@@ -24,6 +24,11 @@ jobs:
24
24
  uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25
25
  with:
26
26
  fetch-depth: 2
27
+ - name: Set up Node.js
28
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
29
+ with:
30
+ cache: npm
31
+ node-version-file: '.nvmrc'
27
32
  - name: Install cddlconv
28
33
  run: cargo install cddlconv@0.1.7
29
34
  - name: Install dependencies
@@ -6,7 +6,7 @@ on:
6
6
  workflow_dispatch:
7
7
  push:
8
8
  tags:
9
- - "*v*"
9
+ - '*v*'
10
10
 
11
11
  jobs:
12
12
  npm-publish:
@@ -22,6 +22,12 @@ jobs:
22
22
  uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23
23
  with:
24
24
  fetch-depth: 2
25
+
26
+ - name: Set up Node.js
27
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
28
+ with:
29
+ cache: npm
30
+ node-version-file: '.nvmrc'
25
31
  - name: Install cddlconv
26
32
  run: cargo install cddlconv@0.1.7
27
33
  - name: Install dependencies
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v24
package/.prettierrc.cjs CHANGED
@@ -1,4 +1,9 @@
1
1
  /**
2
2
  * @type {import('prettier').Config}
3
3
  */
4
- module.exports = require("gts/.prettierrc.json");
4
+ module.exports = {
5
+ bracketSpacing: false,
6
+ singleQuote: true,
7
+ trailingComma: 'all',
8
+ arrowParens: 'avoid',
9
+ };
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.2.11"
2
+ ".": "0.3.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.0...webdriver-bidi-protocol-v0.3.1) (2025-09-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * generation of mapping ([#251](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/251)) ([6c52528](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/6c52528e916d47188659904c67fca20c752f714f))
9
+ * re-generate types based on specifciation updates ([#249](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/249)) ([d625fd2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d625fd2e173294e9a80bd3e90572b85c168c3137))
10
+ * re-generate types based on specifciation updates ([#252](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/252)) ([d045d7b](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d045d7bef06acd6a7df6508ec90f3a178b95070a))
11
+
12
+ ## [0.3.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.11...webdriver-bidi-protocol-v0.3.0) (2025-09-15)
13
+
14
+
15
+ ### Features
16
+
17
+ * automatically generate command mapped types ([#243](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/243)) ([3eb25f3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/3eb25f35e1a17885c1af7a63037de1fc74c83d05))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * re-generate types based on specifciation updates ([#245](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/245)) ([c32b70d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c32b70de5fb4dda145c872025192f5cd59177c34))
23
+
3
24
  ## [0.2.11](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.10...webdriver-bidi-protocol-v0.2.11) (2025-09-10)
4
25
 
5
26
 
package/out/gen/main.d.ts CHANGED
@@ -198,10 +198,6 @@ export declare namespace Session {
198
198
  export declare namespace Session {
199
199
  type UnsubscribeByAttributesRequest = {
200
200
  events: [string, ...string[]];
201
- contexts?: [
202
- BrowsingContext.BrowsingContext,
203
- ...BrowsingContext.BrowsingContext[],
204
- ];
205
201
  };
206
202
  }
207
203
  export declare namespace Session {
@@ -277,7 +273,8 @@ export type BrowserCommand =
277
273
  | Browser.GetClientWindows
278
274
  | Browser.GetUserContexts
279
275
  | Browser.RemoveUserContext
280
- | Browser.SetClientWindowState;
276
+ | Browser.SetClientWindowState
277
+ | Browser.SetDownloadBehavior;
281
278
  export type BrowserResult =
282
279
  | Browser.CreateUserContextResult
283
280
  | Browser.GetUserContextsResult;
@@ -383,6 +380,34 @@ export declare namespace Browser {
383
380
  y?: JsInt;
384
381
  };
385
382
  }
383
+ export declare namespace Browser {
384
+ type SetDownloadBehavior = {
385
+ method: 'browser.setDownloadBehavior';
386
+ params: Browser.SetDownloadBehaviorParameters;
387
+ };
388
+ }
389
+ export declare namespace Browser {
390
+ type SetDownloadBehaviorParameters = {
391
+ downloadBehavior: Browser.DownloadBehavior | null;
392
+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
393
+ };
394
+ }
395
+ export declare namespace Browser {
396
+ type DownloadBehavior =
397
+ | Browser.DownloadBehaviorAllowed
398
+ | Browser.DownloadBehaviorDenied;
399
+ }
400
+ export declare namespace Browser {
401
+ type DownloadBehaviorAllowed = {
402
+ type: 'allowed';
403
+ destinationFolder?: string;
404
+ };
405
+ }
406
+ export declare namespace Browser {
407
+ type DownloadBehaviorDenied = {
408
+ type: 'denied';
409
+ };
410
+ }
386
411
  export type BrowsingContextCommand =
387
412
  | BrowsingContext.Activate
388
413
  | BrowsingContext.CaptureScreenshot
@@ -0,0 +1,289 @@
1
+ import type * as Bidi from './main.ts';
2
+ import type * as BidiPermissions from './permissions.ts';
3
+ import type * as BidiBluetooth from './web-bluetooth.ts';
4
+ export interface CommandMapping {
5
+ 'bluetooth.disableSimulation': {
6
+ params: BidiBluetooth.Bluetooth.DisableSimulationParameters;
7
+ returnType: Bidi.EmptyResult;
8
+ };
9
+ 'bluetooth.handleRequestDevicePrompt': {
10
+ params: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
11
+ returnType: Bidi.EmptyResult;
12
+ };
13
+ 'bluetooth.simulateAdapter': {
14
+ params: BidiBluetooth.Bluetooth.SimulateAdapterParameters;
15
+ returnType: Bidi.EmptyResult;
16
+ };
17
+ 'bluetooth.simulateAdvertisement': {
18
+ params: BidiBluetooth.Bluetooth.SimulateAdvertisementParameters;
19
+ returnType: Bidi.EmptyResult;
20
+ };
21
+ 'bluetooth.simulateCharacteristic': {
22
+ params: BidiBluetooth.Bluetooth.SimulateCharacteristicParameters;
23
+ returnType: Bidi.EmptyResult;
24
+ };
25
+ 'bluetooth.simulateCharacteristicResponse': {
26
+ params: BidiBluetooth.Bluetooth.SimulateCharacteristicResponseParameters;
27
+ returnType: Bidi.EmptyResult;
28
+ };
29
+ 'bluetooth.simulateDescriptor': {
30
+ params: BidiBluetooth.Bluetooth.SimulateDescriptorParameters;
31
+ returnType: Bidi.EmptyResult;
32
+ };
33
+ 'bluetooth.simulateDescriptorResponse': {
34
+ params: BidiBluetooth.Bluetooth.SimulateDescriptorResponseParameters;
35
+ returnType: Bidi.EmptyResult;
36
+ };
37
+ 'bluetooth.simulateGattConnectionResponse': {
38
+ params: BidiBluetooth.Bluetooth.SimulateGattConnectionResponseParameters;
39
+ returnType: Bidi.EmptyResult;
40
+ };
41
+ 'bluetooth.simulateGattDisconnection': {
42
+ params: BidiBluetooth.Bluetooth.SimulateGattDisconnectionParameters;
43
+ returnType: Bidi.EmptyResult;
44
+ };
45
+ 'bluetooth.simulatePreconnectedPeripheral': {
46
+ params: BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheralParameters;
47
+ returnType: Bidi.EmptyResult;
48
+ };
49
+ 'bluetooth.simulateService': {
50
+ params: BidiBluetooth.Bluetooth.SimulateServiceParameters;
51
+ returnType: Bidi.EmptyResult;
52
+ };
53
+ 'browser.close': {
54
+ params: Bidi.Extensible;
55
+ returnType: Bidi.EmptyResult;
56
+ };
57
+ 'browser.createUserContext': {
58
+ params: Bidi.Browser.CreateUserContextParameters;
59
+ returnType: Bidi.Browser.CreateUserContextResult;
60
+ };
61
+ 'browser.getClientWindows': {
62
+ params: Bidi.Extensible;
63
+ returnType: Bidi.Browser.GetClientWindowsResult;
64
+ };
65
+ 'browser.getUserContexts': {
66
+ params: Bidi.Extensible;
67
+ returnType: Bidi.Browser.GetUserContextsResult;
68
+ };
69
+ 'browser.removeUserContext': {
70
+ params: Bidi.Browser.RemoveUserContextParameters;
71
+ returnType: Bidi.EmptyResult;
72
+ };
73
+ 'browser.setClientWindowState': {
74
+ params: Bidi.Browser.SetClientWindowStateParameters;
75
+ returnType: Bidi.EmptyResult;
76
+ };
77
+ 'browser.setDownloadBehavior': {
78
+ params: Bidi.Browser.SetDownloadBehaviorParameters;
79
+ returnType: Bidi.EmptyResult;
80
+ };
81
+ 'browsingContext.activate': {
82
+ params: Bidi.BrowsingContext.ActivateParameters;
83
+ returnType: Bidi.EmptyResult;
84
+ };
85
+ 'browsingContext.captureScreenshot': {
86
+ params: Bidi.BrowsingContext.CaptureScreenshotParameters;
87
+ returnType: Bidi.BrowsingContext.CaptureScreenshotResult;
88
+ };
89
+ 'browsingContext.close': {
90
+ params: Bidi.BrowsingContext.CloseParameters;
91
+ returnType: Bidi.EmptyResult;
92
+ };
93
+ 'browsingContext.create': {
94
+ params: Bidi.BrowsingContext.CreateParameters;
95
+ returnType: Bidi.BrowsingContext.CreateResult;
96
+ };
97
+ 'browsingContext.getTree': {
98
+ params: Bidi.BrowsingContext.GetTreeParameters;
99
+ returnType: Bidi.BrowsingContext.GetTreeResult;
100
+ };
101
+ 'browsingContext.handleUserPrompt': {
102
+ params: Bidi.BrowsingContext.HandleUserPromptParameters;
103
+ returnType: Bidi.EmptyResult;
104
+ };
105
+ 'browsingContext.locateNodes': {
106
+ params: Bidi.BrowsingContext.LocateNodesParameters;
107
+ returnType: Bidi.BrowsingContext.LocateNodesResult;
108
+ };
109
+ 'browsingContext.navigate': {
110
+ params: Bidi.BrowsingContext.NavigateParameters;
111
+ returnType: Bidi.BrowsingContext.NavigateResult;
112
+ };
113
+ 'browsingContext.print': {
114
+ params: Bidi.BrowsingContext.PrintParameters;
115
+ returnType: Bidi.BrowsingContext.PrintResult;
116
+ };
117
+ 'browsingContext.reload': {
118
+ params: Bidi.BrowsingContext.ReloadParameters;
119
+ returnType: Bidi.EmptyResult;
120
+ };
121
+ 'browsingContext.setViewport': {
122
+ params: Bidi.BrowsingContext.SetViewportParameters;
123
+ returnType: Bidi.EmptyResult;
124
+ };
125
+ 'browsingContext.traverseHistory': {
126
+ params: Bidi.BrowsingContext.TraverseHistoryParameters;
127
+ returnType: Bidi.BrowsingContext.TraverseHistoryResult;
128
+ };
129
+ 'emulation.setForcedColorsModeThemeOverride': {
130
+ params: Bidi.Emulation.SetForcedColorsModeThemeOverrideParameters;
131
+ returnType: Bidi.EmptyResult;
132
+ };
133
+ 'emulation.setGeolocationOverride': {
134
+ params: Bidi.Emulation.SetGeolocationOverrideParameters;
135
+ returnType: Bidi.EmptyResult;
136
+ };
137
+ 'emulation.setLocaleOverride': {
138
+ params: Bidi.Emulation.SetLocaleOverrideParameters;
139
+ returnType: Bidi.EmptyResult;
140
+ };
141
+ 'emulation.setScreenOrientationOverride': {
142
+ params: Bidi.Emulation.SetScreenOrientationOverrideParameters;
143
+ returnType: Bidi.EmptyResult;
144
+ };
145
+ 'emulation.setScriptingEnabled': {
146
+ params: Bidi.Emulation.SetScriptingEnabledParameters;
147
+ returnType: Bidi.EmptyResult;
148
+ };
149
+ 'emulation.setTimezoneOverride': {
150
+ params: Bidi.Emulation.SetTimezoneOverrideParameters;
151
+ returnType: Bidi.EmptyResult;
152
+ };
153
+ 'emulation.setUserAgentOverride': {
154
+ params: Bidi.Emulation.SetUserAgentOverrideParameters;
155
+ returnType: Bidi.EmptyResult;
156
+ };
157
+ 'input.performActions': {
158
+ params: Bidi.Input.PerformActionsParameters;
159
+ returnType: Bidi.EmptyResult;
160
+ };
161
+ 'input.releaseActions': {
162
+ params: Bidi.Input.ReleaseActionsParameters;
163
+ returnType: Bidi.EmptyResult;
164
+ };
165
+ 'input.setFiles': {
166
+ params: Bidi.Input.SetFilesParameters;
167
+ returnType: Bidi.EmptyResult;
168
+ };
169
+ 'network.addDataCollector': {
170
+ params: Bidi.Network.AddDataCollectorParameters;
171
+ returnType: Bidi.Network.AddDataCollectorResult;
172
+ };
173
+ 'network.addIntercept': {
174
+ params: Bidi.Network.AddInterceptParameters;
175
+ returnType: Bidi.Network.AddInterceptResult;
176
+ };
177
+ 'network.continueRequest': {
178
+ params: Bidi.Network.ContinueRequestParameters;
179
+ returnType: Bidi.EmptyResult;
180
+ };
181
+ 'network.continueResponse': {
182
+ params: Bidi.Network.ContinueResponseParameters;
183
+ returnType: Bidi.EmptyResult;
184
+ };
185
+ 'network.continueWithAuth': {
186
+ params: Bidi.Network.ContinueWithAuthParameters;
187
+ returnType: Bidi.EmptyResult;
188
+ };
189
+ 'network.disownData': {
190
+ params: Bidi.Network.DisownDataParameters;
191
+ returnType: Bidi.EmptyResult;
192
+ };
193
+ 'network.failRequest': {
194
+ params: Bidi.Network.FailRequestParameters;
195
+ returnType: Bidi.EmptyResult;
196
+ };
197
+ 'network.getData': {
198
+ params: Bidi.Network.GetDataParameters;
199
+ returnType: Bidi.Network.GetDataResult;
200
+ };
201
+ 'network.provideResponse': {
202
+ params: Bidi.Network.ProvideResponseParameters;
203
+ returnType: Bidi.EmptyResult;
204
+ };
205
+ 'network.removeDataCollector': {
206
+ params: Bidi.Network.RemoveDataCollectorParameters;
207
+ returnType: Bidi.EmptyResult;
208
+ };
209
+ 'network.removeIntercept': {
210
+ params: Bidi.Network.RemoveInterceptParameters;
211
+ returnType: Bidi.EmptyResult;
212
+ };
213
+ 'network.setCacheBehavior': {
214
+ params: Bidi.Network.SetCacheBehaviorParameters;
215
+ returnType: Bidi.EmptyResult;
216
+ };
217
+ 'network.setExtraHeaders': {
218
+ params: Bidi.Network.SetExtraHeadersParameters;
219
+ returnType: Bidi.EmptyResult;
220
+ };
221
+ 'permissions.setPermission': {
222
+ params: BidiPermissions.Permissions.SetPermissionParameters;
223
+ returnType: Bidi.EmptyResult;
224
+ };
225
+ 'script.addPreloadScript': {
226
+ params: Bidi.Script.AddPreloadScriptParameters;
227
+ returnType: Bidi.Script.AddPreloadScriptResult;
228
+ };
229
+ 'script.callFunction': {
230
+ params: Bidi.Script.CallFunctionParameters;
231
+ returnType: Bidi.EmptyResult;
232
+ };
233
+ 'script.disown': {
234
+ params: Bidi.Script.DisownParameters;
235
+ returnType: Bidi.EmptyResult;
236
+ };
237
+ 'script.evaluate': {
238
+ params: Bidi.Script.EvaluateParameters;
239
+ returnType: Bidi.Script.EvaluateResult;
240
+ };
241
+ 'script.getRealms': {
242
+ params: Bidi.Script.GetRealmsParameters;
243
+ returnType: Bidi.Script.GetRealmsResult;
244
+ };
245
+ 'script.removePreloadScript': {
246
+ params: Bidi.Script.RemovePreloadScriptParameters;
247
+ returnType: Bidi.EmptyResult;
248
+ };
249
+ 'session.end': {
250
+ params: Bidi.Extensible;
251
+ returnType: Bidi.EmptyResult;
252
+ };
253
+ 'session.new': {
254
+ params: Bidi.Session.NewParameters;
255
+ returnType: Bidi.Session.NewResult;
256
+ };
257
+ 'session.status': {
258
+ params: Bidi.Extensible;
259
+ returnType: Bidi.Session.StatusResult;
260
+ };
261
+ 'session.subscribe': {
262
+ params: Bidi.Session.SubscriptionRequest;
263
+ returnType: Bidi.Session.SubscriptionRequest;
264
+ };
265
+ 'session.unsubscribe': {
266
+ params: Bidi.Session.UnsubscribeParameters;
267
+ returnType: Bidi.EmptyResult;
268
+ };
269
+ 'storage.deleteCookies': {
270
+ params: Bidi.Storage.DeleteCookiesParameters;
271
+ returnType: Bidi.Storage.DeleteCookiesResult;
272
+ };
273
+ 'storage.getCookies': {
274
+ params: Bidi.Storage.GetCookiesParameters;
275
+ returnType: Bidi.Storage.GetCookiesResult;
276
+ };
277
+ 'storage.setCookie': {
278
+ params: Bidi.Storage.SetCookieParameters;
279
+ returnType: Bidi.Storage.SetCookieResult;
280
+ };
281
+ 'webExtension.install': {
282
+ params: Bidi.WebExtension.InstallParameters;
283
+ returnType: Bidi.WebExtension.InstallResult;
284
+ };
285
+ 'webExtension.uninstall': {
286
+ params: Bidi.WebExtension.UninstallParameters;
287
+ returnType: Bidi.EmptyResult;
288
+ };
289
+ }
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', {value: true});