vona-module-test-vona 5.0.82 → 5.0.83
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/controller/order.d.ts +5 -5
- package/dist/controller/post.d.ts +6 -7
- package/dist/dto/orderCreate.d.ts +1 -1
- package/dist/dto/orderQueryPage.d.ts +1 -1
- package/dist/dto/orderUpdate.d.ts +1 -1
- package/dist/dto/postCreate.d.ts +1 -1
- package/dist/dto/postQuery.d.ts +1 -0
- package/dist/dto/userCreate.d.ts +1 -1
- package/dist/dto/userUpdate.d.ts +1 -1
- package/dist/index.js +75 -92
- package/dist/service/caching.d.ts +3 -4
- package/dist/service/post.d.ts +5 -5
- package/package.json +1 -1
- package/src/controller/bean.ts +1 -1
- package/src/controller/cacheMem.ts +1 -1
- package/src/controller/cacheRedis.ts +1 -1
- package/src/controller/dtoTest.ts +1 -1
- package/src/controller/onion.ts +1 -1
- package/src/controller/order.ts +4 -13
- package/src/controller/passport.ts +1 -1
- package/src/controller/performAction.ts +1 -1
- package/src/controller/post.ts +4 -8
- package/src/controller/queue.ts +1 -1
- package/src/controller/serializer.ts +1 -1
- package/src/controller/summer.ts +1 -1
- package/src/controller/tail.ts +1 -1
- package/src/controller/transaction.ts +1 -1
- package/src/controller/upload.ts +1 -1
- package/src/dto/orderQuery.ts +7 -10
- package/src/dto/orderQueryPage.ts +1 -1
- package/src/dto/postQuery.ts +10 -6
- package/src/dto/profile.ts +1 -1
- package/src/dto/roleLazy.ts +1 -1
- package/src/dto/serializerArray.ts +1 -1
- package/src/dto/serializerLazy.ts +1 -1
- package/src/dto/serializerSimple.ts +1 -1
- package/src/dto/signin.ts +1 -1
- package/src/dto/user.ts +1 -1
- package/src/dto/userLazy.ts +1 -1
- package/src/entity/category.ts +1 -1
- package/src/entity/order.ts +1 -1
- package/src/entity/post.ts +1 -1
- package/src/entity/postContent.ts +1 -1
- package/src/entity/product.ts +1 -1
- package/src/entity/role.ts +1 -1
- package/src/entity/roleUser.ts +1 -1
- package/src/entity/test.ts +1 -1
- package/src/entity/user.ts +1 -1
- package/src/model/testDynamicTable.ts +2 -2
- package/src/service/caching.ts +15 -20
- package/test/database/database.test.ts +2 -2
- package/test/database/dtoAggregate.test.ts +1 -1
- package/test/database/dtoGet.test.ts +3 -3
- package/test/database/dtoGroup.test.ts +1 -1
- package/test/database/dtoLazy.test.ts +1 -1
- package/test/database/dtoMutate.test.ts +2 -2
- package/test/database/dtoQuery.test.ts +9 -0
- package/test/upload.test.ts +1 -1
- package/test/utils/mappedTypes.test.ts +1 -1
|
@@ -2,7 +2,7 @@ import type { TypeDecoratorRules } from 'vona-module-a-openapiutils';
|
|
|
2
2
|
import assert from 'node:assert';
|
|
3
3
|
import { describe, it } from 'node:test';
|
|
4
4
|
import { app } from 'vona-mock';
|
|
5
|
-
import { getTargetDecoratorRules } from 'vona-module-a-
|
|
5
|
+
import { getTargetDecoratorRules } from 'vona-module-a-openapiutils';
|
|
6
6
|
import { $Dto, $relationDynamic } from 'vona-module-a-orm';
|
|
7
7
|
import { ModelPost, ModelPostContent, ModelRole, ModelRoleUser, ModelUser } from 'vona-module-test-vona';
|
|
8
8
|
|
|
@@ -35,9 +35,9 @@ describe('dtoGet.test.ts', () => {
|
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
const rules: TypeDecoratorRules = getTargetDecoratorRules(DtoPostNew.prototype);
|
|
38
|
-
assert.equal(
|
|
38
|
+
assert.equal(rules.id?.type === 'pipe', true);
|
|
39
39
|
assert.equal(rules.title?.type === 'string', true);
|
|
40
|
-
assert.equal(
|
|
40
|
+
assert.equal(rules.userId?.type === 'pipe', true);
|
|
41
41
|
assert.equal(rules.iid, undefined);
|
|
42
42
|
assert.equal(rules.postContent?.type === 'optional', true);
|
|
43
43
|
assert.equal(rules.user?.type === 'optional', true);
|
|
@@ -3,7 +3,7 @@ import type z from 'zod';
|
|
|
3
3
|
import assert from 'node:assert';
|
|
4
4
|
import { describe, it } from 'node:test';
|
|
5
5
|
import { app } from 'vona-mock';
|
|
6
|
-
import { getTargetDecoratorRules } from 'vona-module-a-
|
|
6
|
+
import { getTargetDecoratorRules } from 'vona-module-a-openapiutils';
|
|
7
7
|
import { $Dto } from 'vona-module-a-orm';
|
|
8
8
|
import { ModelUserStatsGroup } from 'vona-module-test-vona';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { describe, it } from 'node:test';
|
|
|
3
3
|
import { OpenApiGeneratorV31, OpenAPIRegistry } from '@cabloy/zod-to-openapi';
|
|
4
4
|
import { appResource, cast } from 'vona';
|
|
5
5
|
import { app } from 'vona-mock';
|
|
6
|
-
import { $schema } from 'vona-module-a-
|
|
6
|
+
import { $schema } from 'vona-module-a-openapiutils';
|
|
7
7
|
import { DtoUserLazy } from 'vona-module-test-vona';
|
|
8
8
|
|
|
9
9
|
describe('dtoLazy.test.ts', () => {
|
|
@@ -2,7 +2,7 @@ import type { TypeDecoratorRules } from 'vona-module-a-openapiutils';
|
|
|
2
2
|
import assert from 'node:assert';
|
|
3
3
|
import { describe, it } from 'node:test';
|
|
4
4
|
import { app } from 'vona-mock';
|
|
5
|
-
import { getTargetDecoratorRules } from 'vona-module-a-
|
|
5
|
+
import { getTargetDecoratorRules } from 'vona-module-a-openapiutils';
|
|
6
6
|
import { $Dto, $relationDynamic } from 'vona-module-a-orm';
|
|
7
7
|
import { ModelPost } from 'vona-module-test-vona';
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@ describe('dtoMutate.test.ts', () => {
|
|
|
46
46
|
rules = getTargetDecoratorRules(DtoPostCreate.prototype);
|
|
47
47
|
assert.equal(rules.title?.type === 'string', true); // ZodOptional
|
|
48
48
|
assert.equal(rules.stars?.type === 'optional', true);
|
|
49
|
-
assert.equal(
|
|
49
|
+
assert.equal(rules.userId?.type === 'pipe', true);
|
|
50
50
|
assert.equal(rules.postContent?.type === 'optional', true);
|
|
51
51
|
assert.equal(rules.user, undefined);
|
|
52
52
|
assert.equal(rules.id, undefined);
|
|
@@ -2,6 +2,7 @@ import type { IQueryParams } from 'vona-module-a-orm';
|
|
|
2
2
|
import assert from 'node:assert';
|
|
3
3
|
import { describe, it } from 'node:test';
|
|
4
4
|
import { isNil } from '@cabloy/utils';
|
|
5
|
+
import { $customKey } from 'vona';
|
|
5
6
|
import { app } from 'vona-mock';
|
|
6
7
|
|
|
7
8
|
describe('dtoQuery.test.ts', () => {
|
|
@@ -9,6 +10,9 @@ describe('dtoQuery.test.ts', () => {
|
|
|
9
10
|
await app.bean.executor.mockCtx(async () => {
|
|
10
11
|
// findManyEcho
|
|
11
12
|
const resEcho: IQueryParams = await app.bean.executor.performAction('get', '/test/vona/post/findManyEcho', {
|
|
13
|
+
headers: {
|
|
14
|
+
[$customKey('x-vona-tz')]: 'Asia/Tokyo',
|
|
15
|
+
},
|
|
12
16
|
query: {
|
|
13
17
|
columns: 'id,title', // ['id', 'title'],
|
|
14
18
|
where: {
|
|
@@ -22,6 +26,7 @@ describe('dtoQuery.test.ts', () => {
|
|
|
22
26
|
pageSize: 30,
|
|
23
27
|
title: 'ai',
|
|
24
28
|
userName: 'tom',
|
|
29
|
+
createdAt: '2025-12-01 - 2025-12-02',
|
|
25
30
|
},
|
|
26
31
|
});
|
|
27
32
|
assert.deepEqual(resEcho.columns, ['id', 'title']);
|
|
@@ -29,6 +34,10 @@ describe('dtoQuery.test.ts', () => {
|
|
|
29
34
|
'stars': { _gt_: 12 },
|
|
30
35
|
'title': { _includesI_: 'ai' },
|
|
31
36
|
'testVonaUser.name': { _eqI_: 'tom' },
|
|
37
|
+
'createdAt': {
|
|
38
|
+
_gte_: new Date('2025-11-30T15:00:00.000Z'),
|
|
39
|
+
_lt_: new Date('2025-12-02T15:00:00.000Z'),
|
|
40
|
+
},
|
|
32
41
|
});
|
|
33
42
|
assert.deepEqual(resEcho.orders, [['testVonaPost.createdAt', 'desc']]);
|
|
34
43
|
assert.equal(resEcho.offset, 30);
|
package/test/upload.test.ts
CHANGED
|
@@ -2,7 +2,7 @@ import assert from 'node:assert';
|
|
|
2
2
|
import { Blob } from 'node:buffer';
|
|
3
3
|
import { describe, it } from 'node:test';
|
|
4
4
|
import { app } from 'vona-mock';
|
|
5
|
-
import { $apiPath } from 'vona-module-a-
|
|
5
|
+
import { $apiPath } from 'vona-module-a-openapiutils';
|
|
6
6
|
|
|
7
7
|
describe('upload.test.ts', () => {
|
|
8
8
|
it('action:upload:fields', async () => {
|
|
@@ -4,7 +4,7 @@ import { describe, it } from 'node:test';
|
|
|
4
4
|
import { catchError } from '@cabloy/utils';
|
|
5
5
|
import { $Class, cast } from 'vona';
|
|
6
6
|
import { app } from 'vona-mock';
|
|
7
|
-
import { Api } from 'vona-module-a-
|
|
7
|
+
import { Api } from 'vona-module-a-openapiutils';
|
|
8
8
|
import { Dto } from 'vona-module-a-web';
|
|
9
9
|
import { DtoProfile } from '../../src/dto/profile.ts';
|
|
10
10
|
import { DtoUser } from '../../src/dto/user.ts';
|