jobtrack 1.0.8 → 1.0.10

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": "jobtrack",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Runs the JobTrack API + web UI as one background process with a Windows tray icon",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@fastify/static": "^10.1.3",
30
- "@jobtrack/api": "^1.0.5",
30
+ "@jobtrack/api": "^1.0.6",
31
31
  "fastify": "^5.12.1",
32
32
  "systray": "^1.0.5",
33
33
  "tsx": "^4.23.12"
package/src/server.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  import fastifyStatic from '@fastify/static';
9
9
  import type { FastifyInstance } from 'fastify';
10
10
  import { buildApp } from '@jobtrack/api/app';
11
- import { loadConfig, type Config } from '@jobtrack/api/config';
11
+ import { loadConfig, loadEnvFile, type Config } from '@jobtrack/api/config';
12
12
  import { createRepos } from '@jobtrack/api/db/create-repos';
13
13
  import type { RepoBundle } from '@jobtrack/api/db/repos';
14
14
  import { SearchIndex } from '@jobtrack/api/search';
@@ -25,6 +25,9 @@ export interface RunningServer {
25
25
  }
26
26
 
27
27
  export async function startServer(): Promise<RunningServer> {
28
+ // The file the tray's "Open App Settings" menu item edits — read here, or that menu
29
+ // item is a text editor pointed at nothing.
30
+ loadEnvFile();
28
31
  const config = loadConfig();
29
32
  const repos = await createRepos(config);
30
33
 
@@ -1,11 +1,18 @@
1
1
  # Copy this file to `.env` and adjust as needed. Every value below is optional — an
2
2
  # unmodified `.env` (or no `.env` at all) runs JobTrack on local SQLite at
3
3
  # http://127.0.0.1:3001. See README.md "Configuration" for the full write-up.
4
+ #
5
+ # The file is read from the app data directory: this repo's root when running from a clone,
6
+ # %APPDATA%\jobtrack (or ~/.local/share/jobtrack) for an installed `jobtrack` — the same file
7
+ # the tray's "Open App Settings" opens. Anything already set in the real environment wins
8
+ # over what is written here.
4
9
 
5
10
  # sqlite (default), postgres, or mysql — the driver for the implicit "default" target.
6
11
  # DB_DRIVER=sqlite
7
12
 
8
- # SQLite only. Path is relative to the repo root.
13
+ # SQLite only, and never relative to whatever directory the app was started from. A bare
14
+ # filename (DB_FILE=work.db) is a second database in the same data folder; a relative path
15
+ # is resolved from the app data directory above; an absolute path is used as written.
9
16
  # DB_FILE=data/jobtrack.db
10
17
 
11
18
  # Postgres/MySQL only. Required when DB_DRIVER is postgres or mysql.
@@ -25,5 +32,16 @@
25
32
  # Any transformers.js feature-extraction model.
26
33
  # EMBEDDING_MODEL=Xenova/all-MiniLM-L6-v2
27
34
 
28
- # Where the ONNX embedding model is cached, relative to the repo root.
35
+ # Where the ONNX embedding model is cached. Relative to the app data directory, as above.
29
36
  # MODEL_CACHE_DIR=.models
37
+
38
+ # Extra browser origins allowed to call the API without a token, comma-separated. This
39
+ # app's own UI (the tray's address and the :5173 dev server) is always allowed; everything
40
+ # else — the browser extension included — authenticates with the token below instead.
41
+ # See docs/capture.md.
42
+ # CORS_ORIGINS=http://localhost:4173
43
+
44
+ # The token a browser extension presents. Left unset, JobTrack generates one on first run
45
+ # and keeps it in data/api-token — that is the normal case, and the file is what you paste
46
+ # into the extension's options page. Set it here only to manage the secret yourself.
47
+ # API_TOKEN=