@noodleseed/one 0.5.0 → 0.6.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 (279) hide show
  1. package/dist/cli.js +5 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/shared.d.ts +1 -1
  4. package/dist/commands/shared.d.ts.map +1 -1
  5. package/dist/commands/shared.js +2 -2
  6. package/dist/commands/shared.js.map +1 -1
  7. package/dist/react-widget-build.js +20 -1
  8. package/dist/react-widget-build.js.map +1 -1
  9. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.d.ts.map +1 -1
  10. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js +1 -0
  11. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js.map +1 -1
  12. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
  13. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
  14. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
  15. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  16. package/package.json +2 -20
  17. package/node_modules/@oxc-project/types/LICENSE +0 -22
  18. package/node_modules/@oxc-project/types/README.md +0 -3
  19. package/node_modules/@oxc-project/types/package.json +0 -26
  20. package/node_modules/@oxc-project/types/types.d.ts +0 -1912
  21. package/node_modules/@rolldown/binding-linux-x64-gnu/README.md +0 -3
  22. package/node_modules/@rolldown/binding-linux-x64-gnu/package.json +0 -40
  23. package/node_modules/@rolldown/binding-linux-x64-gnu/rolldown-binding.linux-x64-gnu.node +0 -0
  24. package/node_modules/@rolldown/pluginutils/LICENSE +0 -21
  25. package/node_modules/@rolldown/pluginutils/README.md +0 -145
  26. package/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts +0 -194
  27. package/node_modules/@rolldown/pluginutils/dist/filter/index.mjs +0 -2
  28. package/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs +0 -323
  29. package/node_modules/@rolldown/pluginutils/dist/index.d.mts +0 -2
  30. package/node_modules/@rolldown/pluginutils/dist/index.mjs +0 -2
  31. package/node_modules/@rolldown/pluginutils/package.json +0 -40
  32. package/node_modules/@vitejs/plugin-react/LICENSE +0 -21
  33. package/node_modules/@vitejs/plugin-react/README.md +0 -169
  34. package/node_modules/@vitejs/plugin-react/dist/index.d.ts +0 -48
  35. package/node_modules/@vitejs/plugin-react/dist/index.js +0 -200
  36. package/node_modules/@vitejs/plugin-react/dist/refresh-runtime.js +0 -663
  37. package/node_modules/@vitejs/plugin-react/package.json +0 -87
  38. package/node_modules/@vitejs/plugin-react/types/optionalTypes.d.ts +0 -12
  39. package/node_modules/@vitejs/plugin-react/types/preamble.d.ts +0 -1
  40. package/node_modules/detect-libc/LICENSE +0 -201
  41. package/node_modules/detect-libc/README.md +0 -163
  42. package/node_modules/detect-libc/index.d.ts +0 -14
  43. package/node_modules/detect-libc/lib/detect-libc.js +0 -313
  44. package/node_modules/detect-libc/lib/elf.js +0 -39
  45. package/node_modules/detect-libc/lib/filesystem.js +0 -51
  46. package/node_modules/detect-libc/lib/process.js +0 -24
  47. package/node_modules/detect-libc/package.json +0 -44
  48. package/node_modules/fdir/LICENSE +0 -7
  49. package/node_modules/fdir/README.md +0 -91
  50. package/node_modules/fdir/dist/index.cjs +0 -588
  51. package/node_modules/fdir/dist/index.d.cts +0 -155
  52. package/node_modules/fdir/dist/index.d.mts +0 -155
  53. package/node_modules/fdir/dist/index.mjs +0 -570
  54. package/node_modules/fdir/package.json +0 -103
  55. package/node_modules/lightningcss/LICENSE +0 -373
  56. package/node_modules/lightningcss/README.md +0 -105
  57. package/node_modules/lightningcss/node/ast.d.ts +0 -9892
  58. package/node_modules/lightningcss/node/ast.js.flow +0 -10539
  59. package/node_modules/lightningcss/node/browserslistToTargets.js +0 -48
  60. package/node_modules/lightningcss/node/composeVisitors.js +0 -450
  61. package/node_modules/lightningcss/node/flags.js +0 -28
  62. package/node_modules/lightningcss/node/index.d.ts +0 -494
  63. package/node_modules/lightningcss/node/index.js +0 -59
  64. package/node_modules/lightningcss/node/index.js.flow +0 -843
  65. package/node_modules/lightningcss/node/index.mjs +0 -4
  66. package/node_modules/lightningcss/node/targets.d.ts +0 -40
  67. package/node_modules/lightningcss/node/targets.js.flow +0 -39
  68. package/node_modules/lightningcss/package.json +0 -110
  69. package/node_modules/lightningcss-linux-x64-gnu/LICENSE +0 -373
  70. package/node_modules/lightningcss-linux-x64-gnu/README.md +0 -1
  71. package/node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node +0 -0
  72. package/node_modules/lightningcss-linux-x64-gnu/package.json +0 -37
  73. package/node_modules/nanoid/.claude/settings.local.json +0 -14
  74. package/node_modules/nanoid/LICENSE +0 -20
  75. package/node_modules/nanoid/README.md +0 -39
  76. package/node_modules/nanoid/async/index.browser.cjs +0 -69
  77. package/node_modules/nanoid/async/index.browser.js +0 -34
  78. package/node_modules/nanoid/async/index.cjs +0 -71
  79. package/node_modules/nanoid/async/index.d.ts +0 -56
  80. package/node_modules/nanoid/async/index.js +0 -35
  81. package/node_modules/nanoid/async/index.native.js +0 -26
  82. package/node_modules/nanoid/async/package.json +0 -12
  83. package/node_modules/nanoid/bin/nanoid.cjs +0 -55
  84. package/node_modules/nanoid/index.browser.cjs +0 -72
  85. package/node_modules/nanoid/index.browser.js +0 -34
  86. package/node_modules/nanoid/index.cjs +0 -86
  87. package/node_modules/nanoid/index.d.cts +0 -91
  88. package/node_modules/nanoid/index.d.ts +0 -91
  89. package/node_modules/nanoid/index.js +0 -46
  90. package/node_modules/nanoid/nanoid.js +0 -1
  91. package/node_modules/nanoid/non-secure/index.cjs +0 -34
  92. package/node_modules/nanoid/non-secure/index.d.ts +0 -33
  93. package/node_modules/nanoid/non-secure/index.js +0 -21
  94. package/node_modules/nanoid/non-secure/package.json +0 -6
  95. package/node_modules/nanoid/package.json +0 -89
  96. package/node_modules/nanoid/url-alphabet/index.cjs +0 -7
  97. package/node_modules/nanoid/url-alphabet/index.js +0 -3
  98. package/node_modules/nanoid/url-alphabet/package.json +0 -6
  99. package/node_modules/picocolors/LICENSE +0 -15
  100. package/node_modules/picocolors/README.md +0 -21
  101. package/node_modules/picocolors/package.json +0 -25
  102. package/node_modules/picocolors/picocolors.browser.js +0 -4
  103. package/node_modules/picocolors/picocolors.d.ts +0 -5
  104. package/node_modules/picocolors/picocolors.js +0 -75
  105. package/node_modules/picocolors/types.d.ts +0 -51
  106. package/node_modules/picomatch/LICENSE +0 -21
  107. package/node_modules/picomatch/README.md +0 -749
  108. package/node_modules/picomatch/index.js +0 -17
  109. package/node_modules/picomatch/lib/constants.js +0 -184
  110. package/node_modules/picomatch/lib/parse.js +0 -1386
  111. package/node_modules/picomatch/lib/picomatch.js +0 -349
  112. package/node_modules/picomatch/lib/scan.js +0 -391
  113. package/node_modules/picomatch/lib/utils.js +0 -72
  114. package/node_modules/picomatch/package.json +0 -82
  115. package/node_modules/picomatch/posix.js +0 -3
  116. package/node_modules/postcss/LICENSE +0 -20
  117. package/node_modules/postcss/README.md +0 -28
  118. package/node_modules/postcss/lib/at-rule.d.ts +0 -139
  119. package/node_modules/postcss/lib/at-rule.js +0 -25
  120. package/node_modules/postcss/lib/comment.d.ts +0 -67
  121. package/node_modules/postcss/lib/comment.js +0 -13
  122. package/node_modules/postcss/lib/container.d.ts +0 -478
  123. package/node_modules/postcss/lib/container.js +0 -447
  124. package/node_modules/postcss/lib/css-syntax-error.d.ts +0 -247
  125. package/node_modules/postcss/lib/css-syntax-error.js +0 -133
  126. package/node_modules/postcss/lib/declaration.d.ts +0 -150
  127. package/node_modules/postcss/lib/declaration.js +0 -24
  128. package/node_modules/postcss/lib/document.d.ts +0 -68
  129. package/node_modules/postcss/lib/document.js +0 -33
  130. package/node_modules/postcss/lib/fromJSON.d.ts +0 -9
  131. package/node_modules/postcss/lib/fromJSON.js +0 -54
  132. package/node_modules/postcss/lib/input.d.ts +0 -226
  133. package/node_modules/postcss/lib/input.js +0 -273
  134. package/node_modules/postcss/lib/lazy-result.d.ts +0 -189
  135. package/node_modules/postcss/lib/lazy-result.js +0 -563
  136. package/node_modules/postcss/lib/list.d.ts +0 -60
  137. package/node_modules/postcss/lib/list.js +0 -58
  138. package/node_modules/postcss/lib/map-generator.js +0 -376
  139. package/node_modules/postcss/lib/no-work-result.d.ts +0 -45
  140. package/node_modules/postcss/lib/no-work-result.js +0 -137
  141. package/node_modules/postcss/lib/node.d.ts +0 -555
  142. package/node_modules/postcss/lib/node.js +0 -449
  143. package/node_modules/postcss/lib/parse.d.ts +0 -9
  144. package/node_modules/postcss/lib/parse.js +0 -42
  145. package/node_modules/postcss/lib/parser.js +0 -618
  146. package/node_modules/postcss/lib/postcss.d.mts +0 -66
  147. package/node_modules/postcss/lib/postcss.d.ts +0 -461
  148. package/node_modules/postcss/lib/postcss.js +0 -101
  149. package/node_modules/postcss/lib/postcss.mjs +0 -30
  150. package/node_modules/postcss/lib/previous-map.d.ts +0 -80
  151. package/node_modules/postcss/lib/previous-map.js +0 -161
  152. package/node_modules/postcss/lib/processor.d.ts +0 -114
  153. package/node_modules/postcss/lib/processor.js +0 -67
  154. package/node_modules/postcss/lib/result.d.ts +0 -204
  155. package/node_modules/postcss/lib/result.js +0 -42
  156. package/node_modules/postcss/lib/root.d.ts +0 -86
  157. package/node_modules/postcss/lib/root.js +0 -61
  158. package/node_modules/postcss/lib/rule.d.ts +0 -126
  159. package/node_modules/postcss/lib/rule.js +0 -27
  160. package/node_modules/postcss/lib/stringifier.d.ts +0 -45
  161. package/node_modules/postcss/lib/stringifier.js +0 -374
  162. package/node_modules/postcss/lib/stringify.d.ts +0 -9
  163. package/node_modules/postcss/lib/stringify.js +0 -11
  164. package/node_modules/postcss/lib/symbols.js +0 -5
  165. package/node_modules/postcss/lib/terminal-highlight.js +0 -70
  166. package/node_modules/postcss/lib/tokenize.js +0 -270
  167. package/node_modules/postcss/lib/warn-once.js +0 -13
  168. package/node_modules/postcss/lib/warning.d.ts +0 -146
  169. package/node_modules/postcss/lib/warning.js +0 -37
  170. package/node_modules/postcss/package.json +0 -88
  171. package/node_modules/rolldown/LICENSE +0 -25
  172. package/node_modules/rolldown/README.md +0 -11
  173. package/node_modules/rolldown/bin/cli.mjs +0 -2
  174. package/node_modules/rolldown/dist/cli.d.mts +0 -1
  175. package/node_modules/rolldown/dist/cli.mjs +0 -1202
  176. package/node_modules/rolldown/dist/config.d.mts +0 -14
  177. package/node_modules/rolldown/dist/config.mjs +0 -4
  178. package/node_modules/rolldown/dist/experimental-index.d.mts +0 -280
  179. package/node_modules/rolldown/dist/experimental-index.mjs +0 -330
  180. package/node_modules/rolldown/dist/experimental-runtime-types.d.ts +0 -107
  181. package/node_modules/rolldown/dist/filter-index.d.mts +0 -195
  182. package/node_modules/rolldown/dist/filter-index.mjs +0 -380
  183. package/node_modules/rolldown/dist/get-log-filter.d.mts +0 -3
  184. package/node_modules/rolldown/dist/get-log-filter.mjs +0 -68
  185. package/node_modules/rolldown/dist/index.d.mts +0 -4
  186. package/node_modules/rolldown/dist/index.mjs +0 -50
  187. package/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +0 -1
  188. package/node_modules/rolldown/dist/parallel-plugin-worker.mjs +0 -28
  189. package/node_modules/rolldown/dist/parallel-plugin.d.mts +0 -13
  190. package/node_modules/rolldown/dist/parallel-plugin.mjs +0 -6
  191. package/node_modules/rolldown/dist/parse-ast-index.d.mts +0 -32
  192. package/node_modules/rolldown/dist/parse-ast-index.mjs +0 -60
  193. package/node_modules/rolldown/dist/plugins-index.d.mts +0 -33
  194. package/node_modules/rolldown/dist/plugins-index.mjs +0 -40
  195. package/node_modules/rolldown/dist/shared/binding-B1q9aYT-.d.mts +0 -1947
  196. package/node_modules/rolldown/dist/shared/binding-Dh6LYCIB.mjs +0 -589
  197. package/node_modules/rolldown/dist/shared/bindingify-input-options-CzVhGygm.mjs +0 -2240
  198. package/node_modules/rolldown/dist/shared/constructors-688OwP2q.mjs +0 -65
  199. package/node_modules/rolldown/dist/shared/constructors-awZ1VNvg.d.mts +0 -36
  200. package/node_modules/rolldown/dist/shared/define-config-Demdg3_4.mjs +0 -6
  201. package/node_modules/rolldown/dist/shared/define-config-sxBscJ3M.d.mts +0 -3901
  202. package/node_modules/rolldown/dist/shared/error-B68YLzl3.mjs +0 -85
  203. package/node_modules/rolldown/dist/shared/get-log-filter-BpNVNJ5-.d.mts +0 -35
  204. package/node_modules/rolldown/dist/shared/load-config-BvPPEM7l.mjs +0 -120
  205. package/node_modules/rolldown/dist/shared/logging-BSNejiLS.d.mts +0 -50
  206. package/node_modules/rolldown/dist/shared/logs-aMKUxRpj.mjs +0 -180
  207. package/node_modules/rolldown/dist/shared/misc-CoQm4NHO.mjs +0 -21
  208. package/node_modules/rolldown/dist/shared/normalize-string-or-regex-BpXHYeN4.mjs +0 -68
  209. package/node_modules/rolldown/dist/shared/parse-CTgsjpo8.mjs +0 -74
  210. package/node_modules/rolldown/dist/shared/prompt-B1Yc1NPt.mjs +0 -847
  211. package/node_modules/rolldown/dist/shared/resolve-tsconfig-BkhP9bkX.mjs +0 -124
  212. package/node_modules/rolldown/dist/shared/rolldown-Brph2NSU.mjs +0 -40
  213. package/node_modules/rolldown/dist/shared/rolldown-build-DR0wzp0V.mjs +0 -3264
  214. package/node_modules/rolldown/dist/shared/transform-CEmFsvJW.d.mts +0 -149
  215. package/node_modules/rolldown/dist/shared/watch-FrHSqg24.mjs +0 -374
  216. package/node_modules/rolldown/dist/utils-index.d.mts +0 -376
  217. package/node_modules/rolldown/dist/utils-index.mjs +0 -2414
  218. package/node_modules/rolldown/package.json +0 -153
  219. package/node_modules/source-map-js/LICENSE +0 -28
  220. package/node_modules/source-map-js/README.md +0 -765
  221. package/node_modules/source-map-js/lib/array-set.js +0 -121
  222. package/node_modules/source-map-js/lib/base64-vlq.js +0 -140
  223. package/node_modules/source-map-js/lib/base64.js +0 -67
  224. package/node_modules/source-map-js/lib/binary-search.js +0 -111
  225. package/node_modules/source-map-js/lib/mapping-list.js +0 -79
  226. package/node_modules/source-map-js/lib/quick-sort.js +0 -132
  227. package/node_modules/source-map-js/lib/source-map-consumer.d.ts +0 -1
  228. package/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
  229. package/node_modules/source-map-js/lib/source-map-generator.d.ts +0 -1
  230. package/node_modules/source-map-js/lib/source-map-generator.js +0 -444
  231. package/node_modules/source-map-js/lib/source-node.d.ts +0 -1
  232. package/node_modules/source-map-js/lib/source-node.js +0 -413
  233. package/node_modules/source-map-js/lib/util.js +0 -594
  234. package/node_modules/source-map-js/package.json +0 -71
  235. package/node_modules/source-map-js/source-map.d.ts +0 -104
  236. package/node_modules/source-map-js/source-map.js +0 -8
  237. package/node_modules/tinyglobby/LICENSE +0 -21
  238. package/node_modules/tinyglobby/README.md +0 -25
  239. package/node_modules/tinyglobby/dist/index.cjs +0 -335
  240. package/node_modules/tinyglobby/dist/index.d.cts +0 -148
  241. package/node_modules/tinyglobby/dist/index.d.mts +0 -148
  242. package/node_modules/tinyglobby/dist/index.mjs +0 -307
  243. package/node_modules/tinyglobby/package.json +0 -70
  244. package/node_modules/vite/LICENSE.md +0 -2287
  245. package/node_modules/vite/README.md +0 -20
  246. package/node_modules/vite/bin/openChrome.js +0 -68
  247. package/node_modules/vite/bin/vite.js +0 -79
  248. package/node_modules/vite/client.d.ts +0 -285
  249. package/node_modules/vite/dist/client/client.mjs +0 -1269
  250. package/node_modules/vite/dist/client/env.mjs +0 -18
  251. package/node_modules/vite/dist/node/chunks/build.js +0 -5371
  252. package/node_modules/vite/dist/node/chunks/dist.js +0 -6784
  253. package/node_modules/vite/dist/node/chunks/lib.js +0 -371
  254. package/node_modules/vite/dist/node/chunks/logger.js +0 -364
  255. package/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +0 -96
  256. package/node_modules/vite/dist/node/chunks/node.js +0 -35770
  257. package/node_modules/vite/dist/node/chunks/postcss-import.js +0 -467
  258. package/node_modules/vite/dist/node/cli.js +0 -836
  259. package/node_modules/vite/dist/node/index.d.ts +0 -4010
  260. package/node_modules/vite/dist/node/index.js +0 -3
  261. package/node_modules/vite/dist/node/internal.d.ts +0 -2
  262. package/node_modules/vite/dist/node/internal.js +0 -2
  263. package/node_modules/vite/dist/node/module-runner.d.ts +0 -314
  264. package/node_modules/vite/dist/node/module-runner.js +0 -1274
  265. package/node_modules/vite/misc/false.js +0 -1
  266. package/node_modules/vite/misc/true.js +0 -1
  267. package/node_modules/vite/package.json +0 -194
  268. package/node_modules/vite/types/customEvent.d.ts +0 -79
  269. package/node_modules/vite/types/hmrPayload.d.ts +0 -80
  270. package/node_modules/vite/types/hot.d.ts +0 -39
  271. package/node_modules/vite/types/import-meta.d.ts +0 -5
  272. package/node_modules/vite/types/importGlob.d.ts +0 -131
  273. package/node_modules/vite/types/importMeta.d.ts +0 -30
  274. package/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +0 -44
  275. package/node_modules/vite/types/internal/esbuildOptions.d.ts +0 -28
  276. package/node_modules/vite/types/internal/lightningcssOptions.d.ts +0 -18
  277. package/node_modules/vite/types/internal/rollupTypeCompat.d.ts +0 -24
  278. package/node_modules/vite/types/internal/terserOptions.d.ts +0 -11
  279. package/node_modules/vite/types/metadata.d.ts +0 -47
@@ -1,148 +0,0 @@
1
- import { FSLike } from "fdir";
2
-
3
- //#region src/types.d.ts
4
- type FileSystemAdapter = Partial<FSLike>;
5
- interface GlobOptions {
6
- /**
7
- * Whether to return absolute paths. Disable to have relative paths.
8
- * @default false
9
- */
10
- absolute?: boolean;
11
- /**
12
- * Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`.
13
- * @default true
14
- */
15
- braceExpansion?: boolean;
16
- /**
17
- * Whether to match in case-sensitive mode.
18
- * @default true
19
- */
20
- caseSensitiveMatch?: boolean;
21
- /**
22
- * The working directory in which to search. Results will be returned relative to this directory, unless
23
- * {@link absolute} is set.
24
- *
25
- * It is important to avoid globbing outside this directory when possible, even with absolute paths enabled,
26
- * as doing so can harm performance due to having to recalculate relative paths.
27
- * @default process.cwd()
28
- */
29
- cwd?: string | URL;
30
- /**
31
- * Logs useful debug information. Meant for development purposes. Logs can change at any time.
32
- * @default false
33
- */
34
- debug?: boolean;
35
- /**
36
- * Maximum directory depth to crawl.
37
- * @default Infinity
38
- */
39
- deep?: number;
40
- /**
41
- * Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`.
42
- * @default false
43
- */
44
- dot?: boolean;
45
- /**
46
- * Whether to automatically expand directory patterns.
47
- *
48
- * Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob).
49
- * @default true
50
- */
51
- expandDirectories?: boolean;
52
- /**
53
- * Enables support for extglobs, like `+(pattern)`.
54
- * @default true
55
- */
56
- extglob?: boolean;
57
- /**
58
- * Whether to traverse and include symbolic links. Can slightly affect performance.
59
- * @default true
60
- */
61
- followSymbolicLinks?: boolean;
62
- /**
63
- * An object that overrides `node:fs` functions.
64
- * @default import('node:fs')
65
- */
66
- fs?: FileSystemAdapter;
67
- /**
68
- * Enables support for matching nested directories with globstars (`**`).
69
- * If `false`, `**` behaves exactly like `*`.
70
- * @default true
71
- */
72
- globstar?: boolean;
73
- /**
74
- * Glob patterns to exclude from the results.
75
- * @default []
76
- */
77
- ignore?: string | readonly string[];
78
- /**
79
- * Enable to only return directories.
80
- * If `true`, disables {@link onlyFiles}.
81
- * @default false
82
- */
83
- onlyDirectories?: boolean;
84
- /**
85
- * Enable to only return files.
86
- * @default true
87
- */
88
- onlyFiles?: boolean;
89
- /**
90
- * @deprecated Provide patterns as the first argument instead.
91
- */
92
- patterns?: string | readonly string[];
93
- /**
94
- * An `AbortSignal` to abort crawling the file system.
95
- * @default undefined
96
- */
97
- signal?: AbortSignal;
98
- }
99
- //#endregion
100
- //#region src/utils.d.ts
101
- /**
102
- * Converts a path to a pattern depending on the platform.
103
- * Identical to {@link escapePath} on POSIX systems.
104
- * @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
105
- */
106
- declare const convertPathToPattern: (path: string) => string;
107
- /**
108
- * Escapes a path's special characters depending on the platform.
109
- * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
110
- */
111
- declare const escapePath: (path: string) => string;
112
- /**
113
- * Checks if a pattern has dynamic parts.
114
- *
115
- * Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
116
- *
117
- * - Doesn't necessarily return `false` on patterns that include `\`.
118
- * - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
119
- * - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
120
- * - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
121
- *
122
- * @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
123
- */
124
- declare function isDynamicPattern(pattern: string, options?: {
125
- caseSensitiveMatch: boolean;
126
- }): boolean;
127
- //#endregion
128
- //#region src/index.d.ts
129
- /**
130
- * Asynchronously match files following a glob pattern.
131
- * @see {@link https://superchupu.dev/tinyglobby/documentation#glob}
132
- */
133
- declare function glob(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
134
- /**
135
- * @deprecated Provide patterns as the first argument instead.
136
- */
137
- declare function glob(options: GlobOptions): Promise<string[]>;
138
- /**
139
- * Synchronously match files following a glob pattern.
140
- * @see {@link https://superchupu.dev/tinyglobby/documentation#globSync}
141
- */
142
- declare function globSync(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): string[];
143
- /**
144
- * @deprecated Provide patterns as the first argument instead.
145
- */
146
- declare function globSync(options: GlobOptions): string[];
147
- //#endregion
148
- export { type FileSystemAdapter, type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
@@ -1,307 +0,0 @@
1
- import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from "fs";
2
- import { isAbsolute, posix, resolve } from "path";
3
- import { fileURLToPath } from "url";
4
- import { fdir } from "fdir";
5
- import picomatch from "picomatch";
6
- //#region src/utils.ts
7
- const isReadonlyArray = Array.isArray;
8
- const BACKSLASHES = /\\/g;
9
- const DRIVE_RELATIVE_PATH = /^[A-Za-z]:$/;
10
- const isWin = process.platform === "win32";
11
- const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
12
- function getPartialMatcher(patterns, options = {}) {
13
- const patternsCount = patterns.length;
14
- const patternsParts = Array(patternsCount);
15
- const matchers = Array(patternsCount);
16
- let i, j;
17
- for (i = 0; i < patternsCount; i++) {
18
- const parts = splitPattern(patterns[i]);
19
- patternsParts[i] = parts;
20
- const partsCount = parts.length;
21
- const partMatchers = Array(partsCount);
22
- for (j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options);
23
- matchers[i] = partMatchers;
24
- }
25
- return (input) => {
26
- const inputParts = input.split("/");
27
- if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
28
- for (i = 0; i < patternsCount; i++) {
29
- const patternParts = patternsParts[i];
30
- const matcher = matchers[i];
31
- const inputPatternCount = inputParts.length;
32
- const minParts = Math.min(inputPatternCount, patternParts.length);
33
- j = 0;
34
- while (j < minParts) {
35
- const part = patternParts[j];
36
- if (part.includes("/")) return true;
37
- if (!matcher[j](inputParts[j])) break;
38
- if (!options.noglobstar && part === "**") return true;
39
- j++;
40
- }
41
- if (j === inputPatternCount) return true;
42
- }
43
- return false;
44
- };
45
- }
46
- /* node:coverage ignore next 2 */
47
- const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
48
- const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
49
- function buildFormat(cwd, root, absolute) {
50
- if (cwd === root || root.startsWith(`${cwd}/`)) {
51
- if (absolute) {
52
- const start = cwd.length + +!isRoot(cwd);
53
- return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
54
- }
55
- const prefix = root.slice(cwd.length + 1);
56
- if (prefix) return (p, isDir) => {
57
- if (p === ".") return prefix;
58
- const result = `${prefix}/${p}`;
59
- return isDir ? result.slice(0, -1) : result;
60
- };
61
- return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
62
- }
63
- if (absolute) return (p) => posix.relative(cwd, p) || ".";
64
- return (p) => posix.relative(cwd, `${root}/${p}`) || ".";
65
- }
66
- function buildRelative(cwd, root) {
67
- if (root.startsWith(`${cwd}/`)) {
68
- const prefix = root.slice(cwd.length + 1);
69
- return (p) => `${prefix}/${p}`;
70
- }
71
- return (p) => {
72
- const result = posix.relative(cwd, `${root}/${p}`);
73
- return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
74
- };
75
- }
76
- function ensureNonDriveRelativePath(path) {
77
- return path.replace(DRIVE_RELATIVE_PATH, (match) => `${match}/`);
78
- }
79
- const splitPatternOptions = { parts: true };
80
- function splitPattern(path) {
81
- var _result$parts;
82
- const result = picomatch.scan(path, splitPatternOptions);
83
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
84
- }
85
- const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
86
- function convertPosixPathToPattern(path) {
87
- return escapePosixPath(path);
88
- }
89
- function convertWin32PathToPattern(path) {
90
- return escapeWin32Path(path).replace(ESCAPED_WIN32_BACKSLASHES, "/");
91
- }
92
- /**
93
- * Converts a path to a pattern depending on the platform.
94
- * Identical to {@link escapePath} on POSIX systems.
95
- * @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
96
- */
97
- /* node:coverage ignore next 3 */
98
- const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
99
- const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
100
- const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
101
- const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
102
- const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
103
- /**
104
- * Escapes a path's special characters depending on the platform.
105
- * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
106
- */
107
- /* node:coverage ignore next */
108
- const escapePath = isWin ? escapeWin32Path : escapePosixPath;
109
- /**
110
- * Checks if a pattern has dynamic parts.
111
- *
112
- * Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
113
- *
114
- * - Doesn't necessarily return `false` on patterns that include `\`.
115
- * - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
116
- * - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
117
- * - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
118
- *
119
- * @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
120
- */
121
- function isDynamicPattern(pattern, options) {
122
- if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
123
- const scan = picomatch.scan(pattern);
124
- return scan.isGlob || scan.negated;
125
- }
126
- function log(...tasks) {
127
- console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
128
- }
129
- function ensureStringArray(value) {
130
- return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
131
- }
132
- //#endregion
133
- //#region src/patterns.ts
134
- const PARENT_DIRECTORY = /^(\/?\.\.)+/;
135
- const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
136
- function normalizePattern(pattern, opts, props, isIgnore) {
137
- var _PARENT_DIRECTORY$exe;
138
- const cwd = opts.cwd;
139
- let result = pattern;
140
- if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
141
- if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
142
- const escapedCwd = escapePath(cwd);
143
- result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
144
- const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
145
- const parts = splitPattern(result);
146
- if (parentDir) {
147
- const n = (parentDir.length + 1) / 3;
148
- let i = 0;
149
- const cwdParts = escapedCwd.split("/");
150
- while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
151
- result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
152
- i++;
153
- }
154
- const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
155
- if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
156
- props.root = ensureNonDriveRelativePath(potentialRoot);
157
- props.depthOffset = -n + i;
158
- }
159
- }
160
- if (!isIgnore && props.depthOffset >= 0) {
161
- var _props$commonPath;
162
- (_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
163
- const newCommonPath = [];
164
- const length = Math.min(props.commonPath.length, parts.length);
165
- for (let i = 0; i < length; i++) {
166
- const part = parts[i];
167
- if (part === "**" && !parts[i + 1]) {
168
- newCommonPath.pop();
169
- break;
170
- }
171
- if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
172
- newCommonPath.push(part);
173
- }
174
- props.depthOffset = newCommonPath.length;
175
- props.commonPath = newCommonPath;
176
- props.root = ensureNonDriveRelativePath(newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd);
177
- }
178
- return result;
179
- }
180
- function processPatterns(options, patterns, props) {
181
- const matchPatterns = [];
182
- const ignorePatterns = [];
183
- for (const pattern of options.ignore) {
184
- if (!pattern) continue;
185
- if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
186
- }
187
- for (const pattern of patterns) {
188
- if (!pattern) continue;
189
- if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
190
- else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
191
- }
192
- return {
193
- match: matchPatterns,
194
- ignore: ignorePatterns
195
- };
196
- }
197
- //#endregion
198
- //#region src/crawler.ts
199
- function buildCrawler(options, patterns) {
200
- const cwd = options.cwd;
201
- const props = {
202
- root: cwd,
203
- depthOffset: 0
204
- };
205
- const processed = processPatterns(options, patterns, props);
206
- if (options.debug) log("internal processing patterns:", processed);
207
- const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
208
- const root = props.root.replace(BACKSLASHES, "");
209
- const matchOptions = {
210
- dot,
211
- nobrace: options.braceExpansion === false,
212
- nocase: !caseSensitiveMatch,
213
- noextglob: options.extglob === false,
214
- noglobstar: options.globstar === false,
215
- posix: true
216
- };
217
- const matcher = picomatch(processed.match, matchOptions);
218
- const ignore = picomatch(processed.ignore, matchOptions);
219
- const partialMatcher = getPartialMatcher(processed.match, matchOptions);
220
- const format = buildFormat(cwd, root, absolute);
221
- const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
222
- const excludePredicate = (_, p) => {
223
- const relativePath = excludeFormatter(p, true);
224
- return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
225
- };
226
- let maxDepth;
227
- if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
228
- const crawler = new fdir({
229
- filters: [debug ? (p, isDirectory) => {
230
- const path = format(p, isDirectory);
231
- const matches = matcher(path) && !ignore(path);
232
- if (matches) log(`matched ${path}`);
233
- return matches;
234
- } : (p, isDirectory) => {
235
- const path = format(p, isDirectory);
236
- return matcher(path) && !ignore(path);
237
- }],
238
- exclude: debug ? (_, p) => {
239
- const skipped = excludePredicate(_, p);
240
- log(`${skipped ? "skipped" : "crawling"} ${p}`);
241
- return skipped;
242
- } : excludePredicate,
243
- fs: options.fs,
244
- pathSeparator: "/",
245
- relativePaths: !absolute,
246
- resolvePaths: absolute,
247
- includeBasePath: absolute,
248
- resolveSymlinks: followSymbolicLinks,
249
- excludeSymlinks: !followSymbolicLinks,
250
- excludeFiles: onlyDirectories,
251
- includeDirs: onlyDirectories || !options.onlyFiles,
252
- maxDepth,
253
- signal: options.signal
254
- }).crawl(root);
255
- if (options.debug) log("internal properties:", {
256
- ...props,
257
- root
258
- });
259
- return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
260
- }
261
- //#endregion
262
- //#region src/index.ts
263
- function formatPaths(paths, mapper) {
264
- if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
265
- return paths;
266
- }
267
- const defaultOptions = {
268
- caseSensitiveMatch: true,
269
- debug: !!process.env.TINYGLOBBY_DEBUG,
270
- expandDirectories: true,
271
- followSymbolicLinks: true,
272
- onlyFiles: true
273
- };
274
- function getOptions(options) {
275
- const opts = Object.assign({}, options);
276
- for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
277
- opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
278
- opts.ignore = ensureStringArray(opts.ignore);
279
- opts.fs && (opts.fs = {
280
- readdir: opts.fs.readdir || readdir,
281
- readdirSync: opts.fs.readdirSync || readdirSync,
282
- realpath: opts.fs.realpath || realpath,
283
- realpathSync: opts.fs.realpathSync || realpathSync,
284
- stat: opts.fs.stat || stat,
285
- statSync: opts.fs.statSync || statSync
286
- });
287
- if (opts.debug) log("globbing with options:", opts);
288
- return opts;
289
- }
290
- function getCrawler(globInput, inputOptions = {}) {
291
- var _ref;
292
- if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
293
- const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
294
- const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
295
- const options = getOptions(isModern ? inputOptions : globInput);
296
- return patterns.length > 0 ? buildCrawler(options, patterns) : [];
297
- }
298
- async function glob(globInput, options) {
299
- const [crawler, relative] = getCrawler(globInput, options);
300
- return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
301
- }
302
- function globSync(globInput, options) {
303
- const [crawler, relative] = getCrawler(globInput, options);
304
- return crawler ? formatPaths(crawler.sync(), relative) : [];
305
- }
306
- //#endregion
307
- export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
@@ -1,70 +0,0 @@
1
- {
2
- "name": "tinyglobby",
3
- "version": "0.2.17",
4
- "description": "A fast and minimal alternative to globby and fast-glob",
5
- "type": "module",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.cts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.cjs"
13
- },
14
- "./package.json": "./package.json"
15
- },
16
- "sideEffects": false,
17
- "files": [
18
- "dist"
19
- ],
20
- "author": "Superchupu",
21
- "license": "MIT",
22
- "keywords": [
23
- "glob",
24
- "patterns",
25
- "tiny",
26
- "fast"
27
- ],
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/SuperchupuDev/tinyglobby.git"
31
- },
32
- "bugs": {
33
- "url": "https://github.com/SuperchupuDev/tinyglobby/issues"
34
- },
35
- "homepage": "https://superchupu.dev/tinyglobby",
36
- "funding": {
37
- "url": "https://github.com/sponsors/SuperchupuDev"
38
- },
39
- "dependencies": {
40
- "fdir": "^6.5.0",
41
- "picomatch": "^4.0.4"
42
- },
43
- "devDependencies": {
44
- "@biomejs/biome": "^2.4.16",
45
- "@types/node": "^25.9.1",
46
- "@types/picomatch": "^4.0.3",
47
- "fast-glob": "^3.3.3",
48
- "fs-fixture": "^2.14.0",
49
- "glob": "^13.0.6",
50
- "tinybench": "^6.0.2",
51
- "tsdown": "^0.22.1",
52
- "typescript": "^6.0.3"
53
- },
54
- "engines": {
55
- "node": ">=12.0.0"
56
- },
57
- "scripts": {
58
- "bench": "node benchmark/bench.ts",
59
- "bench:setup": "node benchmark/setup.ts",
60
- "build": "tsdown",
61
- "check": "biome check",
62
- "check:fix": "biome check --write --unsafe",
63
- "format": "biome format --write",
64
- "lint": "biome lint",
65
- "test": "node --test \"test/**/*.ts\"",
66
- "test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"",
67
- "test:only": "node --test --test-only \"test/**/*.ts\"",
68
- "typecheck": "tsc --noEmit"
69
- }
70
- }