@makoai/app-sdk 2.7.2 → 2.7.3

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/README.md +9 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -149,12 +149,18 @@ import {
149
149
  names with a build-time define in `vite.config.ts`:
150
150
 
151
151
  ```ts
152
- import { readdirSync } from "node:fs";
152
+ import { existsSync, readdirSync } from "node:fs";
153
+ const bindingsDir = new URL("./bindings", import.meta.url);
153
154
  // inside defineConfig({ … }):
154
155
  define: {
155
156
  __APP_BINDING_NAMES__: JSON.stringify(
156
- readdirSync(new URL("./bindings", import.meta.url))
157
- .filter(f => f.endsWith(".sql")).map(f => f.slice(0, -4)),
157
+ // An app with no bindings/ folder yet (a new shell app) has none:
158
+ // without the existsSync guard the config throws ENOENT and
159
+ // `vite build` fails before it starts.
160
+ existsSync(bindingsDir)
161
+ ? readdirSync(bindingsDir)
162
+ .filter(f => f.endsWith(".sql")).map(f => f.slice(0, -4))
163
+ : [],
158
164
  ),
159
165
  },
160
166
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makoai/app-sdk",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "Mako app SDK: data bindings (useQuery/useDuckDB), URL state, theme, and the house dashboard kit (/ui).",
5
5
  "license": "MIT",
6
6
  "repository": {