@seedprotocol/sdk 0.4.30 → 0.4.31
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/{ArweaveClient-BA7b13Dl.js → ArweaveClient-CZpZgmR2.js} +3 -3
- package/dist/{ArweaveClient-BA7b13Dl.js.map → ArweaveClient-CZpZgmR2.js.map} +1 -1
- package/dist/{ArweaveClient-DJ8Q63JQ.js → ArweaveClient-Cs7AL9dp.js} +3 -3
- package/dist/{ArweaveClient-DJ8Q63JQ.js.map → ArweaveClient-Cs7AL9dp.js.map} +1 -1
- package/dist/{Db-BHMXF86s.js → Db-CF6R7HIy.js} +4 -4
- package/dist/{Db-BHMXF86s.js.map → Db-CF6R7HIy.js.map} +1 -1
- package/dist/{Db-qgwjsLKI.js → Db-CZkONsdT.js} +4 -4
- package/dist/{Db-qgwjsLKI.js.map → Db-CZkONsdT.js.map} +1 -1
- package/dist/{EasClient-BqU4c27A.js → EasClient-PXOzSzPG.js} +2 -2
- package/dist/{EasClient-DjSKI-Jp.js.map → EasClient-PXOzSzPG.js.map} +1 -1
- package/dist/{EasClient-DjSKI-Jp.js → EasClient-qfTiM2we.js} +2 -2
- package/dist/{EasClient-BqU4c27A.js.map → EasClient-qfTiM2we.js.map} +1 -1
- package/dist/{FileManager-DJ-mFSmc.js → FileManager-5GkHtxF7.js} +2 -2
- package/dist/{FileManager-DJ-mFSmc.js.map → FileManager-5GkHtxF7.js.map} +1 -1
- package/dist/{FileManager-DIbVCWke.js → FileManager-jORQ8Bb6.js} +2 -2
- package/dist/{FileManager-DIbVCWke.js.map → FileManager-jORQ8Bb6.js.map} +1 -1
- package/dist/{ModelProperty-jBpPbg3l.js → ModelProperty-e_hXSFvf.js} +17 -17
- package/dist/{ModelProperty-jBpPbg3l.js.map → ModelProperty-e_hXSFvf.js.map} +1 -1
- package/dist/{PathResolver-DmFG4fR1.js → PathResolver-B4_X69Rd.js} +2 -2
- package/dist/{PathResolver-DmFG4fR1.js.map → PathResolver-B4_X69Rd.js.map} +1 -1
- package/dist/{PathResolver-CxmIkVyO.js → PathResolver-Dz0RVGIz.js} +2 -2
- package/dist/{PathResolver-CxmIkVyO.js.map → PathResolver-Dz0RVGIz.js.map} +1 -1
- package/dist/{QueryClient-7vk66LoN.js → QueryClient-CXHZ239d.js} +2 -2
- package/dist/{QueryClient-7vk66LoN.js.map → QueryClient-CXHZ239d.js.map} +1 -1
- package/dist/{QueryClient-CHayftHv.js → QueryClient-D_UK4YLm.js} +2 -2
- package/dist/{QueryClient-CHayftHv.js.map → QueryClient-D_UK4YLm.js.map} +1 -1
- package/dist/{Schema-CyWoCyDH.js → Schema-DonRkUOJ.js} +22 -22
- package/dist/{Schema-CyWoCyDH.js.map → Schema-DonRkUOJ.js.map} +1 -1
- package/dist/{SchemaValidationService-ByxyqvS9.js → SchemaValidationService-DcmfhQae.js} +2 -2
- package/dist/{SchemaValidationService-ByxyqvS9.js.map → SchemaValidationService-DcmfhQae.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-CUenpA6t.js → backfillMetadataPropertyIds-CKTfvFgQ.js} +2 -2
- package/dist/{backfillMetadataPropertyIds-CUenpA6t.js.map → backfillMetadataPropertyIds-CKTfvFgQ.js.map} +1 -1
- package/dist/cjs/{ModelProperty-BEpPD4wH.js → ModelProperty-BQYU5hPQ.js} +17 -17
- package/dist/cjs/{ModelProperty-BEpPD4wH.js.map → ModelProperty-BQYU5hPQ.js.map} +1 -1
- package/dist/cjs/{Schema-DgvWd1wc.js → Schema-BcRHcQ0W.js} +20 -20
- package/dist/cjs/{Schema-DgvWd1wc.js.map → Schema-BcRHcQ0W.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-DazyAm6l.js → SchemaValidationService-CQNDgyZl.js} +2 -2
- package/dist/cjs/{SchemaValidationService-DazyAm6l.js.map → SchemaValidationService-CQNDgyZl.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-BHJnW-NK.js → backfillMetadataPropertyIds-Dn4oVmEv.js} +2 -2
- package/dist/cjs/{backfillMetadataPropertyIds-BHJnW-NK.js.map → backfillMetadataPropertyIds-Dn4oVmEv.js.map} +1 -1
- package/dist/cjs/{getItem-CStbsCge.js → getItem-DpnPrzl3.js} +2 -2
- package/dist/cjs/{getItem-CStbsCge.js.map → getItem-DpnPrzl3.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-Bws1mdNc.js → getPublishPayload-CGKMEL3H.js} +11 -11
- package/dist/cjs/{getPublishPayload-Bws1mdNc.js.map → getPublishPayload-CGKMEL3H.js.map} +1 -1
- package/dist/cjs/{getPublishUploads-BNYeCNf_.js → getPublishUploads-DeI0f2UN.js} +4 -4
- package/dist/cjs/{getPublishUploads-BNYeCNf_.js.map → getPublishUploads-DeI0f2UN.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-CkhTBPSP.js → getSegmentedItemProperties-BgS_FhAx.js} +3 -3
- package/dist/cjs/{getSegmentedItemProperties-CkhTBPSP.js.map → getSegmentedItemProperties-BgS_FhAx.js.map} +1 -1
- package/dist/cjs/{index-BLco2YiE.js → index-BnAqr2le.js} +3 -3
- package/dist/cjs/index-BnAqr2le.js.map +1 -0
- package/dist/cjs/{index-CZ7yR-bZ.js → index-ByozbTn_.js} +50 -38
- package/dist/cjs/index-ByozbTn_.js.map +1 -0
- package/dist/cjs/{ownership-B1I8eLiv.js → ownership-CsWuaNfH.js} +2 -2
- package/dist/cjs/{ownership-B1I8eLiv.js.map → ownership-CsWuaNfH.js.map} +1 -1
- package/dist/cjs/{property-sm3N2yBU.js → property-CeR45LMx.js} +4 -4
- package/dist/cjs/{property-sm3N2yBU.js.map → property-CeR45LMx.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-Dh9HSiwm.js → syncDbWithEas-CA2Lum5V.js} +5 -5
- package/dist/cjs/{syncDbWithEas-Dh9HSiwm.js.map → syncDbWithEas-CA2Lum5V.js.map} +1 -1
- package/dist/debug-default-shim.js +27 -0
- package/dist/{getItem-CdgsloEB.js → getItem-GOXWo_Iy.js} +2 -2
- package/dist/{getItem-CdgsloEB.js.map → getItem-GOXWo_Iy.js.map} +1 -1
- package/dist/{getPublishPayload-DlkHAsOA.js → getPublishPayload-D16enahU.js} +11 -11
- package/dist/{getPublishPayload-DlkHAsOA.js.map → getPublishPayload-D16enahU.js.map} +1 -1
- package/dist/{getPublishUploads-BeukCBiR.js → getPublishUploads-wGqH19UY.js} +4 -4
- package/dist/{getPublishUploads-BeukCBiR.js.map → getPublishUploads-wGqH19UY.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-B_yciZHD.js → getSegmentedItemProperties-Be3kYWY3.js} +3 -3
- package/dist/{getSegmentedItemProperties-B_yciZHD.js.map → getSegmentedItemProperties-Be3kYWY3.js.map} +1 -1
- package/dist/{index-CfZAy_U1.js → index-BFyMxc7e.js} +2 -2
- package/dist/index-BFyMxc7e.js.map +1 -0
- package/dist/{index-C3oIxmh-.js → index-BcXKZQpX.js} +64 -52
- package/dist/index-BcXKZQpX.js.map +1 -0
- package/dist/{index-j0nIoPTo.js → index-C9p-skT3.js} +3 -3
- package/dist/index-C9p-skT3.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +13 -13
- package/dist/node.js +10 -10
- package/dist/{ownership-Br40yugt.js → ownership-C17YhE7J.js} +2 -2
- package/dist/{ownership-Br40yugt.js.map → ownership-C17YhE7J.js.map} +1 -1
- package/dist/{property-DlfKPjHu.js → property-CRAau-Q-.js} +5 -5
- package/dist/{property-DlfKPjHu.js.map → property-CRAau-Q-.js.map} +1 -1
- package/dist/{queries-CIlWKRoN.js → queries-Ct7CcQ3g.js} +2 -2
- package/dist/{queries-CIlWKRoN.js.map → queries-Ct7CcQ3g.js.map} +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/helpers/mediaRef.d.ts.map +1 -1
- package/dist/src/vite/debug-default-shim.d.ts +3 -0
- package/dist/src/vite/debug-default-shim.d.ts.map +1 -0
- package/dist/src/vite/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-Dsa5kEMM.js → syncDbWithEas-CB5aXPtf.js} +6 -6
- package/dist/{syncDbWithEas-Dsa5kEMM.js.map → syncDbWithEas-CB5aXPtf.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-DHDIH0zy.js → updateSeedRevokedAt-BIu5Q4Po.js} +2 -2
- package/dist/{updateSeedRevokedAt-DHDIH0zy.js.map → updateSeedRevokedAt-BIu5Q4Po.js.map} +1 -1
- package/dist/vite.cjs +56 -1
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.js +56 -1
- package/dist/vite.js.map +1 -1
- package/package.json +4 -4
- package/dist/cjs/index-BLco2YiE.js.map +0 -1
- package/dist/cjs/index-CZ7yR-bZ.js.map +0 -1
- package/dist/index-C3oIxmh-.js.map +0 -1
- package/dist/index-CfZAy_U1.js.map +0 -1
- package/dist/index-j0nIoPTo.js.map +0 -1
|
@@ -1686,6 +1686,8 @@ const getStorageTransactionIdForSeedUid = async (seedUid) => {
|
|
|
1686
1686
|
return results[0].storageTransactionId;
|
|
1687
1687
|
};
|
|
1688
1688
|
|
|
1689
|
+
// #region agent log
|
|
1690
|
+
fetch('http://127.0.0.1:7754/ingest/2810478a-7cf0-49a8-bc23-760b81417972', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '30ce80' }, body: JSON.stringify({ sessionId: '30ce80', runId: 'pre-fix', hypothesisId: 'B', location: 'mediaRef.ts:3', message: 'mediaRef debug import', data: { debugType: typeof debug, debugName: debug?.name ?? null }, timestamp: Date.now() }) }).catch(() => { });
|
|
1689
1691
|
const logger$v = debug('seedSdk:helpers:mediaRef');
|
|
1690
1692
|
/** Typical Arweave transaction id: 43 URL-safe base64 characters. */
|
|
1691
1693
|
const ARWEAVE_TX_ID = /^[a-zA-Z0-9_-]{43}$/;
|
|
@@ -2205,7 +2207,7 @@ const createPropertyInstances = async (propertyFileIds) => {
|
|
|
2205
2207
|
return;
|
|
2206
2208
|
}
|
|
2207
2209
|
try {
|
|
2208
|
-
const mod = await import('./ModelProperty-
|
|
2210
|
+
const mod = await import('./ModelProperty-e_hXSFvf.js');
|
|
2209
2211
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
2210
2212
|
if (!ModelProperty) {
|
|
2211
2213
|
logger$t('createPropertyInstances: ModelProperty not available from dynamic import');
|
|
@@ -2389,7 +2391,7 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2389
2391
|
// Step 2: Fallback to Schema context (only if database doesn't have the model)
|
|
2390
2392
|
// This handles the case where model exists in schema file but not yet in database
|
|
2391
2393
|
try {
|
|
2392
|
-
const _mod_0 = await import('./Schema-
|
|
2394
|
+
const _mod_0 = await import('./Schema-DonRkUOJ.js');
|
|
2393
2395
|
const _ns_0 = _mod_0.b;
|
|
2394
2396
|
const schemaMod = _ns_0;
|
|
2395
2397
|
const { Schema } = schemaMod;
|
|
@@ -2635,7 +2637,7 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2635
2637
|
}
|
|
2636
2638
|
// Mark schema as draft when a new model is created so saveNewVersion() can persist it
|
|
2637
2639
|
try {
|
|
2638
|
-
const _mod_1 = await import('./Schema-
|
|
2640
|
+
const _mod_1 = await import('./Schema-DonRkUOJ.js');
|
|
2639
2641
|
const _ns_1 = _mod_1.b;
|
|
2640
2642
|
const schemaMod = _ns_1;
|
|
2641
2643
|
const { Schema } = schemaMod;
|
|
@@ -2681,10 +2683,10 @@ const validateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2681
2683
|
const _validateModel = async () => {
|
|
2682
2684
|
try {
|
|
2683
2685
|
// Use dynamic imports to break circular dependencies
|
|
2684
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
2686
|
+
const validationServiceMod = await import('./SchemaValidationService-DcmfhQae.js');
|
|
2685
2687
|
const { SchemaValidationService } = validationServiceMod;
|
|
2686
2688
|
const validationService = new SchemaValidationService();
|
|
2687
|
-
const _mod_2 = await import('./Schema-
|
|
2689
|
+
const _mod_2 = await import('./Schema-DonRkUOJ.js');
|
|
2688
2690
|
const _ns_2 = _mod_2.b;
|
|
2689
2691
|
const schemaMod = _ns_2;
|
|
2690
2692
|
const { Schema } = schemaMod;
|
|
@@ -2796,7 +2798,7 @@ const createModelProperties = fromCallback(({ sendBack, input }) => {
|
|
|
2796
2798
|
return;
|
|
2797
2799
|
}
|
|
2798
2800
|
logger$r(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
|
|
2799
|
-
const mod = await import('./ModelProperty-
|
|
2801
|
+
const mod = await import('./ModelProperty-e_hXSFvf.js');
|
|
2800
2802
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
2801
2803
|
if (!ModelProperty) {
|
|
2802
2804
|
logger$r('ModelProperty not available from dynamic import');
|
|
@@ -2900,7 +2902,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
2900
2902
|
const structureMsg = `[validateEntity] Validating model structure`;
|
|
2901
2903
|
logger$q(structureMsg);
|
|
2902
2904
|
// Use existing Model validation
|
|
2903
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
2905
|
+
const validationServiceMod = await import('./SchemaValidationService-DcmfhQae.js');
|
|
2904
2906
|
const { SchemaValidationService } = validationServiceMod;
|
|
2905
2907
|
const validationService = new SchemaValidationService();
|
|
2906
2908
|
// Validate model structure
|
|
@@ -2918,7 +2920,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
2918
2920
|
if (entityInput.entityData.schemaName) {
|
|
2919
2921
|
try {
|
|
2920
2922
|
logger$q(`[validateEntity] Validating model against schema "${entityInput.entityData.schemaName}"`);
|
|
2921
|
-
const _mod_3 = await import('./Schema-
|
|
2923
|
+
const _mod_3 = await import('./Schema-DonRkUOJ.js');
|
|
2922
2924
|
const _ns_3 = _mod_3.b;
|
|
2923
2925
|
const schemaMod = _ns_3;
|
|
2924
2926
|
const { Schema } = schemaMod;
|
|
@@ -2956,7 +2958,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
2956
2958
|
}
|
|
2957
2959
|
else if (entityInput.entityType === 'modelProperty') {
|
|
2958
2960
|
// Use existing ModelProperty validation
|
|
2959
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
2961
|
+
const validationServiceMod = await import('./SchemaValidationService-DcmfhQae.js');
|
|
2960
2962
|
const { SchemaValidationService } = validationServiceMod;
|
|
2961
2963
|
const validationService = new SchemaValidationService();
|
|
2962
2964
|
// Validate property structure
|
|
@@ -2971,7 +2973,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
2971
2973
|
// If schema name and model name provided, validate against schema
|
|
2972
2974
|
if (entityInput.entityData._schemaName && entityInput.entityData.modelName) {
|
|
2973
2975
|
try {
|
|
2974
|
-
const _mod_4 = await import('./Schema-
|
|
2976
|
+
const _mod_4 = await import('./Schema-DonRkUOJ.js');
|
|
2975
2977
|
const _ns_4 = _mod_4.b;
|
|
2976
2978
|
const schemaMod = _ns_4;
|
|
2977
2979
|
const { Schema } = schemaMod;
|
|
@@ -3002,7 +3004,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
3002
3004
|
}
|
|
3003
3005
|
else if (entityInput.entityType === 'schema') {
|
|
3004
3006
|
// Schema validation - use existing validation
|
|
3005
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
3007
|
+
const validationServiceMod = await import('./SchemaValidationService-DcmfhQae.js');
|
|
3006
3008
|
const { SchemaValidationService } = validationServiceMod;
|
|
3007
3009
|
const validationService = new SchemaValidationService();
|
|
3008
3010
|
const schemaResult = validationService.validateSchema(entityInput.entityData);
|
|
@@ -4954,7 +4956,7 @@ const writeToDatabase = fromCallback(({ sendBack, input }) => {
|
|
|
4954
4956
|
// initial write completes is not overwritten by the stale requestWrite payload.
|
|
4955
4957
|
let dataToWrite = input.entityData;
|
|
4956
4958
|
try {
|
|
4957
|
-
const mod = await import('./ModelProperty-
|
|
4959
|
+
const mod = await import('./ModelProperty-e_hXSFvf.js');
|
|
4958
4960
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
4959
4961
|
if (ModelProperty && typeof ModelProperty.getById === 'function') {
|
|
4960
4962
|
const instance = ModelProperty.getById(input.entityId);
|
|
@@ -5334,7 +5336,7 @@ const modelMachine = setup({
|
|
|
5334
5336
|
// Create ModelProperty instances for any new property IDs
|
|
5335
5337
|
if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
|
|
5336
5338
|
// Import and create instances asynchronously (fire-and-forget)
|
|
5337
|
-
import('./ModelProperty-
|
|
5339
|
+
import('./ModelProperty-e_hXSFvf.js').then(({ ModelProperty }) => {
|
|
5338
5340
|
const createPromises = newPropertyIds.map(async (propertyFileId) => {
|
|
5339
5341
|
try {
|
|
5340
5342
|
const property = await ModelProperty.createById(propertyFileId);
|
|
@@ -6753,7 +6755,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
6753
6755
|
const schemaNameToTry = model$1?.schemaName;
|
|
6754
6756
|
if (schemaNameToTry) {
|
|
6755
6757
|
try {
|
|
6756
|
-
const _mod_5 = await import('./Schema-
|
|
6758
|
+
const _mod_5 = await import('./Schema-DonRkUOJ.js');
|
|
6757
6759
|
const _ns_5 = _mod_5.b;
|
|
6758
6760
|
const { Schema } = _ns_5;
|
|
6759
6761
|
const schemaInstance = Schema.create(schemaNameToTry, { waitForReady: false });
|
|
@@ -6804,7 +6806,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
6804
6806
|
}
|
|
6805
6807
|
}
|
|
6806
6808
|
if (Object.keys(propertySchemas).length === 0) {
|
|
6807
|
-
const schemaMod = await import('./index-
|
|
6809
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
6808
6810
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
6809
6811
|
const KNOWN_MODEL_FALLBACKS = {
|
|
6810
6812
|
Post: {
|
|
@@ -6851,7 +6853,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
|
|
|
6851
6853
|
// Infer propertyRecordSchema from metadata when schema is missing (enables persistence)
|
|
6852
6854
|
let propSchema = propertySchemas[propertyName];
|
|
6853
6855
|
if (!propSchema && isRefTypeFromMeta) {
|
|
6854
|
-
const schemaMod = await import('./index-
|
|
6856
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
6855
6857
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
6856
6858
|
propSchema = {
|
|
6857
6859
|
dataType: refSeedType === 'html' ? ModelPropertyDataTypes.Html
|
|
@@ -7108,9 +7110,9 @@ const runPublish = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
7108
7110
|
sendBack({ type: 'publishError', error: new Error(`Item not found for seedLocalId: ${seedLocalId}`) });
|
|
7109
7111
|
return;
|
|
7110
7112
|
}
|
|
7111
|
-
const getPublishUploadsMod = await import('./getPublishUploads-
|
|
7113
|
+
const getPublishUploadsMod = await import('./getPublishUploads-wGqH19UY.js');
|
|
7112
7114
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
7113
|
-
const getPublishPayloadMod = await import('./getPublishPayload-
|
|
7115
|
+
const getPublishPayloadMod = await import('./getPublishPayload-D16enahU.js');
|
|
7114
7116
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
7115
7117
|
const uploads = await getPublishUploads(item);
|
|
7116
7118
|
let uploadedTransactions = [];
|
|
@@ -7950,7 +7952,7 @@ const resolveRelatedValue = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
7950
7952
|
const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, populatedFromDb, schemaUid, } = context;
|
|
7951
7953
|
const _resolveRelatedValue = async () => {
|
|
7952
7954
|
// Use dynamic import to break circular dependency
|
|
7953
|
-
const schemaMod = await import('./index-
|
|
7955
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
7954
7956
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
7955
7957
|
if (!propertyValue || !isRelation || populatedFromDb) {
|
|
7956
7958
|
return;
|
|
@@ -8958,7 +8960,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
8958
8960
|
// to use dynamically imported ModelPropertyDataTypes
|
|
8959
8961
|
const _hydrateFromDb = async () => {
|
|
8960
8962
|
// Use dynamic import to break circular dependency
|
|
8961
|
-
const schemaMod = await import('./index-
|
|
8963
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
8962
8964
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
8963
8965
|
const appDb = BaseDb.getAppDb();
|
|
8964
8966
|
const whereClauses = [];
|
|
@@ -9321,7 +9323,7 @@ const loadOrCreateProperty = fromCallback(({ sendBack, input: { context } }) =>
|
|
|
9321
9323
|
};
|
|
9322
9324
|
// Merge with schema from file/DB to get validation rules (enum, pattern, etc.) - properties table doesn't store these
|
|
9323
9325
|
try {
|
|
9324
|
-
const { getPropertySchema } = await import('./property-
|
|
9326
|
+
const { getPropertySchema } = await import('./property-CRAau-Q-.js');
|
|
9325
9327
|
let schemaFromFile = await getPropertySchema(normalizedModelName, propertyName);
|
|
9326
9328
|
if (!schemaFromFile?.validation) {
|
|
9327
9329
|
// Fallback: get validation from schemaData in database (Schema context may not be loaded yet)
|
|
@@ -9786,9 +9788,9 @@ const analyzeInput = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
9786
9788
|
}
|
|
9787
9789
|
const _analyzeInput = async () => {
|
|
9788
9790
|
// Use dynamic import to break circular dependency
|
|
9789
|
-
const schemaMod = await import('./index-
|
|
9791
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
9790
9792
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
9791
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
9793
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-DcmfhQae.js');
|
|
9792
9794
|
let propertyName = propertyNameRaw;
|
|
9793
9795
|
if (!propertyName) {
|
|
9794
9796
|
throw new Error('propertyName is required');
|
|
@@ -9986,7 +9988,7 @@ const createMetadata = async (metadataValues, propertyRecordSchema, options) =>
|
|
|
9986
9988
|
propertyRecordSchema?.validation &&
|
|
9987
9989
|
metadataValues.propertyValue != null &&
|
|
9988
9990
|
metadataValues.propertyValue !== '') {
|
|
9989
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
9991
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-DcmfhQae.js');
|
|
9990
9992
|
const validationService = new SchemaValidationService();
|
|
9991
9993
|
const validationResult = validationService.validatePropertyValue(metadataValues.propertyValue, propertyRecordSchema.dataType, propertyRecordSchema.validation, propertyRecordSchema.refValueType);
|
|
9992
9994
|
if (!validationResult.isValid && validationResult.errors.length > 0) {
|
|
@@ -10577,7 +10579,7 @@ const saveRelation = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
10577
10579
|
}
|
|
10578
10580
|
const _saveRelation = async () => {
|
|
10579
10581
|
// Use dynamic import to break circular dependency
|
|
10580
|
-
const schemaMod = await import('./index-
|
|
10582
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
10581
10583
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
10582
10584
|
if (!propertyNameRaw) {
|
|
10583
10585
|
throw new Error('propertyName is required');
|
|
@@ -11621,7 +11623,7 @@ class ItemProperty {
|
|
|
11621
11623
|
return;
|
|
11622
11624
|
}
|
|
11623
11625
|
// Use dynamic import to break circular dependency
|
|
11624
|
-
const schemaMod = await import('./index-
|
|
11626
|
+
const schemaMod = await import('./index-C9p-skT3.js');
|
|
11625
11627
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
11626
11628
|
const { context } = snapshot;
|
|
11627
11629
|
const { propertyRecordSchema } = context;
|
|
@@ -11792,7 +11794,7 @@ class ItemProperty {
|
|
|
11792
11794
|
const normalizedRefValueType = normalizeDataType(propertyRecordSchema?.refValueType);
|
|
11793
11795
|
const propertyNames = getMetadataPropertyNamesForQuery(propertyName, normalizedDataType, normalizedRefValueType);
|
|
11794
11796
|
const propertyNameVariant = propertyNames.length > 1 ? propertyNames[1] : undefined;
|
|
11795
|
-
const _mod_6 = await import('./index-
|
|
11797
|
+
const _mod_6 = await import('./index-BFyMxc7e.js');
|
|
11796
11798
|
const _ns_6 = _mod_6.s;
|
|
11797
11799
|
const seedSchemaMod = _ns_6;
|
|
11798
11800
|
const { metadata } = seedSchemaMod;
|
|
@@ -12126,6 +12128,16 @@ class ItemProperty {
|
|
|
12126
12128
|
// but cached instance doesn't (e.g. Item constructor created from schema first, then loadOrCreateItem
|
|
12127
12129
|
// has metadata with refResolvedValue - we must not lose display data).
|
|
12128
12130
|
const ctx = instance._getSnapshotContext();
|
|
12131
|
+
const incomingSchema = props.propertyRecordSchema;
|
|
12132
|
+
if (incomingSchema && !ctx.propertyRecordSchema) {
|
|
12133
|
+
instance._dataType = incomingSchema.dataType;
|
|
12134
|
+
instance._isRelation = incomingSchema.dataType === 'Relation';
|
|
12135
|
+
instance._isList = incomingSchema.dataType === 'List';
|
|
12136
|
+
instance._service.send({
|
|
12137
|
+
type: 'updateContext',
|
|
12138
|
+
propertyRecordSchema: incomingSchema,
|
|
12139
|
+
});
|
|
12140
|
+
}
|
|
12129
12141
|
const needsRefSync = (props.refResolvedValue != null && !ctx.refResolvedValue) ||
|
|
12130
12142
|
(props.refResolvedDisplayValue != null && !ctx.refResolvedDisplayValue) ||
|
|
12131
12143
|
(props.localStorageDir != null && !ctx.localStorageDir) ||
|
|
@@ -12522,7 +12534,7 @@ class ItemProperty {
|
|
|
12522
12534
|
}
|
|
12523
12535
|
async save() {
|
|
12524
12536
|
const ctx = this._getSnapshotContext();
|
|
12525
|
-
const { assertItemOwned } = await import('./ownership-
|
|
12537
|
+
const { assertItemOwned } = await import('./ownership-C17YhE7J.js');
|
|
12526
12538
|
await assertItemOwned({
|
|
12527
12539
|
seedLocalId: ctx?.seedLocalId ?? undefined,
|
|
12528
12540
|
seedUid: ctx?.seedUid ?? undefined,
|
|
@@ -12615,7 +12627,7 @@ class ItemProperty {
|
|
|
12615
12627
|
if (!propertyName || (!seedLocalId && !seedUid))
|
|
12616
12628
|
return;
|
|
12617
12629
|
if (db) {
|
|
12618
|
-
const _mod_7 = await import('./index-
|
|
12630
|
+
const _mod_7 = await import('./index-BFyMxc7e.js');
|
|
12619
12631
|
const _ns_7 = _mod_7.s;
|
|
12620
12632
|
const seedSchemaMod = _ns_7;
|
|
12621
12633
|
const { metadata } = seedSchemaMod;
|
|
@@ -12863,7 +12875,7 @@ class Item {
|
|
|
12863
12875
|
});
|
|
12864
12876
|
};
|
|
12865
12877
|
this.unpublish = async () => {
|
|
12866
|
-
const { assertItemOwned } = await import('./ownership-
|
|
12878
|
+
const { assertItemOwned } = await import('./ownership-C17YhE7J.js');
|
|
12867
12879
|
const { getRevokeExecutor } = await Promise.resolve().then(function () { return publishConfig; });
|
|
12868
12880
|
await assertItemOwned(this);
|
|
12869
12881
|
const seedUid = this.seedUid;
|
|
@@ -12887,7 +12899,7 @@ class Item {
|
|
|
12887
12899
|
this._service.send({ type: 'updateContext', revokedAt });
|
|
12888
12900
|
};
|
|
12889
12901
|
this.publish = async () => {
|
|
12890
|
-
const { assertItemOwned } = await import('./ownership-
|
|
12902
|
+
const { assertItemOwned } = await import('./ownership-C17YhE7J.js');
|
|
12891
12903
|
await assertItemOwned(this);
|
|
12892
12904
|
this._service.send({ type: 'startPublish' });
|
|
12893
12905
|
return new Promise((resolve, reject) => {
|
|
@@ -12923,12 +12935,12 @@ class Item {
|
|
|
12923
12935
|
};
|
|
12924
12936
|
this.getPublishUploads = async (options) => {
|
|
12925
12937
|
// Use dynamic import to break circular dependency
|
|
12926
|
-
const getPublishUploadsMod = await import('./getPublishUploads-
|
|
12938
|
+
const getPublishUploadsMod = await import('./getPublishUploads-wGqH19UY.js');
|
|
12927
12939
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
12928
12940
|
return await getPublishUploads(this, [], undefined, options);
|
|
12929
12941
|
};
|
|
12930
12942
|
this.getPublishPayload = async (uploadedTransactions, options) => {
|
|
12931
|
-
const getPublishPayloadMod = await import('./getPublishPayload-
|
|
12943
|
+
const getPublishPayloadMod = await import('./getPublishPayload-D16enahU.js');
|
|
12932
12944
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
12933
12945
|
return await getPublishPayload(this, uploadedTransactions, options);
|
|
12934
12946
|
};
|
|
@@ -13669,7 +13681,7 @@ class Item {
|
|
|
13669
13681
|
if (!appDb || Item.instanceCache.size === 0) {
|
|
13670
13682
|
return;
|
|
13671
13683
|
}
|
|
13672
|
-
const _mod_8 = await import('./index-
|
|
13684
|
+
const _mod_8 = await import('./index-BFyMxc7e.js');
|
|
13673
13685
|
const _ns_8 = _mod_8.s;
|
|
13674
13686
|
const { metadata } = _ns_8;
|
|
13675
13687
|
const { eq, and } = await import('drizzle-orm');
|
|
@@ -14120,7 +14132,7 @@ class Item {
|
|
|
14120
14132
|
itemActor.send(event);
|
|
14121
14133
|
};
|
|
14122
14134
|
try {
|
|
14123
|
-
const _mod_9 = await import('./index-
|
|
14135
|
+
const _mod_9 = await import('./index-BFyMxc7e.js');
|
|
14124
14136
|
const _ns_9 = _mod_9.s;
|
|
14125
14137
|
const seedSchemaMod = _ns_9;
|
|
14126
14138
|
const { seeds, versions, metadata } = seedSchemaMod;
|
|
@@ -14426,7 +14438,7 @@ class Item {
|
|
|
14426
14438
|
* Destroy the item: soft delete in DB, remove from caches, clean up subscriptions, stop service.
|
|
14427
14439
|
*/
|
|
14428
14440
|
async destroy() {
|
|
14429
|
-
const { assertItemOwned } = await import('./ownership-
|
|
14441
|
+
const { assertItemOwned } = await import('./ownership-C17YhE7J.js');
|
|
14430
14442
|
await assertItemOwned(this);
|
|
14431
14443
|
const context = this._getSnapshotContext();
|
|
14432
14444
|
const cacheKeys = Item.collectInstanceCacheKeysForInstance(this);
|
|
@@ -14582,7 +14594,7 @@ const runEasSync = fromPromise(async ({ input, }) => {
|
|
|
14582
14594
|
requestPayload: input.requestPayload,
|
|
14583
14595
|
persistedSnapshot: input.runningSnapshot,
|
|
14584
14596
|
});
|
|
14585
|
-
const { runSyncFromEas } = await import('./syncDbWithEas-
|
|
14597
|
+
const { runSyncFromEas } = await import('./syncDbWithEas-CB5aXPtf.js');
|
|
14586
14598
|
try {
|
|
14587
14599
|
await runSyncFromEas(toRunSyncArg(input.options));
|
|
14588
14600
|
await finalizeEasSyncProcessRow(rowId, {
|
|
@@ -14892,20 +14904,20 @@ const platformClassesInit = fromCallback(({ sendBack, input: { context, event }
|
|
|
14892
14904
|
let PathResolver;
|
|
14893
14905
|
let EasClient;
|
|
14894
14906
|
if (isBrowser()) {
|
|
14895
|
-
FileManager = (await import('./FileManager-
|
|
14896
|
-
Db = (await import('./Db-
|
|
14897
|
-
QueryClient = (await import('./QueryClient-
|
|
14898
|
-
ArweaveClient = (await import('./ArweaveClient-
|
|
14899
|
-
PathResolver = (await import('./PathResolver-
|
|
14900
|
-
EasClient = (await import('./EasClient-
|
|
14907
|
+
FileManager = (await import('./FileManager-5GkHtxF7.js')).FileManager;
|
|
14908
|
+
Db = (await import('./Db-CF6R7HIy.js')).Db;
|
|
14909
|
+
QueryClient = (await import('./QueryClient-CXHZ239d.js')).QueryClient;
|
|
14910
|
+
ArweaveClient = (await import('./ArweaveClient-CZpZgmR2.js')).ArweaveClient;
|
|
14911
|
+
PathResolver = (await import('./PathResolver-Dz0RVGIz.js')).PathResolver;
|
|
14912
|
+
EasClient = (await import('./EasClient-PXOzSzPG.js')).EasClient;
|
|
14901
14913
|
}
|
|
14902
14914
|
else if (isNode()) {
|
|
14903
|
-
FileManager = (await import('./FileManager-
|
|
14904
|
-
Db = (await import('./Db-
|
|
14905
|
-
QueryClient = (await import('./QueryClient-
|
|
14906
|
-
ArweaveClient = (await import('./ArweaveClient-
|
|
14907
|
-
PathResolver = (await import('./PathResolver-
|
|
14908
|
-
EasClient = (await import('./EasClient-
|
|
14915
|
+
FileManager = (await import('./FileManager-jORQ8Bb6.js')).FileManager;
|
|
14916
|
+
Db = (await import('./Db-CZkONsdT.js')).Db;
|
|
14917
|
+
QueryClient = (await import('./QueryClient-D_UK4YLm.js')).QueryClient;
|
|
14918
|
+
ArweaveClient = (await import('./ArweaveClient-Cs7AL9dp.js')).ArweaveClient;
|
|
14919
|
+
PathResolver = (await import('./PathResolver-B4_X69Rd.js')).PathResolver;
|
|
14920
|
+
EasClient = (await import('./EasClient-qfTiM2we.js')).EasClient;
|
|
14909
14921
|
}
|
|
14910
14922
|
else {
|
|
14911
14923
|
throw new Error(`Unable to determine environment. isBrowser()=${isBrowser()}, isNode()=${isNode()}. Platform-specific implementations could not be loaded.`);
|
|
@@ -18305,7 +18317,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
|
|
|
18305
18317
|
// Lazy import cache for ModelProperty to avoid circular dependency
|
|
18306
18318
|
// Eagerly start loading to minimize delay on first access
|
|
18307
18319
|
let ModelPropertyClass = null;
|
|
18308
|
-
const modelPropertyImportPromise = import('./ModelProperty-
|
|
18320
|
+
const modelPropertyImportPromise = import('./ModelProperty-e_hXSFvf.js')
|
|
18309
18321
|
.then(module => {
|
|
18310
18322
|
ModelPropertyClass = module.ModelProperty;
|
|
18311
18323
|
return ModelPropertyClass;
|
|
@@ -18322,7 +18334,7 @@ function getModelProperty() {
|
|
|
18322
18334
|
}
|
|
18323
18335
|
// Lazy import cache for Schema to avoid circular dependency
|
|
18324
18336
|
let SchemaClass = null;
|
|
18325
|
-
const schemaImportPromise = (async () => { const _mod_10 = await import('./Schema-
|
|
18337
|
+
const schemaImportPromise = (async () => { const _mod_10 = await import('./Schema-DonRkUOJ.js'); return _mod_10.b; })()
|
|
18326
18338
|
.then(module => {
|
|
18327
18339
|
SchemaClass = module.Schema;
|
|
18328
18340
|
return SchemaClass;
|
|
@@ -20063,4 +20075,4 @@ const TModelValues = Type.Record(Type.String(), Type.Any());
|
|
|
20063
20075
|
const TModelSchema = Type.Record(Type.String(), TProperty);
|
|
20064
20076
|
|
|
20065
20077
|
export { getItemData as $, models$1 as A, Boolean$1 as B, properties as C, Date$1 as D, isValidEasAttestationUid as E, File$1 as F, getLatestPublishedVersionRow as G, Html as H, Image as I, Json as J, modelPropertiesToObject as K, List as L, Model as M, Number$1 as N, parseListPropertyValueFromStorage as O, Property as P, getCorrectId as Q, Relation as R, INTERNAL_PROPERTY_NAMES as S, TModelValues as T, defaultAttestationData as U, VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA as V, INTERNAL_DATA_TYPES as W, toSnakeCase as X, getEasSchemaUidForSchemaDefinition as Y, ZERO_BYTES32 as Z, getEasSchemaForItemProperty as _, TModelSchema as a, compareMetadataRowsLatestFirst as a$, resolveStorageNameToSchemaName as a0, appState as a1, BasePathResolver as a2, SEED_CONFIG_FILE as a3, SEED_CONFIG_FALLBACKS as a4, BaseEasClient as a5, EAS_ENDPOINT as a6, BaseQueryClient as a7, arweaveL1FinalizeJobs as a8, config as a9, GET_SEEDS as aA, GET_VERSIONS as aB, GET_PROPERTIES as aC, setSchemaUidForSchemaDefinition as aD, parseEasRelationPropertyName as aE, addModelsToDb$1 as aF, SCHEMA_NJK as aG, ItemProperty as aH, ClientManager as aI, INIT_SCRIPT_SUCCESS_MESSAGE as aJ, SCHEMA_TS as aK, getRefValueType as aL, importJsonSchema as aM, loadSchemaFromFile as aN, readJsonImportFile as aO, syncSchemaFromSource as aP, transformImportToSchemaFile as aQ, writeProcessMachine as aR, getModelIdByFileId as aS, waitForEntityIdle as aT, createReactiveProxy as aU, findEntity as aV, forceRemoveFromCaches as aW, runDestroyLifecycle as aX, getModelId as aY, isPlaceholderUid as aZ, normalizeBytes32Hex as a_, easSyncProcesses as aa, metadata$1 as ab, modelRelations as ac, modelSchemas as ad, modelUids as ae, modelsRelations as af, propertiesRelations as ag, propertyUidRelations as ah, propertyUids as ai, publishProcesses as aj, schemas as ak, uploadProcesses as al, versions as am, graphql as an, getPropertyIdForModelAndName as ao, getAllAddressesFromDb as ap, getModelSchemasFromEas as aq, getSeedsFromSchemaUids as ar, getItemVersionsFromEas as as, getItemPropertiesFromEas as at, pickLatestPropertyAttestationsByRefAndSchema as au, scheduleBulkFilesDownloadFromEasSync as av, eventEmitter as aw, EAS_SEED_DATA_SYNCED_TO_DB_EVENT as ax, generateId as ay, escapeSqliteString as az, ModelPropertyDataTypes as b, isInternalSchema as b$, getArweaveUrlForTransaction as b0, ADDRESSES_PERSISTED_EVENT as b1, parseAddressesPersistedPayload as b2, getClient as b3, ClientManagerState as b4, MachineIds as b5, createNewItem as b6, getVersionData$1 as b7, getMetadataLatest as b8, loadAllSchemasFromDb as b9, queryArweaveGatewayTransaction as bA, queryArweaveGatewayTransactionWithFallback as bB, ensureReadGatewaySelected as bC, invalidateReadGatewayCache as bD, resetArweaveReadGatewayForTests as bE, setUploadExecutor as bF, getUploadExecutor as bG, setGetPublisherForNewSeeds as bH, getGetPublisherForNewSeeds as bI, setRevokeExecutor as bJ, getRevokeExecutor as bK, setAdditionalSyncAddresses as bL, createSchema as bM, readSchema as bN, listCompleteSchemaFiles as bO, getSchemaNameFromId as bP, easSyncActor as bQ, startEasSyncActor as bR, sendEasSyncClientRequest as bS, requestEasSyncFromAddressChange as bT, requestEasSyncFromEventBus as bU, requestEasSyncFromModelsInit as bV, mergeEasSyncRequestIntents as bW, addSchemaToDb as bX, createModelsFromJson as bY, loadModelsFromDbForSchema as bZ, getLatestSchemaVersion as b_, propertyMachine as ba, SEED_PROTOCOL_SCHEMA_NAME as bb, ImageSize as bc, setSchemaUidForModel as bd, getCanonicalItemPropertiesFromEas as be, getEasSchemaUidBySchemaName as bf, getSeedsBySchemaName as bg, withExcludeRevokedFilter as bh, classifyMediaRef as bi, resolveMediaRef as bj, normalizeFeedItemFields as bk, getFeedItemStringField as bl, SeedModels as bm, DEFAULT_ARWEAVE_HOST as bn, DEFAULT_ARWEAVE_GATEWAYS as bo, DEFAULT_ARWEAVE_GRAPHQL_URL as bp, getDefaultArweaveReadGatewayHostsOrdered as bq, mergePrimaryHostWithDefaults as br, isKnownArweaveGatewayHostname as bs, getAddressesForItemsFilter as bt, normalizeUploadApiBaseUrl as bu, getUploadApiArweaveDataUrl as bv, getUploadPipelineTransactionStatus as bw, getUploadApiArweaveStatusUrl as bx, getArweaveUploadStatus as by, isArweaveL1AnchoringComplete as bz, TPropertyDataType as c, createModelFromJson as c0, ConflictError as c1, unloadEntity as c2, clearDestroySubscriptions as c3, setupEntityLiveQuery as c4, ModelSchema as c5, BaseFileManager$1 as c6, db as c7, eas as c8, getPropertyData$1 as c9, Item$1 as ca, schema as cb, SEEDPROTOCOL_Seed_Protocol_v1 as cc, Model$1 as cd, TStorageType as d, THtmlEmbeddedDataUriPolicy as e, TProperty as f, TPropertyConstructor as g, TPropertyDefs as h, PropertyMetadataKey as i, PropertyConstructor as j, Text as k, DEFAULT_TEXT_MAX_LENGTH as l, TValidationRules as m, normalizeDataType as n, getOwnedAddressesFromDb as o, BaseDb as p, getGetAdditionalSyncAddresses as q, resolveSeedIdsFromRefString as r, seeds as s, normalizeRelationPropertyValue as t, Item as u, BaseFileManager as v, getContentHash as w, htmlEmbeddedImageCoPublish as x, BaseArweaveClient as y, getEasSchemaUidForModel as z };
|
|
20066
|
-
//# sourceMappingURL=index-
|
|
20078
|
+
//# sourceMappingURL=index-BcXKZQpX.js.map
|