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

@terra-money/hive-persistence

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@terra-money/hive-persistence - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

dynamodb/conversion.d.ts
/// <reference types="node" />
import { ComparisonOperator } from '@aws-sdk/client-dynamodb';
export declare const convertSortKeyToBigEndianBlob: (sk: string | number) => Buffer;
export declare const convertSortKeyToBigEndianBlob: (sk: string | number | Buffer) => Buffer;
export interface DynamoWhereClause {

@@ -5,0 +5,0 @@ key: string;

@@ -13,2 +13,6 @@ "use strict";

return buf;
default:
if (Buffer.isBuffer(sk))
return sk;
throw new Error(`invalid sk ${sk}`);
}

@@ -15,0 +19,0 @@ };

/// <reference types="node" />
import { AttributeValue, DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { CredentialProvider } from '@aws-sdk/types';
interface DynamoDBDriverOption {
region: string;
tableName: string;
accessKeyId: string;
secretAccessKey: string;
accessKeyId?: string;
secretAccessKey?: string;
credentialProvider?: CredentialProvider;
}

@@ -15,3 +17,3 @@ interface DynamoAttributeDescriptor {

tableName: string;
constructor({ tableName, region, accessKeyId, secretAccessKey, }: DynamoDBDriverOption);
constructor({ tableName, region, accessKeyId, secretAccessKey, credentialProvider, }: DynamoDBDriverOption);
set<R = T>(pk: string, sk: string | number | Buffer, data: R): Promise<import("@aws-sdk/client-dynamodb").PutItemCommandOutput>;

@@ -18,0 +20,0 @@ setBatch<R = T>(batchData: {

@@ -8,10 +8,15 @@ "use strict";

class DynamoDBDriver {
constructor({ tableName, region, accessKeyId, secretAccessKey, }) {
constructor({ tableName, region, accessKeyId, secretAccessKey, credentialProvider, }) {
const isUsingDefaultProvider = !!credentialProvider;
const credentials = isUsingDefaultProvider
? undefined
: {
accessKeyId,
secretAccessKey,
};
this.tableName = tableName;
this.client = new client_dynamodb_1.DynamoDBClient({
credentialDefaultProvider: () => credentialProvider,
region,
credentials: {
accessKeyId,
secretAccessKey,
},
credentials,
});

@@ -18,0 +23,0 @@ }

@@ -19,8 +19,9 @@ {

"name": "@terra-money/hive-persistence",
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.18.0",
"@aws-sdk/util-dynamodb": "^3.18.0",
"@aws-sdk/types": "^3.18.0",
"ioredis": "^4.27.6"
}
}

Sorry, the diff of this file is not supported yet

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