@mikode13/cross-platform 0.1.0 → 1.0.0
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/README.md +8 -1
- package/dist/bin.js +0 -0
- package/package.json +56 -53
- package/dist/cliClean.d.ts +0 -3
- package/dist/cliClean.d.ts.map +0 -1
- package/dist/cliClean.js +0 -24
- package/dist/cliClean.js.map +0 -1
package/README.md
CHANGED
|
@@ -58,7 +58,14 @@ directory. It does not restrict the target to be inside the current working dire
|
|
|
58
58
|
|
|
59
59
|
## Tests
|
|
60
60
|
|
|
61
|
-
`pnpm test` runs the unit
|
|
61
|
+
`pnpm test` pnpm test runs the unit and packaging integration suites.
|
|
62
|
+
|
|
63
|
+
## Releases
|
|
64
|
+
|
|
65
|
+
Versions are derived from Conventional Commit titles by `semantic-release` and published
|
|
66
|
+
automatically from `main`. The npm registry, Git tags, and GitHub Releases are the
|
|
67
|
+
authoritative history; the `version` field in this repository stays at
|
|
68
|
+
`0.0.0-development` and is never committed with a real version.
|
|
62
69
|
|
|
63
70
|
## License
|
|
64
71
|
|
package/dist/bin.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,54 +1,57 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
2
|
+
"name": "@mikode13/cross-platform",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Cross-platform utilities for MiKode build and maintenance scripts",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Mikode13/cross-platform.git"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": "^22.13.0 || ^24.0.0"
|
|
13
|
+
},
|
|
14
|
+
"packageManager": "pnpm@11.17.0",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"bin": {
|
|
21
|
+
"mikode-scripts": "./dist/bin.js"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"prepare": "mikode-git-hooks install",
|
|
31
|
+
"build": "node scripts/clean-dist.mjs && tsc -p tsconfig.build.json",
|
|
32
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tests",
|
|
33
|
+
"format": "prettier . --write",
|
|
34
|
+
"format:check": "prettier . --check",
|
|
35
|
+
"lint": "eslint . --max-warnings 0",
|
|
36
|
+
"lint:fix": "eslint . --fix",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"test:unit": "vitest run --project unit",
|
|
39
|
+
"test:unit:watch": "vitest --project unit",
|
|
40
|
+
"test:integration": "vitest run --project integration",
|
|
41
|
+
"test:coverage": "vitest run --coverage",
|
|
42
|
+
"pack:check": "pnpm run build && node scripts/pack-check.mjs",
|
|
43
|
+
"check": "pnpm run format:check && pnpm run lint && pnpm run typecheck"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@mikode13/code-quality": "0.1.0",
|
|
47
|
+
"@mikode13/code-style": "0.1.0",
|
|
48
|
+
"@mikode13/git-hooks": "0.1.0",
|
|
49
|
+
"@mikode13/tsconfig": "1.0.0",
|
|
50
|
+
"@types/node": "^26.1.2",
|
|
51
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
52
|
+
"eslint": "^10.8.0",
|
|
53
|
+
"prettier": "^3.9.6",
|
|
54
|
+
"typescript": "^6.0.3",
|
|
55
|
+
"vitest": "^4.1.11"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/dist/cliClean.d.ts
DELETED
package/dist/cliClean.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cliClean.d.ts","sourceRoot":"","sources":["../src/cliClean.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAgBtE;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWvE"}
|
package/dist/cliClean.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { clean } from "./clean.js";
|
|
3
|
-
export function resolveCleanTarget(target, cwd) {
|
|
4
|
-
if (!target.trim()) {
|
|
5
|
-
throw new Error('A path is required');
|
|
6
|
-
}
|
|
7
|
-
const resolved = path.resolve(cwd, target);
|
|
8
|
-
if (resolved === path.parse(resolved).root) {
|
|
9
|
-
throw new Error('Cannot clean a filesystem root');
|
|
10
|
-
}
|
|
11
|
-
if (resolved === path.resolve(cwd)) {
|
|
12
|
-
throw new Error('Cannot clean the current working directory');
|
|
13
|
-
}
|
|
14
|
-
return resolved;
|
|
15
|
-
}
|
|
16
|
-
export async function runCli(argv, cwd) {
|
|
17
|
-
const [command, target] = argv;
|
|
18
|
-
if (command !== 'clean') {
|
|
19
|
-
throw new Error(`Unrecognized command: "${command ?? ''}". The only supported command is "clean".`);
|
|
20
|
-
}
|
|
21
|
-
const resolved = resolveCleanTarget(target ?? '', cwd);
|
|
22
|
-
await clean(resolved);
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=cliClean.js.map
|
package/dist/cliClean.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cliClean.js","sourceRoot":"","sources":["../src/cliClean.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,GAAW;IAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAE3C,IAAI,QAAQ,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,QAAQ,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc,EAAE,GAAW;IACvD,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAE/B,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACd,0BAA0B,OAAO,IAAI,EAAE,2CAA2C,CAClF,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC;IACvD,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC"}
|