@seedprotocol/sdk 0.4.32 → 0.5.1
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-D-ysg8zA.js} +37 -43
- package/dist/ModelProperty-D-ysg8zA.js.map +1 -0
- package/dist/{Schema-DonRkUOJ.js → Schema-CyCftnKI.js} +40 -40
- package/dist/{Schema-DonRkUOJ.js.map → Schema-CyCftnKI.js.map} +1 -1
- package/dist/{SchemaValidationService-DcmfhQae.js → SchemaValidationService-POM6jHbJ.js} +9 -5
- package/dist/{SchemaValidationService-DcmfhQae.js.map → SchemaValidationService-POM6jHbJ.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-CKTfvFgQ.js → backfillMetadataPropertyIds-DzZw57iJ.js} +3 -11
- package/dist/{backfillMetadataPropertyIds-CKTfvFgQ.js.map → backfillMetadataPropertyIds-DzZw57iJ.js.map} +1 -1
- package/dist/cjs/{ModelProperty-BQYU5hPQ.js → ModelProperty-CmuGJvyi.js} +25 -26
- package/dist/cjs/{ModelProperty-BQYU5hPQ.js.map → ModelProperty-CmuGJvyi.js.map} +1 -1
- package/dist/cjs/{Schema-BcRHcQ0W.js → Schema-gpFnZMhB.js} +28 -29
- package/dist/cjs/{Schema-BcRHcQ0W.js.map → Schema-gpFnZMhB.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-CQNDgyZl.js → SchemaValidationService-E3xTSRai.js} +9 -10
- package/dist/cjs/{SchemaValidationService-CQNDgyZl.js.map → SchemaValidationService-E3xTSRai.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-Dn4oVmEv.js → backfillMetadataPropertyIds-_bivrvRs.js} +11 -12
- package/dist/cjs/{backfillMetadataPropertyIds-Dn4oVmEv.js.map → backfillMetadataPropertyIds-_bivrvRs.js.map} +1 -1
- package/dist/cjs/eas-BwDKJmlb.js +112 -0
- package/dist/cjs/eas-BwDKJmlb.js.map +1 -0
- package/dist/cjs/{getItem-DpnPrzl3.js → getItem-MShQw3sz.js} +11 -12
- package/dist/cjs/{getItem-DpnPrzl3.js.map → getItem-MShQw3sz.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-CGKMEL3H.js → getPublishPayload-C1nOOXp_.js} +93 -83
- package/dist/cjs/getPublishPayload-C1nOOXp_.js.map +1 -0
- package/dist/cjs/{getPublishUploads-DeI0f2UN.js → getPublishUploads-BjgxgrKD.js} +17 -18
- package/dist/cjs/{getPublishUploads-DeI0f2UN.js.map → getPublishUploads-BjgxgrKD.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-BgS_FhAx.js → getSegmentedItemProperties-Cuw7wcxb.js} +64 -15
- package/dist/cjs/getSegmentedItemProperties-Cuw7wcxb.js.map +1 -0
- package/dist/cjs/{index-BnAqr2le.js → index-9Z2FOvLD.js} +12 -13
- package/dist/cjs/index-9Z2FOvLD.js.map +1 -0
- package/dist/cjs/{index-ByozbTn_.js → index-vk2DeF2D.js} +1237 -3235
- package/dist/cjs/index-vk2DeF2D.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-DhWda0J9.js} +11 -25
- package/dist/cjs/{ownership-CsWuaNfH.js.map → ownership-DhWda0J9.js.map} +1 -1
- package/dist/cjs/{property-CeR45LMx.js → property-D3Ww2_Qh.js} +13 -14
- package/dist/cjs/{property-CeR45LMx.js.map → property-D3Ww2_Qh.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-CA2Lum5V.js → syncDbWithEas-Dht3_7UD.js} +26 -39
- package/dist/cjs/syncDbWithEas-Dht3_7UD.js.map +1 -0
- package/dist/configurePlatform-R5neRbQ9.js +27 -0
- package/dist/configurePlatform-R5neRbQ9.js.map +1 -0
- package/dist/constants-B5S5JPDK.js +660 -0
- package/dist/constants-B5S5JPDK.js.map +1 -0
- package/dist/constants-DMHTYMgJ.js +120 -0
- package/dist/constants-DMHTYMgJ.js.map +1 -0
- package/dist/db-Cvh84NY7.js +1972 -0
- package/dist/db-Cvh84NY7.js.map +1 -0
- package/dist/eas-D9b7z2Wn.js +68 -0
- package/dist/eas-D9b7z2Wn.js.map +1 -0
- package/dist/{getItem-GOXWo_Iy.js → getItem-B81V3m4S.js} +10 -6
- package/dist/{getItem-GOXWo_Iy.js.map → getItem-B81V3m4S.js.map} +1 -1
- package/dist/{getPublishPayload-D16enahU.js → getPublishPayload-CNYsn8-6.js} +87 -74
- package/dist/getPublishPayload-CNYsn8-6.js.map +1 -0
- package/dist/{getPublishUploads-wGqH19UY.js → getPublishUploads-D9rPHkB7.js} +14 -10
- package/dist/{getPublishUploads-wGqH19UY.js.map → getPublishUploads-D9rPHkB7.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-Be3kYWY3.js → getSegmentedItemProperties-Bg3_b-b1.js} +18 -15
- package/dist/getSegmentedItemProperties-Bg3_b-b1.js.map +1 -0
- package/dist/{index-BcXKZQpX.js → index--F3Wolt5.js} +1171 -5452
- package/dist/index--F3Wolt5.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-oi4roUVf.js +22 -0
- package/dist/index-oi4roUVf.js.map +1 -0
- package/dist/index.node-Bow8kHew.js +503 -0
- package/dist/index.node-Bow8kHew.js.map +1 -0
- package/dist/main.cjs +16 -15
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +31 -22
- package/dist/main.js.map +1 -1
- package/dist/node.js +37 -363
- package/dist/node.js.map +1 -1
- package/dist/{ownership-C17YhE7J.js → ownership-BF_ZUKIp.js} +13 -9
- package/dist/{ownership-C17YhE7J.js.map → ownership-BF_ZUKIp.js.map} +1 -1
- package/dist/platform.browser.js +3499 -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-BdyDfcSc.js} +14 -11
- package/dist/property-BdyDfcSc.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/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/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/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/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 +15 -10
- 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.map +1 -1
- package/dist/src/helpers/property/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +9 -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 +1 -1
- 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/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 +10 -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-DMOJHtkP.js} +20 -15
- package/dist/syncDbWithEas-DMOJHtkP.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,68 @@
|
|
|
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-B5S5JPDK.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
|
+
|
|
15
|
+
/** Stays in SDK: depends on local Model registry. */
|
|
16
|
+
const getModelSchemasFromEas = async () => {
|
|
17
|
+
const queryClient = BaseQueryClient.getQueryClient();
|
|
18
|
+
const easClient = BaseEasClient.getEasClient();
|
|
19
|
+
const _mod_0 = await import('./index--F3Wolt5.js');
|
|
20
|
+
const _ns_0 = _mod_0.ah;
|
|
21
|
+
const modelMod = _ns_0;
|
|
22
|
+
const { Model } = modelMod;
|
|
23
|
+
const allModels = await Model.all();
|
|
24
|
+
const modelNames = allModels.map((m) => m.modelName).filter((name) => !!name);
|
|
25
|
+
if (modelNames.length === 0) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const OR = [];
|
|
29
|
+
const hasImageModel = modelNames.includes('Image');
|
|
30
|
+
for (const modelName of modelNames) {
|
|
31
|
+
const snake = toSnakeCase(modelName);
|
|
32
|
+
OR.push({
|
|
33
|
+
schema: {
|
|
34
|
+
equals: `bytes32 ${snake}`,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
const altSchema = `bytes32 ${modelName}`;
|
|
38
|
+
if (altSchema !== `bytes32 ${snake}`) {
|
|
39
|
+
OR.push({
|
|
40
|
+
schema: {
|
|
41
|
+
equals: altSchema,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (hasImageModel) {
|
|
47
|
+
OR.push({
|
|
48
|
+
schema: {
|
|
49
|
+
equals: `bytes32 image`,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const modelSchemas = await queryClient.fetchQuery({
|
|
54
|
+
queryKey: [`getSchemasAllModels`],
|
|
55
|
+
queryFn: async () => easClient.request(GET_SCHEMAS, {
|
|
56
|
+
where: {
|
|
57
|
+
OR,
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
if (!modelSchemas?.schemas?.length) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
return modelSchemas.schemas;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { getModelSchemasFromEas };
|
|
68
|
+
//# sourceMappingURL=eas-D9b7z2Wn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas-D9b7z2Wn.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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,GAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW;AACvE,CAAA,CAAA,CAAA,CAAA,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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,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,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as getItemData, I as Item } from './index--F3Wolt5.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-B5S5JPDK.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 './db-Cvh84NY7.js';
|
|
12
16
|
import 'drizzle-orm/casing';
|
|
17
|
+
import './constants-DMHTYMgJ.js';
|
|
13
18
|
import 'rxjs';
|
|
14
|
-
import 'arweave';
|
|
15
19
|
import 'js-sha3';
|
|
16
20
|
|
|
17
21
|
const getItem = async ({ modelName, seedLocalId, seedUid }) => {
|
|
@@ -37,4 +41,4 @@ const getItem = async ({ modelName, seedLocalId, seedUid }) => {
|
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
export { getItem };
|
|
40
|
-
//# sourceMappingURL=getItem-
|
|
44
|
+
//# sourceMappingURL=getItem-B81V3m4S.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getItem-
|
|
1
|
+
{"version":3,"file":"getItem-B81V3m4S.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,44 @@
|
|
|
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--F3Wolt5.js';
|
|
4
|
+
import { M as ModelPropertyDataTypes, r as resolveSeedIdsFromRefString, k as normalizeRelationPropertyValue, l as getCorrectId, n as normalizeDataType, t as toSnakeCase$1 } from './constants-B5S5JPDK.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-Bg3_b-b1.js';
|
|
9
|
+
import { getPropertySchema } from './property-BdyDfcSc.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-Cvh84NY7.js';
|
|
16
21
|
import 'rxjs';
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
22
|
+
import '@sinclair/typebox';
|
|
23
|
+
import 'drizzle-orm/sqlite-core';
|
|
24
|
+
|
|
25
|
+
/** UTF-8 string to 0x-prefixed bytes32 hex (right-padded with zeros). */
|
|
26
|
+
function encodeBytes32String(value) {
|
|
27
|
+
const bytes = new TextEncoder().encode(value);
|
|
28
|
+
if (bytes.length > 32) {
|
|
29
|
+
throw new Error(`encodeBytes32String: value exceeds 32 bytes (${bytes.length})`);
|
|
30
|
+
}
|
|
31
|
+
const hex = Array.from(bytes)
|
|
32
|
+
.map((b) => b.toString(16).padStart(2, '0'))
|
|
33
|
+
.join('');
|
|
34
|
+
return `0x${hex.padEnd(64, '0')}`;
|
|
35
|
+
}
|
|
19
36
|
|
|
20
37
|
// Dynamic import to break circular dependency with getItem -> BaseItem
|
|
21
38
|
// import { getItem } from '@/db/read/getItem'
|
|
22
39
|
debug('seedSdk:db:getPublishPayload');
|
|
40
|
+
/** Case-insensitive dataType match (schema JSON may use "text" vs "Text"). */
|
|
41
|
+
const matchesDataType = (actual, expected) => normalizeDataType(actual) === expected;
|
|
23
42
|
function addValidationError(ctx, message, field, code = 'publish_validation') {
|
|
24
43
|
ctx.errors.push({ field: field ?? '', message, code });
|
|
25
44
|
}
|
|
@@ -92,9 +111,7 @@ async function resolveVersionUid(seedLocalId, seedUid) {
|
|
|
92
111
|
if (published?.uid)
|
|
93
112
|
return published.uid;
|
|
94
113
|
try {
|
|
95
|
-
const
|
|
96
|
-
const _ns_0 = _mod_0.c8;
|
|
97
|
-
const { getItemVersionsFromEas } = _ns_0;
|
|
114
|
+
const { getItemVersionsFromEas } = await import('./eas-D9b7z2Wn.js');
|
|
98
115
|
const attestations = await getItemVersionsFromEas({ seedUids: [seedUid] });
|
|
99
116
|
const latest = attestations?.[0];
|
|
100
117
|
if (latest?.id)
|
|
@@ -106,12 +123,15 @@ async function resolveVersionUid(seedLocalId, seedUid) {
|
|
|
106
123
|
return ZERO_BYTES32;
|
|
107
124
|
}
|
|
108
125
|
const getPropertyData = async (itemProperty, ctx) => {
|
|
109
|
-
const
|
|
110
|
-
const
|
|
126
|
+
const rawDataType = itemProperty.propertyDef?.dataType;
|
|
127
|
+
const dataType = rawDataType ? normalizeDataType(String(rawDataType)) : undefined;
|
|
128
|
+
const entry = dataType
|
|
129
|
+
? INTERNAL_DATA_TYPES[dataType]
|
|
130
|
+
: undefined;
|
|
111
131
|
const easDataType = entry?.eas;
|
|
112
132
|
if (!easDataType) {
|
|
113
133
|
if (ctx) {
|
|
114
|
-
addValidationError(ctx, `Unknown or unsupported property data type "${
|
|
134
|
+
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
135
|
}
|
|
116
136
|
return null;
|
|
117
137
|
}
|
|
@@ -122,10 +142,10 @@ const getPropertyData = async (itemProperty, ctx) => {
|
|
|
122
142
|
? ip.storagePropertyName
|
|
123
143
|
: itemProperty.propertyName;
|
|
124
144
|
// Align List-of-relation EAS field name with processListProperty (authorIdentityIds for authors → Identity)
|
|
125
|
-
if (propertyDefForName?.dataType
|
|
126
|
-
(propertyDefForName
|
|
145
|
+
if (matchesDataType(propertyDefForName?.dataType, ModelPropertyDataTypes.List) &&
|
|
146
|
+
(propertyDefForName?.ref || propertyDefForName?.refModelName) &&
|
|
127
147
|
!(ip.storagePropertyName && ip.storagePropertyName.length > 0)) {
|
|
128
|
-
const ref = propertyDefForName
|
|
148
|
+
const ref = propertyDefForName?.ref ?? propertyDefForName?.refModelName;
|
|
129
149
|
if (ref) {
|
|
130
150
|
const singular = pluralize.singular(itemProperty.propertyName);
|
|
131
151
|
nameForEas = `${singular}${ref}Ids`;
|
|
@@ -157,16 +177,18 @@ const getPropertyData = async (itemProperty, ctx) => {
|
|
|
157
177
|
* Also ensures Relation/Image properties have required from schema when missing (for publish validation). */
|
|
158
178
|
const ensurePropertyDefs = async (targetItem) => {
|
|
159
179
|
targetItem.properties.filter((p) => targetItem.modelName &&
|
|
160
|
-
(!p.propertyDef ||
|
|
180
|
+
(!p.propertyDef ||
|
|
181
|
+
(matchesDataType(p.propertyDef?.dataType, ModelPropertyDataTypes.Relation) &&
|
|
182
|
+
p.propertyDef?.required === undefined)));
|
|
161
183
|
let schema;
|
|
162
184
|
for (const itemProperty of targetItem.properties) {
|
|
163
185
|
if (!itemProperty.propertyDef && targetItem.modelName) {
|
|
164
186
|
schema = await getPropertySchema(targetItem.modelName, itemProperty.propertyName);
|
|
165
187
|
if (!schema) {
|
|
166
188
|
try {
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const { Model } =
|
|
189
|
+
const _mod_0 = await import('./index--F3Wolt5.js');
|
|
190
|
+
const _ns_0 = _mod_0.ah;
|
|
191
|
+
const { Model } = _ns_0;
|
|
170
192
|
const normalizedModelName = upperFirst(camelCase(targetItem.modelName));
|
|
171
193
|
let model = Model.getByName(normalizedModelName);
|
|
172
194
|
if (!model?.properties?.length) {
|
|
@@ -238,15 +260,6 @@ const ensurePropertyDefs = async (targetItem) => {
|
|
|
238
260
|
}
|
|
239
261
|
}
|
|
240
262
|
};
|
|
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
263
|
const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx, buildOpts) => {
|
|
251
264
|
const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
|
|
252
265
|
for (const basicProperty of itemBasicProperties) {
|
|
@@ -257,12 +270,12 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
257
270
|
const snapshot = basicProperty.getService().getSnapshot();
|
|
258
271
|
const context = 'context' in snapshot ? snapshot.context : null;
|
|
259
272
|
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
|
|
273
|
+
const isFileImageHtml = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.File) ||
|
|
274
|
+
matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
|
|
275
|
+
matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Html);
|
|
276
|
+
const isJsonStorage = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
|
|
277
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Json);
|
|
278
|
+
const isRelation = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Relation);
|
|
266
279
|
// storageTransactionId is usually Text in the schema; .value still prefers renderValue (URL, label).
|
|
267
280
|
const isStorageTransactionIdProp = isStorageTransactionPropertyName(basicProperty.propertyName);
|
|
268
281
|
// File/Image/Html + Relation + Json storage + storage tx id: use propertyValue (canonical).
|
|
@@ -277,7 +290,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
277
290
|
continue;
|
|
278
291
|
}
|
|
279
292
|
// 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
|
|
293
|
+
if (matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Relation) ||
|
|
281
294
|
isFileImageHtml ||
|
|
282
295
|
isJsonStorage) {
|
|
283
296
|
const pv = context.propertyValue;
|
|
@@ -332,9 +345,11 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
332
345
|
}
|
|
333
346
|
// Validate against property validation rules (enum, pattern, minLength, maxLength) before encoding
|
|
334
347
|
if (propertyDef?.validation) {
|
|
335
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
348
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-POM6jHbJ.js');
|
|
336
349
|
const validationService = new SchemaValidationService();
|
|
337
|
-
const validationResult = validationService.validatePropertyValue(value, propertyDef.dataType, propertyDef.validation, propertyDef.refValueType
|
|
350
|
+
const validationResult = validationService.validatePropertyValue(value, normalizeDataType(propertyDef.dataType), propertyDef.validation, propertyDef.refValueType
|
|
351
|
+
? normalizeDataType(propertyDef.refValueType)
|
|
352
|
+
: undefined);
|
|
338
353
|
if (!validationResult.isValid && validationResult.errors.length > 0) {
|
|
339
354
|
const firstError = validationResult.errors[0];
|
|
340
355
|
addValidationError(ctx, firstError.message, basicProperty.propertyName, firstError.code ?? 'publish_validation');
|
|
@@ -366,7 +381,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
366
381
|
continue;
|
|
367
382
|
rawIds.push(trimmed);
|
|
368
383
|
if (trimmed.length !== 66 && !trimmed.startsWith('0x')) {
|
|
369
|
-
newValues.push(
|
|
384
|
+
newValues.push(encodeBytes32String(trimmed));
|
|
370
385
|
}
|
|
371
386
|
else {
|
|
372
387
|
newValues.push(trimmed);
|
|
@@ -392,7 +407,6 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
392
407
|
];
|
|
393
408
|
let encodedData;
|
|
394
409
|
try {
|
|
395
|
-
const SchemaEncoder = await getSchemaEncoder();
|
|
396
410
|
const dataEncoder = new SchemaEncoder(schemaDef);
|
|
397
411
|
encodedData = dataEncoder.encodeData(data);
|
|
398
412
|
}
|
|
@@ -459,19 +473,19 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
459
473
|
let value = context.propertyValue;
|
|
460
474
|
// File/Image/Html/Json metadata is stored with Id suffix (e.g. "textId"); context may not have propertyValue
|
|
461
475
|
// 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
|
|
476
|
+
const isStorageSeed = matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.File) ||
|
|
477
|
+
matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
|
|
478
|
+
matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html) ||
|
|
479
|
+
matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
|
|
480
|
+
(matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Relation) &&
|
|
481
|
+
(matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.File) ||
|
|
482
|
+
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Image) ||
|
|
483
|
+
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Html) ||
|
|
484
|
+
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Json)));
|
|
471
485
|
if (isStorageSeed && (context.seedLocalId || context.seedUid)) {
|
|
472
|
-
const
|
|
473
|
-
const
|
|
474
|
-
const { getPropertyData: getPropertyDataFromDb } =
|
|
486
|
+
const _mod_1 = await import('./index--F3Wolt5.js');
|
|
487
|
+
const _ns_1 = _mod_1.ad;
|
|
488
|
+
const { getPropertyData: getPropertyDataFromDb } = _ns_1;
|
|
475
489
|
const metaRow = await getPropertyDataFromDb({
|
|
476
490
|
propertyName: relationOrImageProperty.propertyName,
|
|
477
491
|
seedLocalId: context.seedLocalId,
|
|
@@ -522,17 +536,17 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
522
536
|
}
|
|
523
537
|
// Required relation/image/file/html/json with no value: cannot publish
|
|
524
538
|
if (isRequired && !value) {
|
|
525
|
-
const typeLabel = propertyDef?.dataType
|
|
526
|
-
propertyDef?.refValueType
|
|
539
|
+
const typeLabel = matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.File) ||
|
|
540
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.File)
|
|
527
541
|
? 'file'
|
|
528
|
-
: propertyDef?.dataType
|
|
529
|
-
propertyDef?.refValueType
|
|
542
|
+
: matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Image) ||
|
|
543
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Image)
|
|
530
544
|
? 'image'
|
|
531
|
-
: propertyDef?.dataType
|
|
532
|
-
propertyDef?.refValueType
|
|
545
|
+
: matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Html) ||
|
|
546
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Html)
|
|
533
547
|
? 'html'
|
|
534
|
-
: propertyDef?.dataType
|
|
535
|
-
propertyDef?.refValueType
|
|
548
|
+
: matchesDataType(propertyDef?.dataType, ModelPropertyDataTypes.Json) ||
|
|
549
|
+
matchesDataType(propertyDef?.refValueType, ModelPropertyDataTypes.Json)
|
|
536
550
|
? 'json'
|
|
537
551
|
: 'relation';
|
|
538
552
|
const refLabel = propertyDef?.ref ?? propertyDef?.refModelName ?? 'related';
|
|
@@ -557,7 +571,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
557
571
|
return multiPublishPayload;
|
|
558
572
|
}
|
|
559
573
|
// Use dynamic import to break circular dependency
|
|
560
|
-
const getItemMod = await import('./getItem-
|
|
574
|
+
const getItemMod = await import('./getItem-B81V3m4S.js');
|
|
561
575
|
const { getItem } = getItemMod;
|
|
562
576
|
const relatedItem = await getItem({
|
|
563
577
|
seedLocalId,
|
|
@@ -578,16 +592,16 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
578
592
|
}
|
|
579
593
|
const versionUid = getVersionUid(relatedItem);
|
|
580
594
|
let modelName;
|
|
581
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
595
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image)) {
|
|
582
596
|
modelName = 'Image';
|
|
583
597
|
}
|
|
584
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
598
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.File)) {
|
|
585
599
|
modelName = 'File';
|
|
586
600
|
}
|
|
587
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
601
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html)) {
|
|
588
602
|
modelName = 'Html';
|
|
589
603
|
}
|
|
590
|
-
if (relationOrImageProperty.propertyDef?.dataType
|
|
604
|
+
if (matchesDataType(relationOrImageProperty.propertyDef?.dataType, ModelPropertyDataTypes.Relation)) {
|
|
591
605
|
const def = relationOrImageProperty.propertyDef;
|
|
592
606
|
modelName = def.ref ?? def.refModelName;
|
|
593
607
|
}
|
|
@@ -655,7 +669,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
655
669
|
async function resolveHtmlPropertySchemaUidByHtmlSeed(item, htmlSeedLocalId, ctx) {
|
|
656
670
|
const want = htmlSeedLocalId.trim();
|
|
657
671
|
for (const p of item.properties) {
|
|
658
|
-
if (p.propertyDef?.dataType
|
|
672
|
+
if (!matchesDataType(p.propertyDef?.dataType, ModelPropertyDataTypes.Html))
|
|
659
673
|
continue;
|
|
660
674
|
const snap = p.getService().getSnapshot();
|
|
661
675
|
const c = 'context' in snap ? snap.context : null;
|
|
@@ -683,7 +697,7 @@ async function processHtmlEmbeddedCoPublishImagePayloads(item, multiPublishPaylo
|
|
|
683
697
|
if (rows.length === 0)
|
|
684
698
|
return multiPublishPayload;
|
|
685
699
|
const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
|
|
686
|
-
const getItemMod = await import('./getItem-
|
|
700
|
+
const getItemMod = await import('./getItem-B81V3m4S.js');
|
|
687
701
|
const { getItem } = getItemMod;
|
|
688
702
|
const doneImages = new Set();
|
|
689
703
|
for (const row of rows) {
|
|
@@ -810,7 +824,7 @@ const processListProperty = async (listProperty, multiPublishPayload, originalSe
|
|
|
810
824
|
if (!seedLocalId && !seedUid)
|
|
811
825
|
continue;
|
|
812
826
|
// Use dynamic import to break circular dependency
|
|
813
|
-
const getItemMod = await import('./getItem-
|
|
827
|
+
const getItemMod = await import('./getItem-B81V3m4S.js');
|
|
814
828
|
const { getItem } = getItemMod;
|
|
815
829
|
const relatedItem = await getItem({
|
|
816
830
|
seedLocalId,
|
|
@@ -829,13 +843,13 @@ const processListProperty = async (listProperty, multiPublishPayload, originalSe
|
|
|
829
843
|
const def = listProperty.propertyDef;
|
|
830
844
|
modelName = def.ref ?? def.refModelName;
|
|
831
845
|
}
|
|
832
|
-
if (listProperty.propertyDef?.dataType
|
|
846
|
+
if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.Image)) {
|
|
833
847
|
modelName = 'Image';
|
|
834
848
|
}
|
|
835
|
-
if (listProperty.propertyDef?.dataType
|
|
849
|
+
if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.File)) {
|
|
836
850
|
modelName = 'File';
|
|
837
851
|
}
|
|
838
|
-
if (listProperty.propertyDef?.dataType
|
|
852
|
+
if (matchesDataType(listProperty.propertyDef?.dataType, ModelPropertyDataTypes.Html)) {
|
|
839
853
|
modelName = 'Html';
|
|
840
854
|
}
|
|
841
855
|
if (!modelName) {
|
|
@@ -1317,7 +1331,6 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
|
|
|
1317
1331
|
if (Object.keys(resolvedUids).length === 0) {
|
|
1318
1332
|
return multiPayload;
|
|
1319
1333
|
}
|
|
1320
|
-
const SchemaEncoder = await getSchemaEncoder();
|
|
1321
1334
|
const result = [];
|
|
1322
1335
|
for (const payload of multiPayload) {
|
|
1323
1336
|
const updatedAttestations = [];
|
|
@@ -1418,4 +1431,4 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
|
|
|
1418
1431
|
};
|
|
1419
1432
|
|
|
1420
1433
|
export { PublishValidationFailedError, getPublishPayload, resolvePublishPayloadValues, validateItemForPublish };
|
|
1421
|
-
//# sourceMappingURL=getPublishPayload-
|
|
1434
|
+
//# sourceMappingURL=getPublishPayload-CNYsn8-6.js.map
|