# @multiplatform.one/utils

Build-time and dev-environment utilities for multiplatform.one projects:
monorepo module discovery for bundlers and wait-for-service helpers. Node-only —
nothing here ships to the browser.

## Install

```bash
pnpm add -D @multiplatform.one/utils
```

## What it owns

Everything lives on the **`/dev`** subpath (the root `.` entry is intentionally
empty):

- **Bundler discovery** — `lookupTranspileModules()`, `lookupTamaguiModules()`
  (aggregate `transpileModules` / `tamaguiModules` fields from workspace
  `package.json` files), `lookupProjectRoot()`, `resolveConfig(keys)`
- **Wait helpers** — `waitForFrappe`, `waitForPostgres`, `waitForMariaDB`,
  `waitForKeycloak` (poll until a service answers; used by `mpo wait`),
  `waitServices`, `formatServiceList`

## What it must not do

- No runtime app code, no UI — this package is for build scripts, config
  files, and dev tooling

## Usage

```ts
// vite.config.ts / metro config
import { lookupTamaguiModules } from "@multiplatform.one/utils/dev";

const tamaguiModules = lookupTamaguiModules();
```

```ts
// wait for the backend before running tests
import { waitForFrappe } from "@multiplatform.one/utils/dev";

await waitForFrappe(1000); // poll every 1s until BASE_URL/api/method/ping answers
```

## License

Apache-2.0
