@tryghost/admin-api 1.10.0 → 1.11.0
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/lib/index.js +5 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -3,6 +3,9 @@ const FormData = require('form-data');
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const token = require('./token');
|
|
5
5
|
|
|
6
|
+
const packageInfo = require('../package.json');
|
|
7
|
+
const packageVersion = packageInfo.version;
|
|
8
|
+
|
|
6
9
|
// NOTE: bump this default when Ghost v5 is released
|
|
7
10
|
const defaultAcceptVersionHeader = 'v4.0';
|
|
8
11
|
const supportedVersions = ['v2', 'v3', 'v4', 'v5', 'canary'];
|
|
@@ -417,7 +420,8 @@ module.exports = function GhostAdminAPI(options) {
|
|
|
417
420
|
authorizationHeader = `Ghost ${config.generateToken(key, audience)}`;
|
|
418
421
|
|
|
419
422
|
const ghostHeaders = {
|
|
420
|
-
Authorization: authorizationHeader
|
|
423
|
+
Authorization: authorizationHeader,
|
|
424
|
+
'User-Agent': `GhostAdminSDK/${packageVersion}`
|
|
421
425
|
};
|
|
422
426
|
|
|
423
427
|
if (config.acceptVersionHeader) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/admin-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"form-data": "^4.0.0",
|
|
32
32
|
"jsonwebtoken": "^8.4.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "db46574e3958a2487e8ccdcfb735fbe5de2a2731"
|
|
35
35
|
}
|