Application package¶
An application package is a ZIP file. Polarion validates its structure during upload, unpacks it, and serves its content.
Layout¶
- com.example.inspector.zip
- com.example.inspector/ the identifier from manifest.json
- manifest.json
- card/ the folder named in a view's rootDirectory; views may share one
- index.html
- assets/
- index-….js
- index-….css
- sidebar/
- index.html
- icon16.png
- icon32.png
- assets/
- …
- server-scripts/ optional
- linked-tree.js
- add-comment.js
- com.example.inspector/ the identifier from manifest.json
Rules that Polarion checks:
- Exactly one top-level folder, and its name must equal the
identifierin the manifest. manifest.jsonmust be directly inside that folder and must be valid JSON.- Every
rootDirectoryreferenced by a view must exist and contain the file named indocument. Several views may name the same folder. - Every
scriptreferenced by an endpoint must exist inserver-scripts/.
A ZIP that puts manifest.json at the root, or that nests the application one level deeper, fails with Application's zip structure is incorrect.
Validation and limits¶
On every upload and update, Polarion checks the ZIP against limits that protect the server. A package that exceeds one of them is rejected as a whole.
| Check | Default limit | Global configuration property |
|---|---|---|
| Directory depth | 10 levels inside the ZIP | polarionapp.directoryDepthLimit |
| Number of entries | 1,000 files and folders | polarionapp.maxNumberOfEntries |
| Size of one entry | 10 MB per file, unpacked | polarionapp.entrySizeLimitMB |
| Total size | 30 MB, unpacked | polarionapp.totalSizeLimitMB |
| Length of an entry name | 128 characters | polarionapp.entryNameLengthLimit |
| Length of the ZIP file name | 64 characters | polarionapp.zipFileNameLengthLimit |
A typical view built with Vite stays far below these limits: the example applications in this guide have 4 to 8 files and about 250 KB unpacked.
To change a limit, set the property in the global configuration:
- Log in as a user with global administration rights.
- Open Global Administration (avatar menu → Global Administration, or the wrench icon).
- Open Configuration Properties at the bottom of the administration navigation.
Add the property to Current Configuration, for example:
polarionapp.totalSizeLimitMB=50Save and reload the browser page.
Allowed file types¶
A package may contain only static web assets and images. Polarion checks the extension and the content type of every file; if one file is not on the list below, the whole package is rejected.
| Category | Extensions | Accepted MIME types |
|---|---|---|
| Web pages | .html, .htm | text/html, application/xhtml+xml, text/plain |
| Stylesheets | .css | text/css, text/plain |
| Scripts | .js | text/javascript, application/javascript, text/plain |
| Data and configuration | .json | application/json, text/x-json, text/plain |
| Raster images | .png | image/png |
.jpg, .jpeg, .jpe | image/jpeg | |
.gif | image/gif | |
.webp | image/webp | |
.ico | image/x-icon | |
| Vector images | .svg | image/svg+xml |
Server scripts are .js files and therefore allowed. Executable and back-end formats such as .java, .py, .php, .sh or .exe are never accepted; this prevents remote code execution through an uploaded package.
Some build outputs are not on the list and have to stay out of the package:
- Source maps (
.map). Inline them into the JavaScript instead, or leave them out; see Local development. - Web fonts (
.woff,.woff2,.ttf). Use system fonts, or load the font from a server outside the package. - Other files that tools place in the build folder, such as
.txtlicense notes or.mdfiles.
The manifest¶
manifest.json has three parts: identity, views and server scripts.
{
"manifestVersion": "1.0",
"identifier": "com.example.inspector",
"title": "Work item inspector",
"description": "Shows details and links of the selected work items.",
"publisherName": "Example Publisher",
"applicationVersion": "1.2.0",
"views": {
"formExtensions": [
{ "identifier": "card", "title": "Inspector", "rootDirectory": "card", "document": "index.html" }
],
"sidebars": [
{ "identifier": "sidebar", "title": "Inspector", "rootDirectory": "sidebar", "document": "index.html",
"menuIcon": "icon16.png", "icon": "icon32.png" }
],
"navigationTopics": []
},
"serverScripts": {
"endpoints": [
{ "urlPath": "linked-tree", "method": "GET", "script": "linked-tree.js" },
{ "urlPath": "add-comment", "method": "POST", "script": "add-comment.js" }
]
}
}
Every field is described in the manifest.json reference.
Identifiers and what they become¶
The application identifier and the view identifiers are combined into several other names. Choosing them well avoids renaming later.
| Name | Built from | Example |
|---|---|---|
| Static file URL | identifier, rootDirectory | /polarion/apps/com.example.inspector/card/index.html |
| View entry URL | identifier, view identifier | /polarion/apps/com.example.inspector/views/card |
Endpoint URL (appEndpoint) | identifier, urlPath | /polarion/apps/com.example.inspector/rest/linked-tree |
Configuration id (applicationView id) | identifier + . + view identifier | com.example.inspector.card |
| Sidebar URL parameter | polarion-application. + configuration id | ?sidebar=polarion-application.com.example.inspector.sidebar |
| Navigation topic URL | project URL + configuration id | /polarion/#/project/test/com.example.inspector.overview |
Recommendations:
- Use reverse-DNS identifiers (
com.company.product). Dots are allowed and conventional; stay with letters, digits, dots and hyphens, because the identifier also appears in URLs. - Keep view identifiers short and descriptive (
card,sidebar,dashboard). Using the same value foridentifierandrootDirectorykeeps the package easy to navigate. - Do not rename an identifier after the application is in use. Polarion treats a changed identifier as a new application; the old one stays installed and every
applicationViewreference must be updated.
Views are static sites¶
A view folder is a self-contained static web site. Polarion does nothing to its content beyond serving it; there is no server-side templating or injection. Consequences:
- All URLs inside the view must be relative (
./assets/x.js,./icon.png). With Vite, setbase: './'. - Several views may share code at build time, but the package must contain the built output for each view in its own folder. Two views that need the same bundle simply contain two copies.
- Only files inside view folders are guaranteed to be served; do not rely on files outside every
rootDirectory. - The entry
documentis usuallyindex.html, but any file name works.
Server scripts folder¶
Scripts in server-scripts/ are not served as static files. They are executed on the server when their endpoint is called. See Your own REST endpoints.
Size and content¶
Keep packages small: a typical React view is a few hundred kilobytes. Large media files belong on a separate server. The limits and the allowed file types are listed in Validation and limits and Allowed file types. Polarion stores the unpacked package itself; nothing is placed in the extensions/ folder and no restart is needed.