Migration tool for software projects
You can move folders and components depending of what you need. Check the Command description for instructions.
$ npm install -g migrar
$ migrar COMMAND
running command...
$ migrar (-v|--version|version)
migrar/3.8.8 darwin-x64 node-v16.13.1
$ migrar --help [COMMAND]
USAGE
$ migrar COMMAND
...
migrar controller TO
migrar extensions FROM TO
migrar fix TO NAME
migrar form FROM TO NAME
migrar help [COMMAND]
migrar many FROM TO FORMS
migrar modules FROM TO
migrar property FROM TO
Fix javascript file
USAGE
$ migrar controller TO
ARGUMENTS
TO Controller path to fix
DESCRIPTION
use the absolute path to the file
See code: src/commands/controller.js
Move whole extensions folder from one project to another
USAGE
$ migrar extensions FROM TO
ARGUMENTS
FROM Base project path
TO Destination project path
OPTIONS
-p, --epath=epath [default: mvcextensions] MVC Extensions relative path
See code: src/commands/extensions.js
Fix an app component. Use -t to specify the type of component
USAGE
$ migrar fix TO NAME
ARGUMENTS
TO Destination project workspace path
NAME Form Name
OPTIONS
-c, --cpath=cpath [default: controllers] Controllers library path
-e, --epath=epath [default: modules/require] Controllers extension path
-f, --fpath=fpath (required) [default: forms] Forms path
-h, --channel=channel [default: mobile] Platform channel
-l, --ctrl=ctrl [default: Controller] Controllers suffix
-m, --module=module [default: AuthModule] Module name
-o, --apath=apath (required) [default: studioactions] Studio Actions path
-s, --suffix=suffix [default: BB] Project suffix identifier
-t, --type=controller|action|form [default: form] Component type to fix
DESCRIPTION
Type can be:
- action
- form
- controller
See code: src/commands/fix.js
Move a form from old source and paste it in the new workspace as extension
USAGE
$ migrar form FROM TO NAME
ARGUMENTS
FROM Base project workspace path
TO Destination project workspace path
NAME Form Name
OPTIONS
-a, --actions=actions [default: Actions] Actions suffix
-c, --cpath=cpath [default: controllers] Forms library path
-e, --epath=epath [default: modules/require] Controllers extension path
-f, --fpath=fpath [default: forms] Forms library path
-g, --mconfig=mconfig [default: Config/ModuleConfig.json] Module config relative path
-h, --channel=channel [default: mobile] Platform channel
-l, --ctrl=ctrl [default: Controller] Controllers suffix
-m, --mname=mname (required) Module name
-o, --opath=opath (required) [default: ~/Visualizer/] Old project workspace path
-p, --mpath=mpath [default: mvcextensions] MVC Extensions path
-r, --format=format [default: .sm] Folder format suffix
-s, --suffix=suffix [default: BB] Project suffix identifier
-x, --xform Fix migrated form
DESCRIPTION
...
Please make sure the destination workspace is in a clean git state
See code: src/commands/form.js
display help for migrar
USAGE
$ migrar help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Describe the command here
USAGE
$ migrar many FROM TO FORMS
ARGUMENTS
FROM Base project workspace path
TO Destination project workspace path
FORMS file with forms data [{"name": "formName", "module": "ModuleName"}, ...]
OPTIONS
-o, --opath=opath (required) Old project workspace path
DESCRIPTION
...
Extra documentation goes here
See code: src/commands/many.js
Move whole modules folder from one project to another
USAGE
$ migrar modules FROM TO
ARGUMENTS
FROM Base project path
TO Destination project path
OPTIONS
-p, --mpath=mpath [default: modules] Modules relative path
See code: src/commands/modules.js
Move actions defined in project properties file
USAGE
$ migrar property FROM TO
ARGUMENTS
FROM Old project workspace path
TO Destination project workspace path
OPTIONS
-f, --fileName=fileName [default: projectProperties.json] Application Property file name
-h, --channel=channel [default: mobile] Platform channel
-n, --property=property [default: ide_appEvents] Application Property name to migrate
-p, --apath=apath [default: studioactions] Studio Actions path
-r, --format=format [default: .json] Files format suffix
See code: src/commands/property.js