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

aws-sdk-wrap

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-sdk-wrap - npm Package Compare versions

Comparing version 13.0.3 to 13.0.4

13

lib/index.js

@@ -42,15 +42,18 @@ import assert from 'assert';

const getService = (service) => {
const getService = (service, init = true) => {
const serviceLower = service.toLowerCase();
if (servicesCache[serviceLower] === undefined) {
const cacheKey = `${serviceLower}.${init}`;
if (servicesCache[cacheKey] === undefined) {
assert(services[serviceLower] !== undefined, `Service "${serviceLower}" not injected.`);
const Service = services[serviceLower];
try {
servicesCache[serviceLower] = new Service(get(configService, serviceLower, config));
servicesCache[cacheKey] = init === true
? new Service(get(configService, serviceLower, config))
: Service;
} catch (e) {
assert(e instanceof TypeError);
servicesCache[serviceLower] = Service;
servicesCache[cacheKey] = Service;
}
}
return servicesCache[serviceLower];
return servicesCache[cacheKey];
};

@@ -57,0 +60,0 @@

@@ -15,3 +15,3 @@ import assert from 'assert';

import UcManager from './dy/uc-manager.js';
import { ModelNotFound, ModelAlreadyExists } from '../resources/errors.js';
import { ModelAlreadyExists, ModelNotFound } from '../resources/errors.js';

@@ -40,2 +40,18 @@ export default ({

assert(typeof onCreate === 'function' && onCreate.length === 1);
const DyClient = getService('DynamoDB');
const DocumentClient = getService('DynamoDBDocument', false).from(DyClient, {
marshallOptions: {
// Whether to automatically convert empty strings, blobs, and sets to `null`.
convertEmptyValues: false, // if not false explicitly, we set it to true.
// Whether to remove undefined values while marshalling.
removeUndefinedValues: false, // false, by default.
// Whether to convert typeof object to map attribute.
convertClassInstanceToMap: false // false, by default.
},
unmarshallOptions: {
// Whether to return numbers as a string instead of converting them to native JavaScript numbers.
// NOTE: this is required to be true in order to use the bigint data type.
wrapNumbers: false // false, by default.
}
});
const model = createModel({

@@ -45,3 +61,3 @@ name,

indices,
DocumentClient: getService('DynamoDB.DocumentClient'),
DocumentClient,
Table,

@@ -48,0 +64,0 @@ Entity

{
"name": "aws-sdk-wrap",
"type": "module",
"version": "13.0.3",
"version": "13.0.4",
"description": "Wrapper around aws-sdk",

@@ -6,0 +6,0 @@ "main": "lib/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