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.4.0 to 0.4.1

22

lib/index.d.ts

@@ -10,4 +10,7 @@ /// <reference path="type.d.ts" />

type ExternalCategory = "html" | "css" | "js";
type ImageOutputFormat = "png" | "jpeg" | "bmp";
type FileCompressFormat = "gz" | "br";
type FileManagerWriteImageCallback = (file: ExpressAsset, filepath: string, output: string, command: string, compress?: squared.base.CompressFormat, err?: Null<Error>) => void;
type FileManagerPerformAsyncTaskCallback = () => void;
type FileManagerCompleteAsyncTaskCallback = (filepath?: string) => void;
type FileOutputCallback = (result: string, err?: Null<Error>) => void;

@@ -135,2 +138,4 @@ namespace squared {

withinSizeRange(filepath: string, value: Undef<string>): boolean;
tryFile(file: ExpressAsset, filepath: string, format: FileCompressFormat, preCompress?: FileManagerPerformAsyncTaskCallback, postWrite?: FileManagerCompleteAsyncTaskCallback): void;
tryImage(filepath: string, callback: FileOutputCallback): void;
}

@@ -187,13 +192,13 @@

replace(file: ExpressAsset, replaceWith: string): void;
performAsyncTask(): void;
performAsyncTask: FileManagerPerformAsyncTaskCallback;
removeAsyncTask(): void;
completeAsyncTask(filepath?: string): void;
completeAsyncTask: FileManagerCompleteAsyncTaskCallback;
performFinalize(): void;
getHtmlPages(modified?: boolean): ExpressAsset[];
getAbsoluteUrl(value: string, href: string): string;
replacePath(source: string, segment: string, value: string, base64?: boolean): Undef<string>;
escapePathSeparator(value: string): string;
getFileOutput(file: ExpressAsset): internal.FileOutput;
getRelativeUrl(file: ExpressAsset, url: string): Undef<string>;
getFullUri(file: ExpressAsset, filename?: string): string;
getRelativeUri(file: ExpressAsset, uri: string): Undef<string>;
getAbsoluteUri(value: string, href: string): string;
getFileUri(file: ExpressAsset, filename?: string): string;
getUTF8String(file: ExpressAsset, filepath?: string): string;

@@ -203,8 +208,7 @@ appendContent(file: ExpressAsset, filepath: string, content: string, bundleIndex: number): Promise<string>;

newImage(filepath: string, mimeType: string, ouputType: string, saveAs: string, command?: string): string;
compressImage(filepath: string, output: string): void;
replaceImage(file: ExpressAsset, filepath: string, output: string, command: string): void;
writeImage: FileManagerWriteImageCallback;
transformCss(file: ExpressAsset, content: string): Undef<string>;
transformBuffer(file: ExpressAsset, filepath: string): Promise<void>;
writeBuffer(file: ExpressAsset, filepath: string): void;
finalizeImage: FileManagerWriteImageCallback;
finalizeFile(file: ExpressAsset, filepath: string): void;

@@ -256,3 +260,3 @@ processAssets(): void;

quality(): void;
rotate(preRotate?: () => void, postWrite?: (result?: unknown) => void): void;
rotate(preRotate?: FileManagerPerformAsyncTaskCallback, postWrite?: FileManagerCompleteAsyncTaskCallback): void;
write(output: string, file?: ExpressAsset, compress?: squared.base.CompressFormat, callback?: FileManagerWriteImageCallback): void;

@@ -259,0 +263,0 @@ constructor(instance: T, filepath: string, command?: string);

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

@@ -5,0 +5,0 @@ "types": "lib/index.d.ts",

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