devtools-protocol 0.0.1139932 → 0.0.1140464

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.
@@ -2161,9 +2161,31 @@
2161
2161
  "description": "Unique script identifier.",
2162
2162
  "type": "string"
2163
2163
  },
2164
+ {
2165
+ "id": "SerializationOptions",
2166
+ "description": "Represents options for serialization. Overrides `generatePreview`, `returnByValue` and\n`generateWebDriverValue`.",
2167
+ "type": "object",
2168
+ "properties": [
2169
+ {
2170
+ "name": "serialization",
2171
+ "type": "string",
2172
+ "enum": [
2173
+ "deep",
2174
+ "json",
2175
+ "idOnly"
2176
+ ]
2177
+ },
2178
+ {
2179
+ "name": "maxDepth",
2180
+ "description": "Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.",
2181
+ "optional": true,
2182
+ "type": "integer"
2183
+ }
2184
+ ]
2185
+ },
2164
2186
  {
2165
2187
  "id": "DeepSerializedValue",
2166
- "description": "Represents the value serialiazed by the WebDriver BiDi specification\nhttps://goo.gle/browser-automation-deepserialization.",
2188
+ "description": "Represents deep serialized value.",
2167
2189
  "type": "object",
2168
2190
  "properties": [
2169
2191
  {
@@ -2296,7 +2318,14 @@
2296
2318
  },
2297
2319
  {
2298
2320
  "name": "webDriverValue",
2299
- "description": "WebDriver BiDi representation of the value.",
2321
+ "description": "Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value.",
2322
+ "deprecated": true,
2323
+ "optional": true,
2324
+ "$ref": "DeepSerializedValue"
2325
+ },
2326
+ {
2327
+ "name": "deepSerializedValue",
2328
+ "description": "Deep serialized value.",
2300
2329
  "experimental": true,
2301
2330
  "optional": true,
2302
2331
  "$ref": "DeepSerializedValue"
@@ -2913,7 +2942,7 @@
2913
2942
  },
2914
2943
  {
2915
2944
  "name": "returnByValue",
2916
- "description": "Whether the result is expected to be a JSON object which should be sent by value.",
2945
+ "description": "Whether the result is expected to be a JSON object which should be sent by value.\nCan be overriden by `serializationOptions`.",
2917
2946
  "optional": true,
2918
2947
  "type": "boolean"
2919
2948
  },
@@ -2964,10 +2993,17 @@
2964
2993
  },
2965
2994
  {
2966
2995
  "name": "generateWebDriverValue",
2967
- "description": "Whether the result should contain `webDriverValue`, serialized according to\nhttps://goo.gle/browser-automation-deepserialization. This is mutually\nexclusive with `returnByValue`, but resulting `objectId` is still provided.",
2968
- "experimental": true,
2996
+ "description": "Deprecated. Use `serializationOptions: {serialization:\"deep\"}` instead.\nWhether the result should contain `webDriverValue`, serialized according to\nhttps://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but\nresulting `objectId` is still provided.",
2997
+ "deprecated": true,
2969
2998
  "optional": true,
2970
2999
  "type": "boolean"
3000
+ },
3001
+ {
3002
+ "name": "serializationOptions",
3003
+ "description": "Specifies the result serialization. If provided, overrides\n`returnByValue` and `generateWebDriverValue`.",
3004
+ "experimental": true,
3005
+ "optional": true,
3006
+ "$ref": "SerializationOptions"
2971
3007
  }
2972
3008
  ],
2973
3009
  "returns": [
@@ -3139,10 +3175,17 @@
3139
3175
  },
3140
3176
  {
3141
3177
  "name": "generateWebDriverValue",
3142
- "description": "Whether the result should be serialized according to https://goo.gle/browser-automation-deepserialization.",
3143
- "experimental": true,
3178
+ "description": "Deprecated. Use `serializationOptions: {serialization:\"deep\"}` instead.\nWhether the result should contain `webDriverValue`, serialized\naccording to\nhttps://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but\nresulting `objectId` is still provided.",
3179
+ "deprecated": true,
3144
3180
  "optional": true,
3145
3181
  "type": "boolean"
3182
+ },
3183
+ {
3184
+ "name": "serializationOptions",
3185
+ "description": "Specifies the result serialization. If provided, overrides\n`returnByValue` and `generateWebDriverValue`.",
3186
+ "experimental": true,
3187
+ "optional": true,
3188
+ "$ref": "SerializationOptions"
3146
3189
  }
3147
3190
  ],
3148
3191
  "returns": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devtools-protocol",
3
- "version": "0.0.1139932",
3
+ "version": "0.0.1140464",
4
4
  "description": "The Chrome DevTools Protocol JSON",
5
5
  "repository": "https://github.com/ChromeDevTools/devtools-protocol",
6
6
  "author": "The Chromium Authors",
@@ -1014,8 +1014,27 @@ domain Runtime
1014
1014
  # Unique script identifier.
1015
1015
  type ScriptId extends string
1016
1016
 
1017
- # Represents the value serialiazed by the WebDriver BiDi specification
1018
- # https://goo.gle/browser-automation-deepserialization.
1017
+ # Represents options for serialization. Overrides `generatePreview`, `returnByValue` and
1018
+ # `generateWebDriverValue`.
1019
+ type SerializationOptions extends object
1020
+ properties
1021
+ enum serialization
1022
+ # Whether the result should be deep-serialized. The result is put into
1023
+ # `deepSerializedValue` and `ObjectId` is provided.
1024
+ deep
1025
+ # Whether the result is expected to be a JSON object which should be sent by value.
1026
+ # The result is put either into `value` or into `unserializableValue`. Synonym of
1027
+ # `returnByValue: true`. Overrides `returnByValue`.
1028
+ json
1029
+ # Only remote object id is put in the result. Same bahaviour as if no
1030
+ # `serializationOptions`, `generatePreview`, `returnByValue` nor `generateWebDriverValue`
1031
+ # are provided.
1032
+ idOnly
1033
+
1034
+ # Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
1035
+ optional integer maxDepth
1036
+
1037
+ # Represents deep serialized value.
1019
1038
  type DeepSerializedValue extends object
1020
1039
  properties
1021
1040
  enum type
@@ -1101,8 +1120,10 @@ domain Runtime
1101
1120
  optional UnserializableValue unserializableValue
1102
1121
  # String representation of the object.
1103
1122
  optional string description
1104
- # WebDriver BiDi representation of the value.
1105
- experimental optional DeepSerializedValue webDriverValue
1123
+ # Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value.
1124
+ deprecated optional DeepSerializedValue webDriverValue
1125
+ # Deep serialized value.
1126
+ experimental optional DeepSerializedValue deepSerializedValue
1106
1127
  # Unique object identifier (for non-primitive values).
1107
1128
  optional RemoteObjectId objectId
1108
1129
  # Preview containing abbreviated property values. Specified for `object` type values only.
@@ -1392,6 +1413,7 @@ domain Runtime
1392
1413
  # execution. Overrides `setPauseOnException` state.
1393
1414
  optional boolean silent
1394
1415
  # Whether the result is expected to be a JSON object which should be sent by value.
1416
+ # Can be overriden by `serializationOptions`.
1395
1417
  optional boolean returnByValue
1396
1418
  # Whether preview should be generated for the result.
1397
1419
  experimental optional boolean generatePreview
@@ -1415,10 +1437,15 @@ domain Runtime
1415
1437
  # boundaries).
1416
1438
  # This is mutually exclusive with `executionContextId`.
1417
1439
  experimental optional string uniqueContextId
1440
+ # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.
1418
1441
  # Whether the result should contain `webDriverValue`, serialized according to
1419
- # https://goo.gle/browser-automation-deepserialization. This is mutually
1420
- # exclusive with `returnByValue`, but resulting `objectId` is still provided.
1421
- experimental optional boolean generateWebDriverValue
1442
+ # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
1443
+ # resulting `objectId` is still provided.
1444
+ deprecated optional boolean generateWebDriverValue
1445
+ # Specifies the result serialization. If provided, overrides
1446
+ # `returnByValue` and `generateWebDriverValue`.
1447
+ experimental optional SerializationOptions serializationOptions
1448
+
1422
1449
  returns
1423
1450
  # Call result.
1424
1451
  RemoteObject result
@@ -1504,8 +1531,15 @@ domain Runtime
1504
1531
  # boundaries).
1505
1532
  # This is mutually exclusive with `contextId`.
1506
1533
  experimental optional string uniqueContextId
1507
- # Whether the result should be serialized according to https://goo.gle/browser-automation-deepserialization.
1508
- experimental optional boolean generateWebDriverValue
1534
+ # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.
1535
+ # Whether the result should contain `webDriverValue`, serialized
1536
+ # according to
1537
+ # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
1538
+ # resulting `objectId` is still provided.
1539
+ deprecated optional boolean generateWebDriverValue
1540
+ # Specifies the result serialization. If provided, overrides
1541
+ # `returnByValue` and `generateWebDriverValue`.
1542
+ experimental optional SerializationOptions serializationOptions
1509
1543
  returns
1510
1544
  # Evaluation result.
1511
1545
  RemoteObject result
@@ -1490,6 +1490,27 @@ export namespace Protocol {
1490
1490
  */
1491
1491
  export type ScriptId = string;
1492
1492
 
1493
+ export const enum SerializationOptionsSerialization {
1494
+ Deep = 'deep',
1495
+ Json = 'json',
1496
+ IdOnly = 'idOnly',
1497
+ }
1498
+
1499
+ /**
1500
+ * Represents options for serialization. Overrides `generatePreview`, `returnByValue` and
1501
+ * `generateWebDriverValue`.
1502
+ */
1503
+ export interface SerializationOptions {
1504
+ /**
1505
+ * (SerializationOptionsSerialization enum)
1506
+ */
1507
+ serialization: ('deep' | 'json' | 'idOnly');
1508
+ /**
1509
+ * Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
1510
+ */
1511
+ maxDepth?: integer;
1512
+ }
1513
+
1493
1514
  export const enum DeepSerializedValueType {
1494
1515
  Undefined = 'undefined',
1495
1516
  Null = 'null',
@@ -1517,8 +1538,7 @@ export namespace Protocol {
1517
1538
  }
1518
1539
 
1519
1540
  /**
1520
- * Represents the value serialiazed by the WebDriver BiDi specification
1521
- * https://goo.gle/browser-automation-deepserialization.
1541
+ * Represents deep serialized value.
1522
1542
  */
1523
1543
  export interface DeepSerializedValue {
1524
1544
  /**
@@ -1611,9 +1631,13 @@ export namespace Protocol {
1611
1631
  */
1612
1632
  description?: string;
1613
1633
  /**
1614
- * WebDriver BiDi representation of the value.
1634
+ * Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value.
1615
1635
  */
1616
1636
  webDriverValue?: DeepSerializedValue;
1637
+ /**
1638
+ * Deep serialized value.
1639
+ */
1640
+ deepSerializedValue?: DeepSerializedValue;
1617
1641
  /**
1618
1642
  * Unique object identifier (for non-primitive values).
1619
1643
  */
@@ -2081,6 +2105,7 @@ export namespace Protocol {
2081
2105
  silent?: boolean;
2082
2106
  /**
2083
2107
  * Whether the result is expected to be a JSON object which should be sent by value.
2108
+ * Can be overriden by `serializationOptions`.
2084
2109
  */
2085
2110
  returnByValue?: boolean;
2086
2111
  /**
@@ -2120,11 +2145,17 @@ export namespace Protocol {
2120
2145
  */
2121
2146
  uniqueContextId?: string;
2122
2147
  /**
2148
+ * Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.
2123
2149
  * Whether the result should contain `webDriverValue`, serialized according to
2124
- * https://goo.gle/browser-automation-deepserialization. This is mutually
2125
- * exclusive with `returnByValue`, but resulting `objectId` is still provided.
2150
+ * https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
2151
+ * resulting `objectId` is still provided.
2126
2152
  */
2127
2153
  generateWebDriverValue?: boolean;
2154
+ /**
2155
+ * Specifies the result serialization. If provided, overrides
2156
+ * `returnByValue` and `generateWebDriverValue`.
2157
+ */
2158
+ serializationOptions?: SerializationOptions;
2128
2159
  }
2129
2160
 
2130
2161
  export interface CallFunctionOnResponse {
@@ -2248,9 +2279,18 @@ export namespace Protocol {
2248
2279
  */
2249
2280
  uniqueContextId?: string;
2250
2281
  /**
2251
- * Whether the result should be serialized according to https://goo.gle/browser-automation-deepserialization.
2282
+ * Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.
2283
+ * Whether the result should contain `webDriverValue`, serialized
2284
+ * according to
2285
+ * https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
2286
+ * resulting `objectId` is still provided.
2252
2287
  */
2253
2288
  generateWebDriverValue?: boolean;
2289
+ /**
2290
+ * Specifies the result serialization. If provided, overrides
2291
+ * `returnByValue` and `generateWebDriverValue`.
2292
+ */
2293
+ serializationOptions?: SerializationOptions;
2254
2294
  }
2255
2295
 
2256
2296
  export interface EvaluateResponse {