nextjs-hackathon-stack 0.1.0 → 0.1.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/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { Command } from "commander";
5
+ import * as p4 from "@clack/prompts";
5
6
 
6
7
  // src/cli.ts
7
8
  import * as p2 from "@clack/prompts";
@@ -102,8 +103,15 @@ async function scaffold(projectName, skipInstall) {
102
103
  spinner2.stop("Git initialized");
103
104
  if (!skipInstall) {
104
105
  spinner2.start("Installing dependencies (this may take a minute)");
105
- execSync("npm install", { cwd: targetDir, stdio: "ignore" });
106
- spinner2.stop("Dependencies installed");
106
+ try {
107
+ execSync("npm install", { cwd: targetDir, stdio: "pipe" });
108
+ spinner2.stop("Dependencies installed");
109
+ } catch (err) {
110
+ spinner2.stop("Failed to install dependencies");
111
+ const stderr = err instanceof Error && "stderr" in err ? err.stderr?.toString() : String(err);
112
+ p3.log.error(stderr || "npm install failed");
113
+ p3.log.info("You can install manually: cd " + projectName + " && npm install");
114
+ }
107
115
  info("Running shadcn/ui init...");
108
116
  try {
109
117
  execSync("npx shadcn@latest init --yes --defaults", {
@@ -145,8 +153,13 @@ async function scaffold(projectName, skipInstall) {
145
153
  // src/index.ts
146
154
  var program = new Command();
147
155
  program.name("nextjs-hackathon-stack").description("Scaffold a full-stack Next.js 15 hackathon starter").version("0.1.0").argument("[project-name]", "Name of the project to create").option("--skip-install", "Skip npm install and shadcn/ui init", false).action(async (projectName, opts) => {
148
- const options = await runCli(projectName, opts.skipInstall);
149
- await scaffold(options.projectName, options.skipInstall);
150
- outro2("Happy hacking! \u{1F680}");
156
+ try {
157
+ const options = await runCli(projectName, opts.skipInstall);
158
+ await scaffold(options.projectName, options.skipInstall);
159
+ outro2("Happy hacking! \u{1F680}");
160
+ } catch (err) {
161
+ p4.cancel(err instanceof Error ? err.message : "Something went wrong");
162
+ process.exit(1);
163
+ }
151
164
  });
152
165
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextjs-hackathon-stack",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Scaffold a full-stack Next.js hackathon starter",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,11 +21,11 @@
21
21
  "dependencies": {
22
22
  "next": "^15",
23
23
  "@supabase/supabase-js": "^2",
24
- "@supabase/ssr": "^0",
25
- "drizzle-orm": "^0.45",
24
+ "@supabase/ssr": "^0.6",
25
+ "drizzle-orm": "^0.44",
26
26
  "drizzle-zod": "^0.7",
27
27
  "@tanstack/react-query": "^5",
28
- "ai": "^4",
28
+ "ai": "^4.3",
29
29
  "@ai-sdk/react": "^1",
30
30
  "react-hook-form": "^7",
31
31
  "@hookform/resolvers": "^3",
@@ -40,11 +40,11 @@
40
40
  "@types/react-dom": "^19",
41
41
  "drizzle-kit": "^0.30",
42
42
  "vitest": "^3",
43
- "@vitejs/plugin-react": "latest",
43
+ "@vitejs/plugin-react": "^4",
44
44
  "@testing-library/react": "^16",
45
- "@testing-library/jest-dom": "latest",
46
- "@testing-library/user-event": "latest",
47
- "@vitest/coverage-v8": "latest",
45
+ "@testing-library/jest-dom": "^6",
46
+ "@testing-library/user-event": "^14",
47
+ "@vitest/coverage-v8": "^3",
48
48
  "@playwright/test": "^1.49",
49
49
  "tailwindcss": "^4",
50
50
  "@tailwindcss/postcss": "^4",
@@ -53,10 +53,10 @@
53
53
  "@eslint/js": "^9",
54
54
  "typescript-eslint": "^8",
55
55
  "@next/eslint-plugin-next": "^15",
56
- "eslint-plugin-react": "latest",
57
- "eslint-plugin-react-hooks": "latest",
58
- "eslint-plugin-import-x": "latest",
59
- "eslint-plugin-vitest": "latest",
60
- "eslint-plugin-playwright": "latest"
56
+ "eslint-plugin-react": "^7",
57
+ "eslint-plugin-react-hooks": "^5",
58
+ "eslint-plugin-import-x": "^4",
59
+ "eslint-plugin-vitest": "^0.5",
60
+ "eslint-plugin-playwright": "^2"
61
61
  }
62
62
  }