@amoshydra/davison 0.0.1 → 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/bin/davison.js CHANGED
@@ -24,9 +24,6 @@ if (existsSync(getHeadPath)) {
24
24
  }
25
25
  }
26
26
  }
27
- }
28
- }
29
- }
30
27
 
31
28
  // Auto-build if needed (first run from git clone)
32
29
  if (!existsSync(resolve(root, 'dist-server', 'index.js'))) {
@@ -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(`Sonos Node running at http://${config.host}:${config.port}`);
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.1",
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": {
@@ -50,12 +50,12 @@
50
50
  "typescript": "^5.5.4",
51
51
  "vite": "^5.4.3"
52
52
  },
53
- "pnpm": {
54
- "onlyBuiltDependencies": [
55
- "esbuild"
56
- ],
57
- "patchedDependencies": {
58
- "nephele": "patches/nephele.patch"
59
- }
60
- }
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"
61
61
  }