@guren/server 2.19.0 → 2.21.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/dist/Logger-DFifRAtc.js +114 -0
- package/dist/auth/index.js +1 -1
- package/dist/auth/password/DefaultHasher.d.ts +1 -0
- package/dist/{auth-DrbFuxoW.js → auth-CjE2oO50.js} +114 -40
- package/dist/cache/index.js +1 -1
- package/dist/cache/types.d.ts +5 -1
- package/dist/{cache-BOOIr324.js → cache-thXRnaju.js} +19 -4
- package/dist/http/Application.d.ts +15 -0
- package/dist/http/middleware/cookie-session-store.d.ts +38 -0
- package/dist/http/middleware/index.d.ts +5 -3
- package/dist/http/middleware/session-manager.d.ts +16 -0
- package/dist/http/middleware/session.d.ts +22 -0
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +719 -432
- package/dist/lambda/index.js +4 -4
- package/dist/logging/index.js +2 -1
- package/dist/{logging-DcvkE5Dh.js → logging-DXmqqUl4.js} +2 -114
- package/dist/mvc/Router.d.ts +18 -15
- package/dist/mvc/prototype.d.ts +105 -0
- package/dist/redis/lazy-client.d.ts +8 -0
- package/dist/runtime/index.js +4 -4
- package/dist/storage/index.js +1 -1
- package/dist/vite/index.js +147 -0
- package/dist/vite/plugin.d.ts +39 -0
- package/dist/{vite-manifest-C57vi7J9.js → vite-manifest-CdfPfQdj.js} +2 -2
- package/package.json +4 -4
- package/dist/{DocsViewerServiceProvider-D2cuVgtN.js → DocsViewerServiceProvider-DWnlXx_y.js} +1 -1
- package/dist/{i18n-Cg1aajRP.js → i18n-BZ2VrSud.js} +1 -1
- package/dist/{storage-BB59f07j.js → storage-D_yNe54O.js} +1 -1
package/dist/vite/plugin.d.ts
CHANGED
|
@@ -25,10 +25,49 @@ export interface GurenVitePluginOptions {
|
|
|
25
25
|
chunkFileNames?: string;
|
|
26
26
|
/** Rollup naming pattern for extracted assets (defaults to `[name]-[hash][extname]`). */
|
|
27
27
|
assetFileNames?: string;
|
|
28
|
+
/** Prototype mode (`vite --mode prototype`, RFC 0021): the static, server-less build. */
|
|
29
|
+
prototype?: GurenPrototypeOptions;
|
|
28
30
|
}
|
|
31
|
+
export interface GurenPrototypeOptions {
|
|
32
|
+
/** Vite `base` for a build hosted under a subpath (a GitHub project page, a preview URL). Defaults to `/`. */
|
|
33
|
+
base?: string;
|
|
34
|
+
/** Output directory (defaults to `dist/prototype`). */
|
|
35
|
+
outDir?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The HTML shell, relative to the project root. Defaults to
|
|
38
|
+
* `resources/js/prototype/index.html` when that file exists, else a
|
|
39
|
+
* generated shell under `.guren/prototype/`.
|
|
40
|
+
*/
|
|
41
|
+
shell?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Where the generated shell goes; `.guren/` is already gitignored and codegen-owned. */
|
|
44
|
+
export declare const PROTOTYPE_SHELL_FILE = ".guren/prototype/index.html";
|
|
45
|
+
/** The override a project may ship instead of the generated shell. */
|
|
46
|
+
export declare const PROTOTYPE_SHELL_OVERRIDE = "resources/js/prototype/index.html";
|
|
47
|
+
export declare const PROTOTYPE_MODE = "prototype";
|
|
29
48
|
export declare function gurenVitePlugin(options?: GurenVitePluginOptions): {
|
|
30
49
|
name: string;
|
|
31
50
|
enforce: 'pre';
|
|
32
51
|
config(config: Record<string, any>, env: Record<string, any>): void;
|
|
52
|
+
configResolved(config: Record<string, any>): void;
|
|
53
|
+
configureServer(server: ViteDevServerLike): (() => void) | undefined;
|
|
54
|
+
writeBundle(): void;
|
|
33
55
|
};
|
|
56
|
+
interface ViteDevServerLike {
|
|
57
|
+
middlewares: {
|
|
58
|
+
use(handler: (req: IncomingLike, res: ResponseLike, next: (error?: unknown) => void) => void): void;
|
|
59
|
+
};
|
|
60
|
+
transformIndexHtml(url: string, html: string, originalUrl?: string): Promise<string>;
|
|
61
|
+
}
|
|
62
|
+
interface IncomingLike {
|
|
63
|
+
method?: string;
|
|
64
|
+
url?: string;
|
|
65
|
+
originalUrl?: string;
|
|
66
|
+
headers: Record<string, string | string[] | undefined>;
|
|
67
|
+
}
|
|
68
|
+
interface ResponseLike {
|
|
69
|
+
setHeader(name: string, value: string): void;
|
|
70
|
+
end(body: string): void;
|
|
71
|
+
}
|
|
72
|
+
export declare function renderPrototypeShell(entry: string): string;
|
|
34
73
|
export default gurenVitePlugin;
|
|
@@ -34,7 +34,7 @@ function parseImportMap(value, options = {}) {
|
|
|
34
34
|
const DEFAULT_DEV_STYLES_ENTRY = "/resources/css/app.css";
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region package.json
|
|
37
|
-
var version = "2.
|
|
37
|
+
var version = "2.21.0";
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/http/dev-banner.ts
|
|
40
40
|
figlet.parseFont("Standard", standard);
|
|
@@ -138,7 +138,7 @@ const DEFAULT_DEV_SERVER_URL = "http://localhost:5173";
|
|
|
138
138
|
* `NODE_ENV` is `production` (E2E runs do exactly this).
|
|
139
139
|
*/
|
|
140
140
|
function isViteProduction(devServerUrl = process.env.VITE_DEV_SERVER_URL) {
|
|
141
|
-
return
|
|
141
|
+
return process.env.NODE_ENV === "production" && typeof devServerUrl !== "string";
|
|
142
142
|
}
|
|
143
143
|
function normalizeDevServerUrl(value) {
|
|
144
144
|
if (!value) return value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guren/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -142,14 +142,14 @@
|
|
|
142
142
|
"test": "bun test"
|
|
143
143
|
},
|
|
144
144
|
"dependencies": {
|
|
145
|
-
"@guren/orm": "^2.
|
|
145
|
+
"@guren/orm": "^2.7.1",
|
|
146
146
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
147
147
|
"chalk": "^5.3.0",
|
|
148
148
|
"consola": "^3.4.2",
|
|
149
149
|
"figlet": "^1.7.0",
|
|
150
|
-
"hono": "^4.13.
|
|
150
|
+
"hono": "^4.13.7",
|
|
151
151
|
"ioredis": "^5.11.1",
|
|
152
|
-
"nodemailer": "^9.
|
|
152
|
+
"nodemailer": "^9.1.1"
|
|
153
153
|
},
|
|
154
154
|
"peerDependencies": {
|
|
155
155
|
"@aws-sdk/client-s3": "^3.0.0",
|
package/dist/{DocsViewerServiceProvider-D2cuVgtN.js → DocsViewerServiceProvider-DWnlXx_y.js}
RENAMED
|
@@ -2,8 +2,8 @@ import { r as ServiceProvider } from "./loopback-guard-DT9gHF0F.js";
|
|
|
2
2
|
import { n as createDocsViewerAccessGuard, r as isDocsViewerEnabled, t as DOCS_VIEWER_PATH } from "./endpoint-BXipU2Jj.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
|
-
import { readFile } from "node:fs/promises";
|
|
6
5
|
import { join } from "node:path";
|
|
6
|
+
import { readFile } from "node:fs/promises";
|
|
7
7
|
//#region src/docs-viewer/DocsViewerServiceProvider.ts
|
|
8
8
|
/**
|
|
9
9
|
* How long a built `data.json` payload answers requests. Longer than the UI's
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readFile, readdir } from "node:fs/promises";
|
|
2
1
|
import { basename, extname, join } from "node:path";
|
|
2
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
3
3
|
//#region src/i18n/pluralization.ts
|
|
4
4
|
/**
|
|
5
5
|
* Default pluralization rules per language, each returning the index of the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as trimSlashes } from "./trim-slashes-BLY9hKAa.js";
|
|
2
|
-
import { copyFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
3
2
|
import { dirname, join, resolve, sep } from "node:path";
|
|
3
|
+
import { copyFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { Readable } from "node:stream";
|
|
6
6
|
//#region src/support/warn-once.ts
|