@mostajs/orm-cli 0.5.8 → 0.5.10

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 +11 -3
  2. package/package.json +1 -1
package/bin/mostajs.sh CHANGED
@@ -2109,14 +2109,22 @@ action_rep_set_routing() {
2109
2109
 
2110
2110
  action_rep_add_rule() {
2111
2111
  local name source target mode colls conflict
2112
- # Pick source/target from known projects
2113
2112
  source=$(_pick_project)
2114
2113
  local src_default="$source"
2115
2114
  name=$(ask "Rule name (short, e.g. 'pg-to-mongo')" "cdc-${src_default}")
2116
2115
  target=$(ask "Target project" "$src_default")
2117
2116
  mode=$(ask "Mode (snapshot | cdc | bidirectional)" "cdc")
2118
- colls=$(ask "Collections (comma-separated)" "users,clients")
2117
+ echo
2118
+ dim " Collections : '*' = all tables of the master DB — resolved LIVE at"
2119
+ dim " each sync tick from the master's table catalogue"
2120
+ dim " (so new tables added later are picked up automatically)."
2121
+ dim " Or : explicit comma-separated list (User,Member,Payment)"
2122
+ colls=$(ask "Collections" "*")
2119
2123
  conflict=$(ask "Conflict resolution (source-wins | target-wins | timestamp)" "source-wins")
2124
+ if [[ "$colls" == "*" ]]; then
2125
+ dim " → '*' stored as-is ; replicator.mjs will introspect the master DB at run-time."
2126
+ fi
2127
+
2120
2128
  _tree_patch "
2121
2129
  tree.rules['$name'] = {
2122
2130
  source: '$source', target: '$target', mode: '$mode',
@@ -2124,7 +2132,7 @@ action_rep_add_rule() {
2124
2132
  conflictResolution: '$conflict',
2125
2133
  enabled: true,
2126
2134
  };
2127
- console.log(' ✓ rule added : $name ($source → $target, mode=$mode)');
2135
+ console.log(' ✓ rule added : $name ($source → $target, mode=$mode, ' + ('$colls'.split(',').length) + ' collections)');
2128
2136
  "
2129
2137
  pause
2130
2138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mostajs/orm-cli",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
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",