Socket
Socket
Sign inDemoInstall

@sap/xsenv

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/xsenv - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

6

CHANGELOG.md

@@ -8,2 +8,8 @@ # Change Log

## 2.0.0 - 2019-04-22
### Removed
- Node.js 4 support
- Remove deprecated loadCaCert function
## 1.3.0 - 2018-12-18

@@ -10,0 +16,0 @@

1

index.js

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

exports.getServices = xsservices.getServices;
exports.loadCaCert = cacert.loadCaCert;
exports.loadCertificates = cacert.loadCertificates;
'use strict';
var debug = require('debug')('xsenv');
var https = require('https');
var path = require('path');
var fs = require('fs');
var util = require('util');
var assert = require('assert');
var VError = require('verror');
exports.loadCaCert = util.deprecate(loadCaCert,
'xsenv.loadCaCert is deprecated, use xsenv.loadCertificates instead');
exports.loadCertificates = loadCertificates;
function loadCaCert() {
debug('XS_CACERT_PATH', process.env.XS_CACERT_PATH);
if (process.env.XS_CACERT_PATH) {
https.globalAgent.options.ca = loadCertificates(process.env.XS_CACERT_PATH);
}
}
function loadCertificates(certPath) {

@@ -23,0 +12,0 @@ assert(!certPath || typeof certPath === 'string', 'certPath argument should be a string');

{
"version": "1.3.0",
"name": "@sap/xsenv",
"name": "@sap/xsenv",
"version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"assert-plus": {
"version": "1.0.0"
},
"core-util-is": {
"version": "1.0.2"
},
"assert-plus": {
"version": "1.0.0"
},
},
"debug": {
"version": "3.1.0",
"requires": {
"ms": "2.0.0"
}
},
"extsprintf": {
"version": "1.4.0"
},
"ms": {
"version": "2.0.0"
},
"debug": {
"version": "3.1.0"
},
},
"verror": {
"version": "1.10.0"
},
"extsprintf": {
"version": "1.4.0"
"version": "1.10.0",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
}
}
}

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

{"bundleDependencies":false,"dependencies":{"debug":"3.1.0","verror":"1.10.0"},"deprecated":false,"description":"Utility for easy setup and access of SAP HANA XS Advanced environment variables","devDependencies":{"eslint":"3.2.2","filter-node-package":"^2.0.0","istanbul":"0.4.5","lodash":"4.17.11","mocha":"3.0.2","node-build":"^1.1.1","node-style":"^2.0.0","should":"10.0.0"},"engines":{"node":"^0.12.7 || ^4.4.0 || ^6.0.0 || ^8.0.0 || ^10.0.0"},"main":"index.js","name":"@sap/xsenv","repository":{},"scripts":{"lint":"eslint -f stylish --ignore-path .gitignore .","prepareRelease":"clean-packages && npm prune --production","test":"node build/test"},"version":"1.3.0","license":"SEE LICENSE IN developer-license-3.1.txt"}
{"bundleDependencies":false,"dependencies":{"debug":"3.1.0","verror":"1.10.0"},"deprecated":false,"description":"Utility for easy setup and access of SAP HANA XS Advanced environment variables","devDependencies":{"eslint":"3.2.2","filter-node-package":"^2.2.0","istanbul":"0.4.5","lodash":"4.17.11","mocha":"3.0.2","node-build":"^1.1.1","node-style":"^2.0.0","should":"10.0.0"},"engines":{"node":"^6.0.0 || ^8.0.0 || ^10.0.0"},"main":"index.js","name":"@sap/xsenv","repository":{},"scripts":{"lint":"eslint -f stylish --ignore-path .gitignore .","prepareRelease":"npm shrinkwrap && clean-packages -i && npm prune","test":"node build/test"},"version":"2.0.0","license":"SEE LICENSE IN developer-license-3.1.txt"}

@@ -354,25 +354,4 @@ # @sap/xsenv

### loadCaCert()
**Deprecated.** Use `loadCertificates` instead.
This function loads the certificates listed in `XS_CACERT_PATH` environment variable
into [https.globalAgent](https://nodejs.org/api/https.html#https_https_globalagent) of Node.js.
All subsequent outgoing HTTPS connections will use these certificates to verify the certificate
of the remote host. The verification should be successful if the certificate of the
remote host is signed (directly or via some intermediary) by some of these trusted
certificates.
It is suggested to call this function once during the application startup.
```js
xsenv.loadCaCert();
```
If `XS_CACERT_PATH` variable is not set, the function does nothing.
This function is synchronous.
It will throw an error if it cannot load some of the certificates.
## Debugging
Set `DEBUG=xsenv` in the environment to enable debug traces. See [debug](https://www.npmjs.com/package/debug) package for details.

Sorry, the diff of this file is not supported yet

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