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.
Files changed (45) hide show
  1. package/dist/api/fln.d.ts +1 -1
  2. package/dist/api/fln.js +3 -3
  3. package/dist/api/index.d.ts +2 -2
  4. package/dist/api/index.js +2 -2
  5. package/dist/api/types.d.ts +1 -1
  6. package/dist/cli/commandLine.js +6 -6
  7. package/dist/cli/help.js +1 -1
  8. package/dist/cli/index.js +1 -1
  9. package/dist/cli/output/components/breakdown.js +2 -2
  10. package/dist/cli/output/components/errors.js +1 -1
  11. package/dist/cli/output/components/index.d.ts +5 -5
  12. package/dist/cli/output/components/index.js +5 -5
  13. package/dist/cli/output/components/progressBar.js +1 -1
  14. package/dist/cli/output/components/summary.js +2 -2
  15. package/dist/cli/output/components/warnings.js +1 -1
  16. package/dist/cli/output/index.d.ts +4 -4
  17. package/dist/cli/output/index.js +4 -4
  18. package/dist/cli/output/renderer.d.ts +3 -3
  19. package/dist/cli/output/renderer.js +3 -3
  20. package/dist/cli/output/styles.d.ts +7 -7
  21. package/dist/config/index.d.ts +5 -5
  22. package/dist/config/index.js +5 -5
  23. package/dist/config/loader.d.ts +1 -1
  24. package/dist/config/resolver.d.ts +1 -1
  25. package/dist/config/resolver.js +3 -3
  26. package/dist/config/types.d.ts +1 -1
  27. package/dist/core/ignoreMatcher.d.ts +1 -1
  28. package/dist/core/index.d.ts +7 -7
  29. package/dist/core/index.js +7 -7
  30. package/dist/core/renderOutput.d.ts +2 -2
  31. package/dist/core/renderOutput.js +4 -4
  32. package/dist/core/renderTree.d.ts +1 -1
  33. package/dist/core/scanTree.d.ts +2 -2
  34. package/dist/core/scanTree.js +1 -1
  35. package/dist/core/statsCollector.d.ts +1 -1
  36. package/dist/index.d.ts +3 -3
  37. package/dist/index.js +3 -3
  38. package/dist/infra/index.d.ts +6 -6
  39. package/dist/infra/index.js +6 -6
  40. package/dist/infra/logger.d.ts +1 -1
  41. package/dist/infra/logger.js +1 -1
  42. package/dist/infra/outputWriter.js +1 -1
  43. package/dist/version.d.ts +1 -1
  44. package/dist/version.js +1 -1
  45. 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);
@@ -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";
@@ -1,4 +1,4 @@
1
- import type { LogLevel, ProgressCallback } from "../core";
1
+ import type { LogLevel, ProgressCallback } from "../core/index.js";
2
2
  export type FlnOptions = {
3
3
  rootDirectory?: string;
4
4
  outputFile?: string;
@@ -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
1
  #!/usr/bin/env node
2
- import { runCommandLine } from "./commandLine";
2
+ import { runCommandLine } from "./commandLine.js";
3
3
  try {
4
4
  await runCommandLine();
5
5
  }
@@ -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,4 +1,4 @@
1
- import { applyColor, colors, symbols } from "../styles";
1
+ import { applyColor, colors, symbols } from "../styles.js";
2
2
  export function renderErrors(errors, useColors, verbose) {
3
3
  if (errors.length === 0)
4
4
  return "";
@@ -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,4 +1,4 @@
1
- import { applyColor, colors, symbols } from "../styles";
1
+ import { applyColor, colors, symbols } from "../styles.js";
2
2
  export class ProgressBar {
3
3
  #total;
4
4
  #current = 0;
@@ -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
- import { applyColor, colors, symbols } from "../styles";
1
+ import { applyColor, colors, symbols } from "../styles.js";
2
2
  export function renderWarnings(warnings, useColors) {
3
3
  if (warnings.length === 0)
4
4
  return "";
@@ -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,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: "✓";
@@ -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";
@@ -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";
@@ -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
  }>;
@@ -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;
@@ -1,4 +1,4 @@
1
- import type { LogLevel, OutputFormat } from "../core";
1
+ import type { LogLevel, OutputFormat } from "../core/index.js";
2
2
  export type RawConfigFile = Partial<{
3
3
  outputFile: string;
4
4
  overwrite: boolean;
@@ -1,4 +1,4 @@
1
- import type { Logger } from "../infra";
1
+ import type { Logger } from "../infra/index.js";
2
2
  type IgnoreMatcherOptions = {
3
3
  rootDirectory: string;
4
4
  excludePatterns: string[];
@@ -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,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;
@@ -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>;
@@ -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;
@@ -1,3 +1,3 @@
1
- import type { FileNode } from "./types";
1
+ import type { FileNode } from "./types.js";
2
2
  export declare function collectExtensionStats(root: FileNode): Map<string, number>;
3
3
  export declare function collectProcessedFiles(root: FileNode): string[];
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";
@@ -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";
@@ -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";
@@ -1,4 +1,4 @@
1
- import type { LogLevel } from "../core";
1
+ import type { LogLevel } from "../core/index.js";
2
2
  type LoggerOptions = {
3
3
  useAnsi: boolean;
4
4
  logLevel: LogLevel;
@@ -1,4 +1,4 @@
1
- import { ansi, getTerminalInfo, renderBox, symbols } from "./terminal";
1
+ import { ansi, getTerminalInfo, renderBox, symbols } from "./terminal.js";
2
2
  export function createLogger(options) {
3
3
  const { useAnsi, logLevel } = options;
4
4
  const { width } = getTerminalInfo();
@@ -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.2";
1
+ export declare const VERSION = "1.1.3";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.1.2";
1
+ export const VERSION = "1.1.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Feed your entire codebase to any LLM in one shot. No attachment limits, no upload hassles.",
5
5
  "keywords": [
6
6
  "cli",