@hbarefoot/engram 1.4.1 → 1.4.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 +1 -1
- package/bin/engram.js +11 -9
- package/dashboard/dist/assets/{index-C0aJJ5-D.js → index-DGlzKbuV.js} +25 -25
- package/dashboard/dist/assets/index-DOKHau-I.css +1 -0
- package/dashboard/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/memory/consolidate.js +147 -95
- package/src/memory/store.js +336 -0
- package/src/server/rest.js +112 -4
- package/dashboard/dist/assets/index-DFWnnKIv.css +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
#  Engram
|
|
2
2
|
|
|
3
3
|
[](https://github.com/HBarefoot/engram/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@hbarefoot/engram)
|
package/bin/engram.js
CHANGED
|
@@ -16,17 +16,19 @@ import { fileURLToPath } from 'url';
|
|
|
16
16
|
import { dirname, join } from 'path';
|
|
17
17
|
import fs from 'fs';
|
|
18
18
|
|
|
19
|
-
// Read version
|
|
19
|
+
// Read version: prefer build-time define, then package.json, then fallback
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = dirname(__filename);
|
|
22
|
-
let version =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
let version = process.env.ENGRAM_VERSION || 'unknown';
|
|
23
|
+
if (version === 'unknown') {
|
|
24
|
+
try {
|
|
25
|
+
const packageJson = JSON.parse(
|
|
26
|
+
readFileSync(join(__dirname, '../package.json'), 'utf-8')
|
|
27
|
+
);
|
|
28
|
+
version = packageJson.version;
|
|
29
|
+
} catch {
|
|
30
|
+
// Running as bundled sidecar — package.json not available
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
const program = new Command();
|