@stryke/fs 0.1.1 → 0.1.3

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.
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.packageExists = exports.install = void 0;
7
7
  var _installPkg = require("@antfu/install-pkg");
8
8
  var _resolve = require("@stryke/path/resolve/resolve");
9
+ require("tinyexec");
9
10
  const install = (t, s) => (0, _installPkg.installPackage)(t, s),
10
11
  packageExists = async (t, s) => {
11
12
  const r = await (0, _resolve.resolve)(s?.cwd || process.cwd());
@@ -0,0 +1,17 @@
1
+ import { type InstallPackageOptions } from "@antfu/install-pkg";
2
+ import "tinyexec";
3
+ /**
4
+ * Install a package
5
+ *
6
+ * @param name - The name of the package to install
7
+ * @param options - The options to use when installing the package
8
+ * @returns The result of the command or an exception
9
+ */
10
+ export declare const install: (names: string | string[], options?: InstallPackageOptions) => Promise<import("tinyexec").Output>;
11
+ /**
12
+ * Check if a package exists and install it if it does not
13
+ *
14
+ * @param name - The name of the package to check
15
+ * @param options - The options to use when installing the package
16
+ */
17
+ export declare const packageExists: (name: string, options?: InstallPackageOptions) => Promise<void>;
@@ -1 +1 @@
1
- import{installPackage as c}from"@antfu/install-pkg";import{resolve as a}from"@stryke/path/resolve/resolve";export const install=(t,s)=>c(t,s),packageExists=async(t,s)=>{const r=await a(s?.cwd||process.cwd());try{a(t,{paths:[r]})}catch{install(t,s)}};
1
+ import{installPackage as c}from"@antfu/install-pkg";import{resolve as a}from"@stryke/path/resolve/resolve";import"tinyexec";export const install=(t,s)=>c(t,s),packageExists=async(t,s)=>{const r=await a(s?.cwd||process.cwd());try{a(t,{paths:[r]})}catch{install(t,s)}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/fs",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "A package containing various file system utilities that expand the functionality of NodeJs's `fs` module.",
6
6
  "repository": {
@@ -17,11 +17,15 @@
17
17
  "chalk": "^5.4.1",
18
18
  "nanotar": "^0.2.0",
19
19
  "semver": "7.7.1",
20
- "@stryke/json": ">=0.1.0",
21
- "@stryke/path": ">=0.1.0",
22
- "@stryke/types": ">=0.1.0"
20
+ "@stryke/json": ">=0.1.1",
21
+ "@stryke/path": ">=0.1.1",
22
+ "@stryke/types": ">=0.1.1"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^22.13.1",
26
+ "nx": "^20.4.1",
27
+ "tinyexec": "^0.3.2"
23
28
  },
24
- "devDependencies": { "@types/node": "^22.13.1", "nx": "^20.4.1" },
25
29
  "publishConfig": { "access": "public" },
26
30
  "sideEffects": false,
27
31
  "files": ["dist/**/*"],