@social-mail/social-mail-web-server 1.4.710 → 1.4.712
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/server/seed/ui/seed-ui.js +1 -1
- package/dist/server/services/files/SnapshotService.d.ts +1 -0
- package/dist/server/services/files/SnapshotService.d.ts.map +1 -1
- package/dist/server/services/files/SnapshotService.js +13 -1
- package/dist/server/services/files/SnapshotService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/seed/ui/seed-ui.ts +1 -1
- package/src/server/services/files/SnapshotService.ts +14 -1
package/package.json
CHANGED
|
@@ -451,10 +451,23 @@ export default class SnapshotService {
|
|
|
451
451
|
|
|
452
452
|
@cacheFor()
|
|
453
453
|
async findSnapshotChildren(paths: string[], folderID = this.snapshotRoot.appFileID): Promise<AppFile> {
|
|
454
|
+
const child = await this._findSnapshotChildren(paths, folderID);
|
|
455
|
+
if (!child) {
|
|
456
|
+
console.log(`File ${paths.join("/")} not found in folder ${folderID}\n${new Error().stack}`);
|
|
457
|
+
}
|
|
458
|
+
return child;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
async _findSnapshotChildren(paths: string[], folderID): Promise<AppFile> {
|
|
454
462
|
const [ first, ... rest ] = paths;
|
|
463
|
+
if (!first) {
|
|
464
|
+
if (rest.length) {
|
|
465
|
+
return this.findSnapshotChildren(rest, folderID);
|
|
466
|
+
}
|
|
467
|
+
return null;
|
|
468
|
+
}
|
|
455
469
|
const child = this.snapshotFiles.find((x) => x.parentID === folderID && x.name === first);
|
|
456
470
|
if (!child) {
|
|
457
|
-
console.log(`File ${first} not found in folder ${folderID}\n${new Error().stack}`);
|
|
458
471
|
return null;
|
|
459
472
|
}
|
|
460
473
|
if (rest.length === 0) {
|