@seedprotocol/sdk 0.7.6 → 0.7.7-next.988.g7046e66

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 (246) hide show
  1. package/dist/{ClientManager-D6YA20jP.js → ClientManager-DdqRofK6.js} +297 -218
  2. package/dist/ClientManager-DdqRofK6.js.map +1 -0
  3. package/dist/{Item-B1MH0tXx.js → Item-DmK1PgK9.js} +233 -330
  4. package/dist/Item-DmK1PgK9.js.map +1 -0
  5. package/dist/{ModelProperty-Dw6dHdu_.js → ModelProperty-DaJAII87.js} +33 -33
  6. package/dist/ModelProperty-DaJAII87.js.map +1 -0
  7. package/dist/{Schema-DppObO6h.js → Schema-DhlbBQs8.js} +49 -58
  8. package/dist/Schema-DhlbBQs8.js.map +1 -0
  9. package/dist/{SchemaValidationService-DXQ-D531.js → SchemaValidationService-9KHQAYQ4.js} +9 -9
  10. package/dist/SchemaValidationService-9KHQAYQ4.js.map +1 -0
  11. package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js → backfillMetadataPropertyIds-qoVxUEEl.js} +3 -3
  12. package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js.map → backfillMetadataPropertyIds-qoVxUEEl.js.map} +1 -1
  13. package/dist/{configurePlatform-CVoh3JeR.js → configurePlatform-CazqABrK.js} +2 -2
  14. package/dist/{configurePlatform-CVoh3JeR.js.map → configurePlatform-CazqABrK.js.map} +1 -1
  15. package/dist/{detachRowsBeforeDelete-CtmIFpgV.js → detachRowsBeforeDelete-yatbnC27.js} +2 -2
  16. package/dist/{detachRowsBeforeDelete-CtmIFpgV.js.map → detachRowsBeforeDelete-yatbnC27.js.map} +1 -1
  17. package/dist/{discardNewDraft-oGYdB5vS.js → discardNewDraft-q1krLqtL.js} +5 -5
  18. package/dist/{discardNewDraft-oGYdB5vS.js.map → discardNewDraft-q1krLqtL.js.map} +1 -1
  19. package/dist/dist/{ClientManager-D6YA20jP.d.ts → ClientManager-DdqRofK6.d.ts} +2 -1
  20. package/dist/dist/ClientManager-DdqRofK6.d.ts.map +1 -0
  21. package/dist/dist/{Item-B1MH0tXx.d.ts → Item-DmK1PgK9.d.ts} +16 -23
  22. package/dist/dist/Item-DmK1PgK9.d.ts.map +1 -0
  23. package/dist/dist/{ModelProperty-Dw6dHdu_.d.ts → ModelProperty-DaJAII87.d.ts} +1 -1
  24. package/dist/dist/{ModelProperty-Dw6dHdu_.d.ts.map → ModelProperty-DaJAII87.d.ts.map} +1 -1
  25. package/dist/dist/{Schema-DppObO6h.d.ts → Schema-DhlbBQs8.d.ts} +2 -2
  26. package/dist/dist/{Schema-DppObO6h.d.ts.map → Schema-DhlbBQs8.d.ts.map} +1 -1
  27. package/dist/dist/{SchemaValidationService-DXQ-D531.d.ts → SchemaValidationService-9KHQAYQ4.d.ts} +4 -4
  28. package/dist/dist/{SchemaValidationService-DXQ-D531.d.ts.map → SchemaValidationService-9KHQAYQ4.d.ts.map} +1 -1
  29. package/dist/dist/{backfillMetadataPropertyIds-Uhzlwg9X.d.ts → backfillMetadataPropertyIds-qoVxUEEl.d.ts} +1 -1
  30. package/dist/dist/backfillMetadataPropertyIds-qoVxUEEl.d.ts.map +1 -0
  31. package/dist/dist/{configurePlatform-CVoh3JeR.d.ts → configurePlatform-CazqABrK.d.ts} +1 -1
  32. package/dist/dist/configurePlatform-CazqABrK.d.ts.map +1 -0
  33. package/dist/dist/{detachRowsBeforeDelete-CtmIFpgV.d.ts → detachRowsBeforeDelete-yatbnC27.d.ts} +1 -1
  34. package/dist/dist/detachRowsBeforeDelete-yatbnC27.d.ts.map +1 -0
  35. package/dist/dist/{discardNewDraft-oGYdB5vS.d.ts → discardNewDraft-q1krLqtL.d.ts} +1 -1
  36. package/dist/dist/discardNewDraft-q1krLqtL.d.ts.map +1 -0
  37. package/dist/dist/{eas-CSm5wmry.d.ts → eas-CPYt-QVJ.d.ts} +1 -1
  38. package/dist/dist/eas-CPYt-QVJ.d.ts.map +1 -0
  39. package/dist/dist/{errors-3tc6XkCB.d.ts → errors-DuFqGrjo.d.ts} +21 -8
  40. package/dist/dist/errors-DuFqGrjo.d.ts.map +1 -0
  41. package/dist/dist/{getItem-DM3a-7XE.d.ts → getItem-DPapr9uy.d.ts} +1 -1
  42. package/dist/dist/getItem-DPapr9uy.d.ts.map +1 -0
  43. package/dist/dist/{getPublishPayload-CJF0k5d8.d.ts → getPublishPayload-Dnv38ZW1.d.ts} +1 -1
  44. package/dist/dist/getPublishPayload-Dnv38ZW1.d.ts.map +1 -0
  45. package/dist/dist/{getPublishUploads-C7-fYIgX.d.ts → getPublishUploads-Dd7dCxNi.d.ts} +1 -1
  46. package/dist/dist/{getPublishUploads-C7-fYIgX.d.ts.map → getPublishUploads-Dd7dCxNi.d.ts.map} +1 -1
  47. package/dist/dist/{index--mmQ3LQu.d.ts → index-CTidoFhC.d.ts} +5 -5
  48. package/dist/dist/index-CTidoFhC.d.ts.map +1 -0
  49. package/dist/dist/{index-CrvIcVFJ.d.ts → index-DeUHrBqA.d.ts} +8 -4
  50. package/dist/dist/index-DeUHrBqA.d.ts.map +1 -0
  51. package/dist/dist/{index-B7yAoYli.d.ts → index-PnK3Ak9Z.d.ts} +1 -1
  52. package/dist/dist/{index-B7yAoYli.d.ts.map → index-PnK3Ak9Z.d.ts.map} +1 -1
  53. package/dist/dist/{index.browser-BmVS-c2C.d.ts → index.browser-CRvkFEhl.d.ts} +4 -4
  54. package/dist/dist/{index.browser-BmVS-c2C.d.ts.map → index.browser-CRvkFEhl.d.ts.map} +1 -1
  55. package/dist/dist/{index.node-BKpbCAWt.d.ts → index.node-DQTc7kEl.d.ts} +1 -1
  56. package/dist/dist/{index.node-BKpbCAWt.d.ts.map → index.node-DQTc7kEl.d.ts.map} +1 -1
  57. package/dist/dist/platform.browser.d.ts +2 -2
  58. package/dist/dist/platform.node.d.ts +2 -2
  59. package/dist/dist/{property-DQ-Owzki.d.ts → property-Dk_5t4-p.d.ts} +3 -3
  60. package/dist/dist/property-Dk_5t4-p.d.ts.map +1 -0
  61. package/dist/dist/{propertyValidationRules-BDhFjlwP.d.ts → propertyValidationRules-BtUZdfft.d.ts} +1 -1
  62. package/dist/dist/propertyValidationRules-BtUZdfft.d.ts.map +1 -0
  63. package/dist/dist/{publishDraftGraph-CzPd9oe9.d.ts → publishDraftGraph-CN7EsPVb.d.ts} +1 -1
  64. package/dist/dist/{publishDraftGraph-CzPd9oe9.d.ts.map → publishDraftGraph-CN7EsPVb.d.ts.map} +1 -1
  65. package/dist/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.d.ts → resetAmbiguousLegacyItemData-DzVlhD9u.d.ts} +1 -1
  66. package/dist/dist/resetAmbiguousLegacyItemData-DzVlhD9u.d.ts.map +1 -0
  67. package/dist/dist/{resolveModelForSyncedSeed-BgxtVCHI.d.ts → resolveModelForSyncedSeed-C_BzNN8r.d.ts} +1 -1
  68. package/dist/dist/resolveModelForSyncedSeed-C_BzNN8r.d.ts.map +1 -0
  69. package/dist/dist/{syncDbWithEas-Y5GysSCm.d.ts → syncDbWithEas-BMmxPq5o.d.ts} +1 -1
  70. package/dist/dist/syncDbWithEas-BMmxPq5o.d.ts.map +1 -0
  71. package/dist/dist/{tabEvents-D9x26vf2.d.ts → tabEvents-DyGJcILs.d.ts} +1 -1
  72. package/dist/dist/{tabEvents-D9x26vf2.d.ts.map → tabEvents-DyGJcILs.d.ts.map} +1 -1
  73. package/dist/dist/{tolerantWebAccess-BFU2t-SC.d.ts → tolerantWebAccess-Zxy2EUzu.d.ts} +1 -1
  74. package/dist/dist/{tolerantWebAccess-BFU2t-SC.d.ts.map → tolerantWebAccess-Zxy2EUzu.d.ts.map} +1 -1
  75. package/dist/dist/{updateSeedRevokedAt-CCF8WWYS.d.ts → updateSeedRevokedAt-DxhC4ABM.d.ts} +1 -1
  76. package/dist/dist/updateSeedRevokedAt-DxhC4ABM.d.ts.map +1 -0
  77. package/dist/{eas-CSm5wmry.js → eas-CPYt-QVJ.js} +4 -4
  78. package/dist/eas-CPYt-QVJ.js.map +1 -0
  79. package/dist/{errors-3tc6XkCB.js → errors-DuFqGrjo.js} +55 -41
  80. package/dist/errors-DuFqGrjo.js.map +1 -0
  81. package/dist/{getItem-DM3a-7XE.js → getItem-DPapr9uy.js} +4 -4
  82. package/dist/{getItem-DM3a-7XE.js.map → getItem-DPapr9uy.js.map} +1 -1
  83. package/dist/{getPublishPayload-CJF0k5d8.js → getPublishPayload-Dnv38ZW1.js} +16 -25
  84. package/dist/getPublishPayload-Dnv38ZW1.js.map +1 -0
  85. package/dist/{getPublishUploads-C7-fYIgX.js → getPublishUploads-Dd7dCxNi.js} +10 -10
  86. package/dist/getPublishUploads-Dd7dCxNi.js.map +1 -0
  87. package/dist/{index--mmQ3LQu.js → index-CTidoFhC.js} +9 -9
  88. package/dist/index-CTidoFhC.js.map +1 -0
  89. package/dist/{index-CrvIcVFJ.js → index-DeUHrBqA.js} +32 -15
  90. package/dist/index-DeUHrBqA.js.map +1 -0
  91. package/dist/{index-B7yAoYli.js → index-PnK3Ak9Z.js} +2 -2
  92. package/dist/index-PnK3Ak9Z.js.map +1 -0
  93. package/dist/{index.browser-BmVS-c2C.js → index.browser-CRvkFEhl.js} +26 -26
  94. package/dist/index.browser-CRvkFEhl.js.map +1 -0
  95. package/dist/{index.node-BKpbCAWt.js → index.node-DQTc7kEl.js} +7 -7
  96. package/dist/index.node-DQTc7kEl.js.map +1 -0
  97. package/dist/main.js +155 -26
  98. package/dist/main.js.map +1 -1
  99. package/dist/node.js +12 -12
  100. package/dist/node.js.map +1 -1
  101. package/dist/platform.browser.js +5 -5
  102. package/dist/platform.node.js +4 -4
  103. package/dist/{property-DQ-Owzki.js → property-Dk_5t4-p.js} +11 -11
  104. package/dist/property-Dk_5t4-p.js.map +1 -0
  105. package/dist/{propertyValidationRules-BDhFjlwP.js → propertyValidationRules-BtUZdfft.js} +6 -6
  106. package/dist/{propertyValidationRules-BDhFjlwP.js.map → propertyValidationRules-BtUZdfft.js.map} +1 -1
  107. package/dist/{publishDraftGraph-CzPd9oe9.js → publishDraftGraph-CN7EsPVb.js} +7 -7
  108. package/dist/publishDraftGraph-CN7EsPVb.js.map +1 -0
  109. package/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.js → resetAmbiguousLegacyItemData-DzVlhD9u.js} +2 -2
  110. package/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.js.map → resetAmbiguousLegacyItemData-DzVlhD9u.js.map} +1 -1
  111. package/dist/{resolveModelForSyncedSeed-BgxtVCHI.js → resolveModelForSyncedSeed-C_BzNN8r.js} +2 -2
  112. package/dist/{resolveModelForSyncedSeed-BgxtVCHI.js.map → resolveModelForSyncedSeed-C_BzNN8r.js.map} +1 -1
  113. package/dist/src/Item/Item.d.ts +2 -2
  114. package/dist/src/Item/Item.d.ts.map +1 -1
  115. package/dist/src/Item/errors.d.ts +25 -0
  116. package/dist/src/Item/errors.d.ts.map +1 -1
  117. package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +1 -1
  118. package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
  119. package/dist/src/ItemProperty/ItemProperty.d.ts +14 -3
  120. package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
  121. package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
  122. package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
  123. package/dist/src/ItemProperty/service/actors/resolveRelatedValue.d.ts.map +1 -1
  124. package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
  125. package/dist/src/ItemProperty/service/actors/saveValueToDb/index.d.ts +0 -1
  126. package/dist/src/ItemProperty/service/actors/saveValueToDb/index.d.ts.map +1 -1
  127. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
  128. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts.map +1 -1
  129. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
  130. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +1 -1
  131. package/dist/src/ItemProperty/service/propertyMachine.d.ts +1 -6
  132. package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
  133. package/dist/src/Model/Model.d.ts.map +1 -1
  134. package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
  135. package/dist/src/Schema/Schema.d.ts.map +1 -1
  136. package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
  137. package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts.map +1 -1
  138. package/dist/src/Schema/service/validation/SchemaValidationService.d.ts +1 -1
  139. package/dist/src/Schema/service/validation/SchemaValidationService.d.ts.map +1 -1
  140. package/dist/src/Schema/validation.d.ts.map +1 -1
  141. package/dist/src/browser/db/Db.d.ts +1 -1
  142. package/dist/src/browser/db/Db.d.ts.map +1 -1
  143. package/dist/src/browser/helpers/PathResolver.d.ts +2 -2
  144. package/dist/src/browser/helpers/PathResolver.d.ts.map +1 -1
  145. package/dist/src/browser/seed.d.ts +1 -1
  146. package/dist/src/browser/seed.d.ts.map +1 -1
  147. package/dist/src/browser/workers/imageResize.d.ts.map +1 -1
  148. package/dist/src/client/BaseClientManager.d.ts +1 -1
  149. package/dist/src/client/BaseClientManager.d.ts.map +1 -1
  150. package/dist/src/client/ClientManager.d.ts +1 -0
  151. package/dist/src/client/ClientManager.d.ts.map +1 -1
  152. package/dist/src/client/actors/addModelsToDb.d.ts.map +1 -1
  153. package/dist/src/client/actors/fileSystemInit.d.ts.map +1 -1
  154. package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
  155. package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
  156. package/dist/src/client/constants.d.ts.map +1 -1
  157. package/dist/src/db/clearStoredDisplayUrls.d.ts +18 -0
  158. package/dist/src/db/clearStoredDisplayUrls.d.ts.map +1 -0
  159. package/dist/src/db/read/getItems.d.ts.map +1 -1
  160. package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
  161. package/dist/src/db/read/nameMatchLevels.d.ts +7 -3
  162. package/dist/src/db/read/nameMatchLevels.d.ts.map +1 -1
  163. package/dist/src/db/write/applyPropertyAttestationUidsFromPublish.d.ts +10 -0
  164. package/dist/src/db/write/applyPropertyAttestationUidsFromPublish.d.ts.map +1 -1
  165. package/dist/src/db/write/deleteItem.d.ts +4 -0
  166. package/dist/src/db/write/deleteItem.d.ts.map +1 -1
  167. package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
  168. package/dist/src/eas.d.ts.map +1 -1
  169. package/dist/src/events/item/index.d.ts.map +1 -1
  170. package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
  171. package/dist/src/events/services/allItems.d.ts +1 -1
  172. package/dist/src/events/services/allItems.d.ts.map +1 -1
  173. package/dist/src/helpers/db.d.ts.map +1 -1
  174. package/dist/src/helpers/file/fetchAll/actors.d.ts.map +1 -1
  175. package/dist/src/helpers/file/fetchAll/index.d.ts.map +1 -1
  176. package/dist/src/helpers/schema.d.ts.map +1 -1
  177. package/dist/src/helpers/updateSchema.d.ts +1 -1
  178. package/dist/src/helpers/updateSchema.d.ts.map +1 -1
  179. package/dist/src/imports/json.d.ts.map +1 -1
  180. package/dist/src/imports/markdown.d.ts +1 -1
  181. package/dist/src/imports/markdown.d.ts.map +1 -1
  182. package/dist/src/index.d.ts +1 -1
  183. package/dist/src/index.d.ts.map +1 -1
  184. package/dist/src/interfaces/IItem.d.ts +1 -1
  185. package/dist/src/interfaces/IItem.d.ts.map +1 -1
  186. package/dist/src/interfaces/IItemProperty.d.ts +5 -1
  187. package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
  188. package/dist/src/services/write/actors/validateEntity.d.ts.map +1 -1
  189. package/dist/src/services/write/writeProcessMachine.d.ts +3 -4
  190. package/dist/src/services/write/writeProcessMachine.d.ts.map +1 -1
  191. package/dist/src/types/fileManager.d.ts.map +1 -1
  192. package/dist/src/types/item.d.ts +5 -4
  193. package/dist/src/types/item.d.ts.map +1 -1
  194. package/dist/src/types/model.d.ts.map +1 -1
  195. package/dist/src/types/property.d.ts +5 -5
  196. package/dist/src/types/property.d.ts.map +1 -1
  197. package/dist/{syncDbWithEas-Y5GysSCm.js → syncDbWithEas-BMmxPq5o.js} +17 -18
  198. package/dist/syncDbWithEas-BMmxPq5o.js.map +1 -0
  199. package/dist/{tabEvents-D9x26vf2.js → tabEvents-DyGJcILs.js} +4 -4
  200. package/dist/{tabEvents-D9x26vf2.js.map → tabEvents-DyGJcILs.js.map} +1 -1
  201. package/dist/{tolerantWebAccess-BFU2t-SC.js → tolerantWebAccess-Zxy2EUzu.js} +6 -6
  202. package/dist/{tolerantWebAccess-BFU2t-SC.js.map → tolerantWebAccess-Zxy2EUzu.js.map} +1 -1
  203. package/dist/{updateSeedRevokedAt-CCF8WWYS.js → updateSeedRevokedAt-DxhC4ABM.js} +3 -3
  204. package/dist/{updateSeedRevokedAt-CCF8WWYS.js.map → updateSeedRevokedAt-DxhC4ABM.js.map} +1 -1
  205. package/package.json +6 -6
  206. package/dist/ClientManager-D6YA20jP.js.map +0 -1
  207. package/dist/Item-B1MH0tXx.js.map +0 -1
  208. package/dist/ModelProperty-Dw6dHdu_.js.map +0 -1
  209. package/dist/Schema-DppObO6h.js.map +0 -1
  210. package/dist/SchemaValidationService-DXQ-D531.js.map +0 -1
  211. package/dist/dist/ClientManager-D6YA20jP.d.ts.map +0 -1
  212. package/dist/dist/Item-B1MH0tXx.d.ts.map +0 -1
  213. package/dist/dist/backfillMetadataPropertyIds-Uhzlwg9X.d.ts.map +0 -1
  214. package/dist/dist/configurePlatform-CVoh3JeR.d.ts.map +0 -1
  215. package/dist/dist/detachRowsBeforeDelete-CtmIFpgV.d.ts.map +0 -1
  216. package/dist/dist/discardNewDraft-oGYdB5vS.d.ts.map +0 -1
  217. package/dist/dist/eas-CSm5wmry.d.ts.map +0 -1
  218. package/dist/dist/errors-3tc6XkCB.d.ts.map +0 -1
  219. package/dist/dist/getItem-DM3a-7XE.d.ts.map +0 -1
  220. package/dist/dist/getPublishPayload-CJF0k5d8.d.ts.map +0 -1
  221. package/dist/dist/index--mmQ3LQu.d.ts.map +0 -1
  222. package/dist/dist/index-CrvIcVFJ.d.ts.map +0 -1
  223. package/dist/dist/property-DQ-Owzki.d.ts.map +0 -1
  224. package/dist/dist/propertyValidationRules-BDhFjlwP.d.ts.map +0 -1
  225. package/dist/dist/resetAmbiguousLegacyItemData-cXZm4NuG.d.ts.map +0 -1
  226. package/dist/dist/resolveModelForSyncedSeed-BgxtVCHI.d.ts.map +0 -1
  227. package/dist/dist/syncDbWithEas-Y5GysSCm.d.ts.map +0 -1
  228. package/dist/dist/updateSeedRevokedAt-CCF8WWYS.d.ts.map +0 -1
  229. package/dist/eas-CSm5wmry.js.map +0 -1
  230. package/dist/errors-3tc6XkCB.js.map +0 -1
  231. package/dist/getPublishPayload-CJF0k5d8.js.map +0 -1
  232. package/dist/getPublishUploads-C7-fYIgX.js.map +0 -1
  233. package/dist/index--mmQ3LQu.js.map +0 -1
  234. package/dist/index-B7yAoYli.js.map +0 -1
  235. package/dist/index-CrvIcVFJ.js.map +0 -1
  236. package/dist/index.browser-BmVS-c2C.js.map +0 -1
  237. package/dist/index.node-BKpbCAWt.js.map +0 -1
  238. package/dist/property-DQ-Owzki.js.map +0 -1
  239. package/dist/publishDraftGraph-CzPd9oe9.js.map +0 -1
  240. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts +0 -5
  241. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts.map +0 -1
  242. package/dist/src/db/write/recoverDeletedItem.d.ts +0 -5
  243. package/dist/src/db/write/recoverDeletedItem.d.ts.map +0 -1
  244. package/dist/src/interfaces/IEasClient.d.ts +0 -3
  245. package/dist/src/interfaces/IEasClient.d.ts.map +0 -1
  246. package/dist/syncDbWithEas-Y5GysSCm.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import path from 'path';
2
2
  import * as fs from 'fs';
3
3
  import fs__default from 'fs';
4
- import { h as BaseFileManager, B as BaseDb, j as appState, am as SEED_CONFIG_FILE, an as SEED_CONFIG_FALLBACKS } from './index-CrvIcVFJ.js';
5
- import { B as BasePathResolver } from './configurePlatform-CVoh3JeR.js';
4
+ import { h as BaseFileManager, B as BaseDb, j as appState, am as SEED_CONFIG_FILE, an as SEED_CONFIG_FALLBACKS } from './index-DeUHrBqA.js';
5
+ import { B as BasePathResolver } from './configurePlatform-CazqABrK.js';
6
6
  import debug from 'debug';
7
7
  import * as fsAsync from 'fs/promises';
8
8
  import { pathToFileURL } from 'url';
9
9
  import { fileURLToPath } from 'node:url';
10
- import { s as schema } from './index-B7yAoYli.js';
10
+ import { s as schema } from './index-PnK3Ak9Z.js';
11
11
  import { createClient } from '@libsql/client';
12
12
  import { drizzle } from 'drizzle-orm/libsql';
13
13
  import { migrate } from 'drizzle-orm/libsql/migrator';
@@ -253,7 +253,7 @@ class NodeDb {
253
253
  return this.db;
254
254
  }
255
255
  isAppDbReady() {
256
- return true;
256
+ return !!this.db;
257
257
  }
258
258
  /**
259
259
  * Copy prebuilt SQL migrations into the app db directory (overwrite to stay current).
@@ -289,10 +289,10 @@ class NodeDb {
289
289
  logger$1('[Db.prepareDb] running migrations from %s', outDir);
290
290
  await migrate(db, { migrationsFolder: outDir });
291
291
  this.db = db;
292
- const { backfillMetadataPropertyIds } = await import('./backfillMetadataPropertyIds-Uhzlwg9X.js');
292
+ const { backfillMetadataPropertyIds } = await import('./backfillMetadataPropertyIds-qoVxUEEl.js');
293
293
  await backfillMetadataPropertyIds();
294
294
  // One-time: clear item data whose model can't be determined (seeds.model_file_id, migration 0015)
295
- const { resetAmbiguousLegacyItemData } = await import('./resetAmbiguousLegacyItemData-cXZm4NuG.js');
295
+ const { resetAmbiguousLegacyItemData } = await import('./resetAmbiguousLegacyItemData-DzVlhD9u.js');
296
296
  await resetAmbiguousLegacyItemData();
297
297
  return this.db;
298
298
  }
@@ -577,4 +577,4 @@ function createPlatformServices() {
577
577
  }
578
578
 
579
579
  export { Db as D, FileManager as F, PathResolver as P, resolveFilesDir as a, createPlatformServices as c, resolveSdkDrizzleMigrationsDir as r };
580
- //# sourceMappingURL=index.node-BKpbCAWt.js.map
580
+ //# sourceMappingURL=index.node-DQTc7kEl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.node-DQTc7kEl.js","sources":["../../src/helpers/dotSeedPath.ts","../../src/node/helpers/FileManager.ts","../../src/node/db/Db.ts","../../src/node/helpers/PathResolver.ts","../../src/node/helpers/resolveFilesDir.ts","../../src/platform/index.node.ts"],"sourcesContent":["/**\n * Whether a relative filesDir already names the .seed directory or a path inside\n * it ('.seed', '.seed/files', './.seed/files'). '.seed-alt/x' is not: it is\n * resolved under .seed like any other relative path.\n */\nexport function isUnderDotSeed(relativePath: string): boolean {\n const firstSegment = relativePath.split(/[\\\\/]+/).find((segment) => segment !== '' && segment !== '.')\n return firstSegment === '.seed'\n}\n","import * as fsAsync from 'fs/promises'\nimport * as fs from 'fs'\nimport { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'\nimport type { IFileManager } from '@/helpers/FileManager/IFileManager'\nimport path from 'path'\nimport { pathToFileURL } from 'url'\n\nexport class NodeFileManager implements IFileManager {\n async getFs() {\n return fs\n }\n\n getFsSync() {\n return fs\n }\n\n /** Node has no blob URLs; a file:// URL keeps refResolvedDisplayValue meaningful for server callers. */\n async getContentUrlFromPath(filePath: string): Promise<string | undefined> {\n return pathToFileURL(path.resolve(filePath)).href\n }\n\n async initializeFileSystem(_workingDir?: string): Promise<void> {\n return // No need to initialize file system in node\n }\n\n async downloadAllFiles(): Promise<void> {\n throw new Error('Not implemented')\n }\n\n async resizeImage(): Promise<void> {\n throw new Error('Not implemented')\n }\n\n async resizeAllImages(): Promise<void> {\n throw new Error('Not implemented')\n }\n\n async pathExists(filePath: string): Promise<boolean> {\n return await fsAsync.access(filePath).then(() => true).catch(() => false)\n }\n\n /** Node reads the real file system; nothing is cached. */\n async invalidateCachedPaths(): Promise<void> {}\n\n async getFileSize(filePath: string): Promise<number | null> {\n try {\n const stat = await fsAsync.stat(filePath)\n return stat.size\n } catch {\n return null\n }\n }\n\n async listImageFiles(): Promise<string[]> {\n return this.listFiles('images')\n }\n\n async listFiles(dir: string): Promise<string[]> {\n const targetDir = BaseFileManager.getFilesPath(dir)\n const exists = await this.pathExists(targetDir)\n if (!exists) {\n return []\n }\n const entries = await fsAsync.readdir(targetDir, { withFileTypes: true })\n return entries.filter((entry) => entry.isFile()).map((entry) => entry.name)\n }\n\n async createDirIfNotExists(filePath: string): Promise<void> {\n await fsAsync.mkdir(filePath, { recursive: true })\n }\n\n async waitForFile(filePath: string, interval: number = 1000, timeout: number = 60000): Promise<boolean> {\n const pathExists = await this.pathExists(filePath)\n if (pathExists) {\n return true\n }\n\n return new Promise((resolve, reject) => {\n const startTime = Date.now()\n let isBusy = false\n\n const checkInterval = setInterval(async () => {\n if (isBusy) {\n return\n }\n isBusy = true\n\n try {\n const exists = await this.pathExists(filePath)\n if (exists) {\n clearInterval(checkInterval)\n resolve(true)\n return\n }\n\n if (Date.now() - startTime >= timeout) {\n clearInterval(checkInterval)\n reject(new Error('Timeout exceeded while waiting for file'))\n return\n }\n } catch (error) {\n clearInterval(checkInterval)\n reject(error)\n return\n } finally {\n isBusy = false\n }\n }, interval)\n })\n }\n\n async waitForFileWithContent(filePath: string, interval: number = 100, timeout: number = 5000): Promise<boolean> {\n return this.waitForFile(filePath, interval, timeout)\n }\n\n async saveFile(filePath: string, content: string | Blob | ArrayBuffer): Promise<void> {\n const dir = path.dirname(filePath)\n await fsAsync.mkdir(dir, { recursive: true })\n\n if (typeof content === 'string') {\n await fsAsync.writeFile(filePath, content, 'utf-8')\n } else if (content instanceof Blob) {\n const arrayBuffer = await content.arrayBuffer()\n await fsAsync.writeFile(filePath, new Uint8Array(arrayBuffer))\n } else if (content instanceof ArrayBuffer) {\n await fsAsync.writeFile(filePath, new Uint8Array(content))\n } else {\n throw new Error('Unsupported content type')\n }\n }\n\n saveFileSync(filePath: string, content: string | Blob | ArrayBuffer): void {\n const dir = path.dirname(filePath)\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true })\n }\n\n if (typeof content === 'string') {\n fs.writeFileSync(filePath, content, 'utf-8')\n } else if (content instanceof Blob) {\n throw new Error('Blob content not supported in saveFileSync. Use saveFile() instead or convert to ArrayBuffer first.')\n } else if (content instanceof ArrayBuffer) {\n fs.writeFileSync(filePath, new Uint8Array(content))\n } else {\n throw new Error('Unsupported content type')\n }\n }\n\n async readFileAsBuffer(filePath: string): Promise<Buffer> {\n return await fsAsync.readFile(filePath)\n }\n\n async readFileAsString(filePath: string): Promise<string> {\n return await fsAsync.readFile(filePath, 'utf-8')\n }\n\n async readFile(filePath: string): Promise<File> {\n return new File([await fsAsync.readFile(filePath)], filePath)\n }\n\n readFileSync(filePath: string): File {\n return new File([fs.readFileSync(filePath)], filePath)\n }\n\n getParentDirPath(filePath: string): string {\n return path.dirname(filePath)\n }\n\n getFilenameFromPath(filePath: string): string {\n return path.basename(filePath)\n }\n\n getPathModule(): any {\n return path\n }\n}\n\n/** @deprecated Prefer NodeFileManager */\nexport const FileManager = NodeFileManager\n\nBaseFileManager.configure(new NodeFileManager())\n\nconst _check: IFileManager = new NodeFileManager()\nvoid _check\n","import { BaseDb } from '@/db/Db/BaseDb'\nimport type { IDb } from '@/interfaces/IDb'\nimport path from 'path'\nimport { fileURLToPath } from 'node:url'\nimport debug from 'debug'\nimport { appState } from '@/seedSchema'\nimport fs from 'fs'\nimport { createClient } from '@libsql/client'\nimport { drizzle } from 'drizzle-orm/libsql'\nimport { migrate } from 'drizzle-orm/libsql/migrator'\nimport * as schema from '@/seedSchema'\nimport { Observable, interval, switchMap, distinctUntilChanged, startWith } from 'rxjs'\nimport { BasePathResolver } from '@/helpers/PathResolver/BasePathResolver'\n\nconst logger = debug('seedSdk:node:db:Db')\n\nexport interface DbConfig {\n dbUrl?: string\n /** @deprecated Unused — schema is the static SDK seedSchema + prebuilt SQL migrations */\n schemaDir?: string\n outDir?: string\n}\n\nfunction resolveDbPaths(filesDir: string, config?: DbConfig) {\n const outDir = config?.outDir || path.join(filesDir, 'db')\n const dbPath = config?.dbUrl\n ? (config.dbUrl.startsWith('file:') ? config.dbUrl.replace(/^file:/, '') : config.dbUrl)\n : path.join(outDir, 'seed.db')\n return { outDir, dbPath }\n}\n\n/**\n * Locate prebuilt drizzle migration SQL shipped with the SDK\n * (same files the browser embeds via drizzleFiles.ts).\n */\nexport function resolveSdkDrizzleMigrationsDir(sdkRootDir?: string): string {\n const root =\n sdkRootDir ||\n (() => {\n try {\n return BasePathResolver.getSdkRootDir()\n } catch {\n return process.cwd()\n }\n })()\n\n // Look next to this module first, so the SDK always runs its own migrations\n // whatever the working directory (monorepos, packaged Electron apps, scripts\n // run from elsewhere). Rollup bundles this file into a chunk directly under\n // dist/, next to the copied dist/db/drizzle.\n const moduleDir = path.dirname(fileURLToPath(import.meta.url))\n\n const candidates = [\n path.join(moduleDir, 'db', 'drizzle'), // bundled: dist/<chunk>.js -> dist/db/drizzle\n path.join(moduleDir, '..', '..', 'db', 'drizzle'), // source: src/node/db -> src/db/drizzle\n path.join(moduleDir, '..', 'db', 'drizzle'), // dist layout variants\n path.join(moduleDir, '..', '..', '..', 'src', 'db', 'drizzle'), // dist/node -> src\n path.join(root, 'db', 'drizzle'), // production: sdkRoot is dist/\n path.join(root, 'dist', 'db', 'drizzle'), // sdk package root with built dist\n path.join(root, 'src', 'db', 'drizzle'), // monorepo / sdk-dev\n path.join(root, 'packages', 'sdk', 'src', 'db', 'drizzle'), // monorepo root as cwd\n path.join(root, 'packages', 'sdk', 'dist', 'db', 'drizzle'),\n ]\n\n for (const candidate of candidates) {\n if (fs.existsSync(path.join(candidate, 'meta', '_journal.json'))) {\n return candidate\n }\n }\n\n throw new Error(\n `Could not find SDK drizzle migrations (meta/_journal.json). Searched under: ${candidates.join(', ')}`,\n )\n}\n\nfunction copyDirRecursive(sourceDir: string, targetDir: string) {\n if (!fs.existsSync(targetDir)) {\n fs.mkdirSync(targetDir, { recursive: true })\n }\n for (const entry of fs.readdirSync(sourceDir)) {\n const sourcePath = path.join(sourceDir, entry)\n const targetPath = path.join(targetDir, entry)\n const stats = fs.statSync(sourcePath)\n if (stats.isDirectory()) {\n copyDirRecursive(sourcePath, targetPath)\n } else {\n fs.copyFileSync(sourcePath, targetPath)\n }\n }\n}\n\n\n/** The file a local libsql `file:` URL opens; undefined for `:memory:` and remote URLs. */\nconst localDbFilePath = (dbUrl: string): string | undefined => {\n if (!dbUrl.startsWith('file:')) return undefined\n const filePath = dbUrl.slice('file:'.length).split('?')[0]\n if (!filePath || filePath === ':memory:') return undefined\n return filePath.startsWith('//') ? filePath.replace(/^\\/\\/(localhost)?/, '') : filePath\n}\n\nexport class NodeDb implements IDb {\n db: any\n\n\n getAppDb() {\n return this.db\n }\n\n isAppDbReady() {\n return !!this.db\n }\n\n /**\n * Copy prebuilt SQL migrations into the app db directory (overwrite to stay current).\n */\n copyDrizzleFiles(filesDir: string, migrationsSourceDir?: string, config?: DbConfig): string {\n const { outDir } = resolveDbPaths(filesDir, config)\n const source = migrationsSourceDir || resolveSdkDrizzleMigrationsDir()\n logger('[Db.copyDrizzleFiles] copying from %s to %s', source, outDir)\n copyDirRecursive(source, outDir)\n return outDir\n }\n\n async prepareDb(filesDir: string, config?: DbConfig) {\n const resolvedFilesDir = path.resolve(filesDir)\n\n if (!fs.existsSync(resolvedFilesDir)) {\n fs.mkdirSync(resolvedFilesDir, { recursive: true })\n }\n\n const { outDir, dbPath } = resolveDbPaths(resolvedFilesDir, config)\n\n if (!fs.existsSync(outDir)) {\n fs.mkdirSync(outDir, { recursive: true })\n }\n\n // Install SDK migration SQL next to the DB (same source of truth as browser)\n this.copyDrizzleFiles(resolvedFilesDir, undefined, config)\n\n const dbUrl = config?.dbUrl\n ? (config.dbUrl.startsWith('file:') ? config.dbUrl : `file:${path.resolve(config.dbUrl)}`)\n : `file:${path.resolve(dbPath)}`\n\n // libsql won't create the database's folder (\"Unable to open connection … 14\").\n const dbFilePath = localDbFilePath(dbUrl)\n if (dbFilePath) {\n fs.mkdirSync(path.dirname(dbFilePath), { recursive: true })\n }\n\n const client = createClient({ url: dbUrl })\n const db = drizzle(client, { schema })\n\n logger('[Db.prepareDb] running migrations from %s', outDir)\n await migrate(db, { migrationsFolder: outDir })\n\n this.db = db\n\n const { backfillMetadataPropertyIds } = await import('@/db/backfillMetadataPropertyIds')\n await backfillMetadataPropertyIds()\n\n // One-time: clear item data whose model can't be determined (seeds.model_file_id, migration 0015)\n const { resetAmbiguousLegacyItemData } = await import('@/db/resetAmbiguousLegacyItemData')\n await resetAmbiguousLegacyItemData()\n\n return this.db\n }\n\n async connectToDb(_pathToDir: string) {\n return {\n id: this.db ? this.db.constructor.name : '',\n }\n }\n\n async migrate(pathToDbDir: string, _dbName: string, _dbId: string) {\n try {\n if (!this.db) {\n throw new Error('Database not initialized. Call prepareDb first.')\n }\n\n await migrate(this.db, { migrationsFolder: pathToDbDir })\n const queryResult = await this.db.select().from(appState)\n logger('queryResult', queryResult)\n } catch (error: any) {\n const errorMessage = error.message || String(error) || ''\n const errorString = String(error)\n const isMigrationError =\n errorMessage.includes(\"Can't find meta/_journal.json\") ||\n errorMessage.includes('_journal.json') ||\n errorMessage.includes(\"Cannot read properties of undefined\") ||\n errorMessage.includes(\"reading 'dialect'\") ||\n errorMessage.includes('undefined is not an object') ||\n errorString.includes('dialect') ||\n errorString.includes('undefined is not an object')\n\n if (isMigrationError) {\n if (process.env.NODE_ENV === 'test' || process.env.IS_SEED_DEV) {\n logger(\n 'Warning: Migration failed, but continuing in test environment:',\n errorMessage || errorString,\n )\n return this.db\n }\n }\n throw error\n }\n\n return this.db\n }\n\n /**\n * Polling-based liveQuery stub for Node. Prefer browser reactive queries in UI apps.\n */\n liveQuery<T>(query: ((sql: any) => any) | any): Observable<T[]> {\n if (!this.db) {\n throw new Error('Database not initialized. Call prepareDb first.')\n }\n\n const pollInterval = 1000\n\n if (typeof query === 'function') {\n throw new Error(\n 'SQL tag functions are not supported in node liveQuery stub implementation. Use Drizzle query builders instead.',\n )\n }\n\n const queryBuilder = query\n\n return interval(pollInterval).pipe(\n startWith(0),\n switchMap(async () => {\n try {\n const result = await Promise.resolve(queryBuilder)\n return result as T[]\n } catch (error) {\n logger('[Db.liveQuery] Error executing query:', error)\n throw error\n }\n }),\n distinctUntilChanged((prev, curr) => {\n return JSON.stringify(prev) === JSON.stringify(curr)\n }),\n )\n }\n}\n\n/** @deprecated Prefer NodeDb */\nexport const Db = NodeDb\n\nBaseDb.configure(new NodeDb())\n\nconst _check: IDb = new NodeDb()\nvoid _check\n","import path from 'path'\nimport fs from 'fs'\nimport { SEED_CONFIG_FILE, SEED_CONFIG_FALLBACKS } from '@/helpers/constants'\nimport type { IPathResolver } from '@/helpers/PathResolver/IPathResolver'\nimport { BasePathResolver } from '@/helpers/PathResolver/BasePathResolver'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:node:helpers:PathResolver')\n\nexport class NodePathResolver implements IPathResolver {\n /** @deprecated Prefer BasePathResolver static methods or configure(). */\n static getInstance(): IPathResolver {\n return BasePathResolver.getInstance()\n }\n\n /**\n * Detects the current environment based on filesystem structure and package.json\n */\n private detectEnvironment(): 'sdk-dev' | 'linked-sdk' | 'production' | 'test' {\n // Check if we're in the SDK repo itself\n if (process.env.NODE_ENV !== 'test' && this.isInSdkRepo()) {\n return 'sdk-dev'\n }\n\n // Check if we're running tests\n if (process.env.NODE_ENV === 'test') {\n return 'test'\n }\n\n // Check if we're using a linked version of the SDK\n if (this.isUsingLinkedSdk()) {\n return 'linked-sdk'\n }\n\n // Default to production environment\n return 'production'\n }\n\n private isInSdkRepo(): boolean {\n try {\n const currentDir = process.cwd()\n // Check when running from packages/sdk (SDK package root)\n if (fs.existsSync(path.join(currentDir, 'src', 'node')) &&\n fs.existsSync(path.join(currentDir, 'package.json')) &&\n JSON.parse(fs.readFileSync(path.join(currentDir, 'package.json'), 'utf8')).name === '@seedprotocol/sdk') {\n return true\n }\n // Check when running from monorepo root\n if (fs.existsSync(path.join(currentDir, 'packages', 'sdk', 'src', 'node')) &&\n fs.existsSync(path.join(currentDir, 'packages', 'sdk', 'package.json')) &&\n JSON.parse(fs.readFileSync(path.join(currentDir, 'packages', 'sdk', 'package.json'), 'utf8')).name === '@seedprotocol/sdk') {\n return true\n }\n return false\n } catch {\n return false\n }\n }\n\n private isUsingLinkedSdk(): boolean {\n try {\n const pkgPath = path.join(process.cwd(), 'package.json')\n if (!fs.existsSync(pkgPath)) return false\n \n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'))\n const sdkDep = pkg.dependencies?.['@seedprotocol/sdk']\n \n return sdkDep && (sdkDep.startsWith('link:') || sdkDep.startsWith('portal:'))\n } catch {\n return false\n }\n }\n\n /**\n * Gets the root directory containing node_modules\n */\n getRootWithNodeModules(): string {\n const processCwd = process.cwd()\n\n const calledFromMocks = processCwd.includes('__mocks__')\n\n if (calledFromMocks) {\n return path.join(processCwd, '..', '..', '..', '..',)\n }\n\n return processCwd\n }\n\n /**\n * Gets the SDK root directory\n */\n getSdkRootDir(): string {\n const env = this.detectEnvironment()\n const rootWithNodeModules = this.getRootWithNodeModules()\n const processCwd = process.cwd()\n\n // For test environment, always return the SDK root directory\n if (env === 'test') {\n return rootWithNodeModules\n }\n\n if (env === 'linked-sdk') {\n // For linked packages, find the package directory\n const pkgJson = JSON.parse(fs.readFileSync(path.join(processCwd, 'package.json'), 'utf8'))\n const sdkPath = pkgJson.dependencies?.['@seedprotocol/sdk'] || pkgJson.devDependencies?.['@seedprotocol/sdk']\n if (sdkPath === 'link:@seedprotocol/sdk') {\n return path.join(processCwd, 'node_modules', '@seedprotocol', 'sdk',)\n }\n return path.resolve(processCwd, sdkPath.replace(/^(link:|portal:)/, ''))\n }\n\n // After early returns, env can only be 'sdk-dev' or 'production'\n if (env === 'sdk-dev') {\n // When running from monorepo root, SDK root is packages/sdk\n if (fs.existsSync(path.join(rootWithNodeModules, 'packages', 'sdk', 'package.json'))) {\n return path.join(rootWithNodeModules, 'packages', 'sdk')\n }\n // When running from packages/sdk directly\n return rootWithNodeModules\n }\n \n // Production: {sdk package}/dist. Resolve the installed package rather than\n // assuming it sits under the working directory: hoisted monorepos, packaged\n // Electron apps and scripts run from another directory all differ.\n try {\n const { createRequire } = process.getBuiltinModule('node:module')\n const pkgJson = createRequire(import.meta.url).resolve('@seedprotocol/sdk/package.json')\n return path.join(path.dirname(pkgJson), 'dist')\n } catch {\n return path.join(rootWithNodeModules, 'node_modules', '@seedprotocol', 'sdk', 'dist')\n }\n }\n\n getNodeModulesDir(): string {\n const env = this.detectEnvironment()\n const rootWithNodeModules = this.getRootWithNodeModules()\n\n let nodeModulesDir = path.join(rootWithNodeModules, 'node_modules')\n\n if (env !== 'linked-sdk' && env !== 'sdk-dev' && nodeModulesDir.includes('__tests__')) {\n nodeModulesDir = path.join(process.cwd(), '..', '..', '..', '..', 'node_modules',)\n }\n\n return nodeModulesDir\n }\n\n /**\n * Gets the .seed directory path\n */\n getDotSeedDir(schemaFileDir?: string): string {\n if (!schemaFileDir && process.env.SEED_SDK_TEST_PROJECT_TYPE && !process.cwd().includes('__mocks__')) {\n return path.join(process.cwd(), '__tests__', '__mocks__', process.env.SEED_SDK_TEST_PROJECT_TYPE, 'project', '.seed')\n }\n return path.join(schemaFileDir || process.cwd(), '.seed')\n }\n\n /**\n * Finds the Seed Protocol config file in the given directory\n * @param searchDir - Directory to search for the config file\n * @returns The path to the found config file, or null if not found\n */\n findConfigFile(searchDir: string = process.cwd()): string | null {\n // First try the primary config file name\n const primaryPath = path.join(searchDir, SEED_CONFIG_FILE)\n if (fs.existsSync(primaryPath)) {\n return primaryPath\n }\n\n // Then try fallback names in order\n for (const fallbackName of SEED_CONFIG_FALLBACKS) {\n const fallbackPath = path.join(searchDir, fallbackName)\n if (fs.existsSync(fallbackPath)) {\n return fallbackPath\n }\n }\n\n return null\n }\n\n /**\n * Gets paths for app-specific directories\n */\n getAppPaths(schemaFileDir?: string | undefined) {\n const env = this.detectEnvironment()\n const dotSeedDir = this.getDotSeedDir(schemaFileDir)\n const nodeModulesDir = this.getNodeModulesDir()\n\n logger('env', env)\n\n logger('getAppPaths', {\n sdkRootDir: this.getSdkRootDir(),\n dotSeedDir,\n nodeModulesDir,\n appSchemaDir: path.join(dotSeedDir, 'schema'),\n appDbDir: path.join(dotSeedDir, 'db'),\n appMetaDir: path.join(dotSeedDir, 'db', 'meta'),\n })\n\n return {\n sdkRootDir: this.getSdkRootDir(),\n dotSeedDir,\n nodeModulesDir,\n appSchemaDir: path.join(dotSeedDir, 'schema'),\n appDbDir: path.join(dotSeedDir, 'db'),\n appMetaDir: path.join(dotSeedDir, 'db', 'meta'),\n }\n }\n}\n\n/** @deprecated Prefer NodePathResolver; kept for CLI / node entry exports. */\nexport const PathResolver = NodePathResolver\n\nBasePathResolver.configure(new NodePathResolver())\n\nconst _check: IPathResolver = new NodePathResolver()\nvoid _check\n","import fs from 'fs'\nimport path from 'path'\nimport { BasePathResolver } from '@/helpers/PathResolver/BasePathResolver'\nimport { isUnderDotSeed } from '@/helpers/dotSeedPath'\n\n/**\n * The filesDir to use on Node, resolved relative to the .seed directory at the project root.\n * A browser OPFS-style path such as '/app-files' that doesn't exist on disk becomes\n * '.seed/app-files'; a relative path not already under .seed is joined to .seed; other absolute\n * paths are used as-is.\n */\nexport function resolveFilesDir(filesDir: string): string {\n // Not created here: prepareDb creates filesDir (under .seed when it's relative), so an absolute\n // filesDir works from a read-only working directory (e.g. a packaged Electron app's cwd `/`).\n const dotSeedDir = BasePathResolver.getDotSeedDir()\n\n // Browser OPFS paths are single-level, like '/app-files' or '/files'.\n const pathWithoutLeadingSlash = filesDir.slice(1)\n const isBrowserOpfsPath =\n path.isAbsolute(filesDir) &&\n filesDir.startsWith('/') &&\n pathWithoutLeadingSlash.length > 0 &&\n !pathWithoutLeadingSlash.includes('/') &&\n !fs.existsSync(filesDir)\n\n if (isBrowserOpfsPath) {\n return path.join(dotSeedDir, filesDir.slice(1) || 'app-files')\n }\n if (!path.isAbsolute(filesDir)) {\n return isUnderDotSeed(filesDir) ? path.resolve(filesDir) : path.join(dotSeedDir, filesDir)\n }\n return filesDir\n}\n","import { NodePathResolver } from '@/node/helpers/PathResolver'\nimport { NodeFileManager } from '@/node/helpers/FileManager'\nimport { NodeDb } from '@/node/db/Db'\nimport { NodeArweaveClient } from '@/node/helpers/ArweaveClient'\nimport { NodeEasClient } from '@/node/helpers/EasClient'\nimport { NodeQueryClient } from '@/node/helpers/QueryClient'\nimport type { PlatformServices } from './types'\n\nexport function createPlatformServices(): PlatformServices {\n return {\n pathResolver: new NodePathResolver(),\n fileManager: new NodeFileManager(),\n db: new NodeDb(),\n arweaveClient: new NodeArweaveClient(),\n easClient: new NodeEasClient(),\n queryClient: new NodeQueryClient(),\n }\n}\n\nexport { configurePlatform } from './configurePlatform'\nexport { resolveFilesDir } from '@/node/helpers/resolveFilesDir'\nexport type { PlatformServices } from './types'\n"],"names":["logger","fs"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;AAIG;AACG,SAAU,cAAc,CAAC,YAAoB,EAAA;IACjD,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,KAAK,EAAE,IAAI,OAAO,KAAK,GAAG,CAAC;IACtG,OAAO,YAAY,KAAK,OAAO;AACjC;;MCDa,eAAe,CAAA;AAC1B,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,OAAO,EAAE;IACX;IAEA,SAAS,GAAA;AACP,QAAA,OAAO,EAAE;IACX;;IAGA,MAAM,qBAAqB,CAAC,QAAgB,EAAA;QAC1C,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;IACnD;IAEA,MAAM,oBAAoB,CAAC,WAAoB,EAAA;AAC7C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OAAO,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5F;AACA,IAAA,OAAO,QAAQ;AACjB;;SCxBgB,sBAAsB,GAAA;IACpC,OAAO;QACL,YAAY,EAAE,IAAI,gBAAgB,EAAE;QACpC,WAAW,EAAE,IAAI,eAAe,EAAE;QAClC,EAAE,EAAE,IAAI,MAAM,EAAE;QAChB,aAAa,EAAE,IAAI,iBAAiB,EAAE;QACtC,SAAS,EAAE,IAAI,aAAa,EAAE;QAC9B,WAAW,EAAE,IAAI,eAAe,EAAE;KACnC;AACH;;"}
package/dist/main.js CHANGED
@@ -1,26 +1,26 @@
1
- export { C as ConflictError, I as ItemCreateValidationError, M as Model, U as UnknownModelError } from './errors-3tc6XkCB.js';
2
- import { B as BaseDb, F as versions, ae as normalizePublisher, C as seeds, ai as generateId, m as metadata, k as arweaveL1FinalizeJobs, U as normalizeRelationPropertyValue, V as resolveSeedIdsFromRefString, i as isDataType, M as ModelPropertyDataTypes, a6 as INTERNAL_PROPERTY_NAMES, p as htmlEmbeddedImageCoPublish, a2 as ZERO_BYTES32, n as normalizeDataType, h as BaseFileManager, Y as getStorageDirForDataType } from './index-CrvIcVFJ.js';
3
- export { H as AmbiguousModelError, ar as CONTENT_SHA256_TAG, as as CONTENT_TYPE_TAG, ad as EAS_SEED_DATA_SYNCED_TO_DB_EVENT, a9 as INTERNAL_DATA_TYPES, at as ImageSize, au as SEED_PROTOCOL_SCHEMA_NAME, av as SeedModels, aw as VERSION_SCHEMA_DEF, a5 as VERSION_SCHEMA_UID, ax as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, j as appState, _ as buildArweaveContentTags, ay as classifyMediaRef, az as closestImageSize, aA as contentSha256TagMatches, ab as easPropertyNameForPublish, o as easSyncProcesses, aB as ensureImageLocal, I as eventEmitter, aC as getAddressesForItemsFilter, W as getArweaveUrlForTransaction, Z as getContentSha256, Q as getCorrectId, aD as getFeedItemStringField, R as isPublishedSeedRef, aa as listRelationEasPropertyName, r as modelSchemas, s as modelUids, t as models, aE as normalizeAddressConfig, aF as normalizeAddressList, aG as normalizeArweaveTxIdForEnsure, aH as normalizeFeedItemFields, aj as normalizeHexAddress, v as properties, y as propertyUids, z as publishProcesses, aI as resolveMediaRef, A as schemas, E as uploadProcesses } from './index-CrvIcVFJ.js';
4
- export { getPropertySchema } from './property-DQ-Owzki.js';
5
- export { A as ADDRESSES_PERSISTED_EVENT, F as FILES_CHANGED_EVENT, L as LOCAL_COPIES_REMOVED_EVENT, T as TabLockTimeoutError, i as isLeaderTab, p as parseAddressesPersistedPayload, w as whenLeaderTab } from './tabEvents-D9x26vf2.js';
6
- export { E as EAS_CHAIN_ID_APP_STATE_KEY, I as INIT_CONFIG_CONFLICT_MESSAGE, d as assertLocalDbChain, e as claimUnpublishedDrafts, C as client, f as createLocalQueryDataSource, j as createSchema, k as easSyncActor, m as getClient, n as getPublishedSeedRecord, o as getSchemaNameFromId, i as importJsonSchema, p as isSeedQueryLocalSourceRegistered, q as listSchemas, u as loadAllSchemasFromDb, v as mergeEasSyncRequestIntents, r as readJsonImportFile, x as readSchema, y as registerSeedQueryLocalSource, z as requestEasSyncFromAddressChange, A as requestEasSyncFromEventBus, B as requestEasSyncFromModelsInit, D as sendEasSyncClientRequest, F as setRetriesWhenOnlineEnabled, G as startEasSyncActor, s as syncSchemaFromSource, t as transformImportToSchemaFile, H as unregisterSeedQueryLocalSource } from './ClientManager-D6YA20jP.js';
7
- import { l as isVersionRevoked, e as compareMetadataRowsLatestFirst, t as isPublishedMetadataRow, h as getLatestPublishedVersionRow, p as parseListPropertyValueFromStorage } from './Item-B1MH0tXx.js';
8
- export { C as ClientManagerState, I as Item, a as ItemProperty, b as ItemPropertySaveValidationError, M as METADATA_LATEST_FIRST_ORDER_SQL, u as MachineIds, O as OwnershipError, P as PUBLISH_NOT_CONFIGURED_MESSAGE, c as assertItemOwned, v as createNewItem, x as getEasSchemaForItemProperty, k as getGetAdditionalSyncAddresses, y as getGetPublisherForNewSeeds, z as getMetadataLatest, A as getPublishExecutor, B as getRevokeExecutor, E as getUploadExecutor, F as getVersionData, i as isItemOwned, G as isLocalUnsealedDraft, H as isSeedRowOwned, J as localUnsealedDraftSql, K as ownedPublisherSql, L as ownedSeedsSql, N as pickLatestMetadataRowPerProperty, Q as placeholderUidSql, R as propertyMachine, S as publisherInAddressListSql, T as publisherIsInOwnedSet, U as setAdditionalSyncAddresses, V as setGetPublisherForNewSeeds, W as setPublishExecutor, X as setRevokeExecutor, Y as setUploadExecutor, d as waitForEntityIdle } from './Item-B1MH0tXx.js';
9
- import { eq, desc, and, or, isNotNull, ne, isNull } from 'drizzle-orm';
1
+ export { C as ConflictError, d as ItemCreateError, I as ItemCreateValidationError, M as Model, U as UnknownModelError } from './errors-DuFqGrjo.js';
2
+ import { B as BaseDb, F as versions, ae as normalizePublisher, C as seeds, ai as generateId, m as metadata, t as models, v as properties, n as normalizeDataType, aa as listRelationEasPropertyName, k as arweaveL1FinalizeJobs, U as normalizeRelationPropertyValue, V as resolveSeedIdsFromRefString, i as isDataType, M as ModelPropertyDataTypes, a6 as INTERNAL_PROPERTY_NAMES, p as htmlEmbeddedImageCoPublish, a2 as ZERO_BYTES32, h as BaseFileManager, Y as getStorageDirForDataType } from './index-DeUHrBqA.js';
3
+ export { H as AmbiguousModelError, ar as CONTENT_SHA256_TAG, as as CONTENT_TYPE_TAG, ad as EAS_SEED_DATA_SYNCED_TO_DB_EVENT, a9 as INTERNAL_DATA_TYPES, at as ImageSize, au as SEED_PROTOCOL_SCHEMA_NAME, av as SeedModels, aw as VERSION_SCHEMA_DEF, a5 as VERSION_SCHEMA_UID, ax as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, j as appState, _ as buildArweaveContentTags, ay as classifyMediaRef, az as closestImageSize, aA as contentSha256TagMatches, ab as easPropertyNameForPublish, o as easSyncProcesses, aB as ensureImageLocal, I as eventEmitter, aC as getAddressesForItemsFilter, W as getArweaveUrlForTransaction, Z as getContentSha256, Q as getCorrectId, aD as getFeedItemStringField, R as isPublishedSeedRef, r as modelSchemas, s as modelUids, aE as normalizeAddressConfig, aF as normalizeAddressList, aG as normalizeArweaveTxIdForEnsure, aH as normalizeFeedItemFields, aj as normalizeHexAddress, y as propertyUids, z as publishProcesses, aI as resolveMediaRef, A as schemas, E as uploadProcesses } from './index-DeUHrBqA.js';
4
+ export { getPropertySchema } from './property-Dk_5t4-p.js';
5
+ export { A as ADDRESSES_PERSISTED_EVENT, F as FILES_CHANGED_EVENT, L as LOCAL_COPIES_REMOVED_EVENT, T as TabLockTimeoutError, i as isLeaderTab, p as parseAddressesPersistedPayload, w as whenLeaderTab } from './tabEvents-DyGJcILs.js';
6
+ export { E as EAS_CHAIN_ID_APP_STATE_KEY, I as INIT_CONFIG_CONFLICT_MESSAGE, d as assertLocalDbChain, e as claimUnpublishedDrafts, C as client, f as createLocalQueryDataSource, j as createSchema, k as easSyncActor, m as getClient, n as getPublishedSeedRecord, o as getSchemaNameFromId, i as importJsonSchema, p as isSeedQueryLocalSourceRegistered, q as listSchemas, u as loadAllSchemasFromDb, v as mergeEasSyncRequestIntents, r as readJsonImportFile, x as readSchema, y as registerSeedQueryLocalSource, z as requestEasSyncFromAddressChange, A as requestEasSyncFromEventBus, B as requestEasSyncFromModelsInit, D as sendEasSyncClientRequest, F as setRetriesWhenOnlineEnabled, G as startEasSyncActor, s as syncSchemaFromSource, t as transformImportToSchemaFile, H as unregisterSeedQueryLocalSource } from './ClientManager-DdqRofK6.js';
7
+ import { l as isVersionRevoked, e as compareMetadataRowsLatestFirst, p as parseListPropertyValueFromStorage, t as isPublishedMetadataRow, h as getLatestPublishedVersionRow } from './Item-DmK1PgK9.js';
8
+ export { C as ClientManagerState, I as Item, a as ItemProperty, b as ItemPropertySaveValidationError, M as METADATA_LATEST_FIRST_ORDER_SQL, u as MachineIds, O as OwnershipError, P as PUBLISH_NOT_CONFIGURED_MESSAGE, c as assertItemOwned, v as createNewItem, x as getEasSchemaForItemProperty, k as getGetAdditionalSyncAddresses, y as getGetPublisherForNewSeeds, z as getMetadataLatest, A as getPublishExecutor, B as getRevokeExecutor, E as getUploadExecutor, F as getVersionData, i as isItemOwned, G as isLocalUnsealedDraft, H as isSeedRowOwned, J as localUnsealedDraftSql, K as ownedPublisherSql, L as ownedSeedsSql, N as pickLatestMetadataRowPerProperty, Q as placeholderUidSql, R as propertyMachine, S as publisherInAddressListSql, T as publisherIsInOwnedSet, U as setAdditionalSyncAddresses, V as setGetPublisherForNewSeeds, W as setPublishExecutor, X as setRevokeExecutor, Y as setUploadExecutor, d as waitForEntityIdle } from './Item-DmK1PgK9.js';
9
+ import { eq, desc, and, inArray, or, isNotNull, ne, isNull } from 'drizzle-orm';
10
10
  import { isPlaceholderUid, isValidEasAttestationUid, normalizeBytes32Hex } from '@seedprotocol/eas';
11
11
  export { EAS_CHAIN_DEPLOYMENTS, BaseEasClient as EasClient, easName, getCanonicalItemPropertiesFromEas, getEasChainDeployment, getEasEndpoint, getEasReadChainId, getEasSchemaUidBySchemaName, getItemPropertiesFromEas, getItemVersionsFromEas, getSeedsBySchemaName, getSeedsFromSchemaUids, isPlaceholderUid, isValidEasAttestationUid, matchEasName, normalizeBytes32Hex, pickLatestPropertyAttestationsByRefAndSchema, setSchemaUidForModel, setSchemaUidForSchemaDefinition, withExcludeRevokedFilter } from '@seedprotocol/eas';
12
- export { S as Schema, d as deleteModelFromSchema, a as deletePropertyFromModel, r as renameModelProperty, s as schemaMachine, u as updateModelProperties } from './Schema-DppObO6h.js';
12
+ export { S as Schema, d as deleteModelFromSchema, a as deletePropertyFromModel, r as renameModelProperty, s as schemaMachine, u as updateModelProperties } from './Schema-DhlbBQs8.js';
13
13
  export { D as DatabaseNotPersistentError, F as FileSystemLockedError } from './errors-Do7v6RKu.js';
14
- export { M as MODEL_AMBIGUOUS_EVENT } from './resolveModelForSyncedSeed-BgxtVCHI.js';
15
- export { ModelProperty } from './ModelProperty-Dw6dHdu_.js';
16
- export { getModelSchemasFromEas } from './eas-CSm5wmry.js';
14
+ export { M as MODEL_AMBIGUOUS_EVENT } from './resolveModelForSyncedSeed-C_BzNN8r.js';
15
+ export { ModelProperty } from './ModelProperty-DaJAII87.js';
16
+ export { getModelSchemasFromEas } from './eas-CPYt-QVJ.js';
17
17
  export { BaseArweaveClient, DEFAULT_ARWEAVE_GATEWAYS, DEFAULT_ARWEAVE_GRAPHQL_URL, DEFAULT_ARWEAVE_HOST, DEFAULT_GATEWAY_SIDECAR_HOST, DEFAULT_GATEWAY_SIDECAR_PORT, DEFAULT_SEED_FEED_HYPER_KEY, DEFAULT_SEED_GATEWAY_HYPER_KEY, SEED_RSS_IMAGE_RELATION_FIELD_KEYS, ensureReadGatewaySelected, fetchArweaveRawFromBaseUrl, fetchArweaveRawTextAcrossGateways, getArweaveReadBaseUrls, getArweaveUploadStatus, getDefaultArweaveReadGatewayHostsOrdered, getLastHealthyReadGatewayHost, getPreferredArweaveReadBaseUrls, getReadGatewayHostsForConfig, getResolvedArweaveReadBaseUrls, getResolvedSeedGatewayEndpoints, getUploadApiArweaveDataUrl, getUploadApiArweaveStatusUrl, getUploadPipelineTransactionStatus, hasArweaveContentReadTransform, invalidateReadGatewayCache, invalidateSidecarProbeCache, isArweaveL1AnchoringComplete, isEasAttestationExplorerUrl, isGatewayHostCircuitOpen, isKnownArweaveGatewayHostname, isReadGatewayKnownHealthy, mergePrimaryHostWithDefaults, normalizeGatewayHostKey, normalizeUploadApiBaseUrl, queryArweaveGatewayTransaction, queryArweaveGatewayTransactionWithFallback, readArweaveContentResponse, recordGatewayHostFailure, recordGatewayHostSuccess, resetArweaveReadGatewayForTests, resolveSeedGatewayEndpoints, resolveSeedRssImageRelationFromItem, resolveSeedRssImageRelationRef, seedGatewayConfigFromClientContext, seedGatewayConfigFromSeedConfig, setArweaveContentReadTransform, setPreferredArweaveReadBaseUrls, setResolvedSeedGatewayEndpoints, transformArweaveContent } from '@seedprotocol/arweave';
18
- export { u as updateSeedRevokedAt } from './updateSeedRevokedAt-CCF8WWYS.js';
19
- import { a as getSegmentedItemProperties, g as getPublishDraftGraph, i as isSeedRevoked, f as findRelatedSeedRow, b as isUnpublishedSeed, h as htmlPropertyNameForHtmlSeed, r as relatedModelNameFromDef } from './publishDraftGraph-CzPd9oe9.js';
20
- export { P as PublishValidationFailedError, R as RELATED_ITEM_UNPUBLISHED_CODE, a as RelatedItemUnpublishedError, r as resolvePublishPayloadValues, v as validateItemForPublish } from './getPublishPayload-CJF0k5d8.js';
18
+ export { u as updateSeedRevokedAt } from './updateSeedRevokedAt-DxhC4ABM.js';
19
+ import { a as getSegmentedItemProperties, g as getPublishDraftGraph, i as isSeedRevoked, f as findRelatedSeedRow, b as isUnpublishedSeed, h as htmlPropertyNameForHtmlSeed, r as relatedModelNameFromDef } from './publishDraftGraph-CN7EsPVb.js';
20
+ export { P as PublishValidationFailedError, R as RELATED_ITEM_UNPUBLISHED_CODE, a as RelatedItemUnpublishedError, r as resolvePublishPayloadValues, v as validateItemForPublish } from './getPublishPayload-Dnv38ZW1.js';
21
21
  import 'pluralize';
22
- import { g as getRelatedDraftsCoPublishedWith, f as findEmbeddedImageFilePath } from './getPublishUploads-C7-fYIgX.js';
23
- export { H as HTML_EMBEDDED_MAX_IMAGES_PER_DOC, a as HTML_EMBEDDED_MAX_IMAGE_BYTES, b as HTML_EMBEDDED_MAX_TOTAL_BYTES, c as HtmlEmbeddedDataUriLimitError, d as HtmlSeedPropertyRefError, S as SEED_PROPERTY_REF_PREFIX, e as clearHtmlEmbeddedImageCoPublishRows, h as extractDataUriImagesFromHtml, i as findSeedPropertyRefsInHtml, j as getPublishUploadData, k as itemHasPublishUploadCandidates, p as prepareHtmlEmbeddedImagesForPublish, r as replaceDataUrisInParsedHtml, l as replaceSeedPropertyRefsInHtml, m as resolveEffectiveHtmlEmbeddedDataUriPolicy, n as rewriteHtmlEmbeddedImagesOnDisk } from './getPublishUploads-C7-fYIgX.js';
22
+ import { g as getRelatedDraftsCoPublishedWith, f as findEmbeddedImageFilePath } from './getPublishUploads-Dd7dCxNi.js';
23
+ export { H as HTML_EMBEDDED_MAX_IMAGES_PER_DOC, a as HTML_EMBEDDED_MAX_IMAGE_BYTES, b as HTML_EMBEDDED_MAX_TOTAL_BYTES, c as HtmlEmbeddedDataUriLimitError, d as HtmlSeedPropertyRefError, S as SEED_PROPERTY_REF_PREFIX, e as clearHtmlEmbeddedImageCoPublishRows, h as extractDataUriImagesFromHtml, i as findSeedPropertyRefsInHtml, j as getPublishUploadData, k as itemHasPublishUploadCandidates, p as prepareHtmlEmbeddedImagesForPublish, r as replaceDataUrisInParsedHtml, l as replaceSeedPropertyRefsInHtml, m as resolveEffectiveHtmlEmbeddedDataUriPolicy, n as rewriteHtmlEmbeddedImagesOnDisk } from './getPublishUploads-Dd7dCxNi.js';
24
24
  import 'js-yaml';
25
25
  import 'xstate';
26
26
  import 'debug';
@@ -35,7 +35,7 @@ import '@noble/hashes/sha3';
35
35
  import '@noble/hashes/utils';
36
36
  import 'lodash-es';
37
37
  import 'rxjs';
38
- import './SchemaValidationService-DXQ-D531.js';
38
+ import './SchemaValidationService-9KHQAYQ4.js';
39
39
  import '@sinclair/typebox/value';
40
40
  import 'parse5';
41
41
  import './mimeTypes-C9r76DCH.js';
@@ -115,9 +115,17 @@ const updateVersionUid = async ({ seedLocalId, versionUid, publisher, attestatio
115
115
  * to take the uid, the attestation is recorded as a new row for the published version: a copy of
116
116
  * the property's latest row with the new uid, so readers show the published version without a
117
117
  * sync. Rows keep or get the published version's local id when `versionUid` has a version row.
118
+ *
119
+ * Relations and lists of relations are recorded as attested, the way an EAS sync of the
120
+ * attestation stores them:
121
+ * - a List of Relation row lives under its storage name (`authors` → `authorIdentityIds`) while a
122
+ * publish names the attestation by schema key; either name matches.
123
+ * - a value naming seeds by local id gets the seed uids the attestation encodes: the uid (Relation),
124
+ * a JSON array of uids in slot order (List). Each uid comes from `resolvedSeedUids` (seeds this
125
+ * publish created, not recorded on their seed rows yet), else the seed's recorded live uid.
118
126
  */
119
127
  async function applyPropertyAttestationUidsFromPublish(params) {
120
- const { seedLocalId, attestationCreatedAtMs, pairs, versionUid } = params;
128
+ const { seedLocalId, attestationCreatedAtMs, pairs, versionUid, resolvedSeedUids } = params;
121
129
  const appDb = BaseDb.getAppDb();
122
130
  if (!appDb || !seedLocalId || pairs.length === 0)
123
131
  return;
@@ -149,6 +157,13 @@ async function applyPropertyAttestationUidsFromPublish(params) {
149
157
  ? seedRow.uid
150
158
  : null);
151
159
  }
160
+ const refDefs = await loadRefPropertyDefs(appDb, seedLocalId, rows);
161
+ const attestedRefValue = async (row, def) => {
162
+ const d = def ?? (row.propertyName ? refDefs.get(row.propertyName) : undefined);
163
+ if (!d || row.propertyValue == null)
164
+ return undefined;
165
+ return toAttestedRefValue(appDb, row.propertyValue, d.kind, resolvedSeedUids ?? {});
166
+ };
152
167
  for (const pair of pairs) {
153
168
  const att = pair.attestationUid?.trim();
154
169
  if (!isValidEasAttestationUid(att))
@@ -157,13 +172,15 @@ async function applyPropertyAttestationUidsFromPublish(params) {
157
172
  if (!wantSchema)
158
173
  continue;
159
174
  const pairName = pair.propertyName != null && pair.propertyName !== '' ? pair.propertyName : undefined;
175
+ const pairDef = pairName ? refDefs.get(pairName) : undefined;
176
+ const pairNames = new Set(pairName ? [pairName, ...(pairDef ? [pairDef.schemaKey, pairDef.storageName] : [])] : []);
160
177
  const candidates = working
161
178
  .filter((r) => {
162
179
  // Rows sync derived for ItemStorage properties aren't placeholders for an attestation.
163
180
  if (r.derivedFromUid != null)
164
181
  return false;
165
182
  if (pairName) {
166
- if (r.propertyName !== pairName)
183
+ if (!r.propertyName || !pairNames.has(r.propertyName))
167
184
  return false;
168
185
  if (r.schemaUid) {
169
186
  return normalizeBytes32Hex(r.schemaUid) === wantSchema;
@@ -185,8 +202,10 @@ async function applyPropertyAttestationUidsFromPublish(params) {
185
202
  if (working.some((r) => r.uid?.toLowerCase() === att.toLowerCase()))
186
203
  continue;
187
204
  const now = Date.now();
205
+ const attestedValue = await attestedRefValue(source, pairDef);
188
206
  const row = {
189
207
  ...source,
208
+ ...(attestedValue !== undefined && { propertyValue: attestedValue }),
190
209
  localId: generateId(),
191
210
  uid: att,
192
211
  schemaUid: normalizeBytes32Hex(source.schemaUid) ? source.schemaUid : wantSchema,
@@ -205,10 +224,12 @@ async function applyPropertyAttestationUidsFromPublish(params) {
205
224
  continue;
206
225
  }
207
226
  const writeSchemaUid = !normalizeBytes32Hex(target.schemaUid);
227
+ const attestedValue = await attestedRefValue(target, pairDef);
208
228
  await appDb
209
229
  .update(metadata)
210
230
  .set({
211
231
  uid: att,
232
+ ...(attestedValue !== undefined && { propertyValue: attestedValue }),
212
233
  ...(writeSchemaUid && { schemaUid: wantSchema }),
213
234
  ...(attestationCreatedAtMs != null && { attestationCreatedAt: attestationCreatedAtMs }),
214
235
  ...(validVersion && { versionUid: validVersion }),
@@ -221,6 +242,7 @@ async function applyPropertyAttestationUidsFromPublish(params) {
221
242
  working[i] = {
222
243
  ...working[i],
223
244
  uid: att,
245
+ ...(attestedValue !== undefined && { propertyValue: attestedValue }),
224
246
  ...(writeSchemaUid && { schemaUid: wantSchema }),
225
247
  attestationCreatedAt: attestationCreatedAtMs ?? working[i].attestationCreatedAt,
226
248
  ...(validVersion && { versionUid: validVersion }),
@@ -229,6 +251,113 @@ async function applyPropertyAttestationUidsFromPublish(params) {
229
251
  }
230
252
  }
231
253
  }
254
+ /**
255
+ * The seed's Relation and List-of-Relation properties, keyed by schema key and (lists) by storage
256
+ * name. The model comes from the seed's model_file_id, else a metadata row's property_id; an
257
+ * unknown model gives no definitions (rows then match by the pair's name alone, values unchanged).
258
+ */
259
+ async function loadRefPropertyDefs(appDb, seedLocalId, rows) {
260
+ const out = new Map();
261
+ try {
262
+ let modelId;
263
+ const [seedRow] = await appDb
264
+ .select({ modelFileId: seeds.modelFileId })
265
+ .from(seeds)
266
+ .where(eq(seeds.localId, seedLocalId))
267
+ .limit(1);
268
+ if (seedRow?.modelFileId) {
269
+ const [m] = await appDb
270
+ .select({ id: models.id })
271
+ .from(models)
272
+ .where(eq(models.schemaFileId, seedRow.modelFileId))
273
+ .limit(1);
274
+ modelId = m?.id;
275
+ }
276
+ const propertyId = rows.find((r) => r.propertyId != null)?.propertyId;
277
+ if (modelId == null && propertyId != null) {
278
+ const [p] = await appDb
279
+ .select({ modelId: properties.modelId })
280
+ .from(properties)
281
+ .where(eq(properties.id, propertyId))
282
+ .limit(1);
283
+ modelId = p?.modelId ?? undefined;
284
+ }
285
+ if (modelId == null)
286
+ return out;
287
+ const props = await appDb
288
+ .select({
289
+ name: properties.name,
290
+ dataType: properties.dataType,
291
+ refModelId: properties.refModelId,
292
+ refValueType: properties.refValueType,
293
+ })
294
+ .from(properties)
295
+ .where(eq(properties.modelId, modelId));
296
+ const refIds = [...new Set(props.map((p) => p.refModelId).filter((id) => id != null))];
297
+ const refNames = new Map();
298
+ if (refIds.length) {
299
+ const refs = await appDb
300
+ .select({ id: models.id, name: models.name })
301
+ .from(models)
302
+ .where(inArray(models.id, refIds));
303
+ for (const r of refs)
304
+ refNames.set(r.id, r.name);
305
+ }
306
+ for (const p of props) {
307
+ const dataType = normalizeDataType(p.dataType);
308
+ if (dataType === 'Relation') {
309
+ out.set(p.name, { kind: 'relation', schemaKey: p.name, storageName: p.name });
310
+ continue;
311
+ }
312
+ if (dataType !== 'List' || normalizeDataType(p.refValueType ?? undefined) !== 'Relation')
313
+ continue;
314
+ const ref = p.refModelId != null ? refNames.get(p.refModelId) : undefined;
315
+ const storageName = ref ? listRelationEasPropertyName(p.name, { dataType: 'List', ref }) : undefined;
316
+ if (!storageName)
317
+ continue;
318
+ const def = { kind: 'list', schemaKey: p.name, storageName };
319
+ out.set(p.name, def);
320
+ out.set(storageName, def);
321
+ }
322
+ }
323
+ catch {
324
+ // Unknown model: match by the pair's name alone.
325
+ }
326
+ return out;
327
+ }
328
+ const isUid = (v) => /^0x[0-9a-fA-F]{64}$/.test(v);
329
+ /**
330
+ * `raw` (a Relation value, or a List value as stored) with every seed named by local id replaced by
331
+ * its uid: from `resolvedSeedUids`, else the seed's recorded live uid. Undefined when nothing
332
+ * changes, or when a seed has no uid (then the value is not what was attested; left as it is).
333
+ */
334
+ async function toAttestedRefValue(appDb, raw, kind, resolvedSeedUids) {
335
+ const refs = kind === 'list' ? parseListPropertyValueFromStorage(raw) : [raw.trim()];
336
+ if (refs.length === 0 || refs.some((r) => !r))
337
+ return undefined;
338
+ const unknown = [...new Set(refs.filter((r) => !isUid(r) && !resolvedSeedUids[r]))];
339
+ const recorded = new Map();
340
+ if (unknown.length) {
341
+ const seedRows = await appDb
342
+ .select({ localId: seeds.localId, uid: seeds.uid, revokedAt: seeds.revokedAt })
343
+ .from(seeds)
344
+ .where(inArray(seeds.localId, unknown));
345
+ for (const s of seedRows) {
346
+ if (s.localId && isValidEasAttestationUid(s.uid) && !isVersionRevoked(s.revokedAt)) {
347
+ recorded.set(s.localId, s.uid);
348
+ }
349
+ }
350
+ }
351
+ const out = [];
352
+ for (const ref of refs) {
353
+ const uid = isUid(ref) ? ref : (resolvedSeedUids[ref] ?? recorded.get(ref));
354
+ if (!uid)
355
+ return undefined;
356
+ out.push(uid);
357
+ }
358
+ const value = kind === 'list' ? JSON.stringify(out) : out[0];
359
+ return value === raw ? undefined : value;
360
+ }
232
361
 
233
362
  const getVersionsForSeedUid = async (seedUid) => {
234
363
  if (!seedUid)
@@ -579,7 +708,7 @@ async function getRelatedItemsForPublish(item, visited = new Set()) {
579
708
  visited.add(seedLocalId);
580
709
  const result = [];
581
710
  const { itemRelationProperties, itemImageProperties, itemListProperties } = await getSegmentedItemProperties(item);
582
- const getItemMod = await import('./getItem-DM3a-7XE.js');
711
+ const getItemMod = await import('./getItem-DPapr9uy.js');
583
712
  const { getItem } = getItemMod;
584
713
  const processRelationOrImage = async (prop) => {
585
714
  const snapshot = prop.getService().getSnapshot();
@@ -598,7 +727,7 @@ async function getRelatedItemsForPublish(item, visited = new Set()) {
598
727
  if (!value && prop.propertyName && isStorageSeed) {
599
728
  const ctx = context;
600
729
  if (ctx.seedLocalId || ctx.seedUid) {
601
- const _mod_0 = await import('./Item-B1MH0tXx.js');
730
+ const _mod_0 = await import('./Item-DmK1PgK9.js');
602
731
  const _ns_0 = _mod_0.a5;
603
732
  const { getPropertyData } = _ns_0;
604
733
  const meta = await getPropertyData({
@@ -791,7 +920,7 @@ async function loadRelatedItem(value) {
791
920
  const { seedLocalId, seedUid } = resolveSeedIdsFromRefString(normalized);
792
921
  if (!seedLocalId && !seedUid)
793
922
  return undefined;
794
- const { getItem } = await import('./getItem-DM3a-7XE.js');
923
+ const { getItem } = await import('./getItem-DPapr9uy.js');
795
924
  try {
796
925
  return await getItem({ seedLocalId, seedUid });
797
926
  }
@@ -887,7 +1016,7 @@ async function appendCoPublishImages(item, acc, seen, visited, forceFullSnapshot
887
1016
  .from(htmlEmbeddedImageCoPublish)
888
1017
  .where(eq(htmlEmbeddedImageCoPublish.parentSeedLocalId, item.seedLocalId));
889
1018
  for (const row of rows) {
890
- const _mod_1 = await import('./Item-B1MH0tXx.js');
1019
+ const _mod_1 = await import('./Item-DmK1PgK9.js');
891
1020
  const _ns_1 = _mod_1.a6;
892
1021
  const { Item } = _ns_1;
893
1022
  const imageItem = await Item.find({
@@ -1009,5 +1138,5 @@ const summarizePublishWork = async (item, options) => {
1009
1138
  return acc;
1010
1139
  };
1011
1140
 
1012
- export { BaseDb, BaseFileManager, BaseFileManager as FileManager, ModelPropertyDataTypes, applyArweaveL1TransactionIdLocal, applyPropertyAttestationUidsFromPublish, arweaveL1FinalizeJobs, compareMetadataRowsLatestFirst, estimateDataUriByteLength, generateId, getAttesterForSeed, getMetadataAttestationUidsForSeedUid, getPublishDraftGraph, getPublishPendingDiff, getRelatedItemsForPublish, getSeedPublishState, getSegmentedItemProperties, getUnpublishedRelatedItems, getVersionsForSeedUid, htmlEmbeddedImageCoPublish, isDataType, metadata, normalizeDataType, normalizePublisher, normalizeRelationPropertyValue, resolveSeedIdsFromRefString, restoreDataItemIdsOverwrittenByL1, seeds, shouldAttestProperty, summarizePublishWork, updateVersionUid, versions };
1141
+ export { BaseDb, BaseFileManager, BaseFileManager as FileManager, ModelPropertyDataTypes, applyArweaveL1TransactionIdLocal, applyPropertyAttestationUidsFromPublish, arweaveL1FinalizeJobs, compareMetadataRowsLatestFirst, estimateDataUriByteLength, generateId, getAttesterForSeed, getMetadataAttestationUidsForSeedUid, getPublishDraftGraph, getPublishPendingDiff, getRelatedItemsForPublish, getSeedPublishState, getSegmentedItemProperties, getUnpublishedRelatedItems, getVersionsForSeedUid, htmlEmbeddedImageCoPublish, isDataType, listRelationEasPropertyName, metadata, models, normalizeDataType, normalizePublisher, normalizeRelationPropertyValue, properties, resolveSeedIdsFromRefString, restoreDataItemIdsOverwrittenByL1, seeds, shouldAttestProperty, summarizePublishWork, updateVersionUid, versions };
1013
1142
  //# sourceMappingURL=main.js.map