starship-butler-utils 0.3.4 → 0.3.5
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.d.ts +0 -2
- package/dist/index.js +0 -4
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -25,8 +25,6 @@ declare function existsSync(path: string): boolean;
|
|
|
25
25
|
declare function isDirectory(path: string): boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Ensure a directory exists.
|
|
28
|
-
* If the path is not a directory, we will try to create it.
|
|
29
|
-
* If the path is a file, we will create the parent directory.
|
|
30
28
|
* @param dirPath - The path to ensure
|
|
31
29
|
* @returns `true` if the directory is created, `false` otherwise
|
|
32
30
|
*/
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,6 @@ import { t as __export } from "./chunk-Bp6m_JJh.js";
|
|
|
2
2
|
import { readUser, updateUser, writeUser } from "rc9";
|
|
3
3
|
import { constants, copyFileSync, lstatSync, mkdirSync, promises, renameSync, unlinkSync } from "node:fs";
|
|
4
4
|
import consola from "consola";
|
|
5
|
-
import { dirname } from "pathe";
|
|
6
5
|
import { bold, cyan, green, magenta, red, reset } from "ansis";
|
|
7
6
|
|
|
8
7
|
//#region src/config.ts
|
|
@@ -69,13 +68,10 @@ function isDirectory(path) {
|
|
|
69
68
|
}
|
|
70
69
|
/**
|
|
71
70
|
* Ensure a directory exists.
|
|
72
|
-
* If the path is not a directory, we will try to create it.
|
|
73
|
-
* If the path is a file, we will create the parent directory.
|
|
74
71
|
* @param dirPath - The path to ensure
|
|
75
72
|
* @returns `true` if the directory is created, `false` otherwise
|
|
76
73
|
*/
|
|
77
74
|
function ensureDir(dirPath) {
|
|
78
|
-
if (!isDirectory(dirPath)) dirPath = dirname(dirPath);
|
|
79
75
|
if (!existsSync(dirPath)) {
|
|
80
76
|
mkdirSync(dirPath, { recursive: true });
|
|
81
77
|
return true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starship-butler-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.5",
|
|
5
5
|
"description": "Your best starship butler.",
|
|
6
6
|
"author": "Lumirelle <shabbyacc@outlook.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"ansis": "^4.2.0",
|
|
32
32
|
"consola": "^3.4.2",
|
|
33
|
-
"pathe": "^2.0.3",
|
|
34
33
|
"rc9": "^2.1.2"
|
|
35
34
|
},
|
|
36
35
|
"scripts": {
|