Skip to content

Commit 09eb09e

Browse files
committed
Merge pull request #24 from intersystems-ru/develop_tsafin
Small bug-fixes:
2 parents 487d5c2 + 3ec0f90 commit 09eb09e

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

CPM.mac.xml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SHELL
1010
new
1111
#; here goes interactive entry
1212
#; aliases for commands
13+
do init
1314
do ALIASES(.aliases)
1415
for i=1:1 {
1516
set line=$text(ALIASES+i)
@@ -35,8 +36,26 @@ SHELL
3536
3637
do BATCH(command, args...)
3738
}
39+
do fini
3840
quit
3941
42+
#; shell initialization code
43+
init() {
44+
do RegisterAllSourceTypes()
45+
do $$$CpmInstance.Registry.Cache.Update()
46+
}
47+
48+
#; shell finalization code
49+
fini() {
50+
do ##class(CPM.Source.IBase).UnregisterExts()
51+
}
52+
53+
#; register all known metainfo extensions
54+
RegisterAllSourceTypes() {
55+
do ##class(CPM.Source.IBase).UnregisterExts()
56+
do ##class(CPM.Source.IBase).ForEachSuccessor("RegisterExts")
57+
}
58+
4059
ExtractArgs(&line,&command,&args) {
4160
#dim pattern As %String = ##class(%Regex.Matcher).%New("\""([^\""]+)\""|[^ ]+")
4261
@@ -154,14 +173,10 @@ ALIASES(aliases)
154173
}
155174
}
156175
quit
176+
157177
COMMANDS
158178
159-
RegisterAllSourceTypes() {
160-
do ##class(CPM.Source.IBase).UnregisterExts()
161-
do ##class(CPM.Source.IBase).ForEachSuccessor("RegisterExts")
162-
}
163179
INSTALL(packages...) ;;install package
164-
do RegisterAllSourceTypes()
165180
do $$$CpmInstance.Install(packages...)
166181
quit
167182
@@ -259,7 +274,7 @@ IncreaseMajorVersion(version) {
259274
quit $lts(list, ".")
260275
}
261276
262-
EXPORT(args...) ;; prepare to publish - export package(s)
277+
EXPORT(args...) ;;prepare to publish - export package(s)
263278
new (args)
264279
#dim verbose As %Boolean = 0
265280
#dim minor As %Boolean = 0
@@ -297,7 +312,7 @@ SEARCH(terms...) ;;search packages
297312
do $$$CpmInstance.Search(terms...)
298313
quit
299314
300-
LIST(args...) ;;list of installed packages
315+
LIST(args...) ;;list of installed and available packages
301316
new (args)
302317
#dim verbose As %Boolean = 0
303318
#dim local As %Boolean = 1
@@ -323,7 +338,7 @@ LIST(args...) ;;list of installed packages
323338
}
324339
quit
325340
326-
CONFIG(args...) ;; get/set configuration parameters
341+
CONFIG(args...) ;;get/set configuration parameters
327342
new (args)
328343
#dim debug As %Boolean = 0
329344
#dim getOp As %Boolean = 0

CPM/Registry/Cache.cls.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ FIXME - implement proper caching [all/since]</Description>
4646
write "Updating index",!
4747
} else {
4848
set url("path") = $$$GetParam(url, "path", "/-/all/")
49-
write "Building the local index for the first time",!
49+
write !,"Building the local index for the first time",!
5050
}
5151
#dim exception As %Exception.AbstractException
5252
try {
@@ -61,13 +61,7 @@ FIXME - implement proper caching [all/since]</Description>
6161
quit:$data(exception) $$$OK
6262
6363
#dim data As %ZEN.proxyObject
64-
#if 1
6564
set tSC=##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(response.Data,..%ClassName(1),.data,1)
66-
#else
67-
zw response
68-
do response.Data.OutputToDevice()
69-
set tSC=##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(response.Data,,.data)
70-
#endif
7165
$$$ThrowOnError(tSC)
7266
7367
quit $$$OK

CPM/Source/IBase.cls.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ given different handler class will be called)</Description>
110110
kill response
111111
set o = $classmethod($$$PpvExtensions("TGZ"), "%New")
112112
if $isobject(o) {
113-
do o.Open(fileName)
113+
do o.Open(package.Filename)
114114
}
115115
}
116116

0 commit comments

Comments
 (0)