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

@compas/store

Package Overview
Dependencies
Maintainers
1
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/store - npm Package Compare versions

Comparing version 0.0.152 to 0.0.153

17

index.d.ts

@@ -186,3 +186,3 @@ import * as stdlib from "@compas/stdlib";

},
streamOrPath: string | NodeJS.ReadStream,
source: string | NodeJS.ReadStream | Buffer,
): Promise<StoreFile>;

@@ -274,10 +274,2 @@

static fileCachePath: string;
constructor(
sql: Postgres,
minio: minioVendor.Client,
bucketName: string,
options?: FileCacheOptions,
);
/**

@@ -295,2 +287,9 @@ * Get a file(part) from the cache.

constructor(
sql: Postgres,
minio: minioVendor.Client,
bucketName: string,
options?: FileCacheOptions,
);
/**

@@ -297,0 +296,0 @@ * Remove a file from cache, but not from local disk

{
"name": "@compas/store",
"version": "0.0.152",
"version": "0.0.153",
"description": "Postgres & S3-compatible wrappers for common things",

@@ -17,3 +17,3 @@ "main": "./index.js",

"dependencies": {
"@compas/stdlib": "0.0.152",
"@compas/stdlib": "0.0.153",
"@types/minio": "7.0.8",

@@ -44,3 +44,3 @@ "minio": "7.0.18",

},
"gitHead": "1ba74b462c757c4ea73d0fd1377dce2ab26dd4c8"
"gitHead": "f2036f668879aea8256fb16fffeeeaacba0f6800"
}

@@ -34,3 +34,3 @@ import { createReadStream } from "fs";

* @param {StoreFileInsertPartial} props
* @param {ReadStream|string} streamOrPath
* @param {ReadStream|string|Buffer} source
* @returns {Promise<StoreFile>}

@@ -43,3 +43,3 @@ */

props,
streamOrPath,
source,
) {

@@ -63,7 +63,7 @@ if (!props.name) {

if (typeof streamOrPath === "string") {
streamOrPath = createReadStream(streamOrPath);
if (typeof source === "string") {
source = createReadStream(source);
}
await minio.putObject(bucketName, props.id, streamOrPath, {
await minio.putObject(bucketName, props.id, source, {
"content-type": props.contentType,

@@ -70,0 +70,0 @@ });

@@ -727,3 +727,3 @@ // Generated by @compas/code-gen

* exec: function(sql: Postgres): Promise<QueryResultStoreFile[]>,
* execRaw: function(sql: Postgres): Promise<*[]>
* execRaw: function(sql: Postgres): Promise<*[]>,
* queryPart: QueryPart,

@@ -730,0 +730,0 @@ * }}

@@ -1220,3 +1220,3 @@ // Generated by @compas/code-gen

* exec: function(sql: Postgres): Promise<QueryResultStoreFileGroup[]>,
* execRaw: function(sql: Postgres): Promise<*[]>
* execRaw: function(sql: Postgres): Promise<*[]>,
* queryPart: QueryPart,

@@ -1223,0 +1223,0 @@ * }}

@@ -615,3 +615,3 @@ // Generated by @compas/code-gen

* exec: function(sql: Postgres): Promise<QueryResultStoreJob[]>,
* execRaw: function(sql: Postgres): Promise<*[]>
* execRaw: function(sql: Postgres): Promise<*[]>,
* queryPart: QueryPart,

@@ -618,0 +618,0 @@ * }}

@@ -519,3 +519,3 @@ // Generated by @compas/code-gen

* exec: function(sql: Postgres): Promise<QueryResultStoreSession[]>,
* execRaw: function(sql: Postgres): Promise<*[]>
* execRaw: function(sql: Postgres): Promise<*[]>,
* queryPart: QueryPart,

@@ -522,0 +522,0 @@ * }}

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