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

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,11 +28,12 @@ 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. |
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
+
36
37
 
37
38
  **Examples**
38
39
 
@@ -42,7 +43,7 @@ Run with default configuration
42
43
  actual-server
43
44
  ```
44
45
 
45
- Run with custom configuration
46
+ Runs with custom configuration
46
47
 
47
48
  ```bash
48
49
  actual-server --config ./config.json
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync, readFileSync } from 'node:fs';
3
- import { dirname, resolve } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
2
+ import { existsSync } from 'node:fs';
5
3
  import { parseArgs } from 'node:util';
6
4
 
5
+ import packageJson from '../package.json' with { type: 'json' };
6
+
7
7
  const args = process.argv;
8
8
 
9
9
  const options = {
@@ -51,11 +51,8 @@ if (values.help) {
51
51
  }
52
52
 
53
53
  if (values.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'));
57
-
58
54
  console.log('v' + packageJson.version);
55
+
59
56
  process.exit();
60
57
  }
61
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/sync-server",
3
- "version": "25.4.0-alpha.4",
3
+ "version": "25.5.0-alpha.2",
4
4
  "license": "MIT",
5
5
  "description": "actual syncing server",
6
6
  "bin": {