@social-mail/social-mail-web-server 1.9.29 → 1.9.31
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/services/files/SnapshotService.d.ts.map +1 -1
- package/dist/server/services/files/SnapshotService.js +6 -2
- package/dist/server/services/files/SnapshotService.js.map +1 -1
- package/dist/server/services/files/WebSiteContentService.d.ts +1 -1
- package/dist/server/services/files/WebSiteContentService.d.ts.map +1 -1
- package/dist/server/services/files/WebSiteContentService.js +2 -1
- package/dist/server/services/files/WebSiteContentService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/services/files/SnapshotService.ts +6 -2
- package/src/server/services/files/WebSiteContentService.ts +2 -1
package/package.json
CHANGED
|
@@ -125,7 +125,7 @@ export default class SnapshotService
|
|
|
125
125
|
|
|
126
126
|
this.ms.snapshotRefresh.notify({ folderID });
|
|
127
127
|
|
|
128
|
-
const ws = await this.wcs.getCurrentSnapshot(folderID);
|
|
128
|
+
const ws = await this.wcs.getCurrentSnapshot(folderID, snapshotRoot.appFileID);
|
|
129
129
|
|
|
130
130
|
// in case of design, we need to fix template.html to reference
|
|
131
131
|
// cdn image to reduce load time
|
|
@@ -135,9 +135,13 @@ export default class SnapshotService
|
|
|
135
135
|
.first();
|
|
136
136
|
if (templateFile) {
|
|
137
137
|
const templateFileContent = await this.wcs.getSnapshotFile(ws, ["template.html"]);
|
|
138
|
+
console.log({ text: await templateFileContent.readAsText()});
|
|
138
139
|
// we need to save the file content..
|
|
139
140
|
await this.storage.updateFile(templateFile, templateFileContent);
|
|
140
|
-
await db.appFiles.statements.update({
|
|
141
|
+
await db.appFiles.statements.update({
|
|
142
|
+
fileContentID: templateFile.fileContentID,
|
|
143
|
+
dateUpdated: dateCreated
|
|
144
|
+
}, { appFileID: templateFile.appFileID });
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
|
|
@@ -121,7 +121,7 @@ export default class WebSiteContentService
|
|
|
121
121
|
} as ISiteFolder;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
async getCurrentSnapshot(folderID) {
|
|
124
|
+
async getCurrentSnapshot(folderID, currentVersionID) {
|
|
125
125
|
const siteHost = await this.db.websiteFolderHosts.where({ folderID }, (p) => (x) => x.folderID === p.folderID )
|
|
126
126
|
.include((x) => x.folder)
|
|
127
127
|
.first();
|
|
@@ -129,6 +129,7 @@ export default class WebSiteContentService
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
const { folder: site, host } = siteHost;
|
|
132
|
+
site.currentVersionID = currentVersionID;
|
|
132
133
|
return {
|
|
133
134
|
snapshotFolderID: site.currentVersionID,
|
|
134
135
|
folderID: site.folderID,
|