Skip to content

Commit 6c53e0b

Browse files
committed
support for deployed packages
1 parent 2f25571 commit 6c53e0b

File tree

7 files changed

+400
-195
lines changed

7 files changed

+400
-195
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"Swagger spec": "http://${host}:${port}/registry/_spec",
1414
"All Packages": "http://${host}:${port}/registry/packages/-/all"
1515
},
16-
"server": "registry"
1716
},
1817
"objectscript.export": {
1918
"folder": "src",

SQLPriv.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
<Grantor>_SYSTEM</Grantor>
99
<Grantable>0</Grantable>
1010
</SQLPrivileges>
11+
<SQLPrivileges>
12+
<Namespace>REGISTRY</Namespace>
13+
<SQLObject>1,ZPM.DeployedPackage</SQLObject>
14+
<Privilege>s</Privilege>
15+
<Grantee>_PUBLIC</Grantee>
16+
<Grantor>_SYSTEM</Grantor>
17+
<Grantable>0</Grantable>
18+
</SQLPrivileges>
1119
<SQLPrivileges>
1220
<Namespace>REGISTRY</Namespace>
1321
<SQLObject>1,ZPM.Package_dependencies</SQLObject>

src/cls/ZPM/DeployedPackage.cls

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Class ZPM.DeployedPackage Extends (%Persistent, ZPM.Package)
2+
{
3+
4+
Property platformVersion As %String(%JSONFIELDNAME = "platform_version");
5+
6+
Index NameVersionPlatform On (name, version, platformVersion) [ IdKey, Unique ];
7+
8+
Method filepathGet() As %String [ CodeMode = expression ]
9+
{
10+
..name _ "/" _ ..platformVersion
11+
}
12+
13+
Property platformVersions As list Of %String(%JSONINCLUDE = "NONE") [ Transient ];
14+
15+
Storage Default
16+
{
17+
<Data name="DeployedPackageDefaultData">
18+
<Value name="1">
19+
<Value>%%CLASSNAME</Value>
20+
</Value>
21+
<Value name="2">
22+
<Value>package</Value>
23+
</Value>
24+
<Value name="3">
25+
<Value>size</Value>
26+
</Value>
27+
<Value name="4">
28+
<Value>manifest</Value>
29+
</Value>
30+
<Value name="5">
31+
<Value>hash</Value>
32+
</Value>
33+
<Value name="6">
34+
<Value>owner</Value>
35+
</Value>
36+
<Value name="7">
37+
<Value>description</Value>
38+
</Value>
39+
<Value name="8">
40+
<Value>keywords</Value>
41+
</Value>
42+
<Value name="9">
43+
<Value>license</Value>
44+
</Value>
45+
<Value name="10">
46+
<Value>homePage</Value>
47+
</Value>
48+
<Value name="11">
49+
<Value>repository</Value>
50+
</Value>
51+
<Value name="12">
52+
<Value>installer</Value>
53+
</Value>
54+
<Value name="13">
55+
<Value>versionMajor</Value>
56+
</Value>
57+
<Value name="14">
58+
<Value>versionMinor</Value>
59+
</Value>
60+
<Value name="15">
61+
<Value>versionPatch</Value>
62+
</Value>
63+
<Value name="16">
64+
<Value>versionPrerelease</Value>
65+
</Value>
66+
<Value name="17">
67+
<Value>versionBuildmetadata</Value>
68+
</Value>
69+
<Value name="18">
70+
<Value>publishTS</Value>
71+
</Value>
72+
<Value name="19">
73+
<Value>UpLink</Value>
74+
</Value>
75+
<Value name="20">
76+
<Value>deployed</Value>
77+
</Value>
78+
</Data>
79+
<Data name="dependencies">
80+
<Attribute>dependencies</Attribute>
81+
<Structure>subnode</Structure>
82+
<Subscript>"dependencies"</Subscript>
83+
</Data>
84+
<DataLocation>^ZPM.DeployedPackageD</DataLocation>
85+
<DefaultData>DeployedPackageDefaultData</DefaultData>
86+
<IdLocation>^ZPM.DeployedPackageD</IdLocation>
87+
<IndexLocation>^ZPM.DeployedPackageI</IndexLocation>
88+
<StreamLocation>^ZPM.DeployedPackageS</StreamLocation>
89+
<Type>%Storage.Persistent</Type>
90+
}
91+
92+
}

0 commit comments

Comments
 (0)