scrivito_sdk 1.5.0.rc1 → 1.5.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/ca-bundle.crt +1 -1
- data/lib/assets/javascripts/scrivito_ui.js +79 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e487780450cc2b58e17d2358b89e968741954f7
|
4
|
+
data.tar.gz: d6fad053ac4660830d9e02affb67a50b97a60c04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa7e294a7865b5946acf7eda555030514900431b652982b527fac1cad39668dcfc432ec1aa7c7063f303d9669860294ca1b33b47db2197e172bbcd0cd73fb098
|
7
|
+
data.tar.gz: 056dcdee90b810f9e626d8e32fb655361ec7f8c530859c9322a83329eaaf3f6f44464211e5aa4b78695abd0d416de5985f82d8572ef6ede0498a7e3928d1d1e7
|
data/config/ca-bundle.crt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##
|
2
2
|
## Bundle of CA Root Certificates
|
3
3
|
##
|
4
|
-
## Certificate data from Mozilla as of:
|
4
|
+
## Certificate data from Mozilla as of: Thu Jul 21 09:10:09 2016
|
5
5
|
##
|
6
6
|
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7
7
|
## (CA). These were automatically extracted from Mozilla's root certificates
|
@@ -42701,22 +42701,38 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
42701
42701
|
})();
|
42702
42702
|
'use strict';
|
42703
42703
|
|
42704
|
+
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
|
42705
|
+
|
42706
|
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
|
42707
|
+
|
42704
42708
|
(function () {
|
42709
|
+
var SIZE_PER_CHUNK = 20;
|
42705
42710
|
var resolvedUrlCache = {};
|
42711
|
+
var requestCache = {};
|
42706
42712
|
|
42707
42713
|
scrivito.resolveUrl = function (url) {
|
42708
42714
|
return resolvedUrlCache[url];
|
42709
42715
|
};
|
42710
42716
|
|
42711
42717
|
scrivito.preloadResolvedUrls = function (unresolvedUrls) {
|
42712
|
-
var
|
42718
|
+
var _classifyUrls = classifyUrls(unresolvedUrls);
|
42713
42719
|
|
42714
|
-
|
42715
|
-
unresolvedUrls.forEach(function (unresolvedUrl, index) {
|
42716
|
-
resolvedUrlCache[unresolvedUrl] = resolvedUrls[index];
|
42717
|
-
});
|
42720
|
+
var _classifyUrls2 = _slicedToArray(_classifyUrls, 2);
|
42718
42721
|
|
42719
|
-
|
42722
|
+
var requestsInFlight = _classifyUrls2[0];
|
42723
|
+
var missingUrls = _classifyUrls2[1];
|
42724
|
+
|
42725
|
+
if (!missingUrls.length) {
|
42726
|
+
return scrivito.Promise.all(requestsInFlight);
|
42727
|
+
}
|
42728
|
+
|
42729
|
+
var currentChunk = missingUrls.slice(0, SIZE_PER_CHUNK);
|
42730
|
+
var remainingUrls = missingUrls.slice(SIZE_PER_CHUNK);
|
42731
|
+
|
42732
|
+
var chunkRequest = preloadChunk(currentChunk);
|
42733
|
+
|
42734
|
+
return scrivito.Promise.all([].concat(_toConsumableArray(requestsInFlight), [chunkRequest])).then(function () {
|
42735
|
+
return scrivito.preloadResolvedUrls(remainingUrls);
|
42720
42736
|
});
|
42721
42737
|
};
|
42722
42738
|
|
@@ -42728,7 +42744,54 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
42728
42744
|
// for testing purposes only!
|
42729
42745
|
scrivito.clearResolvedUrlCache = function () {
|
42730
42746
|
resolvedUrlCache = {};
|
42747
|
+
requestCache = {};
|
42731
42748
|
};
|
42749
|
+
|
42750
|
+
// for testing purposes only!
|
42751
|
+
scrivito.resolvedUrlRequestCacheIsEmpty = function () {
|
42752
|
+
return _.isEmpty(requestCache);
|
42753
|
+
};
|
42754
|
+
|
42755
|
+
function classifyUrls(unresolvedUrls) {
|
42756
|
+
var inFlight = [];
|
42757
|
+
var missingUrls = [];
|
42758
|
+
_.each(unresolvedUrls, function (unresolvedUrl) {
|
42759
|
+
var request = requestCache[unresolvedUrl];
|
42760
|
+
if (request) {
|
42761
|
+
inFlight.push(request);
|
42762
|
+
} else {
|
42763
|
+
missingUrls.push(unresolvedUrl);
|
42764
|
+
}
|
42765
|
+
});
|
42766
|
+
|
42767
|
+
return [inFlight, missingUrls];
|
42768
|
+
}
|
42769
|
+
|
42770
|
+
function cleanupRequestCache(unresolvedUrls) {
|
42771
|
+
_.each(unresolvedUrls, function (unresolvedUrl) {
|
42772
|
+
return delete requestCache[unresolvedUrl];
|
42773
|
+
});
|
42774
|
+
}
|
42775
|
+
|
42776
|
+
function preloadChunk(chunk) {
|
42777
|
+
var ajaxRequest = scrivito.silent_ajax('PUT', 'resolve_paths', { data: { paths: chunk } });
|
42778
|
+
var promise = scrivito.Promise.resolve(ajaxRequest);
|
42779
|
+
_.each(chunk, function (item) {
|
42780
|
+
requestCache[item] = promise;
|
42781
|
+
});
|
42782
|
+
|
42783
|
+
return promise.then(function (resolvedUrls) {
|
42784
|
+
chunk.forEach(function (unresolvedUrl, index) {
|
42785
|
+
resolvedUrlCache[unresolvedUrl] = resolvedUrls[index];
|
42786
|
+
});
|
42787
|
+
cleanupRequestCache(chunk);
|
42788
|
+
|
42789
|
+
return null;
|
42790
|
+
})['catch'](function (arg) {
|
42791
|
+
cleanupRequestCache(chunk);
|
42792
|
+
throw arg;
|
42793
|
+
});
|
42794
|
+
}
|
42732
42795
|
})();
|
42733
42796
|
"use strict";
|
42734
42797
|
|
@@ -43219,7 +43282,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
43219
43282
|
promise.then(function (data) {
|
43220
43283
|
return d.resolve(data);
|
43221
43284
|
}, function (error) {
|
43222
|
-
|
43285
|
+
d.reject(error);
|
43223
43286
|
});
|
43224
43287
|
|
43225
43288
|
return d;
|
@@ -43352,7 +43415,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
43352
43415
|
return uploadToS3(blob, permission).then(function (uploadedBlob) {
|
43353
43416
|
return activateUpload(objId, uploadedBlob, filename, contentType);
|
43354
43417
|
})['finally'](scrivito.write_monitor.end_write);
|
43355
|
-
})
|
43418
|
+
});
|
43356
43419
|
},
|
43357
43420
|
|
43358
43421
|
copy: function copy(copyId, objId, filename, contentType) {
|
@@ -43369,7 +43432,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
43369
43432
|
|
43370
43433
|
params.destination_obj_id = objId;
|
43371
43434
|
|
43372
|
-
return scrivito.
|
43435
|
+
return scrivito.CmsRestApi.put('blobs/' + encodedCopyId + '/copy', params);
|
43373
43436
|
},
|
43374
43437
|
|
43375
43438
|
// For testing purpose only.
|
@@ -44028,7 +44091,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
44028
44091
|
function setSession(newSession) {
|
44029
44092
|
session = newSession;
|
44030
44093
|
timeoutId = setTimeout(function () {
|
44031
|
-
sessionRenewalPromise = renewSession()
|
44094
|
+
sessionRenewalPromise = renewSession()['catch'](function () {
|
44095
|
+
// Catch so no unhandled rejection message is logged
|
44096
|
+
});
|
44032
44097
|
}, (session.maxage - 10) * 1000);
|
44033
44098
|
}
|
44034
44099
|
|
@@ -47419,7 +47484,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
47419
47484
|
|
47420
47485
|
_.extend(that, {
|
47421
47486
|
preprocess: function preprocess(value) {
|
47422
|
-
return bufferedWriter.write(value)
|
47487
|
+
return bufferedWriter.write(value)['catch'](function (error) {
|
47488
|
+
scrivito.handleAjaxError(error);
|
47489
|
+
throw error;
|
47490
|
+
});
|
47423
47491
|
}
|
47424
47492
|
});
|
47425
47493
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.
|
4
|
+
version: 1.5.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infopark AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|