@stacksjs/storage 0.58.63 → 0.58.65
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.js +0 -1
- package/package.json +1 -1
- package/src/files.ts +2 -5
- package/src/hash.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -189,7 +189,6 @@ var folders = {
|
|
|
189
189
|
import {createHash} from "crypto";
|
|
190
190
|
import {path as p2} from "@stacksjs/path";
|
|
191
191
|
function hashFileOrDirectory(path4, hash) {
|
|
192
|
-
console.log("hashFileOrDirectory", path4);
|
|
193
192
|
if (fs.statSync(path4).isDirectory()) {
|
|
194
193
|
const files2 = fs.readdirSync(path4);
|
|
195
194
|
for (const file of files2) {
|
package/package.json
CHANGED
package/src/files.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { BunFile, PathLike } from 'bun'
|
|
2
1
|
import type { JsonFile, PackageJson, TextFile } from '@stacksjs/types'
|
|
3
2
|
import { detectIndent, detectNewline } from '@stacksjs/strings'
|
|
4
3
|
import { dirname, join, path as p } from '@stacksjs/path'
|
|
@@ -25,13 +24,11 @@ export async function readPackageJson(name: string, cwd?: string) {
|
|
|
25
24
|
return file.data as PackageJson
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
type Path = BunFile | PathLike
|
|
29
|
-
type Data = Blob | TypedArray | ArrayBufferLike | string | BlobPart[]
|
|
30
|
-
|
|
31
27
|
/**
|
|
32
28
|
* Writes the given text to the specified file.
|
|
33
29
|
*/
|
|
34
|
-
export async function writeFile(path:
|
|
30
|
+
export async function writeFile(path: string, data: any): Promise<number> {
|
|
31
|
+
// export async function writeFile(path: Path, data: Data): Promise<number> {
|
|
35
32
|
if (typeof path === 'string') {
|
|
36
33
|
const dirPath = dirname(path)
|
|
37
34
|
if (!await existsSync(dirPath))
|
package/src/hash.ts
CHANGED
|
@@ -4,8 +4,6 @@ import { path as p } from '@stacksjs/path'
|
|
|
4
4
|
import { fs } from './fs'
|
|
5
5
|
|
|
6
6
|
export function hashFileOrDirectory(path: string, hash: Hash): void {
|
|
7
|
-
// eslint-disable-next-line no-console
|
|
8
|
-
console.log('hashFileOrDirectory', path)
|
|
9
7
|
if (fs.statSync(path).isDirectory()) {
|
|
10
8
|
const files = fs.readdirSync(path)
|
|
11
9
|
for (const file of files) {
|