contentful-management 10.30.0 → 10.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -16
- package/dist/contentful-management.browser.js +29 -13
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +32 -6
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/comment.js +19 -5
- package/dist/es-modules/adapters/REST/rest-adapter.js +1 -0
- package/dist/es-modules/entities/comment.js +6 -0
- package/dist/es-modules/methods/action.js +4 -0
- package/dist/es-modules/plain/plain-client-test.js +208 -0
- package/dist/typings/common-types.d.ts +25 -7
- package/dist/typings/create-entry-api.d.ts +3 -3
- package/dist/typings/entities/comment.d.ts +38 -3
- package/dist/typings/plain/common-types.d.ts +9 -5
- package/dist/typings/plain/plain-client-test.d.ts +1 -0
- package/package.json +6 -4
- package/tonic-example.js +0 -27
package/README.md
CHANGED
|
@@ -1,19 +1,75 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- shared header START -->
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.contentful.com/developers/docs/references/content-management-api/">
|
|
5
|
+
<img alt="Contentful Logo" title="Contentful" src="images/contentful-icon.png" width="150">
|
|
6
|
+
</a>
|
|
7
|
+
</p>
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
<h1 align='center'>Content Management API</h1>
|
|
10
|
+
|
|
11
|
+
<h3 align="center">JavaScript</h3>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="README.md">Readme</a> ·
|
|
15
|
+
<a href="SETUP.md">Setup</a> ·
|
|
16
|
+
<a href="MIGRATION.md">Migration</a> ·
|
|
17
|
+
<a href="CHANGELOG.md">Changelog</a> ·
|
|
18
|
+
<a href="CONTRIBUTING.md">Contributing</a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<a href="https://www.contentful.com/slack/">
|
|
23
|
+
<img src="https://img.shields.io/badge/-Join%20Community%20Slack-2AB27B.svg?logo=slack&maxAge=31557600" alt="Join Contentful Community Slack">
|
|
24
|
+
</a>
|
|
25
|
+
</p>
|
|
9
26
|
|
|
27
|
+
<!-- shared header END -->
|
|
28
|
+
|
|
29
|
+
## Introduction
|
|
30
|
+
|
|
31
|
+
[](https://circleci.com/gh/contentful/contentful-management.js)
|
|
32
|
+
[](https://www.npmjs.com/package/contentful-management)
|
|
10
33
|
[](https://github.com/semantic-release/semantic-release)
|
|
11
|
-
[](http://standardjs.com/)
|
|
12
34
|
[](http://npm-stat.com/charts.html?package=contentful-management)
|
|
13
35
|
[](https://unpkg.com/contentful-management/dist/contentful-management.browser.min.js)
|
|
14
36
|
|
|
37
|
+
**What is Contentful?**
|
|
38
|
+
|
|
15
39
|
[Contentful](https://www.contentful.com) provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike a CMS, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management and delivery APIs, and a customizable web app that enable developers and content creators to ship digital products faster.
|
|
16
40
|
|
|
41
|
+
<details>
|
|
42
|
+
<summary>Table of contents</summary>
|
|
43
|
+
|
|
44
|
+
<!-- TOC -->
|
|
45
|
+
|
|
46
|
+
- [Features](#features)
|
|
47
|
+
- [Supported Environments](#supported-environments)
|
|
48
|
+
- [Getting Started](#getting-started)
|
|
49
|
+
- [Installation](#installation)
|
|
50
|
+
- [Node](#node-)
|
|
51
|
+
- [Browser](#browser-)
|
|
52
|
+
- [Typings](#typings)
|
|
53
|
+
- [Authentication](#authentication)
|
|
54
|
+
- [Using ES6 import](#using-es6-import)
|
|
55
|
+
- [Your first Request](#your-first-request)
|
|
56
|
+
- [Alternative plain API](#alternative-plain-api)
|
|
57
|
+
- [App Framework](#app-framework)
|
|
58
|
+
- [Troubleshooting](#troubleshooting)
|
|
59
|
+
- [Documentation/References](#documentationreferences)
|
|
60
|
+
- [Configuration](#configuration)
|
|
61
|
+
- [Reference Documentation](#reference-documentation)
|
|
62
|
+
- [Contentful Javascript resources](#contentful-javascript-resources)
|
|
63
|
+
- [REST API reference](#rest-api-reference)
|
|
64
|
+
- [Versioning](#versioning)
|
|
65
|
+
- [Reach out to us](#reach-out-to-us)
|
|
66
|
+
- [Get involved](#get-involved)
|
|
67
|
+
- [License](#license)
|
|
68
|
+
- [Code of Conduct](#code-of-conduct)
|
|
69
|
+
|
|
70
|
+
<!-- /TOC -->
|
|
71
|
+
</details>
|
|
72
|
+
|
|
17
73
|
## Features
|
|
18
74
|
|
|
19
75
|
- Content management and retrieval through Contentful's [Content Management API](https://www.contentful.com/developers/docs/references/content-management-api/).
|
|
@@ -362,22 +418,35 @@ This means that new versions are released automatically as fixes, features or br
|
|
|
362
418
|
|
|
363
419
|
You can check the changelog on the [releases](https://github.com/contentful/contentful-management.js/releases) page.
|
|
364
420
|
|
|
365
|
-
##
|
|
421
|
+
## Reach out to us
|
|
366
422
|
|
|
367
|
-
|
|
423
|
+
### You have questions about how to use this library?
|
|
368
424
|
|
|
369
|
-
|
|
425
|
+
- Reach out to our community
|
|
426
|
+
forum: [](https://support.contentful.com/)
|
|
427
|
+
- Jump into our community slack
|
|
428
|
+
channel: [](https://www.contentful.com/slack/)
|
|
370
429
|
|
|
371
|
-
|
|
430
|
+
### You found a bug or want to propose a feature?
|
|
372
431
|
|
|
373
|
-
|
|
432
|
+
- File an issue here on GitHub: [](https://github.com/contentful/contentful-management.js/issues/new).
|
|
433
|
+
Make sure to remove any credential from your code before sharing it.
|
|
374
434
|
|
|
375
|
-
|
|
435
|
+
### You need to share confidential information or have other questions?
|
|
376
436
|
|
|
377
|
-
|
|
437
|
+
- File a support ticket at our Contentful Customer
|
|
438
|
+
Support: [](https://www.contentful.com/support/)
|
|
378
439
|
|
|
379
|
-
|
|
440
|
+
## Get involved
|
|
441
|
+
|
|
442
|
+
We appreciate any help on our repositories. For more details about how to contribute see our [CONTRIBUTING.md](https://github.com/contentful/contentful-management.js/blob/master/CONTRIBUTING.md) document.
|
|
380
443
|
|
|
381
444
|
## License
|
|
382
445
|
|
|
383
|
-
MIT
|
|
446
|
+
This repository is published under the [MIT](LICENSE) license.
|
|
447
|
+
|
|
448
|
+
## Code of Conduct
|
|
449
|
+
|
|
450
|
+
We want to provide a safe, inclusive, welcoming, and harassment-free space and experience for all participants, regardless of gender identity and expression, sexual orientation, disability, physical appearance, socioeconomic status, body size, ethnicity, nationality, level of experience, age, religion (or lack thereof), or other identity markers.
|
|
451
|
+
|
|
452
|
+
[Read our full Code of Conduct](https://www.contentful.com/developers/code-of-conduct/).
|
|
@@ -9871,6 +9871,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
9871
9871
|
|
|
9872
9872
|
|
|
9873
9873
|
|
|
9874
|
+
var BODY_FORMAT_HEADER = 'x-contentful-comment-body-format';
|
|
9874
9875
|
var getSpaceEnvBaseUrl = function getSpaceEnvBaseUrl(params) {
|
|
9875
9876
|
return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId);
|
|
9876
9877
|
};
|
|
@@ -9899,30 +9900,35 @@ var getEntityBaseUrl = function getEntityBaseUrl(params) {
|
|
|
9899
9900
|
return "".concat(getSpaceEnvBaseUrl(params), "/").concat(parentPlural, "/").concat(parentEntityId).concat(versionPath, "/comments");
|
|
9900
9901
|
};
|
|
9901
9902
|
var get = function get(http, params) {
|
|
9902
|
-
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getEntryCommentUrl(params)
|
|
9903
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getEntryCommentUrl(params), {
|
|
9904
|
+
headers: params.bodyFormat === 'rich-text' ? _defineProperty({}, BODY_FORMAT_HEADER, params.bodyFormat) : {}
|
|
9905
|
+
});
|
|
9903
9906
|
};
|
|
9904
9907
|
var getMany = function getMany(http, params) {
|
|
9905
9908
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getEntityBaseUrl(params), {
|
|
9906
|
-
params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query)
|
|
9909
|
+
params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query),
|
|
9910
|
+
headers: params.bodyFormat === 'rich-text' ? _defineProperty({}, BODY_FORMAT_HEADER, params.bodyFormat) : {}
|
|
9907
9911
|
});
|
|
9908
9912
|
};
|
|
9909
9913
|
var create = function create(http, params, rawData) {
|
|
9910
9914
|
var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(rawData);
|
|
9911
|
-
return _raw__WEBPACK_IMPORTED_MODULE_1__["post"](http, getEntityBaseUrl(params), data
|
|
9915
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__["post"](http, getEntityBaseUrl(params), data, {
|
|
9916
|
+
headers: typeof rawData.body !== 'string' ? _defineProperty({}, BODY_FORMAT_HEADER, 'rich-text') : {}
|
|
9917
|
+
});
|
|
9912
9918
|
};
|
|
9913
9919
|
var update = function update(http, params, rawData, headers) {
|
|
9914
9920
|
var _rawData$sys$version;
|
|
9915
9921
|
var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(rawData);
|
|
9916
9922
|
delete data.sys;
|
|
9917
9923
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["put"](http, getEntryCommentUrl(params), data, {
|
|
9918
|
-
headers: _objectSpread({
|
|
9924
|
+
headers: _objectSpread(_objectSpread({
|
|
9919
9925
|
'X-Contentful-Version': (_rawData$sys$version = rawData.sys.version) !== null && _rawData$sys$version !== void 0 ? _rawData$sys$version : 0
|
|
9920
|
-
}, headers)
|
|
9926
|
+
}, typeof rawData.body !== 'string' ? _defineProperty({}, BODY_FORMAT_HEADER, 'rich-text') : {}), headers)
|
|
9921
9927
|
});
|
|
9922
9928
|
};
|
|
9923
|
-
var del = function del(http,
|
|
9924
|
-
var version =
|
|
9925
|
-
params = _objectWithoutProperties(
|
|
9929
|
+
var del = function del(http, _ref5) {
|
|
9930
|
+
var version = _ref5.version,
|
|
9931
|
+
params = _objectWithoutProperties(_ref5, _excluded);
|
|
9926
9932
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["del"](http, getEntryCommentUrl(params), {
|
|
9927
9933
|
headers: {
|
|
9928
9934
|
'X-Contentful-Version': version
|
|
@@ -12462,10 +12468,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
12462
12468
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
12463
12469
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12464
12470
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12465
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12466
12471
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12467
12472
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12468
12473
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12474
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12469
12475
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12470
12476
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12471
12477
|
|
|
@@ -12482,6 +12488,7 @@ var defaultHostParameters = {
|
|
|
12482
12488
|
var RestAdapter = /*#__PURE__*/function () {
|
|
12483
12489
|
function RestAdapter(params) {
|
|
12484
12490
|
_classCallCheck(this, RestAdapter);
|
|
12491
|
+
_defineProperty(this, "params", void 0);
|
|
12485
12492
|
if (!params.accessToken) {
|
|
12486
12493
|
throw new TypeError('Expected parameter accessToken');
|
|
12487
12494
|
}
|
|
@@ -20784,11 +20791,12 @@ function wrapBulkAction(makeRequest, data) {
|
|
|
20784
20791
|
/*!*****************************!*\
|
|
20785
20792
|
!*** ./entities/comment.ts ***!
|
|
20786
20793
|
\*****************************/
|
|
20787
|
-
/*! exports provided: default, wrapComment, wrapCommentCollection */
|
|
20794
|
+
/*! exports provided: CommentNode, default, wrapComment, wrapCommentCollection */
|
|
20788
20795
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20789
20796
|
|
|
20790
20797
|
"use strict";
|
|
20791
20798
|
__webpack_require__.r(__webpack_exports__);
|
|
20799
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommentNode", function() { return CommentNode; });
|
|
20792
20800
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createCommentApi; });
|
|
20793
20801
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapComment", function() { return wrapComment; });
|
|
20794
20802
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapCommentCollection", function() { return wrapCommentCollection; });
|
|
@@ -20807,6 +20815,12 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
20807
20815
|
|
|
20808
20816
|
|
|
20809
20817
|
|
|
20818
|
+
var CommentNode;
|
|
20819
|
+
(function (CommentNode) {
|
|
20820
|
+
CommentNode["Document"] = "document";
|
|
20821
|
+
CommentNode["Paragraph"] = "paragraph";
|
|
20822
|
+
CommentNode["Mention"] = "mention";
|
|
20823
|
+
})(CommentNode || (CommentNode = {}));
|
|
20810
20824
|
/**
|
|
20811
20825
|
* @private
|
|
20812
20826
|
*/
|
|
@@ -23575,14 +23589,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23575
23589
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncActionFailedError", function() { return AsyncActionFailedError; });
|
|
23576
23590
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pollAsyncActionStatus", function() { return pollAsyncActionStatus; });
|
|
23577
23591
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./methods/utils.ts");
|
|
23578
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23579
23592
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
23593
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23580
23594
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
23581
23595
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
23582
23596
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
23583
23597
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23584
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23585
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23586
23598
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23587
23599
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
23588
23600
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -23594,6 +23606,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
23594
23606
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
23595
23607
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23596
23608
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23609
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23610
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23611
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23597
23612
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
23598
23613
|
|
|
23599
23614
|
var DEFAULT_MAX_RETRIES = 30;
|
|
@@ -23609,6 +23624,7 @@ var AsyncActionProcessingError = /*#__PURE__*/function (_Error) {
|
|
|
23609
23624
|
var _this;
|
|
23610
23625
|
_classCallCheck(this, AsyncActionProcessingError);
|
|
23611
23626
|
_this = _super.call(this, message);
|
|
23627
|
+
_defineProperty(_assertThisInitialized(_this), "action", void 0);
|
|
23612
23628
|
_this.action = action;
|
|
23613
23629
|
_this.name = _this.constructor.name;
|
|
23614
23630
|
return _this;
|