Skip to content

Commit

Permalink
fix(webdav): adapt RaiDrive
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Oct 12, 2021
1 parent 83957f0 commit 6e0f37e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions packages/sharelist-webdav/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @sharelist/webdav [![npm](https://img.shields.io/npm/v/@sharelist/webdav.svg)](https://npmjs.com/package/@sharelist/webdav)

It's a framework for mounting netdisk.

## Useage
4 changes: 2 additions & 2 deletions packages/sharelist-webdav/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dev": "tsc -w -p .",
"build": "rm -rf dist && tsc -p .",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path .",
"release": "node ../../scripts/release.js"
"release": "node ../../scripts/release.js --commit-path ."
},
"devDependencies": {
"@types/koa": "^2.13.4",
Expand All @@ -23,4 +23,4 @@
"dependencies": {
"xml2js": "^0.4.23"
}
}
}
6 changes: 4 additions & 2 deletions packages/sharelist-webdav/src/operations/propfind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const DEFAULT_PROPS = [
* @return {object|boolean}
*/
const propParse = (data: any) => {
if (!data) return false

if (!data) return {
ns: { prefix: '', uri: '' },
prop: [...DEFAULT_PROPS]
}
let prop = [...DEFAULT_PROPS]
const prefix = Object.keys(data.propfind.$).find(i => i.startsWith('xmlns:'))?.split(':')[1] || ''
const uri = data.propfind.$?.[`xmlns${prefix ? `:${prefix}` : ''}`] || ''
Expand Down
2 changes: 1 addition & 1 deletion packages/sharelist-webdav/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"rootDir": "./src",
"outDir": "./dist",
"watch": true
"watch": false
},
"include": [
"src/**/*.ts",
Expand Down

0 comments on commit 6e0f37e

Please sign in to comment.