apify-cli 0.19.2-beta.7 → 0.19.2-beta.9
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/package.json +3 -3
- package/src/lib/utils.js +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify-cli",
|
|
3
|
-
"version": "0.19.2-beta.
|
|
3
|
+
"version": "0.19.2-beta.9",
|
|
4
4
|
"description": "Apify command-line interface helps you create, develop, build and run Apify actors, and manage the Apify cloud platform.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"@root/walk": "^1.1.0",
|
|
67
67
|
"adm-zip": "^0.5.10",
|
|
68
68
|
"ajv": "^8.12.0",
|
|
69
|
-
"apify-client": "^2.
|
|
69
|
+
"apify-client": "^2.9.0",
|
|
70
70
|
"archiver-promise": "^1.0.0",
|
|
71
|
-
"axios": "^1.6.
|
|
71
|
+
"axios": "^1.6.7",
|
|
72
72
|
"chalk": "^4.1.2",
|
|
73
73
|
"computer-name": "^0.1.0",
|
|
74
74
|
"configparser": "^0.3.10",
|
package/src/lib/utils.js
CHANGED
|
@@ -21,6 +21,7 @@ const {
|
|
|
21
21
|
const AdmZip = require('adm-zip');
|
|
22
22
|
const { ApifyClient } = require('apify-client');
|
|
23
23
|
const archiver = require('archiver-promise');
|
|
24
|
+
const axios = require('axios');
|
|
24
25
|
const escapeStringRegexp = require('escape-string-regexp');
|
|
25
26
|
const globby = require('globby');
|
|
26
27
|
const inquirer = require('inquirer');
|
|
@@ -139,7 +140,14 @@ const getApifyClientOptions = (token, apiBaseUrl) => {
|
|
|
139
140
|
token,
|
|
140
141
|
baseUrl: apiBaseUrl || process.env.APIFY_CLIENT_BASE_URL,
|
|
141
142
|
requestInterceptors: [(config) => {
|
|
142
|
-
config.headers
|
|
143
|
+
if (!config.headers) {
|
|
144
|
+
config.headers = new axios.AxiosHeaders();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
for (const [key, value] of Object.entries(APIFY_CLIENT_DEFAULT_HEADERS)) {
|
|
148
|
+
config.headers[key] = value;
|
|
149
|
+
}
|
|
150
|
+
|
|
143
151
|
return config;
|
|
144
152
|
}],
|
|
145
153
|
};
|