@kronos-integration/service-systemd 2.5.5 → 2.6.0

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019-2022 by Kronos-Integration
1
+ Copyright (c) 2019-2024 by Kronos-Integration
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![npm](https://img.shields.io/npm/v/@kronos-integration/service-systemd.svg)](https://www.npmjs.com/package/@kronos-integration/service-systemd)
2
2
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
3
- [![minified size](https://badgen.net/bundlephobia/min/@kronos-integration/service-systemd)](https://bundlephobia.com/result?p=@kronos-integration/service-systemd)
3
+ [![bundlejs](https://deno.bundlejs.com/?q=@kronos-integration/service-systemd\&badge=detailed)](https://bundlejs.com/?q=@kronos-integration/service-systemd)
4
4
  [![downloads](http://img.shields.io/npm/dm/@kronos-integration/service-systemd.svg?style=flat-square)](https://npmjs.org/package/@kronos-integration/service-systemd)
5
5
  [![GitHub Issues](https://img.shields.io/github/issues/Kronos-Integration/service-systemd.svg?style=flat-square)](https://github.com/Kronos-Integration/service-systemd/issues)
6
6
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FKronos-Integration%2Fservice-systemd%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/Kronos-Integration/service-systemd/goto)
@@ -49,25 +49,25 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
49
49
 
50
50
  ### Properties
51
51
 
52
- * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**
53
- * `fd` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
52
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
53
+ * `fd` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 
54
54
 
55
55
  ## SystemdConfig
56
56
 
57
57
  **Extends ServiceConfig**
58
58
 
59
- Provides config from CONFIGURATION_DIRECTORY.
59
+ Provides config from CONFIGURATION\_DIRECTORY.
60
60
  Also injects listeningFileDescriptors into the config
61
61
 
62
62
  ### Properties
63
63
 
64
- * `configurationDirectory` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** taken from CONFIGURATION_DIRECTORY
64
+ * `configurationDirectory` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** taken from CONFIGURATION\_DIRECTORY
65
65
 
66
66
  ### listeningFileDescriptors
67
67
 
68
- listeningFileDescriptors as passed in LISTEN_FDS and LISTEN_FDNAMES.
68
+ listeningFileDescriptors as passed in LISTEN\_FDS and LISTEN\_FDNAMES.
69
69
 
70
- Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[FileDescriptor](#filedescriptor)>**
70
+ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[FileDescriptor](#filedescriptor)>**&#x20;
71
71
 
72
72
  ### loadConfig
73
73
 
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-systemd",
3
- "version": "2.5.5",
3
+ "version": "2.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "sideEffects": false,
8
7
  "exports": {
9
8
  ".": "./src/service.mjs"
10
9
  },
@@ -24,35 +23,35 @@
24
23
  "license": "BSD-2-Clause",
25
24
  "scripts": {
26
25
  "test": "npm run test:ava",
27
- "test:ava": "ava -s --timeout 2m tests/*.mjs",
28
- "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava -s --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
26
+ "test:ava": "ava -s --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs",
27
+ "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava -s --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
29
28
  "docs": "documentation readme --section=API ./src/**/*.mjs",
30
29
  "lint": "npm run lint:docs",
31
30
  "lint:docs": "documentation lint ./src/**/*.mjs",
32
31
  "build": "cmake-js compile"
33
32
  },
34
33
  "dependencies": {
35
- "@kronos-integration/service": "^10.4.24",
36
- "config-expander": "^12.0.12"
34
+ "@kronos-integration/service": "^10.4.55",
35
+ "config-expander": "^13.0.8"
37
36
  },
38
37
  "devDependencies": {
39
- "ava": "^4.3.0",
40
- "c8": "^7.11.3",
41
- "cmake-js": "^6.3.2",
42
- "documentation": "^13.2.5",
43
- "execa": "^6.1.0",
44
- "node-addon-api": "^5.0.0",
45
- "semantic-release": "^19.0.3"
38
+ "ava": "^6.0.1",
39
+ "c8": "^9.1.0",
40
+ "cmake-js": "^7.2.1",
41
+ "documentation": "^14.0.2",
42
+ "execa": "^8.0.1",
43
+ "node-addon-api": "^7.0.0",
44
+ "semantic-release": "^23.0.0"
46
45
  },
47
46
  "engines": {
48
- "node": ">=18.3.0"
47
+ "node": ">=20.11.0"
49
48
  },
50
49
  "os": [
51
50
  "linux"
52
51
  ],
53
52
  "repository": {
54
53
  "type": "git",
55
- "url": "https://github.com/Kronos-Integration/service-systemd.git"
54
+ "url": "https://github.com/Kronos-Integration/service-systemd"
56
55
  },
57
56
  "bugs": {
58
57
  "url": "https://github.com/Kronos-Integration/service-systemd/issues"
@@ -70,5 +69,10 @@
70
69
  "arlac77/template-cmake",
71
70
  "arlac77/template-kronos-component"
72
71
  ]
72
+ },
73
+ "binary": {
74
+ "napi_versions": [
75
+ 8
76
+ ]
73
77
  }
74
78
  }
package/src/service.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ import { arch, constants } from "node:os";
2
+ import { Module } from "node:module";
1
3
  import { expand } from "config-expander";
2
4
  import {
3
5
  ServiceProviderMixin,
@@ -5,8 +7,6 @@ import {
5
7
  ServiceLogger,
6
8
  ServiceConfig
7
9
  } from "@kronos-integration/service";
8
- import { Module } from "module";
9
- import { arch, constants } from "os";
10
10
 
11
11
  const filename = new URL(`../systemd-linux-${arch()}.node`, import.meta.url)
12
12
  .pathname;
@@ -185,8 +185,8 @@ export class ServiceSystemd extends ServiceProviderMixin(
185
185
  return super._start();
186
186
  }
187
187
 
188
- stateChanged(oldState, newState) {
189
- super.stateChanged(oldState, newState);
188
+ stateChanged(origin, oldState, newState) {
189
+ super.stateChanged(origin, oldState, newState);
190
190
  switch (newState) {
191
191
  case "running":
192
192
  notify("READY=1");
Binary file