mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
chore(deps): upgrade all dependencies, toolchains and images (#2825)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"scripts": {
|
||||
"generate": "tsx src/scripts/GenerateSpec.ts",
|
||||
"test": "vitest run",
|
||||
"typecheck": "tsgo --noEmit",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"validate": "tsx src/scripts/GenerateSpec.ts --validate-only"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -22,8 +22,8 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "catalog:",
|
||||
"@types/node": "catalog:",
|
||||
"@typescript/native-preview": "catalog:",
|
||||
"tsx": "catalog:",
|
||||
"typescript": "catalog:ts7",
|
||||
"vitest": "catalog:"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ describe('native Zod conversion', () => {
|
||||
expect(input.required).toEqual(['note']);
|
||||
expect(output.required).toEqual(['name', 'note']);
|
||||
expect(input.properties?.name).toMatchObject({type: 'string', default: 'guest'});
|
||||
expect(input.properties?.note).toEqual({anyOf: [{type: 'string'}, {type: 'null'}]});
|
||||
expect(input.properties?.note).toEqual({type: ['string', 'null']});
|
||||
expect(input.additionalProperties).toBeUndefined();
|
||||
expect(output.additionalProperties).toBe(false);
|
||||
const document = documentFor(converter);
|
||||
|
||||
@@ -53,17 +53,17 @@ describe('discoverControllerFiles', () => {
|
||||
const route = routes.find((route) => route.path === '/donations/manage');
|
||||
expect(route?.explicitSecurity).toEqual([]);
|
||||
});
|
||||
it.each([
|
||||
'download_latest_desktop_version_checksum',
|
||||
'download_desktop_version_checksum',
|
||||
])('preserves the plain-text checksum response for %s', (operationId) => {
|
||||
const route = routes.find((route) => route.explicitOperationId === operationId);
|
||||
expect(route).toMatchObject({
|
||||
responseSchemaName: 'DownloadChecksumResponse',
|
||||
responseContentType: 'text/plain',
|
||||
explicitStatusCodes: [200],
|
||||
});
|
||||
});
|
||||
it.each(['download_latest_desktop_version_checksum', 'download_desktop_version_checksum'])(
|
||||
'preserves the plain-text checksum response for %s',
|
||||
(operationId) => {
|
||||
const route = routes.find((route) => route.explicitOperationId === operationId);
|
||||
expect(route).toMatchObject({
|
||||
responseSchemaName: 'DownloadChecksumResponse',
|
||||
responseContentType: 'text/plain',
|
||||
explicitStatusCodes: [200],
|
||||
});
|
||||
},
|
||||
);
|
||||
it('rejects a bodyless status that is absent from the route response statuses', () => {
|
||||
const route = routes.find((route) => route.path === '/donations/manage');
|
||||
assert(route);
|
||||
|
||||
@@ -19,19 +19,12 @@ describe('static route expressions', () => {
|
||||
expect(resolveExpression(`paths[${JSON.stringify(index)}]`)).toBe(Number(index) === 0 ? '/first' : '/second');
|
||||
});
|
||||
|
||||
it.each([
|
||||
'1suffix',
|
||||
'1.5',
|
||||
'01',
|
||||
'1e0',
|
||||
' 1',
|
||||
'',
|
||||
'-0',
|
||||
-1,
|
||||
2,
|
||||
])('does not coerce array property %j into a route index', (index) => {
|
||||
expect(resolveExpression(`paths[${JSON.stringify(index)}]`)).toBe(UNRESOLVED);
|
||||
});
|
||||
it.each(['1suffix', '1.5', '01', '1e0', ' 1', '', '-0', -1, 2])(
|
||||
'does not coerce array property %j into a route index',
|
||||
(index) => {
|
||||
expect(resolveExpression(`paths[${JSON.stringify(index)}]`)).toBe(UNRESOLVED);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
describe('imported route constants', () => {
|
||||
|
||||
@@ -142,7 +142,7 @@ export class OpenAPIOperationBuilder {
|
||||
const location = validator.target === 'param' ? 'path' : validator.target;
|
||||
const schemaName = validator.schemaName;
|
||||
const schema = this.schemaRegistry.get(schemaName);
|
||||
if (!schema || schema.type !== 'object' || !schema.properties) {
|
||||
if (schema?.type !== 'object' || !schema.properties) {
|
||||
throw new Error(`Parameter schema must be an object: ${schemaName}`);
|
||||
}
|
||||
const required = new Set(schema.required ?? []);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"extends": "../../tsconfigs/base.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext"],
|
||||
"types": ["node"],
|
||||
"paths": {
|
||||
"@fluxer/*": ["./../../packages/*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user