holosphere 1.3.0-alpha7 → 1.3.0-alpha8
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/content.js +38 -4
- package/hologram.js +7 -1
- package/holosphere-bundle.esm.js +46 -6
- package/holosphere-bundle.js +46 -6
- package/holosphere-bundle.min.js +8 -8
- package/package.json +1 -1
- package/utils.js +16 -0
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -84,7 +84,23 @@ export function subscribe(holoInstance, holon, lens, callback) {
|
|
|
84
84
|
try {
|
|
85
85
|
let parsed = await holoInstance.parse(data);
|
|
86
86
|
if (parsed && holoInstance.isHologram(parsed)) {
|
|
87
|
+
const hologramSoul = parsed.soul;
|
|
87
88
|
const resolved = await holoInstance.resolveHologram(parsed, { followHolograms: true });
|
|
89
|
+
if (resolved === null) {
|
|
90
|
+
// Emit the SAME janitor-parseable warning that
|
|
91
|
+
// `get`/`getAll` emit on an unresolved hologram. The
|
|
92
|
+
// live subscribe path is the dashboard's primary read
|
|
93
|
+
// channel; without this line a genuinely-dangling
|
|
94
|
+
// pointer (source tombstoned/deleted) re-fires here on
|
|
95
|
+
// every map update and is never garbage-collected.
|
|
96
|
+
// `resolveHologram`'s own "Could not resolve hologram
|
|
97
|
+
// soul" log carries only the SOURCE soul, not the
|
|
98
|
+
// LOCAL pointer (holon/lens/key) a cleaner needs to
|
|
99
|
+
// delete it — so a console-hook janitor can't act on
|
|
100
|
+
// it. Note we still pass `null` to the callback below
|
|
101
|
+
// (consumers treat it as "item absent", unchanged).
|
|
102
|
+
console.warn(`Hologram at ${holon}/${lens}/${key} did not resolve (soul=${hologramSoul}); skipping.`);
|
|
103
|
+
}
|
|
88
104
|
if (resolved !== parsed) {
|
|
89
105
|
parsed = resolved;
|
|
90
106
|
}
|