@seedprotocol/sdk 0.7.2 → 0.7.3-next.613.g79a8dfd
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-ClCwwhwo.js → ClientManager-DDA9956Y.js} +9 -9
- package/dist/{ClientManager-ClCwwhwo.js.map → ClientManager-DDA9956Y.js.map} +1 -1
- package/dist/{Item-B9Y4VuK1.js → Item-D4FigtYS.js} +40 -40
- package/dist/{Item-B9Y4VuK1.js.map → Item-D4FigtYS.js.map} +1 -1
- package/dist/{ModelProperty-BMePcicQ.js → ModelProperty-BDt6AU2h.js} +23 -23
- package/dist/{ModelProperty-BMePcicQ.js.map → ModelProperty-BDt6AU2h.js.map} +1 -1
- package/dist/{Schema-COsEXXaR.js → Schema-B8xqLWkL.js} +28 -28
- package/dist/{Schema-COsEXXaR.js.map → Schema-B8xqLWkL.js.map} +1 -1
- package/dist/{SchemaValidationService-DabGMzSE.js → SchemaValidationService-BPxkfDLU.js} +6 -6
- package/dist/{SchemaValidationService-DabGMzSE.js.map → SchemaValidationService-BPxkfDLU.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-Ck6fumnm.js → backfillMetadataPropertyIds-DuTPcv8t.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-Ck6fumnm.js.map → backfillMetadataPropertyIds-DuTPcv8t.js.map} +1 -1
- package/dist/cjs/{ModelProperty-BT6Un_MB.js → ModelProperty-B-cZm1yU.js} +21 -21
- package/dist/cjs/{ModelProperty-BT6Un_MB.js.map → ModelProperty-B-cZm1yU.js.map} +1 -1
- package/dist/cjs/{Schema-BXhXdUsA.js → Schema-STP972Xw.js} +23 -23
- package/dist/cjs/{Schema-BXhXdUsA.js.map → Schema-STP972Xw.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-CC18QDfc.js → SchemaValidationService-CKNW1bKg.js} +2 -2
- package/dist/cjs/{SchemaValidationService-CC18QDfc.js.map → SchemaValidationService-CKNW1bKg.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-DEHC9ejq.js → backfillMetadataPropertyIds-CP3y1skt.js} +3 -3
- package/dist/cjs/{backfillMetadataPropertyIds-DEHC9ejq.js.map → backfillMetadataPropertyIds-CP3y1skt.js.map} +1 -1
- package/dist/cjs/{eas-C3CL0l7l.js → eas-CAnUC4wd.js} +3 -3
- package/dist/cjs/{eas-C3CL0l7l.js.map → eas-CAnUC4wd.js.map} +1 -1
- package/dist/cjs/{getItem-CrwWYCkj.js → getItem-CWgb3e9G.js} +2 -2
- package/dist/cjs/{getItem-CrwWYCkj.js.map → getItem-CWgb3e9G.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-DRJh7WR0.js → getPublishPayload-BsZWiJ03.js} +11 -11
- package/dist/cjs/{getPublishPayload-DRJh7WR0.js.map → getPublishPayload-BsZWiJ03.js.map} +1 -1
- package/dist/cjs/{getPublishUploads-Bh22D3zJ.js → getPublishUploads-BQr8aMVP.js} +4 -4
- package/dist/cjs/{getPublishUploads-Bh22D3zJ.js.map → getPublishUploads-BQr8aMVP.js.map} +1 -1
- package/dist/cjs/{index-BA1RIYFG.js → index-nA5PxBSs.js} +3 -3
- package/dist/cjs/index-nA5PxBSs.js.map +1 -0
- package/dist/cjs/{index-Dls7aMjr.js → index-usKaANAq.js} +79 -37
- package/dist/cjs/index-usKaANAq.js.map +1 -0
- package/dist/cjs/{property-ZerTWizX.js → property-xMwPhQ5N.js} +5 -5
- package/dist/cjs/{property-ZerTWizX.js.map → property-xMwPhQ5N.js.map} +1 -1
- package/dist/cjs/{publishDraftGraph-CPOAcQFf.js → publishDraftGraph-BRWlR1KO.js} +4 -4
- package/dist/cjs/{publishDraftGraph-CPOAcQFf.js.map → publishDraftGraph-BRWlR1KO.js.map} +1 -1
- package/dist/cjs/{resetAmbiguousLegacyItemData-adDl4LcT.js → resetAmbiguousLegacyItemData-8nfkj9rz.js} +2 -2
- package/dist/cjs/{resetAmbiguousLegacyItemData-adDl4LcT.js.map → resetAmbiguousLegacyItemData-8nfkj9rz.js.map} +1 -1
- package/dist/cjs/{resolveModelForSyncedSeed-DoNThPdL.js → resolveModelForSyncedSeed-kYRuDWYw.js} +2 -2
- package/dist/cjs/{resolveModelForSyncedSeed-DoNThPdL.js.map → resolveModelForSyncedSeed-kYRuDWYw.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-CYfPkus9.js → syncDbWithEas-DqRhV8o2.js} +7 -7
- package/dist/cjs/{syncDbWithEas-CYfPkus9.js.map → syncDbWithEas-DqRhV8o2.js.map} +1 -1
- package/dist/{configurePlatform-xU3Hsno3.js → configurePlatform-YcOiDQBZ.js} +3 -3
- package/dist/{configurePlatform-xU3Hsno3.js.map → configurePlatform-YcOiDQBZ.js.map} +1 -1
- package/dist/{db-W1g29qsM.js → db-CQt-gcAl.js} +3 -3
- package/dist/{db-W1g29qsM.js.map → db-CQt-gcAl.js.map} +1 -1
- package/dist/{eas-CSwV6MvB.js → eas-CpOD74Ke.js} +4 -4
- package/dist/{eas-CSwV6MvB.js.map → eas-CpOD74Ke.js.map} +1 -1
- package/dist/{getItem-BYQeM3DY.js → getItem-B_OoFkd7.js} +4 -4
- package/dist/{getItem-BYQeM3DY.js.map → getItem-B_OoFkd7.js.map} +1 -1
- package/dist/{getPublishPayload-D5CQZd-y.js → getPublishPayload-Xl3sRkR-.js} +14 -14
- package/dist/{getPublishPayload-D5CQZd-y.js.map → getPublishPayload-Xl3sRkR-.js.map} +1 -1
- package/dist/{getPublishUploads-BGpDsrBp.js → getPublishUploads-DHP01KgU.js} +8 -8
- package/dist/{getPublishUploads-BGpDsrBp.js.map → getPublishUploads-DHP01KgU.js.map} +1 -1
- package/dist/{index-Bev-hZF-.js → index-BGt4_oPO.js} +8 -8
- package/dist/index-BGt4_oPO.js.map +1 -0
- package/dist/{index-DRXC5Mra.js → index-Xl1_4Lmb.js} +23 -23
- package/dist/{index-DRXC5Mra.js.map → index-Xl1_4Lmb.js.map} +1 -1
- package/dist/{index.browser-DO20vYuP.js → index.browser-CjTe0vt1.js} +5 -5
- package/dist/{index.browser-DO20vYuP.js.map → index.browser-CjTe0vt1.js.map} +1 -1
- package/dist/{index.node-C4iyOhdo.js → index.node-Cfa7npS6.js} +2 -2
- package/dist/{index.node-C4iyOhdo.js.map → index.node-Cfa7npS6.js.map} +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.js +24 -24
- package/dist/node.js +9 -9
- package/dist/platform.browser.js +3 -3
- package/dist/platform.node.js +1 -1
- package/dist/{property-BT1zDSkd.js → property-BrXkY1Rg.js} +8 -8
- package/dist/{property-BT1zDSkd.js.map → property-BrXkY1Rg.js.map} +1 -1
- package/dist/{publishDraftGraph-Bcfrdj7-.js → publishDraftGraph-X0Wr9txE.js} +7 -7
- package/dist/{publishDraftGraph-Bcfrdj7-.js.map → publishDraftGraph-X0Wr9txE.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-CLlumTBq.js → resolveModelForSyncedSeed-DFVdnYq8.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-CLlumTBq.js.map → resolveModelForSyncedSeed-DFVdnYq8.js.map} +1 -1
- package/dist/src/helpers/tabLocks.d.ts +11 -1
- package/dist/src/helpers/tabLocks.d.ts.map +1 -1
- package/dist/{syncDbWithEas-BQsXjGhe.js → syncDbWithEas-BU-jZ5bJ.js} +11 -11
- package/dist/{syncDbWithEas-BQsXjGhe.js.map → syncDbWithEas-BU-jZ5bJ.js.map} +1 -1
- package/dist/{tabEvents-C9qUKx_z.js → tabEvents-BZJMY5uK.js} +49 -7
- package/dist/tabEvents-BZJMY5uK.js.map +1 -0
- package/dist/{tolerantWebAccess-B-9bwxbw.js → tolerantWebAccess-BZ2RA_mb.js} +4 -4
- package/dist/{tolerantWebAccess-B-9bwxbw.js.map → tolerantWebAccess-BZ2RA_mb.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-D6q0h7pj.js → updateSeedRevokedAt-iLpzae1i.js} +2 -2
- package/dist/{updateSeedRevokedAt-D6q0h7pj.js.map → updateSeedRevokedAt-iLpzae1i.js.map} +1 -1
- package/package.json +5 -5
- package/dist/cjs/index-BA1RIYFG.js.map +0 -1
- package/dist/cjs/index-Dls7aMjr.js.map +0 -1
- package/dist/index-Bev-hZF-.js.map +0 -1
- package/dist/tabEvents-C9qUKx_z.js.map +0 -1
|
@@ -2,13 +2,13 @@ import { waitFor, fromCallback, setup, assign, stateIn, createActor, isMachineSn
|
|
|
2
2
|
import { a as BaseDb, v as versions, m as metadata, r as seeds, s as schemas, j as models, g as modelSchemas, Z as ZERO_BYTES32, I as INTERNAL_PROPERTY_NAMES, B as BaseFileManager, D as ImageSize, p as properties, x as INTERNAL_DATA_TYPES, i as modelUids, C as INTERNAL_STORAGE_MODEL_FILE_IDS, P as PROPERTY_NAMES_EXEMPT_FROM_ID_SUFFIX_STRIP } from './BasePathResolver-BdxCSIzn.js';
|
|
3
3
|
import { or, isNull, eq, max, count, and, getTableColumns, sql, desc, inArray, isNotNull, gt } from 'drizzle-orm';
|
|
4
4
|
import pluralize from 'pluralize';
|
|
5
|
-
import { n as normalizeDataType, W as getOwnedAddressesFromDb, E as normalizeAddressList, u as normalizeHexAddress, z as getAddressesForItemsFilter, k as isDataType, s as normalizePublisher, M as ModelPropertyDataTypes, r as resolveItemModelFileId, X as getPropertyIdForSchemaFileId, o as getPropertyIdForModelAndName, l as normalizePropertyRecordSchema, m as eventEmitter } from './db-
|
|
5
|
+
import { n as normalizeDataType, W as getOwnedAddressesFromDb, E as normalizeAddressList, u as normalizeHexAddress, z as getAddressesForItemsFilter, k as isDataType, s as normalizePublisher, M as ModelPropertyDataTypes, r as resolveItemModelFileId, X as getPropertyIdForSchemaFileId, o as getPropertyIdForModelAndName, l as normalizePropertyRecordSchema, m as eventEmitter } from './db-CQt-gcAl.js';
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
import { BehaviorSubject } from 'rxjs';
|
|
8
8
|
import { startCase, upperFirst, camelCase, orderBy } from 'lodash-es';
|
|
9
9
|
import { toSnakeCase } from 'drizzle-orm/casing';
|
|
10
10
|
import { isValidEasAttestationUid, isPlaceholderUid, BaseQueryClient, BaseEasClient, GET_SCHEMAS, getEasSchemaUidForSchemaDefinition, getSchemaUidForModelFromCache, cachedSchemaLookup, setSchemaUidForModel, getEasSchemaUidForExactDefinition } from '@seedprotocol/eas';
|
|
11
|
-
import { t as toSnakeCase$1, H as getStorageTransactionIdForSeedUid, I as convertTxIdToImage, h as ensureImageLocal, J as downloadTransactionIdWithDedupe, b as generateId, K as getDataTypeFromString, M as getMimeType, N as notifyFileSaved, g as getCorrectId, a as isStorageSeedRef } from './tabEvents-
|
|
11
|
+
import { t as toSnakeCase$1, H as getStorageTransactionIdForSeedUid, I as convertTxIdToImage, h as ensureImageLocal, J as downloadTransactionIdWithDedupe, b as generateId, K as getDataTypeFromString, M as getMimeType, N as notifyFileSaved, g as getCorrectId, a as isStorageSeedRef } from './tabEvents-BZJMY5uK.js';
|
|
12
12
|
import { fetchArweaveRawTextAcrossGateways } from '@seedprotocol/arweave';
|
|
13
13
|
import { modelPropertiesToObject } from './model-DGMe-TTm.js';
|
|
14
14
|
|
|
@@ -708,7 +708,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
708
708
|
const itemPropertyMod = await Promise.resolve().then(function () { return ItemProperty$1; });
|
|
709
709
|
const { ItemProperty } = itemPropertyMod;
|
|
710
710
|
const { modelPropertiesToObject } = await import('./model-DGMe-TTm.js');
|
|
711
|
-
const _mod_0 = await import('./index-
|
|
711
|
+
const _mod_0 = await import('./index-Xl1_4Lmb.js');
|
|
712
712
|
const _ns_0 = _mod_0.f;
|
|
713
713
|
const { Model } = _ns_0;
|
|
714
714
|
// Resolve Model and build property schemas (use getByNameAsync for models not yet in cache)
|
|
@@ -726,7 +726,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
726
726
|
const schemaNameToTry = schemaName ?? model?.schemaName;
|
|
727
727
|
if (schemaNameToTry) {
|
|
728
728
|
try {
|
|
729
|
-
const _mod_1 = await import('./Schema-
|
|
729
|
+
const _mod_1 = await import('./Schema-B8xqLWkL.js');
|
|
730
730
|
const _ns_1 = _mod_1.b;
|
|
731
731
|
const { Schema } = _ns_1;
|
|
732
732
|
const schemaInstance = Schema.create(schemaNameToTry, { waitForReady: false });
|
|
@@ -742,7 +742,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
742
742
|
}
|
|
743
743
|
if (Object.keys(propertySchemas).length === 0) {
|
|
744
744
|
try {
|
|
745
|
-
const _mod_2 = await import('./ClientManager-
|
|
745
|
+
const _mod_2 = await import('./ClientManager-DDA9956Y.js');
|
|
746
746
|
const _ns_2 = _mod_2.G;
|
|
747
747
|
const { loadAllSchemasFromDb } = _ns_2;
|
|
748
748
|
const allSchemas = await loadAllSchemasFromDb();
|
|
@@ -763,7 +763,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
763
763
|
}
|
|
764
764
|
if (Object.keys(propertySchemas).length === 0) {
|
|
765
765
|
try {
|
|
766
|
-
const _mod_3 = await import('./ClientManager-
|
|
766
|
+
const _mod_3 = await import('./ClientManager-DDA9956Y.js');
|
|
767
767
|
const _ns_3 = _mod_3.G;
|
|
768
768
|
const { listCompleteSchemaFiles } = _ns_3;
|
|
769
769
|
const _mod_4 = await import('./BasePathResolver-BdxCSIzn.js');
|
|
@@ -787,7 +787,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
789
|
if (Object.keys(propertySchemas).length === 0) {
|
|
790
|
-
const schemaMod = await import('./index-
|
|
790
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
791
791
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
792
792
|
const KNOWN_MODEL_FALLBACKS = {
|
|
793
793
|
Post: {
|
|
@@ -804,7 +804,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
// Fallbacks above may return schema-file shape ({ type, model, items }); normalize to dataType/ref/refValueType.
|
|
807
|
-
const { normalizePropertyRecordSchema } = await import('./property-
|
|
807
|
+
const { normalizePropertyRecordSchema } = await import('./property-BrXkY1Rg.js');
|
|
808
808
|
propertySchemas = Object.fromEntries(Object.entries(propertySchemas).map(([name, def]) => [name, normalizePropertyRecordSchema(def)]));
|
|
809
809
|
// Collapse rows that map to the same instance key (e.g. authorIdentityIds + authors -> authors).
|
|
810
810
|
// ItemProperty.create cache does not sync propertyValue on hit; processing order would otherwise
|
|
@@ -837,7 +837,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
837
837
|
// Infer propertyRecordSchema from metadata when schema is missing (enables persistence)
|
|
838
838
|
let propSchema = propertySchemas[propertyName];
|
|
839
839
|
if (!propSchema && isRefTypeFromMeta) {
|
|
840
|
-
const schemaMod = await import('./index-
|
|
840
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
841
841
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
842
842
|
propSchema = {
|
|
843
843
|
dataType: refSeedType === 'html' ? ModelPropertyDataTypes.Html
|
|
@@ -1104,9 +1104,9 @@ const runPublish = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1104
1104
|
sendBack({ type: 'publishError', error: new Error(`Item not found for seedLocalId: ${seedLocalId}`) });
|
|
1105
1105
|
return;
|
|
1106
1106
|
}
|
|
1107
|
-
const getPublishUploadsMod = await import('./getPublishUploads-
|
|
1107
|
+
const getPublishUploadsMod = await import('./getPublishUploads-DHP01KgU.js');
|
|
1108
1108
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
1109
|
-
const _mod_5 = await import('./getPublishPayload-
|
|
1109
|
+
const _mod_5 = await import('./getPublishPayload-Xl3sRkR-.js');
|
|
1110
1110
|
const _ns_5 = _mod_5.g;
|
|
1111
1111
|
const getPublishPayloadMod = _ns_5;
|
|
1112
1112
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
@@ -1807,7 +1807,7 @@ const getItemsData = async ({ modelName, modelFileId, schemaName, deleted, inclu
|
|
|
1807
1807
|
conditions.push(eq(seeds.type, toSnakeCase(modelName)));
|
|
1808
1808
|
}
|
|
1809
1809
|
if (!modelFileId && schemaName && modelName) {
|
|
1810
|
-
const _mod_6 = await import('./db-
|
|
1810
|
+
const _mod_6 = await import('./db-CQt-gcAl.js');
|
|
1811
1811
|
const _ns_6 = _mod_6.Y;
|
|
1812
1812
|
const { resolveModelRecord } = _ns_6;
|
|
1813
1813
|
modelFileId = (await resolveModelRecord(modelName, { schemaName }))?.schemaFileId ?? undefined;
|
|
@@ -2090,7 +2090,7 @@ const resolveRelatedValue = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2090
2090
|
const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, populatedFromDb, schemaUid, } = context;
|
|
2091
2091
|
const _resolveRelatedValue = async () => {
|
|
2092
2092
|
// Use dynamic import to break circular dependency
|
|
2093
|
-
const schemaMod = await import('./index-
|
|
2093
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
2094
2094
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
2095
2095
|
if (!propertyValue || !isRelation || populatedFromDb) {
|
|
2096
2096
|
return;
|
|
@@ -2525,7 +2525,7 @@ async function readHtmlBodyFromChildStorageArweave(seedLocalId) {
|
|
|
2525
2525
|
/* offline / bad tx id */
|
|
2526
2526
|
}
|
|
2527
2527
|
try {
|
|
2528
|
-
const _mod_7 = await import('./tabEvents-
|
|
2528
|
+
const _mod_7 = await import('./tabEvents-BZJMY5uK.js');
|
|
2529
2529
|
const _ns_7 = _mod_7.O;
|
|
2530
2530
|
const { downloadTransactionIdWithDedupe } = _ns_7;
|
|
2531
2531
|
await downloadTransactionIdWithDedupe(txId);
|
|
@@ -2586,7 +2586,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2586
2586
|
// to use dynamically imported ModelPropertyDataTypes
|
|
2587
2587
|
const _hydrateFromDb = async () => {
|
|
2588
2588
|
// Use dynamic import to break circular dependency
|
|
2589
|
-
const schemaMod = await import('./index-
|
|
2589
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
2590
2590
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
2591
2591
|
const appDb = BaseDb.getAppDb();
|
|
2592
2592
|
const whereClauses = [];
|
|
@@ -2865,11 +2865,11 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2865
2865
|
const modelNameForNew = context.modelName;
|
|
2866
2866
|
if (modelNameForNew) {
|
|
2867
2867
|
try {
|
|
2868
|
-
const _mod_8 = await import('./index-
|
|
2868
|
+
const _mod_8 = await import('./index-Xl1_4Lmb.js');
|
|
2869
2869
|
const _ns_8 = _mod_8.f;
|
|
2870
2870
|
const { Model } = _ns_8;
|
|
2871
2871
|
const { modelPropertiesToObject } = await import('./model-DGMe-TTm.js');
|
|
2872
|
-
const _mod_9 = await import('./db-
|
|
2872
|
+
const _mod_9 = await import('./db-CQt-gcAl.js');
|
|
2873
2873
|
const _ns_9 = _mod_9.Y;
|
|
2874
2874
|
const { resolveItemModelFileId } = _ns_9;
|
|
2875
2875
|
const normalizedModelName = upperFirst(camelCase(modelNameForNew));
|
|
@@ -2923,7 +2923,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2923
2923
|
// It ends up in the context below, and later lookups by name (Model.getByName) can't match it.
|
|
2924
2924
|
const modelName = context.modelName || (metadataRecord.modelType ? upperFirst(camelCase(metadataRecord.modelType)) : undefined);
|
|
2925
2925
|
// Model names are only unique per schema: pin lookups to the item's own model row.
|
|
2926
|
-
const _mod_10 = await import('./db-
|
|
2926
|
+
const _mod_10 = await import('./db-CQt-gcAl.js');
|
|
2927
2927
|
const _ns_10 = _mod_10.Y;
|
|
2928
2928
|
const { resolveItemModelFileId, resolveModelRecord } = _ns_10;
|
|
2929
2929
|
const modelFileId = await resolveItemModelFileId({
|
|
@@ -2969,7 +2969,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2969
2969
|
};
|
|
2970
2970
|
// Merge with schema from file/DB to get validation rules (enum, pattern, etc.) - properties table doesn't store these
|
|
2971
2971
|
try {
|
|
2972
|
-
const { getPropertySchema } = await import('./property-
|
|
2972
|
+
const { getPropertySchema } = await import('./property-BrXkY1Rg.js');
|
|
2973
2973
|
let schemaFromFile = await getPropertySchema(normalizedModelName, propertyName, {
|
|
2974
2974
|
modelFileId: modelRecord?.schemaFileId ?? modelFileId,
|
|
2975
2975
|
});
|
|
@@ -3019,7 +3019,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
3019
3019
|
}
|
|
3020
3020
|
if (!propertyRecordSchema && modelName) {
|
|
3021
3021
|
try {
|
|
3022
|
-
const _mod_13 = await import('./index-
|
|
3022
|
+
const _mod_13 = await import('./index-Xl1_4Lmb.js');
|
|
3023
3023
|
const _ns_13 = _mod_13.f;
|
|
3024
3024
|
const { Model } = _ns_13;
|
|
3025
3025
|
const { modelPropertiesToObject } = await import('./model-DGMe-TTm.js');
|
|
@@ -3396,9 +3396,9 @@ const analyzeInput = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
3396
3396
|
}
|
|
3397
3397
|
const _analyzeInput = async () => {
|
|
3398
3398
|
// Use dynamic import to break circular dependency
|
|
3399
|
-
const schemaMod = await import('./index-
|
|
3399
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
3400
3400
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
3401
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
3401
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-BPxkfDLU.js');
|
|
3402
3402
|
let propertyName = propertyNameRaw;
|
|
3403
3403
|
if (!propertyName) {
|
|
3404
3404
|
throw new Error('propertyName is required');
|
|
@@ -3688,7 +3688,7 @@ const createMetadata = async (metadataValues, propertyRecordSchema, options) =>
|
|
|
3688
3688
|
propertyRecordSchema?.validation &&
|
|
3689
3689
|
metadataValues.propertyValue != null &&
|
|
3690
3690
|
metadataValues.propertyValue !== '') {
|
|
3691
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
3691
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-BPxkfDLU.js');
|
|
3692
3692
|
const validationService = new SchemaValidationService();
|
|
3693
3693
|
const validationResult = validationService.validatePropertyValue(metadataValues.propertyValue, normalizeDataType(propertyRecordSchema.dataType), propertyRecordSchema.validation, propertyRecordSchema.refValueType
|
|
3694
3694
|
? normalizeDataType(String(propertyRecordSchema.refValueType))
|
|
@@ -4270,7 +4270,7 @@ const saveRelation = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
4270
4270
|
}
|
|
4271
4271
|
const _saveRelation = async () => {
|
|
4272
4272
|
// Use dynamic import to break circular dependency
|
|
4273
|
-
const schemaMod = await import('./index-
|
|
4273
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
4274
4274
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
4275
4275
|
if (!propertyNameRaw) {
|
|
4276
4276
|
throw new Error('propertyName is required');
|
|
@@ -4834,10 +4834,10 @@ const getPropertyData = async ({ propertyName, seedLocalId, seedUid, modelName,
|
|
|
4834
4834
|
let names = [...getMetadataPropertyNamesForQuery(propertyName)];
|
|
4835
4835
|
if (modelName) {
|
|
4836
4836
|
try {
|
|
4837
|
-
const _mod_14 = await import('./index-
|
|
4837
|
+
const _mod_14 = await import('./index-Xl1_4Lmb.js');
|
|
4838
4838
|
const _ns_14 = _mod_14.f;
|
|
4839
4839
|
const { Model } = _ns_14;
|
|
4840
|
-
const _mod_15 = await import('./db-
|
|
4840
|
+
const _mod_15 = await import('./db-CQt-gcAl.js');
|
|
4841
4841
|
const _ns_15 = _mod_15.Y;
|
|
4842
4842
|
const { resolveItemModelFileId } = _ns_15;
|
|
4843
4843
|
// Model names are only unique per schema: use the seed's own model when it is recorded.
|
|
@@ -5028,7 +5028,7 @@ const HTML_PROP_SEED_UID_RE = /^0x[a-fA-F0-9]{64}$/;
|
|
|
5028
5028
|
*/
|
|
5029
5029
|
const resolvePropertyRecordSchemaFromSchemaData = async (modelName, propertyName, modelType, schemaName) => {
|
|
5030
5030
|
try {
|
|
5031
|
-
const _mod_16 = await import('./ClientManager-
|
|
5031
|
+
const _mod_16 = await import('./ClientManager-DDA9956Y.js');
|
|
5032
5032
|
const _ns_16 = _mod_16.G;
|
|
5033
5033
|
const { loadAllSchemasFromDb } = _ns_16;
|
|
5034
5034
|
const allSchemas = await loadAllSchemasFromDb();
|
|
@@ -5082,11 +5082,11 @@ hints = {}) => {
|
|
|
5082
5082
|
return undefined;
|
|
5083
5083
|
}
|
|
5084
5084
|
try {
|
|
5085
|
-
const _mod_17 = await import('./index-
|
|
5085
|
+
const _mod_17 = await import('./index-Xl1_4Lmb.js');
|
|
5086
5086
|
const _ns_17 = _mod_17.f;
|
|
5087
5087
|
const { Model } = _ns_17;
|
|
5088
5088
|
const { modelPropertiesToObject } = await import('./model-DGMe-TTm.js');
|
|
5089
|
-
const _mod_18 = await import('./db-
|
|
5089
|
+
const _mod_18 = await import('./db-CQt-gcAl.js');
|
|
5090
5090
|
const _ns_18 = _mod_18.Y;
|
|
5091
5091
|
const { resolveItemModelFileId } = _ns_18;
|
|
5092
5092
|
const modelFileId = await resolveItemModelFileId(hints);
|
|
@@ -5246,7 +5246,7 @@ class ItemProperty {
|
|
|
5246
5246
|
return;
|
|
5247
5247
|
}
|
|
5248
5248
|
// Use dynamic import to break circular dependency
|
|
5249
|
-
const schemaMod = await import('./index-
|
|
5249
|
+
const schemaMod = await import('./index-BGt4_oPO.js');
|
|
5250
5250
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
5251
5251
|
const { context } = snapshot;
|
|
5252
5252
|
const { propertyRecordSchema } = context;
|
|
@@ -5633,7 +5633,7 @@ class ItemProperty {
|
|
|
5633
5633
|
const ctx = this._service.getSnapshot().context;
|
|
5634
5634
|
let modelFileId;
|
|
5635
5635
|
try {
|
|
5636
|
-
const _mod_20 = await import('./db-
|
|
5636
|
+
const _mod_20 = await import('./db-CQt-gcAl.js');
|
|
5637
5637
|
const _ns_20 = _mod_20.Y;
|
|
5638
5638
|
const { resolveItemModelFileId } = _ns_20;
|
|
5639
5639
|
modelFileId = await resolveItemModelFileId({
|
|
@@ -5996,7 +5996,7 @@ class ItemProperty {
|
|
|
5996
5996
|
const propertiesData = await getItemProperties({ seedLocalId, seedUid });
|
|
5997
5997
|
const instances = [];
|
|
5998
5998
|
const seenNormalized = new Set();
|
|
5999
|
-
const _mod_21 = await import('./db-
|
|
5999
|
+
const _mod_21 = await import('./db-CQt-gcAl.js');
|
|
6000
6000
|
const _ns_21 = _mod_21.Y;
|
|
6001
6001
|
const { resolveItemModelFileId } = _ns_21;
|
|
6002
6002
|
const itemModelFileId = await resolveItemModelFileId({ seedLocalId, seedUid });
|
|
@@ -6014,7 +6014,7 @@ class ItemProperty {
|
|
|
6014
6014
|
}
|
|
6015
6015
|
else if (baseName) {
|
|
6016
6016
|
try {
|
|
6017
|
-
const _mod_22 = await import('./index-
|
|
6017
|
+
const _mod_22 = await import('./index-Xl1_4Lmb.js');
|
|
6018
6018
|
const _ns_22 = _mod_22.f;
|
|
6019
6019
|
const { Model } = _ns_22;
|
|
6020
6020
|
const { modelPropertiesToObject } = await import('./model-DGMe-TTm.js');
|
|
@@ -6031,7 +6031,7 @@ class ItemProperty {
|
|
|
6031
6031
|
}
|
|
6032
6032
|
if (modelName && propertyName) {
|
|
6033
6033
|
try {
|
|
6034
|
-
const _mod_23 = await import('./index-
|
|
6034
|
+
const _mod_23 = await import('./index-Xl1_4Lmb.js');
|
|
6035
6035
|
const _ns_23 = _mod_23.f;
|
|
6036
6036
|
const { Model } = _ns_23;
|
|
6037
6037
|
const { modelPropertiesToObject } = await import('./model-DGMe-TTm.js');
|
|
@@ -6399,7 +6399,7 @@ const createNewItem = async ({ modelName, modelFileId, ...propertyData }) => {
|
|
|
6399
6399
|
}
|
|
6400
6400
|
const seedType = toSnakeCase(modelName);
|
|
6401
6401
|
// Dynamic import to break circular dependency
|
|
6402
|
-
const _mod_25 = await import('./index-
|
|
6402
|
+
const _mod_25 = await import('./index-Xl1_4Lmb.js');
|
|
6403
6403
|
const _ns_25 = _mod_25.f;
|
|
6404
6404
|
const modelMod = _ns_25;
|
|
6405
6405
|
const { Model } = modelMod;
|
|
@@ -6557,7 +6557,7 @@ const getModel = () => {
|
|
|
6557
6557
|
// the fragile `import(...).then(n => n.X)` chunk-namespace pattern.
|
|
6558
6558
|
if (!modelImportPromise) {
|
|
6559
6559
|
modelImportPromise = (async () => {
|
|
6560
|
-
const _mod_26 = await import('./index-
|
|
6560
|
+
const _mod_26 = await import('./index-Xl1_4Lmb.js');
|
|
6561
6561
|
const _ns_26 = _mod_26.f;
|
|
6562
6562
|
const mod = _ns_26;
|
|
6563
6563
|
ModelClass = mod.Model;
|
|
@@ -6706,12 +6706,12 @@ class Item {
|
|
|
6706
6706
|
};
|
|
6707
6707
|
this.getPublishUploads = async (options) => {
|
|
6708
6708
|
// Use dynamic import to break circular dependency
|
|
6709
|
-
const getPublishUploadsMod = await import('./getPublishUploads-
|
|
6709
|
+
const getPublishUploadsMod = await import('./getPublishUploads-DHP01KgU.js');
|
|
6710
6710
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
6711
6711
|
return await getPublishUploads(this, [], undefined, options);
|
|
6712
6712
|
};
|
|
6713
6713
|
this.getPublishPayload = async (uploadedTransactions, options) => {
|
|
6714
|
-
const _mod_27 = await import('./getPublishPayload-
|
|
6714
|
+
const _mod_27 = await import('./getPublishPayload-Xl3sRkR-.js');
|
|
6715
6715
|
const _ns_27 = _mod_27.g;
|
|
6716
6716
|
const getPublishPayloadMod = _ns_27;
|
|
6717
6717
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
@@ -7246,7 +7246,7 @@ class Item {
|
|
|
7246
7246
|
const db = BaseDb.getAppDb();
|
|
7247
7247
|
if (db && props.modelName) {
|
|
7248
7248
|
// Model names are only unique per schema: resolve the exact models row from the most specific scope.
|
|
7249
|
-
const _mod_28 = await import('./db-
|
|
7249
|
+
const _mod_28 = await import('./db-CQt-gcAl.js');
|
|
7250
7250
|
const _ns_28 = _mod_28.Y;
|
|
7251
7251
|
const { resolveModelRecord } = _ns_28;
|
|
7252
7252
|
const modelRecord = await resolveModelRecord(props.modelName, {
|
|
@@ -8422,4 +8422,4 @@ var Item$1 = /*#__PURE__*/Object.freeze({
|
|
|
8422
8422
|
});
|
|
8423
8423
|
|
|
8424
8424
|
export { getRevokeExecutor as A, getUploadExecutor as B, ClientManagerState as C, getVersionData$1 as D, isItemOwned as E, isLocalUnsealedDraft as F, isSeedRowOwned as G, ownedPublisherSql as H, Item as I, pickLatestMetadataRowPerProperty as J, propertyMachine as K, publisherInAddressListSql as L, METADATA_LATEST_FIRST_ORDER_SQL as M, publisherIsInOwnedSet as N, setAdditionalSyncAddresses as O, setGetPublisherForNewSeeds as P, setRevokeExecutor as Q, setUploadExecutor as R, getInvariantSafePropertyDescriptor as S, clearDestroySubscriptions as T, unloadEntity as U, ClientManagerEvents as V, resolvePublisherFromSeedRow as W, getPropertyData$1 as X, Item$1 as Y, getEasSchemaUidForModel as a, getLatestPublishedVersionRow as b, chunkValues as c, rowsPerInsert as d, getGetAdditionalSyncAddresses as e, ItemProperty as f, getItemData as g, ItemPropertySaveValidationError as h, isVersionRevoked as i, waitForEntityIdle as j, createReactiveProxy as k, listRelationEasPropertyName as l, findEntity as m, forceRemoveFromCaches as n, runDestroyLifecycle as o, parseListPropertyValueFromStorage as p, compareMetadataRowsLatestFirst as q, resolveStorageNameToSchemaName as r, selectInBatches as s, isPublishedMetadataRow as t, MachineIds as u, createNewItem as v, writeInBatches as w, getEasSchemaForItemProperty as x, getGetPublisherForNewSeeds as y, getMetadataLatest as z };
|
|
8425
|
-
//# sourceMappingURL=Item-
|
|
8425
|
+
//# sourceMappingURL=Item-D4FigtYS.js.map
|