@finesoft/front 0.1.42 → 0.1.43

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.
@@ -24,4 +24,4 @@ function parseAcceptLanguage(header, supported, fallback) {
24
24
  //#endregion
25
25
  export { parseAcceptLanguage as n, locale_exports as t };
26
26
 
27
- //# sourceMappingURL=locale-D2Bu7w47.mjs.map
27
+ //# sourceMappingURL=locale-iP9ABD4H.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"locale-D2Bu7w47.mjs","names":[],"sources":["../../server/src/locale.ts"],"sourcesContent":["/**\n * Accept-Language 解析\n */\n\nexport function parseAcceptLanguage(\n header: string | undefined,\n supported?: string[],\n fallback?: string,\n): string {\n const effectiveSupported = supported ?? [\"zh\", \"en\"];\n const effectiveFallback = fallback ?? effectiveSupported[0] ?? \"en\";\n if (!header) return effectiveFallback;\n const langs = header\n .split(\",\")\n .map((part) => {\n const [lang, q] = part.trim().split(\";q=\");\n return {\n lang: lang.trim().toLowerCase(),\n q: q ? parseFloat(q) || 0 : 1,\n };\n })\n .sort((a, b) => b.q - a.q);\n\n for (const { lang } of langs) {\n const prefix = lang.split(\"-\")[0];\n if (effectiveSupported.includes(prefix)) {\n return prefix;\n }\n }\n return effectiveFallback;\n}\n"],"mappings":";;;;;;AAIA,SAAgB,oBACZ,QACA,WACA,UACM;CACN,MAAM,qBAAqB,aAAa,CAAC,MAAM,KAAK;CACpD,MAAM,oBAAoB,YAAY,mBAAmB,MAAM;AAC/D,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,QAAQ,OACT,MAAM,IAAI,CACV,KAAK,SAAS;EACX,MAAM,CAAC,MAAM,KAAK,KAAK,MAAM,CAAC,MAAM,MAAM;AAC1C,SAAO;GACH,MAAM,KAAK,MAAM,CAAC,aAAa;GAC/B,GAAG,IAAI,WAAW,EAAE,IAAI,IAAI;GAC/B;GACH,CACD,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,EAAE;AAE9B,MAAK,MAAM,EAAE,UAAU,OAAO;EAC1B,MAAM,SAAS,KAAK,MAAM,IAAI,CAAC;AAC/B,MAAI,mBAAmB,SAAS,OAAO,CACnC,QAAO;;AAGf,QAAO"}
1
+ {"version":3,"file":"locale-iP9ABD4H.mjs","names":[],"sources":["../../server/src/locale.ts"],"sourcesContent":["/**\n * Accept-Language 解析\n */\n\nexport function parseAcceptLanguage(\n header: string | undefined,\n supported?: string[],\n fallback?: string,\n): string {\n const effectiveSupported = supported ?? [\"zh\", \"en\"];\n const effectiveFallback = fallback ?? effectiveSupported[0] ?? \"en\";\n if (!header) return effectiveFallback;\n const langs = header\n .split(\",\")\n .map((part) => {\n const [lang, q] = part.trim().split(\";q=\");\n return {\n lang: lang.trim().toLowerCase(),\n q: q ? parseFloat(q) || 0 : 1,\n };\n })\n .sort((a, b) => b.q - a.q);\n\n for (const { lang } of langs) {\n const prefix = lang.split(\"-\")[0];\n if (effectiveSupported.includes(prefix)) {\n return prefix;\n }\n }\n return effectiveFallback;\n}\n"],"mappings":";;;;;;AAIA,SAAgB,oBACZ,QACA,WACA,UACM;CACN,MAAM,qBAAqB,aAAa,CAAC,MAAM,KAAK;CACpD,MAAM,oBAAoB,YAAY,mBAAmB,MAAM;AAC/D,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,QAAQ,OACT,MAAM,IAAI,CACV,KAAK,SAAS;EACX,MAAM,CAAC,MAAM,KAAK,KAAK,MAAM,CAAC,MAAM,MAAM;AAC1C,SAAO;GACH,MAAM,KAAK,MAAM,CAAC,aAAa;GAC/B,GAAG,IAAI,WAAW,EAAE,IAAI,IAAI;GAC/B;GACH,CACD,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,EAAE;AAE9B,MAAK,MAAM,EAAE,UAAU,OAAO;EAC1B,MAAM,SAAS,KAAK,MAAM,IAAI,CAAC;AAC/B,MAAI,mBAAmB,SAAS,OAAO,CACnC,QAAO;;AAGf,QAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finesoft/front",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "description": "Full-stack framework: router, DI, actions, SSR, and server — all in one package",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1,41 +0,0 @@
1
- //#region src/shims/server-peer-modules.d.ts
2
- declare module "hono" {
3
- export class Hono {
4
- constructor(...args: any[]);
5
- get(path: string, handler: (c: any) => any): this;
6
- use(...args: any[]): this;
7
- route(...args: any[]): this;
8
- fetch: any;
9
- }
10
- }
11
- declare module "vite" {
12
- export interface ViteDevServer {
13
- transformIndexHtml(url: string, html: string): string | Promise<string>;
14
- ssrLoadModule(path: string): Promise<unknown>;
15
- ssrFixStacktrace(error: Error): void;
16
- middlewares(req: any, res: any, next: () => void): void;
17
- }
18
- export function createServer(options?: any): Promise<ViteDevServer>;
19
- }
20
- declare module "dotenv" {
21
- export interface DotenvConfigOptions {
22
- path?: string;
23
- [key: string]: unknown;
24
- }
25
- export interface DotenvConfigOutput {
26
- parsed?: Record<string, string>;
27
- error?: Error;
28
- }
29
- export function config(options?: DotenvConfigOptions): DotenvConfigOutput;
30
- }
31
- declare module "@hono/node-server" {
32
- export function getRequestListener(fetchHandler: any): (req: any, res: any) => any;
33
- export function serve(options: {
34
- fetch: any;
35
- port?: number;
36
- }, onListen?: () => void): unknown;
37
- }
38
- declare module "@hono/node-server/serve-static" {
39
- export function serveStatic(options?: any): any;
40
- }
41
- //# sourceMappingURL=server-peer-modules-BSSsxBaF.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-peer-modules-BSSsxBaF.d.mts","names":["Hono","constructor","args","get","path","c","handler","use","route","fetch","sideEffect","_0","_1","Promise","Error","ViteDevServer","transformIndexHtml","url","html","ssrLoadModule","ssrFixStacktrace","error","middlewares","req","res","next","createServer","options","_2","Record","DotenvConfigOptions","DotenvConfigOutput","key","parsed","config","_3","getRequestListener","fetchHandler","serve","port","onListen","_4","serveStatic"],"sources":["../src/shims/server-peer-modules.d.ts"],"mappings":";;eACiBA,IAAAA;IACTC,WAAAA,CAAAA,GAAeC,IAAAA;IACfC,GAAAA,CAAIC,IAAAA,UAAcE,OAAAA,GAAUD,CAAAA;IAC5BE,GAAAA,CAAAA,GAAOL,IAAAA;IACPM,KAAAA,CAAAA,GAASN,IAAAA;IACTO,KAAAA;EAAAA;AAAAA;AAAAA;EAAAA,iBAKaM,aAAAA;IACbC,kBAAAA,CAAmBC,GAAAA,UAAaC,IAAAA,oBAAwBL,OAAAA;IACxDM,aAAAA,CAAcf,IAAAA,WAAeS,OAAAA;IAC7BO,gBAAAA,CAAiBC,KAAAA,EAAOP,KAAAA;IACxBQ,WAAAA,CAAYC,GAAAA,OAAUC,GAAAA,OAAUC,IAAAA;EAAAA;EAAAA,gBAGpBC,YAAAA,CAAaC,OAAAA,SAAgBd,OAAAA,CAAQE,aAAAA;AAAAA;AAAAA;EAAAA,iBAIpCe,mBAAAA;IACb1B,IAAAA;IAAAA,CACC4B,GAAAA;EAAAA;EAAAA,iBAGYD,kBAAAA;IACbE,MAAAA,GAASJ,MAAAA;IACTR,KAAAA,GAAQP,KAAAA;EAAAA;EAAAA,gBAGIoB,MAAAA,CAAOP,OAAAA,GAAUG,mBAAAA,GAAsBC,kBAAAA;AAAAA;AAAAA;EAAAA,gBAIvCK,kBAAAA,CAAmBC,YAAAA,SAAqBd,GAAAA,OAAUC,GAAAA;EAAAA,gBAElDc,KAAAA,CAAMX,OAAAA;IAAWlB,KAAAA;IAAY8B,IAAAA;EAAAA,GAAiBC,QAAAA;AAAAA;AAAAA;EAAAA,gBAI9CE,WAAAA,CAAYf,OAAAA;AAAAA"}