@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.4.710",
3
+ "version": "1.4.712",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3,7 +3,7 @@ import semver from "semver";
3
3
 
4
4
  export default async function seedUI(config: DBConfig) {
5
5
 
6
- const version = "1.2.277";
6
+ const version = "1.2.280";
7
7
 
8
8
  const existing = await config.get(UIPackageConfig, false);
9
9
  if (existing) {
@@ -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) {