@amoshydra/davison 0.0.2 → 0.0.3
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/dist-server/index.js +5 -1
- package/package.json +10 -2
package/dist-server/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import ViteExpress from 'vite-express';
|
|
3
|
+
import { resolve, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
3
5
|
import { Command } from 'commander';
|
|
4
6
|
import { config } from './config.js';
|
|
5
7
|
import { discoverMusic } from './services/music-discovery.js';
|
|
@@ -27,6 +29,8 @@ config.musicPaths.forEach(p => {
|
|
|
27
29
|
});
|
|
28
30
|
let server = null;
|
|
29
31
|
async function main() {
|
|
32
|
+
// Set cwd to package root so vite-express finds dist/ and vite.config
|
|
33
|
+
process.chdir(resolve(dirname(fileURLToPath(import.meta.url)), '..'));
|
|
30
34
|
console.log('Starting davison...');
|
|
31
35
|
try {
|
|
32
36
|
await loadPlaylists();
|
|
@@ -58,7 +62,7 @@ async function main() {
|
|
|
58
62
|
console.log(`Serving ${config.musicPaths.length} music director${config.musicPaths.length > 1 ? 'ies' : 'y'} at /music-files/* and /webdav/*`);
|
|
59
63
|
}
|
|
60
64
|
server = ViteExpress.listen(app, config.port, () => {
|
|
61
|
-
console.log(`
|
|
65
|
+
console.log(`Davison running at http://${config.host}:${config.port}`);
|
|
62
66
|
startAutoAdvancePolling();
|
|
63
67
|
});
|
|
64
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amoshydra/davison",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "WebDAV music server + Sonos controller. npx @amoshydra/davison --path /music",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -49,5 +49,13 @@
|
|
|
49
49
|
"tsx": "^4.23.0",
|
|
50
50
|
"typescript": "^5.5.4",
|
|
51
51
|
"vite": "^5.4.3"
|
|
52
|
-
}
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/amoshydra/davison.git"
|
|
56
|
+
},
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/amoshydra/davison/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/amoshydra/davison#readme"
|
|
53
61
|
}
|