@terreno/admin-backend 58.0.1 → 58.0.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/CHANGELOG.md +31 -0
- package/dist/routePath.js +8 -3
- package/package.json +7 -7
- package/src/aggregateAdmin.test.ts +10 -0
- package/src/routePath.ts +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,37 @@ Upgrade notes for consumer action live in [`mcp-server/src/docs/upgrades/`](mcp-
|
|
|
20
20
|
|
|
21
21
|
Unreleased changes live in [`changelog/unreleased/`](changelog/unreleased/). Add one Markdown file per feature (see that directory's README) instead of editing this section.
|
|
22
22
|
|
|
23
|
+
## [58.0.3] - 2026-11-11
|
|
24
|
+
|
|
25
|
+
Upgrade note: [`mcp-server/src/docs/upgrades/58.0.3.md`](mcp-server/src/docs/upgrades/58.0.3.md).
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- `fix-code-scanning-alerts` skill: clears every open CodeQL alert on one PR. Fixes close on the master rescan; reviewed false positives go in `.github/code-scanning/dismissals.json` and a workflow dismisses them after merge. CodeQL now also scans pull requests and ignores test files. See `docs/how-to/fix-code-scanning-alerts.md`.
|
|
30
|
+
- **@terreno/syncdb:** `registerTerrenoDevClientDispatch`, `registerTerrenoDevStorage`, and `registerTerrenoDevCommand` for `terreno-mcp-local` dev tooling.
|
|
31
|
+
- **@terreno/mcp-server:** `read_logs` sources `network` and `native`; `dispatch_client_action`, storage read/write, and dev command list/invoke; CDP network capture with header redaction.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- Package tests run as concurrent `bun test --shard` processes through `scripts/test-shards.ts` (half the cores by default, `TERRENO_TEST_SHARDS` to override), and `test:coverage` merges the shards' LCOV. CircleCI now pins Bun 1.4.4, the same version as the local toolchain.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- `Avatar` no longer freezes release builds when its image fails to load. The image error handler passed the native error event to `console.warn`, and with Sentry enabled the app hung while turning that event into a breadcrumb. It now logs only the error message.
|
|
40
|
+
- Mongo filters built from request values reject non-string input with 400 instead of running it as a query operator: AI request explorer `model`, observability review `status`, review batch `promptName`, experiment `datasetId`, trace list filters, push-token `platform`, and `loadDocOr404` ids (404). Sync conflict reloads and tombstone lookups match `_id` with `$eq`.
|
|
41
|
+
- Nested-path helpers in `populate`, RBAC field views, and MCP `excludeFields` skip `__proto__`, `constructor`, and `prototype`, so a crafted path can no longer touch `Object.prototype`.
|
|
42
|
+
- Removed polynomial-time regexes from bearer-header parsing, trailing-slash trimming (syncdb, ui `ListDetailLayout`, jobs Cloud Tasks runner, admin route paths), prompt references, judge score ranges, AI JSON fence stripping, and the MCP import parser.
|
|
43
|
+
- Dataset schema validation stops at the first error (`allErrors` off) to bound work on untrusted input.
|
|
44
|
+
- `isTestUser` in `@terreno/ui` matches `nang.io` and `example.com` as the email domain or a subdomain, not as a substring, and always returns a boolean.
|
|
45
|
+
- MCP OAuth metadata responses set an explicit JSON content type.
|
|
46
|
+
- The example app's AI session id comes from `expo-crypto` `randomUUID` instead of `Math.random`.
|
|
47
|
+
|
|
48
|
+
## [58.0.2] - 2026-11-09
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Patch the remaining critical and high security advisories in Terreno's dependency tree. `@terreno/ui` now asks for `@react-navigation/native` `^7.5.1`, whose `@react-navigation/core` no longer pulls in the vulnerable `decode-uri-component` (#1693). The docs site moves to tinypool 2.2.0 (critical) and serialize-javascript 7.1.4 (#1690, #1691), Metro's stale nested copy no longer brings in image-size 1.x (#1694), and rulesync 43.8.0 drops its pinned zod 4.6.5 (#1695). Dependabot now opens one security PR per advisory instead of one grouped PR per package block (#1689). Expo tooling still carries zod 3.25.76, which has no fixed 3.x release.
|
|
53
|
+
|
|
23
54
|
## [58.0.1] - 2026-11-09
|
|
24
55
|
|
|
25
56
|
### Added
|
package/dist/routePath.js
CHANGED
|
@@ -10,9 +10,14 @@ const normalizeAdminRoutePath = (routePath) => {
|
|
|
10
10
|
if (!path.startsWith("/")) {
|
|
11
11
|
path = `/${path}`;
|
|
12
12
|
}
|
|
13
|
-
if (path.length
|
|
14
|
-
|
|
13
|
+
if (path.length === 1) {
|
|
14
|
+
return path;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
// A loop instead of `/\/+$/` keeps trimming linear on long runs of slashes.
|
|
17
|
+
let end = path.length;
|
|
18
|
+
while (end > 0 && path[end - 1] === "/") {
|
|
19
|
+
end -= 1;
|
|
20
|
+
}
|
|
21
|
+
return path.slice(0, end);
|
|
17
22
|
};
|
|
18
23
|
exports.normalizeAdminRoutePath = normalizeAdminRoutePath;
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@google-cloud/storage": "^7.15.0",
|
|
8
|
-
"@terreno/api": "58.0.
|
|
9
|
-
"@terreno/jobs": "58.0.
|
|
8
|
+
"@terreno/api": "58.0.3",
|
|
9
|
+
"@terreno/jobs": "58.0.3",
|
|
10
10
|
"express": "^5.2.1",
|
|
11
11
|
"luxon": "^3.7.2",
|
|
12
12
|
"multer": "2.5.0"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Admin panel backend plugin for @terreno/api — part of Terreno, the batteries-included TypeScript framework for universal apps.",
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@biomejs/biome": "2.5.13",
|
|
17
|
-
"@terreno/test": "58.0.
|
|
17
|
+
"@terreno/test": "58.0.3",
|
|
18
18
|
"@types/bun": "^1.4.0",
|
|
19
19
|
"@types/express": "^5.0.6",
|
|
20
20
|
"@types/luxon": "^3.7.1",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"lint": "biome check ./src ./e2e",
|
|
59
59
|
"lint:fix": "biome check --write ./src ./e2e",
|
|
60
60
|
"smoke": "bun e2e/smoke.ts",
|
|
61
|
-
"test": "bun test --timeout=120000",
|
|
62
|
-
"test:agent": "AGENT=1 bun test --only-failures --timeout=120000",
|
|
63
|
-
"test:ci": "bun test --timeout=120000",
|
|
61
|
+
"test": "bun ../scripts/test-shards.ts -- --timeout=120000",
|
|
62
|
+
"test:agent": "AGENT=1 bun ../scripts/test-shards.ts -- --only-failures --timeout=120000",
|
|
63
|
+
"test:ci": "bun ../scripts/test-shards.ts -- --timeout=120000",
|
|
64
64
|
"test:coverage": "bun run ../scripts/check-coverage.ts",
|
|
65
65
|
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
66
66
|
},
|
|
67
67
|
"types": "dist/index.d.ts",
|
|
68
|
-
"version": "58.0.
|
|
68
|
+
"version": "58.0.3"
|
|
69
69
|
}
|
|
@@ -36,6 +36,16 @@ describe("normalizeAdminRoutePath", () => {
|
|
|
36
36
|
expect(normalizeAdminRoutePath("/users/")).toBe("/users");
|
|
37
37
|
expect(normalizeAdminRoutePath("users")).toBe("/users");
|
|
38
38
|
});
|
|
39
|
+
|
|
40
|
+
it("keeps the root path and strips long runs of trailing slashes quickly", () => {
|
|
41
|
+
expect(normalizeAdminRoutePath("/")).toBe("/");
|
|
42
|
+
expect(normalizeAdminRoutePath("")).toBe("/");
|
|
43
|
+
expect(normalizeAdminRoutePath("/users///")).toBe("/users");
|
|
44
|
+
const input = `/users${"/".repeat(100_000)}x`;
|
|
45
|
+
const start = performance.now();
|
|
46
|
+
expect(normalizeAdminRoutePath(input)).toBe(input);
|
|
47
|
+
expect(performance.now() - start).toBeLessThan(100);
|
|
48
|
+
});
|
|
39
49
|
});
|
|
40
50
|
|
|
41
51
|
describe("aggregateAdminContributions", () => {
|
package/src/routePath.ts
CHANGED
|
@@ -7,8 +7,13 @@ export const normalizeAdminRoutePath = (routePath: string): string => {
|
|
|
7
7
|
if (!path.startsWith("/")) {
|
|
8
8
|
path = `/${path}`;
|
|
9
9
|
}
|
|
10
|
-
if (path.length
|
|
11
|
-
|
|
10
|
+
if (path.length === 1) {
|
|
11
|
+
return path;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
// A loop instead of `/\/+$/` keeps trimming linear on long runs of slashes.
|
|
14
|
+
let end = path.length;
|
|
15
|
+
while (end > 0 && path[end - 1] === "/") {
|
|
16
|
+
end -= 1;
|
|
17
|
+
}
|
|
18
|
+
return path.slice(0, end);
|
|
14
19
|
};
|