@tbox.cn/app-module-parking 0.9.4 → 0.10.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/package.json +4 -4
- package/tbox.module.json +2 -0
- package/tests/dispatcher-flow.test.ts +1 -1
- package/tests/payment-flow.test.ts +1 -1
- package/tests/ports-resolve.test.ts +1 -1
- package/tests/snapshot-service.test.ts +1 -1
- package/tests/tools-gate.test.ts +2 -2
- package/tests/tools-membership.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tbox.cn/app-module-parking",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "商圈停车模块:计费支付、车辆寻车、缴费记录与开票(codegen 源)。",
|
|
6
6
|
"exports": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tbox.cn/app-sdk": "0.
|
|
22
|
-
"@tbox.cn/app-contracts": "0.
|
|
23
|
-
"@tbox.cn/app-contracts-mall": "0.
|
|
21
|
+
"@tbox.cn/app-sdk": "0.20.0",
|
|
22
|
+
"@tbox.cn/app-contracts": "0.11.0",
|
|
23
|
+
"@tbox.cn/app-contracts-mall": "0.11.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"zod": "3.25.76",
|
package/tbox.module.json
CHANGED
|
@@ -31,7 +31,7 @@ const SECRET = new TextEncoder().encode('test-secret-0123456789-0123456789-01234
|
|
|
31
31
|
|
|
32
32
|
const makeReqCtx = (mallId = 'mall-1') =>
|
|
33
33
|
({
|
|
34
|
-
identity: { userId: 'u_1', source: '
|
|
34
|
+
identity: { userId: 'u_1', source: 'local' },
|
|
35
35
|
conversationId: 'conv_it',
|
|
36
36
|
attributes: { mall: { miniAppId: 'app', mallId } },
|
|
37
37
|
}) as never;
|
|
@@ -330,7 +330,7 @@ describe('P1:confirm-payment 签名空串防御', () => {
|
|
|
330
330
|
/** 动作上下文(execute 第二参——分发期注入语义,与 SDK 集成测试同基准) */
|
|
331
331
|
const makeReqCtx = () =>
|
|
332
332
|
({
|
|
333
|
-
identity: { userId: 'u_1', source: '
|
|
333
|
+
identity: { userId: 'u_1', source: 'local' },
|
|
334
334
|
attributes: { mall: { miniAppId: 'app', mallId: 'mall-1' } },
|
|
335
335
|
}) as never;
|
|
336
336
|
|
|
@@ -35,7 +35,7 @@ const PARKING_PAY_PHRASES = [
|
|
|
35
35
|
|
|
36
36
|
const makeReqCtx = () =>
|
|
37
37
|
({
|
|
38
|
-
identity: { userId: 'u_1', source: '
|
|
38
|
+
identity: { userId: 'u_1', source: 'local' },
|
|
39
39
|
conversationId: 'conv_snapshot',
|
|
40
40
|
attributes: { mall: { miniAppId: 'app', mallId: 'mall-1' } },
|
|
41
41
|
}) as unknown as RequestContext;
|
package/tests/tools-gate.test.ts
CHANGED
|
@@ -16,12 +16,12 @@ import { InMemoryParkingService } from '../src/server/service';
|
|
|
16
16
|
import { resolveParkingQueryPort, resolveParkingPaymentPort, resolveParkingVehiclePort } from '../src/server/ports';
|
|
17
17
|
import { createServerContext, createToolExecContext } from '@tbox.cn/app-sdk/server';
|
|
18
18
|
|
|
19
|
-
const reqCtx = (source: '
|
|
19
|
+
const reqCtx = (source: 'local' | 'anonymous' = 'local', userId = 'u_1') => ({
|
|
20
20
|
identity: { userId, source },
|
|
21
21
|
attributes: { mall: { miniAppId: 'app', mallId: 'mall-1' } },
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const execCtx = (source: '
|
|
24
|
+
const execCtx = (source: 'local' | 'anonymous' = 'local') => createToolExecContext(reqCtx(source)) as never;
|
|
25
25
|
|
|
26
26
|
/** 声明 requiresMembership 能力口的 provider 壳(真实厂商语义:未登录未入会 → true) */
|
|
27
27
|
function gatedService(requires: boolean) {
|
|
@@ -7,7 +7,7 @@ import { describe, expect, it, vi } from 'vitest';
|
|
|
7
7
|
import { projectMembership } from '../src/server/tools';
|
|
8
8
|
|
|
9
9
|
const reqCtx = {
|
|
10
|
-
identity: { userId: 'u_1', source: '
|
|
10
|
+
identity: { userId: 'u_1', source: 'local' as const },
|
|
11
11
|
attributes: { mall: { miniAppId: 'app', mallId: 'mall-1' } },
|
|
12
12
|
} as never;
|
|
13
13
|
|