@actual-app/sync-server 25.4.0-alpha.1 → 25.4.0-alpha.4

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/README.md CHANGED
@@ -28,12 +28,11 @@ actual-server [options]
28
28
 
29
29
  **Available options**
30
30
 
31
- | Command | Description |
32
- | ------------- |-------------|
33
- |`-h` or `--help` |Print this list and exit. |
34
- |`-v` or `--version` |Print this version and exit. |
35
- |`--config` |Path to the config file. |
36
-
31
+ | Command | Description |
32
+ | ------------------- | ---------------------------- |
33
+ | `-h` or `--help` | Print this list and exit. |
34
+ | `-v` or `--version` | Print this version and exit. |
35
+ | `--config` | Path to the config file. |
37
36
 
38
37
  **Examples**
39
38
 
@@ -43,7 +42,7 @@ Run with default configuration
43
42
  actual-server
44
43
  ```
45
44
 
46
- Runs with custom configuration
45
+ Run with custom configuration
47
46
 
48
47
  ```bash
49
48
  actual-server --config ./config.json
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync } from 'node:fs';
2
+ import { existsSync, readFileSync } from 'node:fs';
3
+ import { dirname, resolve } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
3
5
  import { parseArgs } from 'node:util';
4
6
 
5
- import packageJson from '../package.json' with { type: 'json' };
6
-
7
7
  const args = process.argv;
8
8
 
9
9
  const options = {
@@ -51,8 +51,11 @@ if (values.help) {
51
51
  }
52
52
 
53
53
  if (values.version) {
54
- console.log('v' + packageJson.version);
54
+ const __dirname = dirname(fileURLToPath(import.meta.url));
55
+ const packageJsonPath = resolve(__dirname, '../package.json');
56
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
55
57
 
58
+ console.log('v' + packageJson.version);
56
59
  process.exit();
57
60
  }
58
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/sync-server",
3
- "version": "25.4.0-alpha.1",
3
+ "version": "25.4.0-alpha.4",
4
4
  "license": "MIT",
5
5
  "description": "actual syncing server",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@actual-app/crdt": "2.1.0",
34
- "@actual-app/web": "25.4.0",
34
+ "@actual-app/web": "25.3.1",
35
35
  "bcrypt": "^5.1.1",
36
36
  "better-sqlite3": "^11.9.1",
37
37
  "body-parser": "^1.20.3",