@openscout/scout 0.2.11 → 0.2.12

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 (3) hide show
  1. package/README.md +2 -3
  2. package/dist/main.mjs +20 -15
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  # scout
2
2
 
3
- Published CLI package for Scout.
3
+ > **Requires [Bun](https://bun.sh).** Scout uses Bun as its runtime. If you don't have it: `brew install bun`
4
4
 
5
5
  Install:
6
6
 
7
7
  ```bash
8
- brew install bun
9
8
  bun add -g @openscout/scout
10
9
  scout --help
11
10
  ```
12
11
 
13
- `@openscout/scout` is the published package name. It installs the `scout` command.
12
+ `@openscout/scout` is the published package name. It installs the `scout` command and depends on `@openscout/runtime` for the local broker service.
14
13
 
15
14
  ## Canonical Flow
16
15
 
package/dist/main.mjs CHANGED
@@ -4213,31 +4213,36 @@ function buildDefaultBrokerUrl(host = DEFAULT_BROKER_HOST, port = DEFAULT_BROKER
4213
4213
  }
4214
4214
  function runtimePackageDir() {
4215
4215
  const explicit = process.env.OPENSCOUT_RUNTIME_PACKAGE_DIR?.trim();
4216
- if (explicit) {
4216
+ if (explicit)
4217
4217
  return explicit;
4218
- }
4218
+ const fromGlobal = findGlobalRuntimeDir();
4219
+ if (fromGlobal)
4220
+ return fromGlobal;
4221
+ const fromCwd = findWorkspaceRuntimeDir(process.cwd());
4222
+ if (fromCwd)
4223
+ return fromCwd;
4219
4224
  const moduleDir = dirname4(fileURLToPath2(import.meta.url));
4220
- const candidate = resolve5(moduleDir, "..");
4221
- if (isRuntimePackageDir(candidate)) {
4222
- return candidate;
4223
- }
4224
- const fromCwd = findRuntimePackageDir(process.cwd());
4225
- return fromCwd ?? candidate;
4225
+ return resolve5(moduleDir, "..");
4226
4226
  }
4227
- function isRuntimePackageDir(candidate) {
4228
- return existsSync3(join5(candidate, "package.json")) && existsSync3(join5(candidate, "src", "broker-daemon.ts"));
4227
+ function isInstalledRuntimePackageDir(candidate) {
4228
+ return existsSync3(join5(candidate, "package.json")) && existsSync3(join5(candidate, "bin", "openscout-runtime.mjs"));
4229
4229
  }
4230
- function findRuntimePackageDir(startDir) {
4230
+ function findGlobalRuntimeDir() {
4231
+ const bunCandidate = join5(homedir4(), ".bun", "node_modules", "@openscout", "runtime");
4232
+ if (isInstalledRuntimePackageDir(bunCandidate))
4233
+ return bunCandidate;
4234
+ return null;
4235
+ }
4236
+ function findWorkspaceRuntimeDir(startDir) {
4231
4237
  let current = resolve5(startDir);
4232
4238
  while (true) {
4233
4239
  const candidate = join5(current, "packages", "runtime");
4234
- if (isRuntimePackageDir(candidate)) {
4240
+ if (existsSync3(join5(candidate, "package.json")) && existsSync3(join5(candidate, "src"))) {
4235
4241
  return candidate;
4236
4242
  }
4237
4243
  const parent = dirname4(current);
4238
- if (parent === current) {
4244
+ if (parent === current)
4239
4245
  return null;
4240
- }
4241
4246
  current = parent;
4242
4247
  }
4243
4248
  }
@@ -35669,7 +35674,7 @@ function renderScoutHelp(version2 = "0.2.0") {
35669
35674
  init_options();
35670
35675
 
35671
35676
  // ../../apps/scout/src/shared/product.ts
35672
- var SCOUT_APP_VERSION = "0.2.11";
35677
+ var SCOUT_APP_VERSION = "0.2.12";
35673
35678
 
35674
35679
  // ../../apps/scout/src/cli/main.ts
35675
35680
  async function main2() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openscout/scout",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Published Scout package that installs the `scout` command",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",