fln 1.1.2 → 1.1.3
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/dist/api/fln.d.ts +1 -1
- package/dist/api/fln.js +3 -3
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +2 -2
- package/dist/api/types.d.ts +1 -1
- package/dist/cli/commandLine.js +6 -6
- package/dist/cli/help.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/output/components/breakdown.js +2 -2
- package/dist/cli/output/components/errors.js +1 -1
- package/dist/cli/output/components/index.d.ts +5 -5
- package/dist/cli/output/components/index.js +5 -5
- package/dist/cli/output/components/progressBar.js +1 -1
- package/dist/cli/output/components/summary.js +2 -2
- package/dist/cli/output/components/warnings.js +1 -1
- package/dist/cli/output/index.d.ts +4 -4
- package/dist/cli/output/index.js +4 -4
- package/dist/cli/output/renderer.d.ts +3 -3
- package/dist/cli/output/renderer.js +3 -3
- package/dist/cli/output/styles.d.ts +7 -7
- package/dist/config/index.d.ts +5 -5
- package/dist/config/index.js +5 -5
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/resolver.d.ts +1 -1
- package/dist/config/resolver.js +3 -3
- package/dist/config/types.d.ts +1 -1
- package/dist/core/ignoreMatcher.d.ts +1 -1
- package/dist/core/index.d.ts +7 -7
- package/dist/core/index.js +7 -7
- package/dist/core/renderOutput.d.ts +2 -2
- package/dist/core/renderOutput.js +4 -4
- package/dist/core/renderTree.d.ts +1 -1
- package/dist/core/scanTree.d.ts +2 -2
- package/dist/core/scanTree.js +1 -1
- package/dist/core/statsCollector.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/infra/index.d.ts +6 -6
- package/dist/infra/index.js +6 -6
- package/dist/infra/logger.d.ts +1 -1
- package/dist/infra/logger.js +1 -1
- package/dist/infra/outputWriter.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/api/fln.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { FlnOptions, FlnResult } from "./types";
|
|
1
|
+
import type { FlnOptions, FlnResult } from "./types.js";
|
|
2
2
|
export declare function fln(options?: FlnOptions): Promise<FlnResult>;
|
package/dist/api/fln.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relative, resolve, sep } from "node:path";
|
|
2
|
-
import { defaultConfigFileName, getProjectMetadata, loadConfigFile, normalizeConfigFile, resolveConfig, resolveOutputPath } from "../config";
|
|
3
|
-
import { parseByteSize, scanTree, writeOutput } from "../core";
|
|
4
|
-
import { createLogger } from "../infra";
|
|
2
|
+
import { defaultConfigFileName, getProjectMetadata, loadConfigFile, normalizeConfigFile, resolveConfig, resolveOutputPath } from "../config/index.js";
|
|
3
|
+
import { parseByteSize, scanTree, writeOutput } from "../core/index.js";
|
|
4
|
+
import { createLogger } from "../infra/index.js";
|
|
5
5
|
export async function fln(options = {}) {
|
|
6
6
|
const rootDirectory = resolve(options.rootDirectory ?? process.cwd());
|
|
7
7
|
const projectMetadata = await getProjectMetadata(rootDirectory);
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./fln";
|
|
2
|
-
export * from "./types";
|
|
1
|
+
export * from "./fln.js";
|
|
2
|
+
export * from "./types.js";
|
package/dist/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./fln";
|
|
2
|
-
export * from "./types";
|
|
1
|
+
export * from "./fln.js";
|
|
2
|
+
export * from "./types.js";
|
package/dist/api/types.d.ts
CHANGED
package/dist/cli/commandLine.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { parseArgs } from "node:util";
|
|
3
|
-
import { fln } from "../api";
|
|
4
|
-
import { collectExtensionStats, collectProcessedFiles, parseByteSize } from "../core";
|
|
5
|
-
import { getTerminalInfo, incrementUsageCount, shouldShowSponsorMessage, shouldUseColors } from "../infra";
|
|
6
|
-
import { VERSION } from "../version";
|
|
7
|
-
import { formatHelpMessage } from "./help";
|
|
8
|
-
import { OutputRenderer } from "./output";
|
|
3
|
+
import { fln } from "../api/index.js";
|
|
4
|
+
import { collectExtensionStats, collectProcessedFiles, parseByteSize } from "../core/index.js";
|
|
5
|
+
import { getTerminalInfo, incrementUsageCount, shouldShowSponsorMessage, shouldUseColors } from "../infra/index.js";
|
|
6
|
+
import { VERSION } from "../version.js";
|
|
7
|
+
import { formatHelpMessage } from "./help.js";
|
|
8
|
+
import { OutputRenderer } from "./output/index.js";
|
|
9
9
|
function isCI() {
|
|
10
10
|
return Boolean(process.env.CI ||
|
|
11
11
|
process.env.CONTINUOUS_INTEGRATION ||
|
package/dist/cli/help.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { applyColor, colors } from "./output";
|
|
1
|
+
import { applyColor, colors } from "./output/index.js";
|
|
2
2
|
export function formatHelpMessage(useAnsi) {
|
|
3
3
|
const bold = (text) => applyColor(text, colors.bold, useAnsi);
|
|
4
4
|
const dim = (text) => applyColor(text, colors.dim, useAnsi);
|
package/dist/cli/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatFileCount } from "../formatter";
|
|
2
|
-
import { applyColor, colors, symbols } from "../styles";
|
|
1
|
+
import { formatFileCount } from "../formatter.js";
|
|
2
|
+
import { applyColor, colors, symbols } from "../styles.js";
|
|
3
3
|
export function renderBreakdown(stats, useColors) {
|
|
4
4
|
const entries = Array.from(stats.entries())
|
|
5
5
|
.sort((a, b) => b[1] - a[1])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./breakdown";
|
|
2
|
-
export * from "./errors";
|
|
3
|
-
export * from "./progressBar";
|
|
4
|
-
export * from "./summary";
|
|
5
|
-
export * from "./warnings";
|
|
1
|
+
export * from "./breakdown.js";
|
|
2
|
+
export * from "./errors.js";
|
|
3
|
+
export * from "./progressBar.js";
|
|
4
|
+
export * from "./summary.js";
|
|
5
|
+
export * from "./warnings.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./breakdown";
|
|
2
|
-
export * from "./errors";
|
|
3
|
-
export * from "./progressBar";
|
|
4
|
-
export * from "./summary";
|
|
5
|
-
export * from "./warnings";
|
|
1
|
+
export * from "./breakdown.js";
|
|
2
|
+
export * from "./errors.js";
|
|
3
|
+
export * from "./progressBar.js";
|
|
4
|
+
export * from "./summary.js";
|
|
5
|
+
export * from "./warnings.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { basename } from "node:path";
|
|
2
|
-
import { formatFileCount, formatTokenCount } from "../formatter";
|
|
3
|
-
import { applyColor, colors, symbols } from "../styles";
|
|
2
|
+
import { formatFileCount, formatTokenCount } from "../formatter.js";
|
|
3
|
+
import { applyColor, colors, symbols } from "../styles.js";
|
|
4
4
|
export function renderSummary(data) {
|
|
5
5
|
const fileName = basename(data.outputPath);
|
|
6
6
|
const successSymbol = applyColor(symbols.success, colors.success, data.useColors);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
|
-
export * from "./formatter";
|
|
3
|
-
export * from "./renderer";
|
|
4
|
-
export * from "./styles";
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./formatter.js";
|
|
3
|
+
export * from "./renderer.js";
|
|
4
|
+
export * from "./styles.js";
|
package/dist/cli/output/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
|
-
export * from "./formatter";
|
|
3
|
-
export * from "./renderer";
|
|
4
|
-
export * from "./styles";
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./formatter.js";
|
|
3
|
+
export * from "./renderer.js";
|
|
4
|
+
export * from "./styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FlnResult } from "../../api";
|
|
2
|
-
import type { LogLevel } from "../../core";
|
|
3
|
-
import { ProgressBar } from "./components";
|
|
1
|
+
import type { FlnResult } from "../../api/index.js";
|
|
2
|
+
import type { LogLevel } from "../../core/index.js";
|
|
3
|
+
import { ProgressBar } from "./components/index.js";
|
|
4
4
|
export type RendererOptions = {
|
|
5
5
|
logLevel: LogLevel;
|
|
6
6
|
useAnsi: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProgressBar, renderBreakdown, renderErrors, renderSummary, renderWarnings } from "./components";
|
|
2
|
-
import { formatTime } from "./formatter";
|
|
3
|
-
import { applyColor, colors, symbols } from "./styles";
|
|
1
|
+
import { ProgressBar, renderBreakdown, renderErrors, renderSummary, renderWarnings } from "./components/index.js";
|
|
2
|
+
import { formatTime } from "./formatter.js";
|
|
3
|
+
import { applyColor, colors, symbols } from "./styles.js";
|
|
4
4
|
export class OutputRenderer {
|
|
5
5
|
#logLevel;
|
|
6
6
|
#useColors;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export type StyleFunction = (text: number | string) => string;
|
|
2
2
|
export declare const colors: {
|
|
3
|
-
readonly success: import("picocolors/types").Formatter;
|
|
4
|
-
readonly warning: import("picocolors/types").Formatter;
|
|
5
|
-
readonly error: import("picocolors/types").Formatter;
|
|
6
|
-
readonly info: import("picocolors/types").Formatter;
|
|
7
|
-
readonly dim: import("picocolors/types").Formatter;
|
|
8
|
-
readonly bold: import("picocolors/types").Formatter;
|
|
9
|
-
readonly reset: import("picocolors/types").Formatter;
|
|
3
|
+
readonly success: import("picocolors/types.js").Formatter;
|
|
4
|
+
readonly warning: import("picocolors/types.js").Formatter;
|
|
5
|
+
readonly error: import("picocolors/types.js").Formatter;
|
|
6
|
+
readonly info: import("picocolors/types.js").Formatter;
|
|
7
|
+
readonly dim: import("picocolors/types.js").Formatter;
|
|
8
|
+
readonly bold: import("picocolors/types.js").Formatter;
|
|
9
|
+
readonly reset: import("picocolors/types.js").Formatter;
|
|
10
10
|
};
|
|
11
11
|
export declare const symbols: {
|
|
12
12
|
readonly success: "✓";
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./defaults";
|
|
2
|
-
export * from "./loader";
|
|
3
|
-
export * from "./resolver";
|
|
4
|
-
export * from "./types";
|
|
5
|
-
export * from "./utils";
|
|
1
|
+
export * from "./defaults.js";
|
|
2
|
+
export * from "./loader.js";
|
|
3
|
+
export * from "./resolver.js";
|
|
4
|
+
export * from "./types.js";
|
|
5
|
+
export * from "./utils.js";
|
package/dist/config/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./defaults";
|
|
2
|
-
export * from "./loader";
|
|
3
|
-
export * from "./resolver";
|
|
4
|
-
export * from "./types";
|
|
5
|
-
export * from "./utils";
|
|
1
|
+
export * from "./defaults.js";
|
|
2
|
+
export * from "./loader.js";
|
|
3
|
+
export * from "./resolver.js";
|
|
4
|
+
export * from "./types.js";
|
|
5
|
+
export * from "./utils.js";
|
package/dist/config/loader.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RawConfigFile } from "./types";
|
|
1
|
+
import type { RawConfigFile } from "./types.js";
|
|
2
2
|
export declare function loadConfigFile(configPath: string): Promise<RawConfigFile>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FlnConfig, RawConfigFile } from "./types";
|
|
1
|
+
import type { FlnConfig, RawConfigFile } from "./types.js";
|
|
2
2
|
type ConfigOverrides = Partial<Pick<FlnConfig, "banner" | "excludePatterns" | "followSymlinks" | "footer" | "generatedDate" | "includeContents" | "includeHidden" | "includePatterns" | "includeTree" | "logLevel" | "maximumFileSizeBytes" | "maximumTotalSizeBytes" | "outputFile" | "overwrite" | "useAnsi" | "useGitignore">> & Partial<{
|
|
3
3
|
format: string;
|
|
4
4
|
}>;
|
package/dist/config/resolver.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { parseByteSize } from "../core";
|
|
2
|
-
import { parseGeneratedDate } from "../infra";
|
|
3
|
-
import { defaultMaximumFileSizeBytes } from "./defaults";
|
|
1
|
+
import { parseByteSize } from "../core/index.js";
|
|
2
|
+
import { parseGeneratedDate } from "../infra/index.js";
|
|
3
|
+
import { defaultMaximumFileSizeBytes } from "./defaults.js";
|
|
4
4
|
function parseOptionalSize(value) {
|
|
5
5
|
if (value === undefined)
|
|
6
6
|
return undefined;
|
package/dist/config/types.d.ts
CHANGED
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./ignoreMatcher";
|
|
2
|
-
export * from "./renderOutput";
|
|
3
|
-
export * from "./renderTree";
|
|
4
|
-
export * from "./scanTree";
|
|
5
|
-
export * from "./size";
|
|
6
|
-
export * from "./statsCollector";
|
|
7
|
-
export * from "./types";
|
|
1
|
+
export * from "./ignoreMatcher.js";
|
|
2
|
+
export * from "./renderOutput.js";
|
|
3
|
+
export * from "./renderTree.js";
|
|
4
|
+
export * from "./scanTree.js";
|
|
5
|
+
export * from "./size.js";
|
|
6
|
+
export * from "./statsCollector.js";
|
|
7
|
+
export * from "./types.js";
|
package/dist/core/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./ignoreMatcher";
|
|
2
|
-
export * from "./renderOutput";
|
|
3
|
-
export * from "./renderTree";
|
|
4
|
-
export * from "./scanTree";
|
|
5
|
-
export * from "./size";
|
|
6
|
-
export * from "./statsCollector";
|
|
7
|
-
export * from "./types";
|
|
1
|
+
export * from "./ignoreMatcher.js";
|
|
2
|
+
export * from "./renderOutput.js";
|
|
3
|
+
export * from "./renderTree.js";
|
|
4
|
+
export * from "./scanTree.js";
|
|
5
|
+
export * from "./size.js";
|
|
6
|
+
export * from "./statsCollector.js";
|
|
7
|
+
export * from "./types.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { FlnConfig } from "../config";
|
|
2
|
-
import type { ScanResult } from "./types";
|
|
1
|
+
import type { FlnConfig } from "../config/index.js";
|
|
2
|
+
import type { ScanResult } from "./types.js";
|
|
3
3
|
export declare function writeOutput(result: ScanResult, config: FlnConfig): Promise<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createReadStream } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { extname, join } from "node:path";
|
|
4
|
-
import { createOutputWriter, formatDateTime } from "../infra";
|
|
5
|
-
import { VERSION } from "../version";
|
|
6
|
-
import { renderTree } from "./renderTree";
|
|
7
|
-
import { formatByteSize } from "./size";
|
|
4
|
+
import { createOutputWriter, formatDateTime } from "../infra/index.js";
|
|
5
|
+
import { VERSION } from "../version.js";
|
|
6
|
+
import { renderTree } from "./renderTree.js";
|
|
7
|
+
import { formatByteSize } from "./size.js";
|
|
8
8
|
function getLanguageFromFilename(fileName) {
|
|
9
9
|
const extension = extname(fileName).replace(".", "");
|
|
10
10
|
return extension === "" ? "txt" : extension;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { FileNode } from "./types";
|
|
1
|
+
import type { FileNode } from "./types.js";
|
|
2
2
|
export declare function renderTree(root: FileNode): string;
|
package/dist/core/scanTree.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Logger } from "../infra";
|
|
2
|
-
import type { ScanOptions, ScanResult } from "./types";
|
|
1
|
+
import type { Logger } from "../infra/index.js";
|
|
2
|
+
import type { ScanOptions, ScanResult } from "./types.js";
|
|
3
3
|
export declare function scanTree(options: ScanOptions, logger: Logger): Promise<ScanResult>;
|
package/dist/core/scanTree.js
CHANGED
|
@@ -2,7 +2,7 @@ import { lstat, open, readdir, readlink, realpath, stat } from "node:fs/promises
|
|
|
2
2
|
import { cpus } from "node:os";
|
|
3
3
|
import { relative, sep } from "node:path";
|
|
4
4
|
import ignore from "ignore";
|
|
5
|
-
import { IgnoreMatcher } from "./ignoreMatcher";
|
|
5
|
+
import { IgnoreMatcher } from "./ignoreMatcher.js";
|
|
6
6
|
function normalizePathSegment(pathSegment) {
|
|
7
7
|
if (sep === "/")
|
|
8
8
|
return pathSegment;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./core";
|
|
3
|
-
export * from "./version";
|
|
1
|
+
export * from "./api/index.js";
|
|
2
|
+
export * from "./core/index.js";
|
|
3
|
+
export * from "./version.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./core";
|
|
3
|
-
export * from "./version";
|
|
1
|
+
export * from "./api/index.js";
|
|
2
|
+
export * from "./core/index.js";
|
|
3
|
+
export * from "./version.js";
|
package/dist/infra/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./countTokens";
|
|
2
|
-
export * from "./datetime";
|
|
3
|
-
export * from "./logger";
|
|
4
|
-
export * from "./outputWriter";
|
|
5
|
-
export * from "./terminal";
|
|
6
|
-
export * from "./usageTracker";
|
|
1
|
+
export * from "./countTokens.js";
|
|
2
|
+
export * from "./datetime.js";
|
|
3
|
+
export * from "./logger.js";
|
|
4
|
+
export * from "./outputWriter.js";
|
|
5
|
+
export * from "./terminal.js";
|
|
6
|
+
export * from "./usageTracker.js";
|
package/dist/infra/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./countTokens";
|
|
2
|
-
export * from "./datetime";
|
|
3
|
-
export * from "./logger";
|
|
4
|
-
export * from "./outputWriter";
|
|
5
|
-
export * from "./terminal";
|
|
6
|
-
export * from "./usageTracker";
|
|
1
|
+
export * from "./countTokens.js";
|
|
2
|
+
export * from "./datetime.js";
|
|
3
|
+
export * from "./logger.js";
|
|
4
|
+
export * from "./outputWriter.js";
|
|
5
|
+
export * from "./terminal.js";
|
|
6
|
+
export * from "./usageTracker.js";
|
package/dist/infra/logger.d.ts
CHANGED
package/dist/infra/logger.js
CHANGED
|
@@ -2,7 +2,7 @@ import { once } from "node:events";
|
|
|
2
2
|
import { createWriteStream } from "node:fs";
|
|
3
3
|
import { mkdir } from "node:fs/promises";
|
|
4
4
|
import { dirname } from "node:path";
|
|
5
|
-
import { countTokens } from "./countTokens";
|
|
5
|
+
import { countTokens } from "./countTokens.js";
|
|
6
6
|
export async function createOutputWriter(outputFile, maxSizeBytes = 0) {
|
|
7
7
|
const outputDirectory = dirname(outputFile);
|
|
8
8
|
if (outputDirectory !== ".")
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.1.
|
|
1
|
+
export declare const VERSION = "1.1.3";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.1.
|
|
1
|
+
export const VERSION = "1.1.3";
|