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

@ginger.io/beyonce

Package Overview
Dependencies
Maintainers
7
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ginger.io/beyonce - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

4

dist/dynamo/Beyonce.d.ts

@@ -27,7 +27,7 @@ import { DynamoDB } from "aws-sdk";

/** Write an item into Dynamo */
put<T extends Model, U extends Model>(itemAndKey: ItemAndKey<T, U>): Promise<void>;
put<T extends Model>(itemAndKey: ItemAndKey<T>): Promise<void>;
/** Write multiple items into Dynamo using a transaction.
*/
batchPutWithTransaction<T extends Model, U extends Model>(items: ItemAndKey<T, U>[]): Promise<void>;
batchPutWithTransaction<T extends Model>(items: ItemAndKey<T>[]): Promise<void>;
private maybeEncryptItems;
}

@@ -5,5 +5,5 @@ import { EncryptedJayZItem } from "@ginger.io/jay-z";

import { Model } from "./Model";
export declare type ItemAndKey<T extends Model, U extends Model> = {
key: PartitionAndSortKey<T, U>;
item: U;
export declare type ItemAndKey<T extends Model> = {
key: PartitionAndSortKey<any, T>;
item: T;
};

@@ -10,0 +10,0 @@ export declare type PartitionAndSortKey<T extends Model, U extends Model> = {

{
"name": "@ginger.io/beyonce",
"version": "0.0.13",
"version": "0.0.14",
"description": "Type-safe DynamoDB query builder for TypeScript. Designed with single-table architecture in mind.",

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

@@ -116,5 +116,3 @@ import { DynamoDB } from "aws-sdk"

/** Write an item into Dynamo */
async put<T extends Model, U extends Model>(
itemAndKey: ItemAndKey<T, U>
): Promise<void> {
async put<T extends Model>(itemAndKey: ItemAndKey<T>): Promise<void> {
const item = await this.maybeEncryptItems(itemAndKey)

@@ -132,4 +130,4 @@

*/
async batchPutWithTransaction<T extends Model, U extends Model>(
items: ItemAndKey<T, U>[]
async batchPutWithTransaction<T extends Model>(
items: ItemAndKey<T>[]
): Promise<void> {

@@ -150,5 +148,5 @@ const asyncEncryptedItems = items.map(async (itemAndKey) => {

private async maybeEncryptItems<T extends Model, U extends Model>(
itemAndKey: ItemAndKey<T, U>
): Promise<MaybeEncryptedItems<U>> {
private async maybeEncryptItems<T extends Model>(
itemAndKey: ItemAndKey<T>
): Promise<MaybeEncryptedItems<T>> {
const { item, key } = itemAndKey

@@ -155,0 +153,0 @@ const maybeEncryptedItems = await encryptOrPassThroughItems(this.jayz, {

@@ -6,5 +6,5 @@ import { EncryptedJayZItem } from "@ginger.io/jay-z"

export type ItemAndKey<T extends Model, U extends Model> = {
key: PartitionAndSortKey<T, U>
item: U
export type ItemAndKey<T extends Model> = {
key: PartitionAndSortKey<any, T>
item: T
}

@@ -11,0 +11,0 @@

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