quantix-mcp 0.3.7 → 0.3.9
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/.github/agents/copilot-instructions.md +32 -32
- package/.github/copilot-instructions.md +17 -17
- package/.github/workflows/publish.yaml +28 -28
- package/.opencode/command/speckit.analyze.md +184 -184
- package/.opencode/command/speckit.checklist.md +294 -294
- package/.opencode/command/speckit.clarify.md +181 -181
- package/.opencode/command/speckit.constitution.md +84 -84
- package/.opencode/command/speckit.implement.md +135 -135
- package/.opencode/command/speckit.plan.md +89 -89
- package/.opencode/command/speckit.specify.md +258 -258
- package/.opencode/command/speckit.tasks.md +137 -137
- package/.opencode/command/speckit.taskstoissues.md +30 -30
- package/.specify/memory/constitution.md +58 -58
- package/.specify/templates/constitution-template.md +50 -50
- package/.vscode/launch.json +14 -14
- package/CLAUDE.md +64 -64
- package/README.md +176 -176
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/tools/accounts.d.ts.map +1 -1
- package/dist/tools/accounts.js +64 -28
- package/dist/tools/accounts.js.map +1 -1
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +46 -20
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/credit-cards.d.ts.map +1 -1
- package/dist/tools/credit-cards.js +89 -33
- package/dist/tools/credit-cards.js.map +1 -1
- package/dist/tools/data.d.ts.map +1 -1
- package/dist/tools/data.js +19 -8
- package/dist/tools/data.js.map +1 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +28 -12
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/summary.d.ts.map +1 -1
- package/dist/tools/summary.js +17 -11
- package/dist/tools/summary.js.map +1 -1
- package/dist/tools/transactions.d.ts.map +1 -1
- package/dist/tools/transactions.js +86 -50
- package/dist/tools/transactions.js.map +1 -1
- package/dist/tools/transfers.d.ts +3 -0
- package/dist/tools/transfers.d.ts.map +1 -0
- package/dist/tools/transfers.js +107 -0
- package/dist/tools/transfers.js.map +1 -0
- package/dist/types/schemas.d.ts +25 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +28 -2
- package/dist/types/schemas.js.map +1 -1
- package/dist/utils/toolHelpers.d.ts +7 -0
- package/dist/utils/toolHelpers.d.ts.map +1 -0
- package/dist/utils/toolHelpers.js +11 -0
- package/dist/utils/toolHelpers.js.map +1 -0
- package/openapi.yaml +2045 -1828
- package/package.json +41 -41
- package/specs/001-mcp-api-integration/checklists/requirements.md +34 -34
- package/specs/001-mcp-api-integration/contracts/openapi.yaml +635 -635
- package/specs/001-mcp-api-integration/data-model.md +106 -106
- package/specs/001-mcp-api-integration/plan.md +73 -73
- package/specs/001-mcp-api-integration/quickstart.md +74 -74
- package/specs/001-mcp-api-integration/research.md +58 -58
- package/specs/001-mcp-api-integration/spec.md +119 -119
- package/specs/001-mcp-api-integration/tasks.md +64 -64
- package/src/config.ts +36 -36
- package/src/index.ts +49 -47
- package/src/services/apiClient.ts +49 -49
- package/src/tools/accounts.ts +140 -111
- package/src/tools/categories.ts +102 -81
- package/src/tools/credit-cards.ts +184 -147
- package/src/tools/data.ts +45 -36
- package/src/tools/settings.ts +64 -51
- package/src/tools/summary.ts +29 -24
- package/src/tools/transactions.ts +157 -128
- package/src/tools/transfers.ts +122 -0
- package/src/types/schemas.ts +260 -235
- package/src/utils/toolHelpers.ts +11 -0
- package/tests/benchmark.test.d.ts +1 -1
- package/tests/benchmark.test.js +32 -32
- package/tests/benchmark.test.ts +38 -38
- package/tests/server.test.d.ts +1 -1
- package/tests/server.test.js +12 -12
- package/tests/server.test.ts +14 -14
- package/tests/setup.d.ts +3 -3
- package/tests/setup.js +16 -16
- package/tests/setup.ts +20 -20
- package/tests/tools/accounts.test.ts +159 -118
- package/tests/tools/categories.test.d.ts +1 -1
- package/tests/tools/categories.test.js +62 -62
- package/tests/tools/categories.test.ts +120 -78
- package/tests/tools/credit-cards.test.d.ts +1 -1
- package/tests/tools/credit-cards.test.js +70 -70
- package/tests/tools/credit-cards.test.ts +131 -89
- package/tests/tools/data.test.ts +100 -0
- package/tests/tools/settings.test.ts +116 -0
- package/tests/tools/summary.test.d.ts +1 -1
- package/tests/tools/summary.test.js +35 -35
- package/tests/tools/summary.test.ts +63 -42
- package/tests/tools/transactions.test.d.ts +1 -1
- package/tests/tools/transactions.test.js +66 -66
- package/tests/tools/transactions.test.ts +133 -82
- package/tests/tools/transfers.test.ts +141 -0
- package/tsconfig.json +52 -52
- package/vitest.config.d.ts +2 -2
- package/vitest.config.js +13 -13
- package/vitest.config.ts +14 -14
|
@@ -1,82 +1,133 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
import { registerTransactionTools } from '../../src/tools/transactions.js';
|
|
3
|
-
import { apiClient } from '../../src/services/apiClient.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { registerTransactionTools } from '../../src/tools/transactions.js';
|
|
3
|
+
import { apiClient } from '../../src/services/apiClient.js';
|
|
4
|
+
import { ApiClientError } from '../../src/services/apiClient.js';
|
|
5
|
+
|
|
6
|
+
vi.mock('../../src/services/apiClient.js', () => ({
|
|
7
|
+
apiClient: {
|
|
8
|
+
get: vi.fn(),
|
|
9
|
+
post: vi.fn(),
|
|
10
|
+
patch: vi.fn(),
|
|
11
|
+
delete: vi.fn(),
|
|
12
|
+
},
|
|
13
|
+
ApiClientError: class ApiClientError extends Error {
|
|
14
|
+
status: number;
|
|
15
|
+
statusText: string;
|
|
16
|
+
constructor(message: string, status: number, statusText: string) {
|
|
17
|
+
super(message);
|
|
18
|
+
this.name = 'ApiClientError';
|
|
19
|
+
this.status = status;
|
|
20
|
+
this.statusText = statusText;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
describe('Transaction Tools', () => {
|
|
26
|
+
let mockServer: any;
|
|
27
|
+
let registeredTools: Record<string, Function> = {};
|
|
28
|
+
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
registeredTools = {};
|
|
31
|
+
mockServer = {
|
|
32
|
+
registerTool: vi.fn((name, def, handler) => {
|
|
33
|
+
registeredTools[name] = handler;
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
vi.clearAllMocks();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should register transaction tools', () => {
|
|
40
|
+
registerTransactionTools(mockServer);
|
|
41
|
+
expect(mockServer.registerTool).toHaveBeenCalledTimes(7); // create, get_all, get_one, update, pay, unpay, delete
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
describe('create_transaction', () => {
|
|
45
|
+
it('should create transaction', async () => {
|
|
46
|
+
registerTransactionTools(mockServer);
|
|
47
|
+
const handler = registeredTools['create_transaction'];
|
|
48
|
+
(apiClient.post as any).mockResolvedValue({ id: 'tx_1' });
|
|
49
|
+
|
|
50
|
+
const input = { type: 'EXPENSE', name: 'Lunch', amount: 20, date: '2026-03-01' };
|
|
51
|
+
const result = await handler(input);
|
|
52
|
+
|
|
53
|
+
expect(apiClient.post).toHaveBeenCalledWith('/transactions', expect.objectContaining(input));
|
|
54
|
+
expect(result.content[0].text).toContain('Transaction created');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('should return API error on failure', async () => {
|
|
58
|
+
registerTransactionTools(mockServer);
|
|
59
|
+
const handler = registeredTools['create_transaction'];
|
|
60
|
+
(apiClient.post as any).mockRejectedValue(new ApiClientError('fail', 422, 'Unprocessable Entity'));
|
|
61
|
+
|
|
62
|
+
const result = await handler({ type: 'EXPENSE', name: 'Lunch', amount: 0, date: '2026-03-01' });
|
|
63
|
+
|
|
64
|
+
expect(result.content[0].text).toMatch(/^API error 422/);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
describe('get_transactions', () => {
|
|
69
|
+
it('should get transactions list', async () => {
|
|
70
|
+
registerTransactionTools(mockServer);
|
|
71
|
+
const handler = registeredTools['get_transactions'];
|
|
72
|
+
(apiClient.get as any).mockResolvedValue([]);
|
|
73
|
+
|
|
74
|
+
await handler({ month: '2026-03' });
|
|
75
|
+
|
|
76
|
+
expect(apiClient.get).toHaveBeenCalledWith('/transactions?month=2026-03');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('should return API error on failure', async () => {
|
|
80
|
+
registerTransactionTools(mockServer);
|
|
81
|
+
const handler = registeredTools['get_transactions'];
|
|
82
|
+
(apiClient.get as any).mockRejectedValue(new ApiClientError('fail', 500, 'Internal Server Error'));
|
|
83
|
+
|
|
84
|
+
const result = await handler({});
|
|
85
|
+
|
|
86
|
+
expect(result.content[0].text).toMatch(/^API error 500/);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
describe('pay_transaction', () => {
|
|
91
|
+
it('should pay transaction', async () => {
|
|
92
|
+
registerTransactionTools(mockServer);
|
|
93
|
+
const handler = registeredTools['pay_transaction'];
|
|
94
|
+
(apiClient.patch as any).mockResolvedValue({});
|
|
95
|
+
|
|
96
|
+
await handler({ id: 'tx_1' });
|
|
97
|
+
|
|
98
|
+
expect(apiClient.patch).toHaveBeenCalledWith('/transactions/tx_1/pay');
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('should return API error on failure', async () => {
|
|
102
|
+
registerTransactionTools(mockServer);
|
|
103
|
+
const handler = registeredTools['pay_transaction'];
|
|
104
|
+
(apiClient.patch as any).mockRejectedValue(new ApiClientError('fail', 404, 'Not Found'));
|
|
105
|
+
|
|
106
|
+
const result = await handler({ id: 'tx_1' });
|
|
107
|
+
|
|
108
|
+
expect(result.content[0].text).toMatch(/^API error 404/);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
describe('delete_transaction', () => {
|
|
113
|
+
it('should delete transaction', async () => {
|
|
114
|
+
registerTransactionTools(mockServer);
|
|
115
|
+
const handler = registeredTools['delete_transaction'];
|
|
116
|
+
(apiClient.delete as any).mockResolvedValue({});
|
|
117
|
+
|
|
118
|
+
await handler({ id: 'tx_1' });
|
|
119
|
+
|
|
120
|
+
expect(apiClient.delete).toHaveBeenCalledWith('/transactions/tx_1');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('should return API error on failure', async () => {
|
|
124
|
+
registerTransactionTools(mockServer);
|
|
125
|
+
const handler = registeredTools['delete_transaction'];
|
|
126
|
+
(apiClient.delete as any).mockRejectedValue(new ApiClientError('fail', 404, 'Not Found'));
|
|
127
|
+
|
|
128
|
+
const result = await handler({ id: 'tx_1' });
|
|
129
|
+
|
|
130
|
+
expect(result.content[0].text).toMatch(/^API error 404/);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { registerTransferTools } from '../../src/tools/transfers.js';
|
|
3
|
+
import { apiClient } from '../../src/services/apiClient.js';
|
|
4
|
+
import { ApiClientError } from '../../src/services/apiClient.js';
|
|
5
|
+
|
|
6
|
+
vi.mock('../../src/services/apiClient.js', () => ({
|
|
7
|
+
apiClient: {
|
|
8
|
+
get: vi.fn(),
|
|
9
|
+
post: vi.fn(),
|
|
10
|
+
patch: vi.fn(),
|
|
11
|
+
delete: vi.fn(),
|
|
12
|
+
},
|
|
13
|
+
ApiClientError: class ApiClientError extends Error {
|
|
14
|
+
status: number;
|
|
15
|
+
statusText: string;
|
|
16
|
+
constructor(message: string, status: number, statusText: string) {
|
|
17
|
+
super(message);
|
|
18
|
+
this.name = 'ApiClientError';
|
|
19
|
+
this.status = status;
|
|
20
|
+
this.statusText = statusText;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
describe('Transfer Tools', () => {
|
|
26
|
+
let mockServer: any;
|
|
27
|
+
let registeredTools: Record<string, Function> = {};
|
|
28
|
+
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
registeredTools = {};
|
|
31
|
+
mockServer = {
|
|
32
|
+
registerTool: vi.fn((name, def, handler) => {
|
|
33
|
+
registeredTools[name] = handler;
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
vi.clearAllMocks();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should register all transfer tools', () => {
|
|
40
|
+
registerTransferTools(mockServer);
|
|
41
|
+
expect(mockServer.registerTool).toHaveBeenCalledTimes(5);
|
|
42
|
+
expect(registeredTools['create_transfer']).toBeDefined();
|
|
43
|
+
expect(registeredTools['get_transfers']).toBeDefined();
|
|
44
|
+
expect(registeredTools['get_transfer']).toBeDefined();
|
|
45
|
+
expect(registeredTools['update_transfer']).toBeDefined();
|
|
46
|
+
expect(registeredTools['delete_transfer']).toBeDefined();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe('create_transfer', () => {
|
|
50
|
+
it('should create a transfer', async () => {
|
|
51
|
+
registerTransferTools(mockServer);
|
|
52
|
+
const handler = registeredTools['create_transfer'];
|
|
53
|
+
(apiClient.post as any).mockResolvedValue({ id: 'tr_1' });
|
|
54
|
+
|
|
55
|
+
const input = {
|
|
56
|
+
sourceAccountId: 'acc_1',
|
|
57
|
+
destinationAccountId: 'acc_2',
|
|
58
|
+
amount: 100,
|
|
59
|
+
date: '2026-03-01'
|
|
60
|
+
};
|
|
61
|
+
const result = await handler(input);
|
|
62
|
+
|
|
63
|
+
expect(apiClient.post).toHaveBeenCalledWith('/transfers', input);
|
|
64
|
+
expect(result.content[0].text).toContain('Transfer created');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should return API error on failure', async () => {
|
|
68
|
+
registerTransferTools(mockServer);
|
|
69
|
+
const handler = registeredTools['create_transfer'];
|
|
70
|
+
(apiClient.post as any).mockRejectedValue(new ApiClientError('fail', 400, 'Bad Request'));
|
|
71
|
+
|
|
72
|
+
const result = await handler({
|
|
73
|
+
sourceAccountId: 'acc_1',
|
|
74
|
+
destinationAccountId: 'acc_2',
|
|
75
|
+
amount: 100,
|
|
76
|
+
date: '2026-03-01'
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
expect(result.content[0].text).toMatch(/^API error 400/);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
describe('get_transfers', () => {
|
|
84
|
+
it('should list transfers', async () => {
|
|
85
|
+
registerTransferTools(mockServer);
|
|
86
|
+
const handler = registeredTools['get_transfers'];
|
|
87
|
+
(apiClient.get as any).mockResolvedValue([{ id: 'tr_1' }]);
|
|
88
|
+
|
|
89
|
+
const result = await handler({ month: '2026-03' });
|
|
90
|
+
|
|
91
|
+
expect(apiClient.get).toHaveBeenCalledWith('/transfers?month=2026-03');
|
|
92
|
+
expect(result.content[0].text).toContain('Transfers');
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('should return API error on failure', async () => {
|
|
96
|
+
registerTransferTools(mockServer);
|
|
97
|
+
const handler = registeredTools['get_transfers'];
|
|
98
|
+
(apiClient.get as any).mockRejectedValue(new ApiClientError('fail', 500, 'Internal Server Error'));
|
|
99
|
+
|
|
100
|
+
const result = await handler({});
|
|
101
|
+
|
|
102
|
+
expect(result.content[0].text).toMatch(/^API error 500/);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
describe('get_transfer', () => {
|
|
107
|
+
it('should get a transfer by ID', async () => {
|
|
108
|
+
registerTransferTools(mockServer);
|
|
109
|
+
const handler = registeredTools['get_transfer'];
|
|
110
|
+
(apiClient.get as any).mockResolvedValue({ id: 'tr_1', amount: 100 });
|
|
111
|
+
|
|
112
|
+
const result = await handler({ id: 'tr_1' });
|
|
113
|
+
|
|
114
|
+
expect(apiClient.get).toHaveBeenCalledWith('/transfers/tr_1');
|
|
115
|
+
expect(result.content[0].text).toContain('tr_1');
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
describe('delete_transfer', () => {
|
|
120
|
+
it('should delete a transfer', async () => {
|
|
121
|
+
registerTransferTools(mockServer);
|
|
122
|
+
const handler = registeredTools['delete_transfer'];
|
|
123
|
+
(apiClient.delete as any).mockResolvedValue({});
|
|
124
|
+
|
|
125
|
+
const result = await handler({ id: 'tr_1' });
|
|
126
|
+
|
|
127
|
+
expect(apiClient.delete).toHaveBeenCalledWith('/transfers/tr_1');
|
|
128
|
+
expect(result.content[0].text).toContain('tr_1');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('should return API error on failure', async () => {
|
|
132
|
+
registerTransferTools(mockServer);
|
|
133
|
+
const handler = registeredTools['delete_transfer'];
|
|
134
|
+
(apiClient.delete as any).mockRejectedValue(new ApiClientError('fail', 404, 'Not Found'));
|
|
135
|
+
|
|
136
|
+
const result = await handler({ id: 'tr_1' });
|
|
137
|
+
|
|
138
|
+
expect(result.content[0].text).toMatch(/^API error 404/);
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
// File Layout
|
|
5
|
-
"rootDir": "./src",
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
|
|
8
|
-
// Environment Settings
|
|
9
|
-
// See also https://aka.ms/tsconfig/module
|
|
10
|
-
"module": "nodenext",
|
|
11
|
-
"target": "esnext",
|
|
12
|
-
// "types": [],
|
|
13
|
-
// For nodejs:
|
|
14
|
-
// "lib": ["esnext"],
|
|
15
|
-
// "types": ["node"],
|
|
16
|
-
// and npm install -D @types/node
|
|
17
|
-
|
|
18
|
-
// Other Outputs
|
|
19
|
-
"sourceMap": true,
|
|
20
|
-
"declaration": true,
|
|
21
|
-
"declarationMap": true,
|
|
22
|
-
|
|
23
|
-
// Stricter Typechecking Options
|
|
24
|
-
"noUncheckedIndexedAccess": true,
|
|
25
|
-
"exactOptionalPropertyTypes": true,
|
|
26
|
-
|
|
27
|
-
// Style Options
|
|
28
|
-
// "noImplicitReturns": true,
|
|
29
|
-
// "noImplicitOverride": true,
|
|
30
|
-
// "noUnusedLocals": true,
|
|
31
|
-
// "noUnusedParameters": true,
|
|
32
|
-
// "noFallthroughCasesInSwitch": true,
|
|
33
|
-
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
-
|
|
35
|
-
// Recommended Options
|
|
36
|
-
"strict": true,
|
|
37
|
-
"jsx": "react-jsx",
|
|
38
|
-
"verbatimModuleSyntax": true,
|
|
39
|
-
"isolatedModules": true,
|
|
40
|
-
"noUncheckedSideEffectImports": true,
|
|
41
|
-
"moduleDetection": "force",
|
|
42
|
-
"skipLibCheck": true,
|
|
43
|
-
},
|
|
44
|
-
"include": [
|
|
45
|
-
"src/**/*"
|
|
46
|
-
],
|
|
47
|
-
"exclude": [
|
|
48
|
-
"node_modules",
|
|
49
|
-
"tests",
|
|
50
|
-
"vitest.config.ts"
|
|
51
|
-
]
|
|
52
|
-
}
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"target": "esnext",
|
|
12
|
+
// "types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
"verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
},
|
|
44
|
+
"include": [
|
|
45
|
+
"src/**/*"
|
|
46
|
+
],
|
|
47
|
+
"exclude": [
|
|
48
|
+
"node_modules",
|
|
49
|
+
"tests",
|
|
50
|
+
"vitest.config.ts"
|
|
51
|
+
]
|
|
52
|
+
}
|
package/vitest.config.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const _default: import("vite").UserConfig;
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: import("vite").UserConfig;
|
|
2
|
+
export default _default;
|
|
3
3
|
//# sourceMappingURL=vitest.config.d.ts.map
|
package/vitest.config.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
export default defineConfig({
|
|
3
|
-
test: {
|
|
4
|
-
globals: true,
|
|
5
|
-
environment: 'node',
|
|
6
|
-
setupFiles: ['tests/setup.ts'],
|
|
7
|
-
include: ['tests/**/*.test.ts'],
|
|
8
|
-
coverage: {
|
|
9
|
-
provider: 'v8',
|
|
10
|
-
reporter: ['text', 'json', 'html'],
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
});
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
export default defineConfig({
|
|
3
|
+
test: {
|
|
4
|
+
globals: true,
|
|
5
|
+
environment: 'node',
|
|
6
|
+
setupFiles: ['tests/setup.ts'],
|
|
7
|
+
include: ['tests/**/*.test.ts'],
|
|
8
|
+
coverage: {
|
|
9
|
+
provider: 'v8',
|
|
10
|
+
reporter: ['text', 'json', 'html'],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
14
|
//# sourceMappingURL=vitest.config.js.map
|
package/vitest.config.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
globals: true,
|
|
6
|
-
environment: 'node',
|
|
7
|
-
setupFiles: ['tests/setup.ts'],
|
|
8
|
-
include: ['tests/**/*.test.ts'],
|
|
9
|
-
coverage: {
|
|
10
|
-
provider: 'v8',
|
|
11
|
-
reporter: ['text', 'json', 'html'],
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
});
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
globals: true,
|
|
6
|
+
environment: 'node',
|
|
7
|
+
setupFiles: ['tests/setup.ts'],
|
|
8
|
+
include: ['tests/**/*.test.ts'],
|
|
9
|
+
coverage: {
|
|
10
|
+
provider: 'v8',
|
|
11
|
+
reporter: ['text', 'json', 'html'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|