@stryke/fs 0.9.1 → 0.9.2
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/copy-file.cjs +11 -0
- package/dist/{files/copy-files.d.ts → copy-file.d.ts} +1 -1
- package/dist/copy-file.mjs +1 -0
- package/dist/get-tsconfig.cjs +112 -0
- package/dist/get-tsconfig.mjs +4 -0
- package/dist/{files/helpers.cjs → helpers.cjs} +1 -1
- package/dist/helpers.mjs +1 -0
- package/dist/index.cjs +118 -8
- package/dist/index.d.ts +12 -2
- package/dist/index.mjs +1 -1
- package/dist/{package/install.cjs → install.cjs} +5 -5
- package/dist/{package/install.d.ts → install.d.ts} +1 -1
- package/dist/install.mjs +1 -0
- package/dist/{files/list-files.cjs → list-files.cjs} +2 -2
- package/dist/list-files.mjs +1 -0
- package/dist/{package/package-fns.cjs → package-fns.cjs} +17 -17
- package/dist/{package/package-fns.d.ts → package-fns.d.ts} +3 -3
- package/dist/package-fns.mjs +1 -0
- package/dist/{files/read-file.cjs → read-file.cjs} +1 -1
- package/dist/read-file.mjs +1 -0
- package/dist/{package/semver-fns.d.ts → semver-fns.d.ts} +2 -2
- package/dist/{files/write-file.cjs → write-file.cjs} +3 -3
- package/dist/write-file.mjs +3 -0
- package/package.json +94 -148
- package/dist/files/copy-files.cjs +0 -15
- package/dist/files/copy-files.mjs +0 -1
- package/dist/files/helpers.mjs +0 -1
- package/dist/files/index.cjs +0 -93
- package/dist/files/index.d.ts +0 -8
- package/dist/files/index.mjs +0 -1
- package/dist/files/list-files.mjs +0 -1
- package/dist/files/read-file.mjs +0 -1
- package/dist/files/write-file.mjs +0 -3
- package/dist/package/get-tsconfig.cjs +0 -110
- package/dist/package/get-tsconfig.mjs +0 -4
- package/dist/package/index.cjs +0 -49
- package/dist/package/index.d.ts +0 -4
- package/dist/package/index.mjs +0 -1
- package/dist/package/install.mjs +0 -1
- package/dist/package/package-fns.mjs +0 -1
- /package/dist/{files/chmod-x.cjs → chmod-x.cjs} +0 -0
- /package/dist/{files/chmod-x.d.ts → chmod-x.d.ts} +0 -0
- /package/dist/{files/chmod-x.mjs → chmod-x.mjs} +0 -0
- /package/dist/{files/constants.cjs → constants.cjs} +0 -0
- /package/dist/{files/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{files/constants.mjs → constants.mjs} +0 -0
- /package/dist/{package/get-tsconfig.d.ts → get-tsconfig.d.ts} +0 -0
- /package/dist/{files/helpers.d.ts → helpers.d.ts} +0 -0
- /package/dist/{files/list-files.d.ts → list-files.d.ts} +0 -0
- /package/dist/{files/read-file.d.ts → read-file.d.ts} +0 -0
- /package/dist/{files/remove-file.cjs → remove-file.cjs} +0 -0
- /package/dist/{files/remove-file.d.ts → remove-file.d.ts} +0 -0
- /package/dist/{files/remove-file.mjs → remove-file.mjs} +0 -0
- /package/dist/{package/semver-fns.cjs → semver-fns.cjs} +0 -0
- /package/dist/{package/semver-fns.mjs → semver-fns.mjs} +0 -0
- /package/dist/{files/write-file.d.ts → write-file.d.ts} +0 -0
package/dist/package/index.cjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _getTsconfig = require("./get-tsconfig.cjs");
|
|
7
|
-
Object.keys(_getTsconfig).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _getTsconfig[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _getTsconfig[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _install = require("./install.cjs");
|
|
18
|
-
Object.keys(_install).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _install[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _install[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _packageFns = require("./package-fns.cjs");
|
|
29
|
-
Object.keys(_packageFns).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _packageFns[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _packageFns[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _semverFns = require("./semver-fns.cjs");
|
|
40
|
-
Object.keys(_semverFns).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _semverFns[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _semverFns[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
package/dist/package/index.d.ts
DELETED
package/dist/package/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"./get-tsconfig";export*from"./install";export*from"./package-fns";export*from"./semver-fns";
|
package/dist/package/install.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{StormJSON as s}from"@stryke/json/storm-json";import{resolvePackage as g}from"@stryke/path/resolve";import{exists as P,findFileName as f,findFilePath as i,joinPaths as l}from"@stryke/path/utilities";import{getParentPath as p}from"@stryke/path/utilities/get-parent-path";import{getWorkspaceRoot as k}from"@stryke/path/workspace/get-workspace-root";import{PackageManagerLockFiles as n,PackageManagers as o}from"@stryke/types/utility-types/package-manager";import{readFile as c}from"node:fs/promises";export function getPackageManager(a=k()){const e=p([n.NPM,n.YARN,n.PNPM,n.BUN],a);if(!e)return o.PNPM;switch(f(e)){case n.YARN:return o.YARN;case n.PNPM:return o.PNPM;case n.BUN:return o.BUN;default:return o.NPM}}async function m(a){let e;for(;;){if(!a)return;const t=i(a);if(t===a)return;if(a=t,e=l(a,"package.json"),await P(e))break}return e}async function u(a,e={}){const t=await g(a,e);if(t)return m(t)}export async function getPackageInfo(a,e={}){const t=await u(a,e);if(!t)return;const r=s.parse(await c(t,"utf8"));return{name:a,version:r.version,rootPath:i(t),packageJsonPath:t,packageJson:r}}export async function getPackageInfoSync(a,e={}){const t=await u(a,e);if(!t)return;const r=s.parse(await c(t,"utf8"));return{name:a,version:r.version,rootPath:i(t),packageJsonPath:t,packageJson:r}}export async function loadPackageJSON(a=k()){let e=p("package.json",a,{skipCwd:!1});return!e||!await P(e)?null:s.parse(await c(e,"utf8"))}export async function isPackageListed(a,e){const t=await loadPackageJSON(e)??{};return a in(t.dependencies??{})||a in(t.devDependencies??{})}export function isPackageExists(a,e={}){return!!g(a,e)}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|