@n-dream/builders-sdk 0.2.2 → 0.2.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 +1 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ later.
|
|
|
25
25
|
```ts
|
|
26
26
|
import { currentUser } from "@builders/sdk/next"; // server code only
|
|
27
27
|
import { db, ai, storage, notify, secrets } from "@builders/sdk";
|
|
28
|
+
import { z } from "zod";
|
|
28
29
|
|
|
29
30
|
const user = await currentUser(); // { email, name }
|
|
30
31
|
const notes = db.collection<{ text: string; author: string }>("notes");
|
package/dist/index.js
CHANGED
|
@@ -556,7 +556,7 @@ async function googleAccessToken() {
|
|
|
556
556
|
}
|
|
557
557
|
var NotOnBuildersError = class extends BuildersError {
|
|
558
558
|
constructor(what) {
|
|
559
|
-
super(`${what} works only in a saved version or the live app on Builders, not in the
|
|
559
|
+
super(`${what} works only in a saved version or the live app on Builders, not in the dev preview or on this computer. Save a version and try it there.`, 503);
|
|
560
560
|
this.name = "NotOnBuildersError";
|
|
561
561
|
}
|
|
562
562
|
};
|
|
@@ -807,7 +807,7 @@ var secrets = {
|
|
|
807
807
|
const bad = secretNameError(name);
|
|
808
808
|
if (bad) throw new BuildersError(`"${name}" is not a secret name. ${bad}`, 400);
|
|
809
809
|
if (process.env[APP_ENV.revision] === "preview") {
|
|
810
|
-
throw new BuildersError(`Secrets work only in the live app, not in a version preview.
|
|
810
|
+
throw new BuildersError(`Secrets work only in the live app, not in a version preview. Make the version live to use ${name}; until then show a message instead.`, 503);
|
|
811
811
|
}
|
|
812
812
|
const project = process.env[APP_ENV.project];
|
|
813
813
|
if (!project) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n-dream/builders-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Builders platform helpers for app code: signed-in user, database, AI, file storage, notifications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://builders.n-dream.com",
|