@amoshydra/davison 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@amoshydra/davison",
3
+ "version": "0.0.1",
4
+ "description": "WebDAV music server + Sonos controller. npx @amoshydra/davison --path /music",
5
+ "type": "module",
6
+ "bin": {
7
+ "davison": "./bin/davison.js"
8
+ },
9
+ "scripts": {
10
+ "dev": "tsx watch --ignore './vite.config.ts.timestamp-*' --ignore ./src --ignore ./node_modules server/index.ts",
11
+ "build:frontend": "vite build",
12
+ "build:server": "tsc -p tsconfig.server.json",
13
+ "build": "npm run build:server && npm run build:frontend",
14
+ "serve": "NODE_ENV=production node dist-server/index.js",
15
+ "typecheck": "tsc --noEmit",
16
+ "docker:build": "docker build -t davison .",
17
+ "docker:run": "docker run --network host -v $(pwd)/music:/music:ro davison --path /music"
18
+ },
19
+ "files": [
20
+ "dist/",
21
+ "dist-server/",
22
+ "bin/",
23
+ "patches/",
24
+ "package.json",
25
+ "README.md",
26
+ "LICENSE"
27
+ ],
28
+ "dependencies": {
29
+ "commander": "^12.1.0",
30
+ "express": "^4.21.0",
31
+ "mime": "^4.1.0",
32
+ "music-metadata": "^10.6.0",
33
+ "nephele": "1.0.0-alpha.67",
34
+ "sonos": "^1.14.3",
35
+ "uuid": "^10.0.0",
36
+ "vite-express": "^0.22.1"
37
+ },
38
+ "devDependencies": {
39
+ "@types/express": "^4.17.21",
40
+ "@types/mime": "^4.0.0",
41
+ "@types/node": "^22.5.0",
42
+ "@types/react": "^18.3.5",
43
+ "@types/react-dom": "^18.3.0",
44
+ "@types/uuid": "^10.0.0",
45
+ "@vitejs/plugin-react": "^4.3.1",
46
+ "lucide-react": "^1.23.0",
47
+ "react": "^18.3.1",
48
+ "react-dom": "^18.3.1",
49
+ "tsx": "^4.23.0",
50
+ "typescript": "^5.5.4",
51
+ "vite": "^5.4.3"
52
+ },
53
+ "pnpm": {
54
+ "onlyBuiltDependencies": [
55
+ "esbuild"
56
+ ],
57
+ "patchedDependencies": {
58
+ "nephele": "patches/nephele.patch"
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,26 @@
1
+ diff --git a/dist/Methods/GET_HEAD.js b/dist/Methods/GET_HEAD.js
2
+ index dc911602a7d7f0c18e2aa94d4e5b56aad20ed303..07a7bba2a27f9c8494ef2a0203e879e4537edb8f 100644
3
+ --- a/dist/Methods/GET_HEAD.js
4
+ +++ b/dist/Methods/GET_HEAD.js
5
+ @@ -200,6 +200,11 @@ export class GET_HEAD extends Method {
6
+ 'Transfer-Encoding': 'chunked',
7
+ });
8
+ }
9
+ + if (encoding === 'identity') {
10
+ + response.set({
11
+ + 'Content-Length': `${await resource.getLength()}`,
12
+ + });
13
+ + }
14
+ response.locals.debug(`Response encoding: ${encoding}`);
15
+ if (request.method !== 'HEAD') {
16
+ let stream = await resource.getStream();
17
+ @@ -210,9 +215,6 @@ export class GET_HEAD extends Method {
18
+ });
19
+ response.locals.debug('Beginning response stream.');
20
+ if (encoding === 'identity') {
21
+ - response.set({
22
+ - 'Content-Length': `${await resource.getLength()}`,
23
+ - });
24
+ await new Promise((resolve, reject) => {
25
+ stream.on('error', reject);
26
+ stream.on('end', () => {