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
|
@ -12,10 +12,10 @@ import testUtils from '@adonisjs/core/services/test_utils';
|
|||
// import { assert, runFailedTests, specReporter, apiClient } from '@japa/preset-adonis';
|
||||
|
||||
import { assert } from '@japa/assert';
|
||||
import { apiClient } from '@japa/api-client';
|
||||
// import { apiClient } from '@japa/api-client';
|
||||
import { pluginAdonisJS } from '@japa/plugin-adonisjs';
|
||||
import app from '@adonisjs/core/services/app';
|
||||
import env from '#start/env'
|
||||
// import env from '#start/env'
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Japa Plugins
|
||||
|
@ -30,9 +30,9 @@ import env from '#start/env'
|
|||
// export const plugins: Required<Config>['plugins'] = [assert(), runFailedTests(), apiClient()];
|
||||
export const plugins: Config['plugins'] = [
|
||||
assert(),
|
||||
apiClient({
|
||||
baseURL: `http://${env.get('HOST')}:${env.get('PORT')}`,
|
||||
}),
|
||||
// apiClient({
|
||||
// baseURL: `http://${env.get('HOST')}:${env.get('PORT')}`,
|
||||
// }),
|
||||
pluginAdonisJS(app),
|
||||
];
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import User from '#models/user';
|
|||
import Role from '#models/role';
|
||||
import Permission from '#models/permission';
|
||||
import { TestContext } from '@japa/runner/core';
|
||||
const BASE_URL = `http://${process.env.HOST}:${process.env.PORT}`
|
||||
const BASE_URL = `http://${process.env.HOST}:${process.env.PORT}`;
|
||||
|
||||
test.group('DatasetController', (group) => {
|
||||
// Write your test here
|
||||
|
@ -24,8 +24,6 @@ test.group('DatasetController', (group) => {
|
|||
// server = await supertest(BASE_URL);
|
||||
// });
|
||||
|
||||
|
||||
|
||||
test('should render dataset release page', async ({ assert }: TestContext) => {
|
||||
var testAgent = supertest(BASE_URL);
|
||||
|
||||
|
@ -35,19 +33,18 @@ test.group('DatasetController', (group) => {
|
|||
email: 'alice@email.com',
|
||||
password: 'password',
|
||||
});
|
||||
|
||||
|
||||
const role = await Role.create({
|
||||
name: 'administrator',
|
||||
display_name: 'admin',
|
||||
description: 'User has access to all system functionality'
|
||||
description: 'User has access to all system functionality',
|
||||
});
|
||||
await user.related('roles').attach([role.id]);
|
||||
|
||||
|
||||
const permission = await Permission.create({
|
||||
name: 'dataset-edit',
|
||||
display_name: 'edit dataset',
|
||||
description: 'allow role to edit datasets'
|
||||
description: 'allow role to edit datasets',
|
||||
});
|
||||
await role.related('permissions').attach([permission.id]);
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { test } from '@japa/runner';
|
||||
// import { test } from '@japa/runner';
|
||||
|
||||
test('display welcome page', async ({ client }) => {
|
||||
const response = await client.get('/welcome');
|
||||
// test('display welcome page', async ({ client }) => {
|
||||
// const response = await client.get('/welcome');
|
||||
|
||||
response.assertStatus(200);
|
||||
response.assertTextIncludes('<h1 class="title"> It Works! </h1>');
|
||||
});
|
||||
// response.assertStatus(200);
|
||||
// response.assertTextIncludes('<h1 class="title"> It Works! </h1>');
|
||||
// });
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue