feat: update to vite.js, Refactor configuration files, remove unused assets, and clean up commented code:
All checks were successful
CI / container-job (push) Successful in 43s
All checks were successful
CI / container-job (push) Successful in 43s
- ace.js: use ts-node-maintained - adonisrc.ts: load vite_provider, sett assetBundler to false, addd hooks property - Dockerfile: change to node version 22 - package.json: remove babel depencies; add @swc/wasm, add vitejs/plugin-vue, add hot-hook, add vite, update eslint-config-prettier, tailwindcss, ts-node-maintained - new vite.config.js and config/vite.ts - inertia.js - improved own vinejs_provider.ts - adapted app.css needed for vitejs - adapted app.ts: new resolve method neede for vitejs relocated resources/js/logo.svg - remove Buffer import into FileUpload.vue - Create.vue: improved submit needed for @inertiajs/vue3 form helper - Edit.vue: mproved submit needed for @inertiajs/vue3 form helper - kernel.ts: load vite_middleware - formated rotes.ts file - rewritten allowed_extensions_mimetypes.ts file (removed typescript errors)
This commit is contained in:
parent
8d47a58d29
commit
4c5a8f5a42
40 changed files with 1647 additions and 4926 deletions
|
@ -15,11 +15,11 @@ import { VineString, VineNumber } from '@vinejs/vine';
|
|||
type Options = {
|
||||
table: string;
|
||||
column: string;
|
||||
whereNot?: ((field: FieldContext) => string);
|
||||
whereNot?: (field: FieldContext) => string;
|
||||
};
|
||||
|
||||
async function isUnique(value: unknown, options: Options, field: FieldContext) {
|
||||
if (typeof value !== 'string' && typeof value != 'number') {
|
||||
if (typeof value !== 'string' && typeof value !== 'number') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -37,13 +37,11 @@ async function isUnique(value: unknown, options: Options, field: FieldContext) {
|
|||
// report that value is NOT unique
|
||||
field.report('The {{ field }} field is not unique', 'isUnique', field);
|
||||
// field.report(messages.unique, "isUnique", field);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const isUniqueRule = vine.createRule(isUnique);
|
||||
|
||||
|
||||
declare module '@vinejs/vine' {
|
||||
interface VineString {
|
||||
isUnique(options: Options): this;
|
||||
|
@ -58,4 +56,4 @@ VineString.macro('isUnique', function (this: VineString, options: Options) {
|
|||
});
|
||||
VineNumber.macro('isUnique', function (this: VineNumber, options: Options) {
|
||||
return this.use(isUniqueRule(options));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue