chromium-bidi 2.1.0 → 2.1.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/.browser CHANGED
@@ -1 +1 @@
1
- chrome@135.0.7039.0
1
+ chrome@135.0.7046.0
@@ -27,8 +27,12 @@ class WebExtensionProcessor {
27
27
  this.#browserCdpClient = browserCdpClient;
28
28
  }
29
29
  async install(params) {
30
- if (!params.extensionData.path) {
31
- throw new protocol_js_1.UnsupportedOperationException('Archived and Base64 extensions are not supported');
30
+ switch (params.extensionData.type) {
31
+ case 'archivePath':
32
+ case 'base64':
33
+ throw new protocol_js_1.UnsupportedOperationException('Archived and Base64 extensions are not supported');
34
+ case 'path':
35
+ break;
32
36
  }
33
37
  try {
34
38
  const response = await this.#browserCdpClient.sendCommand('Extensions.loadUnpacked', {
@@ -55,7 +59,7 @@ class WebExtensionProcessor {
55
59
  catch (err) {
56
60
  if (err.message ===
57
61
  'Uninstall failed. Reason: could not find extension.') {
58
- throw new protocol_js_1.InvalidWebExtensionException('no such web extension');
62
+ throw new protocol_js_1.NoSuchWebExtensionException('no such web extension');
59
63
  }
60
64
  throw err;
61
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WebExtensionProcessor.js","sourceRoot":"","sources":["../../../../../src/bidiMapper/modules/webExtension/WebExtensionProcessor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAGH,+DAKuC;AAEvC;;GAEG;AACH,MAAa,qBAAqB;IACvB,iBAAiB,CAAY;IAEtC,YAAY,gBAA2B;QACrC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,OAAO,CACX,MAAsC;QAEtC,IAAI,CAAE,MAAM,CAAC,aAA4C,CAAC,IAAI,EAAE,CAAC;YAC/D,MAAM,IAAI,2CAA6B,CACrC,kDAAkD,CACnD,CAAC;QACJ,CAAC;QACD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACvD,yBAAyB,EACzB;gBACE,IAAI,EAAG,MAAM,CAAC,aAA4C,CAAC,IAAI;aAChE,CACF,CAAC;YACF,OAAO;gBACL,SAAS,EAAE,QAAQ,CAAC,EAAE;aACvB,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAK,GAAa,CAAC,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;gBAC/D,MAAM,IAAI,0CAA4B,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CACb,MAAwC;QAExC,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,sBAAsB,EAAE;gBAC/D,EAAE,EAAE,MAAM,CAAC,SAAS;aACrB,CAAC,CAAC;YACH,OAAO,EAAE,CAAC;QACZ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IACG,GAAa,CAAC,OAAO;gBACtB,qDAAqD,EACrD,CAAC;gBACD,MAAM,IAAI,0CAA4B,CAAC,uBAAuB,CAAC,CAAC;YAClE,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;CACF;AAnDD,sDAmDC"}
1
+ {"version":3,"file":"WebExtensionProcessor.js","sourceRoot":"","sources":["../../../../../src/bidiMapper/modules/webExtension/WebExtensionProcessor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAGH,+DAMuC;AAEvC;;GAEG;AACH,MAAa,qBAAqB;IACvB,iBAAiB,CAAY;IAEtC,YAAY,gBAA2B;QACrC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,OAAO,CACX,MAAsC;QAEtC,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;YAClC,KAAK,aAAa,CAAC;YACnB,KAAK,QAAQ;gBACX,MAAM,IAAI,2CAA6B,CACrC,kDAAkD,CACnD,CAAC;YACJ,KAAK,MAAM;gBACT,MAAM;QACV,CAAC;QACD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACvD,yBAAyB,EACzB;gBACE,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,IAAI;aAChC,CACF,CAAC;YACF,OAAO;gBACL,SAAS,EAAE,QAAQ,CAAC,EAAE;aACvB,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAK,GAAa,CAAC,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;gBAC/D,MAAM,IAAI,0CAA4B,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CACb,MAAwC;QAExC,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,sBAAsB,EAAE;gBAC/D,EAAE,EAAE,MAAM,CAAC,SAAS;aACrB,CAAC,CAAC;YACH,OAAO,EAAE,CAAC;QACZ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IACG,GAAa,CAAC,OAAO;gBACtB,qDAAqD,EACrD,CAAC;gBACD,MAAM,IAAI,yCAA2B,CAAC,uBAAuB,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;CACF;AAvDD,sDAuDC"}
@@ -330,9 +330,9 @@ export declare namespace Browser {
330
330
  };
331
331
  }
332
332
  export declare namespace Browser {
333
- type SetClientWindowStateParameters = ({
333
+ type SetClientWindowStateParameters = {
334
334
  clientWindow: Browser.ClientWindow;
335
- } & Browser.ClientWindowNamedState) | Browser.ClientWindowRectState;
335
+ } & (Browser.ClientWindowNamedState | Browser.ClientWindowRectState);
336
336
  }
337
337
  export declare namespace Browser {
338
338
  type ClientWindowNamedState = {
@@ -4506,19 +4506,19 @@ export declare const CommandSchema: z.ZodLazy<z.ZodIntersection<z.ZodIntersectio
4506
4506
  method: "browser.removeUserContext";
4507
4507
  }>>, z.ZodLazy<z.ZodObject<{
4508
4508
  method: z.ZodLiteral<"browser.setClientWindowState">;
4509
- params: z.ZodLazy<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
4509
+ params: z.ZodLazy<z.ZodIntersection<z.ZodObject<{
4510
4510
  clientWindow: z.ZodLazy<z.ZodString>;
4511
4511
  }, "strip", z.ZodTypeAny, {
4512
4512
  clientWindow: string;
4513
4513
  }, {
4514
4514
  clientWindow: string;
4515
- }>, z.ZodLazy<z.ZodObject<{
4515
+ }>, z.ZodUnion<[z.ZodLazy<z.ZodObject<{
4516
4516
  state: z.ZodEnum<["fullscreen", "maximized", "minimized"]>;
4517
4517
  }, "strip", z.ZodTypeAny, {
4518
4518
  state: "minimized" | "maximized" | "fullscreen";
4519
4519
  }, {
4520
4520
  state: "minimized" | "maximized" | "fullscreen";
4521
- }>>>, z.ZodLazy<z.ZodObject<{
4521
+ }>>, z.ZodLazy<z.ZodObject<{
4522
4522
  state: z.ZodLiteral<"normal">;
4523
4523
  width: z.ZodOptional<z.ZodNumber>;
4524
4524
  height: z.ZodOptional<z.ZodNumber>;
@@ -4536,32 +4536,32 @@ export declare const CommandSchema: z.ZodLazy<z.ZodIntersection<z.ZodIntersectio
4536
4536
  y?: number | undefined;
4537
4537
  width?: number | undefined;
4538
4538
  height?: number | undefined;
4539
- }>>]>>;
4539
+ }>>]>>>;
4540
4540
  }, "strip", z.ZodTypeAny, {
4541
- params: ({
4541
+ params: {
4542
4542
  clientWindow: string;
4543
- } & {
4543
+ } & ({
4544
4544
  state: "minimized" | "maximized" | "fullscreen";
4545
- }) | {
4545
+ } | {
4546
4546
  state: "normal";
4547
4547
  x?: number | undefined;
4548
4548
  y?: number | undefined;
4549
4549
  width?: number | undefined;
4550
4550
  height?: number | undefined;
4551
- };
4551
+ });
4552
4552
  method: "browser.setClientWindowState";
4553
4553
  }, {
4554
- params: ({
4554
+ params: {
4555
4555
  clientWindow: string;
4556
- } & {
4556
+ } & ({
4557
4557
  state: "minimized" | "maximized" | "fullscreen";
4558
- }) | {
4558
+ } | {
4559
4559
  state: "normal";
4560
4560
  x?: number | undefined;
4561
4561
  y?: number | undefined;
4562
4562
  width?: number | undefined;
4563
4563
  height?: number | undefined;
4564
- };
4564
+ });
4565
4565
  method: "browser.setClientWindowState";
4566
4566
  }>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>, z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.ZodObject<{
4567
4567
  method: z.ZodLiteral<"browsingContext.activate">;
@@ -14778,19 +14778,19 @@ export declare const CommandDataSchema: z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.ZodUni
14778
14778
  method: "browser.removeUserContext";
14779
14779
  }>>, z.ZodLazy<z.ZodObject<{
14780
14780
  method: z.ZodLiteral<"browser.setClientWindowState">;
14781
- params: z.ZodLazy<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
14781
+ params: z.ZodLazy<z.ZodIntersection<z.ZodObject<{
14782
14782
  clientWindow: z.ZodLazy<z.ZodString>;
14783
14783
  }, "strip", z.ZodTypeAny, {
14784
14784
  clientWindow: string;
14785
14785
  }, {
14786
14786
  clientWindow: string;
14787
- }>, z.ZodLazy<z.ZodObject<{
14787
+ }>, z.ZodUnion<[z.ZodLazy<z.ZodObject<{
14788
14788
  state: z.ZodEnum<["fullscreen", "maximized", "minimized"]>;
14789
14789
  }, "strip", z.ZodTypeAny, {
14790
14790
  state: "minimized" | "maximized" | "fullscreen";
14791
14791
  }, {
14792
14792
  state: "minimized" | "maximized" | "fullscreen";
14793
- }>>>, z.ZodLazy<z.ZodObject<{
14793
+ }>>, z.ZodLazy<z.ZodObject<{
14794
14794
  state: z.ZodLiteral<"normal">;
14795
14795
  width: z.ZodOptional<z.ZodNumber>;
14796
14796
  height: z.ZodOptional<z.ZodNumber>;
@@ -14808,32 +14808,32 @@ export declare const CommandDataSchema: z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.ZodUni
14808
14808
  y?: number | undefined;
14809
14809
  width?: number | undefined;
14810
14810
  height?: number | undefined;
14811
- }>>]>>;
14811
+ }>>]>>>;
14812
14812
  }, "strip", z.ZodTypeAny, {
14813
- params: ({
14813
+ params: {
14814
14814
  clientWindow: string;
14815
- } & {
14815
+ } & ({
14816
14816
  state: "minimized" | "maximized" | "fullscreen";
14817
- }) | {
14817
+ } | {
14818
14818
  state: "normal";
14819
14819
  x?: number | undefined;
14820
14820
  y?: number | undefined;
14821
14821
  width?: number | undefined;
14822
14822
  height?: number | undefined;
14823
- };
14823
+ });
14824
14824
  method: "browser.setClientWindowState";
14825
14825
  }, {
14826
- params: ({
14826
+ params: {
14827
14827
  clientWindow: string;
14828
- } & {
14828
+ } & ({
14829
14829
  state: "minimized" | "maximized" | "fullscreen";
14830
- }) | {
14830
+ } | {
14831
14831
  state: "normal";
14832
14832
  x?: number | undefined;
14833
14833
  y?: number | undefined;
14834
14834
  width?: number | undefined;
14835
14835
  height?: number | undefined;
14836
- };
14836
+ });
14837
14837
  method: "browser.setClientWindowState";
14838
14838
  }>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>, z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.ZodObject<{
14839
14839
  method: z.ZodLiteral<"browsingContext.activate">;
@@ -29393,19 +29393,19 @@ export declare const BrowserCommandSchema: z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.Zod
29393
29393
  method: "browser.removeUserContext";
29394
29394
  }>>, z.ZodLazy<z.ZodObject<{
29395
29395
  method: z.ZodLiteral<"browser.setClientWindowState">;
29396
- params: z.ZodLazy<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
29396
+ params: z.ZodLazy<z.ZodIntersection<z.ZodObject<{
29397
29397
  clientWindow: z.ZodLazy<z.ZodString>;
29398
29398
  }, "strip", z.ZodTypeAny, {
29399
29399
  clientWindow: string;
29400
29400
  }, {
29401
29401
  clientWindow: string;
29402
- }>, z.ZodLazy<z.ZodObject<{
29402
+ }>, z.ZodUnion<[z.ZodLazy<z.ZodObject<{
29403
29403
  state: z.ZodEnum<["fullscreen", "maximized", "minimized"]>;
29404
29404
  }, "strip", z.ZodTypeAny, {
29405
29405
  state: "minimized" | "maximized" | "fullscreen";
29406
29406
  }, {
29407
29407
  state: "minimized" | "maximized" | "fullscreen";
29408
- }>>>, z.ZodLazy<z.ZodObject<{
29408
+ }>>, z.ZodLazy<z.ZodObject<{
29409
29409
  state: z.ZodLiteral<"normal">;
29410
29410
  width: z.ZodOptional<z.ZodNumber>;
29411
29411
  height: z.ZodOptional<z.ZodNumber>;
@@ -29423,32 +29423,32 @@ export declare const BrowserCommandSchema: z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.Zod
29423
29423
  y?: number | undefined;
29424
29424
  width?: number | undefined;
29425
29425
  height?: number | undefined;
29426
- }>>]>>;
29426
+ }>>]>>>;
29427
29427
  }, "strip", z.ZodTypeAny, {
29428
- params: ({
29428
+ params: {
29429
29429
  clientWindow: string;
29430
- } & {
29430
+ } & ({
29431
29431
  state: "minimized" | "maximized" | "fullscreen";
29432
- }) | {
29432
+ } | {
29433
29433
  state: "normal";
29434
29434
  x?: number | undefined;
29435
29435
  y?: number | undefined;
29436
29436
  width?: number | undefined;
29437
29437
  height?: number | undefined;
29438
- };
29438
+ });
29439
29439
  method: "browser.setClientWindowState";
29440
29440
  }, {
29441
- params: ({
29441
+ params: {
29442
29442
  clientWindow: string;
29443
- } & {
29443
+ } & ({
29444
29444
  state: "minimized" | "maximized" | "fullscreen";
29445
- }) | {
29445
+ } | {
29446
29446
  state: "normal";
29447
29447
  x?: number | undefined;
29448
29448
  y?: number | undefined;
29449
29449
  width?: number | undefined;
29450
29450
  height?: number | undefined;
29451
- };
29451
+ });
29452
29452
  method: "browser.setClientWindowState";
29453
29453
  }>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>;
29454
29454
  export declare const BrowserResultSchema: z.ZodLazy<z.ZodUnion<[z.ZodLazy<z.ZodLazy<z.ZodObject<{
@@ -29675,19 +29675,19 @@ export declare namespace Browser {
29675
29675
  export declare namespace Browser {
29676
29676
  const SetClientWindowStateSchema: z.ZodLazy<z.ZodObject<{
29677
29677
  method: z.ZodLiteral<"browser.setClientWindowState">;
29678
- params: z.ZodLazy<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
29678
+ params: z.ZodLazy<z.ZodIntersection<z.ZodObject<{
29679
29679
  clientWindow: z.ZodLazy<z.ZodString>;
29680
29680
  }, "strip", z.ZodTypeAny, {
29681
29681
  clientWindow: string;
29682
29682
  }, {
29683
29683
  clientWindow: string;
29684
- }>, z.ZodLazy<z.ZodObject<{
29684
+ }>, z.ZodUnion<[z.ZodLazy<z.ZodObject<{
29685
29685
  state: z.ZodEnum<["fullscreen", "maximized", "minimized"]>;
29686
29686
  }, "strip", z.ZodTypeAny, {
29687
29687
  state: "minimized" | "maximized" | "fullscreen";
29688
29688
  }, {
29689
29689
  state: "minimized" | "maximized" | "fullscreen";
29690
- }>>>, z.ZodLazy<z.ZodObject<{
29690
+ }>>, z.ZodLazy<z.ZodObject<{
29691
29691
  state: z.ZodLiteral<"normal">;
29692
29692
  width: z.ZodOptional<z.ZodNumber>;
29693
29693
  height: z.ZodOptional<z.ZodNumber>;
@@ -29705,49 +29705,49 @@ export declare namespace Browser {
29705
29705
  y?: number | undefined;
29706
29706
  width?: number | undefined;
29707
29707
  height?: number | undefined;
29708
- }>>]>>;
29708
+ }>>]>>>;
29709
29709
  }, "strip", z.ZodTypeAny, {
29710
- params: ({
29710
+ params: {
29711
29711
  clientWindow: string;
29712
- } & {
29712
+ } & ({
29713
29713
  state: "minimized" | "maximized" | "fullscreen";
29714
- }) | {
29714
+ } | {
29715
29715
  state: "normal";
29716
29716
  x?: number | undefined;
29717
29717
  y?: number | undefined;
29718
29718
  width?: number | undefined;
29719
29719
  height?: number | undefined;
29720
- };
29720
+ });
29721
29721
  method: "browser.setClientWindowState";
29722
29722
  }, {
29723
- params: ({
29723
+ params: {
29724
29724
  clientWindow: string;
29725
- } & {
29725
+ } & ({
29726
29726
  state: "minimized" | "maximized" | "fullscreen";
29727
- }) | {
29727
+ } | {
29728
29728
  state: "normal";
29729
29729
  x?: number | undefined;
29730
29730
  y?: number | undefined;
29731
29731
  width?: number | undefined;
29732
29732
  height?: number | undefined;
29733
- };
29733
+ });
29734
29734
  method: "browser.setClientWindowState";
29735
29735
  }>>;
29736
29736
  }
29737
29737
  export declare namespace Browser {
29738
- const SetClientWindowStateParametersSchema: z.ZodLazy<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
29738
+ const SetClientWindowStateParametersSchema: z.ZodLazy<z.ZodIntersection<z.ZodObject<{
29739
29739
  clientWindow: z.ZodLazy<z.ZodString>;
29740
29740
  }, "strip", z.ZodTypeAny, {
29741
29741
  clientWindow: string;
29742
29742
  }, {
29743
29743
  clientWindow: string;
29744
- }>, z.ZodLazy<z.ZodObject<{
29744
+ }>, z.ZodUnion<[z.ZodLazy<z.ZodObject<{
29745
29745
  state: z.ZodEnum<["fullscreen", "maximized", "minimized"]>;
29746
29746
  }, "strip", z.ZodTypeAny, {
29747
29747
  state: "minimized" | "maximized" | "fullscreen";
29748
29748
  }, {
29749
29749
  state: "minimized" | "maximized" | "fullscreen";
29750
- }>>>, z.ZodLazy<z.ZodObject<{
29750
+ }>>, z.ZodLazy<z.ZodObject<{
29751
29751
  state: z.ZodLiteral<"normal">;
29752
29752
  width: z.ZodOptional<z.ZodNumber>;
29753
29753
  height: z.ZodOptional<z.ZodNumber>;
@@ -29765,7 +29765,7 @@ export declare namespace Browser {
29765
29765
  y?: number | undefined;
29766
29766
  width?: number | undefined;
29767
29767
  height?: number | undefined;
29768
- }>>]>>;
29768
+ }>>]>>>;
29769
29769
  }
29770
29770
  export declare namespace Browser {
29771
29771
  const ClientWindowNamedStateSchema: z.ZodLazy<z.ZodObject<{
@@ -414,14 +414,14 @@ var Browser;
414
414
  }));
415
415
  })(Browser || (exports.Browser = Browser = {}));
416
416
  (function (Browser) {
417
- Browser.SetClientWindowStateParametersSchema = zod_1.default.lazy(() => zod_1.default.union([
418
- zod_1.default
419
- .object({
420
- clientWindow: Browser.ClientWindowSchema,
421
- })
422
- .and(Browser.ClientWindowNamedStateSchema),
417
+ Browser.SetClientWindowStateParametersSchema = zod_1.default.lazy(() => zod_1.default
418
+ .object({
419
+ clientWindow: Browser.ClientWindowSchema,
420
+ })
421
+ .and(zod_1.default.union([
422
+ Browser.ClientWindowNamedStateSchema,
423
423
  Browser.ClientWindowRectStateSchema,
424
- ]));
424
+ ])));
425
425
  })(Browser || (exports.Browser = Browser = {}));
426
426
  (function (Browser) {
427
427
  Browser.ClientWindowNamedStateSchema = zod_1.default.lazy(() => zod_1.default.object({