Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ RUN set -ex; \
curl -sS "https://dl.yarnpkg.com/debian/pubkey.gpg" | apt-key add - ; \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list; \
wget 'https://get.symfony.com/cli/installer' -O - | bash; \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony; \
ls -al /root/; \
ls -al /root/.symfony5/; \
ls -al /root/.symfony5/bin/; \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony; \
symfony -V; \
apt-get update -q; \
apt-get install -y \
Expand Down Expand Up @@ -135,9 +138,6 @@ RUN set -ex; \
--no-progress \
--non-interactive \
; \
npm install \
--non-interactive \
; \
\
php bin/console cache:clear --env=${APP_ENV}; \
php bin/console cache:warmup --env=${APP_ENV}; \
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ RUN set -ex; \
; \
curl -sS "https://dl.yarnpkg.com/debian/pubkey.gpg" | apt-key add - ; \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list; \
wget https://get.symfony.com/cli/installer -O - | bash; \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony; \
wget 'https://get.symfony.com/cli/installer' -O - | bash; \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony; \
symfony -V; \
apt-get update -q; \
apt-get install -y \
Expand Down Expand Up @@ -135,9 +135,6 @@ RUN set -ex; \
--no-progress \
--non-interactive \
; \
npm install \
--non-interactive \
; \
\
php bin/console cache:clear --env=${APP_ENV}; \
php bin/console cache:warmup --env=${APP_ENV}; \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ RUN set -ex; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION}; \
composer --version; \
wget 'https://get.symfony.com/cli/installer' -O - | bash; \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony; \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony; \
symfony -V

ENV DATABASE_DRIVER=sqlite \
Expand Down Expand Up @@ -147,6 +147,6 @@ RUN set -ex; \
install \
; \
\
npm install \
yarn install \
--non-interactive \
;
2 changes: 1 addition & 1 deletion app/.env
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ JWT_PASSPHRASE=7306bc5d2c0de1310e92d655630a3892
###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=doctrine://default
MESSENGER_TRANSPORT_DSN=doctrine://default
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
###< symfony/messenger ###

Expand Down
2 changes: 1 addition & 1 deletion app/assets/vue/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Vue.use(Buefy, {
import App from "./App.vue";
import { i18n } from "./plugins/i18n/i18n";

new Vue({
const vue = new Vue({
el: "#app",
components: { App },
template: "<App/>",
Expand Down
21 changes: 11 additions & 10 deletions app/assets/vue/modules/auth/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AxiosError, AxiosResponse } from "axios";

import { IListResponse } from "../../api";
import { IError } from "../../interfaces/error";
import { IMutations } from "../../store/mutations";

import { IUser } from "../user/interfaces";
Expand All @@ -11,23 +12,23 @@ import { ILogin, ILoginToken } from "./interfaces";
export interface IAuthMutations extends IMutations {
GET_USER_PENDING(state: IAuthState): void;
GET_USER_SUCCESS(state: IAuthState, response: AxiosResponse<IUser>): void;
GET_USER_FAILED(state: IAuthState, error: AxiosError): void;
GET_USER_FAILED(state: IAuthState, error: AxiosError<IError>): void;

LOGIN_PENDING(state: IAuthState): void;
LOGIN_SUCCESS(state: IAuthState, loginPayload: ILoginToken): void;
LOGIN_FAILED(state: IAuthState, error: AxiosError): void;
LOGIN_FAILED(state: IAuthState, error: AxiosError<IError>): void;

LOGOUT_PENDING(state: IAuthState): void;
LOGOUT_SUCCESS(state: IAuthState): void;
LOGOUT_FAILED(state: IAuthState, error: AxiosError): void;
LOGOUT_FAILED(state: IAuthState, error: AxiosError<IError>): void;

START_IMPERSONATION_PENDING(state: IAuthState): void;
START_IMPERSONATION_SUCCESS(state: IAuthState, user: string): void;
START_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError): void;
START_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError<IError>): void;

STOP_IMPERSONATION_PENDING(state: IAuthState): void;
STOP_IMPERSONATION_SUCCESS(state: IAuthState): void;
STOP_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError): void;
STOP_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError<IError>): void;

CHANGE_LANGUAGE(state: IAuthState, lang: string): void;
}
Expand All @@ -45,7 +46,7 @@ export const AuthMutationsDefault: IAuthMutations = {
state.authUser = response.data;
}
},
GET_USER_FAILED(state: IAuthState, error: AxiosError): void {
GET_USER_FAILED(state: IAuthState, error: AxiosError<IError>): void {
state.isLoading = false;
if (error) {
state.error.status = error.response.status;
Expand All @@ -62,7 +63,7 @@ export const AuthMutationsDefault: IAuthMutations = {
state.token.update(loginPayload);
localStorage.setItem("token", loginPayload.token);
},
LOGIN_FAILED(state: IAuthState, error: AxiosError): void {
LOGIN_FAILED(state: IAuthState, error: AxiosError<IError>): void {
state.isLoading = false;
if (error) {
state.error.status = error.response.status;
Expand All @@ -83,7 +84,7 @@ export const AuthMutationsDefault: IAuthMutations = {
state.token.reset();
}
},
LOGOUT_FAILED(state: IAuthState, error: AxiosError): void {
LOGOUT_FAILED(state: IAuthState, error: AxiosError<IError>): void {
state.isLoading = false;
if (error) {
state.error.status = error.response.status;
Expand All @@ -106,7 +107,7 @@ export const AuthMutationsDefault: IAuthMutations = {
state.impersonate = username;
localStorage.setItem("impersonate", username);
},
START_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError): void {
START_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError<IError>): void {
state.isLoading = false;
if (error) {
state.error.status = error.response.status;
Expand All @@ -127,7 +128,7 @@ export const AuthMutationsDefault: IAuthMutations = {
state.impersonate = null;
}
},
STOP_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError): void {
STOP_IMPERSONATION_FAILED(state: IAuthState, error: AxiosError<IError>): void {
state.isLoading = false;
if (error) {
state.error.status = error.response.status;
Expand Down
5 changes: 3 additions & 2 deletions app/assets/vue/modules/support/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AxiosError } from "axios";

import { IListResponse } from "../../api";
import { IError } from "../../interfaces/error";
import { IMutations } from "../../store/mutations";

import { ISupportState } from "./state";
Expand All @@ -9,7 +10,7 @@ import { ISupport } from "./interfaces";
export interface ISupportMutations extends IMutations {
SUPPORT_SEND_REQUEST_PENDING(state: ISupportState, data: ISupport): void;
SUPPORT_SEND_REQUEST_SUCCESS(state: ISupportState): void;
SUPPORT_SEND_REQUEST_ERROR(state: ISupportState, error?: AxiosError): void;
SUPPORT_SEND_REQUEST_ERROR(state: ISupportState, error?: AxiosError<IError>): void;
}

export const SupportMutationsDefault: ISupportMutations = {
Expand All @@ -24,7 +25,7 @@ export const SupportMutationsDefault: ISupportMutations = {
state.clearError();
state.item = null;
},
SUPPORT_SEND_REQUEST_ERROR(state: ISupportState, error?: AxiosError) {
SUPPORT_SEND_REQUEST_ERROR(state: ISupportState, error?: AxiosError<IError>) {
state.isLoading = false;
state.saveError(error);
state.item = null;
Expand Down
2 changes: 1 addition & 1 deletion app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"description": "A 'simple' starter project using Vue.js and Symfony.",
"type": "project",
"license": "AGPL v3",
"license": "AGPL-3.0-or-later",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
Expand Down
Loading