apify-client 2.23.0 → 2.23.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.
package/dist/bundle.js CHANGED
@@ -11881,23 +11881,6 @@ module.exports = function (str) {
11881
11881
  };
11882
11882
 
11883
11883
 
11884
- },
11885
- 433(module) {
11886
- function webpackEmptyAsyncContext(req) {
11887
- // Here Promise.resolve().then() is used instead of new Promise() to prevent
11888
- // uncaught exception popping up in devtools
11889
- return Promise.resolve().then(function() {
11890
- var e = new Error("Cannot find module '" + req + "'");
11891
- e.code = 'MODULE_NOT_FOUND';
11892
- throw e;
11893
- });
11894
- }
11895
- webpackEmptyAsyncContext.keys = () => ([]);
11896
- webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
11897
- webpackEmptyAsyncContext.id = 433;
11898
- module.exports = webpackEmptyAsyncContext;
11899
-
11900
-
11901
11884
  },
11902
11885
  1089(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
11903
11886
  "use strict";
@@ -12921,10 +12904,8 @@ class HttpClient {
12921
12904
  async initNode() {
12922
12905
  if (!(0,_utils__rspack_import_4.isNode)()) return;
12923
12906
  const [{ ProxyAgent }, os] = await Promise.all([
12924
- // eslint-disable-next-line @typescript-eslint/consistent-type-imports
12925
- (0,_utils__rspack_import_4.dynamicNodeImport)('proxy-agent'),
12926
- // eslint-disable-next-line @typescript-eslint/consistent-type-imports
12927
- (0,_utils__rspack_import_4.dynamicNodeImport)('node:os')
12907
+ Promise.resolve().then(function __rspack_missing_module() { var e = new Error("Cannot find module 'proxy-agent'"); e.code = 'MODULE_NOT_FOUND'; throw e; }),
12908
+ Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 3031, 23))
12928
12909
  ]);
12929
12910
  // We want to keep sockets alive for better performance.
12930
12911
  // Enhanced agent configuration based on agentkeepalive best practices:
@@ -17878,7 +17859,6 @@ __webpack_require__.d(__webpack_exports__, {
17878
17859
  asArray: () => (asArray),
17879
17860
  cast: () => (cast),
17880
17861
  catchNotFoundOrThrow: () => (catchNotFoundOrThrow),
17881
- dynamicNodeImport: () => (dynamicNodeImport),
17882
17862
  getVersionData: () => (getVersionData),
17883
17863
  isBuffer: () => (isBuffer),
17884
17864
  isNode: () => (isNode),
@@ -17979,10 +17959,8 @@ let gzipPromisified;
17979
17959
  const areDataLargeEnough = Buffer.byteLength(value) >= MIN_GZIP_BYTES;
17980
17960
  if (areDataLargeEnough) {
17981
17961
  if (!gzipPromisified) {
17982
- // eslint-disable-next-line @typescript-eslint/consistent-type-imports
17983
- const { promisify } = await dynamicNodeImport('node:util');
17984
- // eslint-disable-next-line @typescript-eslint/consistent-type-imports
17985
- const { gzip } = await dynamicNodeImport('node:zlib');
17962
+ const { promisify } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 6029, 23));
17963
+ const { gzip } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 1134, 23));
17986
17964
  gzipPromisified = promisify(gzip);
17987
17965
  }
17988
17966
  return gzipPromisified(value);
@@ -18012,14 +17990,9 @@ let gzipPromisified;
18012
17990
  return slicedArray;
18013
17991
  }
18014
17992
  function isNode() {
17993
+ if (true) return false;
18015
17994
  return !!(typeof process !== 'undefined' && process.versions && process.versions.node);
18016
17995
  }
18017
- /**
18018
- * Dynamic import wrapper that prevents bundlers from statically analyzing the import specifier.
18019
- * Use this for Node.js-only modules that should not be included in browser bundles.
18020
- */ async function dynamicNodeImport(specifier) {
18021
- return await __webpack_require__(433)(specifier);
18022
- }
18023
17996
  function isBuffer(value) {
18024
17997
  return ow__rspack_import_0_default().isValid(value, ow__rspack_import_0_default().any((ow__rspack_import_0_default().buffer), (ow__rspack_import_0_default().arrayBuffer), (ow__rspack_import_0_default().typedArray)));
18025
17998
  }
@@ -18029,7 +18002,7 @@ function isStream(value) {
18029
18002
  function getVersionData() {
18030
18003
  if (true) {
18031
18004
  return {
18032
- version: "2.23.0"
18005
+ version: "2.23.1"
18033
18006
  };
18034
18007
  }
18035
18008
  // eslint-disable-next-line
@@ -18113,6 +18086,21 @@ function asArray(value) {
18113
18086
  "use strict";
18114
18087
  /* (ignored) */
18115
18088
 
18089
+ },
18090
+ 3031() {
18091
+ "use strict";
18092
+ /* (ignored) */
18093
+
18094
+ },
18095
+ 6029() {
18096
+ "use strict";
18097
+ /* (ignored) */
18098
+
18099
+ },
18100
+ 1134() {
18101
+ "use strict";
18102
+ /* (ignored) */
18103
+
18116
18104
  },
18117
18105
  6125(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
18118
18106
  "use strict";
@@ -18432,6 +18420,7 @@ var APIFY_ENV_VARS = {
18432
18420
  PROXY_PASSWORD: "APIFY_PROXY_PASSWORD",
18433
18421
  PROXY_PORT: "APIFY_PROXY_PORT",
18434
18422
  PROXY_STATUS_URL: "APIFY_PROXY_STATUS_URL",
18423
+ MCP_PROXY_URL: "APIFY_MCP_PROXY_URL",
18435
18424
  PURGE_ON_START: "APIFY_PURGE_ON_START",
18436
18425
  SDK_LATEST_VERSION: "APIFY_SDK_LATEST_VERSION",
18437
18426
  SYSTEM_INFO_INTERVAL_MILLIS: "APIFY_SYSTEM_INFO_INTERVAL_MILLIS",
@@ -19759,8 +19748,10 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
19759
19748
  "reel",
19760
19749
  "video-reel",
19761
19750
  "mcp",
19751
+ "mcpc",
19762
19752
  "model-context-protocol",
19763
19753
  "modelcontextprotocol",
19754
+ // 'apify.com' intentionally unescaped so "." matches any character, also blocking variants like "apify_com" or "apifyxcom"
19764
19755
  "apify.com",
19765
19756
  "design-kit",
19766
19757
  "press-kit",
@@ -19770,6 +19761,76 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
19770
19761
  "challange",
19771
19762
  "1m-challenge",
19772
19763
  "1m-usd-challenge",
19764
+ // Apify platform resources
19765
+ "key-value-store",
19766
+ "request-queue",
19767
+ "request-queues",
19768
+ "builds",
19769
+ "schedule",
19770
+ // AI / LLM related
19771
+ "llms",
19772
+ "openai",
19773
+ "anthropic",
19774
+ "claude",
19775
+ "copilot",
19776
+ "mistral",
19777
+ "prompt",
19778
+ "prompts",
19779
+ "embeddings",
19780
+ "vectors",
19781
+ // Organizations / workspaces / permissions
19782
+ "orgs",
19783
+ "workspaces",
19784
+ "tenant",
19785
+ "tenants",
19786
+ "permission",
19787
+ "permissions",
19788
+ // Auth / security
19789
+ "saml",
19790
+ "scim",
19791
+ "token",
19792
+ "tokens",
19793
+ "api-key",
19794
+ "api-keys",
19795
+ // Billing / commerce
19796
+ "coupon",
19797
+ "coupons",
19798
+ "discount",
19799
+ "discounts",
19800
+ "promos",
19801
+ "refund",
19802
+ "refunds",
19803
+ "credit",
19804
+ "credits",
19805
+ "billing-portal",
19806
+ // Infrastructure / environments
19807
+ "production",
19808
+ "canary",
19809
+ "restricted",
19810
+ // Communication
19811
+ "conversations",
19812
+ "reactions",
19813
+ "mentions",
19814
+ // Legal / trust / web standards
19815
+ "accessibility",
19816
+ "imprint",
19817
+ "impressum",
19818
+ "trust",
19819
+ "trust-center",
19820
+ "security-center",
19821
+ // Brand protection / impersonation prevention
19822
+ "brand",
19823
+ "branding",
19824
+ "verified",
19825
+ "apify-support",
19826
+ "apify-team",
19827
+ "support-team",
19828
+ "abuse",
19829
+ // Incidents / updates
19830
+ "outage",
19831
+ "incident",
19832
+ "incidents",
19833
+ "what-is-new",
19773
19834
  // Special files
19774
19835
  "index",
19775
19836
  "index\\.html",
@@ -19781,6 +19842,7 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
19781
19842
  "(apple-touch-icon.*)",
19782
19843
  "security-whitepaper\\.pdf",
19783
19844
  "security\\.txt",
19845
+ "llms\\.txt",
19784
19846
  // All hidden files
19785
19847
  "(\\..*)",
19786
19848
  // Username starting with xxx-
@@ -19938,6 +20000,7 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
19938
20000
  "errors",
19939
20001
  "eval",
19940
20002
  "event",
20003
+ "events",
19941
20004
  "exit",
19942
20005
  "explore",
19943
20006
  "facebook",
@@ -21716,14 +21779,20 @@ const factory = (env) => {
21716
21779
  test(() => {
21717
21780
  let duplexAccessed = false;
21718
21781
 
21719
- const hasContentType = new Request(_platform_index_js__rspack_import_1["default"].origin, {
21782
+ const request = new Request(_platform_index_js__rspack_import_1["default"].origin, {
21720
21783
  body: new ReadableStream(),
21721
21784
  method: 'POST',
21722
21785
  get duplex() {
21723
21786
  duplexAccessed = true;
21724
21787
  return 'half';
21725
21788
  },
21726
- }).headers.has('Content-Type');
21789
+ });
21790
+
21791
+ const hasContentType = request.headers.has('Content-Type');
21792
+
21793
+ if (request.body != null) {
21794
+ request.body.cancel();
21795
+ }
21727
21796
 
21728
21797
  return duplexAccessed && !hasContentType;
21729
21798
  });
@@ -21867,6 +21936,19 @@ const factory = (env) => {
21867
21936
  // see https://github.com/cloudflare/workerd/issues/902
21868
21937
  const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
21869
21938
 
21939
+ // If data is FormData and Content-Type is multipart/form-data without boundary,
21940
+ // delete it so fetch can set it correctly with the boundary
21941
+ if (_utils_js__rspack_import_0["default"].isFormData(data)) {
21942
+ const contentType = headers.getContentType();
21943
+ if (
21944
+ contentType &&
21945
+ /^multipart\/form-data/i.test(contentType) &&
21946
+ !/boundary=/i.test(contentType)
21947
+ ) {
21948
+ headers.delete('content-type');
21949
+ }
21950
+ }
21951
+
21870
21952
  const resolvedOptions = {
21871
21953
  ...fetchOptions,
21872
21954
  signal: composedSignal,
@@ -22595,13 +22677,29 @@ class Axios {
22595
22677
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
22596
22678
 
22597
22679
  // slice off the Error: ... line
22598
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
22680
+ const stack = (() => {
22681
+ if (!dummy.stack) {
22682
+ return '';
22683
+ }
22684
+
22685
+ const firstNewlineIndex = dummy.stack.indexOf('\n');
22686
+
22687
+ return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
22688
+ })();
22599
22689
  try {
22600
22690
  if (!err.stack) {
22601
22691
  err.stack = stack;
22602
22692
  // match without the 2 top stack lines
22603
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
22604
- err.stack += '\n' + stack;
22693
+ } else if (stack) {
22694
+ const firstNewlineIndex = stack.indexOf('\n');
22695
+ const secondNewlineIndex =
22696
+ firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
22697
+ const stackWithoutTwoTopLines =
22698
+ secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
22699
+
22700
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
22701
+ err.stack += '\n' + stack;
22702
+ }
22605
22703
  }
22606
22704
  } catch (e) {
22607
22705
  // ignore the case where "stack" is an un-writable property
@@ -22785,8 +22883,6 @@ _utils_js__rspack_import_3["default"].forEach(['delete', 'get', 'head', 'options
22785
22883
  });
22786
22884
 
22787
22885
  _utils_js__rspack_import_3["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
22788
- /*eslint func-names:0*/
22789
-
22790
22886
  function generateHTTPMethod(isForm) {
22791
22887
  return function httpMethod(url, data, config) {
22792
22888
  return this.request(
@@ -22839,40 +22935,40 @@ class AxiosError extends Error {
22839
22935
  return axiosError;
22840
22936
  }
22841
22937
 
22842
- /**
22843
- * Create an Error with the specified message, config, error code, request and response.
22844
- *
22845
- * @param {string} message The error message.
22846
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
22847
- * @param {Object} [config] The config.
22848
- * @param {Object} [request] The request.
22849
- * @param {Object} [response] The response.
22850
- *
22851
- * @returns {Error} The created error.
22852
- */
22853
- constructor(message, code, config, request, response) {
22854
- super(message);
22855
-
22856
- // Make message enumerable to maintain backward compatibility
22857
- // The native Error constructor sets message as non-enumerable,
22858
- // but axios < v1.13.3 had it as enumerable
22859
- Object.defineProperty(this, 'message', {
22860
- value: message,
22861
- enumerable: true,
22862
- writable: true,
22863
- configurable: true
22864
- });
22865
-
22866
- this.name = 'AxiosError';
22867
- this.isAxiosError = true;
22868
- code && (this.code = code);
22869
- config && (this.config = config);
22870
- request && (this.request = request);
22871
- if (response) {
22872
- this.response = response;
22873
- this.status = response.status;
22874
- }
22938
+ /**
22939
+ * Create an Error with the specified message, config, error code, request and response.
22940
+ *
22941
+ * @param {string} message The error message.
22942
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
22943
+ * @param {Object} [config] The config.
22944
+ * @param {Object} [request] The request.
22945
+ * @param {Object} [response] The response.
22946
+ *
22947
+ * @returns {Error} The created error.
22948
+ */
22949
+ constructor(message, code, config, request, response) {
22950
+ super(message);
22951
+
22952
+ // Make message enumerable to maintain backward compatibility
22953
+ // The native Error constructor sets message as non-enumerable,
22954
+ // but axios < v1.13.3 had it as enumerable
22955
+ Object.defineProperty(this, 'message', {
22956
+ value: message,
22957
+ enumerable: true,
22958
+ writable: true,
22959
+ configurable: true,
22960
+ });
22961
+
22962
+ this.name = 'AxiosError';
22963
+ this.isAxiosError = true;
22964
+ code && (this.code = code);
22965
+ config && (this.config = config);
22966
+ request && (this.request = request);
22967
+ if (response) {
22968
+ this.response = response;
22969
+ this.status = response.status;
22875
22970
  }
22971
+ }
22876
22972
 
22877
22973
  toJSON() {
22878
22974
  return {
@@ -22908,6 +23004,7 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
22908
23004
  AxiosError.ERR_CANCELED = 'ERR_CANCELED';
22909
23005
  AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
22910
23006
  AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
23007
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
22911
23008
 
22912
23009
  /* export default */ const __rspack_default_export = (AxiosError);
22913
23010
 
@@ -22928,16 +23025,49 @@ __webpack_require__.d(__webpack_exports__, {
22928
23025
 
22929
23026
  const $internals = Symbol('internals');
22930
23027
 
23028
+ const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
23029
+
23030
+ function trimSPorHTAB(str) {
23031
+ let start = 0;
23032
+ let end = str.length;
23033
+
23034
+ while (start < end) {
23035
+ const code = str.charCodeAt(start);
23036
+
23037
+ if (code !== 0x09 && code !== 0x20) {
23038
+ break;
23039
+ }
23040
+
23041
+ start += 1;
23042
+ }
23043
+
23044
+ while (end > start) {
23045
+ const code = str.charCodeAt(end - 1);
23046
+
23047
+ if (code !== 0x09 && code !== 0x20) {
23048
+ break;
23049
+ }
23050
+
23051
+ end -= 1;
23052
+ }
23053
+
23054
+ return start === 0 && end === str.length ? str : str.slice(start, end);
23055
+ }
23056
+
22931
23057
  function normalizeHeader(header) {
22932
23058
  return header && String(header).trim().toLowerCase();
22933
23059
  }
22934
23060
 
23061
+ function sanitizeHeaderValue(str) {
23062
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
23063
+ }
23064
+
22935
23065
  function normalizeValue(value) {
22936
23066
  if (value === false || value == null) {
22937
23067
  return value;
22938
23068
  }
22939
23069
 
22940
- return _utils_js__rspack_import_0["default"].isArray(value) ? value.map(normalizeValue) : String(value);
23070
+ return _utils_js__rspack_import_0["default"].isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
22941
23071
  }
22942
23072
 
22943
23073
  function parseTokens(str) {
@@ -23375,7 +23505,7 @@ __webpack_require__.d(__webpack_exports__, {
23375
23505
  */
23376
23506
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
23377
23507
  let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__rspack_import_0["default"])(requestedURL);
23378
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
23508
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
23379
23509
  return (0,_helpers_combineURLs_js__rspack_import_1["default"])(baseURL, requestedURL);
23380
23510
  }
23381
23511
  return requestedURL;
@@ -23541,9 +23671,9 @@ function mergeConfig(config1, config2) {
23541
23671
 
23542
23672
  // eslint-disable-next-line consistent-return
23543
23673
  function mergeDirectKeys(a, b, prop) {
23544
- if (prop in config2) {
23674
+ if (_utils_js__rspack_import_1["default"].hasOwnProp(config2, prop)) {
23545
23675
  return getMergedValue(a, b);
23546
- } else if (prop in config1) {
23676
+ } else if (_utils_js__rspack_import_1["default"].hasOwnProp(config1, prop)) {
23547
23677
  return getMergedValue(undefined, a);
23548
23678
  }
23549
23679
  }
@@ -23584,7 +23714,9 @@ function mergeConfig(config1, config2) {
23584
23714
  _utils_js__rspack_import_1["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
23585
23715
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
23586
23716
  const merge = _utils_js__rspack_import_1["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
23587
- const configValue = merge(config1[prop], config2[prop], prop);
23717
+ const a = _utils_js__rspack_import_1["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
23718
+ const b = _utils_js__rspack_import_1["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
23719
+ const configValue = merge(a, b, prop);
23588
23720
  (_utils_js__rspack_import_1["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
23589
23721
  });
23590
23722
 
@@ -23697,6 +23829,8 @@ __webpack_require__.d(__webpack_exports__, {
23697
23829
 
23698
23830
 
23699
23831
 
23832
+ const own = (obj, key) => (obj != null && _utils_js__rspack_import_0["default"].hasOwnProp(obj, key) ? obj[key] : undefined);
23833
+
23700
23834
  /**
23701
23835
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
23702
23836
  * of the input
@@ -23764,20 +23898,22 @@ const defaults = {
23764
23898
  let isFileList;
23765
23899
 
23766
23900
  if (isObjectPayload) {
23901
+ const formSerializer = own(this, 'formSerializer');
23767
23902
  if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
23768
- return (0,_helpers_toURLEncodedForm_js__rspack_import_3["default"])(data, this.formSerializer).toString();
23903
+ return (0,_helpers_toURLEncodedForm_js__rspack_import_3["default"])(data, formSerializer).toString();
23769
23904
  }
23770
23905
 
23771
23906
  if (
23772
23907
  (isFileList = _utils_js__rspack_import_0["default"].isFileList(data)) ||
23773
23908
  contentType.indexOf('multipart/form-data') > -1
23774
23909
  ) {
23775
- const _FormData = this.env && this.env.FormData;
23910
+ const env = own(this, 'env');
23911
+ const _FormData = env && env.FormData;
23776
23912
 
23777
23913
  return (0,_helpers_toFormData_js__rspack_import_4["default"])(
23778
23914
  isFileList ? { 'files[]': data } : data,
23779
23915
  _FormData && new _FormData(),
23780
- this.formSerializer
23916
+ formSerializer
23781
23917
  );
23782
23918
  }
23783
23919
  }
@@ -23793,9 +23929,10 @@ const defaults = {
23793
23929
 
23794
23930
  transformResponse: [
23795
23931
  function transformResponse(data) {
23796
- const transitional = this.transitional || defaults.transitional;
23932
+ const transitional = own(this, 'transitional') || defaults.transitional;
23797
23933
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
23798
- const JSONRequested = this.responseType === 'json';
23934
+ const responseType = own(this, 'responseType');
23935
+ const JSONRequested = responseType === 'json';
23799
23936
 
23800
23937
  if (_utils_js__rspack_import_0["default"].isResponse(data) || _utils_js__rspack_import_0["default"].isReadableStream(data)) {
23801
23938
  return data;
@@ -23804,17 +23941,17 @@ const defaults = {
23804
23941
  if (
23805
23942
  data &&
23806
23943
  _utils_js__rspack_import_0["default"].isString(data) &&
23807
- ((forcedJSONParsing && !this.responseType) || JSONRequested)
23944
+ ((forcedJSONParsing && !responseType) || JSONRequested)
23808
23945
  ) {
23809
23946
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
23810
23947
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
23811
23948
 
23812
23949
  try {
23813
- return JSON.parse(data, this.parseReviver);
23950
+ return JSON.parse(data, own(this, 'parseReviver'));
23814
23951
  } catch (e) {
23815
23952
  if (strictJSONParsing) {
23816
23953
  if (e.name === 'SyntaxError') {
23817
- throw _core_AxiosError_js__rspack_import_5["default"].from(e, _core_AxiosError_js__rspack_import_5["default"].ERR_BAD_RESPONSE, this, null, this.response);
23954
+ throw _core_AxiosError_js__rspack_import_5["default"].from(e, _core_AxiosError_js__rspack_import_5["default"].ERR_BAD_RESPONSE, this, null, own(this, 'response'));
23818
23955
  }
23819
23956
  throw e;
23820
23957
  }
@@ -23885,7 +24022,7 @@ __webpack_require__.r(__webpack_exports__);
23885
24022
  __webpack_require__.d(__webpack_exports__, {
23886
24023
  VERSION: () => (VERSION)
23887
24024
  });
23888
- const VERSION = "1.13.6";
24025
+ const VERSION = "1.15.1";
23889
24026
 
23890
24027
  },
23891
24028
  5267(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
@@ -23915,9 +24052,8 @@ function encode(str) {
23915
24052
  ')': '%29',
23916
24053
  '~': '%7E',
23917
24054
  '%20': '+',
23918
- '%00': '\x00',
23919
24055
  };
23920
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
24056
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
23921
24057
  return charMap[match];
23922
24058
  });
23923
24059
  }
@@ -24083,8 +24219,8 @@ __webpack_require__.d(__webpack_exports__, {
24083
24219
 
24084
24220
 
24085
24221
  /**
24086
- * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
24087
- * URI encoded counterparts
24222
+ * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
24223
+ * their plain counterparts (`:`, `$`, `,`, `+`).
24088
24224
  *
24089
24225
  * @param {string} val The value to be encoded.
24090
24226
  *
@@ -24364,7 +24500,9 @@ function formDataToJSON(formData) {
24364
24500
 
24365
24501
  if (isLast) {
24366
24502
  if (_utils_js__rspack_import_0["default"].hasOwnProp(target, name)) {
24367
- target[name] = [target[name], value];
24503
+ target[name] = _utils_js__rspack_import_0["default"].isArray(target[name])
24504
+ ? target[name].concat(value)
24505
+ : [target[name], value];
24368
24506
  } else {
24369
24507
  target[name] = value;
24370
24508
  }
@@ -24605,13 +24743,13 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
24605
24743
  const _speedometer = (0,_speedometer_js__rspack_import_0["default"])(50, 250);
24606
24744
 
24607
24745
  return (0,_throttle_js__rspack_import_1["default"])((e) => {
24608
- const loaded = e.loaded;
24746
+ const rawLoaded = e.loaded;
24609
24747
  const total = e.lengthComputable ? e.total : undefined;
24610
- const progressBytes = loaded - bytesNotified;
24748
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
24749
+ const progressBytes = Math.max(0, loaded - bytesNotified);
24611
24750
  const rate = _speedometer(progressBytes);
24612
- const inRange = loaded <= total;
24613
24751
 
24614
- bytesNotified = loaded;
24752
+ bytesNotified = Math.max(bytesNotified, loaded);
24615
24753
 
24616
24754
  const data = {
24617
24755
  loaded,
@@ -24619,7 +24757,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
24619
24757
  progress: total ? loaded / total : undefined,
24620
24758
  bytes: progressBytes,
24621
24759
  rate: rate ? rate : undefined,
24622
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
24760
+ estimated: rate && total ? (total - loaded) / rate : undefined,
24623
24761
  event: e,
24624
24762
  lengthComputable: total != null,
24625
24763
  [isDownloadStream ? 'download' : 'upload']: true,
@@ -24720,10 +24858,18 @@ __webpack_require__.d(__webpack_exports__, {
24720
24858
  // Specifically not if we're in a web worker, or react-native.
24721
24859
 
24722
24860
  if (_platform_index_js__rspack_import_5["default"].hasStandardBrowserEnv) {
24723
- withXSRFToken && _utils_js__rspack_import_4["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
24861
+ if (_utils_js__rspack_import_4["default"].isFunction(withXSRFToken)) {
24862
+ withXSRFToken = withXSRFToken(newConfig);
24863
+ }
24724
24864
 
24725
- if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__rspack_import_6["default"])(newConfig.url))) {
24726
- // Add xsrf header
24865
+ // Strict boolean check prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
24866
+ // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
24867
+ // the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
24868
+ const shouldSendXSRF =
24869
+ withXSRFToken === true ||
24870
+ (withXSRFToken == null && (0,_isURLSameOrigin_js__rspack_import_6["default"])(newConfig.url));
24871
+
24872
+ if (shouldSendXSRF) {
24727
24873
  const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__rspack_import_7["default"].read(xsrfCookieName);
24728
24874
 
24729
24875
  if (xsrfValue) {
@@ -25018,6 +25164,7 @@ function toFormData(obj, formData, options) {
25018
25164
  const dots = options.dots;
25019
25165
  const indexes = options.indexes;
25020
25166
  const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
25167
+ const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
25021
25168
  const useBlob = _Blob && _utils_js__rspack_import_0["default"].isSpecCompliantForm(formData);
25022
25169
 
25023
25170
  if (!_utils_js__rspack_import_0["default"].isFunction(visitor)) {
@@ -25110,9 +25257,16 @@ function toFormData(obj, formData, options) {
25110
25257
  isVisitable,
25111
25258
  });
25112
25259
 
25113
- function build(value, path) {
25260
+ function build(value, path, depth = 0) {
25114
25261
  if (_utils_js__rspack_import_0["default"].isUndefined(value)) return;
25115
25262
 
25263
+ if (depth > maxDepth) {
25264
+ throw new _core_AxiosError_js__rspack_import_2["default"](
25265
+ 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
25266
+ _core_AxiosError_js__rspack_import_2["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
25267
+ );
25268
+ }
25269
+
25116
25270
  if (stack.indexOf(value) !== -1) {
25117
25271
  throw Error('Circular reference detected in ' + path.join('.'));
25118
25272
  }
@@ -25125,7 +25279,7 @@ function toFormData(obj, formData, options) {
25125
25279
  visitor.call(formData, el, _utils_js__rspack_import_0["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
25126
25280
 
25127
25281
  if (result === true) {
25128
- build(el, path ? path.concat(key) : [key]);
25282
+ build(el, path ? path.concat(key) : [key], depth + 1);
25129
25283
  }
25130
25284
  });
25131
25285
 
@@ -25804,16 +25958,16 @@ const G = getGlobal();
25804
25958
  const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
25805
25959
 
25806
25960
  const isFormData = (thing) => {
25807
- let kind;
25808
- return thing && (
25809
- (FormDataCtor && thing instanceof FormDataCtor) || (
25810
- isFunction(thing.append) && (
25811
- (kind = kindOf(thing)) === 'formdata' ||
25812
- // detect form-data instance
25813
- (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
25814
- )
25815
- )
25816
- );
25961
+ if (!thing) return false;
25962
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
25963
+ // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
25964
+ const proto = getPrototypeOf(thing);
25965
+ if (!proto || proto === Object.prototype) return false;
25966
+ if (!isFunction(thing.append)) return false;
25967
+ const kind = kindOf(thing);
25968
+ return kind === 'formdata' ||
25969
+ // detect form-data instance
25970
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]');
25817
25971
  };
25818
25972
 
25819
25973
  /**
@@ -26469,7 +26623,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
26469
26623
  },
26470
26624
  8330(module) {
26471
26625
  "use strict";
26472
- module.exports = JSON.parse('{"name":"apify-client","version":"2.23.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","./browser":"./dist/bundle.js",".":{"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 && vitest run","test:bundling":"npm run build && npm --prefix=./test/bundling run bundle:all","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.50.0","@apify/log":"^2.2.6","@apify/utilities":"^2.23.2","@crawlee/types":"^3.3.0","ansi-colors":"^4.1.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","proxy-agent":"^6.5.0","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@rspack/cli":"^1.7.6","@rspack/core":"^1.7.6","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/compression":"^1.8.1","@types/content-type":"^1.1.5","@types/express":"^5.0.0","@types/node":"^24.0.0","ajv":"^8.17.1","body-parser":"^2.0.0","compression":"^1.7.4","esbuild":"0.27.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^5.0.0","gen-esm-wrapper":"^1.1.2","globals":"^17.0.0","prettier":"^3.5.3","puppeteer":"^24.0.0","rimraf":"^6.0.0","rolldown":"^1.0.0-rc.4","typescript":"^5.8.3","typescript-eslint":"^8.29.1","vitest":"^4.0.16","webpack":"^5.105.2","webpack-cli":"^7.0.0"},"packageManager":"npm@10.9.2"}')
26626
+ module.exports = JSON.parse('{"name":"apify-client","version":"2.23.1","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","./browser":"./dist/bundle.js",".":{"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 && vitest run","test:bundling":"npm run build && npm --prefix=./test/bundling run bundle:all","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.50.0","@apify/log":"^2.2.6","@apify/utilities":"^2.23.2","@crawlee/types":"^3.3.0","ansi-colors":"^4.1.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","proxy-agent":"^6.5.0","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@rspack/cli":"^1.7.6","@rspack/core":"^1.7.6","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/compression":"^1.8.1","@types/content-type":"^1.1.5","@types/express":"^5.0.0","@types/node":"^24.0.0","ajv":"^8.17.1","body-parser":"^2.0.0","compression":"^1.7.4","esbuild":"0.27.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^5.0.0","gen-esm-wrapper":"^1.1.2","globals":"^17.0.0","prettier":"^3.5.3","puppeteer":"^24.0.0","rimraf":"^6.0.0","rolldown":"^1.0.0-rc.4","typescript":"^5.8.3","typescript-eslint":"^8.29.1","vitest":"^4.0.16","webpack":"^5.105.2","webpack-cli":"^7.0.0"},"packageManager":"npm@10.9.2"}')
26473
26627
 
26474
26628
  },
26475
26629