@softr/sdk 1.6.1-alpha.1 → 1.6.1-alpha.2
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/CHANGELOG.md +1 -1
- package/dist/codegen/user-groups.js +5 -5
- package/dist/formatting.d.ts +3 -3
- package/dist/package.js +1 -1
- package/dist/pwa.d.ts +2 -2
- package/package.json +1 -1
- package/skills/softr-sdk/SKILL.md +1 -1
- package/skills/softr-sdk/ai/SKILL.md +1 -1
- package/skills/softr-sdk/auth/SKILL.md +1 -1
- package/skills/softr-sdk/charts-and-metrics/SKILL.md +1 -1
- package/skills/softr-sdk/current-user/SKILL.md +1 -1
- package/skills/softr-sdk/email/SKILL.md +1 -1
- package/skills/softr-sdk/file-uploads/SKILL.md +1 -1
- package/skills/softr-sdk/formatting/SKILL.md +1 -1
- package/skills/softr-sdk/integrations/SKILL.md +1 -1
- package/skills/softr-sdk/mcp/SKILL.md +1 -1
- package/skills/softr-sdk/push-notifications/SKILL.md +1 -1
- package/skills/softr-sdk/pwa/SKILL.md +1 -1
- package/skills/softr-sdk/record-mutations/SKILL.md +1 -1
- package/skills/softr-sdk/record-queries/SKILL.md +1 -1
- package/skills/softr-sdk/region-visibility/SKILL.md +1 -1
- package/skills/softr-sdk/routes-and-visibility/SKILL.md +1 -1
- package/skills/softr-sdk/workflows/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- `docs/user-groups.md` names the custom user groups the workspace's plan
|
|
7
|
+
- `docs/user-groups.md` names the custom user groups past the workspace's plan limit, in a section of their own. A page or an action gated on one of them admits nobody.
|
|
8
8
|
|
|
9
9
|
## 1.6.0
|
|
10
10
|
|
|
@@ -19,19 +19,19 @@ function renderUserGroupsDoc(groups) {
|
|
|
19
19
|
"This app has no user groups.",
|
|
20
20
|
""
|
|
21
21
|
].join("\n");
|
|
22
|
-
const
|
|
22
|
+
const pastLimit = groups.filter((group) => group.exceedsPlanLimit === true);
|
|
23
23
|
return [
|
|
24
24
|
...heading,
|
|
25
25
|
"User groups available in this app:",
|
|
26
26
|
"",
|
|
27
27
|
...groups.map(({ id, name, type }) => `- ${name} (${id}), ${type.toLowerCase()}`),
|
|
28
28
|
"",
|
|
29
|
-
...
|
|
30
|
-
"##
|
|
29
|
+
...pastLimit.length === 0 ? [] : [
|
|
30
|
+
"## Not available on the workspace's plan",
|
|
31
31
|
"",
|
|
32
|
-
"The plan allows fewer custom user groups than this app has.
|
|
32
|
+
"The plan allows fewer custom user groups than this app has. The groups below are kept with their members, but nobody counts as a member of them until the plan is upgraded, so a page or an action limited to one of them admits no user:",
|
|
33
33
|
"",
|
|
34
|
-
...
|
|
34
|
+
...pastLimit.map(({ id, name }) => `- ${name} (${id})`),
|
|
35
35
|
""
|
|
36
36
|
]
|
|
37
37
|
].join("\n");
|
package/dist/formatting.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react0 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/formatting.d.ts
|
|
@@ -96,7 +96,7 @@ declare function FormattingScope({
|
|
|
96
96
|
/** A BCP 47 locale, such as `de-DE`. It drops the app's fixed date format inside the scope. */
|
|
97
97
|
locale?: string;
|
|
98
98
|
children?: ReactNode;
|
|
99
|
-
}):
|
|
99
|
+
}): react0.FunctionComponentElement<react0.ProviderProps<Scope>>;
|
|
100
100
|
/**
|
|
101
101
|
* A date in the app's format, in a `<span>`, safe to render on the server. A
|
|
102
102
|
* timestamp whose zone is not known yet renders `fallback` until the browser
|
|
@@ -118,7 +118,7 @@ declare function FormattedDate({
|
|
|
118
118
|
time?: boolean;
|
|
119
119
|
/** What renders while the visitor's zone is unknown. */
|
|
120
120
|
fallback?: ReactNode;
|
|
121
|
-
}):
|
|
121
|
+
}): react0.FunctionComponentElement<react0.FragmentProps> | react0.DetailedReactHTMLElement<{
|
|
122
122
|
suppressHydrationWarning: true;
|
|
123
123
|
}, HTMLElement> | null;
|
|
124
124
|
//#endregion
|
package/dist/package.js
CHANGED
package/dist/pwa.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react5 from "react";
|
|
2
2
|
import "@tanstack/react-start";
|
|
3
3
|
|
|
4
4
|
//#region src/pwa.d.ts
|
|
@@ -24,7 +24,7 @@ import "@tanstack/react-start";
|
|
|
24
24
|
* )
|
|
25
25
|
* }
|
|
26
26
|
*/
|
|
27
|
-
declare function SoftrPwaHead():
|
|
27
|
+
declare function SoftrPwaHead(): react5.FunctionComponentElement<react5.FragmentProps>;
|
|
28
28
|
type PwaPlatform = "ios" | "android" | "desktop";
|
|
29
29
|
type PwaInstall = {
|
|
30
30
|
available: false;
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ description: >-
|
|
|
13
13
|
metadata:
|
|
14
14
|
type: sub-skill
|
|
15
15
|
library: softr-sdk
|
|
16
|
-
library_version: 1.6.1-alpha.
|
|
16
|
+
library_version: 1.6.1-alpha.2
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
**Boundary.** `ai` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineAiAction` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
metadata:
|
|
11
11
|
type: sub-skill
|
|
12
12
|
library: softr-sdk
|
|
13
|
-
library_version: 1.6.1-alpha.
|
|
13
|
+
library_version: 1.6.1-alpha.2
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
**Boundary.** `auth` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build.
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
metadata:
|
|
11
11
|
type: sub-skill
|
|
12
12
|
library: softr-sdk
|
|
13
|
-
library_version: 1.6.1-alpha.
|
|
13
|
+
library_version: 1.6.1-alpha.2
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
**Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler or a server-side route hook — importing it into a component fails the build. `defineQuery` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -12,7 +12,7 @@ description: >-
|
|
|
12
12
|
metadata:
|
|
13
13
|
type: sub-skill
|
|
14
14
|
library: softr-sdk
|
|
15
|
-
library_version: 1.6.1-alpha.
|
|
15
|
+
library_version: 1.6.1-alpha.2
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
**Boundary.** `email` and `EmailError` live on `@softr/sdk/server` and run only inside a `createServerFn` handler — importing them into a component fails the build. `defineEmailAction` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
metadata:
|
|
8
8
|
type: sub-skill
|
|
9
9
|
library: softr-sdk
|
|
10
|
-
library_version: 1.6.1-alpha.
|
|
10
|
+
library_version: 1.6.1-alpha.2
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
**Boundary.** `upload` lives on `@softr/sdk/server` and runs inside server functions. `useFileUpload` and `FileItem` live on `@softr/sdk` and run in components. `FileAttachment` comes from `@softr/sdk` and can be imported anywhere.
|
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
metadata:
|
|
8
8
|
type: sub-skill
|
|
9
9
|
library: softr-sdk
|
|
10
|
-
library_version: 1.6.1-alpha.
|
|
10
|
+
library_version: 1.6.1-alpha.2
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
**Boundary.** `integration` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineIntegration` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.6.1-alpha.
|
|
12
|
+
library_version: 1.6.1-alpha.2
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
**Boundary.** `softrMcpMiddleware` lives on `@softr/sdk` and is registered once, in `src/start.ts`. The actions you hand it are the same `defineQuery` / `defineMutation` values the app's own pages use — declared wherever they already live, not duplicated for MCP.
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
metadata:
|
|
11
11
|
type: sub-skill
|
|
12
12
|
library: softr-sdk
|
|
13
|
-
library_version: 1.6.1-alpha.
|
|
13
|
+
library_version: 1.6.1-alpha.2
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
**Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineMutation` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -11,7 +11,7 @@ description: >-
|
|
|
11
11
|
metadata:
|
|
12
12
|
type: sub-skill
|
|
13
13
|
library: softr-sdk
|
|
14
|
-
library_version: 1.6.1-alpha.
|
|
14
|
+
library_version: 1.6.1-alpha.2
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
**Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler or a server-side route hook — importing it into a component fails the build. The same holds for any helper that calls `ds`: declare it inside the handler. A function at module level that calls `ds` keeps the server-only import in the browser bundle, and every page stops loading until it moves. `defineQuery` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.6.1-alpha.
|
|
12
|
+
library_version: 1.6.1-alpha.2
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
**Boundary.** `definePage`, `pageHead`, the access functions and the error predicates come from `@softr/sdk` and work anywhere.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.6.1-alpha.
|
|
12
|
+
library_version: 1.6.1-alpha.2
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
**Boundary.** `workflow` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineWorkflow` and every type come from `@softr/sdk` and can be imported anywhere.
|