@sequencemedia/minimserver 1.2.6 → 1.2.15
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 +6 -7
- package/src/index.mjs +10 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/minimserver",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15",
|
|
4
4
|
"description": "Watch for changes to M3Us and rescan MinimServer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"minimserver",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"ps-list": "^8.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/cli": "^7.16.
|
|
54
|
-
"@babel/core": "^7.16.
|
|
53
|
+
"@babel/cli": "^7.16.7",
|
|
54
|
+
"@babel/core": "^7.16.7",
|
|
55
55
|
"@babel/eslint-parser": "^7.16.5",
|
|
56
|
-
"@babel/preset-env": "^7.16.
|
|
57
|
-
"@sequencemedia/hooks": "^1.0.
|
|
56
|
+
"@babel/preset-env": "^7.16.7",
|
|
57
|
+
"@sequencemedia/hooks": "^1.0.6",
|
|
58
58
|
"core-js": "^3.20.1",
|
|
59
59
|
"eslint": "7.32.0",
|
|
60
60
|
"eslint-config-standard": "^16.0.3",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"husky": "^7.0.4"
|
|
66
66
|
},
|
|
67
67
|
"imports": {
|
|
68
|
-
"#minimserver": "./src/index.mjs"
|
|
69
|
-
"#build/gulp/*": "./build/gulp/*.mjs"
|
|
68
|
+
"#minimserver": "./src/index.mjs"
|
|
70
69
|
}
|
|
71
70
|
}
|
package/src/index.mjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import debug from 'debug'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
homedir
|
|
5
|
+
} from 'os'
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
resolve
|
|
9
|
+
} from 'path'
|
|
10
|
+
|
|
5
11
|
import {
|
|
6
12
|
exec
|
|
7
13
|
} from 'child_process'
|
|
@@ -364,11 +370,11 @@ export default async function minimServer (
|
|
|
364
370
|
let watcher
|
|
365
371
|
|
|
366
372
|
try {
|
|
367
|
-
const o =
|
|
373
|
+
const o = resolve(origin.replace('~', homedir()))
|
|
368
374
|
|
|
369
375
|
if (!await originDirExists(o)) throw new Error(`Origin "${origin}" does not exist.`)
|
|
370
376
|
|
|
371
|
-
const d =
|
|
377
|
+
const d = resolve(destination.replace('~', homedir()))
|
|
372
378
|
const ignorePattern = ignorePatternFactory(ignore)
|
|
373
379
|
|
|
374
380
|
watcher = chokidar.watch(o, { ignored: ignorePattern })
|