zapm


Downloads9
Follow
2
Star
4
Details
Releases
Reviews
Screenshots
Issues
This application is not supported by InterSystems Corporation. Use it at your own risk.

What's new in this version

fixed install directory for durable

zapm

Gitter

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.

Installation with ZPM

If ZPM the current instance is not installed, then in one line you can install the latest version of ZPM.

set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name) set url="https://pm.community.intersystems.com/packages/zpm/latest/installer" Do ##class(%Net.URLParser).Parse(url,.comp) set ht = ##class(%Net.HttpRequest).%New(), ht.Server = comp("host"), ht.Port = 443, ht.Https=1, ht.SSLConfiguration=name, st=ht.Get(comp("path")) quit:'st $System.Status.GetErrorText(st) set xml=##class(%File).TempFilename("xml"), tFile = ##class(%Stream.FileBinary).%New(), tFile.Filename = xml do tFile.CopyFromAndSave(ht.HttpResponse.Data) do ht.%Close(), $system.OBJ.Load(xml,"ck") do ##class(%File).Delete(xml)

If ZPM is installed, then ZAPM can be set with the command

zpm:USER>install zapm

Installation with Docker

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

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

How to Test it

Open IRIS terminal:

$ docker-compose exec iris iris session iris
USER>
USER>zapm "cmd"

Command extensions zpm.

help - coloring command description

load <https...git-repo> - loading the module directly from the git-repository

show modules with context by repository URL

Additional commands.

Commands for working with databases and namespaces:

dbcreate - create a database with %DB resources ans namespace and interoperability mapping.

USER>zapm "dbcreate testdb3 -p d:/!/database/durable"

dbdelete - delete a database with %DB resources ans namespace.

USER>zapm "dbdelete testdb3"

cmd - list of possible additional commands

hist - list of executed commands

newdb -creating a database with a scope and installing the module there

To add a new command to the zapm shell, use the ##class(%ZAPM.ext.zapp).addcmd For example, let's execute sequentially

  • create a database with the area and install the zpmshow module there
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

  • add a new command named zshow, which should be executed immediately.
do ##class(%ZAPM.ext.zapp).addcmd("new $namespace zn ""zpmshow"" do ^zpmshow", "zpm", "i", "zshow", "Show a zpm modules with extention description")
added

  • check the execution of the new command from the system shell USER>zapm "zshow"
  • or from the zapm shell

This solution can replace not only the zpm shell but also the main terminal shell. For me it almost happened ;-)

ZPM installation
zpm "install zapm"
Rating
0 (0)
Category
Solutions
Works with
InterSystems IRISInterSystems IRIS for Health
Tags
Info
Version
1.0.10
Last updated
2021-02-22
Repository
Open
Documentation
Open
License
Link