@smi-digital/create-smi-app 2.4.1 → 2.4.3

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/dist/index.js CHANGED
@@ -424,7 +424,7 @@ async function runStep(label, task) {
424
424
  throw error;
425
425
  }
426
426
  }
427
- async function runCommandQuiet(command, args, cwd) {
427
+ async function runCommandQuiet2(command, args, cwd) {
428
428
  await new Promise((resolve, reject) => {
429
429
  let stderr = "";
430
430
  const child = spawn(command, args, {
@@ -464,7 +464,7 @@ async function createFrameworkApp(projectRoot, target) {
464
464
  }
465
465
  await runStep(
466
466
  `Creating ${generator.displayName} ${target.label}`,
467
- async () => runCommandQuiet(
467
+ async () => runCommandQuiet2(
468
468
  generator.command,
469
469
  generator.getArgs(target.directory),
470
470
  projectRoot
@@ -597,6 +597,20 @@ async function createIntegrations(options, projectRoot, templatesDir) {
597
597
  await applySequentially(index + 1);
598
598
  };
599
599
  await applySequentially(0);
600
+ await runStep("Configuring Astro SSR Adapter", async () => {
601
+ try {
602
+ const frontendDir = join5(projectRoot, "frontend");
603
+ await runCommandQuiet("npx", ["astro", "add", "node", "-y"], frontendDir);
604
+ const astroConfigPath = join5(frontendDir, "astro.config.mjs");
605
+ let astroConfig = await readFile4(astroConfigPath, "utf8");
606
+ astroConfig = astroConfig.replace(
607
+ "export default defineConfig({",
608
+ "export default defineConfig({\n output: 'server',"
609
+ );
610
+ await writeFile3(astroConfigPath, astroConfig);
611
+ } catch {
612
+ }
613
+ });
600
614
  }
601
615
 
602
616
  // src/modules/createScaffold.ts
@@ -646,7 +660,7 @@ async function initializeGitRepository(projectRoot) {
646
660
  } catch {
647
661
  }
648
662
  try {
649
- await runCommandQuiet("git", ["init"], projectRoot);
663
+ await runCommandQuiet2("git", ["init"], projectRoot);
650
664
  } catch {
651
665
  console.warn(
652
666
  "Git is not available. Husky hooks will activate after running git init."
@@ -683,7 +697,7 @@ async function createScaffold(options, targetDir, templatesDir) {
683
697
  if (options.tools.includes("basic")) {
684
698
  await runStep(
685
699
  "Installing root dependencies",
686
- async () => runCommandQuiet("npm", ["install"], projectRoot)
700
+ async () => runCommandQuiet2("npm", ["install"], projectRoot)
687
701
  );
688
702
  }
689
703
  console.log(accent2(`\u25C6 Project scaffolded at ${projectRoot}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smi-digital/create-smi-app",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -5,7 +5,7 @@
5
5
 
6
6
  FROM node:24-alpine
7
7
  # Installing libvips-dev for sharp Compatibility
8
- RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev > /dev/null 2>&1
8
+ RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev curl > /dev/null 2>&1
9
9
  ARG NODE_ENV=production
10
10
  ENV NODE_ENV=${NODE_ENV}
11
11
 
@@ -12,7 +12,7 @@ services:
12
12
  networks:
13
13
  - agency_shared_network
14
14
  healthcheck:
15
- test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:1337/admin"]
15
+ test: ["CMD", "curl", "-f", "http://localhost:1337/admin"]
16
16
  interval: 10s
17
17
  timeout: 5s
18
18
  retries: 15