@stacksjs/storage 0.59.3 → 0.59.4

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/files.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { JsonFile, PackageJson, TextFile } from '@stacksjs/types';
1
+ import type { JsonFile, TextFile } from '@stacksjs/types';
2
2
  /**
3
3
  * Reads a JSON file and returns the parsed data.
4
4
  */
package/dist/fs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import * as fs from 'fs-extra';
2
- import { pathExists as existsSync, mkdirSync, writeFileSync } from 'fs-extra';
2
+ import { pathExists as existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs-extra';
3
3
  export declare function exists(path: string): Promise<boolean>;
4
- export { fs, existsSync, mkdirSync, writeFileSync };
4
+ export { fs, existsSync, mkdirSync, writeFileSync, readFileSync };
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {contains} from "@stacksjs/arrays";
17
17
 
18
18
  // src/fs.ts
19
19
  import * as fs from "fs-extra";
20
- import {pathExists as existsSync, mkdirSync, writeFileSync} from "fs-extra";
20
+ import {pathExists as existsSync, mkdirSync, readFileSync, writeFileSync} from "fs-extra";
21
21
  async function exists(path) {
22
22
  return await existsSync(path);
23
23
  }
@@ -482,6 +482,11 @@ __export(exports_storage, {
482
482
  return readJsonFile;
483
483
  }
484
484
  },
485
+ readFileSync: () => {
486
+ {
487
+ return readFileSync;
488
+ }
489
+ },
485
490
  put: () => {
486
491
  {
487
492
  return put;
@@ -766,6 +771,7 @@ export {
766
771
  readTextFile,
767
772
  readPackageJson,
768
773
  readJsonFile,
774
+ readFileSync,
769
775
  put,
770
776
  mkdirSync,
771
777
  isFolder2 as isFolder,
package/dist/zip.d.ts CHANGED
@@ -4,12 +4,12 @@ import type { ZlibCompressionOptions } from 'bun';
4
4
  interface ZipOptions {
5
5
  cwd?: string;
6
6
  }
7
- export declare function zip(from: string | string[], to?: string, options?: ZipOptions): Promise<import("neverthrow").Result<import("bun").Subprocess<import("bun").SpawnOptions.Writable, import("bun").SpawnOptions.Readable, import("bun").SpawnOptions.Readable>, Error>>;
8
- export declare function unzip(paths: string | string[]): Promise<import("neverthrow").Result<import("bun").Subprocess<import("bun").SpawnOptions.Writable, import("bun").SpawnOptions.Readable, import("bun").SpawnOptions.Readable>, Error>>;
9
- export declare function archive(paths: string | string[]): Promise<import("neverthrow").Result<import("bun").Subprocess<import("bun").SpawnOptions.Writable, import("bun").SpawnOptions.Readable, import("bun").SpawnOptions.Readable>, Error>>;
10
- export declare function unarchive(paths: string | string[]): Promise<import("neverthrow").Result<import("bun").Subprocess<import("bun").SpawnOptions.Writable, import("bun").SpawnOptions.Readable, import("bun").SpawnOptions.Readable>, Error>>;
11
- export declare function compress(paths: string[]): Promise<import("neverthrow").Result<import("bun").Subprocess<import("bun").SpawnOptions.Writable, import("bun").SpawnOptions.Readable, import("bun").SpawnOptions.Readable>, Error>>;
12
- export declare function decompress(paths: string | string[]): Promise<import("neverthrow").Result<import("bun").Subprocess<import("bun").SpawnOptions.Writable, import("bun").SpawnOptions.Readable, import("bun").SpawnOptions.Readable>, Error>>;
7
+ export declare function zip(from: string | string[], to?: string, options?: ZipOptions): Promise<any>;
8
+ export declare function unzip(paths: string | string[]): Promise<any>;
9
+ export declare function archive(paths: string | string[]): Promise<any>;
10
+ export declare function unarchive(paths: string | string[]): Promise<any>;
11
+ export declare function compress(paths: string[]): Promise<any>;
12
+ export declare function decompress(paths: string | string[]): Promise<any>;
13
13
  export declare function gzipSync(data: Uint8Array, options?: ZlibCompressionOptions): Uint8Array;
14
14
  export declare function gunzipSync(data: Uint8Array): Uint8Array;
15
15
  export declare function deflateSync(data: Uint8Array, options?: ZlibCompressionOptions): Uint8Array;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/storage",
3
3
  "type": "module",
4
- "version": "0.59.3",
4
+ "version": "0.59.4",
5
5
  "description": "The Stacks file system.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "scripts": {
49
49
  "build": "bun --bun build.ts",
50
50
  "typecheck": "bun --bun tsc --noEmit",
51
- "prepublishOnly": "bun --bun run build"
51
+ "prepublishOnly": "bun run build"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@stacksjs/arrays": "latest",
package/src/fs.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as fs from 'fs-extra'
2
- import { pathExists as existsSync, mkdirSync, writeFileSync } from 'fs-extra'
2
+ import { pathExists as existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs-extra'
3
3
 
4
4
  export async function exists(path: string): Promise<boolean> {
5
5
  return await existsSync(path)
6
6
  }
7
7
 
8
- export { fs, existsSync, mkdirSync, writeFileSync }
8
+ export { fs, existsSync, mkdirSync, writeFileSync, readFileSync }