@compas/store
Advanced tools
Comparing version 0.0.152 to 0.0.153
@@ -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 @@ * }} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
345723
+ Added@compas/stdlib@0.0.153(transitive)
+ Added@types/node@16.4.0(transitive)
- Removed@compas/stdlib@0.0.152(transitive)
- Removed@types/node@16.3.1(transitive)
Updated@compas/stdlib@0.0.153