Skip to content

Commit

Permalink
Properly repackaged as 1.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Simon committed May 16, 2018
1 parent 80b4b75 commit 02cc91d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 75 deletions.
13 changes: 8 additions & 5 deletions compiled/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -18933,7 +18933,7 @@ function clientFunction(λ) {
parameters[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var path, error_2;
var path, error_2, thrownError;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
Expand All @@ -18945,15 +18945,16 @@ function clientFunction(λ) {
case 2: return [2 /*return*/, _a.sent()];
case 3:
error_2 = _a.sent();
thrownError = error_2;
if (error_2.statusCode) {
if (error_2.statusCode === 404) {
throw new errors_1.NotFoundError(path);
thrownError = new errors_1.NotFoundError(path);
}
else if (error_2.statusCode === 403) {
throw new errors_1.ForbiddenError(path);
thrownError = new errors_1.ForbiddenError(path);
}
}
throw error_2;
throw thrownError;
case 4: return [2 /*return*/];
}
});
Expand All @@ -18967,7 +18968,9 @@ function unnest(path) {
.map(function (folder, position, folders) { return "/" + folders.slice(0, position + 1).join("/"); });
}
function nextcloudRoot(url, username) {
return url + "/remote.php/dav/files/" + username;
var lastUrlCharacterIsSlash = url.slice(-1)[0] === "/";
var terminatedUrl = lastUrlCharacterIsSlash ? url : url + "/";
return terminatedUrl + "remote.php/dav/files/" + username;
}


Expand Down
74 changes: 7 additions & 67 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextcloud-link",
"version": "1.0.10",
"version": "1.0.11",
"description": "Javascript API to talk to Nextcloud",
"main": "compiled/client.js",
"scripts": {
Expand All @@ -20,13 +20,12 @@
"url": "https://github.com/tentwentyfour/nextcloud-link/issues"
},
"dependencies": {
"@types/node": "^9.6.7",
"axios": "^0.18.0",
"helpbox": "^7.1.1",
"webdav-client": "^1.4.1"
},
"types": "./compiled/source/client.d.ts",
"devDependencies": {
"@types/node": "^9.6.7",
"@types/jest": "^22.2.3",
"jest": "^22.4.3",
"ts-jest": "^22.4.4",
Expand Down

0 comments on commit 02cc91d

Please sign in to comment.