@softr/sdk 0.0.87-alpha.2 → 0.0.87-alpha.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 (43) hide show
  1. package/dist/agent/agent-fns.d.ts +30 -0
  2. package/dist/agent/agent-fns.js +164 -0
  3. package/dist/agent/use-agent-chat.d.ts +94 -0
  4. package/dist/agent/use-agent-chat.js +367 -0
  5. package/dist/auth/isomorphic.d.ts +2 -3
  6. package/dist/auth/isomorphic.js +1 -4
  7. package/dist/auth/methods/authenticator.js +3 -3
  8. package/dist/auth/methods/code.js +1 -1
  9. package/dist/auth/methods/magicLink.js +1 -1
  10. package/dist/auth/methods/password.js +1 -1
  11. package/dist/auth/methods/passwordLink.js +1 -1
  12. package/dist/auth/methods/signup.js +1 -1
  13. package/dist/auth/methods/social.js +1 -1
  14. package/dist/auth/platform.js +1 -1
  15. package/dist/auth/session.js +7 -8
  16. package/dist/cookies.js +3 -29
  17. package/dist/default-error-overlay.d.ts +2 -2
  18. package/dist/index.d.ts +3 -1
  19. package/dist/index.js +3 -1
  20. package/dist/mcp.d.ts +2 -2
  21. package/dist/mcp.js +5 -3
  22. package/dist/package.js +1 -1
  23. package/dist/pwa.d.ts +2 -2
  24. package/dist/route/route.js +1 -1
  25. package/dist/softr-config.schema.js +1 -3
  26. package/package.json +1 -1
  27. package/schema/softr.schema.json +0 -5
  28. package/skills/softr-sdk/SKILL.md +7 -8
  29. package/skills/softr-sdk/agent-chat/SKILL.md +105 -0
  30. package/skills/softr-sdk/auth/SKILL.md +1 -1
  31. package/skills/softr-sdk/charts-and-metrics/SKILL.md +1 -1
  32. package/skills/softr-sdk/current-user/SKILL.md +1 -1
  33. package/skills/softr-sdk/file-uploads/SKILL.md +1 -1
  34. package/skills/softr-sdk/formatting/SKILL.md +1 -1
  35. package/skills/softr-sdk/integrations/SKILL.md +1 -1
  36. package/skills/softr-sdk/mcp/SKILL.md +1 -1
  37. package/skills/softr-sdk/pwa/SKILL.md +1 -1
  38. package/skills/softr-sdk/record-mutations/SKILL.md +1 -1
  39. package/skills/softr-sdk/record-queries/SKILL.md +1 -1
  40. package/skills/softr-sdk/region-visibility/SKILL.md +1 -1
  41. package/skills/softr-sdk/routes-and-visibility/SKILL.md +1 -1
  42. package/skills/softr-sdk/workflows/SKILL.md +1 -1
  43. package/dist/embedding.js +0 -33
package/dist/embedding.js DELETED
@@ -1,33 +0,0 @@
1
- import { softrConfig } from "./softr-config.js";
2
- import { createMiddleware } from "@tanstack/react-start";
3
-
4
- //#region src/embedding.ts
5
- /**
6
- * Stops other sites from showing the published app in an iframe. The origins
7
- * softr.json lists in `allowEmbedding` still can.
8
- *
9
- * Production only. The dev server runs in the preview pod, and Studio shows
10
- * that preview in an iframe on another site.
11
- */
12
- function embeddingMiddleware() {
13
- return createMiddleware({ type: "request" }).server(async ({ next }) => {
14
- const result = await next();
15
- if (process.env.NODE_ENV !== "production") return result;
16
- const policy = [
17
- "frame-ancestors",
18
- "'self'",
19
- ...softrConfig().allowEmbedding ?? []
20
- ].join(" ");
21
- try {
22
- result.response.headers.append("content-security-policy", policy);
23
- return result;
24
- } catch {
25
- const response = new Response(result.response.body, result.response);
26
- response.headers.append("content-security-policy", policy);
27
- return response;
28
- }
29
- });
30
- }
31
-
32
- //#endregion
33
- export { embeddingMiddleware };