Socket
Socket
Sign inDemoInstall

@squared-functions/types

Package Overview
Dependencies
Maintainers
1
Versions
367
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squared-functions/types - npm Package Compare versions

Comparing version 0.6.3 to 0.7.0

37

lib/index.d.ts

@@ -14,3 +14,3 @@ /// <reference path="type.d.ts" />

type FileCompressFormat = "gz" | "br";
type CloudFunctions = "upload";
type CloudFunctions = "upload" | "download";
type FileManagerWriteImageCallback = (data: internal.FileData, output: string, command: string, compress?: squared.CompressFormat, error?: Null<Error>) => void;

@@ -34,2 +34,3 @@ type FileManagerPerformAsyncTaskCallback = () => void;

compress?: CompressFormat[];
cloudStorage?: CloudService[];
watch?: boolean | WatchInterval;

@@ -49,2 +50,3 @@ tasks?: string[];

upload?: CloudServiceUpload;
download?: CloudServiceDownload;
}

@@ -54,6 +56,7 @@

active?: boolean;
filename?: string;
overwrite?: boolean;
}
interface CloudServiceUpload extends CloudServiceAction {
filename?: string;
localStorage?: boolean;

@@ -63,5 +66,11 @@ apiEndpoint?: string;

publicAccess?: boolean;
overwrite?: boolean;
}
interface CloudServiceDownload extends CloudServiceAction {
filename: string;
pathname?: string;
versionId?: string;
deleteStorage?: string;
}
interface WatchInterval {

@@ -94,3 +103,2 @@ interval?: number;

attributes?: AttributeValue[];
cloudStorage?: squared.CloudService[];
basePath?: string;

@@ -197,7 +205,10 @@ bundleId?: number;

namespace Cloud {
interface UploadOptions<T>{
interface UploadData<T> {
buffer: Buffer;
storage: squared.CloudService;
upload: squared.CloudServiceUpload;
credentials: T;
credential: T;
fileUri: string;
fileGroup: [Buffer | string, string][];
bucketGroup: string;
filename?: string;

@@ -208,4 +219,5 @@ mimeType?: string;

type ServiceClient = (config: squared.CloudService) => boolean;
type ServiceHost = (this: IFileManager, credentials: PlainObject, serviceName: string) => UploadCallback;
type UploadCallback = (buffer: Buffer, options: UploadOptions<unknown>, success: (value?: unknown) => void) => void;
type UploadHost = (this: IFileManager, service: string, credential: PlainObject) => UploadCallback;
type DownloadHost = (this: IFileManager, service: string, credential: PlainObject, download: squared.CloudServiceDownload, success: (value: Null<Buffer | string>) => void) => void;
type UploadCallback = (data: UploadData<unknown>, success: (value: string) => void) => void;
}

@@ -278,3 +290,2 @@

resolvePath(value: string, href: string, hostname?: boolean): Undef<string>;
toPosix(value: string): string;
}

@@ -308,2 +319,3 @@

settings: settings.CloudModule;
getBucket(data: squared.CloudService): string;
getService(functionName: CloudFunctions, data: Undef<squared.CloudService[]>): Undef<squared.CloudService>;

@@ -382,3 +394,4 @@ hasService(functionName: CloudFunctions, data: squared.CloudService): squared.CloudServiceAction | false;

processAssets(watch?: boolean): void;
finalize(): Promise<unknown[]>;
compressFile(file: ExternalAsset): Promise<unknown>;
finalize(): Promise<void>;
}

@@ -406,3 +419,4 @@

getTempDir(): string;
writeMessage(value: string, message?: unknown, title?: string, color?: "green" | "yellow" | "blue" | "white" | "grey"): void;
toPosix(value: string, filename?: string): string;
writeMessage(value: string, message?: unknown, title?: string, color?: "red" | "yellow" | "green" | "blue" | "white" | "grey"): void;
writeFail(value: string, message?: unknown): void;

@@ -485,2 +499,3 @@ }

inlineCssCloud?: string;
inlineMap?: StringMap;
etag?: string;

@@ -487,0 +502,0 @@ invalid?: boolean;

{
"name": "@squared-functions/types",
"version": "0.6.3",
"version": "0.7.0",
"description": "Type definitions for squared-functions",

@@ -17,3 +17,3 @@ "types": "lib/index.d.ts",

"dependencies": {
"typescript": "^4.0.5"
"typescript": "^4.1.2"
},

@@ -20,0 +20,0 @@ "bugs": {

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