facult 2.8.0 → 2.8.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/status.ts +20 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "facult",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "Manage canonical AI capabilities, sync surfaces, and evolution state.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "facult": "bun run ./src/index.ts",
44
44
  "scan": "bun run ./src/index.ts scan",
45
45
  "build": "bun run scripts/build-binary.ts",
46
- "build:verify": "./dist/fclt --help",
46
+ "build:verify": "bun run scripts/verify-binary.ts",
47
47
  "install:dev": "bun run scripts/install-cli.ts --mode=dev --force",
48
48
  "install:bin": "bun run build && bun run scripts/install-cli.ts --mode=bin --force",
49
49
  "install:status": "bun run scripts/install-status.ts",
package/src/status.ts CHANGED
@@ -13,6 +13,8 @@ import {
13
13
  } from "./paths";
14
14
  import { parseJsonLenient } from "./util/json";
15
15
 
16
+ declare const FCLT_COMPILED_VERSION: string | undefined;
17
+
16
18
  export interface StatusIssue {
17
19
  severity: "info" | "warning" | "error";
18
20
  code: string;
@@ -120,8 +122,25 @@ async function countActiveProposals(
120
122
  }
121
123
 
122
124
  export async function packageVersion(): Promise<string> {
125
+ const envVersion =
126
+ process.env.FACULT_NPM_PACKAGE_VERSION ?? process.env.npm_package_version;
127
+ if (envVersion?.trim()) {
128
+ return envVersion.trim();
129
+ }
130
+
131
+ if (
132
+ typeof FCLT_COMPILED_VERSION === "string" &&
133
+ FCLT_COMPILED_VERSION.trim()
134
+ ) {
135
+ return FCLT_COMPILED_VERSION.trim();
136
+ }
137
+
123
138
  const packagePath = join(dirname(import.meta.dir), "package.json");
124
- const parsed = parseJsonLenient(await Bun.file(packagePath).text());
139
+ const parsed = parseJsonLenient(
140
+ await Bun.file(packagePath)
141
+ .text()
142
+ .catch(() => "{}")
143
+ );
125
144
  if (
126
145
  parsed &&
127
146
  typeof parsed === "object" &&