@cybermem/cli 0.6.0 ā 0.6.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.
- package/dist/commands/deploy.js +11 -14
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/deploy.js
CHANGED
|
@@ -86,18 +86,15 @@ async function deploy(options) {
|
|
|
86
86
|
else if (target === 'rpi') {
|
|
87
87
|
const composeFile = path_1.default.join(templateDir, 'docker-compose.yml');
|
|
88
88
|
const internalEnvExample = path_1.default.join(templateDir, 'envs/rpi.example');
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
]);
|
|
99
|
-
sshHost = answers.host;
|
|
100
|
-
}
|
|
89
|
+
const answers = await inquirer_1.default.prompt([
|
|
90
|
+
{
|
|
91
|
+
type: 'input',
|
|
92
|
+
name: 'host',
|
|
93
|
+
message: 'Enter SSH Host (e.g. pi@raspberrypi.local):',
|
|
94
|
+
validate: (input) => input.includes('@') ? true : 'Format must be user@host'
|
|
95
|
+
}
|
|
96
|
+
]);
|
|
97
|
+
const sshHost = answers.host;
|
|
101
98
|
console.log(chalk_1.default.blue(`Remote deploying to ${sshHost}...`));
|
|
102
99
|
// 1. Create remote directory
|
|
103
100
|
await (0, execa_1.default)('ssh', [sshHost, 'mkdir -p ~/.cybermem/data']);
|
|
@@ -211,13 +208,13 @@ async function deploy(options) {
|
|
|
211
208
|
}
|
|
212
209
|
}
|
|
213
210
|
else {
|
|
214
|
-
console.log(chalk_1.default.gray('\nš” For remote access, re-run with: npx @cybermem/
|
|
211
|
+
console.log(chalk_1.default.gray('\nš” For remote access, re-run with: npx @cybermem/cli --rpi --remote-access'));
|
|
215
212
|
}
|
|
216
213
|
}
|
|
217
214
|
else if (target === 'vps') {
|
|
218
215
|
console.log(chalk_1.default.yellow('VPS deployment is similar to RPi.'));
|
|
219
216
|
console.log(chalk_1.default.blue('\nš VPS Deployment Steps:'));
|
|
220
|
-
console.log('1. Run: npx @cybermem/
|
|
217
|
+
console.log('1. Run: npx @cybermem/cli --rpi pi@your-vps-ip');
|
|
221
218
|
console.log('2. For HTTPS, choose one of:');
|
|
222
219
|
console.log(chalk_1.default.gray(' a) Tailscale Funnel: --remote-access flag'));
|
|
223
220
|
console.log(chalk_1.default.gray(' b) Caddy (recommended for public VPS):'));
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const commander_1 = require("commander");
|
|
@@ -15,7 +16,6 @@ program
|
|
|
15
16
|
.description('Deploy CyberMem (Default)')
|
|
16
17
|
.option('--rpi', 'Deploy to Raspberry Pi (default: local)')
|
|
17
18
|
.option('--vps', 'Deploy to VPS/Cloud server')
|
|
18
|
-
.option('-h, --host <host>', 'SSH Host (user@ip) for remote deployment')
|
|
19
19
|
.option('--remote-access', 'Enable Tailscale Funnel for HTTPS remote access')
|
|
20
20
|
.action(deploy_1.deploy);
|
|
21
21
|
program
|