mnfst 0.5.243 → 0.5.244
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
(function () {
|
|
4
4
|
|
|
5
|
-
const MANIFEST_BUILD_VERSION = '0.5.
|
|
5
|
+
const MANIFEST_BUILD_VERSION = '0.5.244';
|
|
6
6
|
|
|
7
7
|
/* Manifest Data Sources - Appwrite Integration */
|
|
8
8
|
|
|
@@ -132,14 +132,14 @@ async function verifyAuthenticated() {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
// Load rows from Appwrite table
|
|
136
|
-
async function loadTableRows(databaseId, tableId, queries = []) {
|
|
135
|
+
// Load rows from Appwrite table (requireAuth false: no pre-flight, Appwrite permissions decide)
|
|
136
|
+
async function loadTableRows(databaseId, tableId, queries = [], { requireAuth = true } = {}) {
|
|
137
137
|
const services = await getAppwriteDataServices();
|
|
138
138
|
if (!services?.tablesDB) {
|
|
139
139
|
throw new Error('[Manifest Data] Appwrite TablesDB service not available');
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
await verifyAuthenticated();
|
|
142
|
+
if (requireAuth) await verifyAuthenticated();
|
|
143
143
|
|
|
144
144
|
try {
|
|
145
145
|
const response = await services.tablesDB.listRows({
|
package/lib/manifest.data.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
(function () {
|
|
4
4
|
|
|
5
|
-
const MANIFEST_BUILD_VERSION = '0.5.
|
|
5
|
+
const MANIFEST_BUILD_VERSION = '0.5.244';
|
|
6
6
|
|
|
7
7
|
/* Manifest Data Sources - Configuration */
|
|
8
8
|
|
|
@@ -8026,11 +8026,13 @@ function createAppwriteMethodsHandler(dataSourceName, reloadDataSource) {
|
|
|
8026
8026
|
const key = `${dataSourceName}:$query:${JSON.stringify(appwriteQueries.map(q => String(q)))}`;
|
|
8027
8027
|
const { runDeduped, landRows, sourceGeneration } = window.ManifestDataStore || {};
|
|
8028
8028
|
const generation = sourceGeneration?.(dataSourceName);
|
|
8029
|
+
const requireAuth = window.ManifestDataMain?.requiresIdentity?.({ ...dataSource, queries: [dataSource.queries, queries] }) ?? true;
|
|
8029
8030
|
const run = async () => {
|
|
8030
8031
|
const result = await window.ManifestDataAppwrite.loadTableRows(
|
|
8031
8032
|
appwriteConfig.databaseId,
|
|
8032
8033
|
tableId,
|
|
8033
|
-
appwriteQueries
|
|
8034
|
+
appwriteQueries,
|
|
8035
|
+
{ requireAuth }
|
|
8034
8036
|
);
|
|
8035
8037
|
// Network landing: query result replaces the source (coalesced, identity-preserving)
|
|
8036
8038
|
if (result !== undefined && landRows) {
|
|
@@ -11524,10 +11526,16 @@ function authSettledUnresolvable(manifest) {
|
|
|
11524
11526
|
}
|
|
11525
11527
|
|
|
11526
11528
|
// Rows depend on who reads them: scope / $auth. queries, or any Appwrite table/bucket (row/file permissions).
|
|
11527
|
-
// Reset on identity change only;
|
|
11529
|
+
// Reset on identity change only; requiresIdentity gates the auth pre-flight.
|
|
11528
11530
|
function isIdentityBound(config) {
|
|
11529
11531
|
if (!config || typeof config !== 'object') return false;
|
|
11530
11532
|
if (window.ManifestDataConfig?.isAppwriteCollection?.(config)) return true;
|
|
11533
|
+
return requiresIdentity(config);
|
|
11534
|
+
}
|
|
11535
|
+
|
|
11536
|
+
// Reads that need a signed-in identity (scope / $auth. queries); others read with whatever session exists
|
|
11537
|
+
function requiresIdentity(config) {
|
|
11538
|
+
if (!config || typeof config !== 'object') return false;
|
|
11531
11539
|
if (window.ManifestDataConfig?.getScope?.(config)) return true;
|
|
11532
11540
|
try { return JSON.stringify(config.queries || '').includes('$auth.'); } catch { return false; }
|
|
11533
11541
|
}
|
|
@@ -12203,7 +12211,8 @@ async function loadDataSource(dataSourceName, locale = 'en', options = {}) {
|
|
|
12203
12211
|
data = await window.ManifestDataAppwrite.loadTableRows(
|
|
12204
12212
|
appwriteConfig.databaseId,
|
|
12205
12213
|
tableId,
|
|
12206
|
-
queries
|
|
12214
|
+
queries,
|
|
12215
|
+
{ requireAuth: requiresIdentity(dataSource) }
|
|
12207
12216
|
);
|
|
12208
12217
|
if (superseded()) { landed = true; return null; }
|
|
12209
12218
|
|
|
@@ -12576,7 +12585,8 @@ async function initializeDataSourcesPlugin() {
|
|
|
12576
12585
|
loadDataSource,
|
|
12577
12586
|
reloadDataSource,
|
|
12578
12587
|
_loadDataSource: reloadDataSource, // Internal: every user is a reload-after-mutation
|
|
12579
|
-
filterFilesByScope // Export for use by getFilesForEntry
|
|
12588
|
+
filterFilesByScope, // Export for use by getFilesForEntry
|
|
12589
|
+
requiresIdentity
|
|
12580
12590
|
};
|
|
12581
12591
|
|
|
12582
12592
|
// Listen for manifest:dev-reload (fired by mnfst-run when a data file changes).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-dsIWnH0qCAGSzAXMGrd8fvOrVl4tOIE6j5tC35JPTrQXZ56qLD36ARyvhR7vi3Id",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-rC30q9rBFR/prFJ8rseKe2GBKoGEkfT6WLZaz5/lbdZzr+w6XDefgub/vyHgMc0A",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-JyVDWFT69b7Svq8J8p9tNWe2v9PZNQBY5UyhtOl1vnuHFAX0CRQ3MA9SiKq5wzNh",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-vjUCZ1MWu7c4rT/25Ct+nw95+OYUDZ2ouc9pw/gVOXrYZ+iW+LI0+lwvEhXmeMcZ",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"manifest.combobox.js": "sha384-MILTkrgsTzsYUjGo4ZuADqV85Xs4GmfB4xexfe9vbJMIoQTZ42W4zs+DTaVSPEsx",
|
|
12
12
|
"manifest.components.js": "sha384-BUFA8h+G5Plr82sV7bKzO42pPoiRZwRQcKj1lt2ROFiKjjlkayU/vmkAFqEsdBA+",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-PNN+BUdyhlBcNW822on2vOdWlq9tR7+sJHZppI25OfF0w1FIU7Jj9JBvwlhnvNTt",
|
|
15
15
|
"manifest.datepicker.js": "sha384-XnbeURni2X91ozVzatQcSjYYIS4MoW12dBRJnYAGBr0nCQ624heH5s+xtQSpLZX6",
|
|
16
16
|
"manifest.defer.js": "sha384-pMRGqQKiEoJhpUcD40QeM4jEHau7sz9Xn/YCpiUamT1T4xJBZDSiYX+xnVrSWoq+",
|
|
17
17
|
"manifest.device.js": "sha384-g+txmrEszYtuOvRelTp/c1wSNR2AtllVI9rx5NPPD7DzhVUnMNughonZykv2xlBW",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
|
|
29
29
|
"manifest.status.js": "sha384-MBO345ab7H6Uq1X2dZLt4Ge1Gcra+Z2qYApvlAeIV8CJhDDJrz2FPXpp+Kcp8zcM",
|
|
30
30
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
31
|
-
"manifest.sw.js": "sha384-
|
|
31
|
+
"manifest.sw.js": "sha384-pAkPjlgCScvndUFGJmMzi9XBRTIbUoUsiA8m1KPHCnYPMj1K0uR6mLy/998PxKc4",
|
|
32
32
|
"manifest.tabs.js": "sha384-OIIcyaQnGS0eNYk4zgAFEDboNYect7THvUd9D0V6nqCeDOxQcoiqLrBEmmWVTTet",
|
|
33
33
|
"manifest.tailwind.js": "sha384-r/Jvqb+Piz21jUts10BbVAJoKkShOdJRVFpywyi4HPIi/OfOJq5CtPyWAPbdkMgt",
|
|
34
34
|
"manifest.toasts.js": "sha384-3zkWxzw693pxg3QDFsoYCA3CqYaLKmBaMArULXODD66Utolpewl0OAeTB92aWUVv",
|
package/lib/manifest.sw.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// Build stamps the published version here; unstamped (dev) falls back to the
|
|
18
18
|
// registration URL's `v`, then 'dev'.
|
|
19
|
-
const BUILD_VERSION = '0.5.
|
|
19
|
+
const BUILD_VERSION = '0.5.244';
|
|
20
20
|
const CACHE_PREFIX = 'mnfst-sw:';
|
|
21
21
|
const META_CACHE = CACHE_PREFIX + 'meta';
|
|
22
22
|
// Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
|