added support OEX repos to pick command
ZAPM is a shell - extends the ZPM shell and adds any other commands.
Working in the terminal I got tired of going from my shell to the zpm shell and back.
My shell was supplied with additional specific commands and I decided to merge the two shells.
The ZAPM checks if the command entered is a ZPM command, then sends the execution to the ZPM shell.
Then I wanted to improve the color commands and expand the functionality.
And now ZAPM has survived to the first version and can add any command that I need and remember it so that I can re-execute it.
Added command: pick
This is an analogue of the find
and install
command for viewing and loading packages from alternative sources directly from the repositories.
If the current ZPM instance is not installed, then in one line you can install the latest version of ZPM even with a proxy.
s r=##class(%Net.HttpRequest).%New(),proxy=$System.Util.GetEnviron("https_proxy") Do ##class(%Net.URLParser).Parse(proxy,.pr) s:$G(pr("host"))'="" r.ProxyHTTPS=1,r.ProxyTunnel=1,r.ProxyPort=pr("port"),r.ProxyServer=pr("host") s:$G(pr("username"))'=""&&($G(pr("password"))'="") r.ProxyAuthorization="Basic "_$system.Encryption.Base64Encode(pr("username")_":"_pr("password")) set r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c") zn "%SYS" zpm "install zapm"
Or install native from repo latest betta version
s r=##class(%Net.HttpRequest).%New(),proxy=$System.Util.GetEnviron("https_proxy") Do ##class(%Net.URLParser).Parse(proxy,.pr) s:$G(pr("host"))'="" r.ProxyHTTPS=1,r.ProxyTunnel=1,r.ProxyPort=pr("port"),r.ProxyServer=pr("host") s:$G(pr("username"))'=""&&($G(pr("password"))'="") r.ProxyAuthorization="Basic "_$system.Encryption.Base64Encode(pr("username")_":"_pr("password")) set r.Server="github.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/intersystems-community/zpm/releases/download/v0.4.1-beta.9/zpm-0.4.1-beta.9.xml"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
If ZPM is installed, then ZAPM can be set with the command
zpm:USER>install zapm
or install native fpom repo with latest version
zpm:USER>install https://github.com/SergeyMi37/zapm
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
$ git clone https://github.com/SergeyMi37/zapm.git
Open the terminal in this directory and run:
$ docker-compose build
Run the IRIS container with your project:
$ docker-compose up -d
Open IRIS terminal:
$ docker-compose exec iris iris session iris
USER>
USER>zapm "cmd"
Commands for working with databases and namespaces:
USER>zapm "dbcreate testdb3 -p d:/!/database/durable"
USER>zapm "dbdelete testdb3"
To add a new command to the zapm shell, use the ##class(%ZAPM.ext.zapp).addcmd
For example, let’s execute sequentially
hp-msw>IRISZPM>USER> newdb zpmshow
Creating Database zpmshow... done!
Creating Namespace zpmshow... done!
Creating Interoperability mappings ... done!
Adding Interoperability SQL privileges ... done!
Creating CSP Application ... done!zpm "install zpmshow"
[zpmshow] Reload START
[zpmshow] Reload SUCCESS
[zpmshow] Module object refreshed.
[zpmshow] Validate START
[zpmshow] Validate SUCCESS
[zpmshow] Compile START
[zpmshow] Compile SUCCESS
[zpmshow] Activate START
[zpmshow] Configure START
[zpmshow] Configure SUCCESS
[zpmshow] Activate SUCCESS
do ##class(%ZAPM.ext.zapp).addcmd("new $namespace zn ""zpmshow"" do ^zpmshow", "zpm", "i", "zshow", "Show a zpm modules with extention description")
added
Added commands: Working with Products and Tasks, start and stop in all namespaces.
interoperability Alias: prod Group work with all Products, info status, start and stop.
prod list
Show all namespaces and productions.prod only
Show only productions.prod save
Save the current status for subsequent recovery after the start. Those products that worked will work, and those that did not work will not.prod stop
Remember the current state of all products, and then stop everythingprod start
start all products
prod recover
Recover all products
task
Group work with all custom tasks, info status, suspend and resume.task list
View all tasks and their statuses.task save
Save the current status for subsequent recovery after the start. Those tasks that worked will work, and those that did not work will not.task stop
Suspend all users tasks.
task start
Resume all users tasks.
This solution can replace not only the zpm shell but also the main terminal shell.
For me it almost happened ;-)
added support OEX repos to pick command
added support oex-mapping
project
fixed list
command extension
changed info
command
changed pick
command
fix production methods
fix repo extension
fix delete db
fix pick extension
add curl extention
fix publish ext
fix help extention
Fixed module file
fixed init method
Add support IRIS 2023
Added command: pick
This is an analogue of the find
and install
command for viewing and loading packages from alternative sources directly from the repositories.
Added commands: Working with Products and Tasks, start and stop in all namespaces.
interoperability
Alias: prod
Group work with all Products, info status, start and stop.
prod list
Show all namespaces and productions.
prod only
Show only productions.
prod save
Save the current status for subsequent recovery after the start. Those products that worked will work, and those that did not work will not.
prod stop
Remember the current state of all products, and then stop everything
prod start
start all products
prod recover
Recover all products
task
Group work with all custom tasks, info status, suspend and resume.
task list
View all tasks and their statuses.
task save
Save the current status for subsequent recovery after the start. Those tasks that worked will work, and those that did not work will not.
task stop
Suspend all users tasks.
task start
Resume all users tasks.
Added command:prod list
, prod stop
, prod start
, help prod
. Working with Products, start and stop in all namespaces.
fix prod list
command
fix code
fixed quality code
upd readme
fixed GetListModules
added ShowLog
module
fixed LoadRegistry module
fixed test and upd command
added extensions newdb command
added proxy mode
added demo in GCR
upd dockerfile
added zpipe from Robert Cemper into %ZLANGC00
Fixed repo field
Updated escape sequence color scheme
Added support zpm+hspm version
fixed iris.script
fixed init method
fixed support editors
Added preload.
added support editors
Added preload.
Added command:
upg
Update the versions of modules installed in the current namespace.
info
Show more complete information about modules in the current namespace.
info -m module
Show file module.xml.
info -f module
List file in repository.
info -r module
Show file readme.md.
Added command:
upg
Update the versions of modules installed in the current namespace.
info
Show more complete information about modules in the current namespace.
info -m module
Show file module.xml.
info -f module
List file in repository.
info -r module
Show file readme.md.
cmd -init
Reload all commands. Run do ##class(%ZAPM.ext.zapp).init()
hist
Alias: ??
Show all history.
hist
Show all history including context.
hist -
Show all history including context. Sorting by date
hist +
Show all history including context. Reverse sorting by date
hist -del Number_day
Delete all history older than the number of days.
hist -add Number_hist
Added history in list for non-removable.
hist -add Number_hist [name_cmd] [a/i/n] description
Added history in list commans.
updated module
Added command: upgrade
Update the versions of modules installed in the current namespace.
added command extension repo
fixed install directory for durable
Added support in the "load" command for loading the repository archive by Http Request.
added filter for command line
fixed mistake
updated module
updated sources
changed description
fixed dockerfile
update description
Initial Release