mnfst 0.5.16 → 0.5.17
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/manifest.data.js +48 -5
- package/package.json +1 -1
package/dist/manifest.data.js
CHANGED
|
@@ -5877,6 +5877,54 @@ function createNestedObjectProxy(objTarget, dataSourceName = null, reloadDataSou
|
|
|
5877
5877
|
// This ensures we never use Alpine-wrapped objects
|
|
5878
5878
|
let objectToProxy = value;
|
|
5879
5879
|
|
|
5880
|
+
// CRITICAL: If rawTarget is already proxied, check if the value itself is proxied before creating new proxy
|
|
5881
|
+
// This prevents infinite recursion when Alpine wraps our proxy and accesses nested properties
|
|
5882
|
+
if (isRawTargetProxied) {
|
|
5883
|
+
// Get the raw nested object from store to check cache
|
|
5884
|
+
const newPath = [...path, key];
|
|
5885
|
+
let rawNestedObject = objectToProxy;
|
|
5886
|
+
|
|
5887
|
+
try {
|
|
5888
|
+
const getRawData = window.ManifestDataStore?.getRawData;
|
|
5889
|
+
if (getRawData && dataSourceName) {
|
|
5890
|
+
const rawDataSource = getRawData(dataSourceName);
|
|
5891
|
+
if (rawDataSource && typeof rawDataSource === 'object') {
|
|
5892
|
+
let current = rawDataSource;
|
|
5893
|
+
let pathValid = true;
|
|
5894
|
+
for (let i = 0; i < newPath.length; i++) {
|
|
5895
|
+
const pathKey = newPath[i];
|
|
5896
|
+
if (current && typeof current === 'object' && pathKey in current) {
|
|
5897
|
+
current = current[pathKey];
|
|
5898
|
+
} else {
|
|
5899
|
+
pathValid = false;
|
|
5900
|
+
break;
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5903
|
+
if (pathValid && current) {
|
|
5904
|
+
rawNestedObject = current;
|
|
5905
|
+
}
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
} catch (e) {
|
|
5909
|
+
// Silently handle errors
|
|
5910
|
+
}
|
|
5911
|
+
|
|
5912
|
+
// If the nested object is already proxied, return the cached proxy
|
|
5913
|
+
if (window.ManifestDataProxiesCore?.nestedObjectProxyCache?.has(rawNestedObject)) {
|
|
5914
|
+
const cachedProxy = window.ManifestDataProxiesCore.nestedObjectProxyCache.get(rawNestedObject);
|
|
5915
|
+
if (cachedProxy) {
|
|
5916
|
+
if (activeProps) {
|
|
5917
|
+
activeProps.delete(propKey);
|
|
5918
|
+
}
|
|
5919
|
+
return cachedProxy;
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
|
|
5923
|
+
// If rawTarget is proxied but nested object isn't, we still need to create a proxy
|
|
5924
|
+
// But use the raw nested object from store as the target
|
|
5925
|
+
objectToProxy = rawNestedObject;
|
|
5926
|
+
}
|
|
5927
|
+
|
|
5880
5928
|
// CRITICAL: Check if this object is already a proxy we created to prevent infinite recursion
|
|
5881
5929
|
// This can happen when Alpine wraps our proxy and accesses properties on the wrapped proxy
|
|
5882
5930
|
if (window.ManifestDataProxiesCore?.nestedObjectProxyCache?.has(objectToProxy)) {
|
|
@@ -10017,11 +10065,6 @@ function registerFilesDirective() {
|
|
|
10017
10065
|
if (storeProject) {
|
|
10018
10066
|
latestProject = storeProject; // Use latest from store
|
|
10019
10067
|
} else {
|
|
10020
|
-
console.warn('[DEBUG x-data-files] Project not found in store:', {
|
|
10021
|
-
directiveInstanceId,
|
|
10022
|
-
currentProjectId,
|
|
10023
|
-
availableProjectIds: projects.map(p => p.$id)
|
|
10024
|
-
});
|
|
10025
10068
|
}
|
|
10026
10069
|
}
|
|
10027
10070
|
|