create-snappy 0.0.10 → 0.0.11

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 +8 -15
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -6,18 +6,10 @@ import path from "path";
6
6
  import { execSync } from "child_process";
7
7
  import prompts from "prompts";
8
8
  import kleur from "kleur";
9
- var SNAPPY_LOGO = `
10
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557
11
- \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D
12
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2554\u255D
13
- \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u255A\u2588\u2588\u2554\u255D
14
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551
15
- \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u255A\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D
16
- `;
17
9
  async function main() {
18
- console.log(kleur.cyan(SNAPPY_LOGO));
19
- console.log(kleur.cyan("\u{1F680} Welcome to SNAPPY Stack v2 (Mission Control)"));
20
- console.log("----------------------------------------------\n");
10
+ console.log(kleur.cyan("create-snappy v0.0.11 by Wicky.ID"));
11
+ console.log(kleur.white("wicky.id/snappy \u2014 hi@wicky.id"));
12
+ console.log("\u2500".repeat(44) + "\n");
21
13
  try {
22
14
  execSync("pnpm --version", { stdio: "ignore" });
23
15
  } catch (err) {
@@ -38,6 +30,7 @@ async function main() {
38
30
  name: "template",
39
31
  message: "Choose a starting template:",
40
32
  choices: [
33
+ { title: "Artist / Karya", value: "artist", description: "Musicians, singers, creatives" },
41
34
  { title: "Portfolio", value: "portfolio", description: "Personal branding & projects" },
42
35
  { title: "Portfolio + Services", value: "portfolio-services", description: "Portfolio with lead capture" },
43
36
  { title: "Institution", value: "institution", description: "Schools, NGOs, Organization" },
@@ -49,7 +42,7 @@ async function main() {
49
42
  type: "password",
50
43
  name: "token",
51
44
  message: "Enter your SNAPPY_TOKEN:",
52
- validate: (value) => value.startsWith("sk_") || "Invalid token format (must start with sk_)"
45
+ validate: (value) => value.startsWith("eyJ") || "Invalid SNAPPY_TOKEN format"
53
46
  },
54
47
  {
55
48
  type: "text",
@@ -96,7 +89,7 @@ async function main() {
96
89
  console.log(kleur.blue(`
97
90
  \u{1F4E6} Cloning [${response.template}] template...`));
98
91
  try {
99
- const cloneUrl = `https://${response.githubToken}@github.com/Snappy-Stack/snappy-template`;
92
+ const cloneUrl = `https://${response.githubToken}@github.com/Snappy-Stack/Snappy_Template`;
100
93
  execSync(`git clone --depth 1 -b ${response.template} ${cloneUrl} "${targetDir}"`, { stdio: "inherit" });
101
94
  fs.rmSync(path.join(targetDir, ".git"), { recursive: true, force: true });
102
95
  const npmrcContent = `//npm.pkg.github.com/:_authToken=${response.githubToken}
@@ -114,7 +107,7 @@ async function main() {
114
107
  }
115
108
  const envContent = `# SNAPPY CMS - Site Configuration
116
109
  SNAPPY_TOKEN="${response.token}"
117
- SNAPPY_URL="https://api.snappycore.com" # Default production API
110
+ SNAPPY_URL="https://core.wicky.id"
118
111
  PUBLIC_LOCALE="${response.locale}"
119
112
  PRIMARY_DOMAIN="${response.domain}"
120
113
  `;
@@ -132,7 +125,7 @@ Next steps:`);
132
125
  console.log(kleur.cyan(` cd ${response.projectName}`));
133
126
  console.log(kleur.cyan(` pnpm install`));
134
127
  console.log(kleur.cyan(` pnpm dev`));
135
- console.log(kleur.white("\nTHERE IS NO MERCY IN PRODUCTION \u{1F479}\n"));
128
+ console.log("\n");
136
129
  }
137
130
  main().catch((err) => {
138
131
  console.error(kleur.red(`
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "create-snappy",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "The official SNAPPY Stack CLI for project initialization.",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "bin": {
8
8
  "create-snappy": "./dist/index.js"
9
9
  },
10
+ "scripts": {
11
+ "build": "tsup src/index.ts --format esm --clean",
12
+ "dev": "tsup src/index.ts --format esm --watch"
13
+ },
10
14
  "keywords": [
11
15
  "snappy",
12
16
  "cms",
@@ -33,9 +37,5 @@
33
37
  "devDependencies": {
34
38
  "tsup": "^8.0.0",
35
39
  "typescript": "^5.0.0"
36
- },
37
- "scripts": {
38
- "build": "tsup src/index.ts --format esm --clean",
39
- "dev": "tsup src/index.ts --format esm --watch"
40
40
  }
41
- }
41
+ }