@justin0713/opspilot 1.0.1 → 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/opspilot.js +10 -10
  2. package/package.json +1 -1
package/bin/opspilot.js CHANGED
@@ -100,21 +100,21 @@ function cmdStart(flags) {
100
100
  checkDocker();
101
101
 
102
102
  const cfg = loadConfig();
103
- const token = flags.token || cfg.token || '';
104
- const url = flags['cloud-url'] || cfg.cloudUrl || 'https://teams.codetop.net';
105
- const port = flags.port || cfg.port || '5000';
106
- const data = flags['data-dir'] || cfg.dataDir || 'opspilot-data';
103
+ const token = flags.token || cfg.token || '';
104
+ const url = flags['cloud-url'] || cfg.cloudUrl || '';
105
+ const port = flags.port || cfg.port || '5000';
106
+ const data = flags['data-dir'] || cfg.dataDir || 'opspilot-data';
107
107
 
108
108
  if (!token) {
109
109
  die(
110
- 'License token required.\n' +
110
+ 'License token is required.\n' +
111
111
  ' opspilot start --token <your-license-token>\n' +
112
- ' Get a token at: https://teams.codetop.net/dashboard'
112
+ ' Get a token: log in to OpsPilot Cloud → Dashboard → License Tokens → Generate'
113
113
  );
114
114
  }
115
115
 
116
116
  // Persist for next run
117
- saveConfig({ token, cloudUrl: url, port, dataDir: data });
117
+ saveConfig({ token, cloudUrl: url || 'https://teams.codetop.net', port, dataDir: data });
118
118
 
119
119
  // Stop existing container if running
120
120
  const existing = tryRun(`docker inspect -f "{{.State.Status}}" ${CONTAINER} 2>/dev/null`);
@@ -132,14 +132,14 @@ function cmdStart(flags) {
132
132
 
133
133
  // Volume arg: named volume or host path
134
134
  const isAbsolute = path.isAbsolute(data);
135
- const volArg = isAbsolute ? `${data}:/app/data` : `${data}:/app/data`;
135
+ const volArg = `${data}:/app/data`;
136
136
 
137
137
  log(`Starting OpsPilot Local on port ${port} ...`);
138
138
  run(
139
139
  `docker run -d ` +
140
140
  `--name ${CONTAINER} ` +
141
141
  `-p ${port}:5000 ` +
142
- `-e OPSPILOT_CLOUD_URL=${url} ` +
142
+ `-e OPSPILOT_CLOUD_URL=${url || 'https://teams.codetop.net'} ` +
143
143
  `-e OPSPILOT_CLOUD_TOKEN=${token} ` +
144
144
  `-e OPSPILOT_PORT=5000 ` +
145
145
  `-v ${volArg} ` +
@@ -232,7 +232,7 @@ ${BOLD}Commands:${RESET}
232
232
  ${CYAN}config${RESET} Show saved local config
233
233
 
234
234
  ${BOLD}Start options:${RESET}
235
- --token <token> License token from OpsPilot Cloud ${YELLOW}(required on first run)${RESET}
235
+ --token <token> License token from OpsPilot Cloud ${YELLOW}(required)${RESET}
236
236
  --cloud-url <url> Cloud server URL [default: https://teams.codetop.net]
237
237
  --port <port> Local port [default: 5000]
238
238
  --data-dir <path> Host data path or Docker volume name [default: opspilot-data]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justin0713/opspilot",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "CLI installer for OpsPilot Local — self-hosted SSH operations platform",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/Albert0977/ShellShare#readme",