New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hc-service-client

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hc-service-client - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

lib/util.js

5

index.js

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

const ServiceClient = require('./lib/service_client');
const util = require('./lib/util');

@@ -15,3 +16,3 @@ module.exports = function (app, config) {

if (ridHeader && typeof ridHeader !== 'string') {
throw 'fault [service-client]: ridHeader should be an string';
throw util.errorWrapper('[service-client]: ridHeader should be an string');
}

@@ -24,3 +25,3 @@

log.error('the service config: ', app.config.services);
throw new Error(`Can not find ${serviceCode}'s service config.`);
throw util.errorWrapper(`[service-client]: Can not find ${serviceCode}'s service config.`);
}

@@ -27,0 +28,0 @@

7

lib/service_client.js

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

const qs = require('qs');
const util = require('./util');

@@ -15,3 +16,3 @@ class ServiceClient {

if (!options.endpoint && !options.endPoint) {
throw '[hc-service-client]: endpoint is required.';
throw util.errorWrapper('[hc-service-client]: endpoint is required.');
}

@@ -22,3 +23,3 @@ if (!options.endpoint) {

if (!options.accessKeySecret) {
throw '[hc-service-client]: accessKeySecret is required.';
throw util.errorWrapper('[hc-service-client]: accessKeySecret is required.');
}

@@ -43,3 +44,3 @@ this.rid = options.rid; // rid

if (!this.log.debug) {
throw '[hc-service-client]: `log` instance should have debug function.';
throw util.errorWrapper('[hc-service-client]: `log` instance should have debug function.');
}

@@ -46,0 +47,0 @@ this.disableFileSignature = options.disableFileSignature; // 禁用文件签名

{
"name": "hc-service-client",
"version": "1.0.2",
"version": "1.0.3",
"description": "Service Client Extension for Honeybee",

@@ -5,0 +5,0 @@ "main": "index.js",

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