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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fireEvent, render, screen, waitFor } from "@testing-library/vue";
|
|
2
2
|
import { it, vi } from "vitest";
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import Demo from "../../../src/framework/vue/Demo.vue";
|
|
5
5
|
|
|
6
|
-
describe("
|
|
6
|
+
describe("Demo", () => {
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
initialCount: 5,
|
|
9
9
|
showMessage: "mockFunction",
|
|
@@ -40,7 +40,7 @@ describe("Counter", () => {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it("renders the initial count", () => {
|
|
43
|
-
render(
|
|
43
|
+
render(Demo, {
|
|
44
44
|
props: defaultProps,
|
|
45
45
|
slots: {
|
|
46
46
|
default: "<div><p>Test Children</p></div>",
|
|
@@ -51,7 +51,7 @@ describe("Counter", () => {
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
it("renders header slot", () => {
|
|
54
|
-
render(
|
|
54
|
+
render(Demo, {
|
|
55
55
|
props: defaultProps,
|
|
56
56
|
slots: {
|
|
57
57
|
default: "<div><p>Test Children</p></div>",
|
|
@@ -62,7 +62,7 @@ describe("Counter", () => {
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
it("renders default slot content", () => {
|
|
65
|
-
render(
|
|
65
|
+
render(Demo, {
|
|
66
66
|
props: defaultProps,
|
|
67
67
|
slots: {
|
|
68
68
|
default: "<div><p>Test Children</p></div>",
|
|
@@ -73,7 +73,7 @@ describe("Counter", () => {
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
it("increments count when add button is clicked", async () => {
|
|
76
|
-
render(
|
|
76
|
+
render(Demo, {
|
|
77
77
|
props: defaultProps,
|
|
78
78
|
slots: {
|
|
79
79
|
default: "<div><p>Test Children</p></div>",
|
|
@@ -86,7 +86,7 @@ describe("Counter", () => {
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
it("decrements count when subtract button is clicked", async () => {
|
|
89
|
-
render(
|
|
89
|
+
render(Demo, {
|
|
90
90
|
props: defaultProps,
|
|
91
91
|
slots: {
|
|
92
92
|
default: "<div><p>Test Children</p></div>",
|
|
@@ -99,7 +99,7 @@ describe("Counter", () => {
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
it("calls the show message function with the current count", async () => {
|
|
102
|
-
render(
|
|
102
|
+
render(Demo, {
|
|
103
103
|
props: defaultProps,
|
|
104
104
|
slots: {
|
|
105
105
|
default: "<div><p>Test Children</p></div>",
|
|
@@ -113,7 +113,7 @@ describe("Counter", () => {
|
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
it("updates the component when the nanostore value changes", async () => {
|
|
116
|
-
render(
|
|
116
|
+
render(Demo, {
|
|
117
117
|
props: defaultProps,
|
|
118
118
|
slots: {
|
|
119
119
|
default: "<div><p>Test Children</p></div>",
|
package/template/tsconfig.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="vitest" />
|
|
2
2
|
import angular from "@analogjs/vite-plugin-angular";
|
|
3
|
+
import preact from "@preact/preset-vite";
|
|
4
|
+
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
3
5
|
import react from "@vitejs/plugin-react";
|
|
4
6
|
import vue from "@vitejs/plugin-vue";
|
|
5
7
|
import { defineConfig } from "vitest/config";
|
|
6
8
|
|
|
7
|
-
export default defineConfig({
|
|
9
|
+
export default defineConfig(({ mode }) => ({
|
|
8
10
|
test: {
|
|
9
11
|
projects: [
|
|
10
12
|
{
|
|
@@ -19,6 +21,17 @@ export default defineConfig({
|
|
|
19
21
|
setupFiles: ["test/setup-test-env-angular.ts"],
|
|
20
22
|
},
|
|
21
23
|
},
|
|
24
|
+
{
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
|
+
plugins: [preact() as any],
|
|
27
|
+
test: {
|
|
28
|
+
environment: "happy-dom",
|
|
29
|
+
globals: true,
|
|
30
|
+
include: ["test/integration/preact/**/*.test.tsx"],
|
|
31
|
+
name: "preact",
|
|
32
|
+
setupFiles: ["test/setup-test-env.ts"],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
22
35
|
{
|
|
23
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
37
|
plugins: [react() as any],
|
|
@@ -30,6 +43,20 @@ export default defineConfig({
|
|
|
30
43
|
setupFiles: ["test/setup-test-env.ts"],
|
|
31
44
|
},
|
|
32
45
|
},
|
|
46
|
+
{
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
plugins: [svelte() as any],
|
|
49
|
+
resolve: {
|
|
50
|
+
conditions: mode === "test" ? ["browser"] : [],
|
|
51
|
+
},
|
|
52
|
+
test: {
|
|
53
|
+
environment: "happy-dom",
|
|
54
|
+
globals: true,
|
|
55
|
+
include: ["test/integration/svelte/**/*.test.ts"],
|
|
56
|
+
name: "svelte",
|
|
57
|
+
setupFiles: ["test/setup-test-env.ts"],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
33
60
|
{
|
|
34
61
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
62
|
plugins: [vue() as any],
|
|
@@ -53,4 +80,4 @@ export default defineConfig({
|
|
|
53
80
|
],
|
|
54
81
|
reporters: ["default"],
|
|
55
82
|
},
|
|
56
|
-
});
|
|
83
|
+
}));
|