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.9.11 to 0.10.0

8

lib/chrome.d.ts

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

export interface TranspileMap {
html: ObjectMap<StringMap>;
js: ObjectMap<StringMap>;
css: ObjectMap<StringMap>;
export interface TemplateeMap {
html: ObjectMap<PlainObject>;
js: ObjectMap<PlainObject>;
css: ObjectMap<PlainObject>;
}

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

declare namespace functions {
type ExternalCategory = "html" | "css" | "js";
type CloudFeatures = "storage" | "database";

@@ -52,3 +51,9 @@ type CloudFunctions = "upload" | "download";

namespace Chrome {
namespace Document {
interface InstallData {
document: IDocument;
instance: DocumentConstructor;
params: unknown[];
}
interface SourceMapInput {

@@ -79,4 +84,5 @@ file: ExternalAsset;

type ConfigOrTranspiler = StandardMap | FunctionType<string>;
type PluginConfig = [string, Undef<ConfigOrTranspiler>, Undef<StandardMap>] | [];
type Transformer = FunctionType<Undef<string>>;
type ConfigOrTransformer = StandardMap | Transformer;
type PluginConfig = [string, Undef<ConfigOrTransformer>, Undef<StandardMap>] | [];
}

@@ -124,2 +130,7 @@

interface FinalizeResult {
deleted: string[];
compressed: WeakSet<ExternalAsset>;
}
type ServiceHost<T> = (this: InstanceHost, credential: unknown, service?: string, sdk?: string) => T;

@@ -132,2 +143,6 @@ type UploadHost = ServiceHost<UploadCallback>;

interface AssetData {
filename?: string;
}
interface FileData {

@@ -179,2 +194,3 @@ file: ExternalAsset;

isDirectoryUNC(value: string): boolean;
isUUID(value: string): boolean;
getResponseError(hint: string, message: Error | string): squared.ResponseData;

@@ -189,3 +205,3 @@ resolvePath(value: string, href: string): string;

compressorProxy: ObjectMap<CompressTryFileMethod>;
registerCompressor(format: string, callback: CompressTryFileMethod): void;
register(format: string, callback: CompressTryFileMethod): void;
createWriteStreamAsGzip(source: string, fileUri: string, level?: number): WriteStream;

@@ -256,2 +272,3 @@ createWriteStreamAsBrotli(source: string, fileUri: string, quality?: number, mimeType?: string): WriteStream;

interface CloudConstructor extends ModuleConstructor {
finalize(this: IFileManager, cloud: ICloud): Promise<internal.Cloud.FinalizeResult>;
new(settings: ExtendedSettings.CloudModule): ICloud;

@@ -262,20 +279,22 @@ }

interface IChrome extends IModule {
settings: ExtendedSettings.ChromeModule;
interface IDocument extends IModule {
settings: ExtendedSettings.DocumentModule;
serverRoot: string;
productionRelease: boolean;
unusedStyles?: string[];
transpileMap?: chrome.TranspileMap;
findPlugin(settings: Undef<ObjectMap<StandardMap>>, name: string): internal.Chrome.PluginConfig;
findTranspiler(settings: Undef<ObjectMap<StandardMap>>, name: string, category: ExternalCategory): internal.Chrome.PluginConfig;
loadOptions(value: internal.Chrome.ConfigOrTranspiler | string): Undef<internal.Chrome.ConfigOrTranspiler>;
documentName: string;
templateMap?: StandardMap;
findPluginData(type: string, name: string, settings: ObjectMap<StandardMap>): internal.Document.PluginConfig;
loadOptions(value: internal.Document.ConfigOrTransformer | string): Undef<internal.Document.ConfigOrTransformer>;
loadConfig(value: string): Undef<StandardMap | string>;
transform(type: ExternalCategory, format: string, value: string, input: internal.Chrome.SourceMapInput): Promise<Void<[string, Map<string, internal.Chrome.SourceMapOutput>]>>;
transform(type: string, format: string, value: string, input?: internal.Document.SourceMapInput): Promise<Void<[string, Undef<Map<string, internal.Document.SourceMapOutput>>]>>;
}
interface ChromeConstructor extends ModuleConstructor {
new(body: RequestBody, settings?: ExtendedSettings.ChromeModule, productionRelease?: boolean): IChrome;
interface DocumentConstructor extends ModuleConstructor {
init(this: IFileManager, document: IDocument): boolean;
using(this: IFileManager, document: IDocument, file: ExternalAsset): Promise<void>;
finalize(this: IFileManager, document: IDocument): void;
formatContent(this: IFileManager, document: IDocument, file: ExternalAsset, content: string): string;
new(body: RequestBody, settings?: ExtendedSettings.DocumentModule, ...args: unknown[]): IDocument;
}
const Chrome: ChromeConstructor;
const Document: DocumentConstructor;

@@ -288,10 +307,16 @@ interface IWatch extends IModule {

interface WatchConstructor extends ModuleConstructor {
new(interval?: number): IWatch;
}
const Watch: WatchConstructor;
interface IFileManager extends IModule {
delayed: number;
cleared: boolean;
Chrome: Null<IChrome>;
Document: internal.Document.InstallData[];
Cloud: Null<ICloud>;
Watch: Null<IWatch>;
Image: Null<ImageConstructor>;
Compress: Null<ExtendedSettings.CompressModule>;
Compress: Null<ICompress>;
Gulp: Null<ExtendedSettings.GulpModule>;

@@ -318,2 +343,3 @@ readonly body: RequestBody;

setFileUri(file: ExternalAsset): internal.FileOutput;
assignFilename(data: internal.AssetData): Undef<string>;
findAsset(uri: string, fromElement?: boolean): Undef<ExternalAsset>;

@@ -326,8 +352,5 @@ findRelativePath(file: ExternalAsset, location: string, partial?: boolean): Undef<string>;

getTrailingContent(file: ExternalAsset): Promise<string>;
getBundleContent(fileUri: string): Undef<string>;
createSourceMap(file: ExternalAsset, sourcesContent: string): internal.Chrome.SourceMapInput;
writeSourceMap(outputData: [string, Map<string, internal.Chrome.SourceMapOutput>], file: ExternalAsset, sourceContent?: string, modified?: boolean): void;
removeCss(source: string, styles: string[]): Undef<string>;
transformCss(file: ExternalAsset, content: string): Undef<string>;
transformSource(data: internal.FileData, module?: IChrome): Promise<void>;
joinAllContent(fileUri: string): Undef<string>;
createSourceMap(file: ExternalAsset, sourcesContent: string): internal.Document.SourceMapInput;
writeSourceMap(outputData: [string, Undef<Map<string, internal.Document.SourceMapOutput>>], file: ExternalAsset, sourceContent?: string, modified?: boolean): void;
queueImage(data: internal.FileData, ouputType: string, saveAs: string, command?: string): Undef<string>;

@@ -346,4 +369,3 @@ compressFile(file: ExternalAsset): Promise<unknown>;

moduleCompress(): ICompress;
moduleChrome(): IChrome;
new(dirname: string, body: RequestBody, postFinalize?: FunctionType<void>): IFileManager;
new(baseDirectory: string, body: RequestBody, postFinalize?: FunctionType<void>): IFileManager;
}

@@ -376,2 +398,3 @@

isLocalPath(value: string): string;
fromSameOrigin(value: string, other: string): boolean;
new(): IModule;

@@ -394,3 +417,2 @@ }

gulp?: ExtendedSettings.GulpModule;
chrome?: ExtendedSettings.ChromeModule;
}

@@ -432,5 +454,5 @@

interface ChromeModule extends Partial<chrome.TranspileMap> {
interface DocumentModule extends StandardMap {
eval_function?: boolean;
eval_text_template?: boolean;
eval_template?: boolean;
}

@@ -446,3 +468,3 @@

unusedStyles?: chrome.UnusedStyles;
transpileMap?: chrome.TranspileMap;
templateMap?: StandardMap;
database?: squared.CloudDatabase[];

@@ -449,0 +471,0 @@ }

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

zipname?: string;
downloadKey?: string;
bytes?: number;

@@ -88,0 +89,0 @@ files?: string[];

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

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

Sorry, the diff of this file is not supported yet

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