@cntrl-site/sdk 0.2.1 → 0.2.4

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.
@@ -47,13 +47,13 @@ class Client {
47
47
  return article;
48
48
  }
49
49
  static getPageMeta(projectMeta, pageMeta) {
50
- return {
50
+ return pageMeta.enabled ? {
51
51
  title: pageMeta.title ? pageMeta.title : projectMeta.title,
52
52
  description: pageMeta.description ? pageMeta.description : projectMeta.description,
53
53
  keywords: pageMeta.keywords ? pageMeta.keywords : projectMeta.keywords,
54
54
  opengraphThumbnail: pageMeta.opengraphThumbnail ? pageMeta.opengraphThumbnail : projectMeta.opengraphThumbnail,
55
55
  favicon: projectMeta.favicon
56
- };
56
+ } : projectMeta;
57
57
  }
58
58
  }
59
59
  exports.Client = Client;
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FontFaceGenerator = void 0;
4
4
  const FILE_TYPES_MAP = {
5
- ttf: 'truetype'
5
+ ttf: 'truetype',
6
+ otf: 'opentype'
6
7
  };
7
8
  class FontFaceGenerator {
8
9
  constructor(fonts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -24,7 +24,7 @@
24
24
  "lib": "lib"
25
25
  },
26
26
  "dependencies": {
27
- "@cntrl-site/core": "^1.0.12",
27
+ "@cntrl-site/core": "^1.0.18",
28
28
  "@types/isomorphic-fetch": "^0.0.36",
29
29
  "isomorphic-fetch": "^3.0.0"
30
30
  },
@@ -48,12 +48,12 @@ export class Client {
48
48
  }
49
49
 
50
50
  public static getPageMeta(projectMeta: TMeta, pageMeta: TPageMeta): TMeta {
51
- return {
51
+ return pageMeta.enabled ? {
52
52
  title: pageMeta.title ? pageMeta.title : projectMeta.title,
53
53
  description: pageMeta.description ? pageMeta.description : projectMeta.description,
54
54
  keywords: pageMeta.keywords ? pageMeta.keywords : projectMeta.keywords,
55
55
  opengraphThumbnail: pageMeta.opengraphThumbnail ? pageMeta.opengraphThumbnail : projectMeta.opengraphThumbnail,
56
56
  favicon: projectMeta.favicon
57
- };
57
+ } : projectMeta;
58
58
  }
59
59
  }
@@ -8,6 +8,7 @@ describe('FontFaceGenerator', () => {
8
8
  name: 'Aeonik',
9
9
  weight: 400,
10
10
  style: 'normal',
11
+ readonly: false,
11
12
  files: [
12
13
  {
13
14
  type: FontFileTypes.EOT,
@@ -23,6 +24,7 @@ describe('FontFaceGenerator', () => {
23
24
  name: 'Anek Odia',
24
25
  weight: 700,
25
26
  style: 'italic',
27
+ readonly: false,
26
28
  files: [
27
29
  {
28
30
  type: FontFileTypes.WOFF,
@@ -1,7 +1,8 @@
1
1
  import { TCustomFont } from '@cntrl-site/core';
2
2
 
3
3
  const FILE_TYPES_MAP: Record<string, string> = {
4
- ttf: 'truetype'
4
+ ttf: 'truetype',
5
+ otf: 'opentype'
5
6
  };
6
7
 
7
8
  export class FontFaceGenerator {
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/sdk.iml" filepath="$PROJECT_DIR$/.idea/sdk.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/sdk.iml DELETED
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>