@tryghost/content-api 1.9.0 → 1.9.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 +27 -6
- package/es/content-api.js +310 -288
- package/es/content-api.js.map +1 -1
- package/lib/index.js +24 -3
- package/package.json +3 -3
- package/umd/content-api.min.js +1 -1
- package/umd/content-api.min.js.map +1 -1
package/es/content-api.js
CHANGED
|
@@ -800,27 +800,6 @@ var _export = function (options, source) {
|
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
|
|
803
|
-
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
804
|
-
var method = [][METHOD_NAME];
|
|
805
|
-
return !!method && fails(function () {
|
|
806
|
-
// eslint-disable-next-line no-useless-call -- required for testing
|
|
807
|
-
method.call(null, argument || function () { return 1; }, 1);
|
|
808
|
-
});
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
var un$Join = functionUncurryThis([].join);
|
|
812
|
-
|
|
813
|
-
var ES3_STRINGS = indexedObject != Object;
|
|
814
|
-
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
815
|
-
|
|
816
|
-
// `Array.prototype.join` method
|
|
817
|
-
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
818
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
819
|
-
join: function join(separator) {
|
|
820
|
-
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
821
|
-
}
|
|
822
|
-
});
|
|
823
|
-
|
|
824
803
|
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
825
804
|
var test = {};
|
|
826
805
|
|
|
@@ -853,183 +832,61 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
|
853
832
|
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
854
833
|
};
|
|
855
834
|
|
|
856
|
-
|
|
857
|
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
858
|
-
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
|
859
|
-
return '[object ' + classof(this) + ']';
|
|
860
|
-
};
|
|
861
|
-
|
|
862
|
-
// `Object.prototype.toString` method
|
|
863
|
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
864
|
-
if (!toStringTagSupport) {
|
|
865
|
-
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
// `Object.keys` method
|
|
869
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
870
|
-
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
871
|
-
var objectKeys = Object.keys || function keys(O) {
|
|
872
|
-
return objectKeysInternal(O, enumBugKeys);
|
|
873
|
-
};
|
|
874
|
-
|
|
875
|
-
var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
|
|
876
|
-
|
|
877
|
-
// `Object.keys` method
|
|
878
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
879
|
-
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
880
|
-
keys: function keys(it) {
|
|
881
|
-
return objectKeys(toObject(it));
|
|
882
|
-
}
|
|
883
|
-
});
|
|
884
|
-
|
|
885
|
-
// `IsArray` abstract operation
|
|
886
|
-
// https://tc39.es/ecma262/#sec-isarray
|
|
887
|
-
// eslint-disable-next-line es-x/no-array-isarray -- safe
|
|
888
|
-
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
889
|
-
return classofRaw(argument) == 'Array';
|
|
890
|
-
};
|
|
891
|
-
|
|
892
|
-
var createProperty = function (object, key, value) {
|
|
893
|
-
var propertyKey = toPropertyKey(key);
|
|
894
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
895
|
-
else object[propertyKey] = value;
|
|
896
|
-
};
|
|
897
|
-
|
|
898
|
-
var noop = function () { /* empty */ };
|
|
899
|
-
var empty = [];
|
|
900
|
-
var construct = getBuiltIn('Reflect', 'construct');
|
|
901
|
-
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
902
|
-
var exec = functionUncurryThis(constructorRegExp.exec);
|
|
903
|
-
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
904
|
-
|
|
905
|
-
var isConstructorModern = function isConstructor(argument) {
|
|
906
|
-
if (!isCallable(argument)) return false;
|
|
907
|
-
try {
|
|
908
|
-
construct(noop, empty, argument);
|
|
909
|
-
return true;
|
|
910
|
-
} catch (error) {
|
|
911
|
-
return false;
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
var isConstructorLegacy = function isConstructor(argument) {
|
|
916
|
-
if (!isCallable(argument)) return false;
|
|
917
|
-
switch (classof(argument)) {
|
|
918
|
-
case 'AsyncFunction':
|
|
919
|
-
case 'GeneratorFunction':
|
|
920
|
-
case 'AsyncGeneratorFunction': return false;
|
|
921
|
-
}
|
|
922
|
-
try {
|
|
923
|
-
// we can't check .prototype since constructors produced by .bind haven't it
|
|
924
|
-
// `Function#toString` throws on some built-it function in some legacy engines
|
|
925
|
-
// (for example, `DOMQuad` and similar in FF41-)
|
|
926
|
-
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
927
|
-
} catch (error) {
|
|
928
|
-
return true;
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
|
-
|
|
932
|
-
isConstructorLegacy.sham = true;
|
|
933
|
-
|
|
934
|
-
// `IsConstructor` abstract operation
|
|
935
|
-
// https://tc39.es/ecma262/#sec-isconstructor
|
|
936
|
-
var isConstructor = !construct || fails(function () {
|
|
937
|
-
var called;
|
|
938
|
-
return isConstructorModern(isConstructorModern.call)
|
|
939
|
-
|| !isConstructorModern(Object)
|
|
940
|
-
|| !isConstructorModern(function () { called = true; })
|
|
941
|
-
|| called;
|
|
942
|
-
}) ? isConstructorLegacy : isConstructorModern;
|
|
943
|
-
|
|
944
|
-
var SPECIES$5 = wellKnownSymbol('species');
|
|
945
|
-
var Array$1 = global_1.Array;
|
|
835
|
+
var String$3 = global_1.String;
|
|
946
836
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
var C;
|
|
951
|
-
if (isArray$1(originalArray)) {
|
|
952
|
-
C = originalArray.constructor;
|
|
953
|
-
// cross-realm fallback
|
|
954
|
-
if (isConstructor(C) && (C === Array$1 || isArray$1(C.prototype))) C = undefined;
|
|
955
|
-
else if (isObject$1(C)) {
|
|
956
|
-
C = C[SPECIES$5];
|
|
957
|
-
if (C === null) C = undefined;
|
|
958
|
-
}
|
|
959
|
-
} return C === undefined ? Array$1 : C;
|
|
837
|
+
var toString_1 = function (argument) {
|
|
838
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
839
|
+
return String$3(argument);
|
|
960
840
|
};
|
|
961
841
|
|
|
962
|
-
// `
|
|
963
|
-
// https://tc39.es/ecma262/#sec-
|
|
964
|
-
var
|
|
965
|
-
|
|
842
|
+
// `RegExp.prototype.flags` getter implementation
|
|
843
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
844
|
+
var regexpFlags = function () {
|
|
845
|
+
var that = anObject(this);
|
|
846
|
+
var result = '';
|
|
847
|
+
if (that.global) result += 'g';
|
|
848
|
+
if (that.ignoreCase) result += 'i';
|
|
849
|
+
if (that.multiline) result += 'm';
|
|
850
|
+
if (that.dotAll) result += 's';
|
|
851
|
+
if (that.unicode) result += 'u';
|
|
852
|
+
if (that.sticky) result += 'y';
|
|
853
|
+
return result;
|
|
966
854
|
};
|
|
967
855
|
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
971
|
-
// We can't use this feature detection in V8 since it causes
|
|
972
|
-
// deoptimization and serious performance degradation
|
|
973
|
-
// https://github.com/zloirock/core-js/issues/677
|
|
974
|
-
return engineV8Version >= 51 || !fails(function () {
|
|
975
|
-
var array = [];
|
|
976
|
-
var constructor = array.constructor = {};
|
|
977
|
-
constructor[SPECIES$4] = function () {
|
|
978
|
-
return { foo: 1 };
|
|
979
|
-
};
|
|
980
|
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
981
|
-
});
|
|
982
|
-
};
|
|
856
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
857
|
+
var $RegExp$2 = global_1.RegExp;
|
|
983
858
|
|
|
984
|
-
var
|
|
985
|
-
var
|
|
986
|
-
|
|
987
|
-
|
|
859
|
+
var UNSUPPORTED_Y$1 = fails(function () {
|
|
860
|
+
var re = $RegExp$2('a', 'y');
|
|
861
|
+
re.lastIndex = 2;
|
|
862
|
+
return re.exec('abcd') != null;
|
|
863
|
+
});
|
|
988
864
|
|
|
989
|
-
//
|
|
990
|
-
//
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
var array = [];
|
|
994
|
-
array[IS_CONCAT_SPREADABLE] = false;
|
|
995
|
-
return array.concat()[0] !== array;
|
|
865
|
+
// UC Browser bug
|
|
866
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
867
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails(function () {
|
|
868
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
996
869
|
});
|
|
997
870
|
|
|
998
|
-
var
|
|
871
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails(function () {
|
|
872
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
873
|
+
var re = $RegExp$2('^r', 'gy');
|
|
874
|
+
re.lastIndex = 2;
|
|
875
|
+
return re.exec('str') != null;
|
|
876
|
+
});
|
|
999
877
|
|
|
1000
|
-
var
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
878
|
+
var regexpStickyHelpers = {
|
|
879
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
880
|
+
MISSED_STICKY: MISSED_STICKY,
|
|
881
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1004
882
|
};
|
|
1005
883
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
//
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1013
|
-
concat: function concat(arg) {
|
|
1014
|
-
var O = toObject(this);
|
|
1015
|
-
var A = arraySpeciesCreate(O, 0);
|
|
1016
|
-
var n = 0;
|
|
1017
|
-
var i, k, length, len, E;
|
|
1018
|
-
for (i = -1, length = arguments.length; i < length; i++) {
|
|
1019
|
-
E = i === -1 ? O : arguments[i];
|
|
1020
|
-
if (isConcatSpreadable(E)) {
|
|
1021
|
-
len = lengthOfArrayLike(E);
|
|
1022
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError$a(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1023
|
-
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1024
|
-
} else {
|
|
1025
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError$a(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1026
|
-
createProperty(A, n++, E);
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
A.length = n;
|
|
1030
|
-
return A;
|
|
1031
|
-
}
|
|
1032
|
-
});
|
|
884
|
+
// `Object.keys` method
|
|
885
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
886
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
887
|
+
var objectKeys = Object.keys || function keys(O) {
|
|
888
|
+
return objectKeysInternal(O, enumBugKeys);
|
|
889
|
+
};
|
|
1033
890
|
|
|
1034
891
|
// `Object.defineProperties` method
|
|
1035
892
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
@@ -1118,101 +975,21 @@ var NullProtoObject = function () {
|
|
|
1118
975
|
return NullProtoObject();
|
|
1119
976
|
};
|
|
1120
977
|
|
|
1121
|
-
hiddenKeys$1[IE_PROTO] = true;
|
|
1122
|
-
|
|
1123
|
-
// `Object.create` method
|
|
1124
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
1125
|
-
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
1126
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
1127
|
-
var result;
|
|
1128
|
-
if (O !== null) {
|
|
1129
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
1130
|
-
result = new EmptyConstructor();
|
|
1131
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
1132
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1133
|
-
result[IE_PROTO] = O;
|
|
1134
|
-
} else result = NullProtoObject();
|
|
1135
|
-
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
1136
|
-
};
|
|
1137
|
-
|
|
1138
|
-
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
1139
|
-
var ArrayPrototype$1 = Array.prototype;
|
|
1140
|
-
|
|
1141
|
-
// Array.prototype[@@unscopables]
|
|
1142
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1143
|
-
if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
|
|
1144
|
-
objectDefineProperty.f(ArrayPrototype$1, UNSCOPABLES, {
|
|
1145
|
-
configurable: true,
|
|
1146
|
-
value: objectCreate(null)
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
// add a key to Array.prototype[@@unscopables]
|
|
1151
|
-
var addToUnscopables = function (key) {
|
|
1152
|
-
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1153
|
-
};
|
|
1154
|
-
|
|
1155
|
-
var $includes = arrayIncludes.includes;
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
// `Array.prototype.includes` method
|
|
1159
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1160
|
-
_export({ target: 'Array', proto: true }, {
|
|
1161
|
-
includes: function includes(el /* , fromIndex = 0 */) {
|
|
1162
|
-
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
1163
|
-
}
|
|
1164
|
-
});
|
|
1165
|
-
|
|
1166
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1167
|
-
addToUnscopables('includes');
|
|
1168
|
-
|
|
1169
|
-
var String$3 = global_1.String;
|
|
1170
|
-
|
|
1171
|
-
var toString_1 = function (argument) {
|
|
1172
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1173
|
-
return String$3(argument);
|
|
1174
|
-
};
|
|
1175
|
-
|
|
1176
|
-
// `RegExp.prototype.flags` getter implementation
|
|
1177
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1178
|
-
var regexpFlags = function () {
|
|
1179
|
-
var that = anObject(this);
|
|
1180
|
-
var result = '';
|
|
1181
|
-
if (that.global) result += 'g';
|
|
1182
|
-
if (that.ignoreCase) result += 'i';
|
|
1183
|
-
if (that.multiline) result += 'm';
|
|
1184
|
-
if (that.dotAll) result += 's';
|
|
1185
|
-
if (that.unicode) result += 'u';
|
|
1186
|
-
if (that.sticky) result += 'y';
|
|
1187
|
-
return result;
|
|
1188
|
-
};
|
|
1189
|
-
|
|
1190
|
-
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1191
|
-
var $RegExp$2 = global_1.RegExp;
|
|
1192
|
-
|
|
1193
|
-
var UNSUPPORTED_Y$1 = fails(function () {
|
|
1194
|
-
var re = $RegExp$2('a', 'y');
|
|
1195
|
-
re.lastIndex = 2;
|
|
1196
|
-
return re.exec('abcd') != null;
|
|
1197
|
-
});
|
|
1198
|
-
|
|
1199
|
-
// UC Browser bug
|
|
1200
|
-
// https://github.com/zloirock/core-js/issues/1008
|
|
1201
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails(function () {
|
|
1202
|
-
return !$RegExp$2('a', 'y').sticky;
|
|
1203
|
-
});
|
|
1204
|
-
|
|
1205
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails(function () {
|
|
1206
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1207
|
-
var re = $RegExp$2('^r', 'gy');
|
|
1208
|
-
re.lastIndex = 2;
|
|
1209
|
-
return re.exec('str') != null;
|
|
1210
|
-
});
|
|
978
|
+
hiddenKeys$1[IE_PROTO] = true;
|
|
1211
979
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
980
|
+
// `Object.create` method
|
|
981
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
982
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
983
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
984
|
+
var result;
|
|
985
|
+
if (O !== null) {
|
|
986
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
987
|
+
result = new EmptyConstructor();
|
|
988
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
989
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
990
|
+
result[IE_PROTO] = O;
|
|
991
|
+
} else result = NullProtoObject();
|
|
992
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
1216
993
|
};
|
|
1217
994
|
|
|
1218
995
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
@@ -1364,7 +1141,7 @@ _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
|
|
1364
1141
|
|
|
1365
1142
|
|
|
1366
1143
|
|
|
1367
|
-
var SPECIES$
|
|
1144
|
+
var SPECIES$5 = wellKnownSymbol('species');
|
|
1368
1145
|
var RegExpPrototype = RegExp.prototype;
|
|
1369
1146
|
|
|
1370
1147
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
@@ -1390,7 +1167,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
1390
1167
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
1391
1168
|
// a new one. We need to return the patched regex when creating the new one.
|
|
1392
1169
|
re.constructor = {};
|
|
1393
|
-
re.constructor[SPECIES$
|
|
1170
|
+
re.constructor[SPECIES$5] = function () { return re; };
|
|
1394
1171
|
re.flags = '';
|
|
1395
1172
|
re[SYMBOL] = /./[SYMBOL];
|
|
1396
1173
|
}
|
|
@@ -1469,7 +1246,7 @@ var advanceStringIndex = function (S, index, unicode) {
|
|
|
1469
1246
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
1470
1247
|
};
|
|
1471
1248
|
|
|
1472
|
-
var TypeError$
|
|
1249
|
+
var TypeError$a = global_1.TypeError;
|
|
1473
1250
|
|
|
1474
1251
|
// `RegExpExec` abstract operation
|
|
1475
1252
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
@@ -1481,7 +1258,7 @@ var regexpExecAbstract = function (R, S) {
|
|
|
1481
1258
|
return result;
|
|
1482
1259
|
}
|
|
1483
1260
|
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
|
1484
|
-
throw TypeError$
|
|
1261
|
+
throw TypeError$a('RegExp#exec called on incompatible receiver');
|
|
1485
1262
|
};
|
|
1486
1263
|
|
|
1487
1264
|
// @@match logic
|
|
@@ -1521,6 +1298,229 @@ fixRegexpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
|
|
|
1521
1298
|
];
|
|
1522
1299
|
});
|
|
1523
1300
|
|
|
1301
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
1302
|
+
var method = [][METHOD_NAME];
|
|
1303
|
+
return !!method && fails(function () {
|
|
1304
|
+
// eslint-disable-next-line no-useless-call -- required for testing
|
|
1305
|
+
method.call(null, argument || function () { return 1; }, 1);
|
|
1306
|
+
});
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
var un$Join = functionUncurryThis([].join);
|
|
1310
|
+
|
|
1311
|
+
var ES3_STRINGS = indexedObject != Object;
|
|
1312
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
1313
|
+
|
|
1314
|
+
// `Array.prototype.join` method
|
|
1315
|
+
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
1316
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
1317
|
+
join: function join(separator) {
|
|
1318
|
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1321
|
+
|
|
1322
|
+
// `Object.prototype.toString` method implementation
|
|
1323
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1324
|
+
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
|
1325
|
+
return '[object ' + classof(this) + ']';
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
// `Object.prototype.toString` method
|
|
1329
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1330
|
+
if (!toStringTagSupport) {
|
|
1331
|
+
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
|
|
1335
|
+
|
|
1336
|
+
// `Object.keys` method
|
|
1337
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1338
|
+
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
1339
|
+
keys: function keys(it) {
|
|
1340
|
+
return objectKeys(toObject(it));
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
|
|
1344
|
+
// `IsArray` abstract operation
|
|
1345
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
1346
|
+
// eslint-disable-next-line es-x/no-array-isarray -- safe
|
|
1347
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
1348
|
+
return classofRaw(argument) == 'Array';
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
var createProperty = function (object, key, value) {
|
|
1352
|
+
var propertyKey = toPropertyKey(key);
|
|
1353
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
1354
|
+
else object[propertyKey] = value;
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
var noop = function () { /* empty */ };
|
|
1358
|
+
var empty = [];
|
|
1359
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
1360
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1361
|
+
var exec = functionUncurryThis(constructorRegExp.exec);
|
|
1362
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1363
|
+
|
|
1364
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1365
|
+
if (!isCallable(argument)) return false;
|
|
1366
|
+
try {
|
|
1367
|
+
construct(noop, empty, argument);
|
|
1368
|
+
return true;
|
|
1369
|
+
} catch (error) {
|
|
1370
|
+
return false;
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1375
|
+
if (!isCallable(argument)) return false;
|
|
1376
|
+
switch (classof(argument)) {
|
|
1377
|
+
case 'AsyncFunction':
|
|
1378
|
+
case 'GeneratorFunction':
|
|
1379
|
+
case 'AsyncGeneratorFunction': return false;
|
|
1380
|
+
}
|
|
1381
|
+
try {
|
|
1382
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1383
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1384
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1385
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1386
|
+
} catch (error) {
|
|
1387
|
+
return true;
|
|
1388
|
+
}
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
isConstructorLegacy.sham = true;
|
|
1392
|
+
|
|
1393
|
+
// `IsConstructor` abstract operation
|
|
1394
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1395
|
+
var isConstructor = !construct || fails(function () {
|
|
1396
|
+
var called;
|
|
1397
|
+
return isConstructorModern(isConstructorModern.call)
|
|
1398
|
+
|| !isConstructorModern(Object)
|
|
1399
|
+
|| !isConstructorModern(function () { called = true; })
|
|
1400
|
+
|| called;
|
|
1401
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1402
|
+
|
|
1403
|
+
var SPECIES$4 = wellKnownSymbol('species');
|
|
1404
|
+
var Array$1 = global_1.Array;
|
|
1405
|
+
|
|
1406
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
1407
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
1408
|
+
var arraySpeciesConstructor = function (originalArray) {
|
|
1409
|
+
var C;
|
|
1410
|
+
if (isArray$1(originalArray)) {
|
|
1411
|
+
C = originalArray.constructor;
|
|
1412
|
+
// cross-realm fallback
|
|
1413
|
+
if (isConstructor(C) && (C === Array$1 || isArray$1(C.prototype))) C = undefined;
|
|
1414
|
+
else if (isObject$1(C)) {
|
|
1415
|
+
C = C[SPECIES$4];
|
|
1416
|
+
if (C === null) C = undefined;
|
|
1417
|
+
}
|
|
1418
|
+
} return C === undefined ? Array$1 : C;
|
|
1419
|
+
};
|
|
1420
|
+
|
|
1421
|
+
// `ArraySpeciesCreate` abstract operation
|
|
1422
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
1423
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
|
1424
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
var SPECIES$3 = wellKnownSymbol('species');
|
|
1428
|
+
|
|
1429
|
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
1430
|
+
// We can't use this feature detection in V8 since it causes
|
|
1431
|
+
// deoptimization and serious performance degradation
|
|
1432
|
+
// https://github.com/zloirock/core-js/issues/677
|
|
1433
|
+
return engineV8Version >= 51 || !fails(function () {
|
|
1434
|
+
var array = [];
|
|
1435
|
+
var constructor = array.constructor = {};
|
|
1436
|
+
constructor[SPECIES$3] = function () {
|
|
1437
|
+
return { foo: 1 };
|
|
1438
|
+
};
|
|
1439
|
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
1440
|
+
});
|
|
1441
|
+
};
|
|
1442
|
+
|
|
1443
|
+
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
1444
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
1445
|
+
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
1446
|
+
var TypeError$9 = global_1.TypeError;
|
|
1447
|
+
|
|
1448
|
+
// We can't use this feature detection in V8 since it causes
|
|
1449
|
+
// deoptimization and serious performance degradation
|
|
1450
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
1451
|
+
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
|
1452
|
+
var array = [];
|
|
1453
|
+
array[IS_CONCAT_SPREADABLE] = false;
|
|
1454
|
+
return array.concat()[0] !== array;
|
|
1455
|
+
});
|
|
1456
|
+
|
|
1457
|
+
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
|
1458
|
+
|
|
1459
|
+
var isConcatSpreadable = function (O) {
|
|
1460
|
+
if (!isObject$1(O)) return false;
|
|
1461
|
+
var spreadable = O[IS_CONCAT_SPREADABLE];
|
|
1462
|
+
return spreadable !== undefined ? !!spreadable : isArray$1(O);
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
1466
|
+
|
|
1467
|
+
// `Array.prototype.concat` method
|
|
1468
|
+
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
|
1469
|
+
// with adding support of @@isConcatSpreadable and @@species
|
|
1470
|
+
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
1471
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1472
|
+
concat: function concat(arg) {
|
|
1473
|
+
var O = toObject(this);
|
|
1474
|
+
var A = arraySpeciesCreate(O, 0);
|
|
1475
|
+
var n = 0;
|
|
1476
|
+
var i, k, length, len, E;
|
|
1477
|
+
for (i = -1, length = arguments.length; i < length; i++) {
|
|
1478
|
+
E = i === -1 ? O : arguments[i];
|
|
1479
|
+
if (isConcatSpreadable(E)) {
|
|
1480
|
+
len = lengthOfArrayLike(E);
|
|
1481
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$9(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1482
|
+
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1483
|
+
} else {
|
|
1484
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$9(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1485
|
+
createProperty(A, n++, E);
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
A.length = n;
|
|
1489
|
+
return A;
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
|
|
1493
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
1494
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
1495
|
+
|
|
1496
|
+
// Array.prototype[@@unscopables]
|
|
1497
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1498
|
+
if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
|
|
1499
|
+
objectDefineProperty.f(ArrayPrototype$1, UNSCOPABLES, {
|
|
1500
|
+
configurable: true,
|
|
1501
|
+
value: objectCreate(null)
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
// add a key to Array.prototype[@@unscopables]
|
|
1506
|
+
var addToUnscopables = function (key) {
|
|
1507
|
+
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
var $includes = arrayIncludes.includes;
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
// `Array.prototype.includes` method
|
|
1514
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1515
|
+
_export({ target: 'Array', proto: true }, {
|
|
1516
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
1517
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
1518
|
+
}
|
|
1519
|
+
});
|
|
1520
|
+
|
|
1521
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1522
|
+
addToUnscopables('includes');
|
|
1523
|
+
|
|
1524
1524
|
var MATCH$1 = wellKnownSymbol('match');
|
|
1525
1525
|
|
|
1526
1526
|
// `IsRegExp` abstract operation
|
|
@@ -4243,7 +4243,7 @@ axios_1.default = default_1;
|
|
|
4243
4243
|
var axios = axios_1;
|
|
4244
4244
|
|
|
4245
4245
|
var name$1 = "@tryghost/content-api";
|
|
4246
|
-
var version = "1.9.
|
|
4246
|
+
var version = "1.9.1";
|
|
4247
4247
|
var repository = "https://github.com/TryGhost/SDK/tree/master/packages/content-api";
|
|
4248
4248
|
var author = "Ghost Foundation";
|
|
4249
4249
|
var license = "MIT";
|
|
@@ -4275,7 +4275,7 @@ var devDependencies = {
|
|
|
4275
4275
|
"@babel/core": "7.17.9",
|
|
4276
4276
|
"@babel/polyfill": "7.12.1",
|
|
4277
4277
|
"@babel/preset-env": "7.16.11",
|
|
4278
|
-
"@rollup/plugin-json": "
|
|
4278
|
+
"@rollup/plugin-json": "4.1.0",
|
|
4279
4279
|
c8: "7.11.0",
|
|
4280
4280
|
"core-js": "3.22.0",
|
|
4281
4281
|
"eslint-plugin-ghost": "1.5.0",
|
|
@@ -4292,7 +4292,7 @@ var devDependencies = {
|
|
|
4292
4292
|
var dependencies = {
|
|
4293
4293
|
axios: "^0.21.1"
|
|
4294
4294
|
};
|
|
4295
|
-
var gitHead = "
|
|
4295
|
+
var gitHead = "6c0165f2588537f0e00e76567c2ed2f526f7faff";
|
|
4296
4296
|
var packageInfo = {
|
|
4297
4297
|
name: name$1,
|
|
4298
4298
|
version: version,
|
|
@@ -4317,6 +4317,28 @@ var packageVersion = packageInfo.version; // NOTE: bump this default when Ghost
|
|
|
4317
4317
|
var defaultAcceptVersionHeader = 'v4.0';
|
|
4318
4318
|
var supportedVersions = ['v2', 'v3', 'v4', 'v5', 'canary'];
|
|
4319
4319
|
var name = '@tryghost/content-api';
|
|
4320
|
+
/**
|
|
4321
|
+
* This method can go away in favor of only sending 'Accept-Version` headers
|
|
4322
|
+
* once the Ghost API removes a concept of version from it's URLS (with Ghost v5)
|
|
4323
|
+
*
|
|
4324
|
+
* @param {string} [version] version in `v{major}` format
|
|
4325
|
+
* @returns {string}
|
|
4326
|
+
*/
|
|
4327
|
+
|
|
4328
|
+
var resolveAPIPrefix = function resolveAPIPrefix(version) {
|
|
4329
|
+
var prefix; // NOTE: the "version.match(/^v5\.\d+/)" expression should be changed to "version.match(/^v\d+\.\d+/)" once Ghost v5 is out
|
|
4330
|
+
|
|
4331
|
+
if (version === 'v5' || version === undefined || version.match(/^v5\.\d+/)) {
|
|
4332
|
+
prefix = "/content/";
|
|
4333
|
+
} else if (version.match(/^v\d+\.\d+/)) {
|
|
4334
|
+
var versionPrefix = /^(v\d+)\.\d+/.exec(version)[1];
|
|
4335
|
+
prefix = "/".concat(versionPrefix, "/content/");
|
|
4336
|
+
} else {
|
|
4337
|
+
prefix = "/".concat(version, "/content/");
|
|
4338
|
+
}
|
|
4339
|
+
|
|
4340
|
+
return prefix;
|
|
4341
|
+
};
|
|
4320
4342
|
|
|
4321
4343
|
var defaultMakeRequest = function defaultMakeRequest(_ref) {
|
|
4322
4344
|
var url = _ref.url,
|
|
@@ -4474,7 +4496,7 @@ function GhostContentAPI(_ref2) {
|
|
|
4474
4496
|
params = Object.assign({
|
|
4475
4497
|
key: key
|
|
4476
4498
|
}, params);
|
|
4477
|
-
var apiUrl =
|
|
4499
|
+
var apiUrl = "".concat(url, "/").concat(ghostPath, "/api").concat(resolveAPIPrefix(version)).concat(resourceType, "/").concat(id ? id + '/' : '');
|
|
4478
4500
|
return makeRequest({
|
|
4479
4501
|
url: apiUrl,
|
|
4480
4502
|
method: 'get',
|