@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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/helpers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Create a directory if it does not exist.
|
|
4
|
+
*
|
|
5
|
+
* @param path - The directory path to check
|
|
6
|
+
* @returns An indicator specifying if the directory exists
|
|
7
|
+
*/
|
|
8
|
+
declare function createDirectorySync(path: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Create a directory if it does not exist.
|
|
11
|
+
*
|
|
12
|
+
* @param path - The directory path to check
|
|
13
|
+
* @returns An indicator specifying if the directory exists
|
|
14
|
+
*/
|
|
15
|
+
declare function createDirectory(path: string): Promise<string | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Remove a directory if it exists.
|
|
18
|
+
*
|
|
19
|
+
* @param path - The directory path to check
|
|
20
|
+
* @returns An indicator specifying if the directory exists
|
|
21
|
+
*/
|
|
22
|
+
declare function removeDirectorySync(path: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Remove a directory if it exists.
|
|
25
|
+
*
|
|
26
|
+
* @param path - The directory path to check
|
|
27
|
+
* @returns An indicator specifying if the directory exists
|
|
28
|
+
*/
|
|
29
|
+
declare function removeDirectory(path: string): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Extracts a file from a given tarball to the specified destination.
|
|
32
|
+
*
|
|
33
|
+
* @param tarballPath - The path to the tarball from where the file should be extracted.
|
|
34
|
+
* @param file - The path to the file inside the tarball.
|
|
35
|
+
* @param destinationFilePath - The destination file path.
|
|
36
|
+
* @returns True if the file was extracted successfully, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
declare function extractFileFromTar(tarballPath: string, file: string, destinationFilePath: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Extracts a file from a given TarGzip to the specified destination.
|
|
41
|
+
*
|
|
42
|
+
* @param tarballPath - The path to the tarball from where the file should be extracted.
|
|
43
|
+
* @param file - The path to the file inside the tarball.
|
|
44
|
+
* @param destinationFilePath - The destination file path.
|
|
45
|
+
* @returns True if the file was extracted successfully, false otherwise.
|
|
46
|
+
*/
|
|
47
|
+
declare function extractFileFromTarGzip(tarballPath: string, file: string, destinationFilePath: string): Promise<void>;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { removeDirectory as a, extractFileFromTarGzip as i, createDirectorySync as n, removeDirectorySync as o, extractFileFromTar as r, createDirectory as t };
|
|
50
|
+
//# sourceMappingURL=helpers-CgMOExPa.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers-CgMOExPa.d.cts","names":[],"sources":["../src/helpers.ts"],"sourcesContent":[],"mappings":";;AA6BA;AAcA;AAcA;AAcA;AAgBA;AA4BsB,iBAtFN,mBAAA,CAyFa,IAAA,EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;;;iBA3EP,eAAA,gBAA4B;;;;;;;iBAclC,mBAAA;;;;;;;iBAcM,eAAA,gBAA4B;;;;;;;;;iBAgB5B,kBAAA,kEAGO;;;;;;;;;iBAyBP,sBAAA,kEAGO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./exists-B31lSRFp.cjs`);let n=require(`node:fs`),r=require(`node:fs/promises`),i=require(`nanotar`);function a(e){if(!t.n(e))return(0,n.mkdirSync)(e,{recursive:!0})}async function o(e){if(!await t.t(e))return(0,r.mkdir)(e,{recursive:!0})}function s(e){if(t.n(e))return(0,n.rmSync)(e,{recursive:!0})}async function c(e){if(t.n(e))return(0,r.rm)(e,{recursive:!0})}async function l(e,a,o){let s=(0,i.parseTar)(await(0,r.readFile)(e)).find(e=>e.name===a);s?.data&&(await t.t(o)||await(0,r.mkdir)(o,{recursive:!0}),(0,n.createWriteStream)(o).write(s.data))}async function u(e,a,o){let s=(await(0,i.parseTarGzip)(await(0,r.readFile)(e))).find(e=>e.name===a);s?.data&&(await t.t(o)||await(0,r.mkdir)(o,{recursive:!0}),(0,n.createWriteStream)(o).write(s.data))}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
package/dist/helpers.cjs
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createDirectory = createDirectory;
|
|
7
|
-
exports.createDirectorySync = createDirectorySync;
|
|
8
|
-
exports.extractFileFromTar = extractFileFromTar;
|
|
9
|
-
exports.extractFileFromTarGzip = extractFileFromTarGzip;
|
|
10
|
-
exports.removeDirectory = removeDirectory;
|
|
11
|
-
exports.removeDirectorySync = removeDirectorySync;
|
|
12
|
-
var _nanotar = require("nanotar");
|
|
13
|
-
var _nodeFs = require("node:fs");
|
|
14
|
-
var _promises = require("node:fs/promises");
|
|
15
|
-
var _exists = require("./exists.cjs");
|
|
16
|
-
function createDirectorySync(r) {
|
|
17
|
-
if (!(0, _exists.existsSync)(r)) return (0, _nodeFs.mkdirSync)(r, {
|
|
18
|
-
recursive: !0
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
async function createDirectory(r) {
|
|
22
|
-
if (!(await (0, _exists.exists)(r))) return (0, _promises.mkdir)(r, {
|
|
23
|
-
recursive: !0
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function removeDirectorySync(r) {
|
|
27
|
-
if ((0, _exists.existsSync)(r)) return (0, _nodeFs.rmSync)(r, {
|
|
28
|
-
recursive: !0
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
async function removeDirectory(r) {
|
|
32
|
-
if ((0, _exists.existsSync)(r)) return (0, _promises.rm)(r, {
|
|
33
|
-
recursive: !0
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
async function extractFileFromTar(r, i, t) {
|
|
37
|
-
const e = (0, _nanotar.parseTar)(await (0, _promises.readFile)(r)).find(n => n.name === i);
|
|
38
|
-
if (!e?.data) return;
|
|
39
|
-
(await (0, _exists.exists)(t)) || (await (0, _promises.mkdir)(t, {
|
|
40
|
-
recursive: !0
|
|
41
|
-
})), (0, _nodeFs.createWriteStream)(t).write(e.data);
|
|
42
|
-
}
|
|
43
|
-
async function extractFileFromTarGzip(r, i, t) {
|
|
44
|
-
const e = (await (0, _nanotar.parseTarGzip)(await (0, _promises.readFile)(r))).find(n => n.name === i);
|
|
45
|
-
if (!e?.data) return;
|
|
46
|
-
(await (0, _exists.exists)(t)) || (await (0, _promises.mkdir)(t, {
|
|
47
|
-
recursive: !0
|
|
48
|
-
})), (0, _nodeFs.createWriteStream)(t).write(e.data);
|
|
49
|
-
}
|
|
1
|
+
const e=require(`./helpers-_MJ6PR-g.cjs`);exports.createDirectory=e.t,exports.createDirectorySync=e.n,exports.extractFileFromTar=e.r,exports.extractFileFromTarGzip=e.i,exports.removeDirectory=e.a,exports.removeDirectorySync=e.o;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CgMOExPa.cjs";
|
|
2
|
+
export { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CYWFZ-Uv.mjs";
|
|
2
|
+
export { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync };
|
package/dist/helpers.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"./helpers-BSEQb1fp.mjs";export{a as createDirectory,n as createDirectorySync,i as extractFileFromTar,t as extractFileFromTarGzip,e as removeDirectory,r as removeDirectorySync};
|
package/dist/index.cjs
CHANGED
|
@@ -1,269 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _buffer = require("./buffer.cjs");
|
|
7
|
-
Object.keys(_buffer).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _buffer[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _buffer[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _chmodX = require("./chmod-x.cjs");
|
|
18
|
-
Object.keys(_chmodX).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _chmodX[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _chmodX[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _commandExists = require("./command-exists.cjs");
|
|
29
|
-
Object.keys(_commandExists).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _commandExists[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _commandExists[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _compress = require("./compress.cjs");
|
|
40
|
-
Object.keys(_compress).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _compress[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _compress[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _constants = require("./constants.cjs");
|
|
51
|
-
Object.keys(_constants).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _constants[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _constants[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _copyFile = require("./copy-file.cjs");
|
|
62
|
-
Object.keys(_copyFile).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _copyFile[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _copyFile[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _exists = require("./exists.cjs");
|
|
73
|
-
Object.keys(_exists).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _exists[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _exists[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _getParentPath = require("./get-parent-path.cjs");
|
|
84
|
-
Object.keys(_getParentPath).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _getParentPath[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _getParentPath[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _getWorkspaceRoot = require("./get-workspace-root.cjs");
|
|
95
|
-
Object.keys(_getWorkspaceRoot).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _getWorkspaceRoot[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _getWorkspaceRoot[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _helpers = require("./helpers.cjs");
|
|
106
|
-
Object.keys(_helpers).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _helpers[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return _helpers[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
var _install = require("./install.cjs");
|
|
117
|
-
Object.keys(_install).forEach(function (key) {
|
|
118
|
-
if (key === "default" || key === "__esModule") return;
|
|
119
|
-
if (key in exports && exports[key] === _install[key]) return;
|
|
120
|
-
Object.defineProperty(exports, key, {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _install[key];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
var _isFile = require("./is-file.cjs");
|
|
128
|
-
Object.keys(_isFile).forEach(function (key) {
|
|
129
|
-
if (key === "default" || key === "__esModule") return;
|
|
130
|
-
if (key in exports && exports[key] === _isFile[key]) return;
|
|
131
|
-
Object.defineProperty(exports, key, {
|
|
132
|
-
enumerable: true,
|
|
133
|
-
get: function () {
|
|
134
|
-
return _isFile[key];
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
var _json = require("./json.cjs");
|
|
139
|
-
Object.keys(_json).forEach(function (key) {
|
|
140
|
-
if (key === "default" || key === "__esModule") return;
|
|
141
|
-
if (key in exports && exports[key] === _json[key]) return;
|
|
142
|
-
Object.defineProperty(exports, key, {
|
|
143
|
-
enumerable: true,
|
|
144
|
-
get: function () {
|
|
145
|
-
return _json[key];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
var _listFiles = require("./list-files.cjs");
|
|
150
|
-
Object.keys(_listFiles).forEach(function (key) {
|
|
151
|
-
if (key === "default" || key === "__esModule") return;
|
|
152
|
-
if (key in exports && exports[key] === _listFiles[key]) return;
|
|
153
|
-
Object.defineProperty(exports, key, {
|
|
154
|
-
enumerable: true,
|
|
155
|
-
get: function () {
|
|
156
|
-
return _listFiles[key];
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
var _packageFns = require("./package-fns.cjs");
|
|
161
|
-
Object.keys(_packageFns).forEach(function (key) {
|
|
162
|
-
if (key === "default" || key === "__esModule") return;
|
|
163
|
-
if (key in exports && exports[key] === _packageFns[key]) return;
|
|
164
|
-
Object.defineProperty(exports, key, {
|
|
165
|
-
enumerable: true,
|
|
166
|
-
get: function () {
|
|
167
|
-
return _packageFns[key];
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
var _readFile = require("./read-file.cjs");
|
|
172
|
-
Object.keys(_readFile).forEach(function (key) {
|
|
173
|
-
if (key === "default" || key === "__esModule") return;
|
|
174
|
-
if (key in exports && exports[key] === _readFile[key]) return;
|
|
175
|
-
Object.defineProperty(exports, key, {
|
|
176
|
-
enumerable: true,
|
|
177
|
-
get: function () {
|
|
178
|
-
return _readFile[key];
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
var _registry = require("./registry.cjs");
|
|
183
|
-
Object.keys(_registry).forEach(function (key) {
|
|
184
|
-
if (key === "default" || key === "__esModule") return;
|
|
185
|
-
if (key in exports && exports[key] === _registry[key]) return;
|
|
186
|
-
Object.defineProperty(exports, key, {
|
|
187
|
-
enumerable: true,
|
|
188
|
-
get: function () {
|
|
189
|
-
return _registry[key];
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
var _removeFile = require("./remove-file.cjs");
|
|
194
|
-
Object.keys(_removeFile).forEach(function (key) {
|
|
195
|
-
if (key === "default" || key === "__esModule") return;
|
|
196
|
-
if (key in exports && exports[key] === _removeFile[key]) return;
|
|
197
|
-
Object.defineProperty(exports, key, {
|
|
198
|
-
enumerable: true,
|
|
199
|
-
get: function () {
|
|
200
|
-
return _removeFile[key];
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
var _resolve = require("./resolve.cjs");
|
|
205
|
-
Object.keys(_resolve).forEach(function (key) {
|
|
206
|
-
if (key === "default" || key === "__esModule") return;
|
|
207
|
-
if (key in exports && exports[key] === _resolve[key]) return;
|
|
208
|
-
Object.defineProperty(exports, key, {
|
|
209
|
-
enumerable: true,
|
|
210
|
-
get: function () {
|
|
211
|
-
return _resolve[key];
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
var _semverFns = require("./semver-fns.cjs");
|
|
216
|
-
Object.keys(_semverFns).forEach(function (key) {
|
|
217
|
-
if (key === "default" || key === "__esModule") return;
|
|
218
|
-
if (key in exports && exports[key] === _semverFns[key]) return;
|
|
219
|
-
Object.defineProperty(exports, key, {
|
|
220
|
-
enumerable: true,
|
|
221
|
-
get: function () {
|
|
222
|
-
return _semverFns[key];
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
var _toml = require("./toml.cjs");
|
|
227
|
-
Object.keys(_toml).forEach(function (key) {
|
|
228
|
-
if (key === "default" || key === "__esModule") return;
|
|
229
|
-
if (key in exports && exports[key] === _toml[key]) return;
|
|
230
|
-
Object.defineProperty(exports, key, {
|
|
231
|
-
enumerable: true,
|
|
232
|
-
get: function () {
|
|
233
|
-
return _toml[key];
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
var _tsconfig = require("./tsconfig.cjs");
|
|
238
|
-
Object.keys(_tsconfig).forEach(function (key) {
|
|
239
|
-
if (key === "default" || key === "__esModule") return;
|
|
240
|
-
if (key in exports && exports[key] === _tsconfig[key]) return;
|
|
241
|
-
Object.defineProperty(exports, key, {
|
|
242
|
-
enumerable: true,
|
|
243
|
-
get: function () {
|
|
244
|
-
return _tsconfig[key];
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
var _writeFile = require("./write-file.cjs");
|
|
249
|
-
Object.keys(_writeFile).forEach(function (key) {
|
|
250
|
-
if (key === "default" || key === "__esModule") return;
|
|
251
|
-
if (key in exports && exports[key] === _writeFile[key]) return;
|
|
252
|
-
Object.defineProperty(exports, key, {
|
|
253
|
-
enumerable: true,
|
|
254
|
-
get: function () {
|
|
255
|
-
return _writeFile[key];
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
var _yaml = require("./yaml.cjs");
|
|
260
|
-
Object.keys(_yaml).forEach(function (key) {
|
|
261
|
-
if (key === "default" || key === "__esModule") return;
|
|
262
|
-
if (key in exports && exports[key] === _yaml[key]) return;
|
|
263
|
-
Object.defineProperty(exports, key, {
|
|
264
|
-
enumerable: true,
|
|
265
|
-
get: function () {
|
|
266
|
-
return _yaml[key];
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
});
|
|
1
|
+
const e=require(`./get-workspace-root-CCNjjZGY.cjs`),t=require(`./copy-file-Y1ilzocZ.cjs`),n=require(`./exists-B31lSRFp.cjs`),r=require(`./helpers-_MJ6PR-g.cjs`),i=require(`./buffer-Ch164vki.cjs`),a=require(`./chmod-x-FOy3sak8.cjs`),o=require(`./command-exists-D1bV-wSk.cjs`),s=require(`./compress-BjGbQqs_.cjs`),c=require(`./is-file-BkFQev3M.cjs`),l=require(`./list-files-Cn_UVruo.cjs`),u=require(`./read-file-BB2WzW-N.cjs`),d=require(`./write-file-CqokudVp.cjs`);require(`./constants.cjs`);const f=require(`./get-parent-path-CfRkaB4R.cjs`),p=require(`./resolve-DTkLQekH.cjs`),m=require(`./install-CZ_S7NHm.cjs`),h=require(`./json-DKhqPjHB.cjs`),g=require(`./package-fns-YTCdMAXr.cjs`),_=require(`./registry-BYwvM92u.cjs`),v=require(`./remove-file-XHFKELQN.cjs`),y=require(`./semver-fns-Btrm1dIF.cjs`),b=require(`./toml-DgVyNp_y.cjs`),x=require(`./tsconfig-B6WtgD1c.cjs`),S=require(`./yaml-q2k-BjIM.cjs`);exports.DEFAULT_EXTENSIONS=p.t,exports.PROJECT_ROOT_CONTENT=e.t,exports.WORKSPACE_ROOT_CONTENT=e.n,exports.chmodX=a.t,exports.chmodXSync=a.n,exports.coerceVersion=y.t,exports.commandExists=o.t,exports.commandExistsSync=o.n,exports.compressDirectory=s.t,exports.copyFile=t.t,exports.copyFileSync=t.n,exports.copyFiles=t.r,exports.copyFilesSync=t.i,exports.createDirectory=r.t,exports.createDirectorySync=r.n,exports.deriveNewSemverVersion=y.n,exports.doesPackageMatch=g.t,exports.exists=n.t,exports.existsSync=n.n,exports.extractFileFromTar=r.r,exports.extractFileFromTarGzip=r.i,exports.formatNodeOptions=_.t,exports.getFormattedNodeOptionsWithoutInspect=_.n,exports.getNodeModulesPaths=p.n,exports.getPackageInfo=g.n,exports.getPackageListing=g.r,exports.getPackageManager=g.i,exports.getParentPath=f.t,exports.getParsedNodeOptionsWithoutInspect=_.r,exports.getProjectRoot=e.r,exports.getRegistry=_.i,exports.getResolutionCombinations=p.r,exports.getResolutionPaths=p.i,exports.getWorkspaceRoot=e.i,exports.importModule=p.a,exports.install=m.t,exports.isDirectory=c.t,exports.isDirectorySymlink=c.n,exports.isExecutable=a.r,exports.isExecutableSync=a.i,exports.isFile=c.r,exports.isFileSymlink=c.i,exports.isPackageExists=g.a,exports.isPackageListed=g.o,exports.isProjectRoot=e.a,exports.isRange=y.r,exports.isRelativeVersionKeyword=y.i,exports.isSemver=y.a,exports.isValidRange=y.o,exports.isValidSemver=y.s,exports.isValidVersion=y.c,exports.isWorkspaceRoot=e.o,exports.isWritable=a.a,exports.isWritableSync=a.o,exports.list=l.t,exports.listDirectories=l.n,exports.listDirectoriesSync=l.r,exports.listFiles=l.i,exports.listFilesSync=l.a,exports.listSync=l.o,exports.loadPackageJson=g.s,exports.loadTsConfig=x.t,exports.packageExists=m.n,exports.parseVersion=y.l,exports.readFile=u.t,exports.readFileBuffer=i.t,exports.readFileBufferSync=i.n,exports.readFileIfExisting=u.n,exports.readFileIfExistingSync=u.r,exports.readFileSync=u.i,exports.readJsonFile=h.t,exports.readJsonFileSync=h.n,exports.readTomlFile=b.t,exports.readTomlFileSync=b.n,exports.readYamlFile=S.t,exports.readYamlFileSync=S.n,exports.relativeToProjectRoot=e.s,exports.relativeToWorkspaceRoot=e.c,exports.removeDirectory=r.a,exports.removeDirectorySync=r.o,exports.removeFile=v.t,exports.removeFileSync=v.n,exports.resolve=p.o,exports.resolvePackage=p.s,exports.resolvePackageSync=p.c,exports.resolveSafe=p.l,exports.resolveSafeSync=p.u,exports.resolveSync=p.d,exports.satisfiesVersion=y.u,exports.tokenizeArgs=_.a,exports.writeFile=d.t,exports.writeFileBuffer=i.r,exports.writeFileBufferSync=i.i,exports.writeFileSync=d.n,exports.writeJsonFile=h.r,exports.writeJsonFileSync=h.i,exports.writeTomlFile=b.r,exports.writeTomlFileSync=b.i;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { i as writeFileBufferSync, n as readFileBufferSync, r as writeFileBuffer, t as readFileBuffer } from "./buffer-DvCjrjQH.cjs";
|
|
2
|
+
import { a as isWritable, i as isExecutableSync, n as chmodXSync, o as isWritableSync, r as isExecutable, t as chmodX } from "./chmod-x-BPr4tt2-.cjs";
|
|
3
|
+
import { n as commandExistsSync, t as commandExists } from "./command-exists-CuieR7rx.cjs";
|
|
4
|
+
import { n as compressDirectory, t as CompressDirectoryOptions } from "./compress-CQve2a6h.cjs";
|
|
5
|
+
import { t as Encoding } from "./constants-D58o2CiO.cjs";
|
|
6
|
+
import { i as copyFilesSync, n as copyFileSync, r as copyFiles, t as copyFile } from "./copy-file-DjH2Ho5e.cjs";
|
|
7
|
+
import { n as existsSync, t as exists } from "./exists-CVlDImzc.cjs";
|
|
8
|
+
import { n as getParentPath, t as GetParentPathOptions } from "./get-parent-path-Cbqs2km7.cjs";
|
|
9
|
+
import { a as isProjectRoot, c as relativeToWorkspaceRoot, i as getWorkspaceRoot, n as WORKSPACE_ROOT_CONTENT, o as isWorkspaceRoot, r as getProjectRoot, s as relativeToProjectRoot, t as PROJECT_ROOT_CONTENT } from "./get-workspace-root-eTfm1jII.cjs";
|
|
10
|
+
import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CgMOExPa.cjs";
|
|
11
|
+
import { n as packageExists, t as install } from "./install-CxPsLO2t.cjs";
|
|
12
|
+
import { i as isFileSymlink, n as isDirectorySymlink, r as isFile, t as isDirectory } from "./is-file-DoBi2FN9.cjs";
|
|
13
|
+
import { a as writeJsonFile, i as readJsonFileSync, n as JsonWriteOptions, o as writeJsonFileSync, r as readJsonFile, t as JsonReadOptions } from "./json-CYenVxvr.cjs";
|
|
14
|
+
import { a as listDirectoriesSync, c as listSync, i as listDirectories, n as ListOptions, o as listFiles, r as list, s as listFilesSync, t as InferListReturnType } from "./list-files-D3dQOljX.cjs";
|
|
15
|
+
import { a as getPackageInfo, c as isPackageExists, i as doesPackageMatch, l as isPackageListed, n as PackageExistsOptions, o as getPackageListing, r as PackageMatchesOptions, s as getPackageManager, t as GetPackageListingReturn, u as loadPackageJson } from "./package-fns-BNRi_Rpc.cjs";
|
|
16
|
+
import { a as getResolutionPaths, c as resolvePackage, d as resolveSafeSync, f as resolveSync, i as getResolutionCombinations, l as resolvePackageSync, n as ResolveOptions, o as importModule, r as getNodeModulesPaths, s as resolve, t as DEFAULT_EXTENSIONS, u as resolveSafe } from "./resolve-DubH-8qd.cjs";
|
|
17
|
+
import { i as readFileSync, n as readFileIfExisting, r as readFileIfExistingSync, t as readFile } from "./read-file-Bxn1VHKv.cjs";
|
|
18
|
+
import { a as getRegistry, i as getParsedNodeOptionsWithoutInspect, n as formatNodeOptions, o as tokenizeArgs, r as getFormattedNodeOptionsWithoutInspect, t as NodeOptionsToken } from "./registry-C2A0Kau7.cjs";
|
|
19
|
+
import { n as removeFileSync, t as removeFile } from "./remove-file-lQOlxDwr.cjs";
|
|
20
|
+
import { a as isSemver, c as isValidVersion, i as isRelativeVersionKeyword, l as parseVersion, n as deriveNewSemverVersion, o as isValidRange, r as isRange, s as isValidSemver, t as coerceVersion, u as satisfiesVersion } from "./semver-fns-DjhZXnUw.cjs";
|
|
21
|
+
import { a as readTomlFileSync, i as readTomlFile, n as TomlWriteOptions, o as writeTomlFile, r as XOptions, s as writeTomlFileSync, t as TomlReadOptions } from "./toml-D3X2QoaL.cjs";
|
|
22
|
+
import { t as loadTsConfig } from "./tsconfig-C8ecu1-0.cjs";
|
|
23
|
+
import { n as writeFile, r as writeFileSync, t as WriteFileOptions } from "./write-file-BmvbsmMj.cjs";
|
|
24
|
+
import { n as readYamlFile, r as readYamlFileSync, t as YamlReadOptions } from "./yaml-6uuLoSfT.cjs";
|
|
25
|
+
export { CompressDirectoryOptions, DEFAULT_EXTENSIONS, Encoding, GetPackageListingReturn, GetParentPathOptions, InferListReturnType, JsonReadOptions, JsonWriteOptions, ListOptions, NodeOptionsToken, PROJECT_ROOT_CONTENT, PackageExistsOptions, PackageMatchesOptions, ResolveOptions, TomlReadOptions, TomlWriteOptions, WORKSPACE_ROOT_CONTENT, WriteFileOptions, XOptions, YamlReadOptions, chmodX, chmodXSync, coerceVersion, commandExists, commandExistsSync, compressDirectory, copyFile, copyFileSync, copyFiles, copyFilesSync, createDirectory, createDirectorySync, deriveNewSemverVersion, doesPackageMatch, exists, existsSync, extractFileFromTar, extractFileFromTarGzip, formatNodeOptions, getFormattedNodeOptionsWithoutInspect, getNodeModulesPaths, getPackageInfo, getPackageListing, getPackageManager, getParentPath, getParsedNodeOptionsWithoutInspect, getProjectRoot, getRegistry, getResolutionCombinations, getResolutionPaths, getWorkspaceRoot, importModule, install, isDirectory, isDirectorySymlink, isExecutable, isExecutableSync, isFile, isFileSymlink, isPackageExists, isPackageListed, isProjectRoot, isRange, isRelativeVersionKeyword, isSemver, isValidRange, isValidSemver, isValidVersion, isWorkspaceRoot, isWritable, isWritableSync, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync, loadPackageJson, loadTsConfig, packageExists, parseVersion, readFile, readFileBuffer, readFileBufferSync, readFileIfExisting, readFileIfExistingSync, readFileSync, readJsonFile, readJsonFileSync, readTomlFile, readTomlFileSync, readYamlFile, readYamlFileSync, relativeToProjectRoot, relativeToWorkspaceRoot, removeDirectory, removeDirectorySync, removeFile, removeFileSync, resolve, resolvePackage, resolvePackageSync, resolveSafe, resolveSafeSync, resolveSync, satisfiesVersion, tokenizeArgs, writeFile, writeFileBuffer, writeFileBufferSync, writeFileSync, writeJsonFile, writeJsonFileSync, writeTomlFile, writeTomlFileSync };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { i as writeFileBufferSync, n as readFileBufferSync, r as writeFileBuffer, t as readFileBuffer } from "./buffer-DgfUmhrc.mjs";
|
|
2
|
+
import { a as isWritable, i as isExecutableSync, n as chmodXSync, o as isWritableSync, r as isExecutable, t as chmodX } from "./chmod-x-QCk1GmQJ.mjs";
|
|
3
|
+
import { n as commandExistsSync, t as commandExists } from "./command-exists-dBdtR0xj.mjs";
|
|
4
|
+
import { n as compressDirectory, t as CompressDirectoryOptions } from "./compress-CLAaOwH3.mjs";
|
|
5
|
+
import { t as Encoding } from "./constants-DZz9LJgo.mjs";
|
|
6
|
+
import { i as copyFilesSync, n as copyFileSync, r as copyFiles, t as copyFile } from "./copy-file-B5FJHiIK.mjs";
|
|
7
|
+
import { n as existsSync, t as exists } from "./exists-175EN367.mjs";
|
|
8
|
+
import { n as getParentPath, t as GetParentPathOptions } from "./get-parent-path-COkh6Pvl.mjs";
|
|
9
|
+
import { a as isProjectRoot, c as relativeToWorkspaceRoot, i as getWorkspaceRoot, n as WORKSPACE_ROOT_CONTENT, o as isWorkspaceRoot, r as getProjectRoot, s as relativeToProjectRoot, t as PROJECT_ROOT_CONTENT } from "./get-workspace-root-DQBvBd8X.mjs";
|
|
10
|
+
import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CYWFZ-Uv.mjs";
|
|
11
|
+
import { n as packageExists, t as install } from "./install-dYt7hlQn.mjs";
|
|
12
|
+
import { i as isFileSymlink, n as isDirectorySymlink, r as isFile, t as isDirectory } from "./is-file-DjqOQrqY.mjs";
|
|
13
|
+
import { a as writeJsonFile, i as readJsonFileSync, n as JsonWriteOptions, o as writeJsonFileSync, r as readJsonFile, t as JsonReadOptions } from "./json-DH7Q6Ftp.mjs";
|
|
14
|
+
import { a as listDirectoriesSync, c as listSync, i as listDirectories, n as ListOptions, o as listFiles, r as list, s as listFilesSync, t as InferListReturnType } from "./list-files-D3iJzEQw.mjs";
|
|
15
|
+
import { a as getPackageInfo, c as isPackageExists, i as doesPackageMatch, l as isPackageListed, n as PackageExistsOptions, o as getPackageListing, r as PackageMatchesOptions, s as getPackageManager, t as GetPackageListingReturn, u as loadPackageJson } from "./package-fns-CxokaGDY.mjs";
|
|
16
|
+
import { a as getResolutionPaths, c as resolvePackage, d as resolveSafeSync, f as resolveSync, i as getResolutionCombinations, l as resolvePackageSync, n as ResolveOptions, o as importModule, r as getNodeModulesPaths, s as resolve, t as DEFAULT_EXTENSIONS, u as resolveSafe } from "./resolve-D66oIwjf.mjs";
|
|
17
|
+
import { i as readFileSync, n as readFileIfExisting, r as readFileIfExistingSync, t as readFile } from "./read-file-CRVW-wcE.mjs";
|
|
18
|
+
import { a as getRegistry, i as getParsedNodeOptionsWithoutInspect, n as formatNodeOptions, o as tokenizeArgs, r as getFormattedNodeOptionsWithoutInspect, t as NodeOptionsToken } from "./registry-BQ3JXRFA.mjs";
|
|
19
|
+
import { n as removeFileSync, t as removeFile } from "./remove-file-BqlkL_Df.mjs";
|
|
20
|
+
import { a as isSemver, c as isValidVersion, i as isRelativeVersionKeyword, l as parseVersion, n as deriveNewSemverVersion, o as isValidRange, r as isRange, s as isValidSemver, t as coerceVersion, u as satisfiesVersion } from "./semver-fns-B0e5zB6C.mjs";
|
|
21
|
+
import { a as readTomlFileSync, i as readTomlFile, n as TomlWriteOptions, o as writeTomlFile, r as XOptions, s as writeTomlFileSync, t as TomlReadOptions } from "./toml-Djau1M6n.mjs";
|
|
22
|
+
import { t as loadTsConfig } from "./tsconfig-B13IMV_0.mjs";
|
|
23
|
+
import { n as writeFile, r as writeFileSync, t as WriteFileOptions } from "./write-file-CWTzQpb2.mjs";
|
|
24
|
+
import { n as readYamlFile, r as readYamlFileSync, t as YamlReadOptions } from "./yaml-Ddslc5NK.mjs";
|
|
25
|
+
export { CompressDirectoryOptions, DEFAULT_EXTENSIONS, Encoding, GetPackageListingReturn, GetParentPathOptions, InferListReturnType, JsonReadOptions, JsonWriteOptions, ListOptions, NodeOptionsToken, PROJECT_ROOT_CONTENT, PackageExistsOptions, PackageMatchesOptions, ResolveOptions, TomlReadOptions, TomlWriteOptions, WORKSPACE_ROOT_CONTENT, WriteFileOptions, XOptions, YamlReadOptions, chmodX, chmodXSync, coerceVersion, commandExists, commandExistsSync, compressDirectory, copyFile, copyFileSync, copyFiles, copyFilesSync, createDirectory, createDirectorySync, deriveNewSemverVersion, doesPackageMatch, exists, existsSync, extractFileFromTar, extractFileFromTarGzip, formatNodeOptions, getFormattedNodeOptionsWithoutInspect, getNodeModulesPaths, getPackageInfo, getPackageListing, getPackageManager, getParentPath, getParsedNodeOptionsWithoutInspect, getProjectRoot, getRegistry, getResolutionCombinations, getResolutionPaths, getWorkspaceRoot, importModule, install, isDirectory, isDirectorySymlink, isExecutable, isExecutableSync, isFile, isFileSymlink, isPackageExists, isPackageListed, isProjectRoot, isRange, isRelativeVersionKeyword, isSemver, isValidRange, isValidSemver, isValidVersion, isWorkspaceRoot, isWritable, isWritableSync, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync, loadPackageJson, loadTsConfig, packageExists, parseVersion, readFile, readFileBuffer, readFileBufferSync, readFileIfExisting, readFileIfExistingSync, readFileSync, readJsonFile, readJsonFileSync, readTomlFile, readTomlFileSync, readYamlFile, readYamlFileSync, relativeToProjectRoot, relativeToWorkspaceRoot, removeDirectory, removeDirectorySync, removeFile, removeFileSync, resolve, resolvePackage, resolvePackageSync, resolveSafe, resolveSafeSync, resolveSync, satisfiesVersion, tokenizeArgs, writeFile, writeFileBuffer, writeFileBufferSync, writeFileSync, writeJsonFile, writeJsonFileSync, writeTomlFile, writeTomlFileSync };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./get-workspace-root-k66w-wLW.mjs";import{i as c,n as l,r as u,t as d}from"./copy-file-Bot2YNtT.mjs";import{n as f,t as p}from"./exists-Ci-9lYmi.mjs";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./helpers-BSEQb1fp.mjs";import{i as b,n as x,r as S,t as C}from"./buffer-DDq-CW4J.mjs";import{a as w,i as T,n as E,o as D,r as O,t as k}from"./chmod-x-q-TWdus7.mjs";import{n as A,t as j}from"./command-exists-Dzb2kKT4.mjs";import{t as M}from"./compress-BiTxso15.mjs";import{i as N,n as P,r as F,t as I}from"./is-file-CNooe8Wz.mjs";import{a as L,i as R,n as z,o as B,r as V,t as H}from"./list-files-D__uh3tQ.mjs";import{i as U,n as W,r as G,t as K}from"./read-file-B091zB64.mjs";import{n as q,t as J}from"./write-file-CFByoJkN.mjs";import"./constants.mjs";import{t as Y}from"./get-parent-path-DLFSyxSW.mjs";import{a as X,c as Z,d as Q,i as $,l as ee,n as te,o as ne,r as re,s as ie,t as ae,u as oe}from"./resolve-C_YsCFne.mjs";import{n as se,t as ce}from"./install-B3bIjHoU.mjs";import{i as le,n as ue,r as de,t as fe}from"./json-Dp4PSH2i.mjs";import{a as pe,i as me,n as he,o as ge,r as _e,s as ve,t as ye}from"./package-fns-C7-MKgBR.mjs";import{a as be,i as xe,n as Se,r as Ce,t as we}from"./registry-B1taIPKm.mjs";import{n as Te,t as Ee}from"./remove-file-BM64Brdf.mjs";import{a as De,c as Oe,i as ke,l as Ae,n as je,o as Me,r as Ne,s as Pe,t as Fe,u as Ie}from"./semver-fns-F_rYnwDq.mjs";import{i as Le,n as Re,r as ze,t as Be}from"./toml-CIgLQmP3.mjs";import{t as Ve}from"./tsconfig-CqvvSVuX.mjs";import{n as He,t as Ue}from"./yaml-CLMo56UG.mjs";export{ae as DEFAULT_EXTENSIONS,s as PROJECT_ROOT_CONTENT,r as WORKSPACE_ROOT_CONTENT,k as chmodX,E as chmodXSync,Fe as coerceVersion,j as commandExists,A as commandExistsSync,M as compressDirectory,d as copyFile,l as copyFileSync,u as copyFiles,c as copyFilesSync,y as createDirectory,g as createDirectorySync,je as deriveNewSemverVersion,ye as doesPackageMatch,p as exists,f as existsSync,v as extractFileFromTar,h as extractFileFromTarGzip,we as formatNodeOptions,Se as getFormattedNodeOptionsWithoutInspect,te as getNodeModulesPaths,he as getPackageInfo,_e as getPackageListing,me as getPackageManager,Y as getParentPath,Ce as getParsedNodeOptionsWithoutInspect,a as getProjectRoot,xe as getRegistry,re as getResolutionCombinations,$ as getResolutionPaths,n as getWorkspaceRoot,X as importModule,ce as install,I as isDirectory,P as isDirectorySymlink,O as isExecutable,T as isExecutableSync,F as isFile,N as isFileSymlink,pe as isPackageExists,ge as isPackageListed,e as isProjectRoot,Ne as isRange,ke as isRelativeVersionKeyword,De as isSemver,Me as isValidRange,Pe as isValidSemver,Oe as isValidVersion,i as isWorkspaceRoot,w as isWritable,D as isWritableSync,H as list,z as listDirectories,V as listDirectoriesSync,R as listFiles,L as listFilesSync,B as listSync,ve as loadPackageJson,Ve as loadTsConfig,se as packageExists,Ae as parseVersion,K as readFile,C as readFileBuffer,x as readFileBufferSync,W as readFileIfExisting,G as readFileIfExistingSync,U as readFileSync,fe as readJsonFile,ue as readJsonFileSync,Be as readTomlFile,Re as readTomlFileSync,Ue as readYamlFile,He as readYamlFileSync,o as relativeToProjectRoot,t as relativeToWorkspaceRoot,m as removeDirectory,_ as removeDirectorySync,Ee as removeFile,Te as removeFileSync,ne as resolve,ie as resolvePackage,Z as resolvePackageSync,ee as resolveSafe,oe as resolveSafeSync,Q as resolveSync,Ie as satisfiesVersion,be as tokenizeArgs,J as writeFile,S as writeFileBuffer,b as writeFileBufferSync,q as writeFileSync,de as writeJsonFile,le as writeJsonFileSync,ze as writeTomlFile,Le as writeTomlFileSync};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./cwd-YTg9Cx6C.mjs";import{o as t}from"./resolve-C_YsCFne.mjs";import{installPackage as n}from"@antfu/install-pkg";import"tinyexec";async function r(e,t){return n(e,t)}const i=async(n,i)=>{let a=await t(i?.cwd||e());try{await t(n,{paths:[a]})}catch{await r(n,i)}};export{i as n,r as t};
|
|
2
|
+
//# sourceMappingURL=install-B3bIjHoU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-B3bIjHoU.mjs","names":[],"sources":["../src/install.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { InstallPackageOptions } from \"@antfu/install-pkg\";\nimport { installPackage } from \"@antfu/install-pkg\";\nimport { cwd } from \"@stryke/path/cwd\";\nimport \"tinyexec\";\nimport { resolve } from \"./resolve\";\n\n/**\n * Install a specific package\n *\n * @param name - The name of the package to install\n * @param options - The options to use when installing the package\n */\nexport async function install(\n name: string,\n options?: InstallPackageOptions\n): Promise<ReturnType<typeof installPackage>>;\n\n/**\n * Install a list of packages\n *\n * @param names - The list of package names to install\n * @param options - The options to use when installing the package\n */\nexport async function install(\n names: string[],\n options?: InstallPackageOptions\n): Promise<ReturnType<typeof installPackage>>;\n\n/**\n * Install a specific or list of packages\n *\n * @param nameOrNames - The name or names of packages to install\n * @param options - The options to use when installing the package\n * @returns The result of the command or an exception\n */\nexport async function install(\n nameOrNames: string | string[],\n options?: InstallPackageOptions\n): Promise<ReturnType<typeof installPackage>> {\n return installPackage(nameOrNames, options);\n}\n\n/**\n * Check if a package exists and install it if it does not\n *\n * @param name - The name of the package to check\n * @param options - The options to use when installing the package\n */\nexport const packageExists = async (\n name: string,\n options?: InstallPackageOptions\n) => {\n const resolvePath = await resolve(options?.cwd || cwd());\n try {\n await resolve(name, { paths: [resolvePath] });\n } catch {\n await install(name, options);\n }\n};\n"],"mappings":"uJAqDA,eAAsB,EACpB,EACA,EAC4C,CAC5C,OAAO,EAAe,EAAa,EAAQ,CAS7C,MAAa,EAAgB,MAC3B,EACA,IACG,CACH,IAAM,EAAc,MAAM,EAAQ,GAAS,KAAO,GAAK,CAAC,CACxD,GAAI,CACF,MAAM,EAAQ,EAAM,CAAE,MAAO,CAAC,EAAY,CAAE,CAAC,MACvC,CACN,MAAM,EAAQ,EAAM,EAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./cwd-o2vq8Tk9.cjs`),n=require(`./resolve-DTkLQekH.cjs`);let r=require(`@antfu/install-pkg`);require(`tinyexec`);async function i(e,t){return(0,r.installPackage)(e,t)}const a=async(e,r)=>{let a=await n.o(r?.cwd||t.t());try{await n.o(e,{paths:[a]})}catch{await i(e,r)}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InstallPackageOptions, installPackage } from "@antfu/install-pkg";
|
|
2
|
+
|
|
3
|
+
//#region src/install.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Install a specific package
|
|
7
|
+
*
|
|
8
|
+
* @param name - The name of the package to install
|
|
9
|
+
* @param options - The options to use when installing the package
|
|
10
|
+
*/
|
|
11
|
+
declare function install(name: string, options?: InstallPackageOptions): Promise<ReturnType<typeof installPackage>>;
|
|
12
|
+
/**
|
|
13
|
+
* Install a list of packages
|
|
14
|
+
*
|
|
15
|
+
* @param names - The list of package names to install
|
|
16
|
+
* @param options - The options to use when installing the package
|
|
17
|
+
*/
|
|
18
|
+
declare function install(names: string[], options?: InstallPackageOptions): Promise<ReturnType<typeof installPackage>>;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a package exists and install it if it does not
|
|
21
|
+
*
|
|
22
|
+
* @param name - The name of the package to check
|
|
23
|
+
* @param options - The options to use when installing the package
|
|
24
|
+
*/
|
|
25
|
+
declare const packageExists: (name: string, options?: InstallPackageOptions) => Promise<void>;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { packageExists as n, install as t };
|
|
28
|
+
//# sourceMappingURL=install-CxPsLO2t.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-CxPsLO2t.d.cts","names":[],"sources":["../src/install.ts"],"sourcesContent":[],"mappings":";;;;AA8BA;;;;;;AAWsB,iBAXA,OAAA,CAWO,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EATjB,qBASiB,CAAA,EAR1B,OAQ0B,CARlB,UAQkB,CAAA,OARA,cAQA,CAAA,CAAA;;;;;;AAyB7B;iBAzBsB,OAAA,4BAEV,wBACT,QAAQ,kBAAkB;;;;;;;cAsBhB,wCAED,0BAAqB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InstallPackageOptions, installPackage } from "@antfu/install-pkg";
|
|
2
|
+
import "tinyexec";
|
|
3
|
+
|
|
4
|
+
//#region src/install.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Install a specific package
|
|
8
|
+
*
|
|
9
|
+
* @param name - The name of the package to install
|
|
10
|
+
* @param options - The options to use when installing the package
|
|
11
|
+
*/
|
|
12
|
+
declare function install(name: string, options?: InstallPackageOptions): Promise<ReturnType<typeof installPackage>>;
|
|
13
|
+
/**
|
|
14
|
+
* Install a list of packages
|
|
15
|
+
*
|
|
16
|
+
* @param names - The list of package names to install
|
|
17
|
+
* @param options - The options to use when installing the package
|
|
18
|
+
*/
|
|
19
|
+
declare function install(names: string[], options?: InstallPackageOptions): Promise<ReturnType<typeof installPackage>>;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a package exists and install it if it does not
|
|
22
|
+
*
|
|
23
|
+
* @param name - The name of the package to check
|
|
24
|
+
* @param options - The options to use when installing the package
|
|
25
|
+
*/
|
|
26
|
+
declare const packageExists: (name: string, options?: InstallPackageOptions) => Promise<void>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { packageExists as n, install as t };
|
|
29
|
+
//# sourceMappingURL=install-dYt7hlQn.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-dYt7hlQn.d.mts","names":[],"sources":["../src/install.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;AAGU,iBAHY,OAAA,CAGZ,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EADE,qBACF,CAAA,EAAP,OAAO,CAAC,UAAD,CAAA,OAAmB,cAAnB,CAAA,CAAA;AAQV;;;;;;AAyBa,iBAzBS,OAAA,CA2BV,KAAA,EAAA,MAAA,EAAA,EAAA,OAAqB,CAAA,EAzBrB,qBAyBqB,CAAA,EAxB9B,OAwB8B,CAxBtB,UAwBsB,CAAA,OAxBJ,cAwBI,CAAA,CAAA;;;;;;;cAFpB,wCAED,0BAAqB"}
|
package/dist/install.cjs
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.install = install;
|
|
7
|
-
exports.packageExists = void 0;
|
|
8
|
-
var _installPkg = require("@antfu/install-pkg");
|
|
9
|
-
var _cwd = require("@stryke/path/cwd");
|
|
10
|
-
require("tinyexec");
|
|
11
|
-
var _resolve = require("./resolve.cjs");
|
|
12
|
-
async function install(t, a) {
|
|
13
|
-
return (0, _installPkg.installPackage)(t, a);
|
|
14
|
-
}
|
|
15
|
-
const packageExists = async (t, a) => {
|
|
16
|
-
const s = await (0, _resolve.resolve)(a?.cwd || (0, _cwd.cwd)());
|
|
17
|
-
try {
|
|
18
|
-
await (0, _resolve.resolve)(t, {
|
|
19
|
-
paths: [s]
|
|
20
|
-
});
|
|
21
|
-
} catch {
|
|
22
|
-
await install(t, a);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
exports.packageExists = packageExists;
|
|
1
|
+
require(`./get-workspace-root-CCNjjZGY.cjs`),require(`./resolve-DTkLQekH.cjs`);const e=require(`./install-CZ_S7NHm.cjs`);exports.install=e.t,exports.packageExists=e.n;
|
package/dist/install.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./get-workspace-root-k66w-wLW.mjs";import"./resolve-C_YsCFne.mjs";import{n as e,t}from"./install-B3bIjHoU.mjs";export{t as install,e as packageExists};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./is-string-DKgNS0jA.cjs`),t=require(`./is-object-FBXmvehR.cjs`),n=n=>{if(!t.t(n))return!1;let r=e.n(n);return r===`[object Error]`||r===`[object DOMException]`||typeof n?.message==`string`&&typeof n?.name==`string`&&!t.n(n)};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./is-string-91Z3dOKQ.mjs";import{n as t,t as n}from"./is-object-UsKYhyC5.mjs";const r=r=>{if(!n(r))return!1;let i=e(r);return i===`[object Error]`||i===`[object DOMException]`||typeof r?.message==`string`&&typeof r?.name==`string`&&!t(r)};export{r as t};
|
|
2
|
+
//# sourceMappingURL=is-error-CjVXmD_8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-error-CjVXmD_8.mjs","names":[],"sources":["../../type-checks/src/is-error.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getObjectTag } from \"./get-object-tag\";\nimport { isObject } from \"./is-object\";\nimport { isPlainObject } from \"./is-plain-object\";\n\n/**\n * Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @example\n * ```typescript\n * isError(new Error)\n * // => true\n *\n * isError(Error)\n * // => false\n * ```\n *\n * @param obj - The obj to check.\n * @returns Returns `true` if `obj` is an error object, else `false`.\n */\nexport const isError = (obj: unknown): obj is Error => {\n if (!isObject(obj)) {\n return false;\n }\n\n const tag = getObjectTag(obj);\n\n return (\n tag === \"[object Error]\" ||\n tag === \"[object DOMException]\" ||\n (typeof (obj as Error)?.message === \"string\" &&\n typeof (obj as Error)?.name === \"string\" &&\n !isPlainObject(obj))\n );\n};\n"],"mappings":"iGAsCA,MAAa,EAAW,GAA+B,CACrD,GAAI,CAAC,EAAS,EAAI,CAChB,MAAO,GAGT,IAAM,EAAM,EAAa,EAAI,CAE7B,OACE,IAAQ,kBACR,IAAQ,yBACP,OAAQ,GAAe,SAAY,UAClC,OAAQ,GAAe,MAAS,UAChC,CAAC,EAAc,EAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./join-paths-DUdaieID.cjs`);let n=require(`node:fs`);function r(e,r){return!!(0,n.statSync)(r?t.t(r,e):e,{throwIfNoEntry:!1})?.isFile()}function i(e,r){return!!(0,n.statSync)(r?t.t(r,e):e,{throwIfNoEntry:!1})?.isDirectory()}const a=(e,r)=>!!(0,n.lstatSync)(r?t.t(r,e):e,{throwIfNoEntry:!1})?.isFile(),o=(e,r)=>!!(0,n.lstatSync)(r?t.t(r,e):e,{throwIfNoEntry:!1})?.isDirectory();Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./join-paths-BHepkhAj.mjs";import{lstatSync as t,statSync as n}from"node:fs";function r(t,r){return!!n(r?e(r,t):t,{throwIfNoEntry:!1})?.isFile()}function i(t,r){return!!n(r?e(r,t):t,{throwIfNoEntry:!1})?.isDirectory()}const a=(n,r)=>!!t(r?e(r,n):n,{throwIfNoEntry:!1})?.isFile(),o=(n,r)=>!!t(r?e(r,n):n,{throwIfNoEntry:!1})?.isDirectory();export{a as i,o as n,r,i as t};
|
|
2
|
+
//# sourceMappingURL=is-file-CNooe8Wz.mjs.map
|