create-outsystems-astro 0.8.2 → 0.10.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.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +62 -1
  3. package/integrations/.prettierignore +15 -0
  4. package/integrations/.yarn/releases/yarn-4.15.0.cjs +940 -0
  5. package/integrations/.yarnrc.yml +6 -0
  6. package/integrations/bun.lock +1225 -0
  7. package/integrations/bunfig.toml +3 -0
  8. package/integrations/deno.json +4 -0
  9. package/integrations/deno.lock +3896 -0
  10. package/integrations/eslint.config.mjs +61 -0
  11. package/integrations/html/client.ts +30 -0
  12. package/integrations/html/index.ts +57 -0
  13. package/integrations/html/server.ts +54 -0
  14. package/integrations/package-lock.json +8898 -0
  15. package/integrations/package.json +39 -0
  16. package/integrations/pnpm-lock.yaml +5499 -0
  17. package/integrations/pnpm-workspace.yaml +4 -0
  18. package/integrations/tsconfig.json +15 -0
  19. package/integrations/yarn.lock +6305 -0
  20. package/package.json +3 -1
  21. package/template/.github/workflows/bun-test.yml +127 -0
  22. package/template/.github/workflows/deno-test.yml +127 -0
  23. package/template/.github/workflows/{test.yml → npm-test.yml} +7 -7
  24. package/template/.github/workflows/pnpm-test.yml +158 -0
  25. package/template/.github/workflows/yarn-test.yml +158 -0
  26. package/template/.gitignore +4 -0
  27. package/template/.prettierignore +1 -0
  28. package/template/.yarn/releases/yarn-4.15.0.cjs +940 -0
  29. package/template/.yarnrc.yml +8 -0
  30. package/template/AGENTS.md +46 -1
  31. package/template/README.md +15 -0
  32. package/template/astro.config.mjs +8 -3
  33. package/template/bun.lock +580 -966
  34. package/template/bunfig.toml +3 -0
  35. package/template/deno.json +3 -19
  36. package/template/deno.lock +1416 -1548
  37. package/template/eslint.config.mjs +1 -0
  38. package/template/package-lock.json +7332 -9398
  39. package/template/package.json +69 -93
  40. package/template/patches/@analogjs+astro-angular+2.5.2.patch +26 -0
  41. package/template/pnpm-lock.yaml +2638 -2683
  42. package/template/pnpm-workspace.yaml +11 -6
  43. package/template/src/framework/html/Demo.ts +105 -0
  44. package/template/src/framework/html/Store.ts +47 -0
  45. package/template/src/images/html.png +0 -0
  46. package/template/src/pages/html/html-demo.astro +61 -0
  47. package/template/src/pages/multi/store.astro +3 -1
  48. package/template/src/stores/framework.ts +1 -0
  49. package/template/test/e2e/html/html-demo.spec.ts +36 -0
  50. package/template/test/integration/html/Demo.test.ts +83 -0
  51. package/template/tsconfig.json +1 -1
  52. package/template/vitest.config.ts +9 -0
  53. package/template/yarn.lock +14730 -10574
  54. package/template/patches/@analogjs+astro-angular+2.3.1.patch +0 -13
  55. package/template/patches-deno/playwright+1.58.2.patch +0 -26
  56. /package/template/patches/{@angular+build+21.2.5.patch → @angular+build+21.2.12.patch} +0 -0
package/README.md CHANGED
@@ -178,7 +178,7 @@ All commands are run from the root of the project, from a terminal:
178
178
 
179
179
  | Command | Action |
180
180
  | :------------------------ | :----------------------------------------------- |
181
- | `deno install && deno run postinstall:deno` | Installs dependencies |
181
+ | `deno install && deno run postinstall` | Installs dependencies |
182
182
  | `deno run dev` | Starts local dev server at `localhost:4321` |
183
183
  | `deno run build` | Build distribution to `./dist/` |
184
184
  | `deno run output:deno` | Build OutSystems production site to `./output/` |
package/bin/cli.js CHANGED
@@ -16,6 +16,7 @@ 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" },
@@ -49,8 +50,12 @@ async function main() {
49
50
  console.log("📦 Copying template...");
50
51
  copyDir(templateDir, targetDir);
51
52
 
53
+ buildIntegrations();
54
+
52
55
  const packageManager = packageInstall(targetDir);
53
56
 
57
+ selectWorkflowTestCI(targetDir, packageManager);
58
+
54
59
  let selectedFrameworks = [];
55
60
 
56
61
  while (selectedFrameworks.length === 0) {
@@ -91,6 +96,35 @@ Next steps:
91
96
  `);
92
97
  }
93
98
 
99
+ function buildIntegrations() {
100
+ const integrationsDir = path.join(__dirname, "..", "integrations");
101
+ const packageManager = detectPackageManager();
102
+
103
+ const installCmd = {
104
+ npm: "npm install",
105
+ yarn: "yarn install",
106
+ pnpm: "pnpm install",
107
+ bun: "bun install",
108
+ deno: "deno install",
109
+ unknown: "npm install",
110
+ }[packageManager];
111
+
112
+ const buildCmd = {
113
+ npm: "npm run process",
114
+ yarn: "yarn process",
115
+ pnpm: "pnpm run process",
116
+ bun: "bun run process",
117
+ deno: "deno task process",
118
+ unknown: "npm run process",
119
+ }[packageManager];
120
+
121
+ console.log("📦 Installing integration dependencies...");
122
+ execSync(installCmd, { cwd: integrationsDir, stdio: "inherit" });
123
+
124
+ console.log("🔨 Building integrations...");
125
+ execSync(buildCmd, { cwd: integrationsDir, stdio: "inherit" });
126
+ }
127
+
94
128
  // Simple recursive copy
95
129
  function copyDir(src, dest) {
96
130
  fs.mkdirSync(dest, { recursive: true });
@@ -219,6 +253,10 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
219
253
  import: /import\s+AngularStore\s+from\s+['"].*?angular\/Store\.component['"];?\s*\n?/g,
220
254
  component: /<AngularStore\s+client:load\s*\/>\s*\n?/g
221
255
  },
256
+ html: {
257
+ import: /import\s+HTMLStore\s+from\s+['"].*?html\/Store['"];?\s*\n?/g,
258
+ component: /<HTMLStore\s+client:load\s*\/>\s*\n?/g,
259
+ },
222
260
  preact: {
223
261
  import: /import\s+PreactStore\s+from\s+['"].*?preact\/Store['"];?\s*\n?/g,
224
262
  component: /<PreactStore\s+client:only="preact"\s*\/>\s*\n?/g
@@ -258,6 +296,29 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
258
296
  console.log(`✨ Cleaned up components in ${path.relative(projectDir, pagePath)}`);
259
297
  }
260
298
 
299
+ function selectWorkflowTestCI(projectDir, packageManager) {
300
+ const workflowDir = path.join(projectDir, '.github', 'workflows');
301
+ if (!fs.existsSync(workflowDir)) return;
302
+
303
+ const allPMs = ['npm', 'yarn', 'pnpm', 'bun', 'deno'];
304
+ const activePM = allPMs.includes(packageManager) ? packageManager : 'npm';
305
+
306
+ for (const pm of allPMs) {
307
+ if (pm === activePM) continue;
308
+ const file = path.join(workflowDir, `${pm}-test.yml`);
309
+ if (fs.existsSync(file)) {
310
+ fs.rmSync(file, { force: true });
311
+ }
312
+ }
313
+
314
+ const src = path.join(workflowDir, `${activePM}-test.yml`);
315
+ const dest = path.join(workflowDir, 'test.yml');
316
+ if (fs.existsSync(src)) {
317
+ fs.renameSync(src, dest);
318
+ console.log(`✅ Added .github/workflows/test.yml for ${activePM}`);
319
+ }
320
+ }
321
+
261
322
  function detectPackageManager() {
262
323
  if (typeof Deno !== "undefined") return "deno";
263
324
 
@@ -298,7 +359,7 @@ function packageInstall(targetDir) {
298
359
 
299
360
  const installCmd = {
300
361
  npm: "npm install",
301
- yarn: "yarn",
362
+ yarn: "yarn install",
302
363
  pnpm: "pnpm install",
303
364
  bun: "bun install",
304
365
  deno: "deno install && deno run postinsall:deno",
@@ -0,0 +1,15 @@
1
+ .github/
2
+ .integrations/
3
+ .prettierrc
4
+ bun.lock
5
+ deno.json
6
+ deno.lock
7
+ dist/
8
+ node_modules/
9
+ output/
10
+ package-lock.json
11
+ package.json
12
+ patches/
13
+ pnpm-lock.yaml
14
+ pnpm-workspace.yaml
15
+ yarn.lock