@stryke/path 0.22.11 → 0.22.12

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.
Files changed (224) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/append.cjs +1 -1
  3. package/dist/append.d.cts +38 -2
  4. package/dist/append.d.cts.map +1 -0
  5. package/dist/append.d.mts +38 -2
  6. package/dist/append.d.mts.map +1 -0
  7. package/dist/append.mjs +2 -1
  8. package/dist/append.mjs.map +1 -0
  9. package/dist/asset-extensions.cjs +1 -1
  10. package/dist/asset-extensions.d.cts +11 -2
  11. package/dist/asset-extensions.d.cts.map +1 -0
  12. package/dist/asset-extensions.d.mts +11 -2
  13. package/dist/asset-extensions.d.mts.map +1 -0
  14. package/dist/asset-extensions.mjs +2 -1
  15. package/dist/asset-extensions.mjs.map +1 -0
  16. package/dist/correct-path.cjs +1 -1
  17. package/dist/correct-path.d.cts +59 -2
  18. package/dist/correct-path.d.cts.map +1 -0
  19. package/dist/correct-path.d.mts +59 -2
  20. package/dist/correct-path.d.mts.map +1 -0
  21. package/dist/correct-path.mjs +2 -1
  22. package/dist/correct-path.mjs.map +1 -0
  23. package/dist/cwd.cjs +1 -1
  24. package/dist/cwd.d.cts +13 -2
  25. package/dist/cwd.d.cts.map +1 -0
  26. package/dist/cwd.d.mts +13 -2
  27. package/dist/cwd.d.mts.map +1 -0
  28. package/dist/cwd.mjs +2 -1
  29. package/dist/cwd.mjs.map +1 -0
  30. package/dist/delimiter.cjs +1 -1
  31. package/dist/delimiter.d.cts +22 -2
  32. package/dist/delimiter.d.cts.map +1 -0
  33. package/dist/delimiter.d.mts +22 -2
  34. package/dist/delimiter.d.mts.map +1 -0
  35. package/dist/delimiter.mjs +2 -1
  36. package/dist/delimiter.mjs.map +1 -0
  37. package/dist/file-path-fns.cjs +1 -1
  38. package/dist/file-path-fns.d.cts +218 -2
  39. package/dist/file-path-fns.d.cts.map +1 -0
  40. package/dist/file-path-fns.d.mts +218 -2
  41. package/dist/file-path-fns.d.mts.map +1 -0
  42. package/dist/file-path-fns.mjs +2 -1
  43. package/dist/file-path-fns.mjs.map +1 -0
  44. package/dist/find.cjs +1 -1
  45. package/dist/find.d.cts +1 -1
  46. package/dist/find.d.mts +1 -1
  47. package/dist/find.mjs +1 -1
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.cts +13 -13
  50. package/dist/index.d.mts +13 -13
  51. package/dist/index.mjs +1 -1
  52. package/dist/is-parent-path.cjs +1 -1
  53. package/dist/is-parent-path.d.cts +26 -2
  54. package/dist/is-parent-path.d.cts.map +1 -0
  55. package/dist/is-parent-path.d.mts +26 -2
  56. package/dist/is-parent-path.d.mts.map +1 -0
  57. package/dist/is-parent-path.mjs +2 -1
  58. package/dist/is-parent-path.mjs.map +1 -0
  59. package/dist/is-root-dir.cjs +1 -1
  60. package/dist/is-root-dir.d.cts +11 -2
  61. package/dist/is-root-dir.d.cts.map +1 -0
  62. package/dist/is-root-dir.d.mts +11 -2
  63. package/dist/is-root-dir.d.mts.map +1 -0
  64. package/dist/is-root-dir.mjs +2 -1
  65. package/dist/is-root-dir.mjs.map +1 -0
  66. package/dist/is-type.cjs +1 -1
  67. package/dist/is-type.mjs +2 -1
  68. package/dist/is-type.mjs.map +1 -0
  69. package/dist/join-paths.cjs +1 -1
  70. package/dist/join-paths.d.cts +13 -2
  71. package/dist/join-paths.d.cts.map +1 -0
  72. package/dist/join-paths.d.mts +13 -2
  73. package/dist/join-paths.d.mts.map +1 -0
  74. package/dist/join-paths.mjs +2 -1
  75. package/dist/join-paths.mjs.map +1 -0
  76. package/dist/join.cjs +1 -1
  77. package/dist/join.d.cts +1 -1
  78. package/dist/join.d.mts +1 -1
  79. package/dist/join.mjs +1 -1
  80. package/dist/normalize.cjs +1 -1
  81. package/dist/normalize.d.cts +1 -1
  82. package/dist/normalize.d.mts +1 -1
  83. package/dist/normalize.mjs +1 -1
  84. package/dist/regex.cjs +1 -1
  85. package/dist/regex.d.cts +12 -2
  86. package/dist/regex.d.cts.map +1 -0
  87. package/dist/regex.d.mts +12 -2
  88. package/dist/regex.d.mts.map +1 -0
  89. package/dist/regex.mjs +2 -1
  90. package/dist/regex.mjs.map +1 -0
  91. package/dist/replace.cjs +1 -1
  92. package/dist/replace.d.cts +34 -2
  93. package/dist/replace.d.cts.map +1 -0
  94. package/dist/replace.d.mts +34 -2
  95. package/dist/replace.d.mts.map +1 -0
  96. package/dist/replace.mjs +2 -1
  97. package/dist/replace.mjs.map +1 -0
  98. package/dist/resolve-parent-path.cjs +1 -1
  99. package/dist/resolve-parent-path.d.cts +12 -2
  100. package/dist/resolve-parent-path.d.cts.map +1 -0
  101. package/dist/resolve-parent-path.d.mts +12 -2
  102. package/dist/resolve-parent-path.d.mts.map +1 -0
  103. package/dist/resolve-parent-path.mjs +2 -1
  104. package/dist/resolve-parent-path.mjs.map +1 -0
  105. package/dist/slash.cjs +1 -1
  106. package/dist/slash.d.cts +18 -2
  107. package/dist/slash.d.cts.map +1 -0
  108. package/dist/slash.d.mts +18 -2
  109. package/dist/slash.d.mts.map +1 -0
  110. package/dist/slash.mjs +2 -1
  111. package/dist/slash.mjs.map +1 -0
  112. package/dist/type-checks/src/is-empty.cjs +1 -0
  113. package/dist/type-checks/src/is-empty.mjs +2 -0
  114. package/dist/type-checks/src/is-empty.mjs.map +1 -0
  115. package/dist/type-checks/src/is-null.cjs +1 -0
  116. package/dist/type-checks/src/is-null.mjs +2 -0
  117. package/dist/type-checks/src/is-null.mjs.map +1 -0
  118. package/dist/type-checks/src/is-set-string.cjs +1 -0
  119. package/dist/type-checks/src/is-set-string.mjs +2 -0
  120. package/dist/type-checks/src/is-set-string.mjs.map +1 -0
  121. package/dist/type-checks/src/is-set.cjs +1 -0
  122. package/dist/type-checks/src/is-set.mjs +2 -0
  123. package/dist/type-checks/src/is-set.mjs.map +1 -0
  124. package/dist/type-checks/src/is-string.cjs +1 -0
  125. package/dist/type-checks/src/is-string.mjs +2 -0
  126. package/dist/type-checks/src/is-string.mjs.map +1 -0
  127. package/dist/type-checks/src/is-undefined.cjs +1 -0
  128. package/dist/type-checks/src/is-undefined.mjs +2 -0
  129. package/dist/type-checks/src/is-undefined.mjs.map +1 -0
  130. package/dist/types/src/base.cjs +1 -0
  131. package/dist/types/src/base.mjs +2 -0
  132. package/dist/types/src/base.mjs.map +1 -0
  133. package/package.json +7 -7
  134. package/dist/append-BWRdnlxE.cjs +0 -1
  135. package/dist/append-DfRQvWY6.d.cts +0 -38
  136. package/dist/append-DfRQvWY6.d.cts.map +0 -1
  137. package/dist/append-tFFvRN-V.d.mts +0 -38
  138. package/dist/append-tFFvRN-V.d.mts.map +0 -1
  139. package/dist/append-xQ5toDGS.mjs +0 -2
  140. package/dist/append-xQ5toDGS.mjs.map +0 -1
  141. package/dist/asset-extensions-BFW_s97B.mjs +0 -2
  142. package/dist/asset-extensions-BFW_s97B.mjs.map +0 -1
  143. package/dist/asset-extensions-D-_39huh.d.cts +0 -11
  144. package/dist/asset-extensions-D-_39huh.d.cts.map +0 -1
  145. package/dist/asset-extensions-DNMkK37t.cjs +0 -1
  146. package/dist/asset-extensions-DlN384ac.d.mts +0 -11
  147. package/dist/asset-extensions-DlN384ac.d.mts.map +0 -1
  148. package/dist/correct-path-B0Y_kOkW.cjs +0 -1
  149. package/dist/correct-path-CwHhpk6I.d.cts +0 -59
  150. package/dist/correct-path-CwHhpk6I.d.cts.map +0 -1
  151. package/dist/correct-path-DmaZHNUF.mjs +0 -2
  152. package/dist/correct-path-DmaZHNUF.mjs.map +0 -1
  153. package/dist/correct-path-LC5QqYV-.d.mts +0 -59
  154. package/dist/correct-path-LC5QqYV-.d.mts.map +0 -1
  155. package/dist/cwd-Bt4NcS-v.d.cts +0 -13
  156. package/dist/cwd-Bt4NcS-v.d.cts.map +0 -1
  157. package/dist/cwd-D66SsPHE.cjs +0 -1
  158. package/dist/cwd-Dx53cgUn.d.mts +0 -13
  159. package/dist/cwd-Dx53cgUn.d.mts.map +0 -1
  160. package/dist/cwd-DxrPG9WB.mjs +0 -2
  161. package/dist/cwd-DxrPG9WB.mjs.map +0 -1
  162. package/dist/delimiter-B3nWo9Xn.mjs +0 -2
  163. package/dist/delimiter-B3nWo9Xn.mjs.map +0 -1
  164. package/dist/delimiter-BwyCEwu9.d.cts +0 -22
  165. package/dist/delimiter-BwyCEwu9.d.cts.map +0 -1
  166. package/dist/delimiter-DuDX7fvN.d.mts +0 -22
  167. package/dist/delimiter-DuDX7fvN.d.mts.map +0 -1
  168. package/dist/delimiter-IA9U4fxC.cjs +0 -1
  169. package/dist/file-path-fns-B9hKjfA-.cjs +0 -1
  170. package/dist/file-path-fns-BKbfZRTB.d.mts +0 -218
  171. package/dist/file-path-fns-BKbfZRTB.d.mts.map +0 -1
  172. package/dist/file-path-fns-CTLJP4j9.d.cts +0 -218
  173. package/dist/file-path-fns-CTLJP4j9.d.cts.map +0 -1
  174. package/dist/file-path-fns-MRI3PV8K.mjs +0 -2
  175. package/dist/file-path-fns-MRI3PV8K.mjs.map +0 -1
  176. package/dist/is-parent-path-B1EPPZ08.d.cts +0 -26
  177. package/dist/is-parent-path-B1EPPZ08.d.cts.map +0 -1
  178. package/dist/is-parent-path-BW6CsB2o.d.mts +0 -26
  179. package/dist/is-parent-path-BW6CsB2o.d.mts.map +0 -1
  180. package/dist/is-parent-path-C0Azmjnd.mjs +0 -2
  181. package/dist/is-parent-path-C0Azmjnd.mjs.map +0 -1
  182. package/dist/is-parent-path-ChIi6oAO.cjs +0 -1
  183. package/dist/is-root-dir-BzQKuwi2.cjs +0 -1
  184. package/dist/is-root-dir-CQA1qNI-.d.mts +0 -11
  185. package/dist/is-root-dir-CQA1qNI-.d.mts.map +0 -1
  186. package/dist/is-root-dir-DI5qcnLw.mjs +0 -2
  187. package/dist/is-root-dir-DI5qcnLw.mjs.map +0 -1
  188. package/dist/is-root-dir-DnWZlIgB.d.cts +0 -11
  189. package/dist/is-root-dir-DnWZlIgB.d.cts.map +0 -1
  190. package/dist/join-paths-BLjJ0GmK.mjs +0 -2
  191. package/dist/join-paths-BLjJ0GmK.mjs.map +0 -1
  192. package/dist/join-paths-Bklwf_Bh.d.mts +0 -13
  193. package/dist/join-paths-Bklwf_Bh.d.mts.map +0 -1
  194. package/dist/join-paths-DBTcCEw0.d.cts +0 -13
  195. package/dist/join-paths-DBTcCEw0.d.cts.map +0 -1
  196. package/dist/join-paths-hCBPtGlC.cjs +0 -1
  197. package/dist/regex-BEjSq2wo.cjs +0 -1
  198. package/dist/regex-DHvK8l1E.d.cts +0 -12
  199. package/dist/regex-DHvK8l1E.d.cts.map +0 -1
  200. package/dist/regex-fq9t8ABF.d.mts +0 -12
  201. package/dist/regex-fq9t8ABF.d.mts.map +0 -1
  202. package/dist/regex-hMUNHeGK.mjs +0 -2
  203. package/dist/regex-hMUNHeGK.mjs.map +0 -1
  204. package/dist/replace-0nP9MPWp.d.cts +0 -34
  205. package/dist/replace-0nP9MPWp.d.cts.map +0 -1
  206. package/dist/replace-C570sho0.cjs +0 -1
  207. package/dist/replace-C9dh7bEG.mjs +0 -2
  208. package/dist/replace-C9dh7bEG.mjs.map +0 -1
  209. package/dist/replace-fEEM12P3.d.mts +0 -34
  210. package/dist/replace-fEEM12P3.d.mts.map +0 -1
  211. package/dist/resolve-parent-path-5B4YvR_k.mjs +0 -2
  212. package/dist/resolve-parent-path-5B4YvR_k.mjs.map +0 -1
  213. package/dist/resolve-parent-path-D5uwbjqj.d.mts +0 -12
  214. package/dist/resolve-parent-path-D5uwbjqj.d.mts.map +0 -1
  215. package/dist/resolve-parent-path-DIrSH2oN.cjs +0 -1
  216. package/dist/resolve-parent-path-oZQZf2nw.d.cts +0 -12
  217. package/dist/resolve-parent-path-oZQZf2nw.d.cts.map +0 -1
  218. package/dist/slash-C7xRDucF.mjs +0 -2
  219. package/dist/slash-C7xRDucF.mjs.map +0 -1
  220. package/dist/slash-CuA7ERRf.d.mts +0 -18
  221. package/dist/slash-CuA7ERRf.d.mts.map +0 -1
  222. package/dist/slash-DPd6cWOz.d.cts +0 -18
  223. package/dist/slash-DPd6cWOz.d.cts.map +0 -1
  224. package/dist/slash-DhzW1Om-.cjs +0 -1
@@ -0,0 +1,2 @@
1
+ import{isNull as e}from"./is-null.mjs";import{isUndefined as t}from"./is-undefined.mjs";const n=n=>{try{return t(n)||e(n)}catch{return!1}};export{n as isEmpty};
2
+ //# sourceMappingURL=is-empty.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../type-checks/src/is-empty.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 { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n"],"mappings":"wFA+BA,MAAa,EAAW,GAAmB,CACzC,GAAI,CACF,OAAO,EAAY,EAAM,EAAI,EAAO,EAAM,MACpC,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=e=>{try{return e===null}catch{return!1}};exports.isNull=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>{try{return e===null}catch{return!1}};export{e as isNull};
2
+ //# sourceMappingURL=is-null.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../type-checks/src/is-null.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\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAU,GAAkC,CACvD,GAAI,CACF,OAAO,IAAU,UACX,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./is-set.cjs`),t=require(`./is-string.cjs`),n=n=>{try{return e.isSet(n)&&t.isString(n)&&n.length>0}catch{return!1}};exports.isSetString=n;
@@ -0,0 +1,2 @@
1
+ import{isSet as e}from"./is-set.mjs";import{isString as t}from"./is-string.mjs";const n=n=>{try{return e(n)&&t(n)&&n.length>0}catch{return!1}};export{n as isSetString};
2
+ //# sourceMappingURL=is-set-string.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../type-checks/src/is-set-string.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 { isSet } from \"./is-set\";\nimport { isString } from \"./is-string\";\n\n/**\n * Determine if the type is string and is not empty (length greater than zero)\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n */\nexport const isSetString = (value: unknown): value is NonNullable<string> => {\n try {\n return isSet(value) && isString(value) && value.length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":"gFA2BA,MAAa,EAAe,GAAiD,CAC3E,GAAI,CACF,OAAO,EAAM,EAAM,EAAI,EAAS,EAAM,EAAI,EAAM,OAAS,OACnD,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./is-empty.cjs`),t=t=>{try{return!e.isEmpty(t)}catch{return!1}};exports.isSet=t;
@@ -0,0 +1,2 @@
1
+ import{isEmpty as e}from"./is-empty.mjs";const t=t=>{try{return!e(t)}catch{return!1}};export{t as isSet};
2
+ //# sourceMappingURL=is-set.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../type-checks/src/is-set.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 { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n"],"mappings":"yCA0BA,MAAa,EAAS,GAAkD,CACtE,GAAI,CACF,MAAO,CAAC,EAAQ,EAAM,MAChB,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=e=>{try{return typeof e==`string`}catch{return!1}};exports.isString=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>{try{return typeof e==`string`}catch{return!1}};export{e as isString};
2
+ //# sourceMappingURL=is-string.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../type-checks/src/is-string.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\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OAAO,OAAO,GAAU,cAClB,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=e=>e===void 0;exports.isUndefined=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>e===void 0;export{e as isUndefined};
2
+ //# sourceMappingURL=is-undefined.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../type-checks/src/is-undefined.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\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":"AAkBA,MAAa,EAAe,GACnB,IAAU,IAAA"}
@@ -0,0 +1 @@
1
+ const e=``;exports.EMPTY_STRING=``;
@@ -0,0 +1,2 @@
1
+ const e=``;export{e as EMPTY_STRING};
2
+ //# sourceMappingURL=base.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.mjs","names":[],"sources":["../../../../types/src/base.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 { TypedArray } from \"./array\";\n\nexport type SerializablePrimitive =\n | null\n | undefined\n | string\n | number\n | boolean\n | bigint;\nexport type Primitive = SerializablePrimitive | symbol;\n\n/**\n * Matches any primitive, `void`, `Date`, or `RegExp` value.\n */\nexport type BuiltIns = Primitive | void | Date | RegExp;\n\n/**\n * Matches any non-primitive object\n */\n// eslint-disable-next-line ts/no-unsafe-function-type\nexport type AtomicObject = Function | Promise<any> | Date | RegExp;\n\n/** Determines if the passed value is of a specific type */\nexport type TypeTester = (value: any) => boolean;\n\n/**\n * The interface for a type mapping (key =\\> function) to use for {@link getType}.\n * export * The key represents the name of the type. The function represents the {@link TypeTester | test method}.\n * The map should be ordered by testing preference, with more specific tests first.\n * If a test returns true, it is selected, and the key is returned as the type.\n */\nexport type TypeMap = Record<string, TypeTester>;\n\ndeclare const emptyObjectSymbol: unique symbol;\n\nexport type FunctionOrValue<Value> = Value extends () => infer X ? X : Value;\n\n/**\n * A [[List]]\n *\n * @example\n * ```ts\n * type list0 = [1, 2, 3]\n * type list1 = number[]\n * ```\n *\n * @param A - its type\n * @returns [[List]]\n */\nexport type List<A = any> = ReadonlyArray<A>;\n\n/**\n * Alias to create a [[Function]]\n *\n * @example\n * ```ts\n * import { FunctionLike } from '@stryke/types'\n *\n * type test0 = FunctionLike<[string, number], boolean>\n * /// (args_0: string, args_1: number) => boolean\n * ```\n *\n * @param P - parameters\n * @param R - return type\n * @returns [[Function]]\n */\nexport type FunctionLike<P extends List = any, R = any> = (...args: P) => R;\n\nexport type AnyFunction = FunctionLike<any, any>;\nexport type Nullish = undefined | null;\nexport type Nullishable<T> = T | Nullish;\nexport type NonNullishObject = object; // not null/undefined which are Object\nexport type NativeClass = abstract new (...args: any) => any;\nexport type AnyNumber = number | number;\nexport type AnyString = string | string;\nexport type AnyBoolean = boolean | boolean;\nexport type AnyArray = any[];\nexport type PlainObject = Record<any, object>; // https://stackoverflow.com/a/75052315/130638\nexport type AnyMap = Map<any, any>;\nexport type AnyWeakMap = WeakMap<WeakKey, any>;\nexport type EmptyArray = [];\nexport interface EmptyObject {\n [emptyObjectSymbol]?: never;\n}\n\nexport type Any =\n | boolean\n | number\n | bigint\n | string\n | null\n | undefined\n | void\n | symbol\n | object\n | PlainObject\n | AnyArray\n | AnyMap\n | AnyWeakMap;\n\n/**\n * The valid types of the index for an `Indexable` type object\n */\nexport type IndexType = string | number | symbol;\n\n/**\n * The declaration of a ***dictionary-type*** object with a specific type\n *\n * @see {@link Indexable}\n * @see {@link IndexType}\n * @see {@link Dictionary}\n */\nexport type TypedIndexable<T> = Record<IndexType, T>;\n\n/**\n * The declaration of a ***dictionary-type*** object\n *\n * @see {@link TypedIndexable}\n * @see {@link IndexType}\n * @see {@link Dictionary}\n */\nexport type Indexable = TypedIndexable<any>;\n\n/**\n * The declaration of a ***dictionary-type*** object with a specific type\n *\n * @see {@link Indexable}\n * @see {@link IndexType}\n * @see {@link TypedIndexable}\n */\nexport type Dictionary<T> = Record<string, T>;\n\nexport const EMPTY_STRING = \"\";\nexport const NEWLINE_STRING = \"\\r\\n\";\nexport const EMPTY_OBJECT = {};\n\nexport type AnyCase<T extends IndexType> = string extends T\n ? string\n : T extends `${infer F1}${infer F2}${infer R}`\n ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}`\n : T extends `${infer F}${infer R}`\n ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}`\n : typeof EMPTY_STRING;\n\nexport type Newable<T> = new (..._args: never[]) => T;\n\nexport interface Abstract<T> {\n prototype: T;\n}\n\nexport interface Clonable<T> {\n clone: () => T;\n}\n\nexport type MaybePromise<T> = T | Promise<T>;\n\nexport type ReducerFunction<TState, TAction> = (\n state: TState,\n action: TAction\n) => TState;\n\n// NOTE: for the file size optimization\nexport const TYPE_ARGUMENTS = \"Arguments\";\nexport const TYPE_ARRAY = \"Array\";\nexport const TYPE_OBJECT = \"Object\";\nexport const TYPE_MAP = \"Map\";\nexport const TYPE_SET = \"Set\";\n\nexport type Collection =\n | IArguments\n | unknown[]\n | Map<unknown, unknown>\n | Record<string | number | symbol, unknown>\n | Set<unknown>;\n\nexport type NonUndefined<T> = T extends undefined ? never : T;\n\nexport type BrowserNativeObject = Date | File;\n\nexport type DeepPartial<T> = T extends BrowserNativeObject | NestedValue\n ? T\n : {\n [K in keyof T]?: DeepPartial<T[K]>;\n };\n\nexport type Rollback = Record<\n string,\n (initialValue: any, currentValue: any) => any\n>;\n\n/**\n * Extract all required keys from the given type.\n *\n * @remarks\n * This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc...\n */\nexport type RequiredKeysOf<BaseType extends object> = Exclude<\n {\n [Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]>\n ? Key\n : never;\n }[keyof BaseType],\n undefined\n>;\n\n/**\n * Returns a boolean for whether the two given types are equal.\n *\n * @remarks\n * Use-cases: If you want to make a conditional branch based on the result of a comparison of two types.\n *\n * @see https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650\n * @see https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796\n */\nexport type IsEqual<A, B> =\n (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2\n ? true\n : false;\n\nexport type Filter<KeyType, ExcludeType> =\n IsEqual<KeyType, ExcludeType> extends true\n ? never\n : KeyType extends ExcludeType\n ? never\n : KeyType;\n\ninterface ExceptOptions {\n /**\n Disallow assigning non-specified properties.\n\n Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.\n\n @defaultValue false\n */\n requireExactProps?: boolean;\n}\n\n/**\n * Create a type from an object type without certain keys.\n *\n * @remarks\n * We recommend setting the `requireExactProps` option to `true`.\n *\n * This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.\n *\n * This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).\n */\nexport type Except<\n ObjectType,\n KeysType extends keyof ObjectType,\n Options extends ExceptOptions = { requireExactProps: false }\n> = {\n [KeyType in keyof ObjectType as Filter<\n KeyType,\n KeysType\n >]: ObjectType[KeyType];\n} & (Options[\"requireExactProps\"] extends true\n ? Partial<Record<KeysType, never>>\n : Record<string, never>);\n\n/**\n * Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.\n *\n * @remarks\n * Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.\n *\n * If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.\n *\n * @see https://github.com/microsoft/TypeScript/issues/15300\n */\nexport type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};\n\n/**\n * Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type.\n *\n * @remarks\n * Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.\n */\nexport type SetRequired<\n BaseType,\n Keys extends keyof BaseType\n> = BaseType extends unknown // type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types). // union into a [distributive conditional // `extends unknown` is always going to be the case and is used to convert any\n ? Simplify<\n // Pick just the keys that are optional from the base type.\n Except<BaseType, Keys> &\n // Pick the keys that should be required from the base type and make them required.\n Required<Pick<BaseType, Keys>>\n >\n : never;\n\nexport const $NestedValue: unique symbol = Symbol(\"NestedValue\");\n\nexport type NestedValue<TValue extends object = object> = {\n [$NestedValue]: never;\n} & TValue;\n\nexport interface RefObject<T> {\n current: T;\n}\n\nexport interface Identity<T = string> {\n id: T;\n}\n\nexport interface Versioned {\n version: number;\n}\n\nexport interface Sequenced {\n /**\n * The sequence number (version, or event counter, etc.) of the record\n */\n sequence: number;\n}\n\nexport interface Typed {\n /**\n * The type of the record\n */\n __type: string;\n}\n\nexport interface ClassTypeCheckable<T> extends Typed {\n /**\n * Run type check on the given value\n * @param value - The value to check\n * @returns True if the value is of the type of the class\n */\n isTypeOf: (value: unknown) => value is T;\n}\n\n/**\n * Matches non-recursive types.\n */\nexport type NonRecursiveType =\n | BuiltIns\n // eslint-disable-next-line ts/no-unsafe-function-type\n | Function\n | (new (...arguments_: any[]) => unknown);\n\nexport type IsPrimitive<T> = [T] extends [Primitive] ? true : false;\nexport type IsNever<T> = [T] extends [never] ? true : false;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type IsNull<T> = [T] extends [null] ? true : false;\nexport type IsUndefined<T> = T extends undefined ? true : false;\nexport type IsUnknown<T> = unknown extends T // `T` can be `unknown` or `any`\n ? IsNull<T> extends false // `any` can be `null`, but `unknown` can't be\n ? true\n : false\n : false;\nexport type IsNullish<T> = IsNull<T> & IsUndefined<T>;\nexport type IsFunction<T> = T extends AnyFunction ? true : false;\n\n/**\n * Declare locally scoped properties on `globalThis`.\n *\n * When defining a global variable in a declaration file is inappropriate, it can be helpful to define a `type` or `interface` (say `ExtraGlobals`) with the global variable and then cast `globalThis` via code like `globalThis as unknown as ExtraGlobals`.\n *\n * Instead of casting through `unknown`, you can update your `type` or `interface` to extend `GlobalThis` and then directly cast `globalThis`.\n *\n * @example\n * ```\n * import type { GlobalThis } from '@stryke/types';\n *\n * type ExtraGlobals = GlobalThis & {\n * readonly GLOBAL_TOKEN: string;\n * };\n *\n * (globalThis as ExtraGlobals).GLOBAL_TOKEN;\n * ```\n */\nexport type GlobalThis = typeof globalThis;\n\n/**\n * Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).\n */\nexport interface Class<T, Arguments extends unknown[] = any[]> {\n prototype: Pick<T, keyof T>;\n new (...arguments_: Arguments): T;\n}\n\n/**\n * Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).\n */\nexport type Constructor<T, Arguments extends unknown[] = any[]> = new (\n ...arguments_: Arguments\n) => T;\n\n/**\n * Matches an [`abstract class`](https://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes).\n *\n * @privateRemarks\n * We cannot use a `type` here because TypeScript throws: 'abstract' modifier cannot appear on a type member. (1070)\n */\n\nexport interface AbstractClass<\n T,\n Arguments extends unknown[] = any[]\n> extends AbstractConstructor<T, Arguments> {\n prototype: Pick<T, keyof T>;\n}\n\n/**\n * Matches an [`abstract class`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-2.html#abstract-construct-signatures) constructor.\n */\nexport type AbstractConstructor<\n T,\n Arguments extends unknown[] = any[]\n> = abstract new (...arguments_: Arguments) => T;\n\n/**\n * Create a tuple type of the given length `<L>` and fill it with the given type `<Fill>`.\n *\n * If `<Fill>` is not provided, it will default to `unknown`.\n *\n * @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f\n */\nexport type BuildTuple<\n L extends number,\n Fill = unknown,\n T extends readonly unknown[] = []\n> = T[\"length\"] extends L ? T : BuildTuple<L, Fill, [...T, Fill]>;\n\n/**\n * Test if the given function has multiple call signatures.\n *\n * Needed to handle the case of a single call signature with properties.\n *\n * Multiple call signatures cannot currently be supported due to a TypeScript limitation.\n * @see https://github.com/microsoft/TypeScript/issues/29732\n */\nexport type HasMultipleCallSignatures<\n T extends (...arguments_: any[]) => unknown\n> = T extends {\n (...arguments_: infer A): unknown;\n (...arguments_: infer B): unknown;\n}\n ? B extends A\n ? A extends B\n ? false\n : true\n : true\n : false;\n\ntype StructuredCloneablePrimitive =\n | string\n | number\n | bigint\n | boolean\n | null\n | undefined\n | boolean\n | number\n | string;\n\ntype StructuredCloneableData =\n | ArrayBuffer\n | DataView\n | Date\n | Error\n | RegExp\n | TypedArray\n | Blob\n | File;\n\n// DOM exclusive types\n// | AudioData\n// | CropTarget\n// | CryptoKey\n// | DOMException\n// | DOMMatrix\n// | DOMMatrixReadOnly\n// | DOMPoint\n// | DOMPointReadOnly\n// | DOMQuad\n// | DOMRect\n// | DOMRectReadOnly\n// | FileList\n// | FileSystemDirectoryHandle\n// | FileSystemFileHandle\n// | FileSystemHandle\n// | GPUCompilationInfo\n// | GPUCompilationMessage\n// | ImageBitmap\n// | ImageData\n// | RTCCertificate\n// | VideoFrame\n\ntype StructuredCloneableCollection =\n | readonly StructuredCloneable[]\n | {\n readonly [key: string]: StructuredCloneable;\n readonly [key: number]: StructuredCloneable;\n }\n | ReadonlyMap<StructuredCloneable, StructuredCloneable>\n | ReadonlySet<StructuredCloneable>;\n\n/**\n * Matches a value that can be losslessly cloned using `structuredClone`.\n *\n * Note:\n * - Custom error types will be cloned as the base `Error` type\n * - This type doesn't include types exclusive to the TypeScript DOM library (e.g. `DOMRect` and `VideoFrame`)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n *\n * @example\n * ```\n * import type { StructuredCloneable } from '@stryke/types';\n *\n * class CustomClass {}\n *\n * // @ts-expect-error\n * const error: StructuredCloneable = {\n * custom: new CustomClass(),\n * };\n *\n * structuredClone(error);\n * //=> {custom: {}}\n *\n * const good: StructuredCloneable = {\n * number: 3,\n * date: new Date(),\n * map: new Map<string, number>(),\n * }\n *\n * good.map.set('key', 1);\n *\n * structuredClone(good);\n * //=> {number: 3, date: Date(2022-10-17 22:22:35.920), map: Map {'key' -> 1}}\n * ```\n */\nexport type StructuredCloneable =\n | StructuredCloneablePrimitive\n | StructuredCloneableData\n | StructuredCloneableCollection;\n"],"mappings":"AAsJA,MAAa,EAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/path",
3
- "version": "0.22.11",
3
+ "version": "0.22.12",
4
4
  "type": "module",
5
5
  "description": "A package containing various utilities that expand the functionality of NodeJs's built-in `path` module",
6
6
  "repository": {
@@ -70,12 +70,12 @@
70
70
  },
71
71
  "types": "./dist/index.d.cts",
72
72
  "devDependencies": {
73
- "@storm-software/testing-tools": "^1.119.60",
74
- "@stryke/convert": "^0.6.24",
75
- "@stryke/type-checks": "^0.5.9",
76
- "@stryke/types": "^0.10.23",
77
- "tsdown": "^0.17.1"
73
+ "@storm-software/testing-tools": "^1.119.67",
74
+ "@stryke/convert": "^0.6.25",
75
+ "@stryke/type-checks": "^0.5.10",
76
+ "@stryke/types": "^0.10.24",
77
+ "tsdown": "^0.17.2"
78
78
  },
79
79
  "publishConfig": { "access": "public" },
80
- "gitHead": "fd38508c876b697a52a0e27df1478b41ae011583"
80
+ "gitHead": "8f2e484743eb3ce54929e99096ca2ea188b4730e"
81
81
  }
@@ -1 +0,0 @@
1
- const e=require(`./cwd-D66SsPHE.cjs`),t=require(`./slash-DhzW1Om-.cjs`),n=require(`./is-parent-path-ChIi6oAO.cjs`),r=require(`./join-paths-hCBPtGlC.cjs`);function i(i,a=e.t()){return t.n(n.t(i,a)?i:r.n(a,i))}const a=i;function o(e,t){return`${e}.${t.replace(/^\./,``)}`}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -1,38 +0,0 @@
1
- //#region src/append.d.ts
2
- /**
3
- * If not already a parent path, append the base path from the beginning of the given child path.
4
- *
5
- * @example
6
- * ```ts
7
- * appendPath("src/index.ts", "/home/user/project");
8
- * // returns "/home/user/project/src/index.ts"
9
- *
10
- * appendPath("/user/dev/app.ts", "/user/dev");
11
- * // returns "/user/dev/app.ts"
12
- * ```
13
- *
14
- * @param childPath - The child path to append to the {@link parentPath}
15
- * @param parentPath - The parent path to add the {@link childPath} to
16
- * @returns The {@link parentPath} with the {@link childPath} appended
17
- */
18
- declare function appendPath(childPath: string, parentPath?: string): string;
19
- declare const append: typeof appendPath;
20
- /**
21
- * Append the extension to the given path.
22
- *
23
- * @example
24
- * ```ts
25
- * appendExtension("/home/user/project/src/index", ".ts");
26
- * // returns "/home/user/project/src/index.ts"
27
- * appendExtension("/home/user/project/src/index.ts", ".js");
28
- * // returns "/home/user/project/src/index.ts.js"
29
- * ```
30
- *
31
- * @param path - The path to append the extension to.
32
- * @param extension - The extension to append.
33
- * @returns The path with the appended extension.
34
- */
35
- declare function appendExtension(path: string, extension: string): string;
36
- //#endregion
37
- export { appendExtension as n, appendPath as r, append as t };
38
- //# sourceMappingURL=append-DfRQvWY6.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"append-DfRQvWY6.d.cts","names":[],"sources":["../src/append.ts"],"sourcesContent":[],"mappings":";;AAuCA;AAWA;AAiBA;;;;;;;;;;;;;iBA5BgB,UAAA;cAWH,eAAM;;;;;;;;;;;;;;;;iBAiBH,eAAA"}
@@ -1,38 +0,0 @@
1
- //#region src/append.d.ts
2
- /**
3
- * If not already a parent path, append the base path from the beginning of the given child path.
4
- *
5
- * @example
6
- * ```ts
7
- * appendPath("src/index.ts", "/home/user/project");
8
- * // returns "/home/user/project/src/index.ts"
9
- *
10
- * appendPath("/user/dev/app.ts", "/user/dev");
11
- * // returns "/user/dev/app.ts"
12
- * ```
13
- *
14
- * @param childPath - The child path to append to the {@link parentPath}
15
- * @param parentPath - The parent path to add the {@link childPath} to
16
- * @returns The {@link parentPath} with the {@link childPath} appended
17
- */
18
- declare function appendPath(childPath: string, parentPath?: string): string;
19
- declare const append: typeof appendPath;
20
- /**
21
- * Append the extension to the given path.
22
- *
23
- * @example
24
- * ```ts
25
- * appendExtension("/home/user/project/src/index", ".ts");
26
- * // returns "/home/user/project/src/index.ts"
27
- * appendExtension("/home/user/project/src/index.ts", ".js");
28
- * // returns "/home/user/project/src/index.ts.js"
29
- * ```
30
- *
31
- * @param path - The path to append the extension to.
32
- * @param extension - The extension to append.
33
- * @returns The path with the appended extension.
34
- */
35
- declare function appendExtension(path: string, extension: string): string;
36
- //#endregion
37
- export { appendExtension as n, appendPath as r, append as t };
38
- //# sourceMappingURL=append-tFFvRN-V.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"append-tFFvRN-V.d.mts","names":[],"sources":["../src/append.ts"],"sourcesContent":[],"mappings":";;AAuCA;AAWA;AAiBA;;;;;;;;;;;;;iBA5BgB,UAAA;cAWH,eAAM;;;;;;;;;;;;;;;;iBAiBH,eAAA"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./cwd-DxrPG9WB.mjs";import{n as t}from"./slash-C7xRDucF.mjs";import{t as n}from"./is-parent-path-C0Azmjnd.mjs";import{n as r}from"./join-paths-BLjJ0GmK.mjs";function i(i,a=e()){return t(n(i,a)?i:r(a,i))}const a=i;function o(e,t){return`${e}.${t.replace(/^\./,``)}`}export{o as n,i as r,a as t};
2
- //# sourceMappingURL=append-xQ5toDGS.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"append-xQ5toDGS.mjs","names":[],"sources":["../src/append.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 { cwd } from \"./cwd\";\nimport { isParentPath } from \"./is-parent-path\";\nimport { joinPaths } from \"./join-paths\";\nimport { slash } from \"./slash\";\n\n/**\n * If not already a parent path, append the base path from the beginning of the given child path.\n *\n * @example\n * ```ts\n * appendPath(\"src/index.ts\", \"/home/user/project\");\n * // returns \"/home/user/project/src/index.ts\"\n *\n * appendPath(\"/user/dev/app.ts\", \"/user/dev\");\n * // returns \"/user/dev/app.ts\"\n * ```\n *\n * @param childPath - The child path to append to the {@link parentPath}\n * @param parentPath - The parent path to add the {@link childPath} to\n * @returns The {@link parentPath} with the {@link childPath} appended\n */\nexport function appendPath(\n childPath: string,\n parentPath: string = cwd()\n): string {\n return slash(\n !isParentPath(childPath, parentPath)\n ? joinPaths(parentPath, childPath)\n : childPath\n );\n}\n\nexport const append = appendPath;\n\n/**\n * Append the extension to the given path.\n *\n * @example\n * ```ts\n * appendExtension(\"/home/user/project/src/index\", \".ts\");\n * // returns \"/home/user/project/src/index.ts\"\n * appendExtension(\"/home/user/project/src/index.ts\", \".js\");\n * // returns \"/home/user/project/src/index.ts.js\"\n * ```\n *\n * @param path - The path to append the extension to.\n * @param extension - The extension to append.\n * @returns The path with the appended extension.\n */\nexport function appendExtension(path: string, extension: string): string {\n return `${path}.${extension.replace(/^\\./, \"\")}`;\n}\n"],"mappings":"gLAuCA,SAAgB,EACd,EACA,EAAqB,GAAK,CAClB,CACR,OAAO,EACJ,EAAa,EAAW,EAAW,CAEhC,EADA,EAAU,EAAY,EAAU,CAErC,CAGH,MAAa,EAAS,EAiBtB,SAAgB,EAAgB,EAAc,EAA2B,CACvE,MAAO,GAAG,EAAK,GAAG,EAAU,QAAQ,MAAO,GAAG"}
@@ -1,2 +0,0 @@
1
- const e=`bmp.gif.jpg.jpeg.png.psd.svg.webp.m4v.mov.mp4.mpeg.mpg.webm.aac.aiff.caf.m4a.mp3.wav.html.pdf.yaml.yml.otf.ttf.zip`.split(`.`);export{e as t};
2
- //# sourceMappingURL=asset-extensions-BFW_s97B.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-extensions-BFW_s97B.mjs","names":[],"sources":["../src/asset-extensions.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\n/**\n * Default asset extensions\n *\n * @remarks\n * For more info please see the {@link https://github.com/facebook/metro/blob/v0.80.10/packages/metro-config/src/defaults/defaults.js#L18-L52 | Metro defaults}\n */\nexport const DEFAULT_ASSET_EXTS = [\n // Image formats\n \"bmp\",\n \"gif\",\n \"jpg\",\n \"jpeg\",\n \"png\",\n \"psd\",\n \"svg\",\n \"webp\",\n // Video formats\n \"m4v\",\n \"mov\",\n \"mp4\",\n \"mpeg\",\n \"mpg\",\n \"webm\",\n // Audio formats\n \"aac\",\n \"aiff\",\n \"caf\",\n \"m4a\",\n \"mp3\",\n \"wav\",\n // Document formats\n \"html\",\n \"pdf\",\n \"yaml\",\n \"yml\",\n // Font formats\n \"otf\",\n \"ttf\",\n // Archives (virtual files)\n \"zip\"\n];\n"],"mappings":"AAwBA,MAAa,EAAqB,+HAkCjC"}
@@ -1,11 +0,0 @@
1
- //#region src/asset-extensions.d.ts
2
- /**
3
- * Default asset extensions
4
- *
5
- * @remarks
6
- * For more info please see the {@link https://github.com/facebook/metro/blob/v0.80.10/packages/metro-config/src/defaults/defaults.js#L18-L52 | Metro defaults}
7
- */
8
- declare const DEFAULT_ASSET_EXTS: string[];
9
- //#endregion
10
- export { DEFAULT_ASSET_EXTS as t };
11
- //# sourceMappingURL=asset-extensions-D-_39huh.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-extensions-D-_39huh.d.cts","names":[],"sources":["../src/asset-extensions.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;cAAa"}
@@ -1 +0,0 @@
1
- const e=`bmp.gif.jpg.jpeg.png.psd.svg.webp.m4v.mov.mp4.mpeg.mpg.webm.aac.aiff.caf.m4a.mp3.wav.html.pdf.yaml.yml.otf.ttf.zip`.split(`.`);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,11 +0,0 @@
1
- //#region src/asset-extensions.d.ts
2
- /**
3
- * Default asset extensions
4
- *
5
- * @remarks
6
- * For more info please see the {@link https://github.com/facebook/metro/blob/v0.80.10/packages/metro-config/src/defaults/defaults.js#L18-L52 | Metro defaults}
7
- */
8
- declare const DEFAULT_ASSET_EXTS: string[];
9
- //#endregion
10
- export { DEFAULT_ASSET_EXTS as t };
11
- //# sourceMappingURL=asset-extensions-DlN384ac.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-extensions-DlN384ac.d.mts","names":[],"sources":["../src/asset-extensions.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;cAAa"}
@@ -1 +0,0 @@
1
- const e=require(`./cwd-D66SsPHE.cjs`),t=require(`./regex-BEjSq2wo.cjs`),n=require(`./slash-DhzW1Om-.cjs`),r=require(`./join-paths-hCBPtGlC.cjs`),i=require(`./append-BWRdnlxE.cjs`);function a(e=``){return e&&n.n(e).replace(t.r,e=>e.toUpperCase())}function o(e){if(!e||e.length===0)return`.`;e=a(e);let r=e.match(t.c),i=n.i(e),o=e.endsWith(`/`);return e=c(e,!i),e.length===0?i?`/`:o?`./`:`.`:(o&&(e+=`/`),t.n.test(e)&&(e+=`/`),r?i?`//${e}`:`//./${e}`:!e.startsWith(`/`)&&i&&!t.n.test(e)?`/${e}`:e)}function s(e){if(!e||e.length===0)return`.`;e=o(e);let t=!1;return e.split(`/`).reduce((e,n)=>n?.trim()?t||n.includes(`*`)?(t=!0,e):e+(e?`/${n}`:n):e,``)}function c(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}function l(t,r=e.t()){return n.i(t)?t:n.n(c(i.r(t,r),!0))}function u(t,i=e.t()){return!t||t.length===0?`.`:(t=n.i(t)?n.n(c(t,!0)):n.n(c(r.n(i,t),!0)),t.startsWith(`./`)?t.slice(2):t)}function d(e){let t=o(e);return t.endsWith(`/`)?t:`${t}/`}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1,59 +0,0 @@
1
- //#region src/correct-path.d.ts
2
- declare function normalizeWindowsPath(input?: string): string;
3
- /**
4
- * Corrects/normalized a file path.
5
- *
6
- * @param path - The path to correct.
7
- * @returns The corrected path.
8
- */
9
- declare function correctPath(path?: string): string;
10
- /**
11
- * Remove any star tokens (*) from the end of the file path
12
- *
13
- * @example
14
- * stripStars("src/**") // returns "src"
15
- * stripStars("src/*") // returns "src"
16
- * stripStars("src/**\/*") // returns "src"
17
- * stripStars("src/**\/*.txt") // returns "src"
18
- * stripStars("src/**\/file.txt") // returns "src"
19
- * stripStars("src/file.txt") // returns "src/file.txt"
20
- * stripStars("") // returns "."
21
- *
22
- * @param path - The path to correct.
23
- * @returns The corrected path.
24
- */
25
- declare function stripStars(path?: string): string;
26
- /**
27
- * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
28
- *
29
- * @param path - The path to normalize.
30
- * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
31
- * @returns the normalize path string.
32
- */
33
- declare function normalizeString(path: string, allowAboveRoot: boolean): string;
34
- /**
35
- * Converts a given path to an absolute path based on the current working directory.
36
- *
37
- * @param path - The path to convert to an absolute path.
38
- * @param cwd - The current working directory to use as the base path if the path is not absolute.
39
- * @returns The absolute path.
40
- */
41
- declare function toAbsolutePath(path: string, cwd?: string): string;
42
- /**
43
- * Converts a given path to a relative path based on the current working directory.
44
- *
45
- * @param path - The path to convert to a relative path.
46
- * @param cwd - The current working directory to use as the base path if the path is not absolute.
47
- * @returns The relative path.
48
- */
49
- declare function toRelativePath(path: string, cwd?: string): string;
50
- /**
51
- * Adds a trailing slash to a path if it doesn't already have one.
52
- *
53
- * @param path - The path to modify.
54
- * @returns The modified path with a trailing slash.
55
- */
56
- declare function withTrailingSlash(path: string): string;
57
- //#endregion
58
- export { toAbsolutePath as a, stripStars as i, normalizeString as n, toRelativePath as o, normalizeWindowsPath as r, withTrailingSlash as s, correctPath as t };
59
- //# sourceMappingURL=correct-path-CwHhpk6I.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"correct-path-CwHhpk6I.d.cts","names":[],"sources":["../src/correct-path.ts"],"sourcesContent":[],"mappings":";iBA8BgB,oBAAA;AAAhB;AAcA;AA0DA;AA8BA;AA2EA;AAeA;AAwBgB,iBA1MA,WAAA,CA0MiB,IAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;;;;;;;;;;;iBAhJjB,UAAA;;;;;;;;iBA8BA,eAAA;;;;;;;;iBA2EA,cAAA;;;;;;;;iBAeA,cAAA;;;;;;;iBAwBA,iBAAA"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./cwd-DxrPG9WB.mjs";import{c as t,n,r}from"./regex-hMUNHeGK.mjs";import{i,n as a}from"./slash-C7xRDucF.mjs";import{n as o}from"./join-paths-BLjJ0GmK.mjs";import{r as s}from"./append-xQ5toDGS.mjs";function c(e=``){return e&&a(e).replace(r,e=>e.toUpperCase())}function l(e){if(!e||e.length===0)return`.`;e=c(e);let r=e.match(t),a=i(e),o=e.endsWith(`/`);return e=d(e,!a),e.length===0?a?`/`:o?`./`:`.`:(o&&(e+=`/`),n.test(e)&&(e+=`/`),r?a?`//${e}`:`//./${e}`:!e.startsWith(`/`)&&a&&!n.test(e)?`/${e}`:e)}function u(e){if(!e||e.length===0)return`.`;e=l(e);let t=!1;return e.split(`/`).reduce((e,n)=>n?.trim()?t||n.includes(`*`)?(t=!0,e):e+(e?`/${n}`:n):e,``)}function d(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}function f(t,n=e()){return i(t)?t:a(d(s(t,n),!0))}function p(t,n=e()){return!t||t.length===0?`.`:(t=i(t)?a(d(t,!0)):a(d(o(n,t),!0)),t.startsWith(`./`)?t.slice(2):t)}function m(e){let t=l(e);return t.endsWith(`/`)?t:`${t}/`}export{f as a,u as i,d as n,p as o,c as r,m as s,l as t};
2
- //# sourceMappingURL=correct-path-DmaZHNUF.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"correct-path-DmaZHNUF.mjs","names":["char: string | null","currentDir","cwd"],"sources":["../src/correct-path.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 { appendPath } from \"./append\";\nimport { cwd as currentDir } from \"./cwd\";\nimport { isAbsolutePath } from \"./is-type\";\nimport { joinPaths } from \"./join-paths\";\nimport {\n DRIVE_LETTER_REGEX,\n DRIVE_LETTER_START_REGEX,\n UNC_REGEX\n} from \"./regex\";\nimport { slash } from \"./slash\";\n\n// Util to normalize windows paths to posix\nexport function normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n\n return slash(input).replace(DRIVE_LETTER_START_REGEX, r => r.toUpperCase());\n}\n\n/**\n * Corrects/normalized a file path.\n *\n * @param path - The path to correct.\n * @returns The corrected path.\n */\nexport function correctPath(path?: string) {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n // Normalize windows argument\n path = normalizeWindowsPath(path);\n\n const isUNCPath = path.match(UNC_REGEX);\n const isPathAbsolute = isAbsolutePath(path);\n const trailingSeparator = path.endsWith(\"/\");\n\n // Normalize the path\n path = normalizeString(path, !isPathAbsolute);\n\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n\n if (trailingSeparator) {\n path += \"/\";\n }\n if (DRIVE_LETTER_REGEX.test(path)) {\n path += \"/\";\n }\n\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n\n return !path.startsWith(\"/\") &&\n isPathAbsolute &&\n !DRIVE_LETTER_REGEX.test(path)\n ? `/${path}`\n : path;\n}\n\n/**\n * Remove any star tokens (*) from the end of the file path\n *\n * @example\n * stripStars(\"src/**\") // returns \"src\"\n * stripStars(\"src/*\") // returns \"src\"\n * stripStars(\"src/**\\/*\") // returns \"src\"\n * stripStars(\"src/**\\/*.txt\") // returns \"src\"\n * stripStars(\"src/**\\/file.txt\") // returns \"src\"\n * stripStars(\"src/file.txt\") // returns \"src/file.txt\"\n * stripStars(\"\") // returns \".\"\n *\n * @param path - The path to correct.\n * @returns The corrected path.\n */\nexport function stripStars(path?: string) {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n path = correctPath(path);\n\n let found = false;\n\n return path.split(\"/\").reduce((ret, segment) => {\n if (!segment?.trim()) {\n return ret;\n }\n\n if (found || segment.includes(\"*\")) {\n found = true;\n return ret;\n }\n\n return ret + (ret ? `/${segment}` : segment);\n }, \"\");\n}\n\n/**\n * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n *\n * @param path - The path to normalize.\n * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n * @returns the normalize path string.\n */\nexport function normalizeString(path: string, allowAboveRoot: boolean) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char: string | null = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n // casted because we know it exists thanks to the length check\n char = path[index] as string;\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res[res.length - 1] !== \".\" ||\n res[res.length - 2] !== \".\"\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n/**\n * Converts a given path to an absolute path based on the current working directory.\n *\n * @param path - The path to convert to an absolute path.\n * @param cwd - The current working directory to use as the base path if the path is not absolute.\n * @returns The absolute path.\n */\nexport function toAbsolutePath(path: string, cwd = currentDir()): string {\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return slash(normalizeString(appendPath(path, cwd), true));\n}\n\n/**\n * Converts a given path to a relative path based on the current working directory.\n *\n * @param path - The path to convert to a relative path.\n * @param cwd - The current working directory to use as the base path if the path is not absolute.\n * @returns The relative path.\n */\nexport function toRelativePath(path: string, cwd = currentDir()): string {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n if (isAbsolutePath(path)) {\n path = slash(normalizeString(path, true));\n } else {\n path = slash(normalizeString(joinPaths(cwd, path), true));\n }\n\n if (path.startsWith(\"./\")) {\n return path.slice(2);\n }\n\n return path;\n}\n\n/**\n * Adds a trailing slash to a path if it doesn't already have one.\n *\n * @param path - The path to modify.\n * @returns The modified path with a trailing slash.\n */\nexport function withTrailingSlash(path: string): string {\n const result = correctPath(path);\n\n return result.endsWith(\"/\") ? result : `${result}/`;\n}\n"],"mappings":"uNA8BA,SAAgB,EAAqB,EAAQ,GAAI,CAK/C,OAJK,GAIE,EAAM,EAAM,CAAC,QAAQ,EAA0B,GAAK,EAAE,aAAa,CAAC,CAS7E,SAAgB,EAAY,EAAe,CACzC,GAAI,CAAC,GAAQ,EAAK,SAAW,EAC3B,MAAO,IAIT,EAAO,EAAqB,EAAK,CAEjC,IAAM,EAAY,EAAK,MAAM,EAAU,CACjC,EAAiB,EAAe,EAAK,CACrC,EAAoB,EAAK,SAAS,IAAI,CA0B5C,MAvBA,GAAO,EAAgB,EAAM,CAAC,EAAe,CAEzC,EAAK,SAAW,EACd,EACK,IAEF,EAAoB,KAAO,KAGhC,IACF,GAAQ,KAEN,EAAmB,KAAK,EAAK,GAC/B,GAAQ,KAGN,EACG,EAGE,KAAK,IAFH,OAAO,IAKX,CAAC,EAAK,WAAW,IAAI,EAC1B,GACA,CAAC,EAAmB,KAAK,EAAK,CAC5B,IAAI,IACJ,GAkBN,SAAgB,EAAW,EAAe,CACxC,GAAI,CAAC,GAAQ,EAAK,SAAW,EAC3B,MAAO,IAGT,EAAO,EAAY,EAAK,CAExB,IAAI,EAAQ,GAEZ,OAAO,EAAK,MAAM,IAAI,CAAC,QAAQ,EAAK,IAC7B,GAAS,MAAM,CAIhB,GAAS,EAAQ,SAAS,IAAI,EAChC,EAAQ,GACD,GAGF,GAAO,EAAM,IAAI,IAAY,GAR3B,EASR,GAAG,CAUR,SAAgB,EAAgB,EAAc,EAAyB,CACrE,IAAI,EAAM,GACN,EAAoB,EACpB,EAAY,GACZ,EAAO,EACPA,EAAsB,KAC1B,IAAK,IAAI,EAAQ,EAAG,GAAS,EAAK,OAAQ,EAAE,EAAO,CACjD,GAAI,EAAQ,EAAK,OAEf,EAAO,EAAK,WACH,IAAS,IAClB,WAEA,EAAO,IAET,GAAI,IAAS,IAAK,CAChB,GAAI,MAAc,EAAQ,GAAK,IAAS,GAAG,GAEhC,IAAS,EAAG,CACrB,GACE,EAAI,OAAS,GACb,IAAsB,GACtB,EAAI,EAAI,OAAS,KAAO,KACxB,EAAI,EAAI,OAAS,KAAO,QAEpB,EAAI,OAAS,EAAG,CAClB,IAAM,EAAiB,EAAI,YAAY,IAAI,CACvC,IAAmB,IACrB,EAAM,GACN,EAAoB,IAEpB,EAAM,EAAI,MAAM,EAAG,EAAe,CAClC,EAAoB,EAAI,OAAS,EAAI,EAAI,YAAY,IAAI,EAE3D,EAAY,EACZ,EAAO,EACP,iBACS,EAAI,OAAS,EAAG,CACzB,EAAM,GACN,EAAoB,EACpB,EAAY,EACZ,EAAO,EACP,UAGA,IACF,GAAO,EAAI,OAAS,EAAI,MAAQ,KAChC,EAAoB,QAGlB,EAAI,OAAS,EACf,GAAO,IAAI,EAAK,MAAM,EAAY,EAAG,EAAM,GAE3C,EAAM,EAAK,MAAM,EAAY,EAAG,EAAM,CAExC,EAAoB,EAAQ,EAAY,EAE1C,EAAY,EACZ,EAAO,OACE,IAAS,KAAO,IAAS,GAClC,EAAE,EAEF,EAAO,GAGX,OAAO,EAUT,SAAgB,EAAe,EAAc,EAAMC,GAAY,CAAU,CAKvE,OAJI,EAAe,EAAK,CACf,EAGF,EAAM,EAAgB,EAAW,EAAMC,EAAI,CAAE,GAAK,CAAC,CAU5D,SAAgB,EAAe,EAAc,EAAMD,GAAY,CAAU,CAevE,MAdI,CAAC,GAAQ,EAAK,SAAW,EACpB,KAGT,AAGE,EAHE,EAAe,EAAK,CACf,EAAM,EAAgB,EAAM,GAAK,CAAC,CAElC,EAAM,EAAgB,EAAUC,EAAK,EAAK,CAAE,GAAK,CAAC,CAGvD,EAAK,WAAW,KAAK,CAChB,EAAK,MAAM,EAAE,CAGf,GAST,SAAgB,EAAkB,EAAsB,CACtD,IAAM,EAAS,EAAY,EAAK,CAEhC,OAAO,EAAO,SAAS,IAAI,CAAG,EAAS,GAAG,EAAO"}
@@ -1,59 +0,0 @@
1
- //#region src/correct-path.d.ts
2
- declare function normalizeWindowsPath(input?: string): string;
3
- /**
4
- * Corrects/normalized a file path.
5
- *
6
- * @param path - The path to correct.
7
- * @returns The corrected path.
8
- */
9
- declare function correctPath(path?: string): string;
10
- /**
11
- * Remove any star tokens (*) from the end of the file path
12
- *
13
- * @example
14
- * stripStars("src/**") // returns "src"
15
- * stripStars("src/*") // returns "src"
16
- * stripStars("src/**\/*") // returns "src"
17
- * stripStars("src/**\/*.txt") // returns "src"
18
- * stripStars("src/**\/file.txt") // returns "src"
19
- * stripStars("src/file.txt") // returns "src/file.txt"
20
- * stripStars("") // returns "."
21
- *
22
- * @param path - The path to correct.
23
- * @returns The corrected path.
24
- */
25
- declare function stripStars(path?: string): string;
26
- /**
27
- * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
28
- *
29
- * @param path - The path to normalize.
30
- * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
31
- * @returns the normalize path string.
32
- */
33
- declare function normalizeString(path: string, allowAboveRoot: boolean): string;
34
- /**
35
- * Converts a given path to an absolute path based on the current working directory.
36
- *
37
- * @param path - The path to convert to an absolute path.
38
- * @param cwd - The current working directory to use as the base path if the path is not absolute.
39
- * @returns The absolute path.
40
- */
41
- declare function toAbsolutePath(path: string, cwd?: string): string;
42
- /**
43
- * Converts a given path to a relative path based on the current working directory.
44
- *
45
- * @param path - The path to convert to a relative path.
46
- * @param cwd - The current working directory to use as the base path if the path is not absolute.
47
- * @returns The relative path.
48
- */
49
- declare function toRelativePath(path: string, cwd?: string): string;
50
- /**
51
- * Adds a trailing slash to a path if it doesn't already have one.
52
- *
53
- * @param path - The path to modify.
54
- * @returns The modified path with a trailing slash.
55
- */
56
- declare function withTrailingSlash(path: string): string;
57
- //#endregion
58
- export { toAbsolutePath as a, stripStars as i, normalizeString as n, toRelativePath as o, normalizeWindowsPath as r, withTrailingSlash as s, correctPath as t };
59
- //# sourceMappingURL=correct-path-LC5QqYV-.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"correct-path-LC5QqYV-.d.mts","names":[],"sources":["../src/correct-path.ts"],"sourcesContent":[],"mappings":";iBA8BgB,oBAAA;AAAhB;AAcA;AA0DA;AA8BA;AA2EA;AAeA;AAwBgB,iBA1MA,WAAA,CA0MiB,IAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;;;;;;;;;;;iBAhJjB,UAAA;;;;;;;;iBA8BA,eAAA;;;;;;;;iBA2EA,cAAA;;;;;;;;iBAeA,cAAA;;;;;;;iBAwBA,iBAAA"}
@@ -1,13 +0,0 @@
1
- //#region src/cwd.d.ts
2
- /**
3
- * Get the current working directory.
4
- *
5
- * @remarks
6
- * This function attempts to retrieve the current working directory using `process.cwd()`.
7
- *
8
- * @returns The current working directory or '/' if it cannot be determined
9
- */
10
- declare function cwd(): string;
11
- //#endregion
12
- export { cwd as t };
13
- //# sourceMappingURL=cwd-Bt4NcS-v.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cwd-Bt4NcS-v.d.cts","names":[],"sources":["../src/cwd.ts"],"sourcesContent":[],"mappings":";;AA0BA;;;;;;;iBAAgB,GAAA,CAAA"}
@@ -1 +0,0 @@
1
- function e(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,13 +0,0 @@
1
- //#region src/cwd.d.ts
2
- /**
3
- * Get the current working directory.
4
- *
5
- * @remarks
6
- * This function attempts to retrieve the current working directory using `process.cwd()`.
7
- *
8
- * @returns The current working directory or '/' if it cannot be determined
9
- */
10
- declare function cwd(): string;
11
- //#endregion
12
- export { cwd as t };
13
- //# sourceMappingURL=cwd-Dx53cgUn.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cwd-Dx53cgUn.d.mts","names":[],"sources":["../src/cwd.ts"],"sourcesContent":[],"mappings":";;AA0BA;;;;;;;iBAAgB,GAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- function e(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}export{e as t};
2
- //# sourceMappingURL=cwd-DxrPG9WB.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cwd-DxrPG9WB.mjs","names":[],"sources":["../src/cwd.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\n/**\n * Get the current working directory.\n *\n * @remarks\n * This function attempts to retrieve the current working directory using `process.cwd()`.\n *\n * @returns The current working directory or '/' if it cannot be determined\n */\nexport function cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\n"],"mappings":"AA0BA,SAAgB,GAAM,CAIpB,OAHI,OAAO,QAAY,KAAe,OAAO,QAAQ,KAAQ,WACpD,QAAQ,KAAK,CAAC,QAAQ,MAAO,IAAI,CAEnC"}
@@ -1,2 +0,0 @@
1
- const e=(()=>process?.platform===`win32`?`;`:`:`)(),t={posix:void 0,win32:void 0},n=(n=e)=>new Proxy({},{get(e,a){return a===`delimiter`?n:a===`posix`?r:a===`win32`?i:t[a]}}),r=n(`:`),i=n(`;`);export{r as n,i as r,e as t};
2
- //# sourceMappingURL=delimiter-B3nWo9Xn.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delimiter-B3nWo9Xn.mjs","names":["delimiter: \";\" | \":\""],"sources":["../src/delimiter.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\n/**\n * The platform-specific file delimiter.\n *\n * Equals to `\";\"` in windows and `\":\"` in all other platforms.\n */\nexport const delimiter: \";\" | \":\" = /* @__PURE__ */ (() =>\n process?.platform === \"win32\" ? \";\" : \":\")();\n\n// Mix namespaces without side-effects of object to allow tree-shaking\n\nconst platforms = {\n posix: undefined,\n win32: undefined\n} as unknown as {\n posix: any;\n win32: any;\n};\n\nconst mix = (del: \";\" | \":\" = delimiter) => {\n return new Proxy(\n {},\n {\n get(_, prop) {\n if (prop === \"delimiter\") {\n return del;\n }\n if (prop === \"posix\") {\n // eslint-disable-next-line ts/no-use-before-define\n return posix;\n }\n if (prop === \"win32\") {\n // eslint-disable-next-line ts/no-use-before-define\n return win32;\n }\n return platforms[prop as keyof typeof platforms];\n }\n }\n ) as unknown as typeof platforms & { delimiter: typeof del };\n};\n\nexport const posix = /* @__PURE__ */ mix(\":\");\n\nexport const win32 = /* @__PURE__ */ mix(\";\");\n"],"mappings":"AAuBA,MAAaA,OACX,SAAS,WAAa,QAAU,IAAM,MAAM,CAIxC,EAAY,CAChB,MAAO,IAAA,GACP,MAAO,IAAA,GACR,CAKK,GAAO,EAAiB,IACrB,IAAI,MACT,EAAE,CACF,CACE,IAAI,EAAG,EAAM,CAYX,OAXI,IAAS,YACJ,EAEL,IAAS,QAEJ,EAEL,IAAS,QAEJ,EAEF,EAAU,IAEpB,CACF,CAGU,EAAwB,EAAI,IAAI,CAEhC,EAAwB,EAAI,IAAI"}
@@ -1,22 +0,0 @@
1
- //#region src/delimiter.d.ts
2
- /**
3
- * The platform-specific file delimiter.
4
- *
5
- * Equals to `";"` in windows and `":"` in all other platforms.
6
- */
7
- declare const delimiter: ";" | ":";
8
- declare const posix: {
9
- posix: any;
10
- win32: any;
11
- } & {
12
- delimiter: ";" | ":";
13
- };
14
- declare const win32: {
15
- posix: any;
16
- win32: any;
17
- } & {
18
- delimiter: ";" | ":";
19
- };
20
- //#endregion
21
- export { posix as n, win32 as r, delimiter as t };
22
- //# sourceMappingURL=delimiter-BwyCEwu9.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delimiter-BwyCEwu9.d.cts","names":[],"sources":["../src/delimiter.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAmCA;AAEA;;cArCa;cAmCA;;;;;;cAEA"}
@@ -1,22 +0,0 @@
1
- //#region src/delimiter.d.ts
2
- /**
3
- * The platform-specific file delimiter.
4
- *
5
- * Equals to `";"` in windows and `":"` in all other platforms.
6
- */
7
- declare const delimiter: ";" | ":";
8
- declare const posix: {
9
- posix: any;
10
- win32: any;
11
- } & {
12
- delimiter: ";" | ":";
13
- };
14
- declare const win32: {
15
- posix: any;
16
- win32: any;
17
- } & {
18
- delimiter: ";" | ":";
19
- };
20
- //#endregion
21
- export { posix as n, win32 as r, delimiter as t };
22
- //# sourceMappingURL=delimiter-DuDX7fvN.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delimiter-DuDX7fvN.d.mts","names":[],"sources":["../src/delimiter.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAmCA;AAEA;;cArCa;cAmCA;;;;;;cAEA"}
@@ -1 +0,0 @@
1
- const e=(()=>process?.platform===`win32`?`;`:`:`)(),t={posix:void 0,win32:void 0},n=(n=e)=>new Proxy({},{get(e,a){return a===`delimiter`?n:a===`posix`?r:a===`win32`?i:t[a]}}),r=n(`:`),i=n(`;`);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});