create-outsystems-astro 0.5.0 → 0.7.0
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/README.md +50 -11
- package/bin/cli.js +71 -5
- package/package.json +1 -1
- package/template/.prettierignore +2 -0
- package/template/.prettierrc +4 -0
- package/template/AGENTS.md +145 -22
- package/template/astro.config.mjs +15 -2
- package/template/bun.lock +529 -716
- package/template/deno.json +14 -7
- package/template/deno.lock +1100 -688
- package/template/eslint.config.mjs +43 -0
- package/template/output.ts +14 -2
- package/template/package-lock.json +3404 -3080
- package/template/package.json +59 -85
- package/template/patches/{@angular+build+21.2.0.patch → @angular+build+21.2.1.patch} +1 -10
- package/template/patches-deno/playwright+1.58.2.patch +26 -0
- package/template/playwright.config.ts +1 -1
- package/template/pnpm-lock.yaml +2041 -1584
- package/template/pnpm-workspace.yaml +6 -0
- package/template/src/framework/angular/{Counter.component.ts → Demo.component.ts} +12 -5
- package/template/src/framework/angular/Store.component.ts +24 -0
- package/template/src/framework/preact/Demo.tsx +86 -0
- package/template/src/framework/preact/Store.tsx +31 -0
- package/template/src/framework/react/{Counter.tsx → Demo.tsx} +23 -17
- package/template/src/framework/react/Store.tsx +31 -0
- package/template/src/framework/svelte/Demo.svelte +74 -0
- package/template/src/framework/svelte/Store.svelte +22 -0
- package/template/src/framework/vue/{Counter.vue → Demo.vue} +7 -9
- package/template/src/framework/vue/Store.vue +28 -0
- package/template/src/images/angular.png +0 -0
- package/template/src/images/preact.png +0 -0
- package/template/src/images/react.png +0 -0
- package/template/src/images/svelte.png +0 -0
- package/template/src/images/vue.png +0 -0
- package/template/src/pages/angular/angular-demo.astro +42 -0
- package/template/src/pages/multi/store.astro +22 -0
- package/template/src/pages/preact/preact-demo.astro +66 -0
- package/template/src/pages/react/react-demo.astro +66 -0
- package/template/src/pages/svelte/svelte-demo.astro +63 -0
- package/template/src/pages/vue/vue-demo.astro +61 -0
- package/template/src/stores/framework.ts +10 -0
- package/template/src/styles/index.css +4 -0
- package/template/svelte.config.js +5 -0
- package/template/test/e2e/angular/angular-counter.spec.ts +7 -1
- package/template/test/e2e/preact/preact-counter.spec.ts +42 -0
- package/template/test/e2e/react/react-counter.spec.ts +2 -2
- package/template/test/e2e/svelte/svelte-counter.spec.ts +42 -0
- package/template/test/e2e/vue/vue-counter.spec.ts +2 -2
- package/template/test/integration/angular/{Counter.component.spec.ts → Demo.component.spec.ts} +6 -6
- package/template/test/integration/preact/Demo.test.tsx +84 -0
- package/template/test/integration/react/{Counter.test.tsx → Demo.test.tsx} +10 -9
- package/template/test/integration/svelte/Demo.test.ts +81 -0
- package/template/test/integration/svelte/Demo.wrapper.svelte +27 -0
- package/template/test/integration/vue/{Counter.test.ts → Demo.test.ts} +9 -9
- package/template/tsconfig.json +0 -1
- package/template/vitest.config.ts +29 -2
- package/template/yarn.lock +2311 -2251
- package/template/src/pages/angular/angular-counter.astro +0 -31
- package/template/src/pages/react/react-counter.astro +0 -58
- package/template/src/pages/vue/vue-counter.astro +0 -62
- /package/template/patches/{@analogjs+astro-angular+2.3.0.patch → @analogjs+astro-angular+2.3.1.patch} +0 -0
|
@@ -2,6 +2,7 @@ import { fixupPluginRules } from "@eslint/compat";
|
|
|
2
2
|
import pluginJs from "@eslint/js";
|
|
3
3
|
import markdown from "@eslint/markdown";
|
|
4
4
|
import angular from "angular-eslint";
|
|
5
|
+
import preactConfig from "eslint-config-preact";
|
|
5
6
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
6
7
|
import eslintPluginAstro from "eslint-plugin-astro";
|
|
7
8
|
import importPlugin from "eslint-plugin-import";
|
|
@@ -11,11 +12,17 @@ import perfectionist from "eslint-plugin-perfectionist";
|
|
|
11
12
|
import playwright from "eslint-plugin-playwright";
|
|
12
13
|
import pluginReact from "eslint-plugin-react";
|
|
13
14
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
15
|
+
import svelte from "eslint-plugin-svelte";
|
|
14
16
|
import testingLibrary from "eslint-plugin-testing-library";
|
|
15
17
|
import pluginVue from "eslint-plugin-vue";
|
|
16
18
|
import globals from "globals";
|
|
19
|
+
import svelteParser from "svelte-eslint-parser";
|
|
17
20
|
import tseslint from "typescript-eslint";
|
|
18
21
|
|
|
22
|
+
// 1. Import the Preact config normally
|
|
23
|
+
|
|
24
|
+
import svelteConfig from "./svelte.config.js";
|
|
25
|
+
|
|
19
26
|
// Fix for Bun and eslint-plugin-perfectionist.
|
|
20
27
|
if (!Array.prototype.toSorted) {
|
|
21
28
|
Array.prototype.toSorted = function (compareFn) {
|
|
@@ -58,6 +65,7 @@ export default [
|
|
|
58
65
|
},
|
|
59
66
|
},
|
|
60
67
|
},
|
|
68
|
+
// ... rest of your config remains identical
|
|
61
69
|
{
|
|
62
70
|
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
|
|
63
71
|
plugins: {
|
|
@@ -169,4 +177,39 @@ export default [
|
|
|
169
177
|
"@angular-eslint/no-input-rename": "off",
|
|
170
178
|
},
|
|
171
179
|
})),
|
|
180
|
+
...svelte.configs["flat/recommended"].map((config) => ({
|
|
181
|
+
...config,
|
|
182
|
+
files: ["**/*.svelte"],
|
|
183
|
+
languageOptions: {
|
|
184
|
+
...config.languageOptions,
|
|
185
|
+
parser: svelteParser,
|
|
186
|
+
parserOptions: {
|
|
187
|
+
...config.languageOptions?.parserOptions,
|
|
188
|
+
extraFileExtensions: [".svelte"],
|
|
189
|
+
parser: tseslint.parser,
|
|
190
|
+
svelteConfig,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
})),
|
|
194
|
+
{
|
|
195
|
+
files: ["src/framework/preact/**/*.{js,ts,jsx,tsx}"],
|
|
196
|
+
languageOptions: {
|
|
197
|
+
globals: {
|
|
198
|
+
...globals.browser,
|
|
199
|
+
},
|
|
200
|
+
parserOptions: {
|
|
201
|
+
ecmaFeatures: {
|
|
202
|
+
jsx: true,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
rules: {
|
|
207
|
+
...preactConfig.rules,
|
|
208
|
+
},
|
|
209
|
+
settings: {
|
|
210
|
+
react: {
|
|
211
|
+
version: "19.0",
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
172
215
|
];
|
package/template/output.ts
CHANGED
|
@@ -100,14 +100,26 @@ function formatAstroIslandAttributes(html: string): string {
|
|
|
100
100
|
function getAllFilesWithExtension(dir: string, ext: string): string[] {
|
|
101
101
|
let results: string[] = [];
|
|
102
102
|
|
|
103
|
+
if (!fs.existsSync(dir)) return results;
|
|
104
|
+
|
|
103
105
|
for (const file of fs.readdirSync(dir)) {
|
|
104
106
|
const filePath = path.join(dir, file);
|
|
105
107
|
const stat = fs.statSync(filePath);
|
|
106
108
|
|
|
107
109
|
if (stat.isDirectory()) {
|
|
108
110
|
results = results.concat(getAllFilesWithExtension(filePath, ext));
|
|
109
|
-
} else
|
|
110
|
-
|
|
111
|
+
} else {
|
|
112
|
+
// Check if it ends with the extension (e.g., .js)
|
|
113
|
+
// AND does not contain the string ".astro"
|
|
114
|
+
const isTargetExtension = filePath.endsWith(ext);
|
|
115
|
+
const isAstroInternal = file.includes(".astro");
|
|
116
|
+
|
|
117
|
+
if (isTargetExtension && !isAstroInternal) {
|
|
118
|
+
results.push(filePath);
|
|
119
|
+
} else if (isTargetExtension && isAstroInternal) {
|
|
120
|
+
// Optional: Log what we are filtering out for peace of mind
|
|
121
|
+
console.log(`🚫 Filtering out internal Astro script: ${file}`);
|
|
122
|
+
}
|
|
111
123
|
}
|
|
112
124
|
}
|
|
113
125
|
|