@mxpicture/build-api 0.2.26 → 0.2.27
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/logger/Logger.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export declare const logger: () => Logger;
|
|
|
9
9
|
export declare const logSuccess: LoggerHandler;
|
|
10
10
|
export declare const logError: LoggerHandler;
|
|
11
11
|
export declare const logInfo: LoggerHandler;
|
|
12
|
+
export declare const silentLogger: Logger;
|
|
12
13
|
export declare const consoleLogger: Logger;
|
package/dist/logger/Logger.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
let __logger = null;
|
|
2
2
|
export const initLogger = (log) => (__logger = log);
|
|
3
|
-
export const logger = () => __logger ??
|
|
3
|
+
export const logger = () => __logger ?? silentLogger;
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
5
|
export const logSuccess = (...data) => logger().success(...data);
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
7
|
export const logError = (...data) => logger().error(...data);
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
9
|
export const logInfo = (...data) => logger().info(...data);
|
|
10
|
-
const
|
|
10
|
+
export const silentLogger = {
|
|
11
11
|
success: () => { },
|
|
12
12
|
error: () => { },
|
|
13
13
|
info: () => { },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/build-api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.27",
|
|
4
4
|
"description": "Build utilities API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
"./barrel": "./dist/barrel/index.js",
|
|
14
|
-
"./changes": "./dist/changes/index.js",
|
|
15
14
|
"./cleanup": "./dist/cleanup/index.js",
|
|
16
15
|
"./common": "./dist/common/index.js",
|
|
17
16
|
"./deps": "./dist/deps/index.js",
|
|
@@ -45,6 +44,7 @@
|
|
|
45
44
|
"typescript": "^5.9.3"
|
|
46
45
|
},
|
|
47
46
|
"dependencies": {
|
|
47
|
+
"@mxpicture/dep-analyzer": "^0.1.0",
|
|
48
48
|
"@types/micromatch": "^4.0.10",
|
|
49
49
|
"json5": "^2.2.3",
|
|
50
50
|
"micromatch": "^4.0.8",
|
package/dist/changes/Changes.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { lastCommitHash, lastTag } from "../git/git.util.js";
|
|
2
|
-
import { GitChangesTag } from "../git/GitChanges.js";
|
|
3
|
-
export class Changes {
|
|
4
|
-
rootDir;
|
|
5
|
-
constructor(rootDir) {
|
|
6
|
-
this.rootDir = rootDir;
|
|
7
|
-
}
|
|
8
|
-
async readFiles() {
|
|
9
|
-
const commitTag = (await lastTag(this.rootDir)) ?? (await lastCommitHash(this.rootDir));
|
|
10
|
-
if (!commitTag)
|
|
11
|
-
throw new Error("No last commit or tag found");
|
|
12
|
-
const gitc = new GitChangesTag(this.rootDir, commitTag);
|
|
13
|
-
return (await gitc.readChangedFiles()).files;
|
|
14
|
-
}
|
|
15
|
-
}
|
package/dist/changes/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Changes.js";
|
package/dist/changes/index.js
DELETED