@vielzeug/illusionist 2.3.2 → 26.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 (159) hide show
  1. package/README.md +2 -50
  2. package/dist/_helpers/boolean.cjs +1 -1
  3. package/dist/_helpers/boolean.cjs.map +1 -1
  4. package/dist/_helpers/boolean.d.ts +1 -1
  5. package/dist/_helpers/boolean.d.ts.map +1 -1
  6. package/dist/_helpers/boolean.js +1 -8
  7. package/dist/_helpers/boolean.js.map +1 -1
  8. package/dist/_helpers/float.cjs +1 -1
  9. package/dist/_helpers/float.cjs.map +1 -1
  10. package/dist/_helpers/float.d.ts +1 -1
  11. package/dist/_helpers/float.d.ts.map +1 -1
  12. package/dist/_helpers/float.js +1 -12
  13. package/dist/_helpers/float.js.map +1 -1
  14. package/dist/_helpers/int.cjs +1 -1
  15. package/dist/_helpers/int.cjs.map +1 -1
  16. package/dist/_helpers/int.d.ts +1 -1
  17. package/dist/_helpers/int.d.ts.map +1 -1
  18. package/dist/_helpers/int.js +1 -8
  19. package/dist/_helpers/int.js.map +1 -1
  20. package/dist/_helpers/next-float.d.ts +1 -3
  21. package/dist/_helpers/next-float.d.ts.map +1 -1
  22. package/dist/_helpers/next-float.js +1 -8
  23. package/dist/_helpers/string.cjs +1 -1
  24. package/dist/_helpers/string.cjs.map +1 -1
  25. package/dist/_helpers/string.d.ts +1 -1
  26. package/dist/_helpers/string.d.ts.map +1 -1
  27. package/dist/_helpers/string.js +1 -28
  28. package/dist/_helpers/string.js.map +1 -1
  29. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  30. package/dist/_virtual/_rolldown/runtime.js +1 -11
  31. package/dist/commerce/commerce.cjs +1 -1
  32. package/dist/commerce/commerce.cjs.map +1 -1
  33. package/dist/commerce/commerce.js +1 -50
  34. package/dist/commerce/commerce.js.map +1 -1
  35. package/dist/commerce/data.js +1 -82
  36. package/dist/commerce/data.js.map +1 -1
  37. package/dist/date/date.cjs +1 -1
  38. package/dist/date/date.cjs.map +1 -1
  39. package/dist/date/date.d.ts.map +1 -1
  40. package/dist/date/date.js +1 -92
  41. package/dist/date/date.js.map +1 -1
  42. package/dist/errors.cjs +1 -1
  43. package/dist/errors.cjs.map +1 -1
  44. package/dist/errors.js +1 -9
  45. package/dist/errors.js.map +1 -1
  46. package/dist/factory.cjs +1 -1
  47. package/dist/factory.cjs.map +1 -1
  48. package/dist/factory.d.ts +0 -5
  49. package/dist/factory.d.ts.map +1 -1
  50. package/dist/factory.js +1 -45
  51. package/dist/factory.js.map +1 -1
  52. package/dist/finance/data.js +1 -59
  53. package/dist/finance/data.js.map +1 -1
  54. package/dist/finance/finance.cjs +1 -1
  55. package/dist/finance/finance.cjs.map +1 -1
  56. package/dist/finance/finance.js +1 -89
  57. package/dist/finance/finance.js.map +1 -1
  58. package/dist/illusionist.cjs +3 -3
  59. package/dist/illusionist.cjs.map +1 -1
  60. package/dist/illusionist.iife.js +3 -3
  61. package/dist/illusionist.iife.js.map +1 -1
  62. package/dist/illusionist.js +3 -3
  63. package/dist/illusionist.js.map +1 -1
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.js +1 -12
  66. package/dist/internet/data.js +1 -83
  67. package/dist/internet/data.js.map +1 -1
  68. package/dist/internet/internet.cjs +1 -1
  69. package/dist/internet/internet.cjs.map +1 -1
  70. package/dist/internet/internet.js +1 -120
  71. package/dist/internet/internet.js.map +1 -1
  72. package/dist/locales/de.js +1 -11
  73. package/dist/locales/de.js.map +1 -1
  74. package/dist/locales/en.js +1 -11
  75. package/dist/locales/en.js.map +1 -1
  76. package/dist/locales/index.js +1 -3
  77. package/dist/location/data/de.js +1 -81
  78. package/dist/location/data/de.js.map +1 -1
  79. package/dist/location/data/en.js +1 -64
  80. package/dist/location/data/en.js.map +1 -1
  81. package/dist/location/location.cjs +1 -1
  82. package/dist/location/location.cjs.map +1 -1
  83. package/dist/location/location.js +1 -56
  84. package/dist/location/location.js.map +1 -1
  85. package/dist/lorem/data.js +1 -5
  86. package/dist/lorem/data.js.map +1 -1
  87. package/dist/lorem/lorem.cjs +3 -3
  88. package/dist/lorem/lorem.cjs.map +1 -1
  89. package/dist/lorem/lorem.js +3 -53
  90. package/dist/lorem/lorem.js.map +1 -1
  91. package/dist/person/data/de.js +1 -61
  92. package/dist/person/data/de.js.map +1 -1
  93. package/dist/person/data/en.js +1 -69
  94. package/dist/person/data/en.js.map +1 -1
  95. package/dist/person/person.cjs +1 -1
  96. package/dist/person/person.cjs.map +1 -1
  97. package/dist/person/person.js +1 -43
  98. package/dist/person/person.js.map +1 -1
  99. package/dist/seed/create-seed.cjs +1 -1
  100. package/dist/seed/create-seed.cjs.map +1 -1
  101. package/dist/seed/create-seed.d.ts +2 -2
  102. package/dist/seed/create-seed.d.ts.map +1 -1
  103. package/dist/seed/create-seed.js +1 -22
  104. package/dist/seed/create-seed.js.map +1 -1
  105. package/dist/seed/mulberry32.cjs +1 -1
  106. package/dist/seed/mulberry32.cjs.map +1 -1
  107. package/dist/seed/mulberry32.d.ts +1 -1
  108. package/dist/seed/mulberry32.d.ts.map +1 -1
  109. package/dist/seed/mulberry32.js +1 -12
  110. package/dist/seed/mulberry32.js.map +1 -1
  111. package/dist/system/data.js +1 -75
  112. package/dist/system/data.js.map +1 -1
  113. package/dist/system/system.cjs +1 -1
  114. package/dist/system/system.cjs.map +1 -1
  115. package/dist/system/system.d.ts.map +1 -1
  116. package/dist/system/system.js +1 -69
  117. package/dist/system/system.js.map +1 -1
  118. package/dist/types.d.ts +2 -3
  119. package/dist/types.d.ts.map +1 -1
  120. package/package.json +10 -82
  121. package/dist/_helpers/next-float.cjs +0 -2
  122. package/dist/_helpers/next-float.cjs.map +0 -1
  123. package/dist/_helpers/next-float.js.map +0 -1
  124. package/dist/commerce/index.cjs +0 -1
  125. package/dist/commerce/index.d.ts +0 -2
  126. package/dist/commerce/index.d.ts.map +0 -1
  127. package/dist/commerce/index.js +0 -2
  128. package/dist/date/index.cjs +0 -1
  129. package/dist/date/index.d.ts +0 -2
  130. package/dist/date/index.d.ts.map +0 -1
  131. package/dist/date/index.js +0 -2
  132. package/dist/finance/index.cjs +0 -1
  133. package/dist/finance/index.d.ts +0 -2
  134. package/dist/finance/index.d.ts.map +0 -1
  135. package/dist/finance/index.js +0 -2
  136. package/dist/internet/index.cjs +0 -1
  137. package/dist/internet/index.d.ts +0 -2
  138. package/dist/internet/index.d.ts.map +0 -1
  139. package/dist/internet/index.js +0 -2
  140. package/dist/location/index.cjs +0 -1
  141. package/dist/location/index.d.ts +0 -2
  142. package/dist/location/index.d.ts.map +0 -1
  143. package/dist/location/index.js +0 -2
  144. package/dist/lorem/index.cjs +0 -1
  145. package/dist/lorem/index.d.ts +0 -2
  146. package/dist/lorem/index.d.ts.map +0 -1
  147. package/dist/lorem/index.js +0 -2
  148. package/dist/person/index.cjs +0 -1
  149. package/dist/person/index.d.ts +0 -2
  150. package/dist/person/index.d.ts.map +0 -1
  151. package/dist/person/index.js +0 -2
  152. package/dist/seed/index.cjs +0 -1
  153. package/dist/seed/index.d.ts +0 -3
  154. package/dist/seed/index.d.ts.map +0 -1
  155. package/dist/seed/index.js +0 -3
  156. package/dist/system/index.cjs +0 -1
  157. package/dist/system/index.d.ts +0 -2
  158. package/dist/system/index.d.ts.map +0 -1
  159. package/dist/system/index.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"create-seed.js","names":[],"sources":["../../src/seed/create-seed.ts"],"sourcesContent":["import { hash } from '@vielzeug/arsenal/object';\nimport type { RandomSource } from '@vielzeug/arsenal/random';\n\nimport { IllusionistSeedError } from '../errors';\nimport { mulberry32 } from './mulberry32';\n\n/**\n * Creates a {@link RandomSource} from a seed.\n *\n * - **Number seed** — used directly as the mulberry32 state.\n * - **String seed** — hashed via `arsenal`'s `hash()` to produce a 32-bit integer.\n * - **No seed** — falls back to `crypto.getRandomValues` for cryptographic randomness.\n *\n * @example\n * ```ts\n * const a = createSeed(12345); // deterministic\n * const b = createSeed('hello'); // deterministic (hashed)\n * const c = createSeed(); // cryptographic (non-deterministic)\n * ```\n */\nexport function createSeed(seed?: number | string): RandomSource {\n if (seed == null) return cryptoSource();\n\n if (typeof seed === 'number') {\n if (!Number.isFinite(seed)) throw new IllusionistSeedError(`createSeed: numeric seed must be finite, got ${seed}`);\n\n return mulberry32(Math.trunc(seed));\n }\n\n const hashed = hash(seed);\n\n // FNV-1a-ish fold from the hash string into a 32-bit integer.\n let state = 0;\n\n for (let i = 0; i < hashed.length; i++) {\n state = (Math.imul(state, 31) + hashed.charCodeAt(i)) >>> 0;\n }\n\n return mulberry32(state);\n}\n\nfunction cryptoSource(): RandomSource {\n return {\n next(): number {\n return crypto.getRandomValues(new Uint32Array(1))[0]! / 0x100000000;\n },\n };\n}\n"],"mappings":";;;;AAoBA,SAAgB,EAAW,GAAsC;CAC/D,IAAI,KAAQ,MAAM,OAAO,EAAa;CAEtC,IAAI,OAAO,KAAS,UAAU;EAC5B,IAAI,CAAC,OAAO,SAAS,CAAI,GAAG,MAAM,IAAI,EAAqB,gDAAgD,GAAM;EAEjH,OAAO,EAAW,KAAK,MAAM,CAAI,CAAC;CACpC;CAEA,IAAM,IAAS,EAAK,CAAI,GAGpB,IAAQ;CAEZ,KAAK,IAAI,IAAI,GAAG,IAAI,EAAO,QAAQ,KACjC,IAAS,KAAK,KAAK,GAAO,EAAE,IAAI,EAAO,WAAW,CAAC,MAAO;CAG5D,OAAO,EAAW,CAAK;AACzB;AAEA,SAAS,IAA6B;CACpC,OAAO,EACL,OAAe;EACb,OAAO,OAAO,gCAAgB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,KAAM;CAC1D,EACF;AACF"}
1
+ {"version":3,"file":"create-seed.js","names":[],"sources":["../../src/seed/create-seed.ts"],"sourcesContent":["import { IllusionistSeedError } from '../errors';\nimport type { RandomSource } from '../types';\nimport { mulberry32 } from './mulberry32';\n\n/**\n * Creates a {@link RandomSource} from a seed.\n *\n * - **Number seed** — used directly as the mulberry32 state.\n * - **String seed** — serialized via `JSON.stringify` and folded into a 32-bit integer.\n * - **No seed** — falls back to `crypto.getRandomValues` for cryptographic randomness.\n *\n * @example\n * ```ts\n * const a = createSeed(12345); // deterministic\n * const b = createSeed('hello'); // deterministic (hashed)\n * const c = createSeed(); // cryptographic (non-deterministic)\n * ```\n */\nexport function createSeed(seed?: number | string): RandomSource {\n if (seed == null) return cryptoSource();\n\n if (typeof seed === 'number') {\n if (!Number.isFinite(seed)) throw new IllusionistSeedError(`createSeed: numeric seed must be finite, got ${seed}`);\n\n return mulberry32(Math.trunc(seed));\n }\n\n const hashed = JSON.stringify(seed);\n\n // FNV-1a-ish fold from the hash string into a 32-bit integer.\n let state = 0;\n\n for (let i = 0; i < hashed.length; i++) {\n state = (Math.imul(state, 31) + hashed.charCodeAt(i)) >>> 0;\n }\n\n return mulberry32(state);\n}\n\nfunction cryptoSource(): RandomSource {\n return {\n next(): number {\n return crypto.getRandomValues(new Uint32Array(1))[0]! / 0x100000000;\n },\n };\n}\n"],"mappings":"iGAkBA,SAAgB,WAAW,EAAsC,CAC/D,GAAI,GAAQ,KAAM,OAAO,aAAa,EAEtC,GAAI,OAAO,GAAS,SAAU,CAC5B,GAAI,CAAC,OAAO,SAAS,CAAI,EAAG,MAAM,IAAI,EAAqB,gDAAgD,GAAM,EAEjH,OAAO,EAAW,KAAK,MAAM,CAAI,CAAC,CACpC,CAEA,IAAM,EAAS,KAAK,UAAU,CAAI,EAG9B,EAAQ,EAEZ,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,IACjC,EAAS,KAAK,KAAK,EAAO,EAAE,EAAI,EAAO,WAAW,CAAC,IAAO,EAG5D,OAAO,EAAW,CAAK,CACzB,CAEA,SAAS,cAA6B,CACpC,MAAO,CACL,MAAe,CACb,OAAO,OAAO,gBAAgB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,GAAM,UAC1D,CACF,CACF"}
@@ -1,2 +1,2 @@
1
- function e(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}exports.mulberry32=e;
1
+ function mulberry32(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}exports.mulberry32=mulberry32;
2
2
  //# sourceMappingURL=mulberry32.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mulberry32.cjs","names":[],"sources":["../../src/seed/mulberry32.ts"],"sourcesContent":["import type { RandomSource } from '@vielzeug/arsenal/random';\n\n/**\n * Mulberry32 — a fast, deterministic 32-bit PRNG.\n *\n * Not cryptographically secure. Use `createSeed()` without a seed for\n * `crypto.getRandomValues`-backed randomness in security-sensitive contexts.\n *\n * @param seed - A 32-bit integer seed.\n * @returns A {@link RandomSource} producing floats in `[0, 1)`.\n */\nexport function mulberry32(seed: number): RandomSource {\n let state = seed >>> 0;\n\n return {\n next(): number {\n state = (state + 0x6d2b79f5) >>> 0;\n let t = state;\n\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n },\n };\n}\n"],"mappings":"AAWA,SAAgB,EAAW,EAA4B,CACrD,IAAI,EAAQ,IAAS,EAErB,MAAO,CACL,MAAe,CACb,EAAS,EAAQ,aAAgB,EACjC,IAAI,EAAI,EAKR,MAHA,GAAI,KAAK,KAAK,EAAK,IAAM,GAAK,EAAI,CAAC,EACnC,GAAK,EAAI,KAAK,KAAK,EAAK,IAAM,EAAI,EAAI,EAAE,IAE/B,EAAK,IAAM,MAAS,GAAK,UACpC,CACF,CACF"}
1
+ {"version":3,"file":"mulberry32.cjs","names":[],"sources":["../../src/seed/mulberry32.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\n/**\n * Mulberry32 — a fast, deterministic 32-bit PRNG.\n *\n * Not cryptographically secure. Use `createSeed()` without a seed for\n * `crypto.getRandomValues`-backed randomness in security-sensitive contexts.\n *\n * @param seed - A 32-bit integer seed.\n * @returns A {@link RandomSource} producing floats in `[0, 1)`.\n */\nexport function mulberry32(seed: number): RandomSource {\n let state = seed >>> 0;\n\n return {\n next(): number {\n state = (state + 0x6d2b79f5) >>> 0;\n let t = state;\n\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n },\n };\n}\n"],"mappings":"AAWA,SAAgB,WAAW,EAA4B,CACrD,IAAI,EAAQ,IAAS,EAErB,MAAO,CACL,MAAe,CACb,EAAS,EAAQ,aAAgB,EACjC,IAAI,EAAI,EAKR,MAHA,GAAI,KAAK,KAAK,EAAK,IAAM,GAAK,EAAI,CAAC,EACnC,GAAK,EAAI,KAAK,KAAK,EAAK,IAAM,EAAI,EAAI,EAAE,IAE/B,EAAK,IAAM,MAAS,GAAK,UACpC,CACF,CACF"}
@@ -1,4 +1,4 @@
1
- import type { RandomSource } from '@vielzeug/arsenal/random';
1
+ import type { RandomSource } from '../types';
2
2
  /**
3
3
  * Mulberry32 — a fast, deterministic 32-bit PRNG.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mulberry32.d.ts","sourceRoot":"","sources":["../../src/seed/mulberry32.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAcrD"}
1
+ {"version":3,"file":"mulberry32.d.ts","sourceRoot":"","sources":["../../src/seed/mulberry32.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAcrD"}
@@ -1,13 +1,2 @@
1
- //#region src/seed/mulberry32.ts
2
- function e(e) {
3
- let t = e >>> 0;
4
- return { next() {
5
- t = t + 1831565813 >>> 0;
6
- let e = t;
7
- return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
8
- } };
9
- }
10
- //#endregion
11
- export { e as mulberry32 };
12
-
1
+ function mulberry32(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}export{mulberry32};
13
2
  //# sourceMappingURL=mulberry32.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mulberry32.js","names":[],"sources":["../../src/seed/mulberry32.ts"],"sourcesContent":["import type { RandomSource } from '@vielzeug/arsenal/random';\n\n/**\n * Mulberry32 — a fast, deterministic 32-bit PRNG.\n *\n * Not cryptographically secure. Use `createSeed()` without a seed for\n * `crypto.getRandomValues`-backed randomness in security-sensitive contexts.\n *\n * @param seed - A 32-bit integer seed.\n * @returns A {@link RandomSource} producing floats in `[0, 1)`.\n */\nexport function mulberry32(seed: number): RandomSource {\n let state = seed >>> 0;\n\n return {\n next(): number {\n state = (state + 0x6d2b79f5) >>> 0;\n let t = state;\n\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n },\n };\n}\n"],"mappings":";AAWA,SAAgB,EAAW,GAA4B;CACrD,IAAI,IAAQ,MAAS;CAErB,OAAO,EACL,OAAe;EACb,IAAS,IAAQ,eAAgB;EACjC,IAAI,IAAI;EAKR,OAHA,IAAI,KAAK,KAAK,IAAK,MAAM,IAAK,IAAI,CAAC,GACnC,KAAK,IAAI,KAAK,KAAK,IAAK,MAAM,GAAI,IAAI,EAAE,KAE/B,IAAK,MAAM,QAAS,KAAK;CACpC,EACF;AACF"}
1
+ {"version":3,"file":"mulberry32.js","names":[],"sources":["../../src/seed/mulberry32.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\n/**\n * Mulberry32 — a fast, deterministic 32-bit PRNG.\n *\n * Not cryptographically secure. Use `createSeed()` without a seed for\n * `crypto.getRandomValues`-backed randomness in security-sensitive contexts.\n *\n * @param seed - A 32-bit integer seed.\n * @returns A {@link RandomSource} producing floats in `[0, 1)`.\n */\nexport function mulberry32(seed: number): RandomSource {\n let state = seed >>> 0;\n\n return {\n next(): number {\n state = (state + 0x6d2b79f5) >>> 0;\n let t = state;\n\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n },\n };\n}\n"],"mappings":"AAWA,SAAgB,WAAW,EAA4B,CACrD,IAAI,EAAQ,IAAS,EAErB,MAAO,CACL,MAAe,CACb,EAAS,EAAQ,aAAgB,EACjC,IAAI,EAAI,EAKR,MAHA,GAAI,KAAK,KAAK,EAAK,IAAM,GAAK,EAAI,CAAC,EACnC,GAAK,EAAI,KAAK,KAAK,EAAK,IAAM,EAAI,EAAI,EAAE,IAE/B,EAAK,IAAM,MAAS,GAAK,UACpC,CACF,CACF"}
@@ -1,76 +1,2 @@
1
- //#region src/system/data.ts
2
- var e = {
3
- cronExpressions: [
4
- "0 * * * *",
5
- "0 0 * * *",
6
- "0 0 * * 0",
7
- "*/5 * * * *",
8
- "0 12 * * 1-5",
9
- "0 0 1 * *",
10
- "0 0 1 1 *",
11
- "0 3 * * *",
12
- "30 7 * * 1-5",
13
- "0 18 * * 5"
14
- ],
15
- directories: [
16
- "src",
17
- "dist",
18
- "build",
19
- "lib",
20
- "test",
21
- "docs",
22
- "config",
23
- "assets",
24
- "public",
25
- "private",
26
- "tmp",
27
- "cache",
28
- "var",
29
- "opt",
30
- "etc"
31
- ],
32
- fileExtensions: /* @__PURE__ */ "txt.pdf.doc.docx.xls.xlsx.ppt.pptx.jpg.png.gif.svg.webp.ico.mp3.wav.flac.ogg.mp4.avi.mkv.webm.zip.tar.gz.rar.7z.js.ts.json.xml.html.css.md.py.java.go.rs.c.cpp".split("."),
33
- fileNames: [
34
- "document",
35
- "report",
36
- "summary",
37
- "notes",
38
- "draft",
39
- "config",
40
- "readme",
41
- "index",
42
- "main",
43
- "app",
44
- "data",
45
- "backup",
46
- "export",
47
- "import",
48
- "log"
49
- ],
50
- mimeTypes: {
51
- avi: "video/x-msvideo",
52
- css: "text/css",
53
- gif: "image/gif",
54
- gz: "application/gzip",
55
- html: "text/html",
56
- jpeg: "image/jpeg",
57
- jpg: "image/jpeg",
58
- js: "application/javascript",
59
- json: "application/json",
60
- mp3: "audio/mpeg",
61
- mp4: "video/mp4",
62
- pdf: "application/pdf",
63
- png: "image/png",
64
- svg: "image/svg+xml",
65
- tar: "application/x-tar",
66
- txt: "text/plain",
67
- wav: "audio/wav",
68
- webp: "image/webp",
69
- xml: "application/xml",
70
- zip: "application/zip"
71
- }
72
- };
73
- //#endregion
74
- export { e as SYSTEM_DATA };
75
-
1
+ var e={cronExpressions:[`0 * * * *`,`0 0 * * *`,`0 0 * * 0`,`*/5 * * * *`,`0 12 * * 1-5`,`0 0 1 * *`,`0 0 1 1 *`,`0 3 * * *`,`30 7 * * 1-5`,`0 18 * * 5`],directories:[`src`,`dist`,`build`,`lib`,`test`,`docs`,`config`,`assets`,`public`,`private`,`tmp`,`cache`,`var`,`opt`,`etc`],fileExtensions:`txt.pdf.doc.docx.xls.xlsx.ppt.pptx.jpg.png.gif.svg.webp.ico.mp3.wav.flac.ogg.mp4.avi.mkv.webm.zip.tar.gz.rar.7z.js.ts.json.xml.html.css.md.py.java.go.rs.c.cpp`.split(`.`),fileNames:[`document`,`report`,`summary`,`notes`,`draft`,`config`,`readme`,`index`,`main`,`app`,`data`,`backup`,`export`,`import`,`log`],mimeTypes:{avi:`video/x-msvideo`,css:`text/css`,gif:`image/gif`,gz:`application/gzip`,html:`text/html`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,mp3:`audio/mpeg`,mp4:`video/mp4`,pdf:`application/pdf`,png:`image/png`,svg:`image/svg+xml`,tar:`application/x-tar`,txt:`text/plain`,wav:`audio/wav`,webp:`image/webp`,xml:`application/xml`,zip:`application/zip`}};export{e as SYSTEM_DATA};
76
2
  //# sourceMappingURL=data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","names":[],"sources":["../../src/system/data.ts"],"sourcesContent":["export const SYSTEM_DATA = {\n cronExpressions: [\n '0 * * * *',\n '0 0 * * *',\n '0 0 * * 0',\n '*/5 * * * *',\n '0 12 * * 1-5',\n '0 0 1 * *',\n '0 0 1 1 *',\n '0 3 * * *',\n '30 7 * * 1-5',\n '0 18 * * 5',\n ],\n directories: [\n 'src',\n 'dist',\n 'build',\n 'lib',\n 'test',\n 'docs',\n 'config',\n 'assets',\n 'public',\n 'private',\n 'tmp',\n 'cache',\n 'var',\n 'opt',\n 'etc',\n ],\n fileExtensions: [\n 'txt',\n 'pdf',\n 'doc',\n 'docx',\n 'xls',\n 'xlsx',\n 'ppt',\n 'pptx',\n 'jpg',\n 'png',\n 'gif',\n 'svg',\n 'webp',\n 'ico',\n 'mp3',\n 'wav',\n 'flac',\n 'ogg',\n 'mp4',\n 'avi',\n 'mkv',\n 'webm',\n 'zip',\n 'tar',\n 'gz',\n 'rar',\n '7z',\n 'js',\n 'ts',\n 'json',\n 'xml',\n 'html',\n 'css',\n 'md',\n 'py',\n 'java',\n 'go',\n 'rs',\n 'c',\n 'cpp',\n ],\n fileNames: [\n 'document',\n 'report',\n 'summary',\n 'notes',\n 'draft',\n 'config',\n 'readme',\n 'index',\n 'main',\n 'app',\n 'data',\n 'backup',\n 'export',\n 'import',\n 'log',\n ],\n mimeTypes: {\n avi: 'video/x-msvideo',\n css: 'text/css',\n gif: 'image/gif',\n gz: 'application/gzip',\n html: 'text/html',\n jpeg: 'image/jpeg',\n jpg: 'image/jpeg',\n js: 'application/javascript',\n json: 'application/json',\n mp3: 'audio/mpeg',\n mp4: 'video/mp4',\n pdf: 'application/pdf',\n png: 'image/png',\n svg: 'image/svg+xml',\n tar: 'application/x-tar',\n txt: 'text/plain',\n wav: 'audio/wav',\n webp: 'image/webp',\n xml: 'application/xml',\n zip: 'application/zip',\n },\n} as const;\n"],"mappings":";AAAA,IAAa,IAAc;CACzB,iBAAiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,gBAAgB,0LAyChB;CACA,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,WAAW;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,IAAI;EACJ,MAAM;EACN,MAAM;EACN,KAAK;EACL,IAAI;EACJ,MAAM;EACN,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,MAAM;EACN,KAAK;EACL,KAAK;CACP;AACF"}
1
+ {"version":3,"file":"data.js","names":[],"sources":["../../src/system/data.ts"],"sourcesContent":["export const SYSTEM_DATA = {\n cronExpressions: [\n '0 * * * *',\n '0 0 * * *',\n '0 0 * * 0',\n '*/5 * * * *',\n '0 12 * * 1-5',\n '0 0 1 * *',\n '0 0 1 1 *',\n '0 3 * * *',\n '30 7 * * 1-5',\n '0 18 * * 5',\n ],\n directories: [\n 'src',\n 'dist',\n 'build',\n 'lib',\n 'test',\n 'docs',\n 'config',\n 'assets',\n 'public',\n 'private',\n 'tmp',\n 'cache',\n 'var',\n 'opt',\n 'etc',\n ],\n fileExtensions: [\n 'txt',\n 'pdf',\n 'doc',\n 'docx',\n 'xls',\n 'xlsx',\n 'ppt',\n 'pptx',\n 'jpg',\n 'png',\n 'gif',\n 'svg',\n 'webp',\n 'ico',\n 'mp3',\n 'wav',\n 'flac',\n 'ogg',\n 'mp4',\n 'avi',\n 'mkv',\n 'webm',\n 'zip',\n 'tar',\n 'gz',\n 'rar',\n '7z',\n 'js',\n 'ts',\n 'json',\n 'xml',\n 'html',\n 'css',\n 'md',\n 'py',\n 'java',\n 'go',\n 'rs',\n 'c',\n 'cpp',\n ],\n fileNames: [\n 'document',\n 'report',\n 'summary',\n 'notes',\n 'draft',\n 'config',\n 'readme',\n 'index',\n 'main',\n 'app',\n 'data',\n 'backup',\n 'export',\n 'import',\n 'log',\n ],\n mimeTypes: {\n avi: 'video/x-msvideo',\n css: 'text/css',\n gif: 'image/gif',\n gz: 'application/gzip',\n html: 'text/html',\n jpeg: 'image/jpeg',\n jpg: 'image/jpeg',\n js: 'application/javascript',\n json: 'application/json',\n mp3: 'audio/mpeg',\n mp4: 'video/mp4',\n pdf: 'application/pdf',\n png: 'image/png',\n svg: 'image/svg+xml',\n tar: 'application/x-tar',\n txt: 'text/plain',\n wav: 'audio/wav',\n webp: 'image/webp',\n xml: 'application/xml',\n zip: 'application/zip',\n },\n} as const;\n"],"mappings":"AAAA,IAAa,EAAc,CACzB,gBAAiB,CACf,YACA,YACA,YACA,cACA,eACA,YACA,YACA,YACA,eACA,YACF,EACA,YAAa,CACX,MACA,OACA,QACA,MACA,OACA,OACA,SACA,SACA,SACA,UACA,MACA,QACA,MACA,MACA,KACF,EACA,eAAgB,0KAyChB,EACA,UAAW,CACT,WACA,SACA,UACA,QACA,QACA,SACA,SACA,QACA,OACA,MACA,OACA,SACA,SACA,SACA,KACF,EACA,UAAW,CACT,IAAK,kBACL,IAAK,WACL,IAAK,YACL,GAAI,mBACJ,KAAM,YACN,KAAM,aACN,IAAK,aACL,GAAI,yBACJ,KAAM,mBACN,IAAK,aACL,IAAK,YACL,IAAK,kBACL,IAAK,YACL,IAAK,gBACL,IAAK,oBACL,IAAK,aACL,IAAK,YACL,KAAM,aACN,IAAK,kBACL,IAAK,iBACP,CACF"}
@@ -1,2 +1,2 @@
1
- const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/int.cjs"),n=require("../_helpers/string.cjs"),r=require("./data.cjs");let i=require("@vielzeug/arsenal/random");var a=e.__exportAll({cron:()=>p,fileExtension:()=>o,fileName:()=>s,filePath:()=>c,mimeType:()=>l,port:()=>f,process:()=>m,semver:()=>u,uuid:()=>d});function o(e){return n.pick(r.SYSTEM_DATA.fileExtensions,e.source)}function s(e){return`${n.pick(r.SYSTEM_DATA.fileNames,e.source)}.${o(e)}`}function c(e){let i=t.int(1,4,e.source),a=[];for(let t=0;t<i;t++)a.push(n.pick(r.SYSTEM_DATA.directories,e.source));return`${a.join(`/`)}/${s(e)}`}function l(e){let t=Object.values(r.SYSTEM_DATA.mimeTypes);return n.pick(t,e.source)}function u(e,r){let i=r?.maxMajor??20,a=`${t.int(0,i,e.source)}.${t.int(0,20,e.source)}.${t.int(0,99,e.source)}`;if(r?.includePrerelease&&e.source.next()<.3){let r=n.pick([`alpha`,`beta`,`rc`,`next`],e.source),i=t.int(1,10,e.source);a+=`-${r}.${i}`}return a}function d(){return(0,i.uuid)()}function f(e,n){let r=n?.min??1024,i=n?.max??65535;return t.int(r,i,e.source)}function p(e){return n.pick(r.SYSTEM_DATA.cronExpressions,e.source)}function m(e){return`${n.pick([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${n.alphanumeric(t.int(3,8,e.source),e.source)}`}exports.cron=p,exports.fileExtension=o,exports.fileName=s,exports.filePath=c,exports.mimeType=l,exports.port=f,exports.process=m,exports.semver=u,Object.defineProperty(exports,"system_exports",{enumerable:!0,get:function(){return a}}),exports.uuid=d;
1
+ const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/int.cjs"),n=require("../_helpers/string.cjs"),r=require("./data.cjs");var i=e.__exportAll({cron:()=>cron,fileExtension:()=>fileExtension,fileName:()=>fileName,filePath:()=>filePath,mimeType:()=>mimeType,port:()=>port,process:()=>process,semver:()=>semver,uuid:()=>uuid});function fileExtension(e){return n.pick(r.SYSTEM_DATA.fileExtensions,e.source)}function fileName(e){return`${n.pick(r.SYSTEM_DATA.fileNames,e.source)}.${fileExtension(e)}`}function filePath(e){let i=t.int(1,4,e.source),a=[];for(let t=0;t<i;t++)a.push(n.pick(r.SYSTEM_DATA.directories,e.source));return`${a.join(`/`)}/${fileName(e)}`}function mimeType(e){let t=Object.values(r.SYSTEM_DATA.mimeTypes);return n.pick(t,e.source)}function semver(e,r){let i=r?.maxMajor??20,a=`${t.int(0,i,e.source)}.${t.int(0,20,e.source)}.${t.int(0,99,e.source)}`;if(r?.includePrerelease&&e.source.next()<.3){let r=n.pick([`alpha`,`beta`,`rc`,`next`],e.source),i=t.int(1,10,e.source);a+=`-${r}.${i}`}return a}function uuid(){return crypto.randomUUID()}function port(e,n){let r=n?.min??1024,i=n?.max??65535;return t.int(r,i,e.source)}function cron(e){return n.pick(r.SYSTEM_DATA.cronExpressions,e.source)}function process(e){return`${n.pick([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${n.alphanumeric(t.int(3,8,e.source),e.source)}`}exports.cron=cron,exports.fileExtension=fileExtension,exports.fileName=fileName,exports.filePath=filePath,exports.mimeType=mimeType,exports.port=port,exports.process=process,exports.semver=semver,Object.defineProperty(exports,"system_exports",{enumerable:!0,get:function(){return i}}),exports.uuid=uuid;
2
2
  //# sourceMappingURL=system.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.cjs","names":[],"sources":["../../src/system/system.ts"],"sourcesContent":["import { uuid as cryptoUuid } from '@vielzeug/arsenal/random';\n\nimport { int } from '../_helpers/int';\nimport { alphanumeric, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { SYSTEM_DATA } from './data';\n\n/** Generates a random file extension from common types. */\nexport function fileExtension(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.fileExtensions, ctx.source)!;\n}\n\n/** Generates a random file name with extension. */\nexport function fileName(ctx: IllusionistContext): string {\n const base = pick(SYSTEM_DATA.fileNames, ctx.source)!;\n const ext = fileExtension(ctx);\n\n return `${base}.${ext}`;\n}\n\n/** Generates a random file path with 1-4 directory segments and a file name. */\nexport function filePath(ctx: IllusionistContext): string {\n const segments = int(1, 4, ctx.source);\n const dirs: string[] = [];\n\n for (let i = 0; i < segments; i++) {\n dirs.push(pick(SYSTEM_DATA.directories, ctx.source)!);\n }\n\n return `${dirs.join('/')}/${fileName(ctx)}`;\n}\n\n/** Returns a random MIME type string. */\nexport function mimeType(ctx: IllusionistContext): string {\n const types = Object.values(SYSTEM_DATA.mimeTypes);\n\n return pick(types, ctx.source)!;\n}\n\n/** Generates a random semver version string. */\nexport function semver(ctx: IllusionistContext, options?: { maxMajor?: number; includePrerelease?: boolean }): string {\n const maxMajor = options?.maxMajor ?? 20;\n const major = int(0, maxMajor, ctx.source);\n const minor = int(0, 20, ctx.source);\n const patch = int(0, 99, ctx.source);\n\n let version = `${major}.${minor}.${patch}`;\n\n if (options?.includePrerelease && ctx.source.next() < 0.3) {\n const labels = ['alpha', 'beta', 'rc', 'next'];\n const label = pick(labels, ctx.source)!;\n const num = int(1, 10, ctx.source);\n\n version += `-${label}.${num}`;\n }\n\n return version;\n}\n\n/**\n * Generates a random UUID via `crypto.randomUUID()`.\n *\n * **Not deterministic** — ignores the seeded `RandomSource` and always uses\n * cryptographic randomness. Use this for unique identifiers where\n * unpredictability matters more than reproducibility.\n */\nexport function uuid(): string {\n return cryptoUuid();\n}\n\n/** Generates a random port number (1-65535, avoiding well-known ports below 1024 by default). */\nexport function port(ctx: IllusionistContext, options?: { min?: number; max?: number }): number {\n const min = options?.min ?? 1024;\n const max = options?.max ?? 65535;\n\n return int(min, max, ctx.source);\n}\n\n/** Returns a random cron expression from common patterns. */\nexport function cron(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.cronExpressions, ctx.source)!;\n}\n\n/** Generates a random process name. */\nexport function process(ctx: IllusionistContext): string {\n const prefixes = ['node', 'python', 'ruby', 'java', 'go', 'rust', 'bash'];\n const prefix = pick(prefixes, ctx.source)!;\n const suffix = alphanumeric(int(3, 8, ctx.source), ctx.source);\n\n return `${prefix}_${suffix}`;\n}\n"],"mappings":"gVAQA,SAAgB,EAAc,EAAiC,CAC7D,OAAO,EAAA,KAAK,EAAA,YAAY,eAAgB,EAAI,MAAM,CACpD,CAGA,SAAgB,EAAS,EAAiC,CAIxD,MAAO,GAHM,EAAA,KAAK,EAAA,YAAY,UAAW,EAAI,MAGnC,EAAK,GAFH,EAAc,CAER,GACpB,CAGA,SAAgB,EAAS,EAAiC,CACxD,IAAM,EAAW,EAAA,IAAI,EAAG,EAAG,EAAI,MAAM,EAC/B,EAAiB,CAAC,EAExB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAU,IAC5B,EAAK,KAAK,EAAA,KAAK,EAAA,YAAY,YAAa,EAAI,MAAM,CAAE,EAGtD,MAAO,GAAG,EAAK,KAAK,GAAG,EAAE,GAAG,EAAS,CAAG,GAC1C,CAGA,SAAgB,EAAS,EAAiC,CACxD,IAAM,EAAQ,OAAO,OAAO,EAAA,YAAY,SAAS,EAEjD,OAAO,EAAA,KAAK,EAAO,EAAI,MAAM,CAC/B,CAGA,SAAgB,EAAO,EAAyB,EAAsE,CACpH,IAAM,EAAW,GAAS,UAAY,GAKlC,EAAU,GAJA,EAAA,IAAI,EAAG,EAAU,EAAI,MAIlB,EAAM,GAHT,EAAA,IAAI,EAAG,GAAI,EAAI,MAGH,EAAM,GAFlB,EAAA,IAAI,EAAG,GAAI,EAAI,MAEM,IAEnC,GAAI,GAAS,mBAAqB,EAAI,OAAO,KAAK,EAAI,GAAK,CAEzD,IAAM,EAAQ,EAAA,KAAK,CADH,QAAS,OAAQ,KAAM,MACpB,EAAQ,EAAI,MAAM,EAC/B,EAAM,EAAA,IAAI,EAAG,GAAI,EAAI,MAAM,EAEjC,GAAW,IAAI,EAAM,GAAG,GAC1B,CAEA,OAAO,CACT,CASA,SAAgB,GAAe,CAC7B,OAAA,EAAO,EAAA,KAAA,CAAW,CACpB,CAGA,SAAgB,EAAK,EAAyB,EAAkD,CAC9F,IAAM,EAAM,GAAS,KAAO,KACtB,EAAM,GAAS,KAAO,MAE5B,OAAO,EAAA,IAAI,EAAK,EAAK,EAAI,MAAM,CACjC,CAGA,SAAgB,EAAK,EAAiC,CACpD,OAAO,EAAA,KAAK,EAAA,YAAY,gBAAiB,EAAI,MAAM,CACrD,CAGA,SAAgB,EAAQ,EAAiC,CAKvD,MAAO,GAHQ,EAAA,KAAK,CADF,OAAQ,SAAU,OAAQ,OAAQ,KAAM,OAAQ,MAC9C,EAAU,EAAI,MAGxB,EAAO,GAFF,EAAA,aAAa,EAAA,IAAI,EAAG,EAAG,EAAI,MAAM,EAAG,EAAI,MAEnC,GACtB"}
1
+ {"version":3,"file":"system.cjs","names":[],"sources":["../../src/system/system.ts"],"sourcesContent":["import { int } from '../_helpers/int';\nimport { alphanumeric, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { SYSTEM_DATA } from './data';\n\n/** Generates a random file extension from common types. */\nexport function fileExtension(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.fileExtensions, ctx.source)!;\n}\n\n/** Generates a random file name with extension. */\nexport function fileName(ctx: IllusionistContext): string {\n const base = pick(SYSTEM_DATA.fileNames, ctx.source)!;\n const ext = fileExtension(ctx);\n\n return `${base}.${ext}`;\n}\n\n/** Generates a random file path with 1-4 directory segments and a file name. */\nexport function filePath(ctx: IllusionistContext): string {\n const segments = int(1, 4, ctx.source);\n const dirs: string[] = [];\n\n for (let i = 0; i < segments; i++) {\n dirs.push(pick(SYSTEM_DATA.directories, ctx.source)!);\n }\n\n return `${dirs.join('/')}/${fileName(ctx)}`;\n}\n\n/** Returns a random MIME type string. */\nexport function mimeType(ctx: IllusionistContext): string {\n const types = Object.values(SYSTEM_DATA.mimeTypes);\n\n return pick(types, ctx.source)!;\n}\n\n/** Generates a random semver version string. */\nexport function semver(ctx: IllusionistContext, options?: { maxMajor?: number; includePrerelease?: boolean }): string {\n const maxMajor = options?.maxMajor ?? 20;\n const major = int(0, maxMajor, ctx.source);\n const minor = int(0, 20, ctx.source);\n const patch = int(0, 99, ctx.source);\n\n let version = `${major}.${minor}.${patch}`;\n\n if (options?.includePrerelease && ctx.source.next() < 0.3) {\n const labels = ['alpha', 'beta', 'rc', 'next'];\n const label = pick(labels, ctx.source)!;\n const num = int(1, 10, ctx.source);\n\n version += `-${label}.${num}`;\n }\n\n return version;\n}\n\n/**\n * Generates a random UUID via `crypto.randomUUID()`.\n *\n * **Not deterministic** — ignores the seeded `RandomSource` and always uses\n * cryptographic randomness. Use this for unique identifiers where\n * unpredictability matters more than reproducibility.\n */\nexport function uuid(): string {\n return crypto.randomUUID();\n}\n\n/** Generates a random port number (1-65535, avoiding well-known ports below 1024 by default). */\nexport function port(ctx: IllusionistContext, options?: { min?: number; max?: number }): number {\n const min = options?.min ?? 1024;\n const max = options?.max ?? 65535;\n\n return int(min, max, ctx.source);\n}\n\n/** Returns a random cron expression from common patterns. */\nexport function cron(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.cronExpressions, ctx.source)!;\n}\n\n/** Generates a random process name. */\nexport function process(ctx: IllusionistContext): string {\n const prefixes = ['node', 'python', 'ruby', 'java', 'go', 'rust', 'bash'];\n const prefix = pick(prefixes, ctx.source)!;\n const suffix = alphanumeric(int(3, 8, ctx.source), ctx.source);\n\n return `${prefix}_${suffix}`;\n}\n"],"mappings":"2VAMA,SAAgB,cAAc,EAAiC,CAC7D,OAAO,EAAA,KAAK,EAAA,YAAY,eAAgB,EAAI,MAAM,CACpD,CAGA,SAAgB,SAAS,EAAiC,CAIxD,MAAO,GAHM,EAAA,KAAK,EAAA,YAAY,UAAW,EAAI,MAGnC,EAAK,GAFH,cAAc,CAER,GACpB,CAGA,SAAgB,SAAS,EAAiC,CACxD,IAAM,EAAW,EA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GxB,EAAO,GAFF,EAAA,aAAa,EAAA,IAAI,EAAG,EAAG,EAAI,MAAM,EAAG,EAAI,MAEnC,GACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/system/system.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAE7D;AAED,mDAAmD;AACnD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAKxD;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CASxD;AAED,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAIxD;AAED,gDAAgD;AAChD,wBAAgB,MAAM,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAiBpH;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,IAAI,MAAM,CAE7B;AAED,iGAAiG;AACjG,wBAAgB,IAAI,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAK9F;AAED,6DAA6D;AAC7D,wBAAgB,IAAI,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAEpD;AAED,uCAAuC;AACvC,wBAAgB,OAAO,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAMvD"}
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/system/system.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAE7D;AAED,mDAAmD;AACnD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAKxD;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CASxD;AAED,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAIxD;AAED,gDAAgD;AAChD,wBAAgB,MAAM,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAiBpH;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,IAAI,MAAM,CAE7B;AAED,iGAAiG;AACjG,wBAAgB,IAAI,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAK9F;AAED,6DAA6D;AAC7D,wBAAgB,IAAI,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAEpD;AAED,uCAAuC;AACvC,wBAAgB,OAAO,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAMvD"}
@@ -1,70 +1,2 @@
1
- import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
- import { int as t } from "../_helpers/int.js";
3
- import { alphanumeric as n, pick as r } from "../_helpers/string.js";
4
- import { SYSTEM_DATA as i } from "./data.js";
5
- import { uuid as a } from "@vielzeug/arsenal/random";
6
- //#region src/system/system.ts
7
- var o = /* @__PURE__ */ e({
8
- cron: () => m,
9
- fileExtension: () => s,
10
- fileName: () => c,
11
- filePath: () => l,
12
- mimeType: () => u,
13
- port: () => p,
14
- process: () => h,
15
- semver: () => d,
16
- uuid: () => f
17
- });
18
- function s(e) {
19
- return r(i.fileExtensions, e.source);
20
- }
21
- function c(e) {
22
- return `${r(i.fileNames, e.source)}.${s(e)}`;
23
- }
24
- function l(e) {
25
- let n = t(1, 4, e.source), a = [];
26
- for (let t = 0; t < n; t++) a.push(r(i.directories, e.source));
27
- return `${a.join("/")}/${c(e)}`;
28
- }
29
- function u(e) {
30
- let t = Object.values(i.mimeTypes);
31
- return r(t, e.source);
32
- }
33
- function d(e, n) {
34
- let i = n?.maxMajor ?? 20, a = `${t(0, i, e.source)}.${t(0, 20, e.source)}.${t(0, 99, e.source)}`;
35
- if (n?.includePrerelease && e.source.next() < .3) {
36
- let n = r([
37
- "alpha",
38
- "beta",
39
- "rc",
40
- "next"
41
- ], e.source), i = t(1, 10, e.source);
42
- a += `-${n}.${i}`;
43
- }
44
- return a;
45
- }
46
- function f() {
47
- return a();
48
- }
49
- function p(e, n) {
50
- let r = n?.min ?? 1024, i = n?.max ?? 65535;
51
- return t(r, i, e.source);
52
- }
53
- function m(e) {
54
- return r(i.cronExpressions, e.source);
55
- }
56
- function h(e) {
57
- return `${r([
58
- "node",
59
- "python",
60
- "ruby",
61
- "java",
62
- "go",
63
- "rust",
64
- "bash"
65
- ], e.source)}_${n(t(3, 8, e.source), e.source)}`;
66
- }
67
- //#endregion
68
- export { m as cron, s as fileExtension, c as fileName, l as filePath, u as mimeType, p as port, h as process, d as semver, o as system_exports, f as uuid };
69
-
1
+ import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{int as t}from"../_helpers/int.js";import{alphanumeric as n,pick as r}from"../_helpers/string.js";import{SYSTEM_DATA as i}from"./data.js";var a=e({cron:()=>cron,fileExtension:()=>fileExtension,fileName:()=>fileName,filePath:()=>filePath,mimeType:()=>mimeType,port:()=>port,process:()=>process,semver:()=>semver,uuid:()=>uuid});function fileExtension(e){return r(i.fileExtensions,e.source)}function fileName(e){return`${r(i.fileNames,e.source)}.${fileExtension(e)}`}function filePath(e){let n=t(1,4,e.source),a=[];for(let t=0;t<n;t++)a.push(r(i.directories,e.source));return`${a.join(`/`)}/${fileName(e)}`}function mimeType(e){let t=Object.values(i.mimeTypes);return r(t,e.source)}function semver(e,n){let i=n?.maxMajor??20,a=`${t(0,i,e.source)}.${t(0,20,e.source)}.${t(0,99,e.source)}`;if(n?.includePrerelease&&e.source.next()<.3){let n=r([`alpha`,`beta`,`rc`,`next`],e.source),i=t(1,10,e.source);a+=`-${n}.${i}`}return a}function uuid(){return crypto.randomUUID()}function port(e,n){let r=n?.min??1024,i=n?.max??65535;return t(r,i,e.source)}function cron(e){return r(i.cronExpressions,e.source)}function process(e){return`${r([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${n(t(3,8,e.source),e.source)}`}export{cron,fileExtension,fileName,filePath,mimeType,port,process,semver,a as system_exports,uuid};
70
2
  //# sourceMappingURL=system.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","names":[],"sources":["../../src/system/system.ts"],"sourcesContent":["import { uuid as cryptoUuid } from '@vielzeug/arsenal/random';\n\nimport { int } from '../_helpers/int';\nimport { alphanumeric, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { SYSTEM_DATA } from './data';\n\n/** Generates a random file extension from common types. */\nexport function fileExtension(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.fileExtensions, ctx.source)!;\n}\n\n/** Generates a random file name with extension. */\nexport function fileName(ctx: IllusionistContext): string {\n const base = pick(SYSTEM_DATA.fileNames, ctx.source)!;\n const ext = fileExtension(ctx);\n\n return `${base}.${ext}`;\n}\n\n/** Generates a random file path with 1-4 directory segments and a file name. */\nexport function filePath(ctx: IllusionistContext): string {\n const segments = int(1, 4, ctx.source);\n const dirs: string[] = [];\n\n for (let i = 0; i < segments; i++) {\n dirs.push(pick(SYSTEM_DATA.directories, ctx.source)!);\n }\n\n return `${dirs.join('/')}/${fileName(ctx)}`;\n}\n\n/** Returns a random MIME type string. */\nexport function mimeType(ctx: IllusionistContext): string {\n const types = Object.values(SYSTEM_DATA.mimeTypes);\n\n return pick(types, ctx.source)!;\n}\n\n/** Generates a random semver version string. */\nexport function semver(ctx: IllusionistContext, options?: { maxMajor?: number; includePrerelease?: boolean }): string {\n const maxMajor = options?.maxMajor ?? 20;\n const major = int(0, maxMajor, ctx.source);\n const minor = int(0, 20, ctx.source);\n const patch = int(0, 99, ctx.source);\n\n let version = `${major}.${minor}.${patch}`;\n\n if (options?.includePrerelease && ctx.source.next() < 0.3) {\n const labels = ['alpha', 'beta', 'rc', 'next'];\n const label = pick(labels, ctx.source)!;\n const num = int(1, 10, ctx.source);\n\n version += `-${label}.${num}`;\n }\n\n return version;\n}\n\n/**\n * Generates a random UUID via `crypto.randomUUID()`.\n *\n * **Not deterministic** — ignores the seeded `RandomSource` and always uses\n * cryptographic randomness. Use this for unique identifiers where\n * unpredictability matters more than reproducibility.\n */\nexport function uuid(): string {\n return cryptoUuid();\n}\n\n/** Generates a random port number (1-65535, avoiding well-known ports below 1024 by default). */\nexport function port(ctx: IllusionistContext, options?: { min?: number; max?: number }): number {\n const min = options?.min ?? 1024;\n const max = options?.max ?? 65535;\n\n return int(min, max, ctx.source);\n}\n\n/** Returns a random cron expression from common patterns. */\nexport function cron(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.cronExpressions, ctx.source)!;\n}\n\n/** Generates a random process name. */\nexport function process(ctx: IllusionistContext): string {\n const prefixes = ['node', 'python', 'ruby', 'java', 'go', 'rust', 'bash'];\n const prefix = pick(prefixes, ctx.source)!;\n const suffix = alphanumeric(int(3, 8, ctx.source), ctx.source);\n\n return `${prefix}_${suffix}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,SAAgB,EAAc,GAAiC;CAC7D,OAAO,EAAK,EAAY,gBAAgB,EAAI,MAAM;AACpD;AAGA,SAAgB,EAAS,GAAiC;CAIxD,OAAO,GAHM,EAAK,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,EAAI,MAGxB,EAAO,GAFF,EAAa,EAAI,GAAG,GAAG,EAAI,MAAM,GAAG,EAAI,MAEnC;AACtB"}
1
+ {"version":3,"file":"system.js","names":[],"sources":["../../src/system/system.ts"],"sourcesContent":["import { int } from '../_helpers/int';\nimport { alphanumeric, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { SYSTEM_DATA } from './data';\n\n/** Generates a random file extension from common types. */\nexport function fileExtension(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.fileExtensions, ctx.source)!;\n}\n\n/** Generates a random file name with extension. */\nexport function fileName(ctx: IllusionistContext): string {\n const base = pick(SYSTEM_DATA.fileNames, ctx.source)!;\n const ext = fileExtension(ctx);\n\n return `${base}.${ext}`;\n}\n\n/** Generates a random file path with 1-4 directory segments and a file name. */\nexport function filePath(ctx: IllusionistContext): string {\n const segments = int(1, 4, ctx.source);\n const dirs: string[] = [];\n\n for (let i = 0; i < segments; i++) {\n dirs.push(pick(SYSTEM_DATA.directories, ctx.source)!);\n }\n\n return `${dirs.join('/')}/${fileName(ctx)}`;\n}\n\n/** Returns a random MIME type string. */\nexport function mimeType(ctx: IllusionistContext): string {\n const types = Object.values(SYSTEM_DATA.mimeTypes);\n\n return pick(types, ctx.source)!;\n}\n\n/** Generates a random semver version string. */\nexport function semver(ctx: IllusionistContext, options?: { maxMajor?: number; includePrerelease?: boolean }): string {\n const maxMajor = options?.maxMajor ?? 20;\n const major = int(0, maxMajor, ctx.source);\n const minor = int(0, 20, ctx.source);\n const patch = int(0, 99, ctx.source);\n\n let version = `${major}.${minor}.${patch}`;\n\n if (options?.includePrerelease && ctx.source.next() < 0.3) {\n const labels = ['alpha', 'beta', 'rc', 'next'];\n const label = pick(labels, ctx.source)!;\n const num = int(1, 10, ctx.source);\n\n version += `-${label}.${num}`;\n }\n\n return version;\n}\n\n/**\n * Generates a random UUID via `crypto.randomUUID()`.\n *\n * **Not deterministic** — ignores the seeded `RandomSource` and always uses\n * cryptographic randomness. Use this for unique identifiers where\n * unpredictability matters more than reproducibility.\n */\nexport function uuid(): string {\n return crypto.randomUUID();\n}\n\n/** Generates a random port number (1-65535, avoiding well-known ports below 1024 by default). */\nexport function port(ctx: IllusionistContext, options?: { min?: number; max?: number }): number {\n const min = options?.min ?? 1024;\n const max = options?.max ?? 65535;\n\n return int(min, max, ctx.source);\n}\n\n/** Returns a random cron expression from common patterns. */\nexport function cron(ctx: IllusionistContext): string {\n return pick(SYSTEM_DATA.cronExpressions, ctx.source)!;\n}\n\n/** Generates a random process name. */\nexport function process(ctx: IllusionistContext): string {\n const prefixes = ['node', 'python', 'ruby', 'java', 'go', 'rust', 'bash'];\n const prefix = pick(prefixes, ctx.source)!;\n const suffix = alphanumeric(int(3, 8, ctx.source), ctx.source);\n\n return `${prefix}_${suffix}`;\n}\n"],"mappings":"4YAMA,SAAgB,cAAc,EAAiC,CAC7D,OAAO,EAAK,EAAY,eAAgB,EAAI,MAAM,CACpD,CAGA,SAAgB,SAAS,EAAiC,CAIxD,MAAO,GAHM,EAAK,EAAY,UAAW,EAAI,MAGnC,EAAK,GAFH,cAAc,CAER,GACpB,CAGA,SAAgB,SAAS,EAAiC,CACxD,IAAM,EAAW,EAAI,EAAG,EAAG,EAAI,MAAM,EAC/B,EAAiB,CAAC,EAExB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAU,IAC5B,EAAK,KAAK,EAAK,EAAY,YAAa,EAAI,MAAM,CAAE,EAGtD,MAAO,GAAG,EAAK,KAAK,GAAG,EAAE,GAAG,SAAS,CAAG,GAC1C,CAGA,SAAgB,SAAS,EAAiC,CACxD,IAAM,EAAQ,OAAO,OAAO,EAAY,SAAS,EAEjD,OAAO,EAAK,EAAO,EAAI,MAAM,CAC/B,CAGA,SAAgB,OAAO,EAAyB,EAAsE,CACpH,IAAM,EAAW,GAAS,UAAY,GAKlC,EAAU,GAJA,EAAI,EAAG,EAAU,EAAI,MAIlB,EAAM,GAHT,EAAI,EAAG,GAAI,EAAI,MAGH,EAAM,GAFlB,EAAI,EAAG,GAAI,EAAI,MAEM,IAEnC,GAAI,GAAS,mBAAqB,EAAI,OAAO,KAAK,EAAI,GAAK,CAEzD,IAAM,EAAQ,EAAK,CADH,QAAS,OAAQ,KAAM,MACpB,EAAQ,EAAI,MAAM,EAC/B,EAAM,EAAI,EAAG,GAAI,EAAI,MAAM,EAEjC,GAAW,IAAI,EAAM,GAAG,GAC1B,CAEA,OAAO,CACT,CASA,SAAgB,MAAe,CAC7B,OAAO,OAAO,WAAW,CAC3B,CAGA,SAAgB,KAAK,EAAyB,EAAkD,CAC9F,IAAM,EAAM,GAAS,KAAO,KACtB,EAAM,GAAS,KAAO,MAE5B,OAAO,EAAI,EAAK,EAAK,EAAI,MAAM,CACjC,CAGA,SAAgB,KAAK,EAAiC,CACpD,OAAO,EAAK,EAAY,gBAAiB,EAAI,MAAM,CACrD,CAGA,SAAgB,QAAQ,EAAiC,CAKvD,MAAO,GAHQ,EAAK,CADF,OAAQ,SAAU,OAAQ,OAAQ,KAAM,OAAQ,MAC9C,EAAU,EAAI,MAGxB,EAAO,GAFF,EAAa,EAAI,EAAG,EAAG,EAAI,MAAM,EAAG,EAAI,MAEnC,GACtB"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { RandomSource } from '@vielzeug/arsenal/random';
1
+ import type { RandomSource } from '@vielzeug/arsenal';
2
+ export type { RandomSource };
2
3
  /** Locale-specific data used by the person category. */
3
4
  export type PersonLocaleData = {
4
5
  readonly firstNameFemale: readonly string[];
@@ -36,6 +37,4 @@ export type IllusionistContext = {
36
37
  readonly source: RandomSource;
37
38
  readonly locale: IllusionistLocale;
38
39
  };
39
- /** Re-exported from arsenal for consumer convenience. */
40
- export type { RandomSource } from '@vielzeug/arsenal/random';
41
40
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAA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D;AAC/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACvC,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0FAA0F;IAC1F,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,+CAA+C;IAC/C,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vielzeug/illusionist",
3
- "version": "2.3.2",
3
+ "version": "26.10.0",
4
4
  "description": "Typed, deterministic, locale-aware fake data generator with seeded PRNG",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,51 +23,6 @@
23
23
  "import": "./dist/index.js",
24
24
  "require": "./dist/index.cjs"
25
25
  },
26
- "./commerce": {
27
- "types": "./dist/commerce/index.d.ts",
28
- "import": "./dist/commerce/index.js",
29
- "require": "./dist/commerce/index.cjs"
30
- },
31
- "./date": {
32
- "types": "./dist/date/index.d.ts",
33
- "import": "./dist/date/index.js",
34
- "require": "./dist/date/index.cjs"
35
- },
36
- "./finance": {
37
- "types": "./dist/finance/index.d.ts",
38
- "import": "./dist/finance/index.js",
39
- "require": "./dist/finance/index.cjs"
40
- },
41
- "./internet": {
42
- "types": "./dist/internet/index.d.ts",
43
- "import": "./dist/internet/index.js",
44
- "require": "./dist/internet/index.cjs"
45
- },
46
- "./location": {
47
- "types": "./dist/location/index.d.ts",
48
- "import": "./dist/location/index.js",
49
- "require": "./dist/location/index.cjs"
50
- },
51
- "./lorem": {
52
- "types": "./dist/lorem/index.d.ts",
53
- "import": "./dist/lorem/index.js",
54
- "require": "./dist/lorem/index.cjs"
55
- },
56
- "./person": {
57
- "types": "./dist/person/index.d.ts",
58
- "import": "./dist/person/index.js",
59
- "require": "./dist/person/index.cjs"
60
- },
61
- "./seed": {
62
- "types": "./dist/seed/index.d.ts",
63
- "import": "./dist/seed/index.js",
64
- "require": "./dist/seed/index.cjs"
65
- },
66
- "./system": {
67
- "types": "./dist/system/index.d.ts",
68
- "import": "./dist/system/index.js",
69
- "require": "./dist/system/index.cjs"
70
- },
71
26
  "./locales": {
72
27
  "types": "./dist/locales/index.d.ts",
73
28
  "import": "./dist/locales/index.js",
@@ -86,33 +41,6 @@
86
41
  },
87
42
  "typesVersions": {
88
43
  "*": {
89
- "commerce": [
90
- "dist/commerce/index.d.ts"
91
- ],
92
- "date": [
93
- "dist/date/index.d.ts"
94
- ],
95
- "finance": [
96
- "dist/finance/index.d.ts"
97
- ],
98
- "internet": [
99
- "dist/internet/index.d.ts"
100
- ],
101
- "location": [
102
- "dist/location/index.d.ts"
103
- ],
104
- "lorem": [
105
- "dist/lorem/index.d.ts"
106
- ],
107
- "person": [
108
- "dist/person/index.d.ts"
109
- ],
110
- "seed": [
111
- "dist/seed/index.d.ts"
112
- ],
113
- "system": [
114
- "dist/system/index.d.ts"
115
- ],
116
44
  "locales": [
117
45
  "dist/locales/index.d.ts"
118
46
  ],
@@ -130,26 +58,26 @@
130
58
  "registry": "https://registry.npmjs.org/"
131
59
  },
132
60
  "scripts": {
133
- "build": "pnpm run verify:exports && vite build && pnpm run build:bundle && pnpm run build:types",
61
+ "build": "pnpm --silent run verify:exports && vite build && pnpm --silent run build:bundle && pnpm --silent run build:types",
134
62
  "build:bundle": "vite build --config vite.bundle.config.ts",
135
63
  "build:types": "tsc -p tsconfig.declarations.json",
136
64
  "fix": "biome check --write src",
137
65
  "lint": "biome ci src",
138
- "prepublishOnly": "pnpm run build",
66
+ "prepublishOnly": "pnpm --silent run build",
139
67
  "preview": "vite preview",
140
68
  "sync:exports": "node ./scripts/sync-exports.mjs",
141
- "test": "pnpm run verify:exports && vitest",
69
+ "test": "pnpm --silent run verify:exports && vitest",
142
70
  "verify:exports": "node ./scripts/sync-exports.mjs --check"
143
71
  },
144
72
  "dependencies": {
145
- "@vielzeug/arsenal": "2.1.0",
146
- "@vielzeug/coins": "2.2.0",
147
- "@vielzeug/tempo": "2.2.0"
73
+ "@vielzeug/arsenal": "26.10.0",
74
+ "@vielzeug/coins": "26.10.0",
75
+ "@vielzeug/tempo": "26.10.0"
148
76
  },
149
77
  "devDependencies": {
150
- "@types/node": "^26.2.0",
78
+ "@types/node": "^26.6.2",
151
79
  "typescript": "^6.0.3",
152
- "vite": "^8.2.1",
153
- "vitest": "^4.1.10"
80
+ "vite": "^8.3.0",
81
+ "vitest": "^5.0.1"
154
82
  }
155
83
  }
@@ -1,2 +0,0 @@
1
- function e(e){return e?.next()??crypto.getRandomValues(new Uint32Array(1))[0]/4294967296}exports.nextFloat=e;
2
- //# sourceMappingURL=next-float.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"next-float.cjs","names":[],"sources":["../../src/_helpers/next-float.ts"],"sourcesContent":["import type { RandomSource } from '@vielzeug/arsenal/random';\n\n/** Returns a float in `[0, 1)` from the source, falling back to `crypto.getRandomValues` when unset. */\nexport function nextFloat(source?: RandomSource): number {\n return source?.next() ?? crypto.getRandomValues(new Uint32Array(1))[0]! / 0x100000000;\n}\n"],"mappings":"AAGA,SAAgB,EAAU,EAA+B,CACvD,OAAO,GAAQ,KAAK,GAAK,OAAO,gBAAgB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,GAAM,UAC5E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"next-float.js","names":[],"sources":["../../src/_helpers/next-float.ts"],"sourcesContent":["import type { RandomSource } from '@vielzeug/arsenal/random';\n\n/** Returns a float in `[0, 1)` from the source, falling back to `crypto.getRandomValues` when unset. */\nexport function nextFloat(source?: RandomSource): number {\n return source?.next() ?? crypto.getRandomValues(new Uint32Array(1))[0]! / 0x100000000;\n}\n"],"mappings":";AAGA,SAAgB,EAAU,GAA+B;CACvD,OAAO,GAAQ,KAAK,KAAK,OAAO,gCAAgB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,KAAM;AAC5E"}
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./commerce.cjs");exports.department=e.department,exports.price=e.price,exports.productAdjective=e.productAdjective,exports.productDescription=e.productDescription,exports.productMaterial=e.productMaterial,exports.productName=e.productName,exports.productNoun=e.productNoun;
@@ -1,2 +0,0 @@
1
- export * from './commerce';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commerce/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,2 +0,0 @@
1
- import { department as e, price as t, productAdjective as n, productDescription as r, productMaterial as i, productName as a, productNoun as o } from "./commerce.js";
2
- export { e as department, t as price, n as productAdjective, r as productDescription, i as productMaterial, a as productName, o as productNoun };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./date.cjs");exports.between=e.between,exports.birthday=e.birthday,exports.future=e.future,exports.month=e.month,exports.past=e.past,exports.recent=e.recent,exports.weekday=e.weekday;
@@ -1,2 +0,0 @@
1
- export * from './date';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/date/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- import { between as e, birthday as t, future as n, month as r, past as i, recent as a, weekday as o } from "./date.js";
2
- export { e as between, t as birthday, n as future, r as month, i as past, a as recent, o as weekday };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./finance.cjs");exports.amount=e.amount,exports.bank=e.bank,exports.bic=e.bic,exports.bitcoinAddress=e.bitcoinAddress,exports.creditCardCVV=e.creditCardCVV,exports.creditCardNumber=e.creditCardNumber,exports.ethereumAddress=e.ethereumAddress,exports.iban=e.iban,exports.transactionType=e.transactionType;
@@ -1,2 +0,0 @@
1
- export * from './finance';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/finance/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,2 +0,0 @@
1
- import { amount as e, bank as t, bic as n, bitcoinAddress as r, creditCardCVV as i, creditCardNumber as a, ethereumAddress as o, iban as s, transactionType as c } from "./finance.js";
2
- export { e as amount, t as bank, n as bic, r as bitcoinAddress, i as creditCardCVV, a as creditCardNumber, o as ethereumAddress, s as iban, c as transactionType };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./internet.cjs");exports.domainName=e.domainName,exports.email=e.email,exports.httpMethod=e.httpMethod,exports.ip=e.ip,exports.mac=e.mac,exports.mimeType=e.mimeType,exports.password=e.password,exports.statusCode=e.statusCode,exports.url=e.url,exports.userAgent=e.userAgent,exports.username=e.username;
@@ -1,2 +0,0 @@
1
- export * from './internet';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internet/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,2 +0,0 @@
1
- import { domainName as e, email as t, httpMethod as n, ip as r, mac as i, mimeType as a, password as o, statusCode as s, url as c, userAgent as l, username as u } from "./internet.js";
2
- export { e as domainName, t as email, n as httpMethod, r as ip, i as mac, a as mimeType, o as password, s as statusCode, c as url, l as userAgent, u as username };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./location.cjs");exports.city=e.city,exports.country=e.country,exports.latitude=e.latitude,exports.longitude=e.longitude,exports.nearbyGPSCoordinate=e.nearbyGPSCoordinate,exports.state=e.state,exports.street=e.street,exports.streetAddress=e.streetAddress,exports.zipCode=e.zipCode;
@@ -1,2 +0,0 @@
1
- export * from './location';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/location/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,2 +0,0 @@
1
- import { city as e, country as t, latitude as n, longitude as r, nearbyGPSCoordinate as i, state as a, street as o, streetAddress as s, zipCode as c } from "./location.js";
2
- export { e as city, t as country, n as latitude, r as longitude, i as nearbyGPSCoordinate, a as state, o as street, s as streetAddress, c as zipCode };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lorem.cjs");exports.lines=e.lines,exports.paragraph=e.paragraph,exports.paragraphs=e.paragraphs,exports.sentence=e.sentence,exports.sentences=e.sentences,exports.slug=e.slug,exports.word=e.word,exports.words=e.words;
@@ -1,2 +0,0 @@
1
- export * from './lorem';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lorem/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- import { lines as e, paragraph as t, paragraphs as n, sentence as r, sentences as i, slug as a, word as o, words as s } from "./lorem.js";
2
- export { e as lines, t as paragraph, n as paragraphs, r as sentence, i as sentences, a as slug, o as word, s as words };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./person.cjs");exports.firstName=e.firstName,exports.fullName=e.fullName,exports.gender=e.gender,exports.jobTitle=e.jobTitle,exports.lastName=e.lastName,exports.prefix=e.prefix,exports.suffix=e.suffix;
@@ -1,2 +0,0 @@
1
- export * from './person';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/person/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- import { firstName as e, fullName as t, gender as n, jobTitle as r, lastName as i, prefix as a, suffix as o } from "./person.js";
2
- export { e as firstName, t as fullName, n as gender, r as jobTitle, i as lastName, a as prefix, o as suffix };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./mulberry32.cjs"),t=require("./create-seed.cjs");exports.createSeed=t.createSeed,exports.mulberry32=e.mulberry32;
@@ -1,3 +0,0 @@
1
- export * from './create-seed';
2
- export * from './mulberry32';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seed/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}