create-outsystems-astro 0.7.2 → 0.8.1

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 (30) hide show
  1. package/README.md +1 -0
  2. package/bin/cli.js +10 -1
  3. package/package.json +1 -1
  4. package/template/.github/workflows/test.yml +13 -13
  5. package/template/.prettierrc +1 -1
  6. package/template/AGENTS.md +74 -2
  7. package/template/astro.config.mjs +5 -0
  8. package/template/bun.lock +645 -190
  9. package/template/deno.json +1 -17
  10. package/template/deno.lock +902 -461
  11. package/template/eslint.config.mjs +5 -0
  12. package/template/package-lock.json +9370 -5570
  13. package/template/package.json +50 -89
  14. package/template/pnpm-lock.yaml +1627 -740
  15. package/template/src/framework/solid/Demo.tsx +85 -0
  16. package/template/src/framework/solid/Store.tsx +31 -0
  17. package/template/src/images/solid.png +0 -0
  18. package/template/src/pages/multi/store.astro +3 -1
  19. package/template/src/pages/solid/solid-demo.astro +65 -0
  20. package/template/src/stores/framework.ts +1 -0
  21. package/template/test/e2e/solid/solid-demo.spec.ts +42 -0
  22. package/template/test/integration/solid/Demo.test.tsx +90 -0
  23. package/template/vitest.config.ts +12 -0
  24. package/template/yarn.lock +958 -392
  25. /package/template/patches/{@angular+build+21.2.2.patch → @angular+build+21.2.5.patch} +0 -0
  26. /package/template/test/e2e/angular/{angular-counter.spec.ts → angular-demo.spec.ts} +0 -0
  27. /package/template/test/e2e/preact/{preact-counter.spec.ts → preact-demo.spec.ts} +0 -0
  28. /package/template/test/e2e/react/{react-counter.spec.ts → react-demo.spec.ts} +0 -0
  29. /package/template/test/e2e/svelte/{svelte-counter.spec.ts → svelte-demo.spec.ts} +0 -0
  30. /package/template/test/e2e/vue/{vue-counter.spec.ts → vue-demo.spec.ts} +0 -0
package/README.md CHANGED
@@ -15,6 +15,7 @@ Generates [Astro Islands](https://docs.astro.build/en/concepts/islands/) for use
15
15
  - [Angular](https://analogjs.org/docs/packages/astro-angular/overview)
16
16
  - [Preact](https://docs.astro.build/en/guides/integrations-guide/preact/)
17
17
  - [React](https://docs.astro.build/en/guides/integrations-guide/react/)
18
+ - [SolidJS](https://docs.astro.build/en/guides/integrations-guide/solid-js/)
18
19
  - [Svelte](https://docs.astro.build/en/guides/integrations-guide/svelte/)
19
20
  - [Vue](https://docs.astro.build/en/guides/integrations-guide/vue/)
20
21
 
package/bin/cli.js CHANGED
@@ -18,6 +18,7 @@ const FRAMEWORKS = [
18
18
  { title: "Angular", value: "angular" },
19
19
  { title: "Preact", value: "preact" },
20
20
  { title: "React", value: "react" },
21
+ { title: "SolidJS", value: "solid" },
21
22
  { title: "Svelte", value: "svelte" },
22
23
  { title: "Vue", value: "vue" }
23
24
  ];
@@ -167,6 +168,10 @@ function updateAstroConfig(projectDir, selectedFrameworks) {
167
168
  import: /import\s+react\s+from\s+['"]@astrojs\/react['"];\s*\n?/,
168
169
  integration: /react\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
169
170
  },
171
+ solid: {
172
+ import: /import\s+solid\s+from\s+['"]@astrojs\/solid-js['"];\s*\n?/,
173
+ integration: /solid\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
174
+ },
170
175
  svelte: {
171
176
  import: /import\s+svelte\s+from\s+['"]@astrojs\/svelte['"];\s*\n?/,
172
177
  integration: /svelte\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
@@ -212,7 +217,7 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
212
217
  const frameworkMap = {
213
218
  angular: {
214
219
  import: /import\s+AngularStore\s+from\s+['"].*?angular\/Store\.component['"];?\s*\n?/g,
215
- component: /<AngularStore\s+client:visible\s*\/>\s*\n?/g
220
+ component: /<AngularStore\s+client:load\s*\/>\s*\n?/g
216
221
  },
217
222
  preact: {
218
223
  import: /import\s+PreactStore\s+from\s+['"].*?preact\/Store['"];?\s*\n?/g,
@@ -222,6 +227,10 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
222
227
  import: /import\s+ReactStore\s+from\s+['"].*?react\/Store['"];?\s*\n?/g,
223
228
  component: /<ReactStore\s+client:only="react"\s*\/>\s*\n?/g
224
229
  },
230
+ solid: {
231
+ import: /import\s+SolidStore\s+from\s+['"].*?solid\/Store['"];?\s*\n?/g,
232
+ component: /<SolidStore\s+client:only="solid-js"\s*\/>\s*\n?/g
233
+ },
225
234
  svelte: {
226
235
  import: /import\s+SvelteStore\s+from\s+['"].*?svelte\/Store\.svelte['"];?\s*\n?/g,
227
236
  component: /<SvelteStore\s+client:only="svelte"\s*\/>\s*\n?/g
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-outsystems-astro",
3
3
  "type": "module",
4
- "version": "0.7.2",
4
+ "version": "0.8.1",
5
5
  "description": "Create an OutSystems Astro Island project to import as a component into your OutSystems application",
6
6
  "repository": {
7
7
  "type": "git",
@@ -8,7 +8,7 @@ on:
8
8
  - cron: '0 12 * * *'
9
9
 
10
10
  env:
11
- NODE_VERSION: '24.13.0'
11
+ NODE_VERSION: '24.14.1'
12
12
 
13
13
  jobs:
14
14
 
@@ -17,10 +17,10 @@ jobs:
17
17
 
18
18
  steps:
19
19
  - name: Checkout code
20
- uses: actions/checkout@v6.0.1
20
+ uses: actions/checkout@v6.0.2
21
21
 
22
22
  - name: Use Node.js
23
- uses: actions/setup-node@v6.2.0
23
+ uses: actions/setup-node@v6.3.0
24
24
  with:
25
25
  node-version: ${{ env.NODE_VERSION }}
26
26
 
@@ -36,10 +36,10 @@ jobs:
36
36
 
37
37
  steps:
38
38
  - name: Checkout code
39
- uses: actions/checkout@v6.0.1
39
+ uses: actions/checkout@v6.0.2
40
40
 
41
41
  - name: Use Node.js
42
- uses: actions/setup-node@v6.2.0
42
+ uses: actions/setup-node@v6.3.0
43
43
  with:
44
44
  node-version: ${{ env.NODE_VERSION }}
45
45
 
@@ -55,10 +55,10 @@ jobs:
55
55
 
56
56
  steps:
57
57
  - name: Checkout code
58
- uses: actions/checkout@v6.0.1
58
+ uses: actions/checkout@v6.0.2
59
59
 
60
60
  - name: Use Node.js
61
- uses: actions/setup-node@v6.2.0
61
+ uses: actions/setup-node@v6.3.0
62
62
  with:
63
63
  node-version: ${{ env.NODE_VERSION }}
64
64
 
@@ -74,10 +74,10 @@ jobs:
74
74
 
75
75
  steps:
76
76
  - name: Checkout code
77
- uses: actions/checkout@v6.0.1
77
+ uses: actions/checkout@v6.0.2
78
78
 
79
79
  - name: Use Node.js
80
- uses: actions/setup-node@v6.2.0
80
+ uses: actions/setup-node@v6.3.0
81
81
  with:
82
82
  node-version: ${{ env.NODE_VERSION }}
83
83
 
@@ -92,10 +92,10 @@ jobs:
92
92
 
93
93
  steps:
94
94
  - name: Checkout code
95
- uses: actions/checkout@v6.0.1
95
+ uses: actions/checkout@v6.0.2
96
96
 
97
97
  - name: Use Node.js
98
- uses: actions/setup-node@v6.2.0
98
+ uses: actions/setup-node@v6.3.0
99
99
  with:
100
100
  node-version: ${{ env.NODE_VERSION }}
101
101
 
@@ -113,10 +113,10 @@ jobs:
113
113
 
114
114
  steps:
115
115
  - name: Checkout code
116
- uses: actions/checkout@v6.0.1
116
+ uses: actions/checkout@v6.0.2
117
117
 
118
118
  - name: Use Node.js
119
- uses: actions/setup-node@v6.2.0
119
+ uses: actions/setup-node@v6.3.0
120
120
  with:
121
121
  node-version: ${{ env.NODE_VERSION }}
122
122
 
@@ -1,4 +1,4 @@
1
1
  {
2
- "plugins": ["prettier-plugin-svelte"],
2
+ "plugins": ["prettier-plugin-solidity", "prettier-plugin-svelte"],
3
3
  "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
4
4
  }
@@ -8,6 +8,7 @@
8
8
  - Angular - Documentation available at https://analogjs.org/docs/packages/astro-angular/overview
9
9
  - Preact - Documentation available at https://docs.astro.build/en/guides/integrations-guide/preact/
10
10
  - React - Documentation available at https://docs.astro.build/en/guides/integrations-guide/react/
11
+ - SolidJS - Documentation available at https://docs.astro.build/en/guides/integrations-guide/solid-js/
11
12
  - Svelte - Documentation availabe at https://docs.astro.build/en/guides/integrations-guide/svelte/
12
13
  - Vue - Documentation available at https://docs.astro.build/en/guides/integrations-guide/vue/
13
14
  - Prefer to use TypeScript when possible.
@@ -36,9 +37,10 @@ In OutSystems Developer Cloud, the Islands library is available at https://www.o
36
37
 
37
38
  - The files in src/pages/\*.astro are used as a starting point and holds the components for generation. They can be tested by running `npm run dev`. That will show what the component looks like as rendered. The sample example pages are broken out by framework name (src/pages/react, src/pages/vue, etc). This page will house the component(s) entry points.
38
39
  - When importing a component, the component must have the attribute of the client:only= + the framework name.\
39
- - Angular: `client:visible`
40
+ - Angular: `client:load`
40
41
  - Preact: `client:only="preact"`
41
42
  - React: `client:only="react"`
43
+ - SolidJS: `client:only="solid-js"`
42
44
  - Svelte: `client:only="svelte"`
43
45
  - Vue: `client:only="vue"`
44
46
 
@@ -48,6 +50,7 @@ In OutSystems Developer Cloud, the Islands library is available at https://www.o
48
50
  - Angular: src/framework/angular
49
51
  - Preact: src/framework/react
50
52
  - React: src/framework/react
53
+ - SolidJS: src/framework/solid
51
54
  - Svelte: src/framework/svelte
52
55
  - Vue: src/framework/vue
53
56
 
@@ -66,6 +69,12 @@ The framework folder should stay in place as the components will be rendered fro
66
69
  /** @jsxImportSource react */
67
70
  ```
68
71
 
72
+ - SolidJS:
73
+
74
+ ```js
75
+ /** @jsxImportSource solid-js */
76
+ ```
77
+
69
78
  ### Parameters
70
79
 
71
80
  - Parameters are assigned as attributes on the component. Each framework will then handle them as incoming parameters.
@@ -175,6 +184,54 @@ export default function Counter({
175
184
  }
176
185
  ```
177
186
 
187
+ ##### SolidJS
188
+
189
+ - In SolidJS, slots are handled as props. The default slot is the `children` prop. A named slot will have the name of its slot as the parameter. For example, a slot with the following:
190
+
191
+ ```js
192
+ <div slot="header">Header content</div>
193
+ ```
194
+
195
+ will have the parameter named header.
196
+
197
+ - The slots are then rendered using the regular React rendering parameter method. With the following Astro component:
198
+
199
+ ```js
200
+ ---
201
+ import CounterComponent from '../../framework/solid/Counter';
202
+ ---
203
+ <CounterComponent client:only="solid-js">
204
+ <div slot="header">
205
+ Counter Component
206
+ </div>
207
+ <div style="text-align: center;">
208
+ <p>This is content passed into the component.</p>
209
+ </div>
210
+ </CounterComponent>
211
+ ```
212
+
213
+ the slots can be used as:
214
+
215
+ ```js
216
+ export default function Counter({
217
+ children,
218
+ header,
219
+ }: {
220
+ children: JSX.Element;
221
+ header: JSX.Element;
222
+ }) {
223
+
224
+ return (
225
+ <>
226
+ {header}
227
+ <div>
228
+ {children}
229
+ </div>
230
+ </>
231
+ );
232
+ }
233
+ ```
234
+
178
235
  ##### Svelte
179
236
 
180
237
  - In Svelte, slots are handled as by using the <slot /> tag. The default slot is the is just <slot />. A named slot will have the name of its slot as an attribute such as <slot name="header" />. Placement of the slot will determine where the slot will render.
@@ -266,7 +323,22 @@ export default function Counter({}) {
266
323
 
267
324
  ```jsx
268
325
  import { useStore } from "@nanostores/react";
269
- import { useState } from "react";
326
+
327
+ export default function Counter({}) {
328
+ const nanoStoreValue = useStore(window.Stores["MyGreatStore"]);
329
+
330
+ return (
331
+ <>
332
+ <div>{nanoStoreValue}</div>
333
+ </>
334
+ );
335
+ }
336
+ ```
337
+
338
+ #### SolidJS
339
+
340
+ ```jsx
341
+ import { useStore } from "@nanostores/solid";
270
342
 
271
343
  export default function Counter({}) {
272
344
  const nanoStoreValue = useStore(window.Stores["MyGreatStore"]);
@@ -2,6 +2,7 @@
2
2
  import angular from "@analogjs/astro-angular";
3
3
  import preact from "@astrojs/preact";
4
4
  import react from "@astrojs/react";
5
+ import solid from "@astrojs/solid-js";
5
6
  import svelte from "@astrojs/svelte";
6
7
  import vue from "@astrojs/vue";
7
8
  import { defineConfig } from "astro/config";
@@ -26,6 +27,10 @@ export default defineConfig({
26
27
  react({
27
28
  include: ["src/framework/react/*"],
28
29
  }),
30
+ solid({
31
+ devtools: true,
32
+ include: ["src/framework/solid/*"],
33
+ }),
29
34
  svelte({
30
35
  include: ["src/framework/svelte/*"],
31
36
  }),