@seedprotocol/sdk 0.4.22 → 0.4.23

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 (104) hide show
  1. package/dist/{ArweaveClient-B-vm2Xae.js → ArweaveClient-DoBABTLW.js} +3 -4
  2. package/dist/{ArweaveClient-B-vm2Xae.js.map → ArweaveClient-DoBABTLW.js.map} +1 -1
  3. package/dist/{ArweaveClient-C-eLH0zU.js → ArweaveClient-KF_T3NSr.js} +3 -4
  4. package/dist/{ArweaveClient-C-eLH0zU.js.map → ArweaveClient-KF_T3NSr.js.map} +1 -1
  5. package/dist/{Db-nir1xVHg.js → Db-Cg7Q5gIc.js} +4 -5
  6. package/dist/{Db-nir1xVHg.js.map → Db-Cg7Q5gIc.js.map} +1 -1
  7. package/dist/{Db-B7whB3oJ.js → Db-DA_e7Jcc.js} +4 -5
  8. package/dist/{Db-B7whB3oJ.js.map → Db-DA_e7Jcc.js.map} +1 -1
  9. package/dist/{EasClient-BH_feMaX.js → EasClient-B4VivHxM.js} +2 -3
  10. package/dist/{EasClient-BH_feMaX.js.map → EasClient-B4VivHxM.js.map} +1 -1
  11. package/dist/{EasClient-CFguAKBp.js → EasClient-CVPHYGNP.js} +2 -3
  12. package/dist/{EasClient-CFguAKBp.js.map → EasClient-CVPHYGNP.js.map} +1 -1
  13. package/dist/{FileManager-C2uXql_C.js → FileManager-BOxbzROS.js} +2 -3
  14. package/dist/{FileManager-C2uXql_C.js.map → FileManager-BOxbzROS.js.map} +1 -1
  15. package/dist/{FileManager-BR3jtuSl.js → FileManager-Ba5BCbCL.js} +2 -3
  16. package/dist/{FileManager-BR3jtuSl.js.map → FileManager-Ba5BCbCL.js.map} +1 -1
  17. package/dist/{ModelProperty-CIeLasI4.js → ModelProperty-D6JLRqQW.js} +17 -18
  18. package/dist/ModelProperty-D6JLRqQW.js.map +1 -0
  19. package/dist/{PathResolver-CZoSnHBU.js → PathResolver-D7WqjJCo.js} +2 -3
  20. package/dist/{PathResolver-CZoSnHBU.js.map → PathResolver-D7WqjJCo.js.map} +1 -1
  21. package/dist/{PathResolver-DnrG1hUX.js → PathResolver-DHTAlCzo.js} +2 -3
  22. package/dist/{PathResolver-DnrG1hUX.js.map → PathResolver-DHTAlCzo.js.map} +1 -1
  23. package/dist/{QueryClient-PqOg8mcw.js → QueryClient-B12y2daD.js} +2 -3
  24. package/dist/{QueryClient-PqOg8mcw.js.map → QueryClient-B12y2daD.js.map} +1 -1
  25. package/dist/{QueryClient-DJOrJZRR.js → QueryClient-BCxuWg7f.js} +2 -3
  26. package/dist/{QueryClient-DJOrJZRR.js.map → QueryClient-BCxuWg7f.js.map} +1 -1
  27. package/dist/{Schema-B3YQHTtu.js → Schema-B5_B8nM5.js} +22 -22
  28. package/dist/{Schema-B3YQHTtu.js.map → Schema-B5_B8nM5.js.map} +1 -1
  29. package/dist/{SchemaValidationService-C4DIwn8Z.js → SchemaValidationService-DXYRdSYa.js} +2 -3
  30. package/dist/{SchemaValidationService-C4DIwn8Z.js.map → SchemaValidationService-DXYRdSYa.js.map} +1 -1
  31. package/dist/{backfillMetadataPropertyIds-CBlRaU_M.js → backfillMetadataPropertyIds-BWEhAJPS.js} +2 -3
  32. package/dist/{backfillMetadataPropertyIds-CBlRaU_M.js.map → backfillMetadataPropertyIds-BWEhAJPS.js.map} +1 -1
  33. package/dist/cjs/{ModelProperty-tfM38NL4.js → ModelProperty-Ov1_YL9l.js} +17 -18
  34. package/dist/cjs/{ModelProperty-tfM38NL4.js.map → ModelProperty-Ov1_YL9l.js.map} +1 -1
  35. package/dist/cjs/{Schema-44NqLqMV.js → Schema-CeG5iRX_.js} +20 -21
  36. package/dist/cjs/{Schema-44NqLqMV.js.map → Schema-CeG5iRX_.js.map} +1 -1
  37. package/dist/cjs/{SchemaValidationService-Cq_YBzFN.js → SchemaValidationService-C8mdrNnp.js} +2 -3
  38. package/dist/cjs/{SchemaValidationService-Cq_YBzFN.js.map → SchemaValidationService-C8mdrNnp.js.map} +1 -1
  39. package/dist/cjs/{backfillMetadataPropertyIds-D1nLJAhB.js → backfillMetadataPropertyIds-LDYghZxU.js} +2 -3
  40. package/dist/cjs/{backfillMetadataPropertyIds-D1nLJAhB.js.map → backfillMetadataPropertyIds-LDYghZxU.js.map} +1 -1
  41. package/dist/cjs/{getItem-BRoq91YU.js → getItem-CW3BFytl.js} +2 -3
  42. package/dist/cjs/{getItem-BRoq91YU.js.map → getItem-CW3BFytl.js.map} +1 -1
  43. package/dist/cjs/{getPublishPayload-ddl-1x6R.js → getPublishPayload-C0hWIYCX.js} +11 -12
  44. package/dist/cjs/{getPublishPayload-ddl-1x6R.js.map → getPublishPayload-C0hWIYCX.js.map} +1 -1
  45. package/dist/cjs/{getPublishUploads-BljRx4o4.js → getPublishUploads-CMpPR2JJ.js} +4 -5
  46. package/dist/cjs/{getPublishUploads-BljRx4o4.js.map → getPublishUploads-CMpPR2JJ.js.map} +1 -1
  47. package/dist/cjs/{getSegmentedItemProperties-iK5kepzl.js → getSegmentedItemProperties-B4ao_B1Q.js} +3 -3
  48. package/dist/cjs/{getSegmentedItemProperties-iK5kepzl.js.map → getSegmentedItemProperties-B4ao_B1Q.js.map} +1 -1
  49. package/dist/cjs/{index-DqSDhOp3.js → index-Dty7eE10.js} +3 -4
  50. package/dist/cjs/index-Dty7eE10.js.map +1 -0
  51. package/dist/cjs/{index-C6rrqy3z.js → index-Far6-WGM.js} +89 -40
  52. package/dist/cjs/index-Far6-WGM.js.map +1 -0
  53. package/dist/cjs/{ownership-CXlKAj4o.js → ownership-TCXiKRY_.js} +2 -3
  54. package/dist/cjs/{ownership-CXlKAj4o.js.map → ownership-TCXiKRY_.js.map} +1 -1
  55. package/dist/cjs/{property-2D7P6a2q.js → property-BT7i8Tl-.js} +4 -5
  56. package/dist/cjs/{property-2D7P6a2q.js.map → property-BT7i8Tl-.js.map} +1 -1
  57. package/dist/cjs/{syncDbWithEas-DcKL-_Pb.js → syncDbWithEas-DUi78csI.js} +5 -6
  58. package/dist/cjs/{syncDbWithEas-DcKL-_Pb.js.map → syncDbWithEas-DUi78csI.js.map} +1 -1
  59. package/dist/{getItem-CV3yTCRt.js → getItem-D5_bPYyC.js} +2 -3
  60. package/dist/{getItem-CV3yTCRt.js.map → getItem-D5_bPYyC.js.map} +1 -1
  61. package/dist/{getPublishPayload-Ddc_LGPs.js → getPublishPayload-DEdHgrgC.js} +11 -12
  62. package/dist/getPublishPayload-DEdHgrgC.js.map +1 -0
  63. package/dist/{getPublishUploads-Cf2J-5FR.js → getPublishUploads-CH72lAID.js} +4 -5
  64. package/dist/{getPublishUploads-Cf2J-5FR.js.map → getPublishUploads-CH72lAID.js.map} +1 -1
  65. package/dist/{getSegmentedItemProperties-B2mzArFD.js → getSegmentedItemProperties-Cp92QUHQ.js} +3 -3
  66. package/dist/{getSegmentedItemProperties-B2mzArFD.js.map → getSegmentedItemProperties-Cp92QUHQ.js.map} +1 -1
  67. package/dist/{index-DUMXLKJr.js → index-18lln0cM.js} +103 -54
  68. package/dist/{index-DUMXLKJr.js.map → index-18lln0cM.js.map} +1 -1
  69. package/dist/{index-BRo7D3s1.js → index-Bp0ChnQr.js} +2 -2
  70. package/dist/index-Bp0ChnQr.js.map +1 -0
  71. package/dist/{index-3Ekqb4QB.js → index-DB3nZ0lK.js} +3 -4
  72. package/dist/index-DB3nZ0lK.js.map +1 -0
  73. package/dist/main.cjs +1 -2
  74. package/dist/main.cjs.map +1 -1
  75. package/dist/main.js +13 -14
  76. package/dist/main.js.map +1 -1
  77. package/dist/node.js +10 -11
  78. package/dist/node.js.map +1 -1
  79. package/dist/{ownership-TR-mIjJh.js → ownership-D-KsIkxM.js} +2 -3
  80. package/dist/{ownership-TR-mIjJh.js.map → ownership-D-KsIkxM.js.map} +1 -1
  81. package/dist/{property-BSNWvgei.js → property-DViA9nga.js} +5 -6
  82. package/dist/property-DViA9nga.js.map +1 -0
  83. package/dist/{queries-0FZBThGQ.js → queries-ANFHy2e0.js} +2 -2
  84. package/dist/{queries-0FZBThGQ.js.map → queries-ANFHy2e0.js.map} +1 -1
  85. package/dist/src/eventBus.d.ts +13 -2
  86. package/dist/src/eventBus.d.ts.map +1 -1
  87. package/dist/src/vite/index.d.ts.map +1 -1
  88. package/dist/{syncDbWithEas-CaytdS8D.js → syncDbWithEas-m-_3Ds7d.js} +6 -7
  89. package/dist/syncDbWithEas-m-_3Ds7d.js.map +1 -0
  90. package/dist/{updateSeedRevokedAt-CfUXirik.js → updateSeedRevokedAt-BvAK-Rfh.js} +2 -2
  91. package/dist/{updateSeedRevokedAt-CfUXirik.js.map → updateSeedRevokedAt-BvAK-Rfh.js.map} +1 -1
  92. package/dist/vite.cjs +100 -26
  93. package/dist/vite.cjs.map +1 -1
  94. package/dist/vite.js +100 -26
  95. package/dist/vite.js.map +1 -1
  96. package/package.json +1 -1
  97. package/dist/ModelProperty-CIeLasI4.js.map +0 -1
  98. package/dist/cjs/index-C6rrqy3z.js.map +0 -1
  99. package/dist/cjs/index-DqSDhOp3.js.map +0 -1
  100. package/dist/getPublishPayload-Ddc_LGPs.js.map +0 -1
  101. package/dist/index-3Ekqb4QB.js.map +0 -1
  102. package/dist/index-BRo7D3s1.js.map +0 -1
  103. package/dist/property-BSNWvgei.js.map +0 -1
  104. package/dist/syncDbWithEas-CaytdS8D.js.map +0 -1
@@ -14,7 +14,6 @@ var typebox = require('@sinclair/typebox');
14
14
  var casing = require('drizzle-orm/casing');
15
15
  var lodashEs = require('lodash-es');
16
16
  var rxjs = require('rxjs');
17
- var EventEmitter = require('eventemitter3');
18
17
  var Arweave = require('arweave');
19
18
  var sha3 = require('js-sha3');
20
19
  var fsAsync = require('fs/promises');
@@ -2250,7 +2249,7 @@ const createPropertyInstances = async (propertyFileIds) => {
2250
2249
  return;
2251
2250
  }
2252
2251
  try {
2253
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-tfM38NL4.js'); });
2252
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-Ov1_YL9l.js'); });
2254
2253
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
2255
2254
  if (!ModelProperty) {
2256
2255
  logger$y('createPropertyInstances: ModelProperty not available from dynamic import');
@@ -2434,7 +2433,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
2434
2433
  // Step 2: Fallback to Schema context (only if database doesn't have the model)
2435
2434
  // This handles the case where model exists in schema file but not yet in database
2436
2435
  try {
2437
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); });
2436
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); });
2438
2437
  const { Schema } = schemaMod;
2439
2438
  const schema = Schema.create(schemaName, { waitForReady: false });
2440
2439
  const schemaSnapshot = schema.getService().getSnapshot();
@@ -2678,7 +2677,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
2678
2677
  }
2679
2678
  // Mark schema as draft when a new model is created so saveNewVersion() can persist it
2680
2679
  try {
2681
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); });
2680
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); });
2682
2681
  const { Schema } = schemaMod;
2683
2682
  const schema = Schema.create(schemaName, { waitForReady: false });
2684
2683
  schema.getService().send({ type: 'markAsDraft', propertyKey: 'schema:models' });
@@ -2722,10 +2721,10 @@ const validateModel = xstate.fromCallback(({ sendBack, input: { context } }) =>
2722
2721
  const _validateModel = async () => {
2723
2722
  try {
2724
2723
  // Use dynamic imports to break circular dependencies
2725
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-Cq_YBzFN.js'); });
2724
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-C8mdrNnp.js'); });
2726
2725
  const { SchemaValidationService } = validationServiceMod;
2727
2726
  const validationService = new SchemaValidationService();
2728
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); });
2727
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); });
2729
2728
  const { Schema } = schemaMod;
2730
2729
  // Validate model structure
2731
2730
  const structureResult = validationService.validateModelStructure(context);
@@ -2835,7 +2834,7 @@ const createModelProperties = xstate.fromCallback(({ sendBack, input }) => {
2835
2834
  return;
2836
2835
  }
2837
2836
  logger$w(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
2838
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-tfM38NL4.js'); });
2837
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-Ov1_YL9l.js'); });
2839
2838
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
2840
2839
  if (!ModelProperty) {
2841
2840
  logger$w('ModelProperty not available from dynamic import');
@@ -2939,7 +2938,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
2939
2938
  const structureMsg = `[validateEntity] Validating model structure`;
2940
2939
  logger$v(structureMsg);
2941
2940
  // Use existing Model validation
2942
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-Cq_YBzFN.js'); });
2941
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-C8mdrNnp.js'); });
2943
2942
  const { SchemaValidationService } = validationServiceMod;
2944
2943
  const validationService = new SchemaValidationService();
2945
2944
  // Validate model structure
@@ -2957,7 +2956,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
2957
2956
  if (entityInput.entityData.schemaName) {
2958
2957
  try {
2959
2958
  logger$v(`[validateEntity] Validating model against schema "${entityInput.entityData.schemaName}"`);
2960
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); });
2959
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); });
2961
2960
  const { Schema } = schemaMod;
2962
2961
  const schema = Schema.create(entityInput.entityData.schemaName, {
2963
2962
  waitForReady: false,
@@ -2993,7 +2992,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
2993
2992
  }
2994
2993
  else if (entityInput.entityType === 'modelProperty') {
2995
2994
  // Use existing ModelProperty validation
2996
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-Cq_YBzFN.js'); });
2995
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-C8mdrNnp.js'); });
2997
2996
  const { SchemaValidationService } = validationServiceMod;
2998
2997
  const validationService = new SchemaValidationService();
2999
2998
  // Validate property structure
@@ -3008,7 +3007,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
3008
3007
  // If schema name and model name provided, validate against schema
3009
3008
  if (entityInput.entityData._schemaName && entityInput.entityData.modelName) {
3010
3009
  try {
3011
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); });
3010
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); });
3012
3011
  const { Schema } = schemaMod;
3013
3012
  const schema = Schema.create(entityInput.entityData._schemaName, {
3014
3013
  waitForReady: false,
@@ -3037,7 +3036,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
3037
3036
  }
3038
3037
  else if (entityInput.entityType === 'schema') {
3039
3038
  // Schema validation - use existing validation
3040
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-Cq_YBzFN.js'); });
3039
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-C8mdrNnp.js'); });
3041
3040
  const { SchemaValidationService } = validationServiceMod;
3042
3041
  const validationService = new SchemaValidationService();
3043
3042
  const schemaResult = validationService.validateSchema(entityInput.entityData);
@@ -4989,7 +4988,7 @@ const writeToDatabase = xstate.fromCallback(({ sendBack, input }) => {
4989
4988
  // initial write completes is not overwritten by the stale requestWrite payload.
4990
4989
  let dataToWrite = input.entityData;
4991
4990
  try {
4992
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-tfM38NL4.js'); });
4991
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-Ov1_YL9l.js'); });
4993
4992
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
4994
4993
  if (ModelProperty && typeof ModelProperty.getById === 'function') {
4995
4994
  const instance = ModelProperty.getById(input.entityId);
@@ -5369,7 +5368,7 @@ const modelMachine = xstate.setup({
5369
5368
  // Create ModelProperty instances for any new property IDs
5370
5369
  if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
5371
5370
  // Import and create instances asynchronously (fire-and-forget)
5372
- Promise.resolve().then(function () { return require('./ModelProperty-tfM38NL4.js'); }).then(({ ModelProperty }) => {
5371
+ Promise.resolve().then(function () { return require('./ModelProperty-Ov1_YL9l.js'); }).then(({ ModelProperty }) => {
5373
5372
  const createPromises = newPropertyIds.map(async (propertyFileId) => {
5374
5373
  try {
5375
5374
  const property = await ModelProperty.createById(propertyFileId);
@@ -6750,7 +6749,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
6750
6749
  const schemaNameToTry = model$1?.schemaName;
6751
6750
  if (schemaNameToTry) {
6752
6751
  try {
6753
- const { Schema } = await Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); });
6752
+ const { Schema } = await Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); });
6754
6753
  const schemaInstance = Schema.create(schemaNameToTry, { waitForReady: false });
6755
6754
  const schemaContext = schemaInstance.getService().getSnapshot().context;
6756
6755
  if (schemaContext.models?.[modelName]?.properties) {
@@ -6799,7 +6798,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
6799
6798
  }
6800
6799
  }
6801
6800
  if (Object.keys(propertySchemas).length === 0) {
6802
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
6801
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
6803
6802
  const { ModelPropertyDataTypes } = schemaMod;
6804
6803
  const KNOWN_MODEL_FALLBACKS = {
6805
6804
  Post: {
@@ -6846,7 +6845,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
6846
6845
  // Infer propertyRecordSchema from metadata when schema is missing (enables persistence)
6847
6846
  let propSchema = propertySchemas[propertyName];
6848
6847
  if (!propSchema && isRefTypeFromMeta) {
6849
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
6848
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
6850
6849
  const { ModelPropertyDataTypes } = schemaMod;
6851
6850
  propSchema = {
6852
6851
  dataType: refSeedType === 'html' ? ModelPropertyDataTypes.Html
@@ -7103,9 +7102,9 @@ const runPublish = xstate.fromCallback(({ sendBack, input: { context } }) => {
7103
7102
  sendBack({ type: 'publishError', error: new Error(`Item not found for seedLocalId: ${seedLocalId}`) });
7104
7103
  return;
7105
7104
  }
7106
- const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-BljRx4o4.js'); });
7105
+ const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-CMpPR2JJ.js'); });
7107
7106
  const { getPublishUploads } = getPublishUploadsMod;
7108
- const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-ddl-1x6R.js'); });
7107
+ const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-C0hWIYCX.js'); });
7109
7108
  const { getPublishPayload } = getPublishPayloadMod;
7110
7109
  const uploads = await getPublishUploads(item);
7111
7110
  let uploadedTransactions = [];
@@ -7945,7 +7944,7 @@ const resolveRelatedValue = xstate.fromCallback(({ sendBack, input: { context }
7945
7944
  const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, populatedFromDb, schemaUid, } = context;
7946
7945
  const _resolveRelatedValue = async () => {
7947
7946
  // Use dynamic import to break circular dependency
7948
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
7947
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
7949
7948
  const { ModelPropertyDataTypes } = schemaMod;
7950
7949
  if (!propertyValue || !isRelation || populatedFromDb) {
7951
7950
  return;
@@ -8308,7 +8307,57 @@ function parseListPropertyValueFromStorage(raw) {
8308
8307
  return trimmed.split(',').map((s) => s.trim()).filter(Boolean);
8309
8308
  }
8310
8309
 
8311
- const eventEmitter = new EventEmitter();
8310
+ class SeedEventEmitter {
8311
+ constructor() {
8312
+ this.listeners = new Map();
8313
+ }
8314
+ on(event, listener) {
8315
+ const set = this.listeners.get(event) ?? new Set();
8316
+ set.add(listener);
8317
+ this.listeners.set(event, set);
8318
+ return this;
8319
+ }
8320
+ addListener(event, listener) {
8321
+ return this.on(event, listener);
8322
+ }
8323
+ once(event, listener) {
8324
+ const wrapped = (...args) => {
8325
+ this.off(event, wrapped);
8326
+ listener(...args);
8327
+ };
8328
+ return this.on(event, wrapped);
8329
+ }
8330
+ off(event, listener) {
8331
+ const set = this.listeners.get(event);
8332
+ if (!set)
8333
+ return this;
8334
+ set.delete(listener);
8335
+ if (set.size === 0)
8336
+ this.listeners.delete(event);
8337
+ return this;
8338
+ }
8339
+ removeListener(event, listener) {
8340
+ return this.off(event, listener);
8341
+ }
8342
+ removeAllListeners(event) {
8343
+ if (typeof event === 'undefined') {
8344
+ this.listeners.clear();
8345
+ return this;
8346
+ }
8347
+ this.listeners.delete(event);
8348
+ return this;
8349
+ }
8350
+ emit(event, ...args) {
8351
+ const set = this.listeners.get(event);
8352
+ if (!set || set.size === 0)
8353
+ return false;
8354
+ for (const listener of [...set]) {
8355
+ listener(...args);
8356
+ }
8357
+ return true;
8358
+ }
8359
+ }
8360
+ const eventEmitter = new SeedEventEmitter();
8312
8361
 
8313
8362
  const GET_FILES_METADATA = graphql(/* GraphQL */ `
8314
8363
  query GetFilesMetadata($where: AttestationWhereInput!) {
@@ -8903,7 +8952,7 @@ const hydrateFromDb = xstate.fromCallback(({ sendBack, input: { context } }) =>
8903
8952
  // to use dynamically imported ModelPropertyDataTypes
8904
8953
  const _hydrateFromDb = async () => {
8905
8954
  // Use dynamic import to break circular dependency
8906
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
8955
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
8907
8956
  const { ModelPropertyDataTypes } = schemaMod;
8908
8957
  const appDb = BaseDb.getAppDb();
8909
8958
  const whereClauses = [];
@@ -9266,7 +9315,7 @@ const loadOrCreateProperty = xstate.fromCallback(({ sendBack, input: { context }
9266
9315
  };
9267
9316
  // Merge with schema from file/DB to get validation rules (enum, pattern, etc.) - properties table doesn't store these
9268
9317
  try {
9269
- const { getPropertySchema } = await Promise.resolve().then(function () { return require('./property-2D7P6a2q.js'); });
9318
+ const { getPropertySchema } = await Promise.resolve().then(function () { return require('./property-BT7i8Tl-.js'); });
9270
9319
  let schemaFromFile = await getPropertySchema(normalizedModelName, propertyName);
9271
9320
  if (!schemaFromFile?.validation) {
9272
9321
  // Fallback: get validation from schemaData in database (Schema context may not be loaded yet)
@@ -9731,9 +9780,9 @@ const analyzeInput = xstate.fromCallback(({ sendBack, input: { context, event }
9731
9780
  }
9732
9781
  const _analyzeInput = async () => {
9733
9782
  // Use dynamic import to break circular dependency
9734
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
9783
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
9735
9784
  const { ModelPropertyDataTypes } = schemaMod;
9736
- const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-Cq_YBzFN.js'); });
9785
+ const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-C8mdrNnp.js'); });
9737
9786
  let propertyName = propertyNameRaw;
9738
9787
  if (!propertyName) {
9739
9788
  throw new Error('propertyName is required');
@@ -9931,7 +9980,7 @@ const createMetadata = async (metadataValues, propertyRecordSchema, options) =>
9931
9980
  propertyRecordSchema?.validation &&
9932
9981
  metadataValues.propertyValue != null &&
9933
9982
  metadataValues.propertyValue !== '') {
9934
- const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-Cq_YBzFN.js'); });
9983
+ const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-C8mdrNnp.js'); });
9935
9984
  const validationService = new SchemaValidationService();
9936
9985
  const validationResult = validationService.validatePropertyValue(metadataValues.propertyValue, propertyRecordSchema.dataType, propertyRecordSchema.validation, propertyRecordSchema.refValueType);
9937
9986
  if (!validationResult.isValid && validationResult.errors.length > 0) {
@@ -10522,7 +10571,7 @@ const saveRelation = xstate.fromCallback(({ sendBack, input: { context, event }
10522
10571
  }
10523
10572
  const _saveRelation = async () => {
10524
10573
  // Use dynamic import to break circular dependency
10525
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
10574
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
10526
10575
  const { ModelPropertyDataTypes } = schemaMod;
10527
10576
  if (!propertyNameRaw) {
10528
10577
  throw new Error('propertyName is required');
@@ -11566,7 +11615,7 @@ class ItemProperty {
11566
11615
  return;
11567
11616
  }
11568
11617
  // Use dynamic import to break circular dependency
11569
- const schemaMod = await Promise.resolve().then(function () { return require('./index-DqSDhOp3.js'); });
11618
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-Dty7eE10.js'); });
11570
11619
  const { ModelPropertyDataTypes } = schemaMod;
11571
11620
  const { context } = snapshot;
11572
11621
  const { propertyRecordSchema } = context;
@@ -12465,7 +12514,7 @@ class ItemProperty {
12465
12514
  }
12466
12515
  async save() {
12467
12516
  const ctx = this._getSnapshotContext();
12468
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-CXlKAj4o.js'); });
12517
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-TCXiKRY_.js'); });
12469
12518
  await assertItemOwned({
12470
12519
  seedLocalId: ctx?.seedLocalId ?? undefined,
12471
12520
  seedUid: ctx?.seedUid ?? undefined,
@@ -12804,7 +12853,7 @@ class Item {
12804
12853
  });
12805
12854
  };
12806
12855
  this.unpublish = async () => {
12807
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-CXlKAj4o.js'); });
12856
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-TCXiKRY_.js'); });
12808
12857
  const { getRevokeExecutor } = await Promise.resolve().then(function () { return publishConfig; });
12809
12858
  await assertItemOwned(this);
12810
12859
  const seedUid = this.seedUid;
@@ -12828,7 +12877,7 @@ class Item {
12828
12877
  this._service.send({ type: 'updateContext', revokedAt });
12829
12878
  };
12830
12879
  this.publish = async () => {
12831
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-CXlKAj4o.js'); });
12880
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-TCXiKRY_.js'); });
12832
12881
  await assertItemOwned(this);
12833
12882
  this._service.send({ type: 'startPublish' });
12834
12883
  return new Promise((resolve, reject) => {
@@ -12864,12 +12913,12 @@ class Item {
12864
12913
  };
12865
12914
  this.getPublishUploads = async (options) => {
12866
12915
  // Use dynamic import to break circular dependency
12867
- const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-BljRx4o4.js'); });
12916
+ const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-CMpPR2JJ.js'); });
12868
12917
  const { getPublishUploads } = getPublishUploadsMod;
12869
12918
  return await getPublishUploads(this, [], undefined, options);
12870
12919
  };
12871
12920
  this.getPublishPayload = async (uploadedTransactions, options) => {
12872
- const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-ddl-1x6R.js'); });
12921
+ const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-C0hWIYCX.js'); });
12873
12922
  const { getPublishPayload } = getPublishPayloadMod;
12874
12923
  return await getPublishPayload(this, uploadedTransactions, options);
12875
12924
  };
@@ -14363,7 +14412,7 @@ class Item {
14363
14412
  * Destroy the item: soft delete in DB, remove from caches, clean up subscriptions, stop service.
14364
14413
  */
14365
14414
  async destroy() {
14366
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-CXlKAj4o.js'); });
14415
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-TCXiKRY_.js'); });
14367
14416
  await assertItemOwned(this);
14368
14417
  const context = this._getSnapshotContext();
14369
14418
  const cacheKeys = Item.collectInstanceCacheKeysForInstance(this);
@@ -14519,7 +14568,7 @@ const runEasSync = xstate.fromPromise(async ({ input, }) => {
14519
14568
  requestPayload: input.requestPayload,
14520
14569
  persistedSnapshot: input.runningSnapshot,
14521
14570
  });
14522
- const { runSyncFromEas } = await Promise.resolve().then(function () { return require('./syncDbWithEas-DcKL-_Pb.js'); });
14571
+ const { runSyncFromEas } = await Promise.resolve().then(function () { return require('./syncDbWithEas-DUi78csI.js'); });
14523
14572
  try {
14524
14573
  await runSyncFromEas(toRunSyncArg(input.options));
14525
14574
  await finalizeEasSyncProcessRow(rowId, {
@@ -18134,7 +18183,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
18134
18183
  // Lazy import cache for ModelProperty to avoid circular dependency
18135
18184
  // Eagerly start loading to minimize delay on first access
18136
18185
  let ModelPropertyClass = null;
18137
- const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-tfM38NL4.js'); })
18186
+ const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-Ov1_YL9l.js'); })
18138
18187
  .then(module => {
18139
18188
  ModelPropertyClass = module.ModelProperty;
18140
18189
  return ModelPropertyClass;
@@ -18151,7 +18200,7 @@ function getModelProperty() {
18151
18200
  }
18152
18201
  // Lazy import cache for Schema to avoid circular dependency
18153
18202
  let SchemaClass = null;
18154
- const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-44NqLqMV.js'); })
18203
+ const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-CeG5iRX_.js'); })
18155
18204
  .then(module => {
18156
18205
  SchemaClass = module.Schema;
18157
18206
  return SchemaClass;
@@ -20105,7 +20154,7 @@ class Db extends BaseDb {
20105
20154
  // You can inspect what will happen before applying
20106
20155
  await apply();
20107
20156
  this.db = db;
20108
- const { backfillMetadataPropertyIds } = await Promise.resolve().then(function () { return require('./backfillMetadataPropertyIds-D1nLJAhB.js'); });
20157
+ const { backfillMetadataPropertyIds } = await Promise.resolve().then(function () { return require('./backfillMetadataPropertyIds-LDYghZxU.js'); });
20109
20158
  await backfillMetadataPropertyIds();
20110
20159
  return this.db;
20111
20160
  }
@@ -20752,7 +20801,7 @@ const getTsImport = async (filePath) => {
20752
20801
 
20753
20802
  // Get the directory of this file to resolve relative paths
20754
20803
  // @ts-ignore - rollup plugin-typescript doesn't recognize import.meta with module: "preserve"
20755
- const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cjs/index-C6rrqy3z.js', document.baseURI).href)));
20804
+ const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cjs/index-Far6-WGM.js', document.baseURI).href)));
20756
20805
  path.dirname(__filename$1);
20757
20806
  const commandExists = (command) => {
20758
20807
  try {
@@ -21350,4 +21399,4 @@ exports.versions = versions;
21350
21399
  exports.waitForEntityIdle = waitForEntityIdle;
21351
21400
  exports.withSeed = withSeed;
21352
21401
  exports.writeProcessMachine = writeProcessMachine;
21353
- //# sourceMappingURL=index-C6rrqy3z.js.map
21402
+ //# sourceMappingURL=index-Far6-WGM.js.map