@assemblyline/al-orc 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.1] - 2026-10-26
11
+
12
+ ### Fixed
13
+ - `al-orc --version` shows al-orc's own version when installed from npm. It printed the
14
+ version of whatever `package.json` was nearest to the install (`unknown`, or e.g. `1.0.0`),
15
+ because yargs looked it up from the bin link instead of from this package.
16
+
10
17
  ## [0.3.0] - 2026-10-26
11
18
 
12
19
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assemblyline/al-orc",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Assembly Line Orchestrator client + al-orc CLI (2-in-1): push lines and stations, run them, read work records.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/cli/index.js CHANGED
@@ -10,6 +10,7 @@
10
10
  * is lib-factory's `factory` command. Not here.)
11
11
  */
12
12
 
13
+ import { readFileSync } from 'node:fs';
13
14
  import yargs from 'yargs';
14
15
 
15
16
  import { setOrgOverride } from './config-store.js';
@@ -25,6 +26,10 @@ import { statusHandler } from './status.js';
25
26
  import { loginHandler } from './login.js';
26
27
  import { DEFAULT_API_URL } from '../http.js';
27
28
 
29
+ // Read from this package, not found by yargs: an installed `al-orc` runs through a bin link,
30
+ // and the walk up from there never reaches this package.json.
31
+ const { version } = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
32
+
28
33
  export function run(argv) {
29
34
  return yargs(argv)
30
35
  .scriptName('al-orc')
@@ -63,7 +68,7 @@ export function run(argv) {
63
68
  .strict()
64
69
  .help()
65
70
  .alias('h', 'help')
66
- .version()
71
+ .version(version)
67
72
  .alias('v', 'version')
68
73
  // Global options (inherited by every command) render under their own
69
74
  // heading; each command's own options stay under "Options:", shown first