sandymount 0.0.5 → 0.0.7

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/bin/sandymount.js CHANGED
@@ -11,20 +11,38 @@
11
11
  */
12
12
 
13
13
  import { spawn } from 'child_process';
14
+ import { fileURLToPath } from 'url';
15
+ import { dirname, join } from 'path';
16
+ import { existsSync } from 'fs';
17
+
18
+ const __filename = fileURLToPath(import.meta.url);
19
+ const __dirname = dirname(__filename);
14
20
 
15
21
  const args = process.argv.slice(2);
16
22
  const command = args[0];
17
23
 
18
- const VERSION = '0.0.3';
24
+ const VERSION = '0.0.7';
19
25
  const DEFAULT_PORT = 5420;
20
26
 
21
- function showHelp() {
27
+ function showBanner() {
22
28
  console.log(`
23
- 🏖️ Sandymount v${VERSION}
29
+ ███████╗ █████╗ ███╗ ██╗██████╗
30
+ ██╔════╝██╔══██╗████╗ ██║██╔══██╗
31
+ ███████╗███████║██╔██╗ ██║██║ ██║
32
+ ╚════██║██╔══██║██║╚██╗██║██║ ██║
33
+ ███████║██║ ██║██║ ╚████║██████╔╝
34
+ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝
24
35
 
25
- SAND Stack: Solid + ActivityPub + Nostr + DID
36
+ 🏖️ Sandymount v${VERSION}
37
+
38
+ The SAND Stack: Solid + ActivityPub + Nostr + DID
39
+ Your data. Your identity. Your rules.
40
+ `);
41
+ }
26
42
 
27
- Usage:
43
+ function showHelp() {
44
+ showBanner();
45
+ console.log(`Usage:
28
46
  sandymount [options] Start the server (default)
29
47
  sandymount help Show this help
30
48
  sandymount version Show version
@@ -35,13 +53,13 @@ Options:
35
53
  --no-nostr Disable Nostr relay
36
54
  --no-git Disable Git HTTP backend
37
55
  --idp Enable identity provider
56
+ --activitypub Enable ActivityPub federation
38
57
  --quiet Suppress logs
39
58
 
40
59
  Examples:
41
60
  npx sandymount
42
- sandymount
43
61
  sandymount --port 3000
44
- sand --idp
62
+ sandymount --activitypub --idp
45
63
 
46
64
  Website: https://sandy-mount.com
47
65
  `);
@@ -51,6 +69,25 @@ function showVersion() {
51
69
  console.log(`sandymount v${VERSION}`);
52
70
  }
53
71
 
72
+ function findJss() {
73
+ // Try multiple locations for jss binary
74
+ const locations = [
75
+ // When installed as dependency (nested node_modules)
76
+ join(__dirname, '..', 'node_modules', '.bin', 'jss'),
77
+ // When using npx (hoisted node_modules)
78
+ join(__dirname, '..', '..', '.bin', 'jss'),
79
+ // Alternative hoisted location
80
+ join(__dirname, '..', '..', 'javascript-solid-server', 'bin', 'jss.js'),
81
+ ];
82
+
83
+ for (const loc of locations) {
84
+ if (existsSync(loc)) {
85
+ return loc;
86
+ }
87
+ }
88
+ return null;
89
+ }
90
+
54
91
  function startServer(startArgs) {
55
92
  const jssArgs = ['start'];
56
93
 
@@ -70,22 +107,31 @@ function startServer(startArgs) {
70
107
  // Pass through all other args
71
108
  jssArgs.push(...startArgs);
72
109
 
73
- console.log('');
74
- console.log('🏖️ Starting Sandymount...');
110
+ showBanner();
111
+
112
+ console.log(` Starting server on port ${startArgs.includes('--port') ? startArgs[startArgs.indexOf('--port') + 1] : DEFAULT_PORT}...`);
113
+ console.log(` Data directory: ${startArgs.includes('--root') ? startArgs[startArgs.indexOf('--root') + 1] : './data'}`);
75
114
  console.log('');
76
115
 
77
- const jss = spawn('jss', jssArgs, { stdio: 'inherit' });
116
+ // Find jss binary
117
+ const jssPath = findJss();
118
+
119
+ if (!jssPath) {
120
+ console.error(' ❌ Error: JSS (JavaScript Solid Server) not found.');
121
+ console.error('');
122
+ console.error(' This usually means dependencies were not installed correctly.');
123
+ console.error(' Try installing globally instead:');
124
+ console.error('');
125
+ console.error(' npm install -g sandymount');
126
+ console.error(' sandymount');
127
+ console.error('');
128
+ process.exit(1);
129
+ }
130
+
131
+ const jss = spawn(jssPath, jssArgs, { stdio: 'inherit' });
78
132
 
79
133
  jss.on('error', (err) => {
80
- if (err.code === 'ENOENT') {
81
- console.error('Error: JSS not found.');
82
- console.error('');
83
- console.error('JSS should be installed as a dependency. Try:');
84
- console.error(' npm install -g sandymount');
85
- console.error('');
86
- } else {
87
- console.error('Error:', err.message);
88
- }
134
+ console.error(' ❌ Error:', err.message);
89
135
  process.exit(1);
90
136
  });
91
137
 
package/index.html CHANGED
@@ -76,6 +76,18 @@
76
76
  <a href="#projects" class="btn btn-secondary">Explore Projects</a>
77
77
  <a href="./manifesto.html" class="btn btn-secondary">Read Manifesto</a>
78
78
  </div>
79
+ <div class="quick-install">
80
+ <div class="install-box">
81
+ <code>npx sandymount</code>
82
+ <button class="copy-btn" onclick="copyCommand()" title="Copy to clipboard">
83
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
84
+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
85
+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
86
+ </svg>
87
+ </button>
88
+ </div>
89
+ <span class="install-note">Your own Solid pod in one command</span>
90
+ </div>
79
91
  </header>
80
92
 
81
93
  <!-- Stack Comparison -->
@@ -675,6 +687,15 @@
675
687
  }
676
688
  });
677
689
  });
690
+
691
+ // Copy command to clipboard
692
+ function copyCommand() {
693
+ navigator.clipboard.writeText('npx sandymount').then(() => {
694
+ const btn = document.querySelector('.copy-btn');
695
+ btn.classList.add('copied');
696
+ setTimeout(() => btn.classList.remove('copied'), 1500);
697
+ });
698
+ }
678
699
  </script>
679
700
  </body>
680
701
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandymount",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "SAND Stack: Solid + ActivityPub + Nostr + DID — Personal sovereignty in one command",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -33,6 +33,6 @@
33
33
  },
34
34
  "homepage": "https://sandy-mount.com",
35
35
  "dependencies": {
36
- "javascript-solid-server": "^0.0.64"
36
+ "javascript-solid-server": "^0.0.67"
37
37
  }
38
38
  }
package/styles.css CHANGED
@@ -430,6 +430,64 @@ a:hover { color: var(--accent-cyan); }
430
430
  transform: translateY(-2px);
431
431
  }
432
432
 
433
+ /* Quick Install */
434
+ .quick-install {
435
+ margin-top: 2.5rem;
436
+ display: flex;
437
+ flex-direction: column;
438
+ align-items: center;
439
+ gap: 0.5rem;
440
+ animation: fadeInUp 0.6s ease 0.5s forwards;
441
+ opacity: 0;
442
+ }
443
+
444
+ .install-box {
445
+ display: flex;
446
+ align-items: center;
447
+ background: rgba(124, 58, 237, 0.08);
448
+ border: 1px solid rgba(124, 58, 237, 0.15);
449
+ border-radius: 8px;
450
+ overflow: hidden;
451
+ transition: all 0.2s ease;
452
+ }
453
+
454
+ .install-box:hover {
455
+ border-color: var(--accent);
456
+ }
457
+
458
+ .quick-install code {
459
+ font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
460
+ padding: 0.75rem 1rem 0.75rem 1.25rem;
461
+ font-size: 1rem;
462
+ color: var(--text);
463
+ }
464
+
465
+ .copy-btn {
466
+ background: transparent;
467
+ border: none;
468
+ border-left: 1px solid rgba(124, 58, 237, 0.15);
469
+ padding: 0.75rem 1rem;
470
+ cursor: pointer;
471
+ color: var(--text-muted);
472
+ transition: all 0.2s ease;
473
+ display: flex;
474
+ align-items: center;
475
+ }
476
+
477
+ .copy-btn:hover {
478
+ background: rgba(124, 58, 237, 0.1);
479
+ color: var(--accent);
480
+ }
481
+
482
+ .copy-btn.copied {
483
+ color: var(--accent-green);
484
+ }
485
+
486
+ .install-note {
487
+ font-size: 0.85rem;
488
+ color: var(--text-muted);
489
+ }
490
+
433
491
  /* Section styling */
434
492
  .section {
435
493
  padding: 5rem 2rem;