@mostajs/orm-cli 0.5.15 → 0.5.16

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/mostajs.sh +9 -4
  2. package/package.json +1 -1
package/bin/mostajs.sh CHANGED
@@ -2006,12 +2006,17 @@ action_rep_scaffold_services() {
2006
2006
  };
2007
2007
  add('replicator', 'node services/replicator.mjs');
2008
2008
  add('monitor', 'node services/monitor.mjs');
2009
- // dev:all — only include npm:dev if the project has a 'dev' script
2009
+ // dev:all — ALWAYS recalculate based on whether 'dev' script exists.
2010
+ // Don't keep stale values that reference npm:dev when dev doesn't exist.
2010
2011
  const hasDev = !!pkg.scripts.dev;
2011
- if (hasDev) {
2012
- add('dev:all', 'concurrently --kill-others-on-fail --names next,rep,mon -c blue,magenta,cyan \"npm:dev\" \"npm:replicator\" \"npm:monitor\"');
2012
+ const devAll = hasDev
2013
+ ? 'concurrently --kill-others-on-fail --names next,rep,mon -c blue,magenta,cyan \"npm:dev\" \"npm:replicator\" \"npm:monitor\"'
2014
+ : 'concurrently --kill-others-on-fail --names rep,mon -c magenta,cyan \"npm:replicator\" \"npm:monitor\"';
2015
+ if (pkg.scripts['dev:all'] !== devAll) {
2016
+ pkg.scripts['dev:all'] = devAll;
2017
+ console.log(' ✓ ' + (pkg.scripts['dev:all'] ? 'updated' : 'added') + ' dev:all' + (hasDev ? ' (with npm:dev)' : ' (without npm:dev)'));
2013
2018
  } else {
2014
- add('dev:all', 'concurrently --kill-others-on-fail --names rep,mon -c magenta,cyan \"npm:replicator\" \"npm:monitor\"');
2019
+ console.log('dev:all up-to-date');
2015
2020
  }
2016
2021
  fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n');
2017
2022
  " 2>&1 | sed 's/^/ /'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mostajs/orm-cli",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "description": "Universal CLI to integrate @mostajs/orm into any project — one-shot `mostajs bootstrap` migrates a Prisma project (codemod + deps + schema convert + DDL) to 13 databases with zero code change.",
5
5
  "author": "Dr Hamid MADANI <drmdh@msn.com>",
6
6
  "license": "AGPL-3.0-or-later",