@vielzeug/illusionist 26.11.4 → 26.11.6
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.
- package/README.md +7 -7
- package/dist/_helpers/boolean.js +1 -2
- package/dist/_helpers/float.js +1 -2
- package/dist/_helpers/int.js +1 -2
- package/dist/_helpers/string.js +1 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/commerce/commerce.js +1 -2
- package/dist/commerce/data.js +1 -2
- package/dist/date/date.js +1 -2
- package/dist/errors.js +1 -2
- package/dist/factory.js +1 -2
- package/dist/finance/data.js +1 -2
- package/dist/finance/finance.js +1 -2
- package/dist/illusionist.js +17 -34
- package/dist/illusionist.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +8 -8
- package/dist/internet/data.js +1 -2
- package/dist/internet/internet.js +1 -2
- package/dist/locales/de.js +1 -2
- package/dist/locales/en.js +1 -2
- package/dist/location/data/de.js +1 -2
- package/dist/location/data/en.js +1 -2
- package/dist/location/location.js +11 -12
- package/dist/lorem/data.js +1 -2
- package/dist/lorem/lorem.js +1 -2
- package/dist/person/data/de.js +1 -2
- package/dist/person/data/en.js +1 -2
- package/dist/person/person.cjs +1 -1
- package/dist/person/person.cjs.map +1 -1
- package/dist/person/person.js +12 -13
- package/dist/seed/create-seed.js +1 -2
- package/dist/seed/mulberry32.js +1 -2
- package/dist/system/data.js +1 -2
- package/dist/system/system.js +1 -2
- package/package.json +12 -12
package/dist/lorem/data.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lorem/data.ts
|
|
2
2
|
var e = { words: /* @__PURE__ */ "lorem.ipsum.dolor.sit.amet.consectetur.adipiscing.elit.sed.do.eiusmod.tempor.incididunt.ut.labore.et.dolore.magna.aliqua.enim.ad.minim.veniam.quis.nostrud.exercitation.ullamco.laboris.nisi.aliquip.ex.ea.commodo.consequat.duis.aute.irure.in.reprehenderit.voluptate.velit.esse.cillum.fugiat.nulla.pariatur.excepteur.sint.occaecat.cupidatat.non.proident.sunt.culpa.qui.officia.deserunt.mollit.anim.id.est.laborum".split(".") };
|
|
3
|
-
//#endregion
|
|
4
3
|
export { e as LOREM_DATA };
|
|
5
4
|
|
|
6
5
|
//# sourceMappingURL=data.js.map
|
package/dist/lorem/lorem.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { float as t } from "../_helpers/float.js";
|
|
3
3
|
import { pick as n } from "../_helpers/string.js";
|
|
4
4
|
import { LOREM_DATA as r } from "./data.js";
|
|
5
|
-
|
|
5
|
+
// src/lorem/lorem.ts
|
|
6
6
|
var i = /* @__PURE__ */ e({
|
|
7
7
|
lines: () => lines,
|
|
8
8
|
paragraph: () => paragraph,
|
|
@@ -48,7 +48,6 @@ function lines(e, t = 5) {
|
|
|
48
48
|
for (let r = 0; r < t; r++) n.push(sentence(e));
|
|
49
49
|
return n.join("\n");
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { lines, i as lorem_exports, paragraph, paragraphs, sentence, sentences, slug, word, words };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=lorem.js.map
|
package/dist/person/data/de.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/person/data/de.ts
|
|
2
2
|
var e = {
|
|
3
3
|
firstNameFemale: /* @__PURE__ */ "Mia.Emma.Sophia.Hannah.Emilia.Lina.Ella.Marie.Clara.Lena.Lea.Lilly.Anna.Ida.Mila.Luisa.Nora.Greta.Frieda.Johanna.Lotte.Charlotte.Mathilda.Lara.Sarah.Julia.Laura.Lisa.Katharina.Sabine.Andrea.Petra.Susanne.Nicole.Stefanie.Christina.Tanja.Birgit.Monika.Ursula.Helga.Ingrid.Brigitte.Gisela.Renate.Angelika.Claudia.Sandra.Beate.Klara".split("."),
|
|
4
4
|
firstNameMale: /* @__PURE__ */ "Ben.Paul.Leon.Finn.Elias.Jonas.Felix.Maximilian.Max.Luca.Noah.Henry.Lukas.Moritz.David.Niklas.Philipp.Julian.Tim.Tom.Simon.Alexander.Liam.Emil.Daniel.Sebastian.Matteo.Fabian.Jakob.Tobias.Florian.Marvin.Anton.Johannes.Stefan.Andreas.Michael.Thomas.Christian.Klaus.Peter.Wolfgang.Jürgen.Frank.Hans.Martin.Rolf.Bernd.Uwe.Karl".split("."),
|
|
@@ -56,7 +56,6 @@ var e = {
|
|
|
56
56
|
],
|
|
57
57
|
suffix: []
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { e as PERSON_DATA_DE };
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=de.js.map
|
package/dist/person/data/en.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/person/data/en.ts
|
|
2
2
|
var e = {
|
|
3
3
|
firstNameFemale: /* @__PURE__ */ "Mary.Patricia.Jennifer.Linda.Elizabeth.Barbara.Susan.Jessica.Sarah.Karen.Lisa.Nancy.Betty.Margaret.Sandra.Ashley.Kimberly.Emily.Donna.Michelle.Carol.Amanda.Dorothy.Melissa.Deborah.Stephanie.Rebecca.Sharon.Laura.Cynthia.Kathleen.Amy.Shirley.Angela.Helen.Anna.Brenda.Pamela.Nicole.Emma.Samantha.Katherine.Christine.Debra.Rachel.Catherine.Carolyn.Janet.Ruth.Maria".split("."),
|
|
4
4
|
firstNameMale: /* @__PURE__ */ "James.John.Robert.Michael.William.David.Richard.Joseph.Thomas.Charles.Christopher.Daniel.Matthew.Anthony.Mark.Donald.Steven.Paul.Andrew.Joshua.Kenneth.Kevin.Brian.George.Edward.Ronald.Timothy.Jason.Jeffrey.Ryan.Jacob.Gary.Nicholas.Eric.Jonathan.Stephen.Larry.Justin.Scott.Brandon.Benjamin.Samuel.Gregory.Frank.Alexander.Raymond.Patrick.Jack.Dennis.Jerry".split("."),
|
|
@@ -64,7 +64,6 @@ var e = {
|
|
|
64
64
|
"PhD"
|
|
65
65
|
]
|
|
66
66
|
};
|
|
67
|
-
//#endregion
|
|
68
67
|
export { e as PERSON_DATA_EN };
|
|
69
68
|
|
|
70
69
|
//# sourceMappingURL=en.js.map
|
package/dist/person/person.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/
|
|
1
|
+
const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/boolean.cjs"),n=require("../_helpers/string.cjs");var r=e.__exportAll({firstName:()=>firstName,fullName:()=>fullName,gender:()=>gender,jobTitle:()=>jobTitle,lastName:()=>lastName,prefix:()=>prefix,suffix:()=>suffix});function data(e){return e.locale.person}function firstName(e){let r=data(e),i=t.boolean(e.source)?r.firstNameMale:r.firstNameFemale;return n.pick(i,e.source)}function lastName(e){return n.pick(data(e).lastName,e.source)}function fullName(e){return`${firstName(e)} ${lastName(e)}`}function gender(e){return n.pick(data(e).gender,e.source)}function prefix(e){return n.pick(data(e).prefix,e.source)}function suffix(e){let t=data(e);return t.suffix.length===0?``:n.pick(t.suffix,e.source)}function jobTitle(e){let t=data(e);return`${n.pick(t.jobAreas,e.source)} ${n.pick(t.jobTypes,e.source)}`}exports.firstName=firstName,exports.fullName=fullName,exports.gender=gender,exports.jobTitle=jobTitle,exports.lastName=lastName,Object.defineProperty(exports,"person_exports",{enumerable:!0,get:function(){return r}}),exports.prefix=prefix,exports.suffix=suffix;
|
|
2
2
|
//# sourceMappingURL=person.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.cjs","names":["boolean","pick","require_runtime","
|
|
1
|
+
{"version":3,"file":"person.cjs","names":["boolean","pick","require_runtime","require_boolean","require_string","person_exports","ctx","d","pool"],"sources":["../../src/person/person.ts"],"sourcesContent":["import { boolean } from '../_helpers/boolean';\nimport { pick } from '../_helpers/string';\nimport type { IllusionistContext, PersonLocaleData } from '../types';\n\nfunction data(ctx: IllusionistContext): PersonLocaleData {\n return ctx.locale.person;\n}\n\nexport function firstName(ctx: IllusionistContext): string {\n const d = data(ctx);\n const pool = boolean(ctx.source) ? d.firstNameMale : d.firstNameFemale;\n return pick(pool, ctx.source)!;\n}\n\nexport function lastName(ctx: IllusionistContext): string {\n return pick(data(ctx).lastName, ctx.source)!;\n}\n\nexport function fullName(ctx: IllusionistContext): string {\n return `${firstName(ctx)} ${lastName(ctx)}`;\n}\n\nexport function gender(ctx: IllusionistContext): string {\n return pick(data(ctx).gender, ctx.source)!;\n}\n\nexport function prefix(ctx: IllusionistContext): string {\n return pick(data(ctx).prefix, ctx.source)!;\n}\n\nexport function suffix(ctx: IllusionistContext): string {\n const d = data(ctx);\n if (d.suffix.length === 0) return '';\n return pick(d.suffix, ctx.source)!;\n}\n\nexport function jobTitle(ctx: IllusionistContext): string {\n const d = data(ctx);\n return `${pick(d.jobAreas, ctx.source)!} ${pick(d.jobTypes, ctx.source)!}`;\n}\n"],"mappings":"A,qSAIA,SAAS,KAAK,EAA2C,CACvD,OAAOM,EAAI,OAAO,MACpB,CAEA,SAAgB,UAAU,EAAiC,CACzD,IAAMC,EAAI,KAAKD,CAAG,EACZE,EAAOR,EAAAA,QAAQM,EAAI,MAAM,EAAIC,EAAE,cAAgBA,EAAE,gBACvD,OAAON,EAAAA,KAAKO,EAAMF,EAAI,MAAM,CAC9B,CAEA,SAAgB,SAAS,EAAiC,CACxD,OAAOL,EAAAA,KAAK,KAAKK,CAAG,CAAC,CAAC,SAAUA,EAAI,MAAM,CAC5C,CAEA,SAAgB,SAAS,EAAiC,CACxD,MAAO,GAAG,UAAUA,CAAG,EAAE,GAAG,SAASA,CAAG,GAC1C,CAEA,SAAgB,OAAO,EAAiC,CACtD,OAAOL,EAAAA,KAAK,KAAKK,CAAG,CAAC,CAAC,OAAQA,EAAI,MAAM,CAC1C,CAEA,SAAgB,OAAO,EAAiC,CACtD,OAAOL,EAAAA,KAAK,KAAKK,CAAG,CAAC,CAAC,OAAQA,EAAI,MAAM,CAC1C,CAEA,SAAgB,OAAO,EAAiC,CACtD,IAAMC,EAAI,KAAKD,CAAG,EAElB,OADIC,EAAE,OAAO,SAAW,EAAU,GAC3BN,EAAAA,KAAKM,EAAE,OAAQD,EAAI,MAAM,CAClC,CAEA,SAAgB,SAAS,EAAiC,CACxD,IAAMC,EAAI,KAAKD,CAAG,EAClB,MAAO,GAAGL,EAAAA,KAAKM,EAAE,SAAUD,EAAI,MAAM,EAAG,GAAGL,EAAAA,KAAKM,EAAE,SAAUD,EAAI,MAAM,GACxE,C"}
|
package/dist/person/person.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { boolean as t } from "../_helpers/boolean.js";
|
|
3
|
+
import { pick as n } from "../_helpers/string.js";
|
|
4
|
+
// src/person/person.ts
|
|
5
5
|
var r = /* @__PURE__ */ e({
|
|
6
6
|
firstName: () => firstName,
|
|
7
7
|
fullName: () => fullName,
|
|
@@ -15,30 +15,29 @@ function data(e) {
|
|
|
15
15
|
return e.locale.person;
|
|
16
16
|
}
|
|
17
17
|
function firstName(e) {
|
|
18
|
-
let r = data(e), i =
|
|
19
|
-
return
|
|
18
|
+
let r = data(e), i = t(e.source) ? r.firstNameMale : r.firstNameFemale;
|
|
19
|
+
return n(i, e.source);
|
|
20
20
|
}
|
|
21
21
|
function lastName(e) {
|
|
22
|
-
return
|
|
22
|
+
return n(data(e).lastName, e.source);
|
|
23
23
|
}
|
|
24
24
|
function fullName(e) {
|
|
25
25
|
return `${firstName(e)} ${lastName(e)}`;
|
|
26
26
|
}
|
|
27
27
|
function gender(e) {
|
|
28
|
-
return
|
|
28
|
+
return n(data(e).gender, e.source);
|
|
29
29
|
}
|
|
30
30
|
function prefix(e) {
|
|
31
|
-
return
|
|
31
|
+
return n(data(e).prefix, e.source);
|
|
32
32
|
}
|
|
33
33
|
function suffix(e) {
|
|
34
|
-
let
|
|
35
|
-
return
|
|
34
|
+
let t = data(e);
|
|
35
|
+
return t.suffix.length === 0 ? "" : n(t.suffix, e.source);
|
|
36
36
|
}
|
|
37
37
|
function jobTitle(e) {
|
|
38
|
-
let
|
|
39
|
-
return `${t
|
|
38
|
+
let t = data(e);
|
|
39
|
+
return `${n(t.jobAreas, e.source)} ${n(t.jobTypes, e.source)}`;
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { firstName, fullName, gender, jobTitle, lastName, r as person_exports, prefix, suffix };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=person.js.map
|
package/dist/seed/create-seed.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IllusionistSeedError as e } from "../errors.js";
|
|
2
2
|
import { mulberry32 as t } from "./mulberry32.js";
|
|
3
|
-
|
|
3
|
+
// src/seed/create-seed.ts
|
|
4
4
|
function createSeed(n) {
|
|
5
5
|
if (n == null) return cryptoSource();
|
|
6
6
|
if (typeof n == "number") {
|
|
@@ -16,7 +16,6 @@ function cryptoSource() {
|
|
|
16
16
|
return crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0] / 4294967296;
|
|
17
17
|
} };
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { createSeed };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=create-seed.js.map
|
package/dist/seed/mulberry32.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/seed/mulberry32.ts
|
|
2
2
|
function mulberry32(e) {
|
|
3
3
|
let t = e >>> 0;
|
|
4
4
|
return { next() {
|
|
@@ -7,7 +7,6 @@ function mulberry32(e) {
|
|
|
7
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
8
|
} };
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { mulberry32 };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=mulberry32.js.map
|
package/dist/system/data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/system/data.ts
|
|
2
2
|
var e = {
|
|
3
3
|
cronExpressions: [
|
|
4
4
|
"0 * * * *",
|
|
@@ -70,7 +70,6 @@ var e = {
|
|
|
70
70
|
zip: "application/zip"
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
//#endregion
|
|
74
73
|
export { e as SYSTEM_DATA };
|
|
75
74
|
|
|
76
75
|
//# sourceMappingURL=data.js.map
|
package/dist/system/system.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { int as t } from "../_helpers/int.js";
|
|
3
3
|
import { alphanumeric as n, pick as r } from "../_helpers/string.js";
|
|
4
4
|
import { SYSTEM_DATA as i } from "./data.js";
|
|
5
|
-
|
|
5
|
+
// src/system/system.ts
|
|
6
6
|
var a = /* @__PURE__ */ e({
|
|
7
7
|
cron: () => cron,
|
|
8
8
|
fileExtension: () => fileExtension,
|
|
@@ -63,7 +63,6 @@ function process(e) {
|
|
|
63
63
|
"bash"
|
|
64
64
|
], e.source)}_${n(t(3, 8, e.source), e.source)}`;
|
|
65
65
|
}
|
|
66
|
-
//#endregion
|
|
67
66
|
export { cron, fileExtension, fileName, filePath, mimeType, port, process, semver, a as system_exports, uuid };
|
|
68
67
|
|
|
69
68
|
//# sourceMappingURL=system.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vielzeug/illusionist",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.6",
|
|
4
4
|
"description": "Typed, deterministic, locale-aware fake data generator with seeded PRNG",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -59,26 +59,26 @@
|
|
|
59
59
|
"registry": "https://registry.npmjs.org/"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
|
-
"build": "
|
|
62
|
+
"build": "bun run --silent verify:exports && vite build && bun run --silent build:bundle && bun run --silent build:types",
|
|
63
63
|
"build:bundle": "vite build --config vite.bundle.config.ts",
|
|
64
64
|
"build:types": "tsc -p tsconfig.declarations.json",
|
|
65
65
|
"fix": "biome check --write src",
|
|
66
66
|
"lint": "biome ci src",
|
|
67
|
-
"prepublishOnly": "
|
|
67
|
+
"prepublishOnly": "bun run --silent build",
|
|
68
68
|
"preview": "vite preview",
|
|
69
|
-
"sync:exports": "
|
|
70
|
-
"test": "
|
|
71
|
-
"verify:exports": "
|
|
69
|
+
"sync:exports": "bun ./scripts/sync-exports.mjs",
|
|
70
|
+
"test": "bun run --silent verify:exports && vitest",
|
|
71
|
+
"verify:exports": "bun ./scripts/sync-exports.mjs --check"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@vielzeug/arsenal": "26.11.
|
|
75
|
-
"@vielzeug/coins": "26.11.
|
|
76
|
-
"@vielzeug/tempo": "26.11.
|
|
74
|
+
"@vielzeug/arsenal": "26.11.6",
|
|
75
|
+
"@vielzeug/coins": "26.11.6",
|
|
76
|
+
"@vielzeug/tempo": "26.11.6"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@types/node": "^26.6.
|
|
79
|
+
"@types/node": "^26.6.6",
|
|
80
80
|
"typescript": "^6.0.3",
|
|
81
|
-
"vite": "^8.3.
|
|
82
|
-
"vitest": "^5.0
|
|
81
|
+
"vite": "^8.3.6",
|
|
82
|
+
"vitest": "^5.1.0"
|
|
83
83
|
}
|
|
84
84
|
}
|