@tryghost/content-api 1.10.0 → 1.11.1
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 -13
- package/es/content-api.js +154 -92
- package/es/content-api.js.map +1 -1
- package/lib/content-api.js +20 -5
- package/package.json +8 -8
- 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,24 @@ 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
|
-
var TypeError$
|
|
123
|
+
var $TypeError$e = TypeError;
|
|
124
124
|
|
|
125
125
|
// `RequireObjectCoercible` abstract operation
|
|
126
126
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
127
127
|
var requireObjectCoercible = function (it) {
|
|
128
|
-
if (it == undefined) throw TypeError$
|
|
128
|
+
if (it == undefined) throw $TypeError$e("Can't call method on " + it);
|
|
129
129
|
return it;
|
|
130
130
|
};
|
|
131
131
|
|
|
@@ -205,31 +205,31 @@ var useSymbolAsUid = nativeSymbol
|
|
|
205
205
|
&& !Symbol.sham
|
|
206
206
|
&& typeof Symbol.iterator == 'symbol';
|
|
207
207
|
|
|
208
|
-
var Object$
|
|
208
|
+
var $Object$2 = Object;
|
|
209
209
|
|
|
210
210
|
var isSymbol = useSymbolAsUid ? function (it) {
|
|
211
211
|
return typeof it == 'symbol';
|
|
212
212
|
} : function (it) {
|
|
213
213
|
var $Symbol = getBuiltIn('Symbol');
|
|
214
|
-
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$
|
|
214
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$2(it));
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
var String$
|
|
217
|
+
var $String$3 = String;
|
|
218
218
|
|
|
219
219
|
var tryToString = function (argument) {
|
|
220
220
|
try {
|
|
221
|
-
return String$
|
|
221
|
+
return $String$3(argument);
|
|
222
222
|
} catch (error) {
|
|
223
223
|
return 'Object';
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
|
|
227
|
-
var TypeError$
|
|
227
|
+
var $TypeError$d = TypeError;
|
|
228
228
|
|
|
229
229
|
// `Assert: IsCallable(argument) is true`
|
|
230
230
|
var aCallable = function (argument) {
|
|
231
231
|
if (isCallable(argument)) return argument;
|
|
232
|
-
throw TypeError$
|
|
232
|
+
throw $TypeError$d(tryToString(argument) + ' is not a function');
|
|
233
233
|
};
|
|
234
234
|
|
|
235
235
|
// `GetMethod` abstract operation
|
|
@@ -239,7 +239,7 @@ var getMethod = function (V, P) {
|
|
|
239
239
|
return func == null ? undefined : aCallable(func);
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
var TypeError$
|
|
242
|
+
var $TypeError$c = TypeError;
|
|
243
243
|
|
|
244
244
|
// `OrdinaryToPrimitive` abstract operation
|
|
245
245
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
@@ -248,7 +248,7 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
248
248
|
if (pref === 'string' && isCallable(fn = input.toString) && !isObject$2(val = functionCall(fn, input))) return val;
|
|
249
249
|
if (isCallable(fn = input.valueOf) && !isObject$2(val = functionCall(fn, input))) return val;
|
|
250
250
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$2(val = functionCall(fn, input))) return val;
|
|
251
|
-
throw TypeError$
|
|
251
|
+
throw $TypeError$c("Can't convert object to primitive value");
|
|
252
252
|
};
|
|
253
253
|
|
|
254
254
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
@@ -271,20 +271,20 @@ var shared = createCommonjsModule(function (module) {
|
|
|
271
271
|
(module.exports = function (key, value) {
|
|
272
272
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
273
273
|
})('versions', []).push({
|
|
274
|
-
version: '3.
|
|
274
|
+
version: '3.24.1',
|
|
275
275
|
mode: 'global',
|
|
276
276
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
277
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
277
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
|
|
278
278
|
source: 'https://github.com/zloirock/core-js'
|
|
279
279
|
});
|
|
280
280
|
});
|
|
281
281
|
|
|
282
|
-
var Object$
|
|
282
|
+
var $Object$1 = Object;
|
|
283
283
|
|
|
284
284
|
// `ToObject` abstract operation
|
|
285
285
|
// https://tc39.es/ecma262/#sec-toobject
|
|
286
286
|
var toObject = function (argument) {
|
|
287
|
-
return Object$
|
|
287
|
+
return $Object$1(requireObjectCoercible(argument));
|
|
288
288
|
};
|
|
289
289
|
|
|
290
290
|
var hasOwnProperty$1 = functionUncurryThis({}.hasOwnProperty);
|
|
@@ -322,7 +322,7 @@ var wellKnownSymbol = function (name) {
|
|
|
322
322
|
} return WellKnownSymbolsStore[name];
|
|
323
323
|
};
|
|
324
324
|
|
|
325
|
-
var TypeError$
|
|
325
|
+
var $TypeError$b = TypeError;
|
|
326
326
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
327
327
|
|
|
328
328
|
// `ToPrimitive` abstract operation
|
|
@@ -335,7 +335,7 @@ var toPrimitive = function (input, pref) {
|
|
|
335
335
|
if (pref === undefined) pref = 'default';
|
|
336
336
|
result = functionCall(exoticToPrim, input, pref);
|
|
337
337
|
if (!isObject$2(result) || isSymbol(result)) return result;
|
|
338
|
-
throw TypeError$
|
|
338
|
+
throw $TypeError$b("Can't convert object to primitive value");
|
|
339
339
|
}
|
|
340
340
|
if (pref === undefined) pref = 'number';
|
|
341
341
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -392,16 +392,16 @@ var v8PrototypeDefineBug = descriptors$1 && fails(function () {
|
|
|
392
392
|
}).prototype != 42;
|
|
393
393
|
});
|
|
394
394
|
|
|
395
|
-
var String$
|
|
396
|
-
var TypeError$
|
|
395
|
+
var $String$2 = String;
|
|
396
|
+
var $TypeError$a = TypeError;
|
|
397
397
|
|
|
398
398
|
// `Assert: Type(argument) is Object`
|
|
399
399
|
var anObject = function (argument) {
|
|
400
400
|
if (isObject$2(argument)) return argument;
|
|
401
|
-
throw TypeError$
|
|
401
|
+
throw $TypeError$a($String$2(argument) + ' is not an object');
|
|
402
402
|
};
|
|
403
403
|
|
|
404
|
-
var TypeError$
|
|
404
|
+
var $TypeError$9 = TypeError;
|
|
405
405
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
406
406
|
var $defineProperty = Object.defineProperty;
|
|
407
407
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
@@ -434,7 +434,7 @@ var f$4 = descriptors$1 ? v8PrototypeDefineBug ? function defineProperty(O, P, A
|
|
|
434
434
|
if (ie8DomDefine) try {
|
|
435
435
|
return $defineProperty(O, P, Attributes);
|
|
436
436
|
} catch (error) { /* empty */ }
|
|
437
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
437
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$9('Accessors not supported');
|
|
438
438
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
439
439
|
return O;
|
|
440
440
|
};
|
|
@@ -489,7 +489,7 @@ var sharedKey = function (key) {
|
|
|
489
489
|
var hiddenKeys$1 = {};
|
|
490
490
|
|
|
491
491
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
492
|
-
var TypeError$
|
|
492
|
+
var TypeError$2 = global_1.TypeError;
|
|
493
493
|
var WeakMap = global_1.WeakMap;
|
|
494
494
|
var set$1, get, has;
|
|
495
495
|
|
|
@@ -501,7 +501,7 @@ var getterFor = function (TYPE) {
|
|
|
501
501
|
return function (it) {
|
|
502
502
|
var state;
|
|
503
503
|
if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
|
|
504
|
-
throw TypeError$
|
|
504
|
+
throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
505
505
|
} return state;
|
|
506
506
|
};
|
|
507
507
|
};
|
|
@@ -512,7 +512,7 @@ if (nativeWeakMap || sharedStore.state) {
|
|
|
512
512
|
var wmhas = functionUncurryThis(store.has);
|
|
513
513
|
var wmset = functionUncurryThis(store.set);
|
|
514
514
|
set$1 = function (it, metadata) {
|
|
515
|
-
if (wmhas(store, it)) throw new TypeError$
|
|
515
|
+
if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
516
516
|
metadata.facade = it;
|
|
517
517
|
wmset(store, it, metadata);
|
|
518
518
|
return metadata;
|
|
@@ -527,7 +527,7 @@ if (nativeWeakMap || sharedStore.state) {
|
|
|
527
527
|
var STATE = sharedKey('state');
|
|
528
528
|
hiddenKeys$1[STATE] = true;
|
|
529
529
|
set$1 = function (it, metadata) {
|
|
530
|
-
if (hasOwnProperty_1(it, STATE)) throw new TypeError$
|
|
530
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
531
531
|
metadata.facade = it;
|
|
532
532
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
533
533
|
return metadata;
|
|
@@ -571,7 +571,8 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
571
571
|
if (options && options.getter) name = 'get ' + name;
|
|
572
572
|
if (options && options.setter) name = 'set ' + name;
|
|
573
573
|
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
574
|
-
defineProperty(value, 'name', { value: name, configurable: true });
|
|
574
|
+
if (descriptors$1) defineProperty(value, 'name', { value: name, configurable: true });
|
|
575
|
+
else value.name = name;
|
|
575
576
|
}
|
|
576
577
|
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
577
578
|
defineProperty(value, 'length', { value: options.arity });
|
|
@@ -604,10 +605,17 @@ var defineBuiltIn = function (O, key, value, options) {
|
|
|
604
605
|
if (simple) O[key] = value;
|
|
605
606
|
else defineGlobalProperty(key, value);
|
|
606
607
|
} else {
|
|
607
|
-
|
|
608
|
-
|
|
608
|
+
try {
|
|
609
|
+
if (!options.unsafe) delete O[key];
|
|
610
|
+
else if (O[key]) simple = true;
|
|
611
|
+
} catch (error) { /* empty */ }
|
|
609
612
|
if (simple) O[key] = value;
|
|
610
|
-
else
|
|
613
|
+
else objectDefineProperty.f(O, key, {
|
|
614
|
+
value: value,
|
|
615
|
+
enumerable: false,
|
|
616
|
+
configurable: !options.nonConfigurable,
|
|
617
|
+
writable: !options.nonWritable
|
|
618
|
+
});
|
|
611
619
|
} return O;
|
|
612
620
|
};
|
|
613
621
|
|
|
@@ -836,7 +844,7 @@ test[TO_STRING_TAG$2] = 'z';
|
|
|
836
844
|
var toStringTagSupport = String(test) === '[object z]';
|
|
837
845
|
|
|
838
846
|
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
839
|
-
var Object
|
|
847
|
+
var $Object = Object;
|
|
840
848
|
|
|
841
849
|
// ES3 wrong here
|
|
842
850
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -853,18 +861,18 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
|
853
861
|
var O, tag, result;
|
|
854
862
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
855
863
|
// @@toStringTag case
|
|
856
|
-
: typeof (tag = tryGet(O = Object
|
|
864
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
857
865
|
// builtinTag case
|
|
858
866
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
859
867
|
// ES3 arguments fallback
|
|
860
868
|
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
861
869
|
};
|
|
862
870
|
|
|
863
|
-
var String$
|
|
871
|
+
var $String$1 = String;
|
|
864
872
|
|
|
865
873
|
var toString_1 = function (argument) {
|
|
866
874
|
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
867
|
-
return String$
|
|
875
|
+
return $String$1(argument);
|
|
868
876
|
};
|
|
869
877
|
|
|
870
878
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -878,6 +886,7 @@ var regexpFlags = function () {
|
|
|
878
886
|
if (that.multiline) result += 'm';
|
|
879
887
|
if (that.dotAll) result += 's';
|
|
880
888
|
if (that.unicode) result += 'u';
|
|
889
|
+
if (that.unicodeSets) result += 'v';
|
|
881
890
|
if (that.sticky) result += 'y';
|
|
882
891
|
return result;
|
|
883
892
|
};
|
|
@@ -1133,7 +1142,7 @@ if (PATCH) {
|
|
|
1133
1142
|
}
|
|
1134
1143
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1135
1144
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1136
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
1145
|
+
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1137
1146
|
functionCall(nativeReplace, match[0], reCopy, function () {
|
|
1138
1147
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
1139
1148
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
@@ -1275,7 +1284,7 @@ var advanceStringIndex = function (S, index, unicode) {
|
|
|
1275
1284
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
1276
1285
|
};
|
|
1277
1286
|
|
|
1278
|
-
var TypeError$
|
|
1287
|
+
var $TypeError$8 = TypeError;
|
|
1279
1288
|
|
|
1280
1289
|
// `RegExpExec` abstract operation
|
|
1281
1290
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
@@ -1287,7 +1296,7 @@ var regexpExecAbstract = function (R, S) {
|
|
|
1287
1296
|
return result;
|
|
1288
1297
|
}
|
|
1289
1298
|
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
|
1290
|
-
throw TypeError$
|
|
1299
|
+
throw $TypeError$8('RegExp#exec called on incompatible receiver');
|
|
1291
1300
|
};
|
|
1292
1301
|
|
|
1293
1302
|
// @@match logic
|
|
@@ -1377,6 +1386,14 @@ var isArray$2 = Array.isArray || function isArray(argument) {
|
|
|
1377
1386
|
return classofRaw(argument) == 'Array';
|
|
1378
1387
|
};
|
|
1379
1388
|
|
|
1389
|
+
var $TypeError$7 = TypeError;
|
|
1390
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
1391
|
+
|
|
1392
|
+
var doesNotExceedSafeInteger = function (it) {
|
|
1393
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$7('Maximum allowed index exceeded');
|
|
1394
|
+
return it;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1380
1397
|
var createProperty = function (object, key, value) {
|
|
1381
1398
|
var propertyKey = toPropertyKey(key);
|
|
1382
1399
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
@@ -1430,7 +1447,7 @@ var isConstructor = !construct || fails(function () {
|
|
|
1430
1447
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
1431
1448
|
|
|
1432
1449
|
var SPECIES$4 = wellKnownSymbol('species');
|
|
1433
|
-
var Array
|
|
1450
|
+
var $Array = Array;
|
|
1434
1451
|
|
|
1435
1452
|
// a part of `ArraySpeciesCreate` abstract operation
|
|
1436
1453
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
@@ -1439,12 +1456,12 @@ var arraySpeciesConstructor = function (originalArray) {
|
|
|
1439
1456
|
if (isArray$2(originalArray)) {
|
|
1440
1457
|
C = originalArray.constructor;
|
|
1441
1458
|
// cross-realm fallback
|
|
1442
|
-
if (isConstructor(C) && (C === Array
|
|
1459
|
+
if (isConstructor(C) && (C === $Array || isArray$2(C.prototype))) C = undefined;
|
|
1443
1460
|
else if (isObject$2(C)) {
|
|
1444
1461
|
C = C[SPECIES$4];
|
|
1445
1462
|
if (C === null) C = undefined;
|
|
1446
1463
|
}
|
|
1447
|
-
} return C === undefined ? Array
|
|
1464
|
+
} return C === undefined ? $Array : C;
|
|
1448
1465
|
};
|
|
1449
1466
|
|
|
1450
1467
|
// `ArraySpeciesCreate` abstract operation
|
|
@@ -1470,9 +1487,6 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
|
1470
1487
|
};
|
|
1471
1488
|
|
|
1472
1489
|
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
1490
|
|
|
1477
1491
|
// We can't use this feature detection in V8 since it causes
|
|
1478
1492
|
// deoptimization and serious performance degradation
|
|
@@ -1507,10 +1521,10 @@ _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
|
1507
1521
|
E = i === -1 ? O : arguments[i];
|
|
1508
1522
|
if (isConcatSpreadable(E)) {
|
|
1509
1523
|
len = lengthOfArrayLike(E);
|
|
1510
|
-
|
|
1524
|
+
doesNotExceedSafeInteger(n + len);
|
|
1511
1525
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1512
1526
|
} else {
|
|
1513
|
-
|
|
1527
|
+
doesNotExceedSafeInteger(n + 1);
|
|
1514
1528
|
createProperty(A, n++, E);
|
|
1515
1529
|
}
|
|
1516
1530
|
}
|
|
@@ -1567,11 +1581,11 @@ var isRegexp = function (it) {
|
|
|
1567
1581
|
return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
1568
1582
|
};
|
|
1569
1583
|
|
|
1570
|
-
var TypeError$
|
|
1584
|
+
var $TypeError$6 = TypeError;
|
|
1571
1585
|
|
|
1572
1586
|
var notARegexp = function (it) {
|
|
1573
1587
|
if (isRegexp(it)) {
|
|
1574
|
-
throw TypeError$
|
|
1588
|
+
throw $TypeError$6("The method doesn't accept regular expressions");
|
|
1575
1589
|
} return it;
|
|
1576
1590
|
};
|
|
1577
1591
|
|
|
@@ -1661,12 +1675,12 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_I
|
|
|
1661
1675
|
|
|
1662
1676
|
var engineIsNode = classofRaw(global_1.process) == 'process';
|
|
1663
1677
|
|
|
1664
|
-
var String
|
|
1665
|
-
var TypeError$
|
|
1678
|
+
var $String = String;
|
|
1679
|
+
var $TypeError$5 = TypeError;
|
|
1666
1680
|
|
|
1667
1681
|
var aPossiblePrototype = function (argument) {
|
|
1668
1682
|
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1669
|
-
throw TypeError$
|
|
1683
|
+
throw $TypeError$5("Can't set " + $String(argument) + ' as a prototype');
|
|
1670
1684
|
};
|
|
1671
1685
|
|
|
1672
1686
|
/* eslint-disable no-proto -- safe */
|
|
@@ -1724,19 +1738,19 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
|
|
|
1724
1738
|
}
|
|
1725
1739
|
};
|
|
1726
1740
|
|
|
1727
|
-
var TypeError$
|
|
1741
|
+
var $TypeError$4 = TypeError;
|
|
1728
1742
|
|
|
1729
1743
|
var anInstance = function (it, Prototype) {
|
|
1730
1744
|
if (objectIsPrototypeOf(Prototype, it)) return it;
|
|
1731
|
-
throw TypeError$
|
|
1745
|
+
throw $TypeError$4('Incorrect invocation');
|
|
1732
1746
|
};
|
|
1733
1747
|
|
|
1734
|
-
var TypeError$
|
|
1748
|
+
var $TypeError$3 = TypeError;
|
|
1735
1749
|
|
|
1736
1750
|
// `Assert: IsConstructor(argument) is true`
|
|
1737
1751
|
var aConstructor = function (argument) {
|
|
1738
1752
|
if (isConstructor(argument)) return argument;
|
|
1739
|
-
throw TypeError$
|
|
1753
|
+
throw $TypeError$3(tryToString(argument) + ' is not a constructor');
|
|
1740
1754
|
};
|
|
1741
1755
|
|
|
1742
1756
|
var SPECIES$1 = wellKnownSymbol('species');
|
|
@@ -1770,10 +1784,10 @@ var functionBindContext = function (fn, that) {
|
|
|
1770
1784
|
|
|
1771
1785
|
var arraySlice = functionUncurryThis([].slice);
|
|
1772
1786
|
|
|
1773
|
-
var TypeError$
|
|
1787
|
+
var $TypeError$2 = TypeError;
|
|
1774
1788
|
|
|
1775
1789
|
var validateArgumentsLength = function (passed, required) {
|
|
1776
|
-
if (passed < required) throw TypeError$
|
|
1790
|
+
if (passed < required) throw $TypeError$2('Not enough arguments');
|
|
1777
1791
|
return passed;
|
|
1778
1792
|
};
|
|
1779
1793
|
|
|
@@ -2012,7 +2026,12 @@ var queue = Queue;
|
|
|
2012
2026
|
|
|
2013
2027
|
var promiseNativeConstructor = global_1.Promise;
|
|
2014
2028
|
|
|
2015
|
-
|
|
2029
|
+
/* global Deno -- Deno case */
|
|
2030
|
+
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
2031
|
+
|
|
2032
|
+
var engineIsBrowser = !engineIsDeno && !engineIsNode
|
|
2033
|
+
&& typeof window == 'object'
|
|
2034
|
+
&& typeof document == 'object';
|
|
2016
2035
|
|
|
2017
2036
|
promiseNativeConstructor && promiseNativeConstructor.prototype;
|
|
2018
2037
|
var SPECIES = wellKnownSymbol('species');
|
|
@@ -2029,18 +2048,18 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced_1('Promise', function () {
|
|
|
2029
2048
|
// We can't use @@species feature detection in V8 since it causes
|
|
2030
2049
|
// deoptimization and performance degradation
|
|
2031
2050
|
// https://github.com/zloirock/core-js/issues/679
|
|
2032
|
-
if (engineV8Version
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2051
|
+
if (!engineV8Version || engineV8Version < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
2052
|
+
// Detect correctness of subclassing with @@species support
|
|
2053
|
+
var promise = new promiseNativeConstructor(function (resolve) { resolve(1); });
|
|
2054
|
+
var FakePromise = function (exec) {
|
|
2055
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
2056
|
+
};
|
|
2057
|
+
var constructor = promise.constructor = {};
|
|
2058
|
+
constructor[SPECIES] = FakePromise;
|
|
2059
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
2060
|
+
if (!SUBCLASSING) return true;
|
|
2042
2061
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
2043
|
-
return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2062
|
+
} return !GLOBAL_CORE_JS_PROMISE && (engineIsBrowser || engineIsDeno) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2044
2063
|
});
|
|
2045
2064
|
|
|
2046
2065
|
var promiseConstructorDetection = {
|
|
@@ -2089,7 +2108,7 @@ var setInternalState = internalState.set;
|
|
|
2089
2108
|
var NativePromisePrototype$1 = promiseNativeConstructor && promiseNativeConstructor.prototype;
|
|
2090
2109
|
var PromiseConstructor = promiseNativeConstructor;
|
|
2091
2110
|
var PromisePrototype = NativePromisePrototype$1;
|
|
2092
|
-
var TypeError$
|
|
2111
|
+
var TypeError$1 = global_1.TypeError;
|
|
2093
2112
|
var document$1 = global_1.document;
|
|
2094
2113
|
var process$1 = global_1.process;
|
|
2095
2114
|
var newPromiseCapability = newPromiseCapability$1.f;
|
|
@@ -2136,7 +2155,7 @@ var callReaction = function (reaction, state) {
|
|
|
2136
2155
|
}
|
|
2137
2156
|
}
|
|
2138
2157
|
if (result === reaction.promise) {
|
|
2139
|
-
reject(TypeError$
|
|
2158
|
+
reject(TypeError$1('Promise-chain cycle'));
|
|
2140
2159
|
} else if (then = isThenable(result)) {
|
|
2141
2160
|
functionCall(then, result, resolve, reject);
|
|
2142
2161
|
} else resolve(result);
|
|
@@ -2226,7 +2245,7 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
2226
2245
|
state.done = true;
|
|
2227
2246
|
if (unwrap) state = unwrap;
|
|
2228
2247
|
try {
|
|
2229
|
-
if (state.facade === value) throw TypeError$
|
|
2248
|
+
if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
|
|
2230
2249
|
var then = isThenable(value);
|
|
2231
2250
|
if (then) {
|
|
2232
2251
|
microtask(function () {
|
|
@@ -2362,12 +2381,12 @@ var getIteratorMethod = function (it) {
|
|
|
2362
2381
|
|| iterators[classof(it)];
|
|
2363
2382
|
};
|
|
2364
2383
|
|
|
2365
|
-
var TypeError$
|
|
2384
|
+
var $TypeError$1 = TypeError;
|
|
2366
2385
|
|
|
2367
2386
|
var getIterator = function (argument, usingIterator) {
|
|
2368
2387
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
2369
2388
|
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
2370
|
-
throw TypeError$
|
|
2389
|
+
throw $TypeError$1(tryToString(argument) + ' is not iterable');
|
|
2371
2390
|
};
|
|
2372
2391
|
|
|
2373
2392
|
var iteratorClose = function (iterator, kind, value) {
|
|
@@ -2390,7 +2409,7 @@ var iteratorClose = function (iterator, kind, value) {
|
|
|
2390
2409
|
return value;
|
|
2391
2410
|
};
|
|
2392
2411
|
|
|
2393
|
-
var TypeError
|
|
2412
|
+
var $TypeError = TypeError;
|
|
2394
2413
|
|
|
2395
2414
|
var Result = function (stopped, result) {
|
|
2396
2415
|
this.stopped = stopped;
|
|
@@ -2402,6 +2421,7 @@ var ResultPrototype = Result.prototype;
|
|
|
2402
2421
|
var iterate = function (iterable, unboundFunction, options) {
|
|
2403
2422
|
var that = options && options.that;
|
|
2404
2423
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2424
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
2405
2425
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2406
2426
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2407
2427
|
var fn = functionBindContext(unboundFunction, that);
|
|
@@ -2419,11 +2439,13 @@ var iterate = function (iterable, unboundFunction, options) {
|
|
|
2419
2439
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2420
2440
|
};
|
|
2421
2441
|
|
|
2422
|
-
if (
|
|
2442
|
+
if (IS_RECORD) {
|
|
2443
|
+
iterator = iterable.iterator;
|
|
2444
|
+
} else if (IS_ITERATOR) {
|
|
2423
2445
|
iterator = iterable;
|
|
2424
2446
|
} else {
|
|
2425
2447
|
iterFn = getIteratorMethod(iterable);
|
|
2426
|
-
if (!iterFn) throw TypeError
|
|
2448
|
+
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
|
|
2427
2449
|
// optimisation for array iterators
|
|
2428
2450
|
if (isArrayIteratorMethod(iterFn)) {
|
|
2429
2451
|
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
@@ -2434,7 +2456,7 @@ var iterate = function (iterable, unboundFunction, options) {
|
|
|
2434
2456
|
iterator = getIterator(iterable, iterFn);
|
|
2435
2457
|
}
|
|
2436
2458
|
|
|
2437
|
-
next = iterator.next;
|
|
2459
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2438
2460
|
while (!(step = functionCall(next, iterator)).done) {
|
|
2439
2461
|
try {
|
|
2440
2462
|
result = callFn(step.value);
|
|
@@ -4276,6 +4298,7 @@ var url = {
|
|
|
4276
4298
|
parse: urlParse,
|
|
4277
4299
|
resolve: urlResolve,
|
|
4278
4300
|
resolveObject: urlResolveObject,
|
|
4301
|
+
fileURLToPath: urlFileURLToPath,
|
|
4279
4302
|
format: urlFormat,
|
|
4280
4303
|
Url: Url
|
|
4281
4304
|
};
|
|
@@ -4618,6 +4641,31 @@ function parse(self, url, parseQueryString, slashesDenoteHost) {
|
|
|
4618
4641
|
return self;
|
|
4619
4642
|
}
|
|
4620
4643
|
|
|
4644
|
+
function urlFileURLToPath(path) {
|
|
4645
|
+
if (typeof path === 'string')
|
|
4646
|
+
path = new Url().parse(path);
|
|
4647
|
+
else if (!(path instanceof Url))
|
|
4648
|
+
throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path));
|
|
4649
|
+
if (path.protocol !== 'file:')
|
|
4650
|
+
throw new TypeError('The URL must be of scheme file');
|
|
4651
|
+
return getPathFromURLPosix(path);
|
|
4652
|
+
}
|
|
4653
|
+
|
|
4654
|
+
function getPathFromURLPosix(url) {
|
|
4655
|
+
const pathname = url.pathname;
|
|
4656
|
+
for (let n = 0; n < pathname.length; n++) {
|
|
4657
|
+
if (pathname[n] === '%') {
|
|
4658
|
+
const third = pathname.codePointAt(n + 2) | 0x20;
|
|
4659
|
+
if (pathname[n + 1] === '2' && third === 102) {
|
|
4660
|
+
throw new TypeError(
|
|
4661
|
+
'must not include encoded / characters'
|
|
4662
|
+
);
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
return decodeURIComponent(pathname);
|
|
4667
|
+
}
|
|
4668
|
+
|
|
4621
4669
|
// format a parsed object into a url string
|
|
4622
4670
|
function urlFormat(obj) {
|
|
4623
4671
|
// ensure it's an object, and not a string url.
|
|
@@ -6008,7 +6056,7 @@ axios_1.default = default_1;
|
|
|
6008
6056
|
var axios = axios_1;
|
|
6009
6057
|
|
|
6010
6058
|
var name$1 = "@tryghost/content-api";
|
|
6011
|
-
var version = "1.
|
|
6059
|
+
var version = "1.11.1";
|
|
6012
6060
|
var repository = "https://github.com/TryGhost/SDK/tree/master/packages/content-api";
|
|
6013
6061
|
var author = "Ghost Foundation";
|
|
6014
6062
|
var license = "MIT";
|
|
@@ -6037,19 +6085,19 @@ var publishConfig = {
|
|
|
6037
6085
|
access: "public"
|
|
6038
6086
|
};
|
|
6039
6087
|
var devDependencies = {
|
|
6040
|
-
"@babel/core": "7.18.
|
|
6088
|
+
"@babel/core": "7.18.10",
|
|
6041
6089
|
"@babel/polyfill": "7.12.1",
|
|
6042
|
-
"@babel/preset-env": "7.18.
|
|
6090
|
+
"@babel/preset-env": "7.18.10",
|
|
6043
6091
|
"@rollup/plugin-json": "4.1.0",
|
|
6044
|
-
c8: "7.
|
|
6045
|
-
"core-js": "3.
|
|
6092
|
+
c8: "7.12.0",
|
|
6093
|
+
"core-js": "3.24.1",
|
|
6046
6094
|
"eslint-plugin-ghost": "2.14.0",
|
|
6047
6095
|
mocha: "10.0.0",
|
|
6048
|
-
rollup: "2.
|
|
6096
|
+
rollup: "2.77.2",
|
|
6049
6097
|
"rollup-plugin-babel": "4.4.0",
|
|
6050
6098
|
"rollup-plugin-commonjs": "10.1.0",
|
|
6051
6099
|
"rollup-plugin-node-resolve": "5.2.0",
|
|
6052
|
-
"rollup-plugin-polyfill-node": "
|
|
6100
|
+
"rollup-plugin-polyfill-node": "0.10.2",
|
|
6053
6101
|
"rollup-plugin-replace": "2.2.0",
|
|
6054
6102
|
"rollup-plugin-terser": "7.0.2",
|
|
6055
6103
|
should: "13.2.3",
|
|
@@ -6058,7 +6106,7 @@ var devDependencies = {
|
|
|
6058
6106
|
var dependencies = {
|
|
6059
6107
|
axios: "^0.27.0"
|
|
6060
6108
|
};
|
|
6061
|
-
var gitHead = "
|
|
6109
|
+
var gitHead = "9251588cb81347205c5dab850636bba4c86fe58d";
|
|
6062
6110
|
var packageInfo = {
|
|
6063
6111
|
name: name$1,
|
|
6064
6112
|
version: version,
|
|
@@ -6078,9 +6126,9 @@ var packageInfo = {
|
|
|
6078
6126
|
gitHead: gitHead
|
|
6079
6127
|
};
|
|
6080
6128
|
|
|
6081
|
-
var
|
|
6082
|
-
|
|
6083
|
-
var defaultAcceptVersionHeader = '
|
|
6129
|
+
var USER_AGENT_DEFAULT = false;
|
|
6130
|
+
var packageVersion = packageInfo.version;
|
|
6131
|
+
var defaultAcceptVersionHeader = 'v5.0';
|
|
6084
6132
|
var supportedVersions = ['v2', 'v3', 'v4', 'v5', 'canary'];
|
|
6085
6133
|
var name = '@tryghost/content-api';
|
|
6086
6134
|
/**
|
|
@@ -6129,6 +6177,7 @@ var defaultMakeRequest = function defaultMakeRequest(_ref) {
|
|
|
6129
6177
|
* @param {String} options.key
|
|
6130
6178
|
* @param {String} [options.ghostPath]
|
|
6131
6179
|
* @param {String|Boolean} options.version - a version string like v3, v4, v5 or boolean value identifying presence of Accept-Version header
|
|
6180
|
+
* @param {String|Boolean} [options.userAgent] - value controlling the 'User-Agent' header should be sent with a request
|
|
6132
6181
|
* @param {Function} [options.makeRequest]
|
|
6133
6182
|
* @param {String} [options.host] Deprecated
|
|
6134
6183
|
*/
|
|
@@ -6139,6 +6188,7 @@ function GhostContentAPI(_ref2) {
|
|
|
6139
6188
|
key = _ref2.key,
|
|
6140
6189
|
host = _ref2.host,
|
|
6141
6190
|
version = _ref2.version,
|
|
6191
|
+
userAgent = _ref2.userAgent,
|
|
6142
6192
|
_ref2$ghostPath = _ref2.ghostPath,
|
|
6143
6193
|
ghostPath = _ref2$ghostPath === void 0 ? 'ghost' : _ref2$ghostPath,
|
|
6144
6194
|
_ref2$makeRequest = _ref2.makeRequest,
|
|
@@ -6162,6 +6212,7 @@ function GhostContentAPI(_ref2) {
|
|
|
6162
6212
|
url: url,
|
|
6163
6213
|
key: key,
|
|
6164
6214
|
version: version,
|
|
6215
|
+
userAgent: userAgent,
|
|
6165
6216
|
ghostPath: ghostPath,
|
|
6166
6217
|
makeRequest: makeRequest
|
|
6167
6218
|
});
|
|
@@ -6215,6 +6266,10 @@ function GhostContentAPI(_ref2) {
|
|
|
6215
6266
|
throw new Error("".concat(name, " Config Invalid: 'key' ").concat(key, " must have 26 hex characters"));
|
|
6216
6267
|
}
|
|
6217
6268
|
|
|
6269
|
+
if (userAgent === undefined) {
|
|
6270
|
+
userAgent = USER_AGENT_DEFAULT;
|
|
6271
|
+
}
|
|
6272
|
+
|
|
6218
6273
|
var api = ['posts', 'authors', 'tags', 'pages', 'settings', 'tiers', 'newsletters', 'offers'].reduce(function (apiObject, resourceType) {
|
|
6219
6274
|
function browse() {
|
|
6220
6275
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -6257,7 +6312,14 @@ function GhostContentAPI(_ref2) {
|
|
|
6257
6312
|
var headers = membersToken ? {
|
|
6258
6313
|
Authorization: "GhostMembers ".concat(membersToken)
|
|
6259
6314
|
} : {};
|
|
6260
|
-
|
|
6315
|
+
|
|
6316
|
+
if (userAgent) {
|
|
6317
|
+
if (typeof userAgent === 'boolean') {
|
|
6318
|
+
headers['User-Agent'] = "GhostContentSDK/".concat(packageVersion);
|
|
6319
|
+
} else {
|
|
6320
|
+
headers['User-Agent'] = userAgent;
|
|
6321
|
+
}
|
|
6322
|
+
}
|
|
6261
6323
|
|
|
6262
6324
|
if (acceptVersionHeader) {
|
|
6263
6325
|
headers['Accept-Version'] = acceptVersionHeader;
|