@seedprotocol/sdk 0.7.7-next.988.g7046e66 → 0.7.7
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-DdqRofK6.js → ClientManager-2GtDWHq6.js} +21 -21
- package/dist/{ClientManager-DdqRofK6.js.map → ClientManager-2GtDWHq6.js.map} +1 -1
- package/dist/{Item-DmK1PgK9.js → Item-D6j0IvBP.js} +53 -53
- package/dist/{Item-DmK1PgK9.js.map → Item-D6j0IvBP.js.map} +1 -1
- package/dist/{ModelProperty-DaJAII87.js → ModelProperty-B52C3CQ2.js} +26 -26
- package/dist/{ModelProperty-DaJAII87.js.map → ModelProperty-B52C3CQ2.js.map} +1 -1
- package/dist/{Schema-DhlbBQs8.js → Schema-O1QLoXv6.js} +31 -31
- package/dist/{Schema-DhlbBQs8.js.map → Schema-O1QLoXv6.js.map} +1 -1
- package/dist/{SchemaValidationService-9KHQAYQ4.js → SchemaValidationService-BxCbfDaI.js} +6 -6
- package/dist/{SchemaValidationService-9KHQAYQ4.js.map → SchemaValidationService-BxCbfDaI.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-qoVxUEEl.js → backfillMetadataPropertyIds-CzSbuucw.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-qoVxUEEl.js.map → backfillMetadataPropertyIds-CzSbuucw.js.map} +1 -1
- package/dist/{configurePlatform-CazqABrK.js → configurePlatform-Bbpw_R4y.js} +2 -2
- package/dist/{configurePlatform-CazqABrK.js.map → configurePlatform-Bbpw_R4y.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-yatbnC27.js → detachRowsBeforeDelete-D1TyEMco.js} +2 -2
- package/dist/{detachRowsBeforeDelete-yatbnC27.js.map → detachRowsBeforeDelete-D1TyEMco.js.map} +1 -1
- package/dist/{discardNewDraft-q1krLqtL.js → discardNewDraft-hiVaUVjV.js} +5 -5
- package/dist/{discardNewDraft-q1krLqtL.js.map → discardNewDraft-hiVaUVjV.js.map} +1 -1
- package/dist/dist/{ClientManager-DdqRofK6.d.ts → ClientManager-2GtDWHq6.d.ts} +1 -1
- package/dist/dist/{ClientManager-DdqRofK6.d.ts.map → ClientManager-2GtDWHq6.d.ts.map} +1 -1
- package/dist/dist/{Item-DmK1PgK9.d.ts → Item-D6j0IvBP.d.ts} +1 -1
- package/dist/dist/{Item-DmK1PgK9.d.ts.map → Item-D6j0IvBP.d.ts.map} +1 -1
- package/dist/dist/{ModelProperty-DaJAII87.d.ts → ModelProperty-B52C3CQ2.d.ts} +1 -1
- package/dist/dist/{ModelProperty-DaJAII87.d.ts.map → ModelProperty-B52C3CQ2.d.ts.map} +1 -1
- package/dist/dist/{Schema-DhlbBQs8.d.ts → Schema-O1QLoXv6.d.ts} +1 -1
- package/dist/dist/{Schema-DhlbBQs8.d.ts.map → Schema-O1QLoXv6.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-9KHQAYQ4.d.ts → SchemaValidationService-BxCbfDaI.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-9KHQAYQ4.d.ts.map → SchemaValidationService-BxCbfDaI.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-qoVxUEEl.d.ts → backfillMetadataPropertyIds-CzSbuucw.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-CzSbuucw.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CazqABrK.d.ts → configurePlatform-Bbpw_R4y.d.ts} +1 -1
- package/dist/dist/configurePlatform-Bbpw_R4y.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-yatbnC27.d.ts → detachRowsBeforeDelete-D1TyEMco.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-D1TyEMco.d.ts.map +1 -0
- package/dist/dist/{discardNewDraft-q1krLqtL.d.ts → discardNewDraft-hiVaUVjV.d.ts} +1 -1
- package/dist/dist/discardNewDraft-hiVaUVjV.d.ts.map +1 -0
- package/dist/dist/{eas-CPYt-QVJ.d.ts → eas-DOdj-EMK.d.ts} +1 -1
- package/dist/dist/eas-DOdj-EMK.d.ts.map +1 -0
- package/dist/dist/{errors-DuFqGrjo.d.ts → errors-KM-yq2MD.d.ts} +1 -1
- package/dist/dist/{errors-DuFqGrjo.d.ts.map → errors-KM-yq2MD.d.ts.map} +1 -1
- package/dist/dist/{getItem-DPapr9uy.d.ts → getItem-Bh0zv-o1.d.ts} +1 -1
- package/dist/dist/getItem-Bh0zv-o1.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-Dnv38ZW1.d.ts → getPublishPayload-oH8wJhnH.d.ts} +1 -1
- package/dist/dist/{getPublishPayload-Dnv38ZW1.d.ts.map → getPublishPayload-oH8wJhnH.d.ts.map} +1 -1
- package/dist/dist/{getPublishUploads-Dd7dCxNi.d.ts → getPublishUploads-Cex-NBe6.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-Dd7dCxNi.d.ts.map → getPublishUploads-Cex-NBe6.d.ts.map} +1 -1
- package/dist/dist/{index-CTidoFhC.d.ts → index-BAao3_Po.d.ts} +5 -5
- package/dist/dist/index-BAao3_Po.d.ts.map +1 -0
- package/dist/dist/{index-PnK3Ak9Z.d.ts → index-BbFwftAv.d.ts} +1 -1
- package/dist/dist/{index-PnK3Ak9Z.d.ts.map → index-BbFwftAv.d.ts.map} +1 -1
- package/dist/dist/{index-DeUHrBqA.d.ts → index-DpgQMIRq.d.ts} +1 -1
- package/dist/dist/{index-DeUHrBqA.d.ts.map → index-DpgQMIRq.d.ts.map} +1 -1
- package/dist/dist/{index.browser-CRvkFEhl.d.ts → index.browser-nndbVM7z.d.ts} +1 -1
- package/dist/dist/{index.browser-CRvkFEhl.d.ts.map → index.browser-nndbVM7z.d.ts.map} +1 -1
- package/dist/dist/{index.node-DQTc7kEl.d.ts → index.node-BUfx-JaP.d.ts} +1 -1
- package/dist/dist/{index.node-DQTc7kEl.d.ts.map → index.node-BUfx-JaP.d.ts.map} +1 -1
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-Dk_5t4-p.d.ts → property-BDBvImLs.d.ts} +3 -3
- package/dist/dist/property-BDBvImLs.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-BtUZdfft.d.ts → propertyValidationRules-BlfLn4rP.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-BlfLn4rP.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-CN7EsPVb.d.ts → publishDraftGraph-CLO85LLz.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-CN7EsPVb.d.ts.map → publishDraftGraph-CLO85LLz.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.d.ts → resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-C_BzNN8r.d.ts → resolveModelForSyncedSeed-DFr4COc4.d.ts} +3 -3
- package/dist/dist/resolveModelForSyncedSeed-DFr4COc4.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-BMmxPq5o.d.ts → syncDbWithEas-CAOlw3i-.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-CAOlw3i-.d.ts.map +1 -0
- package/dist/dist/{tabEvents-DyGJcILs.d.ts → tabEvents-DksXwk3X.d.ts} +1 -1
- package/dist/dist/{tabEvents-DyGJcILs.d.ts.map → tabEvents-DksXwk3X.d.ts.map} +1 -1
- package/dist/dist/{tolerantWebAccess-Zxy2EUzu.d.ts → tolerantWebAccess-CEIjFGf0.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-Zxy2EUzu.d.ts.map → tolerantWebAccess-CEIjFGf0.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-DxhC4ABM.d.ts → updateSeedRevokedAt-Cjr35YjE.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-Cjr35YjE.d.ts.map +1 -0
- package/dist/{eas-CPYt-QVJ.js → eas-DOdj-EMK.js} +3 -3
- package/dist/{eas-CPYt-QVJ.js.map → eas-DOdj-EMK.js.map} +1 -1
- package/dist/{errors-DuFqGrjo.js → errors-KM-yq2MD.js} +27 -27
- package/dist/{errors-DuFqGrjo.js.map → errors-KM-yq2MD.js.map} +1 -1
- package/dist/{getItem-DPapr9uy.js → getItem-Bh0zv-o1.js} +4 -4
- package/dist/{getItem-DPapr9uy.js.map → getItem-Bh0zv-o1.js.map} +1 -1
- package/dist/{getPublishPayload-Dnv38ZW1.js → getPublishPayload-oH8wJhnH.js} +13 -13
- package/dist/{getPublishPayload-Dnv38ZW1.js.map → getPublishPayload-oH8wJhnH.js.map} +1 -1
- package/dist/{getPublishUploads-Dd7dCxNi.js → getPublishUploads-Cex-NBe6.js} +6 -6
- package/dist/{getPublishUploads-Dd7dCxNi.js.map → getPublishUploads-Cex-NBe6.js.map} +1 -1
- package/dist/{index-CTidoFhC.js → index-BAao3_Po.js} +8 -8
- package/dist/index-BAao3_Po.js.map +1 -0
- package/dist/{index-PnK3Ak9Z.js → index-BbFwftAv.js} +2 -2
- package/dist/index-BbFwftAv.js.map +1 -0
- package/dist/{index-DeUHrBqA.js → index-DpgQMIRq.js} +2 -2
- package/dist/{index-DeUHrBqA.js.map → index-DpgQMIRq.js.map} +1 -1
- package/dist/{index.browser-CRvkFEhl.js → index.browser-nndbVM7z.js} +10 -12
- package/dist/index.browser-nndbVM7z.js.map +1 -0
- package/dist/{index.node-DQTc7kEl.js → index.node-BUfx-JaP.js} +6 -6
- package/dist/{index.node-DQTc7kEl.js.map → index.node-BUfx-JaP.js.map} +1 -1
- package/dist/main.js +22 -22
- package/dist/node.js +12 -12
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-Dk_5t4-p.js → property-BDBvImLs.js} +6 -6
- package/dist/{property-Dk_5t4-p.js.map → property-BDBvImLs.js.map} +1 -1
- package/dist/{propertyValidationRules-BtUZdfft.js → propertyValidationRules-BlfLn4rP.js} +6 -6
- package/dist/{propertyValidationRules-BtUZdfft.js.map → propertyValidationRules-BlfLn4rP.js.map} +1 -1
- package/dist/{publishDraftGraph-CN7EsPVb.js → publishDraftGraph-CLO85LLz.js} +6 -6
- package/dist/{publishDraftGraph-CN7EsPVb.js.map → publishDraftGraph-CLO85LLz.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.js → resetAmbiguousLegacyItemData-Cy8ik7xk.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.js.map → resetAmbiguousLegacyItemData-Cy8ik7xk.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-C_BzNN8r.js → resolveModelForSyncedSeed-DFr4COc4.js} +4 -4
- package/dist/resolveModelForSyncedSeed-DFr4COc4.js.map +1 -0
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/db/read/resolveModelForSyncedSeed.d.ts +2 -2
- package/dist/src/node/helpers/scripts.d.ts +1 -1
- package/dist/{syncDbWithEas-BMmxPq5o.js → syncDbWithEas-CAOlw3i-.js} +13 -13
- package/dist/{syncDbWithEas-BMmxPq5o.js.map → syncDbWithEas-CAOlw3i-.js.map} +1 -1
- package/dist/{tabEvents-DyGJcILs.js → tabEvents-DksXwk3X.js} +4 -4
- package/dist/{tabEvents-DyGJcILs.js.map → tabEvents-DksXwk3X.js.map} +1 -1
- package/dist/{tolerantWebAccess-Zxy2EUzu.js → tolerantWebAccess-CEIjFGf0.js} +6 -6
- package/dist/{tolerantWebAccess-Zxy2EUzu.js.map → tolerantWebAccess-CEIjFGf0.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-DxhC4ABM.js → updateSeedRevokedAt-Cjr35YjE.js} +3 -3
- package/dist/{updateSeedRevokedAt-DxhC4ABM.js.map → updateSeedRevokedAt-Cjr35YjE.js.map} +1 -1
- package/package.json +6 -6
- package/dist/dist/backfillMetadataPropertyIds-qoVxUEEl.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CazqABrK.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-yatbnC27.d.ts.map +0 -1
- package/dist/dist/discardNewDraft-q1krLqtL.d.ts.map +0 -1
- package/dist/dist/eas-CPYt-QVJ.d.ts.map +0 -1
- package/dist/dist/getItem-DPapr9uy.d.ts.map +0 -1
- package/dist/dist/index-CTidoFhC.d.ts.map +0 -1
- package/dist/dist/property-Dk_5t4-p.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-BtUZdfft.d.ts.map +0 -1
- package/dist/dist/resetAmbiguousLegacyItemData-DzVlhD9u.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-C_BzNN8r.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-BMmxPq5o.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-DxhC4ABM.d.ts.map +0 -1
- package/dist/index-CTidoFhC.js.map +0 -1
- package/dist/index-PnK3Ak9Z.js.map +0 -1
- package/dist/index.browser-CRvkFEhl.js.map +0 -1
- package/dist/resolveModelForSyncedSeed-C_BzNN8r.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { startCase, isEqual } from 'lodash-es';
|
|
2
|
-
import { B as BaseDb, o as easSyncProcesses, I as eventEmitter, ac as isBrowser, a1 as isNode, aE as normalizeAddressConfig, aS as isTestOrSeedDev, j as appState, aT as downloadAllFilesRequestHandler, aU as downloadAllFilesBinaryRequestHandler, h as BaseFileManager, ag as loadNameMatchLevels, t as models$1, s as modelUids, C as seeds, aF as normalizeAddressList, A as schemas, aP as loadModelsFromDbForSchema, aM as addSchemaToDb, aJ as isInternalSchema, ai as generateId, aR as clearNameMatchLevels, aV as warnOnInvalidNameMatch, aW as INTERNAL_SCHEMA_IDS, aX as linkModelToSchema, n as normalizeDataType, ab as easPropertyNameForPublish, au as SEED_PROTOCOL_SCHEMA_NAME, r as modelSchemas, m as metadata$1, v as properties, L as resolveItemModelFileId, F as versions, ae as normalizePublisher, p as htmlEmbeddedImageCoPublish, k as arweaveL1FinalizeJobs, z as publishProcesses, aY as getWatchedAddressesFromDb, aZ as getOwnedAddressesFromDb, a_ as CLIENT_NOT_INITIALIZED } from './index-
|
|
2
|
+
import { B as BaseDb, o as easSyncProcesses, I as eventEmitter, ac as isBrowser, a1 as isNode, aE as normalizeAddressConfig, aS as isTestOrSeedDev, j as appState, aT as downloadAllFilesRequestHandler, aU as downloadAllFilesBinaryRequestHandler, h as BaseFileManager, ag as loadNameMatchLevels, t as models$1, s as modelUids, C as seeds, aF as normalizeAddressList, A as schemas, aP as loadModelsFromDbForSchema, aM as addSchemaToDb, aJ as isInternalSchema, ai as generateId, aR as clearNameMatchLevels, aV as warnOnInvalidNameMatch, aW as INTERNAL_SCHEMA_IDS, aX as linkModelToSchema, n as normalizeDataType, ab as easPropertyNameForPublish, au as SEED_PROTOCOL_SCHEMA_NAME, r as modelSchemas, m as metadata$1, v as properties, L as resolveItemModelFileId, F as versions, ae as normalizePublisher, p as htmlEmbeddedImageCoPublish, k as arweaveL1FinalizeJobs, z as publishProcesses, aY as getWatchedAddressesFromDb, aZ as getOwnedAddressesFromDb, a_ as CLIENT_NOT_INITIALIZED } from './index-DpgQMIRq.js';
|
|
3
3
|
import debug from 'debug';
|
|
4
4
|
import { createActor, setup, assign, fromPromise, fromCallback, waitFor } from 'xstate';
|
|
5
|
-
import { u as MachineIds, a0 as ClientManagerEvents, a1 as withLockedItemStorageRow, a2 as getItemStorageFilePath, a3 as writeItemStorageFile, e as compareMetadataRowsLatestFirst, w as writeInBatches, a4 as resolvePublisherFromSeedRow, C as ClientManagerState, G as isLocalUnsealedDraft, s as selectInBatches, I as Item } from './Item-
|
|
5
|
+
import { u as MachineIds, a0 as ClientManagerEvents, a1 as withLockedItemStorageRow, a2 as getItemStorageFilePath, a3 as writeItemStorageFile, e as compareMetadataRowsLatestFirst, w as writeInBatches, a4 as resolvePublisherFromSeedRow, C as ClientManagerState, G as isLocalUnsealedDraft, s as selectInBatches, I as Item } from './Item-D6j0IvBP.js';
|
|
6
6
|
import { eq, inArray, and, isNotNull, ne, desc, countDistinct, isNull, or, sql, like } from 'drizzle-orm';
|
|
7
|
-
import { a as withDbTabLock, i as isLeaderTab, c as postTabMessage, o as onTabMessage, w as whenLeaderTab, l as listenForOtherTabsEvents, s as startTabCoordination, b as withSeedDbLock, e as emitAcrossTabs, A as ADDRESSES_PERSISTED_EVENT, p as parseAddressesPersistedPayload, L as LOCAL_COPIES_REMOVED_EVENT } from './tabEvents-
|
|
7
|
+
import { a as withDbTabLock, i as isLeaderTab, c as postTabMessage, o as onTabMessage, w as whenLeaderTab, l as listenForOtherTabsEvents, s as startTabCoordination, b as withSeedDbLock, e as emitAcrossTabs, A as ADDRESSES_PERSISTED_EVENT, p as parseAddressesPersistedPayload, L as LOCAL_COPIES_REMOVED_EVENT } from './tabEvents-DksXwk3X.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, isPlaceholderUid, localNamesInBestMatchTier, isValidEasAttestationUid } from '@seedprotocol/eas';
|
|
10
10
|
import 'pluralize';
|
|
@@ -212,7 +212,7 @@ function toRunSyncArg(options) {
|
|
|
212
212
|
return undefined;
|
|
213
213
|
}
|
|
214
214
|
const runEasSync = fromPromise(async ({ input, }) => {
|
|
215
|
-
const { runSyncFromEas } = await import('./syncDbWithEas-
|
|
215
|
+
const { runSyncFromEas } = await import('./syncDbWithEas-CAOlw3i-.js');
|
|
216
216
|
// Sync checks for rows and then inserts the rest (no unique index on uids), so syncs in
|
|
217
217
|
// different tabs take turns. A sync can run for minutes, so wait without a timeout.
|
|
218
218
|
await withDbTabLock('eas-sync', async () => {
|
|
@@ -590,7 +590,7 @@ const platformClassesInit = fromCallback(({ sendBack, input: { context, event }
|
|
|
590
590
|
if (!config) {
|
|
591
591
|
throw new Error('client.init requires a config');
|
|
592
592
|
}
|
|
593
|
-
const _mod_0 = await import('./configurePlatform-
|
|
593
|
+
const _mod_0 = await import('./configurePlatform-Bbpw_R4y.js');
|
|
594
594
|
const _ns_0 = _mod_0.a;
|
|
595
595
|
const { configurePlatform } = _ns_0;
|
|
596
596
|
if (isBrowser()) {
|
|
@@ -1980,7 +1980,7 @@ function getRefValueType(prop) {
|
|
|
1980
1980
|
* @returns Promise that resolves when properties are found, or rejects if not found after max retries
|
|
1981
1981
|
*/
|
|
1982
1982
|
const verifyPropertiesPersisted = async (db, modelId, modelName, maxRetries = 10, retryDelay = 100) => {
|
|
1983
|
-
const _mod_1 = await import('./index-
|
|
1983
|
+
const _mod_1 = await import('./index-DpgQMIRq.js');
|
|
1984
1984
|
const _ns_1 = _mod_1.bd;
|
|
1985
1985
|
const modelSchemaMod = _ns_1;
|
|
1986
1986
|
const { properties: propertiesTable } = modelSchemaMod;
|
|
@@ -2387,7 +2387,7 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2387
2387
|
// Check DB for existing schema by name+version (same as minimal path)
|
|
2388
2388
|
const db = BaseDb.getAppDb();
|
|
2389
2389
|
if (db) {
|
|
2390
|
-
const _mod_2 = await import('./index-
|
|
2390
|
+
const _mod_2 = await import('./index-DpgQMIRq.js');
|
|
2391
2391
|
const _ns_2 = _mod_2.bf;
|
|
2392
2392
|
const schemaSchemaMod = _ns_2;
|
|
2393
2393
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
@@ -2479,7 +2479,7 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2479
2479
|
// For minimal imports: check DB for existing schema before creating new file
|
|
2480
2480
|
const db = BaseDb.getAppDb();
|
|
2481
2481
|
if (db) {
|
|
2482
|
-
const _mod_3 = await import('./index-
|
|
2482
|
+
const _mod_3 = await import('./index-DpgQMIRq.js');
|
|
2483
2483
|
const _ns_3 = _mod_3.bf;
|
|
2484
2484
|
const schemaSchemaMod = _ns_3;
|
|
2485
2485
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
@@ -2662,7 +2662,7 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2662
2662
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
2663
2663
|
};
|
|
2664
2664
|
// Use dynamic import to break circular dependency
|
|
2665
|
-
const _mod_4 = await import('./index-
|
|
2665
|
+
const _mod_4 = await import('./index-DpgQMIRq.js');
|
|
2666
2666
|
const _ns_4 = _mod_4.bi;
|
|
2667
2667
|
const dbMod = _ns_4;
|
|
2668
2668
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
@@ -2684,11 +2684,11 @@ async function importSchema(importFilePathOrContents, version, options) {
|
|
|
2684
2684
|
});
|
|
2685
2685
|
// Verify expected models are linked (single attempt - addModelsToDb already confirmed)
|
|
2686
2686
|
const expectedModelNames = Object.keys(schemaFile.models || {});
|
|
2687
|
-
const _mod_5 = await import('./index-
|
|
2687
|
+
const _mod_5 = await import('./index-DpgQMIRq.js');
|
|
2688
2688
|
const _ns_5 = _mod_5.bg;
|
|
2689
2689
|
const modelSchemaSchemaMod = _ns_5;
|
|
2690
2690
|
const { modelSchemas } = modelSchemaSchemaMod;
|
|
2691
|
-
const _mod_6 = await import('./index-
|
|
2691
|
+
const _mod_6 = await import('./index-DpgQMIRq.js');
|
|
2692
2692
|
const _ns_6 = _mod_6.bd;
|
|
2693
2693
|
const modelSchemaMod = _ns_6;
|
|
2694
2694
|
const { models: modelsTable } = modelSchemaMod;
|
|
@@ -2890,7 +2890,7 @@ async function applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, prope
|
|
|
2890
2890
|
createdAt: new Date(schemaFile.metadata.createdAt).getTime(),
|
|
2891
2891
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
2892
2892
|
};
|
|
2893
|
-
const _mod_7 = await import('./index-
|
|
2893
|
+
const _mod_7 = await import('./index-DpgQMIRq.js');
|
|
2894
2894
|
const _ns_7 = _mod_7.bi;
|
|
2895
2895
|
const dbMod = _ns_7;
|
|
2896
2896
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
@@ -2922,7 +2922,7 @@ async function applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, prope
|
|
|
2922
2922
|
* draft (its edits aren't the app's to undo) or a newer version than schemaFile.
|
|
2923
2923
|
*/
|
|
2924
2924
|
async function getModelsDroppedFromStoredSchema(db, schemaFile) {
|
|
2925
|
-
const _mod_8 = await import('./index-
|
|
2925
|
+
const _mod_8 = await import('./index-DpgQMIRq.js');
|
|
2926
2926
|
const _ns_8 = _mod_8.bf;
|
|
2927
2927
|
const { schemas: schemasTable } = _ns_8;
|
|
2928
2928
|
const { eq } = await import('drizzle-orm');
|
|
@@ -2950,10 +2950,10 @@ async function getModelsDroppedFromStoredSchema(db, schemaFile) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
/** Delete the model_schemas rows linking the named models to the schema. The models and their items stay. */
|
|
2952
2952
|
async function unlinkModelsFromSchema(db, schemaId, modelNames) {
|
|
2953
|
-
const _mod_9 = await import('./index-
|
|
2953
|
+
const _mod_9 = await import('./index-DpgQMIRq.js');
|
|
2954
2954
|
const _ns_9 = _mod_9.bg;
|
|
2955
2955
|
const { modelSchemas } = _ns_9;
|
|
2956
|
-
const _mod_10 = await import('./index-
|
|
2956
|
+
const _mod_10 = await import('./index-DpgQMIRq.js');
|
|
2957
2957
|
const _ns_10 = _mod_10.bd;
|
|
2958
2958
|
const { models: modelsTable } = _ns_10;
|
|
2959
2959
|
const { and, eq, inArray } = await import('drizzle-orm');
|
|
@@ -3116,11 +3116,11 @@ const loadSchemaFromFile = async (schemaFilePath) => {
|
|
|
3116
3116
|
]));
|
|
3117
3117
|
const { schemaRecord } = await applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, propertyFileIds, propertyDefinitions).finally(rowsWritten.settle);
|
|
3118
3118
|
// Query the database to get model IDs that were just created
|
|
3119
|
-
const _mod_11 = await import('./index-
|
|
3119
|
+
const _mod_11 = await import('./index-DpgQMIRq.js');
|
|
3120
3120
|
const _ns_11 = _mod_11.bg;
|
|
3121
3121
|
const modelSchemaSchemaMod = _ns_11;
|
|
3122
3122
|
const { modelSchemas } = modelSchemaSchemaMod;
|
|
3123
|
-
const _mod_12 = await import('./index-
|
|
3123
|
+
const _mod_12 = await import('./index-DpgQMIRq.js');
|
|
3124
3124
|
const _ns_12 = _mod_12.bd;
|
|
3125
3125
|
const modelSchemaMod = _ns_12;
|
|
3126
3126
|
const { models: modelsTable } = modelSchemaMod;
|
|
@@ -3186,7 +3186,7 @@ const loadSchemaFromFile = async (schemaFilePath) => {
|
|
|
3186
3186
|
// After properties are created (file path), ensure schemaFile has the correct IDs from database
|
|
3187
3187
|
// Query the database to get the actual schemaFileId values that were used
|
|
3188
3188
|
// This ensures schemaData matches what's actually in the database
|
|
3189
|
-
const _mod_13 = await import('./index-
|
|
3189
|
+
const _mod_13 = await import('./index-DpgQMIRq.js');
|
|
3190
3190
|
const _ns_13 = _mod_13.bd;
|
|
3191
3191
|
const modelSchemaMod2 = _ns_13;
|
|
3192
3192
|
const { properties: propertiesTable } = modelSchemaMod2;
|
|
@@ -3222,7 +3222,7 @@ const loadSchemaFromFile = async (schemaFilePath) => {
|
|
|
3222
3222
|
// This is important even if nothing changed, to ensure consistency
|
|
3223
3223
|
const updatedSchemaData = JSON.stringify(schemaFile, null, 2);
|
|
3224
3224
|
// Update the schema record in the database with current schemaData
|
|
3225
|
-
const _mod_14 = await import('./index-
|
|
3225
|
+
const _mod_14 = await import('./index-DpgQMIRq.js');
|
|
3226
3226
|
const _ns_14 = _mod_14.bf;
|
|
3227
3227
|
const schemaSchemaMod = _ns_14;
|
|
3228
3228
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
@@ -3349,7 +3349,7 @@ const createRowsWrittenSignal = () => {
|
|
|
3349
3349
|
const createModelFromJson = async (modelName, modelDef, schemaName, modelFileId, // Optional modelFileId from JSON file
|
|
3350
3350
|
propertyFileIds, // Optional map of property names to their file IDs from the JSON file
|
|
3351
3351
|
persistedBy) => {
|
|
3352
|
-
const _mod_15 = await import('./errors-
|
|
3352
|
+
const _mod_15 = await import('./errors-KM-yq2MD.js');
|
|
3353
3353
|
const _ns_15 = _mod_15.j;
|
|
3354
3354
|
const modelMod = _ns_15;
|
|
3355
3355
|
const { Model } = modelMod;
|
|
@@ -5788,4 +5788,4 @@ var ClientManager$1 = /*#__PURE__*/Object.freeze({
|
|
|
5788
5788
|
});
|
|
5789
5789
|
|
|
5790
5790
|
export { requestEasSyncFromEventBus as A, requestEasSyncFromModelsInit as B, ClientManager as C, sendEasSyncClientRequest as D, EAS_CHAIN_ID_APP_STATE_KEY as E, setRetriesWhenOnlineEnabled as F, startEasSyncActor as G, unregisterSeedQueryLocalSource as H, INIT_CONFIG_CONFLICT_MESSAGE as I, createRowsWrittenSignal as J, createModelsFromJson as K, getLatestSchemaVersion as L, jsonPropertiesToSchemaProperties as M, schema as N, ClientManager$1 as O, SEEDPROTOCOL_Seed_Protocol_v1 as S, getContentHash as a, isVerbatimItemStorageDraftRow as b, convertVerbatimItemStorageRow as c, assertLocalDbChain as d, claimUnpublishedDrafts as e, createLocalQueryDataSource as f, getRefValueType as g, hardDeleteLocalSeedsByLocalIds as h, importJsonSchema as i, createSchema as j, easSyncActor as k, loadSchemaFromFile as l, getClient as m, getPublishedSeedRecord as n, getSchemaNameFromId as o, isSeedQueryLocalSourceRegistered as p, listCompleteSchemaFiles as q, readJsonImportFile as r, syncSchemaFromSource as s, transformImportToSchemaFile as t, loadAllSchemasFromDb as u, mergeEasSyncRequestIntents as v, waitForEasReadChain as w, readSchema as x, registerSeedQueryLocalSource as y, requestEasSyncFromAddressChange as z };
|
|
5791
|
-
//# sourceMappingURL=ClientManager-
|
|
5791
|
+
//# sourceMappingURL=ClientManager-2GtDWHq6.js.map
|