@lunora/seed 1.0.0-alpha.13 → 1.0.0-alpha.15
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/dist/index.mjs +2 -2
- package/dist/packem_shared/{createSeedClient-CI9LRLTi.mjs → createSeedClient-CdcRtjwk.mjs} +1 -1
- package/dist/packem_shared/{plan-DirmkctQ.mjs → plan-mBVbPKKd.mjs} +3 -1
- package/dist/packem_shared/seedPlan-Dj-n0yJ8.mjs +1 -0
- package/dist/testing.mjs +1 -1
- package/package.json +5 -4
- package/dist/packem_shared/seedPlan-CDSmSgjY.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createSeedClient } from './packem_shared/createSeedClient-
|
|
2
|
-
export { s as seedPlan } from './packem_shared/plan-
|
|
1
|
+
export { createSeedClient } from './packem_shared/createSeedClient-CdcRtjwk.mjs';
|
|
2
|
+
export { s as seedPlan } from './packem_shared/plan-mBVbPKKd.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as setHashKey, s as seedPlan, c as copycat } from './plan-
|
|
1
|
+
import { a as setHashKey, s as seedPlan, c as copycat } from './plan-mBVbPKKd.mjs';
|
|
2
2
|
|
|
3
3
|
const isRange = (spec) => Array.isArray(spec) && spec.length === 2 && typeof spec[0] === "number" && typeof spec[1] === "number";
|
|
4
4
|
const resolveSpec = (spec, table, seed, defaultCount) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { faker } from '@faker-js/faker';
|
|
2
|
+
import { LunoraError } from '@lunora/errors';
|
|
2
3
|
import { optionalInner } from '@lunora/values';
|
|
3
4
|
|
|
4
5
|
let hashSalt = 0;
|
|
@@ -334,7 +335,8 @@ const generateString = (fieldName, input, constraints) => {
|
|
|
334
335
|
const value = rule === void 0 ? copycat.word(input) : rule.generate(input);
|
|
335
336
|
const { maxLength, minLength } = constraints;
|
|
336
337
|
if (maxLength !== void 0 && minLength !== void 0 && minLength > maxLength) {
|
|
337
|
-
throw new
|
|
338
|
+
throw new LunoraError(
|
|
339
|
+
"INTERNAL",
|
|
338
340
|
`Seed constraint error for field "${fieldName}": minLength (${String(minLength)}) > maxLength (${String(maxLength)}). Adjust the schema constraints.`
|
|
339
341
|
);
|
|
340
342
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { s as seedPlan } from './plan-mBVbPKKd.mjs';
|
package/dist/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as seedPlan, i as introspectSchema } from './packem_shared/plan-
|
|
1
|
+
import { s as seedPlan, i as introspectSchema } from './packem_shared/plan-mBVbPKKd.mjs';
|
|
2
2
|
|
|
3
3
|
const reviveRow = (row, bigintFields, bytesFields) => {
|
|
4
4
|
if (bigintFields.size === 0 && bytesFields.size === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/seed",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.15",
|
|
4
4
|
"description": "Schema-driven, deterministic database seeding for Lunora: realistic fake data from defineSchema",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -47,11 +47,12 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@faker-js/faker": "^10.5.0"
|
|
50
|
+
"@faker-js/faker": "^10.5.0",
|
|
51
|
+
"@lunora/errors": "1.0.0-alpha.1"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
|
-
"@lunora/server": "1.0.0-alpha.
|
|
54
|
-
"@lunora/values": "1.0.0-alpha.
|
|
54
|
+
"@lunora/server": "1.0.0-alpha.15",
|
|
55
|
+
"@lunora/values": "1.0.0-alpha.4"
|
|
55
56
|
},
|
|
56
57
|
"engines": {
|
|
57
58
|
"node": "^22.15.0 || >=24.11.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { s as seedPlan } from './plan-DirmkctQ.mjs';
|