Skip to content

Commit 558a378

Browse files
Update from Maestro (#261)
Co-authored-by: WendellAdriel <11641518+WendellAdriel@users.noreply.github.com>
1 parent 3d3a5f6 commit 558a378

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+697
-220
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
CHANGELOG.md export-ignore
1010
README.md export-ignore
11+
.github/workflows/browser-tests.yml export-ignore

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
branches:
66
- develop
77
- main
8+
- master
89
- workos
910
pull_request:
1011
branches:
1112
- develop
1213
- main
14+
- master
1315
- workos
1416

1517
permissions:
@@ -19,7 +21,7 @@ jobs:
1921
quality:
2022
runs-on: ubuntu-latest
2123
steps:
22-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2325

2426
- name: Setup PHP
2527
uses: shivammathur/setup-php@v2
@@ -41,7 +43,7 @@ jobs:
4143
run: npm run lint
4244

4345
# - name: Commit Changes
44-
# uses: stefanzweifel/git-auto-commit-action@v5
46+
# uses: stefanzweifel/git-auto-commit-action@v7
4547
# with:
4648
# commit_message: fix code style
4749
# commit_options: '--no-verify'

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
branches:
66
- develop
77
- main
8+
- master
89
- workos
910
pull_request:
1011
branches:
1112
- develop
1213
- main
14+
- master
1315
- workos
1416

1517
jobs:
@@ -41,14 +43,14 @@ jobs:
4143
- name: Install Dependencies
4244
run: composer install --no-interaction --prefer-dist --optimize-autoloader
4345

44-
- name: Build Assets
45-
run: npm run build
46-
4746
- name: Copy Environment File
4847
run: cp .env.example .env
4948

5049
- name: Generate Application Key
5150
run: php artisan key:generate
5251

52+
- name: Build Assets
53+
run: npm run build
54+
5355
- name: Tests
5456
run: ./vendor/bin/phpunit

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
/public/build
55
/public/hot
66
/public/storage
7+
/storage/*.key
8+
/storage/pail
79
/resources/js/actions
810
/resources/js/routes
911
/resources/js/wayfinder
10-
/storage/*.key
11-
/storage/pail
1212
/vendor
13+
.DS_Store
1314
.env
1415
.env.backup
1516
.env.production

.prettierrc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
"singleQuote": true,
44
"singleAttributePerLine": false,
55
"htmlWhitespaceSensitivity": "css",
6-
"printWidth": 150,
7-
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
8-
"tailwindFunctions": ["clsx", "cn"],
6+
"printWidth": 80,
7+
"plugins": [
8+
"prettier-plugin-tailwindcss"
9+
],
10+
"tailwindFunctions": [
11+
"clsx",
12+
"cn",
13+
"cva"
14+
],
915
"tailwindStylesheet": "resources/css/app.css",
1016
"tabWidth": 4,
1117
"overrides": [
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Settings;
4+
5+
use App\Http\Controllers\Controller;
6+
use App\Http\Requests\Settings\TwoFactorAuthenticationRequest;
7+
use Illuminate\Routing\Controllers\HasMiddleware;
8+
use Illuminate\Routing\Controllers\Middleware;
9+
use Inertia\Inertia;
10+
use Inertia\Response;
11+
use Laravel\Fortify\Features;
12+
13+
class TwoFactorAuthenticationController extends Controller implements HasMiddleware
14+
{
15+
/**
16+
* Get the middleware that should be assigned to the controller.
17+
*/
18+
public static function middleware(): array
19+
{
20+
return Features::optionEnabled(Features::twoFactorAuthentication(), 'confirmPassword')
21+
? [new Middleware('password.confirm', only: ['show'])]
22+
: [];
23+
}
24+
25+
/**
26+
* Show the user's two-factor authentication settings page.
27+
*/
28+
public function show(TwoFactorAuthenticationRequest $request): Response
29+
{
30+
$request->ensureStateIsValid();
31+
32+
return Inertia::render('settings/two-factor', [
33+
'twoFactorEnabled' => $request->user()->hasEnabledTwoFactorAuthentication(),
34+
'requiresConfirmation' => Features::optionEnabled(Features::twoFactorAuthentication(), 'confirm'),
35+
]);
36+
}
37+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace App\Http\Requests\Settings;
4+
5+
use Illuminate\Foundation\Http\FormRequest;
6+
use Laravel\Fortify\Features;
7+
use Laravel\Fortify\InteractsWithTwoFactorState;
8+
9+
class TwoFactorAuthenticationRequest extends FormRequest
10+
{
11+
use InteractsWithTwoFactorState;
12+
13+
/**
14+
* Determine if the user is authorized to make this request.
15+
*/
16+
public function authorize(): bool
17+
{
18+
return Features::enabled(Features::twoFactorAuthentication());
19+
}
20+
21+
/**
22+
* Get the validation rules that apply to the request.
23+
*
24+
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
25+
*/
26+
public function rules(): array
27+
{
28+
return [];
29+
}
30+
}

components.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
3+
"style": "new-york",
44
"rsc": false,
55
"tsx": true,
66
"tailwind": {
7-
"config": "tailwind.config.js",
7+
"config": "",
88
"css": "resources/css/app.css",
99
"baseColor": "neutral",
1010
"cssVariables": true,

config/auth.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,45 @@
7171
// ],
7272
],
7373

74+
/*
75+
|--------------------------------------------------------------------------
76+
| Resetting Passwords
77+
|--------------------------------------------------------------------------
78+
|
79+
| These configuration options specify the behavior of Laravel's password
80+
| reset functionality, including the table utilized for token storage
81+
| and the user provider that is invoked to actually retrieve users.
82+
|
83+
| The expiry time is the number of minutes that each reset token will be
84+
| considered valid. This security feature keeps tokens short-lived so
85+
| they have less time to be guessed. You may change this as needed.
86+
|
87+
| The throttle setting is the number of seconds a user must wait before
88+
| generating more password reset tokens. This prevents the user from
89+
| quickly generating a very large amount of password reset tokens.
90+
|
91+
*/
92+
93+
'passwords' => [
94+
'users' => [
95+
'provider' => 'users',
96+
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
97+
'expire' => 60,
98+
'throttle' => 60,
99+
],
100+
],
101+
102+
/*
103+
|--------------------------------------------------------------------------
104+
| Password Confirmation Timeout
105+
|--------------------------------------------------------------------------
106+
|
107+
| Here you may define the number of seconds before a password confirmation
108+
| window expires and users are asked to re-enter their password via the
109+
| confirmation screen. By default, the timeout lasts for three hours.
110+
|
111+
*/
112+
113+
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
114+
74115
];

eslint.config.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import js from '@eslint/js';
2-
import prettier from 'eslint-config-prettier';
2+
import prettier from 'eslint-config-prettier/flat';
33
import importPlugin from 'eslint-plugin-import';
44
import react from 'eslint-plugin-react';
55
import reactHooks from 'eslint-plugin-react-hooks';
@@ -9,6 +9,7 @@ import typescript from 'typescript-eslint';
99
/** @type {import('eslint').Linter.Config[]} */
1010
export default [
1111
js.configs.recommended,
12+
reactHooks.configs.flat.recommended,
1213
...typescript.configs.recommended,
1314
{
1415
...react.configs.flat.recommended,
@@ -29,15 +30,6 @@ export default [
2930
},
3031
},
3132
},
32-
{
33-
plugins: {
34-
'react-hooks': reactHooks,
35-
},
36-
rules: {
37-
'react-hooks/rules-of-hooks': 'error',
38-
'react-hooks/exhaustive-deps': 'warn',
39-
},
40-
},
4133
{
4234
...importPlugin.flatConfigs.recommended,
4335
settings: {

0 commit comments

Comments
 (0)