File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
- FROM containers.intersystems.com/intersystems/iris-community:2022.2.0.270 .0
1
+ FROM containers.intersystems.com/intersystems/iris-community:2022.2.0.281 .0
2
2
3
3
WORKDIR /opt/registry
4
4
Original file line number Diff line number Diff line change 1
- Class ZPM .Package Extends (%Persistent , ZPM . JSON .Adaptor )
1
+ Class ZPM .Package Extends (%Persistent , % JSON .Adaptor )
2
2
{
3
3
4
4
Parameter EXTENTQUERYSPEC = " name,version" ;
5
5
6
+ Parameter %JSONIGNOREINVALIDFIELD As BOOLEAN = 1 ;
7
+
6
8
Property name As %String (MAXLEN = 50 ) [ Required ];
7
9
8
10
Index Name On name ;
@@ -29,7 +31,7 @@ Index Repository On repository;
29
31
30
32
Property dependencies As array Of %String ;
31
33
32
- Property package As %Stream .GlobalBinary (%JSONINCLUDE = " INPUTONLY " );
34
+ Property package As %Stream .GlobalBinary (%JSONINCLUDE = " NONE " );
33
35
34
36
Property size As %Integer (%JSONINCLUDE = " OUTPUTONLY" );
35
37
@@ -74,6 +76,17 @@ Method sizeGet() As %Integer
74
76
return ..package .Size
75
77
}
76
78
79
+ Method packageFromBase64 (base64 As %Stream .DynamicBinary ) As %Status
80
+ {
81
+ set sc = $$$OK
82
+ Set ..package = ##class (%Stream.GlobalBinary ).%New ()
83
+ while 'base64 .AtEnd {
84
+ Set tSC = ..package .Write ($system .Encryption .Base64Decode (base64 .Read (43540 , .sc )))
85
+ Set :$$$ISERR(tSC ) sc = $$$ADDSC(sc ,tSC )
86
+ }
87
+ Quit sc
88
+ }
89
+
77
90
ClassMethod GetPackageHash (pStream As %Stream .Object ) As %String
78
91
{
79
92
If (pStream =" " ) { Return " " }
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ ClassMethod PublishPackage() As %Status
186
186
187
187
set package = ##class (ZPM.Package ).%New ()
188
188
$$$ThrowOnError(package .%JSONImport (%request .Content ))
189
+ $$$ThrowOnError(package .packageFromBase64 (%request .Content .%Get (" package" ,," stream" )))
189
190
$$$ThrowOnError(package .UpdateDescriptionFromManifest ())
190
191
do ##class (ZPM.Package ).DeleteExistingPackages (package .name , package .version )
191
192
$$$ThrowOnError(package .%Save ())
You can’t perform that action at this time.
0 commit comments