@checkly/playwright-core 1.51.12 → 1.51.13

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.
@@ -13,7 +13,12 @@ var _assert = require("../utils/isomorphic/assert");
13
13
  var _fileUtils = require("./fileUtils");
14
14
  var _headers = require("../utils/isomorphic/headers");
15
15
  var _rtti = require("../utils/isomorphic/rtti");
16
+ var fs = _interopRequireWildcard(require("fs"));
16
17
  var _fetch = require("../checkly/fetch");
18
+ var _path = _interopRequireDefault(require("path"));
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
22
  /**
18
23
  * Copyright (c) Microsoft Corporation.
19
24
  *
@@ -132,10 +137,12 @@ class APIRequestContext extends _channelOwner.ChannelOwner {
132
137
  ...options
133
138
  });
134
139
  }
135
- async writeApiCallToDisk(options) {
140
+ async writeApiCallToDisk(options = {}) {
136
141
  try {
137
- await fs.promises.writeFile(path.join(process.env.TEMP_DIR, 'apiCall-' + (Math.random() + 1).toString(36).substring(7) + '.txt'), options.url !== undefined ? options.url : options.request.url());
138
- } catch {}
142
+ await fs.promises.writeFile(_path.default.join(process.env.TEMP_DIR, 'apiCall-' + (Math.random() + 1).toString(36).substring(7) + '.txt'), options.url !== undefined ? options.url : options.request.url());
143
+ } catch (e) {
144
+ console.log('Error reporting API call', e === null || e === void 0 ? void 0 : e.message);
145
+ }
139
146
  }
140
147
  async _innerFetch(options = {}) {
141
148
  this.writeApiCallToDisk(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-core",
3
- "version": "1.51.12",
3
+ "version": "1.51.13",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",