@poveste/vendors 0.14.0 → 0.15.0

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/dist/client/b-floating-vue.js +1 -1
  2. package/dist/client/b-iconify.js +1429 -1416
  3. package/dist/client/b-pinia.js +1359 -1936
  4. package/dist/client/b-vue-router.js +787 -502
  5. package/dist/client/b-vue-use.js +497 -367
  6. package/dist/client/b-vue.js +1 -1
  7. package/dist/client/devtools-api.js +6568 -0
  8. package/dist/client/index.js +178 -162
  9. package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +17 -72
  10. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +7 -12
  11. package/dist/client/node_modules/@iconify/vue/offline/package.json +2 -2
  12. package/dist/client/node_modules/@iconify/vue/package.json +13 -16
  13. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +88 -0
  14. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts +32 -0
  15. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
  16. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +43 -0
  17. package/dist/client/node_modules/@jridgewell/gen-mapping/package.json +67 -0
  18. package/dist/client/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +89 -0
  19. package/dist/client/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +33 -0
  20. package/dist/client/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +13 -0
  21. package/dist/client/node_modules/@jridgewell/gen-mapping/types/types.d.mts +44 -0
  22. package/dist/client/node_modules/@jridgewell/remapping/package.json +71 -0
  23. package/dist/client/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts +15 -0
  24. package/dist/client/node_modules/@jridgewell/remapping/types/remapping.d.mts +21 -0
  25. package/dist/client/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts +46 -0
  26. package/dist/client/node_modules/@jridgewell/remapping/types/source-map.d.mts +19 -0
  27. package/dist/client/node_modules/@jridgewell/remapping/types/types.d.mts +16 -0
  28. package/dist/client/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
  29. package/dist/client/node_modules/@jridgewell/resolve-uri/package.json +69 -0
  30. package/dist/client/node_modules/@jridgewell/trace-mapping/package.json +67 -0
  31. package/dist/client/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
  32. package/dist/client/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts +4 -0
  33. package/dist/client/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
  34. package/dist/client/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
  35. package/dist/client/node_modules/@jridgewell/trace-mapping/types/sort.d.mts +4 -0
  36. package/dist/client/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
  37. package/dist/client/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts +5 -0
  38. package/dist/client/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
  39. package/dist/client/node_modules/@jridgewell/trace-mapping/types/types.d.mts +107 -0
  40. package/dist/client/node_modules/@vue/devtools-api/dist/index-node.d.ts +11 -0
  41. package/dist/client/node_modules/@vue/devtools-api/dist/index.d.ts +2 -0
  42. package/dist/client/node_modules/@vue/devtools-api/package.json +25 -24
  43. package/dist/client/node_modules/@vue/devtools-kit/dist/index.d.ts +1170 -0
  44. package/dist/client/node_modules/@vue/devtools-kit/global.d.ts +20 -0
  45. package/dist/client/node_modules/@vue/devtools-kit/package.json +44 -0
  46. package/dist/client/node_modules/@vue/devtools-kit/types.d.ts +2 -0
  47. package/dist/client/node_modules/@vue/devtools-shared/dist/index.d.ts +40 -0
  48. package/dist/client/node_modules/@vue/devtools-shared/package.json +33 -0
  49. package/dist/client/node_modules/@vue-macros/common/dist/index.d.ts +124 -0
  50. package/dist/client/node_modules/@vue-macros/common/package.json +63 -0
  51. package/dist/client/node_modules/@vueuse/core/dist/index.d.ts +223 -111
  52. package/dist/client/node_modules/@vueuse/core/package.json +10 -3
  53. package/dist/client/node_modules/@vueuse/metadata/package.json +4 -1
  54. package/dist/client/node_modules/@vueuse/shared/dist/index.d.ts +2 -2
  55. package/dist/client/node_modules/@vueuse/shared/package.json +4 -1
  56. package/dist/client/node_modules/acorn/dist/acorn.d.mts +897 -0
  57. package/dist/client/node_modules/acorn/dist/acorn.d.ts +897 -0
  58. package/dist/client/node_modules/acorn/package.json +50 -0
  59. package/dist/client/node_modules/ast-kit/dist/index.d.ts +380 -0
  60. package/dist/client/node_modules/ast-kit/package.json +63 -0
  61. package/dist/client/node_modules/ast-walker-scope/dist/index.d.mts +51 -0
  62. package/dist/client/node_modules/ast-walker-scope/package.json +60 -0
  63. package/dist/client/node_modules/birpc/dist/index.d.mts +215 -0
  64. package/dist/client/node_modules/birpc/dist/index.d.ts +215 -0
  65. package/dist/client/node_modules/birpc/package.json +57 -0
  66. package/dist/client/node_modules/chokidar/handler.d.ts +90 -0
  67. package/dist/client/node_modules/chokidar/index.d.ts +217 -0
  68. package/dist/client/node_modules/chokidar/package.json +63 -0
  69. package/dist/client/node_modules/confbox/dist/_chunks/_format.d.mts +25 -0
  70. package/dist/client/node_modules/confbox/dist/index.d.mts +34 -0
  71. package/dist/client/node_modules/confbox/dist/ini.d.mts +62 -0
  72. package/dist/client/node_modules/confbox/dist/json5.d.mts +59 -0
  73. package/dist/client/node_modules/confbox/dist/jsonc.d.mts +41 -0
  74. package/dist/client/node_modules/confbox/dist/toml.d.mts +23 -0
  75. package/dist/client/node_modules/confbox/dist/yaml.d.mts +96 -0
  76. package/dist/client/node_modules/confbox/package.json +67 -0
  77. package/dist/client/node_modules/exsolve/dist/index.d.mts +66 -0
  78. package/dist/client/node_modules/exsolve/package.json +42 -0
  79. package/dist/client/node_modules/fdir/dist/index.d.mts +155 -0
  80. package/dist/client/node_modules/fdir/package.json +103 -0
  81. package/dist/client/node_modules/hookable/dist/index.d.ts +103 -0
  82. package/dist/client/node_modules/hookable/package.json +49 -0
  83. package/dist/client/node_modules/local-pkg/dist/index.d.mts +42 -0
  84. package/dist/client/node_modules/local-pkg/dist/index.d.ts +42 -0
  85. package/dist/client/node_modules/local-pkg/package.json +65 -0
  86. package/dist/client/node_modules/magic-string-ast/dist/index.d.ts +67 -0
  87. package/dist/client/node_modules/magic-string-ast/package.json +64 -0
  88. package/dist/client/node_modules/mlly/dist/index.d.mts +564 -0
  89. package/dist/client/node_modules/mlly/dist/index.d.ts +564 -0
  90. package/dist/client/node_modules/mlly/node_modules/confbox/dist/index.d.mts +32 -0
  91. package/dist/client/node_modules/mlly/node_modules/confbox/dist/index.d.ts +32 -0
  92. package/dist/client/node_modules/mlly/node_modules/confbox/dist/json5.d.mts +58 -0
  93. package/dist/client/node_modules/mlly/node_modules/confbox/dist/json5.d.ts +58 -0
  94. package/dist/client/node_modules/mlly/node_modules/confbox/dist/jsonc.d.mts +41 -0
  95. package/dist/client/node_modules/mlly/node_modules/confbox/dist/jsonc.d.ts +41 -0
  96. package/dist/client/node_modules/mlly/node_modules/confbox/dist/shared/confbox.9745c98f.d.mts +24 -0
  97. package/dist/client/node_modules/mlly/node_modules/confbox/dist/shared/confbox.9745c98f.d.ts +24 -0
  98. package/dist/client/node_modules/mlly/node_modules/confbox/dist/toml.d.mts +22 -0
  99. package/dist/client/node_modules/mlly/node_modules/confbox/dist/toml.d.ts +22 -0
  100. package/dist/client/node_modules/mlly/node_modules/confbox/dist/yaml.d.mts +95 -0
  101. package/dist/client/node_modules/mlly/node_modules/confbox/dist/yaml.d.ts +95 -0
  102. package/dist/client/node_modules/mlly/node_modules/confbox/json5.d.ts +2 -0
  103. package/dist/client/node_modules/mlly/node_modules/confbox/jsonc.d.ts +2 -0
  104. package/dist/client/node_modules/mlly/node_modules/confbox/package.json +86 -0
  105. package/dist/client/node_modules/mlly/node_modules/confbox/toml.d.ts +2 -0
  106. package/dist/client/node_modules/mlly/node_modules/confbox/yaml.d.ts +2 -0
  107. package/dist/client/node_modules/mlly/node_modules/pkg-types/dist/index.d.mts +411 -0
  108. package/dist/client/node_modules/mlly/node_modules/pkg-types/dist/index.d.ts +411 -0
  109. package/dist/client/node_modules/mlly/node_modules/pkg-types/package.json +47 -0
  110. package/dist/client/node_modules/mlly/package.json +55 -0
  111. package/dist/client/node_modules/muggle-string/out/base.d.ts +6 -0
  112. package/dist/client/node_modules/muggle-string/out/basic.d.ts +6 -0
  113. package/dist/client/node_modules/muggle-string/out/binarySearch.d.ts +1 -0
  114. package/dist/client/node_modules/muggle-string/out/common.d.ts +9 -0
  115. package/dist/client/node_modules/muggle-string/out/getLength.d.ts +2 -0
  116. package/dist/client/node_modules/muggle-string/out/index.d.ts +10 -0
  117. package/dist/client/node_modules/muggle-string/out/map.d.ts +3 -0
  118. package/dist/client/node_modules/muggle-string/out/overwriteSource.d.ts +3 -0
  119. package/dist/client/node_modules/muggle-string/out/replace.d.ts +3 -0
  120. package/dist/client/node_modules/muggle-string/out/segment.d.ts +6 -0
  121. package/dist/client/node_modules/muggle-string/out/sourceBased.d.ts +3 -0
  122. package/dist/client/node_modules/muggle-string/out/toString.d.ts +2 -0
  123. package/dist/client/node_modules/muggle-string/out/track.d.ts +6 -0
  124. package/dist/client/node_modules/muggle-string/out/types.d.ts +16 -0
  125. package/dist/client/node_modules/muggle-string/package.json +22 -0
  126. package/dist/client/node_modules/nostics/dist/diagnostic-wduO7saY.d.mts +295 -0
  127. package/dist/client/node_modules/nostics/dist/formatters/ansi.d.mts +15 -0
  128. package/dist/client/node_modules/nostics/dist/formatters/json.d.mts +7 -0
  129. package/dist/client/node_modules/nostics/dist/index.d.mts +51 -0
  130. package/dist/client/node_modules/nostics/dist/reporters/dev.d.mts +13 -0
  131. package/dist/client/node_modules/nostics/dist/reporters/fetch.d.mts +11 -0
  132. package/dist/client/node_modules/nostics/dist/reporters/node.d.mts +43 -0
  133. package/dist/client/node_modules/nostics/package.json +125 -0
  134. package/dist/client/node_modules/pathe/dist/index.d.mts +47 -0
  135. package/dist/client/node_modules/pathe/dist/index.d.ts +47 -0
  136. package/dist/client/node_modules/pathe/dist/utils.d.mts +32 -0
  137. package/dist/client/node_modules/pathe/dist/utils.d.ts +32 -0
  138. package/dist/client/node_modules/pathe/package.json +61 -0
  139. package/dist/client/node_modules/pathe/utils.d.ts +1 -0
  140. package/dist/client/node_modules/perfect-debounce/dist/index.d.mts +49 -0
  141. package/dist/client/node_modules/perfect-debounce/package.json +41 -0
  142. package/dist/client/node_modules/picomatch/package.json +83 -0
  143. package/dist/client/node_modules/pinia/dist/pinia.d.ts +937 -1056
  144. package/dist/client/node_modules/pinia/package.json +53 -67
  145. package/dist/client/node_modules/pkg-types/dist/index.d.mts +695 -0
  146. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/_chunks/_format.d.mts +22 -0
  147. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/_chunks/libs/js-yaml.d.mts +33 -0
  148. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/index.d.mts +7 -0
  149. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/ini.d.mts +59 -0
  150. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/json.d.mts +25 -0
  151. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/json5.d.mts +55 -0
  152. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/jsonc.d.mts +29 -0
  153. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/toml.d.mts +20 -0
  154. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/yaml.d.mts +101 -0
  155. package/dist/client/node_modules/pkg-types/node_modules/confbox/package.json +68 -0
  156. package/dist/client/node_modules/pkg-types/package.json +47 -0
  157. package/dist/client/node_modules/quansync/dist/index.d.mts +22 -0
  158. package/dist/client/node_modules/quansync/dist/index.d.ts +22 -0
  159. package/dist/client/node_modules/quansync/dist/macro.d.mts +18 -0
  160. package/dist/client/node_modules/quansync/dist/macro.d.ts +18 -0
  161. package/dist/client/node_modules/quansync/dist/types.d.mts +27 -0
  162. package/dist/client/node_modules/quansync/dist/types.d.ts +27 -0
  163. package/dist/client/node_modules/quansync/package.json +95 -0
  164. package/dist/client/node_modules/readdirp/index.d.ts +117 -0
  165. package/dist/client/node_modules/readdirp/package.json +62 -0
  166. package/dist/client/node_modules/scule/dist/index.d.mts +57 -0
  167. package/dist/client/node_modules/scule/dist/index.d.ts +57 -0
  168. package/dist/client/node_modules/scule/package.json +43 -0
  169. package/dist/client/node_modules/tinyglobby/dist/index.d.mts +148 -0
  170. package/dist/client/node_modules/tinyglobby/package.json +70 -0
  171. package/dist/client/node_modules/ufo/dist/index.d.mts +714 -0
  172. package/dist/client/node_modules/ufo/dist/index.d.ts +714 -0
  173. package/dist/client/node_modules/ufo/package.json +48 -0
  174. package/dist/client/node_modules/unplugin/dist/index.d.mts +241 -0
  175. package/dist/client/node_modules/unplugin/dist/rspack/loaders/load.d.mts +4 -0
  176. package/dist/client/node_modules/unplugin/dist/rspack/loaders/transform.d.mts +4 -0
  177. package/dist/client/node_modules/unplugin/dist/webpack/loaders/load.d.mts +4 -0
  178. package/dist/client/node_modules/unplugin/dist/webpack/loaders/transform.d.mts +4 -0
  179. package/dist/client/node_modules/unplugin/package.json +146 -0
  180. package/dist/client/node_modules/unplugin-utils/dist/index.d.ts +31 -0
  181. package/dist/client/node_modules/unplugin-utils/package.json +61 -0
  182. package/dist/client/node_modules/vue-router/dist/experimental/index.d.ts +7 -0
  183. package/dist/client/node_modules/vue-router/dist/experimental/pinia-colada.d.ts +151 -0
  184. package/dist/client/node_modules/vue-router/dist/{router-CWoNjPRp.d.mts → index-D7ja2BKs.d.ts} +2480 -1160
  185. package/dist/client/node_modules/vue-router/dist/options-CwYZKRl4.d.mts +2923 -0
  186. package/dist/client/node_modules/vue-router/dist/unplugin/esbuild.d.mts +10 -0
  187. package/dist/client/node_modules/vue-router/dist/unplugin/index.d.mts +62 -0
  188. package/dist/client/node_modules/vue-router/dist/unplugin/options.d.mts +7 -0
  189. package/dist/client/node_modules/vue-router/dist/unplugin/rolldown.d.mts +10 -0
  190. package/dist/client/node_modules/vue-router/dist/unplugin/rollup.d.mts +10 -0
  191. package/dist/client/node_modules/vue-router/dist/unplugin/types.d.mts +7 -0
  192. package/dist/client/node_modules/vue-router/dist/unplugin/vite.d.mts +10 -0
  193. package/dist/client/node_modules/vue-router/dist/unplugin/webpack.d.mts +10 -0
  194. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +7 -0
  195. package/dist/client/node_modules/vue-router/package.json +153 -95
  196. package/dist/client/node_modules/vue-router/vue-router-auto-resolver.d.mts +22 -17
  197. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.mts +53 -0
  198. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +2 -1
  199. package/dist/client/node_modules/webpack-virtual-modules/lib/index.d.ts +15 -0
  200. package/dist/client/node_modules/webpack-virtual-modules/lib/virtual-stats.d.ts +11 -0
  201. package/dist/client/node_modules/webpack-virtual-modules/package.json +82 -0
  202. package/dist/client/vue.runtime.esm-bundler.js +1 -176
  203. package/package.json +8 -7
  204. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +0 -108
  205. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +0 -1
  206. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +0 -78
  207. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +0 -5
  208. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +0 -180
  209. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +0 -6
  210. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +0 -4
  211. package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +0 -2
  212. package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +0 -15
  213. package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +0 -18
  214. package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +0 -47
  215. package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +0 -20
  216. package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +0 -2
  217. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +0 -22
  218. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  219. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  220. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  221. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +0 -47
  222. package/dist/client/node_modules/vue-router/dist/experimental/index.d.mts +0 -38
  223. package/dist/client/node_modules/vue-router/dist/vue-router.d.mts +0 -361
  224. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +0 -4
@@ -0,0 +1,295 @@
1
+ //#region src/utils.d.ts
2
+ /**
3
+ * A value of type T, or a function that resolves T from a single params object.
4
+ *
5
+ * @internal
6
+ */
7
+ type ValueOrFn<T, P = any> = T | ((params: P) => T);
8
+ /**
9
+ * Extracts the param type from a single-arg function, or `never` for
10
+ * non-function inputs. Pairs with {@link ValueOrFn}.
11
+ *
12
+ * @internal
13
+ */
14
+ type ExtractFnParam<T> = T extends ((params: infer P) => any) ? P : never;
15
+ /**
16
+ * Converts a union of types to their intersection.
17
+ *
18
+ * @internal
19
+ */
20
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
21
+ /**
22
+ * `true` when `T` is the `any` type.
23
+ *
24
+ * @internal
25
+ */
26
+ type IsAny<Type> = 0 extends 1 & Type ? true : false;
27
+ /**
28
+ * `true` when `T` is the `unknown` type (and not `any`).
29
+ *
30
+ * @internal
31
+ */
32
+ type IsUnknown<Type> = IsAny<Type> extends true ? false : unknown extends Type ? true : false;
33
+ /**
34
+ * Expands a type to its property listing so editor hovers show the resolved
35
+ * shape instead of a chain of aliases / intersections.
36
+ *
37
+ * @internal
38
+ */
39
+ type Prettify<Type> = { [Key in keyof Type]: Type[Key] };
40
+ //#endregion
41
+ //#region src/diagnostic.d.ts
42
+ /**
43
+ * Define-time shape of a diagnostic. Each field can be a static value or a
44
+ * function that resolves it from a shared `params` object passed at call
45
+ * time. Runtime-only fields (`cause`, `sources`) from {@link DiagnosticInit}
46
+ * are intentionally omitted: they're only meaningful at the call site.
47
+ */
48
+ interface DiagnosticDefinition<P = any> {
49
+ /**
50
+ * The error message: why this failed. String, or a function of `params`.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * why: (p: { name: string }) => `module "${p.name}" failed to load`
55
+ * ```
56
+ */
57
+ why: ValueOrFn<string, P>;
58
+ /**
59
+ * Actionable instructions on how to resolve the problem. String, or a
60
+ * function of `params`.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * fix: (p: { name: string }) => `run "npm install ${p.name}"`
65
+ * ```
66
+ */
67
+ fix?: ValueOrFn<string, P>;
68
+ /**
69
+ * Per-code docs URL. A string overrides
70
+ * {@link DefineDiagnosticsOptions.docsBase} for this code; `false` opts this
71
+ * code out entirely, even when `docsBase` is set. When omitted, the URL is
72
+ * derived from `docsBase`.
73
+ */
74
+ docs?: string | false;
75
+ }
76
+ /**
77
+ * Runtime-only fields that can be passed alongside the interpolation params
78
+ * at call time. Merged into the same object so callers pass everything in
79
+ * one place.
80
+ */
81
+ interface DiagnosticCallParams {
82
+ /**
83
+ * Original error or exception that triggered this diagnostic. Pass it
84
+ * through when re-throwing so the original stack trace is preserved.
85
+ */
86
+ cause?: unknown;
87
+ /**
88
+ * Locations in user code that contributed to this diagnostic, in
89
+ * `file:line:column` format. Useful for compilers and other tools where the
90
+ * JS stack trace doesn't reflect the user's source.
91
+ */
92
+ sources?: string[];
93
+ }
94
+ /**
95
+ * Structured initializer for a {@link Diagnostic}. `why` is the only required
96
+ * field: it becomes the {@link Diagnostic.message}. The remaining fields are
97
+ * optional metadata that reporters and consumers can render or forward.
98
+ */
99
+ interface DiagnosticInit extends DiagnosticCallParams {
100
+ /**
101
+ * The diagnostic code, e.g. `MATH_E001`. Appear as {@link Diagnostic.name}.
102
+ */
103
+ code: string;
104
+ /**
105
+ * The actual error message: why this failed.
106
+ * Mirrored to `Error.message`.
107
+ */
108
+ why: string;
109
+ /**
110
+ * Optional actionable instructions on how to resolve the problem.
111
+ */
112
+ fix?: string;
113
+ /**
114
+ * URL to extended documentation for this diagnostic.
115
+ */
116
+ docs?: string;
117
+ }
118
+ /**
119
+ * Represents how to report a diagnostic. Could call `console.log()`, send the
120
+ * diagnostic to a server, or something else. Reporters declare the shape of
121
+ * options they need via `ReporterOpts`; `defineDiagnostics` intersects every
122
+ * reporter's options into a single object passed at the call site.
123
+ */
124
+ type DiagnosticReporter<ReporterOpts extends object = {}> = (diagnostic: Diagnostic, options: ReporterOpts) => void;
125
+ /**
126
+ * Permissive reporter constraint used internally so reporters with 1 arg,
127
+ * required options, or optional options all satisfy the array constraint.
128
+ *
129
+ * @internal
130
+ */
131
+ type AnyDiagnosticReporter = (diagnostic: Diagnostic, options: any) => void;
132
+ /**
133
+ * The `console` methods a log reporter can route to.
134
+ */
135
+ type ConsoleMethod = "log" | "error" | "warn";
136
+ /**
137
+ * Options for {@link createConsoleReporter}.
138
+ */
139
+ interface ConsoleReporterOptions {
140
+ /**
141
+ * `console` method used to print the diagnostic. Defaults to `'warn'`. The
142
+ * returned reporter still accepts a per-call `{ method }` override through
143
+ * the call-site reporter options.
144
+ */
145
+ method?: ConsoleMethod;
146
+ /**
147
+ * Renders the diagnostic into the string handed to `console`. Defaults to
148
+ * {@link formatDiagnostic}, the plain unicode-decorated formatter.
149
+ */
150
+ formatter?: (diagnostic: Diagnostic) => string;
151
+ }
152
+ /**
153
+ * Creates a console reporter that renders each diagnostic with `formatter` and
154
+ * prints the result via `console[method]`. Both default sensibly (`'warn'` and
155
+ * {@link formatDiagnostic}); `method` can also be overridden per call through
156
+ * the reporter options.
157
+ */
158
+ declare function createConsoleReporter({
159
+ method: defaultMethod,
160
+ formatter
161
+ }?: ConsoleReporterOptions): DiagnosticReporter<{
162
+ method?: ConsoleMethod;
163
+ }>;
164
+ /**
165
+ * Resolves the `params` type a code expects from the intersection of params
166
+ * across all function-typed fields, falling back to `{}` when every field is
167
+ * static. Merged with {@link DiagnosticCallParams} at the call site.
168
+ *
169
+ * @internal
170
+ */
171
+ type InferCodeParams<Def> = [ExtractFnParam<Def[keyof Def]>] extends [never] ? {} : UnionToIntersection<ExtractFnParam<Def[keyof Def]>>;
172
+ /**
173
+ * Options for {@link defineDiagnostics}.
174
+ */
175
+ interface DefineDiagnosticsOptions<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[]> {
176
+ /**
177
+ * Base URL or resolver for documentation links. When a string, the code is
178
+ * appended as a lowercase path segment (e.g. `"https://docs.example.com"` →
179
+ * `"https://docs.example.com/math_e001"`). When a function, receives the
180
+ * code and returns a URL or `undefined`.
181
+ */
182
+ docsBase?: string | ((code: keyof Codes) => string | undefined);
183
+ /**
184
+ * Map of diagnostic codes to their definitions.
185
+ */
186
+ codes: Codes;
187
+ /**
188
+ * Reporters called every time a diagnostic is produced. Can be used to
189
+ * integrate with custom logging.
190
+ */
191
+ reporters?: Reporters;
192
+ }
193
+ /**
194
+ * The first positional argument of a {@link DiagnosticHandle} call:
195
+ * interpolation params merged with the runtime-only call-site fields
196
+ * (`cause`, `sources`).
197
+ *
198
+ * @internal
199
+ */
200
+ type CallSiteParams<Params> = Params & DiagnosticCallParams;
201
+ /**
202
+ * Resolves the full argument tuple for a {@link DiagnosticHandle} call.
203
+ * Branches on whether params and reporter options each have required fields.
204
+ * Required positions become required tuple elements, all-optional ones
205
+ * become `?`, and when no reporter declares any options the parameter is
206
+ * omitted entirely.
207
+ *
208
+ * @internal
209
+ */
210
+ type ActionArgs<Params, ReporterOpts> = keyof ReporterOpts extends never ? {} extends Params ? [params?: CallSiteParams<Params>] : [params: CallSiteParams<Params>] : {} extends ReporterOpts ? {} extends Params ? [params?: CallSiteParams<Params>, reporterOptions?: ReporterOpts] : [params: CallSiteParams<Params>, reporterOptions?: ReporterOpts] : {} extends Params ? [params: CallSiteParams<Params> | undefined, reporterOptions: ReporterOpts] : [params: CallSiteParams<Params>, reporterOptions: ReporterOpts];
211
+ /**
212
+ * Per-code handle exposed by {@link defineDiagnostics}. Each code is a
213
+ * callable: invoke it to build the diagnostic and run every reporter, or
214
+ * prefix the call with `throw` to raise it.
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * diagnostics.MATH_E001({ name: 'x' }) // report
219
+ * throw diagnostics.MATH_E001({ name: 'x' }) // throw
220
+ * ```
221
+ */
222
+ interface DiagnosticHandle<Params, ReporterOpts> {
223
+ /**
224
+ * Builds the diagnostic, runs every reporter, and returns the diagnostic
225
+ * instance. The returned diagnostic can be inspected, attached as `cause`,
226
+ * or thrown with `throw`.
227
+ */
228
+ (...args: ActionArgs<Params, ReporterOpts>): Diagnostic;
229
+ }
230
+ /**
231
+ * Return type of {@link defineDiagnostics}.
232
+ */
233
+ type Diagnostics<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[]> = { [Code in keyof Codes]: DiagnosticHandle<InferCodeParams<Codes[Code]>, Prettify<ExtractReportersOptions<Reporters>>> };
234
+ declare class Diagnostic extends Error {
235
+ name: string;
236
+ /**
237
+ * The diagnostic code, e.g. `MATH_E001`.
238
+ * Also appears as the `name` property.
239
+ */
240
+ code: string;
241
+ /**
242
+ * URL to extended documentation for this diagnostic code.
243
+ * Auto-generated from {@link DefineDiagnosticsOptions.docsBase}.
244
+ */
245
+ docs?: string;
246
+ /**
247
+ * Optional actionable instructions on how to resolve the problem.
248
+ */
249
+ fix?: string;
250
+ /**
251
+ * Locations in user code that contributed to this diagnostic, in
252
+ * `file:line:column` format. Relevant when the stack trace doesn't reflect
253
+ * the user's source (e.g. compilers, bundlers), otherwise redundant with the
254
+ * stack and should be omitted.
255
+ */
256
+ sources?: string[];
257
+ /**
258
+ * Alias for {@link Error.message}: the reason this diagnostic was raised.
259
+ */
260
+ get why(): string;
261
+ /**
262
+ * @param init structured initializer; `why` is required
263
+ * @param captureFrom V8 stack-cutoff frame. Defaults to {@link Diagnostic}
264
+ * so the top of the trace is the `new Diagnostic(...)` call site.
265
+ * `defineDiagnostics` passes its action method to strip its own frames too.
266
+ * Ignored on engines without `Error.captureStackTrace`.
267
+ */
268
+ constructor(init: DiagnosticInit, captureFrom?: Function);
269
+ /**
270
+ * Converts the diagnostic into a serializable structured object.
271
+ */
272
+ toJSON(): object;
273
+ }
274
+ /**
275
+ * Creates a typed diagnostics object from a set of code definitions. Each
276
+ * code becomes a callable {@link DiagnosticHandle}: invoke to report, or
277
+ * `throw` the result to raise. No `new` required, no proxy.
278
+ */
279
+ declare function defineDiagnostics<const Codes extends Record<string, DiagnosticDefinition>, const Reporters extends readonly AnyDiagnosticReporter[]>(options: DefineDiagnosticsOptions<Codes, Reporters>): Diagnostics<Codes, Reporters>;
280
+ /**
281
+ * Extracts the options object a reporter accepts as its 2nd argument. Returns
282
+ * `{}` when the reporter has no 2nd arg (so it contributes nothing to the
283
+ * merged shape).
284
+ */
285
+ type ExtractSingleReporterOptions<Reporter> = Reporter extends ((diagnostic: Diagnostic, options: infer ReporterOpts) => any) ? IsUnknown<ReporterOpts> extends true ? {} : Exclude<ReporterOpts, undefined> : {};
286
+ /**
287
+ * Intersects every reporter's options shape into a single object. If any
288
+ * reporter has a required field, the merged shape has a required field, and
289
+ * {@link ActionArgs} flips `reporterOptions` from optional to required via
290
+ * `{} extends Merged`.
291
+ */
292
+ type ExtractReportersOptions<Reporters extends readonly any[]> = Reporters extends readonly [infer First, ...infer Rest] ? ExtractSingleReporterOptions<First> & ExtractReportersOptions<Rest> : {};
293
+ //#endregion
294
+ export { Diagnostic as a, DiagnosticHandle as c, Diagnostics as d, createConsoleReporter as f, DefineDiagnosticsOptions as i, DiagnosticInit as l, ValueOrFn as m, ConsoleMethod as n, DiagnosticCallParams as o, defineDiagnostics as p, ConsoleReporterOptions as r, DiagnosticDefinition as s, AnyDiagnosticReporter as t, DiagnosticReporter as u };
295
+ //# sourceMappingURL=diagnostic-wduO7saY.d.mts.map
@@ -0,0 +1,15 @@
1
+ import { a as Diagnostic } from "../diagnostic-wduO7saY.mjs";
2
+
3
+ //#region src/formatters/ansi.d.ts
4
+ interface Colors {
5
+ red: (s: string) => string;
6
+ yellow: (s: string) => string;
7
+ cyan: (s: string) => string;
8
+ gray: (s: string) => string;
9
+ bold: (s: string) => string;
10
+ dim: (s: string) => string;
11
+ }
12
+ declare function ansiFormatter(colors: Colors): (d: Diagnostic) => string;
13
+ //#endregion
14
+ export { Colors, ansiFormatter };
15
+ //# sourceMappingURL=ansi.d.mts.map
@@ -0,0 +1,7 @@
1
+ import { a as Diagnostic } from "../diagnostic-wduO7saY.mjs";
2
+
3
+ //#region src/formatters/json.d.ts
4
+ declare const jsonFormatter: (d: Diagnostic) => string;
5
+ //#endregion
6
+ export { jsonFormatter };
7
+ //# sourceMappingURL=json.d.mts.map
@@ -0,0 +1,51 @@
1
+ import { a as Diagnostic, c as DiagnosticHandle, d as Diagnostics, f as createConsoleReporter, i as DefineDiagnosticsOptions, l as DiagnosticInit, m as ValueOrFn, n as ConsoleMethod, o as DiagnosticCallParams, p as defineDiagnostics, r as ConsoleReporterOptions, s as DiagnosticDefinition, t as AnyDiagnosticReporter, u as DiagnosticReporter } from "./diagnostic-wduO7saY.mjs";
2
+
3
+ //#region src/formatters/plain.d.ts
4
+ /**
5
+ * Renders a diagnostic into a multi-line, unicode-decorated string suitable
6
+ * for terminal output. The first line is `[<name>] <message>`; optional
7
+ * details (`fix`, `sources`, `docs`) follow with `├▶`/`╰▶` connectors.
8
+ */
9
+ declare function formatDiagnostic(diagnostic: Diagnostic): string;
10
+ //#endregion
11
+ //#region src/prod-diagnostics.d.ts
12
+ /**
13
+ * Options for {@link defineProdDiagnostics}. A lean subset of
14
+ * {@link DefineDiagnosticsOptions}: no `codes` map (the proxy serves any code),
15
+ * only what is needed to keep behaviour correct in production.
16
+ */
17
+ interface DefineProdDiagnosticsOptions<Reporters extends readonly AnyDiagnosticReporter[] = readonly AnyDiagnosticReporter[]> {
18
+ /**
19
+ * Base URL or resolver for documentation links, identical to
20
+ * {@link DefineDiagnosticsOptions.docsBase}. The docs URL is derived from the
21
+ * accessed code at call time, so links survive even without the catalog.
22
+ */
23
+ docsBase?: string | ((code: string) => string | undefined);
24
+ /**
25
+ * Reporters called every time a diagnostic is produced. Omitted by default in
26
+ * production builds; the strip plugin can copy them into the prod branch when
27
+ * prod-time reporting (e.g. telemetry) is desired.
28
+ */
29
+ reporters?: Reporters;
30
+ }
31
+ /**
32
+ * Production counterpart to {@link defineDiagnostics}. Returns a `Proxy` that
33
+ * builds a minimal {@link Diagnostic} for any accessed code: the code becomes
34
+ * the instance `name`, `docs` is derived from `docsBase`, and `why` points to
35
+ * the docs URL when one exists (empty otherwise, so the thrown header is just
36
+ * the code). It carries no catalog text, so it stays tiny in a bundle.
37
+ *
38
+ * The strip plugin (`@nostics/unplugin`) can rewrite a `defineDiagnostics()`
39
+ * call into a `process.env.NODE_ENV === 'production'` ternary that selects this
40
+ * factory in production, dropping every `why`/`fix` string from the bundle.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const diagnostics = defineProdDiagnostics({ docsBase: 'https://docs.example.com' })
45
+ * throw diagnostics.NUXT_B2011() // NUXT_B2011: https://docs.example.com/nuxt_b2011
46
+ * ```
47
+ */
48
+ declare function defineProdDiagnostics<const Codes extends Record<string, DiagnosticDefinition> = Record<string, DiagnosticDefinition>, const Reporters extends readonly AnyDiagnosticReporter[] = readonly AnyDiagnosticReporter[]>(options?: DefineProdDiagnosticsOptions<Reporters>): Diagnostics<Codes, Reporters>;
49
+ //#endregion
50
+ export { type AnyDiagnosticReporter, type ConsoleMethod, type ConsoleReporterOptions, type DefineDiagnosticsOptions, type DefineProdDiagnosticsOptions, Diagnostic, type DiagnosticCallParams, type DiagnosticDefinition, type DiagnosticHandle, type DiagnosticInit, type DiagnosticReporter, type Diagnostics, type ValueOrFn as _ValueOrFn, createConsoleReporter, defineDiagnostics, defineProdDiagnostics, formatDiagnostic };
51
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1,13 @@
1
+ import { u as DiagnosticReporter } from "../diagnostic-wduO7saY.mjs";
2
+
3
+ //#region src/reporters/dev.d.ts
4
+ /**
5
+ * Creates a reporter for browser code under Vite dev: it forwards each
6
+ * diagnostic over `import.meta.hot.send('nostics:report', ...)` so the
7
+ * dev-server collector can file it. Outside Vite (`import.meta.hot` absent) it
8
+ * warns once and does nothing.
9
+ */
10
+ declare function createDevReporter(): DiagnosticReporter;
11
+ //#endregion
12
+ export { createDevReporter };
13
+ //# sourceMappingURL=dev.d.mts.map
@@ -0,0 +1,11 @@
1
+ import { u as DiagnosticReporter } from "../diagnostic-wduO7saY.mjs";
2
+
3
+ //#region src/reporters/fetch.d.ts
4
+ /**
5
+ * Creates a reporter that POSTs each diagnostic as JSON to the given URL.
6
+ * Errors are swallowed so reporting never throws into user code.
7
+ */
8
+ declare function createFetchReporter(url: string): DiagnosticReporter;
9
+ //#endregion
10
+ export { createFetchReporter };
11
+ //# sourceMappingURL=fetch.d.mts.map
@@ -0,0 +1,43 @@
1
+ import { u as DiagnosticReporter } from "../diagnostic-wduO7saY.mjs";
2
+
3
+ //#region src/reporters/node.d.ts
4
+ interface FileReporterOptions {
5
+ /**
6
+ * Path to the log file.
7
+ * @default '.nostics.log'
8
+ */
9
+ logFile?: string;
10
+ /**
11
+ * Stack frames matching ANY of these patterns are removed from
12
+ * `diagnostic.stack` before it is written to the log file. Useful to strip
13
+ * `node_modules` and Node internals. The `Error: ...` header line is
14
+ * always preserved.
15
+ *
16
+ * Pass an empty array to keep every frame.
17
+ * @default [/\/node_modules\//i]
18
+ */
19
+ excludeStackFrames?: readonly RegExp[];
20
+ }
21
+ /**
22
+ * Creates a reporter that appends diagnostics as NDJSON to a local file.
23
+ * Each diagnostic is written as a single JSON line. The diagnostic's `stack`
24
+ * (if present) is included in the payload; noisy frames can be removed via
25
+ * {@link FileReporterOptions.excludeStackFrames}.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * import { defineDiagnostics } from 'nostics'
30
+ * import { createFileReporter } from 'nostics/reporters/node'
31
+ *
32
+ * const diagnostics = defineDiagnostics({
33
+ * codes: { ... },
34
+ * reporters: [createFileReporter({
35
+ * excludeStackFrames: [/\/node_modules\//, /\(node:/],
36
+ * })],
37
+ * })
38
+ * ```
39
+ */
40
+ declare function createFileReporter(options?: FileReporterOptions): DiagnosticReporter;
41
+ //#endregion
42
+ export { FileReporterOptions, createFileReporter };
43
+ //# sourceMappingURL=node.d.mts.map
@@ -0,0 +1,125 @@
1
+ {
2
+ "name": "nostics",
3
+ "type": "module",
4
+ "version": "1.2.0",
5
+ "description": "Structured diagnostic code library",
6
+ "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
+ "contributors": [
8
+ "Eduardo San Martin Morote <posva13@gmail.com>",
9
+ "Daniel Roe <daniel@roe.dev>"
10
+ ],
11
+ "license": "MIT",
12
+ "homepage": "https://github.com/vercel-labs/nostics#readme",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/vercel-labs/nostics.git"
16
+ },
17
+ "bugs": "https://github.com/vercel-labs/nostics/issues",
18
+ "keywords": [],
19
+ "sideEffects": false,
20
+ "exports": {
21
+ ".": "./dist/index.mjs",
22
+ "./formatters/ansi": "./dist/formatters/ansi.mjs",
23
+ "./formatters/json": "./dist/formatters/json.mjs",
24
+ "./reporters/dev": "./dist/reporters/dev.mjs",
25
+ "./reporters/fetch": "./dist/reporters/fetch.mjs",
26
+ "./reporters/node": "./dist/reporters/node.mjs",
27
+ "./package.json": "./package.json"
28
+ },
29
+ "types": "./dist/index.d.mts",
30
+ "files": [
31
+ "dist",
32
+ "skills"
33
+ ],
34
+ "devDependencies": {
35
+ "@antfu/eslint-config": "^9.0.0",
36
+ "@antfu/ni": "^30.1.0",
37
+ "@antfu/utils": "^9.3.0",
38
+ "@posva/prompts": "^2.4.4",
39
+ "@size-limit/esbuild-why": "^12.1.0",
40
+ "@size-limit/preset-small-lib": "^12.1.0",
41
+ "@types/node": "^25.9.3",
42
+ "@types/semver": "^7.7.1",
43
+ "@vitest/coverage-v8": "4.1.8",
44
+ "@vitest/ui": "4.1.8",
45
+ "conventional-changelog": "^7.2.0",
46
+ "conventional-changelog-angular": "^8.3.1",
47
+ "eslint": "^10.5.0",
48
+ "lint-staged": "^17.0.7",
49
+ "oxfmt": "^0.54.0",
50
+ "publint": "^0.3.21",
51
+ "semver": "^7.8.4",
52
+ "simple-git-hooks": "^2.13.1",
53
+ "size-limit": "^12.1.0",
54
+ "tsdown": "^0.22.2",
55
+ "tsnapi": "^0.3.3",
56
+ "typescript": "^6.0.3",
57
+ "vite": "^8.0.16",
58
+ "vitest": "^4.1.8",
59
+ "nostics": "1.2.0"
60
+ },
61
+ "simple-git-hooks": {
62
+ "pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
63
+ },
64
+ "lint-staged": {
65
+ "*": "eslint --fix"
66
+ },
67
+ "size-limit": [
68
+ {
69
+ "name": "defineDiagnostics from source",
70
+ "path": "src/index.ts",
71
+ "import": "{ defineDiagnostics }"
72
+ },
73
+ {
74
+ "name": "defineDiagnostics",
75
+ "path": "dist/index.mjs",
76
+ "import": "{ defineDiagnostics }"
77
+ },
78
+ {
79
+ "name": "defineProdDiagnostics",
80
+ "path": "dist/index.mjs",
81
+ "import": "{ defineProdDiagnostics }"
82
+ },
83
+ {
84
+ "name": "defineDiagnostics + createConsoleReporter",
85
+ "path": "dist/index.mjs",
86
+ "import": "{ defineDiagnostics, createConsoleReporter }"
87
+ },
88
+ {
89
+ "name": "defineProdDiagnostics + createConsoleReporter",
90
+ "path": "dist/index.mjs",
91
+ "import": "{ defineProdDiagnostics, createConsoleReporter }"
92
+ },
93
+ {
94
+ "name": "formatDiagnostic",
95
+ "path": "dist/index.mjs",
96
+ "import": "{ formatDiagnostic }"
97
+ },
98
+ {
99
+ "name": "full root",
100
+ "path": "dist/index.mjs",
101
+ "import": "*"
102
+ },
103
+ {
104
+ "name": "ansi formatter",
105
+ "path": "dist/formatters/ansi.mjs",
106
+ "import": "*"
107
+ }
108
+ ],
109
+ "scripts": {
110
+ "build": "tsdown && pnpm --filter \"./packages/*\" run build",
111
+ "dev": "vitest",
112
+ "docs": "pnpm -C docs run dev",
113
+ "docs:build": "pnpm -C docs run build",
114
+ "play": "pnpm -C playground run dev",
115
+ "lint": "eslint",
116
+ "release": "node scripts/release.ts",
117
+ "size": "size-limit",
118
+ "test": "pnpm run build && pnpm run \"/^test:/\"",
119
+ "test:unit": "vitest run --coverage",
120
+ "test:types": "pnpm run typecheck",
121
+ "test:lint": "pnpm run lint",
122
+ "test:demo": "pnpm -C demo-lib run build && pnpm -C demo-lib run test && pnpm -C playground run build",
123
+ "typecheck": "tsc && pnpm --filter \"./packages/*\" run typecheck"
124
+ }
125
+ }
@@ -0,0 +1,47 @@
1
+ import * as path from 'node:path';
2
+ import path__default from 'node:path';
3
+
4
+ /**
5
+ * Constant for path separator.
6
+ *
7
+ * Always equals to `"/"`.
8
+ */
9
+ declare const sep = "/";
10
+ declare const normalize: typeof path__default.normalize;
11
+ declare const join: typeof path__default.join;
12
+ declare const resolve: typeof path__default.resolve;
13
+ /**
14
+ * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
15
+ *
16
+ * @param path - The path to normalise.
17
+ * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
18
+ * @returns the normalised path string.
19
+ */
20
+ declare function normalizeString(path: string, allowAboveRoot: boolean): string;
21
+ declare const isAbsolute: typeof path__default.isAbsolute;
22
+ declare const toNamespacedPath: typeof path__default.toNamespacedPath;
23
+ declare const extname: typeof path__default.extname;
24
+ declare const relative: typeof path__default.relative;
25
+ declare const dirname: typeof path__default.dirname;
26
+ declare const format: typeof path__default.format;
27
+ declare const basename: typeof path__default.basename;
28
+ declare const parse: typeof path__default.parse;
29
+ /**
30
+ * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
31
+ * @param path The path to glob-match against.
32
+ * @param pattern The glob to check the path against.
33
+ */
34
+ declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
35
+
36
+ type NodePath = typeof path;
37
+ /**
38
+ * The platform-specific file delimiter.
39
+ *
40
+ * Equals to `";"` in windows and `":"` in all other platforms.
41
+ */
42
+ declare const delimiter: ";" | ":";
43
+ declare const posix: NodePath["posix"];
44
+ declare const win32: NodePath["win32"];
45
+ declare const _default: NodePath;
46
+
47
+ export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
@@ -0,0 +1,47 @@
1
+ import * as path from 'node:path';
2
+ import path__default from 'node:path';
3
+
4
+ /**
5
+ * Constant for path separator.
6
+ *
7
+ * Always equals to `"/"`.
8
+ */
9
+ declare const sep = "/";
10
+ declare const normalize: typeof path__default.normalize;
11
+ declare const join: typeof path__default.join;
12
+ declare const resolve: typeof path__default.resolve;
13
+ /**
14
+ * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
15
+ *
16
+ * @param path - The path to normalise.
17
+ * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
18
+ * @returns the normalised path string.
19
+ */
20
+ declare function normalizeString(path: string, allowAboveRoot: boolean): string;
21
+ declare const isAbsolute: typeof path__default.isAbsolute;
22
+ declare const toNamespacedPath: typeof path__default.toNamespacedPath;
23
+ declare const extname: typeof path__default.extname;
24
+ declare const relative: typeof path__default.relative;
25
+ declare const dirname: typeof path__default.dirname;
26
+ declare const format: typeof path__default.format;
27
+ declare const basename: typeof path__default.basename;
28
+ declare const parse: typeof path__default.parse;
29
+ /**
30
+ * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
31
+ * @param path The path to glob-match against.
32
+ * @param pattern The glob to check the path against.
33
+ */
34
+ declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
35
+
36
+ type NodePath = typeof path;
37
+ /**
38
+ * The platform-specific file delimiter.
39
+ *
40
+ * Equals to `";"` in windows and `":"` in all other platforms.
41
+ */
42
+ declare const delimiter: ";" | ":";
43
+ declare const posix: NodePath["posix"];
44
+ declare const win32: NodePath["win32"];
45
+ declare const _default: NodePath;
46
+
47
+ export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };