tackl 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/bin/tackl.js +19 -19
  2. package/package.json +1 -1
package/bin/tackl.js CHANGED
@@ -28,19 +28,19 @@ const showBanner = () => {
28
28
  console.log(
29
29
  pc.bold(
30
30
  pc.cyan(`
31
- ╔══════════════════════════════════════════════════════════════╗
32
- ║ ║
33
- ║ ████████╗ █████╗ ██████╗██╗ ██╗██╗ ║
34
- ║ ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██║ ║
35
- ║ ██║ ███████║██║ █████╔╝ ██║ ║
36
- ║ ██║ ██╔══██║██║ ██╔═██╗ ██║ ║
37
- ║ ██║ ██║ ██║╚██████╗██║ ██╗███████╗ ║
38
- ║ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ║
39
- ║ ║
40
- ║ The Ultimate Next.js Starter Kit ║
41
- ║ with Waffl Grid System ║
42
- ║ ║
43
- ╚══════════════════════════════════════════════════════════════╝
31
+ ╔═════════════════════════════════════════════════╗
32
+ ║ ║
33
+ ║ ████████╗ █████╗ ██████╗██╗ ██╗██╗ ║
34
+ ║ ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██║ ║
35
+ ║ ██║ ███████║██║ █████╔╝ ██║ ║
36
+ ║ ██║ ██╔══██║██║ ██╔═██╗ ██║ ║
37
+ ║ ██║ ██║ ██║╚██████╗██║ ██╗███████╗ ║
38
+ ║ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ║
39
+ ║ ║
40
+ ║ The Ultimate Next.js Starter Kit ║
41
+ ║ with Waffl Grid System ║
42
+ ║ ║
43
+ ╚═════════════════════════════════════════════════╝
44
44
  `)
45
45
  )
46
46
  );
@@ -156,12 +156,12 @@ ${pc.bold('Repository:')} https://github.com/12-studio/tackl
156
156
  const res = await fetch(tarUrl);
157
157
  if (!res.ok)
158
158
  throw new Error(`Download failed: ${res.status} ${res.statusText}`);
159
- const out = fs.createWriteStream(tmpTar);
160
- await new Promise((resolve, reject) => {
161
- res.body.pipe(out);
162
- res.body.on('error', reject);
163
- out.on('finish', resolve);
164
- });
159
+
160
+ // Convert response to buffer and write to file
161
+ const arrayBuffer = await res.arrayBuffer();
162
+ const buffer = Buffer.from(arrayBuffer);
163
+ fs.writeFileSync(tmpTar, buffer);
164
+
165
165
  log.ok('Template downloaded successfully!');
166
166
  } catch (e) {
167
167
  log.error(`Download failed: ${e.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tackl",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "The ultimate Next.js starter kit with Waffl Grid system",
5
5
  "type": "module",
6
6
  "bin": {