@staticbolt/core 1.0.0-beta.16 → 1.0.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/index.d.mts +1 -1
- package/lib/index.d.mts +5 -13
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/plugins/index.d.mts +0 -1
- package/lib/plugins/index.d.mts.map +1 -1
- package/lib/plugins/index.mjs +70 -36
- package/lib/plugins/index.mjs.map +1 -1
- package/lib/{utilities-ubLQ-AAc.mjs → utilities-CdEDdL4I.mjs} +5 -3
- package/lib/{utilities-ubLQ-AAc.mjs.map → utilities-CdEDdL4I.mjs.map} +1 -1
- package/package.json +23 -23
|
@@ -163,7 +163,8 @@ function getPathAliases(root) {
|
|
|
163
163
|
return [alias, null];
|
|
164
164
|
}
|
|
165
165
|
function readTsconfig(root) {
|
|
166
|
-
const
|
|
166
|
+
const tsconfigPath = join(root, "tsconfig.json");
|
|
167
|
+
const [tsconfig, tsconfigParseError] = readJsonFile(tsconfigPath);
|
|
167
168
|
if (tsconfigParseError !== null) return [null, tsconfigParseError];
|
|
168
169
|
if (!tsconfig.compilerOptions) return [null, /* @__PURE__ */ new Error("[readTsconfig] No compilerOptions found in tsconfig.json")];
|
|
169
170
|
return [tsconfig.compilerOptions, null];
|
|
@@ -424,7 +425,8 @@ function filterScriptMetadata(metadata) {
|
|
|
424
425
|
for (const scriptTag of scriptTags) {
|
|
425
426
|
const scriptId = scriptTag.getAttribute(CUSTOM_ATTRIBUTES.MetadataID);
|
|
426
427
|
if (!scriptId) continue;
|
|
427
|
-
|
|
428
|
+
const scriptType = scriptTag.getAttribute("type");
|
|
429
|
+
if (!isScriptType(scriptType)) continue;
|
|
428
430
|
const scriptMetadata = metadata.scriptsMetadataList.get(scriptId);
|
|
429
431
|
if (!scriptMetadata) continue;
|
|
430
432
|
result.push({
|
|
@@ -727,4 +729,4 @@ function escapeHtml(input) {
|
|
|
727
729
|
|
|
728
730
|
//#endregion
|
|
729
731
|
export { isTextAssetMetadata as A, isHtmlLink as B, isBinaryAssetMetadata as C, isScriptMetadata as D, isPackageMetadata as E, readJsonFile as F, splitHtmlLink as H, safeReadFile as I, safeReadFileSync as L, isScriptType as M, METADATA_TYPES as N, isStyleMetadata as O, Resolver as P, handleError as R, filterStyleMetadata as S, isMarkdownMetadata as T, DependencyTracker as U, isValidRelativePath as V, mergeMaps as _, clamp as a, printFmtError as b, downloadContent as c, hashContent as d, humanReadableBytes as f, kebabToCamelCase as g, isURL as h, capitalize as i, isWebManifestMetadata as j, isSvgMetadata as k, escapeHtml as l, isObject as m, bytesToKB as n, clearLn as o, isDefined as p, camelCaseToKebabCase as r, cloneObject as s, assign as t, getLineColumn as u, print as v, isHtmlMetadata as w, filterScriptMetadata as x, PrintFormattedError as y, valueOrError as z };
|
|
730
|
-
//# sourceMappingURL=utilities-
|
|
732
|
+
//# sourceMappingURL=utilities-CdEDdL4I.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities-ubLQ-AAc.mjs","names":["#sourcesToImporters","#importerToSources","c","PostcssNode"],"sources":["../src/helpers/dependency-tracker.ts","../src/utilities/html-links.ts","../src/utilities/value-or-error.ts","../src/utilities/read-file.ts","../src/utilities/read-json-file.ts","../src/resolver/get-aliases.ts","../src/resolver/resolver.ts","../src/types/metadata.ts","../src/helpers/is-script-type.ts","../src/utilities/metadata-utilities.ts","../src/utilities/highlight-code.ts","../src/utilities/print-formatted-error.ts","../src/utilities/utilities.ts"],"sourcesContent":["/**\n * Tracks bidirectional dependencies between importers and their sources.\\\n * Handles reconciliation when dependencies change, so stale entries are automatically removed when an importer stops referencing\n * a source.\n */\nexport class DependencyTracker {\n /** Source → Set of importers that depend on it */\n readonly #sourcesToImporters = new Map<string, Set<string>>();\n\n /** Importer → Set of sources it depends on */\n readonly #importerToSources = new Map<string, Set<string>>();\n\n /** Updates the full set of sources for a given importer, reconciling any stale entries from previous calls. */\n update(importer: string, sources: Iterable<string>): void {\n const nextSources = new Set(sources);\n const previousSources = this.#importerToSources.get(importer) ?? new Set();\n\n // Remove importer from sources it no longer uses\n for (const source of previousSources) {\n if (!nextSources.has(source)) {\n this.#sourcesToImporters.get(source)?.delete(importer);\n }\n }\n\n // Add importer to newly referenced sources\n for (const source of nextSources) {\n if (!this.#sourcesToImporters.has(source)) {\n this.#sourcesToImporters.set(source, new Set());\n }\n\n this.#sourcesToImporters.get(source)!.add(importer);\n }\n\n this.#importerToSources.set(importer, nextSources);\n }\n\n /** Deletes all dependency data for a given id, whether it's acting as an importer, a source, or both (e.g. on file unlink). */\n delete(id: string): void {\n // id was a source — drop it entirely\n this.#sourcesToImporters.delete(id);\n\n // id was an importer — remove it from all sources it referenced\n const sources = this.#importerToSources.get(id);\n if (sources) {\n for (const source of sources) {\n this.#sourcesToImporters.get(source)?.delete(id);\n }\n\n this.#importerToSources.delete(id);\n }\n }\n\n /** Returns all importers that depend on a given source, or an empty set. */\n getImporters(source: string): ReadonlySet<string> {\n return this.#sourcesToImporters.get(source) ?? new Set();\n }\n\n /** Returns all sources that a given importer depends on, or an empty set. */\n getSources(importer: string): ReadonlySet<string> {\n return this.#importerToSources.get(importer) ?? new Set();\n }\n}\n","import { isAbsolute } from \"./path.ts\";\n\n/**\n * Checks if the link is an HTML link (not a file link)\n *\n * @param source - The link\n * @returns\n */\nexport function isHtmlLink(source: string): boolean {\n return /^(?:#|https?|mailto:|tel:|url\\(|ftp:|data:|javascript:)/i.test(source);\n}\n\nexport function isValidRelativePath(source: string): boolean {\n if (!source) return false;\n // if (source.includes(\" \")) return false;\n if (isAbsolute(source)) return false;\n return !isHtmlLink(source);\n}\n\nexport function splitHtmlLink(url: string): [string, string] {\n const qIndex = url.indexOf(\"?\");\n const hIndex = url.indexOf(\"#\");\n\n // Find the earliest query/hash delimiter\n let delimIndex = -1;\n\n if (qIndex !== -1 && hIndex !== -1) {\n delimIndex = Math.min(qIndex, hIndex);\n }\n //\n else if (qIndex !== -1) {\n delimIndex = qIndex;\n }\n //\n else if (hIndex !== -1) {\n delimIndex = hIndex;\n }\n\n if (delimIndex !== -1) {\n // If a '/' immediately precedes the delimiter, include it in the suffix\n const pathEnd = url[delimIndex - 1] === \"/\" ? delimIndex - 1 : delimIndex;\n return [url.slice(0, pathEnd), url.slice(pathEnd)];\n }\n\n // No query or hash — handle trailing slash\n if (url.endsWith(\"/\")) {\n // Bare \"/\" or \"./\" are kept whole\n if (url === \"/\" || url === \"./\") {\n return [url, \"\"];\n }\n\n return [url.slice(0, -1), \"/\"];\n }\n\n return [url, \"\"];\n}\n","export type ValueOrError<T> = [T, null] | [null, Error];\n\nfunction errorsWrapper<T, A extends unknown[]>(function_: (...arguments_: A) => T | Promise<T>) {\n return (...arguments_: A) => {\n try {\n const promiseOrValue = function_(...arguments_);\n if (isPromise<T>(promiseOrValue)) {\n return new Promise(resolve => {\n promiseOrValue\n .then(value => {\n resolve([value, null]);\n })\n .catch((error: unknown) => {\n resolve(handleError(error, function_.name));\n });\n });\n }\n return [promiseOrValue, null];\n } catch (error) {\n return handleError(error, function_.name);\n }\n };\n}\n\nfunction isPromise<T>(value: T | Promise<T>): value is Promise<T> {\n return (\n value &&\n typeof value === \"object\" &&\n \"then\" in value &&\n typeof value.then === \"function\" &&\n \"catch\" in value &&\n typeof value.catch === \"function\"\n );\n}\n\nexport function handleError<T>(error: unknown, functionName = \"\"): ValueOrError<T> {\n if (!error) {\n return [null, new Error(`[${functionName}] Unexpected error`)];\n }\n\n if (typeof error === \"string\") {\n return [null, new Error(error)];\n }\n\n if (error instanceof Error) {\n return [null, error];\n }\n\n // in some cases the error is not an instance of Error but an object\n if (typeof error === \"object\" && \"message\" in error && typeof error.message === \"string\") {\n return [null, new Error(error.message)];\n }\n\n return [null, new Error(`[${functionName}] Unexpected error`)];\n}\n\ninterface goErrorsI {\n <T, A extends unknown[]>(function_: (...arguments_: A) => Promise<T>): (...arguments_: A) => Promise<ValueOrError<T>>;\n <T, A extends unknown[]>(function_: (...arguments_: A) => T): (...arguments_: A) => ValueOrError<T>;\n}\n\nexport const valueOrError = errorsWrapper as unknown as goErrorsI;\n","import type { Abortable } from \"node:events\";\nimport { readFileSync } from \"node:fs\";\nimport type { ObjectEncodingOptions, OpenMode, PathLike, PathOrFileDescriptor } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport type { FileHandle } from \"node:fs/promises\";\n\nimport { handleError } from \"./value-or-error.ts\";\n\nimport type { ValueOrError } from \"./value-or-error.ts\";\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options?:\n | ({\n encoding?: null | undefined;\n flag?: OpenMode | undefined;\n } & Abortable)\n | null\n): Promise<ValueOrError<Buffer>>;\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options:\n | ({\n encoding: BufferEncoding;\n flag?: OpenMode | undefined;\n } & Abortable)\n | BufferEncoding\n): Promise<ValueOrError<string>>;\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options?:\n | (ObjectEncodingOptions &\n Abortable & {\n flag?: OpenMode | undefined;\n })\n | BufferEncoding\n | null\n): Promise<ValueOrError<string | Buffer>>;\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options?:\n | (ObjectEncodingOptions &\n Abortable & {\n flag?: OpenMode | undefined;\n })\n | BufferEncoding\n | null\n): Promise<ValueOrError<string | Buffer>> {\n try {\n const string_ = await readFile(path, options);\n return [string_, null];\n } catch (error) {\n return handleError(error, \"readFile\");\n }\n}\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options?: {\n encoding?: null | undefined;\n flag?: string | undefined;\n } | null\n): ValueOrError<NonSharedBuffer>;\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options:\n | BufferEncoding\n | {\n encoding: BufferEncoding;\n flag?: string | undefined;\n }\n): ValueOrError<string>;\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options?:\n | (ObjectEncodingOptions & {\n flag?: string | undefined;\n })\n | BufferEncoding\n | null\n): ValueOrError<string | NonSharedBuffer>;\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options?:\n | (ObjectEncodingOptions & {\n flag?: string | undefined;\n })\n | BufferEncoding\n | null\n): ValueOrError<string | NonSharedBuffer> {\n try {\n const string_ = readFileSync(path, options);\n return [string_, null];\n } catch (error) {\n return handleError(error, \"readFileSync\");\n }\n}\n","import json5 from \"json5\";\n\nimport { safeReadFileSync } from \"./read-file.ts\";\nimport { valueOrError } from \"./value-or-error.ts\";\n\nimport type { ValueOrError } from \"./value-or-error.ts\";\n\n/** Read a file and parse it as JSON safely. */\nexport function readJsonFile<T>(path: string, code?: string): ValueOrError<T> {\n if (!code) {\n const [fileString, readError] = safeReadFileSync(path, \"utf8\");\n if (readError) {\n return [null, readError];\n }\n\n code = fileString;\n }\n\n const [parsed, parseError] = valueOrError(json5.parse<T>)(code);\n if (parseError !== null) {\n return [null, parseError];\n }\n\n return [parsed, null];\n}\n","import { join } from \"../utilities/path.ts\";\nimport { readJsonFile } from \"../utilities/read-json-file.ts\";\n\nimport type { ValueOrError } from \"../utilities/value-or-error.ts\";\nimport type { CompilerOptions } from \"typescript\";\n\n/** Gets path aliases from `tsconfig.json` */\nexport function getPathAliases(root: string): ValueOrError<Record<string, string>> {\n const [tsconfig, tsconfigParseError] = readTsconfig(root);\n if (tsconfigParseError !== null) {\n return [null, tsconfigParseError];\n }\n\n const paths = tsconfig.paths ?? {};\n const alias: Record<string, string> = {};\n\n for (const key in paths) {\n const aliasName = key.replace(/\\*$/, \"\");\n const aliasPath = paths[key][0].replace(/\\*$/, \"\");\n alias[aliasName] = aliasPath;\n }\n\n return [alias, null];\n}\n\nfunction readTsconfig(root: string): ValueOrError<CompilerOptions> {\n const tsconfigPath = join(root, \"tsconfig.json\");\n\n const [tsconfig, tsconfigParseError] = readJsonFile<{ compilerOptions: CompilerOptions }>(tsconfigPath);\n if (tsconfigParseError !== null) {\n return [null, tsconfigParseError];\n }\n\n if (!tsconfig.compilerOptions) {\n return [null, new Error(\"[readTsconfig] No compilerOptions found in tsconfig.json\")];\n }\n\n return [tsconfig.compilerOptions, null];\n}\n","import { existsSync, statSync } from \"node:fs\";\nimport { ResolverFactory } from \"oxc-resolver\";\n\nimport { isValidRelativePath, splitHtmlLink } from \"../utilities/html-links.ts\";\nimport { Log } from \"../utilities/logger.ts\";\nimport { dirname, extname, isAbsolute, join, normalize, replaceExtension } from \"../utilities/path.ts\";\nimport { getPathAliases } from \"./get-aliases.ts\";\n\nconst nodeModulesResolver = new ResolverFactory({\n conditionNames: [\"browser\", \"import\", \"default\"],\n extensions: [\".js\", \".json\", \".node\", \".css\"],\n symlinks: false,\n});\n\ntype ResolveResult = {\n path: string;\n suffix: string;\n isDirAlias?: boolean;\n isFileAlias?: boolean;\n isPackage?: boolean;\n exists: boolean;\n};\n\nexport class Resolver {\n root: string;\n aliases: Record<string, string> = {};\n notFound: Set<string> = new Set();\n files: Set<string> = new Set();\n directories: Set<string> = new Set();\n\n static JS_EXTENSIONS = new Set([\".js\", \".mjs\", \".cjs\", \".jsx\", \".ts\", \".mts\", \".cts\", \".tsx\"]);\n static HTML_EXTENSIONS = new Set([\".html\", \".md\"]);\n\n constructor(root: string) {\n this.root = root;\n\n const [aliases] = getPathAliases(root);\n if (aliases) {\n this.aliases = aliases;\n }\n }\n\n resolve(sourceOrLink: string, filePath: string): ResolveResult | undefined {\n if (!isValidRelativePath(sourceOrLink)) return;\n\n const absFilePath = isAbsolute(filePath) ? filePath : join(this.root, filePath);\n const [source, suffix] = splitHtmlLink(sourceOrLink);\n\n // HTML links can be absolute E.g. /index.html\n if (isAbsolute(source)) {\n return;\n }\n\n const isDirectory = suffix === \"/\";\n\n // file or directory\n const absSource = join(dirname(absFilePath), source);\n const foundFile = this.findFile(absSource, isDirectory);\n if (foundFile) {\n return { path: foundFile, exists: true, suffix };\n }\n\n // path alias — restore the stripped trailing slash so \"~/\" aliases match\n const sourceForAlias = suffix === \"/\" ? source + \"/\" : source;\n const resolvedPathAlias = Resolver.resolvePathAlias(sourceForAlias, this.aliases);\n if (resolvedPathAlias) {\n const absSource = join(this.root, resolvedPathAlias);\n const foundFile = this.findFile(absSource, isDirectory);\n\n const isFileAlias = Object.hasOwn(this.aliases, sourceForAlias) && !sourceForAlias.endsWith(\"/\");\n\n // Warn once when a resolved source cannot be found on disk.\n if (!foundFile && !this.notFound.has(absSource.replace(/\\/$/, \"\"))) {\n this.notFound.add(absSource.replace(/\\/$/, \"\"));\n Log.warn(\n `[resolver] Source \"${sourceOrLink}\" found in \"${filePath}\" was resolved to \"${resolvedPathAlias}\", but the file is missing.`\n );\n }\n\n return { path: foundFile ?? absSource, exists: !!foundFile, suffix, isFileAlias, isDirAlias: !isFileAlias };\n }\n\n // node module package\n if (!source.startsWith(\".\")) {\n const resolverResult = nodeModulesResolver.sync(this.root, source);\n if (resolverResult.path) {\n return { path: resolverResult.path, suffix, exists: true, isPackage: true };\n }\n }\n\n // Not found, but its already a file path\n if (source.startsWith(\"./\") || source.startsWith(\"../\")) {\n // Warn once per missing source: it was resolved previously but the file cannot be found anymore.\n if (!this.notFound.has(absSource)) {\n this.notFound.add(absSource);\n Log.warn(`[resolver] Source \"${sourceOrLink}\" found in \"${filePath}\" points to a non-existent file.`);\n }\n\n return { path: absSource, suffix, exists: false };\n }\n }\n\n resolveAlias(source: string): string | undefined {\n return Resolver.resolvePathAlias(source, this.aliases);\n }\n\n normalize(filePath: string): string {\n return normalize(filePath);\n }\n\n static isFile(filePath: string): boolean {\n try {\n return statSync(filePath).isFile();\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n if (code === \"ENOENT\" || code === \"ENOTDIR\") {\n return false;\n }\n\n throw error;\n }\n }\n\n /** Aliased path to path */\n static resolvePathAlias(filePath: string, aliases: Record<string, string>): string | undefined {\n for (const [key, value] of Object.entries(aliases)) {\n // directory path alias\n if (key.endsWith(\"/\")) {\n if (!filePath.startsWith(key)) {\n continue;\n }\n\n return filePath.replace(key, () => value);\n }\n\n // file path alias\n if (filePath === key) {\n return value;\n }\n }\n }\n\n /** Path to aliased path */\n static resolveAliasPath(filePath: string, aliases: Record<string, string>): string {\n let shortest: string | undefined;\n\n for (const [key, value] of Object.entries(aliases)) {\n // directory path alias\n if (key.endsWith(\"/\")) {\n if (!filePath.startsWith(value)) {\n continue;\n }\n\n const aliased = filePath.replace(value, () => key);\n if (!shortest || aliased.length < shortest.length) {\n shortest = aliased;\n }\n continue;\n }\n\n // file path alias\n if (filePath === value && (!shortest || key.length < shortest.length)) {\n shortest = key;\n }\n }\n\n return shortest ?? filePath;\n }\n\n /** Path to aliased path */\n aliasPath(filePath: string): string {\n return Resolver.resolveAliasPath(filePath, this.aliases);\n }\n\n findFile(filePath: string, shouldCheckDirectory = false): string | undefined {\n // From cache\n if (this.files.has(filePath)) {\n return filePath;\n }\n\n // Exact match\n if (Resolver.isFile(filePath)) {\n this.files.add(filePath);\n return filePath;\n }\n\n const extension = extname(filePath);\n\n // No extension\n if (!extension) {\n // it might be a js file, html file, markdown file or just a directory\n for (const candidateExtension of [...Resolver.JS_EXTENSIONS, ...Resolver.HTML_EXTENSIONS]) {\n const candidate = replaceExtension(filePath, candidateExtension);\n\n if (this.files.has(candidate)) {\n return candidate;\n }\n\n if (Resolver.isFile(candidate)) {\n this.files.add(candidate);\n return candidate;\n }\n }\n\n // it might be index.html or index.md\n const withIndex = join(filePath, \"index\");\n\n for (const candidateExtension of Resolver.HTML_EXTENSIONS) {\n const candidate = replaceExtension(withIndex, candidateExtension);\n\n if (this.files.has(candidate)) {\n return candidate;\n }\n\n if (Resolver.isFile(candidate)) {\n this.files.add(candidate);\n return candidate;\n }\n }\n\n // directory\n if (shouldCheckDirectory) {\n if (this.directories.has(filePath)) {\n return filePath;\n }\n\n if (existsSync(filePath)) {\n this.directories.add(filePath);\n return filePath;\n }\n }\n\n return;\n }\n\n // main.js does not exist but main{.jsx, .ts, .tsx} may exist\n if (Resolver.JS_EXTENSIONS.has(extension)) {\n for (const jsExtension of Resolver.JS_EXTENSIONS) {\n const candidate = replaceExtension(filePath, jsExtension);\n\n if (Resolver.isFile(candidate)) {\n this.files.add(candidate);\n return candidate;\n }\n }\n\n return;\n }\n }\n}\n","import type { BabelAst, PostcssAst, Document, MarkdownAst } from \"@staticbolt/core\";\nimport type { WebAppManifest } from \"web-app-manifest\";\n\nexport const METADATA_TYPES = Object.freeze({\n Script: \"Script\",\n HTML: \"Html\",\n Markdown: \"Markdown\",\n CSS: \"Style\",\n SVG: \"Svg\",\n Package: \"Package\",\n TextAsset: \"TextAsset\",\n BinaryAsset: \"BinaryAsset\",\n WebAppManifest: \"WebAppManifest\",\n});\n\nexport type MetadataTypes = (typeof METADATA_TYPES)[keyof typeof METADATA_TYPES];\n\nexport interface MetadataBase {\n readonly type: `${Capitalize<string>}${string}`;\n\n /**\n * Relative path of the source file.\n *\n * Initially identical to `originalSource` when the metadata is created. During the build process, this value may change (e.g.,\n * if the file is moved to a different location and its links are rebased).\n */\n filePath: string;\n\n /**\n * Original relative path of the source file.\n *\n * Set when the metadata is created and never modified.\n */\n readonly id: string;\n\n readonly directDependencies: Set<string>;\n}\n\nexport interface ScriptMetadata extends MetadataBase {\n readonly type: (typeof METADATA_TYPES)[\"Script\"];\n\n /**\n * The Babel AST for the script.\n *\n * Mutated during the build process and always represents the file's current transformed state.\n */\n ast: BabelAst;\n\n /** Whether the script is a module or global */\n module: boolean;\n}\n\nexport interface StyleMetadata extends MetadataBase {\n readonly type: (typeof METADATA_TYPES)[\"CSS\"];\n\n /**\n * The PostCSS root after transformation\n *\n * Mutated during the build process and always represents the file's current transformed state.\n */\n ast: PostcssAst;\n}\n\nexport interface HtmlMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"HTML\"];\n\n /**\n * The HTML AST (root element).\n *\n * Mutated during the build process and always represents the file's current transformed state\n */\n ast: Document;\n\n /** The transformed ASTs from script tags. The key is the UUID */\n scriptsMetadataList: Map<string, ScriptMetadata>;\n\n /** The transformed ASTs from script tags. The key is the UUID */\n stylesMetadataList: Map<string, StyleMetadata>;\n}\n\nexport interface SvgMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"SVG\"];\n\n /**\n * The HTML AST (root element).\n *\n * Mutated during the build process and always represents the file's current transformed state\n */\n ast: Document;\n\n /** The transformed ASTs from script tags. The key is the UUID */\n stylesMetadataList: Map<string, StyleMetadata>;\n}\n\nexport interface MarkdownMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"Markdown\"];\n\n /**\n * Markdown tokens and frontmatter.\n *\n * Mutated during the build process and always represents the file's current transformed state\n */\n ast: MarkdownAst;\n}\n\nexport interface WebManifestMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"WebAppManifest\"];\n ast: WebAppManifest;\n}\n\nexport interface PackageMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"Package\"];\n\n /** Metadata code */\n code: string;\n\n packageName: string;\n}\n\nexport interface TextAssetMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"TextAsset\"];\n\n /** Metadata code */\n code: string;\n}\n\nexport interface BinaryAssetMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"BinaryAsset\"];\n\n /** Raw binary content — images, fonts, wasm, etc. */\n data?: Uint8Array;\n}\n","const allowedTypes = new Set([\n \"module\",\n \"text/javascript\",\n \"application/javascript\",\n \"text/ecmascript\",\n \"application/ecmascript\",\n \"application/x-javascript\",\n]);\n\nexport function isScriptType(type: string | null) {\n return !type || allowedTypes.has(type.toLowerCase());\n}\n","import { isScriptType } from \"../helpers/is-script-type.ts\";\nimport { CUSTOM_ATTRIBUTES } from \"../types/common.ts\";\nimport { METADATA_TYPES } from \"../types/metadata.ts\";\n\nimport type {\n TextAssetMetadata,\n HtmlMetadata,\n MarkdownMetadata,\n MetadataBase,\n ScriptMetadata,\n StyleMetadata,\n SvgMetadata,\n WebManifestMetadata,\n BinaryAssetMetadata,\n PackageMetadata,\n HTMLElement,\n} from \"@staticbolt/core\";\n\nexport function isScriptMetadata(metadata: MetadataBase | undefined): metadata is ScriptMetadata {\n return metadata?.type === METADATA_TYPES.Script;\n}\n\nexport function isPackageMetadata(metadata: MetadataBase | undefined): metadata is PackageMetadata {\n return metadata?.type === METADATA_TYPES.Package;\n}\n\nexport function isHtmlMetadata(metadata: MetadataBase | undefined): metadata is HtmlMetadata {\n return metadata?.type === METADATA_TYPES.HTML;\n}\n\nexport function isStyleMetadata(metadata: MetadataBase | undefined): metadata is StyleMetadata {\n return metadata?.type === METADATA_TYPES.CSS;\n}\n\nexport function isSvgMetadata(metadata: MetadataBase | undefined): metadata is SvgMetadata {\n return metadata?.type === METADATA_TYPES.SVG;\n}\n\nexport function isMarkdownMetadata(metadata: MetadataBase | undefined): metadata is MarkdownMetadata {\n return metadata?.type === METADATA_TYPES.Markdown;\n}\n\nexport function isTextAssetMetadata(metadata: MetadataBase | undefined): metadata is TextAssetMetadata {\n return metadata?.type === METADATA_TYPES.TextAsset;\n}\n\nexport function isBinaryAssetMetadata(metadata: MetadataBase | undefined): metadata is BinaryAssetMetadata {\n return metadata?.type === METADATA_TYPES.BinaryAsset;\n}\n\nexport function isWebManifestMetadata(metadata: MetadataBase): metadata is WebManifestMetadata {\n return metadata.type === METADATA_TYPES.WebAppManifest;\n}\n\n/**\n * Returns script-related metadata entries.\n *\n * - If the input is ScriptMetadata, it returns it directly.\n * - If the input is HtmlMetadata, it scans <script> tags in the AST and resolves their associated ScriptMetadata using the metadata\n * ID attribute.\n */\nexport function filterScriptMetadata(metadata: MetadataBase) {\n const result: { metadata: ScriptMetadata; tag?: HTMLElement; htmlMetadata?: HtmlMetadata }[] = [];\n\n if (isScriptMetadata(metadata)) {\n result.push({ metadata });\n return result;\n }\n\n if (isHtmlMetadata(metadata)) {\n const scriptTags = metadata.ast.querySelectorAll(\"script\");\n\n for (const scriptTag of scriptTags) {\n const scriptId = scriptTag.getAttribute(CUSTOM_ATTRIBUTES.MetadataID);\n if (!scriptId) continue;\n\n const scriptType = scriptTag.getAttribute(\"type\");\n if (!isScriptType(scriptType)) {\n continue;\n }\n\n const scriptMetadata = metadata.scriptsMetadataList.get(scriptId);\n if (!scriptMetadata) continue;\n\n result.push({ metadata: scriptMetadata, htmlMetadata: metadata, tag: scriptTag });\n }\n }\n\n return result;\n}\n\n/**\n * Returns style-related metadata entries.\n *\n * - If the input is StyleMetadata, it returns it directly.\n * - If the input is HtmlMetadata, it scans <style> tags in the AST and resolves their associated StyleMetadata using the metadata\n * ID attribute.\n */\nexport function filterStyleMetadata(metadata: MetadataBase) {\n const result: { metadata: StyleMetadata; tag?: HTMLElement; htmlMetadata?: HtmlMetadata }[] = [];\n\n if (isStyleMetadata(metadata)) {\n result.push({ metadata });\n return result;\n }\n\n if (isHtmlMetadata(metadata)) {\n const styleTags = metadata.ast.querySelectorAll(\"style\");\n\n for (const styleTag of styleTags) {\n const styleId = styleTag.getAttribute(CUSTOM_ATTRIBUTES.MetadataID) || \"\";\n const styleMetadata = metadata.stylesMetadataList.get(styleId);\n if (!styleMetadata) continue;\n\n result.push({\n metadata: styleMetadata,\n htmlMetadata: metadata,\n tag: styleTag,\n });\n }\n }\n\n return result;\n}\n","import boxen from \"boxen\";\nimport chalk from \"chalk\";\nimport { common, createEmphasize } from \"emphasize\";\n\n/** - Highlight code string for terminal */\nexport function highlightCode(code: string, { lang = \"ts\", maxCodeLength = 170, maxLineLength = 110, boxed = true } = {}) {\n // Limit code length\n const isTruncated = code.length > maxCodeLength;\n if (isTruncated) code = code.slice(0, Math.max(0, maxCodeLength));\n\n // Limit line length and break on words\n const lines = code.split(\"\\n\");\n let withNewLines = \"\";\n for (const line of lines) {\n if (line.length <= maxLineLength) {\n withNewLines += line + \"\\n\";\n continue;\n }\n\n const words = line.split(\" \");\n let currentLine = \"\";\n for (const word of words) {\n if (currentLine.length + word.length <= maxLineLength) {\n currentLine += word + \" \";\n continue;\n }\n withNewLines += currentLine + \"\\n\";\n currentLine = word + \" \";\n }\n withNewLines += currentLine + \"\\n\";\n }\n\n // Highlight\n let highlighted = createEmphasize(common).highlight(lang, withNewLines.trim()).value;\n if (isTruncated) highlighted += \"\\n\" + chalk.inverse(\" ... \");\n\n if (!boxed) return highlighted;\n\n return boxen(highlighted, {\n padding: 0.5,\n borderStyle: \"round\",\n borderColor: \"white\",\n dimBorder: true,\n });\n}\n","import _generator from \"@babel/generator\";\nimport { NodeType } from \"@staticbolt/node-html-parser\";\nimport c from \"chalk\";\nimport { Node as PostcssNode } from \"postcss\";\n\nimport { CUSTOM_ATTRIBUTES } from \"../types/common.ts\";\nimport { highlightCode } from \"./highlight-code.ts\";\nimport { Log } from \"./logger.ts\";\n\nimport type { Node as BabelNode } from \"@babel/types\";\nimport type { Node as HtmlNode } from \"@staticbolt/node-html-parser\";\n\nconst generator = typeof _generator === \"function\" ? _generator : _generator.default;\n\ntype Node = BabelNode | PostcssNode | HtmlNode;\n\ninterface FormatErrorOptions {\n /** AST node (e.g., from Babel, PostCSS, or HTML) to convert and highlight */\n node?: Node;\n\n /** Source code to highlight (use instead of `node`) */\n code?: string;\n\n /** Language of the provided source code (required if `code` is set) */\n lang?: string;\n\n /** Path of the file where the error occurred */\n filePath?: string;\n\n /** Name of the function where the error originated */\n functionName?: string;\n\n level?: \"error\" | \"warning\";\n\n /** Function reference used to extract the function name */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function?: (...arguments_: any[]) => any;\n}\n\ntype MessageAndError = (string | Error)[];\n\nexport class PrintFormattedError {\n options: FormatErrorOptions = {};\n\n constructor(options: FormatErrorOptions = {}) {\n Object.assign(this.options, options);\n }\n\n static create(options: FormatErrorOptions = {}) {\n return new PrintFormattedError(options).print;\n }\n\n print = (...messageAndErrorWithOptions: [...MessageAndError] | [...MessageAndError, FormatErrorOptions]) => {\n const options: FormatErrorOptions = { ...this.options };\n\n const messagesArray: string[] = [];\n for (const item of messageAndErrorWithOptions) {\n // Msg\n if (typeof item === \"string\") {\n messagesArray.push(item);\n continue;\n }\n\n // Error\n if (item instanceof Error) {\n messagesArray.push(`\\n${item.message}`);\n continue;\n }\n\n // Options\n Object.assign(options, item);\n }\n\n let message = \"\";\n\n // First file path in one line without anything else to enable vscode link parsing\n if (options.filePath) {\n message += c.italic(options.filePath) + \"\\n\";\n }\n\n // Then the function name before the messages\n const functionName = options.function?.name ?? options.functionName;\n if (functionName) {\n message += c.dim(`[${functionName}] `);\n }\n\n // Then the messages (spaced)\n message += messagesArray.join(\" \");\n\n // Now the code\n const codeFromNode = options.node && nodeToString(options.node);\n const code = options.code ?? codeFromNode?.code;\n const lang = options.lang ?? codeFromNode?.lang;\n const codeBox = code && lang ? highlightCode(code, { lang }) : \"\";\n if (codeBox) {\n message += \"\\n\" + codeBox;\n }\n\n if (options.level === \"warning\") {\n Log.warn(message);\n return;\n }\n\n Log.error(message);\n };\n}\n\nexport const printFmtError = PrintFormattedError.create();\n\nfunction isHtmlNode(node: Node): node is HtmlNode {\n return \"nodeType\" in node && typeof node.nodeType === \"number\";\n}\n\nfunction isPostcssNode(node: Node): node is PostcssNode {\n return node instanceof PostcssNode;\n}\n\nfunction nodeToString(node: Node): { code: string; lang: string } {\n if (isHtmlNode(node)) {\n const clone = node.clone();\n if (clone.nodeType === NodeType.ELEMENT_NODE) {\n clone.removeAttribute(CUSTOM_ATTRIBUTES.MetadataID);\n }\n\n return { code: clone.toString(), lang: \"html\" };\n }\n\n if (isPostcssNode(node)) {\n return { code: node.toString(), lang: \"css\" };\n }\n\n return { code: generator(node, { jsescOption: { minimal: true } }).code, lang: \"js\" };\n}\n","import { createHash } from \"node:crypto\";\n\nimport { Log } from \"./logger.ts\";\n\nimport type { ValueOrError } from \"./value-or-error.ts\";\n\n/** `process.stdout.write` */\nexport function print(...input: string[]) {\n process.stdout.write(input.join(\" \"));\n}\n\n/** - Clear the line in the terminal */\nexport function clearLn() {\n if (!(\"clearLine\" in process.stdout && typeof process.stdout.clearLine === \"function\")) {\n return;\n }\n\n process.stdout.clearLine(0);\n process.stdout.cursorTo(0);\n}\n\n/** Used to assign a computed value to a variable */\nexport function assign<T>(function_: () => T): T {\n return function_();\n}\n\n/** Check if the value is an object */\nexport function isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && !Array.isArray(value) && value !== null;\n}\n\nexport function kebabToCamelCase(string_: string): string {\n return string_.replace(/-([a-z])/g, (_, char) => (char as string).toUpperCase());\n}\n\nexport function camelCaseToKebabCase(string_: string): string {\n return string_.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\nexport function capitalize(string_: string): string {\n return string_.charAt(0).toUpperCase() + string_.slice(1);\n}\n\n/**\n * - Get line and column number from first match index\n *\n * @param code - Code string\n * @param matchIndex - Matching index\n * @returns - `[line, column]`\n */\nexport function getLineColumn(code: string, matchIndex: number): [number, number] {\n let lineNumber = 1;\n let columnNumber = 1;\n\n for (let index = 0; index < matchIndex; index++) {\n if (code[index] === \"\\n\") {\n lineNumber++;\n columnNumber = 1; // Reset column at each new line\n continue;\n }\n\n columnNumber++;\n }\n\n return [lineNumber, columnNumber];\n}\n\n/** - Human readable bytes, E.g: `1024 => 1KB` */\nexport function humanReadableBytes(bytes: number): string {\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n let unitIndex = 0;\n while (bytes >= 1024 && unitIndex < units.length - 1) {\n bytes /= 1024;\n unitIndex++;\n }\n return `${bytes.toFixed(2)} ${units[unitIndex]}`;\n}\n\nexport function bytesToKB(bytes: number): number {\n return bytes / 1024;\n}\n\n/** - Clamp a numeric value between min and max values. */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nexport function isDefined<T>(value: T | undefined): value is T {\n return value !== undefined;\n}\n\n/**\n * Merges all entries from `source` into `target`, mutating `target` in place.\n *\n * - Existing keys in `target` are overwritten by `source` values.\n * - Values are **not** cloned — object references are shared between both maps after the merge.\n *\n * @param target - The map to be mutated with new/updated entries.\n * @param source - The map whose entries are read and applied to `target`.\n * @returns The mutated `target` map.\n */\nexport function mergeMaps<K, V>(target: Map<K, V>, source: Map<K, V>): Map<K, V> {\n for (const [key, value] of source) {\n target.set(key, value);\n }\n return target;\n}\n\nconst cached = new Map<string, string>();\n\n/** - Download from CDN */\nexport async function downloadContent(url: string): Promise<ValueOrError<string>> {\n if (cached.has(url)) {\n return [cached.get(url)!, null];\n }\n\n const headers = {\n \"User-Agent\":\n \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36\",\n Accept: \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\n Referer: url,\n };\n\n try {\n Log.info(`Downloading content from \"${url}\"`);\n const response = await fetch(url, { headers });\n const text = await response.text();\n cached.set(url, text);\n return [text, null];\n } catch {\n return [null, new Error(\"Error downloading q: \" + url)];\n }\n}\n\nexport function isURL(url: string): boolean {\n return url.startsWith(\"http://\") || url.startsWith(\"https://\");\n}\n\n/** Creates a shallow clone of an object while preserving its prototype and property descriptors. */\nexport function cloneObject<T extends object>(object: T): T {\n return Object.create(Object.getPrototypeOf(object) as T, Object.getOwnPropertyDescriptors(object)) as T;\n}\n\nexport function hashContent(content: string) {\n return createHash(\"sha1\").update(content).digest(\"hex\"); // full 40 chars\n}\n\nconst matchHtmlRegExp = /[\"'&<>]/;\n\nexport function escapeHtml(input: string) {\n const string = input;\n const match = matchHtmlRegExp.exec(string);\n\n if (!match) {\n return string;\n }\n\n let escape;\n let html = \"\";\n // eslint-disable-next-line no-useless-assignment\n let index = 0;\n let lastIndex = 0;\n\n for (index = match.index; index < string.length; index++) {\n switch (string.codePointAt(index)) {\n case 34: {\n // \"\n escape = \""\";\n break;\n }\n case 38: {\n // &\n escape = \"&\";\n break;\n }\n case 39: {\n // '\n escape = \"'\";\n break;\n }\n case 60: {\n // <\n escape = \"<\";\n break;\n }\n case 62: {\n // >\n escape = \">\";\n break;\n }\n default: {\n continue;\n }\n }\n\n if (lastIndex !== index) {\n html += string.slice(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex === index ? html : html + string.slice(lastIndex, index);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAa,oBAAb,MAA+B;;CAE7B,AAASA,sCAAsB,IAAI,IAAyB;;CAG5D,AAASC,qCAAqB,IAAI,IAAyB;;CAG3D,OAAO,UAAkB,SAAiC;EACxD,MAAM,cAAc,IAAI,IAAI,OAAO;EACnC,MAAM,kBAAkB,KAAKA,mBAAmB,IAAI,QAAQ,qBAAK,IAAI,IAAI;EAGzE,KAAK,MAAM,UAAU,iBACnB,IAAI,CAAC,YAAY,IAAI,MAAM,GACzB,KAAKD,oBAAoB,IAAI,MAAM,CAAC,EAAE,OAAO,QAAQ;EAKzD,KAAK,MAAM,UAAU,aAAa;GAChC,IAAI,CAAC,KAAKA,oBAAoB,IAAI,MAAM,GACtC,KAAKA,oBAAoB,IAAI,wBAAQ,IAAI,IAAI,CAAC;GAGhD,KAAKA,oBAAoB,IAAI,MAAM,CAAC,CAAE,IAAI,QAAQ;EACpD;EAEA,KAAKC,mBAAmB,IAAI,UAAU,WAAW;CACnD;;CAGA,OAAO,IAAkB;EAEvB,KAAKD,oBAAoB,OAAO,EAAE;EAGlC,MAAM,UAAU,KAAKC,mBAAmB,IAAI,EAAE;EAC9C,IAAI,SAAS;GACX,KAAK,MAAM,UAAU,SACnB,KAAKD,oBAAoB,IAAI,MAAM,CAAC,EAAE,OAAO,EAAE;GAGjD,KAAKC,mBAAmB,OAAO,EAAE;EACnC;CACF;;CAGA,aAAa,QAAqC;EAChD,OAAO,KAAKD,oBAAoB,IAAI,MAAM,qBAAK,IAAI,IAAI;CACzD;;CAGA,WAAW,UAAuC;EAChD,OAAO,KAAKC,mBAAmB,IAAI,QAAQ,qBAAK,IAAI,IAAI;CAC1D;AACF;;;;;;;;;;ACrDA,SAAgB,WAAW,QAAyB;CAClD,OAAO,2DAA2D,KAAK,MAAM;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,QAAQ,CAAC,EAClB,CAAC,KAAK;EACjC,OAAO,IAAI,KAAK,IAAI;EACpB,OAAO,CAAC,MAAM,IAAI;CACpB,QAAQ;EACN,OAAO,CAAC,sBAAM,IAAI,MAAM,0BAA0B,GAAG,CAAC;CACxD;AACF;AAEA,SAAgB,MAAM,KAAsB;CAC1C,OAAO,IAAI,WAAW,SAAS,KAAK,IAAI,WAAW,UAAU;AAC/D;;AAGA,SAAgB,YAA8B,QAAc;CAC1D,OAAO,OAAO,OAAO,OAAO,eAAe,MAAM,GAAQ,OAAO,0BAA0B,MAAM,CAAC;AACnG;AAEA,SAAgB,YAAY,SAAiB;CAC3C,OAAO,WAAW,MAAM,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,OAAO,KAAK;AACxD;AAEA,MAAM,kBAAkB;AAExB,SAAgB,WAAW,OAAe;CACxC,MAAM,SAAS;CACf,MAAM,QAAQ,gBAAgB,KAAK,MAAM;CAEzC,IAAI,CAAC,OACH,OAAO;CAGT,IAAI;CACJ,IAAI,OAAO;CAEX,IAAI,QAAQ;CACZ,IAAI,YAAY;CAEhB,KAAK,QAAQ,MAAM,OAAO,QAAQ,OAAO,QAAQ,SAAS;EACxD,QAAQ,OAAO,YAAY,KAAK,GAAhC;GACE,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,SACE;EAEJ;EAEA,IAAI,cAAc,OAChB,QAAQ,OAAO,MAAM,WAAW,KAAK;EAGvC,YAAY,QAAQ;EACpB,QAAQ;CACV;CAEA,OAAO,cAAc,QAAQ,OAAO,OAAO,OAAO,MAAM,WAAW,KAAK;AAC1E"}
|
|
1
|
+
{"version":3,"file":"utilities-CdEDdL4I.mjs","names":["#sourcesToImporters","#importerToSources","c","PostcssNode"],"sources":["../src/helpers/dependency-tracker.ts","../src/utilities/html-links.ts","../src/utilities/value-or-error.ts","../src/utilities/read-file.ts","../src/utilities/read-json-file.ts","../src/resolver/get-aliases.ts","../src/resolver/resolver.ts","../src/types/metadata.ts","../src/helpers/is-script-type.ts","../src/utilities/metadata-utilities.ts","../src/utilities/highlight-code.ts","../src/utilities/print-formatted-error.ts","../src/utilities/utilities.ts"],"sourcesContent":["/**\n * Tracks bidirectional dependencies between importers and their sources.\\\n * Handles reconciliation when dependencies change, so stale entries are automatically removed when an importer stops referencing\n * a source.\n */\nexport class DependencyTracker {\n /** Source → Set of importers that depend on it */\n readonly #sourcesToImporters = new Map<string, Set<string>>();\n\n /** Importer → Set of sources it depends on */\n readonly #importerToSources = new Map<string, Set<string>>();\n\n /** Updates the full set of sources for a given importer, reconciling any stale entries from previous calls. */\n update(importer: string, sources: Iterable<string>): void {\n const nextSources = new Set(sources);\n const previousSources = this.#importerToSources.get(importer) ?? new Set();\n\n // Remove importer from sources it no longer uses\n for (const source of previousSources) {\n if (!nextSources.has(source)) {\n this.#sourcesToImporters.get(source)?.delete(importer);\n }\n }\n\n // Add importer to newly referenced sources\n for (const source of nextSources) {\n if (!this.#sourcesToImporters.has(source)) {\n this.#sourcesToImporters.set(source, new Set());\n }\n\n this.#sourcesToImporters.get(source)!.add(importer);\n }\n\n this.#importerToSources.set(importer, nextSources);\n }\n\n /** Deletes all dependency data for a given id, whether it's acting as an importer, a source, or both (e.g. on file unlink). */\n delete(id: string): void {\n // id was a source — drop it entirely\n this.#sourcesToImporters.delete(id);\n\n // id was an importer — remove it from all sources it referenced\n const sources = this.#importerToSources.get(id);\n if (sources) {\n for (const source of sources) {\n this.#sourcesToImporters.get(source)?.delete(id);\n }\n\n this.#importerToSources.delete(id);\n }\n }\n\n /** Returns all importers that depend on a given source, or an empty set. */\n getImporters(source: string): ReadonlySet<string> {\n return this.#sourcesToImporters.get(source) ?? new Set();\n }\n\n /** Returns all sources that a given importer depends on, or an empty set. */\n getSources(importer: string): ReadonlySet<string> {\n return this.#importerToSources.get(importer) ?? new Set();\n }\n}\n","import { isAbsolute } from \"./path.ts\";\n\n/**\n * Checks if the link is an HTML link (not a file link)\n *\n * @param source - The link\n * @returns\n */\nexport function isHtmlLink(source: string): boolean {\n return /^(?:#|https?|mailto:|tel:|url\\(|ftp:|data:|javascript:)/i.test(source);\n}\n\nexport function isValidRelativePath(source: string): boolean {\n if (!source) return false;\n // if (source.includes(\" \")) return false;\n if (isAbsolute(source)) return false;\n return !isHtmlLink(source);\n}\n\nexport function splitHtmlLink(url: string): [string, string] {\n const qIndex = url.indexOf(\"?\");\n const hIndex = url.indexOf(\"#\");\n\n // Find the earliest query/hash delimiter\n let delimIndex = -1;\n\n if (qIndex !== -1 && hIndex !== -1) {\n delimIndex = Math.min(qIndex, hIndex);\n }\n //\n else if (qIndex !== -1) {\n delimIndex = qIndex;\n }\n //\n else if (hIndex !== -1) {\n delimIndex = hIndex;\n }\n\n if (delimIndex !== -1) {\n // If a '/' immediately precedes the delimiter, include it in the suffix\n const pathEnd = url[delimIndex - 1] === \"/\" ? delimIndex - 1 : delimIndex;\n return [url.slice(0, pathEnd), url.slice(pathEnd)];\n }\n\n // No query or hash — handle trailing slash\n if (url.endsWith(\"/\")) {\n // Bare \"/\" or \"./\" are kept whole\n if (url === \"/\" || url === \"./\") {\n return [url, \"\"];\n }\n\n return [url.slice(0, -1), \"/\"];\n }\n\n return [url, \"\"];\n}\n","export type ValueOrError<T> = [T, null] | [null, Error];\n\nfunction errorsWrapper<T, A extends unknown[]>(function_: (...arguments_: A) => T | Promise<T>) {\n return (...arguments_: A) => {\n try {\n const promiseOrValue = function_(...arguments_);\n if (isPromise<T>(promiseOrValue)) {\n return new Promise(resolve => {\n promiseOrValue\n .then(value => {\n resolve([value, null]);\n })\n .catch((error: unknown) => {\n resolve(handleError(error, function_.name));\n });\n });\n }\n return [promiseOrValue, null];\n } catch (error) {\n return handleError(error, function_.name);\n }\n };\n}\n\nfunction isPromise<T>(value: T | Promise<T>): value is Promise<T> {\n return (\n value &&\n typeof value === \"object\" &&\n \"then\" in value &&\n typeof value.then === \"function\" &&\n \"catch\" in value &&\n typeof value.catch === \"function\"\n );\n}\n\nexport function handleError<T>(error: unknown, functionName = \"\"): ValueOrError<T> {\n if (!error) {\n return [null, new Error(`[${functionName}] Unexpected error`)];\n }\n\n if (typeof error === \"string\") {\n return [null, new Error(error)];\n }\n\n if (error instanceof Error) {\n return [null, error];\n }\n\n // in some cases the error is not an instance of Error but an object\n if (typeof error === \"object\" && \"message\" in error && typeof error.message === \"string\") {\n return [null, new Error(error.message)];\n }\n\n return [null, new Error(`[${functionName}] Unexpected error`)];\n}\n\ninterface goErrorsI {\n <T, A extends unknown[]>(function_: (...arguments_: A) => Promise<T>): (...arguments_: A) => Promise<ValueOrError<T>>;\n <T, A extends unknown[]>(function_: (...arguments_: A) => T): (...arguments_: A) => ValueOrError<T>;\n}\n\nexport const valueOrError = errorsWrapper as unknown as goErrorsI;\n","import type { Abortable } from \"node:events\";\nimport { readFileSync } from \"node:fs\";\nimport type { ObjectEncodingOptions, OpenMode, PathLike, PathOrFileDescriptor } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport type { FileHandle } from \"node:fs/promises\";\n\nimport { handleError } from \"./value-or-error.ts\";\n\nimport type { ValueOrError } from \"./value-or-error.ts\";\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options?:\n | ({\n encoding?: null | undefined;\n flag?: OpenMode | undefined;\n } & Abortable)\n | null\n): Promise<ValueOrError<Buffer>>;\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options:\n | ({\n encoding: BufferEncoding;\n flag?: OpenMode | undefined;\n } & Abortable)\n | BufferEncoding\n): Promise<ValueOrError<string>>;\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options?:\n | (ObjectEncodingOptions &\n Abortable & {\n flag?: OpenMode | undefined;\n })\n | BufferEncoding\n | null\n): Promise<ValueOrError<string | Buffer>>;\n\nexport async function safeReadFile(\n path: PathLike | FileHandle,\n options?:\n | (ObjectEncodingOptions &\n Abortable & {\n flag?: OpenMode | undefined;\n })\n | BufferEncoding\n | null\n): Promise<ValueOrError<string | Buffer>> {\n try {\n const string_ = await readFile(path, options);\n return [string_, null];\n } catch (error) {\n return handleError(error, \"readFile\");\n }\n}\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options?: {\n encoding?: null | undefined;\n flag?: string | undefined;\n } | null\n): ValueOrError<NonSharedBuffer>;\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options:\n | BufferEncoding\n | {\n encoding: BufferEncoding;\n flag?: string | undefined;\n }\n): ValueOrError<string>;\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options?:\n | (ObjectEncodingOptions & {\n flag?: string | undefined;\n })\n | BufferEncoding\n | null\n): ValueOrError<string | NonSharedBuffer>;\n\nexport function safeReadFileSync(\n path: PathOrFileDescriptor,\n options?:\n | (ObjectEncodingOptions & {\n flag?: string | undefined;\n })\n | BufferEncoding\n | null\n): ValueOrError<string | NonSharedBuffer> {\n try {\n const string_ = readFileSync(path, options);\n return [string_, null];\n } catch (error) {\n return handleError(error, \"readFileSync\");\n }\n}\n","import json5 from \"json5\";\n\nimport { safeReadFileSync } from \"./read-file.ts\";\nimport { valueOrError } from \"./value-or-error.ts\";\n\nimport type { ValueOrError } from \"./value-or-error.ts\";\n\n/** Read a file and parse it as JSON safely. */\nexport function readJsonFile<T>(path: string, code?: string): ValueOrError<T> {\n if (!code) {\n const [fileString, readError] = safeReadFileSync(path, \"utf8\");\n if (readError) {\n return [null, readError];\n }\n\n code = fileString;\n }\n\n const [parsed, parseError] = valueOrError(json5.parse<T>)(code);\n if (parseError !== null) {\n return [null, parseError];\n }\n\n return [parsed, null];\n}\n","import { join } from \"../utilities/path.ts\";\nimport { readJsonFile } from \"../utilities/read-json-file.ts\";\n\nimport type { ValueOrError } from \"../utilities/value-or-error.ts\";\nimport type { CompilerOptions } from \"typescript\";\n\n/** Gets path aliases from `tsconfig.json` */\nexport function getPathAliases(root: string): ValueOrError<Record<string, string>> {\n const [tsconfig, tsconfigParseError] = readTsconfig(root);\n if (tsconfigParseError !== null) {\n return [null, tsconfigParseError];\n }\n\n const paths = tsconfig.paths ?? {};\n const alias: Record<string, string> = {};\n\n for (const key in paths) {\n const aliasName = key.replace(/\\*$/, \"\");\n const aliasPath = paths[key][0].replace(/\\*$/, \"\");\n alias[aliasName] = aliasPath;\n }\n\n return [alias, null];\n}\n\nfunction readTsconfig(root: string): ValueOrError<CompilerOptions> {\n const tsconfigPath = join(root, \"tsconfig.json\");\n\n const [tsconfig, tsconfigParseError] = readJsonFile<{ compilerOptions: CompilerOptions }>(tsconfigPath);\n if (tsconfigParseError !== null) {\n return [null, tsconfigParseError];\n }\n\n if (!tsconfig.compilerOptions) {\n return [null, new Error(\"[readTsconfig] No compilerOptions found in tsconfig.json\")];\n }\n\n return [tsconfig.compilerOptions, null];\n}\n","import { existsSync, statSync } from \"node:fs\";\nimport { ResolverFactory } from \"oxc-resolver\";\n\nimport { isValidRelativePath, splitHtmlLink } from \"../utilities/html-links.ts\";\nimport { Log } from \"../utilities/logger.ts\";\nimport { dirname, extname, isAbsolute, join, normalize, replaceExtension } from \"../utilities/path.ts\";\nimport { getPathAliases } from \"./get-aliases.ts\";\n\nconst nodeModulesResolver = new ResolverFactory({\n conditionNames: [\"browser\", \"import\", \"default\"],\n extensions: [\".js\", \".json\", \".node\", \".css\"],\n symlinks: false,\n});\n\ntype ResolveResult = {\n path: string;\n suffix: string;\n isDirAlias?: boolean;\n isFileAlias?: boolean;\n isPackage?: boolean;\n exists: boolean;\n};\n\nexport class Resolver {\n root: string;\n aliases: Record<string, string> = {};\n notFound: Set<string> = new Set();\n files: Set<string> = new Set();\n directories: Set<string> = new Set();\n\n static JS_EXTENSIONS = new Set([\".js\", \".mjs\", \".cjs\", \".jsx\", \".ts\", \".mts\", \".cts\", \".tsx\"]);\n static HTML_EXTENSIONS = new Set([\".html\", \".md\"]);\n\n constructor(root: string) {\n this.root = root;\n\n const [aliases] = getPathAliases(root);\n if (aliases) {\n this.aliases = aliases;\n }\n }\n\n resolve(sourceOrLink: string, filePath: string): ResolveResult | undefined {\n if (!isValidRelativePath(sourceOrLink)) return;\n\n const absFilePath = isAbsolute(filePath) ? filePath : join(this.root, filePath);\n const [source, suffix] = splitHtmlLink(sourceOrLink);\n\n // HTML links can be absolute E.g. /index.html\n if (isAbsolute(source)) {\n return;\n }\n\n const isDirectory = suffix === \"/\";\n\n // file or directory\n const absSource = join(dirname(absFilePath), source);\n const foundFile = this.findFile(absSource, isDirectory);\n if (foundFile) {\n return { path: foundFile, exists: true, suffix };\n }\n\n // path alias — restore the stripped trailing slash so \"~/\" aliases match\n const sourceForAlias = suffix === \"/\" ? source + \"/\" : source;\n const resolvedPathAlias = Resolver.resolvePathAlias(sourceForAlias, this.aliases);\n if (resolvedPathAlias) {\n const absSource = join(this.root, resolvedPathAlias);\n const foundFile = this.findFile(absSource, isDirectory);\n\n const isFileAlias = Object.hasOwn(this.aliases, sourceForAlias) && !sourceForAlias.endsWith(\"/\");\n\n // Warn once when a resolved source cannot be found on disk.\n if (!foundFile && !this.notFound.has(absSource.replace(/\\/$/, \"\"))) {\n this.notFound.add(absSource.replace(/\\/$/, \"\"));\n Log.warn(\n `[resolver] Source \"${sourceOrLink}\" found in \"${filePath}\" was resolved to \"${resolvedPathAlias}\", but the file is missing.`\n );\n }\n\n return { path: foundFile ?? absSource, exists: !!foundFile, suffix, isFileAlias, isDirAlias: !isFileAlias };\n }\n\n // node module package\n if (!source.startsWith(\".\")) {\n const resolverResult = nodeModulesResolver.sync(this.root, source);\n if (resolverResult.path) {\n return { path: resolverResult.path, suffix, exists: true, isPackage: true };\n }\n }\n\n // Not found, but its already a file path\n if (source.startsWith(\"./\") || source.startsWith(\"../\")) {\n // Warn once per missing source: it was resolved previously but the file cannot be found anymore.\n if (!this.notFound.has(absSource)) {\n this.notFound.add(absSource);\n Log.warn(`[resolver] Source \"${sourceOrLink}\" found in \"${filePath}\" points to a non-existent file.`);\n }\n\n return { path: absSource, suffix, exists: false };\n }\n }\n\n resolveAlias(source: string): string | undefined {\n return Resolver.resolvePathAlias(source, this.aliases);\n }\n\n normalize(filePath: string): string {\n return normalize(filePath);\n }\n\n static isFile(filePath: string): boolean {\n try {\n return statSync(filePath).isFile();\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n if (code === \"ENOENT\" || code === \"ENOTDIR\") {\n return false;\n }\n\n throw error;\n }\n }\n\n /** Aliased path to path */\n static resolvePathAlias(filePath: string, aliases: Record<string, string>): string | undefined {\n for (const [key, value] of Object.entries(aliases)) {\n // directory path alias\n if (key.endsWith(\"/\")) {\n if (!filePath.startsWith(key)) {\n continue;\n }\n\n return filePath.replace(key, () => value);\n }\n\n // file path alias\n if (filePath === key) {\n return value;\n }\n }\n }\n\n /** Path to aliased path */\n static resolveAliasPath(filePath: string, aliases: Record<string, string>): string {\n let shortest: string | undefined;\n\n for (const [key, value] of Object.entries(aliases)) {\n // directory path alias\n if (key.endsWith(\"/\")) {\n if (!filePath.startsWith(value)) {\n continue;\n }\n\n const aliased = filePath.replace(value, () => key);\n if (!shortest || aliased.length < shortest.length) {\n shortest = aliased;\n }\n continue;\n }\n\n // file path alias\n if (filePath === value && (!shortest || key.length < shortest.length)) {\n shortest = key;\n }\n }\n\n return shortest ?? filePath;\n }\n\n /** Path to aliased path */\n aliasPath(filePath: string): string {\n return Resolver.resolveAliasPath(filePath, this.aliases);\n }\n\n findFile(filePath: string, shouldCheckDirectory = false): string | undefined {\n // From cache\n if (this.files.has(filePath)) {\n return filePath;\n }\n\n // Exact match\n if (Resolver.isFile(filePath)) {\n this.files.add(filePath);\n return filePath;\n }\n\n const extension = extname(filePath);\n\n // No extension\n if (!extension) {\n // it might be a js file, html file, markdown file or just a directory\n for (const candidateExtension of [...Resolver.JS_EXTENSIONS, ...Resolver.HTML_EXTENSIONS]) {\n const candidate = replaceExtension(filePath, candidateExtension);\n\n if (this.files.has(candidate)) {\n return candidate;\n }\n\n if (Resolver.isFile(candidate)) {\n this.files.add(candidate);\n return candidate;\n }\n }\n\n // it might be index.html or index.md\n const withIndex = join(filePath, \"index\");\n\n for (const candidateExtension of Resolver.HTML_EXTENSIONS) {\n const candidate = replaceExtension(withIndex, candidateExtension);\n\n if (this.files.has(candidate)) {\n return candidate;\n }\n\n if (Resolver.isFile(candidate)) {\n this.files.add(candidate);\n return candidate;\n }\n }\n\n // directory\n if (shouldCheckDirectory) {\n if (this.directories.has(filePath)) {\n return filePath;\n }\n\n if (existsSync(filePath)) {\n this.directories.add(filePath);\n return filePath;\n }\n }\n\n return;\n }\n\n // main.js does not exist but main{.jsx, .ts, .tsx} may exist\n if (Resolver.JS_EXTENSIONS.has(extension)) {\n for (const jsExtension of Resolver.JS_EXTENSIONS) {\n const candidate = replaceExtension(filePath, jsExtension);\n\n if (Resolver.isFile(candidate)) {\n this.files.add(candidate);\n return candidate;\n }\n }\n\n return;\n }\n }\n}\n","import type { BabelAst, PostcssAst, Document, MarkdownAst } from \"@staticbolt/core\";\nimport type { WebAppManifest } from \"web-app-manifest\";\n\nexport const METADATA_TYPES = Object.freeze({\n Script: \"Script\",\n HTML: \"Html\",\n Markdown: \"Markdown\",\n CSS: \"Style\",\n SVG: \"Svg\",\n Package: \"Package\",\n TextAsset: \"TextAsset\",\n BinaryAsset: \"BinaryAsset\",\n WebAppManifest: \"WebAppManifest\",\n});\n\nexport type MetadataTypes = (typeof METADATA_TYPES)[keyof typeof METADATA_TYPES];\n\nexport interface MetadataBase {\n readonly type: `${Capitalize<string>}${string}`;\n\n /**\n * Relative path of the source file.\n *\n * Initially identical to `originalSource` when the metadata is created. During the build process, this value may change (e.g.,\n * if the file is moved to a different location and its links are rebased).\n */\n filePath: string;\n\n /**\n * Original relative path of the source file.\n *\n * Set when the metadata is created and never modified.\n */\n readonly id: string;\n\n readonly directDependencies: Set<string>;\n}\n\nexport interface ScriptMetadata extends MetadataBase {\n readonly type: (typeof METADATA_TYPES)[\"Script\"];\n\n /**\n * The Babel AST for the script.\n *\n * Mutated during the build process and always represents the file's current transformed state.\n */\n ast: BabelAst;\n\n /** Whether the script is a module or global */\n module: boolean;\n}\n\nexport interface StyleMetadata extends MetadataBase {\n readonly type: (typeof METADATA_TYPES)[\"CSS\"];\n\n /**\n * The PostCSS root after transformation\n *\n * Mutated during the build process and always represents the file's current transformed state.\n */\n ast: PostcssAst;\n}\n\nexport interface HtmlMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"HTML\"];\n\n /**\n * The HTML AST (root element).\n *\n * Mutated during the build process and always represents the file's current transformed state\n */\n ast: Document;\n\n /** The transformed ASTs from script tags. The key is the UUID */\n scriptsMetadataList: Map<string, ScriptMetadata>;\n\n /** The transformed ASTs from script tags. The key is the UUID */\n stylesMetadataList: Map<string, StyleMetadata>;\n}\n\nexport interface SvgMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"SVG\"];\n\n /**\n * The HTML AST (root element).\n *\n * Mutated during the build process and always represents the file's current transformed state\n */\n ast: Document;\n\n /** The transformed ASTs from script tags. The key is the UUID */\n stylesMetadataList: Map<string, StyleMetadata>;\n}\n\nexport interface MarkdownMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"Markdown\"];\n\n /**\n * Markdown tokens and frontmatter.\n *\n * Mutated during the build process and always represents the file's current transformed state\n */\n ast: MarkdownAst;\n}\n\nexport interface WebManifestMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"WebAppManifest\"];\n ast: WebAppManifest;\n}\n\nexport interface PackageMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"Package\"];\n\n /** Metadata code */\n code: string;\n\n packageName: string;\n}\n\nexport interface TextAssetMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"TextAsset\"];\n\n /** Metadata code */\n code: string;\n}\n\nexport interface BinaryAssetMetadata extends MetadataBase {\n type: (typeof METADATA_TYPES)[\"BinaryAsset\"];\n\n /** Raw binary content — images, fonts, wasm, etc. */\n data?: Uint8Array;\n}\n","const allowedTypes = new Set([\n \"module\",\n \"text/javascript\",\n \"application/javascript\",\n \"text/ecmascript\",\n \"application/ecmascript\",\n \"application/x-javascript\",\n]);\n\nexport function isScriptType(type: string | null) {\n return !type || allowedTypes.has(type.toLowerCase());\n}\n","import { isScriptType } from \"../helpers/is-script-type.ts\";\nimport { CUSTOM_ATTRIBUTES } from \"../types/common.ts\";\nimport { METADATA_TYPES } from \"../types/metadata.ts\";\n\nimport type {\n TextAssetMetadata,\n HtmlMetadata,\n MarkdownMetadata,\n MetadataBase,\n ScriptMetadata,\n StyleMetadata,\n SvgMetadata,\n WebManifestMetadata,\n BinaryAssetMetadata,\n PackageMetadata,\n HTMLElement,\n} from \"@staticbolt/core\";\n\nexport function isScriptMetadata(metadata: MetadataBase | undefined): metadata is ScriptMetadata {\n return metadata?.type === METADATA_TYPES.Script;\n}\n\nexport function isPackageMetadata(metadata: MetadataBase | undefined): metadata is PackageMetadata {\n return metadata?.type === METADATA_TYPES.Package;\n}\n\nexport function isHtmlMetadata(metadata: MetadataBase | undefined): metadata is HtmlMetadata {\n return metadata?.type === METADATA_TYPES.HTML;\n}\n\nexport function isStyleMetadata(metadata: MetadataBase | undefined): metadata is StyleMetadata {\n return metadata?.type === METADATA_TYPES.CSS;\n}\n\nexport function isSvgMetadata(metadata: MetadataBase | undefined): metadata is SvgMetadata {\n return metadata?.type === METADATA_TYPES.SVG;\n}\n\nexport function isMarkdownMetadata(metadata: MetadataBase | undefined): metadata is MarkdownMetadata {\n return metadata?.type === METADATA_TYPES.Markdown;\n}\n\nexport function isTextAssetMetadata(metadata: MetadataBase | undefined): metadata is TextAssetMetadata {\n return metadata?.type === METADATA_TYPES.TextAsset;\n}\n\nexport function isBinaryAssetMetadata(metadata: MetadataBase | undefined): metadata is BinaryAssetMetadata {\n return metadata?.type === METADATA_TYPES.BinaryAsset;\n}\n\nexport function isWebManifestMetadata(metadata: MetadataBase): metadata is WebManifestMetadata {\n return metadata.type === METADATA_TYPES.WebAppManifest;\n}\n\n/**\n * Returns script-related metadata entries.\n *\n * - If the input is ScriptMetadata, it returns it directly.\n * - If the input is HtmlMetadata, it scans <script> tags in the AST and resolves their associated ScriptMetadata using the metadata\n * ID attribute.\n */\nexport function filterScriptMetadata(metadata: MetadataBase) {\n const result: { metadata: ScriptMetadata; tag?: HTMLElement; htmlMetadata?: HtmlMetadata }[] = [];\n\n if (isScriptMetadata(metadata)) {\n result.push({ metadata });\n return result;\n }\n\n if (isHtmlMetadata(metadata)) {\n const scriptTags = metadata.ast.querySelectorAll(\"script\");\n\n for (const scriptTag of scriptTags) {\n const scriptId = scriptTag.getAttribute(CUSTOM_ATTRIBUTES.MetadataID);\n if (!scriptId) continue;\n\n const scriptType = scriptTag.getAttribute(\"type\");\n if (!isScriptType(scriptType)) {\n continue;\n }\n\n const scriptMetadata = metadata.scriptsMetadataList.get(scriptId);\n if (!scriptMetadata) continue;\n\n result.push({ metadata: scriptMetadata, htmlMetadata: metadata, tag: scriptTag });\n }\n }\n\n return result;\n}\n\n/**\n * Returns style-related metadata entries.\n *\n * - If the input is StyleMetadata, it returns it directly.\n * - If the input is HtmlMetadata, it scans <style> tags in the AST and resolves their associated StyleMetadata using the metadata\n * ID attribute.\n */\nexport function filterStyleMetadata(metadata: MetadataBase) {\n const result: { metadata: StyleMetadata; tag?: HTMLElement; htmlMetadata?: HtmlMetadata }[] = [];\n\n if (isStyleMetadata(metadata)) {\n result.push({ metadata });\n return result;\n }\n\n if (isHtmlMetadata(metadata)) {\n const styleTags = metadata.ast.querySelectorAll(\"style\");\n\n for (const styleTag of styleTags) {\n const styleId = styleTag.getAttribute(CUSTOM_ATTRIBUTES.MetadataID) || \"\";\n const styleMetadata = metadata.stylesMetadataList.get(styleId);\n if (!styleMetadata) continue;\n\n result.push({\n metadata: styleMetadata,\n htmlMetadata: metadata,\n tag: styleTag,\n });\n }\n }\n\n return result;\n}\n","import boxen from \"boxen\";\nimport chalk from \"chalk\";\nimport { common, createEmphasize } from \"emphasize\";\n\n/** - Highlight code string for terminal */\nexport function highlightCode(code: string, { lang = \"ts\", maxCodeLength = 170, maxLineLength = 110, boxed = true } = {}) {\n // Limit code length\n const isTruncated = code.length > maxCodeLength;\n if (isTruncated) code = code.slice(0, Math.max(0, maxCodeLength));\n\n // Limit line length and break on words\n const lines = code.split(\"\\n\");\n let withNewLines = \"\";\n for (const line of lines) {\n if (line.length <= maxLineLength) {\n withNewLines += line + \"\\n\";\n continue;\n }\n\n const words = line.split(\" \");\n let currentLine = \"\";\n for (const word of words) {\n if (currentLine.length + word.length <= maxLineLength) {\n currentLine += word + \" \";\n continue;\n }\n withNewLines += currentLine + \"\\n\";\n currentLine = word + \" \";\n }\n withNewLines += currentLine + \"\\n\";\n }\n\n // Highlight\n let highlighted = createEmphasize(common).highlight(lang, withNewLines.trim()).value;\n if (isTruncated) highlighted += \"\\n\" + chalk.inverse(\" ... \");\n\n if (!boxed) return highlighted;\n\n return boxen(highlighted, {\n padding: 0.5,\n borderStyle: \"round\",\n borderColor: \"white\",\n dimBorder: true,\n });\n}\n","import _generator from \"@babel/generator\";\nimport { NodeType } from \"@staticbolt/node-html-parser\";\nimport c from \"chalk\";\nimport { Node as PostcssNode } from \"postcss\";\n\nimport { CUSTOM_ATTRIBUTES } from \"../types/common.ts\";\nimport { highlightCode } from \"./highlight-code.ts\";\nimport { Log } from \"./logger.ts\";\n\nimport type { Node as BabelNode } from \"@babel/types\";\nimport type { Node as HtmlNode } from \"@staticbolt/node-html-parser\";\n\nconst generator = typeof _generator === \"function\" ? _generator : _generator.default;\n\ntype Node = BabelNode | PostcssNode | HtmlNode;\n\ninterface FormatErrorOptions {\n /** AST node (e.g., from Babel, PostCSS, or HTML) to convert and highlight */\n node?: Node;\n\n /** Source code to highlight (use instead of `node`) */\n code?: string;\n\n /** Language of the provided source code (required if `code` is set) */\n lang?: string;\n\n /** Path of the file where the error occurred */\n filePath?: string;\n\n /** Name of the function where the error originated */\n functionName?: string;\n\n level?: \"error\" | \"warning\";\n\n /** Function reference used to extract the function name */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function?: (...arguments_: any[]) => any;\n}\n\ntype MessageAndError = (string | Error)[];\n\nexport class PrintFormattedError {\n options: FormatErrorOptions = {};\n\n constructor(options: FormatErrorOptions = {}) {\n Object.assign(this.options, options);\n }\n\n static create(options: FormatErrorOptions = {}) {\n return new PrintFormattedError(options).print;\n }\n\n print = (...messageAndErrorWithOptions: [...MessageAndError] | [...MessageAndError, FormatErrorOptions]) => {\n const options: FormatErrorOptions = { ...this.options };\n\n const messagesArray: string[] = [];\n for (const item of messageAndErrorWithOptions) {\n // Msg\n if (typeof item === \"string\") {\n messagesArray.push(item);\n continue;\n }\n\n // Error\n if (item instanceof Error) {\n messagesArray.push(`\\n${item.message}`);\n continue;\n }\n\n // Options\n Object.assign(options, item);\n }\n\n let message = \"\";\n\n // First file path in one line without anything else to enable vscode link parsing\n if (options.filePath) {\n message += c.italic(options.filePath) + \"\\n\";\n }\n\n // Then the function name before the messages\n const functionName = options.function?.name ?? options.functionName;\n if (functionName) {\n message += c.dim(`[${functionName}] `);\n }\n\n // Then the messages (spaced)\n message += messagesArray.join(\" \");\n\n // Now the code\n const codeFromNode = options.node && nodeToString(options.node);\n const code = options.code ?? codeFromNode?.code;\n const lang = options.lang ?? codeFromNode?.lang;\n const codeBox = code && lang ? highlightCode(code, { lang }) : \"\";\n if (codeBox) {\n message += \"\\n\" + codeBox;\n }\n\n if (options.level === \"warning\") {\n Log.warn(message);\n return;\n }\n\n Log.error(message);\n };\n}\n\nexport const printFmtError = PrintFormattedError.create();\n\nfunction isHtmlNode(node: Node): node is HtmlNode {\n return \"nodeType\" in node && typeof node.nodeType === \"number\";\n}\n\nfunction isPostcssNode(node: Node): node is PostcssNode {\n return node instanceof PostcssNode;\n}\n\nfunction nodeToString(node: Node): { code: string; lang: string } {\n if (isHtmlNode(node)) {\n const clone = node.clone();\n if (clone.nodeType === NodeType.ELEMENT_NODE) {\n clone.removeAttribute(CUSTOM_ATTRIBUTES.MetadataID);\n }\n\n return { code: clone.toString(), lang: \"html\" };\n }\n\n if (isPostcssNode(node)) {\n return { code: node.toString(), lang: \"css\" };\n }\n\n return { code: generator(node, { jsescOption: { minimal: true } }).code, lang: \"js\" };\n}\n","import { createHash } from \"node:crypto\";\n\nimport { Log } from \"./logger.ts\";\n\nimport type { ValueOrError } from \"./value-or-error.ts\";\n\n/** `process.stdout.write` */\nexport function print(...input: string[]) {\n process.stdout.write(input.join(\" \"));\n}\n\n/** - Clear the line in the terminal */\nexport function clearLn() {\n if (!(\"clearLine\" in process.stdout && typeof process.stdout.clearLine === \"function\")) {\n return;\n }\n\n process.stdout.clearLine(0);\n process.stdout.cursorTo(0);\n}\n\n/** Used to assign a computed value to a variable */\nexport function assign<T>(function_: () => T): T {\n return function_();\n}\n\n/** Check if the value is an object */\nexport function isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && !Array.isArray(value) && value !== null;\n}\n\nexport function kebabToCamelCase(string_: string): string {\n return string_.replace(/-([a-z])/g, (_, char) => (char as string).toUpperCase());\n}\n\nexport function camelCaseToKebabCase(string_: string): string {\n return string_.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\nexport function capitalize(string_: string): string {\n return string_.charAt(0).toUpperCase() + string_.slice(1);\n}\n\n/**\n * - Get line and column number from first match index\n *\n * @param code - Code string\n * @param matchIndex - Matching index\n * @returns - `[line, column]`\n */\nexport function getLineColumn(code: string, matchIndex: number): [number, number] {\n let lineNumber = 1;\n let columnNumber = 1;\n\n for (let index = 0; index < matchIndex; index++) {\n if (code[index] === \"\\n\") {\n lineNumber++;\n columnNumber = 1; // Reset column at each new line\n continue;\n }\n\n columnNumber++;\n }\n\n return [lineNumber, columnNumber];\n}\n\n/** - Human readable bytes, E.g: `1024 => 1KB` */\nexport function humanReadableBytes(bytes: number): string {\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n let unitIndex = 0;\n while (bytes >= 1024 && unitIndex < units.length - 1) {\n bytes /= 1024;\n unitIndex++;\n }\n return `${bytes.toFixed(2)} ${units[unitIndex]}`;\n}\n\nexport function bytesToKB(bytes: number): number {\n return bytes / 1024;\n}\n\n/** - Clamp a numeric value between min and max values. */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nexport function isDefined<T>(value: T | undefined): value is T {\n return value !== undefined;\n}\n\n/**\n * Merges all entries from `source` into `target`, mutating `target` in place.\n *\n * - Existing keys in `target` are overwritten by `source` values.\n * - Values are **not** cloned — object references are shared between both maps after the merge.\n *\n * @param target - The map to be mutated with new/updated entries.\n * @param source - The map whose entries are read and applied to `target`.\n * @returns The mutated `target` map.\n */\nexport function mergeMaps<K, V>(target: Map<K, V>, source: Map<K, V>): Map<K, V> {\n for (const [key, value] of source) {\n target.set(key, value);\n }\n return target;\n}\n\nconst cached = new Map<string, string>();\n\n/** - Download from CDN */\nexport async function downloadContent(url: string): Promise<ValueOrError<string>> {\n if (cached.has(url)) {\n return [cached.get(url)!, null];\n }\n\n const headers = {\n \"User-Agent\":\n \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36\",\n Accept: \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\n Referer: url,\n };\n\n try {\n Log.info(`Downloading content from \"${url}\"`);\n const response = await fetch(url, { headers });\n const text = await response.text();\n cached.set(url, text);\n return [text, null];\n } catch {\n return [null, new Error(\"Error downloading q: \" + url)];\n }\n}\n\nexport function isURL(url: string): boolean {\n return url.startsWith(\"http://\") || url.startsWith(\"https://\");\n}\n\n/** Creates a shallow clone of an object while preserving its prototype and property descriptors. */\nexport function cloneObject<T extends object>(object: T): T {\n return Object.create(Object.getPrototypeOf(object) as T, Object.getOwnPropertyDescriptors(object)) as T;\n}\n\nexport function hashContent(content: string) {\n return createHash(\"sha1\").update(content).digest(\"hex\"); // full 40 chars\n}\n\nconst matchHtmlRegExp = /[\"'&<>]/;\n\nexport function escapeHtml(input: string) {\n const string = input;\n const match = matchHtmlRegExp.exec(string);\n\n if (!match) {\n return string;\n }\n\n let escape;\n let html = \"\";\n // eslint-disable-next-line no-useless-assignment\n let index = 0;\n let lastIndex = 0;\n\n for (index = match.index; index < string.length; index++) {\n switch (string.codePointAt(index)) {\n case 34: {\n // \"\n escape = \""\";\n break;\n }\n case 38: {\n // &\n escape = \"&\";\n break;\n }\n case 39: {\n // '\n escape = \"'\";\n break;\n }\n case 60: {\n // <\n escape = \"<\";\n break;\n }\n case 62: {\n // >\n escape = \">\";\n break;\n }\n default: {\n continue;\n }\n }\n\n if (lastIndex !== index) {\n html += string.slice(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex === index ? html : html + string.slice(lastIndex, index);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAa,oBAAb,MAA+B;;CAE7B,AAASA,sCAAsB,IAAI,IAAyB;;CAG5D,AAASC,qCAAqB,IAAI,IAAyB;;CAG3D,OAAO,UAAkB,SAAiC;EACxD,MAAM,cAAc,IAAI,IAAI,OAAO;EACnC,MAAM,kBAAkB,KAAKA,mBAAmB,IAAI,QAAQ,qBAAK,IAAI,IAAI;EAGzE,KAAK,MAAM,UAAU,iBACnB,IAAI,CAAC,YAAY,IAAI,MAAM,GACzB,KAAKD,oBAAoB,IAAI,MAAM,CAAC,EAAE,OAAO,QAAQ;EAKzD,KAAK,MAAM,UAAU,aAAa;GAChC,IAAI,CAAC,KAAKA,oBAAoB,IAAI,MAAM,GACtC,KAAKA,oBAAoB,IAAI,wBAAQ,IAAI,IAAI,CAAC;GAGhD,KAAKA,oBAAoB,IAAI,MAAM,CAAC,CAAE,IAAI,QAAQ;EACpD;EAEA,KAAKC,mBAAmB,IAAI,UAAU,WAAW;CACnD;;CAGA,OAAO,IAAkB;EAEvB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QAAQ,SAAS;EACxD,QAAQ,OAAO,YAAY,KAAK,GAAhC;GACE,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,KAAK;IAEH,SAAS;IACT;GAEF,SACE;EAEJ;EAEA,IAAI,cAAc,OAChB,QAAQ,OAAO,MAAM,WAAW,KAAK;EAGvC,YAAY,QAAQ;EACpB,QAAQ;CACV;CAEA,OAAO,cAAc,QAAQ,OAAO,OAAO,OAAO,MAAM,WAAW,KAAK;AAC1E"}
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@staticbolt/core",
|
|
3
3
|
"description": "Static website builder",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.17",
|
|
5
5
|
"author": "Ahmed ALABSI",
|
|
6
6
|
"bin": {
|
|
7
7
|
"staticbolt": "lib/cli/index.mjs"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@babel/core": "^7.29.7",
|
|
11
|
-
"@babel/generator": "^7.29.
|
|
12
|
-
"@babel/parser": "^7.29.
|
|
11
|
+
"@babel/generator": "^7.29.8",
|
|
12
|
+
"@babel/parser": "^7.29.8",
|
|
13
13
|
"@babel/preset-env": "^7.29.7",
|
|
14
14
|
"@babel/preset-typescript": "^7.29.7",
|
|
15
|
-
"@babel/traverse": "^7.29.
|
|
16
|
-
"@babel/types": "^7.29.
|
|
17
|
-
"@fastify/static": "^
|
|
15
|
+
"@babel/traverse": "^7.29.8",
|
|
16
|
+
"@babel/types": "^7.29.8",
|
|
17
|
+
"@fastify/static": "^10.1.2",
|
|
18
18
|
"@fastify/url-data": "^6.0.3",
|
|
19
|
-
"@swc/core": "^1.15.
|
|
19
|
+
"@swc/core": "^1.15.47",
|
|
20
20
|
"@types/web-app-manifest": "^1.0.9",
|
|
21
21
|
"babel-plugin-transform-define": "^2.1.4",
|
|
22
22
|
"boxen": "^8.0.1",
|
|
23
|
-
"browserslist": "^4.28.
|
|
23
|
+
"browserslist": "^4.28.7",
|
|
24
24
|
"canvas": "^3.2.3",
|
|
25
|
-
"chalk": "^
|
|
25
|
+
"chalk": "^6.0.0",
|
|
26
26
|
"chokidar": "^5.0.0",
|
|
27
27
|
"comment-parser": "^1.4.7",
|
|
28
28
|
"cssnano": "^8.0.2",
|
|
29
29
|
"cssnano-preset-default": "^8.0.2",
|
|
30
30
|
"emphasize": "^7.0.0",
|
|
31
31
|
"esbuild": "^0.28.1",
|
|
32
|
-
"fastify": "^5.
|
|
32
|
+
"fastify": "^5.11.0",
|
|
33
33
|
"fontkit": "^2.0.4",
|
|
34
34
|
"glob": "^13.0.6",
|
|
35
35
|
"html-minifier-terser": "^7.2.0",
|
|
36
|
-
"jsdom": "^
|
|
36
|
+
"jsdom": "^30.0.1",
|
|
37
37
|
"json5": "^2.2.3",
|
|
38
|
-
"lightningcss": "^1.
|
|
38
|
+
"lightningcss": "^1.33.0",
|
|
39
39
|
"micromatch": "^4.0.8",
|
|
40
|
-
"oxc-resolver": "^11.
|
|
40
|
+
"oxc-resolver": "^11.24.2",
|
|
41
41
|
"patch-package": "^8.0.1",
|
|
42
|
-
"postcss": "^8.5.
|
|
42
|
+
"postcss": "^8.5.25",
|
|
43
43
|
"postcss-import": "^16.1.1",
|
|
44
44
|
"postcss-load-config": "^6.0.1",
|
|
45
|
-
"prettier": "^3.9.
|
|
45
|
+
"prettier": "^3.9.6",
|
|
46
46
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
47
47
|
"rehype-external-links": "^3.0.0",
|
|
48
48
|
"rehype-slug": "^6.0.0",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"remark-frontmatter": "^5.0.0",
|
|
52
52
|
"remark-gfm": "^4.0.1",
|
|
53
53
|
"remark-rehype": "^11.1.2",
|
|
54
|
-
"remark-smartypants": "^3.0.
|
|
55
|
-
"sharp": "^0.35.
|
|
56
|
-
"svgo": "^4.0.
|
|
57
|
-
"terser": "^5.
|
|
54
|
+
"remark-smartypants": "^3.0.3",
|
|
55
|
+
"sharp": "^0.35.3",
|
|
56
|
+
"svgo": "^4.0.2",
|
|
57
|
+
"terser": "^5.49.0",
|
|
58
58
|
"ttf2woff2": "^8.0.1",
|
|
59
59
|
"workbox-build": "^7.4.1",
|
|
60
|
-
"ws": "^8.21.
|
|
60
|
+
"ws": "^8.21.1",
|
|
61
61
|
"yaml": "^2.9.0",
|
|
62
62
|
"zod": "^4.4.3"
|
|
63
63
|
},
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/postcss-import": "^14.0.3",
|
|
75
75
|
"@types/unist": "^3.0.3",
|
|
76
76
|
"@types/ws": "^8.18.1",
|
|
77
|
-
"baseline-browser-mapping": "^2.
|
|
77
|
+
"baseline-browser-mapping": "^2.11.9",
|
|
78
78
|
"vscode-html-languageservice": "^5.6.2"
|
|
79
79
|
},
|
|
80
80
|
"exports": {
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
],
|
|
98
98
|
"license": "MIT",
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@staticbolt/args-parser": "1.0.0-beta.
|
|
101
|
-
"@staticbolt/node-html-parser": "1.0.0-beta.
|
|
100
|
+
"@staticbolt/args-parser": "1.0.0-beta.17",
|
|
101
|
+
"@staticbolt/node-html-parser": "1.0.0-beta.17"
|
|
102
102
|
},
|
|
103
103
|
"private": false,
|
|
104
104
|
"scripts": {
|