@social-mail/social-mail-web-server 1.4.757 → 1.4.758

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.757",
3
+ "version": "1.4.758",
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.292";
6
+ const version = "1.2.293";
7
7
 
8
8
  const existing = await config.get(UIPackageConfig, false);
9
9
  if (existing) {
@@ -52,11 +52,11 @@ export default class SnapshotService {
52
52
 
53
53
  root: AppFile;
54
54
 
55
- htmlFiles: { source: AppFile, dest: AppFile, siteRoot: string } [] = [];
55
+ htmlFiles: { source: AppFile, dest: AppFile, siteRoot: string, filePromise: Promise<LocalFile> } [] = [];
56
56
 
57
57
  derivedFiles: { source: AppFile, dest: AppFile, siteRoot: string, html: string } [] = [];
58
58
 
59
- cssFiles: { source: AppFile, dest: AppFile, siteRoot: string } [] = [];
59
+ cssFiles: { source: AppFile, dest: AppFile, siteRoot: string, filePromise: Promise<LocalFile> } [] = [];
60
60
  snapshotRoot: AppFile;
61
61
 
62
62
  allFiles: AppFile[] = null;
@@ -121,9 +121,8 @@ export default class SnapshotService {
121
121
 
122
122
  await this.copyChildren(db, folder, snapshotRoot);
123
123
 
124
- for (const { source, dest, siteRoot} of this.cssFiles) {
125
- await db.changeSet.getEntry(source).loadNavigationAsync((x) => x.fileContent);
126
- const file = await this.tempFileService.downloadAppFile(source);
124
+ for (const { source, dest, siteRoot, filePromise } of this.cssFiles) {
125
+ const file = await filePromise;
127
126
 
128
127
  let html = await file.readAsText();
129
128
 
@@ -140,9 +139,8 @@ export default class SnapshotService {
140
139
  }
141
140
  }
142
141
 
143
- for (const { source, dest, siteRoot} of this.htmlFiles) {
144
- await db.changeSet.getEntry(source).loadNavigationAsync((x) => x.fileContent);
145
- const file = await this.tempFileService.downloadAppFile(source);
142
+ for (const { source, dest, siteRoot, filePromise } of this.htmlFiles) {
143
+ const file = await filePromise;
146
144
 
147
145
  let html = await file.readAsText();
148
146
 
@@ -232,11 +230,15 @@ export default class SnapshotService {
232
230
  });
233
231
 
234
232
  if (/text\/css/i.test(srcChild.contentType) || /\.css$/i.test(srcChild.name)) {
235
- this.cssFiles.push({ source: srcChild, dest: destChild, siteRoot });
233
+ await db.changeSet.getEntry(srcChild).loadNavigationAsync((x) => x.fileContent);
234
+ const filePromise = this.tempFileService.downloadAppFile(source);
235
+ this.cssFiles.push({ source: srcChild, dest: destChild, siteRoot, filePromise });
236
236
  }
237
237
 
238
238
  if (/text\/html/i.test(srcChild.contentType) || /\.html?$/i.test(srcChild.name)) {
239
- this.htmlFiles.push({ source: srcChild, dest: destChild, siteRoot });
239
+ await db.changeSet.getEntry(srcChild).loadNavigationAsync((x) => x.fileContent);
240
+ const filePromise = this.tempFileService.downloadAppFile(source);
241
+ this.htmlFiles.push({ source: srcChild, dest: destChild, siteRoot, filePromise });
240
242
  }
241
243
 
242
244