@seedprotocol/sdk 0.7.4-next.793.g6dd83dd → 0.7.4
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/{BasePathResolver-DT63t0XU.js → BasePathResolver-DrzGVH9L.js} +231 -39
- package/dist/BasePathResolver-DrzGVH9L.js.map +1 -0
- package/dist/{ClientManager-Cos8NaRU.js → ClientManager-Dfu4jcgm.js} +300 -188
- package/dist/ClientManager-Dfu4jcgm.js.map +1 -0
- package/dist/{Item-CoP48bl3.js → Item-BUUFuywT.js} +75 -219
- package/dist/Item-BUUFuywT.js.map +1 -0
- package/dist/{ModelProperty-jSo2QWIc.js → ModelProperty-B6cnRvIz.js} +37 -38
- package/dist/ModelProperty-B6cnRvIz.js.map +1 -0
- package/dist/{Schema-DN1KwJ57.js → Schema-Bf-jOLq0.js} +36 -35
- package/dist/{Schema-DN1KwJ57.js.map → Schema-Bf-jOLq0.js.map} +1 -1
- package/dist/{SchemaValidationService-CCG9Bu__.js → SchemaValidationService-BNYMacsx.js} +7 -8
- package/dist/{SchemaValidationService-CCG9Bu__.js.map → SchemaValidationService-BNYMacsx.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-D8t61oNl.js → backfillMetadataPropertyIds-C2-s_jUa.js} +4 -5
- package/dist/{backfillMetadataPropertyIds-D8t61oNl.js.map → backfillMetadataPropertyIds-C2-s_jUa.js.map} +1 -1
- package/dist/{configurePlatform-Su9vV5qO.js → configurePlatform-BzfirKuM.js} +3 -4
- package/dist/{configurePlatform-Su9vV5qO.js.map → configurePlatform-BzfirKuM.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-DcWDZ8KP.js → detachRowsBeforeDelete-B0Daoz9Z.js} +3 -4
- package/dist/{detachRowsBeforeDelete-DcWDZ8KP.js.map → detachRowsBeforeDelete-B0Daoz9Z.js.map} +1 -1
- package/dist/{eas-Ce0KDpvb.js → eas-Dq5Kx_Nd.js} +14 -32
- package/dist/eas-Dq5Kx_Nd.js.map +1 -0
- package/dist/{errors-D1brJy1k.js → errors-DdWbxb_n.js} +42 -39
- package/dist/errors-DdWbxb_n.js.map +1 -0
- package/dist/{getItem-Cs5IIZCQ.js → getItem-9bYSErSj.js} +4 -5
- package/dist/{getItem-Cs5IIZCQ.js.map → getItem-9bYSErSj.js.map} +1 -1
- package/dist/{getPublishPayload-CquFaK1c.js → getPublishPayload-DPy-uMrR.js} +28 -29
- package/dist/getPublishPayload-DPy-uMrR.js.map +1 -0
- package/dist/{getPublishUploads-Bv9aOq2x.js → getPublishUploads-J-143iSV.js} +10 -11
- package/dist/{getPublishUploads-Bv9aOq2x.js.map → getPublishUploads-J-143iSV.js.map} +1 -1
- package/dist/{index-BPrJV9Wt.js → index-7y2f_iQz.js} +2 -2
- package/dist/index-7y2f_iQz.js.map +1 -0
- package/dist/{index-DhP5gMMF.js → index-C61Rxy0F.js} +9 -10
- package/dist/index-C61Rxy0F.js.map +1 -0
- package/dist/{index.browser-cpZehMwT.js → index.browser-C1pisOEa.js} +10 -10
- package/dist/{index.browser-cpZehMwT.js.map → index.browser-C1pisOEa.js.map} +1 -1
- package/dist/{index.node-D_-a9z-S.js → index.node-BAlST8pD.js} +6 -6
- package/dist/{index.node-D_-a9z-S.js.map → index.node-BAlST8pD.js.map} +1 -1
- package/dist/main.js +27 -28
- package/dist/main.js.map +1 -1
- package/dist/node.js +12 -13
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +6 -7
- package/dist/platform.browser.js.map +1 -1
- package/dist/platform.node.js +5 -6
- package/dist/platform.node.js.map +1 -1
- package/dist/{property-DNfhGsdq.js → property-zFPMtR3T.js} +10 -14
- package/dist/property-zFPMtR3T.js.map +1 -0
- package/dist/{propertyValidationRules-BiEBQvPZ.js → propertyValidationRules-CeFVhdQg.js} +10 -10
- package/dist/{propertyValidationRules-BiEBQvPZ.js.map → propertyValidationRules-CeFVhdQg.js.map} +1 -1
- package/dist/{publishDraftGraph-BZ6gku_X.js → publishDraftGraph-CuVq6iAR.js} +7 -6
- package/dist/{publishDraftGraph-BZ6gku_X.js.map → publishDraftGraph-CuVq6iAR.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-CkSoBEOU.js → resetAmbiguousLegacyItemData-DsFTnMBz.js} +5 -6
- package/dist/resetAmbiguousLegacyItemData-DsFTnMBz.js.map +1 -0
- package/dist/{resolveModelForSyncedSeed-CsnKV72V.js → resolveModelForSyncedSeed-RUsgAZXG.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-CsnKV72V.js.map → resolveModelForSyncedSeed-RUsgAZXG.js.map} +1 -1
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +4 -4
- package/dist/src/Model/Model.d.ts +3 -2
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/ModelProperty/ModelProperty.d.ts +1 -1
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +1 -1
- package/dist/src/Schema/service/schemaMachine.d.ts +2 -2
- package/dist/src/client/ClientManager.d.ts +6 -6
- package/dist/src/client/clientManagerMachine.d.ts +2 -2
- package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
- package/dist/src/db/canonicalizeModelTypes.d.ts +18 -0
- package/dist/src/db/canonicalizeModelTypes.d.ts.map +1 -0
- package/dist/src/db/read/getModelSchemas.d.ts +6 -0
- package/dist/src/db/read/getModelSchemas.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/resolveModelRecord.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +20 -0
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +3 -1
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts +12 -0
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/imports/json.d.ts +10 -0
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/query/createLocalQueryDataSource.d.ts.map +1 -1
- package/dist/src/types/import.d.ts +4 -0
- package/dist/src/types/import.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CfRijZhj.js → syncDbWithEas-CRpnkq00.js} +157 -61
- package/dist/syncDbWithEas-CRpnkq00.js.map +1 -0
- package/dist/{tabEvents-D5X2Hwcp.js → tabEvents-nBUq_1u1.js} +6 -6
- package/dist/{tabEvents-D5X2Hwcp.js.map → tabEvents-nBUq_1u1.js.map} +1 -1
- package/dist/{tolerantWebAccess-BNYRvW9a.js → tolerantWebAccess-DIt3R8_u.js} +7 -8
- package/dist/{tolerantWebAccess-BNYRvW9a.js.map → tolerantWebAccess-DIt3R8_u.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-B-xAQxaj.js → updateSeedRevokedAt-DtTPSzpM.js} +3 -3
- package/dist/{updateSeedRevokedAt-B-xAQxaj.js.map → updateSeedRevokedAt-DtTPSzpM.js.map} +1 -1
- package/package.json +5 -5
- package/dist/BasePathResolver-DT63t0XU.js.map +0 -1
- package/dist/ClientManager-Cos8NaRU.js.map +0 -1
- package/dist/Item-CoP48bl3.js.map +0 -1
- package/dist/ModelProperty-jSo2QWIc.js.map +0 -1
- package/dist/eas-Ce0KDpvb.js.map +0 -1
- package/dist/errors-D1brJy1k.js.map +0 -1
- package/dist/getPublishPayload-CquFaK1c.js.map +0 -1
- package/dist/index-BPrJV9Wt.js.map +0 -1
- package/dist/index-DhP5gMMF.js.map +0 -1
- package/dist/property-DNfhGsdq.js.map +0 -1
- package/dist/resetAmbiguousLegacyItemData-CkSoBEOU.js.map +0 -1
- package/dist/syncDbWithEas-CfRijZhj.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as getItemData, I as Item } from './Item-
|
|
1
|
+
import { g as getItemData, I as Item } from './Item-BUUFuywT.js';
|
|
2
2
|
import { startCase } from 'lodash-es';
|
|
3
3
|
import 'xstate';
|
|
4
|
-
import './BasePathResolver-
|
|
4
|
+
import './BasePathResolver-DrzGVH9L.js';
|
|
5
5
|
import 'debug';
|
|
6
6
|
import '@seedprotocol/arweave';
|
|
7
7
|
import '@seedprotocol/eas';
|
|
@@ -9,7 +9,6 @@ import 'pluralize';
|
|
|
9
9
|
import '@sinclair/typebox';
|
|
10
10
|
import 'drizzle-orm/sqlite-core';
|
|
11
11
|
import 'drizzle-orm';
|
|
12
|
-
import 'drizzle-orm/casing';
|
|
13
12
|
import 'nanoid';
|
|
14
13
|
import 'nanoid-dictionary';
|
|
15
14
|
import '@seedprotocol/query';
|
|
@@ -17,7 +16,7 @@ import '@noble/hashes/sha256';
|
|
|
17
16
|
import '@noble/hashes/sha3';
|
|
18
17
|
import '@noble/hashes/utils';
|
|
19
18
|
import 'rxjs';
|
|
20
|
-
import './tabEvents-
|
|
19
|
+
import './tabEvents-nBUq_1u1.js';
|
|
21
20
|
import './model-oHA3YhOd.js';
|
|
22
21
|
|
|
23
22
|
const getItem = async ({ modelName, seedLocalId, seedUid }) => {
|
|
@@ -43,4 +42,4 @@ const getItem = async ({ modelName, seedLocalId, seedUid }) => {
|
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
export { getItem };
|
|
46
|
-
//# sourceMappingURL=getItem-
|
|
45
|
+
//# sourceMappingURL=getItem-9bYSErSj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getItem-
|
|
1
|
+
{"version":3,"file":"getItem-9bYSErSj.js","sources":["../../src/db/read/getItem.ts"],"sourcesContent":["import { getItemData } from './getItemData'\nimport { GetItem } from '@/types'\nimport { Item } from '@/Item/Item'\nimport { startCase } from 'lodash-es'\n\nexport const getItem: GetItem = async ({ modelName, seedLocalId, seedUid }) => {\n const itemInitObj = await getItemData({\n modelName,\n seedLocalId,\n seedUid,\n })\n\n if (!itemInitObj) {\n console.error(\n `[db/queries] [getItem] no itemInitObj modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.seedLocalId) {\n console.error(\n `[db/queries] [getItem] no itemInitObj.seedLocalId modelName: ${modelName} seedLocalId: ${seedLocalId} seedUid: ${seedUid}`,\n )\n return\n }\n\n if (!itemInitObj.modelName && itemInitObj.type) {\n itemInitObj.modelName = startCase(itemInitObj.type)\n }\n\n // DB + loadOrCreateItem + concurrent property saves (e.g. during publish) can exceed the default 5s idle wait.\n const getItemReadyTimeoutMs = 120_000\n return Item.create(itemInitObj, { readyTimeout: getItemReadyTimeoutMs })\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,OAAO,GAAY,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAI;AAC5E,IAAA,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC;QACpC,SAAS;QACT,WAAW;QACX,OAAO;AACR,KAAA,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,KAAK,CACX,CAAA,iDAAA,EAAoD,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAChH;QACD;IACF;AAEA,IAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5B,OAAO,CAAC,KAAK,CACX,CAAA,6DAAA,EAAgE,SAAS,CAAA,cAAA,EAAiB,WAAW,CAAA,UAAA,EAAa,OAAO,CAAA,CAAE,CAC5H;QACD;IACF;IAEA,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,EAAE;QAC9C,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD;;IAGA,MAAM,qBAAqB,GAAG,MAAO;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAC1E;;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { getPropertySchema } from './property-DNfhGsdq.js';
|
|
1
|
+
import { isValidEasAttestationUid, easName, getEasSchemaUidForSchemaDefinition } from '@seedprotocol/eas';
|
|
2
|
+
import { ab as isNode, ac as ZERO_BYTES32, E as BaseDb, ad as resolveModelRecord, ae as getItemModelScope, u as properties, af as VERSION_SCHEMA_UID, M as ModelPropertyDataTypes, s as models, N as resolveSeedIdsFromRefString, O as normalizeRelationPropertyValue, Q as isPublishedSeedRef, o as htmlEmbeddedImageCoPublish, a8 as getCorrectId, ag as INTERNAL_PROPERTY_NAMES, ah as isStorageSeedRef, n as normalizeDataType, ai as defaultAttestationData, aj as INTERNAL_DATA_TYPES, a1 as listRelationEasPropertyName, a2 as easPropertyNameForPublish } from './BasePathResolver-DrzGVH9L.js';
|
|
3
|
+
import { h as getEasSchemaUidForModel, j as getLatestPublishedVersionRow, p as parseListPropertyValueFromStorage } from './Item-BUUFuywT.js';
|
|
4
|
+
import { i as isSeedRevoked, a as getSegmentedItemProperties, f as findRelatedSeedRow, r as relatedModelNameFromDef, h as htmlPropertyNameForHtmlSeed, b as isUnpublishedSeed, c as isLivePublishedSeed, d as draftWalkProperties } from './publishDraftGraph-CuVq6iAR.js';
|
|
5
|
+
import { getPropertySchema } from './property-zFPMtR3T.js';
|
|
7
6
|
import { modelPropertiesToObject } from './model-oHA3YhOd.js';
|
|
8
7
|
import { upperFirst, camelCase } from 'lodash-es';
|
|
9
8
|
import { and, eq, sql } from 'drizzle-orm';
|
|
10
9
|
import debug from 'debug';
|
|
11
10
|
import '@noble/hashes/sha3';
|
|
12
11
|
import '@noble/hashes/utils';
|
|
13
|
-
import './errors-
|
|
12
|
+
import './errors-DdWbxb_n.js';
|
|
14
13
|
|
|
15
14
|
let easSdkPromise;
|
|
16
15
|
/**
|
|
@@ -228,7 +227,7 @@ async function resolveVersionUid(seedLocalId, seedUid) {
|
|
|
228
227
|
if (published?.uid)
|
|
229
228
|
return published.uid;
|
|
230
229
|
try {
|
|
231
|
-
const { getItemVersionsFromEas } = await import('./eas-
|
|
230
|
+
const { getItemVersionsFromEas } = await import('./eas-Dq5Kx_Nd.js');
|
|
232
231
|
const attestations = await getItemVersionsFromEas({ seedUids: [seedUid] });
|
|
233
232
|
const latest = attestations?.[0];
|
|
234
233
|
if (latest?.id)
|
|
@@ -252,17 +251,17 @@ const getPropertyData = async (itemProperty, ctx) => {
|
|
|
252
251
|
}
|
|
253
252
|
return null;
|
|
254
253
|
}
|
|
255
|
-
|
|
256
|
-
//
|
|
257
|
-
|
|
258
|
-
const listRelationName = listRelationEasPropertyName(itemProperty.propertyName,
|
|
259
|
-
const
|
|
260
|
-
(ip.storagePropertyName && ip.storagePropertyName.length > 0
|
|
261
|
-
? ip.storagePropertyName
|
|
262
|
-
: itemProperty.propertyName);
|
|
263
|
-
const propertyNameForSchema = toSnakeCase$1(nameForEas);
|
|
254
|
+
// ADR 0008: list relations publish under their storage name (authors → author_identity_ids),
|
|
255
|
+
// single relations under their schema key (author), never the local authorId.
|
|
256
|
+
const propertyDef = itemProperty.propertyDef;
|
|
257
|
+
const listRelationName = listRelationEasPropertyName(itemProperty.propertyName, propertyDef);
|
|
258
|
+
const propertyNameForSchema = easPropertyNameForPublish(itemProperty.propertyName, propertyDef);
|
|
264
259
|
const schemaDef = `${easDataType} ${propertyNameForSchema}`;
|
|
265
|
-
|
|
260
|
+
// A cached schemaUid was looked up under the property's own name: trust it only when that is
|
|
261
|
+
// the name published (not for a list relation, or a single relation stored as authorId).
|
|
262
|
+
const storageName = itemProperty.storagePropertyName ||
|
|
263
|
+
itemProperty.propertyName;
|
|
264
|
+
let schemaUid = !listRelationName && easName(storageName) === propertyNameForSchema ? itemProperty.schemaUid : undefined;
|
|
266
265
|
if (!schemaUid) {
|
|
267
266
|
schemaUid = await getEasSchemaUidForSchemaDefinition({ schemaText: schemaDef });
|
|
268
267
|
}
|
|
@@ -295,13 +294,13 @@ const ensurePropertyDefs = async (targetItem) => {
|
|
|
295
294
|
schema = await getPropertySchema(targetItem.modelName, itemProperty.propertyName, targetScope);
|
|
296
295
|
if (!schema) {
|
|
297
296
|
try {
|
|
298
|
-
const _mod_0 = await import('./errors-
|
|
297
|
+
const _mod_0 = await import('./errors-DdWbxb_n.js');
|
|
299
298
|
const _ns_0 = _mod_0.h;
|
|
300
299
|
const { Model } = _ns_0;
|
|
301
300
|
const normalizedModelName = upperFirst(camelCase(targetItem.modelName));
|
|
302
301
|
let model = Model.resolve(normalizedModelName, targetScope);
|
|
303
302
|
if (!model?.properties?.length && !targetScope.modelFileId) {
|
|
304
|
-
model = Model.findByModelType(
|
|
303
|
+
model = Model.findByModelType(easName(targetItem.modelName));
|
|
305
304
|
}
|
|
306
305
|
const modelFound = !!model;
|
|
307
306
|
const propsCount = model?.properties?.length ?? 0;
|
|
@@ -466,7 +465,7 @@ const processBasicProperties = async (itemBasicProperties, itemPublishData, ctx,
|
|
|
466
465
|
}
|
|
467
466
|
// Validate against property validation rules (enum, pattern, minLength, maxLength) before encoding
|
|
468
467
|
if (propertyDef?.validation) {
|
|
469
|
-
const { SchemaValidationService } = await import('./SchemaValidationService-
|
|
468
|
+
const { SchemaValidationService } = await import('./SchemaValidationService-BNYMacsx.js');
|
|
470
469
|
const validationService = new SchemaValidationService();
|
|
471
470
|
const validationResult = validationService.validatePropertyValue(value, normalizeDataType(propertyDef.dataType), propertyDef.validation, propertyDef.refValueType
|
|
472
471
|
? normalizeDataType(propertyDef.refValueType)
|
|
@@ -606,8 +605,8 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
606
605
|
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Html) ||
|
|
607
606
|
matchesDataType(relationOrImageProperty.propertyDef?.refValueType, ModelPropertyDataTypes.Json)));
|
|
608
607
|
if (isStorageSeed && (context.seedLocalId || context.seedUid)) {
|
|
609
|
-
const _mod_1 = await import('./Item-
|
|
610
|
-
const _ns_1 = _mod_1.
|
|
608
|
+
const _mod_1 = await import('./Item-BUUFuywT.js');
|
|
609
|
+
const _ns_1 = _mod_1.a5;
|
|
611
610
|
const { getPropertyData: getPropertyDataFromDb } = _ns_1;
|
|
612
611
|
const metaRow = await getPropertyDataFromDb({
|
|
613
612
|
propertyName: relationOrImageProperty.propertyName,
|
|
@@ -697,7 +696,7 @@ const processRelationOrImageProperty = async (relationOrImageProperty, multiPubl
|
|
|
697
696
|
return multiPublishPayload;
|
|
698
697
|
}
|
|
699
698
|
// Use dynamic import to break circular dependency
|
|
700
|
-
const getItemMod = await import('./getItem-
|
|
699
|
+
const getItemMod = await import('./getItem-9bYSErSj.js');
|
|
701
700
|
const { getItem } = getItemMod;
|
|
702
701
|
const relatedItem = await getItem(relatedSeed ? { seedLocalId: relatedSeed.seedLocalId } : { seedLocalId, seedUid });
|
|
703
702
|
if (noteRelatedSeed(ctx, normalizedRef, relatedSeed, relationOrImageProperty.propertyName, relatedItem?.modelName ?? relatedModelNameFromDef(relationOrImageProperty.propertyDef))) {
|
|
@@ -879,7 +878,7 @@ async function processHtmlEmbeddedCoPublishImagePayloads(item, multiPublishPaylo
|
|
|
879
878
|
if (rows.length === 0)
|
|
880
879
|
return multiPublishPayload;
|
|
881
880
|
const forceFullSnapshot = buildOpts?.forceFullSnapshot === true;
|
|
882
|
-
const getItemMod = await import('./getItem-
|
|
881
|
+
const getItemMod = await import('./getItem-9bYSErSj.js');
|
|
883
882
|
const { getItem } = getItemMod;
|
|
884
883
|
const doneImages = new Set();
|
|
885
884
|
for (const row of rows) {
|
|
@@ -1020,7 +1019,7 @@ const processListProperty = async (listProperty, multiPublishPayload, uploadedTr
|
|
|
1020
1019
|
if (memberLocalId && ctx.newSeedsInProgress?.has(memberLocalId))
|
|
1021
1020
|
continue;
|
|
1022
1021
|
// Use dynamic import to break circular dependency
|
|
1023
|
-
const getItemMod = await import('./getItem-
|
|
1022
|
+
const getItemMod = await import('./getItem-9bYSErSj.js');
|
|
1024
1023
|
const { getItem } = getItemMod;
|
|
1025
1024
|
const relatedItem = await getItem(relatedSeed ? { seedLocalId: relatedSeed.seedLocalId } : { seedLocalId, seedUid });
|
|
1026
1025
|
if (noteRelatedSeed(ctx, idStr.trim(), relatedSeed, listProperty.propertyName, relatedItem?.modelName ?? relatedModelNameFromDef(listProperty.propertyDef))) {
|
|
@@ -1524,7 +1523,7 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
|
|
|
1524
1523
|
rawList.length > 0 &&
|
|
1525
1524
|
entry._schemaDef &&
|
|
1526
1525
|
(entry._propertyNameForSchema || entry._propertyName)) {
|
|
1527
|
-
const fieldName = entry._propertyNameForSchema ??
|
|
1526
|
+
const fieldName = entry._propertyNameForSchema ?? easName(entry._propertyName);
|
|
1528
1527
|
const resolvedValues = [];
|
|
1529
1528
|
let allSlotsResolved = true;
|
|
1530
1529
|
for (const id of rawList) {
|
|
@@ -1575,7 +1574,7 @@ const resolvePublishPayloadValues = async (multiPayload, resolvedUids) => {
|
|
|
1575
1574
|
const resolvedUid = entry._unresolvedValue && resolvedUids[entry._unresolvedValue];
|
|
1576
1575
|
const easType = entry._easDataType || 'bytes32';
|
|
1577
1576
|
if (resolvedUid && entry._schemaDef && (entry._propertyNameForSchema || entry._propertyName)) {
|
|
1578
|
-
const fieldName = entry._propertyNameForSchema ??
|
|
1577
|
+
const fieldName = entry._propertyNameForSchema ?? easName(entry._propertyName);
|
|
1579
1578
|
const valueForEncode = easType === 'bytes32' ? padUidForBytes32Schema(resolvedUid) : resolvedUid;
|
|
1580
1579
|
const dataEncoder = new SchemaEncoder(entry._schemaDef);
|
|
1581
1580
|
const encodedData = dataEncoder.encodeData([
|
|
@@ -1622,4 +1621,4 @@ var getPublishPayload$1 = /*#__PURE__*/Object.freeze({
|
|
|
1622
1621
|
});
|
|
1623
1622
|
|
|
1624
1623
|
export { PublishValidationFailedError as P, RELATED_ITEM_UNPUBLISHED_CODE as R, RelatedItemUnpublishedError as a, getPublishPayload$1 as g, resolvePublishPayloadValues as r, validateItemForPublish as v };
|
|
1625
|
-
//# sourceMappingURL=getPublishPayload-
|
|
1624
|
+
//# sourceMappingURL=getPublishPayload-DPy-uMrR.js.map
|