Fix imports and formatting in packages
Small cleanup across multiple packages: adjust TypeBox imports (add TSchema) and reorder imports in napcat-core/helper/config.ts; normalize indentation and type formatting in napcat-protobuf/NapProto.ts; add missing trailing commas and minor object formatting fixes in tests (packages/napcat-test/schema.test.ts); remove an extra blank line in external-shims.d.ts; and remove an unnecessary blank line in post-build.mjs. These are whitespace/formatting and minor import fixes to satisfy linting and type checks.
This commit is contained in:
1 parent
7380665cc2
commit
7ee2f1c40d
5 files changed
+33
-35
No files matched your search
@@ -28,7 +28,7 @@ describe('NapCat Schemas Compilation', () => {
|
||||
test('should compile QuickAction hybrid schema without error', () => {
|
||||
const QASchema = Type.Object({
|
||||
message: OB11PostSendMsgSchema,
|
||||
quick_action: OB11ActionMessageSchema
|
||||
quick_action: OB11ActionMessageSchema,
|
||||
});
|
||||
expect(() => TypeCompiler.Compile(QASchema)).not.toThrow();
|
||||
});
|
||||
@@ -39,7 +39,7 @@ describe('NapCat Schemas Validation & Coercion', () => {
|
||||
const payload = {
|
||||
message_type: 'private',
|
||||
user_id: 123456,
|
||||
message: [{ type: 'text', data: { text: 'hello' } }]
|
||||
message: [{ type: 'text', data: { text: 'hello' } }],
|
||||
};
|
||||
|
||||
let data: unknown = structuredClone(payload);
|
||||
@@ -53,8 +53,8 @@ describe('NapCat Schemas Validation & Coercion', () => {
|
||||
test('should validate complex mixed messages correctly', () => {
|
||||
const payload = {
|
||||
message_type: 'group',
|
||||
group_id: "654321",
|
||||
message: 'this is a string message'
|
||||
group_id: '654321',
|
||||
message: 'this is a string message',
|
||||
};
|
||||
|
||||
let data: unknown = structuredClone(payload);
|
||||
@@ -82,14 +82,14 @@ describe('NapCat Configuration Loaders', () => {
|
||||
enableWebsocket: false,
|
||||
messagePostFormat: 'array',
|
||||
token: '',
|
||||
debug: false
|
||||
debug: false,
|
||||
}],
|
||||
httpSseServers: [],
|
||||
httpClients: [],
|
||||
websocketServers: [],
|
||||
websocketClients: [],
|
||||
plugins: []
|
||||
}
|
||||
plugins: [],
|
||||
},
|
||||
};
|
||||
const loaded = loadOneBotConfig(partialConfig);
|
||||
expect(loaded.network.httpServers[0]?.host).toBe('127.0.0.1');
|
||||
|
||||
Reference in new issue
Block a user