coconuts 1.0.47 → 1.0.48

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.js +10 -14
  2. package/package.json +5 -6
package/bin.js CHANGED
@@ -12,17 +12,15 @@ const __dirname = dirname(__filename);
12
12
  const [,, command, ...args] = process.argv;
13
13
 
14
14
  if (command === 'serve') {
15
- console.log('šŸš€ Starting GAIT web interface...');
15
+ console.log('šŸļø Starting Coconut...');
16
16
 
17
17
  // Set environment variables
18
18
  const currentDir = process.cwd();
19
- console.log(`šŸ—‚ļø Serving data from: ${currentDir}/.gait`);
20
19
  process.env.GAIT_DATA_PATH = currentDir;
21
20
 
22
- // Check if .gait directory exists
23
- if (!fs.existsSync(join(currentDir, '.gait'))) {
24
- console.error('āŒ Error: GAIT is not initialized in this directory.');
25
- console.error(' Run "nut init" to initialize GAIT.');
21
+ // Check if .nut directory exists
22
+ if (!fs.existsSync(join(currentDir, '.nut'))) {
23
+ console.error('āš ļø Coconut is not initialized in this directory. Run "nut init" to initialize.');
26
24
  process.exit(1);
27
25
  }
28
26
 
@@ -35,8 +33,6 @@ if (command === 'serve') {
35
33
  // Dynamic import to avoid issues with ES modules
36
34
  const { startServer } = await import('@lovelybunch/api');
37
35
 
38
- console.log(`šŸ” Starting server on port ${port}...`);
39
-
40
36
  // Start the Hono API server with static frontend
41
37
  const server = await startServer({
42
38
  port: parseInt(port),
@@ -44,32 +40,33 @@ if (command === 'serve') {
44
40
  });
45
41
 
46
42
  const url = `http://${host}:${port}`;
47
- console.log(`šŸ“± Web interface running at ${url}`);
43
+ console.log(`🄄 Coconut ready at ${url}`);
48
44
 
49
45
  // Open browser automatically
50
46
  setTimeout(() => {
51
47
  const openCommand = process.platform === 'darwin' ? 'open' :
52
48
  process.platform === 'win32' ? 'start' : 'xdg-open';
53
49
  spawn(openCommand, [url], { detached: true, stdio: 'ignore' });
54
- console.log(`🌐 Opening browser at ${url}`);
50
+ console.log('🌐 Opening in your browser...');
55
51
  }, 1000);
56
52
 
57
53
  // Handle graceful shutdown
58
54
  process.on('SIGINT', () => {
59
- console.log('\nšŸ›‘ Shutting down GAIT web interface...');
55
+ console.log('\n🌊 Shutting down Coconut...');
60
56
  server.close(() => {
61
57
  process.exit(0);
62
58
  });
63
59
  });
64
60
 
65
61
  process.on('SIGTERM', () => {
62
+ console.log('\n🌊 Shutting down Coconut...');
66
63
  server.close(() => {
67
64
  process.exit(0);
68
65
  });
69
66
  });
70
67
 
71
68
  } catch (error) {
72
- console.error('āŒ Failed to start GAIT web interface:', error);
69
+ console.error(`šŸ›‘ Failed to start Coconut: ${error?.message ?? error}`);
73
70
  process.exit(0);
74
71
  }
75
72
 
@@ -78,8 +75,7 @@ if (command === 'serve') {
78
75
  try {
79
76
  await import('@lovelybunch/cli');
80
77
  } catch (error) {
81
- console.error('āŒ Failed to load CLI:', error);
82
- console.error(' Make sure @lovelybunch/cli is built and available.');
78
+ console.error(`šŸ›‘ Failed to load Coconut CLI: ${error?.message ?? error}`);
83
79
  process.exit(1);
84
80
  }
85
81
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "coconuts",
3
- "version": "1.0.47",
4
- "description": "Command-line interface wrapper for Coconut",
3
+ "version": "1.0.48",
4
+ "description": "The Coconut CLI",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "nut": "./bin.js"
@@ -12,21 +12,20 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git+https://github.com/bluer/gait.git"
15
+ "url": "git+https://github.com/lovelybunch/coconut.git"
16
16
  },
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@lovelybunch/api": "^1.0.47",
22
- "@lovelybunch/cli": "^1.0.47"
21
+ "@lovelybunch/api": "^1.0.48",
22
+ "@lovelybunch/cli": "^1.0.48"
23
23
  },
24
24
  "engines": {
25
25
  "node": ">=18.0.0"
26
26
  },
27
27
  "keywords": [
28
28
  "cli",
29
- "gait",
30
29
  "coconut",
31
30
  "command-line"
32
31
  ],