@aerogel/cli 0.0.0-next.d824b40e5d06757cd9f47c9f771d916185df4f05 → 0.0.0-next.e3690204fb6f5fb723525710ac64e3b3fe4fd487

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 (68) hide show
  1. package/bin/gel +4 -0
  2. package/dist/aerogel-cli.d.ts +2 -2
  3. package/dist/aerogel-cli.js +758 -0
  4. package/dist/aerogel-cli.js.map +1 -0
  5. package/package.json +25 -32
  6. package/src/cli.ts +26 -8
  7. package/src/commands/Command.ts +14 -9
  8. package/src/commands/create.test.ts +3 -4
  9. package/src/commands/create.ts +11 -11
  10. package/src/commands/generate-component.test.ts +1 -14
  11. package/src/commands/generate-component.ts +20 -50
  12. package/src/commands/generate-model.test.ts +2 -2
  13. package/src/commands/generate-model.ts +13 -14
  14. package/src/commands/generate-service.test.ts +2 -2
  15. package/src/commands/generate-service.ts +16 -17
  16. package/src/commands/info.ts +15 -0
  17. package/src/commands/install.test.ts +19 -2
  18. package/src/commands/install.ts +12 -11
  19. package/src/lib/App.ts +9 -6
  20. package/src/lib/Editor.ts +12 -11
  21. package/src/lib/File.mock.ts +7 -11
  22. package/src/lib/File.ts +3 -3
  23. package/src/lib/Log.mock.ts +4 -8
  24. package/src/lib/Log.test.ts +4 -4
  25. package/src/lib/Log.ts +7 -7
  26. package/src/lib/Shell.mock.ts +3 -3
  27. package/src/lib/Shell.ts +2 -2
  28. package/src/lib/Template.ts +24 -17
  29. package/src/lib/utils/app.ts +3 -3
  30. package/src/lib/utils/edit.ts +2 -2
  31. package/src/lib/utils/paths.ts +16 -8
  32. package/src/plugins/LocalFirst.ts +9 -0
  33. package/src/plugins/Plugin.ts +49 -14
  34. package/src/plugins/Solid.ts +16 -59
  35. package/src/plugins/Soukai.ts +5 -5
  36. package/src/testing/setup.ts +30 -31
  37. package/templates/app/.github/workflows/ci.yml +4 -4
  38. package/templates/app/.nvmrc +1 -1
  39. package/templates/app/.vscode/launch.json +1 -0
  40. package/templates/app/{cypress.config.ts → cypress/cypress.config.ts} +2 -4
  41. package/templates/app/cypress/support/e2e.ts +1 -3
  42. package/templates/app/cypress/tsconfig.json +7 -8
  43. package/templates/app/index.html +5 -4
  44. package/templates/app/package.json +30 -18
  45. package/templates/app/src/App.vue +3 -3
  46. package/templates/app/src/assets/css/main.css +4 -0
  47. package/templates/app/src/assets/public/robots.txt +2 -0
  48. package/templates/app/src/main.ts +4 -4
  49. package/templates/app/tsconfig.json +3 -10
  50. package/templates/app/vite.config.ts +7 -4
  51. package/templates/service/[service.name].ts +1 -1
  52. package/.eslintrc.js +0 -7
  53. package/bin/ag +0 -4
  54. package/dist/aerogel-cli.cjs.js +0 -2
  55. package/dist/aerogel-cli.cjs.js.map +0 -1
  56. package/dist/aerogel-cli.esm.js +0 -2
  57. package/dist/aerogel-cli.esm.js.map +0 -1
  58. package/src/lib/utils/format.test.ts +0 -33
  59. package/src/lib/utils/format.ts +0 -38
  60. package/templates/app/.eslintrc.js +0 -3
  61. package/templates/app/postcss.config.js +0 -6
  62. package/templates/app/prettier.config.js +0 -5
  63. package/templates/app/src/assets/styles.css +0 -3
  64. package/templates/app/tailwind.config.js +0 -5
  65. package/templates/component-story/[component.name].story.vue +0 -7
  66. package/tsconfig.json +0 -11
  67. package/vite.config.ts +0 -14
  68. /package/src/{main.ts → index.ts} +0 -0
@@ -1,13 +1,14 @@
1
1
  import { Node, SyntaxKind } from 'ts-morph';
2
+ import { stringToCamelCase } from '@noeldemartin/utils';
2
3
  import type { ArrayLiteralExpression, ImportDeclarationStructure, OptionalKind, SourceFile } from 'ts-morph';
3
4
 
4
- import Log from '@/lib/Log';
5
- import Shell from '@/lib/Shell';
6
- import File from '@/lib/File';
7
- import { app, isLinkedLocalApp, isLocalApp } from '@/lib/utils/app';
8
- import { editFiles, findDescendant, when } from '@/lib/utils/edit';
9
- import { packNotFound, packagePackPath, packagePath } from '@/lib/utils/paths';
10
- import type { Editor } from '@/lib/Editor';
5
+ import Log from '@aerogel/cli/lib/Log';
6
+ import Shell from '@aerogel/cli/lib/Shell';
7
+ import File from '@aerogel/cli/lib/File';
8
+ import { app, isLinkedLocalApp, isLocalApp } from '@aerogel/cli/lib/utils/app';
9
+ import { editFiles, findDescendant, when } from '@aerogel/cli/lib/utils/edit';
10
+ import { packNotFound, packagePackPath, packagePath } from '@aerogel/cli/lib/utils/paths';
11
+ import type { Editor } from '@aerogel/cli/lib/Editor';
11
12
 
12
13
  export default abstract class Plugin {
13
14
 
@@ -20,6 +21,7 @@ export default abstract class Plugin {
20
21
  public async install(): Promise<void> {
21
22
  this.assertNotInstalled();
22
23
 
24
+ await this.beforeInstall();
23
25
  await this.installDependencies();
24
26
 
25
27
  if (editFiles()) {
@@ -29,6 +31,8 @@ export default abstract class Plugin {
29
31
  await editor.format();
30
32
  }
31
33
 
34
+ await this.afterInstall();
35
+
32
36
  Log.info(`Plugin ${this.name} installed!`);
33
37
  }
34
38
 
@@ -38,6 +42,14 @@ export default abstract class Plugin {
38
42
  }
39
43
  }
40
44
 
45
+ protected async beforeInstall(): Promise<void> {
46
+ // Placeholder for overrides, don't place any functionality here.
47
+ }
48
+
49
+ protected async afterInstall(): Promise<void> {
50
+ // Placeholder for overrides, don't place any functionality here.
51
+ }
52
+
41
53
  protected async installDependencies(): Promise<void> {
42
54
  await Log.animate('Installing plugin dependencies', async () => {
43
55
  await this.installNpmDependencies();
@@ -45,12 +57,16 @@ export default abstract class Plugin {
45
57
  }
46
58
 
47
59
  protected async updateFiles(editor: Editor): Promise<void> {
48
- await this.updateBootstrapConfig(editor);
60
+ if (!this.isForDevelopment()) {
61
+ await this.updateBootstrapConfig(editor);
62
+ }
49
63
  }
50
64
 
51
65
  protected async installNpmDependencies(): Promise<void> {
66
+ const flags = this.isForDevelopment() ? '--save-dev' : '';
67
+
52
68
  if (isLinkedLocalApp()) {
53
- await Shell.run(`npm install file:${packagePath(this.getLocalPackageName())}`);
69
+ await Shell.run(`npm install file:${packagePath(this.getLocalPackageName())} ${flags}`);
54
70
 
55
71
  return;
56
72
  }
@@ -58,12 +74,12 @@ export default abstract class Plugin {
58
74
  if (isLocalApp()) {
59
75
  const packPath = packagePackPath(this.getLocalPackageName()) ?? packNotFound(this.getLocalPackageName());
60
76
 
61
- await Shell.run(`npm install file:${packPath}`);
77
+ await Shell.run(`npm install file:${packPath} ${flags}`);
62
78
 
63
79
  return;
64
80
  }
65
81
 
66
- await Shell.run(`npm install ${this.getNpmPackageName()}@next --save-exact`);
82
+ await Shell.run(`npm install ${this.getNpmPackageName()}@next --save-exact ${flags}`);
67
83
  }
68
84
 
69
85
  protected async updateBootstrapConfig(editor: Editor): Promise<void> {
@@ -89,7 +105,7 @@ export default abstract class Plugin {
89
105
  protected getBootstrapPluginsDeclaration(mainConfig: SourceFile): ArrayLiteralExpression | null {
90
106
  const bootstrapAppCall = findDescendant(mainConfig, {
91
107
  guard: Node.isCallExpression,
92
- validate: (callExpression) => callExpression.getExpression().getText() === 'bootstrapApplication',
108
+ validate: (callExpression) => callExpression.getExpression().getText() === 'bootstrap',
93
109
  skip: SyntaxKind.ImportDeclaration,
94
110
  });
95
111
  const bootstrapOptions = bootstrapAppCall?.getArguments()[1];
@@ -103,9 +119,24 @@ export default abstract class Plugin {
103
119
  return pluginsArray;
104
120
  }
105
121
 
122
+ protected getTailwindContentArray(tailwindConfig: SourceFile): ArrayLiteralExpression | null {
123
+ const contentAssignment = findDescendant(tailwindConfig, {
124
+ guard: Node.isPropertyAssignment,
125
+ validate: (propertyAssignment) => propertyAssignment.getName() === 'content',
126
+ skip: SyntaxKind.JSDoc,
127
+ });
128
+ const contentArray = contentAssignment?.getInitializer();
129
+
130
+ if (!Node.isArrayLiteralExpression(contentArray)) {
131
+ return null;
132
+ }
133
+
134
+ return contentArray;
135
+ }
136
+
106
137
  protected getBootstrapImport(): OptionalKind<ImportDeclarationStructure> {
107
138
  return {
108
- defaultImport: this.name,
139
+ defaultImport: stringToCamelCase(this.name),
109
140
  moduleSpecifier: `@aerogel/plugin-${this.name}`,
110
141
  };
111
142
  }
@@ -118,8 +149,12 @@ export default abstract class Plugin {
118
149
  return `plugin-${this.name}`;
119
150
  }
120
151
 
152
+ protected isForDevelopment(): boolean {
153
+ return false;
154
+ }
155
+
121
156
  protected getBootstrapConfig(): string {
122
- return `${this.name}()`;
157
+ return `${stringToCamelCase(this.name)}()`;
123
158
  }
124
159
 
125
160
  }
@@ -1,56 +1,28 @@
1
- import { Node, SyntaxKind } from 'ts-morph';
2
- import type { ArrayLiteralExpression, SourceFile } from 'ts-morph';
1
+ import File from '@aerogel/cli/lib/File';
2
+ import Log from '@aerogel/cli/lib/Log';
3
+ import Plugin from '@aerogel/cli/plugins/Plugin';
4
+ import Shell from '@aerogel/cli/lib/Shell';
5
+ import type { Editor } from '@aerogel/cli/lib/Editor';
3
6
 
4
- import File from '@/lib/File';
5
- import Log from '@/lib/Log';
6
- import Plugin from '@/plugins/Plugin';
7
- import Shell from '@/lib/Shell';
8
- import { findDescendant } from '@/lib/utils/edit';
9
- import { isLinkedLocalApp } from '@/lib/utils/app';
10
- import { packagePath } from '@/lib/utils/paths';
11
- import type { Editor } from '@/lib/Editor';
12
-
13
- export class Solid extends Plugin {
7
+ export default class Solid extends Plugin {
14
8
 
15
9
  constructor() {
16
10
  super('solid');
17
11
  }
18
12
 
19
- protected async updateFiles(editor: Editor): Promise<void> {
20
- await this.updateTailwindConfig(editor);
13
+ protected override async updateFiles(editor: Editor): Promise<void> {
21
14
  await this.updateNpmScripts(editor);
22
15
  await this.updateGitIgnore();
23
16
  await super.updateFiles(editor);
24
17
  }
25
18
 
26
- protected async installNpmDependencies(): Promise<void> {
19
+ protected override async installNpmDependencies(): Promise<void> {
27
20
  await Shell.run('npm install soukai-solid@next --save-exact');
28
- await Shell.run('npm install @solid/community-server@7 --save');
21
+ await Shell.run('npm install @noeldemartin/solid-utils@next --save-exact');
22
+ await Shell.run('npm install @solid/community-server@7.1.6 --save-dev -E');
29
23
  await super.installNpmDependencies();
30
24
  }
31
25
 
32
- protected async updateTailwindConfig(editor: Editor): Promise<void> {
33
- await Log.animate('Updating tailwind configuration', async () => {
34
- const tailwindConfig = editor.requireSourceFile('tailwind.config.js');
35
- const contentArray = this.getTailwindContentArray(tailwindConfig);
36
- const contentValue = isLinkedLocalApp()
37
- ? `'${packagePath('plugin-solid')}/dist/**/*.js'`
38
- : '\'./node_modules/@aerogel/plugin-solid/dist/**/*.js\'';
39
-
40
- if (!contentArray) {
41
- return Log.fail(`
42
- Could not find content array in tailwind config, please add the following manually:
43
-
44
- ${contentValue}
45
- `);
46
- }
47
-
48
- contentArray.addElement(contentValue);
49
-
50
- await editor.save(tailwindConfig);
51
- });
52
- }
53
-
54
26
  protected async updateNpmScripts(editor: Editor): Promise<void> {
55
27
  Log.info('Updating npm scripts...');
56
28
 
@@ -71,17 +43,17 @@ export class Solid extends Plugin {
71
43
  .replace(
72
44
  '"cy:test": "start-server-and-test test:serve-app http-get://localhost:5001 cy:run",',
73
45
  '"cy:test": "start-server-and-test ' +
74
- 'test:serve-app http-get://localhost:5001 test:serve-pod http-get://localhost:4000 cy:run",',
46
+ 'test:serve-app http-get://localhost:5001 test:serve-pod http-get://localhost:3000 cy:run",',
75
47
  )
76
48
  .replace(
77
49
  '"dev": "vite",',
78
50
  '"dev": "vite",\n' +
79
- '"dev:serve-pod": "community-solid-server -c @css:config/file.json -p 4000 -f ./solid-data",',
51
+ '"dev:serve-pod": "community-solid-server -c @css:config/file.json -f ./solid",',
80
52
  )
81
53
  .replace(
82
- '"test:serve-app": "vite --port 5001"',
83
- '"test:serve-app": "vite --port 5001",\n' +
84
- '"test:serve-pod": "community-solid-server -p 4000 -l warn"',
54
+ '"test:serve-app": "vite --port 5001 --mode testing"',
55
+ '"test:serve-app": "vite --port 5001 --mode testing",\n' +
56
+ '"test:serve-pod": "community-solid-server -l warn"',
85
57
  ),
86
58
  );
87
59
 
@@ -93,22 +65,7 @@ export class Solid extends Plugin {
93
65
 
94
66
  const gitignore = File.read('.gitignore') ?? '';
95
67
 
96
- File.write('.gitignore', `${gitignore}/solid-data\n`);
97
- }
98
-
99
- protected getTailwindContentArray(tailwindConfig: SourceFile): ArrayLiteralExpression | null {
100
- const contentAssignment = findDescendant(tailwindConfig, {
101
- guard: Node.isPropertyAssignment,
102
- validate: (propertyAssignment) => propertyAssignment.getName() === 'content',
103
- skip: SyntaxKind.JSDoc,
104
- });
105
- const contentArray = contentAssignment?.getInitializer();
106
-
107
- if (!Node.isArrayLiteralExpression(contentArray)) {
108
- return null;
109
- }
110
-
111
- return contentArray;
68
+ File.write('.gitignore', `${gitignore}/solid\n`);
112
69
  }
113
70
 
114
71
  }
@@ -1,18 +1,18 @@
1
- import Plugin from '@/plugins/Plugin';
2
- import Shell from '@/lib/Shell';
1
+ import Plugin from '@aerogel/cli/plugins/Plugin';
2
+ import Shell from '@aerogel/cli/lib/Shell';
3
3
 
4
- export class Soukai extends Plugin {
4
+ export default class Soukai extends Plugin {
5
5
 
6
6
  constructor() {
7
7
  super('soukai');
8
8
  }
9
9
 
10
- protected async installNpmDependencies(): Promise<void> {
10
+ protected override async installNpmDependencies(): Promise<void> {
11
11
  await Shell.run('npm install soukai@next --save-exact');
12
12
  await super.installNpmDependencies();
13
13
  }
14
14
 
15
- protected getBootstrapConfig(): string {
15
+ protected override getBootstrapConfig(): string {
16
16
  return 'soukai({ models: import.meta.glob(\'@/models/*\', { eager: true }) })';
17
17
  }
18
18
 
@@ -1,31 +1,36 @@
1
- import { beforeEach, vi } from 'vitest';
2
- import { resolve } from 'path';
3
- import { setTestingNamespace } from '@noeldemartin/utils';
4
-
5
- import File from '@/lib/File';
6
- import FileMock from '@/lib/File.mock';
7
- import Log from '@/lib/Log';
8
- import LogMock from '@/lib/Log.mock';
9
- import Shell from '@/lib/Shell';
10
- import ShellMock from '@/lib/Shell.mock';
11
-
12
- setTestingNamespace(vi);
13
-
14
- File.setMockInstance(FileMock);
15
- Log.setMockInstance(LogMock);
16
- Shell.setMockInstance(ShellMock);
1
+ import { beforeAll, beforeEach, vi } from 'vitest';
2
+ import { resolve } from 'node:path';
3
+ import { setupFacadeMocks } from '@noeldemartin/testing';
4
+
5
+ import ShellMock from '@aerogel/cli/lib/Shell.mock';
6
+ import File from '@aerogel/cli/lib/File';
7
+ import FileMock from '@aerogel/cli/lib/File.mock';
8
+ import Log from '@aerogel/cli/lib/Log';
9
+ import LogMock from '@aerogel/cli/lib/Log.mock';
10
+ import Shell from '@aerogel/cli/lib/Shell';
11
+
12
+ beforeAll(() => {
13
+ File.setMockFacade(FileMock);
14
+ Log.setMockFacade(LogMock);
15
+ Shell.setMockFacade(ShellMock);
16
+ });
17
17
 
18
18
  beforeEach(() => {
19
- FileMock.reset();
20
- LogMock.reset();
21
-
22
19
  File.mock();
23
20
  Log.mock();
24
21
  Shell.mock();
25
22
  });
26
23
 
27
- vi.mock('@/lib/utils/app', async () => {
28
- const original = (await vi.importActual('@/lib/utils/app')) as object;
24
+ vi.mock('@noeldemartin/utils', async () => {
25
+ const original = (await vi.importActual('@noeldemartin/utils')) as object;
26
+
27
+ setupFacadeMocks();
28
+
29
+ return original;
30
+ });
31
+
32
+ vi.mock('@aerogel/cli/lib/utils/app', async () => {
33
+ const original = (await vi.importActual('@aerogel/cli/lib/utils/app')) as object;
29
34
 
30
35
  return {
31
36
  ...original,
@@ -34,8 +39,8 @@ vi.mock('@/lib/utils/app', async () => {
34
39
  };
35
40
  });
36
41
 
37
- vi.mock('@/lib/utils/edit', async () => {
38
- const original = (await vi.importActual('@/lib/utils/edit')) as object;
42
+ vi.mock('@aerogel/cli/lib/utils/edit', async () => {
43
+ const original = (await vi.importActual('@aerogel/cli/lib/utils/edit')) as object;
39
44
 
40
45
  return {
41
46
  ...original,
@@ -44,8 +49,8 @@ vi.mock('@/lib/utils/edit', async () => {
44
49
  });
45
50
 
46
51
  // TODO find out why these need to be mocked
47
- vi.mock('@/lib/utils/paths', async () => {
48
- const original = (await vi.importActual('@/lib/utils/paths')) as object;
52
+ vi.mock('@aerogel/cli/lib/utils/paths', async () => {
53
+ const original = (await vi.importActual('@aerogel/cli/lib/utils/paths')) as object;
49
54
 
50
55
  function basePath(path: string = '') {
51
56
  return resolve(__dirname, '../../', path);
@@ -66,9 +71,3 @@ vi.mock('@/lib/utils/paths', async () => {
66
71
  templatePath,
67
72
  };
68
73
  });
69
-
70
- vi.mock('mustache', async () => {
71
- const mustache = (await vi.importActual('mustache')) as { default: unknown };
72
-
73
- return mustache.default;
74
- });
@@ -6,8 +6,8 @@ jobs:
6
6
  ci:
7
7
  runs-on: ubuntu-latest
8
8
  steps:
9
- - uses: actions/checkout@v3
10
- - uses: actions/setup-node@v3
9
+ - uses: actions/checkout@v4
10
+ - uses: actions/setup-node@v4
11
11
  with:
12
12
  node-version-file: '.nvmrc'
13
13
  - run: npm ci
@@ -16,13 +16,13 @@ jobs:
16
16
  - run: npm run test:ci
17
17
  - run: npm run cy:test-snapshots:ci
18
18
  - name: Upload Cypress screenshots
19
- uses: actions/upload-artifact@v3
19
+ uses: actions/upload-artifact@v4
20
20
  if: ${{ failure() }}
21
21
  with:
22
22
  name: cypress_screenshots
23
23
  path: cypress/screenshots
24
24
  - name: Upload Cypress snapshots
25
- uses: actions/upload-artifact@v3
25
+ uses: actions/upload-artifact@v4
26
26
  if: ${{ failure() }}
27
27
  with:
28
28
  name: cypress_snapshots
@@ -1 +1 @@
1
- lts/hydrogen
1
+ v22.9.0
@@ -3,6 +3,7 @@
3
3
  "configurations": [
4
4
  {
5
5
  "type": "node",
6
+ "runtimeVersion": "22.14.0",
6
7
  "request": "launch",
7
8
  "name": "Debug Current Test File",
8
9
  "autoAttachChildProcesses": true,
@@ -1,4 +1,4 @@
1
- import install from '@aerogel/cypress/dist/plugin';
1
+ import { setupAerogelNodeEvents } from '@aerogel/cypress/config';
2
2
  import { defineConfig } from 'cypress';
3
3
 
4
4
  export default defineConfig({
@@ -9,8 +9,6 @@ export default defineConfig({
9
9
  runMode: 3,
10
10
  openMode: 0,
11
11
  },
12
- setupNodeEvents(on) {
13
- install(on);
14
- },
12
+ setupNodeEvents: setupAerogelNodeEvents,
15
13
  },
16
14
  });
@@ -1,3 +1 @@
1
- import install from '@aerogel/cypress';
2
-
3
- install();
1
+ import '@aerogel/cypress/support';
@@ -1,12 +1,11 @@
1
1
  {
2
+ "extends": "@tsconfig/node22/tsconfig.json",
3
+ "include": ["**/*.ts"],
2
4
  "compilerOptions": {
3
- "target": "es5",
4
- "lib": ["es5", "dom"],
5
- "types": ["cypress", "node"],
6
5
  "baseUrl": ".",
7
- "paths": {
8
- "@cy/*": ["./*"]
9
- }
10
- },
11
- "include": ["**/*.ts"]
6
+ "module": "ESNext",
7
+ "moduleResolution": "Bundler",
8
+ "lib": ["DOM"],
9
+ "types": ["node", "cypress"]
10
+ }
12
11
  }
@@ -1,12 +1,13 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en" class="h-full w-full">
2
+ <html lang="en" class="size-full">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title><% app.name %></title>
6
+ <title>{{ app.name }}</title>
7
+ {{ socialMeta() }}
7
8
  </head>
8
- <body class="h-full w-full text-base font-normal leading-tight text-gray-900 antialiased">
9
- <div id="app" class="h-full"></div>
9
+ <body class="size-full text-base font-normal leading-tight text-gray-900 antialiased">
10
+ <div id="app" class="loading h-full"></div>
10
11
  <script type="module" src="./src/main.ts"></script>
11
12
  </body>
12
13
  </html>
@@ -2,32 +2,33 @@
2
2
  "name": "<% app.slug %>",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "build": "vite build",
7
8
  "cy:dev": "concurrently --kill-others \"npm run test:serve-app\" \"npm run cy:open\"",
8
- "cy:open": "cypress open --e2e --browser chromium",
9
- "cy:run": "cypress run",
9
+ "cy:open": "cypress open --config-file ./cypress/cypress.config.ts --e2e --browser chromium",
10
+ "cy:run": "cypress run --config-file ./cypress/cypress.config.ts",
10
11
  "cy:test": "start-server-and-test test:serve-app http-get://localhost:5001 cy:run",
11
12
  "cy:test-snapshots": "docker run -it -u `id -u ${whoami}` -e CYPRESS_SNAPSHOTS=true -v ./:/app -w /app cypress/base:18.16.0 sh -c \"npx cypress install && npm run cy:test\"",
12
13
  "cy:test-snapshots:ci": "docker run -e CYPRESS_SNAPSHOTS=true -v ./:/app -w /app cypress/base:18.16.0 sh -c \"npx cypress install && npm run cy:test\"",
13
14
  "dev": "vite",
14
- "lint": "noeldemartin-lint src",
15
+ "lint": "noeldemartin-lint src cypress",
15
16
  "test": "vitest --run",
16
17
  "test:ci": "vitest --run --reporter verbose",
17
- "test:serve-app": "vite --port 5001"
18
+ "test:serve-app": "vite --port 5001 --mode testing"
18
19
  },
19
20
  "dependencies": {
20
21
  "@aerogel/core": "<% &dependencies.aerogelCore %>",
21
22
  "@aerogel/plugin-i18n": "<% &dependencies.aerogelPluginI18n %>",
22
23
  "@aerogel/plugin-soukai": "<% &dependencies.aerogelPluginSoukai %>",
23
- "@intlify/unplugin-vue-i18n": "^0.12.2",
24
+ "@intlify/unplugin-vue-i18n": "^6.0.5",
24
25
  "@noeldemartin/utils": "next",
25
- "@tailwindcss/forms": "^0.5.3",
26
- "@tailwindcss/typography": "^0.5.9",
26
+ "@tailwindcss/forms": "^0.5.10",
27
+ "@tailwindcss/typography": "^0.5.16",
27
28
  "soukai": "next",
28
- "tailwindcss": "^3.3.2",
29
- "vue": "^3.3.0",
30
- "vue-i18n": "9.3.0-beta.19"
29
+ "tailwindcss": "^4.1.1",
30
+ "vue": "^3.5.13",
31
+ "vue-i18n": "^11.1.2"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@aerogel/cli": "<% &dependencies.aerogelCli %>",
@@ -37,19 +38,30 @@
37
38
  "@noeldemartin/eslint-config-vue": "next",
38
39
  "@noeldemartin/scripts": "next",
39
40
  "@total-typescript/ts-reset": "^0.4.2",
41
+ "@tsconfig/node22": "^22.0.1",
40
42
  "@types/node": "^20.3.1",
43
+ "@vue/tsconfig": "^0.7.0",
41
44
  "autoprefixer": "^10.4.14",
42
45
  "concurrently": "^8.2.0",
43
- "cypress": "^12.17.0",
44
- "eslint": "^8.40.0",
45
- "prettier": "^2.8.8",
46
- "prettier-eslint-cli": "^7.1.0",
47
- "prettier-plugin-tailwindcss": "^0.2.8",
46
+ "cypress": "14.2.0",
47
+ "prettier-plugin-tailwindcss": "^0.6.11",
48
48
  "start-server-and-test": "^2.0.0",
49
+ "typescript": "^5.8.2",
49
50
  "unplugin-icons": "^0.16.3",
50
51
  "unplugin-vue-components": "^0.24.1",
51
- "vite": "^4.3.0",
52
- "vitest": "^0.33.0",
53
- "vue-tsc": "^1.8.15"
52
+ "vite": "^6.2.2",
53
+ "vitest": "^3.0.9",
54
+ "vue-tsc": "^2.2.8"
55
+ },
56
+ "eslintConfig": {
57
+ "extends": [
58
+ "@noeldemartin/eslint-config-vue"
59
+ ]
60
+ },
61
+ "prettier": {
62
+ "printWidth": 120,
63
+ "plugins": [
64
+ "prettier-plugin-tailwindcss"
65
+ ]
54
66
  }
55
67
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <AGAppLayout>
3
- <main class="flex flex-grow flex-col items-center justify-center bg-blue-50">
2
+ <AppLayout class="bg-blue-50">
3
+ <main class="flex grow flex-col items-center justify-center">
4
4
  <h1 class="text-4xl font-semibold">
5
5
  {{ $t('home.title') }}
6
6
  </h1>
@@ -8,5 +8,5 @@
8
8
  {{ $t('home.getStarted') }}
9
9
  </a>
10
10
  </main>
11
- </AGAppLayout>
11
+ </AppLayout>
12
12
  </template>
@@ -0,0 +1,4 @@
1
+ @import 'tailwindcss';
2
+ @import '@aerogel/core';
3
+ @plugin '@tailwindcss/forms';
4
+ @plugin '@tailwindcss/typography';
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow:
@@ -1,13 +1,13 @@
1
1
  import i18n from '@aerogel/plugin-i18n';
2
2
  import soukai from '@aerogel/plugin-soukai';
3
- import { bootstrapApplication } from '@aerogel/core';
3
+ import { bootstrap } from '@aerogel/core';
4
4
 
5
- import './assets/styles.css';
5
+ import './assets/css/main.css';
6
6
  import App from './App.vue';
7
7
 
8
- bootstrapApplication(App, {
8
+ bootstrap(App, {
9
9
  plugins: [
10
10
  i18n({ messages: import.meta.glob('@/lang/*.yaml') }),
11
- soukai({ models: import.meta.glob('@/models/*', { eager: true }) }),
11
+ soukai({ models: import.meta.glob(['@/models/*', '!**/*.test.ts'], { eager: true }) }),
12
12
  ],
13
13
  });
@@ -1,16 +1,9 @@
1
1
  {
2
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
2
3
  "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "strict": true,
7
- "jsx": "preserve",
8
- "noUncheckedIndexedAccess": true,
9
- "skipLibCheck": true,
10
- "resolveJsonModule": true,
11
- "esModuleInterop": true,
12
- "lib": ["esnext", "dom"],
13
4
  "baseUrl": ".",
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
14
7
  "paths": {
15
8
  "@/*": ["./src/*"]
16
9
  }
@@ -1,19 +1,22 @@
1
+ import { URL, fileURLToPath } from 'node:url';
2
+
1
3
  import Aerogel, { AerogelResolver } from '@aerogel/vite';
2
4
  import Components from 'unplugin-vue-components/vite';
3
5
  import I18n from '@intlify/unplugin-vue-i18n/vite';
4
6
  import Icons from 'unplugin-icons/vite';
5
7
  import IconsResolver from 'unplugin-icons/resolver';
6
8
  import { defineConfig } from 'vitest/config';
7
- import { resolve } from 'path';
8
9
 
9
10
  export default defineConfig({
11
+ build: { sourcemap: true },
12
+ publicDir: fileURLToPath(new URL('./src/assets/public/', import.meta.url)),
10
13
  plugins: [
11
- Aerogel(),
14
+ Aerogel({ name: '<% app.name %>' }),
12
15
  Components({
13
16
  dts: false,
14
17
  resolvers: [AerogelResolver(), IconsResolver()],
15
18
  }),
16
- I18n({ include: resolve(__dirname, './src/lang/**/*.yaml') }),
19
+ I18n({ include: fileURLToPath(new URL('./src/lang/**/*.yaml', import.meta.url)) }),
17
20
  Icons({
18
21
  iconCustomizer(_, __, props) {
19
22
  props['aria-hidden'] = 'true';
@@ -22,7 +25,7 @@ export default defineConfig({
22
25
  ],
23
26
  resolve: {
24
27
  alias: {
25
- '@': resolve(__dirname, './src'),
28
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
26
29
  },
27
30
  },
28
31
  });