@social-mail/social-mail-web-server 1.5.69 → 1.5.71

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.5.69",
3
+ "version": "1.5.71",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -8,4 +8,11 @@ export const ImagesFolder = {
8
8
  folder,
9
9
  file: (name) =>
10
10
  join(folder, name)
11
- };
11
+ };
12
+
13
+
14
+ const contentFolder = join(fileURLToPath(metaDir), "..", "..", "content");
15
+ export const ContentFolder = {
16
+ folder: contentFolder,
17
+ file: (name) => join(contentFolder, name)
18
+ };
@@ -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.508";
6
+ const version = "1.2.517";
7
7
 
8
8
  const existing = await config.getValue(UIPackageConfig, false);
9
9
  if (existing) {
@@ -9,6 +9,8 @@ import { spawnPromise } from "../../../common/spawnPromise.js";
9
9
  import { copyFile, readdir } from "fs/promises";
10
10
  import FFCommand from "../convert/FFCommand.js";
11
11
  import ensureDir from "../../../common/FileApi.js";
12
+ import { existsSync } from "fs";
13
+ import { ContentFolder } from "../../../common/ImagesFolder.js";
12
14
 
13
15
  const cachePath = `./data/img-cache/`;
14
16
 
@@ -79,6 +81,13 @@ export default class ImageConverterService {
79
81
  return outputFile;
80
82
  }
81
83
  }
84
+
85
+ if (!existsSync(outputFile.path)) {
86
+ // copy protected.pdf
87
+ const src = ContentFolder.file("pdf/protected.pdf");
88
+ await copyFile(src, outputFile.path);
89
+ return outputFile;
90
+ }
82
91
  }
83
92
 
84
93
  // this is some kind of document??