@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/dist/server/seed/ui/seed-ui.js +1 -1
- package/dist/server/services/files/SnapshotService.d.ts +3 -0
- package/dist/server/services/files/SnapshotService.d.ts.map +1 -1
- package/dist/server/services/files/SnapshotService.js +10 -8
- 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 +12 -10
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|