@trayio/commons
Advanced tools
Comparing version 2.8.0 to 2.9.0
@@ -5,2 +5,4 @@ /// <reference types="node" /> | ||
import * as t from 'io-ts'; | ||
import { Option } from 'fp-ts/lib/Option'; | ||
import { DynamicObject } from '../dynamictype/DynamicType'; | ||
export type FileMetadata = { | ||
@@ -22,3 +24,3 @@ name: string; | ||
export interface FileStorage { | ||
write(file: File): TaskEither<Error, File>; | ||
write(file: File, writeOptions: Option<DynamicObject>): TaskEither<Error, File>; | ||
read(key: string, name?: string): TaskEither<Error, File>; | ||
@@ -25,0 +27,0 @@ getSharedUrl(key: string): TaskEither<Error, SharedUrl>; |
@@ -38,2 +38,3 @@ "use strict"; | ||
const uuid_1 = require("uuid"); | ||
const O = __importStar(require("fp-ts/Option")); | ||
const stream_1 = require("stream"); | ||
@@ -62,3 +63,3 @@ const JsonSerialization_1 = require("../serialization/JsonSerialization"); | ||
}; | ||
const writtenFile = yield fileStorage.write(file)(); | ||
const writtenFile = yield fileStorage.write(file, O.none)(); | ||
expect(writtenFile).toEqual(E.right(file)); | ||
@@ -65,0 +66,0 @@ const sharedUrl = yield fileStorage.getSharedUrl(file.key)(); |
{ | ||
"name": "@trayio/commons", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"description": "Extensions to the standard/core libraries and basic features", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
113754
2058