create-seamless 0.0.1-beta.0 → 0.0.1-beta.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/index.js +15 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,18 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
  import { execSync } from "child_process";
3
- import path from "path";
4
3
 
5
- const project = process.argv[2] || "seamlessauth-app";
4
+ const project = process.argv[2] || "demo-app";
6
5
 
7
6
  console.log(`šŸš€ Creating project: ${project}...\n`);
8
7
 
9
- execSync(`npx degit seamlessauth/nextjs-starter ${project}`, {
8
+ // Step 1: Clone the starter template
9
+ execSync(`npx degit seamless-auth-starter-react ${project}`, {
10
10
  stdio: "inherit",
11
11
  });
12
12
 
13
+ // Step 2: Generate HTTPS certs for Vite
14
+ console.log(`\nšŸ”’ Generating HTTPS certificates...\n`);
15
+ const certDir = path.join(process.cwd(), project, ".cert");
16
+ if (!fs.existsSync(certDir)) {
17
+ fs.mkdirSync(certDir);
18
+ }
19
+ const pems = selfsigned.generate(null, { days: 365 });
20
+ fs.writeFileSync(path.join(certDir, "cert.pem"), pems.cert);
21
+ fs.writeFileSync(path.join(certDir, "key.pem"), pems.private);
22
+
13
23
  console.log(`
14
24
  āœ… Done!
15
25
  → cd ${project}
16
26
  → npm install
17
27
  → npm run dev
28
+
29
+ šŸ’” Note: The browser may ask you to trust the certificate the first time.
18
30
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-seamless",
3
- "version": "0.0.1-beta.0",
3
+ "version": "0.0.1-beta.1",
4
4
  "description": "The starter script for Seamless Auth + AI",
5
5
  "homepage": "https://github.com/fells-code/create-seamless#readme",
6
6
  "bugs": {