From 93a5a93e0479d7ad13aadeff09e59811954d7255 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Mon, 21 Oct 2024 12:40:54 +0300 Subject: [PATCH] --- Target/Function/Directory.d.ts | 1 - Target/Function/Image/Writesharp.d.ts | 1 - Target/Function/Image/Writesharp.js | 2 +- Target/Function/Integration.d.ts | 213 ++++++++---------- Target/Function/Integration.js | 2 +- Target/Function/Merge.d.ts | 28 +-- Target/Interface/CLI.d.ts | 3 +- Target/Interface/CSS/csso.d.ts | 51 ++--- Target/Interface/CSS/lightningcss.d.ts | 35 ++- Target/Interface/Directory.d.ts | 3 +- Target/Interface/Image/Onsharp.d.ts | 7 +- Target/Interface/Image/Writesharp.d.ts | 3 +- Target/Interface/Image/sharp.d.ts | 40 +--- Target/Interface/Integration.d.ts | 4 +- Target/Interface/Map.d.ts | 2 +- Target/Interface/Option.d.ts | 104 ++++----- Target/Interface/Parser.d.ts | 13 +- Target/Type/HTML/html-minifier-terser.d.ts | 1 - Target/Type/JavaScript/terser.d.ts | 1 - Target/Type/SVG/svgo.d.ts | 1 - Target/Variable/CSS/csso.d.ts | 1 - Target/Variable/CSS/lightningcss.d.ts | 1 - .../Variable/HTML/html-minifier-terser.d.ts | 52 ++--- Target/Variable/Image/Mapsharp.d.ts | 1 - Target/Variable/Image/sharp.d.ts | 1 - Target/Variable/JavaScript/terser.d.ts | 22 +- Target/Variable/Map.d.ts | 1 - Target/Variable/Option.d.ts | 183 +++++++-------- Target/Variable/Parser.d.ts | 1 - Target/Variable/SVG/svgo.d.ts | 12 +- 30 files changed, 339 insertions(+), 451 deletions(-) diff --git a/Target/Function/Directory.d.ts b/Target/Function/Directory.d.ts index b468ed809..143582225 100644 --- a/Target/Function/Directory.d.ts +++ b/Target/Function/Directory.d.ts @@ -1,5 +1,4 @@ import type Interface from "../Interface/Directory.js"; - /** * @module Directory * diff --git a/Target/Function/Image/Writesharp.d.ts b/Target/Function/Image/Writesharp.d.ts index 482649c2f..a10224c74 100644 --- a/Target/Function/Image/Writesharp.d.ts +++ b/Target/Function/Image/Writesharp.d.ts @@ -1,5 +1,4 @@ import type Interface from "../../Interface/Image/Writesharp.js"; - /** * @module Image * diff --git a/Target/Function/Image/Writesharp.js b/Target/Function/Image/Writesharp.js index 3f0c3f88c..771b08719 100644 --- a/Target/Function/Image/Writesharp.js +++ b/Target/Function/Image/Writesharp.js @@ -1 +1 @@ -var s=async(...[a,{Buffer:f,Input:i}])=>{const t=i.split(".").pop();if(!t)return;const e=typeof r[t]<"u"?r[t]:typeof a[t]<"u"?t:!1;if(e&&["avif","gif","heif","jpeg","png","raw","tiff","webp"].includes(e)&&typeof a[e]<"u"&&a[e]!==!1)return e in f&&await f[e](a[e]!==!0?a[e]:(await import("../../Variable/Image/sharp.js")).default).toBuffer()};const{default:r}=await import("../../Variable/Image/Mapsharp.js");export{r as _Map,s as default}; +var p=async(...[t,{Buffer:f,Input:r}])=>{const a=r.split(".").pop();if(!a)return;const e=typeof i[a]<"u"?i[a]:typeof t[a]<"u"?a:!1;if(e&&["avif","gif","heif","jpeg","png","raw","tiff","webp"].includes(e)&&typeof t[e]<"u"&&t[e]!==!1)return e in f&&await f[e](t[e]!==!0?t[e]:(await import("../../Variable/Image/sharp.js")).default).toBuffer()};const{default:i}=await import("../../Variable/Image/Mapsharp.js");export{i as _Map,p as default}; diff --git a/Target/Function/Integration.d.ts b/Target/Function/Integration.d.ts index 1b97e97e0..f9688390e 100644 --- a/Target/Function/Integration.d.ts +++ b/Target/Function/Integration.d.ts @@ -1,7 +1,5 @@ import type Action from "@playform/pipe/Target/Interface/Action.js"; - import type Interface from "../Interface/Integration.js"; - /** * @module Integration * @@ -10,125 +8,98 @@ export declare let System: string; declare const _default: Interface; export default _default; export declare const Default: { - Path: string; - Cache: { - Search: string; - Folder: string; - }; - Logger: 2; - Action: { - Failed: ({ - Input, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Passed: ({ - Before, - Buffer, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Accomplished: ({ - Input, - Before, - After, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Changed: ( - Plan: import("@playform/pipe/Target/Interface/Plan.js").default, - ) => Promise; - Read: ({ - Input, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Wrote: ({ - Buffer, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise< - import("@playform/pipe/Target/Type/Buffer.js").Type - >; - Fulfilled: ({ - File, - }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise< - string | false - >; - }; - File: string; - Exclude: false; - CSS: { - csso: import("../Interface/CSS/csso.js").default; - lightningcss: import("../Interface/CSS/lightningcss.js").default; - }; - HTML: { - "html-minifier-terser": { - caseSensitive: true; - collapseInlineTagWhitespace: false; - collapseWhitespace: true; - continueOnParseError: true; - html5: true; - ignoreCustomComments: RegExp[]; - ignoreCustomFragments: never[]; - includeAutoGeneratedTags: true; - keepClosingSlash: true; - minifyCSS: true; - minifyJS: true; - minifyURLs: false; - noNewlinesBeforeTagClose: true; - preventAttributesEscaping: false; - processConditionalComments: false; - processScripts: string[]; - quoteCharacter: string; - removeAttributeQuotes: true; - removeComments: true; - removeScriptTypeAttributes: true; - removeStyleLinkTypeAttributes: true; - removeTagWhitespace: false; - sortAttributes: true; - sortClassName: true; - trimCustomFragments: true; - useShortDoctype: false; - }; - }; - Image: { - sharp: import("../Interface/Image/sharp.js").default; - }; - JavaScript: { - terser: { - ecma: 5; - enclose: false; - keep_classnames: false; - keep_fnames: false; - ie8: false; - module: false; - safari10: false; - toplevel: false; - format: { - comments: false; - }; - }; - }; - SVG: { - svgo: { - multipass: true; - js2svg: { - indent: number; - pretty: false; - }; - plugins: "preset-default"[]; - }; - }; - Map: import("../Interface/Map.js").default; - Parser: import("../Interface/Parser.js").default; + Path: string; + Cache: { + Search: string; + Folder: string; + }; + Logger: 2; + Action: { + Failed: ({ Input }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Passed: ({ Before, Buffer }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Accomplished: ({ Input, Before, After }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Changed: (Plan: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise; + Read: ({ Input }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Wrote: ({ Buffer }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Fulfilled: ({ File }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise; + }; + File: string; + Exclude: false; + CSS: { + csso: import("../Interface/CSS/csso.js").default; + lightningcss: import("../Interface/CSS/lightningcss.js").default; + }; + HTML: { + "html-minifier-terser": { + caseSensitive: true; + collapseInlineTagWhitespace: false; + collapseWhitespace: true; + continueOnParseError: true; + html5: true; + ignoreCustomComments: RegExp[]; + ignoreCustomFragments: never[]; + includeAutoGeneratedTags: true; + keepClosingSlash: true; + minifyCSS: true; + minifyJS: true; + minifyURLs: false; + noNewlinesBeforeTagClose: true; + preventAttributesEscaping: false; + processConditionalComments: false; + processScripts: string[]; + quoteCharacter: string; + removeAttributeQuotes: true; + removeComments: true; + removeScriptTypeAttributes: true; + removeStyleLinkTypeAttributes: true; + removeTagWhitespace: false; + sortAttributes: true; + sortClassName: true; + trimCustomFragments: true; + useShortDoctype: false; + }; + }; + Image: { + sharp: import("../Interface/Image/sharp.js").default; + }; + JavaScript: { + terser: { + ecma: 5; + enclose: false; + keep_classnames: false; + keep_fnames: false; + ie8: false; + module: false; + safari10: false; + toplevel: false; + format: { + comments: false; + }; + }; + }; + SVG: { + svgo: { + multipass: true; + js2svg: { + indent: number; + pretty: false; + }; + plugins: "preset-default"[]; + }; + }; + Map: import("../Interface/Map.js").default; + Parser: import("../Interface/Parser.js").default; }; export declare const Search: string; -export declare const Merge: ( - ...objects: Ts -) => import("deepmerge-ts").DeepMergeHKT< - Ts, - Readonly<{ - DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI"; - DeepMergeArraysURI: "DeepMergeArraysDefaultURI"; - DeepMergeSetsURI: "DeepMergeSetsDefaultURI"; - DeepMergeMapsURI: "DeepMergeMapsDefaultURI"; - DeepMergeOthersURI: "DeepMergeLeafURI"; - DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI"; - }>, - Readonly<{ - key: PropertyKey; - parents: ReadonlyArray>>; - }> ->; +export declare const Merge: (...objects: Ts) => import("deepmerge-ts").DeepMergeHKT, Readonly<{ + key: PropertyKey; + parents: ReadonlyArray>>; +}>>; export declare let _Action: Action; diff --git a/Target/Function/Integration.js b/Target/Function/Integration.js index c554727a7..333378ec2 100644 --- a/Target/Function/Integration.js +++ b/Target/Function/Integration.js @@ -1 +1 @@ -let l;var E=(...[c={}])=>{Object.entries(c).forEach(([a,r])=>Object.defineProperty(c,a,{value:r===!0?u[a]:c[a]}));const{Path:f,Cache:p,Logger:S,Map:d,Exclude:j,Action:g,CSS:b,HTML:I,Image:n,JavaScript:A,SVG:P,Parser:h}=s(u,c),m=new Set;return typeof f<"u"&&(Array.isArray(f)||f instanceof Set)&&f.forEach(a=>m.add(a)),typeof h=="object"&&Object.entries(h).forEach(([a,r])=>Object.defineProperty(h,a,{value:Array.isArray(r)?r:[r]})),{name:"@playform/compress",hooks:{"astro:config:done":async({config:{outDir:{pathname:a}}})=>{l=(await import("path")).parse(a).dir.replace(/\\/g,"/"),l.startsWith("/")&&(l=l.substring(1))},"astro:build:done":async({dir:a})=>{if(typeof d=="object"){m.size===0&&m.add(a),typeof p=="object"&&p.Search===x&&(p.Search=a);for(const[r,i]of Object.entries({CSS:b,HTML:I,Image:n,JavaScript:A,SVG:P}))if(!(!(i&&d[r])||typeof i!="object")){y=s(g,s(g,{Wrote:async({Buffer:t,Input:o})=>{switch(r){case"CSS":{let e=t.toString();return i.lightningcss&&(e=(await import("lightningcss")).transform(s({code:(await import("buffer")).Buffer.from(e),filename:o},i.lightningcss)).code.toString()),i.csso&&(e=(await import("csso")).minify(e,i.csso).css),e}case"HTML":return await(await import("html-minifier-terser")).minify(t.toString(),i["html-minifier-terser"]);case"JavaScript":return(await(await import("terser")).minify(t.toString(),i.terser)).code??t;case"Image":try{return t instanceof(await import("sharp")).default?await(await import("./Image/Writesharp.js")).default(i.sharp,{Buffer:t,Input:o}):t}catch(e){return console.log(e),t}case"SVG":return(await import("svgo")).optimize(t.toString(),i.svgo).data??t;default:return t}},Fulfilled:async({File:t,Info:{Total:o}})=>t>0?`${(await import("kleur/colors")).green(`\u2713\u2001Successfully compressed a total of ${t} ${r} ${t===1?"file":"files"} for ${(await import("@playform/pipe/Target/Function/Bytes.js")).default(o)}.`)}`:!1})),r==="Image"&&(y=s(y,{Read:async({Input:t,Buffer:o})=>{try{(await import("sharp")).default.cache(!1);const{format:e}=await(await import("sharp")).default(t).metadata(),w={animated:e==="webp"||e==="gif"};return(await import("sharp")).default(t,typeof n=="object"&&typeof n.sharp=="object"&&typeof n.sharp.sharp=="object"?s(w,n.sharp?.sharp):w)}catch(e){return console.log(e),o}}}));for(const t of m)await(await(await(await new(await import("@playform/pipe")).default(p,S).In(t)).By(d[r]??"**/*")).Not(j)).Pipe(y)}}}}}};const{default:u}=await import("../Variable/Option.js"),{default:{Cache:{Search:x}}}=await import("@playform/pipe/Target/Variable/Option.js"),{default:s}=await import("./Merge.js");let y;export{u as Default,s as Merge,x as Search,l as System,y as _Action,E as default}; +let l;var E=(...[p={}])=>{Object.entries(p).forEach(([a,r])=>Object.defineProperty(p,a,{value:r===!0?u[a]:p[a]}));const{Path:o,Cache:m,Logger:S,Map:y,Exclude:j,Action:g,CSS:b,HTML:A,Image:c,JavaScript:I,SVG:P,Parser:h}=n(u,p),f=new Set;return typeof o<"u"&&((Array.isArray(o)||o instanceof Set)&&o.forEach(a=>f.add(a)),o instanceof Map&&f.add(o)),typeof h=="object"&&Object.entries(h).forEach(([a,r])=>Object.defineProperty(h,a,{value:Array.isArray(r)?r:[r]})),{name:"@playform/compress",hooks:{"astro:config:done":async({config:{outDir:{pathname:a}}})=>{l=(await import("path")).parse(a).dir.replace(/\\/g,"/"),l.startsWith("/")&&(l=l.substring(1))},"astro:build:done":async({dir:a})=>{if(typeof y=="object"){f.size===0&&f.add(a),typeof m=="object"&&m.Search===x&&(m.Search=a);for(const[r,i]of Object.entries({CSS:b,HTML:A,Image:c,JavaScript:I,SVG:P}))if(!(!(i&&y[r])||typeof i!="object")){d=n(g,n(g,{Wrote:async({Buffer:t,Input:s})=>{switch(r){case"CSS":{let e=t.toString();return i.lightningcss&&(e=(await import("lightningcss")).transform(n({code:(await import("buffer")).Buffer.from(e),filename:s},i.lightningcss)).code.toString()),i.csso&&(e=(await import("csso")).minify(e,i.csso).css),e}case"HTML":return await(await import("html-minifier-terser")).minify(t.toString(),i["html-minifier-terser"]);case"JavaScript":return(await(await import("terser")).minify(t.toString(),i.terser)).code??t;case"Image":try{return t instanceof(await import("sharp")).default?await(await import("./Image/Writesharp.js")).default(i.sharp,{Buffer:t,Input:s}):t}catch(e){return console.log(e),t}case"SVG":return(await import("svgo")).optimize(t.toString(),i.svgo).data??t;default:return t}},Fulfilled:async({File:t,Info:{Total:s}})=>t>0?`${(await import("kleur/colors")).green(`\u2713\u2001Successfully compressed a total of ${t} ${r} ${t===1?"file":"files"} for ${(await import("@playform/pipe/Target/Function/Bytes.js")).default(s)}.`)}`:!1})),r==="Image"&&(d=n(d,{Read:async({Input:t,Buffer:s})=>{try{(await import("sharp")).default.cache(!1);const{format:e}=await(await import("sharp")).default(t).metadata(),w={animated:e==="webp"||e==="gif"};return(await import("sharp")).default(t,typeof c=="object"&&typeof c.sharp=="object"&&typeof c.sharp.sharp=="object"?n(w,c.sharp?.sharp):w)}catch(e){return console.log(e),s}}}));for(const t of f)await(await(await(await new(await import("@playform/pipe")).default(m,S).In(t)).By(y[r]??"**/*")).Not(j)).Pipe(d)}}}}}};const{default:u}=await import("../Variable/Option.js"),{default:{Cache:{Search:x}}}=await import("@playform/pipe/Target/Variable/Option.js"),{default:n}=await import("./Merge.js");let d;export{u as Default,n as Merge,x as Search,l as System,d as _Action,E as default}; diff --git a/Target/Function/Merge.d.ts b/Target/Function/Merge.d.ts index 3f7326d91..b03db589c 100644 --- a/Target/Function/Merge.d.ts +++ b/Target/Function/Merge.d.ts @@ -2,21 +2,15 @@ * @module Merge * */ -declare const _default: ( - ...objects: Ts -) => import("deepmerge-ts").DeepMergeHKT< - Ts, - Readonly<{ - DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI"; - DeepMergeArraysURI: "DeepMergeArraysDefaultURI"; - DeepMergeSetsURI: "DeepMergeSetsDefaultURI"; - DeepMergeMapsURI: "DeepMergeMapsDefaultURI"; - DeepMergeOthersURI: "DeepMergeLeafURI"; - DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI"; - }>, - Readonly<{ - key: PropertyKey; - parents: ReadonlyArray>>; - }> ->; +declare const _default: (...objects: Ts) => import("deepmerge-ts").DeepMergeHKT, Readonly<{ + key: PropertyKey; + parents: ReadonlyArray>>; +}>>; export default _default; diff --git a/Target/Interface/CLI.d.ts b/Target/Interface/CLI.d.ts index 2de774821..2d3853beb 100644 --- a/Target/Interface/CLI.d.ts +++ b/Target/Interface/CLI.d.ts @@ -1,9 +1,8 @@ import type { Pattern } from "fast-glob"; - /** * @module CLI * */ export default interface Interface { - (File: Pattern[], Compress?: Pattern): Promise; + (File: Pattern[], Compress?: Pattern): Promise; } diff --git a/Target/Interface/CSS/csso.d.ts b/Target/Interface/CSS/csso.d.ts index b07e5f724..a4695ac1d 100644 --- a/Target/Interface/CSS/csso.d.ts +++ b/Target/Interface/CSS/csso.d.ts @@ -1,33 +1,32 @@ import type { CompressOptions, MinifyOptions } from "csso"; - /** * @module CSS * */ export default interface Interface extends MinifyOptions, CompressOptions { - /** - * Specify what comments to leave: - * - 'exclamation' or true – leave all exclamation comments - * - 'first-exclamation' – remove every comment except first one - * - false – remove all comments - * - * @default Compress false - * @default csso true - */ - comments?: boolean; - /** - * Enables merging of @media rules with the same media query by splitted by other rules. - * The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. - * - * @default Compress true - * @default csso false - */ - forceMediaMerge?: boolean; - /** - * Disable or enable a structure optimisations. - * - * @default CompressAstro false - * @default csso true - */ - restructure?: boolean; + /** + * Specify what comments to leave: + * - 'exclamation' or true – leave all exclamation comments + * - 'first-exclamation' – remove every comment except first one + * - false – remove all comments + * + * @default Compress false + * @default csso true + */ + comments?: boolean; + /** + * Enables merging of @media rules with the same media query by splitted by other rules. + * The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. + * + * @default Compress true + * @default csso false + */ + forceMediaMerge?: boolean; + /** + * Disable or enable a structure optimisations. + * + * @default CompressAstro false + * @default csso true + */ + restructure?: boolean; } diff --git a/Target/Interface/CSS/lightningcss.d.ts b/Target/Interface/CSS/lightningcss.d.ts index 3a68de9cc..c41397331 100644 --- a/Target/Interface/CSS/lightningcss.d.ts +++ b/Target/Interface/CSS/lightningcss.d.ts @@ -1,26 +1,21 @@ import type { CustomAtRules, TransformOptions } from "lightningcss"; - /** * @module CSS * */ -export default interface Interface - extends Omit< - TransformOptions, - "filename" | "code" | "unusedSymbols" - > { - /** - * Whether to enable minification - * - * @default Compress true - * @default lightningcss false - */ - minify?: boolean; - /** - * Whether to remove unused selectors or keywords. - * - * @default Compress false - * @default lightningcss undefined - */ - unusedSymbols?: string[] | boolean; +export default interface Interface extends Omit, "filename" | "code" | "unusedSymbols"> { + /** + * Whether to enable minification + * + * @default Compress true + * @default lightningcss false + */ + minify?: boolean; + /** + * Whether to remove unused selectors or keywords. + * + * @default Compress false + * @default lightningcss undefined + */ + unusedSymbols?: string[] | boolean; } diff --git a/Target/Interface/Directory.d.ts b/Target/Interface/Directory.d.ts index adbb9bd00..406d95b85 100644 --- a/Target/Interface/Directory.d.ts +++ b/Target/Interface/Directory.d.ts @@ -1,9 +1,8 @@ import type { ParsedPath } from "path"; - /** * @module Directory * */ export default interface Interface { - (Path: string): Promise; + (Path: string): Promise; } diff --git a/Target/Interface/Image/Onsharp.d.ts b/Target/Interface/Image/Onsharp.d.ts index 0be17cfc6..3544e577e 100644 --- a/Target/Interface/Image/Onsharp.d.ts +++ b/Target/Interface/Image/Onsharp.d.ts @@ -1,12 +1,11 @@ import type File from "@playform/pipe/Target/Interface/File.js"; import type { Sharp } from "sharp"; - /** * @module Image * */ export default interface Interface extends Omit { - Buffer: { - [key: string]: any; - } & Sharp; + Buffer: { + [key: string]: any; + } & Sharp; } diff --git a/Target/Interface/Image/Writesharp.d.ts b/Target/Interface/Image/Writesharp.d.ts index b38ea602a..c266cbe74 100644 --- a/Target/Interface/Image/Writesharp.d.ts +++ b/Target/Interface/Image/Writesharp.d.ts @@ -1,10 +1,9 @@ import type On from "../../Interface/Image/Onsharp.js"; import type Option from "../../Interface/Image/sharp.js"; - /** * @module Image * */ export default interface Interface { - (Option: Option, On: On): Promise; + (Option: Option, On: On): Promise; } diff --git a/Target/Interface/Image/sharp.d.ts b/Target/Interface/Image/sharp.d.ts index 695cdb861..b48804a6b 100644 --- a/Target/Interface/Image/sharp.d.ts +++ b/Target/Interface/Image/sharp.d.ts @@ -1,36 +1,16 @@ -import type { - AvifOptions, - GifOptions, - HeifOptions, - JpegOptions, - PngOptions, - SharpOptions, - TiffOptions, - WebpOptions, -} from "sharp"; - +import type { AvifOptions, GifOptions, HeifOptions, JpegOptions, PngOptions, SharpOptions, TiffOptions, WebpOptions } from "sharp"; /** * @module Image * */ export default interface Interface { - [key: string]: - | AvifOptions - | GifOptions - | HeifOptions - | JpegOptions - | PngOptions - | SharpOptions - | TiffOptions - | WebpOptions - | boolean - | undefined; - avif?: boolean | AvifOptions; - gif?: boolean | GifOptions; - heif?: boolean | HeifOptions; - jpeg?: boolean | JpegOptions; - png?: boolean | PngOptions; - tiff?: boolean | TiffOptions; - webp?: boolean | WebpOptions; - sharp?: boolean | SharpOptions; + [key: string]: AvifOptions | GifOptions | HeifOptions | JpegOptions | PngOptions | SharpOptions | TiffOptions | WebpOptions | boolean | undefined; + avif?: boolean | AvifOptions; + gif?: boolean | GifOptions; + heif?: boolean | HeifOptions; + jpeg?: boolean | JpegOptions; + png?: boolean | PngOptions; + tiff?: boolean | TiffOptions; + webp?: boolean | WebpOptions; + sharp?: boolean | SharpOptions; } diff --git a/Target/Interface/Integration.d.ts b/Target/Interface/Integration.d.ts index ad62003e3..88c1b86b5 100644 --- a/Target/Interface/Integration.d.ts +++ b/Target/Interface/Integration.d.ts @@ -1,11 +1,9 @@ import type { AstroIntegration } from "astro"; - import type Option from "../Interface/Option.js"; - /** * @module Integration * */ export default interface Interface { - (Option?: Option): AstroIntegration; + (Option?: Option): AstroIntegration; } diff --git a/Target/Interface/Map.d.ts b/Target/Interface/Map.d.ts index 842bb9e27..f3f83af68 100644 --- a/Target/Interface/Map.d.ts +++ b/Target/Interface/Map.d.ts @@ -3,5 +3,5 @@ * */ export default interface Interface { - [key: string]: string; + [key: string]: string; } diff --git a/Target/Interface/Option.d.ts b/Target/Interface/Option.d.ts index 4f0420305..17cc83a98 100644 --- a/Target/Interface/Option.d.ts +++ b/Target/Interface/Option.d.ts @@ -1,5 +1,4 @@ import type Option from "@playform/pipe/Target/Interface/Option.js"; - import type csso from "../Interface/CSS/csso.js"; import type lightningcss from "../Interface/CSS/lightningcss.js"; import type sharp from "../Interface/Image/sharp.js"; @@ -8,66 +7,55 @@ import type Parser from "../Interface/Parser.js"; import type html_minifier_terser from "../Type/HTML/html-minifier-terser.js"; import type terser from "../Type/JavaScript/terser.js"; import type svgo from "../Type/SVG/svgo.js"; - /** * @module Option * */ export default interface Interface extends Option { - /** - * csso, lightningcss option properties - * - */ - CSS?: - | boolean - | { - csso?: csso; - lightningcss?: lightningcss; - }; - /** - * html-minifier-terser option properties - * - */ - HTML?: - | boolean - | { - "html-minifier-terser"?: html_minifier_terser; - }; - /** - * sharp option properties - * - */ - Image?: - | boolean - | { - sharp?: sharp; - }; - /** - * terser option properties - * - */ - JavaScript?: - | boolean - | { - terser?: terser; - }; - /** - * svgo option properties - * - */ - SVG?: - | boolean - | { - svgo?: svgo; - }; - /** - * Map to different file paths - * - */ - Map?: boolean | _Map; - /** - * Parsers for different file types - * - */ - Parser?: Parser; + /** + * csso, lightningcss option properties + * + */ + CSS?: boolean | { + csso?: csso; + lightningcss?: lightningcss; + }; + /** + * html-minifier-terser option properties + * + */ + HTML?: boolean | { + "html-minifier-terser"?: html_minifier_terser; + }; + /** + * sharp option properties + * + */ + Image?: boolean | { + sharp?: sharp; + }; + /** + * terser option properties + * + */ + JavaScript?: boolean | { + terser?: terser; + }; + /** + * svgo option properties + * + */ + SVG?: boolean | { + svgo?: svgo; + }; + /** + * Map to different file paths + * + */ + Map?: boolean | _Map; + /** + * Parsers for different file types + * + */ + Parser?: Parser; } diff --git a/Target/Interface/Parser.d.ts b/Target/Interface/Parser.d.ts index 693692125..1859b1b9a 100644 --- a/Target/Interface/Parser.d.ts +++ b/Target/Interface/Parser.d.ts @@ -3,16 +3,15 @@ import type HTML from "../Type/Parser/HTML.js"; import type Image from "../Type/Parser/Image.js"; import type JavaScript from "../Type/Parser/JavaScript.js"; import type SVG from "../Type/Parser/SVG.js"; - /** * @module Parser * */ export default interface Interface { - [key: string]: any; - CSS?: CSS | CSS[]; - HTML?: HTML | HTML[]; - Image?: Image | Image[]; - JavaScript?: JavaScript | JavaScript[]; - SVG?: SVG | SVG[]; + [key: string]: any; + CSS?: CSS | CSS[]; + HTML?: HTML | HTML[]; + Image?: Image | Image[]; + JavaScript?: JavaScript | JavaScript[]; + SVG?: SVG | SVG[]; } diff --git a/Target/Type/HTML/html-minifier-terser.d.ts b/Target/Type/HTML/html-minifier-terser.d.ts index 01b70fa97..050c4d926 100644 --- a/Target/Type/HTML/html-minifier-terser.d.ts +++ b/Target/Type/HTML/html-minifier-terser.d.ts @@ -1,5 +1,4 @@ import type { Options } from "html-minifier-terser"; - /** * @module HTML * diff --git a/Target/Type/JavaScript/terser.d.ts b/Target/Type/JavaScript/terser.d.ts index 7505de4bf..249feb0d3 100644 --- a/Target/Type/JavaScript/terser.d.ts +++ b/Target/Type/JavaScript/terser.d.ts @@ -1,5 +1,4 @@ import type { MinifyOptions } from "terser"; - /** * @module JavaScript * diff --git a/Target/Type/SVG/svgo.d.ts b/Target/Type/SVG/svgo.d.ts index f7f131a5c..7e65daf76 100644 --- a/Target/Type/SVG/svgo.d.ts +++ b/Target/Type/SVG/svgo.d.ts @@ -1,5 +1,4 @@ import type { Config } from "svgo"; - /** * @module SVG * diff --git a/Target/Variable/CSS/csso.d.ts b/Target/Variable/CSS/csso.d.ts index ae71b6851..9a6352e1d 100644 --- a/Target/Variable/CSS/csso.d.ts +++ b/Target/Variable/CSS/csso.d.ts @@ -1,5 +1,4 @@ import type Interface from "../../Interface/CSS/csso.js"; - /** * @module CSS * diff --git a/Target/Variable/CSS/lightningcss.d.ts b/Target/Variable/CSS/lightningcss.d.ts index 3781e4f25..ad976d10d 100644 --- a/Target/Variable/CSS/lightningcss.d.ts +++ b/Target/Variable/CSS/lightningcss.d.ts @@ -1,5 +1,4 @@ import type Interface from "../../Interface/CSS/lightningcss.js"; - /** * @module CSS * diff --git a/Target/Variable/HTML/html-minifier-terser.d.ts b/Target/Variable/HTML/html-minifier-terser.d.ts index a3f694713..13f24d2c0 100644 --- a/Target/Variable/HTML/html-minifier-terser.d.ts +++ b/Target/Variable/HTML/html-minifier-terser.d.ts @@ -3,31 +3,31 @@ * */ declare const _default: { - caseSensitive: true; - collapseInlineTagWhitespace: false; - collapseWhitespace: true; - continueOnParseError: true; - html5: true; - ignoreCustomComments: RegExp[]; - ignoreCustomFragments: never[]; - includeAutoGeneratedTags: true; - keepClosingSlash: true; - minifyCSS: true; - minifyJS: true; - minifyURLs: false; - noNewlinesBeforeTagClose: true; - preventAttributesEscaping: false; - processConditionalComments: false; - processScripts: string[]; - quoteCharacter: string; - removeAttributeQuotes: true; - removeComments: true; - removeScriptTypeAttributes: true; - removeStyleLinkTypeAttributes: true; - removeTagWhitespace: false; - sortAttributes: true; - sortClassName: true; - trimCustomFragments: true; - useShortDoctype: false; + caseSensitive: true; + collapseInlineTagWhitespace: false; + collapseWhitespace: true; + continueOnParseError: true; + html5: true; + ignoreCustomComments: RegExp[]; + ignoreCustomFragments: never[]; + includeAutoGeneratedTags: true; + keepClosingSlash: true; + minifyCSS: true; + minifyJS: true; + minifyURLs: false; + noNewlinesBeforeTagClose: true; + preventAttributesEscaping: false; + processConditionalComments: false; + processScripts: string[]; + quoteCharacter: string; + removeAttributeQuotes: true; + removeComments: true; + removeScriptTypeAttributes: true; + removeStyleLinkTypeAttributes: true; + removeTagWhitespace: false; + sortAttributes: true; + sortClassName: true; + trimCustomFragments: true; + useShortDoctype: false; }; export default _default; diff --git a/Target/Variable/Image/Mapsharp.d.ts b/Target/Variable/Image/Mapsharp.d.ts index 9f8719f57..12e7065f9 100644 --- a/Target/Variable/Image/Mapsharp.d.ts +++ b/Target/Variable/Image/Mapsharp.d.ts @@ -1,5 +1,4 @@ import type Interface from "../../Interface/Map.js"; - /** * @module Image * diff --git a/Target/Variable/Image/sharp.d.ts b/Target/Variable/Image/sharp.d.ts index b38c424d2..f2d31c6f2 100644 --- a/Target/Variable/Image/sharp.d.ts +++ b/Target/Variable/Image/sharp.d.ts @@ -1,5 +1,4 @@ import type Interface from "../../Interface/Image/sharp.js"; - /** * @module Image * diff --git a/Target/Variable/JavaScript/terser.d.ts b/Target/Variable/JavaScript/terser.d.ts index 6a18fa423..f053777ee 100644 --- a/Target/Variable/JavaScript/terser.d.ts +++ b/Target/Variable/JavaScript/terser.d.ts @@ -3,16 +3,16 @@ * */ declare const _default: { - ecma: 5; - enclose: false; - keep_classnames: false; - keep_fnames: false; - ie8: false; - module: false; - safari10: false; - toplevel: false; - format: { - comments: false; - }; + ecma: 5; + enclose: false; + keep_classnames: false; + keep_fnames: false; + ie8: false; + module: false; + safari10: false; + toplevel: false; + format: { + comments: false; + }; }; export default _default; diff --git a/Target/Variable/Map.d.ts b/Target/Variable/Map.d.ts index c4ed7f58f..02484f20c 100644 --- a/Target/Variable/Map.d.ts +++ b/Target/Variable/Map.d.ts @@ -1,5 +1,4 @@ import type Interface from "../Interface/Map.js"; - /** * @module Map * diff --git a/Target/Variable/Option.d.ts b/Target/Variable/Option.d.ts index c3076b2e4..9f0e5f48b 100644 --- a/Target/Variable/Option.d.ts +++ b/Target/Variable/Option.d.ts @@ -3,107 +3,86 @@ * */ declare const _default: { - Path: string; - Cache: { - Search: string; - Folder: string; - }; - Logger: 2; - Action: { - Failed: ({ - Input, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Passed: ({ - Before, - Buffer, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Accomplished: ({ - Input, - Before, - After, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Changed: ( - Plan: import("@playform/pipe/Target/Interface/Plan.js").default, - ) => Promise; - Read: ({ - Input, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; - Wrote: ({ - Buffer, - }: import("@playform/pipe/Target/Interface/File.js").default) => Promise< - import("@playform/pipe/Target/Type/Buffer.js").Type - >; - Fulfilled: ({ - File, - }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise< - string | false - >; - }; - File: string; - Exclude: false; - CSS: { - csso: import("../Interface/CSS/csso.js").default; - lightningcss: import("../Interface/CSS/lightningcss.js").default; - }; - HTML: { - "html-minifier-terser": { - caseSensitive: true; - collapseInlineTagWhitespace: false; - collapseWhitespace: true; - continueOnParseError: true; - html5: true; - ignoreCustomComments: RegExp[]; - ignoreCustomFragments: never[]; - includeAutoGeneratedTags: true; - keepClosingSlash: true; - minifyCSS: true; - minifyJS: true; - minifyURLs: false; - noNewlinesBeforeTagClose: true; - preventAttributesEscaping: false; - processConditionalComments: false; - processScripts: string[]; - quoteCharacter: string; - removeAttributeQuotes: true; - removeComments: true; - removeScriptTypeAttributes: true; - removeStyleLinkTypeAttributes: true; - removeTagWhitespace: false; - sortAttributes: true; - sortClassName: true; - trimCustomFragments: true; - useShortDoctype: false; - }; - }; - Image: { - sharp: import("../Interface/Image/sharp.js").default; - }; - JavaScript: { - terser: { - ecma: 5; - enclose: false; - keep_classnames: false; - keep_fnames: false; - ie8: false; - module: false; - safari10: false; - toplevel: false; - format: { - comments: false; - }; - }; - }; - SVG: { - svgo: { - multipass: true; - js2svg: { - indent: number; - pretty: false; - }; - plugins: "preset-default"[]; - }; - }; - Map: import("../Interface/Map.js").default; - Parser: import("../Interface/Parser.js").default; + Path: string; + Cache: { + Search: string; + Folder: string; + }; + Logger: 2; + Action: { + Failed: ({ Input }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Passed: ({ Before, Buffer }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Accomplished: ({ Input, Before, After }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Changed: (Plan: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise; + Read: ({ Input }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Wrote: ({ Buffer }: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Fulfilled: ({ File }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise; + }; + File: string; + Exclude: false; + CSS: { + csso: import("../Interface/CSS/csso.js").default; + lightningcss: import("../Interface/CSS/lightningcss.js").default; + }; + HTML: { + "html-minifier-terser": { + caseSensitive: true; + collapseInlineTagWhitespace: false; + collapseWhitespace: true; + continueOnParseError: true; + html5: true; + ignoreCustomComments: RegExp[]; + ignoreCustomFragments: never[]; + includeAutoGeneratedTags: true; + keepClosingSlash: true; + minifyCSS: true; + minifyJS: true; + minifyURLs: false; + noNewlinesBeforeTagClose: true; + preventAttributesEscaping: false; + processConditionalComments: false; + processScripts: string[]; + quoteCharacter: string; + removeAttributeQuotes: true; + removeComments: true; + removeScriptTypeAttributes: true; + removeStyleLinkTypeAttributes: true; + removeTagWhitespace: false; + sortAttributes: true; + sortClassName: true; + trimCustomFragments: true; + useShortDoctype: false; + }; + }; + Image: { + sharp: import("../Interface/Image/sharp.js").default; + }; + JavaScript: { + terser: { + ecma: 5; + enclose: false; + keep_classnames: false; + keep_fnames: false; + ie8: false; + module: false; + safari10: false; + toplevel: false; + format: { + comments: false; + }; + }; + }; + SVG: { + svgo: { + multipass: true; + js2svg: { + indent: number; + pretty: false; + }; + plugins: "preset-default"[]; + }; + }; + Map: import("../Interface/Map.js").default; + Parser: import("../Interface/Parser.js").default; }; export default _default; diff --git a/Target/Variable/Parser.d.ts b/Target/Variable/Parser.d.ts index 7f7cda538..e02d8a532 100644 --- a/Target/Variable/Parser.d.ts +++ b/Target/Variable/Parser.d.ts @@ -1,5 +1,4 @@ import type Interface from "../Interface/Parser.js"; - /** * @module Parser * diff --git a/Target/Variable/SVG/svgo.d.ts b/Target/Variable/SVG/svgo.d.ts index 8e665d856..5e8a88729 100644 --- a/Target/Variable/SVG/svgo.d.ts +++ b/Target/Variable/SVG/svgo.d.ts @@ -3,11 +3,11 @@ * */ declare const _default: { - multipass: true; - js2svg: { - indent: number; - pretty: false; - }; - plugins: "preset-default"[]; + multipass: true; + js2svg: { + indent: number; + pretty: false; + }; + plugins: "preset-default"[]; }; export default _default;