@atlaskit/editor-synced-block-provider 6.6.9 → 6.6.11
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 +15 -0
- package/dist/cjs/clients/block-service/blockService.js +107 -107
- package/dist/cjs/clients/confluence/fetchMediaToken.js +21 -21
- package/dist/cjs/clients/confluence/sourceInfo.js +24 -24
- package/dist/cjs/clients/jira/fetchMediaToken.js +21 -21
- package/dist/cjs/clients/jira/sourceInfo.js +24 -24
- package/dist/cjs/hooks/useFetchSyncBlockData.js +18 -18
- package/dist/cjs/providers/block-service/blockServiceAPI.js +322 -321
- package/dist/cjs/providers/syncBlockProvider.js +49 -48
- package/dist/cjs/store-manager/referenceSyncBlockStoreManager.js +75 -75
- package/dist/cjs/store-manager/sourceSyncBlockStoreManager.js +77 -78
- package/dist/cjs/store-manager/syncBlockStoreManager.js +41 -41
- package/dist/cjs/store-manager/syncBlockSubscriptionManager.js +7 -18
- package/dist/cjs/utils/resourceId.js +2 -1
- package/dist/cjs/utils/retry.js +8 -8
- package/dist/cjs/utils/utils.js +4 -3
- package/dist/es2019/store-manager/referenceSyncBlockStoreManager.js +1 -1
- package/dist/es2019/store-manager/sourceSyncBlockStoreManager.js +1 -2
- package/dist/es2019/store-manager/syncBlockSubscriptionManager.js +7 -18
- package/dist/es2019/utils/utils.js +1 -2
- package/dist/esm/clients/block-service/blockService.js +107 -107
- package/dist/esm/clients/confluence/fetchMediaToken.js +21 -21
- package/dist/esm/clients/confluence/sourceInfo.js +24 -24
- package/dist/esm/clients/jira/fetchMediaToken.js +21 -21
- package/dist/esm/clients/jira/sourceInfo.js +24 -24
- package/dist/esm/hooks/useFetchSyncBlockData.js +18 -18
- package/dist/esm/providers/block-service/blockServiceAPI.js +321 -320
- package/dist/esm/providers/syncBlockProvider.js +49 -48
- package/dist/esm/store-manager/referenceSyncBlockStoreManager.js +75 -75
- package/dist/esm/store-manager/sourceSyncBlockStoreManager.js +77 -78
- package/dist/esm/store-manager/syncBlockStoreManager.js +41 -41
- package/dist/esm/store-manager/syncBlockSubscriptionManager.js +7 -18
- package/dist/esm/utils/resourceId.js +2 -1
- package/dist/esm/utils/retry.js +8 -8
- package/dist/esm/utils/utils.js +1 -2
- package/package.json +5 -8
|
@@ -20,7 +20,7 @@ var _types = require("../../common/types");
|
|
|
20
20
|
var _errorHandling = require("../../utils/errorHandling");
|
|
21
21
|
var _resourceId2 = require("../../utils/resourceId");
|
|
22
22
|
var _utils = require("../../utils/utils");
|
|
23
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var
|
|
23
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t19 in e) "default" !== _t19 && {}.hasOwnProperty.call(e, _t19) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t19)) && (i.get || i.set) ? o(f, _t19, i) : f[_t19] = e[_t19]); return f; })(e, t); }
|
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
26
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -127,28 +127,28 @@ var convertToSyncBlockData = exports.convertToSyncBlockData = function convertTo
|
|
|
127
127
|
};
|
|
128
128
|
var fetchReferences = exports.fetchReferences = /*#__PURE__*/function () {
|
|
129
129
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(documentAri) {
|
|
130
|
-
var response, _ref2, blocks, errors, blocksInstances, errorInstances;
|
|
131
|
-
return _regenerator.default.wrap(function
|
|
130
|
+
var response, _ref2, blocks, errors, blocksInstances, errorInstances, _t;
|
|
131
|
+
return _regenerator.default.wrap(function (_context) {
|
|
132
132
|
while (1) switch (_context.prev = _context.next) {
|
|
133
133
|
case 0:
|
|
134
134
|
_context.prev = 0;
|
|
135
|
-
_context.next =
|
|
135
|
+
_context.next = 1;
|
|
136
136
|
return (0, _blockService.getReferenceSyncedBlocks)(documentAri);
|
|
137
|
-
case
|
|
137
|
+
case 1:
|
|
138
138
|
response = _context.sent;
|
|
139
|
-
_context.next =
|
|
139
|
+
_context.next = 4;
|
|
140
140
|
break;
|
|
141
|
-
case
|
|
142
|
-
_context.prev =
|
|
143
|
-
|
|
144
|
-
if (!(
|
|
145
|
-
_context.next =
|
|
141
|
+
case 2:
|
|
142
|
+
_context.prev = 2;
|
|
143
|
+
_t = _context["catch"](0);
|
|
144
|
+
if (!(_t instanceof _blockService.BlockError)) {
|
|
145
|
+
_context.next = 3;
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
|
-
return _context.abrupt("return", mapBlockError(
|
|
149
|
-
case
|
|
148
|
+
return _context.abrupt("return", mapBlockError(_t));
|
|
149
|
+
case 3:
|
|
150
150
|
return _context.abrupt("return", _types.SyncBlockError.Errored);
|
|
151
|
-
case
|
|
151
|
+
case 4:
|
|
152
152
|
_ref2 = response || {}, blocks = _ref2.blocks, errors = _ref2.errors;
|
|
153
153
|
blocksInstances = (blocks || []).map(function (blockContentResponse) {
|
|
154
154
|
try {
|
|
@@ -185,11 +185,11 @@ var fetchReferences = exports.fetchReferences = /*#__PURE__*/function () {
|
|
|
185
185
|
};
|
|
186
186
|
});
|
|
187
187
|
return _context.abrupt("return", [].concat((0, _toConsumableArray2.default)(blocksInstances), (0, _toConsumableArray2.default)(errorInstances)));
|
|
188
|
-
case
|
|
188
|
+
case 5:
|
|
189
189
|
case "end":
|
|
190
190
|
return _context.stop();
|
|
191
191
|
}
|
|
192
|
-
}, _callee, null, [[0,
|
|
192
|
+
}, _callee, null, [[0, 2]]);
|
|
193
193
|
}));
|
|
194
194
|
return function fetchReferences(_x) {
|
|
195
195
|
return _ref.apply(this, arguments);
|
|
@@ -215,8 +215,8 @@ var extractResourceIdFromBlockAri = exports.extractResourceIdFromBlockAri = func
|
|
|
215
215
|
*/
|
|
216
216
|
var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
217
217
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(cloudId, parentAri, blockNodeIdentifiers, config) {
|
|
218
|
-
var blockIdentifiers, validResourceIds, processedResourceIds, response, results, _iterator, _step, blockContentResponse, resourceId, content, deletionReason, sourceAri, blockAri, contentUpdatedAt, blockInstanceId, product, status, syncedBlockData, _iterator2, _step2, errorResponse, _resourceId, _iterator3, _step3, blockNodeIdentifier;
|
|
219
|
-
return _regenerator.default.wrap(function
|
|
218
|
+
var blockIdentifiers, validResourceIds, processedResourceIds, response, results, _iterator, _step, blockContentResponse, resourceId, content, deletionReason, sourceAri, blockAri, contentUpdatedAt, blockInstanceId, product, status, syncedBlockData, _iterator2, _step2, errorResponse, _resourceId, _iterator3, _step3, blockNodeIdentifier, _t2, _t3, _t4;
|
|
219
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
220
220
|
while (1) switch (_context2.prev = _context2.next) {
|
|
221
221
|
case 0:
|
|
222
222
|
blockIdentifiers = blockNodeIdentifiers.map(function (blockIdentifier) {
|
|
@@ -233,7 +233,7 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
233
233
|
})); // Track which resourceIds have been processed
|
|
234
234
|
processedResourceIds = new Set();
|
|
235
235
|
if (parentAri) {
|
|
236
|
-
_context2.next =
|
|
236
|
+
_context2.next = 1;
|
|
237
237
|
break;
|
|
238
238
|
}
|
|
239
239
|
return _context2.abrupt("return", blockNodeIdentifiers.map(function (blockNodeIdentifier) {
|
|
@@ -244,41 +244,41 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
244
244
|
resourceId: blockNodeIdentifier.resourceId
|
|
245
245
|
};
|
|
246
246
|
}));
|
|
247
|
-
case
|
|
248
|
-
_context2.prev =
|
|
249
|
-
_context2.next =
|
|
247
|
+
case 1:
|
|
248
|
+
_context2.prev = 1;
|
|
249
|
+
_context2.next = 2;
|
|
250
250
|
return (0, _blockService.batchRetrieveSyncedBlocks)({
|
|
251
251
|
blockIdentifiers: blockIdentifiers,
|
|
252
252
|
config: config
|
|
253
253
|
});
|
|
254
|
-
case
|
|
254
|
+
case 2:
|
|
255
255
|
response = _context2.sent;
|
|
256
256
|
results = []; // Process successful blocks
|
|
257
257
|
if (!response.success) {
|
|
258
|
-
_context2.next =
|
|
258
|
+
_context2.next = 11;
|
|
259
259
|
break;
|
|
260
260
|
}
|
|
261
261
|
_iterator = _createForOfIteratorHelper(response.success);
|
|
262
|
-
_context2.prev =
|
|
262
|
+
_context2.prev = 3;
|
|
263
263
|
_iterator.s();
|
|
264
|
-
case
|
|
264
|
+
case 4:
|
|
265
265
|
if ((_step = _iterator.n()).done) {
|
|
266
|
-
_context2.next =
|
|
266
|
+
_context2.next = 8;
|
|
267
267
|
break;
|
|
268
268
|
}
|
|
269
269
|
blockContentResponse = _step.value;
|
|
270
270
|
// Extract resourceId from the returned blockAri
|
|
271
271
|
resourceId = extractResourceIdFromBlockAri(blockContentResponse.blockAri);
|
|
272
272
|
if (!(!resourceId || !validResourceIds.has(resourceId))) {
|
|
273
|
-
_context2.next =
|
|
273
|
+
_context2.next = 5;
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
276
|
-
return _context2.abrupt("continue",
|
|
277
|
-
case
|
|
276
|
+
return _context2.abrupt("continue", 7);
|
|
277
|
+
case 5:
|
|
278
278
|
processedResourceIds.add(resourceId);
|
|
279
279
|
content = blockContentResponse.content, deletionReason = blockContentResponse.deletionReason, sourceAri = blockContentResponse.sourceAri, blockAri = blockContentResponse.blockAri, contentUpdatedAt = blockContentResponse.contentUpdatedAt, blockInstanceId = blockContentResponse.blockInstanceId, product = blockContentResponse.product, status = blockContentResponse.status;
|
|
280
280
|
if (content) {
|
|
281
|
-
_context2.next =
|
|
281
|
+
_context2.next = 6;
|
|
282
282
|
break;
|
|
283
283
|
}
|
|
284
284
|
results.push({
|
|
@@ -289,8 +289,8 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
289
289
|
},
|
|
290
290
|
resourceId: resourceId
|
|
291
291
|
});
|
|
292
|
-
return _context2.abrupt("continue",
|
|
293
|
-
case
|
|
292
|
+
return _context2.abrupt("continue", 7);
|
|
293
|
+
case 6:
|
|
294
294
|
try {
|
|
295
295
|
syncedBlockData = JSON.parse(content);
|
|
296
296
|
results.push({
|
|
@@ -315,42 +315,42 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
315
315
|
resourceId: resourceId
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
case
|
|
319
|
-
_context2.next =
|
|
318
|
+
case 7:
|
|
319
|
+
_context2.next = 4;
|
|
320
320
|
break;
|
|
321
|
-
case
|
|
322
|
-
_context2.next =
|
|
321
|
+
case 8:
|
|
322
|
+
_context2.next = 10;
|
|
323
323
|
break;
|
|
324
|
-
case
|
|
325
|
-
_context2.prev =
|
|
326
|
-
|
|
327
|
-
_iterator.e(
|
|
328
|
-
case
|
|
329
|
-
_context2.prev =
|
|
324
|
+
case 9:
|
|
325
|
+
_context2.prev = 9;
|
|
326
|
+
_t2 = _context2["catch"](3);
|
|
327
|
+
_iterator.e(_t2);
|
|
328
|
+
case 10:
|
|
329
|
+
_context2.prev = 10;
|
|
330
330
|
_iterator.f();
|
|
331
|
-
return _context2.finish(
|
|
332
|
-
case
|
|
331
|
+
return _context2.finish(10);
|
|
332
|
+
case 11:
|
|
333
333
|
if (!response.error) {
|
|
334
|
-
_context2.next =
|
|
334
|
+
_context2.next = 19;
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
337
|
_iterator2 = _createForOfIteratorHelper(response.error);
|
|
338
|
-
_context2.prev =
|
|
338
|
+
_context2.prev = 12;
|
|
339
339
|
_iterator2.s();
|
|
340
|
-
case
|
|
340
|
+
case 13:
|
|
341
341
|
if ((_step2 = _iterator2.n()).done) {
|
|
342
|
-
_context2.next =
|
|
342
|
+
_context2.next = 16;
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
345
|
errorResponse = _step2.value;
|
|
346
346
|
// Extract resourceId from the returned blockAri
|
|
347
347
|
_resourceId = extractResourceIdFromBlockAri(errorResponse.blockAri);
|
|
348
348
|
if (!(!_resourceId || !validResourceIds.has(_resourceId))) {
|
|
349
|
-
_context2.next =
|
|
349
|
+
_context2.next = 14;
|
|
350
350
|
break;
|
|
351
351
|
}
|
|
352
|
-
return _context2.abrupt("continue",
|
|
353
|
-
case
|
|
352
|
+
return _context2.abrupt("continue", 15);
|
|
353
|
+
case 14:
|
|
354
354
|
processedResourceIds.add(_resourceId);
|
|
355
355
|
results.push({
|
|
356
356
|
error: {
|
|
@@ -359,21 +359,21 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
359
359
|
},
|
|
360
360
|
resourceId: _resourceId
|
|
361
361
|
});
|
|
362
|
-
case
|
|
363
|
-
_context2.next =
|
|
362
|
+
case 15:
|
|
363
|
+
_context2.next = 13;
|
|
364
364
|
break;
|
|
365
|
-
case
|
|
366
|
-
_context2.next =
|
|
365
|
+
case 16:
|
|
366
|
+
_context2.next = 18;
|
|
367
367
|
break;
|
|
368
|
-
case
|
|
369
|
-
_context2.prev =
|
|
370
|
-
|
|
371
|
-
_iterator2.e(
|
|
372
|
-
case
|
|
373
|
-
_context2.prev =
|
|
368
|
+
case 17:
|
|
369
|
+
_context2.prev = 17;
|
|
370
|
+
_t3 = _context2["catch"](12);
|
|
371
|
+
_iterator2.e(_t3);
|
|
372
|
+
case 18:
|
|
373
|
+
_context2.prev = 18;
|
|
374
374
|
_iterator2.f();
|
|
375
|
-
return _context2.finish(
|
|
376
|
-
case
|
|
375
|
+
return _context2.finish(18);
|
|
376
|
+
case 19:
|
|
377
377
|
// Ensure all resourceIds have a result - return NotFound for any missing ones
|
|
378
378
|
_iterator3 = _createForOfIteratorHelper(blockNodeIdentifiers);
|
|
379
379
|
try {
|
|
@@ -394,37 +394,37 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
394
394
|
_iterator3.f();
|
|
395
395
|
}
|
|
396
396
|
return _context2.abrupt("return", results);
|
|
397
|
-
case
|
|
398
|
-
_context2.prev =
|
|
399
|
-
|
|
400
|
-
if (!(
|
|
401
|
-
_context2.next =
|
|
397
|
+
case 20:
|
|
398
|
+
_context2.prev = 20;
|
|
399
|
+
_t4 = _context2["catch"](1);
|
|
400
|
+
if (!(_t4 instanceof _blockService.BlockTimeoutError && (0, _expValEquals.expValEquals)('platform_editor_sync_block_ssr_config', 'isEnabled', true))) {
|
|
401
|
+
_context2.next = 21;
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
404
|
return _context2.abrupt("return", blockNodeIdentifiers.map(function (blockNodeIdentifier) {
|
|
405
405
|
return {
|
|
406
406
|
error: {
|
|
407
407
|
type: _types.SyncBlockError.Aborted,
|
|
408
|
-
reason:
|
|
408
|
+
reason: _t4.message
|
|
409
409
|
},
|
|
410
410
|
resourceId: blockNodeIdentifier.resourceId
|
|
411
411
|
};
|
|
412
412
|
}));
|
|
413
|
-
case
|
|
413
|
+
case 21:
|
|
414
414
|
return _context2.abrupt("return", blockNodeIdentifiers.map(function (blockNodeIdentifier) {
|
|
415
415
|
return {
|
|
416
416
|
error: {
|
|
417
|
-
type:
|
|
418
|
-
reason:
|
|
417
|
+
type: _t4 instanceof _blockService.BlockError ? mapBlockError(_t4) : _types.SyncBlockError.Errored,
|
|
418
|
+
reason: _t4.message
|
|
419
419
|
},
|
|
420
420
|
resourceId: blockNodeIdentifier.resourceId
|
|
421
421
|
};
|
|
422
422
|
}));
|
|
423
|
-
case
|
|
423
|
+
case 22:
|
|
424
424
|
case "end":
|
|
425
425
|
return _context2.stop();
|
|
426
426
|
}
|
|
427
|
-
}, _callee2, null, [[
|
|
427
|
+
}, _callee2, null, [[1, 20], [3, 9, 10, 11], [12, 17, 18, 19]]);
|
|
428
428
|
}));
|
|
429
429
|
return function batchFetchData(_x2, _x3, _x4, _x5) {
|
|
430
430
|
return _ref3.apply(this, arguments);
|
|
@@ -443,12 +443,12 @@ var _batchFetchData = exports.batchFetchData = /*#__PURE__*/function () {
|
|
|
443
443
|
*/
|
|
444
444
|
var writeDataBatch = exports.writeDataBatch = /*#__PURE__*/function () {
|
|
445
445
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(cloudId, parentAri, parentId, product, data, stepVersion) {
|
|
446
|
-
var blockAriToResourceIdMap, blocks, response, results, successResourceIds, _iterator4, _step4, block, errorResourceIds, _iterator5, _step5, _loop;
|
|
447
|
-
return _regenerator.default.wrap(function
|
|
446
|
+
var blockAriToResourceIdMap, blocks, response, results, successResourceIds, _iterator4, _step4, block, errorResourceIds, _iterator5, _step5, _loop, _t5, _t6;
|
|
447
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
448
448
|
while (1) switch (_context4.prev = _context4.next) {
|
|
449
449
|
case 0:
|
|
450
450
|
if (!(!parentAri || !parentId)) {
|
|
451
|
-
_context4.next =
|
|
451
|
+
_context4.next = 1;
|
|
452
452
|
break;
|
|
453
453
|
}
|
|
454
454
|
return _context4.abrupt("return", data.map(function (block) {
|
|
@@ -457,8 +457,8 @@ var writeDataBatch = exports.writeDataBatch = /*#__PURE__*/function () {
|
|
|
457
457
|
resourceId: block.resourceId
|
|
458
458
|
};
|
|
459
459
|
}));
|
|
460
|
-
case
|
|
461
|
-
_context4.prev =
|
|
460
|
+
case 1:
|
|
461
|
+
_context4.prev = 1;
|
|
462
462
|
// Create a map from blockAri to original resourceId for matching responses
|
|
463
463
|
blockAriToResourceIdMap = new Map();
|
|
464
464
|
blocks = data.map(function (block) {
|
|
@@ -476,11 +476,11 @@ var writeDataBatch = exports.writeDataBatch = /*#__PURE__*/function () {
|
|
|
476
476
|
stepVersion: stepVersion
|
|
477
477
|
};
|
|
478
478
|
});
|
|
479
|
-
_context4.next =
|
|
479
|
+
_context4.next = 2;
|
|
480
480
|
return (0, _blockService.updateSyncedBlocks)({
|
|
481
481
|
blocks: blocks
|
|
482
482
|
});
|
|
483
|
-
case
|
|
483
|
+
case 2:
|
|
484
484
|
response = _context4.sent;
|
|
485
485
|
results = []; // Process successful updates
|
|
486
486
|
if (response.success) {
|
|
@@ -504,7 +504,7 @@ var writeDataBatch = exports.writeDataBatch = /*#__PURE__*/function () {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
if (!response.error) {
|
|
507
|
-
_context4.next =
|
|
507
|
+
_context4.next = 9;
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
errorResourceIds = new Map(response.error.map(function (err) {
|
|
@@ -513,10 +513,10 @@ var writeDataBatch = exports.writeDataBatch = /*#__PURE__*/function () {
|
|
|
513
513
|
blockAriToResourceIdMap.get(err.blockAri) || '', mapErrorResponseCode(err.code)];
|
|
514
514
|
}));
|
|
515
515
|
_iterator5 = _createForOfIteratorHelper(data);
|
|
516
|
-
_context4.prev =
|
|
516
|
+
_context4.prev = 3;
|
|
517
517
|
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
518
518
|
var block, error;
|
|
519
|
-
return _regenerator.default.wrap(function
|
|
519
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
520
520
|
while (1) switch (_context3.prev = _context3.next) {
|
|
521
521
|
case 0:
|
|
522
522
|
block = _step5.value;
|
|
@@ -535,60 +535,60 @@ var writeDataBatch = exports.writeDataBatch = /*#__PURE__*/function () {
|
|
|
535
535
|
resourceId: block.resourceId
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
|
-
case
|
|
538
|
+
case 1:
|
|
539
539
|
case "end":
|
|
540
540
|
return _context3.stop();
|
|
541
541
|
}
|
|
542
542
|
}, _loop);
|
|
543
543
|
});
|
|
544
544
|
_iterator5.s();
|
|
545
|
-
case
|
|
545
|
+
case 4:
|
|
546
546
|
if ((_step5 = _iterator5.n()).done) {
|
|
547
|
-
_context4.next =
|
|
547
|
+
_context4.next = 6;
|
|
548
548
|
break;
|
|
549
549
|
}
|
|
550
|
-
return _context4.delegateYield(_loop(), "t0",
|
|
551
|
-
case
|
|
552
|
-
_context4.next =
|
|
550
|
+
return _context4.delegateYield(_loop(), "t0", 5);
|
|
551
|
+
case 5:
|
|
552
|
+
_context4.next = 4;
|
|
553
553
|
break;
|
|
554
|
-
case
|
|
555
|
-
_context4.next =
|
|
554
|
+
case 6:
|
|
555
|
+
_context4.next = 8;
|
|
556
556
|
break;
|
|
557
|
-
case
|
|
558
|
-
_context4.prev =
|
|
559
|
-
|
|
560
|
-
_iterator5.e(
|
|
561
|
-
case
|
|
562
|
-
_context4.prev =
|
|
557
|
+
case 7:
|
|
558
|
+
_context4.prev = 7;
|
|
559
|
+
_t5 = _context4["catch"](3);
|
|
560
|
+
_iterator5.e(_t5);
|
|
561
|
+
case 8:
|
|
562
|
+
_context4.prev = 8;
|
|
563
563
|
_iterator5.f();
|
|
564
|
-
return _context4.finish(
|
|
565
|
-
case
|
|
564
|
+
return _context4.finish(8);
|
|
565
|
+
case 9:
|
|
566
566
|
return _context4.abrupt("return", results);
|
|
567
|
-
case
|
|
568
|
-
_context4.prev =
|
|
569
|
-
|
|
570
|
-
if (!(
|
|
571
|
-
_context4.next =
|
|
567
|
+
case 10:
|
|
568
|
+
_context4.prev = 10;
|
|
569
|
+
_t6 = _context4["catch"](1);
|
|
570
|
+
if (!(_t6 instanceof _blockService.BlockError)) {
|
|
571
|
+
_context4.next = 11;
|
|
572
572
|
break;
|
|
573
573
|
}
|
|
574
574
|
return _context4.abrupt("return", data.map(function (block) {
|
|
575
575
|
return {
|
|
576
|
-
error: mapBlockError(
|
|
576
|
+
error: mapBlockError(_t6),
|
|
577
577
|
resourceId: block.resourceId
|
|
578
578
|
};
|
|
579
579
|
}));
|
|
580
|
-
case
|
|
580
|
+
case 11:
|
|
581
581
|
return _context4.abrupt("return", data.map(function (block) {
|
|
582
582
|
return {
|
|
583
|
-
error: (0, _errorHandling.stringifyError)(
|
|
583
|
+
error: (0, _errorHandling.stringifyError)(_t6),
|
|
584
584
|
resourceId: block.resourceId
|
|
585
585
|
};
|
|
586
586
|
}));
|
|
587
|
-
case
|
|
587
|
+
case 12:
|
|
588
588
|
case "end":
|
|
589
589
|
return _context4.stop();
|
|
590
590
|
}
|
|
591
|
-
}, _callee3, null, [[
|
|
591
|
+
}, _callee3, null, [[1, 10], [3, 7, 8, 9]]);
|
|
592
592
|
}));
|
|
593
593
|
return function writeDataBatch(_x6, _x7, _x8, _x9, _x0, _x1) {
|
|
594
594
|
return _ref4.apply(this, arguments);
|
|
@@ -612,8 +612,8 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
612
612
|
key: "fetchData",
|
|
613
613
|
value: function () {
|
|
614
614
|
var _fetchData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(resourceId) {
|
|
615
|
-
var blockAri, blockContentResponse, content, sourceAri, deletionReason, blockInstanceId, contentUpdatedAt, product, status, syncedBlockData;
|
|
616
|
-
return _regenerator.default.wrap(function
|
|
615
|
+
var blockAri, blockContentResponse, content, sourceAri, deletionReason, blockInstanceId, contentUpdatedAt, product, status, syncedBlockData, _t7;
|
|
616
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
617
617
|
while (1) switch (_context5.prev = _context5.next) {
|
|
618
618
|
case 0:
|
|
619
619
|
blockAri = (0, _ari.generateBlockAriFromReference)({
|
|
@@ -621,15 +621,15 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
621
621
|
resourceId: resourceId
|
|
622
622
|
});
|
|
623
623
|
_context5.prev = 1;
|
|
624
|
-
_context5.next =
|
|
624
|
+
_context5.next = 2;
|
|
625
625
|
return (0, _blockService.getSyncedBlockContent)({
|
|
626
626
|
blockAri: blockAri
|
|
627
627
|
});
|
|
628
|
-
case
|
|
628
|
+
case 2:
|
|
629
629
|
blockContentResponse = _context5.sent;
|
|
630
630
|
content = blockContentResponse.content, sourceAri = blockContentResponse.sourceAri, deletionReason = blockContentResponse.deletionReason, blockInstanceId = blockContentResponse.blockInstanceId, contentUpdatedAt = blockContentResponse.contentUpdatedAt, product = blockContentResponse.product, status = blockContentResponse.status;
|
|
631
631
|
if (content) {
|
|
632
|
-
_context5.next =
|
|
632
|
+
_context5.next = 3;
|
|
633
633
|
break;
|
|
634
634
|
}
|
|
635
635
|
return _context5.abrupt("return", {
|
|
@@ -640,7 +640,7 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
640
640
|
},
|
|
641
641
|
resourceId: resourceId
|
|
642
642
|
});
|
|
643
|
-
case
|
|
643
|
+
case 3:
|
|
644
644
|
// Parse the synced block content from the response's content
|
|
645
645
|
syncedBlockData = JSON.parse(content);
|
|
646
646
|
return _context5.abrupt("return", {
|
|
@@ -657,33 +657,33 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
657
657
|
},
|
|
658
658
|
resourceId: resourceId
|
|
659
659
|
});
|
|
660
|
-
case
|
|
661
|
-
_context5.prev =
|
|
662
|
-
|
|
663
|
-
if (!(
|
|
664
|
-
_context5.next =
|
|
660
|
+
case 4:
|
|
661
|
+
_context5.prev = 4;
|
|
662
|
+
_t7 = _context5["catch"](1);
|
|
663
|
+
if (!(_t7 instanceof _blockService.BlockError)) {
|
|
664
|
+
_context5.next = 5;
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
667
667
|
return _context5.abrupt("return", {
|
|
668
668
|
error: {
|
|
669
|
-
type: mapBlockError(
|
|
670
|
-
reason:
|
|
669
|
+
type: mapBlockError(_t7),
|
|
670
|
+
reason: _t7.message
|
|
671
671
|
},
|
|
672
672
|
resourceId: resourceId
|
|
673
673
|
});
|
|
674
|
-
case
|
|
674
|
+
case 5:
|
|
675
675
|
return _context5.abrupt("return", {
|
|
676
676
|
error: {
|
|
677
677
|
type: _types.SyncBlockError.Errored,
|
|
678
|
-
reason:
|
|
678
|
+
reason: _t7.message
|
|
679
679
|
},
|
|
680
680
|
resourceId: resourceId
|
|
681
681
|
});
|
|
682
|
-
case
|
|
682
|
+
case 6:
|
|
683
683
|
case "end":
|
|
684
684
|
return _context5.stop();
|
|
685
685
|
}
|
|
686
|
-
}, _callee4, this, [[1,
|
|
686
|
+
}, _callee4, this, [[1, 4]]);
|
|
687
687
|
}));
|
|
688
688
|
function fetchData(_x10) {
|
|
689
689
|
return _fetchData.apply(this, arguments);
|
|
@@ -695,8 +695,8 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
695
695
|
value: function () {
|
|
696
696
|
var _fetchReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(referenceResourceId) {
|
|
697
697
|
var _this = this;
|
|
698
|
-
var blockAri, response, references;
|
|
699
|
-
return _regenerator.default.wrap(function
|
|
698
|
+
var blockAri, response, references, _t8;
|
|
699
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
700
700
|
while (1) switch (_context6.prev = _context6.next) {
|
|
701
701
|
case 0:
|
|
702
702
|
_context6.prev = 0;
|
|
@@ -704,11 +704,11 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
704
704
|
cloudId: this.cloudId,
|
|
705
705
|
resourceId: referenceResourceId
|
|
706
706
|
});
|
|
707
|
-
_context6.next =
|
|
707
|
+
_context6.next = 1;
|
|
708
708
|
return (0, _blockService.getReferenceSyncedBlocksByBlockAri)({
|
|
709
709
|
blockAri: blockAri
|
|
710
710
|
});
|
|
711
|
-
case
|
|
711
|
+
case 1:
|
|
712
712
|
response = _context6.sent;
|
|
713
713
|
references = [];
|
|
714
714
|
response.references.forEach(function (reference) {
|
|
@@ -730,25 +730,25 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
730
730
|
return _context6.abrupt("return", {
|
|
731
731
|
references: references
|
|
732
732
|
});
|
|
733
|
-
case
|
|
734
|
-
_context6.prev =
|
|
735
|
-
|
|
736
|
-
if (!(
|
|
737
|
-
_context6.next =
|
|
733
|
+
case 2:
|
|
734
|
+
_context6.prev = 2;
|
|
735
|
+
_t8 = _context6["catch"](0);
|
|
736
|
+
if (!(_t8 instanceof _blockService.BlockError)) {
|
|
737
|
+
_context6.next = 3;
|
|
738
738
|
break;
|
|
739
739
|
}
|
|
740
740
|
return _context6.abrupt("return", {
|
|
741
|
-
error: mapBlockError(
|
|
741
|
+
error: mapBlockError(_t8)
|
|
742
742
|
});
|
|
743
|
-
case
|
|
743
|
+
case 3:
|
|
744
744
|
return _context6.abrupt("return", {
|
|
745
745
|
error: _types.SyncBlockError.Errored
|
|
746
746
|
});
|
|
747
|
-
case
|
|
747
|
+
case 4:
|
|
748
748
|
case "end":
|
|
749
749
|
return _context6.stop();
|
|
750
750
|
}
|
|
751
|
-
}, _callee5, this, [[0,
|
|
751
|
+
}, _callee5, this, [[0, 2]]);
|
|
752
752
|
}));
|
|
753
753
|
function fetchReferences(_x11) {
|
|
754
754
|
return _fetchReferences.apply(this, arguments);
|
|
@@ -765,14 +765,14 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
|
|
|
765
765
|
key: "batchFetchData",
|
|
766
766
|
value: (function () {
|
|
767
767
|
var _batchFetchData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(blockNodeIdentifiers, config) {
|
|
768
|
-
return _regenerator.default.wrap(function
|
|
768
|
+
return _regenerator.default.wrap(function (_context7) {
|
|
769
769
|
while (1) switch (_context7.prev = _context7.next) {
|
|
770
770
|
case 0:
|
|
771
|
-
_context7.next =
|
|
771
|
+
_context7.next = 1;
|
|
772
772
|
return _batchFetchData(this.cloudId, this.parentAri, blockNodeIdentifiers, config);
|
|
773
|
-
case
|
|
773
|
+
case 1:
|
|
774
774
|
return _context7.abrupt("return", _context7.sent);
|
|
775
|
-
case
|
|
775
|
+
case 2:
|
|
776
776
|
case "end":
|
|
777
777
|
return _context7.stop();
|
|
778
778
|
}
|
|
@@ -867,18 +867,18 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
867
867
|
key: "writeData",
|
|
868
868
|
value: function () {
|
|
869
869
|
var _writeData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data) {
|
|
870
|
-
var resourceId, blockAri, stepVersion, status;
|
|
871
|
-
return _regenerator.default.wrap(function
|
|
870
|
+
var resourceId, blockAri, stepVersion, status, _t9, _t0;
|
|
871
|
+
return _regenerator.default.wrap(function (_context8) {
|
|
872
872
|
while (1) switch (_context8.prev = _context8.next) {
|
|
873
873
|
case 0:
|
|
874
874
|
if (!(!this.parentAri || !this.parentId)) {
|
|
875
|
-
_context8.next =
|
|
875
|
+
_context8.next = 1;
|
|
876
876
|
break;
|
|
877
877
|
}
|
|
878
878
|
return _context8.abrupt("return", {
|
|
879
879
|
error: _types.SyncBlockError.Errored
|
|
880
880
|
});
|
|
881
|
-
case
|
|
881
|
+
case 1:
|
|
882
882
|
resourceId = data.resourceId;
|
|
883
883
|
blockAri = (0, _ari.generateBlockAri)({
|
|
884
884
|
cloudId: this.cloudId,
|
|
@@ -887,53 +887,53 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
887
887
|
resourceId: resourceId
|
|
888
888
|
});
|
|
889
889
|
if (!this.getVersion) {
|
|
890
|
-
_context8.next =
|
|
890
|
+
_context8.next = 3;
|
|
891
891
|
break;
|
|
892
892
|
}
|
|
893
|
-
_context8.next =
|
|
893
|
+
_context8.next = 2;
|
|
894
894
|
return this.getVersion();
|
|
895
|
-
case
|
|
896
|
-
|
|
897
|
-
_context8.next =
|
|
895
|
+
case 2:
|
|
896
|
+
_t9 = _context8.sent;
|
|
897
|
+
_context8.next = 4;
|
|
898
898
|
break;
|
|
899
|
-
case
|
|
900
|
-
|
|
901
|
-
case
|
|
902
|
-
stepVersion =
|
|
903
|
-
_context8.prev =
|
|
899
|
+
case 3:
|
|
900
|
+
_t9 = undefined;
|
|
901
|
+
case 4:
|
|
902
|
+
stepVersion = _t9;
|
|
903
|
+
_context8.prev = 5;
|
|
904
904
|
status = data.status;
|
|
905
|
-
_context8.next =
|
|
905
|
+
_context8.next = 6;
|
|
906
906
|
return (0, _blockService.updateSyncedBlock)({
|
|
907
907
|
blockAri: blockAri,
|
|
908
908
|
content: JSON.stringify(data.content),
|
|
909
909
|
stepVersion: stepVersion,
|
|
910
910
|
status: status
|
|
911
911
|
});
|
|
912
|
-
case
|
|
912
|
+
case 6:
|
|
913
913
|
return _context8.abrupt("return", {
|
|
914
914
|
resourceId: resourceId
|
|
915
915
|
});
|
|
916
|
-
case
|
|
917
|
-
_context8.prev =
|
|
918
|
-
|
|
919
|
-
if (!(
|
|
920
|
-
_context8.next =
|
|
916
|
+
case 7:
|
|
917
|
+
_context8.prev = 7;
|
|
918
|
+
_t0 = _context8["catch"](5);
|
|
919
|
+
if (!(_t0 instanceof _blockService.BlockError)) {
|
|
920
|
+
_context8.next = 8;
|
|
921
921
|
break;
|
|
922
922
|
}
|
|
923
923
|
return _context8.abrupt("return", {
|
|
924
|
-
error: mapBlockError(
|
|
924
|
+
error: mapBlockError(_t0),
|
|
925
925
|
resourceId: resourceId
|
|
926
926
|
});
|
|
927
|
-
case
|
|
927
|
+
case 8:
|
|
928
928
|
return _context8.abrupt("return", {
|
|
929
|
-
error: (0, _errorHandling.stringifyError)(
|
|
929
|
+
error: (0, _errorHandling.stringifyError)(_t0),
|
|
930
930
|
resourceId: resourceId
|
|
931
931
|
});
|
|
932
|
-
case
|
|
932
|
+
case 9:
|
|
933
933
|
case "end":
|
|
934
934
|
return _context8.stop();
|
|
935
935
|
}
|
|
936
|
-
}, _callee7, this, [[
|
|
936
|
+
}, _callee7, this, [[5, 7]]);
|
|
937
937
|
}));
|
|
938
938
|
function writeData(_x14) {
|
|
939
939
|
return _writeData.apply(this, arguments);
|
|
@@ -944,18 +944,18 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
944
944
|
key: "createData",
|
|
945
945
|
value: function () {
|
|
946
946
|
var _createData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(data) {
|
|
947
|
-
var resourceId, blockAri, stepVersion, status;
|
|
948
|
-
return _regenerator.default.wrap(function
|
|
947
|
+
var resourceId, blockAri, stepVersion, status, _t1, _t10;
|
|
948
|
+
return _regenerator.default.wrap(function (_context9) {
|
|
949
949
|
while (1) switch (_context9.prev = _context9.next) {
|
|
950
950
|
case 0:
|
|
951
951
|
if (!(!this.parentAri || !this.parentId)) {
|
|
952
|
-
_context9.next =
|
|
952
|
+
_context9.next = 1;
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
955
|
return _context9.abrupt("return", {
|
|
956
956
|
error: _types.SyncBlockError.Errored
|
|
957
957
|
});
|
|
958
|
-
case
|
|
958
|
+
case 1:
|
|
959
959
|
resourceId = data.resourceId;
|
|
960
960
|
blockAri = (0, _ari.generateBlockAri)({
|
|
961
961
|
cloudId: this.cloudId,
|
|
@@ -964,22 +964,22 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
964
964
|
resourceId: resourceId
|
|
965
965
|
});
|
|
966
966
|
if (!this.getVersion) {
|
|
967
|
-
_context9.next =
|
|
967
|
+
_context9.next = 3;
|
|
968
968
|
break;
|
|
969
969
|
}
|
|
970
|
-
_context9.next =
|
|
970
|
+
_context9.next = 2;
|
|
971
971
|
return this.getVersion();
|
|
972
|
-
case
|
|
973
|
-
|
|
974
|
-
_context9.next =
|
|
972
|
+
case 2:
|
|
973
|
+
_t1 = _context9.sent;
|
|
974
|
+
_context9.next = 4;
|
|
975
975
|
break;
|
|
976
|
-
case
|
|
977
|
-
|
|
978
|
-
case
|
|
979
|
-
stepVersion =
|
|
976
|
+
case 3:
|
|
977
|
+
_t1 = undefined;
|
|
978
|
+
case 4:
|
|
979
|
+
stepVersion = _t1;
|
|
980
980
|
status = 'unpublished';
|
|
981
|
-
_context9.prev =
|
|
982
|
-
_context9.next =
|
|
981
|
+
_context9.prev = 5;
|
|
982
|
+
_context9.next = 6;
|
|
983
983
|
return (0, _blockService.createSyncedBlock)({
|
|
984
984
|
blockAri: blockAri,
|
|
985
985
|
blockInstanceId: data.blockInstanceId,
|
|
@@ -989,31 +989,31 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
989
989
|
stepVersion: stepVersion,
|
|
990
990
|
status: status
|
|
991
991
|
});
|
|
992
|
-
case
|
|
992
|
+
case 6:
|
|
993
993
|
return _context9.abrupt("return", {
|
|
994
994
|
resourceId: resourceId
|
|
995
995
|
});
|
|
996
|
-
case
|
|
997
|
-
_context9.prev =
|
|
998
|
-
|
|
999
|
-
if (!(
|
|
1000
|
-
_context9.next =
|
|
996
|
+
case 7:
|
|
997
|
+
_context9.prev = 7;
|
|
998
|
+
_t10 = _context9["catch"](5);
|
|
999
|
+
if (!(_t10 instanceof _blockService.BlockError)) {
|
|
1000
|
+
_context9.next = 8;
|
|
1001
1001
|
break;
|
|
1002
1002
|
}
|
|
1003
1003
|
return _context9.abrupt("return", {
|
|
1004
|
-
error: mapBlockError(
|
|
1004
|
+
error: mapBlockError(_t10),
|
|
1005
1005
|
resourceId: resourceId
|
|
1006
1006
|
});
|
|
1007
|
-
case
|
|
1007
|
+
case 8:
|
|
1008
1008
|
return _context9.abrupt("return", {
|
|
1009
|
-
error: (0, _errorHandling.stringifyError)(
|
|
1009
|
+
error: (0, _errorHandling.stringifyError)(_t10),
|
|
1010
1010
|
resourceId: resourceId
|
|
1011
1011
|
});
|
|
1012
|
-
case
|
|
1012
|
+
case 9:
|
|
1013
1013
|
case "end":
|
|
1014
1014
|
return _context9.stop();
|
|
1015
1015
|
}
|
|
1016
|
-
}, _callee8, this, [[
|
|
1016
|
+
}, _callee8, this, [[5, 7]]);
|
|
1017
1017
|
}));
|
|
1018
1018
|
function createData(_x15) {
|
|
1019
1019
|
return _createData.apply(this, arguments);
|
|
@@ -1024,12 +1024,12 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1024
1024
|
key: "deleteData",
|
|
1025
1025
|
value: function () {
|
|
1026
1026
|
var _deleteData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(resourceId, deleteReason) {
|
|
1027
|
-
var blockAri;
|
|
1028
|
-
return _regenerator.default.wrap(function
|
|
1027
|
+
var blockAri, _t11;
|
|
1028
|
+
return _regenerator.default.wrap(function (_context0) {
|
|
1029
1029
|
while (1) switch (_context0.prev = _context0.next) {
|
|
1030
1030
|
case 0:
|
|
1031
1031
|
if (this.parentId) {
|
|
1032
|
-
_context0.next =
|
|
1032
|
+
_context0.next = 1;
|
|
1033
1033
|
break;
|
|
1034
1034
|
}
|
|
1035
1035
|
return _context0.abrupt("return", {
|
|
@@ -1037,30 +1037,30 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1037
1037
|
success: false,
|
|
1038
1038
|
error: _types.SyncBlockError.Errored
|
|
1039
1039
|
});
|
|
1040
|
-
case
|
|
1040
|
+
case 1:
|
|
1041
1041
|
blockAri = (0, _ari.generateBlockAri)({
|
|
1042
1042
|
cloudId: this.cloudId,
|
|
1043
1043
|
parentId: this.parentId,
|
|
1044
1044
|
product: this.product,
|
|
1045
1045
|
resourceId: resourceId
|
|
1046
1046
|
});
|
|
1047
|
-
_context0.prev =
|
|
1048
|
-
_context0.next =
|
|
1047
|
+
_context0.prev = 2;
|
|
1048
|
+
_context0.next = 3;
|
|
1049
1049
|
return (0, _blockService.deleteSyncedBlock)({
|
|
1050
1050
|
blockAri: blockAri,
|
|
1051
1051
|
deleteReason: deleteReason
|
|
1052
1052
|
});
|
|
1053
|
-
case
|
|
1053
|
+
case 3:
|
|
1054
1054
|
return _context0.abrupt("return", {
|
|
1055
1055
|
resourceId: resourceId,
|
|
1056
1056
|
success: true,
|
|
1057
1057
|
error: undefined
|
|
1058
1058
|
});
|
|
1059
|
-
case
|
|
1060
|
-
_context0.prev =
|
|
1061
|
-
|
|
1062
|
-
if (!(
|
|
1063
|
-
_context0.next =
|
|
1059
|
+
case 4:
|
|
1060
|
+
_context0.prev = 4;
|
|
1061
|
+
_t11 = _context0["catch"](2);
|
|
1062
|
+
if (!(_t11 instanceof _blockService.BlockNotFoundError && this.parentAri)) {
|
|
1063
|
+
_context0.next = 5;
|
|
1064
1064
|
break;
|
|
1065
1065
|
}
|
|
1066
1066
|
return _context0.abrupt("return", this.deleteOrphanBlock({
|
|
@@ -1069,36 +1069,36 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1069
1069
|
parentAri: this.parentAri,
|
|
1070
1070
|
deleteReason: deleteReason
|
|
1071
1071
|
}));
|
|
1072
|
-
case
|
|
1073
|
-
if (!(
|
|
1074
|
-
_context0.next =
|
|
1072
|
+
case 5:
|
|
1073
|
+
if (!(_t11 instanceof _blockService.BlockError)) {
|
|
1074
|
+
_context0.next = 7;
|
|
1075
1075
|
break;
|
|
1076
1076
|
}
|
|
1077
|
-
if (!(
|
|
1078
|
-
_context0.next =
|
|
1077
|
+
if (!(_t11.status === 404)) {
|
|
1078
|
+
_context0.next = 6;
|
|
1079
1079
|
break;
|
|
1080
1080
|
}
|
|
1081
1081
|
return _context0.abrupt("return", {
|
|
1082
1082
|
resourceId: resourceId,
|
|
1083
1083
|
success: true
|
|
1084
1084
|
});
|
|
1085
|
-
case
|
|
1085
|
+
case 6:
|
|
1086
1086
|
return _context0.abrupt("return", {
|
|
1087
1087
|
resourceId: resourceId,
|
|
1088
1088
|
success: false,
|
|
1089
|
-
error: mapBlockError(
|
|
1089
|
+
error: mapBlockError(_t11)
|
|
1090
1090
|
});
|
|
1091
|
-
case
|
|
1091
|
+
case 7:
|
|
1092
1092
|
return _context0.abrupt("return", {
|
|
1093
1093
|
resourceId: resourceId,
|
|
1094
1094
|
success: false,
|
|
1095
|
-
error: (0, _errorHandling.stringifyError)(
|
|
1095
|
+
error: (0, _errorHandling.stringifyError)(_t11)
|
|
1096
1096
|
});
|
|
1097
|
-
case
|
|
1097
|
+
case 8:
|
|
1098
1098
|
case "end":
|
|
1099
1099
|
return _context0.stop();
|
|
1100
1100
|
}
|
|
1101
|
-
}, _callee9, this, [[
|
|
1101
|
+
}, _callee9, this, [[2, 4]]);
|
|
1102
1102
|
}));
|
|
1103
1103
|
function deleteData(_x16, _x17) {
|
|
1104
1104
|
return _deleteData.apply(this, arguments);
|
|
@@ -1111,28 +1111,28 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1111
1111
|
key: "deleteOrphanBlock",
|
|
1112
1112
|
value: function () {
|
|
1113
1113
|
var _deleteOrphanBlock = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee0(_ref8) {
|
|
1114
|
-
var blockAri, resourceId, parentAri, deleteReason, stepVersion;
|
|
1115
|
-
return _regenerator.default.wrap(function
|
|
1114
|
+
var blockAri, resourceId, parentAri, deleteReason, stepVersion, _t12, _t13, _t14;
|
|
1115
|
+
return _regenerator.default.wrap(function (_context1) {
|
|
1116
1116
|
while (1) switch (_context1.prev = _context1.next) {
|
|
1117
1117
|
case 0:
|
|
1118
1118
|
blockAri = _ref8.blockAri, resourceId = _ref8.resourceId, parentAri = _ref8.parentAri, deleteReason = _ref8.deleteReason;
|
|
1119
1119
|
_context1.prev = 1;
|
|
1120
1120
|
if (!this.getVersion) {
|
|
1121
|
-
_context1.next =
|
|
1121
|
+
_context1.next = 3;
|
|
1122
1122
|
break;
|
|
1123
1123
|
}
|
|
1124
|
-
_context1.next =
|
|
1124
|
+
_context1.next = 2;
|
|
1125
1125
|
return this.getVersion();
|
|
1126
|
-
case
|
|
1127
|
-
|
|
1128
|
-
_context1.next =
|
|
1126
|
+
case 2:
|
|
1127
|
+
_t12 = _context1.sent;
|
|
1128
|
+
_context1.next = 4;
|
|
1129
1129
|
break;
|
|
1130
|
-
case
|
|
1131
|
-
|
|
1132
|
-
case
|
|
1133
|
-
stepVersion =
|
|
1134
|
-
_context1.prev =
|
|
1135
|
-
_context1.next =
|
|
1130
|
+
case 3:
|
|
1131
|
+
_t12 = undefined;
|
|
1132
|
+
case 4:
|
|
1133
|
+
stepVersion = _t12;
|
|
1134
|
+
_context1.prev = 5;
|
|
1135
|
+
_context1.next = 6;
|
|
1136
1136
|
return (0, _blockService.createSyncedBlock)({
|
|
1137
1137
|
blockAri: blockAri,
|
|
1138
1138
|
blockInstanceId: resourceId,
|
|
@@ -1141,69 +1141,69 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1141
1141
|
content: '[]',
|
|
1142
1142
|
stepVersion: stepVersion
|
|
1143
1143
|
});
|
|
1144
|
-
case
|
|
1145
|
-
_context1.next =
|
|
1144
|
+
case 6:
|
|
1145
|
+
_context1.next = 10;
|
|
1146
1146
|
break;
|
|
1147
|
-
case
|
|
1148
|
-
_context1.prev =
|
|
1149
|
-
|
|
1150
|
-
if (!(
|
|
1151
|
-
_context1.next =
|
|
1147
|
+
case 7:
|
|
1148
|
+
_context1.prev = 7;
|
|
1149
|
+
_t13 = _context1["catch"](5);
|
|
1150
|
+
if (!(_t13 instanceof Error && _t13.message.includes('Conditional check failed'))) {
|
|
1151
|
+
_context1.next = 8;
|
|
1152
1152
|
break;
|
|
1153
1153
|
}
|
|
1154
|
-
_context1.next =
|
|
1154
|
+
_context1.next = 10;
|
|
1155
1155
|
break;
|
|
1156
|
-
case
|
|
1157
|
-
if (!(
|
|
1158
|
-
_context1.next =
|
|
1156
|
+
case 8:
|
|
1157
|
+
if (!(_t13 instanceof _blockService.BlockError)) {
|
|
1158
|
+
_context1.next = 9;
|
|
1159
1159
|
break;
|
|
1160
1160
|
}
|
|
1161
1161
|
return _context1.abrupt("return", {
|
|
1162
1162
|
resourceId: resourceId,
|
|
1163
1163
|
success: false,
|
|
1164
|
-
error: mapBlockError(
|
|
1164
|
+
error: mapBlockError(_t13)
|
|
1165
1165
|
});
|
|
1166
|
-
case
|
|
1166
|
+
case 9:
|
|
1167
1167
|
return _context1.abrupt("return", {
|
|
1168
1168
|
resourceId: resourceId,
|
|
1169
1169
|
success: false,
|
|
1170
|
-
error: (0, _errorHandling.stringifyError)(
|
|
1170
|
+
error: (0, _errorHandling.stringifyError)(_t13)
|
|
1171
1171
|
});
|
|
1172
|
-
case
|
|
1173
|
-
_context1.next =
|
|
1172
|
+
case 10:
|
|
1173
|
+
_context1.next = 11;
|
|
1174
1174
|
return (0, _blockService.deleteSyncedBlock)({
|
|
1175
1175
|
blockAri: blockAri,
|
|
1176
1176
|
deleteReason: deleteReason
|
|
1177
1177
|
});
|
|
1178
|
-
case
|
|
1178
|
+
case 11:
|
|
1179
1179
|
return _context1.abrupt("return", {
|
|
1180
1180
|
resourceId: resourceId,
|
|
1181
1181
|
success: true,
|
|
1182
1182
|
error: undefined
|
|
1183
1183
|
});
|
|
1184
|
-
case
|
|
1185
|
-
_context1.prev =
|
|
1186
|
-
|
|
1187
|
-
if (!(
|
|
1188
|
-
_context1.next =
|
|
1184
|
+
case 12:
|
|
1185
|
+
_context1.prev = 12;
|
|
1186
|
+
_t14 = _context1["catch"](1);
|
|
1187
|
+
if (!(_t14 instanceof _blockService.BlockError)) {
|
|
1188
|
+
_context1.next = 13;
|
|
1189
1189
|
break;
|
|
1190
1190
|
}
|
|
1191
1191
|
return _context1.abrupt("return", {
|
|
1192
1192
|
resourceId: resourceId,
|
|
1193
1193
|
success: false,
|
|
1194
|
-
error: mapBlockError(
|
|
1194
|
+
error: mapBlockError(_t14)
|
|
1195
1195
|
});
|
|
1196
|
-
case
|
|
1196
|
+
case 13:
|
|
1197
1197
|
return _context1.abrupt("return", {
|
|
1198
1198
|
resourceId: resourceId,
|
|
1199
1199
|
success: false,
|
|
1200
|
-
error: (0, _errorHandling.stringifyError)(
|
|
1200
|
+
error: (0, _errorHandling.stringifyError)(_t14)
|
|
1201
1201
|
});
|
|
1202
|
-
case
|
|
1202
|
+
case 14:
|
|
1203
1203
|
case "end":
|
|
1204
1204
|
return _context1.stop();
|
|
1205
1205
|
}
|
|
1206
|
-
}, _callee0, this, [[1,
|
|
1206
|
+
}, _callee0, this, [[1, 12], [5, 7]]);
|
|
1207
1207
|
}));
|
|
1208
1208
|
function deleteOrphanBlock(_x18) {
|
|
1209
1209
|
return _deleteOrphanBlock.apply(this, arguments);
|
|
@@ -1235,20 +1235,21 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1235
1235
|
value: function () {
|
|
1236
1236
|
var _updateReferenceData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee1(blocks, noContent) {
|
|
1237
1237
|
var _this2 = this;
|
|
1238
|
-
|
|
1238
|
+
var _t15;
|
|
1239
|
+
return _regenerator.default.wrap(function (_context10) {
|
|
1239
1240
|
while (1) switch (_context10.prev = _context10.next) {
|
|
1240
1241
|
case 0:
|
|
1241
1242
|
if (this.parentAri) {
|
|
1242
|
-
_context10.next =
|
|
1243
|
+
_context10.next = 1;
|
|
1243
1244
|
break;
|
|
1244
1245
|
}
|
|
1245
1246
|
return _context10.abrupt("return", {
|
|
1246
1247
|
success: false,
|
|
1247
1248
|
error: _types.SyncBlockError.Errored
|
|
1248
1249
|
});
|
|
1249
|
-
case
|
|
1250
|
-
_context10.prev =
|
|
1251
|
-
_context10.next =
|
|
1250
|
+
case 1:
|
|
1251
|
+
_context10.prev = 1;
|
|
1252
|
+
_context10.next = 2;
|
|
1252
1253
|
return (0, _blockService.updateReferenceSyncedBlockOnDocument)({
|
|
1253
1254
|
documentAri: this.parentAri,
|
|
1254
1255
|
blocks: blocks.map(function (block) {
|
|
@@ -1262,31 +1263,31 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1262
1263
|
}),
|
|
1263
1264
|
noContent: noContent
|
|
1264
1265
|
});
|
|
1265
|
-
case
|
|
1266
|
+
case 2:
|
|
1266
1267
|
return _context10.abrupt("return", {
|
|
1267
1268
|
success: true
|
|
1268
1269
|
});
|
|
1269
|
-
case
|
|
1270
|
-
_context10.prev =
|
|
1271
|
-
|
|
1272
|
-
if (!(
|
|
1273
|
-
_context10.next =
|
|
1270
|
+
case 3:
|
|
1271
|
+
_context10.prev = 3;
|
|
1272
|
+
_t15 = _context10["catch"](1);
|
|
1273
|
+
if (!(_t15 instanceof _blockService.BlockError)) {
|
|
1274
|
+
_context10.next = 4;
|
|
1274
1275
|
break;
|
|
1275
1276
|
}
|
|
1276
1277
|
return _context10.abrupt("return", {
|
|
1277
1278
|
success: false,
|
|
1278
|
-
error: mapBlockError(
|
|
1279
|
+
error: mapBlockError(_t15)
|
|
1279
1280
|
});
|
|
1280
|
-
case
|
|
1281
|
+
case 4:
|
|
1281
1282
|
return _context10.abrupt("return", {
|
|
1282
1283
|
success: false,
|
|
1283
|
-
error: (0, _errorHandling.stringifyError)(
|
|
1284
|
+
error: (0, _errorHandling.stringifyError)(_t15)
|
|
1284
1285
|
});
|
|
1285
|
-
case
|
|
1286
|
+
case 5:
|
|
1286
1287
|
case "end":
|
|
1287
1288
|
return _context10.stop();
|
|
1288
1289
|
}
|
|
1289
|
-
}, _callee1, this, [[
|
|
1290
|
+
}, _callee1, this, [[1, 3]]);
|
|
1290
1291
|
}));
|
|
1291
1292
|
function updateReferenceData(_x19, _x20) {
|
|
1292
1293
|
return _updateReferenceData.apply(this, arguments);
|
|
@@ -1298,12 +1299,12 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1298
1299
|
value: function () {
|
|
1299
1300
|
var _writeDataBatch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
|
|
1300
1301
|
var _this3 = this;
|
|
1301
|
-
var stepVersion, blockAriToResourceIdMap, blocks, response, results, successBlocks, _iterator6, _step6, block, successBlock, errorResourceIds, _iterator7, _step7, _loop2;
|
|
1302
|
-
return _regenerator.default.wrap(function
|
|
1302
|
+
var stepVersion, blockAriToResourceIdMap, blocks, response, results, successBlocks, _iterator6, _step6, block, successBlock, errorResourceIds, _iterator7, _step7, _loop2, _t16, _t17, _t18;
|
|
1303
|
+
return _regenerator.default.wrap(function (_context12) {
|
|
1303
1304
|
while (1) switch (_context12.prev = _context12.next) {
|
|
1304
1305
|
case 0:
|
|
1305
1306
|
if (!(!this.parentAri || !this.parentId)) {
|
|
1306
|
-
_context12.next =
|
|
1307
|
+
_context12.next = 1;
|
|
1307
1308
|
break;
|
|
1308
1309
|
}
|
|
1309
1310
|
return _context12.abrupt("return", data.map(function (block) {
|
|
@@ -1312,22 +1313,22 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1312
1313
|
resourceId: block.resourceId
|
|
1313
1314
|
};
|
|
1314
1315
|
}));
|
|
1315
|
-
case
|
|
1316
|
+
case 1:
|
|
1316
1317
|
if (!this.getVersion) {
|
|
1317
|
-
_context12.next =
|
|
1318
|
+
_context12.next = 3;
|
|
1318
1319
|
break;
|
|
1319
1320
|
}
|
|
1320
|
-
_context12.next =
|
|
1321
|
+
_context12.next = 2;
|
|
1321
1322
|
return this.getVersion();
|
|
1322
|
-
case
|
|
1323
|
-
|
|
1324
|
-
_context12.next =
|
|
1323
|
+
case 2:
|
|
1324
|
+
_t16 = _context12.sent;
|
|
1325
|
+
_context12.next = 4;
|
|
1325
1326
|
break;
|
|
1326
|
-
case
|
|
1327
|
-
|
|
1328
|
-
case
|
|
1329
|
-
stepVersion =
|
|
1330
|
-
_context12.prev =
|
|
1327
|
+
case 3:
|
|
1328
|
+
_t16 = undefined;
|
|
1329
|
+
case 4:
|
|
1330
|
+
stepVersion = _t16;
|
|
1331
|
+
_context12.prev = 5;
|
|
1331
1332
|
// Create a map from blockAri to original resourceId for matching responses
|
|
1332
1333
|
blockAriToResourceIdMap = new Map();
|
|
1333
1334
|
blocks = data.map(function (block) {
|
|
@@ -1340,11 +1341,11 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1340
1341
|
stepVersion: stepVersion
|
|
1341
1342
|
};
|
|
1342
1343
|
});
|
|
1343
|
-
_context12.next =
|
|
1344
|
+
_context12.next = 6;
|
|
1344
1345
|
return (0, _blockService.updateSyncedBlocks)({
|
|
1345
1346
|
blocks: blocks
|
|
1346
1347
|
});
|
|
1347
|
-
case
|
|
1348
|
+
case 6:
|
|
1348
1349
|
response = _context12.sent;
|
|
1349
1350
|
results = []; // Process successful updates
|
|
1350
1351
|
if (response.success) {
|
|
@@ -1370,7 +1371,7 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1370
1371
|
}
|
|
1371
1372
|
}
|
|
1372
1373
|
if (!response.error) {
|
|
1373
|
-
_context12.next =
|
|
1374
|
+
_context12.next = 13;
|
|
1374
1375
|
break;
|
|
1375
1376
|
}
|
|
1376
1377
|
errorResourceIds = new Map(response.error.map(function (err) {
|
|
@@ -1379,10 +1380,10 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1379
1380
|
blockAriToResourceIdMap.get(err.blockAri) || '', mapErrorResponseCode(err.code)];
|
|
1380
1381
|
}));
|
|
1381
1382
|
_iterator7 = _createForOfIteratorHelper(data);
|
|
1382
|
-
_context12.prev =
|
|
1383
|
+
_context12.prev = 7;
|
|
1383
1384
|
_loop2 = /*#__PURE__*/_regenerator.default.mark(function _loop2() {
|
|
1384
1385
|
var block, error;
|
|
1385
|
-
return _regenerator.default.wrap(function
|
|
1386
|
+
return _regenerator.default.wrap(function (_context11) {
|
|
1386
1387
|
while (1) switch (_context11.prev = _context11.next) {
|
|
1387
1388
|
case 0:
|
|
1388
1389
|
block = _step7.value;
|
|
@@ -1403,60 +1404,60 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
|
|
|
1403
1404
|
resourceId: block.resourceId
|
|
1404
1405
|
});
|
|
1405
1406
|
}
|
|
1406
|
-
case
|
|
1407
|
+
case 1:
|
|
1407
1408
|
case "end":
|
|
1408
1409
|
return _context11.stop();
|
|
1409
1410
|
}
|
|
1410
1411
|
}, _loop2);
|
|
1411
1412
|
});
|
|
1412
1413
|
_iterator7.s();
|
|
1413
|
-
case
|
|
1414
|
+
case 8:
|
|
1414
1415
|
if ((_step7 = _iterator7.n()).done) {
|
|
1415
|
-
_context12.next =
|
|
1416
|
+
_context12.next = 10;
|
|
1416
1417
|
break;
|
|
1417
1418
|
}
|
|
1418
|
-
return _context12.delegateYield(_loop2(), "
|
|
1419
|
-
case
|
|
1420
|
-
_context12.next =
|
|
1419
|
+
return _context12.delegateYield(_loop2(), "t0", 9);
|
|
1420
|
+
case 9:
|
|
1421
|
+
_context12.next = 8;
|
|
1421
1422
|
break;
|
|
1422
|
-
case
|
|
1423
|
-
_context12.next =
|
|
1423
|
+
case 10:
|
|
1424
|
+
_context12.next = 12;
|
|
1424
1425
|
break;
|
|
1425
|
-
case
|
|
1426
|
-
_context12.prev =
|
|
1427
|
-
|
|
1428
|
-
_iterator7.e(
|
|
1429
|
-
case
|
|
1430
|
-
_context12.prev =
|
|
1426
|
+
case 11:
|
|
1427
|
+
_context12.prev = 11;
|
|
1428
|
+
_t17 = _context12["catch"](7);
|
|
1429
|
+
_iterator7.e(_t17);
|
|
1430
|
+
case 12:
|
|
1431
|
+
_context12.prev = 12;
|
|
1431
1432
|
_iterator7.f();
|
|
1432
|
-
return _context12.finish(
|
|
1433
|
-
case
|
|
1433
|
+
return _context12.finish(12);
|
|
1434
|
+
case 13:
|
|
1434
1435
|
return _context12.abrupt("return", results);
|
|
1435
|
-
case
|
|
1436
|
-
_context12.prev =
|
|
1437
|
-
|
|
1438
|
-
if (!(
|
|
1439
|
-
_context12.next =
|
|
1436
|
+
case 14:
|
|
1437
|
+
_context12.prev = 14;
|
|
1438
|
+
_t18 = _context12["catch"](5);
|
|
1439
|
+
if (!(_t18 instanceof _blockService.BlockError)) {
|
|
1440
|
+
_context12.next = 15;
|
|
1440
1441
|
break;
|
|
1441
1442
|
}
|
|
1442
1443
|
return _context12.abrupt("return", data.map(function (block) {
|
|
1443
1444
|
return {
|
|
1444
|
-
error: mapBlockError(
|
|
1445
|
+
error: mapBlockError(_t18),
|
|
1445
1446
|
resourceId: block.resourceId
|
|
1446
1447
|
};
|
|
1447
1448
|
}));
|
|
1448
|
-
case
|
|
1449
|
+
case 15:
|
|
1449
1450
|
return _context12.abrupt("return", data.map(function (block) {
|
|
1450
1451
|
return {
|
|
1451
|
-
error: (0, _errorHandling.stringifyError)(
|
|
1452
|
+
error: (0, _errorHandling.stringifyError)(_t18),
|
|
1452
1453
|
resourceId: block.resourceId
|
|
1453
1454
|
};
|
|
1454
1455
|
}));
|
|
1455
|
-
case
|
|
1456
|
+
case 16:
|
|
1456
1457
|
case "end":
|
|
1457
1458
|
return _context12.stop();
|
|
1458
1459
|
}
|
|
1459
|
-
}, _callee10, this, [[
|
|
1460
|
+
}, _callee10, this, [[5, 14], [7, 11, 12, 13]]);
|
|
1460
1461
|
}));
|
|
1461
1462
|
function writeDataBatch(_x21) {
|
|
1462
1463
|
return _writeDataBatch.apply(this, arguments);
|