veryfront 0.1.221 → 0.1.222

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.
Files changed (33) hide show
  1. package/esm/deno.d.ts +0 -3
  2. package/esm/deno.js +1 -4
  3. package/esm/src/agent/index.d.ts +1 -1
  4. package/esm/src/agent/index.d.ts.map +1 -1
  5. package/esm/src/agent/index.js +1 -1
  6. package/esm/src/agent/runtime-ag-ui-contract.d.ts +2 -0
  7. package/esm/src/agent/runtime-ag-ui-contract.d.ts.map +1 -1
  8. package/esm/src/agent/runtime-ag-ui-contract.js +26 -0
  9. package/esm/src/platform/compat/media-types.d.ts.map +1 -1
  10. package/esm/src/platform/compat/media-types.js +6 -6
  11. package/esm/src/react/components/chat/theme.d.ts +1 -1
  12. package/esm/src/react/components/chat/theme.d.ts.map +1 -1
  13. package/esm/src/react/components/chat/theme.js +1 -1
  14. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  15. package/esm/src/server/handlers/dev/framework-candidates.generated.js +1 -0
  16. package/esm/src/utils/clsx.d.ts +14 -0
  17. package/esm/src/utils/clsx.d.ts.map +1 -0
  18. package/esm/src/utils/clsx.js +32 -0
  19. package/esm/src/utils/mime-types.d.ts +42 -0
  20. package/esm/src/utils/mime-types.d.ts.map +1 -0
  21. package/esm/src/utils/mime-types.js +148 -0
  22. package/esm/src/utils/version-constant.d.ts +1 -1
  23. package/esm/src/utils/version-constant.js +1 -1
  24. package/package.json +1 -3
  25. package/src/deno.js +1 -4
  26. package/src/src/agent/index.ts +2 -0
  27. package/src/src/agent/runtime-ag-ui-contract.ts +37 -0
  28. package/src/src/platform/compat/media-types.ts +10 -6
  29. package/src/src/react/components/chat/theme.ts +1 -1
  30. package/src/src/server/handlers/dev/framework-candidates.generated.ts +1 -0
  31. package/src/src/utils/clsx.ts +40 -0
  32. package/src/src/utils/mime-types.ts +155 -0
  33. package/src/src/utils/version-constant.ts +1 -1
package/esm/deno.d.ts CHANGED
@@ -212,7 +212,6 @@ declare namespace _default {
212
212
  "@std/fs": string;
213
213
  "@std/async": string;
214
214
  "@std/front-matter/yaml": string;
215
- csstype: string;
216
215
  "@types/react": string;
217
216
  "@types/react-dom": string;
218
217
  react: string;
@@ -241,7 +240,6 @@ declare namespace _default {
241
240
  "es-module-lexer": string;
242
241
  "gray-matter": string;
243
242
  zod: string;
244
- "mime-types": string;
245
243
  mdast: string;
246
244
  hast: string;
247
245
  unist: string;
@@ -263,7 +261,6 @@ declare namespace _default {
263
261
  "@babel/generator": string;
264
262
  "@babel/types": string;
265
263
  "class-variance-authority": string;
266
- clsx: string;
267
264
  "tailwind-merge": string;
268
265
  "@kreuzberg/wasm": string;
269
266
  "#kreuzberg-wasm-glue": string;
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.221",
3
+ "version": "0.1.222",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -225,7 +225,6 @@ export default {
225
225
  "@std/fs": "jsr:@std/fs",
226
226
  "@std/async": "jsr:@std/async",
227
227
  "@std/front-matter/yaml": "./src/platform/compat/std/front-matter-yaml.ts",
228
- "csstype": "https://esm.sh/csstype@3.2.3",
229
228
  "@types/react": "https://esm.sh/@types/react@18.3.27?deps=csstype@3.2.3",
230
229
  "@types/react-dom": "https://esm.sh/@types/react-dom@18.3.7?deps=csstype@3.2.3",
231
230
  "react": "https://esm.sh/react@19.2.4?target=es2022&deps=csstype@3.2.3",
@@ -254,7 +253,6 @@ export default {
254
253
  "es-module-lexer": "npm:es-module-lexer@2.0.0",
255
254
  "gray-matter": "npm:gray-matter@4.0.3",
256
255
  "zod": "npm:zod@4.3.6",
257
- "mime-types": "npm:mime-types@3.0.2",
258
256
  "mdast": "npm:@types/mdast@4.0.3",
259
257
  "hast": "npm:@types/hast@3.0.3",
260
258
  "unist": "npm:@types/unist@3.0.2",
@@ -276,7 +274,6 @@ export default {
276
274
  "@babel/generator": "npm:@babel/generator@7.29.1",
277
275
  "@babel/types": "npm:@babel/types@7.29.0",
278
276
  "class-variance-authority": "npm:class-variance-authority@0.7.1",
279
- "clsx": "npm:clsx@2.1.1",
280
277
  "tailwind-merge": "npm:tailwind-merge@3.5.0",
281
278
  "@kreuzberg/wasm": "npm:@kreuzberg/wasm@4.5.2",
282
279
  "#kreuzberg-wasm-glue": "npm:@kreuzberg/wasm@4.5.2/dist/pkg/kreuzberg_wasm.js"
@@ -84,7 +84,7 @@ export { getTextFromParts, getToolArguments, hasArgs, hasInput } from "./types.j
84
84
  export { BufferMemory, ConversationMemory, createMemory, createRedisMemory, type Memory, type MemoryPersistence, type MemoryStats, type RedisClient, RedisMemory, type RedisMemoryConfig, SummaryMemory, } from "./memory/index.js";
85
85
  export { agentAsTool, createWorkflow, getAgent, getAgentsAsTools, getAllAgentIds, registerAgent, type WorkflowConfig, type WorkflowResult, type WorkflowStep, } from "./composition/index.js";
86
86
  export { agent } from "./factory.js";
87
- export { type AgUiRuntimeContextItem, AgUiRuntimeContextItemSchema, type AgUiRuntimeInjectedTool, AgUiRuntimeInjectedToolSchema, type AgUiRuntimeMessage, AgUiRuntimeMessageSchema, type AgUiRuntimeRequest, AgUiRuntimeRequestSchema, } from "./runtime-ag-ui-contract.js";
87
+ export { type AgUiRuntimeContextItem, AgUiRuntimeContextItemSchema, type AgUiRuntimeInjectedTool, AgUiRuntimeInjectedToolSchema, type AgUiRuntimeMessage, AgUiRuntimeMessageSchema, type AgUiRuntimeRequest, AgUiRuntimeRequestSchema, parseAgUiRuntimeRequest, parseAgUiRuntimeRequestOrError, } from "./runtime-ag-ui-contract.js";
88
88
  export { type AgUiBrowserEncodedEvent, type AgUiBrowserEncoderState, type AgUiBrowserRunFinishedMetadata, type AgUiRuntimeStreamEvent, createAgUiBrowserEncoderState, finalizeAgUiBrowserEvents, mapRuntimeStreamEventToAgUiBrowserEvents, } from "./ag-ui-browser-encoder.js";
89
89
  export { mergeToolCallInput, mergeToolInputDelta, parseDataStreamSseEvents, parseToolInputObject, streamDataStreamEvents, stripLeadingEmptyObjectPlaceholder, } from "./data-stream.js";
90
90
  export { expandAllowedRemoteToolNames, getProviderNativeToolNames, type ProviderNativeToolInventoryOptions, } from "./provider-native-tool-inventory.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,OAAO,yBAAyB,CAAC;AAGjC,YAAY,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,OAAO,IAAI,YAAY,EACvB,WAAW,EACX,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnF,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,WAAW,EACX,KAAK,iBAAiB,EACtB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,WAAW,EACX,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAA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C;AAC5B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,8BAA8B,EAC9B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,8BAA8B,EACnC,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,OAAO,yBAAyB,CAAC;AAGjC,YAAY,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,OAAO,IAAI,YAAY,EACvB,WAAW,EACX,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,QAAQ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C"}
@@ -83,7 +83,7 @@ export { getTextFromParts, getToolArguments, hasArgs, hasInput } from "./types.j
83
83
  export { BufferMemory, ConversationMemory, createMemory, createRedisMemory, RedisMemory, SummaryMemory, } from "./memory/index.js";
84
84
  export { agentAsTool, createWorkflow, getAgent, getAgentsAsTools, getAllAgentIds, registerAgent, } from "./composition/index.js";
85
85
  export { agent } from "./factory.js";
86
- export { AgUiRuntimeContextItemSchema, AgUiRuntimeInjectedToolSchema, AgUiRuntimeMessageSchema, AgUiRuntimeRequestSchema, } from "./runtime-ag-ui-contract.js";
86
+ export { AgUiRuntimeContextItemSchema, AgUiRuntimeInjectedToolSchema, AgUiRuntimeMessageSchema, AgUiRuntimeRequestSchema, parseAgUiRuntimeRequest, parseAgUiRuntimeRequestOrError, } from "./runtime-ag-ui-contract.js";
87
87
  export { createAgUiBrowserEncoderState, finalizeAgUiBrowserEvents, mapRuntimeStreamEventToAgUiBrowserEvents, } from "./ag-ui-browser-encoder.js";
88
88
  export { mergeToolCallInput, mergeToolInputDelta, parseDataStreamSseEvents, parseToolInputObject, streamDataStreamEvents, stripLeadingEmptyObjectPlaceholder, } from "./data-stream.js";
89
89
  export { expandAllowedRemoteToolNames, getProviderNativeToolNames, } from "./provider-native-tool-inventory.js";
@@ -204,4 +204,6 @@ export type AgUiRuntimeInjectedTool = z.infer<typeof AgUiRuntimeInjectedToolSche
204
204
  export type AgUiRuntimeContextItem = z.infer<typeof AgUiRuntimeContextItemSchema>;
205
205
  export type AgUiRuntimeMessage = z.infer<typeof AgUiRuntimeMessageSchema>;
206
206
  export type AgUiRuntimeRequest = z.infer<typeof AgUiRuntimeRequestSchema>;
207
+ export declare function parseAgUiRuntimeRequest(request: Request): Promise<AgUiRuntimeRequest>;
208
+ export declare function parseAgUiRuntimeRequestOrError(request: Request): Promise<AgUiRuntimeRequest | Response>;
207
209
  //# sourceMappingURL=runtime-ag-ui-contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-ag-ui-contract.d.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A8B,CAClD,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,kBAAkB,GAAG,QAAQ,CAAC,CA6BxC"}
@@ -107,3 +107,29 @@ export const AgUiRuntimeRequestSchema = z.object({
107
107
  context: z.array(AgUiRuntimeContextSchema).max(10).default([]).refine((value) => isWithinJsonSizeLimit(value, MAX_CONTEXT_TOTAL_BYTES), { message: "context must be less than 64 KB total" }),
108
108
  forwardedProps: z.record(z.string(), z.unknown()).optional().refine((value) => value === undefined || isWithinJsonSizeLimit(value, MAX_FORWARDED_PROPS_BYTES), { message: "forwardedProps must be less than 64 KB" }),
109
109
  });
110
+ export async function parseAgUiRuntimeRequest(request) {
111
+ return AgUiRuntimeRequestSchema.parse(await request.json());
112
+ }
113
+ export async function parseAgUiRuntimeRequestOrError(request) {
114
+ try {
115
+ return await parseAgUiRuntimeRequest(request);
116
+ }
117
+ catch (error) {
118
+ if (error instanceof z.ZodError) {
119
+ return Response.json({
120
+ error: "Invalid AG-UI runtime request",
121
+ details: error.issues.map((issue) => ({
122
+ path: issue.path,
123
+ message: issue.message,
124
+ })),
125
+ }, { status: 400 });
126
+ }
127
+ if (error instanceof SyntaxError || error instanceof TypeError) {
128
+ return Response.json({
129
+ error: "Invalid AG-UI runtime request",
130
+ details: [{ path: [], message: "Malformed JSON request body" }],
131
+ }, { status: 400 });
132
+ }
133
+ throw error;
134
+ }
135
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/media-types.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ5D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1D;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExD"}
1
+ {"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/media-types.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ5D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1D;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExD"}
@@ -1,19 +1,19 @@
1
- import mime from "mime-types";
1
+ import { charset as mimeCharset, extension as mimeExtension, lookup as mimeLookup, } from "../../utils/mime-types.js";
2
2
  export function contentType(path) {
3
- const type = mime.lookup(path);
3
+ const type = mimeLookup(path);
4
4
  if (!type)
5
5
  return undefined;
6
- const cs = mime.charset(type);
6
+ const cs = mimeCharset(type);
7
7
  if (!cs)
8
8
  return type;
9
9
  return `${type}; charset=${cs}`;
10
10
  }
11
11
  export function extension(type) {
12
- return mime.extension(type) ?? undefined;
12
+ return mimeExtension(type) || undefined;
13
13
  }
14
14
  export function lookup(path) {
15
- return mime.lookup(path) ?? undefined;
15
+ return mimeLookup(path) || undefined;
16
16
  }
17
17
  export function charset(type) {
18
- return mime.charset(type) ?? undefined;
18
+ return mimeCharset(type) || undefined;
19
19
  }
@@ -6,7 +6,7 @@
6
6
  * UI automatically inherits those tokens. When standalone, sensible defaults are
7
7
  * injected via <style> on the chat root element.
8
8
  */
9
- import { type ClassValue } from "clsx";
9
+ import { type ClassValue } from "../../../utils/clsx.js";
10
10
  export { cva, type VariantProps } from "class-variance-authority";
11
11
  /**
12
12
  * Generates scoped CSS for the chat UI design tokens.
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/theme.ts"],"names":[],"mappings":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AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,YAAY,EAAE,CAAC,EACf,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GACrB,CAAC,CAsBH;AAED;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD;AAMD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,SAc5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,SAgChC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,SAYlC,CAAC"}
@@ -6,7 +6,7 @@
6
6
  * UI automatically inherits those tokens. When standalone, sensible defaults are
7
7
  * injected via <style> on the chat root element.
8
8
  */
9
- import { clsx } from "clsx";
9
+ import { clsx } from "../../../utils/clsx.js";
10
10
  import { twMerge } from "tailwind-merge";
11
11
  export { cva } from "class-variance-authority";
12
12
  // ---------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"file":"framework-candidates.generated.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/dev/framework-candidates.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAmxKjD,CAAC"}
1
+ {"version":3,"file":"framework-candidates.generated.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/dev/framework-candidates.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAoxKjD,CAAC"}
@@ -5309,6 +5309,7 @@ export const FRAMEWORK_CANDIDATES = [
5309
5309
  "veryfront/testing/assert.ts",
5310
5310
  "veryfront/testing/bdd",
5311
5311
  "veryfront/testing/bdd.ts",
5312
+ "veryfront/utils/clsx.ts",
5312
5313
  "veryfront/utils/html-escape.ts",
5313
5314
  "vf-color-mode",
5314
5315
  "vf-head-style{color:red}",
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Inline implementation of the `clsx` class-name joining utility.
3
+ *
4
+ * API-compatible with the MIT-licensed `clsx` npm package — this is a
5
+ * clean-room rewrite against the public API (named `clsx` export, `ClassValue`
6
+ * type, default export alias); no source was copied.
7
+ *
8
+ * Replaces the `clsx` npm dep per spec §8.3 (inline micro-utilities in core).
9
+ */
10
+ export type ClassValue = string | number | boolean | null | undefined | Record<string, unknown> | ClassValue[];
11
+ type Value = ClassValue;
12
+ export declare function clsx(...args: Value[]): string;
13
+ export default clsx;
14
+ //# sourceMappingURL=clsx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clsx.d.ts","sourceRoot":"","sources":["../../../src/src/utils/clsx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,UAAU,EAAE,CAAC;AAEjB,KAAK,KAAK,GAAG,UAAU,CAAC;AAExB,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAgB7C;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Inline implementation of the `clsx` class-name joining utility.
3
+ *
4
+ * API-compatible with the MIT-licensed `clsx` npm package — this is a
5
+ * clean-room rewrite against the public API (named `clsx` export, `ClassValue`
6
+ * type, default export alias); no source was copied.
7
+ *
8
+ * Replaces the `clsx` npm dep per spec §8.3 (inline micro-utilities in core).
9
+ */
10
+ export function clsx(...args) {
11
+ const out = [];
12
+ for (const arg of args) {
13
+ if (!arg)
14
+ continue;
15
+ if (typeof arg === "string" || typeof arg === "number") {
16
+ out.push(String(arg));
17
+ }
18
+ else if (Array.isArray(arg)) {
19
+ const inner = clsx(...arg);
20
+ if (inner)
21
+ out.push(inner);
22
+ }
23
+ else if (typeof arg === "object") {
24
+ for (const [key, value] of Object.entries(arg)) {
25
+ if (value)
26
+ out.push(key);
27
+ }
28
+ }
29
+ }
30
+ return out.join(" ");
31
+ }
32
+ export default clsx;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Inline implementation of the `mime-types` module surface veryfront uses.
3
+ *
4
+ * API-compatible with the MIT-licensed `mime-types` npm package — this is a
5
+ * clean-room rewrite against the public API; no source was copied. MIME
6
+ * values are IANA-assigned identifiers (not copyrightable).
7
+ *
8
+ * Replaces the npm `mime-types` dep per spec §8.3 with a static lookup table.
9
+ * Covers the extensions veryfront serves internally (web assets, fonts, MDX,
10
+ * WASM, source maps) plus the common upload formats users pass to the
11
+ * `veryfront uploads` CLI — CSV, ZIP archives, office docs, audio/video —
12
+ * so `lookupMimeType()` doesn't silently collapse them to
13
+ * `application/octet-stream`. For unknown extensions `lookup()` still
14
+ * returns `false`, matching the original module's sentinel value.
15
+ */
16
+ /**
17
+ * Look up the MIME type for a file path or bare extension. Accepts values
18
+ * with or without a leading dot. Returns `false` when no mapping is known.
19
+ *
20
+ * Uses `Object.hasOwn()` so extensions that collide with inherited props
21
+ * (e.g. `file.toString`, `file.constructor`) return `false` instead of
22
+ * leaking a function / prototype value through the `?? false` fallback.
23
+ */
24
+ export declare function lookup(path: string): string | false;
25
+ /**
26
+ * Return `"UTF-8"` for MIME types whose payload is text (text/*, JS, JSON).
27
+ * Returns `false` otherwise — matching the original module's sentinel.
28
+ */
29
+ export declare function charset(mime: string): string | false;
30
+ /**
31
+ * Reverse of `lookup()`: given a MIME type, return a canonical file extension
32
+ * (without leading dot) or `false` when unknown. Uses `Object.hasOwn()` for
33
+ * the same reason `lookup()` does (avoid prototype-property leaks).
34
+ */
35
+ export declare function extension(mime: string): string | false;
36
+ declare const _default: {
37
+ lookup: typeof lookup;
38
+ charset: typeof charset;
39
+ extension: typeof extension;
40
+ };
41
+ export default _default;
42
+ //# sourceMappingURL=mime-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mime-types.d.ts","sourceRoot":"","sources":["../../../src/src/utils/mime-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAsGH;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAInD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CASpD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAEtD;;;;;;AAED,wBAA8C"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Inline implementation of the `mime-types` module surface veryfront uses.
3
+ *
4
+ * API-compatible with the MIT-licensed `mime-types` npm package — this is a
5
+ * clean-room rewrite against the public API; no source was copied. MIME
6
+ * values are IANA-assigned identifiers (not copyrightable).
7
+ *
8
+ * Replaces the npm `mime-types` dep per spec §8.3 with a static lookup table.
9
+ * Covers the extensions veryfront serves internally (web assets, fonts, MDX,
10
+ * WASM, source maps) plus the common upload formats users pass to the
11
+ * `veryfront uploads` CLI — CSV, ZIP archives, office docs, audio/video —
12
+ * so `lookupMimeType()` doesn't silently collapse them to
13
+ * `application/octet-stream`. For unknown extensions `lookup()` still
14
+ * returns `false`, matching the original module's sentinel value.
15
+ */
16
+ /**
17
+ * Canonical extension → MIME mapping. Order matters for reverse lookup via
18
+ * `extension()`: the first extension encountered for a given MIME wins, so
19
+ * list the preferred canonical extension first (e.g. `html` before `htm`,
20
+ * `jpg` before `jpeg`). `json` is listed before `map` so source-map MIMEs
21
+ * still resolve to a reasonable extension via forward lookup, while
22
+ * `extension("application/json")` returns `"json"`.
23
+ */
24
+ const TABLE = {
25
+ // Web markup / styles / scripts
26
+ html: "text/html",
27
+ htm: "text/html",
28
+ xhtml: "application/xhtml+xml",
29
+ css: "text/css",
30
+ js: "application/javascript",
31
+ mjs: "application/javascript",
32
+ cjs: "application/javascript",
33
+ json: "application/json",
34
+ map: "application/json",
35
+ jsonld: "application/ld+json",
36
+ xml: "application/xml",
37
+ rss: "application/rss+xml",
38
+ atom: "application/atom+xml",
39
+ // Images
40
+ svg: "image/svg+xml",
41
+ png: "image/png",
42
+ jpg: "image/jpeg",
43
+ jpeg: "image/jpeg",
44
+ gif: "image/gif",
45
+ webp: "image/webp",
46
+ avif: "image/avif",
47
+ ico: "image/vnd.microsoft.icon",
48
+ bmp: "image/bmp",
49
+ tiff: "image/tiff",
50
+ tif: "image/tiff",
51
+ heic: "image/heic",
52
+ heif: "image/heif",
53
+ // Fonts
54
+ woff: "font/woff",
55
+ woff2: "font/woff2",
56
+ ttf: "font/ttf",
57
+ otf: "font/otf",
58
+ eot: "application/vnd.ms-fontobject",
59
+ // Documents
60
+ pdf: "application/pdf",
61
+ txt: "text/plain",
62
+ md: "text/markdown",
63
+ mdx: "text/markdown",
64
+ csv: "text/csv",
65
+ tsv: "text/tab-separated-values",
66
+ rtf: "application/rtf",
67
+ doc: "application/msword",
68
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
69
+ xls: "application/vnd.ms-excel",
70
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
71
+ ppt: "application/vnd.ms-powerpoint",
72
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
73
+ odt: "application/vnd.oasis.opendocument.text",
74
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
75
+ odp: "application/vnd.oasis.opendocument.presentation",
76
+ // Archives
77
+ zip: "application/zip",
78
+ gz: "application/gzip",
79
+ tgz: "application/gzip",
80
+ tar: "application/x-tar",
81
+ "7z": "application/x-7z-compressed",
82
+ bz2: "application/x-bzip2",
83
+ rar: "application/vnd.rar",
84
+ // Audio
85
+ mp3: "audio/mpeg",
86
+ wav: "audio/wav",
87
+ ogg: "audio/ogg",
88
+ m4a: "audio/mp4",
89
+ aac: "audio/aac",
90
+ flac: "audio/flac",
91
+ opus: "audio/ogg",
92
+ // Video
93
+ mp4: "video/mp4",
94
+ webm: "video/webm",
95
+ mov: "video/quicktime",
96
+ avi: "video/x-msvideo",
97
+ mkv: "video/x-matroska",
98
+ ogv: "video/ogg",
99
+ // Config / data
100
+ yaml: "text/yaml",
101
+ yml: "text/yaml",
102
+ toml: "application/toml",
103
+ // WASM + source maps
104
+ wasm: "application/wasm",
105
+ };
106
+ // Reverse lookup: mime → first-listed extension from TABLE.
107
+ const EXT_BY_MIME = (() => {
108
+ const reverse = {};
109
+ for (const [ext, mime] of Object.entries(TABLE)) {
110
+ if (!(mime in reverse))
111
+ reverse[mime] = ext;
112
+ }
113
+ return reverse;
114
+ })();
115
+ /**
116
+ * Look up the MIME type for a file path or bare extension. Accepts values
117
+ * with or without a leading dot. Returns `false` when no mapping is known.
118
+ *
119
+ * Uses `Object.hasOwn()` so extensions that collide with inherited props
120
+ * (e.g. `file.toString`, `file.constructor`) return `false` instead of
121
+ * leaking a function / prototype value through the `?? false` fallback.
122
+ */
123
+ export function lookup(path) {
124
+ const dot = path.lastIndexOf(".");
125
+ const ext = (dot >= 0 ? path.slice(dot + 1) : path).toLowerCase();
126
+ return Object.hasOwn(TABLE, ext) ? TABLE[ext] : false;
127
+ }
128
+ /**
129
+ * Return `"UTF-8"` for MIME types whose payload is text (text/*, JS, JSON).
130
+ * Returns `false` otherwise — matching the original module's sentinel.
131
+ */
132
+ export function charset(mime) {
133
+ if (mime.startsWith("text/") ||
134
+ mime === "application/javascript" ||
135
+ mime === "application/json") {
136
+ return "UTF-8";
137
+ }
138
+ return false;
139
+ }
140
+ /**
141
+ * Reverse of `lookup()`: given a MIME type, return a canonical file extension
142
+ * (without leading dot) or `false` when unknown. Uses `Object.hasOwn()` for
143
+ * the same reason `lookup()` does (avoid prototype-property leaks).
144
+ */
145
+ export function extension(mime) {
146
+ return Object.hasOwn(EXT_BY_MIME, mime) ? EXT_BY_MIME[mime] : false;
147
+ }
148
+ export default { lookup, charset, extension };
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.221";
1
+ export declare const VERSION = "0.1.222";
2
2
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.221";
3
+ export const VERSION = "0.1.222";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.221",
3
+ "version": "0.1.222",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -185,13 +185,11 @@
185
185
  "@types/mdast": "4.0.3",
186
186
  "@types/unist": "3.0.2",
187
187
  "class-variance-authority": "0.7.1",
188
- "clsx": "2.1.1",
189
188
  "es-module-lexer": "2.0.0",
190
189
  "esbuild": "0.27.4",
191
190
  "github-slugger": "2.0.0",
192
191
  "gray-matter": "4.0.3",
193
192
  "mdast-util-to-string": "4.0.0",
194
- "mime-types": "3.0.2",
195
193
  "react": "19.2.4",
196
194
  "react-dom": "19.2.4",
197
195
  "rehype-highlight": "7.0.2",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.221",
3
+ "version": "0.1.222",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -225,7 +225,6 @@ export default {
225
225
  "@std/fs": "jsr:@std/fs",
226
226
  "@std/async": "jsr:@std/async",
227
227
  "@std/front-matter/yaml": "./src/platform/compat/std/front-matter-yaml.ts",
228
- "csstype": "https://esm.sh/csstype@3.2.3",
229
228
  "@types/react": "https://esm.sh/@types/react@18.3.27?deps=csstype@3.2.3",
230
229
  "@types/react-dom": "https://esm.sh/@types/react-dom@18.3.7?deps=csstype@3.2.3",
231
230
  "react": "https://esm.sh/react@19.2.4?target=es2022&deps=csstype@3.2.3",
@@ -254,7 +253,6 @@ export default {
254
253
  "es-module-lexer": "npm:es-module-lexer@2.0.0",
255
254
  "gray-matter": "npm:gray-matter@4.0.3",
256
255
  "zod": "npm:zod@4.3.6",
257
- "mime-types": "npm:mime-types@3.0.2",
258
256
  "mdast": "npm:@types/mdast@4.0.3",
259
257
  "hast": "npm:@types/hast@3.0.3",
260
258
  "unist": "npm:@types/unist@3.0.2",
@@ -276,7 +274,6 @@ export default {
276
274
  "@babel/generator": "npm:@babel/generator@7.29.1",
277
275
  "@babel/types": "npm:@babel/types@7.29.0",
278
276
  "class-variance-authority": "npm:class-variance-authority@0.7.1",
279
- "clsx": "npm:clsx@2.1.1",
280
277
  "tailwind-merge": "npm:tailwind-merge@3.5.0",
281
278
  "@kreuzberg/wasm": "npm:@kreuzberg/wasm@4.5.2",
282
279
  "#kreuzberg-wasm-glue": "npm:@kreuzberg/wasm@4.5.2/dist/pkg/kreuzberg_wasm.js"
@@ -150,6 +150,8 @@ export {
150
150
  AgUiRuntimeMessageSchema,
151
151
  type AgUiRuntimeRequest,
152
152
  AgUiRuntimeRequestSchema,
153
+ parseAgUiRuntimeRequest,
154
+ parseAgUiRuntimeRequestOrError,
153
155
  } from "./runtime-ag-ui-contract.js";
154
156
  export {
155
157
  type AgUiBrowserEncodedEvent,
@@ -142,3 +142,40 @@ export type AgUiRuntimeInjectedTool = z.infer<typeof AgUiRuntimeInjectedToolSche
142
142
  export type AgUiRuntimeContextItem = z.infer<typeof AgUiRuntimeContextItemSchema>;
143
143
  export type AgUiRuntimeMessage = z.infer<typeof AgUiRuntimeMessageSchema>;
144
144
  export type AgUiRuntimeRequest = z.infer<typeof AgUiRuntimeRequestSchema>;
145
+
146
+ export async function parseAgUiRuntimeRequest(request: Request): Promise<AgUiRuntimeRequest> {
147
+ return AgUiRuntimeRequestSchema.parse(await request.json());
148
+ }
149
+
150
+ export async function parseAgUiRuntimeRequestOrError(
151
+ request: Request,
152
+ ): Promise<AgUiRuntimeRequest | Response> {
153
+ try {
154
+ return await parseAgUiRuntimeRequest(request);
155
+ } catch (error) {
156
+ if (error instanceof z.ZodError) {
157
+ return Response.json(
158
+ {
159
+ error: "Invalid AG-UI runtime request",
160
+ details: error.issues.map((issue) => ({
161
+ path: issue.path,
162
+ message: issue.message,
163
+ })),
164
+ },
165
+ { status: 400 },
166
+ );
167
+ }
168
+
169
+ if (error instanceof SyntaxError || error instanceof TypeError) {
170
+ return Response.json(
171
+ {
172
+ error: "Invalid AG-UI runtime request",
173
+ details: [{ path: [], message: "Malformed JSON request body" }],
174
+ },
175
+ { status: 400 },
176
+ );
177
+ }
178
+
179
+ throw error;
180
+ }
181
+ }
@@ -1,23 +1,27 @@
1
- import mime from "mime-types";
1
+ import {
2
+ charset as mimeCharset,
3
+ extension as mimeExtension,
4
+ lookup as mimeLookup,
5
+ } from "../../utils/mime-types.js";
2
6
 
3
7
  export function contentType(path: string): string | undefined {
4
- const type = mime.lookup(path);
8
+ const type = mimeLookup(path);
5
9
  if (!type) return undefined;
6
10
 
7
- const cs = mime.charset(type);
11
+ const cs = mimeCharset(type);
8
12
  if (!cs) return type;
9
13
 
10
14
  return `${type}; charset=${cs}`;
11
15
  }
12
16
 
13
17
  export function extension(type: string): string | undefined {
14
- return mime.extension(type) ?? undefined;
18
+ return mimeExtension(type) || undefined;
15
19
  }
16
20
 
17
21
  export function lookup(path: string): string | undefined {
18
- return mime.lookup(path) ?? undefined;
22
+ return mimeLookup(path) || undefined;
19
23
  }
20
24
 
21
25
  export function charset(type: string): string | undefined {
22
- return mime.charset(type) ?? undefined;
26
+ return mimeCharset(type) || undefined;
23
27
  }
@@ -7,7 +7,7 @@
7
7
  * injected via <style> on the chat root element.
8
8
  */
9
9
 
10
- import { type ClassValue, clsx } from "clsx";
10
+ import { type ClassValue, clsx } from "../../../utils/clsx.js";
11
11
  import { twMerge } from "tailwind-merge";
12
12
  export { cva, type VariantProps } from "class-variance-authority";
13
13
 
@@ -5310,6 +5310,7 @@ export const FRAMEWORK_CANDIDATES: readonly string[] = [
5310
5310
  "veryfront/testing/assert.ts",
5311
5311
  "veryfront/testing/bdd",
5312
5312
  "veryfront/testing/bdd.ts",
5313
+ "veryfront/utils/clsx.ts",
5313
5314
  "veryfront/utils/html-escape.ts",
5314
5315
  "vf-color-mode",
5315
5316
  "vf-head-style{color:red}",
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Inline implementation of the `clsx` class-name joining utility.
3
+ *
4
+ * API-compatible with the MIT-licensed `clsx` npm package — this is a
5
+ * clean-room rewrite against the public API (named `clsx` export, `ClassValue`
6
+ * type, default export alias); no source was copied.
7
+ *
8
+ * Replaces the `clsx` npm dep per spec §8.3 (inline micro-utilities in core).
9
+ */
10
+
11
+ export type ClassValue =
12
+ | string
13
+ | number
14
+ | boolean
15
+ | null
16
+ | undefined
17
+ | Record<string, unknown>
18
+ | ClassValue[];
19
+
20
+ type Value = ClassValue;
21
+
22
+ export function clsx(...args: Value[]): string {
23
+ const out: string[] = [];
24
+ for (const arg of args) {
25
+ if (!arg) continue;
26
+ if (typeof arg === "string" || typeof arg === "number") {
27
+ out.push(String(arg));
28
+ } else if (Array.isArray(arg)) {
29
+ const inner = clsx(...arg);
30
+ if (inner) out.push(inner);
31
+ } else if (typeof arg === "object") {
32
+ for (const [key, value] of Object.entries(arg)) {
33
+ if (value) out.push(key);
34
+ }
35
+ }
36
+ }
37
+ return out.join(" ");
38
+ }
39
+
40
+ export default clsx;
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Inline implementation of the `mime-types` module surface veryfront uses.
3
+ *
4
+ * API-compatible with the MIT-licensed `mime-types` npm package — this is a
5
+ * clean-room rewrite against the public API; no source was copied. MIME
6
+ * values are IANA-assigned identifiers (not copyrightable).
7
+ *
8
+ * Replaces the npm `mime-types` dep per spec §8.3 with a static lookup table.
9
+ * Covers the extensions veryfront serves internally (web assets, fonts, MDX,
10
+ * WASM, source maps) plus the common upload formats users pass to the
11
+ * `veryfront uploads` CLI — CSV, ZIP archives, office docs, audio/video —
12
+ * so `lookupMimeType()` doesn't silently collapse them to
13
+ * `application/octet-stream`. For unknown extensions `lookup()` still
14
+ * returns `false`, matching the original module's sentinel value.
15
+ */
16
+
17
+ /**
18
+ * Canonical extension → MIME mapping. Order matters for reverse lookup via
19
+ * `extension()`: the first extension encountered for a given MIME wins, so
20
+ * list the preferred canonical extension first (e.g. `html` before `htm`,
21
+ * `jpg` before `jpeg`). `json` is listed before `map` so source-map MIMEs
22
+ * still resolve to a reasonable extension via forward lookup, while
23
+ * `extension("application/json")` returns `"json"`.
24
+ */
25
+ const TABLE: Record<string, string> = {
26
+ // Web markup / styles / scripts
27
+ html: "text/html",
28
+ htm: "text/html",
29
+ xhtml: "application/xhtml+xml",
30
+ css: "text/css",
31
+ js: "application/javascript",
32
+ mjs: "application/javascript",
33
+ cjs: "application/javascript",
34
+ json: "application/json",
35
+ map: "application/json",
36
+ jsonld: "application/ld+json",
37
+ xml: "application/xml",
38
+ rss: "application/rss+xml",
39
+ atom: "application/atom+xml",
40
+ // Images
41
+ svg: "image/svg+xml",
42
+ png: "image/png",
43
+ jpg: "image/jpeg",
44
+ jpeg: "image/jpeg",
45
+ gif: "image/gif",
46
+ webp: "image/webp",
47
+ avif: "image/avif",
48
+ ico: "image/vnd.microsoft.icon",
49
+ bmp: "image/bmp",
50
+ tiff: "image/tiff",
51
+ tif: "image/tiff",
52
+ heic: "image/heic",
53
+ heif: "image/heif",
54
+ // Fonts
55
+ woff: "font/woff",
56
+ woff2: "font/woff2",
57
+ ttf: "font/ttf",
58
+ otf: "font/otf",
59
+ eot: "application/vnd.ms-fontobject",
60
+ // Documents
61
+ pdf: "application/pdf",
62
+ txt: "text/plain",
63
+ md: "text/markdown",
64
+ mdx: "text/markdown",
65
+ csv: "text/csv",
66
+ tsv: "text/tab-separated-values",
67
+ rtf: "application/rtf",
68
+ doc: "application/msword",
69
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
70
+ xls: "application/vnd.ms-excel",
71
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
72
+ ppt: "application/vnd.ms-powerpoint",
73
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
74
+ odt: "application/vnd.oasis.opendocument.text",
75
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
76
+ odp: "application/vnd.oasis.opendocument.presentation",
77
+ // Archives
78
+ zip: "application/zip",
79
+ gz: "application/gzip",
80
+ tgz: "application/gzip",
81
+ tar: "application/x-tar",
82
+ "7z": "application/x-7z-compressed",
83
+ bz2: "application/x-bzip2",
84
+ rar: "application/vnd.rar",
85
+ // Audio
86
+ mp3: "audio/mpeg",
87
+ wav: "audio/wav",
88
+ ogg: "audio/ogg",
89
+ m4a: "audio/mp4",
90
+ aac: "audio/aac",
91
+ flac: "audio/flac",
92
+ opus: "audio/ogg",
93
+ // Video
94
+ mp4: "video/mp4",
95
+ webm: "video/webm",
96
+ mov: "video/quicktime",
97
+ avi: "video/x-msvideo",
98
+ mkv: "video/x-matroska",
99
+ ogv: "video/ogg",
100
+ // Config / data
101
+ yaml: "text/yaml",
102
+ yml: "text/yaml",
103
+ toml: "application/toml",
104
+ // WASM + source maps
105
+ wasm: "application/wasm",
106
+ };
107
+
108
+ // Reverse lookup: mime → first-listed extension from TABLE.
109
+ const EXT_BY_MIME: Record<string, string> = (() => {
110
+ const reverse: Record<string, string> = {};
111
+ for (const [ext, mime] of Object.entries(TABLE)) {
112
+ if (!(mime in reverse)) reverse[mime] = ext;
113
+ }
114
+ return reverse;
115
+ })();
116
+
117
+ /**
118
+ * Look up the MIME type for a file path or bare extension. Accepts values
119
+ * with or without a leading dot. Returns `false` when no mapping is known.
120
+ *
121
+ * Uses `Object.hasOwn()` so extensions that collide with inherited props
122
+ * (e.g. `file.toString`, `file.constructor`) return `false` instead of
123
+ * leaking a function / prototype value through the `?? false` fallback.
124
+ */
125
+ export function lookup(path: string): string | false {
126
+ const dot = path.lastIndexOf(".");
127
+ const ext = (dot >= 0 ? path.slice(dot + 1) : path).toLowerCase();
128
+ return Object.hasOwn(TABLE, ext) ? TABLE[ext]! : false;
129
+ }
130
+
131
+ /**
132
+ * Return `"UTF-8"` for MIME types whose payload is text (text/*, JS, JSON).
133
+ * Returns `false` otherwise — matching the original module's sentinel.
134
+ */
135
+ export function charset(mime: string): string | false {
136
+ if (
137
+ mime.startsWith("text/") ||
138
+ mime === "application/javascript" ||
139
+ mime === "application/json"
140
+ ) {
141
+ return "UTF-8";
142
+ }
143
+ return false;
144
+ }
145
+
146
+ /**
147
+ * Reverse of `lookup()`: given a MIME type, return a canonical file extension
148
+ * (without leading dot) or `false` when unknown. Uses `Object.hasOwn()` for
149
+ * the same reason `lookup()` does (avoid prototype-property leaks).
150
+ */
151
+ export function extension(mime: string): string | false {
152
+ return Object.hasOwn(EXT_BY_MIME, mime) ? EXT_BY_MIME[mime]! : false;
153
+ }
154
+
155
+ export default { lookup, charset, extension };
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.221";
3
+ export const VERSION = "0.1.222";