@seedprotocol/sdk 0.4.32 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BasePathResolver-BDgc7c4T.js +485 -0
- package/dist/BasePathResolver-BDgc7c4T.js.map +1 -0
- package/dist/{ModelProperty-e_hXSFvf.js → ModelProperty-BBXBvgvy.js} +38 -43
- package/dist/ModelProperty-BBXBvgvy.js.map +1 -0
- package/dist/{Schema-DonRkUOJ.js → Schema-xAt7jWlW.js} +40 -40
- package/dist/{Schema-DonRkUOJ.js.map → Schema-xAt7jWlW.js.map} +1 -1
- package/dist/{SchemaValidationService-DcmfhQae.js → SchemaValidationService-CLzAdBm-.js} +10 -5
- package/dist/{SchemaValidationService-DcmfhQae.js.map → SchemaValidationService-CLzAdBm-.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-CKTfvFgQ.js → backfillMetadataPropertyIds-DBVaIs7O.js} +3 -11
- package/dist/{backfillMetadataPropertyIds-CKTfvFgQ.js.map → backfillMetadataPropertyIds-DBVaIs7O.js.map} +1 -1
- package/dist/cjs/{ModelProperty-BQYU5hPQ.js → ModelProperty-Dgd4tGrB.js} +25 -26
- package/dist/cjs/{ModelProperty-BQYU5hPQ.js.map → ModelProperty-Dgd4tGrB.js.map} +1 -1
- package/dist/cjs/{Schema-BcRHcQ0W.js → Schema-dkd-eo3B.js} +28 -29
- package/dist/cjs/{Schema-BcRHcQ0W.js.map → Schema-dkd-eo3B.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-CQNDgyZl.js → SchemaValidationService-BMnjcVWV.js} +9 -10
- package/dist/cjs/{SchemaValidationService-CQNDgyZl.js.map → SchemaValidationService-BMnjcVWV.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-Dn4oVmEv.js → backfillMetadataPropertyIds-ClLuj3s6.js} +11 -12
- package/dist/cjs/{backfillMetadataPropertyIds-Dn4oVmEv.js.map → backfillMetadataPropertyIds-ClLuj3s6.js.map} +1 -1
- package/dist/cjs/eas-nWAzbl_F.js +112 -0
- package/dist/cjs/eas-nWAzbl_F.js.map +1 -0
- package/dist/cjs/{getItem-DpnPrzl3.js → getItem-B08FgglK.js} +11 -12
- package/dist/cjs/{getItem-DpnPrzl3.js.map → getItem-B08FgglK.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-CGKMEL3H.js → getPublishPayload-B_G_6qkE.js} +93 -83
- package/dist/cjs/getPublishPayload-B_G_6qkE.js.map +1 -0
- package/dist/cjs/{getPublishUploads-DeI0f2UN.js → getPublishUploads-Dt-DS-lo.js} +17 -18
- package/dist/cjs/{getPublishUploads-DeI0f2UN.js.map → getPublishUploads-Dt-DS-lo.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-BgS_FhAx.js → getSegmentedItemProperties-BDGbeDW7.js} +64 -15
- package/dist/cjs/getSegmentedItemProperties-BDGbeDW7.js.map +1 -0
- package/dist/cjs/{index-ByozbTn_.js → index-CRBI6dSD.js} +1663 -3244
- package/dist/cjs/index-CRBI6dSD.js.map +1 -0
- package/dist/cjs/{index-BnAqr2le.js → index-Dx19j60c.js} +12 -13
- package/dist/cjs/index-Dx19j60c.js.map +1 -0
- package/dist/cjs/index.browser-BSf8HpnU.js +22 -0
- package/dist/cjs/index.browser-BSf8HpnU.js.map +1 -0
- package/dist/cjs/{ownership-CsWuaNfH.js → ownership-3Tc1-Yrc.js} +11 -25
- package/dist/cjs/{ownership-CsWuaNfH.js.map → ownership-3Tc1-Yrc.js.map} +1 -1
- package/dist/cjs/{property-CeR45LMx.js → property-628qAHpN.js} +13 -14
- package/dist/cjs/{property-CeR45LMx.js.map → property-628qAHpN.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-CA2Lum5V.js → syncDbWithEas-DOBtMPw-.js} +65 -81
- package/dist/cjs/syncDbWithEas-DOBtMPw-.js.map +1 -0
- package/dist/configurePlatform-Ce6NIKRP.js +28 -0
- package/dist/configurePlatform-Ce6NIKRP.js.map +1 -0
- package/dist/constants-DMHTYMgJ.js +120 -0
- package/dist/constants-DMHTYMgJ.js.map +1 -0
- package/dist/constants-slkc9uq0.js +655 -0
- package/dist/constants-slkc9uq0.js.map +1 -0
- package/dist/db-CSmK0c3e.js +1972 -0
- package/dist/db-CSmK0c3e.js.map +1 -0
- package/dist/eas-rx1grht5.js +69 -0
- package/dist/eas-rx1grht5.js.map +1 -0
- package/dist/{getItem-GOXWo_Iy.js → getItem-hPBJU5JF.js} +11 -6
- package/dist/{getItem-GOXWo_Iy.js.map → getItem-hPBJU5JF.js.map} +1 -1
- package/dist/{getPublishPayload-D16enahU.js → getPublishPayload-5ugovGK5.js} +88 -74
- package/dist/getPublishPayload-5ugovGK5.js.map +1 -0
- package/dist/{getPublishUploads-wGqH19UY.js → getPublishUploads-CdWeci-s.js} +15 -10
- package/dist/{getPublishUploads-wGqH19UY.js.map → getPublishUploads-CdWeci-s.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-Be3kYWY3.js → getSegmentedItemProperties-DV2LHElJ.js} +18 -15
- package/dist/getSegmentedItemProperties-DV2LHElJ.js.map +1 -0
- package/dist/index-CcH2e0Zr.js +23 -0
- package/dist/index-CcH2e0Zr.js.map +1 -0
- package/dist/{index-BcXKZQpX.js → index-ClwdGWfr.js} +1625 -5474
- package/dist/index-ClwdGWfr.js.map +1 -0
- package/dist/{index-BFyMxc7e.js → index-QMrBK-L3.js} +2 -2
- package/dist/index-QMrBK-L3.js.map +1 -0
- package/dist/index.node-CrXwRoiB.js +503 -0
- package/dist/index.node-CrXwRoiB.js.map +1 -0
- package/dist/main.cjs +12 -14
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +32 -22
- package/dist/main.js.map +1 -1
- package/dist/node.js +41 -346
- package/dist/node.js.map +1 -1
- package/dist/{ownership-C17YhE7J.js → ownership-58i0iyD9.js} +14 -9
- package/dist/{ownership-C17YhE7J.js.map → ownership-58i0iyD9.js.map} +1 -1
- package/dist/platform.browser.js +3512 -0
- package/dist/platform.browser.js.map +1 -0
- package/dist/platform.node.js +19 -0
- package/dist/platform.node.js.map +1 -0
- package/dist/{property-CRAau-Q-.js → property-CKhOxRNt.js} +15 -11
- package/dist/property-CKhOxRNt.js.map +1 -0
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/service/actors/fetchDataFromEas.d.ts.map +1 -1
- package/dist/src/Item/service/actors/saveDataToDb.d.ts.map +1 -1
- package/dist/src/Model/service/actors/createModelProperties.d.ts.map +1 -1
- package/dist/src/Model/service/modelMachine.d.ts +1 -1
- package/dist/src/browser/db/Db.d.ts +17 -18
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/helpers/ArweaveClient.d.ts +10 -27
- package/dist/src/browser/helpers/ArweaveClient.d.ts.map +1 -1
- package/dist/src/browser/helpers/EasClient.d.ts +6 -4
- package/dist/src/browser/helpers/EasClient.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts +27 -26
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/browser/helpers/PathResolver.d.ts +6 -5
- package/dist/src/browser/helpers/PathResolver.d.ts.map +1 -1
- package/dist/src/browser/helpers/QueryClient.d.ts +6 -5
- package/dist/src/browser/helpers/QueryClient.d.ts.map +1 -1
- package/dist/src/browser/workers/filesDownload.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
- package/dist/src/client/actors/processSchemaFiles.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/db/Db/BaseDb.d.ts +6 -26
- package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
- package/dist/src/db/read/getItemData.d.ts +8 -0
- package/dist/src/db/read/getItemData.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
- package/dist/src/eas.d.ts +4 -37
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts +1 -101
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts +1 -51
- package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/index.d.ts +2 -2
- package/dist/src/helpers/ArweaveClient/index.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts +1 -15
- package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts +1 -22
- package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts.map +1 -1
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts +1 -9
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts +4 -2
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/IFileManager.d.ts +44 -0
- package/dist/src/helpers/FileManager/IFileManager.d.ts.map +1 -0
- package/dist/src/helpers/PathResolver/BasePathResolver.d.ts +16 -12
- package/dist/src/helpers/PathResolver/BasePathResolver.d.ts.map +1 -1
- package/dist/src/helpers/PathResolver/IPathResolver.d.ts +16 -0
- package/dist/src/helpers/PathResolver/IPathResolver.d.ts.map +1 -0
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts +1 -6
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts.map +1 -1
- package/dist/src/helpers/constants.d.ts +4 -22
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/easPropertyCanonical.d.ts +1 -14
- package/dist/src/helpers/easPropertyCanonical.d.ts.map +1 -1
- package/dist/src/helpers/easRevokedFilter.d.ts +1 -9
- package/dist/src/helpers/easRevokedFilter.d.ts.map +1 -1
- package/dist/src/helpers/easUid.d.ts +1 -12
- package/dist/src/helpers/easUid.d.ts.map +1 -1
- package/dist/src/helpers/ethereumUtils.d.ts +5 -0
- package/dist/src/helpers/ethereumUtils.d.ts.map +1 -0
- package/dist/src/helpers/file/fetchAll/index.d.ts +1 -1
- package/dist/src/helpers/file/fetchAll/index.d.ts.map +1 -1
- package/dist/src/helpers/gateway/gatewayState.d.ts +2 -0
- package/dist/src/helpers/gateway/gatewayState.d.ts.map +1 -0
- package/dist/src/helpers/gateway/resolveSeedGatewayEndpoints.d.ts +2 -0
- package/dist/src/helpers/gateway/resolveSeedGatewayEndpoints.d.ts.map +1 -0
- package/dist/src/helpers/gateway/seedGatewayConfig.d.ts +2 -0
- package/dist/src/helpers/gateway/seedGatewayConfig.d.ts.map +1 -0
- package/dist/src/helpers/generateId.d.ts +2 -0
- package/dist/src/helpers/generateId.d.ts.map +1 -0
- package/dist/src/helpers/getSchemaForItemProperty.d.ts +1 -1
- package/dist/src/helpers/getSchemaForItemProperty.d.ts.map +1 -1
- package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +16 -15
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts +7 -0
- package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts.map +1 -0
- package/dist/src/helpers/mediaRef.d.ts +3 -0
- package/dist/src/helpers/mediaRef.d.ts.map +1 -1
- package/dist/src/helpers/property/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +13 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IDb.d.ts +11 -0
- package/dist/src/interfaces/IDb.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts +22 -37
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/node/helpers/ArweaveClient.d.ts +4 -30
- package/dist/src/node/helpers/ArweaveClient.d.ts.map +1 -1
- package/dist/src/node/helpers/EasClient.d.ts +4 -6
- package/dist/src/node/helpers/EasClient.d.ts.map +1 -1
- package/dist/src/node/helpers/FileManager.d.ts +26 -25
- package/dist/src/node/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/node/helpers/PathResolver.d.ts +6 -5
- package/dist/src/node/helpers/PathResolver.d.ts.map +1 -1
- package/dist/src/node/helpers/QueryClient.d.ts +4 -6
- package/dist/src/node/helpers/QueryClient.d.ts.map +1 -1
- package/dist/src/node/helpers/scripts.d.ts +5 -7
- package/dist/src/node/helpers/scripts.d.ts.map +1 -1
- package/dist/src/node/index.d.ts +2 -9
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/node/webpack/index.d.ts +3 -0
- package/dist/src/node/webpack/index.d.ts.map +1 -1
- package/dist/src/platform/configurePlatform.d.ts +6 -0
- package/dist/src/platform/configurePlatform.d.ts.map +1 -0
- package/dist/src/platform/index.browser.d.ts +3 -0
- package/dist/src/platform/index.browser.d.ts.map +1 -0
- package/dist/src/platform/index.d.ts +9 -0
- package/dist/src/platform/index.d.ts.map +1 -0
- package/dist/src/platform/index.node.d.ts +3 -0
- package/dist/src/platform/index.node.d.ts.map +1 -0
- package/dist/src/platform/types.d.ts +14 -0
- package/dist/src/platform/types.d.ts.map +1 -0
- package/dist/src/query/createLocalQueryDataSource.d.ts +6 -0
- package/dist/src/query/createLocalQueryDataSource.d.ts.map +1 -0
- package/dist/src/query/index.d.ts +4 -0
- package/dist/src/query/index.d.ts.map +1 -0
- package/dist/src/query/registerSeedQueryLocalSource.d.ts +25 -0
- package/dist/src/query/registerSeedQueryLocalSource.d.ts.map +1 -0
- package/dist/src/stores/eas.d.ts +1 -18
- package/dist/src/stores/eas.d.ts.map +1 -1
- package/dist/src/testing/platformTestHandle.d.ts +8 -0
- package/dist/src/testing/platformTestHandle.d.ts.map +1 -0
- package/dist/src/types/gateway.d.ts +2 -0
- package/dist/src/types/gateway.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +5 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/item.d.ts +1 -1
- package/dist/src/types/item.d.ts.map +1 -1
- package/dist/src/types/machines.d.ts +12 -0
- package/dist/src/types/machines.d.ts.map +1 -1
- package/dist/src/types/seedProtocol.d.ts +1 -1
- package/dist/src/types/seedProtocol.d.ts.map +1 -1
- package/dist/src/vite/index.d.ts +2 -47
- package/dist/src/vite/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CB5aXPtf.js → syncDbWithEas-GsaXzTIY.js} +59 -56
- package/dist/syncDbWithEas-GsaXzTIY.js.map +1 -0
- package/dist/{updateSeedRevokedAt-BIu5Q4Po.js → updateSeedRevokedAt-Ba0OhDQj.js} +2 -2
- package/dist/{updateSeedRevokedAt-BIu5Q4Po.js.map → updateSeedRevokedAt-Ba0OhDQj.js.map} +1 -1
- package/dist/vite.cjs +5 -481
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.js +1 -483
- package/dist/vite.js.map +1 -1
- package/package.json +42 -37
- package/dist/ArweaveClient-CZpZgmR2.js +0 -204
- package/dist/ArweaveClient-CZpZgmR2.js.map +0 -1
- package/dist/ArweaveClient-Cs7AL9dp.js +0 -204
- package/dist/ArweaveClient-Cs7AL9dp.js.map +0 -1
- package/dist/Db-CF6R7HIy.js +0 -2098
- package/dist/Db-CF6R7HIy.js.map +0 -1
- package/dist/Db-CZkONsdT.js +0 -248
- package/dist/Db-CZkONsdT.js.map +0 -1
- package/dist/EasClient-PXOzSzPG.js +0 -29
- package/dist/EasClient-PXOzSzPG.js.map +0 -1
- package/dist/EasClient-qfTiM2we.js +0 -29
- package/dist/EasClient-qfTiM2we.js.map +0 -1
- package/dist/FileManager-5GkHtxF7.js +0 -1256
- package/dist/FileManager-5GkHtxF7.js.map +0 -1
- package/dist/FileManager-jORQ8Bb6.js +0 -177
- package/dist/FileManager-jORQ8Bb6.js.map +0 -1
- package/dist/ModelProperty-e_hXSFvf.js.map +0 -1
- package/dist/PathResolver-B4_X69Rd.js +0 -204
- package/dist/PathResolver-B4_X69Rd.js.map +0 -1
- package/dist/PathResolver-Dz0RVGIz.js +0 -78
- package/dist/PathResolver-Dz0RVGIz.js.map +0 -1
- package/dist/QueryClient-CXHZ239d.js +0 -51
- package/dist/QueryClient-CXHZ239d.js.map +0 -1
- package/dist/QueryClient-D_UK4YLm.js +0 -35
- package/dist/QueryClient-D_UK4YLm.js.map +0 -1
- package/dist/arweave-default-shim.js +0 -6
- package/dist/cjs/getPublishPayload-CGKMEL3H.js.map +0 -1
- package/dist/cjs/getSegmentedItemProperties-BgS_FhAx.js.map +0 -1
- package/dist/cjs/index-BnAqr2le.js.map +0 -1
- package/dist/cjs/index-ByozbTn_.js.map +0 -1
- package/dist/cjs/syncDbWithEas-CA2Lum5V.js.map +0 -1
- package/dist/debug-default-shim.js +0 -27
- package/dist/getPublishPayload-D16enahU.js.map +0 -1
- package/dist/getSegmentedItemProperties-Be3kYWY3.js.map +0 -1
- package/dist/index-BFyMxc7e.js.map +0 -1
- package/dist/index-BcXKZQpX.js.map +0 -1
- package/dist/index-C9p-skT3.js +0 -18
- package/dist/index-C9p-skT3.js.map +0 -1
- package/dist/property-CRAau-Q-.js.map +0 -1
- package/dist/queries-Ct7CcQ3g.js +0 -16
- package/dist/queries-Ct7CcQ3g.js.map +0 -1
- package/dist/src/Item/queries.d.ts +0 -27
- package/dist/src/Item/queries.d.ts.map +0 -1
- package/dist/src/graphql/fragments/Attestation.d.ts +0 -2
- package/dist/src/graphql/fragments/Attestation.d.ts.map +0 -1
- package/dist/src/graphql/fragments/Schema.d.ts +0 -2
- package/dist/src/graphql/fragments/Schema.d.ts.map +0 -1
- package/dist/src/graphql/fragments/index.d.ts +0 -3
- package/dist/src/graphql/fragments/index.d.ts.map +0 -1
- package/dist/src/graphql/gql/fragment-masking.d.ts +0 -20
- package/dist/src/graphql/gql/fragment-masking.d.ts.map +0 -1
- package/dist/src/graphql/gql/gql.d.ts +0 -107
- package/dist/src/graphql/gql/gql.d.ts.map +0 -1
- package/dist/src/graphql/gql/graphql.d.ts +0 -2969
- package/dist/src/graphql/gql/graphql.d.ts.map +0 -1
- package/dist/src/graphql/gql/index.d.ts +0 -3
- package/dist/src/graphql/gql/index.d.ts.map +0 -1
- package/dist/src/helpers/ArweaveClient/queries.d.ts +0 -13
- package/dist/src/helpers/ArweaveClient/queries.d.ts.map +0 -1
- package/dist/src/helpers/file/queries.d.ts +0 -9
- package/dist/src/helpers/file/queries.d.ts.map +0 -1
- package/dist/src/helpers/image/queries.d.ts +0 -7
- package/dist/src/helpers/image/queries.d.ts.map +0 -1
- package/dist/src/node/codegen/drizzle.d.ts +0 -5
- package/dist/src/node/codegen/drizzle.d.ts.map +0 -1
- package/dist/src/node/codegen/index.d.ts +0 -2
- package/dist/src/node/codegen/index.d.ts.map +0 -1
- package/dist/src/node/codegen/ts-to-proto.d.ts +0 -9
- package/dist/src/node/codegen/ts-to-proto.d.ts.map +0 -1
- package/dist/src/node/db/node.app.db.config.d.ts +0 -4
- package/dist/src/node/db/node.app.db.config.d.ts.map +0 -1
- package/dist/src/node/helpers/index.d.ts +0 -3
- package/dist/src/node/helpers/index.d.ts.map +0 -1
- package/dist/src/vite/arweave-default-shim.d.ts +0 -4
- package/dist/src/vite/arweave-default-shim.d.ts.map +0 -1
- package/dist/src/vite/debug-default-shim.d.ts +0 -3
- package/dist/src/vite/debug-default-shim.d.ts.map +0 -1
- package/dist/src/vite/easFix.d.ts +0 -2
- package/dist/src/vite/easFix.d.ts.map +0 -1
- package/dist/syncDbWithEas-CB5aXPtf.js.map +0 -1
- /package/dist/db/drizzle/{drizzle/0000_married_malice.sql → 0000_married_malice.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0001_sweet_bruce_banner.sql → 0001_sweet_bruce_banner.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0002_bitter_proudstar.sql → 0002_bitter_proudstar.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0003_cultured_senator_kelly.sql → 0003_cultured_senator_kelly.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0004_add_publisher_to_seeds.sql → 0004_add_publisher_to_seeds.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0005_bright_lily_hollister.sql → 0005_bright_lily_hollister.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0006_add_publisher_to_versions_and_metadata.sql → 0006_add_publisher_to_versions_and_metadata.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0007_add_required_to_properties.sql → 0007_add_required_to_properties.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0008_add_revoked_at_to_seeds.sql → 0008_add_revoked_at_to_seeds.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0009_happy_namor.sql → 0009_happy_namor.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0010_add_arweave_l1_finalize_jobs.sql → 0010_add_arweave_l1_finalize_jobs.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0011_normalize_placeholder_uids.sql → 0011_normalize_placeholder_uids.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0012_html_embedded_image_co_publish.sql → 0012_html_embedded_image_co_publish.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/0013_eas_sync_processes.sql → 0013_eas_sync_processes.sql} +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0000_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0001_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0002_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0003_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0004_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0005_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0006_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0007_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0008_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0009_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0010_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/0013_snapshot.json +0 -0
- /package/dist/db/drizzle/{drizzle/meta → meta}/_journal.json +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { BaseQueryClient, BaseEasClient, GET_SCHEMAS } from '@seedprotocol/eas';
|
|
2
|
+
export { getCanonicalItemPropertiesFromEas, getEasSchemaUidBySchemaName, getItemPropertiesFromEas, getItemVersionsFromEas, getSeedUidsBySchemaName, getSeedsBySchemaName, getSeedsFromSchemaUids } from '@seedprotocol/eas';
|
|
3
|
+
import { t as toSnakeCase } from './constants-slkc9uq0.js';
|
|
4
|
+
import 'debug';
|
|
5
|
+
import './BasePathResolver-BDgc7c4T.js';
|
|
6
|
+
import 'drizzle-orm/sqlite-core';
|
|
7
|
+
import 'drizzle-orm';
|
|
8
|
+
import '@seedprotocol/arweave';
|
|
9
|
+
import 'xstate';
|
|
10
|
+
import 'pluralize';
|
|
11
|
+
import '@sinclair/typebox';
|
|
12
|
+
import 'nanoid';
|
|
13
|
+
import 'nanoid-dictionary';
|
|
14
|
+
import '@seedprotocol/query';
|
|
15
|
+
|
|
16
|
+
/** Stays in SDK: depends on local Model registry. */
|
|
17
|
+
const getModelSchemasFromEas = async () => {
|
|
18
|
+
const queryClient = BaseQueryClient.getQueryClient();
|
|
19
|
+
const easClient = BaseEasClient.getEasClient();
|
|
20
|
+
const _mod_0 = await import('./index-ClwdGWfr.js');
|
|
21
|
+
const _ns_0 = _mod_0.am;
|
|
22
|
+
const modelMod = _ns_0;
|
|
23
|
+
const { Model } = modelMod;
|
|
24
|
+
const allModels = await Model.all();
|
|
25
|
+
const modelNames = allModels.map((m) => m.modelName).filter((name) => !!name);
|
|
26
|
+
if (modelNames.length === 0) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
const OR = [];
|
|
30
|
+
const hasImageModel = modelNames.includes('Image');
|
|
31
|
+
for (const modelName of modelNames) {
|
|
32
|
+
const snake = toSnakeCase(modelName);
|
|
33
|
+
OR.push({
|
|
34
|
+
schema: {
|
|
35
|
+
equals: `bytes32 ${snake}`,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const altSchema = `bytes32 ${modelName}`;
|
|
39
|
+
if (altSchema !== `bytes32 ${snake}`) {
|
|
40
|
+
OR.push({
|
|
41
|
+
schema: {
|
|
42
|
+
equals: altSchema,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (hasImageModel) {
|
|
48
|
+
OR.push({
|
|
49
|
+
schema: {
|
|
50
|
+
equals: `bytes32 image`,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const modelSchemas = await queryClient.fetchQuery({
|
|
55
|
+
queryKey: [`getSchemasAllModels`],
|
|
56
|
+
queryFn: async () => easClient.request(GET_SCHEMAS, {
|
|
57
|
+
where: {
|
|
58
|
+
OR,
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
});
|
|
62
|
+
if (!modelSchemas?.schemas?.length) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
return modelSchemas.schemas;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { getModelSchemasFromEas };
|
|
69
|
+
//# sourceMappingURL=eas-rx1grht5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas-rx1grht5.js","sources":["../../src/eas.ts"],"sourcesContent":["export {\n getItemVersionsFromEas,\n getItemPropertiesFromEas,\n getCanonicalItemPropertiesFromEas,\n getEasSchemaUidBySchemaName,\n getSeedsFromSchemaUids,\n getSeedsBySchemaName,\n getSeedUidsBySchemaName,\n} from '@seedprotocol/eas'\nexport type { Attestation, EASSchema } from '@seedprotocol/eas'\n\nimport { toSnakeCase } from '@/helpers'\nimport { withExcludeRevokedFilter } from '@seedprotocol/eas'\nimport { BaseEasClient } from '@seedprotocol/eas'\nimport { BaseQueryClient } from '@seedprotocol/eas'\nimport { GET_SCHEMAS } from '@seedprotocol/eas'\nimport type { EASSchema } from '@seedprotocol/eas'\n\ntype GetModelSchemasFromEas = () => Promise<EASSchema[]>\n\n/** Stays in SDK: depends on local Model registry. */\nexport const getModelSchemasFromEas: GetModelSchemasFromEas = async () => {\n const queryClient = BaseQueryClient.getQueryClient()\n const easClient = BaseEasClient.getEasClient()\n\n const modelMod = await import('./Model/Model')\n const { Model } = modelMod\n const allModels = await Model.all()\n const modelNames = allModels.map((m) => m.modelName).filter((name): name is string => !!name)\n\n if (modelNames.length === 0) {\n return []\n }\n\n const OR: Record<string, unknown>[] = []\n const hasImageModel = modelNames.includes('Image')\n\n for (const modelName of modelNames) {\n const snake = toSnakeCase(modelName)\n OR.push({\n schema: {\n equals: `bytes32 ${snake}`,\n },\n })\n const altSchema = `bytes32 ${modelName}`\n if (altSchema !== `bytes32 ${snake}`) {\n OR.push({\n schema: {\n equals: altSchema,\n },\n })\n }\n }\n\n if (hasImageModel) {\n OR.push({\n schema: {\n equals: `bytes32 image`,\n },\n })\n }\n\n const modelSchemas = await queryClient.fetchQuery({\n queryKey: [`getSchemasAllModels`],\n queryFn: async () =>\n easClient.request(GET_SCHEMAS, {\n where: {\n OR,\n },\n }),\n })\n\n if (!modelSchemas?.schemas?.length) {\n return []\n }\n\n return modelSchemas.schemas as EASSchema[]\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAC,WAAW,CAAA,CAAE;AAC7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAK,CAAA,CAAE;gBACL,CAAA,CAAE;AACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;SACF,CAAC;AACL,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC;AAEF,CAAA,CAAA,CAAA,CAAA,IAAI,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAE,MAAM,CAAA,CAAE;AAClC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAO,CAAA,CAAE;IACX;IAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB;AAC5C,CAAA;;"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as getItemData, I as Item } from './index-ClwdGWfr.js';
|
|
2
2
|
import { startCase } from 'lodash-es';
|
|
3
3
|
import 'xstate';
|
|
4
|
+
import './BasePathResolver-BDgc7c4T.js';
|
|
4
5
|
import 'drizzle-orm/sqlite-core';
|
|
5
6
|
import 'drizzle-orm';
|
|
6
|
-
import '
|
|
7
|
-
import 'nanoid-dictionary';
|
|
7
|
+
import './constants-slkc9uq0.js';
|
|
8
8
|
import 'debug';
|
|
9
|
-
import '
|
|
9
|
+
import '@seedprotocol/arweave';
|
|
10
|
+
import '@seedprotocol/eas';
|
|
10
11
|
import 'pluralize';
|
|
11
12
|
import '@sinclair/typebox';
|
|
13
|
+
import 'nanoid';
|
|
14
|
+
import 'nanoid-dictionary';
|
|
15
|
+
import '@seedprotocol/query';
|
|
16
|
+
import './db-CSmK0c3e.js';
|
|
12
17
|
import 'drizzle-orm/casing';
|
|
18
|
+
import './constants-DMHTYMgJ.js';
|
|
13
19
|
import 'rxjs';
|
|
14
|
-
import 'arweave';
|
|
15
20
|
import 'js-sha3';
|
|
16
21
|
|
|
17
22
|
const getItem = async ({ modelName, seedLocalId, seedUid }) => {
|
|
@@ -37,4 +42,4 @@ const getItem = async ({ modelName, seedLocalId, seedUid }) => {
|
|
|
37
42
|
};
|
|
38
43
|
|
|
39
44
|
export { getItem };
|
|
40
|
-
//# sourceMappingURL=getItem-
|
|
45
|
+
//# sourceMappingURL=getItem-hPBJU5JF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getItem-
|
|
1
|
+
{"version":3,"file":"getItem-hPBJU5JF.js","sources":["../../src/db/read/getItem.ts"],"sourcesContent":["import { getItemData } from './getItemData'\nimport { GetItem } from '@/types'\nimport { Item } from '@/Item/Item'\nimport { startCase } from 'lodash-es'\n\nexport const getItem: GetItem = async ({ modelName, seedLocalId, seedUid }) => {\n const itemInitObj = await getItemData({\n modelName,\n seedLocalId,\n seedUid,\n })\n\n if (!itemInitObj) {\n console.error(\n `[db/queries] [getItem] no itemInitObj modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.seedLocalId) {\n console.error(\n `[db/queries] [getItem] no itemInitObj.seedLocalId modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.modelName && itemInitObj.type) {\n itemInitObj.modelName = startCase(itemInitObj.type)\n }\n\n // DB + loadOrCreateItem + concurrent property saves (e.g. during publish) can exceed the default 5s idle wait.\n const getItemReadyTimeoutMs = 120_000\n return Item.create(itemInitObj, { readyTimeout: getItemReadyTimeoutMs })\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,OAAO,GAAY,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAI;AAC5E,IAAA,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC;QACpC,SAAS;QACT,WAAW;QACX,OAAO;AACR,KAAA,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,KAAK,CACX,CAAA,iDAAA,EAAoD,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAChH;QACD;IACF;AAEA,IAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5B,OAAO,CAAC,KAAK,CACX,CAAA,6DAAA,EAAgE,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAC5H;QACD;IACF;IAEA,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE;QAC9C,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD;;IAGA,MAAM,qBAAqB,GAAG,MAAO;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAC1E;;;;"}
|
|
@@ -1,25 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ZERO_BYTES32, VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, INTERNAL_PROPERTY_NAMES, defaultAttestationData, INTERNAL_DATA_TYPES } from './constants-DMHTYMgJ.js';
|
|
2
|
+
import { SchemaEncoder } from '@ethereum-attestation-service/eas-sdk';
|
|
3
|
+
import { d as getEasSchemaUidForModel, e as getLatestPublishedVersionRow, m as modelPropertiesToObject, p as parseListPropertyValueFromStorage, f as getEasSchemaForItemProperty } from './index-ClwdGWfr.js';
|
|
4
|
+
import { M as ModelPropertyDataTypes, r as resolveSeedIdsFromRefString, k as normalizeRelationPropertyValue, l as getCorrectId, n as normalizeDataType, t as toSnakeCase$1 } from './constants-slkc9uq0.js';
|
|
2
5
|
import { toSnakeCase } from 'drizzle-orm/casing';
|
|
3
6
|
import pluralize from 'pluralize';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
7
|
+
import { isValidEasAttestationUid, getEasSchemaUidForSchemaDefinition } from '@seedprotocol/eas';
|
|
8
|
+
import { g as getSegmentedItemProperties } from './getSegmentedItemProperties-DV2LHElJ.js';
|
|
9
|
+
import { getPropertySchema } from './property-CKhOxRNt.js';
|
|
6
10
|
import { upperFirst, camelCase } from 'lodash-es';
|
|
11
|
+
import { B as BaseDb, m as models, p as properties, h as htmlEmbeddedImageCoPublish } from './BasePathResolver-BDgc7c4T.js';
|
|
7
12
|
import { eq, and } from 'drizzle-orm';
|
|
8
13
|
import debug from 'debug';
|
|
9
|
-
import
|
|
14
|
+
import 'js-sha3';
|
|
10
15
|
import 'reflect-metadata';
|
|
16
|
+
import '@seedprotocol/arweave';
|
|
11
17
|
import 'xstate';
|
|
12
|
-
import 'drizzle-orm/sqlite-core';
|
|
13
18
|
import 'nanoid';
|
|
14
19
|
import 'nanoid-dictionary';
|
|
15
|
-
import '
|
|
20
|
+
import './db-CSmK0c3e.js';
|
|
16
21
|
import 'rxjs';
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
22
|
+
import '@seedprotocol/query';
|
|
23
|
+
import '@sinclair/typebox';
|
|
24
|
+
import 'drizzle-orm/sqlite-core';
|
|
25
|
+
|
|
26
|
+
/** UTF-8 string to 0x-prefixed bytes32 hex (right-padded with zeros). */
|
|
27
|
+
function encodeBytes32String(value) {
|
|
28
|
+
const bytes = new TextEncoder().encode(value);
|
|
29
|
+
if (bytes.length > 32) {
|
|
30
|
+
throw new Error(`encodeBytes32String: value exceeds 32 bytes (${bytes.length})`);
|
|
31
|
+
}
|
|
32
|
+
const hex = Array.from(bytes)
|
|
33
|
+
.map((b) => b.toString(16).padStart(2, '0'))
|
|
34
|
+
.join('');
|
|
35
|
+
return `0x${hex.padEnd(64, '0')}`;
|
|
36
|
+
}
|
|
19
37
|
|
|
20
38
|
// Dynamic import to break circular dependency with getItem -> BaseItem
|
|
21
39
|
// import { getItem } from '@/db/read/getItem'
|
|
22
40
|
debug('seedSdk:db:getPublishPayload');
|
|
41
|
+
/** Case-insensitive dataType match (schema JSON may use "text" vs "Text"). */
|
|
42
|
+
const matchesDataType = (actual, expected) => normalizeDataType(actual) === expected;
|
|
23
43
|
function addValidationError(ctx, message, field, code = 'publish_validation') {
|
|
24
44
|
ctx.errors.push({ field: field ?? '', message, code });
|
|
25
45
|
}
|
|
@@ -92,9 +112,7 @@ async function resolveVersionUid(seedLocalId, seedUid) {
|
|
|
92
112
|
if (published?.uid)
|
|
93
113
|
return published.uid;
|
|
94
114
|
try {
|
|
95
|
-
const
|
|
96
|
-
const _ns_0 = _mod_0.c8;
|
|
97
|
-
const { getItemVersionsFromEas } = _ns_0;
|
|
115
|
+
const { getItemVersionsFromEas } = await import('./eas-rx1grht5.js');
|
|
98
116
|
const attestations = await getItemVersionsFromEas({ seedUids: [seedUid] });
|
|
99
117
|
const latest = attestations?.[0];
|
|
100
118
|
if (latest?.id)
|
|
@@ -106,12 +124,15 @@ async function resolveVersionUid(seedLocalId, seedUid) {
|
|
|
106
124
|
return ZERO_BYTES32;
|
|
107
125
|
}
|
|
108
126
|
const getPropertyData = async (itemProperty, ctx) => {
|
|
109
|
-
const
|
|
110
|
-
const
|
|
127
|
+
const rawDataType = itemProperty.propertyDef?.dataType;
|
|
128
|
+
const dataType = rawDataType ? normalizeDataType(String(rawDataType)) : undefined;
|
|
129
|
+
const entry = dataType
|
|
130
|
+
? INTERNAL_DATA_TYPES[dataType]
|
|
131
|
+
: undefined;
|
|
111
132
|
const easDataType = entry?.eas;
|
|
112
133
|
if (!easDataType) {
|
|
113
134
|
if (ctx) {
|
|
114
|
-
addValidationError(ctx, `Unknown or unsupported property data type "${
|
|
135
|
+
addValidationError(ctx, `Unknown or unsupported property data type "${rawDataType ?? 'undefined'}" for property: ${itemProperty.propertyName}. Supported types: ${Object.keys(INTERNAL_DATA_TYPES).join(', ')}.`, itemProperty.propertyName);
|
|
115
136
|
}
|
|
116
137
|
return null;
|
|
117
138
|
}
|
|
@@ -122,10 +143,10 @@ const getPropertyData = async (itemProperty, ctx) => {
|
|
|
122
143
|
? ip.storagePropertyName
|
|
123
144
|
: itemProperty.propertyName;
|
|
124
145
|
// Align List-of-relation EAS field name with processListProperty (authorIdentityIds for authors → Identity)
|
|
125
|
-
if (propertyDefForName?.dataType
|
|
126
|
-
(propertyDefForName
|
|
146
|
+
if (matchesDataType(propertyDefForName?.dataType, ModelPropertyDataTypes.List) &&
|
|
147
|
+
(propertyDefForName?.ref || propertyDefForName?.refModelName) &&
|
|
127
148
|
!(ip.storagePropertyName && ip.storagePropertyName.length > 0)) {
|
|
128
|
-
const ref = propertyDefForName
|
|
149
|
+
const ref = propertyDefForName?.ref ?? propertyDefForName?.refModelName;
|
|
129
150
|
if (ref) {
|
|
130
151
|
const singular = pluralize.singular(itemProperty.propertyName);
|
|
131
152
|
nameForEas = `${singular}${ref}Ids`;
|
|
@@ -157,16 +178,18 @@ const getPropertyData = async (itemProperty, ctx) => {
|
|
|
157
178
|
* Also ensures Relation/Image properties have required from schema when missing (for publish validation). */
|
|
158
179
|
const ensurePropertyDefs = async (targetItem) => {
|
|
159
180
|
targetItem.properties.filter((p) => targetItem.modelName &&
|
|
160
|
-
(!p.propertyDef ||
|
|
181
|
+
(!p.propertyDef ||
|
|
182
|
+
(matchesDataType(p.propertyDef?.dataType, ModelPropertyDataTypes.Relation) &&
|
|
183
|
+
p.propertyDef?.required === undefined)));
|
|
161
184
|
let schema;
|
|
162
185
|
for (const itemProperty of targetItem.properties) {
|
|
163
186
|
if (!itemProperty.propertyDef && targetItem.modelName) {
|
|
164
187
|
schema = await getPropertySchema(targetItem.modelName, itemProperty.propertyName);
|
|
165
188
|
if (!schema) {
|
|
166
189
|
try {
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const { Model } =
|
|
190
|
+
const _mod_0 = await import('./index-ClwdGWfr.js');
|
|
191
|
+
const _ns_0 = _mod_0.am;
|
|
192
|
+
const { Model } = _ns_0;
|
|
170
193
|
const normalizedModelName = upperFirst(camelCase(targetItem.modelName));
|
|
171
194
|
let model = Model.getByName(normalizedModelName);
|
|
172
195
|
if (!model?.properties?.length) {
|
|
@@ -238,15 +261,6 @@ const ensurePropertyDefs = async (targetItem) => {
|
|
|
238
261
|
}
|
|
239
262
|
}
|
|
240
263
|
};
|
|
241
|
-
// Lazy import SchemaEncoder to avoid module resolution issues with ts-import
|
|
242
|
-
let SchemaEncoderClass = null;
|
|
243
|
-
const getSchemaEncoder = async () => {
|
|
244
|
-
if (!SchemaEncoderClass) {
|
|
245
|
-
const easSdk = await import('@ethereum-attestation-service/eas-sdk');
|
|
246
|
-
SchemaEncoderClass = easSdk.SchemaEncoder;
|
|
247
|
-
}
|
|
248
|
-
return SchemaEncoderClass;
|
|
249
|
-
};
|
|
250
264
|
const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx, buildOpts) => {
|
|
251
265
|
const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
|
|
252
266
|
for (const basicProperty of itemBasicProperties) {
|
|
@@ -257,12 +271,12 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
257
271
|
const snapshot = basicProperty.getService().getSnapshot();
|
|
258
272
|
const context = 'context' in snapshot ? snapshot.context : null;
|
|
259
273
|
const propertyDef = basicProperty.propertyDef ?? (context ? context.propertyRecordSchema : undefined);
|
|
260
|
-
const isFileImageHtml = propertyDef?.dataType
|
|
261
|
-
propertyDef?.dataType
|
|
262
|
-
propertyDef?.dataType
|
|
263
|
-
const isJsonStorage = propertyDef?.dataType
|
|
264
|
-
propertyDef?.refValueType
|
|
265
|
-
const isRelation = propertyDef?.dataType
|
|
274
|
+
const isFileImageHtml = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.File) ||
|
|
275
|
+
matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
|
|
276
|
+
matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Html);
|
|
277
|
+
const isJsonStorage = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
|
|
278
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Json);
|
|
279
|
+
const isRelation = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Relation);
|
|
266
280
|
// storageTransactionId is usually Text in the schema; .value still prefers renderValue (URL, label).
|
|
267
281
|
const isStorageTransactionIdProp = isStorageTransactionPropertyName(basicProperty.propertyName);
|
|
268
282
|
// File/Image/Html + Relation + Json storage + storage tx id: use propertyValue (canonical).
|
|
@@ -277,7 +291,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
277
291
|
continue;
|
|
278
292
|
}
|
|
279
293
|
// Relation + Image/File/Html/Json refs often expose seedLocalId on context.propertyValue while .value is an object — align for encode + resolve hints
|
|
280
|
-
if (propertyDef?.dataType
|
|
294
|
+
if (matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Relation) ||
|
|
281
295
|
isFileImageHtml ||
|
|
282
296
|
isJsonStorage) {
|
|
283
297
|
const pv = context.propertyValue;
|
|
@@ -332,9 +346,11 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
332
346
|
}
|
|
333
347
|
// Validate against property validation rules (enum, pattern, minLength, maxLength) before encoding
|
|
334
348
|
if (propertyDef?.validation) {
|
|
335
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
349
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-CLzAdBm-.js');
|
|
336
350
|
const validationService = new SchemaValidationService();
|
|
337
|
-
const validationResult = validationService.validatePropertyValue(value, propertyDef.dataType, propertyDef.validation, propertyDef.refValueType
|
|
351
|
+
const validationResult = validationService.validatePropertyValue(value, normalizeDataType(propertyDef.dataType), propertyDef.validation, propertyDef.refValueType
|
|
352
|
+
? normalizeDataType(propertyDef.refValueType)
|
|
353
|
+
: undefined);
|
|
338
354
|
if (!validationResult.isValid && validationResult.errors.length > 0) {
|
|
339
355
|
const firstError = validationResult.errors[0];
|
|
340
356
|
addValidationError(ctx, firstError.message, basicProperty.propertyName, firstError.code ?? 'publish_validation');
|
|
@@ -366,7 +382,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
366
382
|
continue;
|
|
367
383
|
rawIds.push(trimmed);
|
|
368
384
|
if (trimmed.length !== 66 && !trimmed.startsWith('0x')) {
|
|
369
|
-
newValues.push(
|
|
385
|
+
newValues.push(encodeBytes32String(trimmed));
|
|
370
386
|
}
|
|
371
387
|
else {
|
|
372
388
|
newValues.push(trimmed);
|
|
@@ -392,7 +408,6 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
392
408
|
];
|
|
393
409
|
let encodedData;
|
|
394
410
|
try {
|
|
395
|
-
const SchemaEncoder = await getSchemaEncoder();
|
|
396
411
|
const dataEncoder = new SchemaEncoder(schemaDef);
|
|
397
412
|
encodedData = dataEncoder.encodeData(data);
|
|
398
413
|
}
|
|
@@ -459,19 +474,19 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
459
474
|
let value = context.propertyValue;
|
|
460
475
|
// File/Image/Html/Json metadata is stored with Id suffix (e.g. "textId"); context may not have propertyValue
|
|
461
476
|
// if the property was created from schema before metadata loaded. Fallback to metadata lookup.
|
|
462
|
-
const isStorageSeed = relationOrImageProperty.propertyDef?.dataType
|
|
463
|
-
relationOrImageProperty.propertyDef?.dataType
|
|
464
|
-
relationOrImageProperty.propertyDef?.dataType
|
|
465
|
-
relationOrImageProperty.propertyDef?.dataType
|
|
466
|
-
(relationOrImageProperty.propertyDef?.dataType
|
|
467
|
-
(relationOrImageProperty.propertyDef?.refValueType
|
|
468
|
-
relationOrImageProperty.propertyDef?.refValueType
|
|
469
|
-
relationOrImageProperty.propertyDef?.refValueType
|
|
470
|
-
relationOrImageProperty.propertyDef?.refValueType
|
|
477
|
+
const isStorageSeed = matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.File) ||
|
|
478
|
+
matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
|
|
479
|
+
matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html) ||
|
|
480
|
+
matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
|
|
481
|
+
(matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Relation) &&
|
|
482
|
+
(matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.File) ||
|
|
483
|
+
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Image) ||
|
|
484
|
+
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Html) ||
|
|
485
|
+
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Json)));
|
|
471
486
|
if (isStorageSeed && (context.seedLocalId || context.seedUid)) {
|
|
472
|
-
const
|
|
473
|
-
const
|
|
474
|
-
const { getPropertyData: getPropertyDataFromDb } =
|
|
487
|
+
const _mod_1 = await import('./index-ClwdGWfr.js');
|
|
488
|
+
const _ns_1 = _mod_1.ai;
|
|
489
|
+
const { getPropertyData: getPropertyDataFromDb } = _ns_1;
|
|
475
490
|
const metaRow = await getPropertyDataFromDb({
|
|
476
491
|
propertyName: relationOrImageProperty.propertyName,
|
|
477
492
|
seedLocalId: context.seedLocalId,
|
|
@@ -522,17 +537,17 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
522
537
|
}
|
|
523
538
|
// Required relation/image/file/html/json with no value: cannot publish
|
|
524
539
|
if (isRequired && !value) {
|
|
525
|
-
const typeLabel = propertyDef?.dataType
|
|
526
|
-
propertyDef?.refValueType
|
|
540
|
+
const typeLabel = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.File) ||
|
|
541
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.File)
|
|
527
542
|
? 'file'
|
|
528
|
-
: propertyDef?.dataType
|
|
529
|
-
propertyDef?.refValueType
|
|
543
|
+
: matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
|
|
544
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Image)
|
|
530
545
|
? 'image'
|
|
531
|
-
: propertyDef?.dataType
|
|
532
|
-
propertyDef?.refValueType
|
|
546
|
+
: matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Html) ||
|
|
547
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Html)
|
|
533
548
|
? 'html'
|
|
534
|
-
: propertyDef?.dataType
|
|
535
|
-
propertyDef?.refValueType
|
|
549
|
+
: matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
|
|
550
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Json)
|
|
536
551
|
? 'json'
|
|
537
552
|
: 'relation';
|
|
538
553
|
const refLabel = propertyDef?.ref ?? propertyDef?.refModelName ?? 'related';
|
|
@@ -557,7 +572,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
557
572
|
return multiPublishPayload;
|
|
558
573
|
}
|
|
559
574
|
// Use dynamic import to break circular dependency
|
|
560
|
-
const getItemMod = await import('./getItem-
|
|
575
|
+
const getItemMod = await import('./getItem-hPBJU5JF.js');
|
|
561
576
|
const { getItem } = getItemMod;
|
|
562
577
|
const relatedItem = await getItem({
|
|
563
578
|
seedLocalId,
|
|
@@ -578,16 +593,16 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
578
593
|
}
|
|
579
594
|
const versionUid = getVersionUid(relatedItem);
|
|
580
595
|
let modelName;
|
|
581
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
596
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image)) {
|
|
582
597
|
modelName = 'Image';
|
|
583
598
|
}
|
|
584
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
599
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.File)) {
|
|
585
600
|
modelName = 'File';
|
|
586
601
|
}
|
|
587
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
602
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html)) {
|
|
588
603
|
modelName = 'Html';
|
|
589
604
|
}
|
|
590
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
605
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Relation)) {
|
|
591
606
|
const def = relationOrImageProperty.propertyDef;
|
|
592
607
|
modelName = def.ref ?? def.refModelName;
|
|
593
608
|
}
|
|
@@ -655,7 +670,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
655
670
|
async function resolveHtmlPropertySchemaUidByHtmlSeed(item, htmlSeedLocalId, ctx) {
|
|
656
671
|
const want = htmlSeedLocalId.trim();
|
|
657
672
|
for (const p of item.properties) {
|
|
658
|
-
if (p.propertyDef?.dataType
|
|
673
|
+
if (!matchesDataType(p.propertyDef?.dataType, ModelPropertyDataTypes.Html))
|
|
659
674
|
continue;
|
|
660
675
|
const snap = p.getService().getSnapshot();
|
|
661
676
|
const c = 'context' in snap ? snap.context : null;
|
|
@@ -683,7 +698,7 @@ async function processHtmlEmbeddedCoPublishImagePayloads(item, multiPublishPaylo
|
|
|
683
698
|
if (rows.length === 0)
|
|
684
699
|
return multiPublishPayload;
|
|
685
700
|
const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
|
|
686
|
-
const getItemMod = await import('./getItem-
|
|
701
|
+
const getItemMod = await import('./getItem-hPBJU5JF.js');
|
|
687
702
|
const { getItem } = getItemMod;
|
|
688
703
|
const doneImages = new Set();
|
|
689
704
|
for (const row of rows) {
|
|
@@ -810,7 +825,7 @@ const processListProperty = async (listProperty, multiPublishPayload, originalSe
|
|
|
810
825
|
if (!seedLocalId && !seedUid)
|
|
811
826
|
continue;
|
|
812
827
|
// Use dynamic import to break circular dependency
|
|
813
|
-
const getItemMod = await import('./getItem-
|
|
828
|
+
const getItemMod = await import('./getItem-hPBJU5JF.js');
|
|
814
829
|
const { getItem } = getItemMod;
|
|
815
830
|
const relatedItem = await getItem({
|
|
816
831
|
seedLocalId,
|
|
@@ -829,13 +844,13 @@ const processListProperty = async (listProperty, multiPublishPayload, originalSe
|
|
|
829
844
|
const def = listProperty.propertyDef;
|
|
830
845
|
modelName = def.ref ?? def.refModelName;
|
|
831
846
|
}
|
|
832
|
-
if (listProperty.propertyDef?.dataType
|
|
847
|
+
if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image)) {
|
|
833
848
|
modelName = 'Image';
|
|
834
849
|
}
|
|
835
|
-
if (listProperty.propertyDef?.dataType
|
|
850
|
+
if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.File)) {
|
|
836
851
|
modelName = 'File';
|
|
837
852
|
}
|
|
838
|
-
if (listProperty.propertyDef?.dataType
|
|
853
|
+
if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html)) {
|
|
839
854
|
modelName = 'Html';
|
|
840
855
|
}
|
|
841
856
|
if (!modelName) {
|
|
@@ -1317,7 +1332,6 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
|
|
|
1317
1332
|
if (Object.keys(resolvedUids).length === 0) {
|
|
1318
1333
|
return multiPayload;
|
|
1319
1334
|
}
|
|
1320
|
-
const SchemaEncoder = await getSchemaEncoder();
|
|
1321
1335
|
const result = [];
|
|
1322
1336
|
for (const payload of multiPayload) {
|
|
1323
1337
|
const updatedAttestations = [];
|
|
@@ -1418,4 +1432,4 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
|
|
|
1418
1432
|
};
|
|
1419
1433
|
|
|
1420
1434
|
export { PublishValidationFailedError, getPublishPayload, resolvePublishPayloadValues, validateItemForPublish };
|
|
1421
|
-
//# sourceMappingURL=getPublishPayload-
|
|
1435
|
+
//# sourceMappingURL=getPublishPayload-5ugovGK5.js.map
|