@mxpicture/build-api 0.3.7 → 0.3.8

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.
@@ -0,0 +1,7 @@
1
+ import type { LineCountFile } from "../types/types.code.js";
2
+ import type { LinesOfCodeParams } from "../types/types.package.js";
3
+ export declare const runLinesOfCode: (params: LinesOfCodeParams) => Promise<void>;
4
+ export declare const getLineCountFiles: (dir: string) => Promise<LineCountFile[]>;
5
+ export declare const getLineCountFile: (filePath: string) => Promise<LineCountFile>;
6
+ export declare const countNewlines: (str: string, ignoreEmptyLines?: boolean) => number;
7
+ //# sourceMappingURL=code.lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.lines.d.ts","sourceRoot":"","sources":["../../src/code/code.lines.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,eAAO,MAAM,cAAc,GAAU,QAAQ,iBAAiB,kBAS7D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,KAAK,MAAM,KACV,OAAO,CAAC,aAAa,EAAE,CAoBzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,KACf,OAAO,CAAC,aAAa,CAMvB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,KAAK,MAAM,EACX,mBAAmB,OAAO,KACzB,MAgBF,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { readdir, readFile } from "node:fs/promises";
2
+ import { join } from "node:path";
3
+ export const runLinesOfCode = async (params) => {
4
+ const files = await getLineCountFiles(params.repoRoot);
5
+ files.sort((a, b) => b.count - a.count);
6
+ if (params.top)
7
+ files.splice(params.top);
8
+ files.forEach((r) => {
9
+ console.log(`${r.count} ${r.path}`);
10
+ });
11
+ };
12
+ export const getLineCountFiles = async (dir) => {
13
+ const entries = await readdir(dir, { recursive: true, withFileTypes: true });
14
+ const filePaths = entries
15
+ .filter((entry) => entry.isFile() &&
16
+ entry.name.endsWith(".ts") &&
17
+ !entry.name.endsWith(".d.ts") &&
18
+ entry.name !== "index.ts" &&
19
+ entry.parentPath.indexOf("node_modules") === -1 &&
20
+ entry.parentPath.indexOf("__tests__") === -1 &&
21
+ entry.parentPath.indexOf("__test__") === -1 &&
22
+ entry.parentPath.indexOf("dist") === -1)
23
+ .map((entry) => join(entry.parentPath, entry.name));
24
+ return await Promise.all(filePaths.map((filePath) => getLineCountFile(filePath)));
25
+ };
26
+ export const getLineCountFile = async (filePath) => {
27
+ const content = await readFile(filePath, "utf-8");
28
+ return {
29
+ path: filePath,
30
+ count: countNewlines(content, true) + 1,
31
+ };
32
+ };
33
+ export const countNewlines = (str, ignoreEmptyLines) => {
34
+ let count = 0;
35
+ for (let i = 0; i < str.length; i++) {
36
+ // '\n'
37
+ if (str.charCodeAt(i) === 10) {
38
+ // 2 in sequence --> count only one
39
+ if (ignoreEmptyLines) {
40
+ const lastCharCode = i > 0 ? str.charCodeAt(i - 1) : null;
41
+ if (lastCharCode === 10)
42
+ continue;
43
+ }
44
+ count++;
45
+ }
46
+ }
47
+ return count;
48
+ };
49
+ //# sourceMappingURL=code.lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.lines.js","sourceRoot":"","sources":["../../src/code/code.lines.ts"],"names":[],"mappings":"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","sourcesContent":["import { readdir, readFile } from \"node:fs/promises\";\nimport type { LineCountFile } from \"../types/types.code.js\";\nimport type { LinesOfCodeParams } from \"../types/types.package.js\";\nimport { join } from \"node:path\";\n\nexport const runLinesOfCode = async (params: LinesOfCodeParams) => {\n const files = await getLineCountFiles(params.repoRoot);\n\n files.sort((a, b) => b.count - a.count);\n if (params.top) files.splice(params.top);\n\n files.forEach((r) => {\n console.log(`${r.count} ${r.path}`);\n });\n};\n\nexport const getLineCountFiles = async (\n dir: string,\n): Promise<LineCountFile[]> => {\n const entries = await readdir(dir, { recursive: true, withFileTypes: true });\n\n const filePaths = entries\n .filter(\n (entry) =>\n entry.isFile() &&\n entry.name.endsWith(\".ts\") &&\n !entry.name.endsWith(\".d.ts\") &&\n entry.name !== \"index.ts\" &&\n entry.parentPath.indexOf(\"node_modules\") === -1 &&\n entry.parentPath.indexOf(\"__tests__\") === -1 &&\n entry.parentPath.indexOf(\"__test__\") === -1 &&\n entry.parentPath.indexOf(\"dist\") === -1,\n )\n .map((entry) => join(entry.parentPath, entry.name));\n\n return await Promise.all(\n filePaths.map((filePath) => getLineCountFile(filePath)),\n );\n};\n\nexport const getLineCountFile = async (\n filePath: string,\n): Promise<LineCountFile> => {\n const content = await readFile(filePath, \"utf-8\");\n return {\n path: filePath,\n count: countNewlines(content, true) + 1,\n };\n};\n\nexport const countNewlines = (\n str: string,\n ignoreEmptyLines?: boolean,\n): number => {\n let count = 0;\n\n for (let i = 0; i < str.length; i++) {\n // '\\n'\n if (str.charCodeAt(i) === 10) {\n // 2 in sequence --> count only one\n if (ignoreEmptyLines) {\n const lastCharCode = i > 0 ? str.charCodeAt(i - 1) : null;\n if (lastCharCode === 10) continue;\n }\n count++;\n }\n }\n\n return count;\n};\n"]}
@@ -2,4 +2,5 @@ export * from "./code.common.js";
2
2
  export * from "./code.exports.js";
3
3
  export * from "./code.fix.js";
4
4
  export * from "./code.format.js";
5
+ export * from "./code.lines.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/code/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/code/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -3,4 +3,5 @@ export * from "./code.common.js";
3
3
  export * from "./code.exports.js";
4
4
  export * from "./code.fix.js";
5
5
  export * from "./code.format.js";
6
+ export * from "./code.lines.js";
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/code/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC","sourcesContent":["// This file is auto-generated for build-cli. Do not edit manually.\nexport * from \"./code.common.js\";\nexport * from \"./code.exports.js\";\nexport * from \"./code.fix.js\";\nexport * from \"./code.format.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/code/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC","sourcesContent":["// This file is auto-generated for build-cli. Do not edit manually.\nexport * from \"./code.common.js\";\nexport * from \"./code.exports.js\";\nexport * from \"./code.fix.js\";\nexport * from \"./code.format.js\";\nexport * from \"./code.lines.js\";\n"]}
@@ -61,4 +61,8 @@ export interface FileExportsParams {
61
61
  /** A pre-built {@link SourceFile} to reuse, avoiding redundant parsing. */
62
62
  preBuiltSource?: SourceFile;
63
63
  }
64
+ export interface LineCountFile {
65
+ path: string;
66
+ count: number;
67
+ }
64
68
  //# sourceMappingURL=types.code.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.code.d.ts","sourceRoot":"","sources":["../../src/types/types.code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC;IACxB,wDAAwD;IACxD,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,UAAU,EAAE,OAAO,CAAC;IACpB,2FAA2F;IAC3F,UAAU,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,8EAA8E;IAC9E,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE;QACL,8DAA8D;QAC9D,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,yDAAyD;QACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,oCAAoC;QACpC,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,uDAAuD;QACvD,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,2EAA2E;IAC3E,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B"}
1
+ {"version":3,"file":"types.code.d.ts","sourceRoot":"","sources":["../../src/types/types.code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC;IACxB,wDAAwD;IACxD,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,UAAU,EAAE,OAAO,CAAC;IACpB,2FAA2F;IAC3F,UAAU,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,8EAA8E;IAC9E,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE;QACL,8DAA8D;QAC9D,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,yDAAyD;QACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,oCAAoC;QACpC,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,uDAAuD;QACvD,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,2EAA2E;IAC3E,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.code.js","sourceRoot":"","sources":["../../src/types/types.code.ts"],"names":[],"mappings":"","sourcesContent":["import type ts from \"typescript\";\n\n/**\n * A parsed TypeScript source file together with its type checker.\n *\n * @remarks\n * Bundles the file path, the compiler's {@link ts.SourceFile} AST node,\n * and the {@link ts.TypeChecker} so that downstream consumers can perform\n * type-aware analysis without re-creating a program.\n */\nexport interface SourceFile {\n /** Absolute path to the TypeScript source file. */\n filePath: string;\n /** The TypeScript type checker associated with this file's program. */\n checker: ts.TypeChecker;\n /** The parsed AST representation of the source file. */\n sourceFile: ts.SourceFile;\n}\n\n/**\n * Metadata for a single exported symbol within a source file.\n */\nexport interface SourceExportItem {\n /** Export name (e.g. `\"foo\"`, `\"default\"`). */\n name: string;\n /** Human-readable kind of the export (e.g. `\"function\"`, `\"class\"`, `\"type\"`). */\n kind: string;\n /** Whether TypeScript considers this export type-only. */\n isTypeOnly: boolean;\n /** Whether the export originates from another module via `export … from` or `export *`. */\n isReExport: boolean;\n /** Declaration kind strings useful for debugging (e.g. `[\"FunctionDeclaration\"]`). */\n declarations: string[];\n}\n\n/**\n * The complete set of exports discovered in a single source file.\n */\nexport interface SourceExport {\n /** Individual export items found in the file. */\n items: SourceExportItem[];\n /** Whether the file uses selective (named) exports rather than `export *`. */\n selectiveExport: boolean;\n}\n\n/**\n * Parameters for extracting exports from a TypeScript file.\n */\nexport interface FileExportsParams {\n /** Absolute path to the file whose exports should be extracted. */\n filePath: string;\n /**\n * Optional flags that control which exports are included in the result.\n */\n opts?: {\n /** Include type-only exports (e.g. `export type { Foo }`). */\n includeTypeOnly?: boolean;\n /** Include re-exports originating from other modules. */\n includeReExports?: boolean;\n /** Include the `default` export. */\n includeDefault?: boolean;\n /** Include exports marked as private by convention. */\n includePrivate?: boolean;\n };\n /** A pre-built {@link SourceFile} to reuse, avoiding redundant parsing. */\n preBuiltSource?: SourceFile;\n}\n"]}
1
+ {"version":3,"file":"types.code.js","sourceRoot":"","sources":["../../src/types/types.code.ts"],"names":[],"mappings":"","sourcesContent":["import type ts from \"typescript\";\n\n/**\n * A parsed TypeScript source file together with its type checker.\n *\n * @remarks\n * Bundles the file path, the compiler's {@link ts.SourceFile} AST node,\n * and the {@link ts.TypeChecker} so that downstream consumers can perform\n * type-aware analysis without re-creating a program.\n */\nexport interface SourceFile {\n /** Absolute path to the TypeScript source file. */\n filePath: string;\n /** The TypeScript type checker associated with this file's program. */\n checker: ts.TypeChecker;\n /** The parsed AST representation of the source file. */\n sourceFile: ts.SourceFile;\n}\n\n/**\n * Metadata for a single exported symbol within a source file.\n */\nexport interface SourceExportItem {\n /** Export name (e.g. `\"foo\"`, `\"default\"`). */\n name: string;\n /** Human-readable kind of the export (e.g. `\"function\"`, `\"class\"`, `\"type\"`). */\n kind: string;\n /** Whether TypeScript considers this export type-only. */\n isTypeOnly: boolean;\n /** Whether the export originates from another module via `export … from` or `export *`. */\n isReExport: boolean;\n /** Declaration kind strings useful for debugging (e.g. `[\"FunctionDeclaration\"]`). */\n declarations: string[];\n}\n\n/**\n * The complete set of exports discovered in a single source file.\n */\nexport interface SourceExport {\n /** Individual export items found in the file. */\n items: SourceExportItem[];\n /** Whether the file uses selective (named) exports rather than `export *`. */\n selectiveExport: boolean;\n}\n\n/**\n * Parameters for extracting exports from a TypeScript file.\n */\nexport interface FileExportsParams {\n /** Absolute path to the file whose exports should be extracted. */\n filePath: string;\n /**\n * Optional flags that control which exports are included in the result.\n */\n opts?: {\n /** Include type-only exports (e.g. `export type { Foo }`). */\n includeTypeOnly?: boolean;\n /** Include re-exports originating from other modules. */\n includeReExports?: boolean;\n /** Include the `default` export. */\n includeDefault?: boolean;\n /** Include exports marked as private by convention. */\n includePrivate?: boolean;\n };\n /** A pre-built {@link SourceFile} to reuse, avoiding redundant parsing. */\n preBuiltSource?: SourceFile;\n}\n\nexport interface LineCountFile {\n path: string;\n count: number;\n}\n"]}
@@ -82,4 +82,7 @@ export interface UpdatePackagesParams extends RunRepoRootParams {
82
82
  /** Glob pattern used to select packages to update. */
83
83
  pattern: string;
84
84
  }
85
+ export interface LinesOfCodeParams extends RunRepoRootParams {
86
+ top: number;
87
+ }
85
88
  //# sourceMappingURL=types.package.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.package.d.ts","sourceRoot":"","sources":["../../src/types/types.package.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,uCAAuC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AASD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,gDAAgD;IAChD,OAAO,EAAE,GAAG,CAAC;IACb,yCAAyC;IACzC,KAAK,EAAE,GAAG,CAAC;IACX,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,mFAAmF;IACnF,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"types.package.d.ts","sourceRoot":"","sources":["../../src/types/types.package.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,uCAAuC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AASD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,gDAAgD;IAChD,OAAO,EAAE,GAAG,CAAC;IACb,yCAAyC;IACzC,KAAK,EAAE,GAAG,CAAC;IACX,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,mFAAmF;IACnF,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.package.js","sourceRoot":"","sources":["../../src/types/types.package.ts"],"names":[],"mappings":"","sourcesContent":["import type { Pkg } from \"../pkg/Pkg.js\";\nimport type { RunRepoRootParams } from \"./types.run.js\";\n\n/**\n * A parsed semantic version split into its numeric components.\n */\nexport interface PackageVersion {\n /** The major version number. */\n major: number;\n /** The minor version number. */\n minor: number;\n /** The patch version number. */\n patch: number;\n /** An optional prefix such as `\"^\"` or `\"~\"`, or `null` if none. */\n prefix: string | null;\n}\n\n/**\n * A minimal representation of a `package.json` file.\n *\n * @remarks\n * Contains the most commonly accessed fields and allows arbitrary\n * additional fields via the index signature.\n */\nexport interface PackageJson {\n /** The package name as published to npm. */\n name: string;\n /** Whether the package is marked as private (not publishable). */\n private?: boolean;\n /** The current version string (semver). */\n version: string;\n /** The `exports` field mapping entry points to file paths. */\n exports?: Record<string, string>;\n /** Runtime dependency map (`name → version range`). */\n dependencies?: Record<string, string>;\n /** Development dependency map (`name → version range`). */\n devDependencies?: Record<string, string>;\n /** Peer dependency map (`name → version range`). */\n peerDependencies?: Record<string, string>;\n /** Any other `package.json` fields. */\n [key: string]: unknown;\n}\n\n// export interface PackageEntry {\n// jsonPath: string;\n// repoPath: string | null;\n// content: PackageJson;\n// modified: boolean;\n// }\n\n/**\n * Describes a dependency mapping between two packages in a workspace.\n */\nexport interface MapEntry {\n /** The package that declares the dependency. */\n fromPkg: Pkg;\n /** The package that is depended upon. */\n toPkg: Pkg;\n /** The relative file-system path from the source to the target package. */\n relPath: string;\n}\n\n/**\n * Flags indicating which semver component to bump.\n *\n * @remarks\n * At most one flag should be `true`. If none are set, the default\n * bump behavior of the consumer applies.\n */\nexport interface BumpParams {\n /** Bump the major version. */\n major?: boolean;\n /** Bump the minor version. */\n minor?: boolean;\n /** Bump the patch version. */\n patch?: boolean;\n}\n\n/**\n * Parameters for synchronizing package versions across a workspace.\n */\nexport interface SyncPkgVersionParams extends RunRepoRootParams {\n /** Optional bump configuration controlling which semver component to increment. */\n bump?: BumpParams;\n /** When `true`, skip version bumping entirely. */\n noBump?: boolean;\n /** When `true`, skip creating a git tag after the version sync. */\n noTag?: boolean;\n}\n\n/**\n * Parameters for bulk-updating packages that match a pattern.\n */\nexport interface UpdatePackagesParams extends RunRepoRootParams {\n /** Glob pattern used to select packages to update. */\n pattern: string;\n}\n"]}
1
+ {"version":3,"file":"types.package.js","sourceRoot":"","sources":["../../src/types/types.package.ts"],"names":[],"mappings":"","sourcesContent":["import type { Pkg } from \"../pkg/Pkg.js\";\nimport type { RunRepoRootParams } from \"./types.run.js\";\n\n/**\n * A parsed semantic version split into its numeric components.\n */\nexport interface PackageVersion {\n /** The major version number. */\n major: number;\n /** The minor version number. */\n minor: number;\n /** The patch version number. */\n patch: number;\n /** An optional prefix such as `\"^\"` or `\"~\"`, or `null` if none. */\n prefix: string | null;\n}\n\n/**\n * A minimal representation of a `package.json` file.\n *\n * @remarks\n * Contains the most commonly accessed fields and allows arbitrary\n * additional fields via the index signature.\n */\nexport interface PackageJson {\n /** The package name as published to npm. */\n name: string;\n /** Whether the package is marked as private (not publishable). */\n private?: boolean;\n /** The current version string (semver). */\n version: string;\n /** The `exports` field mapping entry points to file paths. */\n exports?: Record<string, string>;\n /** Runtime dependency map (`name → version range`). */\n dependencies?: Record<string, string>;\n /** Development dependency map (`name → version range`). */\n devDependencies?: Record<string, string>;\n /** Peer dependency map (`name → version range`). */\n peerDependencies?: Record<string, string>;\n /** Any other `package.json` fields. */\n [key: string]: unknown;\n}\n\n// export interface PackageEntry {\n// jsonPath: string;\n// repoPath: string | null;\n// content: PackageJson;\n// modified: boolean;\n// }\n\n/**\n * Describes a dependency mapping between two packages in a workspace.\n */\nexport interface MapEntry {\n /** The package that declares the dependency. */\n fromPkg: Pkg;\n /** The package that is depended upon. */\n toPkg: Pkg;\n /** The relative file-system path from the source to the target package. */\n relPath: string;\n}\n\n/**\n * Flags indicating which semver component to bump.\n *\n * @remarks\n * At most one flag should be `true`. If none are set, the default\n * bump behavior of the consumer applies.\n */\nexport interface BumpParams {\n /** Bump the major version. */\n major?: boolean;\n /** Bump the minor version. */\n minor?: boolean;\n /** Bump the patch version. */\n patch?: boolean;\n}\n\n/**\n * Parameters for synchronizing package versions across a workspace.\n */\nexport interface SyncPkgVersionParams extends RunRepoRootParams {\n /** Optional bump configuration controlling which semver component to increment. */\n bump?: BumpParams;\n /** When `true`, skip version bumping entirely. */\n noBump?: boolean;\n /** When `true`, skip creating a git tag after the version sync. */\n noTag?: boolean;\n}\n\n/**\n * Parameters for bulk-updating packages that match a pattern.\n */\nexport interface UpdatePackagesParams extends RunRepoRootParams {\n /** Glob pattern used to select packages to update. */\n pattern: string;\n}\n\nexport interface LinesOfCodeParams extends RunRepoRootParams {\n top: number;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxpicture/build-api",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Build utilities API",
5
5
  "type": "module",
6
6
  "author": "MXPicture",