create-outsystems-astro 0.9.0 → 0.11.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/bin/cli.js +42 -1
- package/integrations/.prettierignore +15 -0
- package/integrations/.yarn/releases/yarn-4.15.0.cjs +940 -0
- package/integrations/.yarnrc.yml +6 -0
- package/integrations/bun.lock +1250 -0
- package/integrations/bunfig.toml +3 -0
- package/integrations/deno.json +4 -0
- package/integrations/deno.lock +3943 -0
- package/integrations/eslint.config.mjs +61 -0
- package/integrations/html/client.ts +30 -0
- package/integrations/html/index.ts +57 -0
- package/integrations/html/server.ts +54 -0
- package/integrations/package-lock.json +8926 -0
- package/integrations/package.json +42 -0
- package/integrations/pnpm-lock.yaml +5562 -0
- package/integrations/pnpm-workspace.yaml +4 -0
- package/integrations/tsconfig.json +16 -0
- 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 +6375 -0
- package/package.json +3 -1
- package/template/.github/workflows/deno-test.yml +1 -1
- package/template/.github/workflows/npm-test.yml +1 -1
- package/template/.github/workflows/pnpm-test.yml +2 -2
- package/template/.github/workflows/yarn-test.yml +26 -13
- package/template/.gitignore +4 -0
- package/template/.prettierignore +1 -0
- package/template/.yarn/releases/yarn-4.15.0.cjs +940 -0
- package/template/.yarnrc.yml +8 -0
- package/template/AGENTS.md +93 -1
- package/template/README.md +15 -0
- package/template/astro.config.mjs +8 -0
- package/template/bun.lock +281 -367
- package/template/bunfig.toml +3 -0
- package/template/deno.json +3 -11
- package/template/deno.lock +703 -676
- package/template/eslint.config.mjs +1 -0
- package/template/package-lock.json +705 -787
- package/template/package.json +38 -41
- package/template/pnpm-lock.yaml +1126 -1114
- package/template/pnpm-workspace.yaml +5 -0
- package/template/src/env.d.ts +6 -0
- package/template/src/framework/html/Demo.ts +105 -0
- package/template/src/framework/html/Store.ts +47 -0
- package/template/src/framework/twig/Demo.twig +100 -0
- package/template/src/framework/twig/Store.twig +45 -0
- package/template/src/images/html.png +0 -0
- package/template/src/images/twig.png +0 -0
- package/template/src/pages/html/html-demo.astro +61 -0
- package/template/src/pages/multi/store.astro +13 -1
- package/template/src/pages/twig/twig-demo.astro +65 -0
- package/template/src/stores/framework.ts +2 -0
- package/template/test/e2e/html/html-demo.spec.ts +36 -0
- package/template/test/e2e/twig/twig-demo.spec.ts +36 -0
- package/template/test/integration/html/Demo.test.ts +83 -0
- package/template/test/integration/twig/Demo.test.ts +84 -0
- package/template/tsconfig.json +1 -1
- package/template/vitest.config.ts +18 -0
- package/template/yarn.lock +14777 -10350
- /package/template/patches/{@analogjs+astro-angular+2.5.1.patch → @analogjs+astro-angular+2.5.2.patch} +0 -0
- /package/template/patches/{@angular+build+21.2.11.patch → @angular+build+21.2.12.patch} +0 -0
package/bin/cli.js
CHANGED
|
@@ -16,10 +16,12 @@ const __dirname = path.dirname(__filename);
|
|
|
16
16
|
|
|
17
17
|
const FRAMEWORKS = [
|
|
18
18
|
{ title: "Angular", value: "angular" },
|
|
19
|
+
{ title: "HTML", value: "html" },
|
|
19
20
|
{ title: "Preact", value: "preact" },
|
|
20
21
|
{ title: "React", value: "react" },
|
|
21
22
|
{ title: "SolidJS", value: "solid" },
|
|
22
23
|
{ title: "Svelte", value: "svelte" },
|
|
24
|
+
{ title: "Twig", value: "twig" },
|
|
23
25
|
{ title: "Vue", value: "vue" }
|
|
24
26
|
];
|
|
25
27
|
|
|
@@ -42,6 +44,8 @@ async function main() {
|
|
|
42
44
|
initial: "outsystems-astro-app"
|
|
43
45
|
});
|
|
44
46
|
|
|
47
|
+
await buildIntegrations();
|
|
48
|
+
|
|
45
49
|
const targetDir = path.resolve(process.cwd(), response.projectName);
|
|
46
50
|
const templateDir = path.join(__dirname, "..", "template");
|
|
47
51
|
|
|
@@ -93,6 +97,35 @@ Next steps:
|
|
|
93
97
|
`);
|
|
94
98
|
}
|
|
95
99
|
|
|
100
|
+
function buildIntegrations() {
|
|
101
|
+
const integrationsDir = path.join(__dirname, "..", "integrations");
|
|
102
|
+
const packageManager = detectPackageManager();
|
|
103
|
+
|
|
104
|
+
const installCmd = {
|
|
105
|
+
npm: "npm install",
|
|
106
|
+
yarn: "yarn install",
|
|
107
|
+
pnpm: "pnpm install",
|
|
108
|
+
bun: "bun install",
|
|
109
|
+
deno: "deno install",
|
|
110
|
+
unknown: "npm install",
|
|
111
|
+
}[packageManager];
|
|
112
|
+
|
|
113
|
+
const buildCmd = {
|
|
114
|
+
npm: "npm run process",
|
|
115
|
+
yarn: "yarn process",
|
|
116
|
+
pnpm: "pnpm run process",
|
|
117
|
+
bun: "bun run process",
|
|
118
|
+
deno: "deno task process",
|
|
119
|
+
unknown: "npm run process",
|
|
120
|
+
}[packageManager];
|
|
121
|
+
|
|
122
|
+
console.log("📦 Installing integration dependencies...");
|
|
123
|
+
execSync(installCmd, { cwd: integrationsDir, stdio: "inherit" });
|
|
124
|
+
|
|
125
|
+
console.log("🔨 Building integrations...");
|
|
126
|
+
execSync(buildCmd, { cwd: integrationsDir, stdio: "inherit" });
|
|
127
|
+
}
|
|
128
|
+
|
|
96
129
|
// Simple recursive copy
|
|
97
130
|
function copyDir(src, dest) {
|
|
98
131
|
fs.mkdirSync(dest, { recursive: true });
|
|
@@ -221,6 +254,10 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
|
|
|
221
254
|
import: /import\s+AngularStore\s+from\s+['"].*?angular\/Store\.component['"];?\s*\n?/g,
|
|
222
255
|
component: /<AngularStore\s+client:load\s*\/>\s*\n?/g
|
|
223
256
|
},
|
|
257
|
+
html: {
|
|
258
|
+
import: /import\s+HTMLStore\s+from\s+['"].*?html\/Store['"];?\s*\n?/g,
|
|
259
|
+
component: /<HTMLStore\s+client:load\s*\/>\s*\n?/g,
|
|
260
|
+
},
|
|
224
261
|
preact: {
|
|
225
262
|
import: /import\s+PreactStore\s+from\s+['"].*?preact\/Store['"];?\s*\n?/g,
|
|
226
263
|
component: /<PreactStore\s+client:only="preact"\s*\/>\s*\n?/g
|
|
@@ -237,6 +274,10 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
|
|
|
237
274
|
import: /import\s+SvelteStore\s+from\s+['"].*?svelte\/Store\.svelte['"];?\s*\n?/g,
|
|
238
275
|
component: /<SvelteStore\s+client:only="svelte"\s*\/>\s*\n?/g
|
|
239
276
|
},
|
|
277
|
+
twig: {
|
|
278
|
+
import: /import\s+(?:TwigStore\s+from\s+['"].*?twig\/Store\.twig['"]|TwigLogo\s+from\s+['"].*?twig\.png\?url['"]);?\s*\n?/g,
|
|
279
|
+
component: /<TwigStore\b[^>]*\/>\s*\n?/g,
|
|
280
|
+
},
|
|
240
281
|
vue: {
|
|
241
282
|
import: /import\s+VueStore\s+from\s+['"].*?vue\/Store\.vue['"];?\s*\n?/g,
|
|
242
283
|
component: /<VueStore\s+client:only="vue"\s*\/>\s*\n?/g
|
|
@@ -323,7 +364,7 @@ function packageInstall(targetDir) {
|
|
|
323
364
|
|
|
324
365
|
const installCmd = {
|
|
325
366
|
npm: "npm install",
|
|
326
|
-
yarn: "yarn",
|
|
367
|
+
yarn: "yarn install",
|
|
327
368
|
pnpm: "pnpm install",
|
|
328
369
|
bun: "bun install",
|
|
329
370
|
deno: "deno install && deno run postinsall:deno",
|