mnfst 0.5.286 → 0.5.288
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.data.js +1 -1
- package/lib/manifest.data.js +168 -204
- package/lib/manifest.edit.js +2 -2
- package/lib/manifest.integrity.json +6 -6
- package/lib/manifest.localization.js +23 -8
- package/lib/manifest.router.js +19 -8
- package/lib/manifest.sw.js +1 -1
- package/package.json +11 -11
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.288';
|
|
6
6
|
|
|
7
7
|
/* Manifest Data Sources - Configuration */
|
|
8
8
|
|
|
@@ -3298,14 +3298,54 @@ function sameValue(a, b) {
|
|
|
3298
3298
|
try { return JSON.stringify(a) === JSON.stringify(b); } catch { return false; }
|
|
3299
3299
|
}
|
|
3300
3300
|
|
|
3301
|
-
//
|
|
3301
|
+
// Source order before overlapping deletes began: failed deletes return relative to it
|
|
3302
|
+
const deleteOrders = new Map();
|
|
3303
|
+
|
|
3304
|
+
function beginDeleteOrder(dataSourceName) {
|
|
3305
|
+
let entry = deleteOrders.get(dataSourceName);
|
|
3306
|
+
if (!entry) {
|
|
3307
|
+
const { arr } = findRawIndex(dataSourceName, null);
|
|
3308
|
+
entry = { positions: new Map((arr || []).map((row, i) => [row?.$id, i])), count: 0 };
|
|
3309
|
+
deleteOrders.set(dataSourceName, entry);
|
|
3310
|
+
}
|
|
3311
|
+
entry.count++;
|
|
3312
|
+
return entry;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
function endDeleteOrder(dataSourceName, entry) {
|
|
3316
|
+
if (!entry || --entry.count > 0) return;
|
|
3317
|
+
if (deleteOrders.get(dataSourceName) === entry) deleteOrders.delete(dataSourceName);
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
// Where a returning row goes: after its nearest present predecessor in the order, else before its successor
|
|
3321
|
+
function restoreIndex(arr, positions, id, fallback) {
|
|
3322
|
+
const at = positions ? positions.get(id) : undefined;
|
|
3323
|
+
if (at !== undefined) {
|
|
3324
|
+
let before = -1, beforeAt = -1, after = -1, afterAt = Infinity;
|
|
3325
|
+
for (let j = 0; j < arr.length; j++) {
|
|
3326
|
+
const p = positions.get(arr[j]?.$id);
|
|
3327
|
+
if (p === undefined) continue;
|
|
3328
|
+
if (p < at && p > beforeAt) { beforeAt = p; before = j; }
|
|
3329
|
+
else if (p > at && p < afterAt) { afterAt = p; after = j; }
|
|
3330
|
+
}
|
|
3331
|
+
if (before !== -1) return before + 1;
|
|
3332
|
+
if (after !== -1) return after;
|
|
3333
|
+
}
|
|
3334
|
+
return fallback >= 0 && fallback <= arr.length ? fallback : arr.length;
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
// Re-insert a row deleted optimistically (a failed delete); never duplicates one already back
|
|
3302
3338
|
function insertEntryAt(dataSourceName, entry, index, options = {}) {
|
|
3303
3339
|
if (window.ManifestDataStore?.isStaleWrite?.(dataSourceName, options)) return false;
|
|
3304
3340
|
const { store, arr, index: existing } = findRawIndex(dataSourceName, entry?.$id);
|
|
3305
3341
|
if (!store || !arr || existing !== -1) return false;
|
|
3306
3342
|
const ds = window.ManifestDataStore;
|
|
3307
|
-
const
|
|
3308
|
-
|
|
3343
|
+
const row = ds.createReactiveReferences(entry, dataSourceName);
|
|
3344
|
+
if (window.ManifestDataMain?.orderFor?.(dataSourceName) && ds.insertRow) {
|
|
3345
|
+
ds.insertRow(store, dataSourceName, row);
|
|
3346
|
+
} else {
|
|
3347
|
+
store[dataSourceName].splice(restoreIndex(arr, options.order, entry.$id, index), 0, row);
|
|
3348
|
+
}
|
|
3309
3349
|
ds.touchSource(dataSourceName);
|
|
3310
3350
|
clearSourceCaches(dataSourceName);
|
|
3311
3351
|
return true;
|
|
@@ -3365,6 +3405,7 @@ async function executeMutation(mutationConfig) {
|
|
|
3365
3405
|
let resolvedEntryId = entryId;
|
|
3366
3406
|
let held = null; // pending-write token: re-applied over landings until settled
|
|
3367
3407
|
let deletedAt = -1; // a failed delete returns the row to its place
|
|
3408
|
+
let deleteOrder = null;
|
|
3368
3409
|
const ds0 = window.ManifestDataStore;
|
|
3369
3410
|
|
|
3370
3411
|
// Get helper functions from store
|
|
@@ -3419,6 +3460,7 @@ async function executeMutation(mutationConfig) {
|
|
|
3419
3460
|
// Snapshot for rollback
|
|
3420
3461
|
const store = Alpine.store('data');
|
|
3421
3462
|
if (store && store[dataSourceName] && Array.isArray(store[dataSourceName])) {
|
|
3463
|
+
deleteOrder = beginDeleteOrder(dataSourceName);
|
|
3422
3464
|
deletedAt = findRawIndex(dataSourceName, entryId).index;
|
|
3423
3465
|
const found = deletedAt !== -1 ? store[dataSourceName][deletedAt] : null;
|
|
3424
3466
|
originalData = found ? { ...found } : null;
|
|
@@ -3550,7 +3592,7 @@ async function executeMutation(mutationConfig) {
|
|
|
3550
3592
|
}
|
|
3551
3593
|
if (Object.keys(restore).length) updateEntryInStore(dataSourceName, entryId, restore, writeOptions);
|
|
3552
3594
|
} else if (type === 'delete' && originalData) {
|
|
3553
|
-
insertEntryAt(dataSourceName, originalData, deletedAt, writeOptions);
|
|
3595
|
+
insertEntryAt(dataSourceName, originalData, deletedAt, { ...writeOptions, order: deleteOrder?.positions });
|
|
3554
3596
|
}
|
|
3555
3597
|
};
|
|
3556
3598
|
|
|
@@ -3569,6 +3611,8 @@ async function executeMutation(mutationConfig) {
|
|
|
3569
3611
|
}));
|
|
3570
3612
|
|
|
3571
3613
|
throw error;
|
|
3614
|
+
} finally {
|
|
3615
|
+
endDeleteOrder(dataSourceName, deleteOrder);
|
|
3572
3616
|
}
|
|
3573
3617
|
}
|
|
3574
3618
|
|
|
@@ -3666,6 +3710,7 @@ if (typeof window !== 'undefined') {
|
|
|
3666
3710
|
addEntryToStore,
|
|
3667
3711
|
removeEntryFromStore,
|
|
3668
3712
|
rollbackMutation,
|
|
3713
|
+
restoreIndex,
|
|
3669
3714
|
syncEntryFromServer,
|
|
3670
3715
|
generateMutationId,
|
|
3671
3716
|
setupEventDrivenReactivity
|
|
@@ -7590,27 +7635,50 @@ async function writeFileLink(tableName, entryId, fileId, fileIdsColumn) {
|
|
|
7590
7635
|
}
|
|
7591
7636
|
}
|
|
7592
7637
|
|
|
7593
|
-
//
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7638
|
+
// Link columns a table holds a bucket's file ids in: storage mappings, belongsTo, else fileIds
|
|
7639
|
+
function fileLinkColumns(manifest, tableName, tableConfig, bucketId) {
|
|
7640
|
+
const config = window.ManifestDataConfig;
|
|
7641
|
+
const links = [];
|
|
7642
|
+
const storage = tableConfig?.storage;
|
|
7643
|
+
if (storage && typeof storage === 'object') {
|
|
7644
|
+
for (const [bucketName, mapping] of Object.entries(storage)) {
|
|
7645
|
+
if (typeof mapping === 'string') {
|
|
7646
|
+
const bucketSource = manifest.data[bucketName];
|
|
7647
|
+
links.push({ bucket: bucketSource ? config.getAppwriteBucketId(bucketSource) : null, column: mapping });
|
|
7648
|
+
} else if (mapping && typeof mapping === 'object') {
|
|
7649
|
+
links.push({ bucket: mapping.appwriteBucketId || null, column: mapping.column || 'fileIds' });
|
|
7650
|
+
}
|
|
7651
|
+
}
|
|
7652
|
+
}
|
|
7653
|
+
for (const source of Object.values(manifest.data)) {
|
|
7654
|
+
const link = source && typeof source === 'object' ? source.belongsTo : null;
|
|
7655
|
+
if (link?.table === tableName && link.fileIdsColumn) {
|
|
7656
|
+
links.push({ bucket: config.getAppwriteBucketId(source) || null, column: link.fileIdsColumn });
|
|
7657
|
+
}
|
|
7658
|
+
}
|
|
7659
|
+
const known = links.filter(link => link.bucket);
|
|
7660
|
+
const columns = new Set(known.filter(link => !bucketId || link.bucket === bucketId).map(link => link.column));
|
|
7661
|
+
if (!known.some(link => link.column === 'fileIds')) columns.add('fileIds');
|
|
7662
|
+
return [...columns];
|
|
7663
|
+
}
|
|
7664
|
+
|
|
7665
|
+
// Unlink file(s) from every loaded table entry that references them (after a delete)
|
|
7666
|
+
// Returns { tableName: [entryId, ...] }
|
|
7667
|
+
async function unlinkFileFromAllEntries(fileId, options = {}) {
|
|
7597
7668
|
const manifest = await window.ManifestDataConfig.ensureManifest();
|
|
7598
7669
|
if (!manifest?.data) {
|
|
7599
7670
|
return {};
|
|
7600
7671
|
}
|
|
7601
7672
|
|
|
7602
|
-
const
|
|
7603
|
-
if (!
|
|
7673
|
+
const fileIds = (Array.isArray(fileId) ? fileId : [fileId]).map(id => id?.$id || id).filter(Boolean);
|
|
7674
|
+
if (!fileIds.length) {
|
|
7604
7675
|
return {};
|
|
7605
7676
|
}
|
|
7606
7677
|
|
|
7607
|
-
// Find all table data sources that might have fileIds arrays
|
|
7608
7678
|
const tables = Object.entries(manifest.data).filter(([name, config]) =>
|
|
7609
7679
|
config && typeof config === 'object' && window.ManifestDataConfig.getAppwriteTableId(config)
|
|
7610
7680
|
);
|
|
7611
7681
|
|
|
7612
|
-
// Use already-loaded data from Alpine store instead of querying Appwrite
|
|
7613
|
-
// Check if Alpine is available before accessing store
|
|
7614
7682
|
if (typeof Alpine === 'undefined' || !Alpine.store) {
|
|
7615
7683
|
return {};
|
|
7616
7684
|
}
|
|
@@ -7619,52 +7687,46 @@ async function unlinkFileFromAllEntries(fileId) {
|
|
|
7619
7687
|
return {};
|
|
7620
7688
|
}
|
|
7621
7689
|
|
|
7622
|
-
const affectedEntries = {};
|
|
7623
|
-
|
|
7624
|
-
// Do all unlinks in parallel for speed
|
|
7690
|
+
const affectedEntries = {};
|
|
7625
7691
|
const unlinkPromises = [];
|
|
7626
7692
|
|
|
7627
7693
|
for (const [tableName, tableConfig] of tables) {
|
|
7628
7694
|
try {
|
|
7629
|
-
const tableId = window.ManifestDataConfig.getAppwriteTableId(tableConfig);
|
|
7630
7695
|
const appwriteConfig = await window.ManifestDataConfig.getAppwriteConfig(tableConfig);
|
|
7631
|
-
|
|
7632
7696
|
if (!appwriteConfig) continue;
|
|
7633
7697
|
|
|
7634
|
-
// Get already-loaded entries from Alpine store
|
|
7635
7698
|
const entries = store[tableName];
|
|
7636
7699
|
if (!Array.isArray(entries) || entries.length === 0) {
|
|
7637
7700
|
continue;
|
|
7638
7701
|
}
|
|
7639
7702
|
|
|
7640
|
-
|
|
7641
|
-
const
|
|
7642
|
-
const fileIds = entry.fileIds || [];
|
|
7643
|
-
return Array.isArray(fileIds) && fileIds.includes(actualFileId);
|
|
7644
|
-
});
|
|
7703
|
+
const columns = fileLinkColumns(manifest, tableName, tableConfig, options.bucketId);
|
|
7704
|
+
const affected = new Set();
|
|
7645
7705
|
|
|
7646
|
-
|
|
7647
|
-
|
|
7706
|
+
for (const entry of entries) {
|
|
7707
|
+
for (const column of columns) {
|
|
7708
|
+
const linked = entry?.[column];
|
|
7709
|
+
if (!Array.isArray(linked)) continue;
|
|
7710
|
+
for (const id of fileIds) {
|
|
7711
|
+
if (!linked.includes(id)) continue;
|
|
7712
|
+
affected.add(entry.$id);
|
|
7713
|
+
unlinkPromises.push(
|
|
7714
|
+
unlinkFileFromEntry(tableName, entry.$id, id, column).catch(error => {
|
|
7715
|
+
console.warn('[Manifest Data] Could not unlink from', tableName, 'entry', entry.$id, ':', error.message);
|
|
7716
|
+
})
|
|
7717
|
+
);
|
|
7718
|
+
}
|
|
7719
|
+
}
|
|
7648
7720
|
}
|
|
7649
7721
|
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
unlinkPromises.push(
|
|
7653
|
-
unlinkFileFromEntry(tableName, entry.$id, actualFileId, 'fileIds')
|
|
7654
|
-
.then(() => {
|
|
7655
|
-
})
|
|
7656
|
-
.catch(error => {
|
|
7657
|
-
console.warn('[Manifest Data] Could not unlink from', tableName, 'entry', entry.$id, ':', error.message);
|
|
7658
|
-
})
|
|
7659
|
-
);
|
|
7722
|
+
if (affected.size > 0) {
|
|
7723
|
+
affectedEntries[tableName] = [...affected];
|
|
7660
7724
|
}
|
|
7661
7725
|
} catch (error) {
|
|
7662
|
-
// Silently continue - not all tables may have fileIds
|
|
7663
7726
|
console.warn('[Manifest Data] Could not process', tableName, ':', error.message);
|
|
7664
7727
|
}
|
|
7665
7728
|
}
|
|
7666
7729
|
|
|
7667
|
-
// Wait for all unlinks to complete
|
|
7668
7730
|
await Promise.all(unlinkPromises);
|
|
7669
7731
|
|
|
7670
7732
|
return affectedEntries;
|
|
@@ -8413,6 +8475,69 @@ function createAppwriteMethodsHandler(dataSourceName, reloadDataSource) {
|
|
|
8413
8475
|
|
|
8414
8476
|
// Handle storage operations
|
|
8415
8477
|
if (bucketId) {
|
|
8478
|
+
// $delete / $remove: delete each file, land successes locally, then unlink them
|
|
8479
|
+
const deleteBucketFiles = async (fileId) => {
|
|
8480
|
+
const ids = (Array.isArray(fileId) ? fileId : [fileId]).map(id => id?.$id || id);
|
|
8481
|
+
if (Array.isArray(fileId) && !ids.length) return [];
|
|
8482
|
+
if (ids.some(id => !id)) {
|
|
8483
|
+
throw new Error(`[Manifest Data] ${method} requires file ID`);
|
|
8484
|
+
}
|
|
8485
|
+
const ds = window.ManifestDataStore;
|
|
8486
|
+
const generation = ds?.sourceGeneration?.(dataSourceName);
|
|
8487
|
+
const executeMutation = window.ManifestDataMutations?.executeMutation;
|
|
8488
|
+
const deleteOne = id => executeMutation
|
|
8489
|
+
? executeMutation({
|
|
8490
|
+
type: 'delete',
|
|
8491
|
+
dataSourceName,
|
|
8492
|
+
entryId: id,
|
|
8493
|
+
apiCall: () => window.ManifestDataAppwrite.deleteFile(bucketId, id),
|
|
8494
|
+
options: { scope, bucketId, appwriteConfig }
|
|
8495
|
+
})
|
|
8496
|
+
: window.ManifestDataAppwrite.deleteFile(bucketId, id);
|
|
8497
|
+
|
|
8498
|
+
const settled = await Promise.allSettled(ids.map(deleteOne));
|
|
8499
|
+
const deleted = ids.filter((id, i) => settled[i].status === 'fulfilled');
|
|
8500
|
+
|
|
8501
|
+
// Never a relist: an unfiltered listing would bypass the source's queries and scope
|
|
8502
|
+
if (deleted.length && ds?.landRemove) {
|
|
8503
|
+
await ds.landRemove(dataSourceName, deleted, { generation });
|
|
8504
|
+
}
|
|
8505
|
+
|
|
8506
|
+
// Unlink only what the server deleted
|
|
8507
|
+
const unlink = window.ManifestDataProxiesFiles?.unlinkFileFromAllEntries;
|
|
8508
|
+
const affected = await Promise.all(deleted.map(async id => {
|
|
8509
|
+
try {
|
|
8510
|
+
return unlink ? await unlink(id, { bucketId }) || {} : {};
|
|
8511
|
+
} catch (unlinkError) {
|
|
8512
|
+
console.warn('[Manifest Data] Failed to unlink deleted file from entries:', unlinkError);
|
|
8513
|
+
return {};
|
|
8514
|
+
}
|
|
8515
|
+
}));
|
|
8516
|
+
|
|
8517
|
+
const tables = new Set(affected.flatMap(entries => Object.keys(entries)));
|
|
8518
|
+
const reloadDataSourceFunc = window.ManifestDataMain?._loadDataSource;
|
|
8519
|
+
if (reloadDataSourceFunc) {
|
|
8520
|
+
for (const tableName of tables) {
|
|
8521
|
+
reloadDataSourceFunc(tableName).catch(err => {
|
|
8522
|
+
console.warn(`[Manifest Data] Failed to reload ${tableName} after file delete:`, err);
|
|
8523
|
+
});
|
|
8524
|
+
}
|
|
8525
|
+
}
|
|
8526
|
+
|
|
8527
|
+
deleted.forEach((id, i) => {
|
|
8528
|
+
const linked = Object.entries(affected[i]).filter(([, entryIds]) => Array.isArray(entryIds) && entryIds.length);
|
|
8529
|
+
for (const [tableName, entryIds] of linked.length ? linked : [[null, []]]) {
|
|
8530
|
+
window.dispatchEvent(new CustomEvent('manifest:file-deleted', { detail: { fileId: id, tableName, entryIds } }));
|
|
8531
|
+
}
|
|
8532
|
+
window.dispatchEvent(new CustomEvent('manifest:file-deleted', { detail: { fileId: id, tableName: null, entryIds: [], bucketId } }));
|
|
8533
|
+
});
|
|
8534
|
+
|
|
8535
|
+
const failed = settled.find(r => r.status === 'rejected');
|
|
8536
|
+
if (failed) throw failed.reason;
|
|
8537
|
+
const results = settled.map(r => r.value);
|
|
8538
|
+
return Array.isArray(fileId) ? results : results[0];
|
|
8539
|
+
};
|
|
8540
|
+
|
|
8416
8541
|
if (method === '$create') {
|
|
8417
8542
|
let [fileId, file, permissions, onProgress] = args;
|
|
8418
8543
|
|
|
@@ -8734,85 +8859,7 @@ function createAppwriteMethodsHandler(dataSourceName, reloadDataSource) {
|
|
|
8734
8859
|
|
|
8735
8860
|
return result;
|
|
8736
8861
|
} else if (method === '$delete') {
|
|
8737
|
-
|
|
8738
|
-
const actualFileId = fileId?.$id || fileId;
|
|
8739
|
-
|
|
8740
|
-
// Before deleting, unlink file from any table entries that reference it
|
|
8741
|
-
// This prevents orphaned references (best-effort cleanup)
|
|
8742
|
-
try {
|
|
8743
|
-
const unlinkFileFromAllEntries = window.ManifestDataProxiesFiles?.unlinkFileFromAllEntries;
|
|
8744
|
-
if (unlinkFileFromAllEntries) {
|
|
8745
|
-
await unlinkFileFromAllEntries(actualFileId);
|
|
8746
|
-
}
|
|
8747
|
-
} catch (unlinkError) {
|
|
8748
|
-
console.warn('[Manifest Data] Failed to unlink file from entries before delete:', unlinkError);
|
|
8749
|
-
// Continue with delete even if unlink fails
|
|
8750
|
-
}
|
|
8751
|
-
|
|
8752
|
-
const executeMutation = window.ManifestDataMutations?.executeMutation;
|
|
8753
|
-
const removeEntryFromStore = window.ManifestDataMutations?.removeEntryFromStore;
|
|
8754
|
-
|
|
8755
|
-
if (Array.isArray(fileId)) {
|
|
8756
|
-
if (executeMutation) {
|
|
8757
|
-
// Use optimistic updates for batch delete
|
|
8758
|
-
const results = await Promise.all(
|
|
8759
|
-
fileId.map(id => {
|
|
8760
|
-
const entryId = id.$id || id;
|
|
8761
|
-
return executeMutation({
|
|
8762
|
-
type: 'delete',
|
|
8763
|
-
dataSourceName,
|
|
8764
|
-
entryId,
|
|
8765
|
-
apiCall: async () => {
|
|
8766
|
-
return await window.ManifestDataAppwrite.deleteFile(bucketId, entryId);
|
|
8767
|
-
},
|
|
8768
|
-
options: {
|
|
8769
|
-
scope,
|
|
8770
|
-
bucketId,
|
|
8771
|
-
appwriteConfig
|
|
8772
|
-
}
|
|
8773
|
-
});
|
|
8774
|
-
})
|
|
8775
|
-
);
|
|
8776
|
-
|
|
8777
|
-
// No reload: optimistic delete + realtime sync. Reloading
|
|
8778
|
-
// races and can resurrect deleted files from stale data.
|
|
8779
|
-
return results;
|
|
8780
|
-
} else {
|
|
8781
|
-
// Fallback to old behavior
|
|
8782
|
-
const results = await Promise.all(
|
|
8783
|
-
fileId.map(id =>
|
|
8784
|
-
window.ManifestDataAppwrite.deleteFile(bucketId, id.$id || id)
|
|
8785
|
-
)
|
|
8786
|
-
);
|
|
8787
|
-
// Note: No reload - rely on realtime events for sync
|
|
8788
|
-
return results;
|
|
8789
|
-
}
|
|
8790
|
-
} else {
|
|
8791
|
-
if (executeMutation) {
|
|
8792
|
-
const result = await executeMutation({
|
|
8793
|
-
type: 'delete',
|
|
8794
|
-
dataSourceName,
|
|
8795
|
-
entryId: actualFileId,
|
|
8796
|
-
apiCall: async () => {
|
|
8797
|
-
return await window.ManifestDataAppwrite.deleteFile(bucketId, actualFileId);
|
|
8798
|
-
},
|
|
8799
|
-
options: {
|
|
8800
|
-
scope,
|
|
8801
|
-
bucketId,
|
|
8802
|
-
appwriteConfig
|
|
8803
|
-
}
|
|
8804
|
-
});
|
|
8805
|
-
|
|
8806
|
-
// No reload: optimistic delete + realtime sync. Reloading
|
|
8807
|
-
// races and can resurrect deleted files from stale data.
|
|
8808
|
-
return result;
|
|
8809
|
-
} else {
|
|
8810
|
-
// Fallback to old behavior
|
|
8811
|
-
const result = await window.ManifestDataAppwrite.deleteFile(bucketId, actualFileId);
|
|
8812
|
-
// Note: No reload - rely on realtime events for sync
|
|
8813
|
-
return result;
|
|
8814
|
-
}
|
|
8815
|
-
}
|
|
8862
|
+
return await deleteBucketFiles(args[0]);
|
|
8816
8863
|
} else if (method === '$duplicate') {
|
|
8817
8864
|
const [fileId, options = {}] = args;
|
|
8818
8865
|
const { newFileId, newName, ...overrides } = options;
|
|
@@ -9068,98 +9115,15 @@ function createAppwriteMethodsHandler(dataSourceName, reloadDataSource) {
|
|
|
9068
9115
|
await unlinkFileFromEntry(tableName, entryId, fileId.$id || fileId, fileIdsColumn || 'fileIds');
|
|
9069
9116
|
}
|
|
9070
9117
|
|
|
9071
|
-
//
|
|
9072
|
-
// This matches the pattern of $x.projects.$delete() which auto-reloads
|
|
9118
|
+
// Return the entry's refreshed files list
|
|
9073
9119
|
const getFilesForEntry = window.ManifestDataProxiesFiles?.getFilesForEntry;
|
|
9074
9120
|
if (getFilesForEntry) {
|
|
9075
9121
|
return await getFilesForEntry(tableName, entryId, bucketId, fileIdsColumn || 'fileIds');
|
|
9076
9122
|
}
|
|
9077
9123
|
return null;
|
|
9078
9124
|
} else if (method === '$remove') {
|
|
9079
|
-
//
|
|
9080
|
-
|
|
9081
|
-
const fileId = args[0];
|
|
9082
|
-
if (!fileId) {
|
|
9083
|
-
throw new Error('[Manifest Data] $remove requires file ID');
|
|
9084
|
-
}
|
|
9085
|
-
|
|
9086
|
-
const actualFileId = fileId.$id || fileId;
|
|
9087
|
-
|
|
9088
|
-
// Before deleting, unlink file from any table entries that reference it
|
|
9089
|
-
// This prevents orphaned references and ensures UI updates correctly
|
|
9090
|
-
let affectedEntries = {};
|
|
9091
|
-
try {
|
|
9092
|
-
affectedEntries = await unlinkFileFromAllEntries(actualFileId) || {};
|
|
9093
|
-
} catch (unlinkError) {
|
|
9094
|
-
console.warn('[Manifest Data] Failed to unlink file from entries before delete:', unlinkError);
|
|
9095
|
-
// Continue with delete even if unlink fails
|
|
9096
|
-
}
|
|
9097
|
-
|
|
9098
|
-
const deletedIds = (Array.isArray(fileId) ? fileId : [fileId]).map(id => id.$id || id);
|
|
9099
|
-
const generation = window.ManifestDataStore?.sourceGeneration?.(dataSourceName);
|
|
9100
|
-
const result = Array.isArray(fileId)
|
|
9101
|
-
? await Promise.all(deletedIds.map(id => window.ManifestDataAppwrite.deleteFile(bucketId, id)))
|
|
9102
|
-
: await window.ManifestDataAppwrite.deleteFile(bucketId, actualFileId);
|
|
9103
|
-
|
|
9104
|
-
// Drop the deleted file(s) locally: a relisting would bypass the source's queries and scope
|
|
9105
|
-
if (window.ManifestDataStore?.landRemove) {
|
|
9106
|
-
await window.ManifestDataStore.landRemove(dataSourceName, deletedIds, { generation });
|
|
9107
|
-
}
|
|
9108
|
-
|
|
9109
|
-
// Reload affected table data sources so fileIds arrays and counters
|
|
9110
|
-
// update in the UI (loadDataSource lands the rows itself)
|
|
9111
|
-
const reloadDataSourceFunc = window.ManifestDataMain?._loadDataSource;
|
|
9112
|
-
if (reloadDataSourceFunc && Object.keys(affectedEntries).length > 0) {
|
|
9113
|
-
const reloadPromises = [];
|
|
9114
|
-
for (const tableName of Object.keys(affectedEntries)) {
|
|
9115
|
-
reloadPromises.push(
|
|
9116
|
-
reloadDataSourceFunc(tableName).catch(err => {
|
|
9117
|
-
console.warn(`[Manifest Data] Failed to reload ${tableName} after file delete:`, err);
|
|
9118
|
-
})
|
|
9119
|
-
);
|
|
9120
|
-
}
|
|
9121
|
-
// Don't await - let it happen in background
|
|
9122
|
-
Promise.all(reloadPromises).catch(() => { });
|
|
9123
|
-
}
|
|
9124
|
-
|
|
9125
|
-
// Emit event for affected projects to auto-refresh
|
|
9126
|
-
// Always emit the event so UI can handle it optimistically, even if we couldn't find affected entries
|
|
9127
|
-
if (Object.keys(affectedEntries).length > 0) {
|
|
9128
|
-
for (const [tableName, entryIds] of Object.entries(affectedEntries)) {
|
|
9129
|
-
if (Array.isArray(entryIds) && entryIds.length > 0) {
|
|
9130
|
-
window.dispatchEvent(new CustomEvent('manifest:file-deleted', {
|
|
9131
|
-
detail: {
|
|
9132
|
-
fileId: actualFileId,
|
|
9133
|
-
tableName,
|
|
9134
|
-
entryIds
|
|
9135
|
-
}
|
|
9136
|
-
}));
|
|
9137
|
-
}
|
|
9138
|
-
}
|
|
9139
|
-
} else {
|
|
9140
|
-
// If we couldn't find affected entries, still emit event with empty entryIds
|
|
9141
|
-
// This allows UI to handle it optimistically by checking if the file is in their local list
|
|
9142
|
-
window.dispatchEvent(new CustomEvent('manifest:file-deleted', {
|
|
9143
|
-
detail: {
|
|
9144
|
-
fileId: actualFileId,
|
|
9145
|
-
tableName: null,
|
|
9146
|
-
entryIds: []
|
|
9147
|
-
}
|
|
9148
|
-
}));
|
|
9149
|
-
}
|
|
9150
|
-
|
|
9151
|
-
// Also dispatch event for storage bucket reactivity (so $x.assets updates)
|
|
9152
|
-
// The realtime handler will also update, but this ensures immediate UI update
|
|
9153
|
-
window.dispatchEvent(new CustomEvent('manifest:file-deleted', {
|
|
9154
|
-
detail: {
|
|
9155
|
-
fileId: actualFileId,
|
|
9156
|
-
tableName: null,
|
|
9157
|
-
entryIds: [],
|
|
9158
|
-
bucketId: bucketId // Include bucketId so storage can filter if needed
|
|
9159
|
-
}
|
|
9160
|
-
}));
|
|
9161
|
-
|
|
9162
|
-
return result;
|
|
9125
|
+
// Usage: $x.assets.$remove(fileIdOrArray)
|
|
9126
|
+
return await deleteBucketFiles(args[0]);
|
|
9163
9127
|
}
|
|
9164
9128
|
}
|
|
9165
9129
|
|
package/lib/manifest.edit.js
CHANGED
|
@@ -1689,7 +1689,7 @@
|
|
|
1689
1689
|
const nl = Math.max(0, (parseFloat(cs.left) || 0) + d[0] * step), nt = Math.max(0, (parseFloat(cs.top) || 0) + d[1] * step);
|
|
1690
1690
|
if (d[0]) el.style.left = toUnit(maxL ? Math.min(maxL, nl) : nl, lu, el, parent, 'w') + lu;
|
|
1691
1691
|
if (d[1]) el.style.top = toUnit(maxT ? Math.min(maxT, nt) : nt, tu, el, parent, 'h') + tu;
|
|
1692
|
-
clearTimeout(el._moveTimer); el._moveTimer = setTimeout(() => { el._moveTimer = null;
|
|
1692
|
+
clearTimeout(el._moveTimer); el._moveTimer = setTimeout(() => { el._moveTimer = null; const r = el.isConnected && regionOf(el); if (r) commitStyle(r, el); }, 350);
|
|
1693
1693
|
}
|
|
1694
1694
|
|
|
1695
1695
|
|
|
@@ -1790,7 +1790,7 @@
|
|
|
1790
1790
|
if ((right || left) && kx) { const w = clamp((parseFloat(cs.width) || 0) + kx * step * (right ? 1 : -1), minW, maxW); el.style.width = toUnit(w, wu, el, el.parentElement, 'w') + wu; }
|
|
1791
1791
|
if ((top || bottom) && ky) { const h = clamp((parseFloat(cs.height) || 0) + ky * step * (bottom ? 1 : -1), minH, maxH); el.style.height = toUnit(h, hu, el, el.parentElement, 'h') + hu; }
|
|
1792
1792
|
sizeEvent(el, false);
|
|
1793
|
-
clearTimeout(el._keyTimer); el._keyTimer = setTimeout(() => { el._keyTimer = null;
|
|
1793
|
+
clearTimeout(el._keyTimer); el._keyTimer = setTimeout(() => { el._keyTimer = null; const r = el.isConnected && regionOf(el); if (!r) return; commitStyle(r, el); sizeEvent(el, true); }, 350);
|
|
1794
1794
|
}
|
|
1795
1795
|
// An axis value wins; an explicit axis `none` cancels the base value too.
|
|
1796
1796
|
function axisVar(el, base, axis) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-gWLSeVPqCLMiUZB8MU7GqMg3x2yULFUsp8nTTZrPp/9Dlkix42rBn9yIimvwrHqZ",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-vNvLaABWVGF9HZZBBClXjUcf/398pm53bk5JukMakTJqGKAjIZ/wxkFQuh22Wavf",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-AFbP7mQnigy7DU1s+YE30yKTeQAKfgNazhbfSNbfd9ZpLgeulZKaPi/fAq3gJHDO",
|
|
@@ -11,25 +11,25 @@
|
|
|
11
11
|
"manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
|
|
12
12
|
"manifest.components.js": "sha384-1el5WMdgmzu/2ocaYN21OjLi/lfjllvA8aju1J3knYuOizw+XFfJU1+rvGqYW7qk",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-wU3ne2fDuf03ARPLijNVuh+snST/Sy9C32TsO6XGIXx2lTd/VHYGFOWaGaeYkKlU",
|
|
15
15
|
"manifest.datepicker.js": "sha384-EzlMwvIxlla/0BuyhAEqxN0M8TGcWIWgEIg840V0akKQQK1uY648wPWMkobvtq/o",
|
|
16
16
|
"manifest.defer.js": "sha384-PRp7+dCZHnnl55rX2xrHutLrQnszHo7o5o9Tq28M/yjLZPuXDzcwQNxCdvbtCYSz",
|
|
17
17
|
"manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
18
18
|
"manifest.dropdowns.js": "sha384-TlFrYVWTXvpUmGnYaAk2til4lu0p6w5YcmWWEzZAokzd2qlmoyRLLXXVuYAK/AlR",
|
|
19
|
-
"manifest.edit.js": "sha384-
|
|
19
|
+
"manifest.edit.js": "sha384-8JqFgkt8KMtB8bkwDPe0ntKbOSKGwKz8MrDsEkxozKkEreS4OCE1YfJMWO3QBMZO",
|
|
20
20
|
"manifest.export.js": "sha384-C4W5LrGQFnSILRWoWOCliajUK6rAzNW+EliogRx72vD1cUOYScSdfzHNbjSWv5XU",
|
|
21
21
|
"manifest.icons.js": "sha384-kKOINpX70YzNO3FvkV6umrmO3f0KIu0DNbwB+ej55a7y/lhU7v/myQtXL0bwCTbt",
|
|
22
|
-
"manifest.localization.js": "sha384-
|
|
22
|
+
"manifest.localization.js": "sha384-9EDAqnI7MNCZp4Vas0RMZgceCuz9EJUi/OARm8iI+Hi4S8HF//yyVOhhhhQ+XcLq",
|
|
23
23
|
"manifest.markdown.js": "sha384-icbpHC8dIijEJSaW3CODo4Ft7dBQz53pUh/2OYVBEFrLQbrFs370D+eMygJx5cW8",
|
|
24
24
|
"manifest.native.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
25
25
|
"manifest.payments.js": "sha384-p10n6EHBWFKVW9KhI2A+RpkwqrwD068D+wvOJ7D3Gklz1MvmIlqv1lLG1R0cUqbw",
|
|
26
26
|
"manifest.rich.text.js": "sha384-ZBV9jXmu2nmprEHicddRE/m7nR4RPZtVc969Jte0+EJYBcVph7itkjcgN/61PyeC",
|
|
27
|
-
"manifest.router.js": "sha384-
|
|
27
|
+
"manifest.router.js": "sha384-jDSzEKDI47BQvSbCXoLn9A9QOCWat5eawBx+/2du6+Tq6YCw9jhv+5HXuy+nJunR",
|
|
28
28
|
"manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
|
|
29
29
|
"manifest.status.js": "sha384-ofu7nBnVIGZ1U1o2R9d2H3V8aEMPUCVbl5FO3gIToXqi0oa36fTviEdh5UU7Kitw",
|
|
30
30
|
"manifest.submissions.js": "sha384-v9eS47ytAfTGIKAyVnbd0QWegucVS7yduvigqfsxxoqXmbaEoy0M2y+BiI4xeZBd",
|
|
31
31
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
32
|
-
"manifest.sw.js": "sha384-
|
|
32
|
+
"manifest.sw.js": "sha384-Eb8PhD5AKbkDmK2Fq7yckkGni5NpDEyUKNmgStNtFhaHDpfKOE7Gxe3qCyB53mpg",
|
|
33
33
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
34
34
|
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
35
35
|
"manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
|
|
@@ -157,9 +157,24 @@ function initializeLocalizationPlugin() {
|
|
|
157
157
|
.filter(Boolean);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
// Base path split
|
|
161
|
+
function splitBasePath(pathname) {
|
|
162
|
+
const parts = String(pathname || '/').split('/').filter(Boolean);
|
|
163
|
+
const base = (typeof window.getManifestBasePath === 'function' ? window.getManifestBasePath() : '') || '';
|
|
164
|
+
const baseParts = base.split('/').filter(Boolean);
|
|
165
|
+
if (baseParts.length && baseParts.every((seg, i) => parts[i] === seg)) {
|
|
166
|
+
return { base: '/' + baseParts.join('/'), parts: parts.slice(baseParts.length) };
|
|
167
|
+
}
|
|
168
|
+
return { base: '', parts };
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function joinBasePath(base, parts) {
|
|
172
|
+
return (base + '/' + parts.join('/')).replace(/\/{2,}/g, '/');
|
|
173
|
+
}
|
|
174
|
+
|
|
160
175
|
function buildLocaleNavigationUrl(newLang, availableLocales) {
|
|
161
176
|
const currentUrl = new URL(window.location.href);
|
|
162
|
-
const pathParts = currentUrl.pathname
|
|
177
|
+
const { base, parts: pathParts } = splitBasePath(currentUrl.pathname);
|
|
163
178
|
const hasLanguageInUrl = pathParts[0] && availableLocales.includes(pathParts[0]);
|
|
164
179
|
|
|
165
180
|
const pathWithoutLocale = hasLanguageInUrl ? pathParts.slice(1) : pathParts;
|
|
@@ -192,7 +207,7 @@ function initializeLocalizationPlugin() {
|
|
|
192
207
|
|
|
193
208
|
if (hasLanguageInUrl) pathParts[0] = newLang;
|
|
194
209
|
else pathParts.unshift(newLang);
|
|
195
|
-
currentUrl.pathname =
|
|
210
|
+
currentUrl.pathname = joinBasePath(base, pathParts) + '/';
|
|
196
211
|
return currentUrl.toString();
|
|
197
212
|
}
|
|
198
213
|
|
|
@@ -373,7 +388,7 @@ function initializeLocalizationPlugin() {
|
|
|
373
388
|
function detectInitialLocale(availableLocales) {
|
|
374
389
|
|
|
375
390
|
// URL path (direct links)
|
|
376
|
-
const pathParts = window.location.pathname
|
|
391
|
+
const pathParts = splitBasePath(window.location.pathname).parts;
|
|
377
392
|
if (pathParts[0] && isValidLanguageCode(pathParts[0]) && availableLocales.includes(pathParts[0])) {
|
|
378
393
|
return pathParts[0];
|
|
379
394
|
}
|
|
@@ -472,19 +487,19 @@ function initializeLocalizationPlugin() {
|
|
|
472
487
|
// Skipped for scoped demo changes — the prefixed URL wasn't prerendered.
|
|
473
488
|
try {
|
|
474
489
|
const currentUrl = new URL(window.location.href);
|
|
475
|
-
const pathParts = currentUrl.pathname
|
|
490
|
+
const { base, parts: pathParts } = splitBasePath(currentUrl.pathname);
|
|
476
491
|
const hasLanguageInUrl = pathParts[0] && store.available.includes(pathParts[0]);
|
|
477
492
|
|
|
478
493
|
if (!isScopedDemoChange && (updateUrl || hasLanguageInUrl)) {
|
|
479
494
|
if (hasLanguageInUrl) {
|
|
480
495
|
if (pathParts[0] !== newLang) {
|
|
481
496
|
pathParts[0] = newLang;
|
|
482
|
-
currentUrl.pathname =
|
|
497
|
+
currentUrl.pathname = joinBasePath(base, pathParts);
|
|
483
498
|
window.history.replaceState({}, '', currentUrl);
|
|
484
499
|
}
|
|
485
500
|
} else if (updateUrl && pathParts.length > 0) {
|
|
486
501
|
pathParts.unshift(newLang);
|
|
487
|
-
currentUrl.pathname =
|
|
502
|
+
currentUrl.pathname = joinBasePath(base, pathParts);
|
|
488
503
|
window.history.replaceState({}, '', currentUrl);
|
|
489
504
|
}
|
|
490
505
|
}
|
|
@@ -555,11 +570,11 @@ function initializeLocalizationPlugin() {
|
|
|
555
570
|
} catch {
|
|
556
571
|
return false;
|
|
557
572
|
}
|
|
558
|
-
const segs = target.pathname
|
|
573
|
+
const { base: targetBase, parts: segs } = splitBasePath(target.pathname);
|
|
559
574
|
if (segs.length && available.includes(segs[0])) {
|
|
560
575
|
segs.shift();
|
|
561
576
|
}
|
|
562
|
-
target.pathname =
|
|
577
|
+
target.pathname = joinBasePath(targetBase, segs);
|
|
563
578
|
|
|
564
579
|
// Apply default to live store + DOM before navigating
|
|
565
580
|
if (store && store.current !== defaultLocale) {
|
package/lib/manifest.router.js
CHANGED
|
@@ -435,7 +435,20 @@ if (typeof navigator !== 'undefined' && navigator.webdriver === true) {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
//
|
|
438
|
+
// Href parts: path, ?query, #hash
|
|
439
|
+
function splitHref(href) {
|
|
440
|
+
const hashAt = href.indexOf('#');
|
|
441
|
+
const hash = hashAt === -1 ? '' : href.slice(hashAt + 1);
|
|
442
|
+
const beforeHash = hashAt === -1 ? href : href.slice(0, hashAt);
|
|
443
|
+
const queryAt = beforeHash.indexOf('?');
|
|
444
|
+
return {
|
|
445
|
+
path: queryAt === -1 ? beforeHash : beforeHash.slice(0, queryAt),
|
|
446
|
+
search: queryAt === -1 ? '' : beforeHash.slice(queryAt),
|
|
447
|
+
hash
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Resolve internal link to absolute pathname against the app base
|
|
439
452
|
function resolveHref(href) {
|
|
440
453
|
if (!href || href.startsWith('#') || href.startsWith('mailto:') || href.startsWith('tel:')) return href;
|
|
441
454
|
try {
|
|
@@ -570,21 +583,20 @@ function interceptLinkClicks() {
|
|
|
570
583
|
return;
|
|
571
584
|
}
|
|
572
585
|
|
|
586
|
+
const { path, search, hash } = splitHref(href);
|
|
587
|
+
const fullHref = (path ? resolveHref(path) : '') + search + (hash ? '#' + hash : '');
|
|
588
|
+
|
|
573
589
|
// target=_blank: open the resolved URL (base path, locale) in a new tab
|
|
574
590
|
if (target === '_blank') {
|
|
575
|
-
const [path, hash] = href.split('#');
|
|
576
591
|
event.preventDefault();
|
|
577
592
|
event.stopPropagation();
|
|
578
593
|
event.stopImmediatePropagation();
|
|
579
|
-
window.open(
|
|
594
|
+
window.open(fullHref, '_blank', link.relList?.contains('noreferrer') ? 'noopener,noreferrer' : 'noopener');
|
|
580
595
|
return;
|
|
581
596
|
}
|
|
582
597
|
|
|
583
598
|
// Handle links with both route and anchor (e.g., /page#section)
|
|
584
|
-
if (
|
|
585
|
-
const [path, hash] = href.split('#');
|
|
586
|
-
const fullHref = resolveHref(path) + (hash ? '#' + hash : '');
|
|
587
|
-
|
|
599
|
+
if (hash) {
|
|
588
600
|
event.preventDefault();
|
|
589
601
|
event.stopPropagation();
|
|
590
602
|
event.stopImmediatePropagation();
|
|
@@ -620,7 +632,6 @@ function interceptLinkClicks() {
|
|
|
620
632
|
isInternalNavigation = true;
|
|
621
633
|
|
|
622
634
|
// Update URL without page reload (use base path when app is in a subpath, e.g. /src/dist/gadget)
|
|
623
|
-
const fullHref = resolveHref(href);
|
|
624
635
|
history.pushState(null, '', fullHref);
|
|
625
636
|
|
|
626
637
|
// Handle route change
|
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.288';
|
|
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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnfst",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.288",
|
|
4
4
|
"private": false,
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"templates/starter",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"start:dist": "node packages/run/serve.mjs src/test-prerender --port 5003",
|
|
32
32
|
"render": "node src/scripts/manifest.render.mjs --root src",
|
|
33
33
|
"prerender:starter": "node src/scripts/manifest.render.mjs --root templates/starter",
|
|
34
|
-
"release": "node scripts/release-bump.mjs . && npm publish && node scripts/cdn-warm.mjs --detach",
|
|
35
|
-
"release:next": "node scripts/release-bump.mjs . --pre next && npm publish --tag next && node scripts/cdn-warm.mjs --detach",
|
|
36
|
-
"release:run": "node scripts/release-bump.mjs packages/run && cd packages/run && npm publish --auth-type=web",
|
|
37
|
-
"release:render": "node scripts/release-bump.mjs packages/render && cd packages/render && npm publish --auth-type=web",
|
|
38
|
-
"release:types": "node scripts/release-bump.mjs packages/types && cd packages/types && npm publish --auth-type=web",
|
|
39
|
-
"release:test": "node scripts/release-bump.mjs packages/test && cd packages/test && npm publish --auth-type=web",
|
|
40
|
-
"release:export": "node scripts/release-bump.mjs packages/export && cd packages/export && npm publish --auth-type=web",
|
|
41
|
-
"release:starter": "node scripts/release-bump.mjs packages/create-starter && cd packages/create-starter && npm publish --auth-type=web",
|
|
42
|
-
"release:publish": "node scripts/release-bump.mjs packages/publish && cd packages/publish && npm publish --auth-type=web",
|
|
34
|
+
"release": "npm test && node scripts/release-bump.mjs . && npm publish && node scripts/cdn-warm.mjs --detach",
|
|
35
|
+
"release:next": "npm test && node scripts/release-bump.mjs . --pre next && npm publish --tag next && node scripts/cdn-warm.mjs --detach",
|
|
36
|
+
"release:run": "npm test && node scripts/release-bump.mjs packages/run && cd packages/run && npm publish --auth-type=web",
|
|
37
|
+
"release:render": "npm test && node scripts/release-bump.mjs packages/render && cd packages/render && npm publish --auth-type=web",
|
|
38
|
+
"release:types": "npm test && node scripts/release-bump.mjs packages/types && cd packages/types && npm publish --auth-type=web",
|
|
39
|
+
"release:test": "npm test && node scripts/release-bump.mjs packages/test && cd packages/test && npm publish --auth-type=web",
|
|
40
|
+
"release:export": "npm test && node scripts/release-bump.mjs packages/export && cd packages/export && npm publish --auth-type=web",
|
|
41
|
+
"release:starter": "npm test && node scripts/release-bump.mjs packages/create-starter && cd packages/create-starter && npm publish --auth-type=web",
|
|
42
|
+
"release:publish": "npm test && node scripts/release-bump.mjs packages/publish && cd packages/publish && npm publish --auth-type=web",
|
|
43
43
|
"release:all": "npm run release:run && npm run release:render && npm run release:types && npm run release:test && npm run release:export && npm run release:starter && npm run release:publish && npm run release:docs && npm run release",
|
|
44
44
|
"prepublishOnly": "npm run build",
|
|
45
45
|
"test": "vitest run",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"test:e2e:modules": "node tests/e2e/modules.e2e.mjs",
|
|
57
57
|
"test:e2e:router-xshow": "node tests/e2e/router-xshow.e2e.mjs",
|
|
58
58
|
"lint": "echo 'No linting configured'",
|
|
59
|
-
"release:docs": "node scripts/release-bump.mjs packages/docs && cd packages/docs && npm publish --auth-type=web",
|
|
59
|
+
"release:docs": "npm test && node scripts/release-bump.mjs packages/docs && cd packages/docs && npm publish --auth-type=web",
|
|
60
60
|
"release:check": "node scripts/release-check.mjs"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|