generator-folklore 3.0.39 → 3.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/generators/build/index.js +1 -1
- package/lib/generators/eslint/index.js +1 -3
- package/lib/generators/eslint/templates/.eslint.config.js +16 -13
- package/lib/generators/html-project/index.js +5 -2
- package/lib/generators/laravel/templates/laravel/resources/views/layouts/main.blade.php +6 -6
- package/lib/generators/laravel-panneau/index.js +7 -7
- package/lib/generators/laravel-panneau/templates/app/Http/Middleware/Authenticate.php +1 -2
- package/lib/generators/laravel-panneau/templates/app/Panneau/PanneauServiceProvider.php +0 -2
- package/lib/generators/laravel-panneau/templates/{index.js → index.ts} +16 -5
- package/lib/generators/laravel-panneau/templates/resources/assets/js/components/{Panneau.jsx → Panneau.tsx} +19 -22
- package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/{PageSlug.jsx → PageSlug.tsx} +42 -28
- package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/PageSlugLocalized.tsx +42 -0
- package/lib/generators/laravel-project/index.js +8 -4
- package/lib/generators/laravel-project/templates/env +33 -8
- package/lib/generators/laravel-project/templates/laravel/app/Http/Middleware/Authenticate.php +30 -0
- package/lib/generators/laravel-project/templates/laravel/app/Models/User.php +1 -2
- package/lib/generators/laravel-project/templates/laravel/app/Providers/AppServiceProvider.php +7 -2
- package/lib/generators/laravel-project/templates/laravel/app/Providers/RouteServiceProvider.php +0 -27
- package/lib/generators/laravel-project/templates/laravel/bootstrap/app.php +53 -0
- package/lib/generators/laravel-project/templates/laravel/bootstrap/providers.php +9 -0
- package/lib/generators/laravel-project/templates/laravel/config/app.php +22 -114
- package/lib/generators/laravel-project/templates/laravel/config/auth.php +24 -23
- package/lib/generators/laravel-project/templates/laravel/resources/views/meta/base.blade.php +4 -4
- package/lib/generators/laravel-project/templates/laravel/resources/views/meta/opengraph.blade.php +5 -5
- package/lib/generators/lerna-package/index.js +1 -1
- package/lib/generators/lerna-repository/templates/jest.config.js +1 -1
- package/lib/generators/micromag-project/index.js +5 -5
- package/lib/generators/micromag-project/templates/App.tsx +0 -1
- package/lib/generators/micromag-project/templates/MicromagPage.tsx +0 -1
- package/lib/generators/micromag-project/templates/Routes.tsx +0 -1
- package/lib/generators/micromag-project/templates/hooks/useMicromagPreview.ts +0 -1
- package/lib/generators/micromag-project/templates/hooks/useMicromagStory.ts +0 -1
- package/lib/generators/micromag-project/templates/hooks/useMicromagVideo.ts +0 -2
- package/lib/generators/micromag-project/templates/hooks/useStoryTrackingVariables.ts +0 -2
- package/lib/generators/micromag-project/templates/index.html.ejs +1 -1
- package/lib/generators/micromag-project/templates/kiosk/Routes.tsx +0 -1
- package/lib/generators/micromag-project/templates/kiosk/micromags.ts +0 -2
- package/lib/generators/micromag-project/templates/lib/addTrackingCodesToStory.ts +0 -2
- package/lib/generators/micromag-project/templates/micromags.ts +0 -2
- package/lib/generators/micromag-project/templates/partials/Micromag.tsx +0 -2
- package/lib/generators/micromag-project/templates/partials/Thumbnail.tsx +0 -1
- package/lib/generators/micromag-project/templates/types/micromag.d.ts +6 -6
- package/lib/generators/node-project/index.js +2 -2
- package/lib/generators/node-project/templates/index.ts +0 -0
- package/lib/generators/postcss/index.js +45 -0
- package/lib/generators/postcss/templates/config.js +19 -0
- package/lib/generators/prettier/index.js +1 -1
- package/lib/generators/react-app/index.js +11 -11
- package/lib/generators/react-app/templates/_package.json +1 -0
- package/lib/generators/react-app/templates/{index.js → index.ts} +14 -3
- package/lib/generators/react-app/templates/src/components/App.tsx +9 -2
- package/lib/generators/react-app/templates/src/components/buttons/Button.tsx +1 -3
- package/lib/generators/react-app/templates/src/components/menus/Menu.tsx +26 -23
- package/lib/generators/react-app/templates/src/components/partials/PageMeta.tsx +5 -5
- package/lib/generators/react-app/templates/src/contexts/TrackingContext.tsx +45 -0
- package/lib/generators/react-app/templates/src/lib/Tracking.ts +39 -0
- package/lib/generators/react-app/templates/src/lib/utils.ts +6 -0
- package/lib/generators/react-app/templates/types/base.d.ts +19 -14
- package/lib/generators/react-app/templates/types/blocks.d.ts +8 -8
- package/lib/generators/react-app/templates/types/forms.d.ts +12 -12
- package/lib/generators/react-app/templates/types/global.d.ts +17 -12
- package/lib/generators/react-app/templates/types/index.ts +0 -0
- package/lib/generators/react-app/templates/types/metadata.d.ts +6 -6
- package/lib/generators/react-app/templates/types/typings.d.ts +13 -0
- package/lib/generators/rollup/templates/config.js +1 -1
- package/lib/generators/stylelint/index.js +2 -2
- package/lib/generators/typescript/index.js +10 -1
- package/lib/generators/typescript/templates/_tsconfig.json +3 -2
- package/package.json +2 -2
- package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/PageSlugLocalized.jsx +0 -43
- package/lib/generators/laravel-project/templates/laravel/app/Actions/Fortify/PasswordValidationRules.php +0 -18
- package/lib/generators/laravel-project/templates/laravel/app/Providers/TelescopeServiceProvider.php +0 -67
- package/lib/generators/react-app/templates/src/lib/utils.js +0 -14
- package/lib/generators/react-app/templates/types/index.d.ts +0 -4
- /package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/{index.js → index.ts} +0 -0
- /package/lib/generators/{node-project/templates/index.js → laravel-panneau/templates/resources/assets/styles/panneau.css} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
use Illuminate\Foundation\Application;
|
|
4
|
+
use Illuminate\Foundation\Configuration\Exceptions;
|
|
5
|
+
use Illuminate\Foundation\Configuration\Middleware;
|
|
6
|
+
use Illuminate\Support\Facades\Route;
|
|
7
|
+
use Illuminate\Http\Request;
|
|
8
|
+
// use Sentry\Laravel\Integration;
|
|
9
|
+
|
|
10
|
+
return Application::configure(basePath: dirname(__DIR__))
|
|
11
|
+
->withRouting(
|
|
12
|
+
commands: __DIR__.'/../routes/console.php',
|
|
13
|
+
health: '/up',
|
|
14
|
+
using: function () {
|
|
15
|
+
Route::middleware('api')
|
|
16
|
+
->prefix('api')
|
|
17
|
+
->group(base_path('routes/api.php'));
|
|
18
|
+
|
|
19
|
+
Route::middleware('web')->group(base_path('routes/web.php'));
|
|
20
|
+
},
|
|
21
|
+
)
|
|
22
|
+
->withMiddleware(function (Middleware $middleware) {
|
|
23
|
+
$middleware->group('session', [
|
|
24
|
+
Illuminate\Cookie\Middleware\EncryptCookies::class,
|
|
25
|
+
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
26
|
+
\Illuminate\Session\Middleware\StartSession::class,
|
|
27
|
+
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
28
|
+
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
|
|
29
|
+
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
$middleware->replace(
|
|
33
|
+
\Illuminate\Http\Middleware\TrustProxies::class,
|
|
34
|
+
\App\Http\Middleware\TrustProxies::class,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
$middleware->alias([
|
|
38
|
+
'auth' => \App\Http\Middleware\Authenticate::class,
|
|
39
|
+
]);
|
|
40
|
+
})
|
|
41
|
+
->withExceptions(function (Exceptions $exceptions) {
|
|
42
|
+
// Integration::handles($exceptions);
|
|
43
|
+
$exceptions->shouldRenderJsonWhen(function (Request $request) {
|
|
44
|
+
if ($request->is('api/*')) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return $request->expectsJson();
|
|
49
|
+
});
|
|
50
|
+
})
|
|
51
|
+
->withExceptions(function (Exceptions $exceptions): void {
|
|
52
|
+
//
|
|
53
|
+
})->create();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
return [
|
|
4
|
+
App\Providers\AppServiceProvider::class,
|
|
5
|
+
App\Providers\RouteServiceProvider::class,
|
|
6
|
+
App\Providers\ViewServiceProvider::class,
|
|
7
|
+
App\Providers\FortifyServiceProvider::class,<% if (options.panneau) { %>
|
|
8
|
+
App\Panneau\PanneauServiceProvider::class,<% } %>
|
|
9
|
+
];
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<?php
|
|
2
2
|
|
|
3
|
-
use Illuminate\Support\Facades\Facade;
|
|
4
|
-
|
|
5
3
|
return [
|
|
6
4
|
|
|
7
5
|
/*
|
|
@@ -9,9 +7,9 @@ return [
|
|
|
9
7
|
| Application Name
|
|
10
8
|
|--------------------------------------------------------------------------
|
|
11
9
|
|
|
|
12
|
-
| This value is the name of your application
|
|
10
|
+
| This value is the name of your application, which will be used when the
|
|
13
11
|
| framework needs to place the application's name in a notification or
|
|
14
|
-
|
|
|
12
|
+
| other UI elements where an application name needs to be displayed.
|
|
15
13
|
|
|
|
16
14
|
*/
|
|
17
15
|
|
|
@@ -50,22 +48,20 @@ return [
|
|
|
50
48
|
|
|
|
51
49
|
| This URL is used by the console to properly generate URLs when using
|
|
52
50
|
| the Artisan command line tool. You should set this to the root of
|
|
53
|
-
|
|
|
51
|
+
| the application so that it's available within Artisan commands.
|
|
54
52
|
|
|
|
55
53
|
*/
|
|
56
54
|
|
|
57
55
|
'url' => env('APP_URL', '<%= options.project_url %>'),
|
|
58
56
|
|
|
59
|
-
'asset_url' => env('ASSET_URL'),
|
|
60
|
-
|
|
61
57
|
/*
|
|
62
58
|
|--------------------------------------------------------------------------
|
|
63
59
|
| Application Timezone
|
|
64
60
|
|--------------------------------------------------------------------------
|
|
65
61
|
|
|
|
66
62
|
| Here you may specify the default timezone for your application, which
|
|
67
|
-
| will be used by the PHP date and date-time functions.
|
|
68
|
-
|
|
|
63
|
+
| will be used by the PHP date and date-time functions. The timezone
|
|
64
|
+
| is set to "UTC" by default as it is suitable for most use cases.
|
|
69
65
|
|
|
|
70
66
|
*/
|
|
71
67
|
|
|
@@ -77,53 +73,37 @@ return [
|
|
|
77
73
|
|--------------------------------------------------------------------------
|
|
78
74
|
|
|
|
79
75
|
| The application locale determines the default locale that will be used
|
|
80
|
-
| by
|
|
81
|
-
| to any
|
|
76
|
+
| by Laravel's translation / localization methods. This option can be
|
|
77
|
+
| set to any locale for which you plan to have translation strings.
|
|
82
78
|
|
|
|
83
79
|
*/
|
|
84
80
|
|
|
85
|
-
'locale' => '
|
|
81
|
+
'locale' => env('APP_LOCALE', 'fr'),
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|--------------------------------------------------------------------------
|
|
89
|
-
| Application Fallback Locale
|
|
90
|
-
|--------------------------------------------------------------------------
|
|
91
|
-
|
|
|
92
|
-
| The fallback locale determines the locale to use when the current one
|
|
93
|
-
| is not available. You may change the value to correspond to any of
|
|
94
|
-
| the language folders that are provided through your application.
|
|
95
|
-
|
|
|
96
|
-
*/
|
|
83
|
+
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
|
97
84
|
|
|
98
|
-
'
|
|
99
|
-
|
|
100
|
-
/*
|
|
101
|
-
|--------------------------------------------------------------------------
|
|
102
|
-
| Faker Locale
|
|
103
|
-
|--------------------------------------------------------------------------
|
|
104
|
-
|
|
|
105
|
-
| This locale will be used by the Faker PHP library when generating fake
|
|
106
|
-
| data for your database seeds. For example, this will be used to get
|
|
107
|
-
| localized telephone numbers, street address information and more.
|
|
108
|
-
|
|
|
109
|
-
*/
|
|
110
|
-
|
|
111
|
-
'faker_locale' => 'en_US',
|
|
85
|
+
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
|
112
86
|
|
|
113
87
|
/*
|
|
114
88
|
|--------------------------------------------------------------------------
|
|
115
89
|
| Encryption Key
|
|
116
90
|
|--------------------------------------------------------------------------
|
|
117
91
|
|
|
|
118
|
-
| This key is
|
|
119
|
-
| to a random, 32 character string
|
|
120
|
-
|
|
|
92
|
+
| This key is utilized by Laravel's encryption services and should be set
|
|
93
|
+
| to a random, 32 character string to ensure that all encrypted values
|
|
94
|
+
| are secure. You should do this prior to deploying the application.
|
|
121
95
|
|
|
|
122
96
|
*/
|
|
123
97
|
|
|
98
|
+
'cipher' => 'AES-256-CBC',
|
|
99
|
+
|
|
124
100
|
'key' => env('APP_KEY'),
|
|
125
101
|
|
|
126
|
-
'
|
|
102
|
+
'previous_keys' => [
|
|
103
|
+
...array_filter(
|
|
104
|
+
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
|
|
105
|
+
),
|
|
106
|
+
],
|
|
127
107
|
|
|
128
108
|
/*
|
|
129
109
|
|--------------------------------------------------------------------------
|
|
@@ -139,80 +119,8 @@ return [
|
|
|
139
119
|
*/
|
|
140
120
|
|
|
141
121
|
'maintenance' => [
|
|
142
|
-
'driver' => 'file',
|
|
143
|
-
|
|
144
|
-
],
|
|
145
|
-
|
|
146
|
-
/*
|
|
147
|
-
|--------------------------------------------------------------------------
|
|
148
|
-
| Autoloaded Service Providers
|
|
149
|
-
|--------------------------------------------------------------------------
|
|
150
|
-
|
|
|
151
|
-
| The service providers listed here will be automatically loaded on the
|
|
152
|
-
| request to your application. Feel free to add your own services to
|
|
153
|
-
| this array to grant expanded functionality to your applications.
|
|
154
|
-
|
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
'providers' => [
|
|
158
|
-
|
|
159
|
-
/*
|
|
160
|
-
* Laravel Framework Service Providers...
|
|
161
|
-
*/
|
|
162
|
-
Illuminate\Auth\AuthServiceProvider::class,
|
|
163
|
-
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
|
164
|
-
Illuminate\Bus\BusServiceProvider::class,
|
|
165
|
-
Illuminate\Cache\CacheServiceProvider::class,
|
|
166
|
-
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
|
167
|
-
Illuminate\Cookie\CookieServiceProvider::class,
|
|
168
|
-
Illuminate\Database\DatabaseServiceProvider::class,
|
|
169
|
-
Illuminate\Encryption\EncryptionServiceProvider::class,
|
|
170
|
-
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
|
171
|
-
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
|
172
|
-
Illuminate\Hashing\HashServiceProvider::class,
|
|
173
|
-
Illuminate\Mail\MailServiceProvider::class,
|
|
174
|
-
Illuminate\Notifications\NotificationServiceProvider::class,
|
|
175
|
-
Illuminate\Pagination\PaginationServiceProvider::class,
|
|
176
|
-
Illuminate\Pipeline\PipelineServiceProvider::class,
|
|
177
|
-
Illuminate\Queue\QueueServiceProvider::class,
|
|
178
|
-
Illuminate\Redis\RedisServiceProvider::class,
|
|
179
|
-
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
|
180
|
-
Illuminate\Session\SessionServiceProvider::class,
|
|
181
|
-
Illuminate\Translation\TranslationServiceProvider::class,
|
|
182
|
-
Illuminate\Validation\ValidationServiceProvider::class,
|
|
183
|
-
Illuminate\View\ViewServiceProvider::class,
|
|
184
|
-
|
|
185
|
-
/*
|
|
186
|
-
* Package Service Providers...
|
|
187
|
-
*/
|
|
188
|
-
Folklore\ServiceProvider::class,
|
|
189
|
-
|
|
190
|
-
/*
|
|
191
|
-
* Application Service Providers...
|
|
192
|
-
*/
|
|
193
|
-
App\Providers\AppServiceProvider::class,
|
|
194
|
-
// App\Providers\AuthServiceProvider::class,
|
|
195
|
-
// App\Providers\BroadcastServiceProvider::class,
|
|
196
|
-
// App\Providers\EventServiceProvider::class,
|
|
197
|
-
App\Providers\RouteServiceProvider::class,
|
|
198
|
-
App\Providers\ViewServiceProvider::class,<% if (options.panneau) { %>
|
|
199
|
-
App\Providers\FortifyServiceProvider::class,
|
|
200
|
-
App\Panneau\PanneauServiceProvider::class,<% } %>
|
|
122
|
+
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
|
123
|
+
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
|
201
124
|
],
|
|
202
125
|
|
|
203
|
-
/*
|
|
204
|
-
|--------------------------------------------------------------------------
|
|
205
|
-
| Class Aliases
|
|
206
|
-
|--------------------------------------------------------------------------
|
|
207
|
-
|
|
|
208
|
-
| This array of class aliases will be registered when this application
|
|
209
|
-
| is started. However, feel free to register as many as you wish as
|
|
210
|
-
| the aliases are "lazy" loaded so they don't hinder performance.
|
|
211
|
-
|
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
'aliases' => Facade::defaultAliases()->merge([
|
|
215
|
-
// 'ExampleClass' => App\Example\ExampleClass::class,
|
|
216
|
-
])->toArray(),
|
|
217
|
-
|
|
218
126
|
];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<?php
|
|
2
2
|
|
|
3
|
+
use App\Models\User;
|
|
4
|
+
|
|
3
5
|
return [
|
|
4
6
|
|
|
5
7
|
/*
|
|
@@ -7,15 +9,15 @@ return [
|
|
|
7
9
|
| Authentication Defaults
|
|
8
10
|
|--------------------------------------------------------------------------
|
|
9
11
|
|
|
|
10
|
-
| This option
|
|
11
|
-
| reset
|
|
12
|
+
| This option defines the default authentication "guard" and password
|
|
13
|
+
| reset "broker" for your application. You may change these values
|
|
12
14
|
| as required, but they're a perfect start for most applications.
|
|
13
15
|
|
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
'defaults' => [
|
|
17
|
-
'guard' => 'web',
|
|
18
|
-
'passwords' => 'users',
|
|
19
|
+
'guard' => env('AUTH_GUARD', 'web'),
|
|
20
|
+
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
|
19
21
|
],
|
|
20
22
|
|
|
21
23
|
/*
|
|
@@ -25,11 +27,11 @@ return [
|
|
|
25
27
|
|
|
|
26
28
|
| Next, you may define every authentication guard for your application.
|
|
27
29
|
| Of course, a great default configuration has been defined for you
|
|
28
|
-
|
|
|
30
|
+
| which utilizes session storage plus the Eloquent user provider.
|
|
29
31
|
|
|
|
30
|
-
| All authentication
|
|
32
|
+
| All authentication guards have a user provider, which defines how the
|
|
31
33
|
| users are actually retrieved out of your database or other storage
|
|
32
|
-
|
|
|
34
|
+
| system used by the application. Typically, Eloquent is utilized.
|
|
33
35
|
|
|
|
34
36
|
| Supported: "session"
|
|
35
37
|
|
|
|
@@ -47,12 +49,12 @@ return [
|
|
|
47
49
|
| User Providers
|
|
48
50
|
|--------------------------------------------------------------------------
|
|
49
51
|
|
|
|
50
|
-
| All authentication
|
|
52
|
+
| All authentication guards have a user provider, which defines how the
|
|
51
53
|
| users are actually retrieved out of your database or other storage
|
|
52
|
-
|
|
|
54
|
+
| system used by the application. Typically, Eloquent is utilized.
|
|
53
55
|
|
|
|
54
56
|
| If you have multiple user tables or models you may configure multiple
|
|
55
|
-
|
|
|
57
|
+
| providers to represent the model / table. These providers may then
|
|
56
58
|
| be assigned to any extra authentication guards you have defined.
|
|
57
59
|
|
|
|
58
60
|
| Supported: "database", "eloquent"
|
|
@@ -65,11 +67,6 @@ return [
|
|
|
65
67
|
'repository' => Folklore\Contracts\Repositories\Users::class,
|
|
66
68
|
],
|
|
67
69
|
|
|
68
|
-
// 'users' => [
|
|
69
|
-
// 'driver' => 'eloquent',
|
|
70
|
-
// 'model' => App\Models\User::class,
|
|
71
|
-
// ],
|
|
72
|
-
|
|
73
70
|
// 'users' => [
|
|
74
71
|
// 'driver' => 'database',
|
|
75
72
|
// 'table' => 'users',
|
|
@@ -81,20 +78,24 @@ return [
|
|
|
81
78
|
| Resetting Passwords
|
|
82
79
|
|--------------------------------------------------------------------------
|
|
83
80
|
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
81
|
+
| These configuration options specify the behavior of Laravel's password
|
|
82
|
+
| reset functionality, including the table utilized for token storage
|
|
83
|
+
| and the user provider that is invoked to actually retrieve users.
|
|
87
84
|
|
|
|
88
|
-
| The
|
|
85
|
+
| The expiry time is the number of minutes that each reset token will be
|
|
89
86
|
| considered valid. This security feature keeps tokens short-lived so
|
|
90
87
|
| they have less time to be guessed. You may change this as needed.
|
|
91
88
|
|
|
|
89
|
+
| The throttle setting is the number of seconds a user must wait before
|
|
90
|
+
| generating more password reset tokens. This prevents the user from
|
|
91
|
+
| quickly generating a very large amount of password reset tokens.
|
|
92
|
+
|
|
|
92
93
|
*/
|
|
93
94
|
|
|
94
95
|
'passwords' => [
|
|
95
96
|
'users' => [
|
|
96
97
|
'provider' => 'users',
|
|
97
|
-
'table' => '
|
|
98
|
+
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
|
98
99
|
'expire' => 60,
|
|
99
100
|
'throttle' => 60,
|
|
100
101
|
],
|
|
@@ -105,12 +106,12 @@ return [
|
|
|
105
106
|
| Password Confirmation Timeout
|
|
106
107
|
|--------------------------------------------------------------------------
|
|
107
108
|
|
|
|
108
|
-
| Here you may define the
|
|
109
|
-
|
|
|
109
|
+
| Here you may define the number of seconds before a password confirmation
|
|
110
|
+
| window expires and users are asked to re-enter their password via the
|
|
110
111
|
| confirmation screen. By default, the timeout lasts for three hours.
|
|
111
112
|
|
|
|
112
113
|
*/
|
|
113
114
|
|
|
114
|
-
'password_timeout' => 10800,
|
|
115
|
+
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
|
115
116
|
|
|
116
117
|
];
|
package/lib/generators/laravel-project/templates/laravel/resources/views/meta/base.blade.php
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<title>{{ $title }}</title>
|
|
2
2
|
|
|
3
3
|
<meta name="language" content="{{ $locale }}">
|
|
4
|
-
<meta name="description" content="{{ $description }}"
|
|
4
|
+
<meta name="description" content="{{ $description }}">
|
|
5
5
|
|
|
6
6
|
@if (isset($keywords) && sizeof($keywords))
|
|
7
|
-
<meta name="keywords" content="{{ $keywords->implode(',') }}"
|
|
7
|
+
<meta name="keywords" content="{{ $keywords->implode(',') }}">
|
|
8
8
|
@endif
|
|
9
9
|
|
|
10
|
-
<link rel="shortcut icon" href="{{ asset('static/media/favicon/favicon.ico') }}" type="image/x-ico"
|
|
11
|
-
<link rel="icon" href="{{ asset('static/media/favicon/favicon.png') }}" type="image/png"
|
|
10
|
+
<link rel="shortcut icon" href="{{ asset('static/media/favicon/favicon.ico') }}" type="image/x-ico">
|
|
11
|
+
<link rel="icon" href="{{ asset('static/media/favicon/favicon.png') }}" type="image/png">
|
package/lib/generators/laravel-project/templates/laravel/resources/views/meta/opengraph.blade.php
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!-- Open Graph -->
|
|
2
2
|
<meta property="og:locale" content="{{$locale}}">
|
|
3
|
-
<meta property="og:title" content="{{ $title }}"
|
|
4
|
-
<meta property="og:type" content="website"
|
|
5
|
-
<meta property="og:description" content="{{ $description }}"
|
|
6
|
-
<meta property="og:url" content="{{ $url }}"
|
|
3
|
+
<meta property="og:title" content="{{ $title }}">
|
|
4
|
+
<meta property="og:type" content="website">
|
|
5
|
+
<meta property="og:description" content="{{ $description }}">
|
|
6
|
+
<meta property="og:url" content="{{ $url }}">
|
|
7
7
|
@if(isset($image))
|
|
8
|
-
<meta property="og:image" content="{{ $image }}"
|
|
8
|
+
<meta property="og:image" content="{{ $image }}">
|
|
9
9
|
@endif
|
|
@@ -182,7 +182,7 @@ class LernaPackageGenerator extends _generator.default {
|
|
|
182
182
|
this.fs.copyTpl(this.templatePath('src/react/__stories__/Component.story.jsx'), this.packagePath(`src/__stories__/${componentName}.story.jsx`), {
|
|
183
183
|
componentName
|
|
184
184
|
});
|
|
185
|
-
this.fs.copyTpl(this.templatePath('src/react/index.
|
|
185
|
+
this.fs.copyTpl(this.templatePath('src/react/index.ts'), this.packagePath('src/index.ts'), {
|
|
186
186
|
componentName
|
|
187
187
|
});
|
|
188
188
|
this.fs.copy(this.templatePath('src/react/styles.scss'), this.packagePath('src/styles.scss'));
|
|
@@ -16,7 +16,7 @@ const moduleNameMapper = getPackagesPaths().reduce((map, packagePath) => {
|
|
|
16
16
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
17
17
|
return {
|
|
18
18
|
...map,
|
|
19
|
-
[packageJson.name]: `<rootDir>/${packagePath}/src/index.
|
|
19
|
+
[packageJson.name]: `<rootDir>/${packagePath}/src/index.ts`,
|
|
20
20
|
};
|
|
21
21
|
}, {});
|
|
22
22
|
|
|
@@ -155,11 +155,11 @@ class MicromagProjectGenerator extends _generator.default {
|
|
|
155
155
|
},
|
|
156
156
|
dependencies() {
|
|
157
157
|
this.addDependencies({
|
|
158
|
-
'@micromag/viewer': '^0.
|
|
159
|
-
'@micromag/data': '^0.
|
|
160
|
-
'@micromag/core': '^0.
|
|
161
|
-
'@micromag/consent': '^0.
|
|
162
|
-
'@micromag/intl': '^0.
|
|
158
|
+
'@micromag/viewer': '^0.4.0',
|
|
159
|
+
'@micromag/data': '^0.4.0',
|
|
160
|
+
'@micromag/core': '^0.4.0',
|
|
161
|
+
'@micromag/consent': '^0.4.0',
|
|
162
|
+
'@micromag/intl': '^0.4.0'
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
};
|
|
@@ -5,7 +5,6 @@ import { IntlProvider } from '@micromag/intl';
|
|
|
5
5
|
|
|
6
6
|
import { AnalyticsProvider } from '../contexts/AnalyticsContext';
|
|
7
7
|
import { ModalProvider } from '../contexts/ModalContext';
|
|
8
|
-
import { MicromagItem } from '../types/micromag';
|
|
9
8
|
import Routes from './Routes';
|
|
10
9
|
|
|
11
10
|
import defaultMicromags from '../micromags';
|
|
@@ -2,8 +2,6 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
2
2
|
import uniq from 'lodash/uniq';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
|
|
5
|
-
import { MicromagStory } from '../types/micromag';
|
|
6
|
-
|
|
7
5
|
export function useStoryTrackingVariables(story: MicromagStory): Record<string, unknown> {
|
|
8
6
|
const trackingVariables = useMemo(() => {
|
|
9
7
|
// Organisation level
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<meta property="og:locale" content="fr_CA" />
|
|
16
16
|
<meta property="og:image" content="/static/media/facebook.jpg" />
|
|
17
|
-
<meta property="og:title" content="
|
|
17
|
+
<meta property="og:title" content="Micromags" />
|
|
18
18
|
<meta property="og:type" content="website" />
|
|
19
19
|
<meta property="og:description" content="" />
|
|
20
20
|
<meta property="og:url" content="/" />
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useRoutes } from '@folklore/routes';
|
|
2
2
|
import { Route, Switch } from 'wouter';
|
|
3
3
|
|
|
4
|
-
import { MicromagItem } from '../types/micromag';
|
|
5
4
|
import MainLayout from './layouts/Main';
|
|
6
5
|
import HomePage from './pages/Home';
|
|
7
6
|
import MicromagPage from './pages/Micromag';
|
|
@@ -7,8 +7,6 @@ import { useState, useCallback, useMemo, ReactNode } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import useStoryTrackingVariables from '../../hooks/useStoryTrackingVariables';
|
|
9
9
|
|
|
10
|
-
import { MicromagStory } from '../../types/micromag';
|
|
11
|
-
|
|
12
10
|
import styles from '<%= getRelativeStylesPath('components/partials/Micromag.jsx', 'partials/micromag.module.css') %>';
|
|
13
11
|
|
|
14
12
|
interface MicromagProps {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
interface MicromagTrackingCode {
|
|
2
2
|
id: string;
|
|
3
3
|
type: string;
|
|
4
4
|
[key: string]: unknown;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface MicromagVideo {
|
|
8
8
|
media?: string;
|
|
9
9
|
[key: string]: unknown;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
interface MicromagComponent {
|
|
13
13
|
id: string;
|
|
14
14
|
type: string;
|
|
15
15
|
video?: MicromagVideo;
|
|
@@ -20,7 +20,7 @@ export interface MicromagComponent {
|
|
|
20
20
|
[key: string]: unknown;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
interface MicromagOrganisation {
|
|
24
24
|
slug?: string;
|
|
25
25
|
tracking?: {
|
|
26
26
|
codes?: MicromagTrackingCode[];
|
|
@@ -32,7 +32,7 @@ export interface MicromagOrganisation {
|
|
|
32
32
|
[key: string]: unknown;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
interface MicromagStory {
|
|
36
36
|
title?: string;
|
|
37
37
|
metadata?: {
|
|
38
38
|
[key: string]: unknown;
|
|
@@ -50,7 +50,7 @@ export interface MicromagStory {
|
|
|
50
50
|
[key: string]: unknown;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
interface MicromagItem {
|
|
54
54
|
id: string;
|
|
55
55
|
slug: string;
|
|
56
56
|
story?: MicromagStory;
|
|
@@ -107,7 +107,7 @@ class NodeProjectGenerator extends _generator.default {
|
|
|
107
107
|
get writing() {
|
|
108
108
|
return {
|
|
109
109
|
index() {
|
|
110
|
-
this.fs.copyTpl(this.templatePath('index.
|
|
110
|
+
this.fs.copyTpl(this.templatePath('index.ts'), this.srcPath('index.ts'));
|
|
111
111
|
},
|
|
112
112
|
packageJson() {
|
|
113
113
|
const {
|
|
@@ -115,7 +115,7 @@ class NodeProjectGenerator extends _generator.default {
|
|
|
115
115
|
'html-path': htmlPath,
|
|
116
116
|
'server-path': serverPath
|
|
117
117
|
} = this.options;
|
|
118
|
-
const webEntryPath = _path.default.join(srcPath, htmlPath, 'index.
|
|
118
|
+
const webEntryPath = _path.default.join(srcPath, htmlPath, 'index.ts');
|
|
119
119
|
const serverEntryPath = _path.default.join(srcPath, serverPath, 'server.js');
|
|
120
120
|
const scripts = {
|
|
121
121
|
'build:web': `flklr build --load-env ${(0, _utils.ensureLeadingDotSlash)(webEntryPath)}`,
|
|
File without changes
|