@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.
- package/bin/gel +1 -1
- package/dist/aerogel-cli.d.ts +1 -1
- package/dist/aerogel-cli.js +833 -0
- package/dist/aerogel-cli.js.map +1 -0
- package/package.json +20 -33
- package/src/cli.ts +10 -10
- package/src/commands/Command.ts +3 -3
- package/src/commands/create.test.ts +2 -2
- package/src/commands/create.ts +11 -11
- package/src/commands/generate-component.test.ts +3 -3
- package/src/commands/generate-component.ts +30 -19
- package/src/commands/generate-model.test.ts +1 -1
- package/src/commands/generate-model.ts +11 -11
- package/src/commands/generate-overrides.ts +10 -10
- package/src/commands/generate-service.test.ts +1 -1
- package/src/commands/generate-service.ts +14 -14
- package/src/commands/info.ts +7 -6
- package/src/commands/install.test.ts +1 -15
- package/src/commands/install.ts +11 -12
- package/src/lib/App.ts +9 -6
- package/src/lib/Editor.ts +3 -4
- package/src/lib/File.mock.ts +6 -6
- package/src/lib/File.ts +2 -2
- package/src/lib/Log.mock.ts +3 -3
- package/src/lib/Log.test.ts +4 -4
- package/src/lib/Log.ts +6 -6
- package/src/lib/Shell.mock.ts +1 -1
- package/src/lib/Shell.ts +1 -1
- package/src/lib/Template.ts +19 -16
- package/src/lib/utils/app.ts +2 -2
- package/src/lib/utils/edit.ts +2 -2
- package/src/lib/utils/paths.ts +15 -7
- package/src/plugins/Plugin.ts +7 -26
- package/src/plugins/Solid.ts +13 -20
- package/src/plugins/Soukai.ts +4 -4
- package/src/testing/setup.ts +28 -26
- package/templates/app/.nvmrc +1 -1
- package/templates/app/.vscode/launch.json +1 -0
- package/templates/app/cypress/tsconfig.json +7 -8
- package/templates/app/index.html +2 -2
- package/templates/app/package.json +18 -17
- package/templates/app/src/App.vue +3 -3
- package/templates/app/src/assets/css/main.css +4 -0
- package/templates/app/src/main.ts +1 -1
- package/templates/app/tsconfig.json +3 -10
- package/templates/app/vite.config.ts +6 -4
- package/templates/component-button/[component.name].vue +2 -2
- package/templates/component-checkbox/[component.name].vue +34 -0
- package/templates/component-checkbox-story/[component.name].story.vue +63 -0
- package/templates/component-input/[component.name].vue +6 -5
- package/templates/component-input-story/[component.name].story.vue +4 -4
- package/templates/overrides/components/overrides/ConfirmModal.vue +6 -6
- package/templates/overrides/components/overrides/LoadingModal.vue +1 -1
- package/templates/overrides/components/overrides/ModalWrapper.vue +3 -3
- package/templates/overrides/components/overrides/SnackbarNotification.vue +3 -3
- package/templates/overrides-story/Overrides.story.vue +11 -11
- package/.prettierignore +0 -1
- package/dist/aerogel-cli.cjs.js +0 -2
- package/dist/aerogel-cli.cjs.js.map +0 -1
- package/dist/aerogel-cli.esm.js +0 -2
- package/dist/aerogel-cli.esm.js.map +0 -1
- package/src/plugins/Histoire.ts +0 -105
- package/templates/app/postcss.config.js +0 -6
- package/templates/app/src/assets/css/styles.css +0 -3
- package/templates/app/tailwind.config.js +0 -5
- package/templates/histoire/histoire.config.ts +0 -7
- package/templates/histoire/patches/histoire+0.17.6.patch +0 -13
- package/templates/histoire/src/main.histoire.ts +0 -8
- package/templates/overrides/components/overrides/ErrorReportModal.vue +0 -35
- package/templates/postcss-pseudo-classes/postcss.config.js +0 -15
- package/tsconfig.json +0 -11
- package/vite.config.ts +0 -14
- /package/src/{main.ts → index.ts} +0 -0
package/src/plugins/Histoire.ts
DELETED
|
@@ -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,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,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
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
|