@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,5 +1,5 @@
|
|
|
1
1
|
import { waitFor, fromCallback, setup, assign, stateIn, createActor, isMachineSnapshot } from 'xstate';
|
|
2
|
-
import { B as BaseDb, F as versions, m as metadata, C as seeds, G as resolveStorageNameToSchemaName, a$ as toSchemaPropertyName, i as isDataType, A as schemas, t as models, r as modelSchemas, aZ as getOwnedAddressesFromDb, a2 as ZERO_BYTES32, aF as normalizeAddressList, aj as normalizeHexAddress, aC as getAddressesForItemsFilter, a6 as INTERNAL_PROPERTY_NAMES, b0 as easSchemaDefinitionForProperty, h as BaseFileManager, b1 as getStorageTransactionIdForSeedUid, b2 as convertTxIdToImage, ae as normalizePublisher, n as normalizeDataType, b3 as getMetadataPropertyNamesForQuery, aB as ensureImageLocal, at as ImageSize, b4 as downloadTransactionIdWithDedupe, b5 as resolveMetadataRecord, v as properties, M as ModelPropertyDataTypes, ai as generateId, a9 as INTERNAL_DATA_TYPES, s as modelUids, aa as listRelationEasPropertyName, ab as easPropertyNameForPublish, L as resolveItemModelFileId, b6 as getPropertyIdForSchemaFileId, K as getPropertyIdForModelAndName, ak as toMetadataPropertyName, b7 as getDataTypeFromString, b8 as getMimeType, X as INTERNAL_STORAGE_MODEL_FILE_IDS, $ as getItemStorageSubdir, a0 as getItemStorageLocalFileName, g as normalizePropertyRecordSchema, b9 as listRelationStoragePropertyName, ba as PROPERTY_NAMES_EXEMPT_FROM_ID_SUFFIX_STRIP, Q as getCorrectId, I as eventEmitter, bb as getAlternatePropertyNameForInstanceLookup, a7 as isStorageSeedRef } from './index-
|
|
2
|
+
import { B as BaseDb, F as versions, m as metadata, C as seeds, G as resolveStorageNameToSchemaName, a$ as toSchemaPropertyName, i as isDataType, A as schemas, t as models, r as modelSchemas, aZ as getOwnedAddressesFromDb, a2 as ZERO_BYTES32, aF as normalizeAddressList, aj as normalizeHexAddress, aC as getAddressesForItemsFilter, a6 as INTERNAL_PROPERTY_NAMES, b0 as easSchemaDefinitionForProperty, h as BaseFileManager, b1 as getStorageTransactionIdForSeedUid, b2 as convertTxIdToImage, ae as normalizePublisher, n as normalizeDataType, b3 as getMetadataPropertyNamesForQuery, aB as ensureImageLocal, at as ImageSize, b4 as downloadTransactionIdWithDedupe, b5 as resolveMetadataRecord, v as properties, M as ModelPropertyDataTypes, ai as generateId, a9 as INTERNAL_DATA_TYPES, s as modelUids, aa as listRelationEasPropertyName, ab as easPropertyNameForPublish, L as resolveItemModelFileId, b6 as getPropertyIdForSchemaFileId, K as getPropertyIdForModelAndName, ak as toMetadataPropertyName, b7 as getDataTypeFromString, b8 as getMimeType, X as INTERNAL_STORAGE_MODEL_FILE_IDS, $ as getItemStorageSubdir, a0 as getItemStorageLocalFileName, g as normalizePropertyRecordSchema, b9 as listRelationStoragePropertyName, ba as PROPERTY_NAMES_EXEMPT_FROM_ID_SUFFIX_STRIP, Q as getCorrectId, I as eventEmitter, bb as getAlternatePropertyNameForInstanceLookup, a7 as isStorageSeedRef } from './index-DpgQMIRq.js';
|
|
3
3
|
import { or, isNull, eq, max, count, and, getTableColumns, sql, desc, inArray, gt, isNotNull } from 'drizzle-orm';
|
|
4
4
|
import pluralize from 'pluralize';
|
|
5
5
|
import debug from 'debug';
|
|
@@ -7,7 +7,7 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
7
7
|
import { startCase, upperFirst, camelCase, orderBy } from 'lodash-es';
|
|
8
8
|
import { isValidEasAttestationUid, easName, isPlaceholderUid, BaseQueryClient, BaseEasClient, GET_SCHEMAS, getEasSchemaUidForSchemaDefinition, getSchemaUidForModelFromCache, setSchemaUidForModel, cachedSchemaLookup, getEasSchemaUidForExactDefinition } from '@seedprotocol/eas';
|
|
9
9
|
import { fetchArweaveRawTextAcrossGateways } from '@seedprotocol/arweave';
|
|
10
|
-
import { d as notifyFileSaved, f as withTabLock } from './tabEvents-
|
|
10
|
+
import { d as notifyFileSaved, f as withTabLock } from './tabEvents-DksXwk3X.js';
|
|
11
11
|
import { modelPropertiesToObject } from './model-oHA3YhOd.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -580,7 +580,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
580
580
|
const itemPropertyMod = await Promise.resolve().then(function () { return ItemProperty$1; });
|
|
581
581
|
const { ItemProperty } = itemPropertyMod;
|
|
582
582
|
const { modelPropertiesToObject } = await import('./model-oHA3YhOd.js');
|
|
583
|
-
const _mod_0 = await import('./errors-
|
|
583
|
+
const _mod_0 = await import('./errors-KM-yq2MD.js');
|
|
584
584
|
const _ns_0 = _mod_0.j;
|
|
585
585
|
const { Model } = _ns_0;
|
|
586
586
|
// Resolve Model and build property schemas (use getByNameAsync for models not yet in cache)
|
|
@@ -598,7 +598,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
598
598
|
const schemaNameToTry = schemaName ?? model?.schemaName;
|
|
599
599
|
if (schemaNameToTry) {
|
|
600
600
|
try {
|
|
601
|
-
const _mod_1 = await import('./Schema-
|
|
601
|
+
const _mod_1 = await import('./Schema-O1QLoXv6.js');
|
|
602
602
|
const _ns_1 = _mod_1.b;
|
|
603
603
|
const { Schema } = _ns_1;
|
|
604
604
|
const schemaInstance = Schema.create(schemaNameToTry, { waitForReady: false });
|
|
@@ -614,7 +614,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
614
614
|
}
|
|
615
615
|
if (Object.keys(propertySchemas).length === 0) {
|
|
616
616
|
try {
|
|
617
|
-
const _mod_2 = await import('./ClientManager-
|
|
617
|
+
const _mod_2 = await import('./ClientManager-2GtDWHq6.js');
|
|
618
618
|
const _ns_2 = _mod_2.N;
|
|
619
619
|
const { loadAllSchemasFromDb } = _ns_2;
|
|
620
620
|
const allSchemas = await loadAllSchemasFromDb();
|
|
@@ -635,10 +635,10 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
635
635
|
}
|
|
636
636
|
if (Object.keys(propertySchemas).length === 0) {
|
|
637
637
|
try {
|
|
638
|
-
const _mod_3 = await import('./ClientManager-
|
|
638
|
+
const _mod_3 = await import('./ClientManager-2GtDWHq6.js');
|
|
639
639
|
const _ns_3 = _mod_3.N;
|
|
640
640
|
const { listCompleteSchemaFiles } = _ns_3;
|
|
641
|
-
const _mod_4 = await import('./index-
|
|
641
|
+
const _mod_4 = await import('./index-DpgQMIRq.js');
|
|
642
642
|
const _ns_4 = _mod_4.be;
|
|
643
643
|
const { BaseFileManager } = _ns_4;
|
|
644
644
|
const schemaFiles = await listCompleteSchemaFiles();
|
|
@@ -659,7 +659,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
if (Object.keys(propertySchemas).length === 0) {
|
|
662
|
-
const schemaMod = await import('./index-
|
|
662
|
+
const schemaMod = await import('./index-BAao3_Po.js');
|
|
663
663
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
664
664
|
const KNOWN_MODEL_FALLBACKS = {
|
|
665
665
|
Post: {
|
|
@@ -676,7 +676,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
// Fallbacks above may return schema-file shape ({ type, model, items }); normalize to dataType/ref/refValueType.
|
|
679
|
-
const { normalizePropertyRecordSchema } = await import('./property-
|
|
679
|
+
const { normalizePropertyRecordSchema } = await import('./property-BDBvImLs.js');
|
|
680
680
|
propertySchemas = Object.fromEntries(Object.entries(propertySchemas).map(([name, def]) => [name, normalizePropertyRecordSchema(def)]));
|
|
681
681
|
// Collapse rows that map to the same instance key (e.g. authorIdentityIds + authors -> authors).
|
|
682
682
|
// ItemProperty.create cache does not sync propertyValue on hit; processing order would otherwise
|
|
@@ -709,7 +709,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
709
709
|
// Infer propertyRecordSchema from metadata when schema is missing (enables persistence)
|
|
710
710
|
let propSchema = propertySchemas[propertyName];
|
|
711
711
|
if (!propSchema && isRefTypeFromMeta) {
|
|
712
|
-
const schemaMod = await import('./index-
|
|
712
|
+
const schemaMod = await import('./index-BAao3_Po.js');
|
|
713
713
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
714
714
|
propSchema = {
|
|
715
715
|
dataType: refSeedType === 'html' ? ModelPropertyDataTypes.Html
|
|
@@ -1715,7 +1715,7 @@ const getItemsData = async ({ modelName, modelFileId, schemaName, deleted, inclu
|
|
|
1715
1715
|
conditions.push(eq(seeds.type, easName(modelName)));
|
|
1716
1716
|
}
|
|
1717
1717
|
if (!modelFileId && schemaName && modelName) {
|
|
1718
|
-
const _mod_5 = await import('./index-
|
|
1718
|
+
const _mod_5 = await import('./index-DpgQMIRq.js');
|
|
1719
1719
|
const _ns_5 = _mod_5.bh;
|
|
1720
1720
|
const { resolveModelRecord } = _ns_5;
|
|
1721
1721
|
modelFileId = (await resolveModelRecord(modelName, { schemaName }))?.schemaFileId ?? undefined;
|
|
@@ -2001,7 +2001,7 @@ const resolveRelatedValue = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2001
2001
|
const { isRelation, propertyValue, propertyName, propertyRecordSchema, populatedFromDb, } = context;
|
|
2002
2002
|
const _resolveRelatedValue = async () => {
|
|
2003
2003
|
// Use dynamic import to break circular dependency
|
|
2004
|
-
const schemaMod = await import('./index-
|
|
2004
|
+
const schemaMod = await import('./index-BAao3_Po.js');
|
|
2005
2005
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
2006
2006
|
if (!propertyValue || !isRelation || populatedFromDb) {
|
|
2007
2007
|
return;
|
|
@@ -2436,7 +2436,7 @@ async function readHtmlBodyFromChildStorageArweave(seedLocalId) {
|
|
|
2436
2436
|
/* offline / bad tx id */
|
|
2437
2437
|
}
|
|
2438
2438
|
try {
|
|
2439
|
-
const _mod_6 = await import('./index-
|
|
2439
|
+
const _mod_6 = await import('./index-DpgQMIRq.js');
|
|
2440
2440
|
const _ns_6 = _mod_6.bj;
|
|
2441
2441
|
const { downloadTransactionIdWithDedupe } = _ns_6;
|
|
2442
2442
|
await downloadTransactionIdWithDedupe(txId);
|
|
@@ -2497,7 +2497,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2497
2497
|
// to use dynamically imported ModelPropertyDataTypes
|
|
2498
2498
|
const _hydrateFromDb = async () => {
|
|
2499
2499
|
// Use dynamic import to break circular dependency
|
|
2500
|
-
const schemaMod = await import('./index-
|
|
2500
|
+
const schemaMod = await import('./index-BAao3_Po.js');
|
|
2501
2501
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
2502
2502
|
const appDb = BaseDb.getAppDb();
|
|
2503
2503
|
const whereClauses = [];
|
|
@@ -2779,11 +2779,11 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2779
2779
|
const modelNameForNew = context.modelName;
|
|
2780
2780
|
if (modelNameForNew) {
|
|
2781
2781
|
try {
|
|
2782
|
-
const _mod_7 = await import('./errors-
|
|
2782
|
+
const _mod_7 = await import('./errors-KM-yq2MD.js');
|
|
2783
2783
|
const _ns_7 = _mod_7.j;
|
|
2784
2784
|
const { Model } = _ns_7;
|
|
2785
2785
|
const { modelPropertiesToObject } = await import('./model-oHA3YhOd.js');
|
|
2786
|
-
const _mod_8 = await import('./index-
|
|
2786
|
+
const _mod_8 = await import('./index-DpgQMIRq.js');
|
|
2787
2787
|
const _ns_8 = _mod_8.bh;
|
|
2788
2788
|
const { resolveItemModelFileId } = _ns_8;
|
|
2789
2789
|
const normalizedModelName = upperFirst(camelCase(modelNameForNew));
|
|
@@ -2837,7 +2837,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2837
2837
|
// It ends up in the context below, and later lookups by name (Model.getByName) can't match it.
|
|
2838
2838
|
const modelName = context.modelName || (metadataRecord.modelType ? upperFirst(camelCase(metadataRecord.modelType)) : undefined);
|
|
2839
2839
|
// Model names are only unique per schema: pin lookups to the item's own model row.
|
|
2840
|
-
const _mod_9 = await import('./index-
|
|
2840
|
+
const _mod_9 = await import('./index-DpgQMIRq.js');
|
|
2841
2841
|
const _ns_9 = _mod_9.bh;
|
|
2842
2842
|
const { resolveItemModelFileId, resolveModelRecord } = _ns_9;
|
|
2843
2843
|
const modelFileId = await resolveItemModelFileId({
|
|
@@ -2882,7 +2882,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2882
2882
|
required: propRecord.required ?? undefined,
|
|
2883
2883
|
};
|
|
2884
2884
|
// Validation rules (enum, pattern, ...) aren't in the properties table
|
|
2885
|
-
const { resolvePropertyValidationRules } = await import('./propertyValidationRules-
|
|
2885
|
+
const { resolvePropertyValidationRules } = await import('./propertyValidationRules-BlfLn4rP.js');
|
|
2886
2886
|
const validation = await resolvePropertyValidationRules(normalizedModelName, propertyName, {
|
|
2887
2887
|
modelFileId: modelRecord?.schemaFileId ?? modelFileId,
|
|
2888
2888
|
});
|
|
@@ -2900,7 +2900,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
2900
2900
|
// Fix 1: Fallback to in-memory Model when DB doesn't have model/properties yet (e.g. runtime-created model)
|
|
2901
2901
|
if (!propertyRecordSchema && modelName) {
|
|
2902
2902
|
try {
|
|
2903
|
-
const _mod_10 = await import('./errors-
|
|
2903
|
+
const _mod_10 = await import('./errors-KM-yq2MD.js');
|
|
2904
2904
|
const _ns_10 = _mod_10.j;
|
|
2905
2905
|
const { Model } = _ns_10;
|
|
2906
2906
|
const { modelPropertiesToObject } = await import('./model-oHA3YhOd.js');
|
|
@@ -3389,9 +3389,9 @@ const analyzeInput = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
3389
3389
|
return false;
|
|
3390
3390
|
}
|
|
3391
3391
|
// Use dynamic import to break circular dependency
|
|
3392
|
-
const schemaMod = await import('./index-
|
|
3392
|
+
const schemaMod = await import('./index-BAao3_Po.js');
|
|
3393
3393
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
3394
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
3394
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
3395
3395
|
const propertyName = propertyNameRaw;
|
|
3396
3396
|
if (!propertyName) {
|
|
3397
3397
|
throw new Error('propertyName is required');
|
|
@@ -3704,7 +3704,7 @@ const createMetadata = async (metadataValues, propertyRecordSchema, options) =>
|
|
|
3704
3704
|
propertyRecordSchema?.validation &&
|
|
3705
3705
|
metadataValues.propertyValue != null &&
|
|
3706
3706
|
metadataValues.propertyValue !== '') {
|
|
3707
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
3707
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
3708
3708
|
const validationService = new SchemaValidationService();
|
|
3709
3709
|
const validationResult = validationService.validatePropertyValue(metadataValues.propertyValue, normalizeDataType(propertyRecordSchema.dataType), propertyRecordSchema.validation, propertyRecordSchema.refValueType
|
|
3710
3710
|
? normalizeDataType(String(propertyRecordSchema.refValueType))
|
|
@@ -4919,10 +4919,10 @@ const getPropertyData = async ({ propertyName, seedLocalId, seedUid, modelName,
|
|
|
4919
4919
|
let names = [...getMetadataPropertyNamesForQuery(propertyName)];
|
|
4920
4920
|
if (modelName) {
|
|
4921
4921
|
try {
|
|
4922
|
-
const _mod_11 = await import('./errors-
|
|
4922
|
+
const _mod_11 = await import('./errors-KM-yq2MD.js');
|
|
4923
4923
|
const _ns_11 = _mod_11.j;
|
|
4924
4924
|
const { Model } = _ns_11;
|
|
4925
|
-
const _mod_12 = await import('./index-
|
|
4925
|
+
const _mod_12 = await import('./index-DpgQMIRq.js');
|
|
4926
4926
|
const _ns_12 = _mod_12.bh;
|
|
4927
4927
|
const { resolveItemModelFileId } = _ns_12;
|
|
4928
4928
|
// Model names are only unique per schema: use the seed's own model when it is recorded.
|
|
@@ -5123,7 +5123,7 @@ const HTML_PROP_SEED_UID_RE = /^0x[a-fA-F0-9]{64}$/;
|
|
|
5123
5123
|
*/
|
|
5124
5124
|
const resolvePropertyRecordSchemaFromSchemaData = async (modelName, propertyName, modelType, schemaName) => {
|
|
5125
5125
|
try {
|
|
5126
|
-
const _mod_13 = await import('./ClientManager-
|
|
5126
|
+
const _mod_13 = await import('./ClientManager-2GtDWHq6.js');
|
|
5127
5127
|
const _ns_13 = _mod_13.N;
|
|
5128
5128
|
const { loadAllSchemasFromDb } = _ns_13;
|
|
5129
5129
|
const allSchemas = await loadAllSchemasFromDb();
|
|
@@ -5177,11 +5177,11 @@ hints = {}) => {
|
|
|
5177
5177
|
return undefined;
|
|
5178
5178
|
}
|
|
5179
5179
|
try {
|
|
5180
|
-
const _mod_14 = await import('./errors-
|
|
5180
|
+
const _mod_14 = await import('./errors-KM-yq2MD.js');
|
|
5181
5181
|
const _ns_14 = _mod_14.j;
|
|
5182
5182
|
const { Model } = _ns_14;
|
|
5183
5183
|
const { modelPropertiesToObject } = await import('./model-oHA3YhOd.js');
|
|
5184
|
-
const _mod_15 = await import('./index-
|
|
5184
|
+
const _mod_15 = await import('./index-DpgQMIRq.js');
|
|
5185
5185
|
const _ns_15 = _mod_15.bh;
|
|
5186
5186
|
const { resolveItemModelFileId } = _ns_15;
|
|
5187
5187
|
const modelFileId = await resolveItemModelFileId(hints);
|
|
@@ -5341,7 +5341,7 @@ class ItemProperty {
|
|
|
5341
5341
|
return;
|
|
5342
5342
|
}
|
|
5343
5343
|
// Use dynamic import to break circular dependency
|
|
5344
|
-
const schemaMod = await import('./index-
|
|
5344
|
+
const schemaMod = await import('./index-BAao3_Po.js');
|
|
5345
5345
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
5346
5346
|
const { context } = snapshot;
|
|
5347
5347
|
const { propertyRecordSchema } = context;
|
|
@@ -5752,7 +5752,7 @@ class ItemProperty {
|
|
|
5752
5752
|
const ctx = this._service.getSnapshot().context;
|
|
5753
5753
|
let modelFileId;
|
|
5754
5754
|
try {
|
|
5755
|
-
const _mod_16 = await import('./index-
|
|
5755
|
+
const _mod_16 = await import('./index-DpgQMIRq.js');
|
|
5756
5756
|
const _ns_16 = _mod_16.bh;
|
|
5757
5757
|
const { resolveItemModelFileId } = _ns_16;
|
|
5758
5758
|
modelFileId = await resolveItemModelFileId({
|
|
@@ -6115,7 +6115,7 @@ class ItemProperty {
|
|
|
6115
6115
|
const propertiesData = await getItemProperties({ seedLocalId, seedUid });
|
|
6116
6116
|
const instances = [];
|
|
6117
6117
|
const seenNormalized = new Set();
|
|
6118
|
-
const _mod_17 = await import('./index-
|
|
6118
|
+
const _mod_17 = await import('./index-DpgQMIRq.js');
|
|
6119
6119
|
const _ns_17 = _mod_17.bh;
|
|
6120
6120
|
const { resolveItemModelFileId } = _ns_17;
|
|
6121
6121
|
const itemModelFileId = await resolveItemModelFileId({ seedLocalId, seedUid });
|
|
@@ -6133,7 +6133,7 @@ class ItemProperty {
|
|
|
6133
6133
|
}
|
|
6134
6134
|
else if (baseName) {
|
|
6135
6135
|
try {
|
|
6136
|
-
const _mod_18 = await import('./errors-
|
|
6136
|
+
const _mod_18 = await import('./errors-KM-yq2MD.js');
|
|
6137
6137
|
const _ns_18 = _mod_18.j;
|
|
6138
6138
|
const { Model } = _ns_18;
|
|
6139
6139
|
const { modelPropertiesToObject } = await import('./model-oHA3YhOd.js');
|
|
@@ -6150,7 +6150,7 @@ class ItemProperty {
|
|
|
6150
6150
|
}
|
|
6151
6151
|
if (modelName && propertyName) {
|
|
6152
6152
|
try {
|
|
6153
|
-
const _mod_19 = await import('./errors-
|
|
6153
|
+
const _mod_19 = await import('./errors-KM-yq2MD.js');
|
|
6154
6154
|
const _ns_19 = _mod_19.j;
|
|
6155
6155
|
const { Model } = _ns_19;
|
|
6156
6156
|
const { modelPropertiesToObject } = await import('./model-oHA3YhOd.js');
|
|
@@ -6490,7 +6490,7 @@ class ItemProperty {
|
|
|
6490
6490
|
if (!propertyName || (!seedLocalId && !seedUid))
|
|
6491
6491
|
return;
|
|
6492
6492
|
if (db) {
|
|
6493
|
-
const _mod_20 = await import('./index-
|
|
6493
|
+
const _mod_20 = await import('./index-BbFwftAv.js');
|
|
6494
6494
|
const _ns_20 = _mod_20.s;
|
|
6495
6495
|
const seedSchemaMod = _ns_20;
|
|
6496
6496
|
const { metadata } = seedSchemaMod;
|
|
@@ -6535,7 +6535,7 @@ const createNewItem = async ({ modelName, modelFileId, ...propertyData }) => {
|
|
|
6535
6535
|
}
|
|
6536
6536
|
const seedType = easName(modelName);
|
|
6537
6537
|
// Dynamic import to break circular dependency
|
|
6538
|
-
const _mod_21 = await import('./errors-
|
|
6538
|
+
const _mod_21 = await import('./errors-KM-yq2MD.js');
|
|
6539
6539
|
const _ns_21 = _mod_21.j;
|
|
6540
6540
|
const modelMod = _ns_21;
|
|
6541
6541
|
const { Model } = modelMod;
|
|
@@ -6549,7 +6549,7 @@ const createNewItem = async ({ modelName, modelFileId, ...propertyData }) => {
|
|
|
6549
6549
|
catch (error) {
|
|
6550
6550
|
// The rows are separate inserts (no transaction): remove what was written so a failure leaves
|
|
6551
6551
|
// no half-made draft.
|
|
6552
|
-
const { discardNewDraft } = await import('./discardNewDraft-
|
|
6552
|
+
const { discardNewDraft } = await import('./discardNewDraft-hiVaUVjV.js');
|
|
6553
6553
|
await discardNewDraft(newSeedId).catch(() => undefined);
|
|
6554
6554
|
throw error;
|
|
6555
6555
|
}
|
|
@@ -6731,7 +6731,7 @@ const getModel = () => {
|
|
|
6731
6731
|
// the fragile `import(...).then(n => n.X)` chunk-namespace pattern.
|
|
6732
6732
|
if (!modelImportPromise) {
|
|
6733
6733
|
modelImportPromise = (async () => {
|
|
6734
|
-
const _mod_22 = await import('./errors-
|
|
6734
|
+
const _mod_22 = await import('./errors-KM-yq2MD.js');
|
|
6735
6735
|
const _ns_22 = _mod_22.j;
|
|
6736
6736
|
const mod = _ns_22;
|
|
6737
6737
|
ModelClass = mod.Model;
|
|
@@ -6906,14 +6906,14 @@ class Item {
|
|
|
6906
6906
|
};
|
|
6907
6907
|
this.getPublishUploads = async (options) => {
|
|
6908
6908
|
// Use dynamic import to break circular dependency
|
|
6909
|
-
const _mod_23 = await import('./getPublishUploads-
|
|
6909
|
+
const _mod_23 = await import('./getPublishUploads-Cex-NBe6.js');
|
|
6910
6910
|
const _ns_23 = _mod_23.o;
|
|
6911
6911
|
const getPublishUploadsMod = _ns_23;
|
|
6912
6912
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
6913
6913
|
return await getPublishUploads(this, [], undefined, options);
|
|
6914
6914
|
};
|
|
6915
6915
|
this.getPublishPayload = async (uploadedTransactions, options) => {
|
|
6916
|
-
const _mod_24 = await import('./getPublishPayload-
|
|
6916
|
+
const _mod_24 = await import('./getPublishPayload-oH8wJhnH.js');
|
|
6917
6917
|
const _ns_24 = _mod_24.g;
|
|
6918
6918
|
const getPublishPayloadMod = _ns_24;
|
|
6919
6919
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
@@ -7453,7 +7453,7 @@ class Item {
|
|
|
7453
7453
|
const db = BaseDb.getAppDb();
|
|
7454
7454
|
if (db && props.modelName) {
|
|
7455
7455
|
// Model names are only unique per schema: resolve the exact models row from the most specific scope.
|
|
7456
|
-
const _mod_25 = await import('./index-
|
|
7456
|
+
const _mod_25 = await import('./index-DpgQMIRq.js');
|
|
7457
7457
|
const _ns_25 = _mod_25.bh;
|
|
7458
7458
|
const { resolveModelRecord } = _ns_25;
|
|
7459
7459
|
const modelRecord = await resolveModelRecord(props.modelName, {
|
|
@@ -7462,7 +7462,7 @@ class Item {
|
|
|
7462
7462
|
});
|
|
7463
7463
|
const modelRecords = modelRecord ? [modelRecord] : [];
|
|
7464
7464
|
if (!modelRecord) {
|
|
7465
|
-
const _mod_26 = await import('./errors-
|
|
7465
|
+
const _mod_26 = await import('./errors-KM-yq2MD.js');
|
|
7466
7466
|
const _ns_26 = _mod_26.k;
|
|
7467
7467
|
const { UnknownModelError } = _ns_26;
|
|
7468
7468
|
throw new UnknownModelError(props.modelName, schemaName ?? modelInstance?.schemaName);
|
|
@@ -7473,10 +7473,10 @@ class Item {
|
|
|
7473
7473
|
// Scope the constructor's Model lookup to this model's schema (as getItemData does on reload),
|
|
7474
7474
|
// so a same-named model cached from another schema can't supply the property set.
|
|
7475
7475
|
if (modelRecord && !props.schemaName) {
|
|
7476
|
-
const _mod_27 = await import('./index-
|
|
7476
|
+
const _mod_27 = await import('./index-DpgQMIRq.js');
|
|
7477
7477
|
const _ns_27 = _mod_27.bg;
|
|
7478
7478
|
const { modelSchemas } = _ns_27;
|
|
7479
|
-
const _mod_28 = await import('./index-
|
|
7479
|
+
const _mod_28 = await import('./index-DpgQMIRq.js');
|
|
7480
7480
|
const _ns_28 = _mod_28.bf;
|
|
7481
7481
|
const { schemas: schemasTable } = _ns_28;
|
|
7482
7482
|
const schemaRows = await db
|
|
@@ -7664,7 +7664,7 @@ class Item {
|
|
|
7664
7664
|
/* best-effort cache cleanup */
|
|
7665
7665
|
}
|
|
7666
7666
|
try {
|
|
7667
|
-
const { discardNewDraft } = await import('./discardNewDraft-
|
|
7667
|
+
const { discardNewDraft } = await import('./discardNewDraft-hiVaUVjV.js');
|
|
7668
7668
|
await discardNewDraft(seedLocalId);
|
|
7669
7669
|
}
|
|
7670
7670
|
catch (error) {
|
|
@@ -7680,7 +7680,7 @@ class Item {
|
|
|
7680
7680
|
for (const [propertyName, value] of pipelineValues) {
|
|
7681
7681
|
const property = await this.waitForPropertyInstance(item, propertyName, timeout);
|
|
7682
7682
|
if (!property) {
|
|
7683
|
-
const _mod_29 = await import('./errors-
|
|
7683
|
+
const _mod_29 = await import('./errors-KM-yq2MD.js');
|
|
7684
7684
|
const _ns_29 = _mod_29.k;
|
|
7685
7685
|
const { ItemCreateError } = _ns_29;
|
|
7686
7686
|
throw new ItemCreateError(`Item.create: property ${item.modelName}.${propertyName} did not load for item ${item.seedLocalId}; value was not saved`, { code: 'property_not_loaded', modelName: item.modelName, property: propertyName, seedLocalId: item.seedLocalId });
|
|
@@ -7692,14 +7692,14 @@ class Item {
|
|
|
7692
7692
|
}
|
|
7693
7693
|
catch (error) {
|
|
7694
7694
|
if (error instanceof ItemPropertySaveValidationError) {
|
|
7695
|
-
const _mod_30 = await import('./errors-
|
|
7695
|
+
const _mod_30 = await import('./errors-KM-yq2MD.js');
|
|
7696
7696
|
const _ns_30 = _mod_30.k;
|
|
7697
7697
|
const { ItemCreateValidationError } = _ns_30;
|
|
7698
7698
|
const created = new ItemCreateValidationError(item.modelName, error.validationErrors.map((e) => ({ property: propertyName, code: e.code, message: e.message })));
|
|
7699
7699
|
created.cause = error;
|
|
7700
7700
|
throw created;
|
|
7701
7701
|
}
|
|
7702
|
-
const _mod_31 = await import('./errors-
|
|
7702
|
+
const _mod_31 = await import('./errors-KM-yq2MD.js');
|
|
7703
7703
|
const _ns_31 = _mod_31.k;
|
|
7704
7704
|
const { ItemCreateError } = _ns_31;
|
|
7705
7705
|
throw new ItemCreateError(`Item.create: failed to save ${item.modelName}.${propertyName} for item ${item.seedLocalId}: ` +
|
|
@@ -7862,7 +7862,7 @@ class Item {
|
|
|
7862
7862
|
if (!appDb || Item.instanceCache.size === 0) {
|
|
7863
7863
|
return;
|
|
7864
7864
|
}
|
|
7865
|
-
const _mod_32 = await import('./index-
|
|
7865
|
+
const _mod_32 = await import('./index-BbFwftAv.js');
|
|
7866
7866
|
const _ns_32 = _mod_32.s;
|
|
7867
7867
|
const { metadata } = _ns_32;
|
|
7868
7868
|
const { eq, and } = await import('drizzle-orm');
|
|
@@ -8025,11 +8025,11 @@ class Item {
|
|
|
8025
8025
|
}
|
|
8026
8026
|
/** Throws ItemCreateValidationError for unknown keys and values that break their property's rules. */
|
|
8027
8027
|
static async assertValidCreateValues(props, propertyNames, dataTypeByPropertyName, skipKeys) {
|
|
8028
|
-
const _mod_33 = await import('./errors-
|
|
8028
|
+
const _mod_33 = await import('./errors-KM-yq2MD.js');
|
|
8029
8029
|
const _ns_33 = _mod_33.k;
|
|
8030
8030
|
const { ItemCreateValidationError } = _ns_33;
|
|
8031
|
-
const { getPropertySchema } = await import('./property-
|
|
8032
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
8031
|
+
const { getPropertySchema } = await import('./property-BDBvImLs.js');
|
|
8032
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
8033
8033
|
const validationService = new SchemaValidationService();
|
|
8034
8034
|
const modelName = props.modelName;
|
|
8035
8035
|
const known = new Set(propertyNames);
|
|
@@ -8066,7 +8066,7 @@ class Item {
|
|
|
8066
8066
|
// Not JSON: validated as given, and rejected as a non-array
|
|
8067
8067
|
}
|
|
8068
8068
|
}
|
|
8069
|
-
const { resolvePropertyValidationRules } = await import('./propertyValidationRules-
|
|
8069
|
+
const { resolvePropertyValidationRules } = await import('./propertyValidationRules-BlfLn4rP.js');
|
|
8070
8070
|
const rules = propertySchema?.validation ??
|
|
8071
8071
|
(await resolvePropertyValidationRules(modelName, key, {
|
|
8072
8072
|
modelFileId: props.modelFileId,
|
|
@@ -8397,7 +8397,7 @@ class Item {
|
|
|
8397
8397
|
itemActor.send(event);
|
|
8398
8398
|
};
|
|
8399
8399
|
try {
|
|
8400
|
-
const _mod_34 = await import('./index-
|
|
8400
|
+
const _mod_34 = await import('./index-BbFwftAv.js');
|
|
8401
8401
|
const _ns_34 = _mod_34.s;
|
|
8402
8402
|
const seedSchemaMod = _ns_34;
|
|
8403
8403
|
const { seeds, metadata } = seedSchemaMod;
|
|
@@ -8768,4 +8768,4 @@ var Item$1 = /*#__PURE__*/Object.freeze({
|
|
|
8768
8768
|
});
|
|
8769
8769
|
|
|
8770
8770
|
export { unloadEntity as $, getPublishExecutor as A, getRevokeExecutor as B, ClientManagerState as C, DEFAULT_READY_TIMEOUT_MS as D, getUploadExecutor as E, getVersionData$1 as F, isLocalUnsealedDraft as G, isSeedRowOwned as H, Item as I, localUnsealedDraftSql as J, ownedPublisherSql as K, ownedSeedsSql as L, METADATA_LATEST_FIRST_ORDER_SQL as M, pickLatestMetadataRowPerProperty as N, OwnershipError as O, PUBLISH_NOT_CONFIGURED_MESSAGE as P, placeholderUidSql as Q, propertyMachine as R, publisherInAddressListSql as S, publisherIsInOwnedSet as T, setAdditionalSyncAddresses as U, setGetPublisherForNewSeeds as V, setPublishExecutor as W, setRevokeExecutor as X, setUploadExecutor as Y, getInvariantSafePropertyDescriptor as Z, clearDestroySubscriptions as _, ItemProperty as a, ClientManagerEvents as a0, withLockedItemStorageRow as a1, getItemStorageFilePath as a2, writeItemStorageFile as a3, resolvePublisherFromSeedRow as a4, getPropertyData$1 as a5, Item$1 as a6, ItemPropertySaveValidationError as b, assertItemOwned as c, waitForEntityIdle as d, compareMetadataRowsLatestFirst as e, getEasSchemaUidForModel as f, getItemData as g, getLatestPublishedVersionRow as h, isItemOwned as i, chunkValues as j, getGetAdditionalSyncAddresses as k, isVersionRevoked as l, createReactiveProxy as m, findEntity as n, forceRemoveFromCaches as o, parseListPropertyValueFromStorage as p, runDestroyLifecycle as q, rowsPerInsert 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 };
|
|
8771
|
-
//# sourceMappingURL=Item-
|
|
8771
|
+
//# sourceMappingURL=Item-D6j0IvBP.js.map
|