generator-folklore 3.0.41 → 3.0.43

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.
Files changed (56) hide show
  1. package/lib/generators/agents/index.js +30 -0
  2. package/lib/generators/agents/templates/frontend.md +21 -0
  3. package/lib/generators/agents/templates/general.md +21 -0
  4. package/lib/generators/agents/templates/laravel.md +13 -0
  5. package/lib/generators/babel/index.js +6 -22
  6. package/lib/generators/babel/templates/config.ejs +41 -0
  7. package/lib/generators/eslint/index.js +5 -6
  8. package/lib/generators/eslint/templates/.eslint.config.js +5 -20
  9. package/lib/generators/html-project/index.js +8 -0
  10. package/lib/generators/intl/index.js +1 -1
  11. package/lib/generators/laravel/index.js +2 -2
  12. package/lib/generators/laravel-auth/index.js +3 -3
  13. package/lib/generators/laravel-panneau/index.js +1 -1
  14. package/lib/generators/laravel-panneau/templates/resources/{assets/js → js}/components/Panneau.tsx +2 -1
  15. package/lib/generators/laravel-project/index.js +10 -5
  16. package/lib/generators/laravel-project/templates/gitignore +28 -0
  17. package/lib/generators/react-app/templates/types/base.d.ts +2 -55
  18. package/lib/generators/react-app/templates/types/forms.d.ts +5 -10
  19. package/lib/generators/react-app/templates/types/medias.d.ts +45 -0
  20. package/lib/generators/react-app/templates/types/{blocks.d.ts → pages.d.ts} +15 -3
  21. package/lib/generators/svgo/templates/config.js +1 -1
  22. package/package.json +2 -2
  23. package/lib/generators/babel/templates/config.js +0 -16
  24. package/lib/generators/react-app/templates/types/index.ts +0 -0
  25. package/lib/generators/react-app/templates/types/metadata.d.ts +0 -36
  26. /package/lib/generators/laravel/templates/laravel/resources/{assets/fonts → fonts}/.gitkeep +0 -0
  27. /package/lib/generators/laravel/templates/laravel/resources/{assets/img → img}/.gitkeep +0 -0
  28. /package/lib/generators/laravel/templates/laravel/resources/{assets/img → img}/folklore.png +0 -0
  29. /package/lib/generators/laravel-auth/templates/{resources/lang → lang}/en/notifications.php +0 -0
  30. /package/lib/generators/laravel-auth/templates/{resources/lang → lang}/fr/notifications.php +0 -0
  31. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/actions/AuthActions.js +0 -0
  32. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/Auth.jsx +0 -0
  33. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/fields/FormGroup.jsx +0 -0
  34. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/fields/Text.jsx +0 -0
  35. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/forms/ForgotPassword.jsx +0 -0
  36. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/forms/Login.jsx +0 -0
  37. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/forms/ResetPassword.jsx +0 -0
  38. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/forms/messages.js +0 -0
  39. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/pages/ForgotPassword.jsx +0 -0
  40. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/pages/Login.jsx +0 -0
  41. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/pages/ResetPassword.jsx +0 -0
  42. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/components/pages/Verification.jsx +0 -0
  43. /package/lib/generators/laravel-auth/templates/resources/{assets/js → js}/reducers/AuthReducer.js +0 -0
  44. /package/lib/generators/laravel-auth/templates/resources/{assets/styles → styles}/forms/forgot-password.scss +0 -0
  45. /package/lib/generators/laravel-auth/templates/resources/{assets/styles → styles}/forms/login.scss +0 -0
  46. /package/lib/generators/laravel-auth/templates/resources/{assets/styles → styles}/forms/reset-password.scss +0 -0
  47. /package/lib/generators/laravel-auth/templates/resources/{assets/styles → styles}/pages/forgot-password.scss +0 -0
  48. /package/lib/generators/laravel-auth/templates/resources/{assets/styles → styles}/pages/login.scss +0 -0
  49. /package/lib/generators/laravel-auth/templates/resources/{assets/styles → styles}/pages/reset-password.scss +0 -0
  50. /package/lib/generators/laravel-panneau/templates/resources/{assets/js → js}/components/panneau/fields/PageSlug.tsx +0 -0
  51. /package/lib/generators/laravel-panneau/templates/resources/{assets/js → js}/components/panneau/fields/PageSlugLocalized.tsx +0 -0
  52. /package/lib/generators/laravel-panneau/templates/resources/{assets/js → js}/components/panneau/fields/index.ts +0 -0
  53. /package/lib/generators/laravel-panneau/templates/resources/{assets/styles → styles}/panneau.css +0 -0
  54. /package/lib/generators/laravel-project/templates/laravel/resources/{assets/fonts → fonts}/.gitkeep +0 -0
  55. /package/lib/generators/laravel-project/templates/laravel/resources/{assets/img → img}/.gitkeep +0 -0
  56. /package/lib/generators/laravel-project/templates/laravel/resources/{assets/img → img}/folklore.png +0 -0
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _chalk = _interopRequireDefault(require("chalk"));
8
+ var _generator = _interopRequireDefault(require("../../lib/generator"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ class AgentsGenerator extends _generator.default {
11
+ prompting() {
12
+ if (this.options.quiet) {
13
+ return;
14
+ }
15
+ console.log(_chalk.default.yellow('\n----------------------'));
16
+ console.log('AGENTS.md Generator');
17
+ console.log(_chalk.default.yellow('----------------------\n'));
18
+ }
19
+ writing() {
20
+ const destPath = this.destinationPath('AGENTS.md');
21
+ const hasComposerJson = this.fs.exists(this.destinationPath('composer.json'));
22
+ const hasPackageJson = this.fs.exists(this.destinationPath('package.json'));
23
+ const existingContent = this.fs.exists(destPath) ? this.fs.read(destPath) : '';
24
+ const separator = '\n\n---\n\n';
25
+ const parts = [this.fs.read(this.templatePath('general.md')), hasComposerJson ? this.fs.read(this.templatePath('laravel.md')) : null, hasPackageJson ? this.fs.read(this.templatePath('frontend.md')) : null].filter(it => it !== null).join(separator);
26
+ const newContent = existingContent.length > 0 ? `${existingContent}${separator}${parts}` : parts;
27
+ this.fs.write(destPath, newContent);
28
+ }
29
+ }
30
+ exports.default = AgentsGenerator;
@@ -0,0 +1,21 @@
1
+ ## Frontend (TypeScript / React / CSS)
2
+
3
+ ### Tech stack
4
+ - React 19 (with React compiler)
5
+ - Typescript
6
+ - CSS Modules (PostCSS processing with nesting supported)
7
+ - React Query for network request
8
+ - React Intl (format-js) for i18n
9
+
10
+ ### Architecture
11
+ - Use custom contexts for global access to data
12
+ - Create custom hooks when appropriate
13
+ - Use API class to handle data fetching and mutation
14
+
15
+ ### Style and conventions
16
+ - Don't use memoisation `useCallback` and `useMemo` (project use react-compiler)
17
+ - Use pure function components with type hinted props. Make a separate interface for component props
18
+ - Extends props interface when composing components
19
+ - Organize global types in `.d.ts` files in the `types` folder
20
+ - Add className props for style composition and when needed add className props for inner elements
21
+ - Don't write string, use i18n components from react-intl
@@ -0,0 +1,21 @@
1
+ # AGENTS.md
2
+
3
+ This file defines how coding agents should work in this repository.
4
+
5
+ ## Scope
6
+
7
+ - Applies to the whole repository unless a deeper `AGENTS.md` overrides part of it.
8
+
9
+ ## Language Rules
10
+
11
+ - Write all code, comments, identifiers, commit messages, and technical docs in English.
12
+ - User-facing chat can be in French, but repository content stays in English.
13
+
14
+ ## Editing Guidelines
15
+
16
+ - Keep changes minimal and focused on the requested task.
17
+ - Follow existing style and file organization before introducing new patterns.
18
+ - Do not refactor unrelated areas unless required for the task.
19
+ - Avoid renaming public exports unless explicitly requested.
20
+ - Add a suffix to file names with to group concerns and help with file finding (ex: `forms/LoginForm.tsx` instead of just `forms/Login.tsx`, `forms/login-form.module.css` instead of just `forms/login.module.css`, `Repositories/UsersRepositories.php` instead of `Repositories/Users.php`). The only exception is base Entities which should not contain Entity suffix.
21
+
@@ -0,0 +1,13 @@
1
+ ## Backend (PHP / Laravel)
2
+
3
+ ### Architecture
4
+ - Use **Entity** defined in `app/Contracts/Entities` and `app/Entities` instead of using directly Models. Entity wraps models and provide a typehinted interface to interact with data
5
+ - Use typed entities when representing an entity with variations (ex: Page entity might have HomePage, ContactPage)
6
+ - Use **Repository** defined in `app/Contracts/Repositories` and `app/Repositories` instead of querying models directly
7
+
8
+ ### Style and conventions
9
+ - Use Contracts and dependency injection
10
+ - Typehint methods and properties
11
+ - Use `once` in class to prevent recreation of objects
12
+ - Treat Entity as immutable
13
+ - Create class property in constructor when needed
@@ -10,21 +10,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
10
10
  class BabelGenerator extends _generator.default {
11
11
  constructor(...args) {
12
12
  super(...args);
13
- this.option('react', {
14
- type: Boolean,
15
- required: false,
16
- defaults: false
17
- });
18
13
  this.option('transform-runtime', {
19
14
  type: Boolean,
20
15
  required: false,
21
16
  defaults: false
22
17
  });
23
- this.option('react-intl', {
24
- type: Boolean,
25
- required: false,
26
- defaults: false
27
- });
28
18
  }
29
19
  prompting() {
30
20
  if (this.options.quiet) {
@@ -38,26 +28,20 @@ class BabelGenerator extends _generator.default {
38
28
  return {
39
29
  config() {
40
30
  const {
41
- react,
42
- 'transform-runtime': transformRuntime,
43
- 'react-intl': reactIntl
31
+ 'transform-runtime': transformRuntime
44
32
  } = this.options;
45
- const srcPath = this.templatePath('config.js');
33
+ const srcPath = this.templatePath('config.ejs');
46
34
  const destPath = this.destinationPath('babel.config.js');
47
35
  this.fs.copyTpl(srcPath, destPath, {
48
- react,
49
- transformRuntime,
50
- reactIntl
36
+ transformRuntime
51
37
  });
52
38
  },
53
39
  dependencies() {
54
40
  this.addDevDependencies({
55
- '@babel/core': '^7.19.3',
56
- '@babel/cli': 'latest',
57
- '@babel/node': 'latest',
58
41
  '@babel/plugin-transform-runtime': 'latest',
59
- '@babel/preset-env': 'latest',
60
- '@babel/preset-react': 'latest'
42
+ 'babel-plugin-formatjs': '^11.3.7',
43
+ 'babel-plugin-lodash': '^3.3.4',
44
+ 'babel-plugin-react-compiler': '^1.0.0'
61
45
  });
62
46
  }
63
47
  };
@@ -0,0 +1,41 @@
1
+ module.exports = {
2
+ plugins: [
3
+ [
4
+ require.resolve('babel-plugin-formatjs'),
5
+ {
6
+ removeDefaultMessage: process.env.NODE_ENV === 'production',
7
+ idInterpolationPattern: '[sha512:contenthash:base64:6]',
8
+ },
9
+ ],
10
+ [require.resolve('babel-plugin-lodash'), {}],
11
+ [
12
+ require.resolve('babel-plugin-react-compiler'),
13
+ {
14
+ // compilationMode: 'annotation',
15
+ logger: {
16
+ logEvent(filename, event) {
17
+ if (event.kind === 'CompileError') {
18
+ console.error(`\nCompilation failed: ${filename}`);
19
+ console.error(`Reason: ${event.detail.reason}`);
20
+
21
+ if (event.detail.description) {
22
+ console.error(`Details: ${event.detail.description}`);
23
+ }
24
+
25
+ if (event.detail.loc) {
26
+ const { line, column } = event.detail.loc.start;
27
+ console.error(`Location: Line ${line}, Column ${column}`);
28
+ }
29
+
30
+ if (event.detail.suggestions) {
31
+ console.error('Suggestions:', event.detail.suggestions);
32
+ }
33
+ }
34
+ },
35
+ },
36
+ },
37
+ ],<% if (transformRuntime) { %>
38
+ [require.resolve('@babel/plugin-transform-runtime'), {}],
39
+ <% } %>
40
+ ],
41
+ };
@@ -25,14 +25,13 @@ class EslintGenerator extends _generator.default {
25
25
  },
26
26
  dependencies() {
27
27
  this.addDevDependencies({
28
- '@babel/eslint-parser': '^7.18.9',
29
- '@babel/preset-typescript': '^7.26.0',
30
- '@eslint-react/eslint-plugin': '^2.0.0',
31
- eslint: '^9.36.0',
28
+ '@eslint-react/eslint-plugin': '^5.6.0',
29
+ '@eslint/js': '^9.39.4',
30
+ eslint: '^10.0.0',
32
31
  'eslint-config-prettier': '^10.1.8',
33
- 'eslint-plugin-formatjs': '^5.4.0',
34
- 'eslint-plugin-import': '^2.32.0',
32
+ 'eslint-plugin-formatjs': '^6.4.6',
35
33
  'eslint-plugin-prettier': '^5.5.4',
34
+ globals: '^17.5.0',
36
35
  typescript: '^5.7.3',
37
36
  'typescript-eslint': '^8.25.0'
38
37
  });
@@ -1,13 +1,12 @@
1
- import formatjs from 'eslint-plugin-formatjs';
1
+ import eslintReact from '@eslint-react/eslint-plugin';
2
2
  import globals from 'globals';
3
- import babelParser from '@babel/eslint-parser';
4
- import importPlugin from 'eslint-plugin-import';
5
3
  import js from '@eslint/js';
6
- import tseslint from 'typescript-eslint';
4
+ import formatjs from 'eslint-plugin-formatjs';
7
5
  import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
8
- import eslintReact from '@eslint-react/eslint-plugin';
6
+ import { defineConfig } from 'eslint/config';
7
+ import tseslint from 'typescript-eslint';
9
8
 
10
- export default tseslint.config(
9
+ export default defineConfig(
11
10
  {
12
11
  files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
13
12
  },
@@ -32,23 +31,9 @@ export default tseslint.config(
32
31
  },
33
32
  },
34
33
  },
35
- {
36
- languageOptions: {
37
- parser: babelParser,
38
- parserOptions: {
39
- ecmaVersion: 'latest',
40
- requireConfigFile: false,
41
- babelOptions: {
42
- presets: ['@babel/preset-react', '@babel/preset-typescript'],
43
- },
44
- },
45
- },
46
- },
47
34
  js.configs.recommended,
48
35
  tseslint.configs.recommended,
49
36
  eslintReact.configs['recommended-typescript'],
50
- importPlugin.flatConfigs.typescript,
51
- importPlugin.flatConfigs.recommended,
52
37
  formatjs.configs.recommended,
53
38
  eslintPluginPrettierRecommended,
54
39
  {
@@ -124,6 +124,10 @@ class HTMLProjectGenerator extends _generator.default {
124
124
  this.composeWith('folklore:editorconfig', {
125
125
  quiet: true
126
126
  });
127
+ this.composeWith('folklore:babel', {
128
+ 'skip-install': true,
129
+ quiet: true
130
+ });
127
131
  this.composeWith('folklore:react-app', {
128
132
  'project-name': projectName,
129
133
  path: jsSrcPath,
@@ -146,6 +150,10 @@ class HTMLProjectGenerator extends _generator.default {
146
150
  quiet: true
147
151
  });
148
152
  }
153
+ this.composeWith('folklore:agents', {
154
+ 'src-path': srcPath,
155
+ quiet: true
156
+ });
149
157
  this.log('merging with folklore build');
150
158
  this.composeWith('folklore:build', {
151
159
  'src-path': srcPath,
@@ -14,7 +14,7 @@ class IntlGenerator extends _generator.default {
14
14
  this.option('translations-path', {
15
15
  type: String,
16
16
  desc: 'Path for to search for translations',
17
- defaults: './src/**/*.{js,jsx}'
17
+ defaults: './src/**/*.{js,jsx,tsx}'
18
18
  });
19
19
  this.option('locales', {
20
20
  type: String,
@@ -66,7 +66,7 @@ class LaravelGenerator extends _generator.default {
66
66
  this.option('assets-path', {
67
67
  type: String,
68
68
  desc: 'Path for assets',
69
- defaults: 'resources/assets'
69
+ defaults: 'resources'
70
70
  });
71
71
  this.option('public-path', {
72
72
  type: String,
@@ -291,7 +291,7 @@ class LaravelGenerator extends _generator.default {
291
291
  });
292
292
  },
293
293
  removeFiles() {
294
- const files = ['gulpfile.js', 'package.json', 'webpack.mix.js', 'config/app.php', 'routes/web.php', 'public/css/app.css', 'public/js/app.js', 'app/Exceptions/Handler.php', 'app/Providers/AppServiceProvider.php', 'resources/sass/**', 'resources/js/**', 'resources/sass', 'resources/js', 'resources/assets/sass/**', 'resources/assets/js/**', 'resources/assets/sass', 'resources/assets/js', 'resources/views/welcome.blade.php', 'resources/views/errors/404.blade.php', 'resources/views/errors/500.blade.php'];
294
+ const files = ['gulpfile.js', 'package.json', 'webpack.mix.js', 'config/app.php', 'routes/web.php', 'public/css/app.css', 'public/js/app.js', 'app/Exceptions/Handler.php', 'app/Providers/AppServiceProvider.php', 'resources/sass/**', 'resources/js/**', 'resources/styles', 'resources/js', 'resources/styles/**', 'resources/js/**', 'resources/styles', 'resources/js', 'resources/views/welcome.blade.php', 'resources/views/errors/404.blade.php', 'resources/views/errors/500.blade.php'];
295
295
  files.forEach(file => {
296
296
  const filePath = this.destinationPath(file);
297
297
  this.fs.delete(filePath);
@@ -19,11 +19,11 @@ class LaravelAuthGenerator extends _generator.default {
19
19
  });
20
20
  this.option('js-path', {
21
21
  type: String,
22
- defaults: 'resources/assets/js'
22
+ defaults: 'resources/js'
23
23
  });
24
24
  this.option('styles-path', {
25
25
  type: String,
26
- defaults: 'resources/assets/styles'
26
+ defaults: 'resources/styles'
27
27
  });
28
28
  }
29
29
  get prompting() {
@@ -62,7 +62,7 @@ class LaravelAuthGenerator extends _generator.default {
62
62
  this.fs.writeJSON(destPath, _lodash.default.merge(currentJson, newJson));
63
63
  },
64
64
  files() {
65
- const folders = ['app', 'resources', 'routes', 'database'];
65
+ const folders = ['app', 'resources', 'routes', 'database', 'lang'];
66
66
  const jsPath = this.options['js-path'] || null;
67
67
  const stylesPath = this.options['styles-path'] || null;
68
68
  folders.forEach(folder => {
@@ -97,7 +97,7 @@ class LaravelPanneauGenerator extends _generator.default {
97
97
  },
98
98
  indexJs() {
99
99
  const source = this.templatePath('index.ts');
100
- const destination = this.destinationPath('resources/assets/js/index.ts');
100
+ const destination = this.destinationPath('resources/js/index.ts');
101
101
  this.fs.copyTpl(source, destination, {});
102
102
  },
103
103
  files() {
@@ -31,7 +31,8 @@ const PanneauContainer = ({
31
31
 
32
32
  useEffect(() => {
33
33
  let canceled = false;
34
- import(`@panneau/intl/locale/${definition.intl.locale}`).then(() => {
34
+ const { locale = 'fr' } = definition.intl || {};
35
+ import(locale === 'en' ? `@panneau/intl/locale/en` : `@panneau/intl/locale/fr`).then(() => {
35
36
  if (!canceled) {
36
37
  setLocaleLoaded(true);
37
38
  }
@@ -56,7 +56,7 @@ class LaravelProjectGenerator extends _generator.default {
56
56
  this.option('assets-path', {
57
57
  type: String,
58
58
  desc: 'Path for assets',
59
- defaults: 'resources/assets'
59
+ defaults: 'resources'
60
60
  });
61
61
  this.option('public-path', {
62
62
  type: String,
@@ -243,7 +243,7 @@ class LaravelProjectGenerator extends _generator.default {
243
243
  'skip-install': true
244
244
  });
245
245
  this.composeWith('folklore:intl', {
246
- 'translations-path': _path.default.join(jsSrcPath, '**/*.{js,jsx}'),
246
+ 'translations-path': _path.default.join(jsSrcPath, '**/*.{js,jsx,tsx}'),
247
247
  'output-path': './lang',
248
248
  'without-id-only': true,
249
249
  quiet: true,
@@ -299,7 +299,7 @@ class LaravelProjectGenerator extends _generator.default {
299
299
  }
300
300
  },
301
301
  removeFiles() {
302
- const files = ['package.json', 'config/app.php', 'config/auth.php', 'routes/web.php', 'vite.config.js', 'resources/css', 'resources/js', 'resources/views/welcome.blade.php', 'app/Http/Controllers/HomeController.php', 'app/Http/Middleware/TrustProxies.php', 'app/Models/User.php'];
302
+ const files = ['.gitignore', 'package.json', 'config/app.php', 'config/auth.php', 'routes/web.php', 'vite.config.js', 'resources/css', 'resources/js', 'resources/views/welcome.blade.php', 'app/Http/Controllers/HomeController.php', 'app/Http/Middleware/TrustProxies.php', 'app/Models/User.php'];
303
303
  files.forEach(file => {
304
304
  const filePath = this.destinationPath(file);
305
305
  this.fs.delete(filePath);
@@ -328,11 +328,11 @@ class LaravelProjectGenerator extends _generator.default {
328
328
  this.packageJson.merge({
329
329
  scripts: {
330
330
  clean: 'rm -rf public/static && rm -rf public/precache-*',
331
- 'build:scripts': 'flklr build --load-env ./resources/assets/js/index.ts',
331
+ 'build:scripts': 'flklr build --load-env ./resources/js/index.ts',
332
332
  'build:views': 'php artisan assets:view',
333
333
  build: 'npm run clean && npm run build:scripts && npm run build:views',
334
334
  start: 'npm run server',
335
- server: 'flklr serve --load-env ./resources/assets/js/index.ts'
335
+ server: 'flklr serve --load-env ./resources/js/index.ts'
336
336
  }
337
337
  });
338
338
  },
@@ -375,6 +375,11 @@ class LaravelProjectGenerator extends _generator.default {
375
375
  // const destProd = this.destinationPath('.env.prod');
376
376
  // this.fs.copyTpl(srcProd, destProd, prodTemplateData);
377
377
  },
378
+ gitignore() {
379
+ const src = this.templatePath('gitignore');
380
+ const dest = this.destinationPath('.gitignore');
381
+ this.fs.copy(src, dest);
382
+ },
378
383
  files() {
379
384
  const templatePath = this.templatePath('laravel');
380
385
  const destinationPath = this.destinationPath();
@@ -0,0 +1,28 @@
1
+ *.log
2
+ .DS_Store
3
+ .env
4
+ .env.backup
5
+ .env.production
6
+ .phpactor.json
7
+ .phpunit.result.cache
8
+ /.fleet
9
+ /.idea
10
+ /.nova
11
+ /.phpunit.cache
12
+ /.vscode
13
+ /.zed
14
+ /auth.json
15
+ /node_modules
16
+ /public/build
17
+ /public/hot
18
+ /public/storage
19
+ /storage/*.key
20
+ /storage/pail
21
+ /vendor
22
+ Homestead.json
23
+ Homestead.yaml
24
+ Thumbs.db
25
+ /.claude
26
+
27
+ /public/static
28
+ /public/asset-manifest.json
@@ -13,52 +13,6 @@ interface Theme {
13
13
  name: string;
14
14
  }
15
15
 
16
- interface ImageSize {
17
- id: string;
18
- url: string;
19
- width: number;
20
- height: number;
21
- }
22
-
23
- interface Source {
24
- id: string;
25
- mime?: string | null;
26
- url: string;
27
- size?: number | null;
28
- }
29
-
30
- interface Embed {
31
- provider: string;
32
- iframeUrl?: string;
33
- html?: string;
34
- }
35
-
36
- interface Media {
37
- id: string;
38
- type: string;
39
- url: string;
40
- thumbnail_url?: string | null;
41
- name?: string | null;
42
- description?: string | null;
43
- files?: Record<string, Source>;
44
- }
45
-
46
- interface Image extends Media, ImageSize {
47
- type: 'image';
48
- sizes: ImageSize[];
49
- credits?: string;
50
- }
51
-
52
- interface Audio extends Media {
53
- type: 'audio';
54
- }
55
-
56
- interface Video extends Media {
57
- type: 'video';
58
- embed?: Embed;
59
- sources?: Source[];
60
- }
61
-
62
16
  interface MenuItem {
63
17
  id: string;
64
18
  url: string;
@@ -69,17 +23,10 @@ interface MenuItem {
69
23
  icon?: ReactNode;
70
24
  }
71
25
 
72
- interface Page {
73
- id: string;
74
- title?: string | null;
75
- slug?: string | null;
76
- path?: string | null;
77
- description?: string | null;
78
- image?: Image | null;
79
- }
80
-
81
26
  interface User {
82
27
  id: string;
28
+ name?: string | null;
29
+ email?: string | null;
83
30
  [key: string]: unknown;
84
31
  }
85
32
 
@@ -1,4 +1,4 @@
1
- interface BaseField {
1
+ interface Field {
2
2
  name: string;
3
3
  type: string;
4
4
  component?: string;
@@ -12,7 +12,7 @@ interface FieldOption {
12
12
  label: string;
13
13
  }
14
14
 
15
- interface OptionsField extends BaseField {
15
+ interface OptionsField extends Field {
16
16
  type: 'options';
17
17
  options: FieldOption[];
18
18
  multiple?: boolean;
@@ -26,13 +26,13 @@ interface SelectField extends OptionsField {
26
26
  type: 'select';
27
27
  }
28
28
 
29
- interface TextField extends BaseField {
29
+ interface TextField extends Field {
30
30
  type: 'text';
31
31
  }
32
32
 
33
- type FormBaseField = OptionsField | TextField | BaseField;
33
+ type FormBaseField = OptionsField | TextField | Field;
34
34
 
35
- interface GroupField extends BaseField {
35
+ interface GroupField extends Field {
36
36
  type: 'group';
37
37
  fields: FormBaseField[];
38
38
  }
@@ -48,8 +48,3 @@ interface Form {
48
48
  interface FormErrors {
49
49
  [fieldName: string]: string[] | null;
50
50
  }
51
-
52
- interface FormSnippet {
53
- id: string;
54
- title?: string;
55
- }
@@ -0,0 +1,45 @@
1
+ interface ImageSize {
2
+ id: string;
3
+ url: string;
4
+ width: number;
5
+ height: number;
6
+ }
7
+
8
+ interface MediaSource {
9
+ id: string;
10
+ mime?: string | null;
11
+ url: string;
12
+ size?: number | null;
13
+ }
14
+
15
+ interface Embed {
16
+ provider: string;
17
+ iframeUrl?: string;
18
+ html?: string;
19
+ }
20
+
21
+ interface Media {
22
+ id: string;
23
+ type: string;
24
+ url: string;
25
+ thumbnail_url?: string | null;
26
+ name?: string | null;
27
+ description?: string | null;
28
+ files?: Record<string, MediaSource>;
29
+ sources?: MediaSource[];
30
+ }
31
+
32
+ interface ImageMedia extends Media, ImageSize {
33
+ type: 'image';
34
+ sizes: ImageSize[];
35
+ credits?: string;
36
+ }
37
+
38
+ interface AudioMedia extends Media {
39
+ type: 'audio';
40
+ }
41
+
42
+ interface VideoMedia extends Media {
43
+ type: 'video';
44
+ embed?: Embed;
45
+ }
@@ -1,3 +1,14 @@
1
+
2
+ interface BaseCard {
3
+ id: string;
4
+ type: string;
5
+ title?: string | null;
6
+ description?: string | null;
7
+ image?: Image | null;
8
+ }
9
+
10
+ type Card = BaseCard;
11
+
1
12
  interface BaseBlock {
2
13
  id: string;
3
14
  uuid?: string;
@@ -30,12 +41,13 @@ interface CardsBlock extends BaseBlock {
30
41
 
31
42
  type Block = TextBlock | ImageBlock | HeadingBlock | CardsBlock | BaseBlock;
32
43
 
33
- interface BaseCard {
44
+ interface BasePage {
34
45
  id: string;
35
- type: string;
36
46
  title?: string | null;
47
+ slug?: string | null;
48
+ path?: string | null;
37
49
  description?: string | null;
38
50
  image?: Image | null;
39
51
  }
40
52
 
41
- type Card = BaseCard;
53
+ type Page = BasePage;
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  plugins: [
3
3
  {
4
4
  name: 'preset-default',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-folklore",
3
- "version": "3.0.41",
3
+ "version": "3.0.43",
4
4
  "description": "Yeoman generator for projects at Folklore",
5
5
  "keywords": [
6
6
  "yeoman-generator"
@@ -40,5 +40,5 @@
40
40
  "yeoman-generator": "5.9.0",
41
41
  "yeoman-remote": "^1.0.1"
42
42
  },
43
- "gitHead": "fa6a949c878272c2849b3061ca248ffbf83fce91"
43
+ "gitHead": "e95789961cd93204846f5a5119f26bf11623b8a1"
44
44
  }
@@ -1,16 +0,0 @@
1
- module.exports = {
2
- presets: [
3
- [
4
- require.resolve('@babel/preset-env'),
5
- {
6
- useBuiltIns: false
7
- },
8
- ],
9
- ],
10
-
11
- plugins: [
12
- <% if (transformRuntime) { %>
13
- [require.resolve('@babel/plugin-transform-runtime'), {}],
14
- <% } %>
15
- ],
16
- };
File without changes
@@ -1,36 +0,0 @@
1
- interface Microformat {
2
- '@context': string;
3
- '@type': string;
4
- identifier: string;
5
- [key: string]: unknown;
6
- }
7
-
8
- interface Taxonomy {
9
- id: string;
10
- type: string;
11
- label: string;
12
- slug: string;
13
- }
14
-
15
- interface Category extends Taxonomy {
16
- type: 'category';
17
- }
18
-
19
- interface Author {
20
- id: string;
21
- slug: string;
22
- name: string;
23
- image?: Image | null;
24
- isPerson?: boolean;
25
- }
26
-
27
- interface Credit {
28
- author?: Author | null;
29
- name?: string | null;
30
- role?: string;
31
- }
32
-
33
- interface Organisation {
34
- id: string;
35
- name: string;
36
- }