@stacksjs/storage 0.51.0 → 0.52.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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ pnpm test
|
|
|
53
53
|
|
|
54
54
|
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
|
|
55
55
|
|
|
56
|
-
##
|
|
56
|
+
## 🚜 Contributing
|
|
57
57
|
|
|
58
58
|
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
|
|
59
59
|
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare function deleteFiles(dir: string, exclude?: string[]): void;
|
|
|
36
36
|
export declare function deleteEmptyFolders(dir: string): void;
|
|
37
37
|
export declare function doesFolderExist(path: string): any;
|
|
38
38
|
export declare function createFolder(dir: string): Promise<void>;
|
|
39
|
-
export declare function updateConfigFile(filePath: string, newConfig:
|
|
39
|
+
export declare function updateConfigFile(filePath: string, newConfig: Record<string, unknown>): Promise<void>;
|
|
40
40
|
export declare const filesystem: {
|
|
41
41
|
_dirname: any;
|
|
42
42
|
readJsonFile: typeof readJsonFile;
|
package/dist/index.mjs
CHANGED
|
@@ -128,12 +128,12 @@ export function createFolder(dir) {
|
|
|
128
128
|
}
|
|
129
129
|
export function updateConfigFile(filePath, newConfig) {
|
|
130
130
|
return new Promise((resolve, reject) => {
|
|
131
|
-
|
|
131
|
+
const config = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
132
132
|
for (const key in newConfig) {
|
|
133
133
|
config[key] = newConfig[key];
|
|
134
134
|
}
|
|
135
135
|
fs.writeFileSync(filePath, JSON.stringify(config, null, 2));
|
|
136
|
-
|
|
136
|
+
resolve();
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
export const filesystem = {
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/storage",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.52.0",
|
|
5
|
+
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks file system.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
9
15
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
10
16
|
"homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/storage#readme",
|
|
11
17
|
"repository": {
|
|
@@ -36,26 +42,20 @@
|
|
|
36
42
|
"dist",
|
|
37
43
|
"README.md"
|
|
38
44
|
],
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=v18.14.0",
|
|
41
|
-
"pnpm": ">=7.26.3"
|
|
42
|
-
},
|
|
43
45
|
"peerDependencies": {
|
|
44
|
-
"fs-extra": "^11.1.
|
|
45
|
-
"unstorage": "^1.0
|
|
46
|
-
"@stacksjs/arrays": "0.
|
|
47
|
-
"@stacksjs/
|
|
48
|
-
"@stacksjs/
|
|
46
|
+
"fs-extra": "^11.1.1",
|
|
47
|
+
"unstorage": "^1.6.0",
|
|
48
|
+
"@stacksjs/arrays": "0.52.0",
|
|
49
|
+
"@stacksjs/path": "0.52.0",
|
|
50
|
+
"@stacksjs/types": "0.52.0",
|
|
51
|
+
"@stacksjs/utils": "0.52.0"
|
|
49
52
|
},
|
|
50
53
|
"devDependencies": {
|
|
51
|
-
"
|
|
52
|
-
"typescript": "^4.9.5",
|
|
53
|
-
"@stacksjs/path": "0.51.0",
|
|
54
|
-
"@stacksjs/testing": "0.51.0"
|
|
54
|
+
"@stacksjs/development": "0.52.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
|
-
"build": "
|
|
58
|
-
"dev": "
|
|
57
|
+
"build": "unbuild",
|
|
58
|
+
"dev": "unbuild --stub",
|
|
59
59
|
"typecheck": "tsc --noEmit"
|
|
60
60
|
}
|
|
61
61
|
}
|