@seedprotocol/sdk 0.7.9 → 0.7.10-next.1344.g3828e8a
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/README.md +1 -1
- package/dist/{BaseFileManager-BAlySv8w.js → BaseFileManager-DLou1TZS.js} +5 -1
- package/dist/BaseFileManager-DLou1TZS.js.map +1 -0
- package/dist/{Item-Bf4kWKpH.js → Item-CXLcIHsi.js} +559 -346
- package/dist/Item-CXLcIHsi.js.map +1 -0
- package/dist/{ModelProperty-BlaEgb_U.js → ModelProperty-B3mfR6u4.js} +35 -35
- package/dist/{ModelProperty-BlaEgb_U.js.map → ModelProperty-B3mfR6u4.js.map} +1 -1
- package/dist/{Schema-J_1f6p0c.js → Schema-BeUyEmte.js} +18 -18
- package/dist/{Schema-J_1f6p0c.js.map → Schema-BeUyEmte.js.map} +1 -1
- package/dist/{SchemaValidationService-CnmKyzR-.js → SchemaValidationService-C1xqJFxI.js} +5 -5
- package/dist/{SchemaValidationService-CnmKyzR-.js.map → SchemaValidationService-C1xqJFxI.js.map} +1 -1
- package/dist/{errors-C1qUEZ7A.js → browserSupport-C64rX-2I.js} +38 -2
- package/dist/browserSupport-C64rX-2I.js.map +1 -0
- package/dist/{configurePlatform-CiOJ1R3q.js → configurePlatform-WkmvqeTO.js} +2 -2
- package/dist/{configurePlatform-CiOJ1R3q.js.map → configurePlatform-WkmvqeTO.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-sEaUwlOU.js → detachRowsBeforeDelete-BZr_0iZU.js} +2 -2
- package/dist/{detachRowsBeforeDelete-sEaUwlOU.js.map → detachRowsBeforeDelete-BZr_0iZU.js.map} +1 -1
- package/dist/dist/{BaseFileManager-BAlySv8w.d.ts → BaseFileManager-DLou1TZS.d.ts} +3 -1
- package/dist/dist/BaseFileManager-DLou1TZS.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CiOJ1R3q.d.ts → configurePlatform-WkmvqeTO.d.ts} +1 -1
- package/dist/dist/configurePlatform-WkmvqeTO.d.ts.map +1 -0
- package/dist/dist/{index-D0V-mjCV.d.ts → index-BjWk0x4-.d.ts} +1 -1
- package/dist/dist/{index-D0V-mjCV.d.ts.map → index-BjWk0x4-.d.ts.map} +1 -1
- package/dist/dist/{index.node-CYPemH-t.d.ts → index.node-BfiBriEq.d.ts} +7 -1
- package/dist/dist/{index.node-CYPemH-t.d.ts.map → index.node-BfiBriEq.d.ts.map} +1 -1
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/{eas-wB_fQ8Tc.js → eas-DpHg66jR.js} +5 -5
- package/dist/{eas-wB_fQ8Tc.js.map → eas-DpHg66jR.js.map} +1 -1
- package/dist/{errors-DLSoqSHG.js → errors-DpC9W4i3.js} +84 -45
- package/dist/{errors-DLSoqSHG.js.map → errors-DpC9W4i3.js.map} +1 -1
- package/dist/{getPublishPayload-BnIwpwz1.js → getPublishPayload-yidQCgY_.js} +8 -8
- package/dist/{getPublishPayload-BnIwpwz1.js.map → getPublishPayload-yidQCgY_.js.map} +1 -1
- package/dist/{getPublishPendingDiff-D6_-A5ns.js → getPublishPendingDiff-D__9bh6d.js} +7 -7
- package/dist/{getPublishPendingDiff-D6_-A5ns.js.map → getPublishPendingDiff-D__9bh6d.js.map} +1 -1
- package/dist/{getPublishUploads-sS6JfPgz.js → getPublishUploads-BdZmYCo2.js} +7 -7
- package/dist/{getPublishUploads-sS6JfPgz.js.map → getPublishUploads-BdZmYCo2.js.map} +1 -1
- package/dist/{index-CYGWPoOx.js → index-BMHqJ4kN.js} +7 -7
- package/dist/index-BMHqJ4kN.js.map +1 -0
- package/dist/{index-D0V-mjCV.js → index-BjWk0x4-.js} +2 -2
- package/dist/index-BjWk0x4-.js.map +1 -0
- package/dist/{index-DmTtj1nk.js → index-CVYB2g7a.js} +402 -20
- package/dist/index-CVYB2g7a.js.map +1 -0
- package/dist/{index-BVBmz_cc.js → index-uDLe9y9H.js} +7 -7
- package/dist/index-uDLe9y9H.js.map +1 -0
- package/dist/{index.browser-CUmBVYen.js → index.browser-OACFlpMH.js} +46 -10
- package/dist/index.browser-OACFlpMH.js.map +1 -0
- package/dist/{index.node-CYPemH-t.js → index.node-BfiBriEq.js} +31 -4
- package/dist/index.node-BfiBriEq.js.map +1 -0
- package/dist/main.js +17 -16
- package/dist/main.js.map +1 -1
- package/dist/{modelPropertyRecordSchemas-C7UgA5TH.js → modelPropertyRecordSchemas-BGvtTyaG.js} +5 -5
- package/dist/{modelPropertyRecordSchemas-C7UgA5TH.js.map → modelPropertyRecordSchemas-BGvtTyaG.js.map} +1 -1
- package/dist/node.js +8 -8
- package/dist/platform.browser.js +6 -6
- package/dist/platform.node.js +4 -4
- package/dist/{property-BxUYznH0.js → property-QjljUeb9.js} +8 -8
- package/dist/{property-BxUYznH0.js.map → property-QjljUeb9.js.map} +1 -1
- package/dist/{publishGraph-EcB40Uii.js → publishGraph-CP8IROkb.js} +5 -5
- package/dist/{publishGraph-EcB40Uii.js.map → publishGraph-CP8IROkb.js.map} +1 -1
- package/dist/{readHtmlBodyForStorageSeed-D6KPtWoR.js → readHtmlBodyForStorageSeed-D3OPk2iU.js} +10 -10
- package/dist/{readHtmlBodyForStorageSeed-D6KPtWoR.js.map → readHtmlBodyForStorageSeed-D3OPk2iU.js.map} +1 -1
- package/dist/src/Item/Item.d.ts +26 -5
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +20 -5
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/loadProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/propertyWrite.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/archive/exportArchive.d.ts +57 -0
- package/dist/src/archive/exportArchive.d.ts.map +1 -0
- package/dist/src/browser/db/Db.d.ts +5 -0
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/browser/helpers/tolerantWebAccess.d.ts +12 -1
- package/dist/src/browser/helpers/tolerantWebAccess.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +14 -4
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/db/Db/BaseDb.d.ts +2 -0
- package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/errors.d.ts +11 -0
- package/dist/src/helpers/FileManager/errors.d.ts.map +1 -1
- package/dist/src/helpers/browserSupport.d.ts +23 -0
- package/dist/src/helpers/browserSupport.d.ts.map +1 -0
- package/dist/src/helpers/cachedPropertyRefresh.d.ts +6 -6
- package/dist/src/helpers/cachedPropertyRefresh.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityCache.d.ts +34 -3
- package/dist/src/helpers/entity/entityCache.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityLifecycle.d.ts +21 -3
- package/dist/src/helpers/entity/entityLifecycle.d.ts.map +1 -1
- package/dist/src/helpers/propertyDefinition.d.ts +2 -0
- package/dist/src/helpers/propertyDefinition.d.ts.map +1 -1
- package/dist/src/helpers/tabCoordinator.d.ts +9 -2
- package/dist/src/helpers/tabCoordinator.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IDb.d.ts +6 -0
- package/dist/src/interfaces/IDb.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts +6 -0
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/outbox/conflicts.d.ts.map +1 -1
- package/dist/src/outbox/outbox.d.ts +6 -0
- package/dist/src/outbox/outbox.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +16 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CA7PvBgu.js → syncDbWithEas-CDjSNrVR.js} +14 -14
- package/dist/{syncDbWithEas-CA7PvBgu.js.map → syncDbWithEas-CDjSNrVR.js.map} +1 -1
- package/dist/{tabEvents-CaVmngqr.js → tabEvents-BHPY5I08.js} +38 -12
- package/dist/tabEvents-BHPY5I08.js.map +1 -0
- package/dist/{tolerantWebAccess-BJqViq08.js → tolerantWebAccess-hDq9ZGXH.js} +53 -13
- package/dist/tolerantWebAccess-hDq9ZGXH.js.map +1 -0
- package/dist/{updateSeedRevokedAt-BL9Bg-G7.js → updateSeedRevokedAt-BMwBnlnC.js} +3 -3
- package/dist/{updateSeedRevokedAt-BL9Bg-G7.js.map → updateSeedRevokedAt-BMwBnlnC.js.map} +1 -1
- package/package.json +10 -12
- package/dist/BaseFileManager-BAlySv8w.js.map +0 -1
- package/dist/Item-Bf4kWKpH.js.map +0 -1
- package/dist/dist/BaseFileManager-BAlySv8w.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CiOJ1R3q.d.ts.map +0 -1
- package/dist/errors-C1qUEZ7A.js.map +0 -1
- package/dist/index-BVBmz_cc.js.map +0 -1
- package/dist/index-CYGWPoOx.js.map +0 -1
- package/dist/index-D0V-mjCV.js.map +0 -1
- package/dist/index-DmTtj1nk.js.map +0 -1
- package/dist/index.browser-CUmBVYen.js.map +0 -1
- package/dist/index.node-CYPemH-t.js.map +0 -1
- package/dist/tabEvents-CaVmngqr.js.map +0 -1
- package/dist/tolerantWebAccess-BJqViq08.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n as normalizeDataType, v as INTERNAL_DATA_TYPES, x as normalizePublisher, y as chunkValues, z as rowsPerInsert, B as getAllAddressesFromDb, C as loadNameMatchLevels, E as scheduleBulkFilesDownloadFromEasSync, F as isBrowser, G as emitAcrossTabs, H as findSeedRowsByUid, m as generateId, J as normalizeHexAddress, K as selectInBatches, w as writeInBatches, L as nameMatchLevels, N as getItemStoragePropertiesForModel, O as resolveItemModelFileId, Q as EAS_SEED_DATA_SYNCED_TO_DB_EVENT } from './tabEvents-
|
|
2
|
-
import { u as updateSeedRevokedAt, r as resolveModelForSyncedSeed, s as skipSeedOnAmbiguousModel } from './updateSeedRevokedAt-
|
|
1
|
+
import { n as normalizeDataType, v as INTERNAL_DATA_TYPES, x as normalizePublisher, y as chunkValues, z as rowsPerInsert, B as getAllAddressesFromDb, C as loadNameMatchLevels, E as scheduleBulkFilesDownloadFromEasSync, F as isBrowser, G as emitAcrossTabs, H as findSeedRowsByUid, m as generateId, J as normalizeHexAddress, K as selectInBatches, w as writeInBatches, L as nameMatchLevels, N as getItemStoragePropertiesForModel, O as resolveItemModelFileId, Q as EAS_SEED_DATA_SYNCED_TO_DB_EVENT } from './tabEvents-BHPY5I08.js';
|
|
2
|
+
import { u as updateSeedRevokedAt, r as resolveModelForSyncedSeed, s as skipSeedOnAmbiguousModel } from './updateSeedRevokedAt-BMwBnlnC.js';
|
|
3
3
|
import { camelCase } from 'lodash-es';
|
|
4
4
|
import { decodeEasNumber, isNumericEasType, matchEasModelSchemas, getSeedsFromSchemaUids, getItemVersionsFromEas, partitionByRefAttester, getItemPropertiesFromEas, BaseEasClient, GET_SEEDS, easName, pickLatestPropertyAttestationsByRefAndSchema, isEasEmptyValue, setSchemaUidForSchemaDefinition, isNameMatchLevel, matchEasName } from '@seedprotocol/eas';
|
|
5
5
|
import 'pluralize';
|
|
6
|
-
import { a6 as getGetAdditionalSyncAddresses, a7 as modelPropertiesToObject, a8 as listRelationEasPropertyName, a9 as easPropertyNameForPublish, aa as metadataStorageName, ab as resolveMetadataPropertyId } from './Item-
|
|
7
|
-
import { B as BaseDb, s as seeds, v as versions, m as metadata } from './BaseFileManager-
|
|
6
|
+
import { a6 as getGetAdditionalSyncAddresses, a7 as modelPropertiesToObject, a8 as listRelationEasPropertyName, a9 as easPropertyNameForPublish, aa as metadataStorageName, ab as resolveMetadataPropertyId } from './Item-CXLcIHsi.js';
|
|
7
|
+
import { B as BaseDb, s as seeds, v as versions, m as metadata } from './BaseFileManager-DLou1TZS.js';
|
|
8
8
|
import { parseEasPropertyMetadata, parseEasRelationPropertyName } from '@seedprotocol/query';
|
|
9
9
|
import { inArray, eq, and, or, isNull, ne, isNotNull } from 'drizzle-orm';
|
|
10
10
|
import '@seedprotocol/arweave';
|
|
11
|
-
import { A as waitForEasReadChain, B as assertLocalDbChain, k as localModelSchemaLookups, D as writeModelUids } from './errors-
|
|
12
|
-
import { getModelSchemasFromEas } from './eas-
|
|
11
|
+
import { A as waitForEasReadChain, B as assertLocalDbChain, k as localModelSchemaLookups, D as writeModelUids } from './errors-DpC9W4i3.js';
|
|
12
|
+
import { getModelSchemasFromEas } from './eas-DpHg66jR.js';
|
|
13
13
|
import 'debug';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -234,7 +234,7 @@ const modelSchemaForSyncedProperty = async (Model, property, state) => {
|
|
|
234
234
|
* only newly stored ones, so related seeds are refreshed (new versions, revocations) on each sync.
|
|
235
235
|
*/
|
|
236
236
|
const collectRelatedSeedUids = async (properties, state) => {
|
|
237
|
-
const _mod_0 = await import('./errors-
|
|
237
|
+
const _mod_0 = await import('./errors-DpC9W4i3.js');
|
|
238
238
|
const _ns_0 = _mod_0.a4;
|
|
239
239
|
const { Model } = _ns_0;
|
|
240
240
|
for (const property of properties) {
|
|
@@ -261,7 +261,7 @@ const collectRelatedSeedUids = async (properties, state) => {
|
|
|
261
261
|
* of HTMLPage have. A name matching no local model, or several, is kept as it is.
|
|
262
262
|
*/
|
|
263
263
|
const localModelType = async (easModelName) => {
|
|
264
|
-
const _mod_1 = await import('./errors-
|
|
264
|
+
const _mod_1 = await import('./errors-DpC9W4i3.js');
|
|
265
265
|
const _ns_1 = _mod_1.a4;
|
|
266
266
|
const { Model } = _ns_1;
|
|
267
267
|
try {
|
|
@@ -682,7 +682,7 @@ const resolveSyncedSeedModel = async (Model, modelType, seed) => {
|
|
|
682
682
|
const insertSyncedProperties = async ({ newProperties, itemSeeds, state, }) => {
|
|
683
683
|
const { seedUidToLocalId, seedUidToModelType, versionUidToLocalId, versionUidToSeedUid } = state;
|
|
684
684
|
// Dynamic import to break circular dependency
|
|
685
|
-
const _mod_2 = await import('./errors-
|
|
685
|
+
const _mod_2 = await import('./errors-DpC9W4i3.js');
|
|
686
686
|
const _ns_2 = _mod_2.a4;
|
|
687
687
|
const modelMod = _ns_2;
|
|
688
688
|
const { Model } = modelMod;
|
|
@@ -805,8 +805,8 @@ const insertSyncedProperties = async ({ newProperties, itemSeeds, state, }) => {
|
|
|
805
805
|
await appDb.insert(metadata).values(rows.slice(i, i + batchSize));
|
|
806
806
|
}
|
|
807
807
|
// A local draft of a synced property stays its value, and the conflict is recorded (ADR 0019)
|
|
808
|
-
const _mod_3 = await import('./Item-
|
|
809
|
-
const _ns_3 = _mod_3.
|
|
808
|
+
const _mod_3 = await import('./Item-CXLcIHsi.js');
|
|
809
|
+
const _ns_3 = _mod_3.b9;
|
|
810
810
|
const { keepLocalDraftsOverSyncedRows } = _ns_3;
|
|
811
811
|
await keepLocalDraftsOverSyncedRows(rows);
|
|
812
812
|
};
|
|
@@ -935,8 +935,8 @@ const runSyncFromEas = async (options) => {
|
|
|
935
935
|
// Loaded items in the browser see sync's writes through the change feed (ADR 0020); Node has none.
|
|
936
936
|
if (!isBrowser()) {
|
|
937
937
|
try {
|
|
938
|
-
const _mod_4 = await import('./Item-
|
|
939
|
-
const _ns_4 = _mod_4.
|
|
938
|
+
const _mod_4 = await import('./Item-CXLcIHsi.js');
|
|
939
|
+
const _ns_4 = _mod_4.bb;
|
|
940
940
|
const itemMod = _ns_4;
|
|
941
941
|
await itemMod.Item.rehydrateCachedItemsFromDbAfterEasSync();
|
|
942
942
|
}
|
|
@@ -948,4 +948,4 @@ const runSyncFromEas = async (options) => {
|
|
|
948
948
|
};
|
|
949
949
|
|
|
950
950
|
export { VERSION_INSERT_BATCH, runSyncFromEas };
|
|
951
|
-
//# sourceMappingURL=syncDbWithEas-
|
|
951
|
+
//# sourceMappingURL=syncDbWithEas-CDjSNrVR.js.map
|