mockaton 13.9.9 → 13.10.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/package.json +3 -2
  2. package/src/client/app-header.js +62 -42
  3. package/src/client/app.css +22 -4
  4. package/src/client/dir/dittoSplitPaths.js +1 -1
  5. package/src/client/dir/dittoSplitPaths.test.js +9 -7
  6. package/src/server/MockBroker.js +1 -1
  7. package/src/server/cli.test.js +1 -1
  8. package/src/server/mockBrokersCollection.js +4 -2
  9. package/vite-plugin/README.md +0 -29
  10. package/vite-plugin/node_modules/.package-lock.json +0 -356
  11. package/vite-plugin/node_modules/@oxc-project/types/LICENSE +0 -22
  12. package/vite-plugin/node_modules/@oxc-project/types/README.md +0 -3
  13. package/vite-plugin/node_modules/@oxc-project/types/package.json +0 -26
  14. package/vite-plugin/node_modules/@oxc-project/types/types.d.ts +0 -1912
  15. package/vite-plugin/node_modules/@rolldown/binding-darwin-arm64/README.md +0 -3
  16. package/vite-plugin/node_modules/@rolldown/binding-darwin-arm64/package.json +0 -37
  17. package/vite-plugin/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node +0 -0
  18. package/vite-plugin/node_modules/@rolldown/pluginutils/LICENSE +0 -25
  19. package/vite-plugin/node_modules/@rolldown/pluginutils/README.md +0 -83
  20. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +0 -90
  21. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +0 -256
  22. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +0 -28
  23. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +0 -75
  24. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +0 -3
  25. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/index.js +0 -3
  26. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +0 -71
  27. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +0 -70
  28. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/index.d.ts +0 -1
  29. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/index.js +0 -1
  30. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/utils.d.ts +0 -2
  31. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/utils.js +0 -17
  32. package/vite-plugin/node_modules/@rolldown/pluginutils/package.json +0 -37
  33. package/vite-plugin/node_modules/detect-libc/LICENSE +0 -201
  34. package/vite-plugin/node_modules/detect-libc/README.md +0 -163
  35. package/vite-plugin/node_modules/detect-libc/index.d.ts +0 -14
  36. package/vite-plugin/node_modules/detect-libc/lib/detect-libc.js +0 -313
  37. package/vite-plugin/node_modules/detect-libc/lib/elf.js +0 -39
  38. package/vite-plugin/node_modules/detect-libc/lib/filesystem.js +0 -51
  39. package/vite-plugin/node_modules/detect-libc/lib/process.js +0 -24
  40. package/vite-plugin/node_modules/detect-libc/package.json +0 -44
  41. package/vite-plugin/node_modules/fdir/LICENSE +0 -7
  42. package/vite-plugin/node_modules/fdir/README.md +0 -91
  43. package/vite-plugin/node_modules/fdir/dist/index.cjs +0 -588
  44. package/vite-plugin/node_modules/fdir/dist/index.d.cts +0 -155
  45. package/vite-plugin/node_modules/fdir/dist/index.d.mts +0 -155
  46. package/vite-plugin/node_modules/fdir/dist/index.mjs +0 -570
  47. package/vite-plugin/node_modules/fdir/package.json +0 -103
  48. package/vite-plugin/node_modules/fsevents/LICENSE +0 -22
  49. package/vite-plugin/node_modules/fsevents/README.md +0 -89
  50. package/vite-plugin/node_modules/fsevents/fsevents.d.ts +0 -46
  51. package/vite-plugin/node_modules/fsevents/fsevents.js +0 -83
  52. package/vite-plugin/node_modules/fsevents/fsevents.node +0 -0
  53. package/vite-plugin/node_modules/fsevents/package.json +0 -62
  54. package/vite-plugin/node_modules/lightningcss/LICENSE +0 -373
  55. package/vite-plugin/node_modules/lightningcss/README.md +0 -105
  56. package/vite-plugin/node_modules/lightningcss/node/ast.d.ts +0 -9892
  57. package/vite-plugin/node_modules/lightningcss/node/ast.js.flow +0 -10539
  58. package/vite-plugin/node_modules/lightningcss/node/browserslistToTargets.js +0 -48
  59. package/vite-plugin/node_modules/lightningcss/node/composeVisitors.js +0 -450
  60. package/vite-plugin/node_modules/lightningcss/node/flags.js +0 -28
  61. package/vite-plugin/node_modules/lightningcss/node/index.d.ts +0 -494
  62. package/vite-plugin/node_modules/lightningcss/node/index.js +0 -59
  63. package/vite-plugin/node_modules/lightningcss/node/index.js.flow +0 -843
  64. package/vite-plugin/node_modules/lightningcss/node/index.mjs +0 -4
  65. package/vite-plugin/node_modules/lightningcss/node/targets.d.ts +0 -40
  66. package/vite-plugin/node_modules/lightningcss/node/targets.js.flow +0 -39
  67. package/vite-plugin/node_modules/lightningcss/package.json +0 -110
  68. package/vite-plugin/node_modules/lightningcss-darwin-arm64/LICENSE +0 -373
  69. package/vite-plugin/node_modules/lightningcss-darwin-arm64/README.md +0 -1
  70. package/vite-plugin/node_modules/lightningcss-darwin-arm64/lightningcss.darwin-arm64.node +0 -0
  71. package/vite-plugin/node_modules/lightningcss-darwin-arm64/package.json +0 -34
  72. package/vite-plugin/node_modules/nanoid/LICENSE +0 -20
  73. package/vite-plugin/node_modules/nanoid/README.md +0 -39
  74. package/vite-plugin/node_modules/nanoid/async/index.browser.cjs +0 -69
  75. package/vite-plugin/node_modules/nanoid/async/index.browser.js +0 -34
  76. package/vite-plugin/node_modules/nanoid/async/index.cjs +0 -71
  77. package/vite-plugin/node_modules/nanoid/async/index.d.ts +0 -56
  78. package/vite-plugin/node_modules/nanoid/async/index.js +0 -35
  79. package/vite-plugin/node_modules/nanoid/async/index.native.js +0 -26
  80. package/vite-plugin/node_modules/nanoid/async/package.json +0 -12
  81. package/vite-plugin/node_modules/nanoid/bin/nanoid.cjs +0 -55
  82. package/vite-plugin/node_modules/nanoid/index.browser.cjs +0 -72
  83. package/vite-plugin/node_modules/nanoid/index.browser.js +0 -34
  84. package/vite-plugin/node_modules/nanoid/index.cjs +0 -85
  85. package/vite-plugin/node_modules/nanoid/index.d.cts +0 -91
  86. package/vite-plugin/node_modules/nanoid/index.d.ts +0 -91
  87. package/vite-plugin/node_modules/nanoid/index.js +0 -45
  88. package/vite-plugin/node_modules/nanoid/nanoid.js +0 -1
  89. package/vite-plugin/node_modules/nanoid/non-secure/index.cjs +0 -34
  90. package/vite-plugin/node_modules/nanoid/non-secure/index.d.ts +0 -33
  91. package/vite-plugin/node_modules/nanoid/non-secure/index.js +0 -21
  92. package/vite-plugin/node_modules/nanoid/non-secure/package.json +0 -6
  93. package/vite-plugin/node_modules/nanoid/package.json +0 -89
  94. package/vite-plugin/node_modules/nanoid/url-alphabet/index.cjs +0 -7
  95. package/vite-plugin/node_modules/nanoid/url-alphabet/index.js +0 -3
  96. package/vite-plugin/node_modules/nanoid/url-alphabet/package.json +0 -6
  97. package/vite-plugin/node_modules/picocolors/LICENSE +0 -15
  98. package/vite-plugin/node_modules/picocolors/README.md +0 -21
  99. package/vite-plugin/node_modules/picocolors/package.json +0 -25
  100. package/vite-plugin/node_modules/picocolors/picocolors.browser.js +0 -4
  101. package/vite-plugin/node_modules/picocolors/picocolors.d.ts +0 -5
  102. package/vite-plugin/node_modules/picocolors/picocolors.js +0 -75
  103. package/vite-plugin/node_modules/picocolors/types.d.ts +0 -51
  104. package/vite-plugin/node_modules/picomatch/LICENSE +0 -21
  105. package/vite-plugin/node_modules/picomatch/README.md +0 -749
  106. package/vite-plugin/node_modules/picomatch/index.js +0 -17
  107. package/vite-plugin/node_modules/picomatch/lib/constants.js +0 -184
  108. package/vite-plugin/node_modules/picomatch/lib/parse.js +0 -1386
  109. package/vite-plugin/node_modules/picomatch/lib/picomatch.js +0 -349
  110. package/vite-plugin/node_modules/picomatch/lib/scan.js +0 -391
  111. package/vite-plugin/node_modules/picomatch/lib/utils.js +0 -72
  112. package/vite-plugin/node_modules/picomatch/package.json +0 -82
  113. package/vite-plugin/node_modules/picomatch/posix.js +0 -3
  114. package/vite-plugin/node_modules/postcss/LICENSE +0 -20
  115. package/vite-plugin/node_modules/postcss/README.md +0 -28
  116. package/vite-plugin/node_modules/postcss/lib/at-rule.d.ts +0 -139
  117. package/vite-plugin/node_modules/postcss/lib/at-rule.js +0 -25
  118. package/vite-plugin/node_modules/postcss/lib/comment.d.ts +0 -67
  119. package/vite-plugin/node_modules/postcss/lib/comment.js +0 -13
  120. package/vite-plugin/node_modules/postcss/lib/container.d.ts +0 -478
  121. package/vite-plugin/node_modules/postcss/lib/container.js +0 -447
  122. package/vite-plugin/node_modules/postcss/lib/css-syntax-error.d.ts +0 -247
  123. package/vite-plugin/node_modules/postcss/lib/css-syntax-error.js +0 -133
  124. package/vite-plugin/node_modules/postcss/lib/declaration.d.ts +0 -150
  125. package/vite-plugin/node_modules/postcss/lib/declaration.js +0 -24
  126. package/vite-plugin/node_modules/postcss/lib/document.d.ts +0 -68
  127. package/vite-plugin/node_modules/postcss/lib/document.js +0 -33
  128. package/vite-plugin/node_modules/postcss/lib/fromJSON.d.ts +0 -9
  129. package/vite-plugin/node_modules/postcss/lib/fromJSON.js +0 -54
  130. package/vite-plugin/node_modules/postcss/lib/input.d.ts +0 -226
  131. package/vite-plugin/node_modules/postcss/lib/input.js +0 -273
  132. package/vite-plugin/node_modules/postcss/lib/lazy-result.d.ts +0 -189
  133. package/vite-plugin/node_modules/postcss/lib/lazy-result.js +0 -550
  134. package/vite-plugin/node_modules/postcss/lib/list.d.ts +0 -60
  135. package/vite-plugin/node_modules/postcss/lib/list.js +0 -58
  136. package/vite-plugin/node_modules/postcss/lib/map-generator.js +0 -376
  137. package/vite-plugin/node_modules/postcss/lib/no-work-result.d.ts +0 -45
  138. package/vite-plugin/node_modules/postcss/lib/no-work-result.js +0 -137
  139. package/vite-plugin/node_modules/postcss/lib/node.d.ts +0 -555
  140. package/vite-plugin/node_modules/postcss/lib/node.js +0 -449
  141. package/vite-plugin/node_modules/postcss/lib/parse.d.ts +0 -9
  142. package/vite-plugin/node_modules/postcss/lib/parse.js +0 -42
  143. package/vite-plugin/node_modules/postcss/lib/parser.js +0 -611
  144. package/vite-plugin/node_modules/postcss/lib/postcss.d.mts +0 -66
  145. package/vite-plugin/node_modules/postcss/lib/postcss.d.ts +0 -456
  146. package/vite-plugin/node_modules/postcss/lib/postcss.js +0 -101
  147. package/vite-plugin/node_modules/postcss/lib/postcss.mjs +0 -30
  148. package/vite-plugin/node_modules/postcss/lib/previous-map.d.ts +0 -80
  149. package/vite-plugin/node_modules/postcss/lib/previous-map.js +0 -145
  150. package/vite-plugin/node_modules/postcss/lib/processor.d.ts +0 -114
  151. package/vite-plugin/node_modules/postcss/lib/processor.js +0 -67
  152. package/vite-plugin/node_modules/postcss/lib/result.d.ts +0 -204
  153. package/vite-plugin/node_modules/postcss/lib/result.js +0 -42
  154. package/vite-plugin/node_modules/postcss/lib/root.d.ts +0 -86
  155. package/vite-plugin/node_modules/postcss/lib/root.js +0 -61
  156. package/vite-plugin/node_modules/postcss/lib/rule.d.ts +0 -126
  157. package/vite-plugin/node_modules/postcss/lib/rule.js +0 -27
  158. package/vite-plugin/node_modules/postcss/lib/stringifier.d.ts +0 -45
  159. package/vite-plugin/node_modules/postcss/lib/stringifier.js +0 -370
  160. package/vite-plugin/node_modules/postcss/lib/stringify.d.ts +0 -9
  161. package/vite-plugin/node_modules/postcss/lib/stringify.js +0 -11
  162. package/vite-plugin/node_modules/postcss/lib/symbols.js +0 -5
  163. package/vite-plugin/node_modules/postcss/lib/terminal-highlight.js +0 -70
  164. package/vite-plugin/node_modules/postcss/lib/tokenize.js +0 -266
  165. package/vite-plugin/node_modules/postcss/lib/warn-once.js +0 -13
  166. package/vite-plugin/node_modules/postcss/lib/warning.d.ts +0 -146
  167. package/vite-plugin/node_modules/postcss/lib/warning.js +0 -37
  168. package/vite-plugin/node_modules/postcss/package.json +0 -88
  169. package/vite-plugin/node_modules/rolldown/LICENSE +0 -25
  170. package/vite-plugin/node_modules/rolldown/README.md +0 -11
  171. package/vite-plugin/node_modules/rolldown/bin/cli.mjs +0 -2
  172. package/vite-plugin/node_modules/rolldown/dist/cli.d.mts +0 -1
  173. package/vite-plugin/node_modules/rolldown/dist/cli.mjs +0 -1191
  174. package/vite-plugin/node_modules/rolldown/dist/config.d.mts +0 -14
  175. package/vite-plugin/node_modules/rolldown/dist/config.mjs +0 -4
  176. package/vite-plugin/node_modules/rolldown/dist/experimental-index.d.mts +0 -253
  177. package/vite-plugin/node_modules/rolldown/dist/experimental-index.mjs +0 -320
  178. package/vite-plugin/node_modules/rolldown/dist/experimental-runtime-types.d.ts +0 -98
  179. package/vite-plugin/node_modules/rolldown/dist/filter-index.d.mts +0 -196
  180. package/vite-plugin/node_modules/rolldown/dist/filter-index.mjs +0 -386
  181. package/vite-plugin/node_modules/rolldown/dist/get-log-filter.d.mts +0 -3
  182. package/vite-plugin/node_modules/rolldown/dist/get-log-filter.mjs +0 -68
  183. package/vite-plugin/node_modules/rolldown/dist/index.d.mts +0 -4
  184. package/vite-plugin/node_modules/rolldown/dist/index.mjs +0 -50
  185. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +0 -1
  186. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin-worker.mjs +0 -28
  187. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin.d.mts +0 -13
  188. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin.mjs +0 -6
  189. package/vite-plugin/node_modules/rolldown/dist/parse-ast-index.d.mts +0 -32
  190. package/vite-plugin/node_modules/rolldown/dist/parse-ast-index.mjs +0 -60
  191. package/vite-plugin/node_modules/rolldown/dist/plugins-index.d.mts +0 -33
  192. package/vite-plugin/node_modules/rolldown/dist/plugins-index.mjs +0 -40
  193. package/vite-plugin/node_modules/rolldown/dist/shared/binding-BeU_1iEk.mjs +0 -582
  194. package/vite-plugin/node_modules/rolldown/dist/shared/binding-zH1vcmbM.d.mts +0 -1899
  195. package/vite-plugin/node_modules/rolldown/dist/shared/bindingify-input-options-DbbBhzky.mjs +0 -2211
  196. package/vite-plugin/node_modules/rolldown/dist/shared/constructors-C2EWPKW3.mjs +0 -68
  197. package/vite-plugin/node_modules/rolldown/dist/shared/constructors-D0W3rNfA.d.mts +0 -37
  198. package/vite-plugin/node_modules/rolldown/dist/shared/define-config-5HJ1b9vG.d.mts +0 -3829
  199. package/vite-plugin/node_modules/rolldown/dist/shared/define-config-DJOr6Iwt.mjs +0 -6
  200. package/vite-plugin/node_modules/rolldown/dist/shared/error-DL-e8-oE.mjs +0 -85
  201. package/vite-plugin/node_modules/rolldown/dist/shared/get-log-filter-semyr3Lj.d.mts +0 -35
  202. package/vite-plugin/node_modules/rolldown/dist/shared/load-config-BoVO31Un.mjs +0 -120
  203. package/vite-plugin/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts +0 -50
  204. package/vite-plugin/node_modules/rolldown/dist/shared/logs-D80CXhvg.mjs +0 -180
  205. package/vite-plugin/node_modules/rolldown/dist/shared/misc-DJYbNKZX.mjs +0 -21
  206. package/vite-plugin/node_modules/rolldown/dist/shared/normalize-string-or-regex-CbQQ69gT.mjs +0 -66
  207. package/vite-plugin/node_modules/rolldown/dist/shared/parse-B_ZnWxLZ.mjs +0 -74
  208. package/vite-plugin/node_modules/rolldown/dist/shared/prompt-U5ajztzG.mjs +0 -847
  209. package/vite-plugin/node_modules/rolldown/dist/shared/resolve-tsconfig-CfYpGzid.mjs +0 -113
  210. package/vite-plugin/node_modules/rolldown/dist/shared/rolldown-D3JZ9rMt.mjs +0 -40
  211. package/vite-plugin/node_modules/rolldown/dist/shared/rolldown-build-DSxL8qiP.mjs +0 -3325
  212. package/vite-plugin/node_modules/rolldown/dist/shared/transform-DgZ3paSD.d.mts +0 -149
  213. package/vite-plugin/node_modules/rolldown/dist/shared/watch-Bd8v9ewv.mjs +0 -374
  214. package/vite-plugin/node_modules/rolldown/dist/utils-index.d.mts +0 -376
  215. package/vite-plugin/node_modules/rolldown/dist/utils-index.mjs +0 -2414
  216. package/vite-plugin/node_modules/rolldown/package.json +0 -153
  217. package/vite-plugin/node_modules/source-map-js/LICENSE +0 -28
  218. package/vite-plugin/node_modules/source-map-js/README.md +0 -765
  219. package/vite-plugin/node_modules/source-map-js/lib/array-set.js +0 -121
  220. package/vite-plugin/node_modules/source-map-js/lib/base64-vlq.js +0 -140
  221. package/vite-plugin/node_modules/source-map-js/lib/base64.js +0 -67
  222. package/vite-plugin/node_modules/source-map-js/lib/binary-search.js +0 -111
  223. package/vite-plugin/node_modules/source-map-js/lib/mapping-list.js +0 -79
  224. package/vite-plugin/node_modules/source-map-js/lib/quick-sort.js +0 -132
  225. package/vite-plugin/node_modules/source-map-js/lib/source-map-consumer.d.ts +0 -1
  226. package/vite-plugin/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
  227. package/vite-plugin/node_modules/source-map-js/lib/source-map-generator.d.ts +0 -1
  228. package/vite-plugin/node_modules/source-map-js/lib/source-map-generator.js +0 -444
  229. package/vite-plugin/node_modules/source-map-js/lib/source-node.d.ts +0 -1
  230. package/vite-plugin/node_modules/source-map-js/lib/source-node.js +0 -413
  231. package/vite-plugin/node_modules/source-map-js/lib/util.js +0 -594
  232. package/vite-plugin/node_modules/source-map-js/package.json +0 -71
  233. package/vite-plugin/node_modules/source-map-js/source-map.d.ts +0 -104
  234. package/vite-plugin/node_modules/source-map-js/source-map.js +0 -8
  235. package/vite-plugin/node_modules/tinyglobby/LICENSE +0 -21
  236. package/vite-plugin/node_modules/tinyglobby/README.md +0 -25
  237. package/vite-plugin/node_modules/tinyglobby/dist/index.cjs +0 -334
  238. package/vite-plugin/node_modules/tinyglobby/dist/index.d.cts +0 -148
  239. package/vite-plugin/node_modules/tinyglobby/dist/index.d.mts +0 -148
  240. package/vite-plugin/node_modules/tinyglobby/dist/index.mjs +0 -306
  241. package/vite-plugin/node_modules/tinyglobby/package.json +0 -73
  242. package/vite-plugin/node_modules/vite/LICENSE.md +0 -2230
  243. package/vite-plugin/node_modules/vite/README.md +0 -20
  244. package/vite-plugin/node_modules/vite/bin/openChrome.js +0 -68
  245. package/vite-plugin/node_modules/vite/bin/vite.js +0 -79
  246. package/vite-plugin/node_modules/vite/client.d.ts +0 -282
  247. package/vite-plugin/node_modules/vite/dist/client/client.mjs +0 -1237
  248. package/vite-plugin/node_modules/vite/dist/client/env.mjs +0 -18
  249. package/vite-plugin/node_modules/vite/dist/node/chunks/build.js +0 -5381
  250. package/vite-plugin/node_modules/vite/dist/node/chunks/chunk.js +0 -37
  251. package/vite-plugin/node_modules/vite/dist/node/chunks/dist.js +0 -6784
  252. package/vite-plugin/node_modules/vite/dist/node/chunks/lib.js +0 -371
  253. package/vite-plugin/node_modules/vite/dist/node/chunks/logger.js +0 -322
  254. package/vite-plugin/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +0 -96
  255. package/vite-plugin/node_modules/vite/dist/node/chunks/node.js +0 -34874
  256. package/vite-plugin/node_modules/vite/dist/node/chunks/postcss-import.js +0 -467
  257. package/vite-plugin/node_modules/vite/dist/node/cli.js +0 -837
  258. package/vite-plugin/node_modules/vite/dist/node/index.d.ts +0 -3867
  259. package/vite-plugin/node_modules/vite/dist/node/index.js +0 -3
  260. package/vite-plugin/node_modules/vite/dist/node/internal.d.ts +0 -2
  261. package/vite-plugin/node_modules/vite/dist/node/internal.js +0 -2
  262. package/vite-plugin/node_modules/vite/dist/node/module-runner.d.ts +0 -315
  263. package/vite-plugin/node_modules/vite/dist/node/module-runner.js +0 -1262
  264. package/vite-plugin/node_modules/vite/misc/false.js +0 -1
  265. package/vite-plugin/node_modules/vite/misc/true.js +0 -1
  266. package/vite-plugin/node_modules/vite/package.json +0 -192
  267. package/vite-plugin/node_modules/vite/types/customEvent.d.ts +0 -79
  268. package/vite-plugin/node_modules/vite/types/hmrPayload.d.ts +0 -80
  269. package/vite-plugin/node_modules/vite/types/hot.d.ts +0 -39
  270. package/vite-plugin/node_modules/vite/types/import-meta.d.ts +0 -5
  271. package/vite-plugin/node_modules/vite/types/importGlob.d.ts +0 -89
  272. package/vite-plugin/node_modules/vite/types/importMeta.d.ts +0 -30
  273. package/vite-plugin/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +0 -44
  274. package/vite-plugin/node_modules/vite/types/internal/esbuildOptions.d.ts +0 -28
  275. package/vite-plugin/node_modules/vite/types/internal/lightningcssOptions.d.ts +0 -18
  276. package/vite-plugin/node_modules/vite/types/internal/rollupTypeCompat.d.ts +0 -24
  277. package/vite-plugin/node_modules/vite/types/internal/terserOptions.d.ts +0 -11
  278. package/vite-plugin/node_modules/vite/types/metadata.d.ts +0 -47
  279. package/vite-plugin/package.json +0 -17
@@ -1,69 +0,0 @@
1
- let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes))
2
-
3
- let customAlphabet = (alphabet, defaultSize = 21) => {
4
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
5
- // values closer to the alphabet size. The bitmask calculates the closest
6
- // `2^31 - 1` number, which exceeds the alphabet size.
7
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
8
- // `Math.clz32` is not used, because it is not available in browsers.
9
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
10
- // Though, the bitmask solution is not perfect since the bytes exceeding
11
- // the alphabet size are refused. Therefore, to reliably generate the ID,
12
- // the random bytes redundancy has to be satisfied.
13
-
14
- // Note: every hardware random generator call is performance expensive,
15
- // because the system call for entropy collection takes a lot of time.
16
- // So, to avoid additional system calls, extra bytes are requested in advance.
17
-
18
- // Next, a step determines how many random bytes to generate.
19
- // The number of random bytes gets decided upon the ID size, mask,
20
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
21
- // according to benchmarks).
22
-
23
- // `-~f => Math.ceil(f)` if f is a float
24
- // `-~i => i + 1` if i is an integer
25
- let step = -~((1.6 * mask * defaultSize) / alphabet.length)
26
-
27
- return async (size = defaultSize) => {
28
- let id = ''
29
- while (true) {
30
- let bytes = crypto.getRandomValues(new Uint8Array(step))
31
- // A compact alternative for `for (var i = 0; i < step; i++)`.
32
- let i = step | 0
33
- while (i--) {
34
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
35
- id += alphabet[bytes[i] & mask] || ''
36
- if (id.length === size) return id
37
- }
38
- }
39
- }
40
- }
41
-
42
- let nanoid = async (size = 21) => {
43
- let id = ''
44
- let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))
45
-
46
- // A compact alternative for `for (var i = 0; i < step; i++)`.
47
- while (size--) {
48
- // It is incorrect to use bytes exceeding the alphabet size.
49
- // The following mask reduces the random byte in the 0-255 value
50
- // range to the 0-63 value range. Therefore, adding hacks, such
51
- // as empty string fallback or magic numbers, is unneccessary because
52
- // the bitmask trims bytes down to the alphabet size.
53
- let byte = bytes[size] & 63
54
- if (byte < 36) {
55
- // `0-9a-z`
56
- id += byte.toString(36)
57
- } else if (byte < 62) {
58
- // `A-Z`
59
- id += (byte - 26).toString(36).toUpperCase()
60
- } else if (byte < 63) {
61
- id += '_'
62
- } else {
63
- id += '-'
64
- }
65
- }
66
- return id
67
- }
68
-
69
- module.exports = { nanoid, customAlphabet, random }
@@ -1,34 +0,0 @@
1
- let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes))
2
- let customAlphabet = (alphabet, defaultSize = 21) => {
3
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
4
- let step = -~((1.6 * mask * defaultSize) / alphabet.length)
5
- return async (size = defaultSize) => {
6
- let id = ''
7
- while (true) {
8
- let bytes = crypto.getRandomValues(new Uint8Array(step))
9
- let i = step | 0
10
- while (i--) {
11
- id += alphabet[bytes[i] & mask] || ''
12
- if (id.length === size) return id
13
- }
14
- }
15
- }
16
- }
17
- let nanoid = async (size = 21) => {
18
- let id = ''
19
- let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))
20
- while (size--) {
21
- let byte = bytes[size] & 63
22
- if (byte < 36) {
23
- id += byte.toString(36)
24
- } else if (byte < 62) {
25
- id += (byte - 26).toString(36).toUpperCase()
26
- } else if (byte < 63) {
27
- id += '_'
28
- } else {
29
- id += '-'
30
- }
31
- }
32
- return id
33
- }
34
- export { nanoid, customAlphabet, random }
@@ -1,71 +0,0 @@
1
- let crypto = require('crypto')
2
-
3
- let { urlAlphabet } = require('../url-alphabet/index.cjs')
4
-
5
- // `crypto.randomFill()` is a little faster than `crypto.randomBytes()`,
6
- // because it is possible to use in combination with `Buffer.allocUnsafe()`.
7
- let random = bytes =>
8
- new Promise((resolve, reject) => {
9
- // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory.
10
- // Memory flushing is unnecessary since the buffer allocation itself resets
11
- // the memory with the new bytes.
12
- crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
13
- if (err) {
14
- reject(err)
15
- } else {
16
- resolve(buf)
17
- }
18
- })
19
- })
20
-
21
- let customAlphabet = (alphabet, defaultSize = 21) => {
22
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
23
- // values closer to the alphabet size. The bitmask calculates the closest
24
- // `2^31 - 1` number, which exceeds the alphabet size.
25
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
26
- let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
27
- // Though, the bitmask solution is not perfect since the bytes exceeding
28
- // the alphabet size are refused. Therefore, to reliably generate the ID,
29
- // the random bytes redundancy has to be satisfied.
30
-
31
- // Note: every hardware random generator call is performance expensive,
32
- // because the system call for entropy collection takes a lot of time.
33
- // So, to avoid additional system calls, extra bytes are requested in advance.
34
-
35
- // Next, a step determines how many random bytes to generate.
36
- // The number of random bytes gets decided upon the ID size, mask,
37
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
38
- // according to benchmarks).
39
- let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
40
-
41
- let tick = (id, size = defaultSize) =>
42
- random(step).then(bytes => {
43
- // A compact alternative for `for (var i = 0; i < step; i++)`.
44
- let i = step
45
- while (i--) {
46
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
47
- id += alphabet[bytes[i] & mask] || ''
48
- if (id.length >= size) return id
49
- }
50
- return tick(id, size)
51
- })
52
-
53
- return size => tick('', size)
54
- }
55
-
56
- let nanoid = (size = 21) =>
57
- random((size |= 0)).then(bytes => {
58
- let id = ''
59
- // A compact alternative for `for (var i = 0; i < step; i++)`.
60
- while (size--) {
61
- // It is incorrect to use bytes exceeding the alphabet size.
62
- // The following mask reduces the random byte in the 0-255 value
63
- // range to the 0-63 value range. Therefore, adding hacks, such
64
- // as empty string fallback or magic numbers, is unneccessary because
65
- // the bitmask trims bytes down to the alphabet size.
66
- id += urlAlphabet[bytes[size] & 63]
67
- }
68
- return id
69
- })
70
-
71
- module.exports = { nanoid, customAlphabet, random }
@@ -1,56 +0,0 @@
1
- /**
2
- * Generate secure URL-friendly unique ID. The non-blocking version.
3
- *
4
- * By default, the ID will have 21 symbols to have a collision probability
5
- * similar to UUID v4.
6
- *
7
- * ```js
8
- * import { nanoid } from 'nanoid/async'
9
- * nanoid().then(id => {
10
- * model.id = id
11
- * })
12
- * ```
13
- *
14
- * @param size Size of the ID. The default size is 21.
15
- * @returns A promise with a random string.
16
- */
17
- export function nanoid(size?: number): Promise<string>
18
-
19
- /**
20
- * A low-level function.
21
- * Generate secure unique ID with custom alphabet. The non-blocking version.
22
- *
23
- * Alphabet must contain 256 symbols or less. Otherwise, the generator
24
- * will not be secure.
25
- *
26
- * @param alphabet Alphabet used to generate the ID.
27
- * @param defaultSize Size of the ID. The default size is 21.
28
- * @returns A function that returns a promise with a random string.
29
- *
30
- * ```js
31
- * import { customAlphabet } from 'nanoid/async'
32
- * const nanoid = customAlphabet('0123456789абвгдеё', 5)
33
- * nanoid().then(id => {
34
- * model.id = id //=> "8ё56а"
35
- * })
36
- * ```
37
- */
38
- export function customAlphabet(
39
- alphabet: string,
40
- defaultSize?: number
41
- ): (size?: number) => Promise<string>
42
-
43
- /**
44
- * Generate an array of random bytes collected from hardware noise.
45
- *
46
- * ```js
47
- * import { random } from 'nanoid/async'
48
- * random(5).then(bytes => {
49
- * bytes //=> [10, 67, 212, 67, 89]
50
- * })
51
- * ```
52
- *
53
- * @param bytes Size of the array.
54
- * @returns A promise with a random bytes array.
55
- */
56
- export function random(bytes: number): Promise<Uint8Array>
@@ -1,35 +0,0 @@
1
- import crypto from 'crypto'
2
- import { urlAlphabet } from '../url-alphabet/index.js'
3
- let random = bytes =>
4
- new Promise((resolve, reject) => {
5
- crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
6
- if (err) {
7
- reject(err)
8
- } else {
9
- resolve(buf)
10
- }
11
- })
12
- })
13
- let customAlphabet = (alphabet, defaultSize = 21) => {
14
- let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
15
- let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
16
- let tick = (id, size = defaultSize) =>
17
- random(step).then(bytes => {
18
- let i = step
19
- while (i--) {
20
- id += alphabet[bytes[i] & mask] || ''
21
- if (id.length >= size) return id
22
- }
23
- return tick(id, size)
24
- })
25
- return size => tick('', size)
26
- }
27
- let nanoid = (size = 21) =>
28
- random((size |= 0)).then(bytes => {
29
- let id = ''
30
- while (size--) {
31
- id += urlAlphabet[bytes[size] & 63]
32
- }
33
- return id
34
- })
35
- export { nanoid, customAlphabet, random }
@@ -1,26 +0,0 @@
1
- import { getRandomBytesAsync } from 'expo-random'
2
- import { urlAlphabet } from '../url-alphabet/index.js'
3
- let random = getRandomBytesAsync
4
- let customAlphabet = (alphabet, defaultSize = 21) => {
5
- let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
6
- let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
7
- let tick = (id, size = defaultSize) =>
8
- random(step).then(bytes => {
9
- let i = step
10
- while (i--) {
11
- id += alphabet[bytes[i] & mask] || ''
12
- if (id.length >= size) return id
13
- }
14
- return tick(id, size)
15
- })
16
- return size => tick('', size)
17
- }
18
- let nanoid = (size = 21) =>
19
- random((size |= 0)).then(bytes => {
20
- let id = ''
21
- while (size--) {
22
- id += urlAlphabet[bytes[size] & 63]
23
- }
24
- return id
25
- })
26
- export { nanoid, customAlphabet, random }
@@ -1,12 +0,0 @@
1
- {
2
- "type": "module",
3
- "main": "index.cjs",
4
- "module": "index.js",
5
- "react-native": {
6
- "./index.js": "./index.native.js"
7
- },
8
- "browser": {
9
- "./index.js": "./index.browser.js",
10
- "./index.cjs": "./index.browser.cjs"
11
- }
12
- }
@@ -1,55 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- let { nanoid, customAlphabet } = require('..')
4
-
5
- function print(msg) {
6
- process.stdout.write(msg + '\n')
7
- }
8
-
9
- function error(msg) {
10
- process.stderr.write(msg + '\n')
11
- process.exit(1)
12
- }
13
-
14
- if (process.argv.includes('--help') || process.argv.includes('-h')) {
15
- print(`
16
- Usage
17
- $ nanoid [options]
18
-
19
- Options
20
- -s, --size Generated ID size
21
- -a, --alphabet Alphabet to use
22
- -h, --help Show this help
23
-
24
- Examples
25
- $ nanoid --s 15
26
- S9sBF77U6sDB8Yg
27
-
28
- $ nanoid --size 10 --alphabet abc
29
- bcabababca`)
30
- process.exit()
31
- }
32
-
33
- let alphabet, size
34
- for (let i = 2; i < process.argv.length; i++) {
35
- let arg = process.argv[i]
36
- if (arg === '--size' || arg === '-s') {
37
- size = Number(process.argv[i + 1])
38
- i += 1
39
- if (Number.isNaN(size) || size <= 0) {
40
- error('Size must be positive integer')
41
- }
42
- } else if (arg === '--alphabet' || arg === '-a') {
43
- alphabet = process.argv[i + 1]
44
- i += 1
45
- } else {
46
- error('Unknown argument ' + arg)
47
- }
48
- }
49
-
50
- if (alphabet) {
51
- let customNanoid = customAlphabet(alphabet, size)
52
- print(customNanoid())
53
- } else {
54
- print(nanoid(size))
55
- }
@@ -1,72 +0,0 @@
1
- // This file replaces `index.js` in bundlers like webpack or Rollup,
2
- // according to `browser` config in `package.json`.
3
-
4
- let { urlAlphabet } = require('./url-alphabet/index.cjs')
5
-
6
- let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
7
-
8
- let customRandom = (alphabet, defaultSize, getRandom) => {
9
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
10
- // values closer to the alphabet size. The bitmask calculates the closest
11
- // `2^31 - 1` number, which exceeds the alphabet size.
12
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
13
- // `Math.clz32` is not used, because it is not available in browsers.
14
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
15
- // Though, the bitmask solution is not perfect since the bytes exceeding
16
- // the alphabet size are refused. Therefore, to reliably generate the ID,
17
- // the random bytes redundancy has to be satisfied.
18
-
19
- // Note: every hardware random generator call is performance expensive,
20
- // because the system call for entropy collection takes a lot of time.
21
- // So, to avoid additional system calls, extra bytes are requested in advance.
22
-
23
- // Next, a step determines how many random bytes to generate.
24
- // The number of random bytes gets decided upon the ID size, mask,
25
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
26
- // according to benchmarks).
27
-
28
- // `-~f => Math.ceil(f)` if f is a float
29
- // `-~i => i + 1` if i is an integer
30
- let step = -~((1.6 * mask * defaultSize) / alphabet.length)
31
-
32
- return (size = defaultSize) => {
33
- let id = ''
34
- while (true) {
35
- let bytes = getRandom(step)
36
- // A compact alternative for `for (var i = 0; i < step; i++)`.
37
- let j = step | 0
38
- while (j--) {
39
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
40
- id += alphabet[bytes[j] & mask] || ''
41
- if (id.length === size) return id
42
- }
43
- }
44
- }
45
- }
46
-
47
- let customAlphabet = (alphabet, size = 21) =>
48
- customRandom(alphabet, size, random)
49
-
50
- let nanoid = (size = 21) =>
51
- crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
52
- // It is incorrect to use bytes exceeding the alphabet size.
53
- // The following mask reduces the random byte in the 0-255 value
54
- // range to the 0-63 value range. Therefore, adding hacks, such
55
- // as empty string fallback or magic numbers, is unneccessary because
56
- // the bitmask trims bytes down to the alphabet size.
57
- byte &= 63
58
- if (byte < 36) {
59
- // `0-9a-z`
60
- id += byte.toString(36)
61
- } else if (byte < 62) {
62
- // `A-Z`
63
- id += (byte - 26).toString(36).toUpperCase()
64
- } else if (byte > 62) {
65
- id += '-'
66
- } else {
67
- id += '_'
68
- }
69
- return id
70
- }, '')
71
-
72
- module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
@@ -1,34 +0,0 @@
1
- import { urlAlphabet } from './url-alphabet/index.js'
2
- let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
3
- let customRandom = (alphabet, defaultSize, getRandom) => {
4
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
5
- let step = -~((1.6 * mask * defaultSize) / alphabet.length)
6
- return (size = defaultSize) => {
7
- let id = ''
8
- while (true) {
9
- let bytes = getRandom(step)
10
- let j = step | 0
11
- while (j--) {
12
- id += alphabet[bytes[j] & mask] || ''
13
- if (id.length === size) return id
14
- }
15
- }
16
- }
17
- }
18
- let customAlphabet = (alphabet, size = 21) =>
19
- customRandom(alphabet, size, random)
20
- let nanoid = (size = 21) =>
21
- crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
22
- byte &= 63
23
- if (byte < 36) {
24
- id += byte.toString(36)
25
- } else if (byte < 62) {
26
- id += (byte - 26).toString(36).toUpperCase()
27
- } else if (byte > 62) {
28
- id += '-'
29
- } else {
30
- id += '_'
31
- }
32
- return id
33
- }, '')
34
- export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
@@ -1,85 +0,0 @@
1
- let crypto = require('crypto')
2
-
3
- let { urlAlphabet } = require('./url-alphabet/index.cjs')
4
-
5
- // It is best to make fewer, larger requests to the crypto module to
6
- // avoid system call overhead. So, random numbers are generated in a
7
- // pool. The pool is a Buffer that is larger than the initial random
8
- // request size by this multiplier. The pool is enlarged if subsequent
9
- // requests exceed the maximum buffer size.
10
- const POOL_SIZE_MULTIPLIER = 128
11
- let pool, poolOffset
12
-
13
- let fillPool = bytes => {
14
- if (!pool || pool.length < bytes) {
15
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
16
- crypto.randomFillSync(pool)
17
- poolOffset = 0
18
- } else if (poolOffset + bytes > pool.length) {
19
- crypto.randomFillSync(pool)
20
- poolOffset = 0
21
- }
22
- poolOffset += bytes
23
- }
24
-
25
- let random = bytes => {
26
- // `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution
27
- fillPool((bytes |= 0))
28
- return pool.subarray(poolOffset - bytes, poolOffset)
29
- }
30
-
31
- let customRandom = (alphabet, defaultSize, getRandom) => {
32
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
33
- // values closer to the alphabet size. The bitmask calculates the closest
34
- // `2^31 - 1` number, which exceeds the alphabet size.
35
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
36
- let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
37
- // Though, the bitmask solution is not perfect since the bytes exceeding
38
- // the alphabet size are refused. Therefore, to reliably generate the ID,
39
- // the random bytes redundancy has to be satisfied.
40
-
41
- // Note: every hardware random generator call is performance expensive,
42
- // because the system call for entropy collection takes a lot of time.
43
- // So, to avoid additional system calls, extra bytes are requested in advance.
44
-
45
- // Next, a step determines how many random bytes to generate.
46
- // The number of random bytes gets decided upon the ID size, mask,
47
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
48
- // according to benchmarks).
49
- let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
50
-
51
- return (size = defaultSize) => {
52
- let id = ''
53
- while (true) {
54
- let bytes = getRandom(step)
55
- // A compact alternative for `for (let i = 0; i < step; i++)`.
56
- let i = step
57
- while (i--) {
58
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
59
- id += alphabet[bytes[i] & mask] || ''
60
- if (id.length === size) return id
61
- }
62
- }
63
- }
64
- }
65
-
66
- let customAlphabet = (alphabet, size = 21) =>
67
- customRandom(alphabet, size, random)
68
-
69
- let nanoid = (size = 21) => {
70
- // `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution
71
- fillPool((size |= 0))
72
- let id = ''
73
- // We are reading directly from the random pool to avoid creating new array
74
- for (let i = poolOffset - size; i < poolOffset; i++) {
75
- // It is incorrect to use bytes exceeding the alphabet size.
76
- // The following mask reduces the random byte in the 0-255 value
77
- // range to the 0-63 value range. Therefore, adding hacks, such
78
- // as empty string fallback or magic numbers, is unneccessary because
79
- // the bitmask trims bytes down to the alphabet size.
80
- id += urlAlphabet[pool[i] & 63]
81
- }
82
- return id
83
- }
84
-
85
- module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
@@ -1,91 +0,0 @@
1
- /**
2
- * Generate secure URL-friendly unique ID.
3
- *
4
- * By default, the ID will have 21 symbols to have a collision probability
5
- * similar to UUID v4.
6
- *
7
- * ```js
8
- * import { nanoid } from 'nanoid'
9
- * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
10
- * ```
11
- *
12
- * @param size Size of the ID. The default size is 21.
13
- * @returns A random string.
14
- */
15
- export function nanoid(size?: number): string
16
-
17
- /**
18
- * Generate secure unique ID with custom alphabet.
19
- *
20
- * Alphabet must contain 256 symbols or less. Otherwise, the generator
21
- * will not be secure.
22
- *
23
- * @param alphabet Alphabet used to generate the ID.
24
- * @param defaultSize Size of the ID. The default size is 21.
25
- * @returns A random string generator.
26
- *
27
- * ```js
28
- * const { customAlphabet } = require('nanoid')
29
- * const nanoid = customAlphabet('0123456789абвгдеё', 5)
30
- * nanoid() //=> "8ё56а"
31
- * ```
32
- */
33
- export function customAlphabet(
34
- alphabet: string,
35
- defaultSize?: number
36
- ): (size?: number) => string
37
-
38
- /**
39
- * Generate unique ID with custom random generator and alphabet.
40
- *
41
- * Alphabet must contain 256 symbols or less. Otherwise, the generator
42
- * will not be secure.
43
- *
44
- * ```js
45
- * import { customRandom } from 'nanoid/format'
46
- *
47
- * const nanoid = customRandom('abcdef', 5, size => {
48
- * const random = []
49
- * for (let i = 0; i < size; i++) {
50
- * random.push(randomByte())
51
- * }
52
- * return random
53
- * })
54
- *
55
- * nanoid() //=> "fbaef"
56
- * ```
57
- *
58
- * @param alphabet Alphabet used to generate a random string.
59
- * @param size Size of the random string.
60
- * @param random A random bytes generator.
61
- * @returns A random string generator.
62
- */
63
- export function customRandom(
64
- alphabet: string,
65
- size: number,
66
- random: (bytes: number) => Uint8Array
67
- ): () => string
68
-
69
- /**
70
- * URL safe symbols.
71
- *
72
- * ```js
73
- * import { urlAlphabet } from 'nanoid'
74
- * const nanoid = customAlphabet(urlAlphabet, 10)
75
- * nanoid() //=> "Uakgb_J5m9"
76
- * ```
77
- */
78
- export const urlAlphabet: string
79
-
80
- /**
81
- * Generate an array of random bytes collected from hardware noise.
82
- *
83
- * ```js
84
- * import { customRandom, random } from 'nanoid'
85
- * const nanoid = customRandom("abcdef", 5, random)
86
- * ```
87
- *
88
- * @param bytes Size of the array.
89
- * @returns An array of random bytes.
90
- */
91
- export function random(bytes: number): Uint8Array