From 8933d386755c889b48b71146a7c91e96b662d41c Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Mon, 21 Oct 2024 12:40:59 +0300 Subject: [PATCH] --- Target/Function/Integration.d.ts | 81 +++++++++++-------------------- Target/Function/Integration.js | 2 +- Target/Function/Merge.d.ts | 28 +++++------ Target/Interface/Critters.d.ts | 37 +++++++------- Target/Interface/Integration.d.ts | 4 +- Target/Interface/Logger.d.ts | 10 ++-- Target/Interface/Option.d.ts | 4 +- Target/Variable/Critters.d.ts | 1 - Target/Variable/Option.d.ts | 52 +++++++------------- 9 files changed, 84 insertions(+), 135 deletions(-) diff --git a/Target/Function/Integration.d.ts b/Target/Function/Integration.d.ts index 17cfafc..a8eab54 100644 --- a/Target/Function/Integration.d.ts +++ b/Target/Function/Integration.d.ts @@ -1,5 +1,4 @@ import type Interface from "../Interface/Integration.js"; - /** * @module Integration * @@ -7,56 +6,34 @@ import type Interface from "../Interface/Integration.js"; declare const _default: Interface; export default _default; export declare const Default: { - File: string; - Cache: { - Search: string; - Folder: string; - }; - Path: string; - Logger: 2; - Action: { - Accomplished: false; - Failed: ( - On: import("@playform/pipe/Target/Interface/File.js").default, - ) => Promise; - Fulfilled: ({ - File, - }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise< - string | false - >; - 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 - >; - Passed: ( - On: import("@playform/pipe/Target/Interface/File.js").default, - ) => Promise; - Changed: ( - Plan: import("@playform/pipe/Target/Interface/Plan.js").default, - ) => Promise; - }; - Exclude: false; - Critters: import("../Interface/Critters.js").default; + File: string; + Cache: { + Search: string; + Folder: string; + }; + Path: string; + Logger: 2; + Action: { + Accomplished: false; + Failed: (On: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Fulfilled: ({ File }: 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; + Passed: (On: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Changed: (Plan: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise; + }; + Exclude: false; + Critters: import("../Interface/Critters.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>>; +}>>; diff --git a/Target/Function/Integration.js b/Target/Function/Integration.js index 9b8ee52..72c53c5 100644 --- a/Target/Function/Integration.js +++ b/Target/Function/Integration.js @@ -1 +1 @@ -import y from"critters";var w=(...[r={}])=>{Object.entries(r).forEach(([t,e])=>Object.defineProperty(r,t,{value:e===!0?p[t]:r[t]}));const{Action:l,Cache:o,Critters:s,Exclude:u,Logger:c,Path:i}=f(p,r),n=new Set;return typeof i<"u"&&(Array.isArray(i)||i instanceof Set)&&i.forEach(t=>n.add(t)),{name:"@playform/inline",hooks:{"astro:build:done":async({dir:t})=>{if(n.size===0&&n.add(t),typeof o=="object"&&o.Search===h&&(o.Search=t),!!s)for(let e of n){e=await(await import("@playform/pipe/Target/Function/Apply.js")).default(async a=>a instanceof URL?(await import("url")).fileURLToPath(a):a,e);const m=new y(f(s,{path:e instanceof Map?e.keys().next().value:e,logLevel:(()=>{switch(c){case 0:return"silent";case 1:return"silent";case 2:return"info";default:return"info"}})()}));await(await(await(await new(await import("@playform/pipe")).default(o,c).In(e)).By("**/*.html")).Not(u)).Pipe(f(l,{Wrote:async({Buffer:a})=>m.process(a.toString())}))}}}}};const{default:p}=await import("../Variable/Option.js"),{default:{Cache:{Search:h}}}=await import("@playform/pipe/Target/Variable/Option.js"),{default:f}=await import("./Merge.js");export{p as Default,f as Merge,h as Search,w as default}; +import y from"critters";var w=(...[i={}])=>{Object.entries(i).forEach(([t,e])=>Object.defineProperty(i,t,{value:e===!0?p[t]:i[t]}));const{Action:l,Cache:n,Critters:s,Exclude:u,Logger:c,Path:a}=f(p,i),r=new Set;return typeof a<"u"&&((Array.isArray(a)||a instanceof Set)&&a.forEach(t=>r.add(t)),a instanceof Map&&r.add(a)),{name:"@playform/inline",hooks:{"astro:build:done":async({dir:t})=>{if(r.size===0&&r.add(t),typeof n=="object"&&n.Search===d&&(n.Search=t),!!s)for(let e of r){e=await(await import("@playform/pipe/Target/Function/Apply.js")).default(async o=>o instanceof URL?(await import("url")).fileURLToPath(o):o,e);const m=new y(f(s,{path:e instanceof Map?e.keys().next().value:e,logLevel:(()=>{switch(c){case 0:return"silent";case 1:return"silent";case 2:return"info";default:return"info"}})()}));await(await(await(await new(await import("@playform/pipe")).default(n,c).In(e)).By("**/*.html")).Not(u)).Pipe(f(l,{Wrote:async({Buffer:o})=>m.process(o.toString())}))}}}}};const{default:p}=await import("../Variable/Option.js"),{default:{Cache:{Search:d}}}=await import("@playform/pipe/Target/Variable/Option.js"),{default:f}=await import("./Merge.js");export{p as Default,f as Merge,d as Search,w as default}; diff --git a/Target/Function/Merge.d.ts b/Target/Function/Merge.d.ts index 3f7326d..b03db58 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/Critters.d.ts b/Target/Interface/Critters.d.ts index 1056c5a..1ff8e3d 100644 --- a/Target/Interface/Critters.d.ts +++ b/Target/Interface/Critters.d.ts @@ -1,26 +1,25 @@ import type Logger from "../Interface/Logger.js"; - /** * @module Critters * */ export default interface Interface { - path?: string; - publicPath?: string; - external?: boolean; - inlineThreshold?: number; - minimumExternalSize?: number; - pruneSource?: boolean; - mergeStylesheets?: boolean; - additionalStylesheets?: string[]; - preload?: "body" | "media" | "swap" | "js" | "js-lazy"; - noscriptFallback?: boolean; - inlineFonts?: boolean; - preloadFonts?: boolean; - fonts?: boolean; - keyframes?: string; - compress?: boolean; - logLevel?: "info" | "warn" | "error" | "trace" | "debug" | "silent"; - reduceInlineStyles?: boolean; - logger?: Logger; + path?: string; + publicPath?: string; + external?: boolean; + inlineThreshold?: number; + minimumExternalSize?: number; + pruneSource?: boolean; + mergeStylesheets?: boolean; + additionalStylesheets?: string[]; + preload?: "body" | "media" | "swap" | "js" | "js-lazy"; + noscriptFallback?: boolean; + inlineFonts?: boolean; + preloadFonts?: boolean; + fonts?: boolean; + keyframes?: string; + compress?: boolean; + logLevel?: "info" | "warn" | "error" | "trace" | "debug" | "silent"; + reduceInlineStyles?: boolean; + logger?: Logger; } diff --git a/Target/Interface/Integration.d.ts b/Target/Interface/Integration.d.ts index 2c2bc91..8972322 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/Logger.d.ts b/Target/Interface/Logger.d.ts index 9c72fc7..8ac4c3a 100644 --- a/Target/Interface/Logger.d.ts +++ b/Target/Interface/Logger.d.ts @@ -3,9 +3,9 @@ * */ export default interface Interface { - trace?: (message: string) => void; - debug?: (message: string) => void; - info?: (message: string) => void; - warn?: (message: string) => void; - error?: (message: string) => void; + trace?: (message: string) => void; + debug?: (message: string) => void; + info?: (message: string) => void; + warn?: (message: string) => void; + error?: (message: string) => void; } diff --git a/Target/Interface/Option.d.ts b/Target/Interface/Option.d.ts index bbcb5b4..f030ef7 100644 --- a/Target/Interface/Option.d.ts +++ b/Target/Interface/Option.d.ts @@ -1,11 +1,9 @@ import type Option from "@playform/pipe/Target/Interface/Option.js"; - import type Critters from "../Interface/Critters.js"; - /** * @module Option * */ export default interface Interface extends Option { - Critters?: boolean | Critters; + Critters?: boolean | Critters; } diff --git a/Target/Variable/Critters.d.ts b/Target/Variable/Critters.d.ts index fdf6391..af83369 100644 --- a/Target/Variable/Critters.d.ts +++ b/Target/Variable/Critters.d.ts @@ -1,5 +1,4 @@ import type Interface from "../Interface/Critters.js"; - /** * @module Critters * diff --git a/Target/Variable/Option.d.ts b/Target/Variable/Option.d.ts index 4007f82..7fbacb2 100644 --- a/Target/Variable/Option.d.ts +++ b/Target/Variable/Option.d.ts @@ -3,39 +3,23 @@ * */ declare const _default: { - File: string; - Cache: { - Search: string; - Folder: string; - }; - Path: string; - Logger: 2; - Action: { - Accomplished: false; - Failed: ( - On: import("@playform/pipe/Target/Interface/File.js").default, - ) => Promise; - Fulfilled: ({ - File, - }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise< - string | false - >; - 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 - >; - Passed: ( - On: import("@playform/pipe/Target/Interface/File.js").default, - ) => Promise; - Changed: ( - Plan: import("@playform/pipe/Target/Interface/Plan.js").default, - ) => Promise; - }; - Exclude: false; - Critters: import("../Interface/Critters.js").default; + File: string; + Cache: { + Search: string; + Folder: string; + }; + Path: string; + Logger: 2; + Action: { + Accomplished: false; + Failed: (On: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Fulfilled: ({ File }: 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; + Passed: (On: import("@playform/pipe/Target/Interface/File.js").default) => Promise; + Changed: (Plan: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise; + }; + Exclude: false; + Critters: import("../Interface/Critters.js").default; }; export default _default;