@aerogel/cli 0.0.0-next.a68f133e2c9a1ae9ba84b4e2e42df909289e5fba → 0.0.0-next.b3caf219a503ce9b8c65ef1463132c9507f56c0a

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 (73) hide show
  1. package/bin/gel +1 -1
  2. package/dist/aerogel-cli.d.ts +1 -1
  3. package/dist/aerogel-cli.js +833 -0
  4. package/dist/aerogel-cli.js.map +1 -0
  5. package/package.json +20 -33
  6. package/src/cli.ts +10 -10
  7. package/src/commands/Command.ts +3 -3
  8. package/src/commands/create.test.ts +2 -2
  9. package/src/commands/create.ts +11 -11
  10. package/src/commands/generate-component.test.ts +3 -3
  11. package/src/commands/generate-component.ts +30 -19
  12. package/src/commands/generate-model.test.ts +1 -1
  13. package/src/commands/generate-model.ts +11 -11
  14. package/src/commands/generate-overrides.ts +10 -10
  15. package/src/commands/generate-service.test.ts +1 -1
  16. package/src/commands/generate-service.ts +14 -14
  17. package/src/commands/info.ts +7 -6
  18. package/src/commands/install.test.ts +1 -15
  19. package/src/commands/install.ts +11 -12
  20. package/src/lib/App.ts +9 -6
  21. package/src/lib/Editor.ts +3 -4
  22. package/src/lib/File.mock.ts +6 -6
  23. package/src/lib/File.ts +2 -2
  24. package/src/lib/Log.mock.ts +3 -3
  25. package/src/lib/Log.test.ts +4 -4
  26. package/src/lib/Log.ts +6 -6
  27. package/src/lib/Shell.mock.ts +1 -1
  28. package/src/lib/Shell.ts +1 -1
  29. package/src/lib/Template.ts +19 -16
  30. package/src/lib/utils/app.ts +2 -2
  31. package/src/lib/utils/edit.ts +2 -2
  32. package/src/lib/utils/paths.ts +15 -7
  33. package/src/plugins/Plugin.ts +7 -26
  34. package/src/plugins/Solid.ts +13 -20
  35. package/src/plugins/Soukai.ts +4 -4
  36. package/src/testing/setup.ts +28 -26
  37. package/templates/app/.nvmrc +1 -1
  38. package/templates/app/.vscode/launch.json +1 -0
  39. package/templates/app/cypress/tsconfig.json +7 -8
  40. package/templates/app/index.html +2 -2
  41. package/templates/app/package.json +18 -17
  42. package/templates/app/src/App.vue +3 -3
  43. package/templates/app/src/assets/css/main.css +4 -0
  44. package/templates/app/src/main.ts +1 -1
  45. package/templates/app/tsconfig.json +3 -10
  46. package/templates/app/vite.config.ts +6 -4
  47. package/templates/component-button/[component.name].vue +2 -2
  48. package/templates/component-checkbox/[component.name].vue +34 -0
  49. package/templates/component-checkbox-story/[component.name].story.vue +63 -0
  50. package/templates/component-input/[component.name].vue +6 -5
  51. package/templates/component-input-story/[component.name].story.vue +4 -4
  52. package/templates/overrides/components/overrides/ConfirmModal.vue +6 -6
  53. package/templates/overrides/components/overrides/LoadingModal.vue +1 -1
  54. package/templates/overrides/components/overrides/ModalWrapper.vue +3 -3
  55. package/templates/overrides/components/overrides/SnackbarNotification.vue +3 -3
  56. package/templates/overrides-story/Overrides.story.vue +11 -11
  57. package/.prettierignore +0 -1
  58. package/dist/aerogel-cli.cjs.js +0 -2
  59. package/dist/aerogel-cli.cjs.js.map +0 -1
  60. package/dist/aerogel-cli.esm.js +0 -2
  61. package/dist/aerogel-cli.esm.js.map +0 -1
  62. package/src/plugins/Histoire.ts +0 -105
  63. package/templates/app/postcss.config.js +0 -6
  64. package/templates/app/src/assets/css/styles.css +0 -3
  65. package/templates/app/tailwind.config.js +0 -5
  66. package/templates/histoire/histoire.config.ts +0 -7
  67. package/templates/histoire/patches/histoire+0.17.6.patch +0 -13
  68. package/templates/histoire/src/main.histoire.ts +0 -8
  69. package/templates/overrides/components/overrides/ErrorReportModal.vue +0 -35
  70. package/templates/postcss-pseudo-classes/postcss.config.js +0 -15
  71. package/tsconfig.json +0 -11
  72. package/vite.config.ts +0 -14
  73. /package/src/{main.ts → index.ts} +0 -0
@@ -1,105 +0,0 @@
1
- import File from '@/lib/File';
2
- import Log from '@/lib/Log';
3
- import Plugin from '@/plugins/Plugin';
4
- import Shell from '@/lib/Shell';
5
- import Template from '@/lib/Template';
6
- import { isLinkedLocalApp } from '@/lib/utils/app';
7
- import { packagePath, templatePath } from '@/lib/utils/paths';
8
- import type { Editor } from '@/lib/Editor';
9
-
10
- export class Histoire extends Plugin {
11
-
12
- private installedPatchPackage: boolean = false;
13
- private installedPostCSSPseudoClasses: boolean = false;
14
-
15
- constructor() {
16
- super('histoire');
17
- }
18
-
19
- public async beforeInstall(): Promise<void> {
20
- this.installedPatchPackage = false;
21
- this.installedPostCSSPseudoClasses = false;
22
- }
23
-
24
- protected async afterInstall(): Promise<void> {
25
- if (!this.installedPatchPackage) {
26
- return;
27
- }
28
-
29
- await Log.animate('Patching dependencies', async () => {
30
- await Shell.run('npx patch-package');
31
- });
32
- }
33
-
34
- protected async updateFiles(editor: Editor): Promise<void> {
35
- await this.updateTailwindConfig(editor, {
36
- content: isLinkedLocalApp()
37
- ? `'${packagePath('histoire')}/dist/**/*.js'`
38
- : '\'./node_modules/@aerogel/histoire/dist/**/*.js\'',
39
- });
40
-
41
- await this.updateNpmScripts(editor);
42
- await this.createConfigFiles();
43
- await super.updateFiles(editor);
44
- }
45
-
46
- protected async installNpmDependencies(): Promise<void> {
47
- // We need this specific version because we're patching it using patch-package
48
- await Shell.run('npm install histoire@0.17.6 --save-dev');
49
-
50
- if (!File.contains('package.json', '"patch-package"')) {
51
- await Shell.run('npm install patch-package --save-dev');
52
-
53
- this.installedPatchPackage = true;
54
- }
55
-
56
- if (!File.contains('package.json', '"postcss-pseudo-classes"')) {
57
- await Shell.run('npm install postcss-pseudo-classes --save-dev');
58
-
59
- this.installedPostCSSPseudoClasses = true;
60
- }
61
-
62
- await super.installNpmDependencies();
63
- }
64
-
65
- protected getLocalPackageName(): string {
66
- return this.name;
67
- }
68
-
69
- protected async updateNpmScripts(editor: Editor): Promise<void> {
70
- Log.info('Updating npm scripts...');
71
-
72
- const packageJson = File.read('package.json');
73
-
74
- if (!packageJson) {
75
- return Log.fail('Could not find package.json file');
76
- }
77
-
78
- File.write(
79
- 'package.json',
80
- packageJson.replace(
81
- '"lint": "noeldemartin-lint src",',
82
- this.installedPatchPackage
83
- ? '"histoire": "histoire dev", "lint": "noeldemartin-lint src", "postinstall": "patch-package",'
84
- : '"histoire": "histoire dev", "lint": "noeldemartin-lint src",',
85
- ),
86
- );
87
-
88
- editor.addModifiedFile('package.json');
89
- }
90
-
91
- protected async createConfigFiles(): Promise<void> {
92
- Log.info('Creating config files...');
93
-
94
- Template.instantiate(templatePath('histoire'));
95
-
96
- if (this.installedPostCSSPseudoClasses) {
97
- Template.instantiate(templatePath('postcss-pseudo-classes'));
98
- }
99
- }
100
-
101
- protected isForDevelopment(): boolean {
102
- return true;
103
- }
104
-
105
- }
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- };
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
@@ -1,5 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ['./index.html', './src/**/*.{vue,ts}', '<% &contentPath %>'],
4
- plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
5
- };
@@ -1,7 +0,0 @@
1
- import HstAerogel from '@aerogel/histoire/dist/plugin';
2
- import { defineConfig } from 'histoire';
3
-
4
- export default defineConfig({
5
- setupFile: '/src/main.histoire.ts',
6
- plugins: [HstAerogel()],
7
- });
@@ -1,13 +0,0 @@
1
- diff --git a/node_modules/histoire/dist/node/collect/index.js b/node_modules/histoire/dist/node/collect/index.js
2
- index 8ffd507..37be43e 100644
3
- --- a/node_modules/histoire/dist/node/collect/index.js
4
- +++ b/node_modules/histoire/dist/node/collect/index.js
5
- @@ -22,7 +22,7 @@ export function useCollectStories(options, ctx) {
6
- /vite\w*\/dist\/client\/(client|env).mjs/,
7
- ...ctx.config.viteNodeInlineDeps ?? [],
8
- ],
9
- - fallbackCJS: true,
10
- + fallbackCJS: false,
11
- },
12
- transformMode: ctx.config.viteNodeTransformMode,
13
- });
@@ -1,8 +0,0 @@
1
- import '@aerogel/histoire/dist/styles.css';
2
- import { defineSetupAerogel } from '@aerogel/histoire';
3
-
4
- import './assets/css/styles.css';
5
-
6
- export const setupVue3 = defineSetupAerogel({
7
- messages: import.meta.glob('@/lang/*.yaml'),
8
- });
@@ -1,35 +0,0 @@
1
- <template>
2
- <ModalWrapper>
3
- <AGErrorReportModalTitle
4
- :report="report"
5
- :current-report="activeReportIndex + 1"
6
- :total-reports="reports.length"
7
- />
8
- <AGButton color="clear" :disabled="activeReportIndex === 0" @click="activeReportIndex--">
9
- {{ previousReportText }}
10
- </AGButton>
11
- <AGButton color="clear" :disabled="activeReportIndex === reports.length - 1" @click="activeReportIndex++">
12
- {{ nextReportText }}
13
- </AGButton>
14
- <AGErrorReportModalButtons :report="report">
15
- <template
16
- #default="{ url, handler, iconComponent, description }: IAGErrorReportModalButtonsDefaultSlotProps"
17
- >
18
- <AGButton :url="url" :aria-label="description" @click="handler">
19
- <component :is="iconComponent" />
20
- {{ description }}
21
- </AGButton>
22
- </template>
23
- </AGErrorReportModalButtons>
24
- <AGMarkdown v-if="report.description" :text="report.description" />
25
- <pre v-text="details" />
26
- </ModalWrapper>
27
- </template>
28
-
29
- <script setup lang="ts">
30
- import { useErrorReportModal, useErrorReportModalProps } from '@aerogel/core';
31
- import type { IAGErrorReportModalButtonsDefaultSlotProps } from '@aerogel/core';
32
-
33
- const props = defineProps(useErrorReportModalProps());
34
- const { activeReportIndex, details, nextReportText, previousReportText, report } = useErrorReportModal(props);
35
- </script>
@@ -1,15 +0,0 @@
1
- const plugins = {
2
- tailwindcss: {},
3
- autoprefixer: {},
4
- };
5
-
6
- if (process.env.NODE_ENV === 'development') {
7
- plugins['postcss-pseudo-classes'] = {
8
- blacklist: [],
9
- restrictTo: ['hover', 'focus-visible', 'focus'],
10
- allCombinations: true,
11
- preserveBeforeAfter: false,
12
- };
13
- }
14
-
15
- module.exports = { plugins };
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "types": ["node"],
5
- "baseUrl": ".",
6
- "paths": {
7
- "@/*": ["./src/*"]
8
- }
9
- },
10
- "include": ["src/**/*.ts"]
11
- }
package/vite.config.ts DELETED
@@ -1,14 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
- import { resolve } from 'path';
3
-
4
- export default defineConfig({
5
- test: {
6
- clearMocks: true,
7
- setupFiles: ['./src/testing/setup.ts'],
8
- },
9
- resolve: {
10
- alias: {
11
- '@': resolve(__dirname, './src'),
12
- },
13
- },
14
- });
File without changes