@squared-functions/types
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -22,2 +22,4 @@ /// <reference path="type.d.ts" /> | ||
namespace squared { | ||
type OutputAttribute = KeyValue<string, Null<string>>; | ||
interface LocationUri { | ||
@@ -36,2 +38,3 @@ pathname: string; | ||
cloudStorage?: CloudService[]; | ||
attributes?: OutputAttribute[]; | ||
watch?: boolean | WatchInterval; | ||
@@ -49,3 +52,3 @@ tasks?: string[]; | ||
service: string; | ||
credential: string | StringMap; | ||
credential: string | PlainObject; | ||
bucket?: string; | ||
@@ -112,3 +115,3 @@ admin?: CloudServiceAdmin; | ||
preserve?: boolean; | ||
attributes?: AttributeValue[]; | ||
exclude?: boolean; | ||
baseUrl?: string; | ||
@@ -121,3 +124,2 @@ bundleId?: number; | ||
inlineContent?: string; | ||
exclude?: boolean; | ||
} | ||
@@ -223,3 +225,3 @@ | ||
service: CloudService; | ||
bucketGroup: string; | ||
bucketGroup?: string; | ||
} | ||
@@ -236,5 +238,3 @@ | ||
interface DownloadData extends FunctionData { | ||
download: CloudServiceDownload; | ||
} | ||
interface DownloadData extends FunctionData {} | ||
@@ -249,3 +249,3 @@ interface ServiceClient { | ||
type ServiceHost<T> = (this: IFileManager, credential: unknown, service: string, sdk?: string) => T; | ||
type ServiceHost<T> = (this: ICloud | IFileManager, credential: unknown, service: string, sdk?: string) => T; | ||
type UploadHost = ServiceHost<UploadCallback>; | ||
@@ -338,3 +338,2 @@ type DownloadHost = ServiceHost<DownloadCallback>; | ||
interface IImage extends IModule { | ||
using(options: internal.Image.UsingOptions): void; | ||
parseCrop(value: string): Undef<internal.Image.CropData>; | ||
@@ -348,9 +347,19 @@ parseOpacity(value: string): number; | ||
interface ImageConstructor { | ||
using(this: IFileManager, options: internal.Image.UsingOptions): void; | ||
new(): IImage; | ||
} | ||
const Image: ImageConstructor; | ||
interface ICloud extends IModule { | ||
settings: settings.CloudModule; | ||
setObjectKeys(assets: ExternalAsset[]): void; | ||
deleteObjects(credential: unknown, service: string, bucket: string, bucketGroup?: string): Promise<void>; | ||
getService(functionName: CloudFunctions, data: Undef<squared.CloudService[]>): Undef<squared.CloudService>; | ||
hasService(functionName: CloudFunctions, data: squared.CloudService): squared.CloudServiceAction | false; | ||
deleteObjects(credential: unknown, data: squared.CloudService, bucketGroup?: string): Promise<void>; | ||
downloadObject(credential: PlainObject, data: squared.CloudService, callback: (value: Null<Buffer | string>) => void, bucketGroup?: string): Promise<void>; | ||
getService(action: CloudFunctions, data: Undef<squared.CloudService[]>): Undef<squared.CloudService>; | ||
hasService(action: CloudFunctions, data: squared.CloudService): squared.CloudServiceAction | false; | ||
hasCredential(data: squared.CloudService): boolean; | ||
getUploadHandler(credential: PlainObject, service: string): internal.Cloud.UploadCallback; | ||
getDownloadHandler(credential: PlainObject, service: string): internal.Cloud.DownloadCallback; | ||
} | ||
@@ -367,3 +376,2 @@ | ||
loadTranspiler(value: string): Null<FunctionType<string>>; | ||
createSourceMap(file: ExternalAsset, fileUri: string, sourcesContent: string): internal.Chrome.SourceMapInput; | ||
transform(type: ExternalCategory, format: string, value: string, input: internal.Chrome.SourceMapInput): Promise<Void<[string, Map<string, internal.Chrome.SourceMapOutput>]>>; | ||
@@ -391,3 +399,5 @@ } | ||
baseUrl?: string; | ||
Image?: ImageConstructor; | ||
Chrome?: IChrome; | ||
Watch?: IWatch; | ||
Cloud?: settings.CloudModule; | ||
@@ -426,7 +436,9 @@ Compress?: settings.CompressModule; | ||
getBundleContent(fileUri: string): Undef<string>; | ||
createSourceMap(file: ExternalAsset, fileUri: string, sourcesContent: string): internal.Chrome.SourceMapInput; | ||
writeSourceMap(file: ExternalAsset, fileUri: string, sourceData: [string, Map<string, internal.Chrome.SourceMapOutput>], sourceContent: string, modified: boolean): void; | ||
removeCss(source: string, styles: string[]): Undef<string>; | ||
transformCss(file: ExternalAsset, content: string): Undef<string>; | ||
removeCss(source: string, styles: string[]): Undef<string>; | ||
newImage(data: internal.FileData, ouputType: string, saveAs: string, command?: string): string; | ||
transformBuffer(data: internal.FileData): Promise<void>; | ||
transformSource(module: IChrome, data: internal.FileData): Promise<void>; | ||
queueImage(data: internal.FileData, ouputType: string, saveAs: string, command?: string): string; | ||
compressFile(file: ExternalAsset): Promise<unknown>; | ||
writeBuffer(data: internal.FileData): void; | ||
@@ -436,3 +448,2 @@ finalizeImage: FileManagerWriteImageCallback; | ||
processAssets(watch?: boolean): void; | ||
compressFile(file: ExternalAsset): Promise<unknown>; | ||
finalize(): Promise<void>; | ||
@@ -446,3 +457,2 @@ } | ||
moduleCompress(): ICompress; | ||
moduleImage(): IImage; | ||
moduleCloud(): ICloud; | ||
@@ -449,0 +459,0 @@ new(dirname: string, body: RequestBody, postFinalize?: FunctionType<void>): IFileManager; |
@@ -6,3 +6,3 @@ type Undef<T> = T | undefined; | ||
type Constructor<T> = new(...args: any[]) => T; | ||
type FunctionType<T> = (...args: any[]) => T; | ||
type FunctionType<T> = (...args: unknown[]) => T; | ||
@@ -24,2 +24,7 @@ type NumString = number | string; | ||
height: number; | ||
} | ||
interface KeyValue<T, U> { | ||
key: T; | ||
value: U; | ||
} |
{ | ||
"name": "@squared-functions/types", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Type definitions for squared-functions", | ||
@@ -5,0 +5,0 @@ "types": "lib/index.d.ts", |
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
22992
499