@bamboocss/reporter 1.12.0 → 1.12.1

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/index.cjs CHANGED
@@ -381,7 +381,7 @@ function formatRecipeReport(result, format) {
381
381
  }
382
382
  //#endregion
383
383
  //#region package.json
384
- var version = "1.12.0";
384
+ var version = "1.12.1";
385
385
  //#endregion
386
386
  //#region src/reporter-recipe.ts
387
387
  function analyzeRecipes(ctx, result) {
package/dist/index.mjs CHANGED
@@ -357,7 +357,7 @@ function formatRecipeReport(result, format) {
357
357
  }
358
358
  //#endregion
359
359
  //#region package.json
360
- var version = "1.12.0";
360
+ var version = "1.12.1";
361
361
  //#endregion
362
362
  //#region src/reporter-recipe.ts
363
363
  function analyzeRecipes(ctx, result) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/reporter",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Track and report usage of tokens and recipes",
5
5
  "homepage": "https://bamboo-css.com",
6
6
  "license": "MIT",
@@ -35,11 +35,11 @@
35
35
  "dependencies": {
36
36
  "table": "6.9.0",
37
37
  "wordwrapjs": "5.1.1",
38
- "@bamboocss/core": "1.12.0",
39
- "@bamboocss/logger": "1.12.0",
40
- "@bamboocss/generator": "1.12.0",
41
- "@bamboocss/types": "1.12.0",
42
- "@bamboocss/shared": "1.12.0"
38
+ "@bamboocss/core": "1.12.1",
39
+ "@bamboocss/generator": "1.12.1",
40
+ "@bamboocss/logger": "1.12.1",
41
+ "@bamboocss/types": "1.12.1",
42
+ "@bamboocss/shared": "1.12.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "markdown-table": "3.0.4"
package/dist/index.d.cts DELETED
@@ -1,85 +0,0 @@
1
- import { ParserOptions } from "@bamboocss/core";
2
- import { AnalysisReport, ClassifyReport, Nullable, ParserResultInterface } from "@bamboocss/types";
3
- import { Generator } from "@bamboocss/generator";
4
-
5
- //#region src/reporter-recipe.d.ts
6
- interface RecipeReportEntry {
7
- recipeName: string;
8
- usedInXFiles: number;
9
- usedCount: number;
10
- variantCount: number;
11
- usedCombinations: number;
12
- percentUsed: number;
13
- jsxPercentUsed: number;
14
- fnPercentUsed: number;
15
- possibleCombinations: string[];
16
- unusedCombinations: number;
17
- mostUsedCombinations: string[];
18
- }
19
- //#endregion
20
- //#region src/reporter-token.d.ts
21
- interface TokenUsageItem {
22
- category: string;
23
- value: string;
24
- filePath: string;
25
- type: 'token' | 'nonToken';
26
- loc: Nullable<{
27
- line: number;
28
- column: number;
29
- }>;
30
- }
31
- interface TokenReportEntry {
32
- category: string;
33
- usedInXFiles: number;
34
- usedCount: number;
35
- count: number;
36
- percentUsed: number;
37
- hardcoded: number;
38
- mostUsedNames: string[];
39
- }
40
- interface TokenAnalysisReport {
41
- usageMap: Map<string, TokenUsageItem[]>;
42
- percentMap: Map<string, {
43
- total: number;
44
- used: number;
45
- unused: number;
46
- percent: number;
47
- }>;
48
- tokenNameMap: Map<string, string[]>;
49
- fileUsageMap: Map<string, Set<string>>;
50
- hardcodedTokenMap: Map<string, number>;
51
- totalMap: Map<string, number>;
52
- getSummary(): TokenReportEntry[];
53
- }
54
- //#endregion
55
- //#region src/report-format.d.ts
56
- type ReportFormat = 'json' | 'markdown' | 'csv' | 'text' | 'table';
57
- declare function formatTokenReport(result: TokenReportEntry[], format: ReportFormat): string;
58
- declare function formatRecipeReport(result: RecipeReportEntry[], format: ReportFormat): string;
59
- //#endregion
60
- //#region src/reporter.d.ts
61
- declare class Reporter {
62
- #private;
63
- private ctx;
64
- private options;
65
- constructor(ctx: Generator, options: ReporterOptions);
66
- private setup;
67
- get report(): AnalysisReport;
68
- private parseFiles;
69
- private parseFile;
70
- init: () => void;
71
- getTokenReport: () => TokenAnalysisReport;
72
- getRecipeReport: () => RecipeReportEntry[];
73
- }
74
- interface ReporterOptions {
75
- onResult?: (file: string, result: ParserResultInterface) => void;
76
- project: {
77
- parserOptions: ParserOptions;
78
- parseSourceFile: (file: string) => ParserResultInterface | undefined;
79
- classify: (fileMap: Map<string, ParserResultInterface>) => ClassifyReport;
80
- };
81
- getFiles: () => string[];
82
- getRelativePath: (cwd: string, file: string) => string;
83
- }
84
- //#endregion
85
- export { type RecipeReportEntry, ReportFormat, Reporter, ReporterOptions, type TokenAnalysisReport, type TokenReportEntry, formatRecipeReport, formatTokenReport };
package/dist/index.d.mts DELETED
@@ -1,85 +0,0 @@
1
- import { ParserOptions } from "@bamboocss/core";
2
- import { AnalysisReport, ClassifyReport, Nullable, ParserResultInterface } from "@bamboocss/types";
3
- import { Generator } from "@bamboocss/generator";
4
-
5
- //#region src/reporter-recipe.d.ts
6
- interface RecipeReportEntry {
7
- recipeName: string;
8
- usedInXFiles: number;
9
- usedCount: number;
10
- variantCount: number;
11
- usedCombinations: number;
12
- percentUsed: number;
13
- jsxPercentUsed: number;
14
- fnPercentUsed: number;
15
- possibleCombinations: string[];
16
- unusedCombinations: number;
17
- mostUsedCombinations: string[];
18
- }
19
- //#endregion
20
- //#region src/reporter-token.d.ts
21
- interface TokenUsageItem {
22
- category: string;
23
- value: string;
24
- filePath: string;
25
- type: 'token' | 'nonToken';
26
- loc: Nullable<{
27
- line: number;
28
- column: number;
29
- }>;
30
- }
31
- interface TokenReportEntry {
32
- category: string;
33
- usedInXFiles: number;
34
- usedCount: number;
35
- count: number;
36
- percentUsed: number;
37
- hardcoded: number;
38
- mostUsedNames: string[];
39
- }
40
- interface TokenAnalysisReport {
41
- usageMap: Map<string, TokenUsageItem[]>;
42
- percentMap: Map<string, {
43
- total: number;
44
- used: number;
45
- unused: number;
46
- percent: number;
47
- }>;
48
- tokenNameMap: Map<string, string[]>;
49
- fileUsageMap: Map<string, Set<string>>;
50
- hardcodedTokenMap: Map<string, number>;
51
- totalMap: Map<string, number>;
52
- getSummary(): TokenReportEntry[];
53
- }
54
- //#endregion
55
- //#region src/report-format.d.ts
56
- type ReportFormat = 'json' | 'markdown' | 'csv' | 'text' | 'table';
57
- declare function formatTokenReport(result: TokenReportEntry[], format: ReportFormat): string;
58
- declare function formatRecipeReport(result: RecipeReportEntry[], format: ReportFormat): string;
59
- //#endregion
60
- //#region src/reporter.d.ts
61
- declare class Reporter {
62
- #private;
63
- private ctx;
64
- private options;
65
- constructor(ctx: Generator, options: ReporterOptions);
66
- private setup;
67
- get report(): AnalysisReport;
68
- private parseFiles;
69
- private parseFile;
70
- init: () => void;
71
- getTokenReport: () => TokenAnalysisReport;
72
- getRecipeReport: () => RecipeReportEntry[];
73
- }
74
- interface ReporterOptions {
75
- onResult?: (file: string, result: ParserResultInterface) => void;
76
- project: {
77
- parserOptions: ParserOptions;
78
- parseSourceFile: (file: string) => ParserResultInterface | undefined;
79
- classify: (fileMap: Map<string, ParserResultInterface>) => ClassifyReport;
80
- };
81
- getFiles: () => string[];
82
- getRelativePath: (cwd: string, file: string) => string;
83
- }
84
- //#endregion
85
- export { type RecipeReportEntry, ReportFormat, Reporter, ReporterOptions, type TokenAnalysisReport, type TokenReportEntry, formatRecipeReport, formatTokenReport };