[AAE-16884] revert request removal (#8959)

* [ci:force] revert request removal

* [ci:force] dummy change to trigger e2e
This commit is contained in:
Denys Vuika
2023-10-02 17:33:43 +01:00
committed by GitHub
parent 94baaf7d33
commit 034e9574d0
4 changed files with 53 additions and 56 deletions

View File

@@ -18,7 +18,7 @@
*/ */
import program from 'commander'; import program from 'commander';
import http from 'node:http'; import request = require('request');
import * as fs from 'fs'; import * as fs from 'fs';
import { logger } from './logger'; import { logger } from './logger';
import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api'; import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api';
@@ -666,26 +666,14 @@ function findFailingApps(deployedApps: any[]): any[] {
*/ */
async function getFileFromRemote(url: string, name: string) { async function getFileFromRemote(url: string, name: string) {
return new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
http.get(url, (response) => { request(url)
if (response.statusCode !== 200) { .pipe(fs.createWriteStream(`${name}.zip`))
reject(new Error(`HTTP error! Status: ${response.statusCode}`)); .on('finish', () => {
return;
}
const outputFile = fs.createWriteStream(`${name}.zip`);
response.pipe(outputFile);
outputFile.on('finish', () => {
logger.info(`The file is finished downloading.`); logger.info(`The file is finished downloading.`);
resolve(); resolve();
}); })
.on('error', (error: any) => {
outputFile.on('error', (error) => { logger.error(`Not possible to download the project form remote`);
logger.error(`Not possible to download the project from remote`);
reject(error);
});
}).on('error', (error) => {
logger.error(`Failed to fetch file from remote: ${error.message}`);
reject(error); reject(error);
}); });
}); });

View File

@@ -88,7 +88,7 @@ export class StartProcessCloudService extends BaseCloudService {
/** /**
* Delete an existing process instance * Delete an existing process instance
* *
* @param appName name of the Application * @param appName Application name
* @param processInstanceId the identifier of the process instance to update * @param processInstanceId the identifier of the process instance to update
* @returns Observable<void> * @returns Observable<void>
*/ */

78
package-lock.json generated
View File

@@ -50,6 +50,7 @@
"ngx-monaco-editor-v2": "^14.0.4", "ngx-monaco-editor-v2": "^14.0.4",
"pdfjs-dist": "3.3.122", "pdfjs-dist": "3.3.122",
"raphael": "2.3.0", "raphael": "2.3.0",
"request": "^2.88.2",
"rxjs": "6.6.6", "rxjs": "6.6.6",
"subscriptions-transport-ws": "^0.11.0", "subscriptions-transport-ws": "^0.11.0",
"tslib": "^2.6.2", "tslib": "^2.6.2",
@@ -85,6 +86,7 @@
"@types/minimatch": "^3.0.3", "@types/minimatch": "^3.0.3",
"@types/node": "18.0.0", "@types/node": "18.0.0",
"@types/pdfjs-dist": "^2.10.378", "@types/pdfjs-dist": "^2.10.378",
"@types/request": "^2.48.9",
"@types/selenium-webdriver": "^4.0.11", "@types/selenium-webdriver": "^4.0.11",
"@typescript-eslint/eslint-plugin": "5.59.8", "@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.62.0", "@typescript-eslint/parser": "5.62.0",
@@ -23070,6 +23072,12 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@types/caseless": {
"version": "0.12.3",
"resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.3.tgz",
"integrity": "sha512-ZD/NsIJYq/2RH+hY7lXmstfp/v9djGt9ah+xRQ3pcgR79qiKsG4pLl25AI7IcXxVO8dH9GiBE5rAknC0ePntlw==",
"dev": true
},
"node_modules/@types/connect": { "node_modules/@types/connect": {
"version": "3.4.35", "version": "3.4.35",
"dev": true, "dev": true,
@@ -23341,6 +23349,32 @@
"@types/react": "^16" "@types/react": "^16"
} }
}, },
"node_modules/@types/request": {
"version": "2.48.9",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.9.tgz",
"integrity": "sha512-4mi2hYsvPAhe8RXjk5DKB09sAUzbK68T2XjORehHdWyxFoX2zUnfi1VQ5wU4Md28H/5+uB4DkxY9BS4B87N/0A==",
"dev": true,
"dependencies": {
"@types/caseless": "*",
"@types/node": "*",
"@types/tough-cookie": "*",
"form-data": "^2.5.0"
}
},
"node_modules/@types/request/node_modules/form-data": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
"integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
"dev": true,
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 0.12"
}
},
"node_modules/@types/resolve": { "node_modules/@types/resolve": {
"version": "1.17.1", "version": "1.17.1",
"dev": true, "dev": true,
@@ -23419,6 +23453,12 @@
"version": "1.0.8", "version": "1.0.8",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/tough-cookie": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.3.tgz",
"integrity": "sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==",
"dev": true
},
"node_modules/@types/uglify-js": { "node_modules/@types/uglify-js": {
"version": "3.17.1", "version": "3.17.1",
"license": "MIT", "license": "MIT",
@@ -25095,7 +25135,6 @@
}, },
"node_modules/asn1": { "node_modules/asn1": {
"version": "0.2.6", "version": "0.2.6",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"safer-buffer": "~2.1.0" "safer-buffer": "~2.1.0"
@@ -25125,7 +25164,6 @@
}, },
"node_modules/assert-plus": { "node_modules/assert-plus": {
"version": "1.0.0", "version": "1.0.0",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=0.8" "node": ">=0.8"
@@ -25254,7 +25292,6 @@
}, },
"node_modules/aws-sign2": { "node_modules/aws-sign2": {
"version": "0.7.0", "version": "0.7.0",
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
"node": "*" "node": "*"
@@ -25262,7 +25299,6 @@
}, },
"node_modules/aws4": { "node_modules/aws4": {
"version": "1.12.0", "version": "1.12.0",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/axios": { "node_modules/axios": {
@@ -25731,7 +25767,6 @@
}, },
"node_modules/bcrypt-pbkdf": { "node_modules/bcrypt-pbkdf": {
"version": "1.0.2", "version": "1.0.2",
"dev": true,
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"dependencies": { "dependencies": {
"tweetnacl": "^0.14.3" "tweetnacl": "^0.14.3"
@@ -26875,7 +26910,6 @@
}, },
"node_modules/caseless": { "node_modules/caseless": {
"version": "0.12.0", "version": "0.12.0",
"dev": true,
"license": "Apache-2.0" "license": "Apache-2.0"
}, },
"node_modules/ccount": { "node_modules/ccount": {
@@ -28995,7 +29029,6 @@
}, },
"node_modules/dashdash": { "node_modules/dashdash": {
"version": "1.14.1", "version": "1.14.1",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"assert-plus": "^1.0.0" "assert-plus": "^1.0.0"
@@ -30177,7 +30210,6 @@
}, },
"node_modules/ecc-jsbn": { "node_modules/ecc-jsbn": {
"version": "0.1.2", "version": "0.1.2",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"jsbn": "~0.1.0", "jsbn": "~0.1.0",
@@ -31898,7 +31930,6 @@
}, },
"node_modules/extsprintf": { "node_modules/extsprintf": {
"version": "1.3.0", "version": "1.3.0",
"dev": true,
"engines": [ "engines": [
"node >=0.6.0" "node >=0.6.0"
], ],
@@ -32431,7 +32462,6 @@
}, },
"node_modules/forever-agent": { "node_modules/forever-agent": {
"version": "0.6.1", "version": "0.6.1",
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
"node": "*" "node": "*"
@@ -32869,7 +32899,6 @@
}, },
"node_modules/getpass": { "node_modules/getpass": {
"version": "0.1.7", "version": "0.1.7",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"assert-plus": "^1.0.0" "assert-plus": "^1.0.0"
@@ -33175,7 +33204,6 @@
}, },
"node_modules/har-schema": { "node_modules/har-schema": {
"version": "2.0.0", "version": "2.0.0",
"dev": true,
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=4" "node": ">=4"
@@ -33183,7 +33211,6 @@
}, },
"node_modules/har-validator": { "node_modules/har-validator": {
"version": "5.1.5", "version": "5.1.5",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ajv": "^6.12.3", "ajv": "^6.12.3",
@@ -33195,7 +33222,6 @@
}, },
"node_modules/har-validator/node_modules/ajv": { "node_modules/har-validator/node_modules/ajv": {
"version": "6.12.6", "version": "6.12.6",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
@@ -33210,7 +33236,6 @@
}, },
"node_modules/har-validator/node_modules/json-schema-traverse": { "node_modules/har-validator/node_modules/json-schema-traverse": {
"version": "0.4.1", "version": "0.4.1",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/hard-rejection": { "node_modules/hard-rejection": {
@@ -33921,7 +33946,6 @@
}, },
"node_modules/http-signature": { "node_modules/http-signature": {
"version": "1.2.0", "version": "1.2.0",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"assert-plus": "^1.0.0", "assert-plus": "^1.0.0",
@@ -35081,7 +35105,6 @@
}, },
"node_modules/isstream": { "node_modules/isstream": {
"version": "0.1.2", "version": "0.1.2",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/istanbul-lib-coverage": { "node_modules/istanbul-lib-coverage": {
@@ -37857,7 +37880,6 @@
}, },
"node_modules/jsbn": { "node_modules/jsbn": {
"version": "0.1.1", "version": "0.1.1",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/jsdoc-type-pratt-parser": { "node_modules/jsdoc-type-pratt-parser": {
@@ -38052,7 +38074,6 @@
}, },
"node_modules/json-schema": { "node_modules/json-schema": {
"version": "0.4.0", "version": "0.4.0",
"dev": true,
"license": "(AFL-2.1 OR BSD-3-Clause)" "license": "(AFL-2.1 OR BSD-3-Clause)"
}, },
"node_modules/json-schema-traverse": { "node_modules/json-schema-traverse": {
@@ -38066,7 +38087,6 @@
}, },
"node_modules/json-stringify-safe": { "node_modules/json-stringify-safe": {
"version": "5.0.1", "version": "5.0.1",
"dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/json5": { "node_modules/json5": {
@@ -38104,7 +38124,6 @@
}, },
"node_modules/jsprim": { "node_modules/jsprim": {
"version": "1.4.2", "version": "1.4.2",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"assert-plus": "1.0.0", "assert-plus": "1.0.0",
@@ -41176,7 +41195,6 @@
}, },
"node_modules/oauth-sign": { "node_modules/oauth-sign": {
"version": "0.9.0", "version": "0.9.0",
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
"node": "*" "node": "*"
@@ -42129,7 +42147,6 @@
}, },
"node_modules/performance-now": { "node_modules/performance-now": {
"version": "2.1.0", "version": "2.1.0",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/picocolors": { "node_modules/picocolors": {
@@ -44202,7 +44219,6 @@
}, },
"node_modules/psl": { "node_modules/psl": {
"version": "1.9.0", "version": "1.9.0",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/public-encrypt": { "node_modules/public-encrypt": {
@@ -45248,8 +45264,9 @@
}, },
"node_modules/request": { "node_modules/request": {
"version": "2.88.2", "version": "2.88.2",
"dev": true, "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"license": "Apache-2.0", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
"dependencies": { "dependencies": {
"aws-sign2": "~0.7.0", "aws-sign2": "~0.7.0",
"aws4": "^1.8.0", "aws4": "^1.8.0",
@@ -45278,7 +45295,6 @@
}, },
"node_modules/request/node_modules/form-data": { "node_modules/request/node_modules/form-data": {
"version": "2.3.3", "version": "2.3.3",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
@@ -45291,7 +45307,6 @@
}, },
"node_modules/request/node_modules/qs": { "node_modules/request/node_modules/qs": {
"version": "6.5.3", "version": "6.5.3",
"dev": true,
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"engines": { "engines": {
"node": ">=0.6" "node": ">=0.6"
@@ -45299,7 +45314,6 @@
}, },
"node_modules/request/node_modules/uuid": { "node_modules/request/node_modules/uuid": {
"version": "3.4.0", "version": "3.4.0",
"dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
"uuid": "bin/uuid" "uuid": "bin/uuid"
@@ -47156,7 +47170,6 @@
}, },
"node_modules/sshpk": { "node_modules/sshpk": {
"version": "1.17.0", "version": "1.17.0",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"asn1": "~0.2.3", "asn1": "~0.2.3",
@@ -48760,7 +48773,6 @@
}, },
"node_modules/tough-cookie": { "node_modules/tough-cookie": {
"version": "2.5.0", "version": "2.5.0",
"dev": true,
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"dependencies": { "dependencies": {
"psl": "^1.1.28", "psl": "^1.1.28",
@@ -49155,7 +49167,6 @@
}, },
"node_modules/tunnel-agent": { "node_modules/tunnel-agent": {
"version": "0.6.0", "version": "0.6.0",
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
@@ -49166,7 +49177,6 @@
}, },
"node_modules/tweetnacl": { "node_modules/tweetnacl": {
"version": "0.14.5", "version": "0.14.5",
"dev": true,
"license": "Unlicense" "license": "Unlicense"
}, },
"node_modules/type": { "node_modules/type": {
@@ -49844,7 +49854,6 @@
}, },
"node_modules/verror": { "node_modules/verror": {
"version": "1.10.0", "version": "1.10.0",
"dev": true,
"engines": [ "engines": [
"node >=0.6.0" "node >=0.6.0"
], ],
@@ -49857,7 +49866,6 @@
}, },
"node_modules/verror/node_modules/core-util-is": { "node_modules/verror/node_modules/core-util-is": {
"version": "1.0.2", "version": "1.0.2",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/vfile": { "node_modules/vfile": {

View File

@@ -94,6 +94,7 @@
"ngx-monaco-editor-v2": "^14.0.4", "ngx-monaco-editor-v2": "^14.0.4",
"pdfjs-dist": "3.3.122", "pdfjs-dist": "3.3.122",
"raphael": "2.3.0", "raphael": "2.3.0",
"request": "^2.88.2",
"rxjs": "6.6.6", "rxjs": "6.6.6",
"subscriptions-transport-ws": "^0.11.0", "subscriptions-transport-ws": "^0.11.0",
"tslib": "^2.6.2", "tslib": "^2.6.2",
@@ -129,6 +130,7 @@
"@types/minimatch": "^3.0.3", "@types/minimatch": "^3.0.3",
"@types/node": "18.0.0", "@types/node": "18.0.0",
"@types/pdfjs-dist": "^2.10.378", "@types/pdfjs-dist": "^2.10.378",
"@types/request": "^2.48.9",
"@types/selenium-webdriver": "^4.0.11", "@types/selenium-webdriver": "^4.0.11",
"@typescript-eslint/eslint-plugin": "5.59.8", "@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.62.0", "@typescript-eslint/parser": "5.62.0",
@@ -227,4 +229,3 @@
"module": "./index.js", "module": "./index.js",
"typings": "./index.d.ts" "typings": "./index.d.ts"
} }