@makoai/app-sdk 2.7.1 → 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.
- package/README.md +9 -3
- package/package.json +1 -1
- package/ui.js +3 -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
|
-
|
|
157
|
-
|
|
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
package/ui.js
CHANGED
|
@@ -347,7 +347,9 @@ export function FreshnessBadge({
|
|
|
347
347
|
const ref = React.useRef(null);
|
|
348
348
|
usePopover(open, setOpen, ref, align);
|
|
349
349
|
const t = normalizeTone(tone);
|
|
350
|
-
|
|
350
|
+
// A footer alone is not a panel: while the app is still checking, the
|
|
351
|
+
// badge must not open onto an empty box.
|
|
352
|
+
const hasPanel = title != null || schedule != null || sources.length > 0 || !!action;
|
|
351
353
|
|
|
352
354
|
return h(
|
|
353
355
|
"div",
|