Coder Social home page Coder Social logo

exist-db / packagemanager Goto Github PK

View Code? Open in Web Editor NEW
2.0 17.0 4.0 5.3 MB

Browse local and remote packages, install, upload or remove packages.

License: GNU Lesser General Public License v2.1

HTML 95.04% XQuery 3.59% JavaScript 1.05% CSS 0.32%
exist-db packagemanager xar webcomponents polymer2

packagemanager's People

Contributors

adamretter avatar dizzzz avatar duncdrum avatar joewiz avatar line-o avatar windauer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

packagemanager's Issues

Connection issue to public-repo

PackageManager on localhost shows installed packages but 0 available packages.

It should show everything from exist-db.org's public repo. There are no connection issues to the public repo as the old package-manager shows the correct number of available apps and updates

There are no errors reported in the exist.log, but console on FF shows 1 error and one deprecation warning

[Deprecation] The “vaadin-valo-styles” (previously named “vaadin-valo-theme”) package is deprecated. Please migrate to the “vaadin-lumo-styles” package. See  https://github.com/vaadin/vaadin-valo-styles/blob/master/README.md  for more information. index.html:236:1


TypeError: h is not iterable index.html:198:5231

Safari is a bit more expressive with 3 errors.

[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (remote, line 0)
[Error] Unhandled Promise Rejection: TypeError: undefined is not a function
	(anonymous function) (index.html:198:83384)
	promiseReactionJob
[Error] Failed to load resource: the server responded with a status of 404 (Document /db/apps/packagemanager/webcomponents-lite.js.map not found) (webcomponents-lite.js.map, line 0)

screen shot 2018-04-05 at 11 06 36

Tested on macOS with latest FF/Chrome/Safari.
exist 4.0.0
PackageManager 4.5.0
PackageService 1.3.0

Packagemanager does not show installed libraries by default

Tested on: eXist 5.2.0 on Ubuntu 10.19 in most recent Firefox

Describe the bug

The package manager has a panel that displays installed packages. Only Applications are shown by default. For the libraries, they have to be made visible by the user through a rather well hidden button in the upper right corner

Expected behavior

I would expect all packages to be visible by default as with the old package manager. If that is not possible clearly label the button that makes the libraries visible!

To Reproduce

Open the package manager and look for installed libraries.

Package Manager: File "cannot be stored" (when contains Unicode?)

I ran into this error when I tried to upload an app I made to a new eXist install.

What is the problem

When I try to upload the .xar archive via the Package Manager, everything works except it won't store just one certain file.

After some testing, I narrowed the culprit in that file to an em dash (—) inside of a comment.

When the em dash is there, I get the error; when there's no em dash, no error.

image

Here's the part of the file in question. (Scroll over to see the em dash.)

    <!-- This block replaces the `email_addr` atribute of the Email element with the given email. -->
    <xsl:template match="/Message/Email/@email_addr">
        <!-- The name attribute is required, so we just specify the same name as before. `name()` uses the same name the attribute had previously—we don't want to change the attribute name, just its value. -->
        <xsl:attribute name="{name()}"> 
            <xsl:value-of select="$emailReplacement"/>
        </xsl:attribute>
    </xsl:template>

I think this is the line that throws the exception: https://github.com/eXist-db/exist/blob/1095e49769c5edfefdde022678e65755d5f00e8c/exist-core/src/main/java/org/exist/repo/Deployment.java#L807

Here's the important section of exist.log when the error is thrown.

What did you expect

I expected any unicode symbol to be valid XML, since XML's default encoding is UTF-8, but maybe it's not related to unicode at all. I checked the XSL file against various validators, and it appears to be well-formed.

Describe how to reproduce or add a test

Try to upload this package with an em dash (with the file that has an em dash)
Notice the error. ("Deployment incomplete, 1 issues found: replace-email.xsl: replace-email.xsl cannot be stored")
Try to upload this package without an em dash (everything the same, but no em dash)
Notice that everything is stored as expected.

Context information

  • eXist-db version + Git Revision hash: eXist 5.0.0 5a27d10ba1710c1df751344b53ac6e4cb4778e3b 20190902160649
  • Java version: "1.8.0_221"
  • Operating system: Windows 7 Professional
  • 64 bit
  • How is eXist-db installed? JAR installer
  • Any custom changes in e.g. conf.xml? None

Suggestions for naming of repo and app

  1. Remove the existdb- prefix, which is redundant now that the repository belongs to the eXist-db organization. (If a package is for eXist and only pertains to eXist, the prefix is redundant, e.g., documentation, demo do not have the prefix. The only time exist- or existdb- should be considered be used is when a package is an eXist-specific implementation of or service for another piece of software, such as atom-existdb or exist-domts; even so, by virtue of a repository belonging to the eXist-db organization, the prefix can be omitted, e.g., mvn-repo. These prefixes and names also pollute the listing of the public-repo; this app should be under "P" not "E".)
  2. Change the "abbreviated" name to "package-manager" (or "packages"), because merging these two words together without punctuation is hard to read.

The changes would result in the following:

  1. Repo name: package-manager
  2. repo.xml
  • <description>Package Manager</description>
  • <website>https://github.com/eXist-db/package-manager</website>
  • <target>package-manager</target>
  1. expath-pkg.xml
  • name="http://exist-db.org/apps/package-manager"
  • abbrev="package-manager"
  • <title>Package Manager</title>

I would suggest the same for the Packageservice:

  • existdb-packageservice --> package-service
  • existdb Packageservice --> Package Service

I would also suggest the same for the Usermanager:

  • usermanager --> user-manager
  • Usermanager --> User Manager

packagemanager raises error for `-SNAPSHOT`

trying to install a dev-version of my app into a new exist with package manager 4.0.5 now raises the following error both on screen and in the exist.log

ERROR (Deploy.java [installAndDeployFromDb]:215) - Invalid SemVer pattern '0.1-SNAPSHOT': second part is not a number 
org.expath.pkg.repo.PackageException: Invalid SemVer pattern '0.1-SNAPSHOT': second part is not a number
	at org.expath.pkg.repo.deps.Semver.parseError(Semver.java:214) ~[pkg-java-fork.jar:?]
	at org.expath.pkg.repo.deps.Semver.parse(Semver.java:189) ~[pkg-java-fork.jar:?]
	at org.expath.pkg.repo.deps.Semver.<init>(Semver.java:37) ~[pkg-java-fork.jar:?]
…

since SNAPSHOT is standard for maven I'd say this is a bug, and it should accept SNAPSHOT as part of the server

Reduce logging

A lot of redundant logs appear in exist.log while running the package manager:

2019-05-05 14:12:47,788 [qtp1906335777-102] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: guest 
2019-05-05 14:12:47,790 [qtp1906335777-84] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: admin 
2019-05-05 14:12:47,871 [qtp1906335777-84] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: admin 
2019-05-05 14:12:54,583 [qtp1906335777-103] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: admin 
2019-05-05 14:12:54,665 [qtp1906335777-103] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: admin 
2019-05-05 14:13:09,401 [qtp1906335777-87] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: guest 
2019-05-05 14:13:14,360 [qtp1906335777-84] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: admin 
2019-05-05 14:13:14,418 [qtp1906335777-84] INFO  (LogFunction.java [writeLog]:214) - (Line: 115 /db/apps/packageservice/modules/packages.xqm) user: admin 

it would be nice to reduce this a bit?

Packages installed from "Available" list don't show in "Installed" list

I hope this is the right place for this issue.

In the PackageManager, when I install packages from the Available list, they don't show in the Installed list, even after refresh, logging out and in, etc. They are however removed from the Available list.

E.g., I installed the JSON serializer but it isn't visible in this list (see screenshot).

Running 5.0.0-SNAPSHOT in docker.

Screenshot_2019-04-03 existdb-dashboard

[BUG] package manager reports successful installation despite packageservice installation error

Screenshot 2020-10-11 at 00 13 27

10 Oct 2020 22:25:10,786 [qtp1497538476-26] INFO (Deploy.java [load]:298) - Retrieving package from https://exist-db.org/exist/apps/public-repo/modules/find.xql?name=https%3A%2F%2Fwww.duncdrum.eu%2Fapps%2FcrossRepo&processor=5.3.0-SNAPSHOT&version=1.0.0

10 Oct 2020 22:25:11,271 [qtp1497538476-26] ERROR (Deploy.java [installAndDeploy]:215) - Failed to install dependency from https://exist-db.org/exist/apps/public-repo/modules/find.xql?name=https%3A%2F%2Fwww.duncdrum.eu%2Fapps%2FcrossRepo&processor=5.3.0-SNAPSHOT&version=1.0.0: https://exist-db.org/exist/apps/public-repo/modules/find.xql?name=https%3A%2F%2Fwww.duncdrum.eu%2Fapps%2FcrossRepo&processor=5.3.0-SNAPSHOT&version=1.0.0

java.io.IOException: Failed to install dependency from https://exist-db.org/exist/apps/public-repo/modules/find.xql?name=https%3A%2F%2Fwww.duncdrum.eu%2Fapps%2FcrossRepo&processor=5.3.0-SNAPSHOT&version=1.0.0: https://exist-db.org/exist/apps/public-repo/modules/find.xql?name=https%3A%2F%2Fwww.duncdrum.eu%2Fapps%2FcrossRepo&processor=5.3.0-SNAPSHOT&version=1.0.0

at org.exist.xquery.modules.expathrepo.Deploy$RepoPackageLoader.load(Deploy.java:314) ~[exist.uber.jar:5.3.0-SNAPSHOT]

at … 

no packages were installed
See eXist-db/existdb-packageservice#17

expected behavior

package manager should only report success, when packages are installed successfully.
Maybe two unit tests for successful and failed installs are in order.

package manager struggling with dependencies

what is the problem?

When users have installed an application called app that depends on the app-lib (think tei-publisher, or anything depending on shared-resources) updates can break installation in the following way:

  • app 1.0 depends on app-lib 1.0
  • app 1.1 depends on app-lib 1.1

Packemanager shows two new updates: One to app, one to app-lib.
If users attempt to update app first, the process fails silently, since the requested app 1.1 dependency on app-lib 1.1 is at this point not fulfilled. app can no longer be reached from dashboard.

what did I expect

When first installing apps, dependencies are automatically resolved and installed. I d expect the same behavior for updates.

The old package manager displays installation errors in a pop-up warning, the new one should do something similar. Silent failures are never a good thing.

to reproduce

  • make sure tei-publisher 3.0.x, and tei-publisher-lib 2.2.0 are installed.
  • open package manger to see two available updates
  • update tei-publisher first (and lib second or not at all)
  • check the logs, and try to access tei-publisher either from dashboard, launcher.
    • Alternatively, refresh browser and look for tei-publisher under installed apps.

visually distinguish multiple public-repo

Is your feature request related to a problem? Please describe.
package-service can hold multiple instances of public repo which are queried and displayed by package-manager. This is useful when example an app hosts data packages in a non-default repo, but would like other apps to be upgraded and installed from the default repo. Currently all available packages appear in a single list, with no visual clues about their source.

Describe the solution you'd like
Package manager should open separate tabs for each public-repo instance that it connects to. This way users would know where the apps they are offered originate from.

Describe alternatives you've considered
Color could also indicate separate origins, but tabs have the advantage that large repos don't clutter the single list view that is there now .

Additional context
see eXist-db/existdb-packageservice#17

Cannot install latest documentation XAR

Software:

  • exist-db v4.6.0-Snapshot
  • documentation v4.1.0

While installing via the package manager, the install silently fails. In the logs:

2019-01-27 13:51:15,815 [qtp1786077314-36] INFO  (Deploy.java [load]:275) - Retrieving package from http://demo.exist-db.org/exist/apps/pu
blic-repo/modules/find.xql?name=http%3A%2F%2Fexist-db.org%2Fapps%2Fdoc&processor=4.6.0-SNAPSHOT&version=4.1.0 
2019-01-27 13:51:16,784 [qtp1786077314-36] ERROR (Deploy.java [installAndDeploy]:195) - Package requires eXist-db version > 4.6.0. Install
ed version is 4.6.0-SNAPSHOT 
org.expath.pkg.repo.PackageException: Package requires eXist-db version > 4.6.0. Installed version is 4.6.0-SNAPSHOT
        at org.exist.repo.Deployment.checkProcessorVersion(Deployment.java:294) ~[exist.jar:4.6.0-SNAPSHOT]
        at org.exist.repo.Deployment.installAndDeploy(Deployment.java:218) ~[exist.jar:4.6.0-SNAPSHOT]
        at org.exist.repo.Deployment.installAndDeploy(Deployment.java:164) ~[exist.jar:4.6.0-SNAPSHOT]

I guess the semvercheck is not ok? or is this expected ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.