@tryghost/mg-ghost-api 0.4.9 → 0.4.11

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2022 Ghost Foundation
3
+ Copyright (c) 2013-2023 Ghost Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -111,4 +111,4 @@ yarn dev ghost --url https://example.com --apikey 1234abcd
111
111
 
112
112
  # Copyright & License
113
113
 
114
- Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE).
114
+ Copyright (c) 2013-2023 Ghost Foundation - Released under the [MIT license](LICENSE).
package/lib/fetch.js CHANGED
@@ -59,12 +59,14 @@ const cachedFetch = async (fileCache, api, type, options, page) => {
59
59
  let response = null;
60
60
 
61
61
  const postParams = {
62
+ formats: 'html',
62
63
  limit: options.limit,
63
64
  page: page,
64
65
  filter: options.postFilter || null
65
66
  };
66
67
 
67
68
  const pageParams = {
69
+ formats: 'html',
68
70
  limit: options.limit,
69
71
  page: page,
70
72
  filter: options.pageFilter || null
@@ -76,12 +78,12 @@ const cachedFetch = async (fileCache, api, type, options, page) => {
76
78
  };
77
79
 
78
80
  if (type === 'posts') {
79
- response = await api.site.posts.browse(postParams);
81
+ response = await api.site.posts.browse(postParams, {source: 'html'});
80
82
  response.forEach((item) => {
81
83
  item.type = 'post';
82
84
  });
83
85
  } else if (type === 'pages') {
84
- response = await api.site.pages.browse(pageParams);
86
+ response = await api.site.pages.browse(pageParams, {source: 'html'});
85
87
  response.forEach((item) => {
86
88
  item.type = 'page';
87
89
  });
package/lib/processor.js CHANGED
@@ -37,6 +37,12 @@ const processPost = (ghPost) => {
37
37
  delete post.data.tags;
38
38
  }
39
39
 
40
+ delete post.data.tiers;
41
+ delete post.data.post_revisions;
42
+ delete post.data.count;
43
+ delete post.data.primary_author;
44
+ delete post.data.primary_tag;
45
+
40
46
  return post;
41
47
  };
42
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-ghost-api",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-ghost-api",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "type": "module",
9
9
  "scripts": {
10
10
  "dev": "echo \"Implement me!\"",
11
- "test": "node --experimental-vm-modules $(yarn bin jest)",
11
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest",
12
12
  "lint": "eslint . --ext .js --cache",
13
13
  "posttest": "yarn lint"
14
14
  },
@@ -20,12 +20,12 @@
20
20
  "access": "public"
21
21
  },
22
22
  "devDependencies": {
23
- "eslint": "8.44.0",
24
- "jest": "29.5.0",
25
- "jest-extended": "3.2.4"
23
+ "eslint": "8.48.0",
24
+ "jest": "29.6.4",
25
+ "jest-extended": "4.0.1"
26
26
  },
27
27
  "dependencies": {
28
- "@tryghost/admin-api": "1.13.7"
28
+ "@tryghost/admin-api": "1.13.8"
29
29
  },
30
- "gitHead": "858b985d1e54eaf41b3a53dbccdc074b57246f9c"
30
+ "gitHead": "05dbefe144850acde9a05b7e25fc84dbf766be88"
31
31
  }