@plitzi/sdk-shared 0.38.18 → 0.38.19
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 +24 -0
- package/dist/dataSource/getBindingsDetails.mjs +1 -1
- package/dist/dataSource/resolveVariables.mjs +1 -1
- package/dist/helpers/generateFacade.mjs +1 -1
- package/dist/helpers/ruleEvaluator.d.ts +4 -4
- package/dist/helpers/ruleEvaluator.mjs +1 -1
- package/dist/helpers/utils.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @plitzi/sdk-shared
|
|
2
2
|
|
|
3
|
+
## 0.38.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 92a9f1b: ## Security
|
|
8
|
+
|
|
9
|
+
- **The `Origin` fallback tells the ports apart over HTTP/2 too** (`@plitzi/sdk-server`): a browser that sends no
|
|
10
|
+
`Sec-Fetch-Site` (Safari before 16.4, older webviews) is judged by its `Origin`, compared with the authority the
|
|
11
|
+
request was addressed to. HTTP/2 carries no `Host` header — the authority is `:authority` — and the comparison then
|
|
12
|
+
fell back to the host's NAME, so every port and scheme of it counted as this server's own: what 0.38.18 closed for
|
|
13
|
+
`same-site` stayed open there, over TLS, where a Plitzi server speaks HTTP/2. The authority is now `:authority`,
|
|
14
|
+
`Host`, or the `X-Forwarded-Host` a proxy in front wrote — whichever names the host the request is answered as — port
|
|
15
|
+
included; when none does, the origin is not taken as its own. The write guard (`crossSiteWrites`), the sign-in's
|
|
16
|
+
login-CSRF check and `createOriginGuardMiddleware` share it.
|
|
17
|
+
|
|
18
|
+
## Packages
|
|
19
|
+
- **The server evaluates rules without the query editor** (`@plitzi/sdk-shared`, `@plitzi/sdk-auth`,
|
|
20
|
+
`@plitzi/sdk-elements`, `@plitzi/sdk-interactions`, `@plitzi/plitzi-builder`): every evaluation of a `when` rule
|
|
21
|
+
group imports `QueryBuilderEvaluator` from `@plitzi/plitzi-ui/QueryBuilder/evaluator` — the evaluator alone — instead
|
|
22
|
+
of the `QueryBuilder` barrel, which brings the editor's React components, or `QueryBuilder/helpers`, which brings the
|
|
23
|
+
SQL and MongoDB formatters. `@plitzi/sdk-shared/helpers` reads `get` and `omit` from `@plitzi/plitzi-ui/helpers/lodash`.
|
|
24
|
+
Importing `@plitzi/sdk-server` loads 19 modules of `@plitzi/plitzi-ui` (26 before) and neither
|
|
25
|
+
`class-variance-authority` nor `clsx`, and starts in ~125 ms (~150 before). Needs `@plitzi/plitzi-ui` 1.6.34.
|
|
26
|
+
|
|
3
27
|
## 0.38.18
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -2,7 +2,7 @@ import { isTrue as e } from "./utility/truthiness.mjs";
|
|
|
2
2
|
import t from "./utility/index.mjs";
|
|
3
3
|
import { checkboxParams as n } from "./utility/checkboxParams.mjs";
|
|
4
4
|
import { camelCase as r, get as i, set as a } from "@plitzi/plitzi-ui/helpers/lodash";
|
|
5
|
-
import { QueryBuilderEvaluator as o } from "@plitzi/plitzi-ui/QueryBuilder";
|
|
5
|
+
import { QueryBuilderEvaluator as o } from "@plitzi/plitzi-ui/QueryBuilder/evaluator";
|
|
6
6
|
import { produce as s } from "immer";
|
|
7
7
|
//#region src/dataSource/getBindingsDetails.ts
|
|
8
8
|
var c = (e, t, n, r, a) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryBuilderEvaluator as e } from "@plitzi/plitzi-ui/QueryBuilder";
|
|
1
|
+
import { QueryBuilderEvaluator as e } from "@plitzi/plitzi-ui/QueryBuilder/evaluator";
|
|
2
2
|
//#region src/dataSource/resolveVariables.ts
|
|
3
3
|
var t = (t, n = {}) => Array.isArray(t) ? t.reduce((t, r) => {
|
|
4
4
|
let { name: i, value: a, subValues: o } = r;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "./isRecord.mjs";
|
|
2
|
-
import { omit as t } from "@plitzi/plitzi-ui/helpers";
|
|
2
|
+
import { omit as t } from "@plitzi/plitzi-ui/helpers/lodash";
|
|
3
3
|
//#region src/helpers/generateFacade.tsx
|
|
4
4
|
var n = (e) => e.replace(/^@/, "").replace(/[-/]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()).replace(/\s+/g, ""), r = (t, n) => {
|
|
5
5
|
let r = Reflect.get(window, t), i = e(r) ? r[n] : void 0;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { RuleGroup, RuleValue } from '@plitzi/plitzi-ui/QueryBuilder';
|
|
1
|
+
import { RuleGroup, RuleValue } from '@plitzi/plitzi-ui/QueryBuilder/evaluator';
|
|
2
2
|
/**
|
|
3
3
|
* Evaluates a `when` rule group against a value bag.
|
|
4
4
|
*
|
|
5
5
|
* A rule group has to be evaluated on both sides — the browser for an interaction, the server for an action — and
|
|
6
6
|
* the only implementation lives in `plitzi-ui`. This wrapper exists for two reasons beyond naming:
|
|
7
7
|
*
|
|
8
|
-
* - the `@plitzi/plitzi-ui/QueryBuilder` BARREL pulls the React components with it,
|
|
9
|
-
*
|
|
8
|
+
* - the `@plitzi/plitzi-ui/QueryBuilder` BARREL pulls the React components with it, and `/QueryBuilder/helpers` the
|
|
9
|
+
* SQL and MongoDB formatters; `/QueryBuilder/evaluator` is the evaluator alone, which is all a server loads;
|
|
10
10
|
* - it keeps `plitzi-ui` out of the server's dependency list. `sdk-shared` already depends on it, so the chain is
|
|
11
11
|
* declared in exactly one place.
|
|
12
12
|
*/
|
|
13
13
|
export declare const evaluateRuleGroup: (group: RuleGroup, values: Record<string, RuleValue>) => boolean;
|
|
14
|
-
export type { Rule, RuleGroup, RuleValue } from '@plitzi/plitzi-ui/QueryBuilder';
|
|
14
|
+
export type { Rule, RuleGroup, RuleValue } from '@plitzi/plitzi-ui/QueryBuilder/evaluator';
|
package/dist/helpers/utils.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-shared",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.19",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@plitzi/nexus": "^1.4.0",
|
|
37
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
37
|
+
"@plitzi/plitzi-ui": "^1.6.34",
|
|
38
38
|
"date-fns": "^4.4.0",
|
|
39
39
|
"immer": "^11.1.21",
|
|
40
40
|
"zod": "^4.6.7"
|