@seedprotocol/sdk 0.4.17 → 0.4.18
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/{ArweaveClient-Zz6VwCkj.js → ArweaveClient-CpShI0B0.js} +3 -3
- package/dist/{ArweaveClient-Zz6VwCkj.js.map → ArweaveClient-CpShI0B0.js.map} +1 -1
- package/dist/{ArweaveClient-DPeCeRMF.js → ArweaveClient-WfxkMgxb.js} +3 -3
- package/dist/{ArweaveClient-DPeCeRMF.js.map → ArweaveClient-WfxkMgxb.js.map} +1 -1
- package/dist/{Db-Cvoi9q3N.js → Db-29bu0gJx.js} +4 -4
- package/dist/{Db-Cvoi9q3N.js.map → Db-29bu0gJx.js.map} +1 -1
- package/dist/{Db-DsFElL33.js → Db-DWvxJG22.js} +4 -4
- package/dist/{Db-DsFElL33.js.map → Db-DWvxJG22.js.map} +1 -1
- package/dist/{EasClient-B2N8bc3C.js → EasClient-BwBg9Kkd.js} +2 -2
- package/dist/{EasClient-D5Nn1WBF.js.map → EasClient-BwBg9Kkd.js.map} +1 -1
- package/dist/{EasClient-D5Nn1WBF.js → EasClient-CtLqK_qz.js} +2 -2
- package/dist/{EasClient-B2N8bc3C.js.map → EasClient-CtLqK_qz.js.map} +1 -1
- package/dist/{FileManager-Cqy_Lq46.js → FileManager-DSihj6Sj.js} +2 -2
- package/dist/{FileManager-Cqy_Lq46.js.map → FileManager-DSihj6Sj.js.map} +1 -1
- package/dist/{FileManager-Bk-JeMoA.js → FileManager-DgraLHZS.js} +2 -2
- package/dist/{FileManager-Bk-JeMoA.js.map → FileManager-DgraLHZS.js.map} +1 -1
- package/dist/{ModelProperty-CkQaEsBu.js → ModelProperty-Bz3V3LoI.js} +24 -24
- package/dist/{ModelProperty-CkQaEsBu.js.map → ModelProperty-Bz3V3LoI.js.map} +1 -1
- package/dist/{PathResolver-DF1QFI1d.js → PathResolver-DOu-0k75.js} +2 -2
- package/dist/{PathResolver-DF1QFI1d.js.map → PathResolver-DOu-0k75.js.map} +1 -1
- package/dist/{PathResolver-C3sdR5LL.js → PathResolver-DQ5hyu8X.js} +2 -2
- package/dist/{PathResolver-C3sdR5LL.js.map → PathResolver-DQ5hyu8X.js.map} +1 -1
- package/dist/{QueryClient-CnONLIkA.js → QueryClient-CJV1m2rc.js} +2 -2
- package/dist/{QueryClient-CnONLIkA.js.map → QueryClient-CJV1m2rc.js.map} +1 -1
- package/dist/{QueryClient-Ctgd0tDn.js → QueryClient-DYaqIx7e.js} +2 -2
- package/dist/{QueryClient-Ctgd0tDn.js.map → QueryClient-DYaqIx7e.js.map} +1 -1
- package/dist/{Schema-Bnim4hAF.js → Schema-CFMbnImW.js} +38 -38
- package/dist/{Schema-Bnim4hAF.js.map → Schema-CFMbnImW.js.map} +1 -1
- package/dist/{SchemaValidationService-DXxRk-9Q.js → SchemaValidationService-D4ZVetLE.js} +2 -2
- package/dist/{SchemaValidationService-DXxRk-9Q.js.map → SchemaValidationService-D4ZVetLE.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-dzwzz4dA.js → backfillMetadataPropertyIds-DptGKVzG.js} +2 -2
- package/dist/{backfillMetadataPropertyIds-dzwzz4dA.js.map → backfillMetadataPropertyIds-DptGKVzG.js.map} +1 -1
- package/dist/cjs/{ModelProperty-C80601ai.js → ModelProperty-TPey_B4m.js} +17 -17
- package/dist/cjs/{ModelProperty-C80601ai.js.map → ModelProperty-TPey_B4m.js.map} +1 -1
- package/dist/cjs/{Schema-6BQKp7hO.js → Schema-B-IQEtpX.js} +20 -20
- package/dist/cjs/{Schema-6BQKp7hO.js.map → Schema-B-IQEtpX.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-BySF1P0v.js → SchemaValidationService-IQ0Gc9HM.js} +2 -2
- package/dist/cjs/{SchemaValidationService-BySF1P0v.js.map → SchemaValidationService-IQ0Gc9HM.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-D9uzW5bW.js → backfillMetadataPropertyIds-BBPgBc2W.js} +2 -2
- package/dist/cjs/{backfillMetadataPropertyIds-D9uzW5bW.js.map → backfillMetadataPropertyIds-BBPgBc2W.js.map} +1 -1
- package/dist/cjs/{getItem-Dj49AjWB.js → getItem-CWf0OO0F.js} +2 -2
- package/dist/cjs/{getItem-Dj49AjWB.js.map → getItem-CWf0OO0F.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-dR9co4rH.js → getPublishPayload-muuS1j0F.js} +519 -79
- package/dist/cjs/getPublishPayload-muuS1j0F.js.map +1 -0
- package/dist/cjs/{getPublishUploads-g61mgXaA.js → getPublishUploads-CONYV9QQ.js} +14 -8
- package/dist/cjs/getPublishUploads-CONYV9QQ.js.map +1 -0
- package/dist/cjs/{getSegmentedItemProperties-NFvOHlAi.js → getSegmentedItemProperties-Dl3J_uCe.js} +5 -4
- package/dist/cjs/getSegmentedItemProperties-Dl3J_uCe.js.map +1 -0
- package/dist/cjs/{index-9O_Ji1kY.js → index-Bte-I6OD.js} +119 -59
- package/dist/cjs/index-Bte-I6OD.js.map +1 -0
- package/dist/cjs/{index-ud9i9fpp.js → index-D7a8oFJP.js} +3 -3
- package/dist/cjs/index-D7a8oFJP.js.map +1 -0
- package/dist/cjs/{ownership-CyLRNReQ.js → ownership-Bxv6CUrH.js} +2 -2
- package/dist/cjs/{ownership-CyLRNReQ.js.map → ownership-Bxv6CUrH.js.map} +1 -1
- package/dist/cjs/{property-Hj-RhQVX.js → property-xOF5k4ka.js} +4 -4
- package/dist/cjs/{property-Hj-RhQVX.js.map → property-xOF5k4ka.js.map} +1 -1
- package/dist/{getItem-ClK0UZqi.js → getItem-Hubs_yxu.js} +2 -2
- package/dist/{getItem-ClK0UZqi.js.map → getItem-Hubs_yxu.js.map} +1 -1
- package/dist/{getPublishPayload-CdfPTl8l.js → getPublishPayload-CqUCIlu1.js} +522 -82
- package/dist/getPublishPayload-CqUCIlu1.js.map +1 -0
- package/dist/{getPublishUploads-CGBky9q9.js → getPublishUploads-QgfPyhcs.js} +14 -8
- package/dist/getPublishUploads-QgfPyhcs.js.map +1 -0
- package/dist/{getSegmentedItemProperties-CJWdYH9W.js → getSegmentedItemProperties-Dzscmm_m.js} +5 -4
- package/dist/getSegmentedItemProperties-Dzscmm_m.js.map +1 -0
- package/dist/{index-uPXtq2cf.js → index-CtzvJMAE.js} +131 -73
- package/dist/index-CtzvJMAE.js.map +1 -0
- package/dist/{index-C74KrwXN.js → index-QSl4EYun.js} +2 -2
- package/dist/index-QSl4EYun.js.map +1 -0
- package/dist/{index-CgmWq1sF.js → index-VmIdPfTW.js} +3 -3
- package/dist/index-VmIdPfTW.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +114 -18
- package/dist/main.js.map +1 -1
- package/dist/node.js +10 -10
- package/dist/{ownership-QK5haR3-.js → ownership-loPNh3_a.js} +2 -2
- package/dist/{ownership-QK5haR3-.js.map → ownership-loPNh3_a.js.map} +1 -1
- package/dist/{property-Dt0U3UXJ.js → property-D8HimAKw.js} +6 -6
- package/dist/{property-Dt0U3UXJ.js.map → property-D8HimAKw.js.map} +1 -1
- package/dist/{queries-BUB-vUBm.js → queries-DPADHnwy.js} +2 -2
- package/dist/{queries-BUB-vUBm.js.map → queries-DPADHnwy.js.map} +1 -1
- package/dist/src/Item/Item.d.ts +12 -9
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/queries.d.ts +3 -3
- package/dist/src/Item/service/actors/fetchDataFromEas.d.ts +1 -1
- package/dist/src/Item/service/actors/fetchDataFromEas.d.ts.map +1 -1
- package/dist/src/Item/service/actors/hydrateExistingItem.d.ts +1 -1
- package/dist/src/Item/service/actors/hydrateNewItem.d.ts +1 -1
- package/dist/src/Item/service/actors/initialize.d.ts +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts +2 -2
- package/dist/src/Item/service/actors/reload.d.ts +2 -2
- package/dist/src/Item/service/actors/runPublish.d.ts +2 -2
- package/dist/src/Item/service/actors/saveDataToDb.d.ts +1 -1
- package/dist/src/Item/service/actors/waitForDb.d.ts +1 -1
- package/dist/src/Item/service/itemMachineSingle.d.ts +11 -11
- package/dist/src/ItemProperty/ItemProperty.d.ts +5 -5
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/initialize.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/resolveRemoteStorage.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/waitForDb.d.ts +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +14 -14
- package/dist/src/Model/Model.d.ts +2 -2
- package/dist/src/Model/service/actors/createModelProperties.d.ts +1 -1
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts +1 -1
- package/dist/src/Model/service/actors/validateModel.d.ts +1 -1
- package/dist/src/Model/service/modelMachine.d.ts +6 -6
- package/dist/src/ModelProperty/ModelProperty.d.ts +3 -3
- package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts +1 -1
- package/dist/src/ModelProperty/service/actors/saveToSchema.d.ts +1 -1
- package/dist/src/ModelProperty/service/actors/validateProperty.d.ts +1 -1
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +7 -7
- package/dist/src/Schema/Schema.d.ts +1 -1
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts +1 -1
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts +1 -1
- package/dist/src/Schema/service/actors/validateSchema.d.ts +1 -1
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts +1 -1
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts +1 -1
- package/dist/src/Schema/service/addModelsMachine.d.ts +1 -1
- package/dist/src/Schema/service/schemaMachine.d.ts +7 -7
- package/dist/src/Schema/service/validation/SchemaValidationService.d.ts +4 -4
- package/dist/src/browser/db/Db.d.ts +2 -2
- package/dist/src/browser/helpers/ArweaveClient.d.ts +2 -2
- package/dist/src/browser/helpers/EasClient.d.ts +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts +1 -1
- package/dist/src/browser/helpers/PathResolver.d.ts +1 -1
- package/dist/src/browser/helpers/QueryClient.d.ts +2 -2
- package/dist/src/browser/seed.d.ts +1 -1
- package/dist/src/client/BaseClientManager.d.ts +1 -1
- package/dist/src/client/ClientManager.d.ts +41 -41
- package/dist/src/client/actors/addModelsToDb.d.ts +1 -1
- package/dist/src/client/actors/addModelsToStore.d.ts +1 -1
- package/dist/src/client/actors/dbInit.d.ts +1 -1
- package/dist/src/client/actors/fileSystemInit.d.ts +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts +1 -1
- package/dist/src/client/actors/processSchemaFiles.d.ts +1 -1
- package/dist/src/client/actors/saveConfig.d.ts +1 -1
- package/dist/src/client/clientManagerMachine.d.ts +11 -11
- package/dist/src/client/constants.d.ts +2 -2
- package/dist/src/db/Db/BaseDb.d.ts +1 -1
- package/dist/src/db/read/getItem.d.ts +1 -1
- package/dist/src/db/read/getItemData.d.ts +1 -1
- package/dist/src/db/read/getItemProperties.d.ts +1 -1
- package/dist/src/db/read/getItemProperty.d.ts +1 -1
- package/dist/src/db/read/getItems.d.ts +1 -1
- package/dist/src/db/read/getMetadata.d.ts +1 -1
- package/dist/src/db/read/getModels.d.ts +1 -1
- package/dist/src/db/read/getPropertyData.d.ts +2 -2
- package/dist/src/db/read/getPublishPayload.d.ts +12 -4
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPendingDiff.d.ts +25 -0
- package/dist/src/db/read/getPublishPendingDiff.d.ts.map +1 -0
- package/dist/src/db/read/getPublishUploads.d.ts +3 -3
- package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts +1 -1
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts.map +1 -1
- package/dist/src/db/read/getRelationValueData.d.ts +1 -1
- package/dist/src/db/read/getSeedData.d.ts +1 -1
- package/dist/src/db/read/getVersionData.d.ts +1 -1
- package/dist/src/db/write/createMetadata.d.ts +2 -2
- package/dist/src/db/write/createNewItem.d.ts +1 -1
- package/dist/src/db/write/createSeeds.d.ts +1 -1
- package/dist/src/db/write/saveMetadata.d.ts +1 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts +1 -1
- package/dist/src/db/write/updateMetadata.d.ts +2 -2
- package/dist/src/eas.d.ts +6 -1
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/events/files/download.d.ts +1 -1
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts +1 -1
- package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts +1 -1
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts +1 -1
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts +1 -1
- package/dist/src/helpers/addresses.d.ts +1 -1
- package/dist/src/helpers/db.d.ts +4 -4
- package/dist/src/helpers/easPropertyCanonical.d.ts +15 -0
- package/dist/src/helpers/easPropertyCanonical.d.ts.map +1 -0
- package/dist/src/helpers/file/fetchAll/index.d.ts +1 -1
- package/dist/src/helpers/getSchemaForItemProperty.d.ts +1 -1
- package/dist/src/helpers/getSegmentedItemProperties.d.ts +6 -6
- package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +3 -1
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/model.d.ts +1 -1
- package/dist/src/helpers/ownership.d.ts +1 -1
- package/dist/src/helpers/property/index.d.ts +1 -1
- package/dist/src/helpers/property.d.ts +1 -1
- package/dist/src/helpers/publishConfig.d.ts +1 -1
- package/dist/src/helpers/relationSeedRef.d.ts +8 -0
- package/dist/src/helpers/relationSeedRef.d.ts.map +1 -0
- package/dist/src/helpers/schema.d.ts +2 -2
- package/dist/src/helpers/updateSchema.d.ts +2 -2
- package/dist/src/imports/json.d.ts +1 -1
- package/dist/src/imports/markdown.d.ts +1 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +5 -3
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +3 -3
- package/dist/src/node/codegen/drizzle.d.ts +1 -1
- package/dist/src/node/db/Db.d.ts +3 -3
- package/dist/src/node/helpers/ArweaveClient.d.ts +2 -2
- package/dist/src/node/helpers/EasClient.d.ts +1 -1
- package/dist/src/node/helpers/FileManager.d.ts +1 -1
- package/dist/src/node/helpers/PathResolver.d.ts +1 -1
- package/dist/src/node/helpers/QueryClient.d.ts +2 -2
- package/dist/src/services/publish/actors/createPublishAttempt.d.ts +1 -1
- package/dist/src/services/publish/actors/preparePublishRequestData.d.ts +1 -1
- package/dist/src/services/publish/actors/upload.d.ts +1 -1
- package/dist/src/services/publish/actors/validateItemData.d.ts +1 -1
- package/dist/src/services/publish/publishMachine.d.ts +7 -7
- package/dist/src/services/write/writeProcessMachine.d.ts +1 -1
- package/dist/src/types/db.d.ts +1 -1
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/types/item.d.ts +6 -6
- package/dist/src/types/machines.d.ts +2 -2
- package/dist/src/types/model.d.ts +3 -3
- package/dist/src/types/property.d.ts +3 -3
- package/dist/src/types/publish.d.ts +1 -1
- package/dist/src/types/seedProtocol.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/getPublishPayload-dR9co4rH.js.map +0 -1
- package/dist/cjs/getPublishUploads-g61mgXaA.js.map +0 -1
- package/dist/cjs/getSegmentedItemProperties-NFvOHlAi.js.map +0 -1
- package/dist/cjs/index-9O_Ji1kY.js.map +0 -1
- package/dist/cjs/index-ud9i9fpp.js.map +0 -1
- package/dist/getPublishPayload-CdfPTl8l.js.map +0 -1
- package/dist/getPublishUploads-CGBky9q9.js.map +0 -1
- package/dist/getSegmentedItemProperties-CJWdYH9W.js.map +0 -1
- package/dist/index-C74KrwXN.js.map +0 -1
- package/dist/index-CgmWq1sF.js.map +0 -1
- package/dist/index-uPXtq2cf.js.map +0 -1
|
@@ -1048,6 +1048,69 @@ function resolveMetadataRecord(records, preferredPropertyName, dataType, refValu
|
|
|
1048
1048
|
return (records.find((r) => r.propertyName === preferredPropertyName) ?? records[0]);
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
+
/** Same rules as getCorrectId in helpers/index (avoid barrel circular import). */
|
|
1052
|
+
function parseLocalIdOrUid(localIdOrUid) {
|
|
1053
|
+
const id = { localId: undefined, uid: undefined };
|
|
1054
|
+
if (!localIdOrUid)
|
|
1055
|
+
return id;
|
|
1056
|
+
if (localIdOrUid.length === 10) {
|
|
1057
|
+
id.localId = localIdOrUid;
|
|
1058
|
+
}
|
|
1059
|
+
if (localIdOrUid.startsWith('0x') && localIdOrUid.length === 66) {
|
|
1060
|
+
id.uid = localIdOrUid;
|
|
1061
|
+
}
|
|
1062
|
+
return id;
|
|
1063
|
+
}
|
|
1064
|
+
/** Relation/image refs may be string ids or `{ seedLocalId?, seedUid? }`. */
|
|
1065
|
+
function normalizeRelationPropertyValue(value) {
|
|
1066
|
+
if (value == null)
|
|
1067
|
+
return undefined;
|
|
1068
|
+
if (typeof value === 'string') {
|
|
1069
|
+
const t = value.trim();
|
|
1070
|
+
return t !== '' ? t : undefined;
|
|
1071
|
+
}
|
|
1072
|
+
if (typeof value === 'object' && value !== null) {
|
|
1073
|
+
const o = value;
|
|
1074
|
+
if (typeof o.seedLocalId === 'string' && o.seedLocalId.trim() !== '') {
|
|
1075
|
+
return o.seedLocalId.trim();
|
|
1076
|
+
}
|
|
1077
|
+
if (typeof o.seedUid === 'string' && o.seedUid.trim() !== '') {
|
|
1078
|
+
return o.seedUid.trim();
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
return undefined;
|
|
1082
|
+
}
|
|
1083
|
+
/** getCorrectId only accepts 10-char local ids and 0x66 uids; local seed refs can be up to 21 chars. */
|
|
1084
|
+
const LOCAL_SEED_REF = /^[a-zA-Z0-9_-]{10,21}$/;
|
|
1085
|
+
/** Resolve seed ids from a single string (context propertyValue or DB row). */
|
|
1086
|
+
function resolveSeedIdsFromRefString(s) {
|
|
1087
|
+
const fromCorrect = parseLocalIdOrUid(s);
|
|
1088
|
+
if (fromCorrect.localId || fromCorrect.uid) {
|
|
1089
|
+
return { seedLocalId: fromCorrect.localId, seedUid: fromCorrect.uid };
|
|
1090
|
+
}
|
|
1091
|
+
if (LOCAL_SEED_REF.test(s) && !s.startsWith('0x')) {
|
|
1092
|
+
return { seedLocalId: s };
|
|
1093
|
+
}
|
|
1094
|
+
return {};
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
function pickLatestPropertyAttestationsByRefAndSchema(attestations) {
|
|
1098
|
+
const byKey = new Map();
|
|
1099
|
+
for (const att of attestations) {
|
|
1100
|
+
const sid = att.schemaId;
|
|
1101
|
+
if (!sid)
|
|
1102
|
+
continue;
|
|
1103
|
+
const key = `${att.refUID ?? ''}:${sid}`;
|
|
1104
|
+
const existing = byKey.get(key);
|
|
1105
|
+
const t = att.timeCreated ?? 0;
|
|
1106
|
+
const t0 = existing?.timeCreated ?? 0;
|
|
1107
|
+
if (!existing || t > t0) {
|
|
1108
|
+
byKey.set(key, att);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return [...byKey.values()];
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1051
1114
|
const logger$z = debug('seedSdk:shared:helpers');
|
|
1052
1115
|
const { alphanumeric } = nanoIdDictionary__namespace;
|
|
1053
1116
|
const generateId = () => {
|
|
@@ -1238,9 +1301,12 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
1238
1301
|
isBinary: isBinary,
|
|
1239
1302
|
listRelationStoragePropertyName: listRelationStoragePropertyName,
|
|
1240
1303
|
needsMetadataIdSuffix: needsMetadataIdSuffix,
|
|
1304
|
+
normalizeRelationPropertyValue: normalizeRelationPropertyValue,
|
|
1241
1305
|
normalizeUploadApiBaseUrl: normalizeUploadApiBaseUrl,
|
|
1242
1306
|
parseEasRelationPropertyName: parseEasRelationPropertyName,
|
|
1307
|
+
pickLatestPropertyAttestationsByRefAndSchema: pickLatestPropertyAttestationsByRefAndSchema,
|
|
1243
1308
|
resolveMetadataRecord: resolveMetadataRecord,
|
|
1309
|
+
resolveSeedIdsFromRefString: resolveSeedIdsFromRefString,
|
|
1244
1310
|
resolveStorageNameToSchemaName: resolveStorageNameToSchemaName,
|
|
1245
1311
|
setAdditionalSyncAddresses: setAdditionalSyncAddresses,
|
|
1246
1312
|
setGetPublisherForNewSeeds: setGetPublisherForNewSeeds,
|
|
@@ -1264,7 +1330,7 @@ const createPropertyInstances = async (propertyFileIds) => {
|
|
|
1264
1330
|
return;
|
|
1265
1331
|
}
|
|
1266
1332
|
try {
|
|
1267
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
1333
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-TPey_B4m.js'); });
|
|
1268
1334
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
1269
1335
|
if (!ModelProperty) {
|
|
1270
1336
|
logger$y('createPropertyInstances: ModelProperty not available from dynamic import');
|
|
@@ -1448,7 +1514,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
1448
1514
|
// Step 2: Fallback to Schema context (only if database doesn't have the model)
|
|
1449
1515
|
// This handles the case where model exists in schema file but not yet in database
|
|
1450
1516
|
try {
|
|
1451
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1517
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); });
|
|
1452
1518
|
const { Schema } = schemaMod;
|
|
1453
1519
|
const schema = Schema.create(schemaName, { waitForReady: false });
|
|
1454
1520
|
const schemaSnapshot = schema.getService().getSnapshot();
|
|
@@ -1692,7 +1758,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
1692
1758
|
}
|
|
1693
1759
|
// Mark schema as draft when a new model is created so saveNewVersion() can persist it
|
|
1694
1760
|
try {
|
|
1695
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1761
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); });
|
|
1696
1762
|
const { Schema } = schemaMod;
|
|
1697
1763
|
const schema = Schema.create(schemaName, { waitForReady: false });
|
|
1698
1764
|
schema.getService().send({ type: 'markAsDraft', propertyKey: 'schema:models' });
|
|
@@ -1736,10 +1802,10 @@ const validateModel = xstate.fromCallback(({ sendBack, input: { context } }) =>
|
|
|
1736
1802
|
const _validateModel = async () => {
|
|
1737
1803
|
try {
|
|
1738
1804
|
// Use dynamic imports to break circular dependencies
|
|
1739
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
1805
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-IQ0Gc9HM.js'); });
|
|
1740
1806
|
const { SchemaValidationService } = validationServiceMod;
|
|
1741
1807
|
const validationService = new SchemaValidationService();
|
|
1742
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1808
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); });
|
|
1743
1809
|
const { Schema } = schemaMod;
|
|
1744
1810
|
// Validate model structure
|
|
1745
1811
|
const structureResult = validationService.validateModelStructure(context);
|
|
@@ -1849,7 +1915,7 @@ const createModelProperties = xstate.fromCallback(({ sendBack, input }) => {
|
|
|
1849
1915
|
return;
|
|
1850
1916
|
}
|
|
1851
1917
|
logger$w(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
|
|
1852
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
1918
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-TPey_B4m.js'); });
|
|
1853
1919
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
1854
1920
|
if (!ModelProperty) {
|
|
1855
1921
|
logger$w('ModelProperty not available from dynamic import');
|
|
@@ -1953,7 +2019,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1953
2019
|
const structureMsg = `[validateEntity] Validating model structure`;
|
|
1954
2020
|
logger$v(structureMsg);
|
|
1955
2021
|
// Use existing Model validation
|
|
1956
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
2022
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-IQ0Gc9HM.js'); });
|
|
1957
2023
|
const { SchemaValidationService } = validationServiceMod;
|
|
1958
2024
|
const validationService = new SchemaValidationService();
|
|
1959
2025
|
// Validate model structure
|
|
@@ -1971,7 +2037,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1971
2037
|
if (entityInput.entityData.schemaName) {
|
|
1972
2038
|
try {
|
|
1973
2039
|
logger$v(`[validateEntity] Validating model against schema "${entityInput.entityData.schemaName}"`);
|
|
1974
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
2040
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); });
|
|
1975
2041
|
const { Schema } = schemaMod;
|
|
1976
2042
|
const schema = Schema.create(entityInput.entityData.schemaName, {
|
|
1977
2043
|
waitForReady: false,
|
|
@@ -2007,7 +2073,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
2007
2073
|
}
|
|
2008
2074
|
else if (entityInput.entityType === 'modelProperty') {
|
|
2009
2075
|
// Use existing ModelProperty validation
|
|
2010
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
2076
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-IQ0Gc9HM.js'); });
|
|
2011
2077
|
const { SchemaValidationService } = validationServiceMod;
|
|
2012
2078
|
const validationService = new SchemaValidationService();
|
|
2013
2079
|
// Validate property structure
|
|
@@ -2022,7 +2088,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
2022
2088
|
// If schema name and model name provided, validate against schema
|
|
2023
2089
|
if (entityInput.entityData._schemaName && entityInput.entityData.modelName) {
|
|
2024
2090
|
try {
|
|
2025
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
2091
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); });
|
|
2026
2092
|
const { Schema } = schemaMod;
|
|
2027
2093
|
const schema = Schema.create(entityInput.entityData._schemaName, {
|
|
2028
2094
|
waitForReady: false,
|
|
@@ -2051,7 +2117,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
2051
2117
|
}
|
|
2052
2118
|
else if (entityInput.entityType === 'schema') {
|
|
2053
2119
|
// Schema validation - use existing validation
|
|
2054
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
2120
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-IQ0Gc9HM.js'); });
|
|
2055
2121
|
const { SchemaValidationService } = validationServiceMod;
|
|
2056
2122
|
const validationService = new SchemaValidationService();
|
|
2057
2123
|
const schemaResult = validationService.validateSchema(entityInput.entityData);
|
|
@@ -4178,7 +4244,7 @@ const writeToDatabase = xstate.fromCallback(({ sendBack, input }) => {
|
|
|
4178
4244
|
// initial write completes is not overwritten by the stale requestWrite payload.
|
|
4179
4245
|
let dataToWrite = input.entityData;
|
|
4180
4246
|
try {
|
|
4181
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
4247
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-TPey_B4m.js'); });
|
|
4182
4248
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
4183
4249
|
if (ModelProperty && typeof ModelProperty.getById === 'function') {
|
|
4184
4250
|
const instance = ModelProperty.getById(input.entityId);
|
|
@@ -4558,7 +4624,7 @@ const modelMachine = xstate.setup({
|
|
|
4558
4624
|
// Create ModelProperty instances for any new property IDs
|
|
4559
4625
|
if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
|
|
4560
4626
|
// Import and create instances asynchronously (fire-and-forget)
|
|
4561
|
-
Promise.resolve().then(function () { return require('./ModelProperty-
|
|
4627
|
+
Promise.resolve().then(function () { return require('./ModelProperty-TPey_B4m.js'); }).then(({ ModelProperty }) => {
|
|
4562
4628
|
const createPromises = newPropertyIds.map(async (propertyFileId) => {
|
|
4563
4629
|
try {
|
|
4564
4630
|
const property = await ModelProperty.createById(propertyFileId);
|
|
@@ -5350,6 +5416,11 @@ const getItemVersionsFromEas = async ({ seedUids, excludeRevoked = true, }) => {
|
|
|
5350
5416
|
});
|
|
5351
5417
|
return itemVersions;
|
|
5352
5418
|
};
|
|
5419
|
+
/**
|
|
5420
|
+
* Returns all property attestations for the given Version UIDs. May include multiple
|
|
5421
|
+
* rows per schema (patch updates). Use `pickLatestPropertyAttestationsByRefAndSchema`
|
|
5422
|
+
* from `@seedprotocol/sdk` to resolve canonical values per `(refUID, schemaId)`.
|
|
5423
|
+
*/
|
|
5353
5424
|
const getItemPropertiesFromEas = async ({ versionUids, excludeRevoked = true, }) => {
|
|
5354
5425
|
const queryClient = BaseQueryClient.getQueryClient();
|
|
5355
5426
|
const easClient = BaseEasClient.getEasClient();
|
|
@@ -5697,26 +5768,14 @@ const fetchDataFromEas = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
5697
5768
|
},
|
|
5698
5769
|
}),
|
|
5699
5770
|
});
|
|
5700
|
-
|
|
5771
|
+
const latest = pickLatestPropertyAttestationsByRefAndSchema(itemProperties);
|
|
5701
5772
|
const selectedPropertiesMap = {};
|
|
5702
|
-
|
|
5703
|
-
const
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
Object.keys(selectedPropertiesMap).forEach((schemaId) => {
|
|
5709
|
-
const sorted = selectedPropertiesMap[schemaId].sort((a, b) => {
|
|
5710
|
-
return a.timeCreated - b.timeCreated;
|
|
5711
|
-
});
|
|
5712
|
-
selectedPropertiesMap[schemaId] = sorted;
|
|
5713
|
-
});
|
|
5714
|
-
Object.keys(selectedPropertiesMap).forEach((schemaId) => {
|
|
5715
|
-
// TODO: Finish this logic
|
|
5716
|
-
// console.log('[singleItemActors] [fetchDataFromEas] schemaId', schemaId)
|
|
5717
|
-
// sendBack({ type: 'addPropertyAttestation', schemaId })
|
|
5718
|
-
});
|
|
5719
|
-
// Attach processed properties to the itemService/itemMachine context
|
|
5773
|
+
for (const property of latest) {
|
|
5774
|
+
const sid = property.schemaId;
|
|
5775
|
+
if (!sid)
|
|
5776
|
+
continue;
|
|
5777
|
+
selectedPropertiesMap[sid] = [property];
|
|
5778
|
+
}
|
|
5720
5779
|
sendBack({
|
|
5721
5780
|
type: 'updatedPropertiesBySchemaUid',
|
|
5722
5781
|
propertiesBySchemaUid: selectedPropertiesMap,
|
|
@@ -5810,7 +5869,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
5810
5869
|
const schemaNameToTry = model$1?.schemaName;
|
|
5811
5870
|
if (schemaNameToTry) {
|
|
5812
5871
|
try {
|
|
5813
|
-
const { Schema } = await Promise.resolve().then(function () { return require('./Schema-
|
|
5872
|
+
const { Schema } = await Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); });
|
|
5814
5873
|
const schemaInstance = Schema.create(schemaNameToTry, { waitForReady: false });
|
|
5815
5874
|
const schemaContext = schemaInstance.getService().getSnapshot().context;
|
|
5816
5875
|
if (schemaContext.models?.[modelName]?.properties) {
|
|
@@ -5859,7 +5918,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
5859
5918
|
}
|
|
5860
5919
|
}
|
|
5861
5920
|
if (Object.keys(propertySchemas).length === 0) {
|
|
5862
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
5921
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
5863
5922
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
5864
5923
|
const KNOWN_MODEL_FALLBACKS = {
|
|
5865
5924
|
Post: {
|
|
@@ -5908,7 +5967,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
5908
5967
|
// Infer propertyRecordSchema from metadata when schema is missing (enables persistence)
|
|
5909
5968
|
let propSchema = propertySchemas[propertyName];
|
|
5910
5969
|
if (!propSchema && isRefTypeFromMeta) {
|
|
5911
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
5970
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
5912
5971
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
5913
5972
|
propSchema = {
|
|
5914
5973
|
dataType: refSeedType === 'html' ? ModelPropertyDataTypes.Html
|
|
@@ -6156,9 +6215,9 @@ const runPublish = xstate.fromCallback(({ sendBack, input: { context } }) => {
|
|
|
6156
6215
|
sendBack({ type: 'publishError', error: new Error(`Item not found for seedLocalId: ${seedLocalId}`) });
|
|
6157
6216
|
return;
|
|
6158
6217
|
}
|
|
6159
|
-
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-
|
|
6218
|
+
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-CONYV9QQ.js'); });
|
|
6160
6219
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
6161
|
-
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-
|
|
6220
|
+
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-muuS1j0F.js'); });
|
|
6162
6221
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
6163
6222
|
const uploads = await getPublishUploads(item);
|
|
6164
6223
|
let uploadedTransactions = [];
|
|
@@ -6923,7 +6982,7 @@ const resolveRelatedValue = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
6923
6982
|
const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, populatedFromDb, schemaUid, } = context;
|
|
6924
6983
|
const _resolveRelatedValue = async () => {
|
|
6925
6984
|
// Use dynamic import to break circular dependency
|
|
6926
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
6985
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
6927
6986
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
6928
6987
|
if (!propertyValue || !isRelation || populatedFromDb) {
|
|
6929
6988
|
return;
|
|
@@ -7299,7 +7358,7 @@ const hydrateFromDb = xstate.fromCallback(({ sendBack, input: { context } }) =>
|
|
|
7299
7358
|
// to use dynamically imported ModelPropertyDataTypes
|
|
7300
7359
|
const _hydrateFromDb = async () => {
|
|
7301
7360
|
// Use dynamic import to break circular dependency
|
|
7302
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
7361
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
7303
7362
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
7304
7363
|
const appDb = BaseDb.getAppDb();
|
|
7305
7364
|
const whereClauses = [];
|
|
@@ -7604,7 +7663,7 @@ const loadOrCreateProperty = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
7604
7663
|
};
|
|
7605
7664
|
// Merge with schema from file/DB to get validation rules (enum, pattern, etc.) - properties table doesn't store these
|
|
7606
7665
|
try {
|
|
7607
|
-
const { getPropertySchema } = await Promise.resolve().then(function () { return require('./property-
|
|
7666
|
+
const { getPropertySchema } = await Promise.resolve().then(function () { return require('./property-xOF5k4ka.js'); });
|
|
7608
7667
|
let schemaFromFile = await getPropertySchema(normalizedModelName, propertyName);
|
|
7609
7668
|
if (!schemaFromFile?.validation) {
|
|
7610
7669
|
// Fallback: get validation from schemaData in database (Schema context may not be loaded yet)
|
|
@@ -7988,9 +8047,9 @@ const analyzeInput = xstate.fromCallback(({ sendBack, input: { context, event }
|
|
|
7988
8047
|
}
|
|
7989
8048
|
const _analyzeInput = async () => {
|
|
7990
8049
|
// Use dynamic import to break circular dependency
|
|
7991
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
8050
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
7992
8051
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
7993
|
-
const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
8052
|
+
const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-IQ0Gc9HM.js'); });
|
|
7994
8053
|
let propertyName = propertyNameRaw;
|
|
7995
8054
|
if (!propertyName) {
|
|
7996
8055
|
throw new Error('propertyName is required');
|
|
@@ -8188,7 +8247,7 @@ const createMetadata = async (metadataValues, propertyRecordSchema, options) =>
|
|
|
8188
8247
|
propertyRecordSchema?.validation &&
|
|
8189
8248
|
metadataValues.propertyValue != null &&
|
|
8190
8249
|
metadataValues.propertyValue !== '') {
|
|
8191
|
-
const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
8250
|
+
const { SchemaValidationService } = await Promise.resolve().then(function () { return require('./SchemaValidationService-IQ0Gc9HM.js'); });
|
|
8192
8251
|
const validationService = new SchemaValidationService();
|
|
8193
8252
|
const validationResult = validationService.validatePropertyValue(metadataValues.propertyValue, propertyRecordSchema.dataType, propertyRecordSchema.validation, propertyRecordSchema.refValueType);
|
|
8194
8253
|
if (!validationResult.isValid && validationResult.errors.length > 0) {
|
|
@@ -8775,7 +8834,7 @@ const saveRelation = xstate.fromCallback(({ sendBack, input: { context, event }
|
|
|
8775
8834
|
}
|
|
8776
8835
|
const _saveRelation = async () => {
|
|
8777
8836
|
// Use dynamic import to break circular dependency
|
|
8778
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
8837
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
8779
8838
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
8780
8839
|
if (!propertyNameRaw) {
|
|
8781
8840
|
throw new Error('propertyName is required');
|
|
@@ -9807,7 +9866,7 @@ class ItemProperty {
|
|
|
9807
9866
|
return;
|
|
9808
9867
|
}
|
|
9809
9868
|
// Use dynamic import to break circular dependency
|
|
9810
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
9869
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-D7a8oFJP.js'); });
|
|
9811
9870
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
9812
9871
|
const { context } = snapshot;
|
|
9813
9872
|
const { propertyRecordSchema } = context;
|
|
@@ -10664,7 +10723,7 @@ class ItemProperty {
|
|
|
10664
10723
|
}
|
|
10665
10724
|
async save() {
|
|
10666
10725
|
const ctx = this._getSnapshotContext();
|
|
10667
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
10726
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-Bxv6CUrH.js'); });
|
|
10668
10727
|
await assertItemOwned({
|
|
10669
10728
|
seedLocalId: ctx?.seedLocalId ?? undefined,
|
|
10670
10729
|
seedUid: ctx?.seedUid ?? undefined,
|
|
@@ -11002,7 +11061,7 @@ class Item {
|
|
|
11002
11061
|
});
|
|
11003
11062
|
};
|
|
11004
11063
|
this.unpublish = async () => {
|
|
11005
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
11064
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-Bxv6CUrH.js'); });
|
|
11006
11065
|
const { getRevokeExecutor } = await Promise.resolve().then(function () { return publishConfig; });
|
|
11007
11066
|
await assertItemOwned(this);
|
|
11008
11067
|
const seedUid = this.seedUid;
|
|
@@ -11026,7 +11085,7 @@ class Item {
|
|
|
11026
11085
|
this._service.send({ type: 'updateContext', revokedAt });
|
|
11027
11086
|
};
|
|
11028
11087
|
this.publish = async () => {
|
|
11029
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
11088
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-Bxv6CUrH.js'); });
|
|
11030
11089
|
await assertItemOwned(this);
|
|
11031
11090
|
this._service.send({ type: 'startPublish' });
|
|
11032
11091
|
return new Promise((resolve, reject) => {
|
|
@@ -11062,15 +11121,14 @@ class Item {
|
|
|
11062
11121
|
};
|
|
11063
11122
|
this.getPublishUploads = async () => {
|
|
11064
11123
|
// Use dynamic import to break circular dependency
|
|
11065
|
-
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-
|
|
11124
|
+
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-CONYV9QQ.js'); });
|
|
11066
11125
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
11067
11126
|
return await getPublishUploads(this);
|
|
11068
11127
|
};
|
|
11069
|
-
this.getPublishPayload = async (uploadedTransactions) => {
|
|
11070
|
-
|
|
11071
|
-
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-dR9co4rH.js'); });
|
|
11128
|
+
this.getPublishPayload = async (uploadedTransactions, options) => {
|
|
11129
|
+
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-muuS1j0F.js'); });
|
|
11072
11130
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
11073
|
-
return await getPublishPayload(this, uploadedTransactions);
|
|
11131
|
+
return await getPublishPayload(this, uploadedTransactions, options);
|
|
11074
11132
|
};
|
|
11075
11133
|
this.persistSeedUid = async (publisher) => {
|
|
11076
11134
|
const ctx = this._getSnapshotContext();
|
|
@@ -12268,7 +12326,7 @@ class Item {
|
|
|
12268
12326
|
* Destroy the item: soft delete in DB, remove from caches, clean up subscriptions, stop service.
|
|
12269
12327
|
*/
|
|
12270
12328
|
async destroy() {
|
|
12271
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
12329
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-Bxv6CUrH.js'); });
|
|
12272
12330
|
await assertItemOwned(this);
|
|
12273
12331
|
const context = this._getSnapshotContext();
|
|
12274
12332
|
const cacheKey = context.seedUid || context.seedLocalId;
|
|
@@ -16442,7 +16500,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
|
|
|
16442
16500
|
// Lazy import cache for ModelProperty to avoid circular dependency
|
|
16443
16501
|
// Eagerly start loading to minimize delay on first access
|
|
16444
16502
|
let ModelPropertyClass = null;
|
|
16445
|
-
const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-
|
|
16503
|
+
const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-TPey_B4m.js'); })
|
|
16446
16504
|
.then(module => {
|
|
16447
16505
|
ModelPropertyClass = module.ModelProperty;
|
|
16448
16506
|
return ModelPropertyClass;
|
|
@@ -16459,7 +16517,7 @@ function getModelProperty() {
|
|
|
16459
16517
|
}
|
|
16460
16518
|
// Lazy import cache for Schema to avoid circular dependency
|
|
16461
16519
|
let SchemaClass = null;
|
|
16462
|
-
const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-
|
|
16520
|
+
const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-B-IQEtpX.js'); })
|
|
16463
16521
|
.then(module => {
|
|
16464
16522
|
SchemaClass = module.Schema;
|
|
16465
16523
|
return SchemaClass;
|
|
@@ -18413,7 +18471,7 @@ class Db extends BaseDb {
|
|
|
18413
18471
|
// You can inspect what will happen before applying
|
|
18414
18472
|
await apply();
|
|
18415
18473
|
this.db = db;
|
|
18416
|
-
const { backfillMetadataPropertyIds } = await Promise.resolve().then(function () { return require('./backfillMetadataPropertyIds-
|
|
18474
|
+
const { backfillMetadataPropertyIds } = await Promise.resolve().then(function () { return require('./backfillMetadataPropertyIds-BBPgBc2W.js'); });
|
|
18417
18475
|
await backfillMetadataPropertyIds();
|
|
18418
18476
|
return this.db;
|
|
18419
18477
|
}
|
|
@@ -19060,7 +19118,7 @@ const getTsImport = async (filePath) => {
|
|
|
19060
19118
|
|
|
19061
19119
|
// Get the directory of this file to resolve relative paths
|
|
19062
19120
|
// @ts-ignore - rollup plugin-typescript doesn't recognize import.meta with module: "preserve"
|
|
19063
|
-
const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cjs/index-
|
|
19121
|
+
const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cjs/index-Bte-I6OD.js', document.baseURI).href)));
|
|
19064
19122
|
path.dirname(__filename$1);
|
|
19065
19123
|
const commandExists = (command) => {
|
|
19066
19124
|
try {
|
|
@@ -19611,11 +19669,13 @@ exports.modelSchemas = modelSchemas;
|
|
|
19611
19669
|
exports.modelUids = modelUids;
|
|
19612
19670
|
exports.models = models$1;
|
|
19613
19671
|
exports.normalizeDataType = normalizeDataType;
|
|
19672
|
+
exports.normalizeRelationPropertyValue = normalizeRelationPropertyValue;
|
|
19614
19673
|
exports.parseListPropertyValueFromStorage = parseListPropertyValueFromStorage;
|
|
19615
19674
|
exports.parseMarkdownFrontmatter = parseMarkdownFrontmatter;
|
|
19616
19675
|
exports.processSeedConfig = processSeedConfig;
|
|
19617
19676
|
exports.properties = properties;
|
|
19618
19677
|
exports.readJsonImportFile = readJsonImportFile;
|
|
19678
|
+
exports.resolveSeedIdsFromRefString = resolveSeedIdsFromRefString;
|
|
19619
19679
|
exports.resolveStorageNameToSchemaName = resolveStorageNameToSchemaName;
|
|
19620
19680
|
exports.runDestroyLifecycle = runDestroyLifecycle;
|
|
19621
19681
|
exports.runSeedInit = runSeedInit;
|
|
@@ -19633,4 +19693,4 @@ exports.versions = versions;
|
|
|
19633
19693
|
exports.waitForEntityIdle = waitForEntityIdle;
|
|
19634
19694
|
exports.withSeed = withSeed;
|
|
19635
19695
|
exports.writeProcessMachine = writeProcessMachine;
|
|
19636
|
-
//# sourceMappingURL=index-
|
|
19696
|
+
//# sourceMappingURL=index-Bte-I6OD.js.map
|