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 4.8.34 to 4.8.35

8

index.d.ts

@@ -194,6 +194,6 @@ /// <reference path="./lib/type.d.ts" />

const WATCH_EVENT: {
MODIFIED: string;
BROADCAST: string;
CLOSE: string;
ERROR: string;
MODIFIED: "modified";
BROADCAST: "broadcast";
CLOSE: "close";
ERROR: "error";
};

@@ -200,0 +200,0 @@

@@ -17,3 +17,3 @@ /* eslint @typescript-eslint/no-explicit-any: "off" */

import type { CommandData, CropData, ICommand, QualityData, ResizeData, RotateData, TransformOptions } from './image';
import type { LOG_TYPE, STATUS_TYPE, ExecCommand, LogArguments, LogComponent, LogDate, LogFailOptions, LogMessageOptions, LogOptions, LogProcessOptions, LogTime, LogType, LogValue, ModuleFormatMessageMethod, ModuleWriteFailMethod, StatusType } from './logger';
import type { LOG_TYPE, STATUS_TYPE, ExecCommand, LogArguments, LogComponent, LogDate, LogFailOptions, LogMessageOptions, LogOptions, LogProcessOptions, LogTime, LogType, LogValue, StatusType } from './logger';
import type { AsHashOptions, CheckSemVerOptions, CloneObjectOptions, CopyDirResult, CopyFileOptions, CreateDirOptions, DeleteFileOptions, GetFunctionsOptions, MoveFileOptions, ParseFunctionOptions, PermissionOptions, ReadFileCallback, ReadFileOptions, RemoveDirOptions, WriteFileOptions } from './module';

@@ -25,4 +25,2 @@ import type { RequestData, Settings } from './node';

import type { DOWNLOAD_TYPE, FILE_TYPE } from '../index';
import type { NoParamCallback, WriteStream } from 'fs';

@@ -47,4 +45,2 @@ import type { SpawnOptions } from 'child_process';

type BufferView = BufferContent | NodeJS.ArrayBufferView;
type ModuleSupportedMethod = (major: number, minor?: number, patch?: number, lts?: boolean) => boolean;
type AllSettledMethod = <T>(values: readonly (T | PromiseLike<T>)[], rejected?: LogValue, options?: LogType | LogFailOptions) => Promise<PromiseSettledResult<T>[]>;
type CpuUsage = NodeJS.CpuUsage;

@@ -88,5 +84,5 @@

interface CompressConstructor extends ModuleConstructor {
readonly prototype: ICompress<CompressModule>;
new(module?: CompressModule): ICompress<CompressModule>;
interface CompressConstructor<T extends CompressModule<U> = CompressModule<any>, U extends CompressSettings = CompressSettings> extends ModuleConstructor {
readonly prototype: ICompress<T, U>;
new(module?: U): ICompress<T, U>;
}

@@ -117,2 +113,3 @@

qualityData?: QualityData;
methodData?: [string, unknown[]?][];
opacityValue: number;

@@ -133,7 +130,7 @@ readonly instance: unknown;

interface ImageV3Constructor<T extends IHost = IHost, U extends IImageV3<T> = IImageV3<T>> extends ImageV1Constructor<T> {
using<V extends ExternalAsset>(this: T, instance: U, data: IFileThread<V>, command: string): Promise<unknown>;
interface ImageV3Constructor<T extends IHost = IHost, U extends ImageModule = ImageModule> extends ImageV1Constructor<T, IImageV3<T, U>> {
using<W extends ExternalAsset>(this: T, instance: IImageV3<T, U>, data: IFileThread<W>, command: string): Promise<unknown>;
transform(file: BufferOfURI, command: string, options?: TransformOptions): Promise<Null<Buffer> | string>;
readonly prototype: U;
new(module?: ImageModule): U;
readonly prototype: IImageV3<T, U>;
new(module?: U): IImageV3<T, U>;
}

@@ -151,7 +148,7 @@

interface TaskConstructor<T extends IHost = IHost, U extends ITask<T> = ITask<T>> extends ModuleConstructor {
finalize<V extends ExternalAsset>(this: T, instance: U, assets: V[]): Promise<unknown>;
using?<V extends ExternalAsset>(this: T, instance: U, assets: V[], preceding?: boolean): Promise<unknown>;
readonly prototype: U;
new(module?: TaskModule, ...args: unknown[]): U;
interface TaskConstructor<T extends IHost = IHost, U extends TaskModule = TaskModule> extends ModuleConstructor {
finalize<V extends ExternalAsset>(this: T, instance: ITask<T, U>, assets: V[]): Promise<unknown>;
using?<V extends ExternalAsset>(this: T, instance: ITask<T, U>, assets: V[], preceding?: boolean): Promise<unknown>;
readonly prototype: ITask<T, U>;
new(module?: U, ...args: unknown[]): ITask<T, U>;
}

@@ -190,7 +187,7 @@

interface DbConstructor<T extends IHost = IHost, U extends IDb<T> = IDb<T>> extends ClientDbConstructor<T> {
interface DbConstructor<T extends IHost = IHost, U extends DbModule = DbModule, V extends DbDataSource = DbDataSource> extends ClientDbConstructor<T> {
setPoolConfig(value: ObjectMap<PoolConfig>): void;
getPoolConfig(source: string): Undef<Required<PoolConfig>>;
readonly prototype: U;
new(module?: DbModule, database?: DataSource[], ...args: unknown[]): U;
readonly prototype: IDb<T, U, V>;
new(module?: U, database?: V[], ...args: unknown[]): IDb<T, U, V>;
}

@@ -236,3 +233,3 @@

interface CloudConstructor<T extends IHost = IHost, U extends ICloud<T> = ICloud<T>> extends ClientDbConstructor<T> {
interface CloudConstructor<T extends IHost = IHost, U extends CloudModule = CloudModule, V extends CloudDatabase = CloudDatabase> extends ClientDbConstructor<T> {
LOG_CLOUD_FAIL: LogMessageOptions;

@@ -245,11 +242,11 @@ LOG_CLOUD_COMMAND: LogMessageOptions;

LOG_CLOUD_DELAYED: LogMessageOptions;
finalize(this: T, instance: U): Promise<unknown>;
uploadAsset<V extends IFileManager<W>, W extends ExternalAsset>(state: IScopeOrigin<V, ICloud<V>>, file: W, ignoreProcess: boolean): Promise<unknown>;
uploadAsset<V extends IFileManager<W>, W extends ExternalAsset>(state: IScopeOrigin<V, ICloud<V>>, file: W, contentType?: string, ignoreProcess?: boolean): Promise<unknown>;
sanitizeAssets<V extends ExternalAsset>(assets: V[]): V[];
readonly prototype: U;
new(module?: CloudModule, database?: CloudDatabase[], ...args: unknown[]): U;
finalize(this: T, instance: ICloud<T, U, V>): Promise<unknown>;
uploadAsset<W extends IFileManager<X>, X extends ExternalAsset>(state: IScopeOrigin<W, ICloud<W>>, file: X, ignoreProcess: boolean): Promise<unknown>[];
uploadAsset<W extends IFileManager<X>, X extends ExternalAsset>(state: IScopeOrigin<W, ICloud<W>>, file: X, contentType?: string, ignoreProcess?: boolean): Promise<unknown>[];
sanitizeAssets<W extends ExternalAsset>(assets: W[]): W[];
readonly prototype: ICloud<T, U, V>;
new(module?: U, database?: CloudDatabase[], ...args: unknown[]): ICloud<T, U, V>;
}
interface IDocument<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule, W extends DocumentComponent = DocumentComponent, X extends DocumentComponentOption = DocumentComponentOption, Y extends ICloud = ICloud> extends IClient<T, V, TransformCallback<T, U>> {
interface IDocument<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule, W extends DocumentComponent = DocumentComponent, X extends DocumentComponentOption = DocumentComponentOption, Y extends ICloud = ICloud<T>> extends IClient<T, V, TransformCallback<T, U>> {
Db: Null<IDb>;

@@ -289,3 +286,3 @@ assets: U[];

watchInit?(watch: IFileGroup<U>, assets: U[], sanitize?: boolean): Undef<WatchInitResult>;
watchModified?: ModifiedPostFinalizeListener<U>;
watchModified?(server: Null<ws.Server> | IFileGroup<U>, watch?: IFileGroup<U> | U[], assets?: U[]): PostFinalizeCallback;
set dataSource(value: DataSource[]);

@@ -296,4 +293,4 @@ get dataSource(): DataSource[];

interface DocumentConstructor<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends IDocument<T, U> = IDocument<T, U>> extends ModuleConstructor {
finalize(this: T, instance: V): Promise<unknown>;
interface DocumentConstructor<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule, W extends DocumentComponent = DocumentComponent, X extends DocumentComponentOption = DocumentComponentOption, Y extends ICloud = ICloud<T>> extends ModuleConstructor {
finalize(this: T, instance: IDocument<T, U, V, W, X, Y>): Promise<unknown>;
createSourceMap(code: string, uri?: string): SourceMap;

@@ -303,7 +300,7 @@ writeSourceMap(uri: string, data: SourceCode, options?: SourceMapOptions): Undef<string>;

generateLintTable(messages: LintMessage[], options: GenerateLintTableOptions): LogComponent[];
using?(this: T, instance: V, file: U): Promise<unknown>;
cleanup?(this: T, instance: V): Promise<unknown>;
using?(this: T, instance: IDocument<T, U, V, W, X, Y>, file: U): Promise<unknown>;
cleanup?(this: T, instance: IDocument<T, U, V, W, X, Y>): Promise<unknown>;
sanitizeAssets?(assets: U[], exclusions?: U[]): U[];
readonly prototype: V;
new(module?: DocumentModule, ...args: unknown[]): V;
readonly prototype: IDocument<T, U, V, W, X, Y>;
new(module?: V, ...args: unknown[]): IDocument<T, U, V, W, X, Y>;
}

@@ -332,3 +329,3 @@

interface WatchConstructor<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends IWatch<T, U> = IWatch<T, U>> extends ModuleConstructor {
interface WatchConstructor<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends WatchModule = WatchModule, W extends FunctionType<unknown, any> = ModifiedPostFinalizeListener<U>> extends ModuleConstructor {
parseExpires(value: NumString, start?: number): number;

@@ -344,5 +341,5 @@ readCACert(value: string, cache?: boolean): string;

checkTimeout(client: ws): boolean;
readonly prototype: V;
new(module?: WatchModule): V;
new(interval?: number, port?: number, securePort?: number, extensions?: unknown[]): V;
readonly prototype: IWatch<T, U, V, W>;
new(module?: V): IWatch<T, U, V, W>;
new(interval?: number, port?: number, securePort?: number, extensions?: unknown[]): IWatch<T, U, V, W>;
}

@@ -397,3 +394,3 @@

removeAsyncTask(): void;
completeAsyncTask(err?: unknown, uri?: string, parent?: T, type?: FILE_TYPE): void;
completeAsyncTask(err?: unknown, uri?: string, parent?: T, type?: number): void;
performFinalize(override?: boolean): void;

@@ -412,4 +409,4 @@ hasDocument(instance: IModule, document: Undef<StringOfArray>): boolean;

clearProcessTimeout(): void;
addDownload(value: number | BufferContent, type?: DOWNLOAD_TYPE, encoding?: BufferEncoding): void;
getDownload(type?: DOWNLOAD_TYPE): [number, number];
addDownload(value: number | BufferContent, type?: number, encoding?: BufferEncoding): void;
getDownload(type?: number): [number, number];
transformAsset(data: IFileThread<T>, parent?: T): Promise<void>;

@@ -458,3 +455,3 @@ addCopy(data: FileCommand<T>, saveAs?: string, replace?: boolean): Undef<string>;

/* Set */
add(value: string, parent?: T, type?: FILE_TYPE): this;
add(value: string, parent?: T, type?: number): this;
delete(value: string, emptyDir?: boolean): boolean;

@@ -564,3 +561,4 @@ has(value: unknown): value is string;

readonly errors: unknown[];
supported: ModuleSupportedMethod;
allSettled<U>(values: readonly (U | PromiseLike<U>)[], rejected?: LogValue, options?: LogFailOptions | LogType): Promise<PromiseSettledResult<U>[]>;
supported(major: number, minor?: number, patch?: number, lts?: boolean): boolean;
supports(name: string, value?: boolean): boolean;

@@ -610,6 +608,5 @@ getTempDir(uuidDir: boolean, createDir?: boolean): string;

removeDir<U extends NoParamCallback>(src: string, options: RemoveDirOptions, callback: U): void;
allSettled: AllSettledMethod;
formatMessage: ModuleFormatMessageMethod;
formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
formatFail(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogFailOptions): void;
writeFail: ModuleWriteFailMethod;
writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
writeTimeProcess(title: string, value: string, startTime: LogTime, options?: LogProcessOptions): void;

@@ -693,5 +690,5 @@ writeTimeElapsed(title: string, value: LogValue, startTime: LogTime, options?: LogMessageOptions): void;

readonly MAX_TIMEOUT: number;
supported: ModuleSupportedMethod;
formatMessage: ModuleFormatMessageMethod;
writeFail: ModuleWriteFailMethod;
supported(major: number, minor?: number, patch?: number, lts?: boolean): boolean;
formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
enabled(key: string, username?: string): boolean;

@@ -774,3 +771,3 @@ isString(value: unknown): value is string;

loadSettings(settings: Settings, password?: string): boolean;
allSettled: AllSettledMethod;
allSettled<U>(values: readonly (U | PromiseLike<U>)[], rejected?: LogValue, options?: LogFailOptions | LogType): Promise<PromiseSettledResult<U>[]>;
readonly prototype: IModule;

@@ -777,0 +774,0 @@ new(): IModule;

@@ -117,4 +117,2 @@ import type { LogStatus } from './squared';

export type BroadcastOutMethod = (value: string, options: LogMessageOptions, require?: NodeRequire) => void;
export type BroadcastValue = StringOfArray | { value: StringOfArray; stripAnsi?: boolean };
export type ModuleWriteFailMethod = (value: LogValue, message?: unknown, options?: LogType | LogFailOptions) => void;
export type ModuleFormatMessageMethod = (type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions) => void;
export type BroadcastValue = StringOfArray | { value: StringOfArray; stripAnsi?: boolean };

@@ -186,3 +186,3 @@ import type { PermissionAction, PermissionSettings, PermittedDirectories } from './core';

export type ImageModule = ClientModule<ImageSettings>;
export type ImageModule<T = ImageSettings> = ClientModule<T>;

@@ -189,0 +189,0 @@ export interface ImageSettings extends PlainObject {

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc