apify 2.3.1-beta.4 → 3.0.0-alpha.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/README.md +6 -5
- package/package.json +69 -128
- package/build/actor.d.ts +0 -113
- package/build/actor.d.ts.map +0 -1
- package/build/actor.js +0 -582
- package/build/actor.js.map +0 -1
- package/build/apify.d.ts +0 -752
- package/build/apify.d.ts.map +0 -1
- package/build/apify.js +0 -877
- package/build/apify.js.map +0 -1
- package/build/autoscaling/autoscaled_pool.d.ts +0 -384
- package/build/autoscaling/autoscaled_pool.d.ts.map +0 -1
- package/build/autoscaling/autoscaled_pool.js +0 -557
- package/build/autoscaling/autoscaled_pool.js.map +0 -1
- package/build/autoscaling/snapshotter.d.ts +0 -278
- package/build/autoscaling/snapshotter.d.ts.map +0 -1
- package/build/autoscaling/snapshotter.js +0 -447
- package/build/autoscaling/snapshotter.js.map +0 -1
- package/build/autoscaling/system_status.d.ts +0 -224
- package/build/autoscaling/system_status.d.ts.map +0 -1
- package/build/autoscaling/system_status.js +0 -228
- package/build/autoscaling/system_status.js.map +0 -1
- package/build/browser_launchers/browser_launcher.d.ts +0 -154
- package/build/browser_launchers/browser_launcher.d.ts.map +0 -1
- package/build/browser_launchers/browser_launcher.js +0 -160
- package/build/browser_launchers/browser_launcher.js.map +0 -1
- package/build/browser_launchers/browser_plugin.d.ts +0 -23
- package/build/browser_launchers/browser_plugin.d.ts.map +0 -1
- package/build/browser_launchers/browser_plugin.js +0 -25
- package/build/browser_launchers/browser_plugin.js.map +0 -1
- package/build/browser_launchers/playwright_launcher.d.ts +0 -131
- package/build/browser_launchers/playwright_launcher.d.ts.map +0 -1
- package/build/browser_launchers/playwright_launcher.js +0 -150
- package/build/browser_launchers/playwright_launcher.js.map +0 -1
- package/build/browser_launchers/puppeteer_launcher.d.ts +0 -153
- package/build/browser_launchers/puppeteer_launcher.d.ts.map +0 -1
- package/build/browser_launchers/puppeteer_launcher.js +0 -197
- package/build/browser_launchers/puppeteer_launcher.js.map +0 -1
- package/build/cache_container.d.ts +0 -31
- package/build/cache_container.d.ts.map +0 -1
- package/build/cache_container.js +0 -48
- package/build/cache_container.js.map +0 -1
- package/build/configuration.d.ts +0 -226
- package/build/configuration.d.ts.map +0 -1
- package/build/configuration.js +0 -325
- package/build/configuration.js.map +0 -1
- package/build/constants.d.ts +0 -37
- package/build/constants.d.ts.map +0 -1
- package/build/constants.js +0 -41
- package/build/constants.js.map +0 -1
- package/build/crawlers/basic_crawler.d.ts +0 -443
- package/build/crawlers/basic_crawler.d.ts.map +0 -1
- package/build/crawlers/basic_crawler.js +0 -664
- package/build/crawlers/basic_crawler.js.map +0 -1
- package/build/crawlers/browser_crawler.d.ts +0 -512
- package/build/crawlers/browser_crawler.d.ts.map +0 -1
- package/build/crawlers/browser_crawler.js +0 -540
- package/build/crawlers/browser_crawler.js.map +0 -1
- package/build/crawlers/cheerio_crawler.d.ts +0 -931
- package/build/crawlers/cheerio_crawler.d.ts.map +0 -1
- package/build/crawlers/cheerio_crawler.js +0 -913
- package/build/crawlers/cheerio_crawler.js.map +0 -1
- package/build/crawlers/crawler_extension.d.ts +0 -10
- package/build/crawlers/crawler_extension.d.ts.map +0 -1
- package/build/crawlers/crawler_extension.js +0 -19
- package/build/crawlers/crawler_extension.js.map +0 -1
- package/build/crawlers/crawler_utils.d.ts +0 -34
- package/build/crawlers/crawler_utils.d.ts.map +0 -1
- package/build/crawlers/crawler_utils.js +0 -87
- package/build/crawlers/crawler_utils.js.map +0 -1
- package/build/crawlers/playwright_crawler.d.ts +0 -448
- package/build/crawlers/playwright_crawler.d.ts.map +0 -1
- package/build/crawlers/playwright_crawler.js +0 -299
- package/build/crawlers/playwright_crawler.js.map +0 -1
- package/build/crawlers/puppeteer_crawler.d.ts +0 -425
- package/build/crawlers/puppeteer_crawler.d.ts.map +0 -1
- package/build/crawlers/puppeteer_crawler.js +0 -299
- package/build/crawlers/puppeteer_crawler.js.map +0 -1
- package/build/crawlers/statistics.d.ts +0 -185
- package/build/crawlers/statistics.d.ts.map +0 -1
- package/build/crawlers/statistics.js +0 -331
- package/build/crawlers/statistics.js.map +0 -1
- package/build/enqueue_links/click_elements.d.ts +0 -179
- package/build/enqueue_links/click_elements.d.ts.map +0 -1
- package/build/enqueue_links/click_elements.js +0 -434
- package/build/enqueue_links/click_elements.js.map +0 -1
- package/build/enqueue_links/enqueue_links.d.ts +0 -117
- package/build/enqueue_links/enqueue_links.d.ts.map +0 -1
- package/build/enqueue_links/enqueue_links.js +0 -163
- package/build/enqueue_links/enqueue_links.js.map +0 -1
- package/build/enqueue_links/shared.d.ts +0 -42
- package/build/enqueue_links/shared.d.ts.map +0 -1
- package/build/enqueue_links/shared.js +0 -121
- package/build/enqueue_links/shared.js.map +0 -1
- package/build/errors.d.ts +0 -29
- package/build/errors.d.ts.map +0 -1
- package/build/errors.js +0 -38
- package/build/errors.js.map +0 -1
- package/build/events.d.ts +0 -11
- package/build/events.d.ts.map +0 -1
- package/build/events.js +0 -147
- package/build/events.js.map +0 -1
- package/build/index.d.ts +0 -4
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -7
- package/build/index.js.map +0 -1
- package/build/main.d.ts +0 -179
- package/build/main.d.ts.map +0 -1
- package/build/main.js +0 -81
- package/build/main.js.map +0 -1
- package/build/playwright_utils.d.ts +0 -9
- package/build/playwright_utils.d.ts.map +0 -1
- package/build/playwright_utils.js +0 -90
- package/build/playwright_utils.js.map +0 -1
- package/build/proxy_configuration.d.ts +0 -411
- package/build/proxy_configuration.d.ts.map +0 -1
- package/build/proxy_configuration.js +0 -517
- package/build/proxy_configuration.js.map +0 -1
- package/build/pseudo_url.d.ts +0 -86
- package/build/pseudo_url.d.ts.map +0 -1
- package/build/pseudo_url.js +0 -153
- package/build/pseudo_url.js.map +0 -1
- package/build/puppeteer_request_interception.d.ts +0 -8
- package/build/puppeteer_request_interception.d.ts.map +0 -1
- package/build/puppeteer_request_interception.js +0 -235
- package/build/puppeteer_request_interception.js.map +0 -1
- package/build/puppeteer_utils.d.ts +0 -250
- package/build/puppeteer_utils.d.ts.map +0 -1
- package/build/puppeteer_utils.js +0 -551
- package/build/puppeteer_utils.js.map +0 -1
- package/build/request.d.ts +0 -180
- package/build/request.d.ts.map +0 -1
- package/build/request.js +0 -261
- package/build/request.js.map +0 -1
- package/build/request_list.d.ts +0 -581
- package/build/request_list.d.ts.map +0 -1
- package/build/request_list.js +0 -826
- package/build/request_list.js.map +0 -1
- package/build/serialization.d.ts +0 -5
- package/build/serialization.d.ts.map +0 -1
- package/build/serialization.js +0 -139
- package/build/serialization.js.map +0 -1
- package/build/session_pool/errors.d.ts +0 -11
- package/build/session_pool/errors.d.ts.map +0 -1
- package/build/session_pool/errors.js +0 -18
- package/build/session_pool/errors.js.map +0 -1
- package/build/session_pool/events.d.ts +0 -5
- package/build/session_pool/events.d.ts.map +0 -1
- package/build/session_pool/events.js +0 -6
- package/build/session_pool/events.js.map +0 -1
- package/build/session_pool/session.d.ts +0 -286
- package/build/session_pool/session.d.ts.map +0 -1
- package/build/session_pool/session.js +0 -355
- package/build/session_pool/session.js.map +0 -1
- package/build/session_pool/session_pool.d.ts +0 -280
- package/build/session_pool/session_pool.d.ts.map +0 -1
- package/build/session_pool/session_pool.js +0 -393
- package/build/session_pool/session_pool.js.map +0 -1
- package/build/session_pool/session_utils.d.ts +0 -4
- package/build/session_pool/session_utils.d.ts.map +0 -1
- package/build/session_pool/session_utils.js +0 -24
- package/build/session_pool/session_utils.js.map +0 -1
- package/build/stealth/hiding_tricks.d.ts +0 -22
- package/build/stealth/hiding_tricks.d.ts.map +0 -1
- package/build/stealth/hiding_tricks.js +0 -308
- package/build/stealth/hiding_tricks.js.map +0 -1
- package/build/stealth/stealth.d.ts +0 -56
- package/build/stealth/stealth.d.ts.map +0 -1
- package/build/stealth/stealth.js +0 -125
- package/build/stealth/stealth.js.map +0 -1
- package/build/storages/dataset.d.ts +0 -288
- package/build/storages/dataset.d.ts.map +0 -1
- package/build/storages/dataset.js +0 -480
- package/build/storages/dataset.js.map +0 -1
- package/build/storages/key_value_store.d.ts +0 -243
- package/build/storages/key_value_store.d.ts.map +0 -1
- package/build/storages/key_value_store.js +0 -462
- package/build/storages/key_value_store.js.map +0 -1
- package/build/storages/request_queue.d.ts +0 -318
- package/build/storages/request_queue.d.ts.map +0 -1
- package/build/storages/request_queue.js +0 -636
- package/build/storages/request_queue.js.map +0 -1
- package/build/storages/storage_manager.d.ts +0 -87
- package/build/storages/storage_manager.d.ts.map +0 -1
- package/build/storages/storage_manager.js +0 -150
- package/build/storages/storage_manager.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -1
- package/build/typedefs.d.ts +0 -146
- package/build/typedefs.d.ts.map +0 -1
- package/build/typedefs.js +0 -88
- package/build/typedefs.js.map +0 -1
- package/build/utils.d.ts +0 -175
- package/build/utils.d.ts.map +0 -1
- package/build/utils.js +0 -731
- package/build/utils.js.map +0 -1
- package/build/utils_log.d.ts +0 -41
- package/build/utils_log.d.ts.map +0 -1
- package/build/utils_log.js +0 -192
- package/build/utils_log.js.map +0 -1
- package/build/utils_request.d.ts +0 -77
- package/build/utils_request.d.ts.map +0 -1
- package/build/utils_request.js +0 -385
- package/build/utils_request.js.map +0 -1
- package/build/utils_social.d.ts +0 -210
- package/build/utils_social.d.ts.map +0 -1
- package/build/utils_social.js +0 -787
- package/build/utils_social.js.map +0 -1
- package/build/validators.d.ts +0 -23
- package/build/validators.d.ts.map +0 -1
- package/build/validators.js +0 -29
- package/build/validators.js.map +0 -1
package/build/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.js"],"names":[],"mappings":";;;;AAAA,0EAAoC;AACpC,iDAAyC;AACzC,+CAA2C;AAC3C,4DAA0E;AAC1E,0CAAoE;AACpE,gDAAgD;AAChD,mEAA8B;AAC9B,6EAA6C;AAC7C,yDAAoB;AACpB,yEAA8B;AAC9B,yDAAo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nB,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB,EAAlB,0BAAkB;IAClB,iBAAiB,EAAjB,yBAAiB;CACpB,CAAC"}
|
package/build/utils_log.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export type LoggerOptions = {
|
|
2
|
-
/**
|
|
3
|
-
* Sets the log level to the given value, preventing messages from less important log levels
|
|
4
|
-
* from being printed to the console. Use in conjunction with the `log.LEVELS` constants.
|
|
5
|
-
*/
|
|
6
|
-
level?: number | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Max depth of data object that will be logged. Anything deeper than the limit will be stripped off.
|
|
9
|
-
*/
|
|
10
|
-
maxDepth?: number | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Max length of the string to be logged. Longer strings will be truncated.
|
|
13
|
-
*/
|
|
14
|
-
maxStringLength?: number | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Prefix to be prepended the each logged line.
|
|
17
|
-
*/
|
|
18
|
-
prefix?: string | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Suffix that will be appended the each logged line.
|
|
21
|
-
*/
|
|
22
|
-
suffix?: string | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Logger implementation to be used. Default one is log.LoggerText to log messages as easily readable
|
|
25
|
-
* strings. Optionally you can use `log.LoggerJson` that formats each log line as a JSON.
|
|
26
|
-
*/
|
|
27
|
-
logger?: Logger | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Additional data to be added to each log line.
|
|
30
|
-
*/
|
|
31
|
-
data?: Record<string, unknown> | undefined;
|
|
32
|
-
};
|
|
33
|
-
export default log;
|
|
34
|
-
import { Log } from "@apify/log/log";
|
|
35
|
-
import { Logger } from "@apify/log/logger";
|
|
36
|
-
import { LogLevel } from "@apify/log/log_consts";
|
|
37
|
-
import { LoggerJson } from "@apify/log/logger_json";
|
|
38
|
-
import { LoggerText } from "@apify/log/logger_text";
|
|
39
|
-
import log from "@apify/log";
|
|
40
|
-
export { Log, LogLevel, Logger, LoggerJson, LoggerText };
|
|
41
|
-
//# sourceMappingURL=utils_log.d.ts.map
|
package/build/utils_log.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils_log.d.ts","sourceRoot":"","sources":["../src/utils_log.js"],"names":[],"mappings":""}
|
package/build/utils_log.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Changes to the JsDoc here need to be replicated to types-apify/apify-shared/log.d.ts
|
|
3
|
-
// This file is mainly for building the docs, not to provide typings
|
|
4
|
-
// For the output of "main" typings to be correct, this file should be references
|
|
5
|
-
// instead of '@apify/log'
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.LoggerText = exports.LoggerJson = exports.Logger = exports.LogLevel = exports.Log = void 0;
|
|
8
|
-
const tslib_1 = require("tslib");
|
|
9
|
-
/**
|
|
10
|
-
* @typedef {object} LoggerOptions
|
|
11
|
-
* @property {number} [level=4] Sets the log level to the given value, preventing messages from less important log levels
|
|
12
|
-
* from being printed to the console. Use in conjunction with the `log.LEVELS` constants.
|
|
13
|
-
* @property {number} [maxDepth=4] Max depth of data object that will be logged. Anything deeper than the limit will be stripped off.
|
|
14
|
-
* @property {number} [maxStringLength=2000] Max length of the string to be logged. Longer strings will be truncated.
|
|
15
|
-
* @property {string} [prefix] Prefix to be prepended the each logged line.
|
|
16
|
-
* @property {string} [suffix] Suffix that will be appended the each logged line.
|
|
17
|
-
* @property {Logger} [logger] Logger implementation to be used. Default one is log.LoggerText to log messages as easily readable
|
|
18
|
-
* strings. Optionally you can use `log.LoggerJson` that formats each log line as a JSON.
|
|
19
|
-
* @property {Record<string, unknown>} [data] Additional data to be added to each log line.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* The log instance enables level aware logging of messages and we advise
|
|
23
|
-
* to use it instead of `console.log()` and its aliases in most development
|
|
24
|
-
* scenarios.
|
|
25
|
-
*
|
|
26
|
-
* A very useful use case for `log` is using `log.debug` liberally throughout
|
|
27
|
-
* the codebase to get useful logging messages only when appropriate log level is set
|
|
28
|
-
* and keeping the console tidy in production environments.
|
|
29
|
-
*
|
|
30
|
-
* The available logging levels are, in this order: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `OFF`
|
|
31
|
-
* and can be referenced from the `log.LEVELS` constant, such as `log.LEVELS.ERROR`.
|
|
32
|
-
*
|
|
33
|
-
* To log messages to the system console, use the `log.level(message)` invocation,
|
|
34
|
-
* such as `log.debug('this is a debug message')`.
|
|
35
|
-
*
|
|
36
|
-
* To prevent writing of messages above a certain log level to the console, simply
|
|
37
|
-
* set the appropriate level. The default log level is `INFO`, which means that
|
|
38
|
-
* `DEBUG` messages will not be printed, unless enabled.
|
|
39
|
-
*
|
|
40
|
-
* **Example:**
|
|
41
|
-
* ```js
|
|
42
|
-
* const Apify = require('apify');
|
|
43
|
-
* const { log } = Apify.utils;
|
|
44
|
-
*
|
|
45
|
-
* log.info('Information message', { someData: 123 }); // prints message
|
|
46
|
-
* log.debug('Debug message', { debugData: 'hello' }); // doesn't print anything
|
|
47
|
-
*
|
|
48
|
-
* log.setLevel(log.LEVELS.DEBUG);
|
|
49
|
-
* log.debug('Debug message'); // prints message
|
|
50
|
-
*
|
|
51
|
-
* log.setLevel(log.LEVELS.ERROR);
|
|
52
|
-
* log.debug('Debug message'); // doesn't print anything
|
|
53
|
-
* log.info('Info message'); // doesn't print anything
|
|
54
|
-
*
|
|
55
|
-
* log.error('Error message', { errorDetails: 'This is bad!' }); // prints message
|
|
56
|
-
* try {
|
|
57
|
-
* throw new Error('Not good!');
|
|
58
|
-
* } catch (e) {
|
|
59
|
-
* log.exception(e, 'Exception occurred', { errorDetails: 'This is really bad!' }); // prints message
|
|
60
|
-
* }
|
|
61
|
-
*
|
|
62
|
-
* log.setOptions({ prefix: 'My actor' });
|
|
63
|
-
* log.info('I am running!'); // prints "My actor: I am running"
|
|
64
|
-
*
|
|
65
|
-
* const childLog = log.child({ prefix: 'Crawler' });
|
|
66
|
-
* log.info('I am crawling!'); // prints "My actor:Crawler: I am crawling"
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
|
-
* Another very useful way of setting the log level is by setting the `APIFY_LOG_LEVEL`
|
|
70
|
-
* environment variable, such as `APIFY_LOG_LEVEL=DEBUG`. This way, no code changes
|
|
71
|
-
* are necessary to turn on your debug messages and start debugging right away.
|
|
72
|
-
*
|
|
73
|
-
* To add timestamps to your logs, you can override the default logger settings:
|
|
74
|
-
* ```js
|
|
75
|
-
* log.setOptions({
|
|
76
|
-
* logger: new log.LoggerText({ skipTime: false }),
|
|
77
|
-
* });
|
|
78
|
-
* ```
|
|
79
|
-
* You can customize your logging further by extending or replacing the default
|
|
80
|
-
* logger instances with your own implementations.
|
|
81
|
-
*
|
|
82
|
-
* @namespace log
|
|
83
|
-
*/
|
|
84
|
-
/**
|
|
85
|
-
* Map of available log levels that's useful for easy setting of appropriate log levels.
|
|
86
|
-
* Each log level is represented internally by a number. Eg. `log.LEVELS.DEBUG === 5`.
|
|
87
|
-
* @name LEVELS
|
|
88
|
-
* @type Object
|
|
89
|
-
* @memberOf log
|
|
90
|
-
*/
|
|
91
|
-
/**
|
|
92
|
-
* Sets the log level to the given value, preventing messages from less important log levels
|
|
93
|
-
* from being printed to the console. Use in conjunction with the `log.LEVELS` constants such as
|
|
94
|
-
*
|
|
95
|
-
* ```
|
|
96
|
-
* log.setLevel(log.LEVELS.DEBUG);
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* Default log level is INFO.
|
|
100
|
-
* @name setLevel
|
|
101
|
-
* @param {number} level
|
|
102
|
-
* @method
|
|
103
|
-
* @memberOf log
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
* Returns the currently selected logging level. This is useful for checking whether a message
|
|
107
|
-
* will actually be printed to the console before one actually performs a resource intensive operation
|
|
108
|
-
* to construct the message, such as querying a DB for some metadata that need to be added. If the log
|
|
109
|
-
* level is not high enough at the moment, it doesn't make sense to execute the query.
|
|
110
|
-
* @name getLevel
|
|
111
|
-
* @method
|
|
112
|
-
* @memberOf log
|
|
113
|
-
*/
|
|
114
|
-
/**
|
|
115
|
-
* Configures logger.
|
|
116
|
-
* @name setOptions
|
|
117
|
-
* @param {LoggerOptions} options
|
|
118
|
-
* @method
|
|
119
|
-
* @memberOf log
|
|
120
|
-
*/
|
|
121
|
-
/**
|
|
122
|
-
* Creates a new instance of logger that inherits settings from a parent logger.
|
|
123
|
-
* @name child
|
|
124
|
-
* @param {LoggerOptions} [options] Supports the same options as the `setOptions()` method.
|
|
125
|
-
* @method
|
|
126
|
-
* @memberOf log
|
|
127
|
-
*/
|
|
128
|
-
/**
|
|
129
|
-
* Returns the logger configuration.
|
|
130
|
-
* @name getOptions
|
|
131
|
-
* @method
|
|
132
|
-
* @returns {LoggerOptions}
|
|
133
|
-
* @memberOf log
|
|
134
|
-
*/
|
|
135
|
-
/**
|
|
136
|
-
* Logs a `DEBUG` message. By default, it will not be written to the console. To see `DEBUG`
|
|
137
|
-
* messages in the console, set the log level to `DEBUG` either using the `log.setLevel(log.LEVELS.DEBUG)`
|
|
138
|
-
* method or using the environment variable `APIFY_LOG_LEVEL=DEBUG`. Data are stringified and appended
|
|
139
|
-
* to the message.
|
|
140
|
-
* @name debug
|
|
141
|
-
* @param {string} message
|
|
142
|
-
* @param {object} [data]
|
|
143
|
-
* @method
|
|
144
|
-
* @memberOf log
|
|
145
|
-
*/
|
|
146
|
-
/**
|
|
147
|
-
* Logs an `INFO` message. `INFO` is the default log level so info messages will be always logged,
|
|
148
|
-
* unless the log level is changed. Data are stringified and appended to the message.
|
|
149
|
-
* @name info
|
|
150
|
-
* @param {string} message
|
|
151
|
-
* @param {object} [data]
|
|
152
|
-
* @method
|
|
153
|
-
* @memberOf log
|
|
154
|
-
*/
|
|
155
|
-
/**
|
|
156
|
-
* Logs a `WARNING` level message. Data are stringified and appended to the message.
|
|
157
|
-
* @name warning
|
|
158
|
-
* @param {string} message
|
|
159
|
-
* @param {object} [data]
|
|
160
|
-
* @method
|
|
161
|
-
* @memberOf log
|
|
162
|
-
*/
|
|
163
|
-
/**
|
|
164
|
-
* Logs an `ERROR` message. Use this method to log error messages that are not directly connected
|
|
165
|
-
* to an exception. For logging exceptions, use the `log.exception` method.
|
|
166
|
-
* @name error
|
|
167
|
-
* @param {string} message
|
|
168
|
-
* @param {object} [data]
|
|
169
|
-
* @method
|
|
170
|
-
* @memberOf log
|
|
171
|
-
*/
|
|
172
|
-
/**
|
|
173
|
-
* Logs an `ERROR` level message with a nicely formatted exception. Note that the exception is the first parameter
|
|
174
|
-
* here and an additional message is only optional.
|
|
175
|
-
* @name exception
|
|
176
|
-
* @param {Error} exception
|
|
177
|
-
* @param {string} [message]
|
|
178
|
-
* @param {object} [data]
|
|
179
|
-
* @method
|
|
180
|
-
* @memberOf log
|
|
181
|
-
*/
|
|
182
|
-
// variable can't be the same from the namespace above
|
|
183
|
-
const log_1 = (0, tslib_1.__importStar)(require("@apify/log"));
|
|
184
|
-
Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return log_1.Log; } });
|
|
185
|
-
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return log_1.LogLevel; } });
|
|
186
|
-
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return log_1.Logger; } });
|
|
187
|
-
Object.defineProperty(exports, "LoggerJson", { enumerable: true, get: function () { return log_1.LoggerJson; } });
|
|
188
|
-
Object.defineProperty(exports, "LoggerText", { enumerable: true, get: function () { return log_1.LoggerText; } });
|
|
189
|
-
// workaround for 2.x, this should ideally not be backported to 3.0 (the test should be there tho)
|
|
190
|
-
Object.assign(log_1.default, { Log: log_1.Log, LogLevel: log_1.LogLevel, Logger: log_1.Logger, LoggerJson: log_1.LoggerJson, LoggerText: log_1.LoggerText });
|
|
191
|
-
exports.default = log_1.default;
|
|
192
|
-
//# sourceMappingURL=utils_log.js.map
|
package/build/utils_log.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils_log.js","sourceRoot":"","sources":["../src/utils_log.js"],"names":[],"mappings":";AAAA,uFAAuF;AACvF,oEAAoE;AACpE,iFAAiF;AACjF,0BAA0B;;;;AAE1B;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;GAQG;AAEH;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AAEH,sDAAsD;AACtD,+DAA+F;AAKtF,oFALK,SAAG,OAKL;AAAiB,yFALK,cAAQ,OAKL;AAAE,uFALK,YAAM,OAKL;AAAE,2FALK,gBAAU,OAKL;AAAE,2FALK,gBAAU,OAKL;AAHrE,kGAAkG;AAClG,MAAM,CAAC,MAAM,CAAC,aAAG,EAAE,EAAE,GAAG,EAAH,SAAG,EAAE,QAAQ,EAAR,cAAQ,EAAE,MAAM,EAAN,YAAM,EAAE,UAAU,EAAV,gBAAU,EAAE,UAAU,EAAV,gBAAU,EAAE,CAAC,CAAC;AAGtE,kBAAe,aAAG,CAAC"}
|
package/build/utils_request.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export function requestAsBrowser(options?: RequestAsBrowserOptions): Promise<RequestAsBrowserResult>;
|
|
3
|
-
export type RequestAsBrowserResult = (IncomingMessage & {
|
|
4
|
-
body: string;
|
|
5
|
-
});
|
|
6
|
-
export type RequestAsBrowserOptions = {
|
|
7
|
-
/**
|
|
8
|
-
* URL of the target endpoint. Supports both HTTP and HTTPS schemes.
|
|
9
|
-
*/
|
|
10
|
-
url: string;
|
|
11
|
-
/**
|
|
12
|
-
* HTTP method.
|
|
13
|
-
*/
|
|
14
|
-
method?: string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Additional HTTP headers to add. It's only recommended to use this option,
|
|
17
|
-
* with headers that are typically added by websites, such as cookies. Overriding
|
|
18
|
-
* default browser headers will remove the masking this function provides.
|
|
19
|
-
*/
|
|
20
|
-
headers?: {
|
|
21
|
-
[x: string]: string;
|
|
22
|
-
} | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* An HTTP proxy to be passed down to the HTTP request. Supports proxy authentication with Basic Auth.
|
|
25
|
-
*/
|
|
26
|
-
proxyUrl?: string | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Configuration to be used for generating correct browser headers.
|
|
29
|
-
* See the [`header-generator`](https://github.com/apify/header-generator) library.
|
|
30
|
-
*/
|
|
31
|
-
headerGeneratorOptions?: object | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Two-letter ISO 639 language code.
|
|
34
|
-
*/
|
|
35
|
-
languageCode?: string | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Two-letter ISO 3166 country code.
|
|
38
|
-
*/
|
|
39
|
-
countryCode?: string | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* If `true`, the function uses User-Agent of a mobile browser.
|
|
42
|
-
*/
|
|
43
|
-
useMobileVersion?: boolean | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* If set to true, SSL/TLS certificate errors will be ignored.
|
|
46
|
-
*/
|
|
47
|
-
ignoreSslErrors?: boolean | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Node.js' HTTP parser is stricter than parsers used by web browsers, which prevents scraping of websites
|
|
50
|
-
* whose servers do not comply with HTTP specs, either by accident or due to some anti-scraping protections,
|
|
51
|
-
* causing e.g. the `invalid header value char` error. The `useInsecureHttpParser` option forces
|
|
52
|
-
* the HTTP parser to ignore certain errors which lets you scrape such websites.
|
|
53
|
-
* However, it will also open your application to some security vulnerabilities,
|
|
54
|
-
* although the risk should be negligible as these vulnerabilities mainly relate to server applications, not clients.
|
|
55
|
-
* Learn more in this [blog post](https://snyk.io/blog/node-js-release-fixes-a-critical-http-security-vulnerability/).
|
|
56
|
-
*/
|
|
57
|
-
useInsecureHttpParser?: boolean | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Function accepts `response` object as a single parameter and should return `true` or `false`.
|
|
60
|
-
* If function returns true, request gets aborted.
|
|
61
|
-
*/
|
|
62
|
-
abortFunction?: AbortFunction | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* If set to false, it will prevent use of HTTP2 requests. This is strongly discouraged. Websites
|
|
65
|
-
* expect HTTP2 connections, because browsers use HTTP2 by default. It will automatically downgrade
|
|
66
|
-
* to HTTP/1.1 for websites that do not support HTTP2.
|
|
67
|
-
*/
|
|
68
|
-
useHttp2?: boolean | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* A unique object used to generate browser headers. By default, new headers are generated on every call.
|
|
71
|
-
* Set this option to make these headers persistent.
|
|
72
|
-
*/
|
|
73
|
-
sessionToken?: object | undefined;
|
|
74
|
-
};
|
|
75
|
-
export type AbortFunction = (response: IncomingMessage) => boolean;
|
|
76
|
-
import { IncomingMessage } from "http";
|
|
77
|
-
//# sourceMappingURL=utils_request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils_request.d.ts","sourceRoot":"","sources":["../src/utils_request.js"],"names":[],"mappings":";AA0GO,2CATI,uBAAuB,GAEtB,QAAQ,sBAAsB,CAAC,CAsH1C;qCAhNY,CAAC,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;SAKnC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCA2CT,eAAe,KACb,OAAO"}
|