@bubblebrain-ai/bubble 0.0.53 → 0.0.54

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.
@@ -22,6 +22,7 @@ export interface InstallInfo {
22
22
  isLocalCheckout: boolean;
23
23
  installPath: string;
24
24
  }
25
+ export declare function detectInstallFromPath(installPath: string): InstallInfo;
25
26
  /**
26
27
  * Figure out how this copy of Bubble was installed by inspecting the real path
27
28
  * of the package directory (two levels up from this module: dist/update -> pkg).
@@ -81,28 +81,15 @@ export function compareVersions(a, b) {
81
81
  return -1;
82
82
  return pa.pre > pb.pre ? 1 : -1;
83
83
  }
84
- /**
85
- * Figure out how this copy of Bubble was installed by inspecting the real path
86
- * of the package directory (two levels up from this module: dist/update -> pkg).
87
- */
88
- export function detectInstall() {
89
- const rawRoot = fileURLToPath(new URL("../../", import.meta.url));
90
- let installPath = rawRoot;
91
- try {
92
- installPath = realpathSync(rawRoot);
93
- }
94
- catch {
95
- // keep rawRoot
96
- }
84
+ export function detectInstallFromPath(installPath) {
97
85
  const lower = installPath.replace(/\\/g, "/").toLowerCase();
98
86
  const isUnderNodeModules = lower.includes("/node_modules/");
99
87
  // A dev/source checkout has src/ alongside dist/ and isn't under node_modules.
100
88
  const isLocalCheckout = !isUnderNodeModules;
101
89
  let manager = "unknown";
102
- if (lower.includes("/cellar/") || lower.includes("/homebrew/")) {
103
- manager = "homebrew";
104
- }
105
- else if (lower.includes("/.bun/") || lower.includes("/bun/install/")) {
90
+ // Package-manager-specific node_modules layouts take precedence over a
91
+ // parent directory name (for example /opt/homebrew/lib/node_modules is npm).
92
+ if (lower.includes("/.bun/") || lower.includes("/bun/install/")) {
106
93
  manager = "bun";
107
94
  }
108
95
  else if (lower.includes("/pnpm/") || lower.includes("/.pnpm/")) {
@@ -114,8 +101,26 @@ export function detectInstall() {
114
101
  else if (isUnderNodeModules) {
115
102
  manager = "npm";
116
103
  }
104
+ else if (lower.includes("/cellar/") || lower.includes("/homebrew/")) {
105
+ manager = "homebrew";
106
+ }
117
107
  return { manager, isGlobal: isUnderNodeModules, isLocalCheckout, installPath };
118
108
  }
109
+ /**
110
+ * Figure out how this copy of Bubble was installed by inspecting the real path
111
+ * of the package directory (two levels up from this module: dist/update -> pkg).
112
+ */
113
+ export function detectInstall() {
114
+ const rawRoot = fileURLToPath(new URL("../../", import.meta.url));
115
+ let installPath = rawRoot;
116
+ try {
117
+ installPath = realpathSync(rawRoot);
118
+ }
119
+ catch {
120
+ // keep rawRoot
121
+ }
122
+ return detectInstallFromPath(installPath);
123
+ }
119
124
  export function upgradeCommandFor(manager) {
120
125
  const spec = `${PACKAGE_NAME}@latest`;
121
126
  switch (manager) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblebrain-ai/bubble",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "description": "A terminal coding agent",
5
5
  "type": "module",
6
6
  "engines": {
@@ -31,6 +31,7 @@
31
31
  "build": "npm run build:vendor && rm -rf dist && tsc && chmod +x dist/bin.js dist/main.js",
32
32
  "build:vendor": "tsc -p packages/pi-tui/tsconfig.build.json",
33
33
  "test:vendor": "cd packages/pi-tui && node --test --experimental-strip-types --no-warnings \"test/*.test.ts\"",
34
+ "test:package": "node scripts/verify-packed-install.mjs",
34
35
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
35
36
  "dev": "tsc && node dist/main.js",
36
37
  "refresh-models": "NODE_USE_ENV_PROXY=1 node scripts/generate-model-data.mjs",
@@ -53,7 +54,7 @@
53
54
  "diff": "^9.0.0",
54
55
  "get-east-asian-width": "1.6.0",
55
56
  "js-tiktoken": "^1.0.21",
56
- "marked": "^18.0.5",
57
+ "marked": "18.0.5",
57
58
  "openai": "^4.77.0",
58
59
  "picomatch": "^4.0.4",
59
60
  "qrcode-terminal": "^0.12.0",
@@ -90,6 +91,7 @@
90
91
  "node-pty@1.1.0": true
91
92
  },
92
93
  "bundleDependencies": [
93
- "@bubblebrain-ai/pi-tui"
94
+ "@bubblebrain-ai/pi-tui",
95
+ "marked"
94
96
  ]
95
97
  }