@seedprotocol/sdk 0.7.9-next.1177.ga3e08ed → 0.7.9-next.1189.g5e63267
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/{ClientManager-GZfXErDX.js → ClientManager-DqL0q_eu.js} +30 -17
- package/dist/ClientManager-DqL0q_eu.js.map +1 -0
- package/dist/{Item-0oDoTPhi.js → Item-CG5IhPtL.js} +260 -113
- package/dist/Item-CG5IhPtL.js.map +1 -0
- package/dist/{ModelProperty-i5flwzQG.js → ModelProperty-DDD47KVm.js} +26 -26
- package/dist/{ModelProperty-i5flwzQG.js.map → ModelProperty-DDD47KVm.js.map} +1 -1
- package/dist/{Schema-PFZwG9Nl.js → Schema-BS8oR7QV.js} +24 -24
- package/dist/{Schema-PFZwG9Nl.js.map → Schema-BS8oR7QV.js.map} +1 -1
- package/dist/{SchemaValidationService-DnGKel4V.js → SchemaValidationService-CZzKNL04.js} +6 -6
- package/dist/{SchemaValidationService-DnGKel4V.js.map → SchemaValidationService-CZzKNL04.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-BbxgavEQ.js → backfillMetadataPropertyIds-C7P7FL6F.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-BbxgavEQ.js.map → backfillMetadataPropertyIds-C7P7FL6F.js.map} +1 -1
- package/dist/{changeFeed-DKdVlUmt.js → changeFeed-M8sGbOrW.js} +6 -6
- package/dist/{changeFeed-DKdVlUmt.js.map → changeFeed-M8sGbOrW.js.map} +1 -1
- package/dist/{configurePlatform-CrMafpMW.js → configurePlatform-Dukm2QwO.js} +2 -2
- package/dist/{configurePlatform-CrMafpMW.js.map → configurePlatform-Dukm2QwO.js.map} +1 -1
- package/dist/db/drizzle/0025_add_metadata_retract.sql +1 -0
- package/dist/db/drizzle/meta/0025_snapshot.json +1652 -0
- package/dist/db/drizzle/meta/_journal.json +7 -0
- package/dist/{detachRowsBeforeDelete-DXFYSHRR.js → detachRowsBeforeDelete-Di1enVUF.js} +2 -2
- package/dist/{detachRowsBeforeDelete-DXFYSHRR.js.map → detachRowsBeforeDelete-Di1enVUF.js.map} +1 -1
- package/dist/dist/{ClientManager-GZfXErDX.d.ts → ClientManager-DqL0q_eu.d.ts} +1 -1
- package/dist/dist/{ClientManager-GZfXErDX.d.ts.map → ClientManager-DqL0q_eu.d.ts.map} +1 -1
- package/dist/dist/{Item-0oDoTPhi.d.ts → Item-CG5IhPtL.d.ts} +103 -64
- package/dist/dist/Item-CG5IhPtL.d.ts.map +1 -0
- package/dist/dist/{ModelProperty-i5flwzQG.d.ts → ModelProperty-DDD47KVm.d.ts} +1 -1
- package/dist/dist/{ModelProperty-i5flwzQG.d.ts.map → ModelProperty-DDD47KVm.d.ts.map} +1 -1
- package/dist/dist/{Schema-PFZwG9Nl.d.ts → Schema-BS8oR7QV.d.ts} +2 -2
- package/dist/dist/{Schema-PFZwG9Nl.d.ts.map → Schema-BS8oR7QV.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-DnGKel4V.d.ts → SchemaValidationService-CZzKNL04.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-DnGKel4V.d.ts.map → SchemaValidationService-CZzKNL04.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-BbxgavEQ.d.ts → backfillMetadataPropertyIds-C7P7FL6F.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-C7P7FL6F.d.ts.map +1 -0
- package/dist/dist/{changeFeed-DKdVlUmt.d.ts → changeFeed-M8sGbOrW.d.ts} +1 -1
- package/dist/dist/{changeFeed-DKdVlUmt.d.ts.map → changeFeed-M8sGbOrW.d.ts.map} +1 -1
- package/dist/dist/{configurePlatform-CrMafpMW.d.ts → configurePlatform-Dukm2QwO.d.ts} +1 -1
- package/dist/dist/configurePlatform-Dukm2QwO.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-DXFYSHRR.d.ts → detachRowsBeforeDelete-Di1enVUF.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-Di1enVUF.d.ts.map +1 -0
- package/dist/dist/{eas-dyepi5jz.d.ts → eas-B5VJolSj.d.ts} +1 -1
- package/dist/dist/eas-B5VJolSj.d.ts.map +1 -0
- package/dist/dist/{errors-D1zHAqjr.d.ts → errors-CS3nDpUU.d.ts} +1 -1
- package/dist/dist/{errors-D1zHAqjr.d.ts.map → errors-CS3nDpUU.d.ts.map} +1 -1
- package/dist/dist/{findSeedRowsByUid-CT3sOXXw.d.ts → findSeedRowsByUid-CuQmK7An.d.ts} +1 -1
- package/dist/dist/findSeedRowsByUid-CuQmK7An.d.ts.map +1 -0
- package/dist/dist/{getItem-Bhjecbia.d.ts → getItem-Uha3_H0t.d.ts} +1 -1
- package/dist/dist/getItem-Uha3_H0t.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-DH4rMqXG.d.ts → getPublishPayload-pbin4lk8.d.ts} +20 -2
- package/dist/dist/getPublishPayload-pbin4lk8.d.ts.map +1 -0
- package/dist/dist/getPublishPendingDiff-ByIaPvCn.d.ts +18 -0
- package/dist/dist/getPublishPendingDiff-ByIaPvCn.d.ts.map +1 -0
- package/dist/dist/{getPublishUploads-BzUIDA2G.d.ts → getPublishUploads-BBqiowVc.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-BzUIDA2G.d.ts.map → getPublishUploads-BBqiowVc.d.ts.map} +1 -1
- package/dist/dist/{index-DJmWkVIK.d.ts → index-DQoyhp2c.d.ts} +5 -5
- package/dist/dist/index-DQoyhp2c.d.ts.map +1 -0
- package/dist/dist/{index-PbnKw2es.d.ts → index-DxHpPNfn.d.ts} +18 -1
- package/dist/dist/{index-PbnKw2es.d.ts.map → index-DxHpPNfn.d.ts.map} +1 -1
- package/dist/dist/{index-CkYb3wcU.d.ts → index-njjjo74v.d.ts} +13 -13
- package/dist/dist/index-njjjo74v.d.ts.map +1 -0
- package/dist/dist/{index-Dx_GTdyQ.d.ts → index-rOTW-2QZ.d.ts} +139 -118
- package/dist/dist/index-rOTW-2QZ.d.ts.map +1 -0
- package/dist/dist/{index.browser-i9uPJice.d.ts → index.browser-QPWBkLJA.d.ts} +52 -1
- package/dist/dist/{index.browser-i9uPJice.d.ts.map → index.browser-QPWBkLJA.d.ts.map} +1 -1
- package/dist/dist/{index.node-CzMwMr_d.d.ts → index.node-WsEJCOwC.d.ts} +69 -1
- package/dist/dist/{index.node-CzMwMr_d.d.ts.map → index.node-WsEJCOwC.d.ts.map} +1 -1
- package/dist/dist/{modelPropertyRecordSchemas-C5lW9aA-.d.ts → modelPropertyRecordSchemas-onFOG2x6.d.ts} +1 -1
- package/dist/dist/modelPropertyRecordSchemas-onFOG2x6.d.ts.map +1 -0
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-BwYtg5Q_.d.ts → property-C85DCD7K.d.ts} +3 -3
- package/dist/dist/property-C85DCD7K.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-CyHdpcPP.d.ts → propertyValidationRules-CjUPOFeu.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-CjUPOFeu.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-C5F6b7GK.d.ts → publishDraftGraph-DBWAN72w.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-C5F6b7GK.d.ts.map → publishDraftGraph-DBWAN72w.d.ts.map} +1 -1
- package/dist/dist/{resolveModelForSyncedSeed-4gO9Hfn2.d.ts → resolveModelForSyncedSeed-fIURvYRV.d.ts} +1 -1
- package/dist/dist/resolveModelForSyncedSeed-fIURvYRV.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-DUu_wjUG.d.ts → syncDbWithEas-BMHoou6X.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-BMHoou6X.d.ts.map +1 -0
- package/dist/dist/{tolerantWebAccess-DecKDGen.d.ts → tolerantWebAccess-BHndShch.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-DecKDGen.d.ts.map → tolerantWebAccess-BHndShch.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-CP606vKs.d.ts → updateSeedRevokedAt-DpfG6ztE.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-DpfG6ztE.d.ts.map +1 -0
- package/dist/{eas-dyepi5jz.js → eas-B5VJolSj.js} +3 -3
- package/dist/{eas-dyepi5jz.js.map → eas-B5VJolSj.js.map} +1 -1
- package/dist/{errors-D1zHAqjr.js → errors-CS3nDpUU.js} +26 -26
- package/dist/{errors-D1zHAqjr.js.map → errors-CS3nDpUU.js.map} +1 -1
- package/dist/{findSeedRowsByUid-CT3sOXXw.js → findSeedRowsByUid-CuQmK7An.js} +3 -3
- package/dist/{findSeedRowsByUid-CT3sOXXw.js.map → findSeedRowsByUid-CuQmK7An.js.map} +1 -1
- package/dist/{getItem-Bhjecbia.js → getItem-Uha3_H0t.js} +4 -4
- package/dist/{getItem-Bhjecbia.js.map → getItem-Uha3_H0t.js.map} +1 -1
- package/dist/{getPublishPayload-DH4rMqXG.js → getPublishPayload-pbin4lk8.js} +201 -99
- package/dist/getPublishPayload-pbin4lk8.js.map +1 -0
- package/dist/getPublishPendingDiff-ByIaPvCn.js +118 -0
- package/dist/getPublishPendingDiff-ByIaPvCn.js.map +1 -0
- package/dist/{getPublishUploads-BzUIDA2G.js → getPublishUploads-BBqiowVc.js} +7 -7
- package/dist/{getPublishUploads-BzUIDA2G.js.map → getPublishUploads-BBqiowVc.js.map} +1 -1
- package/dist/{index-DJmWkVIK.js → index-DQoyhp2c.js} +8 -8
- package/dist/index-DQoyhp2c.js.map +1 -0
- package/dist/{index-PbnKw2es.js → index-DxHpPNfn.js} +2 -2
- package/dist/index-DxHpPNfn.js.map +1 -0
- package/dist/{index-CkYb3wcU.js → index-njjjo74v.js} +7 -7
- package/dist/index-njjjo74v.js.map +1 -0
- package/dist/{index-Dx_GTdyQ.js → index-rOTW-2QZ.js} +18 -3
- package/dist/index-rOTW-2QZ.js.map +1 -0
- package/dist/{index.browser-i9uPJice.js → index.browser-QPWBkLJA.js} +50 -34
- package/dist/index.browser-QPWBkLJA.js.map +1 -0
- package/dist/{index.node-CzMwMr_d.js → index.node-WsEJCOwC.js} +5 -5
- package/dist/{index.node-CzMwMr_d.js.map → index.node-WsEJCOwC.js.map} +1 -1
- package/dist/main.js +73 -103
- package/dist/main.js.map +1 -1
- package/dist/{modelPropertyRecordSchemas-C5lW9aA-.js → modelPropertyRecordSchemas-onFOG2x6.js} +4 -4
- package/dist/{modelPropertyRecordSchemas-C5lW9aA-.js.map → modelPropertyRecordSchemas-onFOG2x6.js.map} +1 -1
- package/dist/node.js +9 -9
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-BwYtg5Q_.js → property-C85DCD7K.js} +6 -6
- package/dist/{property-BwYtg5Q_.js.map → property-C85DCD7K.js.map} +1 -1
- package/dist/{propertyValidationRules-CyHdpcPP.js → propertyValidationRules-CjUPOFeu.js} +6 -6
- package/dist/{propertyValidationRules-CyHdpcPP.js.map → propertyValidationRules-CjUPOFeu.js.map} +1 -1
- package/dist/{publishDraftGraph-C5F6b7GK.js → publishDraftGraph-DBWAN72w.js} +9 -9
- package/dist/{publishDraftGraph-C5F6b7GK.js.map → publishDraftGraph-DBWAN72w.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-4gO9Hfn2.js → resolveModelForSyncedSeed-fIURvYRV.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-4gO9Hfn2.js.map → resolveModelForSyncedSeed-fIURvYRV.js.map} +1 -1
- package/dist/seedSchema/MetadataSchema.ts +3 -0
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +26 -0
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +4 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/browser/db/drizzleFiles.d.ts +3 -2
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
- package/dist/src/db/read/getPropertyClear.d.ts +45 -0
- package/dist/src/db/read/getPropertyClear.d.ts.map +1 -0
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPendingDiff.d.ts +5 -0
- package/dist/src/db/read/getPublishPendingDiff.d.ts.map +1 -1
- package/dist/src/db/read/summarizePublishWork.d.ts +5 -0
- package/dist/src/db/read/summarizePublishWork.d.ts.map +1 -1
- package/dist/src/db/write/markPropertyAttestationsRetracted.d.ts +11 -0
- package/dist/src/db/write/markPropertyAttestationsRetracted.d.ts.map +1 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts +2 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/compareMetadataRowsLatestFirst.d.ts +9 -9
- package/dist/src/helpers/compareMetadataRowsLatestFirst.d.ts.map +1 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts +6 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +4 -0
- package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/src/node/index.d.ts +1 -1
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/outbox/itemAppliers.d.ts +7 -0
- package/dist/src/outbox/itemAppliers.d.ts.map +1 -1
- package/dist/src/outbox/pendingValues.d.ts.map +1 -1
- package/dist/src/seedSchema/MetadataSchema.d.ts +17 -0
- package/dist/src/seedSchema/MetadataSchema.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +8 -0
- package/dist/src/types/property.d.ts.map +1 -1
- package/dist/{syncDbWithEas-DUu_wjUG.js → syncDbWithEas-BMHoou6X.js} +47 -23
- package/dist/syncDbWithEas-BMHoou6X.js.map +1 -0
- package/dist/{tolerantWebAccess-DecKDGen.js → tolerantWebAccess-BHndShch.js} +6 -6
- package/dist/{tolerantWebAccess-DecKDGen.js.map → tolerantWebAccess-BHndShch.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-CP606vKs.js → updateSeedRevokedAt-DpfG6ztE.js} +3 -3
- package/dist/{updateSeedRevokedAt-CP606vKs.js.map → updateSeedRevokedAt-DpfG6ztE.js.map} +1 -1
- package/package.json +6 -6
- package/dist/ClientManager-GZfXErDX.js.map +0 -1
- package/dist/Item-0oDoTPhi.js.map +0 -1
- package/dist/dist/Item-0oDoTPhi.d.ts.map +0 -1
- package/dist/dist/backfillMetadataPropertyIds-BbxgavEQ.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CrMafpMW.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-DXFYSHRR.d.ts.map +0 -1
- package/dist/dist/eas-dyepi5jz.d.ts.map +0 -1
- package/dist/dist/findSeedRowsByUid-CT3sOXXw.d.ts.map +0 -1
- package/dist/dist/getItem-Bhjecbia.d.ts.map +0 -1
- package/dist/dist/getPublishPayload-DH4rMqXG.d.ts.map +0 -1
- package/dist/dist/index-CkYb3wcU.d.ts.map +0 -1
- package/dist/dist/index-DJmWkVIK.d.ts.map +0 -1
- package/dist/dist/index-Dx_GTdyQ.d.ts.map +0 -1
- package/dist/dist/modelPropertyRecordSchemas-C5lW9aA-.d.ts.map +0 -1
- package/dist/dist/property-BwYtg5Q_.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-CyHdpcPP.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-4gO9Hfn2.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-DUu_wjUG.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-CP606vKs.d.ts.map +0 -1
- package/dist/getPublishPayload-DH4rMqXG.js.map +0 -1
- package/dist/index-CkYb3wcU.js.map +0 -1
- package/dist/index-DJmWkVIK.js.map +0 -1
- package/dist/index-Dx_GTdyQ.js.map +0 -1
- package/dist/index-PbnKw2es.js.map +0 -1
- package/dist/index.browser-i9uPJice.js.map +0 -1
- package/dist/syncDbWithEas-DUu_wjUG.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isEqual } from 'lodash-es';
|
|
2
|
-
import { L as BaseDb, u as easSyncProcesses,
|
|
2
|
+
import { L as BaseDb, u as easSyncProcesses, an as isBrowser, ac as isNode, aB as normalizeAddressConfig, aR as isTestOrSeedDev, h as appState, Q as BaseFileManager, a2 as loadNameMatchLevels, p as models$1, o as modelUids, s as seeds, aC as normalizeAddressList, J as schemas, aM as loadModelsFromDbForSchema, aO as addSchemaToDb, aG as isInternalSchema, a5 as generateId, aS as warnOnInvalidNameMatch, aT as INTERNAL_SCHEMA_IDS, aU as linkModelToSchema, n as normalizeDataType, a8 as easPropertyNameForPublish, ar as SEED_PROTOCOL_SCHEMA_NAME, z as modelSchemas, v as versions, m as metadata$1, Z as getItemStorageSubdir, _ as getItemStorageLocalFileName, C as pendingWrites, ab as getMetadataPropertyNamesForQuery, x as htmlEmbeddedImageCoPublish, t as arweaveL1FinalizeJobs, I as publishProcesses, a0 as normalizePublisher, aV as getWatchedAddressesFromDb, aW as getOwnedAddressesFromDb, aX as CLIENT_NOT_INITIALIZED } from './index-rOTW-2QZ.js';
|
|
3
3
|
import debug from 'debug';
|
|
4
4
|
import { createActor, setup, assign, fromPromise, fromCallback, waitFor } from 'xstate';
|
|
5
|
-
import {
|
|
5
|
+
import { Y as MachineIds, an as ClientManagerEvents, ao as getSeedPublisher, ap as propertyNameVariants, M as METADATA_LATEST_FIRST_ORDER_SQL, D as selectInBatches, aq as createSeed, ar as createMetadata, y as compareMetadataRowsLatestFirst, as as updateItemPropertyValue, r as registerOutboxApplier, n as outboxOpValue, i as OutboxOpDeferredError, s as startOutbox, j as OutboxOpFailedError, u as OwnershipError, x as isItemOwned, L as parseListPropertyValueFromStorage, X as ClientManagerState, at as resolvePublisherFromSeedRow, a5 as isLocalUnsealedDraft, B as writeInBatches, I as Item } from './Item-CG5IhPtL.js';
|
|
6
6
|
import { eq, inArray, and, isNotNull, ne, desc, countDistinct, isNull, sql, lt, or, like } from 'drizzle-orm';
|
|
7
|
-
import { d as withDbTabLock, a as isLeaderTab, k as postTabMessage, o as onTabMessage, c as whenLeaderTab, l as listenForOtherTabsEvents, m as startTabCoordination, g as withSeedDbLock, e as emitAcrossTabs, A as ADDRESSES_PERSISTED_EVENT, q as tryWithTabLock, r as notifyFileSaved, p as parseAddressesPersistedPayload, L as LOCAL_COPIES_REMOVED_EVENT } from './changeFeed-
|
|
7
|
+
import { d as withDbTabLock, a as isLeaderTab, k as postTabMessage, o as onTabMessage, c as whenLeaderTab, l as listenForOtherTabsEvents, m as startTabCoordination, g as withSeedDbLock, e as emitAcrossTabs, A as ADDRESSES_PERSISTED_EVENT, q as tryWithTabLock, r as notifyFileSaved, p as parseAddressesPersistedPayload, L as LOCAL_COPIES_REMOVED_EVENT } from './changeFeed-M8sGbOrW.js';
|
|
8
8
|
import { seedGatewayConfigFromSeedConfig, setPreferredArweaveReadBaseUrls, resolveSeedGatewayEndpoints, setResolvedSeedGatewayEndpoints, BaseArweaveClient, ensureReadGatewaySelected, DEFAULT_ARWEAVE_HOST } from '@seedprotocol/arweave';
|
|
9
9
|
import { configureEasReadChain, easName, BaseQueryClient, BaseEasClient, GET_SCHEMAS, whenEasReadChainSettled, getEasReadChainId, DEFAULT_EAS_CHAIN_ID, isEasReadChainConfigured, localNamesInBestMatchTier, isPlaceholderUid, isValidEasAttestationUid } from '@seedprotocol/eas';
|
|
10
10
|
import 'pluralize';
|
|
@@ -213,7 +213,7 @@ function toRunSyncArg(options) {
|
|
|
213
213
|
return undefined;
|
|
214
214
|
}
|
|
215
215
|
const runEasSync = fromPromise(async ({ input, }) => {
|
|
216
|
-
const { runSyncFromEas } = await import('./syncDbWithEas-
|
|
216
|
+
const { runSyncFromEas } = await import('./syncDbWithEas-BMHoou6X.js');
|
|
217
217
|
// Sync checks for rows and then inserts the rest (no unique index on uids), so syncs in
|
|
218
218
|
// different tabs take turns. A sync can run for minutes, so wait without a timeout.
|
|
219
219
|
await withDbTabLock('eas-sync', async () => {
|
|
@@ -556,7 +556,7 @@ const platformClassesInit = fromCallback(({ sendBack, input: { context, event }
|
|
|
556
556
|
if (!config) {
|
|
557
557
|
throw new Error('client.init requires a config');
|
|
558
558
|
}
|
|
559
|
-
const { configurePlatform } = await import('./configurePlatform-
|
|
559
|
+
const { configurePlatform } = await import('./configurePlatform-Dukm2QwO.js');
|
|
560
560
|
if (isBrowser()) {
|
|
561
561
|
const { createPlatformServices } = await import('./platform.browser.js');
|
|
562
562
|
configurePlatform(createPlatformServices());
|
|
@@ -2000,7 +2000,7 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2000
2000
|
// Check DB for existing schema by name+version (same as minimal path)
|
|
2001
2001
|
const db = BaseDb.getAppDb();
|
|
2002
2002
|
if (db) {
|
|
2003
|
-
const _mod_0 = await import('./index-
|
|
2003
|
+
const _mod_0 = await import('./index-rOTW-2QZ.js');
|
|
2004
2004
|
const _ns_0 = _mod_0.bc;
|
|
2005
2005
|
const schemaSchemaMod = _ns_0;
|
|
2006
2006
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
@@ -2091,7 +2091,7 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2091
2091
|
// For minimal imports: check DB for existing schema before creating new file
|
|
2092
2092
|
const db = BaseDb.getAppDb();
|
|
2093
2093
|
if (db) {
|
|
2094
|
-
const _mod_1 = await import('./index-
|
|
2094
|
+
const _mod_1 = await import('./index-rOTW-2QZ.js');
|
|
2095
2095
|
const _ns_1 = _mod_1.bc;
|
|
2096
2096
|
const schemaSchemaMod = _ns_1;
|
|
2097
2097
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
@@ -2274,7 +2274,7 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2274
2274
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
2275
2275
|
};
|
|
2276
2276
|
// Use dynamic import to break circular dependency
|
|
2277
|
-
const _mod_2 = await import('./index-
|
|
2277
|
+
const _mod_2 = await import('./index-rOTW-2QZ.js');
|
|
2278
2278
|
const _ns_2 = _mod_2.bf;
|
|
2279
2279
|
const dbMod = _ns_2;
|
|
2280
2280
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
@@ -2296,11 +2296,11 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2296
2296
|
});
|
|
2297
2297
|
// Verify expected models are linked (single attempt - addModelsToDb already confirmed)
|
|
2298
2298
|
const expectedModelNames = Object.keys(schemaFile.models || {});
|
|
2299
|
-
const _mod_3 = await import('./index-
|
|
2299
|
+
const _mod_3 = await import('./index-rOTW-2QZ.js');
|
|
2300
2300
|
const _ns_3 = _mod_3.bd;
|
|
2301
2301
|
const modelSchemaSchemaMod = _ns_3;
|
|
2302
2302
|
const { modelSchemas } = modelSchemaSchemaMod;
|
|
2303
|
-
const _mod_4 = await import('./index-
|
|
2303
|
+
const _mod_4 = await import('./index-rOTW-2QZ.js');
|
|
2304
2304
|
const _ns_4 = _mod_4.ba;
|
|
2305
2305
|
const modelSchemaMod = _ns_4;
|
|
2306
2306
|
const { models: modelsTable } = modelSchemaMod;
|
|
@@ -2443,7 +2443,7 @@ async function applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, prope
|
|
|
2443
2443
|
createdAt: new Date(schemaFile.metadata.createdAt).getTime(),
|
|
2444
2444
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
2445
2445
|
};
|
|
2446
|
-
const _mod_5 = await import('./index-
|
|
2446
|
+
const _mod_5 = await import('./index-rOTW-2QZ.js');
|
|
2447
2447
|
const _ns_5 = _mod_5.bf;
|
|
2448
2448
|
const dbMod = _ns_5;
|
|
2449
2449
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
@@ -2475,7 +2475,7 @@ async function applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, prope
|
|
|
2475
2475
|
* draft (its edits aren't the app's to undo) or a newer version than schemaFile.
|
|
2476
2476
|
*/
|
|
2477
2477
|
async function getModelsDroppedFromStoredSchema(db, schemaFile) {
|
|
2478
|
-
const _mod_6 = await import('./index-
|
|
2478
|
+
const _mod_6 = await import('./index-rOTW-2QZ.js');
|
|
2479
2479
|
const _ns_6 = _mod_6.bc;
|
|
2480
2480
|
const { schemas: schemasTable } = _ns_6;
|
|
2481
2481
|
const { eq } = await import('drizzle-orm');
|
|
@@ -2503,10 +2503,10 @@ async function getModelsDroppedFromStoredSchema(db, schemaFile) {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
/** Delete the model_schemas rows linking the named models to the schema. The models and their items stay. */
|
|
2505
2505
|
async function unlinkModelsFromSchema(db, schemaId, modelNames) {
|
|
2506
|
-
const _mod_7 = await import('./index-
|
|
2506
|
+
const _mod_7 = await import('./index-rOTW-2QZ.js');
|
|
2507
2507
|
const _ns_7 = _mod_7.bd;
|
|
2508
2508
|
const { modelSchemas } = _ns_7;
|
|
2509
|
-
const _mod_8 = await import('./index-
|
|
2509
|
+
const _mod_8 = await import('./index-rOTW-2QZ.js');
|
|
2510
2510
|
const _ns_8 = _mod_8.ba;
|
|
2511
2511
|
const { models: modelsTable } = _ns_8;
|
|
2512
2512
|
const { and, eq, inArray } = await import('drizzle-orm');
|
|
@@ -2780,7 +2780,7 @@ const createRowsWrittenSignal = () => {
|
|
|
2780
2780
|
const createModelFromJson = async (modelName, modelDef, schemaName, modelFileId, // Optional modelFileId from JSON file
|
|
2781
2781
|
propertyFileIds, // Optional map of property names to their file IDs from the JSON file
|
|
2782
2782
|
persistedBy) => {
|
|
2783
|
-
const _mod_9 = await import('./errors-
|
|
2783
|
+
const _mod_9 = await import('./errors-CS3nDpUU.js');
|
|
2784
2784
|
const _ns_9 = _mod_9.i;
|
|
2785
2785
|
const modelMod = _ns_9;
|
|
2786
2786
|
const { Model } = modelMod;
|
|
@@ -3998,7 +3998,20 @@ function startItemOutbox() {
|
|
|
3998
3998
|
const value = outboxOpValue(op);
|
|
3999
3999
|
// Before the write, which makes the edit the newest row
|
|
4000
4000
|
const conflict = await findSetConflict(op, value, tx);
|
|
4001
|
-
const
|
|
4001
|
+
const { clear, ...props } = value;
|
|
4002
|
+
const result = await updateItemPropertyValue({
|
|
4003
|
+
...props,
|
|
4004
|
+
...(clear && {
|
|
4005
|
+
newValue: null,
|
|
4006
|
+
refSeedType: null,
|
|
4007
|
+
refResolvedValue: null,
|
|
4008
|
+
refResolvedDisplayValue: null,
|
|
4009
|
+
localStorageDir: null,
|
|
4010
|
+
retract: clear.retract,
|
|
4011
|
+
}),
|
|
4012
|
+
seedLocalId: op.seedLocalId,
|
|
4013
|
+
propertyName: op.propertyName ?? undefined,
|
|
4014
|
+
}, { db: tx });
|
|
4002
4015
|
await recordPropertyEdit(op, conflict, tx);
|
|
4003
4016
|
return result ?? null;
|
|
4004
4017
|
},
|
|
@@ -5276,4 +5289,4 @@ var ClientManager$1 = /*#__PURE__*/Object.freeze({
|
|
|
5276
5289
|
});
|
|
5277
5290
|
|
|
5278
5291
|
export { listCompleteSchemaFiles as A, loadAllSchemasFromDb as B, ClientManager as C, mergeEasSyncRequestIntents as D, EAS_CHAIN_ID_APP_STATE_KEY as E, registerSeedQueryLocalSource as F, requestEasSyncFromAddressChange as G, requestEasSyncFromModelsInit as H, INIT_CONFIG_CONFLICT_MESSAGE as I, sendEasSyncClientRequest as J, setRetriesWhenOnlineEnabled as K, startEasSyncActor as L, unregisterSeedQueryLocalSource as M, getLatestSchemaVersion as N, createRowsWrittenSignal as O, createModelsFromJson as P, jsonPropertiesToSchemaProperties as Q, RelationTargetError as R, schema as S, SEEDPROTOCOL_Seed_Protocol_v1 as T, conflicts as U, itemAppliers as V, ClientManager$1 as W, applyCreateItem as a, applyDelete as b, applyItemStorageValue as c, deleteFiles as d, applyStorageValue as e, getPropertyConflict as f, getItemConflicts as g, getRefValueType as h, importJsonSchema as i, syncSchemaFromSource as j, transformImportToSchemaFile as k, loadSchemaFromFile as l, markPropertyConflictsResolved as m, getContentHash as n, assertLocalDbChain as o, claimUnpublishedDrafts as p, createLocalQueryDataSource as q, readJsonImportFile as r, startItemOutbox as s, throwItemWriteError as t, easSyncActor as u, getClient as v, waitForEasReadChain as w, getPublishedSeedRecord as x, getSchemaNameFromId as y, isSeedQueryLocalSourceRegistered as z };
|
|
5279
|
-
//# sourceMappingURL=ClientManager-
|
|
5292
|
+
//# sourceMappingURL=ClientManager-DqL0q_eu.js.map
|