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.30 to 4.8.31

3

index.d.ts

@@ -0,1 +1,4 @@

/// <reference path="./lib/type.d.ts" />
/// <reference path="./lib/object.d.ts" />
import type { LogArguments } from './lib/logger';

@@ -2,0 +5,0 @@ import type { CloneObjectOptions } from './lib/module';

2

index.js

@@ -8,3 +8,3 @@ "use strict";

constructor() {
super('The operation was aborted');
super("The operation was aborted" /* ERR_MESSAGE.ABORTED_OPERATION */);
this.code = 'ABORT_ERR';

@@ -11,0 +11,0 @@ this.name = "AbortError" /* INTERNAL.ERR_ABORT */;

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

import type { QueryResult, TimeoutAction } from './db';
import type { AddEventListenerOptions } from './dom';
import type { Settings } from './node';

@@ -9,0 +10,0 @@ import type { ClientDBSettings, ClientModule, DbCacheValue, DbCoerceSettings, DbSourceOptions } from './settings';

@@ -8,19 +8,29 @@ import type { DataSource, DbDataSource } from './squared';

import type { SecureContextOptions } from 'tls';
// @ts-ignore
import type { AggregateOptions, BulkWriteOptions, CollectionOptions, CommandOperationOptions, DbOptions, Document, Filter, MongoClientOptions, OptionalUnlessRequiredId, Sort, SortDirection, UpdateFilter } from 'mongodb';
// @ts-ignore
import type { CommandOptions } from '@redis/client/dist/lib/command-options';
// @ts-ignore
import type { ClientCommandOptions } from '@redis/client/dist/lib/client';
// @ts-ignore
import type { RedisClientOptions } from '@redis/client';
// @ts-ignore
import type { RedisCommandArgument } from '@redis/client/dist/lib/commands';
// @ts-ignore
import type { RedisJSON } from '@redis/json/dist/commands';
// @ts-ignore
import type { RediSearchSchema } from 'redis';
// @ts-ignore
import type { PoolOptions, QueryOptions } from 'mysql2/promise';
// @ts-ignore
import type { PoolConfig as PostgresPoolConfig, QueryArrayConfig } from 'pg';
// @ts-ignore
import type { BindParameters, ConnectionAttributes, ExecuteOptions, PoolAttributes } from 'oracledb';
// @ts-ignore
import type { ConnectionConfig as IConnectionConfig, ParameterOptions, TediousType, TediousTypes } from 'tedious';
// @ts-ignore
import type { PoolConfig as MSSQLPoolConfig } from 'tedious-connection-pool';
import type { SecureContextOptions } from 'tls';
interface ExecuteAction<T = unknown> {

@@ -166,3 +176,3 @@ params?: T;

export interface ProcessRowsOptions {
disconnect?: VoidFunction;
disconnect?: () => void;
parallel?: boolean;

@@ -169,0 +179,0 @@ }

@@ -84,2 +84,3 @@ import type { LocationUri, MimeTypeAction } from './squared';

getSourceFiles(imports?: StringMap): Undef<SourceInput>;
toBaseConfig(all?: boolean): T;
set code(value);

@@ -117,2 +118,3 @@ get code(): string;

sourceMappingURL?: string;
inlineMap?: boolean;
emptySources?: boolean;

@@ -131,3 +133,3 @@ }

findSourceMap(code?: string, uri?: string): Undef<RawSourceMap>;
removeSourceMappingURL(value: string): [string, string?];
removeSourceMappingURL(value: string): [string, string?, Null<RawSourceMap>?];
isRaw(map: unknown): map is RawSourceMap;

@@ -134,0 +136,0 @@ readonly prototype: SourceMap;

@@ -1,17 +0,9 @@

/// <reference path="type.d.ts" />
/// <reference path="object.d.ts" />
interface BoxRect<T = number> {
top: T;
right: T;
bottom: T;
left: T;
interface EventListenerOptions {
capture?: boolean;
}
interface BoxRectDimension extends BoxRect, Dimension {
numberOfLines?: number;
overflow?: boolean;
}
type CssStyleMap = Partial<MapOfType<CSSStyleDeclaration, CssStyleAttr, string>>;
type CssStyleAttr = KeyOfType<CSSStyleDeclaration, string, string>;
export interface AddEventListenerOptions extends EventListenerOptions {
once?: boolean;
passive?: boolean;
signal?: AbortSignal;
}

@@ -9,2 +9,12 @@ import type { BundleAction, FileInfo, HttpProtocolVersion, LogStatus } from './squared';

export const enum FINALIZE_STATE {
READY = 0,
COMMIT = 1,
END = 2,
RESTART = 3,
QUEUED = 4,
RESTARTED = 5,
ABORTED = 6
}
export interface IHttpHost {

@@ -11,0 +21,0 @@ localhost: boolean;

@@ -1,3 +0,1 @@

/// <reference path="object.d.ts" />
import type { MimeTypeAction } from './squared';

@@ -4,0 +2,0 @@

@@ -34,7 +34,11 @@ /* eslint @typescript-eslint/no-explicit-any: "off" */

import type { BinaryLike } from 'crypto';
import type * as EventEmitter from 'events';
// @ts-ignore
import type { BytesOptions } from 'bytes';
// @ts-ignore
import type { FileTypeResult } from 'file-type';
// @ts-ignore
import type * as ws from 'ws';
import type * as EventEmitter from 'events';

@@ -98,3 +102,3 @@ type BufferView = BufferContent | NodeJS.ArrayBufferView;

readonly REGEXP_SIZERANGE: RegExp;
transform(localFile: string, command: string, options?: TransformOptions): Promise<Null<Buffer> | string>;
transform(file: string, command: string, options?: TransformOptions): Promise<Null<Buffer> | string>;
clamp(value: Undef<string>, min?: number, max?: number): number;

@@ -128,2 +132,3 @@ isBinary(value: unknown): value is string;

using<V extends ExternalAsset>(this: T, instance: U, data: IFileThread<V>, command: string): Promise<unknown>;
transform(file: BufferOfURI, command: string, options?: TransformOptions): Promise<Null<Buffer> | string>;
readonly prototype: U;

@@ -335,3 +340,2 @@ new(module?: ImageModule): U;

archiving: boolean;
restarting: boolean | 0;
finalizeState: number;

@@ -434,2 +438,4 @@ fetchTimeout: number;

get incremental(): IncrementalBuild | "";
set restarting(value);
get restarting(): boolean;
get delayed(): number;

@@ -596,4 +602,4 @@ set cleared(value);

writeTimeElapsed(title: string, value: LogValue, startTime: LogTime, options?: LogMessageOptions): void;
checkPackage(err: unknown, name: Undef<string>, options?: LogFailOptions): boolean;
checkPackage(err: unknown, name: Undef<string>, value?: LogValue, options?: LogFailOptions): boolean;
checkPackage(err: unknown, name: Undef<string>, options?: LogFailOptions | LogType): boolean;
checkPackage(err: unknown, name: Undef<string>, value?: LogValue, options?: LogFailOptions | LogType): boolean;
checkFail(message: unknown, options: LogFailOptions): Undef<LogArguments | false>;

@@ -703,3 +709,3 @@ writeLog(component: LogComponent, queue?: boolean): void;

hasSameStat(src: string, dest: string, keepEmpty?: boolean): boolean;
hasSize(value: string): boolean;
hasSize(value: string, keepEmpty?: boolean): boolean;
hasLogType(value: LogType): boolean;

@@ -743,2 +749,3 @@ isURL(value: string, ...exclude: string[]): boolean;

formatCpuMem(start: CpuUsage, all?: boolean): string;
getPackageVersion(name: string | [string, string], startDir: string): string;
getPackageVersion(name: string | [string, string], unstable?: boolean, startDir?: string): string;

@@ -745,0 +752,0 @@ checkSemVer(name: string | [string, string], options: CheckSemVerOptions): boolean;

@@ -1,9 +0,8 @@

/// <reference path="type.d.ts" />
import type { LogStatus } from './squared';
import type { BackgroundColor, ForegroundColor } from 'chalk';
import type { LOG_TYPE, STATUS_TYPE } from '../index.d';
// @ts-ignore
import type { BackgroundColor as IBackgroundColor, ForegroundColor as IForegroundColor } from 'chalk';
type HexColor = `#${string}`;

@@ -23,13 +22,13 @@

export interface LoggerColor {
titleColor?: typeof ForegroundColor | HexColor;
titleBgColor?: typeof BackgroundColor | HexColor;
titleColor?: ForegroundColor;
titleBgColor?: BackgroundColor;
titleBold?: boolean;
valueColor?: typeof ForegroundColor | HexColor;
valueBgColor?: typeof BackgroundColor | HexColor;
valueColor?: ForegroundColor;
valueBgColor?: BackgroundColor;
valueBold?: boolean;
hintColor?: typeof ForegroundColor | HexColor;
hintBgColor?: typeof BackgroundColor | HexColor;
hintColor?: ForegroundColor;
hintBgColor?: BackgroundColor;
hintBold?: boolean;
messageColor?: typeof ForegroundColor | HexColor;
messageBgColor?: typeof BackgroundColor | HexColor;
messageColor?: ForegroundColor;
messageBgColor?: BackgroundColor;
messageBold?: boolean;

@@ -40,4 +39,4 @@ }

width?: T;
color?: typeof ForegroundColor | HexColor;
bgColor?: typeof BackgroundColor | HexColor;
color?: ForegroundColor;
bg_color?: BackgroundColor;
bold?: boolean;

@@ -115,2 +114,4 @@ justify?: TextAlign;

export type LogComponent = Partial<Pick<LogStatus<StatusType>, "type" | "value" | "timeStamp" | "duration" | "from">>;
export type BackgroundColor = typeof IBackgroundColor | HexColor;
export type ForegroundColor = typeof IForegroundColor | HexColor;
export type TextAlign = "left" | "center" | "right";

@@ -117,0 +118,0 @@ export type ErrorOutMethod = (err: Error, data: LogTypeValue, require?: NodeRequire) => void;

@@ -9,2 +9,11 @@ import type { RequestData as IRequestData } from './squared';

export const enum FINALIZE_STATE {
READY = 0,
COMMIT = 1,
END = 2,
RESTART = 3,
QUEUED = 4,
RESTARTED = 5
}
export interface RequestData<T extends ExternalAsset = ExternalAsset> extends Readonly<Omit<IRequestData, "log">>, Readonly<HostInitConfig> {

@@ -11,0 +20,0 @@ readonly assets?: T[];

@@ -10,4 +10,8 @@ import type { PermissionAction, PermissionSettings, PermittedDirectories } from './core';

import type { BinaryLike, CipherGCMTypes } from 'crypto';
// @ts-ignore
import type { PicomatchOptions } from 'picomatch';
// @ts-ignore
import type { IOptions } from 'minimatch';
// @ts-ignore
import type { Unit } from 'bytes';

@@ -199,10 +203,3 @@

keepalive_timeout?: NumString;
buffer?: {
expires?: NumString;
include?: string[];
exclude?: string[];
limit?: NumString;
limit_all?: NumString;
purge_amount?: NumString;
};
buffer?: HttpBufferSettings & { expires?: NumString; include?: string[]; exclude?: string[] };
connect?: HttpConnectSettings;

@@ -305,11 +302,13 @@ dns?: DnsLookupSettings;

export interface LoggerModule<T = NumString, U = boolean | T> {
export interface LoggerModule<T = NumString, U = boolean | T, V = LoggerFormat<T>> {
enabled?: boolean;
level?: NumString;
production?: string[];
format?: {
title?: LoggerFormat<T>;
value?: LoggerFormat<T>;
hint?: LoggerFormat<T> & { unit?: "auto" | "s" | "ms" };
session_id?: LoggerFormat<T>;
message?: LoggerFormat<T>;
meter?: LoggerFormat<T>;
title?: V;
value?: V;
hint?: V & { unit?: "auto" | "s" | "ms" };
session_id?: V;
message?: V;
meter?: V;
};

@@ -353,2 +352,3 @@ meter?: {

export interface HttpBufferSettings {
limit?: NumString;
limit_all?: NumString;

@@ -355,0 +355,0 @@ purge_amount?: NumString;

/// <reference path="type.d.ts" />
/// <reference path="dom.d.ts" />
/// <reference path="object.d.ts" />

@@ -24,2 +24,14 @@ interface Asset extends MimeTypeAction {

interface BoxRect<T = number> {
top: T;
right: T;
bottom: T;
left: T;
}
interface BoxRectDimension extends BoxRect, Dimension {
numberOfLines?: number;
overflow?: boolean;
}
export interface FileAsset extends TextAsset, OutputAction, DocumentAction, MultipartAction, ResourceAction {

@@ -300,3 +312,3 @@ format?: StringOfArray;

bounds: BoxRectDimension;
css: CssStyleMap;
css: PlainObject;
outerWrapperIds?: string[];

@@ -303,0 +315,0 @@ }

@@ -12,2 +12,3 @@ import type { DataSource, WatchResponse } from './squared';

// @ts-ignore
import type * as ws from 'ws';

@@ -14,0 +15,0 @@

{
"name": "@squared-functions/types",
"version": "4.8.30",
"version": "4.8.31",
"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