@mxpicture/build-api 0.2.26 → 0.2.28
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 +1 -0
- package/dist/logger/Logger.js +2 -2
- package/dist/workspace/workspace.common.js +2 -2
- package/package.json +3 -5
- package/dist/changes/Changes.d.ts +0 -6
- package/dist/changes/Changes.js +0 -15
- package/dist/changes/index.d.ts +0 -1
- package/dist/changes/index.js +0 -2
- package/dist/zod/index.d.ts +0 -1
- package/dist/zod/index.js +0 -2
- package/dist/zod/zod.package.d.ts +0 -13
- package/dist/zod/zod.package.js +0 -10
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: () => { },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readdir, readFile } from "node:fs/promises";
|
|
2
2
|
import { WorkspaceFileType, } from "../types/types.workspace.js";
|
|
3
|
-
import { join
|
|
3
|
+
import { join } from "node:path";
|
|
4
4
|
import { parse } from "yaml";
|
|
5
5
|
export const DEFAULT_WORKSPACE_FILE_ENDING = ".code-workspace";
|
|
6
6
|
export const getFileType = (filename) => filename.endsWith(DEFAULT_WORKSPACE_FILE_ENDING)
|
|
@@ -59,7 +59,7 @@ export const findWorkspaceRoot = async (startPath) => {
|
|
|
59
59
|
return result;
|
|
60
60
|
};
|
|
61
61
|
export const readWorkspaceYaml = async (repoRoot) => {
|
|
62
|
-
const workspaceFilePath =
|
|
62
|
+
const workspaceFilePath = join(repoRoot, "pnpm-workspace.yaml");
|
|
63
63
|
const fileContent = await readFile(workspaceFilePath, "utf8");
|
|
64
64
|
const parsed = parse(fileContent);
|
|
65
65
|
if (!parsed || !parsed.packages || !Array.isArray(parsed.packages))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/build-api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
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",
|
|
@@ -24,7 +23,6 @@
|
|
|
24
23
|
"./types": "./dist/types/index.js",
|
|
25
24
|
"./vscode": "./dist/vscode/index.js",
|
|
26
25
|
"./workspace": "./dist/workspace/index.js",
|
|
27
|
-
"./zod": "./dist/zod/index.js",
|
|
28
26
|
"./package.json": "./package.json"
|
|
29
27
|
},
|
|
30
28
|
"files": [
|
|
@@ -45,12 +43,12 @@
|
|
|
45
43
|
"typescript": "^5.9.3"
|
|
46
44
|
},
|
|
47
45
|
"dependencies": {
|
|
46
|
+
"@mxpicture/dep-analyzer": "^0.1.0",
|
|
48
47
|
"@types/micromatch": "^4.0.10",
|
|
49
48
|
"json5": "^2.2.3",
|
|
50
49
|
"micromatch": "^4.0.8",
|
|
51
50
|
"prettier": "^3.8.1",
|
|
52
51
|
"simple-git": "^3.32.3",
|
|
53
|
-
"yaml": "^2.8.2"
|
|
54
|
-
"zod": "^4.3.6"
|
|
52
|
+
"yaml": "^2.8.2"
|
|
55
53
|
}
|
|
56
54
|
}
|
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
package/dist/zod/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./zod.package.js";
|
package/dist/zod/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const packageVersionShape: {
|
|
3
|
-
major: z.ZodNumber;
|
|
4
|
-
minor: z.ZodXor<readonly [z.ZodNumber, z.ZodNull]>;
|
|
5
|
-
patch: z.ZodXor<readonly [z.ZodNumber, z.ZodNull]>;
|
|
6
|
-
prefix: z.ZodXor<readonly [z.ZodString, z.ZodNull]>;
|
|
7
|
-
};
|
|
8
|
-
export declare const packageVersionSchema: z.ZodObject<{
|
|
9
|
-
major: z.ZodNumber;
|
|
10
|
-
minor: z.ZodXor<readonly [z.ZodNumber, z.ZodNull]>;
|
|
11
|
-
patch: z.ZodXor<readonly [z.ZodNumber, z.ZodNull]>;
|
|
12
|
-
prefix: z.ZodXor<readonly [z.ZodString, z.ZodNull]>;
|
|
13
|
-
}, z.core.$strip>;
|
package/dist/zod/zod.package.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export const packageVersionShape = {
|
|
3
|
-
major: z.number().min(0),
|
|
4
|
-
minor: z.xor([z.number(), z.null()]),
|
|
5
|
-
patch: z.xor([z.number(), z.null()]),
|
|
6
|
-
prefix: z.xor([z.string(), z.null()]),
|
|
7
|
-
};
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
-
const __validate = packageVersionShape;
|
|
10
|
-
export const packageVersionSchema = z.object(packageVersionShape);
|