deepspace 0.30.2 → 0.31.0
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 +6 -0
- package/dist/{chunk-HCV4V2SU.js → chunk-UWOOAXHQ.js} +2 -2
- package/dist/{chunk-HCV4V2SU.js.map → chunk-UWOOAXHQ.js.map} +1 -1
- package/dist/cli.js +8 -1
- package/dist/cli.js.map +1 -1
- package/dist/documentation-client-core.js +1 -1
- package/dist/documentation-default-renderer.cjs +1 -1
- package/dist/documentation-react.js +1 -1
- package/dist/documentation-runtime.js +1 -1
- package/dist/documentation-server-core.js +1 -1
- package/dist/documentation.js +1 -1
- package/dist/documentation.js.map +1 -1
- package/dist/index.d.ts +24 -11
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +31 -2
- package/dist/server.js +106 -4
- package/dist/server.js.map +1 -1
- package/dist/worker.d.ts +35 -2
- package/dist/worker.js +108 -7
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5732,6 +5732,7 @@ var SECURE_ROOM_BOUNDARIES_MIGRATION_ID = "2026-08-secure-room-boundaries";
|
|
|
5732
5732
|
var ACTION_TOOLS_DELETE_WHERE_MIGRATION_ID = "2026-08-action-tools-delete-where";
|
|
5733
5733
|
var BUILD_INJECTED_APP_ID_MIGRATION_ID = "2026-08-build-injected-app-id";
|
|
5734
5734
|
var ACTION_ROUTES_BEARER_GUARD_MIGRATION_ID = "2026-08-action-routes-bearer-guard";
|
|
5735
|
+
var FILES_SESSION_COOKIE_READS_MIGRATION_ID = "2026-09-files-session-cookie-reads";
|
|
5735
5736
|
function validateAppMigrationIds(value) {
|
|
5736
5737
|
if (!Array.isArray(value)) {
|
|
5737
5738
|
return { valid: false, reason: "app migrations must be a JSON string array" };
|
|
@@ -5789,6 +5790,12 @@ var APP_MIGRATION_GUIDANCE = [
|
|
|
5789
5790
|
description: "Refuse action calls without a bearer token and document their trust boundary",
|
|
5790
5791
|
files: ["src/server/action-routes.ts, when the app has server actions"],
|
|
5791
5792
|
guidance: "After resolveAuth, read `const authHeader = c.req.header('Authorization') ?? ''`, accept only its `Bearer ` token, and return 401 when absent. Document that X-App-Action bypasses per-record RBAC, so each action must authorize record ownership itself. If the app has no server action route, record this migration as not applicable."
|
|
5793
|
+
},
|
|
5794
|
+
{
|
|
5795
|
+
id: FILES_SESSION_COOKIE_READS_MIGRATION_ID,
|
|
5796
|
+
description: "Let private file URLs render in <img>/<audio>/<video> for the signed-in user",
|
|
5797
|
+
files: ["the app-owned HTTP route file that proxies /api/files/*"],
|
|
5798
|
+
guidance: "In the /api/files/* proxy only, replace `const auth = await resolveAuth(c.req.raw, c.env)` with `const auth = (await resolveAuth(c.req.raw, c.env)) ?? (await resolveSessionReadAuth(c.req.raw, c.env))`, importing resolveSessionReadAuth from 'deepspace/worker'. It identifies same-origin GET/HEAD by the app-origin session cookie and returns null for everything else. Do not add it to resolveAuth, which also gates writes. In the same route, skip the JSON URL rewrite for HEAD: change `if (contentType.includes('application/json'))` to `if (contentType.includes('application/json') && c.req.method !== 'HEAD')`, because a HEAD answer carries the content-type but no body and parsing it would turn every failed media probe into a 500."
|
|
5792
5799
|
}
|
|
5793
5800
|
];
|
|
5794
5801
|
var APP_MIGRATION_DEFINITIONS = APP_MIGRATION_GUIDANCE.map(({ id, description }) => ({
|
|
@@ -15991,7 +15998,7 @@ import { join as join28, resolve as resolve22 } from "path";
|
|
|
15991
15998
|
// package.json
|
|
15992
15999
|
var package_default = {
|
|
15993
16000
|
name: "deepspace",
|
|
15994
|
-
version: "0.
|
|
16001
|
+
version: "0.31.0",
|
|
15995
16002
|
engines: {
|
|
15996
16003
|
node: ">=22.15.0 <23 || >=24 <25 || >=26 <27"
|
|
15997
16004
|
},
|