olly-molly 0.3.20 ā 0.3.22
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/cli.js +9 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -30,6 +30,7 @@ const CLI_OPTIONS = {
|
|
|
30
30
|
reset: { type: 'boolean', default: false },
|
|
31
31
|
'export-db': { type: 'string' },
|
|
32
32
|
'import-db': { type: 'string' },
|
|
33
|
+
'update-only': { type: 'boolean', default: false },
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
// Parse CLI arguments
|
|
@@ -77,6 +78,7 @@ ADVANCED OPTIONS
|
|
|
77
78
|
--reset Reset all app data (with confirmation)
|
|
78
79
|
--export-db <path> Export database to zip file
|
|
79
80
|
--import-db <path> Import database from zip file
|
|
81
|
+
--update-only Download/update only, then exit (don't start server)
|
|
80
82
|
|
|
81
83
|
INFO
|
|
82
84
|
-V, --version Show version and exit
|
|
@@ -642,6 +644,13 @@ async function main() {
|
|
|
642
644
|
execSync('npm run build', { cwd: config.APP_DIR, stdio: 'inherit' });
|
|
643
645
|
}
|
|
644
646
|
|
|
647
|
+
// Exit early if --update-only
|
|
648
|
+
if (args['update-only']) {
|
|
649
|
+
const finalVersion = getLocalVersion(config.APP_DIR);
|
|
650
|
+
console.log(`ā
Update complete (v${finalVersion || 'unknown'}). Exiting without starting server.`);
|
|
651
|
+
process.exit(0);
|
|
652
|
+
}
|
|
653
|
+
|
|
645
654
|
const displayHost = config.HOST === '0.0.0.0' ? 'localhost' : config.HOST;
|
|
646
655
|
console.log(`\nš http://${displayHost}:${config.PORT}\n`);
|
|
647
656
|
|