-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from perry-mitchell/feat/formatting-and-upgrades
Formatting and upgrades
- Loading branch information
Showing
34 changed files
with
1,177 additions
and
3,954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"printWidth": 120, | ||
"printWidth": 100, | ||
"tabWidth": 4 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
export function isBuffer(value: any): boolean { | ||
return value != null && value.constructor != null && typeof value.constructor.isBuffer === "function" && value.constructor.isBuffer(value); | ||
return ( | ||
value != null && | ||
value.constructor != null && | ||
typeof value.constructor.isBuffer === "function" && | ||
value.constructor.isBuffer(value) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import { joinURL } from "../tools/url"; | ||
import { encodePath } from "../tools/path"; | ||
import { request, prepareRequestOptions } from "../request"; | ||
import { handleResponseCode, } from "../response"; | ||
import { handleResponseCode } from "../response"; | ||
import { WebDAVClientContext, WebDAVMethodOptions } from "../types"; | ||
|
||
export async function deleteFile( | ||
context: WebDAVClientContext, | ||
filename: string, | ||
options: WebDAVMethodOptions = {} | ||
): Promise<void> { | ||
const requestOptions = prepareRequestOptions({ | ||
url: joinURL(context.remoteURL, encodePath(filename)), | ||
method: "DELETE" | ||
}, context, options); | ||
const requestOptions = prepareRequestOptions( | ||
{ | ||
url: joinURL(context.remoteURL, encodePath(filename)), | ||
method: "DELETE" | ||
}, | ||
context, | ||
options | ||
); | ||
const response = await request(requestOptions); | ||
handleResponseCode(context, response); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.