create-outsystems-astro 0.10.0 → 0.11.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.
- package/bin/cli.js +7 -2
- package/integrations/.yarnrc.yml +28 -0
- package/integrations/bun.lock +80 -52
- package/integrations/deno.json +36 -2
- package/integrations/deno.lock +281 -223
- package/integrations/package-lock.json +345 -227
- package/integrations/package.json +12 -3
- package/integrations/pnpm-lock.yaml +545 -479
- package/integrations/pnpm-workspace.yaml +30 -0
- package/integrations/tsconfig.json +2 -1
- package/integrations/twig/client.ts +34 -0
- package/integrations/twig/index.ts +185 -0
- package/integrations/twig/server.ts +54 -0
- package/integrations/yarn.lock +547 -480
- package/package.json +1 -1
- package/template/.yarnrc.yml +27 -1
- package/template/AGENTS.md +47 -0
- package/template/astro.config.mjs +4 -0
- package/template/bun.lock +1469 -1389
- package/template/deno.json +36 -4
- package/template/deno.lock +737 -637
- package/template/package-lock.json +1569 -4290
- package/template/package.json +43 -41
- package/template/pnpm-lock.yaml +1736 -1894
- package/template/pnpm-workspace.yaml +28 -2
- package/template/src/env.d.ts +6 -0
- package/template/src/framework/twig/Demo.twig +100 -0
- package/template/src/framework/twig/Store.twig +45 -0
- package/template/src/images/twig.png +0 -0
- package/template/src/pages/multi/store.astro +10 -0
- package/template/src/pages/twig/twig-demo.astro +65 -0
- package/template/src/stores/framework.ts +1 -0
- package/template/test/e2e/twig/twig-demo.spec.ts +36 -0
- package/template/test/integration/twig/Demo.test.ts +84 -0
- package/template/vitest.config.ts +9 -0
- package/template/yarn.lock +1296 -1457
- /package/template/patches/{@analogjs+astro-angular+2.5.2.patch → @analogjs+astro-angular+2.6.0.patch} +0 -0
- /package/template/patches/{@angular+build+21.2.12.patch → @angular+build+21.2.14.patch} +0 -0
package/package.json
CHANGED
package/template/.yarnrc.yml
CHANGED
|
@@ -5,4 +5,30 @@ nodeLinker: node-modules
|
|
|
5
5
|
npmMinimalAgeGate: 7d
|
|
6
6
|
yarnPath: .yarn/releases/yarn-4.15.0.cjs
|
|
7
7
|
npmPreapprovedPackages:
|
|
8
|
-
- "
|
|
8
|
+
- "esbuild@0.28.1"
|
|
9
|
+
- "@esbuild/aix-ppc64@0.28.1"
|
|
10
|
+
- "@esbuild/android-arm64@0.28.1"
|
|
11
|
+
- "@esbuild/android-arm@0.28.1"
|
|
12
|
+
- "@esbuild/android-x64@0.28.1"
|
|
13
|
+
- "@esbuild/darwin-arm64@0.28.1"
|
|
14
|
+
- "@esbuild/darwin-x64@0.28.1"
|
|
15
|
+
- "@esbuild/freebsd-arm64@0.28.1"
|
|
16
|
+
- "@esbuild/freebsd-x64@0.28.1"
|
|
17
|
+
- "@esbuild/linux-arm64@0.28.1"
|
|
18
|
+
- "@esbuild/linux-arm@0.28.1"
|
|
19
|
+
- "@esbuild/linux-ia32@0.28.1"
|
|
20
|
+
- "@esbuild/linux-loong64@0.28.1"
|
|
21
|
+
- "@esbuild/linux-mips64el@0.28.1"
|
|
22
|
+
- "@esbuild/linux-ppc64@0.28.1"
|
|
23
|
+
- "@esbuild/linux-riscv64@0.28.1"
|
|
24
|
+
- "@esbuild/linux-s390x@0.28.1"
|
|
25
|
+
- "@esbuild/linux-x64@0.28.1"
|
|
26
|
+
- "@esbuild/netbsd-arm64@0.28.1"
|
|
27
|
+
- "@esbuild/netbsd-x64@0.28.1"
|
|
28
|
+
- "@esbuild/openbsd-arm64@0.28.1"
|
|
29
|
+
- "@esbuild/openbsd-x64@0.28.1"
|
|
30
|
+
- "@esbuild/openharmony-arm64@0.28.1"
|
|
31
|
+
- "@esbuild/sunos-x64@0.28.1"
|
|
32
|
+
- "@esbuild/win32-arm64@0.28.1"
|
|
33
|
+
- "@esbuild/win32-ia32@0.28.1"
|
|
34
|
+
- "@esbuild/win32-x64@0.28.1"
|
package/template/AGENTS.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
- React - Documentation available at https://docs.astro.build/en/guides/integrations-guide/react/
|
|
12
12
|
- SolidJS - Documentation available at https://docs.astro.build/en/guides/integrations-guide/solid-js/
|
|
13
13
|
- Svelte - Documentation availabe at https://docs.astro.build/en/guides/integrations-guide/svelte/
|
|
14
|
+
- Twig - Documentation available at https://hs2323.github.io/create-outsystems-astro/guides/integrations/twig/
|
|
14
15
|
- Vue - Documentation available at https://docs.astro.build/en/guides/integrations-guide/vue/
|
|
15
16
|
- Prefer to use TypeScript when possible.
|
|
16
17
|
|
|
@@ -44,6 +45,7 @@ In OutSystems Developer Cloud, the Islands library is available at https://www.o
|
|
|
44
45
|
- React: `client:only="react"`
|
|
45
46
|
- SolidJS: `client:only="solid-js"`
|
|
46
47
|
- Svelte: `client:only="svelte"`
|
|
48
|
+
- Twig: `client:load`
|
|
47
49
|
- Vue: `client:only="vue"`
|
|
48
50
|
|
|
49
51
|
### Components
|
|
@@ -94,6 +96,10 @@ Angular does not support the use of slots. Any use of slots with Angular should
|
|
|
94
96
|
|
|
95
97
|
The HTML integration does not support the use of slots. Any use of slots with the HTML integration should be discouraged.
|
|
96
98
|
|
|
99
|
+
##### Twig
|
|
100
|
+
|
|
101
|
+
The Twig integration does not support the use of slots. Any use of slots with the Twig integration should be discouraged. Pass content in as props and render it with `{{ }}` instead.
|
|
102
|
+
|
|
97
103
|
##### Preact
|
|
98
104
|
|
|
99
105
|
- In Preact, 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:
|
|
@@ -406,6 +412,47 @@ export default function Counter({}) {
|
|
|
406
412
|
<div>{$nanoStoreValue}</div>
|
|
407
413
|
```
|
|
408
414
|
|
|
415
|
+
#### Twig
|
|
416
|
+
|
|
417
|
+
Like the HTML integration, Twig does not use a Nano Stores binding library. Set up a compatible store on `window.Stores` inside the component's `<script>` tag and subscribe to it directly.
|
|
418
|
+
|
|
419
|
+
```html
|
|
420
|
+
<div class="nanostore-value"></div>
|
|
421
|
+
<script>
|
|
422
|
+
const nanostoreEl = container.querySelector(".nanostore-value");
|
|
423
|
+
|
|
424
|
+
if (!window.Stores) window.Stores = {};
|
|
425
|
+
if (!window.Stores["twigStore"]) {
|
|
426
|
+
let _value = "Test Value";
|
|
427
|
+
const _subs = [];
|
|
428
|
+
window.Stores["twigStore"] = {
|
|
429
|
+
get: function () {
|
|
430
|
+
return _value;
|
|
431
|
+
},
|
|
432
|
+
set: function (v) {
|
|
433
|
+
_value = v;
|
|
434
|
+
_subs.forEach(function (fn) {
|
|
435
|
+
fn(v);
|
|
436
|
+
});
|
|
437
|
+
},
|
|
438
|
+
subscribe: function (fn) {
|
|
439
|
+
fn(_value);
|
|
440
|
+
_subs.push(fn);
|
|
441
|
+
return function () {
|
|
442
|
+
_subs.splice(_subs.indexOf(fn), 1);
|
|
443
|
+
};
|
|
444
|
+
},
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const store = window.Stores["twigStore"];
|
|
449
|
+
nanostoreEl.textContent = store.get();
|
|
450
|
+
store.subscribe(function (value) {
|
|
451
|
+
nanostoreEl.textContent = value;
|
|
452
|
+
});
|
|
453
|
+
</script>
|
|
454
|
+
```
|
|
455
|
+
|
|
409
456
|
#### Vue
|
|
410
457
|
|
|
411
458
|
```vue
|
|
@@ -7,6 +7,7 @@ import svelte from "@astrojs/svelte";
|
|
|
7
7
|
import vue from "@astrojs/vue";
|
|
8
8
|
import { defineConfig } from "astro/config";
|
|
9
9
|
import html from "islands-integrations/html";
|
|
10
|
+
import twig from "islands-integrations/twig";
|
|
10
11
|
|
|
11
12
|
// https://astro.build/config
|
|
12
13
|
export default defineConfig({
|
|
@@ -39,6 +40,9 @@ export default defineConfig({
|
|
|
39
40
|
svelte({
|
|
40
41
|
include: ["src/framework/svelte/*"],
|
|
41
42
|
}),
|
|
43
|
+
twig({
|
|
44
|
+
include: ["src/framework/twig/*"],
|
|
45
|
+
}),
|
|
42
46
|
vue({
|
|
43
47
|
include: ["src/framework/vue/*"],
|
|
44
48
|
}),
|