@h-ai/serv 1.0.0-beta.14 → 1.0.0-beta.16
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/README.en.md +6 -4
- package/README.ja.md +6 -4
- package/README.md +6 -4
- package/dist/features/ai.d.ts +2 -2
- package/dist/features/feedback.d.ts +2 -2
- package/dist/features/iam.d.ts +1 -1
- package/dist/features/storage.d.ts +2 -2
- package/dist/index.d.ts +20 -4
- package/dist/index.js +82 -72
- package/dist/index.js.map +1 -1
- package/dist/{serv-context-DE1JH5bd.d.ts → serv-context-BsNvQ-bb.d.ts} +3 -4
- package/dist/{serv-router-BJk04-oS.d.ts → serv-router-BnkxPvS6.d.ts} +1 -1
- package/package.json +16 -16
|
@@ -13,7 +13,7 @@ import { HaiResult, Logger } from '@h-ai/core';
|
|
|
13
13
|
* - logout:浏览器清除 Cookie(Max-Age=0);原生客户端自行清理安全存储
|
|
14
14
|
* - refresh:**专属路由**(不走 oRPC),按请求来源从 Cookie 或 JSON body 读取并轮换 token
|
|
15
15
|
*
|
|
16
|
-
* **Cookie 规格**:`HttpOnly; SameSite=Strict
|
|
16
|
+
* **Cookie 规格**:`HttpOnly; SameSite=Strict`,生产环境默认加 `Secure`。
|
|
17
17
|
* Cookie Path 限制为 `{apiPrefix}/auth/refresh`,最小化浏览器自动发送范围(避免 CSRF 攻击面)。
|
|
18
18
|
* @module serv-cookie-auth
|
|
19
19
|
*/
|
|
@@ -89,9 +89,8 @@ interface RefreshCookieConfig {
|
|
|
89
89
|
*/
|
|
90
90
|
readonly maxAge?: number;
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* - 本地 HTTP 开发设为 `false` 可让 Cookie 在 HTTP 下正常工作。
|
|
92
|
+
* 显式指定 Secure 属性,优先于 `HAI_SERV_REFRESH_COOKIE_SECURE`。
|
|
93
|
+
* 两者均未指定时,`NODE_ENV` 或 `HAI_CORE_ENV` 为 `production` 即开启。测试开关不影响此默认值。
|
|
95
94
|
*/
|
|
96
95
|
readonly secure?: boolean;
|
|
97
96
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HaiResult } from '@h-ai/core';
|
|
2
2
|
import { ContractRouter, Meta, Context, ContractProcedure, InferSchemaInput, ProcedureHandler, InferSchemaOutput, UnlaziedRouter, Router } from '@orpc/server';
|
|
3
|
-
import { S as ServContext } from './serv-context-
|
|
3
|
+
import { S as ServContext } from './serv-context-BsNvQ-bb.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @h-ai/serv — contract-first 链式 procedure 实现器
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-ai/serv",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.16",
|
|
5
5
|
"description": "Hai Framework service runtime powered by Hono and oRPC.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@h-ai/ai": "1.0.0-beta.
|
|
43
|
-
"@h-ai/feedback": "1.0.0-beta.
|
|
44
|
-
"@h-ai/iam": "1.0.0-beta.
|
|
45
|
-
"@h-ai/storage": "1.0.0-beta.
|
|
42
|
+
"@h-ai/ai": "1.0.0-beta.16",
|
|
43
|
+
"@h-ai/feedback": "1.0.0-beta.16",
|
|
44
|
+
"@h-ai/iam": "1.0.0-beta.16",
|
|
45
|
+
"@h-ai/storage": "1.0.0-beta.16"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@h-ai/ai": {
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@h-ai/api-contract": "1.0.0-beta.
|
|
63
|
-
"@h-ai/audit": "1.0.0-beta.
|
|
64
|
-
"@h-ai/core": "1.0.0-beta.
|
|
65
|
-
"@h-ai/crypto": "1.0.0-beta.
|
|
62
|
+
"@h-ai/api-contract": "1.0.0-beta.16",
|
|
63
|
+
"@h-ai/audit": "1.0.0-beta.16",
|
|
64
|
+
"@h-ai/core": "1.0.0-beta.16",
|
|
65
|
+
"@h-ai/crypto": "1.0.0-beta.16",
|
|
66
66
|
"@hono/node-server": "^2.1.4",
|
|
67
67
|
"@orpc/openapi": "^1.15.5",
|
|
68
68
|
"@orpc/server": "^1.15.5",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"zod": "^4.6.5"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@h-ai/ai": "1.0.0-beta.
|
|
77
|
-
"@h-ai/api-client": "1.0.0-beta.
|
|
78
|
-
"@h-ai/cache": "1.0.0-beta.
|
|
79
|
-
"@h-ai/feedback": "1.0.0-beta.
|
|
80
|
-
"@h-ai/iam": "1.0.0-beta.
|
|
81
|
-
"@h-ai/reldb": "1.0.0-beta.
|
|
82
|
-
"@h-ai/storage": "1.0.0-beta.
|
|
76
|
+
"@h-ai/ai": "1.0.0-beta.16",
|
|
77
|
+
"@h-ai/api-client": "1.0.0-beta.16",
|
|
78
|
+
"@h-ai/cache": "1.0.0-beta.16",
|
|
79
|
+
"@h-ai/feedback": "1.0.0-beta.16",
|
|
80
|
+
"@h-ai/iam": "1.0.0-beta.16",
|
|
81
|
+
"@h-ai/reldb": "1.0.0-beta.16",
|
|
82
|
+
"@h-ai/storage": "1.0.0-beta.16",
|
|
83
83
|
"@types/node": "^26.6.5",
|
|
84
84
|
"@types/ws": "^8.18.2",
|
|
85
85
|
"altcha": "^3.5.0",
|