@stryke/fs 0.33.8 → 0.33.16
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/CHANGELOG.md +1280 -0
- package/README.md +18 -9
- package/dist/buffer-Ch164vki.cjs +1 -0
- package/dist/buffer-DDq-CW4J.mjs +2 -0
- package/dist/buffer-DDq-CW4J.mjs.map +1 -0
- package/dist/{buffer.d.ts → buffer-DgfUmhrc.d.mts} +8 -4
- package/dist/buffer-DgfUmhrc.d.mts.map +1 -0
- package/dist/buffer-DvCjrjQH.d.cts +32 -0
- package/dist/buffer-DvCjrjQH.d.cts.map +1 -0
- package/dist/buffer.cjs +1 -34
- package/dist/buffer.d.cts +2 -0
- package/dist/buffer.d.mts +2 -0
- package/dist/buffer.mjs +1 -1
- package/dist/{chmod-x.d.ts → chmod-x-BPr4tt2-.d.cts} +10 -6
- package/dist/chmod-x-BPr4tt2-.d.cts.map +1 -0
- package/dist/chmod-x-FOy3sak8.cjs +1 -0
- package/dist/chmod-x-QCk1GmQJ.d.mts +44 -0
- package/dist/chmod-x-QCk1GmQJ.d.mts.map +1 -0
- package/dist/chmod-x-q-TWdus7.mjs +2 -0
- package/dist/chmod-x-q-TWdus7.mjs.map +1 -0
- package/dist/chmod-x.cjs +1 -57
- package/dist/chmod-x.d.cts +2 -0
- package/dist/chmod-x.d.mts +2 -0
- package/dist/chmod-x.mjs +1 -1
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/{command-exists.d.ts → command-exists-CuieR7rx.d.cts} +6 -2
- package/dist/command-exists-CuieR7rx.d.cts.map +1 -0
- package/dist/command-exists-D1bV-wSk.cjs +1 -0
- package/dist/command-exists-Dzb2kKT4.mjs +2 -0
- package/dist/command-exists-Dzb2kKT4.mjs.map +1 -0
- package/dist/command-exists-dBdtR0xj.d.mts +22 -0
- package/dist/command-exists-dBdtR0xj.d.mts.map +1 -0
- package/dist/command-exists.cjs +1 -71
- package/dist/command-exists.d.cts +2 -0
- package/dist/command-exists.d.mts +2 -0
- package/dist/command-exists.mjs +1 -1
- package/dist/compress-BiTxso15.mjs +2 -0
- package/dist/compress-BiTxso15.mjs.map +1 -0
- package/dist/compress-BjGbQqs_.cjs +1 -0
- package/dist/compress-CLAaOwH3.d.mts +16 -0
- package/dist/compress-CLAaOwH3.d.mts.map +1 -0
- package/dist/compress-CQve2a6h.d.cts +16 -0
- package/dist/compress-CQve2a6h.d.cts.map +1 -0
- package/dist/compress.cjs +1 -26
- package/dist/compress.d.cts +2 -0
- package/dist/compress.d.mts +2 -0
- package/dist/compress.mjs +1 -1
- package/dist/constants-D58o2CiO.d.cts +5 -0
- package/dist/constants-D58o2CiO.d.cts.map +1 -0
- package/dist/constants-DZz9LJgo.d.mts +5 -0
- package/dist/constants-DZz9LJgo.d.mts.map +1 -0
- package/dist/constants.cjs +0 -1
- package/dist/constants.d.cts +2 -0
- package/dist/constants.d.mts +2 -0
- package/dist/constants.mjs +1 -0
- package/dist/{copy-file.d.ts → copy-file-B5FJHiIK.d.mts} +11 -5
- package/dist/copy-file-B5FJHiIK.d.mts.map +1 -0
- package/dist/copy-file-Bot2YNtT.mjs +2 -0
- package/dist/copy-file-Bot2YNtT.mjs.map +1 -0
- package/dist/copy-file-DjH2Ho5e.d.cts +39 -0
- package/dist/copy-file-DjH2Ho5e.d.cts.map +1 -0
- package/dist/copy-file-Y1ilzocZ.cjs +1 -0
- package/dist/copy-file.cjs +1 -48
- package/dist/copy-file.d.cts +2 -0
- package/dist/copy-file.d.mts +2 -0
- package/dist/copy-file.mjs +1 -1
- package/dist/cwd-YTg9Cx6C.mjs +2 -0
- package/dist/cwd-YTg9Cx6C.mjs.map +1 -0
- package/dist/cwd-o2vq8Tk9.cjs +1 -0
- package/dist/{exists.d.ts → exists-175EN367.d.mts} +6 -2
- package/dist/exists-175EN367.d.mts.map +1 -0
- package/dist/exists-B31lSRFp.cjs +1 -0
- package/dist/exists-CVlDImzc.d.cts +18 -0
- package/dist/exists-CVlDImzc.d.cts.map +1 -0
- package/dist/exists-Ci-9lYmi.mjs +2 -0
- package/dist/exists-Ci-9lYmi.mjs.map +1 -0
- package/dist/exists.cjs +1 -15
- package/dist/exists.d.cts +2 -0
- package/dist/exists.d.mts +2 -0
- package/dist/exists.mjs +1 -1
- package/dist/file-D1uBqkpP.d.cts +32 -0
- package/dist/file-D1uBqkpP.d.cts.map +1 -0
- package/dist/file-DauFFmfh.d.mts +32 -0
- package/dist/file-DauFFmfh.d.mts.map +1 -0
- package/dist/file-path-fns-7aKacdLg.cjs +1 -0
- package/dist/file-path-fns-BDzC2SIV.mjs +2 -0
- package/dist/file-path-fns-BDzC2SIV.mjs.map +1 -0
- package/dist/get-parent-path-COkh6Pvl.d.mts +32 -0
- package/dist/get-parent-path-COkh6Pvl.d.mts.map +1 -0
- package/dist/get-parent-path-Cbqs2km7.d.cts +32 -0
- package/dist/get-parent-path-Cbqs2km7.d.cts.map +1 -0
- package/dist/get-parent-path-CfRkaB4R.cjs +1 -0
- package/dist/get-parent-path-DLFSyxSW.mjs +2 -0
- package/dist/get-parent-path-DLFSyxSW.mjs.map +1 -0
- package/dist/get-parent-path.cjs +1 -28
- package/dist/get-parent-path.d.cts +2 -0
- package/dist/get-parent-path.d.mts +2 -0
- package/dist/get-parent-path.mjs +1 -1
- package/dist/get-workspace-root-CCNjjZGY.cjs +1 -0
- package/dist/{get-workspace-root.d.ts → get-workspace-root-DQBvBd8X.d.mts} +12 -8
- package/dist/get-workspace-root-DQBvBd8X.d.mts.map +1 -0
- package/dist/get-workspace-root-eTfm1jII.d.cts +48 -0
- package/dist/get-workspace-root-eTfm1jII.d.cts.map +1 -0
- package/dist/get-workspace-root-k66w-wLW.mjs +2 -0
- package/dist/get-workspace-root-k66w-wLW.mjs.map +1 -0
- package/dist/get-workspace-root.cjs +1 -49
- package/dist/get-workspace-root.d.cts +2 -0
- package/dist/get-workspace-root.d.mts +2 -0
- package/dist/get-workspace-root.mjs +1 -1
- package/dist/helpers-BSEQb1fp.mjs +2 -0
- package/dist/helpers-BSEQb1fp.mjs.map +1 -0
- package/dist/{helpers.d.ts → helpers-CYWFZ-Uv.d.mts} +10 -6
- package/dist/helpers-CYWFZ-Uv.d.mts.map +1 -0
- package/dist/helpers-CgMOExPa.d.cts +50 -0
- package/dist/helpers-CgMOExPa.d.cts.map +1 -0
- package/dist/helpers-_MJ6PR-g.cjs +1 -0
- package/dist/helpers.cjs +1 -49
- package/dist/helpers.d.cts +2 -0
- package/dist/helpers.d.mts +2 -0
- package/dist/helpers.mjs +1 -1
- package/dist/index.cjs +1 -269
- package/dist/index.d.cts +25 -0
- package/dist/index.d.mts +25 -0
- package/dist/index.mjs +1 -1
- package/dist/install-B3bIjHoU.mjs +2 -0
- package/dist/install-B3bIjHoU.mjs.map +1 -0
- package/dist/install-CZ_S7NHm.cjs +1 -0
- package/dist/install-CxPsLO2t.d.cts +28 -0
- package/dist/install-CxPsLO2t.d.cts.map +1 -0
- package/dist/install-dYt7hlQn.d.mts +29 -0
- package/dist/install-dYt7hlQn.d.mts.map +1 -0
- package/dist/install.cjs +1 -25
- package/dist/install.d.cts +2 -0
- package/dist/install.d.mts +2 -0
- package/dist/install.mjs +1 -1
- package/dist/is-error-CjEyTRps.cjs +1 -0
- package/dist/is-error-CjVXmD_8.mjs +2 -0
- package/dist/is-error-CjVXmD_8.mjs.map +1 -0
- package/dist/is-file-BkFQev3M.cjs +1 -0
- package/dist/is-file-CNooe8Wz.mjs +2 -0
- package/dist/is-file-CNooe8Wz.mjs.map +1 -0
- package/dist/{is-file.d.ts → is-file-DjqOQrqY.d.mts} +8 -4
- package/dist/is-file-DjqOQrqY.d.mts.map +1 -0
- package/dist/is-file-DoBi2FN9.d.cts +36 -0
- package/dist/is-file-DoBi2FN9.d.cts.map +1 -0
- package/dist/is-file.cjs +1 -29
- package/dist/is-file.d.cts +2 -0
- package/dist/is-file.d.mts +2 -0
- package/dist/is-file.mjs +1 -1
- package/dist/is-object-FBXmvehR.cjs +1 -0
- package/dist/is-object-UsKYhyC5.mjs +2 -0
- package/dist/is-object-UsKYhyC5.mjs.map +1 -0
- package/dist/is-set-string-CLeu8BKX.cjs +1 -0
- package/dist/is-set-string-Cj0g4gsG.mjs +2 -0
- package/dist/is-set-string-Cj0g4gsG.mjs.map +1 -0
- package/dist/is-string-91Z3dOKQ.mjs +2 -0
- package/dist/is-string-91Z3dOKQ.mjs.map +1 -0
- package/dist/is-string-DKgNS0jA.cjs +1 -0
- package/dist/join-paths-BHepkhAj.mjs +2 -0
- package/dist/join-paths-BHepkhAj.mjs.map +1 -0
- package/dist/join-paths-DUdaieID.cjs +1 -0
- package/dist/json-CYenVxvr.d.cts +83 -0
- package/dist/json-CYenVxvr.d.cts.map +1 -0
- package/dist/json-DH7Q6Ftp.d.mts +83 -0
- package/dist/json-DH7Q6Ftp.d.mts.map +1 -0
- package/dist/json-DKhqPjHB.cjs +6 -0
- package/dist/json-Dp4PSH2i.mjs +7 -0
- package/dist/json-Dp4PSH2i.mjs.map +1 -0
- package/dist/json.cjs +1 -41
- package/dist/json.d.cts +2 -0
- package/dist/json.d.mts +2 -0
- package/dist/json.mjs +1 -3
- package/dist/list-files-Cn_UVruo.cjs +1 -0
- package/dist/list-files-D3dQOljX.d.cts +51 -0
- package/dist/list-files-D3dQOljX.d.cts.map +1 -0
- package/dist/list-files-D3iJzEQw.d.mts +51 -0
- package/dist/list-files-D3iJzEQw.d.mts.map +1 -0
- package/dist/list-files-D__uh3tQ.mjs +2 -0
- package/dist/list-files-D__uh3tQ.mjs.map +1 -0
- package/dist/list-files.cjs +1 -55
- package/dist/list-files.d.cts +2 -0
- package/dist/list-files.d.mts +2 -0
- package/dist/list-files.mjs +1 -1
- package/dist/package-fns-BNRi_Rpc.d.cts +354 -0
- package/dist/package-fns-BNRi_Rpc.d.cts.map +1 -0
- package/dist/package-fns-C7-MKgBR.mjs +2 -0
- package/dist/package-fns-C7-MKgBR.mjs.map +1 -0
- package/dist/package-fns-CxokaGDY.d.mts +354 -0
- package/dist/package-fns-CxokaGDY.d.mts.map +1 -0
- package/dist/package-fns-YTCdMAXr.cjs +1 -0
- package/dist/package-fns.cjs +1 -99
- package/dist/package-fns.d.cts +2 -0
- package/dist/package-fns.d.mts +2 -0
- package/dist/package-fns.mjs +1 -1
- package/dist/read-file-B091zB64.mjs +2 -0
- package/dist/read-file-B091zB64.mjs.map +1 -0
- package/dist/read-file-BB2WzW-N.cjs +1 -0
- package/dist/{read-file.d.ts → read-file-Bxn1VHKv.d.cts} +8 -4
- package/dist/read-file-Bxn1VHKv.d.cts.map +1 -0
- package/dist/read-file-CRVW-wcE.d.mts +30 -0
- package/dist/read-file-CRVW-wcE.d.mts.map +1 -0
- package/dist/read-file.cjs +1 -31
- package/dist/read-file.d.cts +2 -0
- package/dist/read-file.d.mts +2 -0
- package/dist/read-file.mjs +1 -1
- package/dist/registry-B1taIPKm.mjs +2 -0
- package/dist/registry-B1taIPKm.mjs.map +1 -0
- package/dist/{registry.d.ts → registry-BQ3JXRFA.d.mts} +17 -13
- package/dist/registry-BQ3JXRFA.d.mts.map +1 -0
- package/dist/registry-BYwvM92u.cjs +1 -0
- package/dist/registry-C2A0Kau7.d.cts +53 -0
- package/dist/registry-C2A0Kau7.d.cts.map +1 -0
- package/dist/registry.cjs +1 -95
- package/dist/registry.d.cts +2 -0
- package/dist/registry.d.mts +2 -0
- package/dist/registry.mjs +1 -1
- package/dist/remove-file-BM64Brdf.mjs +2 -0
- package/dist/remove-file-BM64Brdf.mjs.map +1 -0
- package/dist/remove-file-BqlkL_Df.d.mts +16 -0
- package/dist/remove-file-BqlkL_Df.d.mts.map +1 -0
- package/dist/remove-file-XHFKELQN.cjs +1 -0
- package/dist/remove-file-lQOlxDwr.d.cts +16 -0
- package/dist/remove-file-lQOlxDwr.d.cts.map +1 -0
- package/dist/remove-file.cjs +1 -16
- package/dist/remove-file.d.cts +2 -0
- package/dist/remove-file.d.mts +2 -0
- package/dist/remove-file.mjs +1 -1
- package/dist/resolve-C_YsCFne.mjs +4 -0
- package/dist/resolve-C_YsCFne.mjs.map +1 -0
- package/dist/{resolve.d.ts → resolve-D66oIwjf.d.mts} +33 -29
- package/dist/resolve-D66oIwjf.d.mts.map +1 -0
- package/dist/resolve-DTkLQekH.cjs +3 -0
- package/dist/resolve-DubH-8qd.d.cts +106 -0
- package/dist/resolve-DubH-8qd.d.cts.map +1 -0
- package/dist/resolve-parent-path-CR8av8WP.mjs +2 -0
- package/dist/resolve-parent-path-CR8av8WP.mjs.map +1 -0
- package/dist/resolve-parent-path-D0AaW2PB.cjs +1 -0
- package/dist/resolve.cjs +1 -115
- package/dist/resolve.d.cts +2 -0
- package/dist/resolve.d.mts +2 -0
- package/dist/resolve.mjs +1 -5
- package/dist/{semver-fns.d.ts → semver-fns-B0e5zB6C.d.mts} +17 -11
- package/dist/semver-fns-B0e5zB6C.d.mts.map +1 -0
- package/dist/semver-fns-Btrm1dIF.cjs +1 -0
- package/dist/semver-fns-DjhZXnUw.d.cts +92 -0
- package/dist/semver-fns-DjhZXnUw.d.cts.map +1 -0
- package/dist/semver-fns-F_rYnwDq.mjs +2 -0
- package/dist/semver-fns-F_rYnwDq.mjs.map +1 -0
- package/dist/semver-fns.cjs +1 -40
- package/dist/semver-fns.d.cts +2 -0
- package/dist/semver-fns.d.mts +2 -0
- package/dist/semver-fns.mjs +1 -1
- package/dist/toml-CIgLQmP3.mjs +4 -0
- package/dist/toml-CIgLQmP3.mjs.map +1 -0
- package/dist/toml-D3X2QoaL.d.cts +81 -0
- package/dist/toml-D3X2QoaL.d.cts.map +1 -0
- package/dist/toml-DgVyNp_y.cjs +3 -0
- package/dist/toml-Djau1M6n.d.mts +81 -0
- package/dist/toml-Djau1M6n.d.mts.map +1 -0
- package/dist/toml.cjs +1 -40
- package/dist/toml.d.cts +2 -0
- package/dist/toml.d.mts +2 -0
- package/dist/toml.mjs +1 -3
- package/dist/tsconfig-B13IMV_0.d.mts +812 -0
- package/dist/tsconfig-B13IMV_0.d.mts.map +1 -0
- package/dist/tsconfig-B6WtgD1c.cjs +1 -0
- package/dist/tsconfig-C8ecu1-0.d.cts +812 -0
- package/dist/tsconfig-C8ecu1-0.d.cts.map +1 -0
- package/dist/tsconfig-CqvvSVuX.mjs +2 -0
- package/dist/tsconfig-CqvvSVuX.mjs.map +1 -0
- package/dist/tsconfig.cjs +1 -28
- package/dist/tsconfig.d.cts +2 -0
- package/dist/tsconfig.d.mts +2 -0
- package/dist/tsconfig.mjs +1 -1
- package/dist/write-file-BmvbsmMj.d.cts +35 -0
- package/dist/write-file-BmvbsmMj.d.cts.map +1 -0
- package/dist/write-file-CFByoJkN.mjs +2 -0
- package/dist/write-file-CFByoJkN.mjs.map +1 -0
- package/dist/write-file-CWTzQpb2.d.mts +35 -0
- package/dist/write-file-CWTzQpb2.d.mts.map +1 -0
- package/dist/write-file-CqokudVp.cjs +1 -0
- package/dist/write-file.cjs +1 -26
- package/dist/write-file.d.cts +2 -0
- package/dist/write-file.d.mts +2 -0
- package/dist/write-file.mjs +1 -1
- package/dist/yaml-6uuLoSfT.d.cts +23 -0
- package/dist/yaml-6uuLoSfT.d.cts.map +1 -0
- package/dist/yaml-CLMo56UG.mjs +2 -0
- package/dist/yaml-CLMo56UG.mjs.map +1 -0
- package/dist/yaml-Ddslc5NK.d.mts +23 -0
- package/dist/yaml-Ddslc5NK.d.mts.map +1 -0
- package/dist/yaml-q2k-BjIM.cjs +1 -0
- package/dist/yaml.cjs +1 -15
- package/dist/yaml.d.cts +2 -0
- package/dist/yaml.d.mts +2 -0
- package/dist/yaml.mjs +1 -1
- package/package.json +98 -379
- package/dist/compress.d.ts +0 -11
- package/dist/constants.d.ts +0 -1
- package/dist/get-parent-path.d.ts +0 -28
- package/dist/index.d.ts +0 -32
- package/dist/install.d.ts +0 -24
- package/dist/json.d.ts +0 -49
- package/dist/list-files.d.ts +0 -46
- package/dist/package-fns.d.ts +0 -89
- package/dist/remove-file.d.ts +0 -12
- package/dist/toml.d.ts +0 -77
- package/dist/tsconfig.d.ts +0 -8
- package/dist/write-file.d.ts +0 -30
- package/dist/yaml.d.ts +0 -18
package/dist/list-files.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { AssetGlob } from "@stryke/types/file";
|
|
2
|
-
import type { GlobOptions, Path } from "glob";
|
|
3
|
-
export type ListOptions = GlobOptions;
|
|
4
|
-
export type InferListReturnType<TOptions extends GlobOptions> = TOptions["withFileTypes"] extends true ? Path[] : string[];
|
|
5
|
-
/**
|
|
6
|
-
* A files and directories listing helper function
|
|
7
|
-
*
|
|
8
|
-
* @param filesGlob - A glob pattern to match files
|
|
9
|
-
* @returns A list of file paths
|
|
10
|
-
*/
|
|
11
|
-
export declare function list<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
|
|
12
|
-
/**
|
|
13
|
-
* A synchronous files and directories listing helper function
|
|
14
|
-
*
|
|
15
|
-
* @param filesGlob - A glob pattern to match files
|
|
16
|
-
* @returns A list of file paths
|
|
17
|
-
*/
|
|
18
|
-
export declare function listSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
|
|
19
|
-
/**
|
|
20
|
-
* A file listing helper function
|
|
21
|
-
*
|
|
22
|
-
* @param filesGlob - A glob pattern to match files
|
|
23
|
-
* @returns A list of file paths
|
|
24
|
-
*/
|
|
25
|
-
export declare function listFiles<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
|
|
26
|
-
/**
|
|
27
|
-
* A synchronous file listing helper function
|
|
28
|
-
*
|
|
29
|
-
* @param filesGlob - A glob pattern to match files
|
|
30
|
-
* @returns A list of file paths
|
|
31
|
-
*/
|
|
32
|
-
export declare function listFilesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
|
|
33
|
-
/**
|
|
34
|
-
* A directories listing helper function
|
|
35
|
-
*
|
|
36
|
-
* @param filesGlob - A glob pattern to match files
|
|
37
|
-
* @returns A list of file paths
|
|
38
|
-
*/
|
|
39
|
-
export declare function listDirectories<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
|
|
40
|
-
/**
|
|
41
|
-
* A synchronous directories listing helper function
|
|
42
|
-
*
|
|
43
|
-
* @param filesGlob - A glob pattern to match files
|
|
44
|
-
* @returns A list of file paths
|
|
45
|
-
*/
|
|
46
|
-
export declare function listDirectoriesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
|
package/dist/package-fns.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import type { PackageJson } from "@stryke/types/package-json";
|
|
2
|
-
import type { PackageManager } from "@stryke/types/package-manager";
|
|
3
|
-
import type { Range } from "semver";
|
|
4
|
-
import type { ResolveOptions } from "./resolve";
|
|
5
|
-
/**
|
|
6
|
-
* Get the package manager used in the project
|
|
7
|
-
*
|
|
8
|
-
* @param dir - The path to the project
|
|
9
|
-
* @returns The package manager used in the project
|
|
10
|
-
*/
|
|
11
|
-
export declare function getPackageManager(dir?: any): PackageManager;
|
|
12
|
-
/**
|
|
13
|
-
* Get package info
|
|
14
|
-
*
|
|
15
|
-
* @param name - The name of the package
|
|
16
|
-
* @param options - The options to use when resolving the package
|
|
17
|
-
* @returns The package info
|
|
18
|
-
*/
|
|
19
|
-
export declare function getPackageInfo(name: string, options?: ResolveOptions): Promise<{
|
|
20
|
-
name: string;
|
|
21
|
-
version: any;
|
|
22
|
-
rootPath: any;
|
|
23
|
-
packageJsonPath: any;
|
|
24
|
-
packageJson: PackageJson;
|
|
25
|
-
} | undefined>;
|
|
26
|
-
/**
|
|
27
|
-
* Get the package info from the package.json file
|
|
28
|
-
*
|
|
29
|
-
* @param cwd - The current working directory
|
|
30
|
-
* @returns The package info
|
|
31
|
-
*/
|
|
32
|
-
export declare function loadPackageJson(cwd?: any): Promise<PackageJson | null>;
|
|
33
|
-
export interface PackageExistsOptions {
|
|
34
|
-
/**
|
|
35
|
-
* The current working directory
|
|
36
|
-
*/
|
|
37
|
-
cwd?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface PackageMatchesOptions extends PackageExistsOptions {
|
|
40
|
-
/**
|
|
41
|
-
* The version range of the package to check
|
|
42
|
-
*/
|
|
43
|
-
version?: string | Range;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Check if a package is listed in the package.json file
|
|
47
|
-
*
|
|
48
|
-
* @param name - The name of the package
|
|
49
|
-
* @param cwd - The current working directory
|
|
50
|
-
* @returns An indicator specifying if the package is listed
|
|
51
|
-
*/
|
|
52
|
-
export declare function isPackageListed(name: string, cwd?: string): Promise<boolean>;
|
|
53
|
-
/**
|
|
54
|
-
* Check if a package is listed in the package.json file
|
|
55
|
-
*
|
|
56
|
-
* @param name - The name of the package
|
|
57
|
-
* @param options - The options to use when checking if the package is listed
|
|
58
|
-
* @returns An indicator specifying if the package is listed
|
|
59
|
-
*/
|
|
60
|
-
export declare function isPackageListed(name: string, options?: PackageExistsOptions): Promise<boolean>;
|
|
61
|
-
export interface GetPackageListingReturn {
|
|
62
|
-
version: string;
|
|
63
|
-
type: "dependencies" | "devDependencies";
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Return the package version and dependency type listed in the package.json file
|
|
67
|
-
*
|
|
68
|
-
* @param name - The name of the package
|
|
69
|
-
* @param cwdOrOptions - The current working directory or options to use when checking if the package is listed
|
|
70
|
-
* @returns The version and type of the package if listed, otherwise undefined
|
|
71
|
-
*/
|
|
72
|
-
export declare function getPackageListing(name: string, cwdOrOptions?: string | PackageExistsOptions): Promise<GetPackageListingReturn | undefined>;
|
|
73
|
-
/**
|
|
74
|
-
* Check if a package version matches a specific version range
|
|
75
|
-
*
|
|
76
|
-
* @param name - The name of the package
|
|
77
|
-
* @param version - The version to check against
|
|
78
|
-
* @param cwd - The current working directory
|
|
79
|
-
* @returns An indicator specifying if the package version matches the range
|
|
80
|
-
*/
|
|
81
|
-
export declare function doesPackageMatch(name: string, version: string, cwd?: string): Promise<boolean>;
|
|
82
|
-
/**
|
|
83
|
-
* Check if a package exists
|
|
84
|
-
*
|
|
85
|
-
* @param name - The name of the package
|
|
86
|
-
* @param options - The options to use when resolving the package
|
|
87
|
-
* @returns An indicator specifying if the package exists
|
|
88
|
-
*/
|
|
89
|
-
export declare function isPackageExists(name: string, options?: ResolveOptions): boolean;
|
package/dist/remove-file.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Remove the given content to the given file path
|
|
3
|
-
*
|
|
4
|
-
* @param filePath - The file path to remove to
|
|
5
|
-
*/
|
|
6
|
-
export declare const removeFileSync: (filePath: string) => void;
|
|
7
|
-
/**
|
|
8
|
-
* Remove the given content to the given file path
|
|
9
|
-
*
|
|
10
|
-
* @param filePath - The file path to read to
|
|
11
|
-
*/
|
|
12
|
-
export declare const removeFile: (filePath: string) => Promise<void>;
|
package/dist/toml.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export type XOptions = null | {
|
|
2
|
-
readonly keys?: null | RegExp;
|
|
3
|
-
readonly order?: boolean;
|
|
4
|
-
readonly exact?: boolean;
|
|
5
|
-
readonly multi?: boolean;
|
|
6
|
-
readonly longer?: boolean;
|
|
7
|
-
readonly string?: boolean;
|
|
8
|
-
readonly comment?: boolean;
|
|
9
|
-
readonly literal?: boolean;
|
|
10
|
-
readonly null?: boolean;
|
|
11
|
-
readonly tag?: null | (<Table extends object & {
|
|
12
|
-
[key: string | symbol]: any;
|
|
13
|
-
}, Key extends string | symbol, Array extends any[], Index extends number, Tag extends string>(this: void, each: {
|
|
14
|
-
table: Table;
|
|
15
|
-
key: Key;
|
|
16
|
-
tag: Tag;
|
|
17
|
-
} | {
|
|
18
|
-
array: Array;
|
|
19
|
-
index: Index;
|
|
20
|
-
tag: Tag;
|
|
21
|
-
} | {
|
|
22
|
-
table: Table;
|
|
23
|
-
key: Key;
|
|
24
|
-
array: Array;
|
|
25
|
-
index: Index;
|
|
26
|
-
tag: Tag;
|
|
27
|
-
}) => void);
|
|
28
|
-
};
|
|
29
|
-
export interface TomlReadOptions {
|
|
30
|
-
specificationVersion?: 1.0 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1;
|
|
31
|
-
multilineStringJoiner?: string;
|
|
32
|
-
useBigInt?: boolean | number;
|
|
33
|
-
xOptions?: XOptions;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Reads a TOML file and returns the object the TOML content represents.
|
|
37
|
-
*
|
|
38
|
-
* @param path - A path to a file.
|
|
39
|
-
* @param options - TOML parse options
|
|
40
|
-
* @returns Object the TOML content of the file represents
|
|
41
|
-
*/
|
|
42
|
-
export declare function readTomlFileSync<T extends object = any>(path: string, options?: TomlReadOptions): T;
|
|
43
|
-
/**
|
|
44
|
-
* Reads a TOML file and returns the object the TOML content represents.
|
|
45
|
-
*
|
|
46
|
-
* @param path - A path to a file.
|
|
47
|
-
* @param options - TOML parse options
|
|
48
|
-
* @returns Object the TOML content of the file represents
|
|
49
|
-
*/
|
|
50
|
-
export declare function readTomlFile<T extends object = any>(path: string, options?: TomlReadOptions): Promise<T>;
|
|
51
|
-
export interface TomlWriteOptions {
|
|
52
|
-
integer?: number;
|
|
53
|
-
newline?: "\n" | "\r\n";
|
|
54
|
-
newlineAround?: "document" | "section" | "header" | "pairs" | "pair";
|
|
55
|
-
indent?: string | number;
|
|
56
|
-
T?: "T" | "t" | " ";
|
|
57
|
-
Z?: "Z" | "z";
|
|
58
|
-
xNull?: boolean;
|
|
59
|
-
xBeforeNewlineInMultilineTable?: "," | "";
|
|
60
|
-
forceInlineArraySpacing?: 0 | 1 | 2 | 3;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Reads a TOML file and returns the object the TOML content represents.
|
|
64
|
-
*
|
|
65
|
-
* @param path - A path to a file.
|
|
66
|
-
* @param data - data which should be serialized/formatted to TOML and written to the file
|
|
67
|
-
* @param options - TOML parse options
|
|
68
|
-
*/
|
|
69
|
-
export declare function writeTomlFileSync<T extends object = any>(path: string, data: T, options?: TomlWriteOptions): void;
|
|
70
|
-
/**
|
|
71
|
-
* Reads a TOML file and returns the object the TOML content represents.
|
|
72
|
-
*
|
|
73
|
-
* @param path - A path to a file.
|
|
74
|
-
* @param data - data which should be serialized/formatted to TOML and written to the file
|
|
75
|
-
* @param options - TOML parse options
|
|
76
|
-
*/
|
|
77
|
-
export declare function writeTomlFile<T extends object = any>(path: string, data: T, options?: TomlWriteOptions): Promise<void>;
|
package/dist/tsconfig.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TsConfigJson } from "@stryke/types/tsconfig";
|
|
2
|
-
/**
|
|
3
|
-
* Loads a tsconfig.json file and returns the parsed JSON object.
|
|
4
|
-
*
|
|
5
|
-
* @param filePath - The directory to start searching for the tsconfig.json file.
|
|
6
|
-
* @returns The parsed tsconfig.json object or null if not found.
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadTsConfig(filePath?: string): Promise<TsConfigJson>;
|
package/dist/write-file.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Abortable } from "node:events";
|
|
2
|
-
import type { WriteFileOptions as FSWriteFileOptions, Mode, ObjectEncodingOptions, OpenMode } from "node:fs";
|
|
3
|
-
import type { Encoding } from "./constants";
|
|
4
|
-
export interface WriteFileOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Whether to create the directory if it does not exist
|
|
7
|
-
*
|
|
8
|
-
* @defaultValue true
|
|
9
|
-
*/
|
|
10
|
-
createDirectory?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Write the given content to the given file path
|
|
14
|
-
*
|
|
15
|
-
* @param filePath - The file path to write to
|
|
16
|
-
* @param content - The content to write to the file
|
|
17
|
-
*/
|
|
18
|
-
export declare const writeFileSync: (filePath: string, content?: string, options?: WriteFileOptions & FSWriteFileOptions) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Read the given content to the given file path
|
|
21
|
-
*
|
|
22
|
-
* @param filePath - The file path to read to
|
|
23
|
-
* @param content - The content to write to the file
|
|
24
|
-
* @returns The content of the file
|
|
25
|
-
*/
|
|
26
|
-
export declare const writeFile: (filePath: string, content?: string, options?: WriteFileOptions & ((ObjectEncodingOptions & {
|
|
27
|
-
mode?: Mode | undefined;
|
|
28
|
-
flag?: OpenMode | undefined;
|
|
29
|
-
flush?: boolean | undefined;
|
|
30
|
-
} & Abortable) | Encoding)) => Promise<void>;
|
package/dist/yaml.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from "yaml";
|
|
2
|
-
export type YamlReadOptions = ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions;
|
|
3
|
-
/**
|
|
4
|
-
* Reads a YAML file and returns the object the YAML content represents.
|
|
5
|
-
*
|
|
6
|
-
* @param path - A path to a file.
|
|
7
|
-
* @param options - YAML parse options
|
|
8
|
-
* @returns Object the YAML content of the file represents
|
|
9
|
-
*/
|
|
10
|
-
export declare function readYamlFileSync<T extends object = any>(path: string, options?: YamlReadOptions): T;
|
|
11
|
-
/**
|
|
12
|
-
* Reads a YAML file and returns the object the YAML content represents.
|
|
13
|
-
*
|
|
14
|
-
* @param path - A path to a file.
|
|
15
|
-
* @param options - YAML parse options
|
|
16
|
-
* @returns Object the YAML content of the file represents
|
|
17
|
-
*/
|
|
18
|
-
export declare function readYamlFile<T extends object = any>(path: string, options?: YamlReadOptions): Promise<T>;
|