mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
WIP: First stabs at getting Laravel Vite to work; no luck so far :(
Probably going to back out all the 'vite' stuff anyways :/
This commit is contained in:
parent
40a38486b9
commit
645bba96cd
|
@ -18,7 +18,6 @@ class Kernel extends HttpKernel
|
||||||
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||||
\Illuminate\Session\Middleware\StartSession::class,
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
\Fideloper\Proxy\TrustProxies::class,
|
|
||||||
\App\Http\Middleware\CheckForSetup::class,
|
\App\Http\Middleware\CheckForSetup::class,
|
||||||
\App\Http\Middleware\CheckForDebug::class,
|
\App\Http\Middleware\CheckForDebug::class,
|
||||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class TrustProxies extends Middleware
|
class TrustProxies extends Middleware
|
||||||
|
@ -10,7 +10,7 @@ class TrustProxies extends Middleware
|
||||||
/**
|
/**
|
||||||
* The trusted proxies for this application.
|
* The trusted proxies for this application.
|
||||||
*
|
*
|
||||||
* @var array|string|null
|
* @var array<int, string>|string|null
|
||||||
*/
|
*/
|
||||||
protected $proxies;
|
protected $proxies;
|
||||||
|
|
||||||
|
@ -19,5 +19,10 @@ class TrustProxies extends Middleware
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
|
protected $headers =
|
||||||
|
Request::HEADER_X_FORWARDED_FOR |
|
||||||
|
Request::HEADER_X_FORWARDED_HOST |
|
||||||
|
Request::HEADER_X_FORWARDED_PORT |
|
||||||
|
Request::HEADER_X_FORWARDED_PROTO |
|
||||||
|
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,20 +29,17 @@
|
||||||
"barryvdh/laravel-debugbar": "^3.6",
|
"barryvdh/laravel-debugbar": "^3.6",
|
||||||
"barryvdh/laravel-dompdf": "^2.0",
|
"barryvdh/laravel-dompdf": "^2.0",
|
||||||
"doctrine/cache": "^1.10",
|
"doctrine/cache": "^1.10",
|
||||||
"doctrine/common": "^2.12",
|
|
||||||
"doctrine/dbal": "^3.1",
|
"doctrine/dbal": "^3.1",
|
||||||
"doctrine/inflector": "^1.3",
|
|
||||||
"doctrine/instantiator": "^1.3",
|
"doctrine/instantiator": "^1.3",
|
||||||
"eduardokum/laravel-mail-auto-embed": "^1.0",
|
"eduardokum/laravel-mail-auto-embed": "^2.0",
|
||||||
"enshrined/svg-sanitize": "^0.15.0",
|
"enshrined/svg-sanitize": "^0.15.0",
|
||||||
"erusev/parsedown": "^1.7",
|
"erusev/parsedown": "^1.7",
|
||||||
"facade/ignition": "^2.10",
|
"spatie/laravel-ignition": "^1.0",
|
||||||
"fideloper/proxy": "^4.3",
|
|
||||||
"fruitcake/laravel-cors": "^2.2",
|
"fruitcake/laravel-cors": "^2.2",
|
||||||
"guzzlehttp/guzzle": "^7.0.1",
|
"guzzlehttp/guzzle": "^7.0.1",
|
||||||
"intervention/image": "^2.5",
|
"intervention/image": "^2.5",
|
||||||
"javiereguiluz/easyslugger": "^1.0",
|
"javiereguiluz/easyslugger": "^1.0",
|
||||||
"laravel/framework": "^8.46",
|
"laravel/framework": "^9.0",
|
||||||
"laravel/helpers": "^1.4",
|
"laravel/helpers": "^1.4",
|
||||||
"laravel/passport": "^10.1",
|
"laravel/passport": "^10.1",
|
||||||
"laravel/slack-notification-channel": "^2.3",
|
"laravel/slack-notification-channel": "^2.3",
|
||||||
|
@ -52,13 +49,11 @@
|
||||||
"lcobucci/clock": "1.2.0|2.0.0",
|
"lcobucci/clock": "1.2.0|2.0.0",
|
||||||
"lcobucci/jwt": "^3.4.5|^4.0.4",
|
"lcobucci/jwt": "^3.4.5|^4.0.4",
|
||||||
"league/csv": "^9.7",
|
"league/csv": "^9.7",
|
||||||
"league/flysystem-aws-s3-v3": "^1.0",
|
"league/flysystem-aws-s3-v3": "^3.0",
|
||||||
"league/flysystem-cached-adapter": "^1.1",
|
|
||||||
"livewire/livewire": "^2.4",
|
"livewire/livewire": "^2.4",
|
||||||
"mediconesystems/livewire-datatables": "^0.5.0",
|
|
||||||
"neitanod/forceutf8": "^2.0",
|
"neitanod/forceutf8": "^2.0",
|
||||||
"nesbot/carbon": "^2.32",
|
"nesbot/carbon": "^2.32",
|
||||||
"nunomaduro/collision": "^5.4",
|
"nunomaduro/collision": "^6.1",
|
||||||
"onelogin/php-saml": "^3.4",
|
"onelogin/php-saml": "^3.4",
|
||||||
"paragonie/constant_time_encoding": "^2.3",
|
"paragonie/constant_time_encoding": "^2.3",
|
||||||
"symfony/polyfill-mbstring": "^1.22",
|
"symfony/polyfill-mbstring": "^1.22",
|
||||||
|
@ -66,10 +61,10 @@
|
||||||
"phpspec/prophecy": "^1.10",
|
"phpspec/prophecy": "^1.10",
|
||||||
"pragmarx/google2fa-laravel": "^1.3",
|
"pragmarx/google2fa-laravel": "^1.3",
|
||||||
"rollbar/rollbar-laravel": "^7.0",
|
"rollbar/rollbar-laravel": "^7.0",
|
||||||
"spatie/laravel-backup": "^6.16",
|
"spatie/laravel-backup": "^8.0",
|
||||||
"tecnickcom/tc-lib-barcode": "^1.15",
|
"tecnickcom/tc-lib-barcode": "^1.15",
|
||||||
"unicodeveloper/laravel-password": "^1.0",
|
"unicodeveloper/laravel-password": "^1.0",
|
||||||
"watson/validating": "^6.1"
|
"watson/validating": "^7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.16",
|
"fakerphp/faker": "^1.16",
|
||||||
|
@ -126,6 +121,9 @@
|
||||||
"sort-packages": true,
|
"sort-packages": true,
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"discard-changes": true,
|
"discard-changes": true,
|
||||||
"process-timeout": 3000
|
"process-timeout": 3000,
|
||||||
|
"allow-plugins": {
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5344
composer.lock
generated
5344
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -288,7 +288,6 @@ return [
|
||||||
Intervention\Image\ImageServiceProvider::class,
|
Intervention\Image\ImageServiceProvider::class,
|
||||||
Collective\Html\HtmlServiceProvider::class,
|
Collective\Html\HtmlServiceProvider::class,
|
||||||
Spatie\Backup\BackupServiceProvider::class,
|
Spatie\Backup\BackupServiceProvider::class,
|
||||||
Fideloper\Proxy\TrustedProxyServiceProvider::class,
|
|
||||||
PragmaRX\Google2FALaravel\ServiceProvider::class,
|
PragmaRX\Google2FALaravel\ServiceProvider::class,
|
||||||
Laravel\Passport\PassportServiceProvider::class,
|
Laravel\Passport\PassportServiceProvider::class,
|
||||||
Laravel\Tinker\TinkerServiceProvider::class,
|
Laravel\Tinker\TinkerServiceProvider::class,
|
||||||
|
|
|
@ -57,6 +57,6 @@ return [
|
||||||
*
|
*
|
||||||
* @link https://symfony.com/doc/current/deployment/proxies.html
|
* @link https://symfony.com/doc/current/deployment/proxies.html
|
||||||
*/
|
*/
|
||||||
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
|
// 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, //this is mostly handled already
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
28346
package-lock.json
generated
28346
package-lock.json
generated
File diff suppressed because it is too large
Load diff
16
package.json
16
package.json
|
@ -1,25 +1,23 @@
|
||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run development",
|
"dev": "vite",
|
||||||
"development": "mix",
|
"build": "vite build"
|
||||||
"watch": "mix watch",
|
|
||||||
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
|
||||||
"hot": "mix watch --hot",
|
|
||||||
"prod": "npm run production",
|
|
||||||
"production": "mix --production"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.12"
|
"node": ">=0.12"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"babel-preset-latest": "^6.24.1",
|
"babel-preset-latest": "^6.24.1",
|
||||||
"jquery": "<3.6.0",
|
"jquery": "<3.6.0",
|
||||||
"laravel-mix": "^6.0.49",
|
"laravel-mix": "^6.0.49",
|
||||||
|
"laravel-vite-plugin": "^0.7.3",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"postcss": "^8.4.5",
|
"postcss": "^8.4.5",
|
||||||
"vue": "2.4.4",
|
"vite": "^4.0.4",
|
||||||
|
"vue": "^3.0",
|
||||||
"vue-loader": "^15.9.7",
|
"vue-loader": "^15.9.7",
|
||||||
"vue-template-compiler": "2.4.4"
|
"vue-template-compiler": "2.4.4"
|
||||||
},
|
},
|
||||||
|
@ -47,7 +45,7 @@
|
||||||
"jquery.iframe-transport": "^1.0.0",
|
"jquery.iframe-transport": "^1.0.0",
|
||||||
"jspdf-autotable": "^3.5.24",
|
"jspdf-autotable": "^3.5.24",
|
||||||
"less": "^4.1.2",
|
"less": "^4.1.2",
|
||||||
"less-loader": "^5.0",
|
"less-loader": "^6.0",
|
||||||
"list.js": "^1.5.0",
|
"list.js": "^1.5.0",
|
||||||
"papaparse": "^4.3.3",
|
"papaparse": "^4.3.3",
|
||||||
"select2": "4.0.13",
|
"select2": "4.0.13",
|
||||||
|
|
4
public/vendor/livewire/livewire.js
vendored
4
public/vendor/livewire/livewire.js
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/livewire/livewire.js.map
vendored
2
public/vendor/livewire/livewire.js.map
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/livewire/manifest.json
vendored
2
public/vendor/livewire/manifest.json
vendored
|
@ -1 +1 @@
|
||||||
{"/livewire.js":"/livewire.js?id=c69d0f2801c01fcf8166"}
|
{"/livewire.js":"/livewire.js?id=fe747446aa84856d8b66"}
|
14
resources/assets/js/bootstrap.js
vendored
14
resources/assets/js/bootstrap.js
vendored
|
@ -1,4 +1,5 @@
|
||||||
window._ = require('lodash');
|
import lodash from 'lodash';
|
||||||
|
window._ = lodash;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||||
|
@ -6,18 +7,20 @@ window._ = require('lodash');
|
||||||
* code may be modified to fit the specific needs of your application.
|
* code may be modified to fit the specific needs of your application.
|
||||||
*/
|
*/
|
||||||
//window.$ = window.jQuery = require('jquery');
|
//window.$ = window.jQuery = require('jquery');
|
||||||
|
import jQuery from 'jquery';
|
||||||
|
window.$ = jQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jQuery UI is loaded here and then the tooltip is assigned another funtion name
|
* jQuery UI is loaded here and then the tooltip is assigned another funtion name
|
||||||
* This resolves the issue of jquery-ui & bootstrap tooltip conflict
|
* This resolves the issue of jquery-ui & bootstrap tooltip conflict
|
||||||
*/
|
*/
|
||||||
require('jquery-ui');
|
import jquery_ui from 'jquery-ui';
|
||||||
jQuery.fn.uitooltip = jQuery.fn.tooltip;
|
jQuery.fn.uitooltip = jQuery.fn.tooltip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load boostrap
|
* Load boostrap
|
||||||
*/
|
*/
|
||||||
require('bootstrap-less');
|
import 'bootstrap-less';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vue is a modern JavaScript library for building interactive web interfaces
|
* Vue is a modern JavaScript library for building interactive web interfaces
|
||||||
|
@ -25,9 +28,10 @@ require('bootstrap-less');
|
||||||
* and simple, leaving you to focus on building your next great project.
|
* and simple, leaving you to focus on building your next great project.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.Vue = require('vue').default;
|
import Vue from 'vue';
|
||||||
|
window.Vue = Vue.default;
|
||||||
window.eventHub = new Vue();
|
window.eventHub = new Vue();
|
||||||
require('vue-resource');
|
import vue_resource from 'vue-resource';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We'll register a HTTP interceptor to attach the "CSRF" header to each of
|
* We'll register a HTTP interceptor to attach the "CSRF" header to each of
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* include Vue and Vue Resource. This gives a great starting point for
|
* include Vue and Vue Resource. This gives a great starting point for
|
||||||
* building robust, powerful web applications using Vue and Laravel.
|
* building robust, powerful web applications using Vue and Laravel.
|
||||||
*/
|
*/
|
||||||
require('./bootstrap');
|
import './bootstrap';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Next, we will create a fresh Vue application instance and attach it to
|
* Next, we will create a fresh Vue application instance and attach it to
|
||||||
|
@ -13,22 +13,22 @@ require('./bootstrap');
|
||||||
*/
|
*/
|
||||||
Vue.component(
|
Vue.component(
|
||||||
'passport-clients',
|
'passport-clients',
|
||||||
require('./components/passport/Clients.vue').default
|
import './components/passport/Clients.vue' // ? .default
|
||||||
);
|
);
|
||||||
|
|
||||||
Vue.component(
|
Vue.component(
|
||||||
'passport-authorized-clients',
|
'passport-authorized-clients',
|
||||||
require('./components/passport/AuthorizedClients.vue').default
|
import './components/passport/AuthorizedClients.vue' // ?).default
|
||||||
);
|
);
|
||||||
|
|
||||||
Vue.component(
|
Vue.component(
|
||||||
'passport-personal-access-tokens',
|
'passport-personal-access-tokens',
|
||||||
require('./components/passport/PersonalAccessTokens.vue').default
|
import './components/passport/PersonalAccessTokens.vue' // ).default
|
||||||
);
|
);
|
||||||
|
|
||||||
Vue.component(
|
Vue.component(
|
||||||
'importer',
|
'importer',
|
||||||
require('./components/importer/importer.vue').default
|
import './components/importer/importer.vue' //).default
|
||||||
);
|
);
|
||||||
|
|
||||||
// This component has been removed and replaced with a Livewire implementation
|
// This component has been removed and replaced with a Livewire implementation
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
<link rel="shortcut icon" type="image/ico" href="{{ ($snipeSettings) && ($snipeSettings->favicon!='') ? Storage::disk('public')->url('').e($snipeSettings->favicon) : 'favicon.ico' }} ">
|
<link rel="shortcut icon" type="image/ico" href="{{ ($snipeSettings) && ($snipeSettings->favicon!='') ? Storage::disk('public')->url('').e($snipeSettings->favicon) : 'favicon.ico' }} ">
|
||||||
{{-- stylesheets --}}
|
{{-- stylesheets --}}
|
||||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
@vite(['css/dist/all.css','js/dist/all.js'])
|
||||||
|
{{-- <link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">--}}
|
||||||
<link rel="shortcut icon" type="image/ico" href="{{ url(asset('favicon.ico')) }}">
|
<link rel="shortcut icon" type="image/ico" href="{{ url(asset('favicon.ico')) }}">
|
||||||
|
|
||||||
<script nonce="{{ csrf_token() }}">
|
<script nonce="{{ csrf_token() }}">
|
||||||
|
@ -71,7 +72,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Javascript files --}}
|
{{-- Javascript files --}}
|
||||||
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
|
{{-- <script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>--}}
|
||||||
|
|
||||||
|
|
||||||
@stack('js')
|
@stack('js')
|
||||||
|
|
Loading…
Reference in a new issue