apify-client 2.12.3 → 2.12.4-beta.0

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/dist/bundle.js CHANGED
@@ -25497,7 +25497,7 @@ class BuildClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE_0__.Res
25497
25497
  return this._delete();
25498
25498
  }
25499
25499
  /**
25500
- * https://docs.apify.com/api/v2/actor-build-openapi-specification-get
25500
+ * https://docs.apify.com/api/v2/actor-build-openapi-json-get
25501
25501
  */ async getOpenApiDefinition() {
25502
25502
  const response = await this.httpClient.call({
25503
25503
  url: this._url('openapi.json'),
@@ -27563,7 +27563,7 @@ function isStream(value) {
27563
27563
  function getVersionData() {
27564
27564
  if (true) {
27565
27565
  return {
27566
- version: "2.12.3"
27566
+ version: "2.12.4-beta.0"
27567
27567
  };
27568
27568
  }
27569
27569
  // eslint-disable-next-line
@@ -29132,7 +29132,7 @@ const resolveBodyLength = async (headers, body) => {
29132
29132
  } catch (err) {
29133
29133
  unsubscribe && unsubscribe();
29134
29134
 
29135
- if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
29135
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
29136
29136
  throw Object.assign(
29137
29137
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request),
29138
29138
  {
@@ -29711,7 +29711,7 @@ const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"]
29711
29711
  */
29712
29712
  class Axios {
29713
29713
  constructor(instanceConfig) {
29714
- this.defaults = instanceConfig;
29714
+ this.defaults = instanceConfig || {};
29715
29715
  this.interceptors = {
29716
29716
  request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](),
29717
29717
  response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]()
@@ -30157,10 +30157,18 @@ class AxiosHeaders {
30157
30157
  setHeaders(header, valueOrRewrite)
30158
30158
  } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
30159
30159
  setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
30160
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) {
30161
- for (const [key, value] of header.entries()) {
30162
- setHeader(value, key, rewrite);
30160
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isIterable(header)) {
30161
+ let obj = {}, dest, key;
30162
+ for (const entry of header) {
30163
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(entry)) {
30164
+ throw TypeError('Object iterator must return a key-value pair');
30165
+ }
30166
+
30167
+ obj[key = entry[0]] = (dest = obj[key]) ?
30168
+ (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
30163
30169
  }
30170
+
30171
+ setHeaders(obj, valueOrRewrite)
30164
30172
  } else {
30165
30173
  header != null && setHeader(valueOrRewrite, header, rewrite);
30166
30174
  }
@@ -30302,6 +30310,10 @@ class AxiosHeaders {
30302
30310
  return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
30303
30311
  }
30304
30312
 
30313
+ getSetCookie() {
30314
+ return this.get("set-cookie") || [];
30315
+ }
30316
+
30305
30317
  get [Symbol.toStringTag]() {
30306
30318
  return 'AxiosHeaders';
30307
30319
  }
@@ -30963,7 +30975,7 @@ __webpack_require__.r(__webpack_exports__);
30963
30975
  __webpack_require__.d(__webpack_exports__, {
30964
30976
  VERSION: () => (VERSION)
30965
30977
  });
30966
- const VERSION = "1.8.4";
30978
+ const VERSION = "1.9.0";
30967
30979
 
30968
30980
  }),
30969
30981
  "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
@@ -32526,6 +32538,7 @@ __webpack_require__.d(__webpack_exports__, {
32526
32538
 
32527
32539
  const {toString} = Object.prototype;
32528
32540
  const {getPrototypeOf} = Object;
32541
+ const {iterator, toStringTag} = Symbol;
32529
32542
 
32530
32543
  const kindOf = (cache => thing => {
32531
32544
  const str = toString.call(thing);
@@ -32652,7 +32665,7 @@ const isPlainObject = (val) => {
32652
32665
  }
32653
32666
 
32654
32667
  const prototype = getPrototypeOf(val);
32655
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
32668
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
32656
32669
  }
32657
32670
 
32658
32671
  /**
@@ -33003,13 +33016,13 @@ const isTypedArray = (TypedArray => {
33003
33016
  * @returns {void}
33004
33017
  */
33005
33018
  const forEachEntry = (obj, fn) => {
33006
- const generator = obj && obj[Symbol.iterator];
33019
+ const generator = obj && obj[iterator];
33007
33020
 
33008
- const iterator = generator.call(obj);
33021
+ const _iterator = generator.call(obj);
33009
33022
 
33010
33023
  let result;
33011
33024
 
33012
- while ((result = iterator.next()) && !result.done) {
33025
+ while ((result = _iterator.next()) && !result.done) {
33013
33026
  const pair = result.value;
33014
33027
  fn.call(obj, pair[0], pair[1]);
33015
33028
  }
@@ -33130,7 +33143,7 @@ const toFiniteNumber = (value, defaultValue) => {
33130
33143
  * @returns {boolean}
33131
33144
  */
33132
33145
  function isSpecCompliantForm(thing) {
33133
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
33146
+ return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
33134
33147
  }
33135
33148
 
33136
33149
  const toJSONObject = (obj) => {
@@ -33199,6 +33212,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
33199
33212
 
33200
33213
  // *********************
33201
33214
 
33215
+
33216
+ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
33217
+
33218
+
33202
33219
  /* ESM default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
33203
33220
  isArray,
33204
33221
  isArrayBuffer,
@@ -33254,14 +33271,15 @@ const asap = typeof queueMicrotask !== 'undefined' ?
33254
33271
  isAsyncFn,
33255
33272
  isThenable,
33256
33273
  setImmediate: _setImmediate,
33257
- asap
33274
+ asap,
33275
+ isIterable
33258
33276
  });
33259
33277
 
33260
33278
 
33261
33279
  }),
33262
33280
  "./package.json": (function (module) {
33263
33281
  "use strict";
33264
- module.exports = JSON.parse('{"name":"apify-client","version":"2.12.3","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.25.0","@apify/log":"^2.2.6","@crawlee/types":"^3.3.0","agentkeepalive":"^4.2.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","prettier":"^3.5.3","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^4.17.17","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^22.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^4.21.1","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
33282
+ module.exports = JSON.parse('{"name":"apify-client","version":"2.12.4-beta.0","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.25.0","@apify/log":"^2.2.6","@crawlee/types":"^3.3.0","agentkeepalive":"^4.2.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","prettier":"^3.5.3","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^4.17.17","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^22.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^4.21.1","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
33265
33283
 
33266
33284
  }),
33267
33285
 
@@ -33355,7 +33373,7 @@ __webpack_require__.hu = (chunkId) => ('' + chunkId + '.' + __webpack_require__.
33355
33373
  })();
33356
33374
  // webpack/runtime/get_full_hash
33357
33375
  (() => {
33358
- __webpack_require__.h = () => ("faaf6d47dc8fad6c")
33376
+ __webpack_require__.h = () => ("d06fc316e8a977a2")
33359
33377
  })();
33360
33378
  // webpack/runtime/get_main_filename/update manifest
33361
33379
  (() => {