feat: Update .gitignore and refine TypeScript configuration; clean up commented code and enhance dataset validation; npm updates
Some checks failed
CI / container-job (push) Failing after 35s
Some checks failed
CI / container-job (push) Failing after 35s
- Updated .gitignore to include new patterns - Refined TypeScript configuration for better performance and readability - Cleaned up commented code in several files - Enhanced dataset validation logic - Updated npm dependencies to the latest versions
This commit is contained in:
parent
a5e0a36327
commit
8d47a58d29
22 changed files with 1315 additions and 4273 deletions
|
@ -69,7 +69,7 @@ export default class MailProvider {
|
|||
const mailConfigProvider = this.app.config.get('mail');
|
||||
const config = await configProvider.resolve<any>(this.app, mailConfigProvider);
|
||||
|
||||
const iwas = await config.mailers.smtp();
|
||||
await config.mailers.smtp();
|
||||
// iwas.config.host = 'hhhost';
|
||||
// this.app.config.set('mail.mailers.smtp.host', 'xhost');
|
||||
// const iwas = await config.mailers.smtp();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|*/
|
||||
import type { ApplicationService } from '@adonisjs/core/types';
|
||||
import vine, { BaseLiteralType, Vine } from '@vinejs/vine';
|
||||
import type { Validation, FieldContext, FieldOptions } from '@vinejs/vine/types';
|
||||
import type { FieldContext, FieldOptions } from '@vinejs/vine/types';
|
||||
// import type { MultipartFile, FileValidationOptions } from '@adonisjs/bodyparser/types';
|
||||
import type { MultipartFile } from '@adonisjs/core/bodyparser';
|
||||
import type { FileValidationOptions } from '@adonisjs/core/types/bodyparser';
|
||||
|
@ -28,8 +28,7 @@ declare module '@vinejs/vine' {
|
|||
* Extend HTTP request class
|
||||
*/
|
||||
declare module '@adonisjs/core/http' {
|
||||
interface Request extends RequestValidator {
|
||||
}
|
||||
interface Request extends RequestValidator {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,7 +47,7 @@ export async function getEnabledExtensions() {
|
|||
.flat();
|
||||
|
||||
return extensions;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* VineJS validation rule that validates the file to be an
|
||||
* instance of BodyParser MultipartFile class.
|
||||
|
@ -82,8 +81,8 @@ const isMultipartFile = vine.createRule(async (file: MultipartFile | unknown, op
|
|||
if (validatedFile.allowedExtensions === undefined && validationOptions.extnames) {
|
||||
validatedFile.allowedExtensions = await getEnabledExtensions();
|
||||
}
|
||||
/**
|
||||
* wieder löschen
|
||||
/**
|
||||
* wieder löschen
|
||||
* Set extensions when it's defined in the options and missing
|
||||
* on the file instance
|
||||
*/
|
||||
|
@ -111,14 +110,16 @@ export class VineMultipartFile extends BaseLiteralType<MultipartFile, MultipartF
|
|||
// extnames: (18) ['gpkg', 'htm', 'html', 'csv', 'txt', 'asc', 'c', 'cc', 'h', 'srt', 'tiff', 'pdf', 'png', 'zip', 'jpg', 'jpeg', 'jpe', 'xlsx']
|
||||
// size: '512mb'
|
||||
|
||||
public constructor(validationOptions?: FileRuleValidationOptions, options?: FieldOptions, validations?: Validation<any>[]) {
|
||||
// public constructor(validationOptions?: FileRuleValidationOptions, options?: FieldOptions, validations?: Validation<any>[]) {
|
||||
public constructor(validationOptions?: FileRuleValidationOptions, options?: FieldOptions) {
|
||||
// super(options, validations);
|
||||
super(options, [isMultipartFile(validationOptions || {})]);
|
||||
this.validationOptions = validationOptions;
|
||||
}
|
||||
|
||||
public clone(): any {
|
||||
return new VineMultipartFile(this.validationOptions, this.cloneOptions(), this.cloneValidations());
|
||||
// return new VineMultipartFile(this.validationOptions, this.cloneOptions(), this.cloneValidations());
|
||||
return new VineMultipartFile(this.validationOptions, this.cloneOptions());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,9 +154,8 @@ export default class VinejsProvider {
|
|||
* data for the current request using VineJS validators
|
||||
*/
|
||||
Request.macro('validateUsing', function (...args) {
|
||||
return new RequestValidator(this.ctx).validateUsing(...args);
|
||||
});
|
||||
|
||||
return new RequestValidator(this.ctx).validateUsing(...args);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue