create-chanom-app 0.4.0 → 0.4.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 (2) hide show
  1. package/dist/index.js +9 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -280,11 +280,11 @@ const depVersions = {
280
280
  "lint-staged": "17.0.8",
281
281
  "@commitlint/cli": "21.2.0",
282
282
  "@commitlint/config-conventional": "21.2.0",
283
- "@chanom/dev-config": "0.0.3",
283
+ "@chanom/dev-config": "0.0.4",
284
284
  "@chanom/vite-config": "0.1.1"
285
285
  };
286
286
  /** This package's own version, for `--version`. */
287
- const pkgVersion = "0.4.0";
287
+ const pkgVersion = "0.4.1";
288
288
  //#endregion
289
289
  //#region src/domain/args.ts
290
290
  const PACKAGE_MANAGERS = [
@@ -806,9 +806,13 @@ const installDependencies = Effect.fn("scaffold.installDependencies")(function*
806
806
  const prompter = yield* Prompter;
807
807
  const runner = yield* CommandRunner;
808
808
  const s = yield* prompter.spinner(`Installing dependencies with ${plan.pm}...`);
809
- if ((yield* runner.execInherit(plan.pm, ["install"], plan.targetDir).pipe(Effect.tapError(() => s.stop(pc.red("Dependency installation failed"))))) !== 0) {
809
+ const result = yield* runner.capture(plan.pm, ["install"], plan.targetDir).pipe(Effect.tapError(() => s.stop(pc.red("Dependency installation failed"))));
810
+ if (result.exitCode !== 0) {
810
811
  yield* s.stop(pc.red("Dependency installation failed"));
811
- return yield* new InstallFailed({ pm: plan.pm });
812
+ return yield* new InstallFailed({
813
+ pm: plan.pm,
814
+ output: [result.stdout, result.stderr].filter(Boolean).join("\n")
815
+ });
812
816
  }
813
817
  yield* s.stop("Dependencies installed");
814
818
  });
@@ -962,7 +966,7 @@ const run = (argv, cwd, options) => {
962
966
  return program$1(argv, cwd, options).pipe(Effect.catchTags({
963
967
  Cancelled: () => Effect.succeed(0),
964
968
  TargetNotEmpty: (e) => reportError(`${e.directory} is not empty. Aborting.`),
965
- InstallFailed: (e) => reportError(`Dependency installation with ${e.pm} failed.`)
969
+ InstallFailed: (e) => reportError([`Dependency installation with ${e.pm} failed.`, e.output].filter(Boolean).join("\n"))
966
970
  }), Effect.catchAll((e) => reportError(`Unexpected error: ${e.message}`)), Logger.withMinimumLogLevel(debug ? LogLevel.Debug : LogLevel.Info));
967
971
  };
968
972
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-chanom-app",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Scaffold a Vite + React + TypeScript app, wired to the chanom shared configs.",
5
5
  "keywords": [
6
6
  "create",
@@ -42,7 +42,7 @@
42
42
  "tsdown": "0.22.3",
43
43
  "typescript": "6.0.3",
44
44
  "vitest": "3.2.6",
45
- "@chanom/dev-config": "0.0.3",
45
+ "@chanom/dev-config": "0.0.4",
46
46
  "@chanom/internal": "0.0.0"
47
47
  },
48
48
  "scripts": {