Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@serverless/sdk

Package Overview
Dependencies
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/sdk - npm Package Compare versions

Comparing version 0.5.21 to 0.5.22

1

.ts-types/index.d.ts

@@ -31,2 +31,3 @@ import ExpressAppInstrument from './instrumentation/express-app';

setEndpoint(endpoint: string): undefined;
createTraceSpan(name: string, closure?: (() => T) | (() => Promise<T>))
}

@@ -33,0 +34,0 @@

@@ -5,2 +5,12 @@ # Changelog

### [0.5.22](https://github.com/serverless/console/compare/@serverless/sdk@0.5.21...@serverless/sdk@0.5.22) (2023-08-02)
### Features
- Add support for custom spans ([c43f756](https://github.com/serverless/console/commit/c43f75676ed7a14ed211de0965c010f3cb9080dd))
### Bug Fixes
- Seperate createTraceSpan tests into its own block ([f6d85b0](https://github.com/serverless/console/commit/f6d85b06c9012c6e5074151ad29c8b1380a146d2))
### [0.5.21](https://github.com/serverless/console/compare/@serverless/sdk@0.5.20...@serverless/sdk@0.5.21) (2023-08-01)

@@ -7,0 +17,0 @@

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

const ensureString = require('type/string/ensure');
const isFunction = require('type/function/is');
const isThenable = require('type/thenable/is');
const d = require('d');

@@ -66,3 +68,30 @@ const lazy = require('d/lazy');

};
serverlessSdk.createTraceSpan = (name, closure) => {
const span = serverlessSdk._createTraceSpan(name);
if (closure && isThenable(closure)) {
return closure.then(
(result) => {
span.close();
return result;
},
(error) => {
span.close();
throw error;
}
);
}
if (closure && isFunction(closure)) {
let result;
try {
result = closure();
} finally {
span.close();
}
return result;
}
return span;
};
// Private

@@ -69,0 +98,0 @@ const settings = (serverlessSdk._settings = {});

2

package.json
{
"name": "@serverless/sdk",
"repository": "serverless/console",
"version": "0.5.21",
"version": "0.5.22",
"author": "Serverless, Inc.",

@@ -6,0 +6,0 @@ "dependencies": {

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