veryfront 0.1.1233 → 0.1.1235
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/esm/_dnt.shims.js +19 -4
- package/esm/deno.d.ts +3 -0
- package/esm/deno.js +5 -2
- package/esm/src/cache/backends/factory.js +1 -1
- package/esm/src/chat/upload-handler.d.ts.map +1 -1
- package/esm/src/chat/upload-handler.js +10 -1
- package/esm/src/embedding/upload-handler.d.ts +2 -2
- package/esm/src/embedding/upload-handler.d.ts.map +1 -1
- package/esm/src/embedding/upload-handler.js +41 -2
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/index.client.d.ts +1 -1
- package/esm/src/index.client.d.ts.map +1 -1
- package/esm/src/index.client.js +6 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +14 -0
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.js +40 -22
- package/esm/src/modules/server/browser-module-admission.d.ts +7 -0
- package/esm/src/modules/server/browser-module-admission.d.ts.map +1 -1
- package/esm/src/modules/server/browser-module-admission.js +3 -1
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +1 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts +15 -0
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.js +16 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +22 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts.map +1 -1
- package/esm/src/platform/compat/http/pinned-fetch.js +149 -83
- package/esm/src/proxy/handler.js +1 -1
- package/esm/src/security/http/local-control-request.d.ts +10 -11
- package/esm/src/security/http/local-control-request.d.ts.map +1 -1
- package/esm/src/security/http/local-control-request.js +19 -22
- package/esm/src/security/http/response/security-handler.js +2 -2
- package/esm/src/security/input-validation/handler.d.ts +23 -0
- package/esm/src/security/input-validation/handler.d.ts.map +1 -1
- package/esm/src/security/input-validation/handler.js +45 -1
- package/esm/src/server/dev-server/route-discovery.d.ts +14 -0
- package/esm/src/server/dev-server/route-discovery.d.ts.map +1 -1
- package/esm/src/server/dev-server/route-discovery.js +34 -10
- package/esm/src/server/handlers/dev/projects/api.js +2 -2
- package/esm/src/server/runtime-handler/adapter-factory.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/adapter-factory.js +15 -5
- package/esm/src/server/utils/domain-parser.d.ts +11 -10
- package/esm/src/server/utils/domain-parser.d.ts.map +1 -1
- package/esm/src/server/utils/domain-parser.js +43 -38
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +63 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +8 -8
package/esm/_dnt.shims.js
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
import { Deno as dntShimDeno } from "@deno/shim-deno";
|
|
2
1
|
const dntNativeDeno = globalThis.Deno;
|
|
3
2
|
// Prefer the host runtime's own Deno. The `@deno/shim-deno` fallback exists
|
|
4
3
|
// for Node and Bun; under Deno it shadows working native APIs with node:net
|
|
5
4
|
// reimplementations that throw (e.g. Deno.listen reads `server._handle.fd`,
|
|
6
5
|
// which is null on Deno's node compatibility layer).
|
|
6
|
+
//
|
|
7
|
+
// It loads lazily so Deno never resolves it at all. The esm transform
|
|
8
|
+
// rewrites the bare specifier to an absolute file:// bundle, and Deno
|
|
9
|
+
// refuses to prepare that graph node when node_modules is unmanaged, which
|
|
10
|
+
// is what `deno install -g` produces (`nodeModulesDir: "manual"`). A static
|
|
11
|
+
// import therefore failed every request with "Loading unprepared module"
|
|
12
|
+
// naming a bundle that was present on disk, on the one runtime that never
|
|
13
|
+
// reads the value.
|
|
7
14
|
export const Deno = typeof dntNativeDeno?.version?.deno === "string"
|
|
8
15
|
? dntNativeDeno
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
: (await import("@deno/shim-deno")).Deno;
|
|
17
|
+
const dntNativeCrypto = globalThis.crypto;
|
|
18
|
+
// Web Crypto is a global on every runtime the framework supports (Deno,
|
|
19
|
+
// Node 19+, Bun), so `@deno/shim-crypto` is a fallback for runtimes that no
|
|
20
|
+
// longer exist in practice. It loads lazily for the same reason the Deno
|
|
21
|
+
// shim does: the esm transform rewrites the bare specifier to an absolute
|
|
22
|
+
// file:// bundle, and Deno cannot prepare that graph node when node_modules
|
|
23
|
+
// is unmanaged.
|
|
24
|
+
export const crypto = dntNativeCrypto !== undefined
|
|
25
|
+
? dntNativeCrypto
|
|
26
|
+
: (await import("@deno/shim-crypto")).crypto;
|
|
12
27
|
const dntGlobals = {
|
|
13
28
|
Deno,
|
|
14
29
|
crypto,
|
package/esm/deno.d.ts
CHANGED
|
@@ -432,6 +432,9 @@ declare namespace _default {
|
|
|
432
432
|
"lint:chat-ratchets": string;
|
|
433
433
|
"lint:esm-sh-codemod": string;
|
|
434
434
|
"lint:test-typecheck": string;
|
|
435
|
+
"lint:client-bundle": string;
|
|
436
|
+
"lint:client-bundle:update": string;
|
|
437
|
+
"client-bundle:report": string;
|
|
435
438
|
docs: string;
|
|
436
439
|
"docs:api-reference:check": string;
|
|
437
440
|
"docs:errors": string;
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1235",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -496,7 +496,7 @@ export default {
|
|
|
496
496
|
"build:storybook": "npm --prefix storybook run build-storybook",
|
|
497
497
|
"storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
|
|
498
498
|
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint && deno lint --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-meta-property-safety.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/prepare-framework-sources.test.ts && deno lint --config=scripts/codemods/deno.json scripts/codemods/",
|
|
499
|
-
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:chat-composability && deno task lint:rfc-status && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task lint:dnt-meta-properties && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:public:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run=bash scripts/ci/setup-deno-workflow.test.ts scripts/ci/prepare-rc-build.test.ts scripts/build/generated-artifact-checks.test.ts",
|
|
499
|
+
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:client-bundle && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:chat-composability && deno task lint:rfc-status && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task lint:dnt-meta-properties && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:public:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run=bash scripts/ci/setup-deno-workflow.test.ts scripts/ci/prepare-rc-build.test.ts scripts/build/generated-artifact-checks.test.ts",
|
|
500
500
|
"fmt": "deno fmt src/ cli/ react/ templates/ && deno fmt --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-meta-property-safety.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --config=scripts/codemods/deno.json scripts/codemods/",
|
|
501
501
|
"fmt:check": "deno fmt --check src/ cli/ react/ templates/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-meta-property-safety.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --check --config=scripts/codemods/deno.json scripts/codemods/",
|
|
502
502
|
"typecheck": "deno task generate:manifests:check && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/html/hydration-script-builder/runtime/main.ts src/modules/index.ts src/proxy/main.ts src/react/components/ui/index.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/agent/service/route-export.check.ts src/eval/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/runs/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
@@ -508,6 +508,9 @@ export default {
|
|
|
508
508
|
"lint:chat-ratchets": "deno run --allow-read scripts/lint/ban-chat-antipatterns.ts && deno check --no-config --frozen --lock=deno.lock scripts/codemods/migrate-chat-composition.ts && deno check --config=deno.json --frozen --lock=deno.lock src/react/chat-barrels.check.ts && deno test --frozen --config=scripts/codemods/deno.json --no-check --allow-read --allow-write --allow-env=BABEL_TYPES_8_BREAKING scripts/codemods/migrate-chat-composition.test.ts",
|
|
509
509
|
"lint:esm-sh-codemod": "deno check --no-config --frozen --lock=deno.lock scripts/codemods/migrate-esm-sh-imports.ts && deno test --frozen --config=scripts/codemods/deno.json --no-check --allow-read --allow-write --allow-env=BABEL_TYPES_8_BREAKING scripts/codemods/migrate-esm-sh-imports.test.ts",
|
|
510
510
|
"lint:test-typecheck": "deno run --allow-read --allow-run scripts/lint/check-test-typecheck-baseline.ts",
|
|
511
|
+
"lint:client-bundle": "deno lint --config=scripts/test.deno.json scripts/lint/client-bundle-graph.ts scripts/lint/audit-client-bundle.ts scripts/lint/client-bundle-graph.test.ts && deno run --allow-read scripts/lint/audit-client-bundle.ts && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read scripts/lint/client-bundle-graph.test.ts",
|
|
512
|
+
"lint:client-bundle:update": "deno run --allow-read --allow-write scripts/lint/audit-client-bundle.ts --update",
|
|
513
|
+
"client-bundle:report": "deno run --allow-read scripts/lint/audit-client-bundle.ts --markdown",
|
|
511
514
|
"docs": "deno run --allow-read --allow-write --allow-run --allow-env scripts/docs/generate-api-reference.ts",
|
|
512
515
|
"docs:api-reference:check": "deno run --allow-read --allow-write --allow-run --allow-env scripts/docs/generate-api-reference.ts --check",
|
|
513
516
|
"docs:errors": "deno run --allow-read --allow-write --allow-run --allow-env scripts/docs/generate-error-reference.ts",
|
|
@@ -15,7 +15,7 @@ export function isApiCacheAvailable() {
|
|
|
15
15
|
const apiUrl = getHostEnv("VERYFRONT_API_BASE_URL");
|
|
16
16
|
const isProduction = proxyMode === "1" ||
|
|
17
17
|
nodeEnv === "production" ||
|
|
18
|
-
!!(apiUrl && !apiUrl.includes("localhost")
|
|
18
|
+
!!(apiUrl && !apiUrl.includes("localhost"));
|
|
19
19
|
return isProduction && !!apiUrl;
|
|
20
20
|
}
|
|
21
21
|
export function isDiskCacheConfigured() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-handler.d.ts","sourceRoot":"","sources":["../../../src/src/chat/upload-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"upload-handler.d.ts","sourceRoot":"","sources":["../../../src/src/chat/upload-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAqBtE,yDAAyD;AACzD,MAAM,MAAM,6BAA6B,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE/D,gDAAgD;AAChD,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,OAAO,KACb,6BAA6B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAE5E,yDAAyD;AACzD,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAqRD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,GAAE,uBAA4B,GACnC;IACD,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9C,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CACjD,CA6JA"}
|
|
@@ -32,6 +32,7 @@ import { isProduction } from "../platform/environment.js";
|
|
|
32
32
|
import { CONFIG_INVALID } from "../errors/index.js";
|
|
33
33
|
import { isSafeBlobId } from "../workflow/blob/blob-id.js";
|
|
34
34
|
import { serverLogger } from "../utils/index.js";
|
|
35
|
+
import { resolveValidatedRequest } from "../security/input-validation/handler.js";
|
|
35
36
|
import * as nodeBuffer from "node:buffer";
|
|
36
37
|
/** 25 MB default cap. Attachments are references, not bulk transfer. */
|
|
37
38
|
const DEFAULT_MAX_FILE_SIZE = 25 * 1024 * 1024;
|
|
@@ -407,5 +408,13 @@ export function createChatUploadHandler(config = {}) {
|
|
|
407
408
|
return failureResponse(error, request.signal);
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
|
-
|
|
411
|
+
// Resolve at the boundary rather than at each use. The pages executor calls
|
|
412
|
+
// method handlers with its APIContext, and these handlers read `signal`,
|
|
413
|
+
// `headers` and `url` as well as the body, so unwrapping one of them would
|
|
414
|
+
// still leave the rest reading from the context.
|
|
415
|
+
return {
|
|
416
|
+
POST: (request) => POST(resolveValidatedRequest(request)),
|
|
417
|
+
GET: (request) => GET(resolveValidatedRequest(request)),
|
|
418
|
+
DELETE: (request) => DELETE(resolveValidatedRequest(request)),
|
|
419
|
+
};
|
|
411
420
|
}
|
|
@@ -48,8 +48,8 @@ export interface UploadHandlerConfig {
|
|
|
48
48
|
export declare function createUploadHandler(store: RagStore, config: UploadHandlerConfig): {
|
|
49
49
|
POST: (request: Request) => Promise<Response>;
|
|
50
50
|
GET: (request?: Request) => Promise<Response>;
|
|
51
|
-
DELETE: (request: Request, context
|
|
52
|
-
params
|
|
51
|
+
DELETE: (request: Request, context?: {
|
|
52
|
+
params?: Record<string, string>;
|
|
53
53
|
}) => Promise<Response>;
|
|
54
54
|
};
|
|
55
55
|
//# sourceMappingURL=upload-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-handler.d.ts","sourceRoot":"","sources":["../../../src/src/embedding/upload-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"upload-handler.d.ts","sourceRoot":"","sources":["../../../src/src/embedding/upload-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,QAAQ,EAAE,MAAM,YAAY,CAAC;AA0F5D,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,OAAO,KACb,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAEpE,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,IAAI,CAAA;CAAE,GAC5C;IAAE,SAAS,EAAE,eAAe,CAAA;CAAE,CAAC;AAEnC,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAgJD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,mBAAmB;oBA0IT,OAAO;oBACP,OAAO;sBACL,OAAO,YAAY;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE;EAG3E"}
|
|
@@ -4,6 +4,7 @@ import { VeryfrontCloudBlobStorage } from "../workflow/blob/veryfront-cloud-stor
|
|
|
4
4
|
import { serverLogger } from "../utils/index.js";
|
|
5
5
|
import { loadUpload } from "./upload-loader.js";
|
|
6
6
|
import * as nodeBuffer from "node:buffer";
|
|
7
|
+
import { resolveValidatedRequest } from "../security/input-validation/handler.js";
|
|
7
8
|
const FileCtor = globalThis.File ??
|
|
8
9
|
nodeBuffer.File;
|
|
9
10
|
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
|
|
@@ -156,8 +157,40 @@ function toUploadRegistryItem(upload) {
|
|
|
156
157
|
...(upload.url ? { url: upload.url } : {}),
|
|
157
158
|
};
|
|
158
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Recover route params from a pages-router context.
|
|
162
|
+
*
|
|
163
|
+
* The app router passes them as a second argument; the pages executor puts them
|
|
164
|
+
* on the context it passes as the only argument, as `Record<string, string |
|
|
165
|
+
* string[]>` for catch-all segments. Without this a handler mounted at
|
|
166
|
+
* `pages/api/uploads/[id].ts` loses its id and falls back to the `?id=` query
|
|
167
|
+
* that a dynamic route does not use.
|
|
168
|
+
*/
|
|
169
|
+
function paramsFromContext(candidate) {
|
|
170
|
+
if (typeof candidate !== "object" || candidate === null)
|
|
171
|
+
return undefined;
|
|
172
|
+
let raw;
|
|
173
|
+
try {
|
|
174
|
+
raw = candidate.params;
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
return undefined;
|
|
178
|
+
}
|
|
179
|
+
if (typeof raw !== "object" || raw === null)
|
|
180
|
+
return undefined;
|
|
181
|
+
const params = {};
|
|
182
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
183
|
+
if (typeof value === "string")
|
|
184
|
+
params[key] = value;
|
|
185
|
+
else if (Array.isArray(value))
|
|
186
|
+
params[key] = value.join("/");
|
|
187
|
+
}
|
|
188
|
+
return { params };
|
|
189
|
+
}
|
|
159
190
|
function resolveDeleteId(request, context) {
|
|
160
|
-
|
|
191
|
+
// The pages executor passes no second argument, so a route mounted there has
|
|
192
|
+
// no `params`. The `?id=` query fallback below is the documented form anyway.
|
|
193
|
+
const fromParams = context?.params?.id;
|
|
161
194
|
if (fromParams)
|
|
162
195
|
return fromParams;
|
|
163
196
|
const fromQuery = new URL(request.url).searchParams.get("id");
|
|
@@ -307,5 +340,11 @@ export function createUploadHandler(store, config) {
|
|
|
307
340
|
return Response.json({ error: "Delete failed" }, { status: 500 });
|
|
308
341
|
}
|
|
309
342
|
}
|
|
310
|
-
|
|
343
|
+
// Resolve at the boundary: these handlers read `formData`, `url` and headers,
|
|
344
|
+
// so unwrapping at one use would leave the others reading the context.
|
|
345
|
+
return {
|
|
346
|
+
POST: (request) => POST(resolveValidatedRequest(request)),
|
|
347
|
+
GET: (request) => GET(request ? resolveValidatedRequest(request) : undefined),
|
|
348
|
+
DELETE: (request, context) => DELETE(resolveValidatedRequest(request), context ?? paramsFromContext(request)),
|
|
349
|
+
};
|
|
311
350
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydration-runtime.generated.d.ts","sourceRoot":"","sources":["../../../../src/src/html/hydration-script-builder/hydration-runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"hydration-runtime.generated.d.ts","sourceRoot":"","sources":["../../../../src/src/html/hydration-script-builder/hydration-runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,wBAAwB,EAAE,MAC073E,CAAC"}
|