@miriad-systems/nuum 0.1.3 → 0.1.5

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/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22818,8 +22818,13 @@ var Log;
22818
22818
  var log = Log.create({ service: "migrate" });
22819
22819
  function getMigrationsDir() {
22820
22820
  const currentDir = dirname(new URL(import.meta.url).pathname);
22821
- if (currentDir.includes("/dist/")) {
22822
- return currentDir.replace("/dist/", "/src/") + "/migrations";
22821
+ if (currentDir.includes("node_modules/@miriad-systems/nuum")) {
22822
+ const packageRoot = currentDir.split("node_modules/@miriad-systems/nuum")[0] + "node_modules/@miriad-systems/nuum";
22823
+ return join(packageRoot, "src/storage/migrations");
22824
+ }
22825
+ if (currentDir.includes("/dist")) {
22826
+ const projectRoot = currentDir.replace(/\/dist.*$/, "");
22827
+ return join(projectRoot, "src/storage/migrations");
22823
22828
  }
22824
22829
  return join(currentDir, "migrations");
22825
22830
  }
@@ -23558,6 +23563,9 @@ function createSessionStorage(db) {
23558
23563
 
23559
23564
  // src/storage/index.ts
23560
23565
  function createStorage(dbPath, options) {
23566
+ const { mkdirSync } = __require("fs");
23567
+ const { dirname: dirname2 } = __require("path");
23568
+ mkdirSync(dirname2(dbPath), { recursive: true });
23561
23569
  const db = createDb(dbPath);
23562
23570
  if (options?.initialize !== false) {
23563
23571
  runMigrations(db._rawDb);
@@ -46723,7 +46731,10 @@ function getPackageVersion() {
46723
46731
  }
46724
46732
  function getGitHash() {
46725
46733
  try {
46726
- return execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim();
46734
+ return execSync("git rev-parse --short HEAD", {
46735
+ encoding: "utf-8",
46736
+ stdio: ["pipe", "pipe", "pipe"]
46737
+ }).trim();
46727
46738
  } catch {
46728
46739
  return "unknown";
46729
46740
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miriad-systems/nuum",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "AI coding agent with continuous memory - infinite context across sessions",
5
5
  "type": "module",
6
6
  "bin": {