dbm-graph-api 1.1.27 → 1.1.29

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": "dbm-graph-api",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "@aws-sdk/client-s3": "^3.741.0",
15
15
  "@aws-sdk/s3-request-presigner": "^3.741.0",
16
- "dbm": "^1.1.22",
16
+ "dbm": "^1.2.0",
17
17
  "mime": "^4.0.6",
18
18
  "sharp": "^0.33.5",
19
19
  "ws": "^8.18.0"
@@ -773,16 +773,30 @@ export const setupSite = function(aServer) {
773
773
  <meta property="og:title" content="${fields.title}" />`;
774
774
 
775
775
  {
776
- let currentArray = site.injectCodeSnippets;
777
- let currentArrayLength = currentArray.length;
778
- for(let i = 0; i < currentArrayLength; i++) {
779
- returnString += currentArray[i];
780
- }
781
- }
776
+ let currentArray = site.injectCodeSnippets;
777
+ let currentArrayLength = currentArray.length;
778
+ for(let i = 0; i < currentArrayLength; i++) {
779
+ returnString += currentArray[i];
780
+ }
781
+ }
782
+
783
+ if(process.env.INLINE_STYLE_SHEET == 1) {
784
+ returnString += `<style>`;
785
+
786
+ let assetsDir = Dbm.getInstance().repository.getItem("site").assetsDir;
787
+ let cssContent = await fs.promises.readFile(assetsDir + "/css/main.css", 'utf8');
788
+
789
+ returnString += cssContent;
790
+
791
+ returnString += `</style>`;
792
+ }
793
+ else {
794
+ returnString += `<link rel="stylesheet" type="text/css" href="${assetsUri}css/main.css?version=${version}" />`;
795
+ }
782
796
 
783
- returnString += `<link rel="stylesheet" type="text/css" href="${assetsUri}css/main.css?version=${version}" />
784
797
 
785
- <link rel="icon" type="image/png" href="${baseUrl}${assetsUri}img/favicon.png">`;
798
+
799
+ returnString += `<link rel="icon" type="image/png" href="${baseUrl}${assetsUri}img/favicon.png">`;
786
800
 
787
801
  if(fields['meta/description']) {
788
802
  returnString += `
@@ -825,9 +839,8 @@ export const setupSite = function(aServer) {
825
839
  }
826
840
 
827
841
  /*
828
- <meta property="article:publisher" content="https://sv-se.facebook.com/..." />
829
-
830
- */
842
+ <meta property="article:publisher" content="https://sv-se.facebook.com/..." />
843
+ */
831
844
 
832
845
  returnString += `</head>
833
846
  <body>