@tryghost/content-api 1.10.1 → 1.11.2
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/cjs/content-api.js +28 -12
- package/es/content-api.js +188 -110
- package/es/content-api.js.map +1 -1
- package/lib/content-api.js +19 -3
- package/package.json +9 -9
- package/umd/content-api.min.js +1 -1
- package/umd/content-api.min.js.map +1 -1
package/es/content-api.js
CHANGED
|
@@ -108,24 +108,30 @@ var classofRaw = function (it) {
|
|
|
108
108
|
return stringSlice$3(toString$2(it), 8, -1);
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
var Object$
|
|
111
|
+
var $Object$3 = Object;
|
|
112
112
|
var split = functionUncurryThis(''.split);
|
|
113
113
|
|
|
114
114
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
115
115
|
var indexedObject = fails(function () {
|
|
116
116
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
117
117
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
118
|
-
return
|
|
118
|
+
return !$Object$3('z').propertyIsEnumerable(0);
|
|
119
119
|
}) ? function (it) {
|
|
120
|
-
return classofRaw(it) == 'String' ? split(it, '') : Object$
|
|
121
|
-
} : Object$
|
|
120
|
+
return classofRaw(it) == 'String' ? split(it, '') : $Object$3(it);
|
|
121
|
+
} : $Object$3;
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
124
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
125
|
+
var isNullOrUndefined$1 = function (it) {
|
|
126
|
+
return it === null || it === undefined;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var $TypeError$f = TypeError;
|
|
124
130
|
|
|
125
131
|
// `RequireObjectCoercible` abstract operation
|
|
126
132
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
127
133
|
var requireObjectCoercible = function (it) {
|
|
128
|
-
if (it
|
|
134
|
+
if (isNullOrUndefined$1(it)) throw $TypeError$f("Can't call method on " + it);
|
|
129
135
|
return it;
|
|
130
136
|
};
|
|
131
137
|
|
|
@@ -143,7 +149,14 @@ var isCallable = function (argument) {
|
|
|
143
149
|
return typeof argument == 'function';
|
|
144
150
|
};
|
|
145
151
|
|
|
146
|
-
var
|
|
152
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
153
|
+
|
|
154
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
155
|
+
var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
156
|
+
|
|
157
|
+
var isObject$2 = SPECIAL_DOCUMENT_ALL ? function (it) {
|
|
158
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
|
|
159
|
+
} : function (it) {
|
|
147
160
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
148
161
|
};
|
|
149
162
|
|
|
@@ -189,7 +202,7 @@ var engineV8Version = version$1;
|
|
|
189
202
|
|
|
190
203
|
|
|
191
204
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
192
|
-
var
|
|
205
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
193
206
|
var symbol = Symbol();
|
|
194
207
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
195
208
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -201,45 +214,45 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
|
201
214
|
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
202
215
|
|
|
203
216
|
|
|
204
|
-
var useSymbolAsUid =
|
|
217
|
+
var useSymbolAsUid = symbolConstructorDetection
|
|
205
218
|
&& !Symbol.sham
|
|
206
219
|
&& typeof Symbol.iterator == 'symbol';
|
|
207
220
|
|
|
208
|
-
var Object$
|
|
221
|
+
var $Object$2 = Object;
|
|
209
222
|
|
|
210
223
|
var isSymbol = useSymbolAsUid ? function (it) {
|
|
211
224
|
return typeof it == 'symbol';
|
|
212
225
|
} : function (it) {
|
|
213
226
|
var $Symbol = getBuiltIn('Symbol');
|
|
214
|
-
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$
|
|
227
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$2(it));
|
|
215
228
|
};
|
|
216
229
|
|
|
217
|
-
var String$
|
|
230
|
+
var $String$3 = String;
|
|
218
231
|
|
|
219
232
|
var tryToString = function (argument) {
|
|
220
233
|
try {
|
|
221
|
-
return String$
|
|
234
|
+
return $String$3(argument);
|
|
222
235
|
} catch (error) {
|
|
223
236
|
return 'Object';
|
|
224
237
|
}
|
|
225
238
|
};
|
|
226
239
|
|
|
227
|
-
var TypeError$
|
|
240
|
+
var $TypeError$e = TypeError;
|
|
228
241
|
|
|
229
242
|
// `Assert: IsCallable(argument) is true`
|
|
230
243
|
var aCallable = function (argument) {
|
|
231
244
|
if (isCallable(argument)) return argument;
|
|
232
|
-
throw TypeError$
|
|
245
|
+
throw $TypeError$e(tryToString(argument) + ' is not a function');
|
|
233
246
|
};
|
|
234
247
|
|
|
235
248
|
// `GetMethod` abstract operation
|
|
236
249
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
237
250
|
var getMethod = function (V, P) {
|
|
238
251
|
var func = V[P];
|
|
239
|
-
return func
|
|
252
|
+
return isNullOrUndefined$1(func) ? undefined : aCallable(func);
|
|
240
253
|
};
|
|
241
254
|
|
|
242
|
-
var TypeError$
|
|
255
|
+
var $TypeError$d = TypeError;
|
|
243
256
|
|
|
244
257
|
// `OrdinaryToPrimitive` abstract operation
|
|
245
258
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
@@ -248,7 +261,7 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
248
261
|
if (pref === 'string' && isCallable(fn = input.toString) && !isObject$2(val = functionCall(fn, input))) return val;
|
|
249
262
|
if (isCallable(fn = input.valueOf) && !isObject$2(val = functionCall(fn, input))) return val;
|
|
250
263
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$2(val = functionCall(fn, input))) return val;
|
|
251
|
-
throw TypeError$
|
|
264
|
+
throw $TypeError$d("Can't convert object to primitive value");
|
|
252
265
|
};
|
|
253
266
|
|
|
254
267
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
@@ -271,20 +284,20 @@ var shared = createCommonjsModule(function (module) {
|
|
|
271
284
|
(module.exports = function (key, value) {
|
|
272
285
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
273
286
|
})('versions', []).push({
|
|
274
|
-
version: '3.
|
|
287
|
+
version: '3.25.0',
|
|
275
288
|
mode: 'global',
|
|
276
289
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
277
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
290
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE',
|
|
278
291
|
source: 'https://github.com/zloirock/core-js'
|
|
279
292
|
});
|
|
280
293
|
});
|
|
281
294
|
|
|
282
|
-
var Object$
|
|
295
|
+
var $Object$1 = Object;
|
|
283
296
|
|
|
284
297
|
// `ToObject` abstract operation
|
|
285
298
|
// https://tc39.es/ecma262/#sec-toobject
|
|
286
299
|
var toObject = function (argument) {
|
|
287
|
-
return Object$
|
|
300
|
+
return $Object$1(requireObjectCoercible(argument));
|
|
288
301
|
};
|
|
289
302
|
|
|
290
303
|
var hasOwnProperty$1 = functionUncurryThis({}.hasOwnProperty);
|
|
@@ -310,9 +323,9 @@ var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
|
310
323
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
311
324
|
|
|
312
325
|
var wellKnownSymbol = function (name) {
|
|
313
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(
|
|
326
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(symbolConstructorDetection || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
314
327
|
var description = 'Symbol.' + name;
|
|
315
|
-
if (
|
|
328
|
+
if (symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)) {
|
|
316
329
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
317
330
|
} else if (useSymbolAsUid && symbolFor) {
|
|
318
331
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -322,7 +335,7 @@ var wellKnownSymbol = function (name) {
|
|
|
322
335
|
} return WellKnownSymbolsStore[name];
|
|
323
336
|
};
|
|
324
337
|
|
|
325
|
-
var TypeError$
|
|
338
|
+
var $TypeError$c = TypeError;
|
|
326
339
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
327
340
|
|
|
328
341
|
// `ToPrimitive` abstract operation
|
|
@@ -335,7 +348,7 @@ var toPrimitive = function (input, pref) {
|
|
|
335
348
|
if (pref === undefined) pref = 'default';
|
|
336
349
|
result = functionCall(exoticToPrim, input, pref);
|
|
337
350
|
if (!isObject$2(result) || isSymbol(result)) return result;
|
|
338
|
-
throw TypeError$
|
|
351
|
+
throw $TypeError$c("Can't convert object to primitive value");
|
|
339
352
|
}
|
|
340
353
|
if (pref === undefined) pref = 'number';
|
|
341
354
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -392,16 +405,16 @@ var v8PrototypeDefineBug = descriptors$1 && fails(function () {
|
|
|
392
405
|
}).prototype != 42;
|
|
393
406
|
});
|
|
394
407
|
|
|
395
|
-
var String$
|
|
396
|
-
var TypeError$
|
|
408
|
+
var $String$2 = String;
|
|
409
|
+
var $TypeError$b = TypeError;
|
|
397
410
|
|
|
398
411
|
// `Assert: Type(argument) is Object`
|
|
399
412
|
var anObject = function (argument) {
|
|
400
413
|
if (isObject$2(argument)) return argument;
|
|
401
|
-
throw TypeError$
|
|
414
|
+
throw $TypeError$b($String$2(argument) + ' is not an object');
|
|
402
415
|
};
|
|
403
416
|
|
|
404
|
-
var TypeError$
|
|
417
|
+
var $TypeError$a = TypeError;
|
|
405
418
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
406
419
|
var $defineProperty = Object.defineProperty;
|
|
407
420
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
@@ -434,7 +447,7 @@ var f$4 = descriptors$1 ? v8PrototypeDefineBug ? function defineProperty(O, P, A
|
|
|
434
447
|
if (ie8DomDefine) try {
|
|
435
448
|
return $defineProperty(O, P, Attributes);
|
|
436
449
|
} catch (error) { /* empty */ }
|
|
437
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
450
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$a('Accessors not supported');
|
|
438
451
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
439
452
|
return O;
|
|
440
453
|
};
|
|
@@ -478,7 +491,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
478
491
|
|
|
479
492
|
var WeakMap$1 = global_1.WeakMap;
|
|
480
493
|
|
|
481
|
-
var
|
|
494
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
482
495
|
|
|
483
496
|
var keys = shared('keys');
|
|
484
497
|
|
|
@@ -489,7 +502,7 @@ var sharedKey = function (key) {
|
|
|
489
502
|
var hiddenKeys$1 = {};
|
|
490
503
|
|
|
491
504
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
492
|
-
var TypeError$
|
|
505
|
+
var TypeError$2 = global_1.TypeError;
|
|
493
506
|
var WeakMap = global_1.WeakMap;
|
|
494
507
|
var set$1, get, has;
|
|
495
508
|
|
|
@@ -501,18 +514,18 @@ var getterFor = function (TYPE) {
|
|
|
501
514
|
return function (it) {
|
|
502
515
|
var state;
|
|
503
516
|
if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
|
|
504
|
-
throw TypeError$
|
|
517
|
+
throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
505
518
|
} return state;
|
|
506
519
|
};
|
|
507
520
|
};
|
|
508
521
|
|
|
509
|
-
if (
|
|
522
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
510
523
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
|
511
524
|
var wmget = functionUncurryThis(store.get);
|
|
512
525
|
var wmhas = functionUncurryThis(store.has);
|
|
513
526
|
var wmset = functionUncurryThis(store.set);
|
|
514
527
|
set$1 = function (it, metadata) {
|
|
515
|
-
if (wmhas(store, it)) throw
|
|
528
|
+
if (wmhas(store, it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
516
529
|
metadata.facade = it;
|
|
517
530
|
wmset(store, it, metadata);
|
|
518
531
|
return metadata;
|
|
@@ -527,7 +540,7 @@ if (nativeWeakMap || sharedStore.state) {
|
|
|
527
540
|
var STATE = sharedKey('state');
|
|
528
541
|
hiddenKeys$1[STATE] = true;
|
|
529
542
|
set$1 = function (it, metadata) {
|
|
530
|
-
if (hasOwnProperty_1(it, STATE)) throw
|
|
543
|
+
if (hasOwnProperty_1(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
531
544
|
metadata.facade = it;
|
|
532
545
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
533
546
|
return metadata;
|
|
@@ -571,7 +584,8 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
571
584
|
if (options && options.getter) name = 'get ' + name;
|
|
572
585
|
if (options && options.setter) name = 'set ' + name;
|
|
573
586
|
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
574
|
-
defineProperty(value, 'name', { value: name, configurable: true });
|
|
587
|
+
if (descriptors$1) defineProperty(value, 'name', { value: name, configurable: true });
|
|
588
|
+
else value.name = name;
|
|
575
589
|
}
|
|
576
590
|
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
577
591
|
defineProperty(value, 'length', { value: options.arity });
|
|
@@ -604,10 +618,17 @@ var defineBuiltIn = function (O, key, value, options) {
|
|
|
604
618
|
if (simple) O[key] = value;
|
|
605
619
|
else defineGlobalProperty(key, value);
|
|
606
620
|
} else {
|
|
607
|
-
|
|
608
|
-
|
|
621
|
+
try {
|
|
622
|
+
if (!options.unsafe) delete O[key];
|
|
623
|
+
else if (O[key]) simple = true;
|
|
624
|
+
} catch (error) { /* empty */ }
|
|
609
625
|
if (simple) O[key] = value;
|
|
610
|
-
else
|
|
626
|
+
else objectDefineProperty.f(O, key, {
|
|
627
|
+
value: value,
|
|
628
|
+
enumerable: false,
|
|
629
|
+
configurable: !options.nonConfigurable,
|
|
630
|
+
writable: !options.nonWritable
|
|
631
|
+
});
|
|
611
632
|
} return O;
|
|
612
633
|
};
|
|
613
634
|
|
|
@@ -836,7 +857,7 @@ test[TO_STRING_TAG$2] = 'z';
|
|
|
836
857
|
var toStringTagSupport = String(test) === '[object z]';
|
|
837
858
|
|
|
838
859
|
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
839
|
-
var Object
|
|
860
|
+
var $Object = Object;
|
|
840
861
|
|
|
841
862
|
// ES3 wrong here
|
|
842
863
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -853,18 +874,18 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
|
853
874
|
var O, tag, result;
|
|
854
875
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
855
876
|
// @@toStringTag case
|
|
856
|
-
: typeof (tag = tryGet(O = Object
|
|
877
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
857
878
|
// builtinTag case
|
|
858
879
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
859
880
|
// ES3 arguments fallback
|
|
860
881
|
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
861
882
|
};
|
|
862
883
|
|
|
863
|
-
var String$
|
|
884
|
+
var $String$1 = String;
|
|
864
885
|
|
|
865
886
|
var toString_1 = function (argument) {
|
|
866
887
|
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
867
|
-
return String$
|
|
888
|
+
return $String$1(argument);
|
|
868
889
|
};
|
|
869
890
|
|
|
870
891
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -878,6 +899,7 @@ var regexpFlags = function () {
|
|
|
878
899
|
if (that.multiline) result += 'm';
|
|
879
900
|
if (that.dotAll) result += 's';
|
|
880
901
|
if (that.unicode) result += 'u';
|
|
902
|
+
if (that.unicodeSets) result += 'v';
|
|
881
903
|
if (that.sticky) result += 'y';
|
|
882
904
|
return result;
|
|
883
905
|
};
|
|
@@ -1133,7 +1155,7 @@ if (PATCH) {
|
|
|
1133
1155
|
}
|
|
1134
1156
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1135
1157
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1136
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
1158
|
+
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1137
1159
|
functionCall(nativeReplace, match[0], reCopy, function () {
|
|
1138
1160
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
1139
1161
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
@@ -1275,7 +1297,7 @@ var advanceStringIndex = function (S, index, unicode) {
|
|
|
1275
1297
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
1276
1298
|
};
|
|
1277
1299
|
|
|
1278
|
-
var TypeError$
|
|
1300
|
+
var $TypeError$9 = TypeError;
|
|
1279
1301
|
|
|
1280
1302
|
// `RegExpExec` abstract operation
|
|
1281
1303
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
@@ -1287,7 +1309,7 @@ var regexpExecAbstract = function (R, S) {
|
|
|
1287
1309
|
return result;
|
|
1288
1310
|
}
|
|
1289
1311
|
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
|
1290
|
-
throw TypeError$
|
|
1312
|
+
throw $TypeError$9('RegExp#exec called on incompatible receiver');
|
|
1291
1313
|
};
|
|
1292
1314
|
|
|
1293
1315
|
// @@match logic
|
|
@@ -1297,7 +1319,7 @@ fixRegexpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
|
|
|
1297
1319
|
// https://tc39.es/ecma262/#sec-string.prototype.match
|
|
1298
1320
|
function match(regexp) {
|
|
1299
1321
|
var O = requireObjectCoercible(this);
|
|
1300
|
-
var matcher = regexp
|
|
1322
|
+
var matcher = isNullOrUndefined$1(regexp) ? undefined : getMethod(regexp, MATCH);
|
|
1301
1323
|
return matcher ? functionCall(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString_1(O));
|
|
1302
1324
|
},
|
|
1303
1325
|
// `RegExp.prototype[@@match]` method
|
|
@@ -1335,7 +1357,7 @@ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
|
1335
1357
|
});
|
|
1336
1358
|
};
|
|
1337
1359
|
|
|
1338
|
-
var
|
|
1360
|
+
var nativeJoin = functionUncurryThis([].join);
|
|
1339
1361
|
|
|
1340
1362
|
var ES3_STRINGS = indexedObject != Object;
|
|
1341
1363
|
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
@@ -1344,7 +1366,7 @@ var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
|
1344
1366
|
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
1345
1367
|
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
1346
1368
|
join: function join(separator) {
|
|
1347
|
-
return
|
|
1369
|
+
return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
1348
1370
|
}
|
|
1349
1371
|
});
|
|
1350
1372
|
|
|
@@ -1377,6 +1399,14 @@ var isArray$2 = Array.isArray || function isArray(argument) {
|
|
|
1377
1399
|
return classofRaw(argument) == 'Array';
|
|
1378
1400
|
};
|
|
1379
1401
|
|
|
1402
|
+
var $TypeError$8 = TypeError;
|
|
1403
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
1404
|
+
|
|
1405
|
+
var doesNotExceedSafeInteger = function (it) {
|
|
1406
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$8('Maximum allowed index exceeded');
|
|
1407
|
+
return it;
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1380
1410
|
var createProperty = function (object, key, value) {
|
|
1381
1411
|
var propertyKey = toPropertyKey(key);
|
|
1382
1412
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
@@ -1430,7 +1460,7 @@ var isConstructor = !construct || fails(function () {
|
|
|
1430
1460
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
1431
1461
|
|
|
1432
1462
|
var SPECIES$4 = wellKnownSymbol('species');
|
|
1433
|
-
var Array
|
|
1463
|
+
var $Array = Array;
|
|
1434
1464
|
|
|
1435
1465
|
// a part of `ArraySpeciesCreate` abstract operation
|
|
1436
1466
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
@@ -1439,12 +1469,12 @@ var arraySpeciesConstructor = function (originalArray) {
|
|
|
1439
1469
|
if (isArray$2(originalArray)) {
|
|
1440
1470
|
C = originalArray.constructor;
|
|
1441
1471
|
// cross-realm fallback
|
|
1442
|
-
if (isConstructor(C) && (C === Array
|
|
1472
|
+
if (isConstructor(C) && (C === $Array || isArray$2(C.prototype))) C = undefined;
|
|
1443
1473
|
else if (isObject$2(C)) {
|
|
1444
1474
|
C = C[SPECIES$4];
|
|
1445
1475
|
if (C === null) C = undefined;
|
|
1446
1476
|
}
|
|
1447
|
-
} return C === undefined ? Array
|
|
1477
|
+
} return C === undefined ? $Array : C;
|
|
1448
1478
|
};
|
|
1449
1479
|
|
|
1450
1480
|
// `ArraySpeciesCreate` abstract operation
|
|
@@ -1470,9 +1500,6 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
|
1470
1500
|
};
|
|
1471
1501
|
|
|
1472
1502
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
1473
|
-
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
1474
|
-
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
1475
|
-
var TypeError$9 = global_1.TypeError;
|
|
1476
1503
|
|
|
1477
1504
|
// We can't use this feature detection in V8 since it causes
|
|
1478
1505
|
// deoptimization and serious performance degradation
|
|
@@ -1507,10 +1534,10 @@ _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
|
1507
1534
|
E = i === -1 ? O : arguments[i];
|
|
1508
1535
|
if (isConcatSpreadable(E)) {
|
|
1509
1536
|
len = lengthOfArrayLike(E);
|
|
1510
|
-
|
|
1537
|
+
doesNotExceedSafeInteger(n + len);
|
|
1511
1538
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1512
1539
|
} else {
|
|
1513
|
-
|
|
1540
|
+
doesNotExceedSafeInteger(n + 1);
|
|
1514
1541
|
createProperty(A, n++, E);
|
|
1515
1542
|
}
|
|
1516
1543
|
}
|
|
@@ -1567,11 +1594,11 @@ var isRegexp = function (it) {
|
|
|
1567
1594
|
return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
1568
1595
|
};
|
|
1569
1596
|
|
|
1570
|
-
var TypeError$
|
|
1597
|
+
var $TypeError$7 = TypeError;
|
|
1571
1598
|
|
|
1572
1599
|
var notARegexp = function (it) {
|
|
1573
1600
|
if (isRegexp(it)) {
|
|
1574
|
-
throw TypeError$
|
|
1601
|
+
throw $TypeError$7("The method doesn't accept regular expressions");
|
|
1575
1602
|
} return it;
|
|
1576
1603
|
};
|
|
1577
1604
|
|
|
@@ -1598,7 +1625,7 @@ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
|
1598
1625
|
|
|
1599
1626
|
|
|
1600
1627
|
// eslint-disable-next-line es-x/no-string-prototype-endswith -- safe
|
|
1601
|
-
var
|
|
1628
|
+
var nativeEndsWith = functionUncurryThis(''.endsWith);
|
|
1602
1629
|
var slice = functionUncurryThis(''.slice);
|
|
1603
1630
|
var min$1 = Math.min;
|
|
1604
1631
|
|
|
@@ -1619,8 +1646,8 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT
|
|
|
1619
1646
|
var len = that.length;
|
|
1620
1647
|
var end = endPosition === undefined ? len : min$1(toLength(endPosition), len);
|
|
1621
1648
|
var search = toString_1(searchString);
|
|
1622
|
-
return
|
|
1623
|
-
?
|
|
1649
|
+
return nativeEndsWith
|
|
1650
|
+
? nativeEndsWith(that, search, end)
|
|
1624
1651
|
: slice(that, end - search.length, end) === search;
|
|
1625
1652
|
}
|
|
1626
1653
|
});
|
|
@@ -1634,7 +1661,7 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
|
1634
1661
|
|
|
1635
1662
|
|
|
1636
1663
|
// eslint-disable-next-line es-x/no-string-prototype-startswith -- safe
|
|
1637
|
-
var
|
|
1664
|
+
var nativeStartsWith = functionUncurryThis(''.startsWith);
|
|
1638
1665
|
var stringSlice = functionUncurryThis(''.slice);
|
|
1639
1666
|
var min = Math.min;
|
|
1640
1667
|
|
|
@@ -1653,20 +1680,20 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_I
|
|
|
1653
1680
|
notARegexp(searchString);
|
|
1654
1681
|
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
1655
1682
|
var search = toString_1(searchString);
|
|
1656
|
-
return
|
|
1657
|
-
?
|
|
1683
|
+
return nativeStartsWith
|
|
1684
|
+
? nativeStartsWith(that, search, index)
|
|
1658
1685
|
: stringSlice(that, index, index + search.length) === search;
|
|
1659
1686
|
}
|
|
1660
1687
|
});
|
|
1661
1688
|
|
|
1662
1689
|
var engineIsNode = classofRaw(global_1.process) == 'process';
|
|
1663
1690
|
|
|
1664
|
-
var String
|
|
1665
|
-
var TypeError$
|
|
1691
|
+
var $String = String;
|
|
1692
|
+
var $TypeError$6 = TypeError;
|
|
1666
1693
|
|
|
1667
1694
|
var aPossiblePrototype = function (argument) {
|
|
1668
1695
|
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1669
|
-
throw TypeError$
|
|
1696
|
+
throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
|
|
1670
1697
|
};
|
|
1671
1698
|
|
|
1672
1699
|
/* eslint-disable no-proto -- safe */
|
|
@@ -1724,19 +1751,19 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
|
|
|
1724
1751
|
}
|
|
1725
1752
|
};
|
|
1726
1753
|
|
|
1727
|
-
var TypeError$
|
|
1754
|
+
var $TypeError$5 = TypeError;
|
|
1728
1755
|
|
|
1729
1756
|
var anInstance = function (it, Prototype) {
|
|
1730
1757
|
if (objectIsPrototypeOf(Prototype, it)) return it;
|
|
1731
|
-
throw TypeError$
|
|
1758
|
+
throw $TypeError$5('Incorrect invocation');
|
|
1732
1759
|
};
|
|
1733
1760
|
|
|
1734
|
-
var TypeError$
|
|
1761
|
+
var $TypeError$4 = TypeError;
|
|
1735
1762
|
|
|
1736
1763
|
// `Assert: IsConstructor(argument) is true`
|
|
1737
1764
|
var aConstructor = function (argument) {
|
|
1738
1765
|
if (isConstructor(argument)) return argument;
|
|
1739
|
-
throw TypeError$
|
|
1766
|
+
throw $TypeError$4(tryToString(argument) + ' is not a constructor');
|
|
1740
1767
|
};
|
|
1741
1768
|
|
|
1742
1769
|
var SPECIES$1 = wellKnownSymbol('species');
|
|
@@ -1746,7 +1773,7 @@ var SPECIES$1 = wellKnownSymbol('species');
|
|
|
1746
1773
|
var speciesConstructor = function (O, defaultConstructor) {
|
|
1747
1774
|
var C = anObject(O).constructor;
|
|
1748
1775
|
var S;
|
|
1749
|
-
return C === undefined || (S = anObject(C)[SPECIES$1])
|
|
1776
|
+
return C === undefined || isNullOrUndefined$1(S = anObject(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
1750
1777
|
};
|
|
1751
1778
|
|
|
1752
1779
|
var FunctionPrototype$1 = Function.prototype;
|
|
@@ -1770,10 +1797,10 @@ var functionBindContext = function (fn, that) {
|
|
|
1770
1797
|
|
|
1771
1798
|
var arraySlice = functionUncurryThis([].slice);
|
|
1772
1799
|
|
|
1773
|
-
var TypeError$
|
|
1800
|
+
var $TypeError$3 = TypeError;
|
|
1774
1801
|
|
|
1775
1802
|
var validateArgumentsLength = function (passed, required) {
|
|
1776
|
-
if (passed < required) throw TypeError$
|
|
1803
|
+
if (passed < required) throw $TypeError$3('Not enough arguments');
|
|
1777
1804
|
return passed;
|
|
1778
1805
|
};
|
|
1779
1806
|
|
|
@@ -2012,7 +2039,12 @@ var queue = Queue;
|
|
|
2012
2039
|
|
|
2013
2040
|
var promiseNativeConstructor = global_1.Promise;
|
|
2014
2041
|
|
|
2015
|
-
|
|
2042
|
+
/* global Deno -- Deno case */
|
|
2043
|
+
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
2044
|
+
|
|
2045
|
+
var engineIsBrowser = !engineIsDeno && !engineIsNode
|
|
2046
|
+
&& typeof window == 'object'
|
|
2047
|
+
&& typeof document == 'object';
|
|
2016
2048
|
|
|
2017
2049
|
promiseNativeConstructor && promiseNativeConstructor.prototype;
|
|
2018
2050
|
var SPECIES = wellKnownSymbol('species');
|
|
@@ -2029,18 +2061,18 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced_1('Promise', function () {
|
|
|
2029
2061
|
// We can't use @@species feature detection in V8 since it causes
|
|
2030
2062
|
// deoptimization and performance degradation
|
|
2031
2063
|
// https://github.com/zloirock/core-js/issues/679
|
|
2032
|
-
if (engineV8Version
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2064
|
+
if (!engineV8Version || engineV8Version < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
2065
|
+
// Detect correctness of subclassing with @@species support
|
|
2066
|
+
var promise = new promiseNativeConstructor(function (resolve) { resolve(1); });
|
|
2067
|
+
var FakePromise = function (exec) {
|
|
2068
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
2069
|
+
};
|
|
2070
|
+
var constructor = promise.constructor = {};
|
|
2071
|
+
constructor[SPECIES] = FakePromise;
|
|
2072
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
2073
|
+
if (!SUBCLASSING) return true;
|
|
2042
2074
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
2043
|
-
return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2075
|
+
} return !GLOBAL_CORE_JS_PROMISE && (engineIsBrowser || engineIsDeno) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2044
2076
|
});
|
|
2045
2077
|
|
|
2046
2078
|
var promiseConstructorDetection = {
|
|
@@ -2049,10 +2081,12 @@ var promiseConstructorDetection = {
|
|
|
2049
2081
|
SUBCLASSING: SUBCLASSING
|
|
2050
2082
|
};
|
|
2051
2083
|
|
|
2084
|
+
var $TypeError$2 = TypeError;
|
|
2085
|
+
|
|
2052
2086
|
var PromiseCapability = function (C) {
|
|
2053
2087
|
var resolve, reject;
|
|
2054
2088
|
this.promise = new C(function ($$resolve, $$reject) {
|
|
2055
|
-
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
2089
|
+
if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor');
|
|
2056
2090
|
resolve = $$resolve;
|
|
2057
2091
|
reject = $$reject;
|
|
2058
2092
|
});
|
|
@@ -2089,7 +2123,7 @@ var setInternalState = internalState.set;
|
|
|
2089
2123
|
var NativePromisePrototype$1 = promiseNativeConstructor && promiseNativeConstructor.prototype;
|
|
2090
2124
|
var PromiseConstructor = promiseNativeConstructor;
|
|
2091
2125
|
var PromisePrototype = NativePromisePrototype$1;
|
|
2092
|
-
var TypeError$
|
|
2126
|
+
var TypeError$1 = global_1.TypeError;
|
|
2093
2127
|
var document$1 = global_1.document;
|
|
2094
2128
|
var process$1 = global_1.process;
|
|
2095
2129
|
var newPromiseCapability = newPromiseCapability$1.f;
|
|
@@ -2136,7 +2170,7 @@ var callReaction = function (reaction, state) {
|
|
|
2136
2170
|
}
|
|
2137
2171
|
}
|
|
2138
2172
|
if (result === reaction.promise) {
|
|
2139
|
-
reject(TypeError$
|
|
2173
|
+
reject(TypeError$1('Promise-chain cycle'));
|
|
2140
2174
|
} else if (then = isThenable(result)) {
|
|
2141
2175
|
functionCall(then, result, resolve, reject);
|
|
2142
2176
|
} else resolve(result);
|
|
@@ -2226,7 +2260,7 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
2226
2260
|
state.done = true;
|
|
2227
2261
|
if (unwrap) state = unwrap;
|
|
2228
2262
|
try {
|
|
2229
|
-
if (state.facade === value) throw TypeError$
|
|
2263
|
+
if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
|
|
2230
2264
|
var then = isThenable(value);
|
|
2231
2265
|
if (then) {
|
|
2232
2266
|
microtask(function () {
|
|
@@ -2357,17 +2391,17 @@ var isArrayIteratorMethod = function (it) {
|
|
|
2357
2391
|
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
2358
2392
|
|
|
2359
2393
|
var getIteratorMethod = function (it) {
|
|
2360
|
-
if (it
|
|
2394
|
+
if (!isNullOrUndefined$1(it)) return getMethod(it, ITERATOR$1)
|
|
2361
2395
|
|| getMethod(it, '@@iterator')
|
|
2362
2396
|
|| iterators[classof(it)];
|
|
2363
2397
|
};
|
|
2364
2398
|
|
|
2365
|
-
var TypeError$
|
|
2399
|
+
var $TypeError$1 = TypeError;
|
|
2366
2400
|
|
|
2367
2401
|
var getIterator = function (argument, usingIterator) {
|
|
2368
2402
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
2369
2403
|
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
2370
|
-
throw TypeError$
|
|
2404
|
+
throw $TypeError$1(tryToString(argument) + ' is not iterable');
|
|
2371
2405
|
};
|
|
2372
2406
|
|
|
2373
2407
|
var iteratorClose = function (iterator, kind, value) {
|
|
@@ -2390,7 +2424,7 @@ var iteratorClose = function (iterator, kind, value) {
|
|
|
2390
2424
|
return value;
|
|
2391
2425
|
};
|
|
2392
2426
|
|
|
2393
|
-
var TypeError
|
|
2427
|
+
var $TypeError = TypeError;
|
|
2394
2428
|
|
|
2395
2429
|
var Result = function (stopped, result) {
|
|
2396
2430
|
this.stopped = stopped;
|
|
@@ -2402,6 +2436,7 @@ var ResultPrototype = Result.prototype;
|
|
|
2402
2436
|
var iterate = function (iterable, unboundFunction, options) {
|
|
2403
2437
|
var that = options && options.that;
|
|
2404
2438
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2439
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
2405
2440
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2406
2441
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2407
2442
|
var fn = functionBindContext(unboundFunction, that);
|
|
@@ -2419,11 +2454,13 @@ var iterate = function (iterable, unboundFunction, options) {
|
|
|
2419
2454
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2420
2455
|
};
|
|
2421
2456
|
|
|
2422
|
-
if (
|
|
2457
|
+
if (IS_RECORD) {
|
|
2458
|
+
iterator = iterable.iterator;
|
|
2459
|
+
} else if (IS_ITERATOR) {
|
|
2423
2460
|
iterator = iterable;
|
|
2424
2461
|
} else {
|
|
2425
2462
|
iterFn = getIteratorMethod(iterable);
|
|
2426
|
-
if (!iterFn) throw TypeError
|
|
2463
|
+
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
|
|
2427
2464
|
// optimisation for array iterators
|
|
2428
2465
|
if (isArrayIteratorMethod(iterFn)) {
|
|
2429
2466
|
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
@@ -2434,7 +2471,7 @@ var iterate = function (iterable, unboundFunction, options) {
|
|
|
2434
2471
|
iterator = getIterator(iterable, iterFn);
|
|
2435
2472
|
}
|
|
2436
2473
|
|
|
2437
|
-
next = iterator.next;
|
|
2474
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2438
2475
|
while (!(step = functionCall(next, iterator)).done) {
|
|
2439
2476
|
try {
|
|
2440
2477
|
result = callFn(step.value);
|
|
@@ -4276,6 +4313,7 @@ var url = {
|
|
|
4276
4313
|
parse: urlParse,
|
|
4277
4314
|
resolve: urlResolve,
|
|
4278
4315
|
resolveObject: urlResolveObject,
|
|
4316
|
+
fileURLToPath: urlFileURLToPath,
|
|
4279
4317
|
format: urlFormat,
|
|
4280
4318
|
Url: Url
|
|
4281
4319
|
};
|
|
@@ -4618,6 +4656,31 @@ function parse(self, url, parseQueryString, slashesDenoteHost) {
|
|
|
4618
4656
|
return self;
|
|
4619
4657
|
}
|
|
4620
4658
|
|
|
4659
|
+
function urlFileURLToPath(path) {
|
|
4660
|
+
if (typeof path === 'string')
|
|
4661
|
+
path = new Url().parse(path);
|
|
4662
|
+
else if (!(path instanceof Url))
|
|
4663
|
+
throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path));
|
|
4664
|
+
if (path.protocol !== 'file:')
|
|
4665
|
+
throw new TypeError('The URL must be of scheme file');
|
|
4666
|
+
return getPathFromURLPosix(path);
|
|
4667
|
+
}
|
|
4668
|
+
|
|
4669
|
+
function getPathFromURLPosix(url) {
|
|
4670
|
+
const pathname = url.pathname;
|
|
4671
|
+
for (let n = 0; n < pathname.length; n++) {
|
|
4672
|
+
if (pathname[n] === '%') {
|
|
4673
|
+
const third = pathname.codePointAt(n + 2) | 0x20;
|
|
4674
|
+
if (pathname[n + 1] === '2' && third === 102) {
|
|
4675
|
+
throw new TypeError(
|
|
4676
|
+
'must not include encoded / characters'
|
|
4677
|
+
);
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
}
|
|
4681
|
+
return decodeURIComponent(pathname);
|
|
4682
|
+
}
|
|
4683
|
+
|
|
4621
4684
|
// format a parsed object into a url string
|
|
4622
4685
|
function urlFormat(obj) {
|
|
4623
4686
|
// ensure it's an object, and not a string url.
|
|
@@ -6008,7 +6071,7 @@ axios_1.default = default_1;
|
|
|
6008
6071
|
var axios = axios_1;
|
|
6009
6072
|
|
|
6010
6073
|
var name$1 = "@tryghost/content-api";
|
|
6011
|
-
var version = "1.
|
|
6074
|
+
var version = "1.11.2";
|
|
6012
6075
|
var repository = "https://github.com/TryGhost/SDK/tree/master/packages/content-api";
|
|
6013
6076
|
var author = "Ghost Foundation";
|
|
6014
6077
|
var license = "MIT";
|
|
@@ -6037,19 +6100,19 @@ var publishConfig = {
|
|
|
6037
6100
|
access: "public"
|
|
6038
6101
|
};
|
|
6039
6102
|
var devDependencies = {
|
|
6040
|
-
"@babel/core": "7.
|
|
6103
|
+
"@babel/core": "7.19.0",
|
|
6041
6104
|
"@babel/polyfill": "7.12.1",
|
|
6042
|
-
"@babel/preset-env": "7.
|
|
6105
|
+
"@babel/preset-env": "7.19.0",
|
|
6043
6106
|
"@rollup/plugin-json": "4.1.0",
|
|
6044
|
-
c8: "7.
|
|
6045
|
-
"core-js": "3.
|
|
6046
|
-
"eslint-plugin-ghost": "2.
|
|
6107
|
+
c8: "7.12.0",
|
|
6108
|
+
"core-js": "3.25.0",
|
|
6109
|
+
"eslint-plugin-ghost": "2.15.1",
|
|
6047
6110
|
mocha: "10.0.0",
|
|
6048
|
-
rollup: "2.
|
|
6111
|
+
rollup: "2.79.0",
|
|
6049
6112
|
"rollup-plugin-babel": "4.4.0",
|
|
6050
6113
|
"rollup-plugin-commonjs": "10.1.0",
|
|
6051
6114
|
"rollup-plugin-node-resolve": "5.2.0",
|
|
6052
|
-
"rollup-plugin-polyfill-node": "
|
|
6115
|
+
"rollup-plugin-polyfill-node": "0.10.2",
|
|
6053
6116
|
"rollup-plugin-replace": "2.2.0",
|
|
6054
6117
|
"rollup-plugin-terser": "7.0.2",
|
|
6055
6118
|
should: "13.2.3",
|
|
@@ -6058,7 +6121,7 @@ var devDependencies = {
|
|
|
6058
6121
|
var dependencies = {
|
|
6059
6122
|
axios: "^0.27.0"
|
|
6060
6123
|
};
|
|
6061
|
-
var gitHead = "
|
|
6124
|
+
var gitHead = "3547712bea5948482aabe9cbe484561501885de9";
|
|
6062
6125
|
var packageInfo = {
|
|
6063
6126
|
name: name$1,
|
|
6064
6127
|
version: version,
|
|
@@ -6078,6 +6141,7 @@ var packageInfo = {
|
|
|
6078
6141
|
gitHead: gitHead
|
|
6079
6142
|
};
|
|
6080
6143
|
|
|
6144
|
+
var USER_AGENT_DEFAULT = false;
|
|
6081
6145
|
var packageVersion = packageInfo.version;
|
|
6082
6146
|
var defaultAcceptVersionHeader = 'v5.0';
|
|
6083
6147
|
var supportedVersions = ['v2', 'v3', 'v4', 'v5', 'canary'];
|
|
@@ -6128,6 +6192,7 @@ var defaultMakeRequest = function defaultMakeRequest(_ref) {
|
|
|
6128
6192
|
* @param {String} options.key
|
|
6129
6193
|
* @param {String} [options.ghostPath]
|
|
6130
6194
|
* @param {String|Boolean} options.version - a version string like v3, v4, v5 or boolean value identifying presence of Accept-Version header
|
|
6195
|
+
* @param {String|Boolean} [options.userAgent] - value controlling the 'User-Agent' header should be sent with a request
|
|
6131
6196
|
* @param {Function} [options.makeRequest]
|
|
6132
6197
|
* @param {String} [options.host] Deprecated
|
|
6133
6198
|
*/
|
|
@@ -6138,6 +6203,7 @@ function GhostContentAPI(_ref2) {
|
|
|
6138
6203
|
key = _ref2.key,
|
|
6139
6204
|
host = _ref2.host,
|
|
6140
6205
|
version = _ref2.version,
|
|
6206
|
+
userAgent = _ref2.userAgent,
|
|
6141
6207
|
_ref2$ghostPath = _ref2.ghostPath,
|
|
6142
6208
|
ghostPath = _ref2$ghostPath === void 0 ? 'ghost' : _ref2$ghostPath,
|
|
6143
6209
|
_ref2$makeRequest = _ref2.makeRequest,
|
|
@@ -6161,6 +6227,7 @@ function GhostContentAPI(_ref2) {
|
|
|
6161
6227
|
url: url,
|
|
6162
6228
|
key: key,
|
|
6163
6229
|
version: version,
|
|
6230
|
+
userAgent: userAgent,
|
|
6164
6231
|
ghostPath: ghostPath,
|
|
6165
6232
|
makeRequest: makeRequest
|
|
6166
6233
|
});
|
|
@@ -6214,6 +6281,10 @@ function GhostContentAPI(_ref2) {
|
|
|
6214
6281
|
throw new Error("".concat(name, " Config Invalid: 'key' ").concat(key, " must have 26 hex characters"));
|
|
6215
6282
|
}
|
|
6216
6283
|
|
|
6284
|
+
if (userAgent === undefined) {
|
|
6285
|
+
userAgent = USER_AGENT_DEFAULT;
|
|
6286
|
+
}
|
|
6287
|
+
|
|
6217
6288
|
var api = ['posts', 'authors', 'tags', 'pages', 'settings', 'tiers', 'newsletters', 'offers'].reduce(function (apiObject, resourceType) {
|
|
6218
6289
|
function browse() {
|
|
6219
6290
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -6256,7 +6327,14 @@ function GhostContentAPI(_ref2) {
|
|
|
6256
6327
|
var headers = membersToken ? {
|
|
6257
6328
|
Authorization: "GhostMembers ".concat(membersToken)
|
|
6258
6329
|
} : {};
|
|
6259
|
-
|
|
6330
|
+
|
|
6331
|
+
if (userAgent) {
|
|
6332
|
+
if (typeof userAgent === 'boolean') {
|
|
6333
|
+
headers['User-Agent'] = "GhostContentSDK/".concat(packageVersion);
|
|
6334
|
+
} else {
|
|
6335
|
+
headers['User-Agent'] = userAgent;
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6260
6338
|
|
|
6261
6339
|
if (acceptVersionHeader) {
|
|
6262
6340
|
headers['Accept-Version'] = acceptVersionHeader;
|