Socket
Socket
Sign inDemoInstall

@sap/hdi-deploy

Package Overview
Dependencies
Maintainers
0
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/hdi-deploy - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## 5.2.1
Features:
- added option `--treat-deployer-warnings-as-errors` to enable deployer-side feature for treating warnings as errors
- enhanced liveness ping status messages
Fixes:
- fixed error message truncation in hdicallback
- use @sap/xsenv@5.2.0
## 5.2.0

@@ -2,0 +11,0 @@ Features:

14

deploy.js

@@ -148,2 +148,4 @@ 'use strict';

args.translateJSONEnvBooleanOptionToOption(logger, options, name, option, process.argv);
} else if (option === 'treat_deployer_warnings_as_errors') {
args.translateJSONEnvBooleanOptionToOption(logger, options, name, option, process.argv);
} else if (option === 'simulate_make') {

@@ -282,3 +284,5 @@ args.translateJSONEnvBooleanOptionToOption(logger, options, name, option, process.argv);

' --[no-]treat-warnings-as-errors',
" [don't] treat warnings as errors",
" [don't] enable server-side feature for treating warnings as errors",
' --[no-]treat-deployer-warnings-as-errors',
" [don't] enable deployer-side feature for treating warnings as errors",
" --[no-]simulate-make [don't] simulate the make and skip post-make activities; pre-make activities still take effect, e.g. grants",

@@ -444,2 +448,4 @@ ' --parameter [<key>=<value> ..]',

logger.setHanaClientTrace(true);
} else if (arg === '--no-hana-client-trace') {
logger.setHanaClientTrace(false);
} else if (arg === '--use-hdb') {

@@ -449,2 +455,8 @@ logger.setHDBValue(true);

logger.setHanaClientPacketTrace(true);
} else if (arg === '--no-hana-client-packet-trace') {
logger.setHanaClientPacketTrace(false);
} else if (arg === '--treat-deployer-warnings-as-errors') {
logger.setTreatDeployerWarningsAsErrors(true);
} else if (arg === '--no-treat-deployer-warnings-as-errors') {
logger.setTreatDeployerWarningsAsErrors(false);
} else if (arg === '--connection-timeout') {

@@ -451,0 +463,0 @@ i = parseTimeoutOption('connection-timeout', 'connectionTimeout', i);

@@ -36,4 +36,6 @@ 'use strict';

const message = err.message ? String(err.message) : `${err}`;
logger.setDeploymentStatus('failed');
logger.error('Deployment to container %s failed - error: %s [%s].', creds.schema, message.replace(/(\r\n|\n|\r)/gm, ''), deployId);
} else {
logger.setDeploymentStatus('success');
logger.log('Deployment to container %s done [%s].', creds.schema, deployId);

@@ -40,0 +42,0 @@ }

@@ -22,3 +22,12 @@ 'use strict';

if (Date.now() - this.last_liveness_ping >= last_message_interval) {
logger.log('Working ...');
const last_status = logger.getLivenessStatusMessage();
if (logger.getDeploymentStatus() === 'in_progress') {
logger.log(`${last_status} (waiting for database)`);
} else if (logger.getDeploymentStatus() === 'success') {
logger.log(`Deployment was successful but the connection is still active.\n Last message was: ${last_status}`);
process.exit(0);
} else if (logger.getDeploymentStatus() === 'failed') {
logger.error(`Deployment failed but the connection is still active.\n Last message was: ${last_status}`);
process.exit(1);
}
} else {

@@ -25,0 +34,0 @@ // Do nothing, no need to update status, since a message has already been sent in the last seconds.

@@ -11,3 +11,6 @@ 'use strict';

let isHanaClientPacketTraceEnabled = false;
let treatDeployerWarningsAsErrors = false;
let isUseHDBEnabled = false;
let deploymentStatus = 'in_progress';
let livenessStatusMessage = 'Processing files ...';
const Liveness_Ping = require('./liveness-ping');

@@ -96,2 +99,3 @@ const path = require('path');

const str = util.format.apply(null, arguments);
livenessStatusMessage = str;
process.stderr.write(`${str}\n`);

@@ -115,4 +119,9 @@ WriteToLogFile(str, 2);

const args = arguments;
args[0] = `WARNING: ${args[0]}`;
writeToStdOut.apply(null, args);
if (getTreatDeployerWarningsAsErrors()) {
args[0] = `Error: ${args[0]}`;
error.apply(null, args);
} else {
args[0] = `WARNING: ${args[0]}`;
writeToStdOut.apply(null, args);
}
}

@@ -130,3 +139,3 @@

exports.error = function () {
function error () {
const args = arguments;

@@ -144,4 +153,6 @@ writeToStdErr.apply(null, args);

logToParent.apply(null, args);
};
}
exports.error = error;
exports.errorWithoutLogToParent = function () {

@@ -160,2 +171,10 @@ const args = arguments;

exports.setDeploymentStatus = function (value) {
deploymentStatus = value;
};
exports.getDeploymentStatus = function () {
return deploymentStatus;
};
exports.setHanaClientTrace = function (value) {

@@ -177,2 +196,9 @@ isHanaClientTraceEnabled = value;

exports.setLivenessStatusMessage = function (value) {
livenessStatusMessage = value;
};
exports.getLivenessStatusMessage = function () {
return livenessStatusMessage;
};
exports.checkHanaClientTraceArguments = function () {

@@ -191,2 +217,11 @@ if (isHanaClientPacketTraceEnabled && !isHanaClientTraceEnabled) {

};
exports.setTreatDeployerWarningsAsErrors = function (value) {
treatDeployerWarningsAsErrors = value;
};
function getTreatDeployerWarningsAsErrors () {
return treatDeployerWarningsAsErrors;
}
const client_private_key_1_regexp = new RegExp('"client_authentication_private_key":.*', 'ig');

@@ -232,2 +267,3 @@ const client_private_key_2_regexp = new RegExp('client_authentication_private_key:.*', 'ig');

timerInit(timer);
livenessStatusMessage = util.format.apply(null, args);
writeToStdOut.apply(null, args);

@@ -234,0 +270,0 @@ }

4

lib/tasks.js

@@ -19,5 +19,5 @@ /* eslint-disable no-unused-vars */

const e = new Error(`${calltype} call failed!`);
result.messages = JSON.stringify(result.messages, null, 2);
//result.messages = result.messages.filter((message) => message.SEVERITY === 'ERROR');
e.result = result;
logger.error(e);
logger.error(JSON.stringify(e, null, 2));
return callback(e, result);

@@ -24,0 +24,0 @@ } else {

{
"name": "@sap/hdi-deploy",
"version": "5.2.0",
"version": "5.2.1",
"lockfileVersion": 2,

@@ -9,3 +9,3 @@ "requires": true,

"name": "@sap/hdi-deploy",
"version": "5.2.0",
"version": "5.2.1",
"hasInstallScript": true,

@@ -15,3 +15,3 @@ "license": "See LICENSE file",

"@sap/hdi": "4.5.2",
"@sap/xsenv": "5.1.0",
"@sap/xsenv": "5.2.0",
"async": "3.2.5",

@@ -39,3 +39,3 @@ "dotenv": "16.4.5",

"node_modules/@sap/hana-client": {
"version": "2.20.22",
"version": "2.20.23",
"devOptional": true,

@@ -75,5 +75,5 @@ "hasInstallScript": true,

"node_modules/@sap/xsenv": {
"version": "5.1.0",
"version": "5.2.0",
"dependencies": {
"debug": "4.3.4",
"debug": "4.3.5",
"node-cache": "^5.1.0",

@@ -87,3 +87,3 @@ "verror": "1.10.1"

"node_modules/@sap/xsenv/node_modules/debug": {
"version": "4.3.4",
"version": "4.3.5",
"dependencies": {

@@ -258,3 +258,3 @@ "ms": "2.1.2"

"node_modules/uglify-js": {
"version": "3.17.4",
"version": "3.19.1",
"optional": true,

@@ -285,3 +285,3 @@ "bin": {

"@sap/hana-client": {
"version": "2.20.22",
"version": "2.20.23",
"devOptional": true,

@@ -304,5 +304,5 @@ "requires": {

"@sap/xsenv": {
"version": "5.1.0",
"version": "5.2.0",
"requires": {
"debug": "4.3.4",
"debug": "4.3.5",
"node-cache": "^5.1.0",

@@ -313,3 +313,3 @@ "verror": "1.10.1"

"debug": {
"version": "4.3.4",
"version": "4.3.5",
"requires": {

@@ -428,3 +428,3 @@ "ms": "2.1.2"

"uglify-js": {
"version": "3.17.4",
"version": "3.19.1",
"optional": true

@@ -431,0 +431,0 @@ },

{
"name": "@sap/hdi-deploy",
"description": "HDI content deployment",
"version": "5.2.0",
"version": "5.2.1",
"license": "See LICENSE file",

@@ -10,3 +10,3 @@ "repository": {},

"@sap/hdi": "4.5.2",
"@sap/xsenv": "5.1.0",
"@sap/xsenv": "5.2.0",
"async": "3.2.5",

@@ -13,0 +13,0 @@ "dotenv": "16.4.5",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc