@lunora/seed 1.0.0-alpha.13 → 1.0.0-alpha.14

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 CHANGED
@@ -1,2 +1,2 @@
1
- export { createSeedClient } from './packem_shared/createSeedClient-CI9LRLTi.mjs';
2
- export { s as seedPlan } from './packem_shared/plan-DirmkctQ.mjs';
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-DirmkctQ.mjs';
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 Error(
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-DirmkctQ.mjs';
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.13",
3
+ "version": "1.0.0-alpha.14",
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.13",
54
- "@lunora/values": "1.0.0-alpha.3"
54
+ "@lunora/server": "1.0.0-alpha.14",
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';