node-red-contrib-tak-registration 0.13.0 → 0.13.1

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 (465) hide show
  1. package/node_modules/@turf/jsts/dist/jsts.min.js +1 -1
  2. package/node_modules/@turf/jsts/dist/jsts.min.js.map +1 -0
  3. package/node_modules/@turf/jsts/package.json +17 -17
  4. package/node_modules/@types/geojson/README.md +1 -1
  5. package/node_modules/@types/geojson/index.d.ts +4 -1
  6. package/node_modules/@types/geojson/package.json +4 -3
  7. package/node_modules/@types/node/README.md +2 -2
  8. package/node_modules/@types/node/assert.d.ts +2 -2
  9. package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  10. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  11. package/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  12. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  13. package/node_modules/@types/node/crypto.d.ts +33 -9
  14. package/node_modules/@types/node/events.d.ts +2 -2
  15. package/node_modules/@types/node/fs/promises.d.ts +16 -5
  16. package/node_modules/@types/node/fs.d.ts +14 -8
  17. package/node_modules/@types/node/globals.d.ts +17 -48
  18. package/node_modules/@types/node/http.d.ts +38 -1
  19. package/node_modules/@types/node/http2.d.ts +4 -1
  20. package/node_modules/@types/node/https.d.ts +0 -1
  21. package/node_modules/@types/node/index.d.ts +8 -10
  22. package/node_modules/@types/node/module.d.ts +102 -1
  23. package/node_modules/@types/node/package.json +5 -9
  24. package/node_modules/@types/node/perf_hooks.d.ts +24 -0
  25. package/node_modules/@types/node/process.d.ts +61 -10
  26. package/node_modules/@types/node/readline/promises.d.ts +14 -2
  27. package/node_modules/@types/node/readline.d.ts +58 -9
  28. package/node_modules/@types/node/stream/promises.d.ts +8 -1
  29. package/node_modules/@types/node/stream/web.d.ts +5 -2
  30. package/node_modules/@types/node/stream.d.ts +2 -2
  31. package/node_modules/@types/node/test.d.ts +155 -5
  32. package/node_modules/@types/node/timers/promises.d.ts +1 -1
  33. package/node_modules/@types/node/tls.d.ts +6 -0
  34. package/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  35. package/node_modules/@types/node/url.d.ts +7 -4
  36. package/node_modules/@types/node/util.d.ts +80 -10
  37. package/node_modules/@types/node/v8.d.ts +1 -1
  38. package/node_modules/@types/node/vm.d.ts +81 -27
  39. package/node_modules/@types/node/worker_threads.d.ts +34 -1
  40. package/node_modules/axios/CHANGELOG.md +49 -0
  41. package/node_modules/axios/README.md +20 -8
  42. package/node_modules/axios/dist/axios.js +34 -63
  43. package/node_modules/axios/dist/axios.js.map +1 -1
  44. package/node_modules/axios/dist/axios.min.js +1 -1
  45. package/node_modules/axios/dist/axios.min.js.map +1 -1
  46. package/node_modules/axios/dist/browser/axios.cjs +40 -71
  47. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  48. package/node_modules/axios/dist/esm/axios.js +40 -71
  49. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  50. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  51. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  52. package/node_modules/axios/dist/node/axios.cjs +45 -75
  53. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  54. package/node_modules/axios/index.d.cts +5 -1
  55. package/node_modules/axios/index.d.ts +8 -1
  56. package/node_modules/axios/lib/adapters/http.js +4 -4
  57. package/node_modules/axios/lib/core/Axios.js +7 -2
  58. package/node_modules/axios/lib/core/mergeConfig.js +5 -5
  59. package/node_modules/axios/lib/env/data.js +1 -1
  60. package/node_modules/axios/lib/helpers/buildURL.js +7 -1
  61. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  62. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +12 -65
  63. package/node_modules/axios/lib/helpers/validator.js +8 -0
  64. package/node_modules/axios/package.json +3 -3
  65. package/node_modules/fast-xml-parser/CHANGELOG.md +4 -0
  66. package/node_modules/fast-xml-parser/README.md +3 -2
  67. package/node_modules/fast-xml-parser/package.json +1 -1
  68. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +21 -17
  69. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +1 -0
  70. package/node_modules/point-in-polygon-hao/README.md +8 -7
  71. package/node_modules/point-in-polygon-hao/dist/cjs/index.cjs +322 -0
  72. package/node_modules/point-in-polygon-hao/dist/esm/index.d.ts +10 -0
  73. package/node_modules/point-in-polygon-hao/dist/esm/index.js +56 -0
  74. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.js +286 -42
  75. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.min.js +1 -1
  76. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/LICENSE +24 -0
  77. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/README.md +82 -0
  78. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/esm/incircle.js +765 -0
  79. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/esm/insphere.js +766 -0
  80. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/esm/orient2d.js +184 -0
  81. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/esm/orient3d.js +462 -0
  82. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/esm/util.js +138 -0
  83. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/index.d.ts +49 -0
  84. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/index.js +5 -0
  85. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/package.json +75 -0
  86. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/incircle.js +908 -0
  87. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/incircle.min.js +1 -0
  88. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/insphere.js +914 -0
  89. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/insphere.min.js +1 -0
  90. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/orient2d.js +280 -0
  91. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/orient2d.min.js +1 -0
  92. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/orient3d.js +601 -0
  93. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/orient3d.min.js +1 -0
  94. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/predicates.js +2328 -0
  95. package/node_modules/point-in-polygon-hao/node_modules/robust-predicates/umd/predicates.min.js +1 -0
  96. package/node_modules/point-in-polygon-hao/package.json +24 -20
  97. package/node_modules/tslib/modules/index.d.ts +1 -0
  98. package/node_modules/tslib/modules/index.js +2 -0
  99. package/node_modules/tslib/package.json +1 -1
  100. package/node_modules/tslib/tslib.d.ts +7 -0
  101. package/node_modules/tslib/tslib.es6.js +24 -1
  102. package/node_modules/tslib/tslib.es6.mjs +24 -1
  103. package/node_modules/tslib/tslib.js +56 -1
  104. package/node_modules/undici-types/eventsource.d.ts +0 -2
  105. package/node_modules/undici-types/filereader.d.ts +1 -1
  106. package/node_modules/undici-types/interceptors.d.ts +3 -1
  107. package/node_modules/undici-types/package.json +1 -1
  108. package/node_modules/undici-types/patch.d.ts +0 -38
  109. package/node_modules/undici-types/websocket.d.ts +0 -2
  110. package/node_modules/uuid/CHANGELOG.md +45 -2
  111. package/node_modules/uuid/README.md +71 -158
  112. package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
  113. package/node_modules/uuid/dist/cjs/index.js +31 -0
  114. package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
  115. package/node_modules/uuid/dist/cjs/max.js +3 -0
  116. package/node_modules/uuid/dist/cjs/md5.d.ts +2 -0
  117. package/node_modules/uuid/dist/cjs/md5.js +13 -0
  118. package/node_modules/uuid/dist/cjs/native.d.ts +5 -0
  119. package/node_modules/uuid/dist/cjs/native.js +4 -0
  120. package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
  121. package/node_modules/uuid/dist/cjs/nil.js +3 -0
  122. package/node_modules/uuid/dist/cjs/package.json +1 -0
  123. package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
  124. package/node_modules/uuid/dist/cjs/parse.js +11 -0
  125. package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
  126. package/node_modules/uuid/dist/cjs/regex.js +3 -0
  127. package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
  128. package/node_modules/uuid/dist/cjs/rng.js +13 -0
  129. package/node_modules/uuid/dist/cjs/sha1.d.ts +2 -0
  130. package/node_modules/uuid/dist/cjs/sha1.js +13 -0
  131. package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
  132. package/node_modules/uuid/dist/cjs/stringify.js +38 -0
  133. package/node_modules/uuid/dist/cjs/test/parse.test.d.ts +1 -0
  134. package/node_modules/uuid/dist/cjs/test/parse.test.js +50 -0
  135. package/node_modules/uuid/dist/cjs/test/rng.test.d.ts +1 -0
  136. package/node_modules/uuid/dist/cjs/test/rng.test.js +14 -0
  137. package/node_modules/uuid/dist/cjs/test/stringify.test.d.ts +1 -0
  138. package/node_modules/uuid/dist/cjs/test/stringify.test.js +23 -0
  139. package/node_modules/uuid/dist/cjs/test/test_constants.d.ts +33 -0
  140. package/node_modules/uuid/dist/cjs/test/test_constants.js +91 -0
  141. package/node_modules/uuid/dist/cjs/test/v1.test.d.ts +1 -0
  142. package/node_modules/uuid/dist/cjs/test/v1.test.js +127 -0
  143. package/node_modules/uuid/dist/cjs/test/v35.test.d.ts +1 -0
  144. package/node_modules/uuid/dist/cjs/test/v35.test.js +143 -0
  145. package/node_modules/uuid/dist/cjs/test/v4.test.d.ts +1 -0
  146. package/node_modules/uuid/dist/cjs/test/v4.test.js +60 -0
  147. package/node_modules/uuid/dist/cjs/test/v6.test.d.ts +1 -0
  148. package/node_modules/uuid/dist/cjs/test/v6.test.js +56 -0
  149. package/node_modules/uuid/dist/cjs/test/v7.test.d.ts +1 -0
  150. package/node_modules/uuid/dist/cjs/test/v7.test.js +194 -0
  151. package/node_modules/uuid/dist/cjs/test/validate.test.d.ts +1 -0
  152. package/node_modules/uuid/dist/cjs/test/validate.test.js +13 -0
  153. package/node_modules/uuid/dist/cjs/test/version.test.d.ts +1 -0
  154. package/node_modules/uuid/dist/cjs/test/version.test.js +20 -0
  155. package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
  156. package/node_modules/uuid/dist/cjs/types.js +2 -0
  157. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
  158. package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
  159. package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
  160. package/node_modules/uuid/dist/cjs/v1.js +78 -0
  161. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
  162. package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  163. package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
  164. package/node_modules/uuid/dist/cjs/v3.js +14 -0
  165. package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
  166. package/node_modules/uuid/dist/cjs/v35.js +41 -0
  167. package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
  168. package/node_modules/uuid/dist/cjs/v4.js +23 -0
  169. package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
  170. package/node_modules/uuid/dist/cjs/v5.js +14 -0
  171. package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
  172. package/node_modules/uuid/dist/cjs/v6.js +19 -0
  173. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
  174. package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  175. package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
  176. package/node_modules/uuid/dist/cjs/v7.js +60 -0
  177. package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
  178. package/node_modules/uuid/dist/cjs/validate.js +7 -0
  179. package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
  180. package/node_modules/uuid/dist/cjs/version.js +10 -0
  181. package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
  182. package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
  183. package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
  184. package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
  185. package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
  186. package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
  187. package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
  188. package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
  189. package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
  190. package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
  191. package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
  192. package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
  193. package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
  194. package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
  195. package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
  196. package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
  197. package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
  198. package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
  199. package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
  200. package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
  201. package/node_modules/uuid/dist/cjs-browser/stringify.js +38 -0
  202. package/node_modules/uuid/dist/cjs-browser/test/parse.test.d.ts +1 -0
  203. package/node_modules/uuid/dist/cjs-browser/test/parse.test.js +50 -0
  204. package/node_modules/uuid/dist/cjs-browser/test/rng.test.d.ts +1 -0
  205. package/node_modules/uuid/dist/cjs-browser/test/rng.test.js +14 -0
  206. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.d.ts +1 -0
  207. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.js +23 -0
  208. package/node_modules/uuid/dist/cjs-browser/test/test_constants.d.ts +33 -0
  209. package/node_modules/uuid/dist/cjs-browser/test/test_constants.js +91 -0
  210. package/node_modules/uuid/dist/cjs-browser/test/v1.test.d.ts +1 -0
  211. package/node_modules/uuid/dist/cjs-browser/test/v1.test.js +127 -0
  212. package/node_modules/uuid/dist/cjs-browser/test/v35.test.d.ts +1 -0
  213. package/node_modules/uuid/dist/cjs-browser/test/v35.test.js +143 -0
  214. package/node_modules/uuid/dist/cjs-browser/test/v4.test.d.ts +1 -0
  215. package/node_modules/uuid/dist/cjs-browser/test/v4.test.js +60 -0
  216. package/node_modules/uuid/dist/cjs-browser/test/v6.test.d.ts +1 -0
  217. package/node_modules/uuid/dist/cjs-browser/test/v6.test.js +56 -0
  218. package/node_modules/uuid/dist/cjs-browser/test/v7.test.d.ts +1 -0
  219. package/node_modules/uuid/dist/cjs-browser/test/v7.test.js +194 -0
  220. package/node_modules/uuid/dist/cjs-browser/test/validate.test.d.ts +1 -0
  221. package/node_modules/uuid/dist/cjs-browser/test/validate.test.js +13 -0
  222. package/node_modules/uuid/dist/cjs-browser/test/version.test.d.ts +1 -0
  223. package/node_modules/uuid/dist/cjs-browser/test/version.test.js +20 -0
  224. package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
  225. package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
  226. package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
  227. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
  228. package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
  229. package/node_modules/uuid/dist/cjs-browser/v1.js +78 -0
  230. package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
  231. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
  232. package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
  233. package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
  234. package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
  235. package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
  236. package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
  237. package/node_modules/uuid/dist/cjs-browser/v4.js +23 -0
  238. package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
  239. package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
  240. package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
  241. package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
  242. package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
  243. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
  244. package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
  245. package/node_modules/uuid/dist/cjs-browser/v7.js +60 -0
  246. package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
  247. package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
  248. package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
  249. package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
  250. package/node_modules/uuid/dist/esm/bin/uuid +2 -0
  251. package/node_modules/uuid/dist/esm/index.d.ts +15 -0
  252. package/node_modules/uuid/dist/{esm-node → esm}/index.js +1 -1
  253. package/node_modules/uuid/dist/esm/max.d.ts +2 -0
  254. package/node_modules/uuid/dist/esm/max.js +1 -0
  255. package/node_modules/uuid/dist/esm/md5.d.ts +2 -0
  256. package/node_modules/uuid/dist/esm/md5.js +11 -0
  257. package/node_modules/uuid/dist/esm/native.d.ts +5 -0
  258. package/node_modules/uuid/dist/esm/native.js +2 -0
  259. package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
  260. package/node_modules/uuid/dist/esm/nil.js +1 -0
  261. package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
  262. package/node_modules/uuid/dist/esm/parse.js +9 -0
  263. package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
  264. package/node_modules/uuid/dist/{esm-node → esm}/regex.js +1 -1
  265. package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
  266. package/node_modules/uuid/dist/esm/rng.js +10 -0
  267. package/node_modules/uuid/dist/esm/sha1.d.ts +2 -0
  268. package/node_modules/uuid/dist/esm/sha1.js +11 -0
  269. package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
  270. package/node_modules/uuid/dist/esm/stringify.js +35 -0
  271. package/node_modules/uuid/dist/esm/test/parse.test.d.ts +1 -0
  272. package/node_modules/uuid/dist/esm/test/parse.test.js +48 -0
  273. package/node_modules/uuid/dist/esm/test/rng.test.d.ts +1 -0
  274. package/node_modules/uuid/dist/esm/test/rng.test.js +12 -0
  275. package/node_modules/uuid/dist/esm/test/stringify.test.d.ts +1 -0
  276. package/node_modules/uuid/dist/esm/test/stringify.test.js +21 -0
  277. package/node_modules/uuid/dist/esm/test/test_constants.d.ts +33 -0
  278. package/node_modules/uuid/dist/esm/test/test_constants.js +88 -0
  279. package/node_modules/uuid/dist/esm/test/v1.test.d.ts +1 -0
  280. package/node_modules/uuid/dist/esm/test/v1.test.js +125 -0
  281. package/node_modules/uuid/dist/esm/test/v35.test.d.ts +1 -0
  282. package/node_modules/uuid/dist/esm/test/v35.test.js +141 -0
  283. package/node_modules/uuid/dist/esm/test/v4.test.d.ts +1 -0
  284. package/node_modules/uuid/dist/esm/test/v4.test.js +58 -0
  285. package/node_modules/uuid/dist/esm/test/v6.test.d.ts +1 -0
  286. package/node_modules/uuid/dist/esm/test/v6.test.js +54 -0
  287. package/node_modules/uuid/dist/esm/test/v7.test.d.ts +1 -0
  288. package/node_modules/uuid/dist/esm/test/v7.test.js +192 -0
  289. package/node_modules/uuid/dist/esm/test/validate.test.d.ts +1 -0
  290. package/node_modules/uuid/dist/esm/test/validate.test.js +11 -0
  291. package/node_modules/uuid/dist/esm/test/version.test.d.ts +1 -0
  292. package/node_modules/uuid/dist/esm/test/version.test.js +18 -0
  293. package/node_modules/uuid/dist/esm/types.d.ts +21 -0
  294. package/node_modules/uuid/dist/esm/types.js +1 -0
  295. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
  296. package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
  297. package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
  298. package/node_modules/uuid/dist/esm/v1.js +75 -0
  299. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
  300. package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
  301. package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
  302. package/node_modules/uuid/dist/esm/v3.js +9 -0
  303. package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
  304. package/node_modules/uuid/dist/esm/v35.js +36 -0
  305. package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
  306. package/node_modules/uuid/dist/esm/v4.js +21 -0
  307. package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
  308. package/node_modules/uuid/dist/esm/v5.js +9 -0
  309. package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
  310. package/node_modules/uuid/dist/esm/v6.js +17 -0
  311. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
  312. package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
  313. package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
  314. package/node_modules/uuid/dist/esm/v7.js +57 -0
  315. package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
  316. package/node_modules/uuid/dist/esm/validate.js +5 -0
  317. package/node_modules/uuid/dist/esm/version.d.ts +2 -0
  318. package/node_modules/uuid/dist/esm/version.js +8 -0
  319. package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
  320. package/node_modules/uuid/dist/esm-browser/index.js +1 -1
  321. package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
  322. package/node_modules/uuid/dist/esm-browser/max.js +1 -1
  323. package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
  324. package/node_modules/uuid/dist/esm-browser/md5.js +113 -172
  325. package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
  326. package/node_modules/uuid/dist/esm-browser/native.js +2 -4
  327. package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
  328. package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
  329. package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
  330. package/node_modules/uuid/dist/esm-browser/parse.js +6 -34
  331. package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
  332. package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  333. package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
  334. package/node_modules/uuid/dist/esm-browser/rng.js +8 -14
  335. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
  336. package/node_modules/uuid/dist/esm-browser/sha1.js +62 -68
  337. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
  338. package/node_modules/uuid/dist/esm-browser/stringify.js +29 -25
  339. package/node_modules/uuid/dist/esm-browser/test/parse.test.d.ts +1 -0
  340. package/node_modules/uuid/dist/esm-browser/test/parse.test.js +48 -0
  341. package/node_modules/uuid/dist/esm-browser/test/rng.test.d.ts +1 -0
  342. package/node_modules/uuid/dist/esm-browser/test/rng.test.js +12 -0
  343. package/node_modules/uuid/dist/esm-browser/test/stringify.test.d.ts +1 -0
  344. package/node_modules/uuid/dist/esm-browser/test/stringify.test.js +21 -0
  345. package/node_modules/uuid/dist/esm-browser/test/test_constants.d.ts +33 -0
  346. package/node_modules/uuid/dist/esm-browser/test/test_constants.js +88 -0
  347. package/node_modules/uuid/dist/esm-browser/test/v1.test.d.ts +1 -0
  348. package/node_modules/uuid/dist/esm-browser/test/v1.test.js +125 -0
  349. package/node_modules/uuid/dist/esm-browser/test/v35.test.d.ts +1 -0
  350. package/node_modules/uuid/dist/esm-browser/test/v35.test.js +141 -0
  351. package/node_modules/uuid/dist/esm-browser/test/v4.test.d.ts +1 -0
  352. package/node_modules/uuid/dist/esm-browser/test/v4.test.js +58 -0
  353. package/node_modules/uuid/dist/esm-browser/test/v6.test.d.ts +1 -0
  354. package/node_modules/uuid/dist/esm-browser/test/v6.test.js +54 -0
  355. package/node_modules/uuid/dist/esm-browser/test/v7.test.d.ts +1 -0
  356. package/node_modules/uuid/dist/esm-browser/test/v7.test.js +192 -0
  357. package/node_modules/uuid/dist/esm-browser/test/validate.test.d.ts +1 -0
  358. package/node_modules/uuid/dist/esm-browser/test/validate.test.js +11 -0
  359. package/node_modules/uuid/dist/esm-browser/test/version.test.d.ts +1 -0
  360. package/node_modules/uuid/dist/esm-browser/test/version.test.js +18 -0
  361. package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
  362. package/node_modules/uuid/dist/esm-browser/types.js +1 -0
  363. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
  364. package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
  365. package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
  366. package/node_modules/uuid/dist/esm-browser/v1.js +67 -117
  367. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
  368. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +6 -16
  369. package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
  370. package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
  371. package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
  372. package/node_modules/uuid/dist/esm-browser/v35.js +28 -47
  373. package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
  374. package/node_modules/uuid/dist/esm-browser/v4.js +15 -19
  375. package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
  376. package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
  377. package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
  378. package/node_modules/uuid/dist/esm-browser/v6.js +13 -32
  379. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
  380. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +5 -15
  381. package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
  382. package/node_modules/uuid/dist/esm-browser/v7.js +50 -139
  383. package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
  384. package/node_modules/uuid/dist/esm-browser/validate.js +2 -2
  385. package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
  386. package/node_modules/uuid/dist/esm-browser/version.js +5 -5
  387. package/node_modules/uuid/package.json +58 -66
  388. package/package.json +4 -4
  389. package/tak-registration.js +1 -4
  390. package/node_modules/@types/node/globals.global.d.ts +0 -1
  391. package/node_modules/point-in-polygon-hao/.eslintrc +0 -10
  392. package/node_modules/point-in-polygon-hao/CHANGES.md +0 -8
  393. package/node_modules/point-in-polygon-hao/FUNDING.yml +0 -2
  394. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs +0 -76
  395. package/node_modules/point-in-polygon-hao/rollup.config.js +0 -19
  396. package/node_modules/point-in-polygon-hao/src/index.js +0 -74
  397. package/node_modules/uuid/dist/bin/uuid +0 -2
  398. package/node_modules/uuid/dist/commonjs-browser/index.js +0 -104
  399. package/node_modules/uuid/dist/commonjs-browser/max.js +0 -7
  400. package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -200
  401. package/node_modules/uuid/dist/commonjs-browser/native.js +0 -10
  402. package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -7
  403. package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -44
  404. package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -7
  405. package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -23
  406. package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -82
  407. package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -38
  408. package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -131
  409. package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +0 -26
  410. package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -11
  411. package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -63
  412. package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -32
  413. package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -11
  414. package/node_modules/uuid/dist/commonjs-browser/v6.js +0 -42
  415. package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +0 -26
  416. package/node_modules/uuid/dist/commonjs-browser/v7.js +0 -152
  417. package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -12
  418. package/node_modules/uuid/dist/commonjs-browser/version.js +0 -15
  419. package/node_modules/uuid/dist/esm-node/max.js +0 -1
  420. package/node_modules/uuid/dist/esm-node/md5.js +0 -10
  421. package/node_modules/uuid/dist/esm-node/native.js +0 -4
  422. package/node_modules/uuid/dist/esm-node/nil.js +0 -1
  423. package/node_modules/uuid/dist/esm-node/parse.js +0 -37
  424. package/node_modules/uuid/dist/esm-node/rng.js +0 -10
  425. package/node_modules/uuid/dist/esm-node/sha1.js +0 -10
  426. package/node_modules/uuid/dist/esm-node/stringify.js +0 -31
  427. package/node_modules/uuid/dist/esm-node/v1.js +0 -125
  428. package/node_modules/uuid/dist/esm-node/v1ToV6.js +0 -20
  429. package/node_modules/uuid/dist/esm-node/v3.js +0 -4
  430. package/node_modules/uuid/dist/esm-node/v35.js +0 -55
  431. package/node_modules/uuid/dist/esm-node/v4.js +0 -25
  432. package/node_modules/uuid/dist/esm-node/v5.js +0 -4
  433. package/node_modules/uuid/dist/esm-node/v6.js +0 -32
  434. package/node_modules/uuid/dist/esm-node/v6ToV1.js +0 -20
  435. package/node_modules/uuid/dist/esm-node/v7.js +0 -146
  436. package/node_modules/uuid/dist/esm-node/validate.js +0 -5
  437. package/node_modules/uuid/dist/esm-node/version.js +0 -8
  438. package/node_modules/uuid/dist/index.js +0 -104
  439. package/node_modules/uuid/dist/max.js +0 -7
  440. package/node_modules/uuid/dist/md5-browser.js +0 -200
  441. package/node_modules/uuid/dist/md5.js +0 -17
  442. package/node_modules/uuid/dist/native-browser.js +0 -10
  443. package/node_modules/uuid/dist/native.js +0 -11
  444. package/node_modules/uuid/dist/nil.js +0 -7
  445. package/node_modules/uuid/dist/parse.js +0 -44
  446. package/node_modules/uuid/dist/regex.js +0 -7
  447. package/node_modules/uuid/dist/rng-browser.js +0 -23
  448. package/node_modules/uuid/dist/rng.js +0 -17
  449. package/node_modules/uuid/dist/sha1-browser.js +0 -82
  450. package/node_modules/uuid/dist/sha1.js +0 -17
  451. package/node_modules/uuid/dist/stringify.js +0 -38
  452. package/node_modules/uuid/dist/uuid-bin.js +0 -75
  453. package/node_modules/uuid/dist/v1.js +0 -131
  454. package/node_modules/uuid/dist/v1ToV6.js +0 -26
  455. package/node_modules/uuid/dist/v3.js +0 -11
  456. package/node_modules/uuid/dist/v35.js +0 -63
  457. package/node_modules/uuid/dist/v4.js +0 -32
  458. package/node_modules/uuid/dist/v5.js +0 -11
  459. package/node_modules/uuid/dist/v6.js +0 -38
  460. package/node_modules/uuid/dist/v6ToV1.js +0 -26
  461. package/node_modules/uuid/dist/v7.js +0 -152
  462. package/node_modules/uuid/dist/validate.js +0 -12
  463. package/node_modules/uuid/dist/version.js +0 -15
  464. package/node_modules/uuid/wrapper.mjs +0 -15
  465. /package/node_modules/point-in-polygon-hao/{index.d.ts → dist/cjs/index.d.cts} +0 -0
@@ -0,0 +1,125 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import parse from '../parse.js';
4
+ import v1, { updateV1State } from '../v1.js';
5
+ const TIME = 1321644961388;
6
+ const RFC_V1 = 'c232ab00-9414-11ec-b3c8-9f68deced846';
7
+ const RFC_V1_BYTES = parse(RFC_V1);
8
+ const RFC_OPTIONS = {
9
+ msecs: 0x17f22e279b0,
10
+ nsecs: 0,
11
+ clockseq: 0x33c8,
12
+ node: Uint8Array.of(0x9f, 0x68, 0xde, 0xce, 0xd8, 0x46),
13
+ };
14
+ const RFC_RANDOM = Uint8Array.of(0, 0, 0, 0, 0, 0, 0, 0, RFC_OPTIONS.clockseq >> 8, RFC_OPTIONS.clockseq & 0xff, ...RFC_OPTIONS.node);
15
+ function compareV1TimeField(a, b) {
16
+ a = a.split('-').slice(0, 3).reverse().join('');
17
+ b = b.split('-').slice(0, 3).reverse().join('');
18
+ return a < b ? -1 : a > b ? 1 : 0;
19
+ }
20
+ describe('v1', () => {
21
+ test('v1 sort order (default)', () => {
22
+ const ids = [v1(), v1(), v1(), v1(), v1()];
23
+ const sorted = [...ids].sort(compareV1TimeField);
24
+ assert.deepEqual(ids, sorted);
25
+ });
26
+ test('v1 sort order (time option)', () => {
27
+ const ids = [
28
+ v1({ msecs: TIME - 10 * 3600 * 1000 }),
29
+ v1({ msecs: TIME - 1 }),
30
+ v1({ msecs: TIME }),
31
+ v1({ msecs: TIME + 1 }),
32
+ v1({ msecs: TIME + 28 * 24 * 3600 * 1000 }),
33
+ ];
34
+ const sorted = [...ids].sort(compareV1TimeField);
35
+ assert.deepEqual(ids, sorted);
36
+ });
37
+ test('v1(options)', () => {
38
+ assert.equal(v1({ msecs: RFC_OPTIONS.msecs, random: RFC_RANDOM }), RFC_V1, 'minimal options');
39
+ assert.equal(v1(RFC_OPTIONS), RFC_V1, 'full options');
40
+ });
41
+ test('v1(options) equality', () => {
42
+ assert.notEqual(v1({ msecs: TIME }), v1({ msecs: TIME }), 'UUIDs with minimal options differ');
43
+ assert.equal(v1(RFC_OPTIONS), v1(RFC_OPTIONS), 'UUIDs with full options are identical');
44
+ });
45
+ test('fills one UUID into a buffer as expected', () => {
46
+ const buffer = new Uint8Array(16);
47
+ const result = v1(RFC_OPTIONS, buffer);
48
+ assert.deepEqual(buffer, RFC_V1_BYTES);
49
+ assert.strictEqual(buffer, result);
50
+ });
51
+ test('fills two UUIDs into a buffer as expected', () => {
52
+ const buffer = new Uint8Array(32);
53
+ v1(RFC_OPTIONS, buffer, 0);
54
+ v1(RFC_OPTIONS, buffer, 16);
55
+ const expectedBuf = new Uint8Array(32);
56
+ expectedBuf.set(RFC_V1_BYTES);
57
+ expectedBuf.set(RFC_V1_BYTES, 16);
58
+ assert.deepEqual(buffer, expectedBuf);
59
+ });
60
+ test('v1() state transitions', () => {
61
+ const PRE_STATE = {
62
+ msecs: 10,
63
+ nsecs: 20,
64
+ clockseq: 0x1234,
65
+ node: Uint8Array.of(0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc),
66
+ };
67
+ const tests = [
68
+ {
69
+ title: 'initial state',
70
+ state: {},
71
+ now: 10,
72
+ expected: {
73
+ msecs: 10,
74
+ nsecs: 0,
75
+ clockseq: RFC_OPTIONS.clockseq,
76
+ node: RFC_OPTIONS.node,
77
+ },
78
+ },
79
+ {
80
+ title: 'same time interval',
81
+ state: { ...PRE_STATE },
82
+ now: PRE_STATE.msecs,
83
+ expected: {
84
+ ...PRE_STATE,
85
+ nsecs: 21,
86
+ },
87
+ },
88
+ {
89
+ title: 'new time interval',
90
+ state: { ...PRE_STATE },
91
+ now: PRE_STATE.msecs + 1,
92
+ expected: {
93
+ ...PRE_STATE,
94
+ msecs: PRE_STATE.msecs + 1,
95
+ nsecs: 0,
96
+ },
97
+ },
98
+ {
99
+ title: 'same time interval (nsecs overflow)',
100
+ state: { ...PRE_STATE, nsecs: 9999 },
101
+ now: PRE_STATE.msecs,
102
+ expected: {
103
+ ...PRE_STATE,
104
+ nsecs: 0,
105
+ clockseq: RFC_OPTIONS.clockseq,
106
+ node: RFC_OPTIONS.node,
107
+ },
108
+ },
109
+ {
110
+ title: 'time regression',
111
+ state: { ...PRE_STATE },
112
+ now: PRE_STATE.msecs - 1,
113
+ expected: {
114
+ ...PRE_STATE,
115
+ msecs: PRE_STATE.msecs - 1,
116
+ clockseq: RFC_OPTIONS.clockseq,
117
+ node: RFC_OPTIONS.node,
118
+ },
119
+ },
120
+ ];
121
+ for (const { title, state, now, expected } of tests) {
122
+ assert.deepStrictEqual(updateV1State(state, now, RFC_RANDOM), expected, `Failed: ${title}`);
123
+ }
124
+ });
125
+ });
@@ -0,0 +1,141 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import md5 from '../md5.js';
4
+ import sha1 from '../sha1.js';
5
+ import v3 from '../v3.js';
6
+ import { stringToBytes } from '../v35.js';
7
+ import v5 from '../v5.js';
8
+ describe('v35', () => {
9
+ const HASH_SAMPLES = [
10
+ {
11
+ input: stringToBytes(''),
12
+ sha1: 'da39a3ee5e6b4b0d3255bfef95601890afd80709',
13
+ md5: 'd41d8cd98f00b204e9800998ecf8427e',
14
+ },
15
+ {
16
+ input: stringToBytes('\t\b\f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u00A1\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7\u00A8\u00A9\u00AA\u00AB\u00AC\u00AE\u00AF\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B6\u00B7\u00B8\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D7\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F7\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF'),
17
+ sha1: 'ca4a426a3d536f14cfd79011e79e10d64de950a0',
18
+ md5: 'e8098ec21950f841731d28749129d3ee',
19
+ },
20
+ {
21
+ input: stringToBytes('\u00A5\u0104\u018F\u0256\u02B1o\u0315\u038E\u0409\u0500\u0531\u05E1\u05B6\u0920\u0903\u09A4\u0983\u0A20\u0A02\u0AA0\u0A83\u0B06\u0C05\u0C03\u1401\u16A0'),
22
+ sha1: 'f2753ebc390e5f637e333c2a4179644a93ae9f65',
23
+ md5: '231b309e277b6be8bb3d6c688b7f098b',
24
+ },
25
+ ];
26
+ function hashToHex(hash) {
27
+ const chars = new Array(hash.length);
28
+ for (let i = 0; i < hash.length; i++) {
29
+ chars[i] = hash[i].toString(16).padStart(2, '0');
30
+ }
31
+ return chars.join('');
32
+ }
33
+ HASH_SAMPLES.forEach(function (sample, i) {
34
+ test(`sha1(node) HASH_SAMPLES[${i}]`, () => {
35
+ assert.equal(hashToHex(sha1(sample.input)), sample.sha1);
36
+ });
37
+ });
38
+ HASH_SAMPLES.forEach(function (sample, i) {
39
+ test(`md5(node) HASH_SAMPLES[${i}]`, () => {
40
+ assert.equal(hashToHex(md5(sample.input)), sample.md5);
41
+ });
42
+ });
43
+ test('v3', () => {
44
+ assert.strictEqual(v3('hello.example.com', v3.DNS), '9125a8dc-52ee-365b-a5aa-81b0b3681cf6');
45
+ assert.strictEqual(v3('http://example.com/hello', v3.URL), 'c6235813-3ba4-3801-ae84-e0a6ebb7d138');
46
+ assert.strictEqual(v3('hello', '0f5abcd1-c194-47f3-905b-2df7263a084b'), 'a981a0c2-68b1-35dc-bcfc-296e52ab01ec');
47
+ });
48
+ test('v3 namespace.toUpperCase', () => {
49
+ assert.strictEqual(v3('hello.example.com', v3.DNS.toUpperCase()), '9125a8dc-52ee-365b-a5aa-81b0b3681cf6');
50
+ assert.strictEqual(v3('http://example.com/hello', v3.URL.toUpperCase()), 'c6235813-3ba4-3801-ae84-e0a6ebb7d138');
51
+ assert.strictEqual(v3('hello', '0f5abcd1-c194-47f3-905b-2df7263a084b'.toUpperCase()), 'a981a0c2-68b1-35dc-bcfc-296e52ab01ec');
52
+ });
53
+ test('v3 namespace string validation', () => {
54
+ assert.throws(() => {
55
+ v3('hello.example.com', 'zyxwvuts-rqpo-nmlk-jihg-fedcba000000');
56
+ });
57
+ assert.throws(() => {
58
+ v3('hello.example.com', 'invalid uuid value');
59
+ });
60
+ assert.ok(v3('hello.example.com', '00000000-0000-0000-0000-000000000000'));
61
+ });
62
+ test('v3 namespace buffer validation', () => {
63
+ assert.throws(() => {
64
+ v3('hello.example.com', new Uint8Array(15));
65
+ });
66
+ assert.throws(() => {
67
+ v3('hello.example.com', new Uint8Array(17));
68
+ });
69
+ assert.ok(v3('hello.example.com', new Uint8Array(16).fill(0)));
70
+ });
71
+ test('v3 fill buffer', () => {
72
+ let buf = new Uint8Array(16);
73
+ const expectedUuid = Uint8Array.of(0x91, 0x25, 0xa8, 0xdc, 0x52, 0xee, 0x36, 0x5b, 0xa5, 0xaa, 0x81, 0xb0, 0xb3, 0x68, 0x1c, 0xf6);
74
+ const result = v3('hello.example.com', v3.DNS, buf);
75
+ assert.deepEqual(buf, expectedUuid);
76
+ assert.strictEqual(result, buf);
77
+ buf = new Uint8Array(19).fill(0xaa);
78
+ const expectedBuf = new Uint8Array(19).fill(0xaa);
79
+ expectedBuf.set(expectedUuid, 3);
80
+ v3('hello.example.com', v3.DNS, buf, 3);
81
+ assert.deepEqual(buf, expectedBuf);
82
+ });
83
+ test('v3 undefined/null', () => {
84
+ assert.throws(() => v3());
85
+ assert.throws(() => v3('hello'));
86
+ assert.throws(() => v3('hello.example.com', undefined));
87
+ assert.throws(() => v3('hello.example.com', null, new Uint8Array(16)));
88
+ });
89
+ test('v5', () => {
90
+ assert.strictEqual(v5('hello.example.com', v5.DNS), 'fdda765f-fc57-5604-a269-52a7df8164ec');
91
+ assert.strictEqual(v5('http://example.com/hello', v5.URL), '3bbcee75-cecc-5b56-8031-b6641c1ed1f1');
92
+ assert.strictEqual(v5('hello', '0f5abcd1-c194-47f3-905b-2df7263a084b'), '90123e1c-7512-523e-bb28-76fab9f2f73d');
93
+ });
94
+ test('v5 namespace.toUpperCase', () => {
95
+ assert.strictEqual(v5('hello.example.com', v5.DNS.toUpperCase()), 'fdda765f-fc57-5604-a269-52a7df8164ec');
96
+ assert.strictEqual(v5('http://example.com/hello', v5.URL.toUpperCase()), '3bbcee75-cecc-5b56-8031-b6641c1ed1f1');
97
+ assert.strictEqual(v5('hello', '0f5abcd1-c194-47f3-905b-2df7263a084b'.toUpperCase()), '90123e1c-7512-523e-bb28-76fab9f2f73d');
98
+ });
99
+ test('v5 namespace string validation', () => {
100
+ assert.throws(() => {
101
+ v5('hello.example.com', 'zyxwvuts-rqpo-nmlk-jihg-fedcba000000');
102
+ });
103
+ assert.throws(() => {
104
+ v5('hello.example.com', 'invalid uuid value');
105
+ });
106
+ assert.ok(v5('hello.example.com', '00000000-0000-0000-0000-000000000000'));
107
+ });
108
+ test('v5 namespace buffer validation', () => {
109
+ assert.throws(() => {
110
+ v5('hello.example.com', new Uint8Array(15));
111
+ });
112
+ assert.throws(() => {
113
+ v5('hello.example.com', new Uint8Array(17));
114
+ });
115
+ assert.ok(v5('hello.example.com', new Uint8Array(16).fill(0)));
116
+ });
117
+ test('v5 fill buffer', () => {
118
+ let buf = new Uint8Array(16);
119
+ const expectedUuid = Uint8Array.of(0xfd, 0xda, 0x76, 0x5f, 0xfc, 0x57, 0x56, 0x04, 0xa2, 0x69, 0x52, 0xa7, 0xdf, 0x81, 0x64, 0xec);
120
+ const result = v5('hello.example.com', v5.DNS, buf);
121
+ assert.deepEqual(buf, expectedUuid);
122
+ assert.strictEqual(result, buf);
123
+ buf = new Uint8Array(19).fill(0xaa);
124
+ const expectedBuf = new Uint8Array(19).fill(0xaa);
125
+ expectedBuf.set(expectedUuid, 3);
126
+ v5('hello.example.com', v5.DNS, buf, 3);
127
+ assert.deepEqual(buf, expectedBuf);
128
+ });
129
+ test('v5 undefined/null', () => {
130
+ assert.throws(() => v5());
131
+ assert.throws(() => v5('hello'));
132
+ assert.throws(() => v5('hello.example.com', undefined));
133
+ assert.throws(() => v5('hello.example.com', null, new Uint8Array(16)));
134
+ });
135
+ test('v3/v5 constants', () => {
136
+ assert.strictEqual(v3.DNS, '6ba7b810-9dad-11d1-80b4-00c04fd430c8');
137
+ assert.strictEqual(v3.URL, '6ba7b811-9dad-11d1-80b4-00c04fd430c8');
138
+ assert.strictEqual(v5.DNS, '6ba7b810-9dad-11d1-80b4-00c04fd430c8');
139
+ assert.strictEqual(v5.URL, '6ba7b811-9dad-11d1-80b4-00c04fd430c8');
140
+ });
141
+ });
@@ -0,0 +1,58 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import native from '../native.js';
4
+ import v4 from '../v4.js';
5
+ const randomBytesFixture = Uint8Array.of(0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36);
6
+ const expectedBytes = Uint8Array.of(16, 145, 86, 190, 196, 251, 65, 234, 177, 180, 239, 225, 103, 28, 88, 54);
7
+ describe('v4', () => {
8
+ test('subsequent UUIDs are different', () => {
9
+ const id1 = v4();
10
+ const id2 = v4();
11
+ assert.ok(id1 !== id2);
12
+ });
13
+ test('should uses native randomUUID() if no option is passed', async () => {
14
+ const mock = (await import('node:test')).default.mock;
15
+ if (!mock) {
16
+ return;
17
+ }
18
+ const mockRandomUUID = mock.method(native, 'randomUUID');
19
+ assert.equal(mockRandomUUID.mock.callCount(), 0);
20
+ v4();
21
+ assert.equal(mockRandomUUID.mock.callCount(), 1);
22
+ mock.restoreAll();
23
+ });
24
+ test('should not use native randomUUID() if an option is passed', async () => {
25
+ const mock = (await import('node:test')).default.mock;
26
+ if (!mock) {
27
+ return;
28
+ }
29
+ const mockRandomUUID = mock.method(native, 'randomUUID');
30
+ assert.equal(mockRandomUUID.mock.callCount(), 0);
31
+ v4({});
32
+ assert.equal(mockRandomUUID.mock.callCount(), 0);
33
+ mock.restoreAll();
34
+ });
35
+ test('explicit options.random produces expected result', () => {
36
+ const id = v4({ random: randomBytesFixture });
37
+ assert.strictEqual(id, '109156be-c4fb-41ea-b1b4-efe1671c5836');
38
+ });
39
+ test('explicit options.rng produces expected result', () => {
40
+ const id = v4({ rng: () => randomBytesFixture });
41
+ assert.strictEqual(id, '109156be-c4fb-41ea-b1b4-efe1671c5836');
42
+ });
43
+ test('fills one UUID into a buffer as expected', () => {
44
+ const buffer = new Uint8Array(16);
45
+ const result = v4({ random: randomBytesFixture }, buffer);
46
+ assert.deepEqual(buffer, expectedBytes);
47
+ assert.strictEqual(buffer, result);
48
+ });
49
+ test('fills two UUIDs into a buffer as expected', () => {
50
+ const buffer = new Uint8Array(32);
51
+ v4({ random: randomBytesFixture }, buffer, 0);
52
+ v4({ random: randomBytesFixture }, buffer, 16);
53
+ const expectedBuf = new Uint8Array(32);
54
+ expectedBuf.set(expectedBytes);
55
+ expectedBuf.set(expectedBytes, 16);
56
+ assert.deepEqual(buffer, expectedBuf);
57
+ });
58
+ });
@@ -0,0 +1,54 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import v1ToV6 from '../v1ToV6.js';
4
+ import v6 from '../v6.js';
5
+ import v6ToV1 from '../v6ToV1.js';
6
+ describe('v6', () => {
7
+ const V1_ID = 'f1207660-21d2-11ef-8c4f-419efbd44d48';
8
+ const V6_ID = '1ef21d2f-1207-6660-8c4f-419efbd44d48';
9
+ const fullOptions = {
10
+ msecs: 0x133b891f705,
11
+ nsecs: 0x1538,
12
+ clockseq: 0x385c,
13
+ node: Uint8Array.of(0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10),
14
+ };
15
+ const EXPECTED_BYTES = Uint8Array.of(0x1e, 0x11, 0x22, 0xbd, 0x94, 0x28, 0x68, 0x88, 0xb8, 0x5c, 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10);
16
+ test('default behavior', () => {
17
+ const id = v6();
18
+ assert.ok(/[0-9a-f]{8}-[0-9a-f]{4}-6[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/.test(id), 'id is valid v6 UUID');
19
+ });
20
+ test('default behavior (binary type)', () => {
21
+ const buffer = new Uint8Array(16);
22
+ const result = v6(fullOptions, buffer);
23
+ assert.deepEqual(buffer, EXPECTED_BYTES);
24
+ assert.strictEqual(buffer, result);
25
+ });
26
+ test('all options', () => {
27
+ const id = v6(fullOptions);
28
+ assert.equal(id, '1e1122bd-9428-6888-b85c-61cd3cbb3210');
29
+ });
30
+ test('sort by creation time', () => {
31
+ const ids = [];
32
+ for (let i = 0; i < 5; i++) {
33
+ ids.push(v6({ msecs: i * 1000 }));
34
+ }
35
+ assert.deepEqual(ids, ids.slice().sort());
36
+ });
37
+ test('creating at array offset', () => {
38
+ const buffer = new Uint8Array(32);
39
+ v6(fullOptions, buffer, 0);
40
+ v6(fullOptions, buffer, 16);
41
+ const expectedBuf = new Uint8Array(32);
42
+ expectedBuf.set(EXPECTED_BYTES, 0);
43
+ expectedBuf.set(EXPECTED_BYTES, 16);
44
+ assert.deepEqual(buffer, expectedBuf);
45
+ });
46
+ test('v1 -> v6 conversion', () => {
47
+ const id = v1ToV6(V1_ID);
48
+ assert.equal(id, V6_ID);
49
+ });
50
+ test('v6 -> v1 conversion', () => {
51
+ const id = v6ToV1(V6_ID);
52
+ assert.equal(id, V1_ID);
53
+ });
54
+ });
@@ -0,0 +1,192 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import parse from '../parse.js';
4
+ import stringify from '../stringify.js';
5
+ import v7, { updateV7State } from '../v7.js';
6
+ const RFC_V7 = '017f22e2-79b0-7cc3-98c4-dc0c0c07398f';
7
+ const RFC_V7_BYTES = parse('017f22e2-79b0-7cc3-98c4-dc0c0c07398f');
8
+ const RFC_MSECS = 0x17f22e279b0;
9
+ const RFC_SEQ = (0x0cc3 << 20) | (0x98c4dc >> 2);
10
+ const RFC_RANDOM = Uint8Array.of(0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0x0c, 0xc3, 0x18, 0xc4, 0x6c, 0x0c, 0x0c, 0x07, 0x39, 0x8f);
11
+ describe('v7', () => {
12
+ test('subsequent UUIDs are different', () => {
13
+ const id1 = v7();
14
+ const id2 = v7();
15
+ assert.ok(id1 !== id2);
16
+ });
17
+ test('explicit options.random and options.msecs produces expected result', () => {
18
+ const id = v7({
19
+ random: RFC_RANDOM,
20
+ msecs: RFC_MSECS,
21
+ seq: RFC_SEQ,
22
+ });
23
+ assert.strictEqual(id, RFC_V7);
24
+ });
25
+ test('explicit options.rng produces expected result', () => {
26
+ const id = v7({
27
+ rng: () => RFC_RANDOM,
28
+ msecs: RFC_MSECS,
29
+ seq: RFC_SEQ,
30
+ });
31
+ assert.strictEqual(id, RFC_V7);
32
+ });
33
+ test('explicit options.msecs produces expected result', () => {
34
+ const id = v7({
35
+ msecs: RFC_MSECS,
36
+ });
37
+ assert.strictEqual(id.indexOf('017f22e2'), 0);
38
+ });
39
+ test('fills one UUID into a buffer as expected', () => {
40
+ const buffer = new Uint8Array(16);
41
+ const result = v7({
42
+ random: RFC_RANDOM,
43
+ msecs: RFC_MSECS,
44
+ seq: RFC_SEQ,
45
+ }, buffer);
46
+ stringify(buffer);
47
+ assert.deepEqual(buffer, RFC_V7_BYTES);
48
+ assert.strictEqual(buffer, result);
49
+ });
50
+ test('fills two UUIDs into a buffer as expected', () => {
51
+ const buffer = new Uint8Array(32);
52
+ v7({
53
+ random: RFC_RANDOM,
54
+ msecs: RFC_MSECS,
55
+ seq: RFC_SEQ,
56
+ }, buffer, 0);
57
+ v7({
58
+ random: RFC_RANDOM,
59
+ msecs: RFC_MSECS,
60
+ seq: RFC_SEQ,
61
+ }, buffer, 16);
62
+ const expected = new Uint8Array(32);
63
+ expected.set(RFC_V7_BYTES);
64
+ expected.set(RFC_V7_BYTES, 16);
65
+ assert.deepEqual(buffer, expected);
66
+ });
67
+ test('lexicographical sorting is preserved', () => {
68
+ let id;
69
+ let prior;
70
+ let msecs = RFC_MSECS;
71
+ for (let i = 0; i < 20000; ++i) {
72
+ if (i % 1500 === 0) {
73
+ msecs += 1;
74
+ }
75
+ id = v7({ msecs, seq: i });
76
+ if (prior !== undefined) {
77
+ assert.ok(prior < id, `${prior} < ${id}`);
78
+ }
79
+ prior = id;
80
+ }
81
+ });
82
+ test('can supply seq', () => {
83
+ let seq = 0x12345;
84
+ let uuid = v7({
85
+ msecs: RFC_MSECS,
86
+ seq,
87
+ });
88
+ assert.strictEqual(uuid.substr(0, 25), '017f22e2-79b0-7000-848d-1');
89
+ seq = 0x6fffffff;
90
+ uuid = v7({
91
+ msecs: RFC_MSECS,
92
+ seq,
93
+ });
94
+ assert.strictEqual(uuid.substring(0, 25), '017f22e2-79b0-76ff-bfff-f');
95
+ });
96
+ test('internal seq is reset upon timestamp change', () => {
97
+ v7({
98
+ msecs: RFC_MSECS,
99
+ seq: 0x6fffffff,
100
+ });
101
+ const uuid = v7({
102
+ msecs: RFC_MSECS + 1,
103
+ });
104
+ assert.ok(uuid.indexOf('fff') !== 15);
105
+ });
106
+ test('v7() state transitions', () => {
107
+ const tests = [
108
+ {
109
+ title: 'new time interval',
110
+ state: { msecs: 1, seq: 123 },
111
+ now: 2,
112
+ expected: {
113
+ msecs: 2,
114
+ seq: 0x6c318c4,
115
+ },
116
+ },
117
+ {
118
+ title: 'same time interval',
119
+ state: { msecs: 1, seq: 123 },
120
+ now: 1,
121
+ expected: {
122
+ msecs: 1,
123
+ seq: 124,
124
+ },
125
+ },
126
+ {
127
+ title: 'same time interval (sequence rollover)',
128
+ state: { msecs: 1, seq: 0xffffffff },
129
+ now: 1,
130
+ expected: {
131
+ msecs: 2,
132
+ seq: 0,
133
+ },
134
+ },
135
+ {
136
+ title: 'time regression',
137
+ state: { msecs: 2, seq: 123 },
138
+ now: 1,
139
+ expected: {
140
+ msecs: 2,
141
+ seq: 124,
142
+ },
143
+ },
144
+ {
145
+ title: 'time regression (sequence rollover)',
146
+ state: { msecs: 2, seq: 0xffffffff },
147
+ now: 1,
148
+ expected: {
149
+ msecs: 3,
150
+ seq: 0,
151
+ },
152
+ },
153
+ ];
154
+ for (const { title, state, now, expected } of tests) {
155
+ assert.deepStrictEqual(updateV7State(state, now, RFC_RANDOM), expected, `Failed: ${title}`);
156
+ }
157
+ });
158
+ test('flipping bits changes the result', () => {
159
+ const asBigInt = (buf) => buf.reduce((acc, v) => (acc << 8n) | BigInt(v), 0n);
160
+ const asNumber = (bits, data) => Number(BigInt.asUintN(bits, data));
161
+ const flip = (data, n) => data ^ (1n << BigInt(127 - n));
162
+ const optionsFrom = (data) => {
163
+ const ms = asNumber(48, data >> 80n);
164
+ const hi = asNumber(12, data >> 64n);
165
+ const lo = asNumber(20, data >> 42n);
166
+ const r = BigInt.asUintN(42, data);
167
+ return {
168
+ msecs: ms,
169
+ seq: (hi << 20) | lo,
170
+ random: Uint8Array.from([
171
+ ...Array(10).fill(0),
172
+ ...Array(6)
173
+ .fill(0)
174
+ .map((_, i) => asNumber(8, r >> (BigInt(i) * 8n)))
175
+ .reverse(),
176
+ ]),
177
+ };
178
+ };
179
+ const buf = new Uint8Array(16);
180
+ const data = asBigInt(v7({}, buf));
181
+ const id = stringify(buf);
182
+ const reserved = [48, 49, 50, 51, 64, 65];
183
+ for (let i = 0; i < 128; ++i) {
184
+ if (reserved.includes(i)) {
185
+ continue;
186
+ }
187
+ const flipped = flip(data, i);
188
+ assert.strictEqual(asBigInt(v7(optionsFrom(flipped), buf)).toString(16), flipped.toString(16), `Unequal uuids at bit ${i}`);
189
+ assert.notStrictEqual(stringify(buf), id);
190
+ }
191
+ });
192
+ });
@@ -0,0 +1,11 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import validate from '../validate.js';
4
+ import { TESTS } from './test_constants.js';
5
+ describe('validate()', () => {
6
+ test('TESTS cases', () => {
7
+ for (const { value, expectedValidate } of TESTS) {
8
+ assert.strictEqual(validate(value), expectedValidate, `validate(${value}) should be ${expectedValidate}`);
9
+ }
10
+ });
11
+ });
@@ -0,0 +1,18 @@
1
+ import * as assert from 'assert';
2
+ import test, { describe } from 'node:test';
3
+ import version from '../version.js';
4
+ import { TESTS } from './test_constants.js';
5
+ describe('version()', () => {
6
+ test('TESTS cases', () => {
7
+ for (const { value, expectedValidate, expectedVersion } of TESTS) {
8
+ try {
9
+ const actualVersion = version(value);
10
+ assert.ok(expectedValidate, `version(${value}) should throw`);
11
+ assert.strictEqual(actualVersion, expectedVersion);
12
+ }
13
+ catch {
14
+ assert.ok(!expectedValidate, `version(${value}) threw unexpectedly`);
15
+ }
16
+ }
17
+ });
18
+ });
@@ -0,0 +1,21 @@
1
+ export type UUIDTypes = string | Uint8Array;
2
+ export type Version1Options = {
3
+ node?: Uint8Array;
4
+ clockseq?: number;
5
+ random?: Uint8Array;
6
+ rng?: () => Uint8Array;
7
+ msecs?: number;
8
+ nsecs?: number;
9
+ _v6?: boolean;
10
+ };
11
+ export type Version4Options = {
12
+ random?: Uint8Array;
13
+ rng?: () => Uint8Array;
14
+ };
15
+ export type Version6Options = Version1Options;
16
+ export type Version7Options = {
17
+ random?: Uint8Array;
18
+ msecs?: number;
19
+ seq?: number;
20
+ rng?: () => Uint8Array;
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};