mnfst 0.5.101 → 0.5.103
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/lib/manifest.appwrite.auth.js +14 -3
- package/lib/manifest.data.js +23 -13
- package/lib/manifest.integrity.json +2 -2
- package/package.json +1 -1
|
@@ -4611,9 +4611,20 @@ function initializeTeamsConvenience() {
|
|
|
4611
4611
|
const waitForStore = () => {
|
|
4612
4612
|
const store = Alpine.store('auth');
|
|
4613
4613
|
if (store) {
|
|
4614
|
-
//
|
|
4615
|
-
//
|
|
4616
|
-
|
|
4614
|
+
// Decide whether to (re)attach convenience methods. Use a sentinel
|
|
4615
|
+
// that ONLY this module defines — `createTeamFromName`. The earlier
|
|
4616
|
+
// sentinel (`isCreatingTeam`) was unreliable: the store itself
|
|
4617
|
+
// defines an `isCreatingTeam()` stub at init (see manifest.appwrite
|
|
4618
|
+
// .auth.store.js — the "Stub team convenience methods" block), so
|
|
4619
|
+
// `typeof store.isCreatingTeam === 'function'` is true BEFORE this
|
|
4620
|
+
// module runs. The check then fired false-positive and skipped the
|
|
4621
|
+
// whole `if (needsReinitialization)` block below, leaving the real
|
|
4622
|
+
// convenience methods (startEditingMember, createTeamFromName,
|
|
4623
|
+
// cancelEditingMember, saveEditingMember, deleteMember, leaveTeam,
|
|
4624
|
+
// toggleInviteRole, etc.) unattached — surfacing as
|
|
4625
|
+
// "$auth.startEditingMember is not a function" the moment a user
|
|
4626
|
+
// clicked an edit-member button.
|
|
4627
|
+
const needsReinitialization = typeof store.createTeamFromName !== 'function';
|
|
4617
4628
|
|
|
4618
4629
|
// Ensure cache properties are initialized (methods are already in store)
|
|
4619
4630
|
if (!store._permissionCache) store._permissionCache = {};
|
package/lib/manifest.data.js
CHANGED
|
@@ -259,12 +259,16 @@ function deepSeal(obj) {
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
} else {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
// Iterate own enumerable keys via Object.keys instead of for…in +
|
|
263
|
+
// .hasOwnProperty(). The latter throws "hasOwnProperty is not a
|
|
264
|
+
// function" on any object that either lacks the Object prototype
|
|
265
|
+
// (e.g. Object.create(null)) or has a column literally named
|
|
266
|
+
// `hasOwnProperty` shadowing the prototype method — both of which
|
|
267
|
+
// can happen with payloads from Appwrite / arbitrary backends.
|
|
268
|
+
for (const key of Object.keys(obj)) {
|
|
269
|
+
const value = obj[key];
|
|
270
|
+
if (value !== null && typeof value === 'object') {
|
|
271
|
+
deepSeal(value);
|
|
268
272
|
}
|
|
269
273
|
}
|
|
270
274
|
}
|
|
@@ -387,14 +391,20 @@ function createReactiveReferences(data, dataSourceName = null) {
|
|
|
387
391
|
}
|
|
388
392
|
|
|
389
393
|
if (typeof data === 'object') {
|
|
390
|
-
// Create new object with new references for each property
|
|
394
|
+
// Create new object with new references for each property.
|
|
395
|
+
// Iterate via Object.keys() (own enumerable, no prototype walk)
|
|
396
|
+
// rather than for…in + .hasOwnProperty(). The latter pattern
|
|
397
|
+
// throws "hasOwnProperty is not a function" on any payload that
|
|
398
|
+
// either has a column literally named `hasOwnProperty` shadowing
|
|
399
|
+
// the prototype, or lacks the Object prototype entirely
|
|
400
|
+
// (Object.create(null), some SDK response shapes). This is the
|
|
401
|
+
// hot path for every Appwrite mutation result and realtime event,
|
|
402
|
+
// so it must be defensive about arbitrary backend payloads.
|
|
391
403
|
const newObj = {};
|
|
392
|
-
for (const key
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
newObj[key] = createReactiveReferences(value, dataSourceName);
|
|
397
|
-
}
|
|
404
|
+
for (const key of Object.keys(data)) {
|
|
405
|
+
const value = data[key];
|
|
406
|
+
// Recursively create new references for nested objects/arrays
|
|
407
|
+
newObj[key] = createReactiveReferences(value, dataSourceName);
|
|
398
408
|
}
|
|
399
409
|
|
|
400
410
|
// Detect file objects (have mimeType or sizeOriginal)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"manifest.appwrite.auth.js": "sha384-
|
|
2
|
+
"manifest.appwrite.auth.js": "sha384-Kvv9SjOFBFY2LELQunQpKLr3uDT+supgouo93eahEL4dAHntq0F9u8Hoyx85eQKr",
|
|
3
3
|
"manifest.appwrite.data.js": "sha384-00ulLT+GAIuPHA/rRT9p98vYlsyDzkyKXtg86BDQ6FGQa5vVVN+W6kuforniBAsz",
|
|
4
4
|
"manifest.appwrite.presence.js": "sha384-uxRpx9/Jj0kGtklH5QmUlAzD3zdSvFRfK6bcJQqxl+Bsf5tOo4zgwqJTQgtZoHQP",
|
|
5
5
|
"manifest.code.js": "sha384-jYW7i5F+K+mL5d/HKpw/Xoo0vOz/pmlvotGd7MUPOu+CB+O28OohqgPAEI4y6bSS",
|
|
6
6
|
"manifest.color.js": "sha384-Z9G/lzt0vVMxjz4wkPuGG1X9mmQAJR15aOoGX3ephf7r2wnlUWet5GLgkUMtT4vt",
|
|
7
7
|
"manifest.colorpicker.js": "sha384-0EVn+Ha06h7FIvOxc6WjZYnKYXzi+zba08yKvczSEGTRkWRxyKN2TFrZHI1SDCXu",
|
|
8
8
|
"manifest.components.js": "sha384-3dCTD5EwCZTiX+1obYtDNM3WWwPh2JDQUQQsdRUUK3gs6FXjse1ShkKaT/2jsNaI",
|
|
9
|
-
"manifest.data.js": "sha384
|
|
9
|
+
"manifest.data.js": "sha384-A/BGk/9lX8RxKBBs/6lHQWoQYlDrKI6Of7fnrvv4ZQJRpSkdwISOTtb4NISnTuCL",
|
|
10
10
|
"manifest.dropdowns.js": "sha384-WMrFoSpKfJuo81dyrwhVrDO8rq+rDwh2x8x4nH01BY5ZHkvjE+/SaT2gWCI0zOn+",
|
|
11
11
|
"manifest.export.js": "sha384-qvdGz1TiGEDOeWJ5os1z03RURdKX+ezZEQ1KyV+9iC7X0esLK83mtY87t4MQv45t",
|
|
12
12
|
"manifest.icons.js": "sha384-uOkboYrovjCpl22eey3Jaxpey+pOnot5NDnRRumcRxiR7IOVaRh1i20gYnWXR5dW",
|