shin-engine 1.0.3 → 1.0.4
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/ee.js +18 -4
- package/package.json +1 -1
package/bin/ee.js
CHANGED
|
@@ -112,7 +112,13 @@ async function ensureSetup() {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
async function main() {
|
|
115
|
-
if (!cmd
|
|
115
|
+
if (!cmd) {
|
|
116
|
+
log("Usage: shin <command>");
|
|
117
|
+
log("Run 'shin --help' for options");
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (cmd === "start") {
|
|
116
122
|
if (isRunning()) { log("SHIN is already running on port " + PORT); return; }
|
|
117
123
|
const setup = await ensureSetup();
|
|
118
124
|
if (!setup) { process.exit(1); }
|
|
@@ -157,13 +163,21 @@ async function main() {
|
|
|
157
163
|
return;
|
|
158
164
|
}
|
|
159
165
|
|
|
166
|
+
if (cmd === "view") {
|
|
167
|
+
if (!isRunning()) { log("SHIN is not running. Run 'shin start' first."); return; }
|
|
168
|
+
execSync("powershell -Command \"Start-Process 'http://localhost:" + PORT + "'\"", { timeout: 5000 });
|
|
169
|
+
log("Opening SHIN dashboard...");
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
160
173
|
if (cmd === "--help" || cmd === "-h") {
|
|
161
174
|
log("Usage: shin <command>");
|
|
162
175
|
log("");
|
|
163
176
|
log("Commands:");
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
log(" shin start Start the SHIN backend (first run downloads + installs)");
|
|
178
|
+
log(" shin stop Stop the SHIN backend");
|
|
179
|
+
log(" shin status Check if SHIN is running");
|
|
180
|
+
log(" shin view Open the SHIN dashboard in browser");
|
|
167
181
|
return;
|
|
168
182
|
}
|
|
169
183
|
|