@sequencemedia/minimserver 1.2.476 → 1.3.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/.gitattributes CHANGED
@@ -2,13 +2,18 @@
2
2
  * text=auto
3
3
 
4
4
  # LF line endings
5
+ *.yaml text eol=lf
6
+ *.yml text eol=lf
5
7
  *.json text eol=lf
8
+ *.js text eol=lf
6
9
  *.mjs text eol=lf
7
10
  *.cjs text eol=lf
8
- *.mts text eol=lf
9
- *.js text eol=lf
11
+ *.jsx text eol=lf
10
12
  *.ts text eol=lf
13
+ *.mts text eol=lf
14
+ *.cts text eol=lf
11
15
  *.sh text eol=lf
16
+ .depsrc text eol=lf
12
17
  .editorconfig text eol=lf
13
18
  .eslintignore text eol=lf
14
19
  .eslintrc text eol=lf
@@ -17,4 +22,5 @@
17
22
  .npmignore text eol=lf
18
23
  .npmrc text eol=lf
19
24
  .nvmrc text eol=lf
25
+ .babelrc text eol=lf
20
26
  .husky/* text eol=lf
package/app.mjs CHANGED
@@ -6,13 +6,15 @@ import debug from 'debug'
6
6
 
7
7
  import {
8
8
  readFile
9
- } from 'fs/promises'
9
+ } from 'node:fs/promises'
10
10
 
11
11
  import psList from 'ps-list'
12
12
 
13
- import commander from 'commander'
13
+ import {
14
+ Command
15
+ } from 'commander'
14
16
 
15
- import minimServer from '#minimserver'
17
+ import minimServer from './src/index.mjs'
16
18
 
17
19
  const log = debug('@sequencemedia/minimserver')
18
20
 
@@ -21,6 +23,8 @@ log('`minimserver` is awake')
21
23
  const NAME = 'ms.App'
22
24
  process.title = NAME
23
25
 
26
+ const commander = new Command()
27
+
24
28
  async function app () {
25
29
  const PACKAGE = JSON.parse(await readFile('./package.json', 'utf8'))
26
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequencemedia/minimserver",
3
- "version": "1.2.476",
3
+ "version": "1.3.1",
4
4
  "description": "Watch for changes to M3Us and rescan MinimServer",
5
5
  "keywords": [
6
6
  "minimserver",
@@ -15,10 +15,11 @@
15
15
  "m3u8"
16
16
  ],
17
17
  "main": "./app.mjs",
18
+ "type": "module",
18
19
  "author": "Jonathan Perry for Sequence Media Limited <sequencemedia@sequencemedia.net>",
19
20
  "license": "MIT",
20
21
  "engines": {
21
- "node": ">=16.13.0"
22
+ "node": ">=18.5.0"
22
23
  },
23
24
  "repository": {
24
25
  "type": "git",
@@ -31,8 +32,8 @@
31
32
  "scripts": {
32
33
  "lint": "eslint . --ext .mjs --ext .cjs",
33
34
  "lint:fix": "npm run lint -- --fix",
34
- "start": "cross-env DEBUG=@sequencemedia/minimserver* NODE_ENV=production node .",
35
- "dev": "cross-env DEBUG=@sequencemedia/minimserver* NODE_ENV=development node .",
35
+ "start": "cross-env DEBUG=@sequencemedia/minimserver* NODE_ENV=production node app.mjs",
36
+ "dev": "cross-env DEBUG=@sequencemedia/minimserver* NODE_ENV=development node app.mjs",
36
37
  "prepare": "husky install"
37
38
  },
38
39
  "dependencies": {
@@ -47,7 +48,6 @@
47
48
  "ps-list": "^8.1.1"
48
49
  },
49
50
  "devDependencies": {
50
- "@babel/cli": "^7.21.5",
51
51
  "@babel/core": "^7.22.1",
52
52
  "@babel/eslint-parser": "^7.21.8",
53
53
  "@babel/preset-env": "^7.22.4",
@@ -59,8 +59,5 @@
59
59
  "eslint-plugin-node": "^11.1.0",
60
60
  "eslint-plugin-promise": "^6.1.1",
61
61
  "husky": "^8.0.3"
62
- },
63
- "imports": {
64
- "#minimserver": "./src/index.mjs"
65
62
  }
66
63
  }
package/src/index.mjs CHANGED
@@ -2,31 +2,31 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  homedir
5
- } from 'os'
5
+ } from 'node:os'
6
6
 
7
7
  import {
8
8
  resolve
9
- } from 'path'
9
+ } from 'node:path'
10
10
 
11
11
  import {
12
12
  exec
13
- } from 'child_process'
14
-
15
- import fsExtra from 'fs-extra'
13
+ } from 'node:child_process'
16
14
 
17
15
  import {
18
16
  stat,
19
17
  copyFile
20
- } from 'fs/promises'
18
+ } from 'node:fs/promises'
21
19
 
22
- import chokidar from 'chokidar'
23
- import anymatch from 'anymatch'
24
- import del from 'del'
25
-
26
- const {
20
+ import {
27
21
  ensureDir,
28
22
  ensureFile
29
- } = fsExtra
23
+ } from 'fs-extra'
24
+
25
+ import chokidar from 'chokidar'
26
+ import anymatch from 'anymatch'
27
+ import {
28
+ deleteAsync as del
29
+ } from 'del'
30
30
 
31
31
  const error = debug('@sequencemedia/minimserver:error')
32
32
  const log = debug('@sequencemedia/minimserver')