@andrian.yablonskyy/thub-coordinator 1.0.6 → 1.0.8
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrian.yablonskyy/thub-coordinator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "TestHub Coordinator — job queue, resource registry, scheduler, heartbeat monitor, log/artifact store and web dashboard",
|
|
5
5
|
"main": "src/server.js",
|
|
6
6
|
"engines": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file scripts/install-default-config.js
|
|
3
3
|
* @description npm postinstall: on a real global install, creates the Coordinator's directory layout
|
|
4
|
-
* (~/.config/thub,
|
|
4
|
+
* (~/.config/thub, ~/.thub and its artifacts/avatars/work subdirs) and, if it
|
|
5
5
|
* doesn't already exist, ~/.config/thub/coordinator.json with every default option and
|
|
6
6
|
* a freshly generated sessionSecret (README §12, §13)
|
|
7
7
|
*
|
|
@@ -26,7 +26,7 @@ const fs = require('node:fs'),
|
|
|
26
26
|
// can be changed — not a copy of the bundled config.json (which uses a
|
|
27
27
|
// relative dataDir and a fixed sessionSecret for zero-setup `npm run
|
|
28
28
|
// coordinator` in the monorepo). What differs from DEFAULTS:
|
|
29
|
-
// - dataDir: home-anchored (
|
|
29
|
+
// - dataDir: home-anchored (~/.thub), not cwd-relative — a real
|
|
30
30
|
// install shouldn't get a different data directory depending on which
|
|
31
31
|
// directory thub-coordinator happened to be launched from.
|
|
32
32
|
// - sessionSecret: freshly random per install, never the shared
|
|
@@ -51,7 +51,7 @@ function chownToUser(p, user){
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// Creates `dir` and chowns every directory this call created along the
|
|
54
|
-
// way (e.g. ~/.config,
|
|
54
|
+
// way (e.g. ~/.config, ~/.thub when they didn't exist yet),
|
|
55
55
|
// plus `dir` itself.
|
|
56
56
|
function mkdirOwned(dir, user){
|
|
57
57
|
const firstCreated = fs.mkdirSync(dir, { recursive: true });
|
|
@@ -52,14 +52,14 @@ function resolveTargetUser(){
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// Default layout (README §13): config under ~/.config/thub, runtime data
|
|
55
|
-
// (SQLite DB, uploaded artifacts, avatars, work files) under
|
|
55
|
+
// (SQLite DB, uploaded artifacts, avatars, work files) under ~/.thub.
|
|
56
56
|
// An existing coordinator.json's own dataDir wins over the default, so a
|
|
57
57
|
// re-install prepares (and the systemd unit allows writes to) the
|
|
58
58
|
// directory the Coordinator will really use.
|
|
59
59
|
function targetPaths(user){
|
|
60
60
|
const configDir = path.join(user.home, '.config', 'thub'),
|
|
61
61
|
configPath = path.join(configDir, 'coordinator.json'),
|
|
62
|
-
defaultDataDir = path.join(user.home, '
|
|
62
|
+
defaultDataDir = path.join(user.home, '.thub'),
|
|
63
63
|
dataDir = configuredDataDir(configPath) || defaultDataDir;
|
|
64
64
|
return {
|
|
65
65
|
configDir,
|