@atlaskit/media-client 20.2.0 → 21.0.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/CHANGELOG.md +35 -0
- package/dist/cjs/client/file-fetcher/index.js +15 -13
- package/dist/cjs/client/media-client.js +27 -7
- package/dist/cjs/client/media-store/index.js +86 -112
- package/dist/cjs/client/media-store/resolveAuth.js +4 -3
- package/dist/cjs/client/stargate-client.js +4 -3
- package/dist/cjs/index.js +0 -13
- package/dist/cjs/models/media.js +4 -5
- package/dist/cjs/uploader/index.js +14 -11
- package/dist/cjs/utils/createFileDataLoader.js +8 -6
- package/dist/cjs/utils/getDimensionsFromBlob.js +4 -3
- package/dist/cjs/utils/getVideoDimensionsFromBlob.js +4 -3
- package/dist/cjs/utils/hashing/hasherCreator.js +3 -3
- package/dist/cjs/utils/mediaSubscribable/fromObservable.js +2 -2
- package/dist/cjs/utils/mobileUpload/helpers.js +4 -3
- package/dist/cjs/utils/mobileUpload/stateMachine/index.js +4 -3
- package/dist/cjs/utils/polling/index.js +4 -3
- package/dist/cjs/utils/request/helpers.js +14 -13
- package/dist/cjs/utils/request/index.js +4 -3
- package/dist/cjs/utils/shouldFetchRemoteFileStates.js +4 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/media-client.js +3 -2
- package/dist/es2019/client/media-store/index.js +0 -9
- package/dist/es2019/index.js +1 -2
- package/dist/es2019/models/media.js +3 -1
- package/dist/es2019/uploader/index.js +3 -0
- package/dist/es2019/utils/mediaSubscribable/fromObservable.js +2 -2
- package/dist/es2019/utils/mediaSubscribable/toPromise.js +10 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/file-fetcher/index.js +14 -13
- package/dist/esm/client/media-client.js +28 -7
- package/dist/esm/client/media-store/index.js +86 -112
- package/dist/esm/client/media-store/resolveAuth.js +4 -3
- package/dist/esm/client/stargate-client.js +4 -3
- package/dist/esm/index.js +1 -2
- package/dist/esm/models/media.js +3 -3
- package/dist/esm/uploader/index.js +15 -11
- package/dist/esm/utils/createFileDataLoader.js +6 -5
- package/dist/esm/utils/getDimensionsFromBlob.js +4 -3
- package/dist/esm/utils/getVideoDimensionsFromBlob.js +4 -3
- package/dist/esm/utils/hashing/hasherCreator.js +4 -3
- package/dist/esm/utils/mediaSubscribable/fromObservable.js +2 -2
- package/dist/esm/utils/mobileUpload/helpers.js +4 -3
- package/dist/esm/utils/mobileUpload/stateMachine/index.js +4 -3
- package/dist/esm/utils/polling/index.js +4 -3
- package/dist/esm/utils/request/helpers.js +14 -13
- package/dist/esm/utils/request/index.js +4 -3
- package/dist/esm/utils/shouldFetchRemoteFileStates.js +4 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/client/__mocks__/media-client.d.ts +0 -2
- package/dist/types/client/file-fetcher/index.d.ts +4 -4
- package/dist/types/client/media-client.d.ts +1 -2
- package/dist/types/client/media-store/index.d.ts +2 -13
- package/dist/types/index.d.ts +3 -5
- package/dist/types/models/file-state.d.ts +2 -2
- package/dist/types/models/media.d.ts +1 -21
- package/dist/types/utils/createFileDataLoader.d.ts +2 -2
- package/dist/types/utils/createMediaSubject.d.ts +2 -2
- package/dist/types/utils/detectEmptyFile.d.ts +2 -2
- package/dist/types/utils/mediaSubscribable/fromObservable.d.ts +3 -3
- package/dist/types/utils/mediaSubscribable/toPromise.d.ts +2 -2
- package/dist/types/utils/mediaSubscribable/types.d.ts +9 -8
- package/package.json +4 -4
- package/report.api.md +46 -126
- package/dist/cjs/client/collection-fetcher.js +0 -98
- package/dist/cjs/models/media-subscribable.js +0 -5
- package/dist/cjs/utils/deprecatedEndpointError.js +0 -43
- package/dist/es2019/client/collection-fetcher.js +0 -38
- package/dist/es2019/models/media-subscribable.js +0 -1
- package/dist/es2019/utils/deprecatedEndpointError.js +0 -20
- package/dist/esm/client/collection-fetcher.js +0 -89
- package/dist/esm/models/media-subscribable.js +0 -1
- package/dist/esm/utils/deprecatedEndpointError.js +0 -34
- package/dist/types/client/collection-fetcher.d.ts +0 -42
- package/dist/types/models/media-subscribable.d.ts +0 -3
- package/dist/types/utils/deprecatedEndpointError.d.ts +0 -16
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -18,7 +19,6 @@ Object.defineProperty(exports, "isMediaStoreError", {
|
|
|
18
19
|
return _error.isMediaStoreError;
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
22
22
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
23
23
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
24
24
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -29,8 +29,8 @@ var _artifacts = require("../../models/artifacts");
|
|
|
29
29
|
var _request3 = require("../../utils/request");
|
|
30
30
|
var _helpers = require("../../utils/request/helpers");
|
|
31
31
|
var _resolveAuth = require("./resolveAuth");
|
|
32
|
-
var _deprecatedEndpointError = require("../../utils/deprecatedEndpointError");
|
|
33
32
|
var _error = require("./error");
|
|
33
|
+
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; }
|
|
34
34
|
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; }
|
|
35
35
|
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) { (0, _defineProperty2.default)(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; }
|
|
36
36
|
var MEDIA_API_REGION = 'media-api-region';
|
|
@@ -64,40 +64,14 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
64
64
|
this.config = config;
|
|
65
65
|
this.featureFlags = featureFlags;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-170 Internal documentation for deprecation (no external access)}
|
|
70
|
-
* This method is no longer working. Will be removed in the next release
|
|
71
|
-
*/
|
|
72
67
|
(0, _createClass2.default)(MediaStore, [{
|
|
73
|
-
key: "getCollectionItems",
|
|
74
|
-
value: function () {
|
|
75
|
-
var _getCollectionItems = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(collectionName, params, traceContext) {
|
|
76
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
77
|
-
while (1) {
|
|
78
|
-
switch (_context.prev = _context.next) {
|
|
79
|
-
case 0:
|
|
80
|
-
throw new _deprecatedEndpointError.DeprecatedError('collection/:name/items');
|
|
81
|
-
case 1:
|
|
82
|
-
case "end":
|
|
83
|
-
return _context.stop();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}, _callee);
|
|
87
|
-
}));
|
|
88
|
-
function getCollectionItems(_x, _x2, _x3) {
|
|
89
|
-
return _getCollectionItems.apply(this, arguments);
|
|
90
|
-
}
|
|
91
|
-
return getCollectionItems;
|
|
92
|
-
}()
|
|
93
|
-
}, {
|
|
94
68
|
key: "removeCollectionFile",
|
|
95
69
|
value: function () {
|
|
96
|
-
var _removeCollectionFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
70
|
+
var _removeCollectionFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id, collectionName, occurrenceKey, traceContext) {
|
|
97
71
|
var metadata, body, options;
|
|
98
|
-
return
|
|
72
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
99
73
|
while (1) {
|
|
100
|
-
switch (
|
|
74
|
+
switch (_context.prev = _context.next) {
|
|
101
75
|
case 0:
|
|
102
76
|
metadata = {
|
|
103
77
|
method: 'PUT',
|
|
@@ -124,16 +98,16 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
124
98
|
body: JSON.stringify(body),
|
|
125
99
|
traceContext: traceContext
|
|
126
100
|
});
|
|
127
|
-
|
|
101
|
+
_context.next = 5;
|
|
128
102
|
return this.request("/collection/".concat(collectionName), options);
|
|
129
103
|
case 5:
|
|
130
104
|
case "end":
|
|
131
|
-
return
|
|
105
|
+
return _context.stop();
|
|
132
106
|
}
|
|
133
107
|
}
|
|
134
|
-
},
|
|
108
|
+
}, _callee, this);
|
|
135
109
|
}));
|
|
136
|
-
function removeCollectionFile(
|
|
110
|
+
function removeCollectionFile(_x, _x2, _x3, _x4) {
|
|
137
111
|
return _removeCollectionFile.apply(this, arguments);
|
|
138
112
|
}
|
|
139
113
|
return removeCollectionFile;
|
|
@@ -165,11 +139,11 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
165
139
|
}, {
|
|
166
140
|
key: "uploadChunk",
|
|
167
141
|
value: function () {
|
|
168
|
-
var _uploadChunk = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
142
|
+
var _uploadChunk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(etag, blob, uploadId, partNumber, collectionName, traceContext) {
|
|
169
143
|
var metadata, options;
|
|
170
|
-
return
|
|
144
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
171
145
|
while (1) {
|
|
172
|
-
switch (
|
|
146
|
+
switch (_context2.prev = _context2.next) {
|
|
173
147
|
case 0:
|
|
174
148
|
metadata = {
|
|
175
149
|
method: 'PUT',
|
|
@@ -186,16 +160,16 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
186
160
|
body: blob,
|
|
187
161
|
traceContext: traceContext
|
|
188
162
|
});
|
|
189
|
-
|
|
163
|
+
_context2.next = 4;
|
|
190
164
|
return this.request("/chunk/".concat(etag), options);
|
|
191
165
|
case 4:
|
|
192
166
|
case "end":
|
|
193
|
-
return
|
|
167
|
+
return _context2.stop();
|
|
194
168
|
}
|
|
195
169
|
}
|
|
196
|
-
},
|
|
170
|
+
}, _callee2, this);
|
|
197
171
|
}));
|
|
198
|
-
function uploadChunk(
|
|
172
|
+
function uploadChunk(_x5, _x6, _x7, _x8, _x9, _x10) {
|
|
199
173
|
return _uploadChunk.apply(this, arguments);
|
|
200
174
|
}
|
|
201
175
|
return uploadChunk;
|
|
@@ -282,28 +256,28 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
282
256
|
}, {
|
|
283
257
|
key: "getFileImageURL",
|
|
284
258
|
value: function () {
|
|
285
|
-
var _getFileImageURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
259
|
+
var _getFileImageURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id, params) {
|
|
286
260
|
var _ref, collectionName, auth;
|
|
287
|
-
return
|
|
261
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
288
262
|
while (1) {
|
|
289
|
-
switch (
|
|
263
|
+
switch (_context3.prev = _context3.next) {
|
|
290
264
|
case 0:
|
|
291
265
|
_ref = params || {}, collectionName = _ref.collection;
|
|
292
|
-
|
|
266
|
+
_context3.next = 3;
|
|
293
267
|
return this.resolveAuth({
|
|
294
268
|
collectionName: collectionName
|
|
295
269
|
});
|
|
296
270
|
case 3:
|
|
297
|
-
auth =
|
|
298
|
-
return
|
|
271
|
+
auth = _context3.sent;
|
|
272
|
+
return _context3.abrupt("return", this.createFileImageURL(id, auth, params));
|
|
299
273
|
case 5:
|
|
300
274
|
case "end":
|
|
301
|
-
return
|
|
275
|
+
return _context3.stop();
|
|
302
276
|
}
|
|
303
277
|
}
|
|
304
|
-
},
|
|
278
|
+
}, _callee3, this);
|
|
305
279
|
}));
|
|
306
|
-
function getFileImageURL(
|
|
280
|
+
function getFileImageURL(_x11, _x12) {
|
|
307
281
|
return _getFileImageURL.apply(this, arguments);
|
|
308
282
|
}
|
|
309
283
|
return getFileImageURL;
|
|
@@ -326,18 +300,18 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
326
300
|
}, {
|
|
327
301
|
key: "getFileBinaryURL",
|
|
328
302
|
value: function () {
|
|
329
|
-
var _getFileBinaryURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
303
|
+
var _getFileBinaryURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(id, collectionName) {
|
|
330
304
|
var auth, options;
|
|
331
|
-
return
|
|
305
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
332
306
|
while (1) {
|
|
333
|
-
switch (
|
|
307
|
+
switch (_context4.prev = _context4.next) {
|
|
334
308
|
case 0:
|
|
335
|
-
|
|
309
|
+
_context4.next = 2;
|
|
336
310
|
return this.resolveAuth({
|
|
337
311
|
collectionName: collectionName
|
|
338
312
|
});
|
|
339
313
|
case 2:
|
|
340
|
-
auth =
|
|
314
|
+
auth = _context4.sent;
|
|
341
315
|
options = {
|
|
342
316
|
params: {
|
|
343
317
|
dl: true,
|
|
@@ -346,15 +320,15 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
346
320
|
},
|
|
347
321
|
auth: auth
|
|
348
322
|
};
|
|
349
|
-
return
|
|
323
|
+
return _context4.abrupt("return", (0, _helpers.createUrl)("".concat(auth.baseUrl, "/file/").concat(id, "/binary"), options));
|
|
350
324
|
case 5:
|
|
351
325
|
case "end":
|
|
352
|
-
return
|
|
326
|
+
return _context4.stop();
|
|
353
327
|
}
|
|
354
328
|
}
|
|
355
|
-
},
|
|
329
|
+
}, _callee4, this);
|
|
356
330
|
}));
|
|
357
|
-
function getFileBinaryURL(
|
|
331
|
+
function getFileBinaryURL(_x13, _x14) {
|
|
358
332
|
return _getFileBinaryURL.apply(this, arguments);
|
|
359
333
|
}
|
|
360
334
|
return getFileBinaryURL;
|
|
@@ -362,25 +336,25 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
362
336
|
}, {
|
|
363
337
|
key: "getArtifactURL",
|
|
364
338
|
value: function () {
|
|
365
|
-
var _getArtifactURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
339
|
+
var _getArtifactURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(artifacts, artifactName, collectionName) {
|
|
366
340
|
var artifactUrl, auth, options;
|
|
367
|
-
return
|
|
341
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
368
342
|
while (1) {
|
|
369
|
-
switch (
|
|
343
|
+
switch (_context5.prev = _context5.next) {
|
|
370
344
|
case 0:
|
|
371
345
|
artifactUrl = (0, _artifacts.getArtifactUrl)(artifacts, artifactName);
|
|
372
346
|
if (artifactUrl) {
|
|
373
|
-
|
|
347
|
+
_context5.next = 3;
|
|
374
348
|
break;
|
|
375
349
|
}
|
|
376
350
|
throw new Error("artifact ".concat(artifactName, " not found"));
|
|
377
351
|
case 3:
|
|
378
|
-
|
|
352
|
+
_context5.next = 5;
|
|
379
353
|
return this.resolveAuth({
|
|
380
354
|
collectionName: collectionName
|
|
381
355
|
});
|
|
382
356
|
case 5:
|
|
383
|
-
auth =
|
|
357
|
+
auth = _context5.sent;
|
|
384
358
|
options = {
|
|
385
359
|
params: {
|
|
386
360
|
collection: collectionName,
|
|
@@ -388,15 +362,15 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
388
362
|
},
|
|
389
363
|
auth: auth
|
|
390
364
|
};
|
|
391
|
-
return
|
|
365
|
+
return _context5.abrupt("return", (0, _helpers.createUrl)("".concat(auth.baseUrl).concat(artifactUrl), options));
|
|
392
366
|
case 8:
|
|
393
367
|
case "end":
|
|
394
|
-
return
|
|
368
|
+
return _context5.stop();
|
|
395
369
|
}
|
|
396
370
|
}
|
|
397
|
-
},
|
|
371
|
+
}, _callee5, this);
|
|
398
372
|
}));
|
|
399
|
-
function getArtifactURL(
|
|
373
|
+
function getArtifactURL(_x15, _x16, _x17) {
|
|
400
374
|
return _getArtifactURL.apply(this, arguments);
|
|
401
375
|
}
|
|
402
376
|
return getArtifactURL;
|
|
@@ -404,11 +378,11 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
404
378
|
}, {
|
|
405
379
|
key: "getImage",
|
|
406
380
|
value: function () {
|
|
407
|
-
var _getImage = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
381
|
+
var _getImage = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(id, params, controller, fetchMaxRes, traceContext) {
|
|
408
382
|
var isWebpSupported, headers, metadata, options;
|
|
409
|
-
return
|
|
383
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
410
384
|
while (1) {
|
|
411
|
-
switch (
|
|
385
|
+
switch (_context6.prev = _context6.next) {
|
|
412
386
|
case 0:
|
|
413
387
|
// TODO add checkWebpSupport() back https://product-fabric.atlassian.net/browse/MPT-584
|
|
414
388
|
isWebpSupported = false;
|
|
@@ -428,15 +402,15 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
428
402
|
headers: headers,
|
|
429
403
|
traceContext: traceContext
|
|
430
404
|
});
|
|
431
|
-
return
|
|
405
|
+
return _context6.abrupt("return", this.request("/file/".concat(id, "/image"), options, controller).then((0, _helpers.createMapResponseToBlob)(metadata)));
|
|
432
406
|
case 6:
|
|
433
407
|
case "end":
|
|
434
|
-
return
|
|
408
|
+
return _context6.stop();
|
|
435
409
|
}
|
|
436
410
|
}
|
|
437
|
-
},
|
|
411
|
+
}, _callee6, this);
|
|
438
412
|
}));
|
|
439
|
-
function getImage(
|
|
413
|
+
function getImage(_x18, _x19, _x20, _x21, _x22) {
|
|
440
414
|
return _getImage.apply(this, arguments);
|
|
441
415
|
}
|
|
442
416
|
return getImage;
|
|
@@ -444,11 +418,11 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
444
418
|
}, {
|
|
445
419
|
key: "getItems",
|
|
446
420
|
value: function () {
|
|
447
|
-
var _getItems = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
421
|
+
var _getItems = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(ids, collectionName, traceContext) {
|
|
448
422
|
var descriptors, metadata, options;
|
|
449
|
-
return
|
|
423
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
450
424
|
while (1) {
|
|
451
|
-
switch (
|
|
425
|
+
switch (_context7.prev = _context7.next) {
|
|
452
426
|
case 0:
|
|
453
427
|
descriptors = ids.map(function (id) {
|
|
454
428
|
return {
|
|
@@ -471,15 +445,15 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
471
445
|
}),
|
|
472
446
|
traceContext: traceContext
|
|
473
447
|
});
|
|
474
|
-
return
|
|
448
|
+
return _context7.abrupt("return", this.request('/items', options).then((0, _helpers.createMapResponseToJson)(metadata)));
|
|
475
449
|
case 4:
|
|
476
450
|
case "end":
|
|
477
|
-
return
|
|
451
|
+
return _context7.stop();
|
|
478
452
|
}
|
|
479
453
|
}
|
|
480
|
-
},
|
|
454
|
+
}, _callee7, this);
|
|
481
455
|
}));
|
|
482
|
-
function getItems(
|
|
456
|
+
function getItems(_x23, _x24, _x25) {
|
|
483
457
|
return _getItems.apply(this, arguments);
|
|
484
458
|
}
|
|
485
459
|
return getItems;
|
|
@@ -487,11 +461,11 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
487
461
|
}, {
|
|
488
462
|
key: "getImageMetadata",
|
|
489
463
|
value: function () {
|
|
490
|
-
var _getImageMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
464
|
+
var _getImageMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id, params, traceContext) {
|
|
491
465
|
var metadata, options;
|
|
492
|
-
return
|
|
466
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
493
467
|
while (1) {
|
|
494
|
-
switch (
|
|
468
|
+
switch (_context8.prev = _context8.next) {
|
|
495
469
|
case 0:
|
|
496
470
|
metadata = {
|
|
497
471
|
method: 'GET',
|
|
@@ -504,15 +478,15 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
504
478
|
params: params,
|
|
505
479
|
traceContext: traceContext
|
|
506
480
|
});
|
|
507
|
-
return
|
|
481
|
+
return _context8.abrupt("return", this.request("/file/".concat(id, "/image/metadata"), options).then((0, _helpers.createMapResponseToJson)(metadata)));
|
|
508
482
|
case 3:
|
|
509
483
|
case "end":
|
|
510
|
-
return
|
|
484
|
+
return _context8.stop();
|
|
511
485
|
}
|
|
512
486
|
}
|
|
513
|
-
},
|
|
487
|
+
}, _callee8, this);
|
|
514
488
|
}));
|
|
515
|
-
function getImageMetadata(
|
|
489
|
+
function getImageMetadata(_x26, _x27, _x28) {
|
|
516
490
|
return _getImageMetadata.apply(this, arguments);
|
|
517
491
|
}
|
|
518
492
|
return getImageMetadata;
|
|
@@ -520,11 +494,11 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
520
494
|
}, {
|
|
521
495
|
key: "appendChunksToUpload",
|
|
522
496
|
value: function () {
|
|
523
|
-
var _appendChunksToUpload = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
497
|
+
var _appendChunksToUpload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(uploadId, body, collectionName, traceContext) {
|
|
524
498
|
var metadata, options;
|
|
525
|
-
return
|
|
499
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
526
500
|
while (1) {
|
|
527
|
-
switch (
|
|
501
|
+
switch (_context9.prev = _context9.next) {
|
|
528
502
|
case 0:
|
|
529
503
|
metadata = {
|
|
530
504
|
method: 'PUT',
|
|
@@ -538,16 +512,16 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
538
512
|
body: JSON.stringify(body),
|
|
539
513
|
traceContext: traceContext
|
|
540
514
|
});
|
|
541
|
-
|
|
515
|
+
_context9.next = 4;
|
|
542
516
|
return this.request("/upload/".concat(uploadId, "/chunks"), options);
|
|
543
517
|
case 4:
|
|
544
518
|
case "end":
|
|
545
|
-
return
|
|
519
|
+
return _context9.stop();
|
|
546
520
|
}
|
|
547
521
|
}
|
|
548
|
-
},
|
|
522
|
+
}, _callee9, this);
|
|
549
523
|
}));
|
|
550
|
-
function appendChunksToUpload(
|
|
524
|
+
function appendChunksToUpload(_x29, _x30, _x31, _x32) {
|
|
551
525
|
return _appendChunksToUpload.apply(this, arguments);
|
|
552
526
|
}
|
|
553
527
|
return appendChunksToUpload;
|
|
@@ -576,7 +550,7 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
576
550
|
}, {
|
|
577
551
|
key: "request",
|
|
578
552
|
value: function () {
|
|
579
|
-
var _request2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
553
|
+
var _request2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(path) {
|
|
580
554
|
var options,
|
|
581
555
|
controller,
|
|
582
556
|
method,
|
|
@@ -590,26 +564,26 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
590
564
|
auth,
|
|
591
565
|
extendedTraceContext,
|
|
592
566
|
response,
|
|
593
|
-
|
|
594
|
-
return
|
|
567
|
+
_args10 = arguments;
|
|
568
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
595
569
|
while (1) {
|
|
596
|
-
switch (
|
|
570
|
+
switch (_context10.prev = _context10.next) {
|
|
597
571
|
case 0:
|
|
598
|
-
options =
|
|
572
|
+
options = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {
|
|
599
573
|
method: 'GET',
|
|
600
574
|
endpoint: undefined,
|
|
601
575
|
authContext: {}
|
|
602
576
|
};
|
|
603
|
-
controller =
|
|
577
|
+
controller = _args10.length > 2 ? _args10[2] : undefined;
|
|
604
578
|
method = options.method, endpoint = options.endpoint, authContext = options.authContext, params = options.params, headers = options.headers, body = options.body, clientOptions = options.clientOptions, traceContext = options.traceContext;
|
|
605
|
-
|
|
579
|
+
_context10.next = 5;
|
|
606
580
|
return this.resolveAuth(authContext);
|
|
607
581
|
case 5:
|
|
608
|
-
auth =
|
|
582
|
+
auth = _context10.sent;
|
|
609
583
|
extendedTraceContext = traceContext ? _objectSpread(_objectSpread({}, traceContext), {}, {
|
|
610
584
|
spanId: (traceContext === null || traceContext === void 0 ? void 0 : traceContext.spanId) || (0, _mediaCommon.getRandomHex)(8)
|
|
611
585
|
}) : undefined;
|
|
612
|
-
|
|
586
|
+
_context10.next = 9;
|
|
613
587
|
return (0, _request3.request)("".concat(auth.baseUrl).concat(path), {
|
|
614
588
|
method: method,
|
|
615
589
|
endpoint: endpoint,
|
|
@@ -621,18 +595,18 @@ var MediaStore = /*#__PURE__*/function () {
|
|
|
621
595
|
traceContext: extendedTraceContext
|
|
622
596
|
}, controller);
|
|
623
597
|
case 9:
|
|
624
|
-
response =
|
|
598
|
+
response = _context10.sent;
|
|
625
599
|
setKeyValueInSessionStorage(MEDIA_API_REGION, response.headers.get('x-media-region'));
|
|
626
600
|
setKeyValueInSessionStorage(MEDIA_API_ENVIRONMENT, response.headers.get('x-media-env'));
|
|
627
|
-
return
|
|
601
|
+
return _context10.abrupt("return", response);
|
|
628
602
|
case 13:
|
|
629
603
|
case "end":
|
|
630
|
-
return
|
|
604
|
+
return _context10.stop();
|
|
631
605
|
}
|
|
632
606
|
}
|
|
633
|
-
},
|
|
607
|
+
}, _callee10, this);
|
|
634
608
|
}));
|
|
635
|
-
function request(
|
|
609
|
+
function request(_x33) {
|
|
636
610
|
return _request2.apply(this, arguments);
|
|
637
611
|
}
|
|
638
612
|
return request;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.resolveInitialAuth = exports.resolveAuth = exports.DEFAULT_AUTH_PROVIDER_TIMEOUT = void 0;
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _error = require("./error");
|
|
11
11
|
var _setTimeoutPromise = require("../../utils/setTimeoutPromise");
|
|
12
|
+
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; }
|
|
12
13
|
var DEFAULT_AUTH_PROVIDER_TIMEOUT = 10000;
|
|
13
14
|
exports.DEFAULT_AUTH_PROVIDER_TIMEOUT = DEFAULT_AUTH_PROVIDER_TIMEOUT;
|
|
14
15
|
var resolveAuth = /*#__PURE__*/function () {
|
|
15
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
16
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(authProvider, authContext) {
|
|
16
17
|
var authProviderTimeout,
|
|
17
18
|
auth,
|
|
18
19
|
_args = arguments;
|
|
19
|
-
return
|
|
20
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20
21
|
while (1) {
|
|
21
22
|
switch (_context.prev = _context.next) {
|
|
22
23
|
case 0:
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.StargateClient = void 0;
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
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; }
|
|
12
13
|
var StargateClient = /*#__PURE__*/function () {
|
|
13
14
|
function StargateClient(baseUrl) {
|
|
14
15
|
(0, _classCallCheck2.default)(this, StargateClient);
|
|
@@ -17,8 +18,8 @@ var StargateClient = /*#__PURE__*/function () {
|
|
|
17
18
|
(0, _createClass2.default)(StargateClient, [{
|
|
18
19
|
key: "fetchToken",
|
|
19
20
|
value: function () {
|
|
20
|
-
var _fetchToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
21
|
-
return
|
|
21
|
+
var _fetchToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(clientId) {
|
|
22
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22
23
|
while (1) {
|
|
23
24
|
switch (_context.prev = _context.next) {
|
|
24
25
|
case 0:
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "CollectionFetcher", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _collectionFetcher.CollectionFetcher;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "FileFetcherError", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function get() {
|
|
@@ -235,12 +229,6 @@ Object.defineProperty(exports, "isMediaClientError", {
|
|
|
235
229
|
return _errors.isMediaClientError;
|
|
236
230
|
}
|
|
237
231
|
});
|
|
238
|
-
Object.defineProperty(exports, "isMediaCollectionItemFullDetails", {
|
|
239
|
-
enumerable: true,
|
|
240
|
-
get: function get() {
|
|
241
|
-
return _media.isMediaCollectionItemFullDetails;
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
232
|
Object.defineProperty(exports, "isMediaStoreError", {
|
|
245
233
|
enumerable: true,
|
|
246
234
|
get: function get() {
|
|
@@ -371,7 +359,6 @@ var _polling = require("./utils/polling");
|
|
|
371
359
|
var _errors2 = require("./utils/polling/errors");
|
|
372
360
|
var _imageResizeModeToFileImageMode = require("./utils/imageResizeModeToFileImageMode");
|
|
373
361
|
var _fileFetcher = require("./client/file-fetcher");
|
|
374
|
-
var _collectionFetcher = require("./client/collection-fetcher");
|
|
375
362
|
var _mediaClient = require("./client/media-client");
|
|
376
363
|
var _stargateClient = require("./client/stargate-client");
|
|
377
364
|
var _isImageRemote = require("./utils/isImageRemote");
|