Skip to content

Commit

Permalink
v6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Aymkdn committed Apr 25, 2020
1 parent ec98568 commit 6fcbf27
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 74 deletions.
2 changes: 1 addition & 1 deletion browser/sharepointplus.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

**Change Log v6.1.1 (April 25, 2020)**

- Fixed bundle size issue introduced with v6.1.0 (see https://github.com/Aymkdn/SharepointPlus/issues/135)

**Change Log v6.1.0 (April 10, 2020)**

- Added support for short date format ("YYYY-MM-DD") for `$SP().toDate()`
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function () {
(0, _createClass2.default)(SharepointPlus, [{
key: "getVersion",
value: function getVersion() {
return "6.1.0";
return "6.1.1";
}
/**
@name $SP().auth
Expand Down
61 changes: 32 additions & 29 deletions dist/utils/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,45 +187,48 @@ function _ajax() {
}));

case 34:
_context10.next = 80;
_context10.next = 81;
break;

case 36:
if (!(this.module_sprequest === null)) {
_context10.next = 51;
_context10.next = 52;
break;
}

if (!(this.credentialOptions !== null)) {
_context10.next = 41;
_context10.next = 42;
break;
}

this.module_sprequest = require('sp-request').create(this.credentialOptions);
_context10.next = 51;
this.module_sprequest = eval("require('sp-request')"); // avoid Webpack to include it in web bundle

this.module_sprequest = this.module_sprequest.create(this.credentialOptions);
_context10.next = 52;
break;

case 41:
case 42:
if (!(typeof this.authMethod.cookie === 'function')) {
_context10.next = 50;
_context10.next = 51;
break;
}

_context10.next = 44;
_context10.next = 45;
return this.authMethod.cookie();

case 44:
case 45:
cookie = _context10.sent;
cookie = cookie.split(';')[0];
this.module_sprequest = require('request-promise');
this.module_sprequest = eval("require('request-promise')"); // avoid Webpack to include it in web bundle

settings.headers.cookie = cookie;
_context10.next = 51;
_context10.next = 52;
break;

case 50:
case 51:
throw "[SharepointPlus 'ajax'] please use `$SP().auth()` to provide your authentication method first";

case 51:
case 52:
if (settings.headers['Content-Type'] && (0, _indexOf.default)(_context6 = settings.headers['Content-Type']).call(_context6, 'xml') > -1) settings.headers['Accept'] = 'application/xml, text/xml, */*; q=0.01';
if (!settings.method) settings.method = typeof settings.body !== "undefined" ? "POST" : "GET";
if (settings.method.toUpperCase() === "POST" && typeof settings.body !== "undefined") settings.headers['Content-Length'] = Buffer.byteLength(settings.body); // add User Agent
Expand All @@ -249,57 +252,57 @@ function _ajax() {
if (Object.prototype.hasOwnProperty.call(settings, stg) && !opts[stg]) opts[stg] = settings[stg];
}

_context10.next = 62;
_context10.next = 63;
return this.module_sprequest(settings.url, opts);

case 62:
case 63:
response = _context10.sent;

if (!(response.statusCode === 200 && response.statusMessage !== "Error" && response.statusMessage !== "Abort" && response.statusMessage !== "Timeout")) {
_context10.next = 74;
_context10.next = 75;
break;
}

if (!((0, _indexOf.default)(_context7 = response.headers['content-type'] || "").call(_context7, 'xml') > -1 && (0, _slice.default)(_context8 = response.body).call(_context8, 0, 5) === '<?xml')) {
_context10.next = 70;
_context10.next = 71;
break;
}

DOMParser = require('xmldom').DOMParser;
result = new DOMParser().parseFromString(response.body);
return _context10.abrupt("return", _promise.default.resolve(result));

case 70:
case 71:
if ((0, _indexOf.default)(_context9 = response.headers['content-type'] || "").call(_context9, 'json') > -1 && typeof response.body === "string") response.body = JSON.parse(response.body);
return _context10.abrupt("return", _promise.default.resolve(response.body));

case 72:
_context10.next = 80;
case 73:
_context10.next = 81;
break;

case 74:
case 75:
if (!(response.statusCode === 403)) {
_context10.next = 79;
_context10.next = 80;
break;
}

// we need to reauthenticate
this.module_sprequest === null;
return _context10.abrupt("return", ajax.call(this, settings));

case 79:
case 80:
return _context10.abrupt("return", _promise.default.reject({
response: response,
statusCode: response.statusCode,
responseText: response.body
}));

case 80:
_context10.next = 85;
case 81:
_context10.next = 86;
break;

case 82:
_context10.prev = 82;
case 83:
_context10.prev = 83;
_context10.t0 = _context10["catch"](1);
return _context10.abrupt("return", _promise.default.reject({
error: _context10.t0,
Expand All @@ -308,12 +311,12 @@ function _ajax() {
responseText: _context10.t0.response ? _context10.t0.response.body : ''
}));

case 85:
case 86:
case "end":
return _context10.stop();
}
}
}, _callee, this, [[1, 82]]);
}, _callee, this, [[1, 83]]);
}));
return _ajax.apply(this, arguments);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h3>Returns:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ <h3>Example:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@


<div class="span10" id="main"> <!-- content -->
<h1>SharepointPlus 6.1.0</h1>
<h1>SharepointPlus 6.1.1</h1>
<div class="alert alert-danger alert-bordered">Important changes introduced with <b>SharepointPlus v6.0</b>. Make sure to <a href="https://github.com/Aymkdn/SharepointPlus/wiki/SharepointPlus-v6.0-Announcement">read the announcement</a> and to read the <a href="https://github.com/Aymkdn/SharepointPlus/blob/master/changelog.md">changelog</a>.</div>
<div>
<a href="https://twitter.com/sp_js" class="twitter-follow-button" data-show-count="false" data-lang="en" data-dnt="true">Follow @sp_js</a>
Expand Down Expand Up @@ -381,7 +381,7 @@ <h2>Older Versions</h2>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ <h3>Example:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modals.html
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ <h3>Parameters:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/node.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h3>Example:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/people.html
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ <h3>Example:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ <h3>Example:</h3>
<div>Documentation built by <a target="_blank" href="http://twitter.com/aymkdn">@aymkdn</a> (<a href="http://kodono.info">http://kodono.info</a>) with <a href="https://jsdoc.app/">JSDoc</a>.</div>
<div>This work is licensed under <a rel="license" href="https://github.com/Aymkdn/SharepointPlus/blob/master/license.md">LGPL-3</a>.</div>
<div>Designed with <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>.</div>
<div>Automatically generated with JSDoc on Thu, 23 Apr 2020 10:24:46 GMT</div>
<div>Automatically generated with JSDoc on Sat, 25 Apr 2020 08:18:47 GMT</div>
</footer>
<script>prettyPrint()</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion es5/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function () {
_createClass(SharepointPlus, [{
key: "getVersion",
value: function getVersion() {
return "6.1.0";
return "6.1.1";
}
/**
@name $SP().auth
Expand Down
Loading

0 comments on commit 6fcbf27

Please sign in to comment.